@arcgis/coding-components 5.0.0-next.8 → 5.0.0-next.9
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/{TVSG2GVI.js → 2ILO5T4K.js} +2 -2
- package/dist/cdn/{OSUWNW6P.js → 2X2TYM6H.js} +2 -2
- package/dist/cdn/{4LQQZXF4.js → 3HOBHPDJ.js} +1 -1
- package/dist/cdn/{HMZITT2Q.js → 3UV5E7O2.js} +2 -2
- package/dist/cdn/{BKE7F3ZB.js → 4XQWMGMT.js} +2 -2
- package/dist/cdn/{XQER3WFO.js → 5F3JSTSF.js} +2 -2
- package/dist/cdn/{YECVIVKH.js → 7ASDNM4F.js} +2 -2
- package/dist/cdn/{BR6YZ545.js → 7YP3X2H7.js} +2 -2
- package/dist/cdn/{3QOBSCWF.js → AVMKUJLO.js} +2 -2
- package/dist/cdn/{ZB7BE2ZZ.js → BPH245JI.js} +2 -2
- package/dist/cdn/{GFX6JP7B.js → BZPQOFQJ.js} +1 -1
- package/dist/cdn/{AVYH3ZJ2.js → C3W4OTHO.js} +2 -2
- package/dist/cdn/{5GMSJZHT.js → C765VAI3.js} +1 -1
- package/dist/cdn/{TKMSYXGU.js → CBTFERNO.js} +2 -2
- package/dist/cdn/{E4OH5IC6.js → CGWRRAHD.js} +2 -2
- package/dist/cdn/{LQYHD3J4.js → D7OJ4E7P.js} +2 -2
- package/dist/cdn/{T7PRQSQS.js → EHBILRD3.js} +1 -1
- package/dist/cdn/{OTIAIBNN.js → GGSZYQNF.js} +2 -2
- package/dist/cdn/{JSO653QH.js → HAUTF3IW.js} +2 -2
- package/dist/cdn/{COCKZUUK.js → HKJ4BBO3.js} +2 -2
- package/dist/cdn/{RT5XYRE4.js → IVW6TL5E.js} +2 -2
- package/dist/cdn/{2VC4QSUS.js → IXBRH75Q.js} +2 -2
- package/dist/cdn/{L2KBYTRA.js → KFV24GZV.js} +1 -1
- package/dist/cdn/{MSVNUPGW.js → LJ5B7E3Z.js} +2 -2
- package/dist/cdn/{4BWVZDEA.js → M2E4GMNJ.js} +2 -2
- package/dist/cdn/{3SMGWDXR.js → MNP5HP7J.js} +2 -2
- package/dist/cdn/{YVYO2JZT.js → MON5CWY4.js} +2 -2
- package/dist/cdn/{RVPSTNIP.js → MPZIHD53.js} +2 -2
- package/dist/cdn/{LSHQ2DX6.js → MWAZLJXY.js} +2 -2
- package/dist/cdn/{EBESVB6H.js → NMF2Y22L.js} +2 -2
- package/dist/cdn/{YJB2OPDO.js → NWTURGSH.js} +2 -2
- package/dist/cdn/{G7SIABD2.js → OPVUEMD7.js} +2 -2
- package/dist/cdn/{BZ77EZQ7.js → OXSRNNYW.js} +1 -1
- package/dist/cdn/{3DOEY4ZV.js → PQJF5OON.js} +2 -2
- package/dist/cdn/{O4KPDTCZ.js → RA77MYQM.js} +2 -2
- package/dist/cdn/{INZASD5B.js → RTN7SX7D.js} +2 -2
- package/dist/cdn/{V6N3MYEB.js → SDLPG7K6.js} +2 -2
- package/dist/cdn/{5PUQMSM5.js → TGA4WLVB.js} +2 -2
- package/dist/cdn/{5DRTMH4P.js → TUB3MA55.js} +1 -1
- package/dist/cdn/{UFW5TZB5.js → U3IJMXZ4.js} +2 -2
- package/dist/cdn/UFIGJCZ3.js +4 -0
- package/dist/cdn/{LNPZIN5X.js → V57JZGOZ.js} +4 -4
- package/dist/cdn/{3RVUWFOY.js → VAGO2TTG.js} +2 -2
- package/dist/cdn/{GY4SHHQP.js → XCNPRJYM.js} +2 -2
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/arcade-defaults.js +1 -1
- package/dist/chunks/arcade-executor.js +1 -1
- package/dist/chunks/arcade-mode.js +1 -1
- 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 +1 -1
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +1 -1
- 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 +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/sql-expr-service-accessors.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +1 -1
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
- 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/dist/monacoStyles.js +1 -1
- package/dist/utils/language-defaults-base.d.ts +1 -1
- package/package.json +6 -6
- package/dist/cdn/3RZFZL3P.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{b as g}from"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{b as g}from"./U3IJMXZ4.js";import b from"./7YP3X2H7.js";import{a as c}from"./CGWRRAHD.js";import a from"./D7OJ4E7P.js";import{k as i}from"./V57JZGOZ.js";import{Sl as n,kk as p}from"./PQJF5OON.js";export default $arcgis.t(([t,o])=>{p();var s=new Set;function m(e,a){return()=>{s.has(e)||s.add(e),a()}}async function y(e){s.has(e)||(await i()).createModel("",e).dispose()}var u={"light-theme":{comment:"#606060",constant:"#9809C8",date:"#296389",identifier:"#0000B3",keyword:"#BF4900",number:"#136D3D",string:"#A31515",operator:"#9809C8",predefined:"#0000B3"},"dark-theme":{comment:"#BFBFBF",constant:"#CDBAEA",date:"#97A6CE",identifier:"#9FD4F3",keyword:"#EEAA5A",number:"#AAD04B",string:"#F2877B",operator:"#CDBAEA",predefined:"#9FD4F3"}};f();function f(){i().then(e=>{["light","dark"].forEach(a=>{let d=a==="light"?"vs":"vs-dark",r=u[`${a}-theme`];e.defineTheme(d,{base:d,inherit:!0,rules:[{token:"comment.arcgis",foreground:r.comment},{token:"constant.arcgis",foreground:r.constant},{token:"keyword.arcgis",foreground:r.keyword},{token:"identifier.arcgis",foreground:r.identifier},{token:"number.arcgis",foreground:r.number},{token:"string.arcgis",foreground:r.string},{token:"operator.arcgis",foreground:r.operator},{token:"predefined.arcgis",foreground:r.predefined}],colors:{}})})})}n.register({id:o.languageId,aliases:["Arcade","arcade"],extensions:[".arc"],mimetypes:["application/arcade"]});n.onLanguage(o.languageId,m(o.languageId,()=>{g().then(e=>{e.setupMode(o)}).catch(e=>{throw e})}));n.register({id:t.languageId,aliases:["EsiSqlExpression","sql-expression"],extensions:[".sql-expression"],mimetypes:["application/sql-expression"]});n.onLanguage(t.languageId,m(t.languageId,()=>{c().then(e=>{e.setupMode(t)}).catch(e=>{throw e})}));return y},a,b)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
4
|
export default $arcgis.t(([{createArcadeExecutor:m}])=>{var k="https://developers.arcgis.com/arcade/",E=100,v=100;function C(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.arcade.featureset.support.FeatureSet"}function g(e){return!!e&&typeof e=="object"&&"arcadeDeclaredClass"in e&&typeof e.arcadeDeclaredClass=="string"&&e.arcadeDeclaredClass==="esri.arcade.Feature"}function b(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass==="esri.arcade.Dictionary"}function w(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass.startsWith("esri.geometry.")}function R(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass.startsWith("esri.rest.knowledgeGraph.KnowledgeGraph")}function h(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass==="esri.arcade.Portal"}function j(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass==="esri.arcade.Attachment"}function A(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.arcade.arcadedate"}function D(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.core.sql.dateonly"}function F(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.core.sql.timeonly"}function S(e){return!!e&&typeof e=="object"&&"length"in e&&typeof e.length=="function"&&"get"in e&&typeof e.get=="function"&&"toArray"in e&&typeof e.toArray=="function"&&"_elements"in e&&Array.isArray(e._elements)}function Z(e){return e==null?{type:"null"}:Array.isArray(e)?{type:"array",value:e}:S(e)?{type:"array",value:e.toArray()}:e instanceof Date?{type:"date",value:e}:typeof e=="string"?{type:"text",value:e}:typeof e=="number"?{type:"number",value:e}:typeof e=="boolean"?{type:"boolean",value:e}:typeof e!="object"?{type:"unknown"}:A(e)?{type:"date",value:e}:D(e)?{type:"dateOnly",value:e}:F(e)?{type:"time",value:e}:j(e)?{type:"attachment",value:e}:h(e)?{type:"portal",value:e}:C(e)?{type:"featureSet",value:e,features:[],iterator:null}:g(e)?{type:"feature",value:e}:b(e)?{type:"dictionary",value:e}:w(e)?{type:"geometry",value:e}:R(e)?{type:"knowledgeGraph",value:e}:{type:"unknown"}}function G(e,r="en"){return e.value instanceof Date?new Intl.DateTimeFormat(r,{dateStyle:"medium",timeStyle:"long"}).format(e.value):e.value.toDateTime().setLocale(r).toFormat(e.value.isUnknownTimeZone?"FF":"FF ZZZZZ")}function B(e){return e.value.toString()}function I(e){return e.value.toString()}async function x(e,r="system"){let a=Z(e);return a.type!=="featureSet"||(await a.value.load(),a.iterator=a.value.iterator({aborted:!1}),a.features=await a.iterator.nextBatchAsArcadeFeatures(v,r)??[]),a}async function O(e,r,a,s){let l=new Date;s??=()=>{};try{let o=performance.now(),n=await m(r??"",{variables:e?.variables??[]}),c=performance.now(),{profileVariableInstances:u,spatialReference:d,timeZone:i,services:y}=a,p={spatialReference:d,timeZone:i,rawOutput:!0,console:s,services:y},f=await n.executeAsync(u,p),t=await x(f,i);return t.timeStamp=l,t.compilationTime=c-o,t.executionTime=performance.now()-c,t}catch(o){let n="Unknown Error";return o instanceof Error&&(n=o.message),{type:"error",value:n,error:o,timeStamp:l,compilationTime:0,executionTime:0}}}return{a:k,b:E,c:v,d:Z,e:G,f:B,g:I,h:O}},"arcade")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import j from"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import j from"./IXBRH75Q.js";import"./U3IJMXZ4.js";import i from"./7YP3X2H7.js";import{a as v,c as r,d as I,e as n}from"./CBTFERNO.js";import{a as _}from"./M2E4GMNJ.js";import"./2ILO5T4K.js";import"./CGWRRAHD.js";import e from"./D7OJ4E7P.js";import d from"./C3W4OTHO.js";import"./3HOBHPDJ.js";import{g as b}from"./V57JZGOZ.js";import"./TGA4WLVB.js";import{c as g,d as f}from"./BZPQOFQJ.js";import{D as p,g as h,h as s,l as c,y as a,z as u}from"./NMF2Y22L.js";import{f as o}from"./C765VAI3.js";import"./PQJF5OON.js";import"./TUB3MA55.js";export default $arcgis.t(([,,,d])=>{var $=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)}}`,m=class extends u{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=c({bubbles:!1}),this.arcgisItemSelected=c({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=r(),this._themeChangedListener=I(()=>this._colorizeStyle=r())}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(()=>{f(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=n(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=${o(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-level=2 .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(g)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${o(e.completion.detail)}><div .innerHTML=${n(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-level=2 .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>`}};p("arcgis-language-api-panel",m);return m},d,e,i,j)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{b as r}from"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{b as r}from"./2ILO5T4K.js";import{E as o}from"./NMF2Y22L.js";var s=r(o);export{s as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as T}from"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{a as T}from"./TGA4WLVB.js";import{Tl as F}from"./PQJF5OON.js";import"./TUB3MA55.js";var M=Object.defineProperty,R=Object.getOwnPropertyDescriptor,K=Object.getOwnPropertyNames,E=Object.prototype.hasOwnProperty,P=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of K(t))!E.call(e,l)&&l!==o&&M(e,l,{get:()=>t[l],enumerable:!(r=R(t,l))||r.enumerable});return e},H=(e,t,o)=>(P(e,t,"default"),o&&P(o,t,"default")),n={};H(n,F);var V=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;let e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=n.editor.createWebWorker({moduleId:"vs/language/typescript/tsWorker",label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(n.editor.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){let t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},s={};s["lib.d.ts"]=!0;s["lib.decorators.d.ts"]=!0;s["lib.decorators.legacy.d.ts"]=!0;s["lib.dom.asynciterable.d.ts"]=!0;s["lib.dom.d.ts"]=!0;s["lib.dom.iterable.d.ts"]=!0;s["lib.es2015.collection.d.ts"]=!0;s["lib.es2015.core.d.ts"]=!0;s["lib.es2015.d.ts"]=!0;s["lib.es2015.generator.d.ts"]=!0;s["lib.es2015.iterable.d.ts"]=!0;s["lib.es2015.promise.d.ts"]=!0;s["lib.es2015.proxy.d.ts"]=!0;s["lib.es2015.reflect.d.ts"]=!0;s["lib.es2015.symbol.d.ts"]=!0;s["lib.es2015.symbol.wellknown.d.ts"]=!0;s["lib.es2016.array.include.d.ts"]=!0;s["lib.es2016.d.ts"]=!0;s["lib.es2016.full.d.ts"]=!0;s["lib.es2016.intl.d.ts"]=!0;s["lib.es2017.d.ts"]=!0;s["lib.es2017.date.d.ts"]=!0;s["lib.es2017.full.d.ts"]=!0;s["lib.es2017.intl.d.ts"]=!0;s["lib.es2017.object.d.ts"]=!0;s["lib.es2017.sharedmemory.d.ts"]=!0;s["lib.es2017.string.d.ts"]=!0;s["lib.es2017.typedarrays.d.ts"]=!0;s["lib.es2018.asyncgenerator.d.ts"]=!0;s["lib.es2018.asynciterable.d.ts"]=!0;s["lib.es2018.d.ts"]=!0;s["lib.es2018.full.d.ts"]=!0;s["lib.es2018.intl.d.ts"]=!0;s["lib.es2018.promise.d.ts"]=!0;s["lib.es2018.regexp.d.ts"]=!0;s["lib.es2019.array.d.ts"]=!0;s["lib.es2019.d.ts"]=!0;s["lib.es2019.full.d.ts"]=!0;s["lib.es2019.intl.d.ts"]=!0;s["lib.es2019.object.d.ts"]=!0;s["lib.es2019.string.d.ts"]=!0;s["lib.es2019.symbol.d.ts"]=!0;s["lib.es2020.bigint.d.ts"]=!0;s["lib.es2020.d.ts"]=!0;s["lib.es2020.date.d.ts"]=!0;s["lib.es2020.full.d.ts"]=!0;s["lib.es2020.intl.d.ts"]=!0;s["lib.es2020.number.d.ts"]=!0;s["lib.es2020.promise.d.ts"]=!0;s["lib.es2020.sharedmemory.d.ts"]=!0;s["lib.es2020.string.d.ts"]=!0;s["lib.es2020.symbol.wellknown.d.ts"]=!0;s["lib.es2021.d.ts"]=!0;s["lib.es2021.full.d.ts"]=!0;s["lib.es2021.intl.d.ts"]=!0;s["lib.es2021.promise.d.ts"]=!0;s["lib.es2021.string.d.ts"]=!0;s["lib.es2021.weakref.d.ts"]=!0;s["lib.es2022.array.d.ts"]=!0;s["lib.es2022.d.ts"]=!0;s["lib.es2022.error.d.ts"]=!0;s["lib.es2022.full.d.ts"]=!0;s["lib.es2022.intl.d.ts"]=!0;s["lib.es2022.object.d.ts"]=!0;s["lib.es2022.regexp.d.ts"]=!0;s["lib.es2022.sharedmemory.d.ts"]=!0;s["lib.es2022.string.d.ts"]=!0;s["lib.es2023.array.d.ts"]=!0;s["lib.es2023.collection.d.ts"]=!0;s["lib.es2023.d.ts"]=!0;s["lib.es2023.full.d.ts"]=!0;s["lib.es5.d.ts"]=!0;s["lib.es6.d.ts"]=!0;s["lib.esnext.collection.d.ts"]=!0;s["lib.esnext.d.ts"]=!0;s["lib.esnext.decorators.d.ts"]=!0;s["lib.esnext.disposable.d.ts"]=!0;s["lib.esnext.full.d.ts"]=!0;s["lib.esnext.intl.d.ts"]=!0;s["lib.esnext.object.d.ts"]=!0;s["lib.esnext.promise.d.ts"]=!0;s["lib.scripthost.d.ts"]=!0;s["lib.webworker.asynciterable.d.ts"]=!0;s["lib.webworker.d.ts"]=!0;s["lib.webworker.importscripts.d.ts"]=!0;s["lib.webworker.iterable.d.ts"]=!0;function C(e,t,o=0){if(typeof e=="string")return e;if(e===void 0)return"";let r="";if(o){r+=t;for(let l=0;l<o;l++)r+=" "}if(r+=e.messageText,o++,e.next)for(let l of e.next)r+=C(l,t,o);return r}function _(e){return e?e.map(t=>t.text).join(""):""}var m=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let o=e.getPositionAt(t.start),r=e.getPositionAt(t.start+t.length),{lineNumber:l,column:c}=o,{lineNumber:u,column:a}=r;return{startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:a}}},W=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!s[e.path.slice(1)]:!1}getOrCreateModel(e){let t=n.Uri.parse(e),o=n.editor.getModel(t);if(o)return o;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return n.editor.createModel(this._libFiles[t.path.slice(1)],"typescript",t);let r=T.getExtraLibs()[e];return r?n.editor.createModel(r.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}},j=class extends m{constructor(e,t,o,r){super(r),this._libFiles=e,this._defaults=t,this._selector=o,this._disposables=[],this._listener=Object.create(null);let l=a=>{if(a.getLanguageId()!==o)return;let i=()=>{let{onlyVisible:f}=this._defaults.getDiagnosticsOptions();f?a.isAttachedToEditor()&&this._doValidate(a):this._doValidate(a)},g,d=a.onDidChangeContent(()=>{clearTimeout(g),g=window.setTimeout(i,500)}),h=a.onDidChangeAttached(()=>{let{onlyVisible:f}=this._defaults.getDiagnosticsOptions();f&&(a.isAttachedToEditor()?i():n.editor.setModelMarkers(a,this._selector,[]))});this._listener[a.uri.toString()]={dispose(){d.dispose(),h.dispose(),clearTimeout(g)}},i()},c=a=>{n.editor.setModelMarkers(a,this._selector,[]);let i=a.uri.toString();this._listener[i]&&(this._listener[i].dispose(),delete this._listener[i])};this._disposables.push(n.editor.onDidCreateModel(a=>l(a))),this._disposables.push(n.editor.onWillDisposeModel(c)),this._disposables.push(n.editor.onDidChangeModelLanguage(a=>{c(a.model),l(a.model)})),this._disposables.push({dispose(){for(let a of n.editor.getModels())c(a)}});let u=()=>{for(let a of n.editor.getModels())c(a),l(a)};this._disposables.push(this._defaults.onDidChange(u)),this._disposables.push(this._defaults.onDidExtraLibsChange(u)),n.editor.getModels().forEach(a=>l(a))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){let t=await this._worker(e.uri);if(e.isDisposed())return;let o=[],{noSyntaxValidation:r,noSemanticValidation:l,noSuggestionDiagnostics:c}=this._defaults.getDiagnosticsOptions();r||o.push(t.getSyntacticDiagnostics(e.uri.toString())),l||o.push(t.getSemanticDiagnostics(e.uri.toString())),c||o.push(t.getSuggestionDiagnostics(e.uri.toString()));let u=await Promise.all(o);if(!u||e.isDisposed())return;let a=u.reduce((g,d)=>d.concat(g),[]).filter(g=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(g.code)===-1),i=a.map(g=>g.relatedInformation||[]).reduce((g,d)=>d.concat(g),[]).map(g=>g.file?n.Uri.parse(g.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(i),!e.isDisposed()&&n.editor.setModelMarkers(e,this._selector,a.map(g=>this._convertDiagnostics(e,g)))}_convertDiagnostics(e,t){let o=t.start||0,r=t.length||1,{lineNumber:l,column:c}=e.getPositionAt(o),{lineNumber:u,column:a}=e.getPositionAt(o+r),i=[];return t.reportsUnnecessary&&i.push(n.MarkerTag.Unnecessary),t.reportsDeprecated&&i.push(n.MarkerTag.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:l,startColumn:c,endLineNumber:u,endColumn:a,message:C(t.messageText,`
|
|
5
5
|
`),code:t.code.toString(),tags:i,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];let o=[];return t.forEach(r=>{let l=e;if(r.file&&(l=this._libFiles.getOrCreateModel(r.file.fileName)),!l)return;let c=r.start||0,u=r.length||1,{lineNumber:a,column:i}=l.getPositionAt(c),{lineNumber:g,column:d}=l.getPositionAt(c+u);o.push({resource:l.uri,startLineNumber:a,startColumn:i,endLineNumber:g,endColumn:d,message:C(r.messageText,`
|
|
6
6
|
`)})}),o}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return n.MarkerSeverity.Error;case 3:return n.MarkerSeverity.Info;case 0:return n.MarkerSeverity.Warning;case 2:return n.MarkerSeverity.Hint}return n.MarkerSeverity.Info}},B=class x extends m{get triggerCharacters(){return["."]}async provideCompletionItems(t,o,r,l){let c=t.getWordUntilPosition(o),u=new n.Range(o.lineNumber,c.startColumn,o.lineNumber,c.endColumn),a=t.uri,i=t.getOffsetAt(o),g=await this._worker(a);if(t.isDisposed())return;let d=await g.getCompletionsAtPosition(a.toString(),i);return!d||t.isDisposed()?void 0:{suggestions:d.entries.map(f=>{let w=u;if(f.replacementSpan){let k=t.getPositionAt(f.replacementSpan.start),v=t.getPositionAt(f.replacementSpan.start+f.replacementSpan.length);w=new n.Range(k.lineNumber,k.column,v.lineNumber,v.column)}let S=[];return f.kindModifiers!==void 0&&f.kindModifiers.indexOf("deprecated")!==-1&&S.push(n.languages.CompletionItemTag.Deprecated),{uri:a,position:o,offset:i,range:w,label:f.name,insertText:f.name,sortText:f.sortText,kind:x.convertKind(f.kind),tags:S}})}}async resolveCompletionItem(t,o){let r=t,l=r.uri,c=r.position,u=r.offset,i=await(await this._worker(l)).getCompletionEntryDetails(l.toString(),u,r.label);return i?{uri:l,position:c,label:i.name,kind:x.convertKind(i.kind),detail:_(i.displayParts),documentation:{value:x.createDocumentationString(i)}}:r}static convertKind(t){switch(t){case p.primitiveType:case p.keyword:return n.languages.CompletionItemKind.Keyword;case p.variable:case p.localVariable:return n.languages.CompletionItemKind.Variable;case p.memberVariable:case p.memberGetAccessor:case p.memberSetAccessor:return n.languages.CompletionItemKind.Field;case p.function:case p.memberFunction:case p.constructSignature:case p.callSignature:case p.indexSignature:return n.languages.CompletionItemKind.Function;case p.enum:return n.languages.CompletionItemKind.Enum;case p.module:return n.languages.CompletionItemKind.Module;case p.class:return n.languages.CompletionItemKind.Class;case p.interface:return n.languages.CompletionItemKind.Interface;case p.warning:return n.languages.CompletionItemKind.File}return n.languages.CompletionItemKind.Property}static createDocumentationString(t){let o=_(t.documentation);if(t.tags)for(let r of t.tags)o+=`
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as t,b as e}from"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{a as t,b as e}from"./NWTURGSH.js";import"./PQJF5OON.js";import"./TUB3MA55.js";var i=t,o={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{i as conf,o as language};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import d from"./BZ77EZQ7.js";import{a as F}from"./UFW5TZB5.js";import{a as T}from"./INZASD5B.js";import c from"./BR6YZ545.js";import b from"./L2KBYTRA.js";import{a as B}from"./4BWVZDEA.js";import"./TVSG2GVI.js";import a from"./AVYH3ZJ2.js";import"./4LQQZXF4.js";import"./LNPZIN5X.js";import"./5PUQMSM5.js";import"./GFX6JP7B.js";import{A as n,D as C,E as k,g as S,h as i,j as _,l as m,n as w,x as R,y,z as D}from"./EBESVB6H.js";import{a as P,g as E}from"./5GMSJZHT.js";import{Hl as I,kk as z}from"./3DOEY4ZV.js";import"./5DRTMH4P.js";export default $arcgis.t(([N,,{a:L,h:f},o,M])=>{z();var O=S`@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}}}`,H="https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0",V=s=>{let{aiAssistantsEnabled:e}=s;return e===void 0?(console.warn("areAiAssistantsEnabled is not defined in the organizations settings."),!1):e},G=s=>!(!s||!("id"in s)),q=async s=>(await N.getCredential(s)).token;async function K({portalUrl:s,profile:e}){if(!G(e))return console.warn("Arcade assistant addon initialization failed: unsupported profile."),{shouldRender:!1};let t=s.replace(/\/sharing\/rest(\/.*)?$/iu,"").replace(/\/$/u,""),a=await q(s),r=`${t}/sharing/rest/portals/self?f=json&token=${a}`,l=`${t}/sharing/rest/portals/self/settings?f=json&token=${a}`,d=`${t}/sharing/rest/portals/self/signinSettings?f=json&token=${a}`,h=await Promise.allSettled([fetch(r,{credentials:"include"}).then(c=>c.json()),fetch(l,{credentials:"include"}).then(c=>c.json()),fetch(d,{credentials:"include"}).then(c=>c.json())]),[p,g,u]=h,x=p.status==="fulfilled"?p.value:(console.warn("Failed to fetch selfUrl",p.reason),{}),A=g.status==="fulfilled"?g.value:(console.warn("Failed to fetch settingsUrl",g.reason),{}),U=u.status==="fulfilled"?u.value:(console.warn("Failed to fetch signinSettingsUrl",u.reason),{}),$=x?.helperServices?.aiAssistantServices?.url;if(!$)return console.warn("Arcade Assistant service URL is not available in the portal self response."),{shouldRender:!1};let j=x.helpBase||"";if(!A)return console.warn("Arcade Assistant settings response is not available."),{shouldRender:!1};let v=V(A);return U.blockBetaApps===!0&&(console.warn("Arcade Assistant is blocked by the organization settings. To enable it, do not block beta apps in the organization settings."),v=!1),{shouldRender:!0,serviceUrl:$,helpBase:j,assistantsEnabled:v,feedbackServiceUrl:H}}var b=class extends D{constructor(){super(...arguments),this._codeEditorElt=R(),this._componentReadyDefer=new P,this._disposables=[],this._editorProfilePromise=Promise.resolve(void 0),this.messages=B(),this._modelId=E(),this._openArcadeHelp=()=>void window.open(L,"Arcade Help"),this._toggleSidePanel=e=>{if(!e.target)return;let t=e.target?.dataset.panelName??"none";this.openedSidePanel=t===this.openedSidePanel?"none":t,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._arcadeAssistantRemoteState={shouldRender:!1},this.hideDocumentationActions=!1,this.hideSideBar=!1,this.openedSidePanel="none",this.script="",this.sideActionBarExpanded=!1,this.arcgisDiagnosticsChange=m({bubbles:!1}),this.arcgisScriptChange=m({bubbles:!1})}static{this.properties={_apiLibrary:16,_consoleLogs:16,_editorProfile:16,_executingScript:16,_executionResult:16,_preparingArcade:16,_resultPanel:16,_showExecutionPanel:16,_arcadeAssistantRemoteState: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,arcadeAssistant:0}}static{this.shadowRootOptions=w}static{this.styles=[O,T]}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 t=this._codeEditorElt.value?.value;return await f(e.definition,t,this.testData)}async setFocus(){await this._componentReadyDefer.promise,await this._codeEditorElt.value?.setFocus()}async load(){let e=k("./assets");M(e),await this._updateDataModelDeps(),await this._updateArcadeAssistantRemoteState()}willUpdate(e){(e.has("messages")||e.has("profile"))&&this.hasUpdated&&this._updateDataModelDeps(),e.has("testData")&&this._testDataChanged(),e.has("snippets")&&o.updateApiContextForModel(this._modelId,{snippets:this.snippets}),e.has("arcadeAssistant")&&this._updateArcadeAssistantRemoteState()}async loaded(){this._componentReadyDefer.resolve(),await this._updateApiLibrary();let e=await F();this._disposables.push(e.onDiagnosticsChange(t=>!this._preparingArcade&&this.arcgisDiagnosticsChange.emit(t.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 o.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale,snippets:this.snippets}),this._editorProfile=o.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._editorProfilePromise=Promise.resolve(this._editorProfile),this._preparingArcade=!1}}async _updateApiLibrary(){this._apiLibrary=await o.getApiLibraryForModel(this._modelId)}async _executeScript(){let e=this.testData;if(!this._codeEditorElt.value||!e)return;let t=await this._editorProfilePromise;if(!t){this._executionResult={type:"error",value:"Missing editor profile",error:null};return}this._showExecutionPanel=!0,this._executingScript=!0,this._consoleLogs=[],setTimeout(()=>void(async()=>{let a=this._codeEditorElt.value?.value;this._executionResult=await f(t.definition,a,e,r=>setTimeout(()=>this._consoleLogs=[...this._consoleLogs,r],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:[I.F5],contextMenuGroupId:"code",contextMenuOrder:1,run:()=>{this.testData&&this._executeScript().catch(console.error)}});e&&(this._executeScriptAction=e,this._disposables.push(e))}_disposeSafely(e){let t=this._disposables.indexOf(e);t!==-1&&this._disposables.splice(t,1),e.dispose()}async _updateArcadeAssistantRemoteState(){this.arcadeAssistant&&(this._arcadeAssistantRemoteState=await K({...this.arcadeAssistant,profile:this.profile}))}renderMainActionBar(){return this.testData?i`<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?i`<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 i`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${o.languageId} .value=${this.script??""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${y(this._codeEditorElt)}></arcgis-code-editor>`}renderAction({id:e,label:t,icon:a,active:r,panelName:l,iconFlipRtl:d=!1,onClick:h=this._toggleSidePanel}){return i`<calcite-action id=${e??_} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${a} .active=${r} @click=${h} data-panel-name=${l??_} .iconFlipRtl=${d}></calcite-action>${!this.sideActionBarExpanded&&i`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>`||""}`}renderSideActionBar(){return this.hideSideBar?null:i`<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._arcadeAssistantRemoteState.shouldRender&&this.renderAction({id:"arcade-assistant-action",label:this.messages.arcadeassistant??"Arcade assistant",icon:"effects",active:this.openedSidePanel==="arcade-assistant",panelName:"arcade-assistant"})||""}${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 i`<arcgis-language-api-panel class=${n(e==="api"&&"code-editor-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=${n(e==="variables"&&"code-editor-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&&i`<arcgis-arcade-suggestions class=${n(e==="suggestions"&&"code-editor-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.arcadeAssistant&&this._arcadeAssistantRemoteState.shouldRender&&i`<arcgis-arcade-coding-assistant class=${n(e==="arcade-assistant"&&"code-editor-side-panel flex-panel border-inline-start")} .closed=${e!=="arcade-assistant"} .insertText=${this._insertText.bind(this)} .closePanel=${this._toggleSidePanel} .portalUrl=${this.arcadeAssistant.portalUrl} .serviceUrl=${this._arcadeAssistantRemoteState.serviceUrl} .helpBase=${this._arcadeAssistantRemoteState.helpBase} .assistantsEnabled=${this._arcadeAssistantRemoteState.assistantsEnabled} .feedbackServiceUrl=${this._arcadeAssistantRemoteState.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant.appVersion}></arcgis-arcade-coding-assistant>`||""}${this.customPanels?.map(t=>t?.useFlows?t.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==t.id,editorRef:this.el}):i`<calcite-flow class=${n(e===t.id?"code-editor-side-panel flex-panel border-inline-start":"hidden")}><calcite-flow-item .heading=${t.name} heading-level=2 closable @calciteFlowItemClose=${this._toggleSidePanel} .description=${t.description}>${t.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==t.id,editorRef:this.el})}</calcite-flow-item></calcite-flow>`)}`}renderResultsPanel(){return this._showExecutionPanel?i`<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 i`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`}};C("arcgis-arcade-editor",b);return b},"identity/IdentityManager",a,b,c,d)
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import d from"./OXSRNNYW.js";import{a as F}from"./U3IJMXZ4.js";import{a as T}from"./RTN7SX7D.js";import c from"./7YP3X2H7.js";import b from"./KFV24GZV.js";import{a as B}from"./M2E4GMNJ.js";import"./2ILO5T4K.js";import a from"./C3W4OTHO.js";import"./3HOBHPDJ.js";import"./V57JZGOZ.js";import"./TGA4WLVB.js";import"./BZPQOFQJ.js";import{A as n,D as C,E as k,g as S,h as i,j as _,l as m,n as w,x as R,y,z as D}from"./NMF2Y22L.js";import{a as P,g as E}from"./C765VAI3.js";import{Hl as I,kk as z}from"./PQJF5OON.js";import"./TUB3MA55.js";export default $arcgis.t(([N,,{a:L,h:f},o,M])=>{z();var O=S`@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}}}`,H="https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0",V=s=>{let{aiAssistantsEnabled:e}=s;return e===void 0?(console.warn("areAiAssistantsEnabled is not defined in the organizations settings."),!1):e},G=s=>!(!s||!("id"in s)),q=async s=>(await N.getCredential(s)).token;async function K({portalUrl:s,profile:e}){if(!G(e))return console.warn("Arcade assistant addon initialization failed: unsupported profile."),{shouldRender:!1};let t=s.replace(/\/sharing\/rest(\/.*)?$/iu,"").replace(/\/$/u,""),a=await q(s),r=`${t}/sharing/rest/portals/self?f=json&token=${a}`,l=`${t}/sharing/rest/portals/self/settings?f=json&token=${a}`,d=`${t}/sharing/rest/portals/self/signinSettings?f=json&token=${a}`,h=await Promise.allSettled([fetch(r,{credentials:"include"}).then(c=>c.json()),fetch(l,{credentials:"include"}).then(c=>c.json()),fetch(d,{credentials:"include"}).then(c=>c.json())]),[p,g,u]=h,x=p.status==="fulfilled"?p.value:(console.warn("Failed to fetch selfUrl",p.reason),{}),A=g.status==="fulfilled"?g.value:(console.warn("Failed to fetch settingsUrl",g.reason),{}),U=u.status==="fulfilled"?u.value:(console.warn("Failed to fetch signinSettingsUrl",u.reason),{}),$=x?.helperServices?.aiAssistantServices?.url;if(!$)return console.warn("Arcade Assistant service URL is not available in the portal self response."),{shouldRender:!1};let j=x.helpBase||"";if(!A)return console.warn("Arcade Assistant settings response is not available."),{shouldRender:!1};let v=V(A);return U.blockBetaApps===!0&&(console.warn("Arcade Assistant is blocked by the organization settings. To enable it, do not block beta apps in the organization settings."),v=!1),{shouldRender:!0,serviceUrl:$,helpBase:j,assistantsEnabled:v,feedbackServiceUrl:H}}var b=class extends D{constructor(){super(...arguments),this._codeEditorElt=R(),this._componentReadyDefer=new P,this._disposables=[],this._editorProfilePromise=Promise.resolve(void 0),this.messages=B(),this._modelId=E(),this._openArcadeHelp=()=>void window.open(L,"Arcade Help"),this._toggleSidePanel=e=>{if(!e.target)return;let t=e.target?.dataset.panelName??"none";this.openedSidePanel=t===this.openedSidePanel?"none":t,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._arcadeAssistantRemoteState={shouldRender:!1},this.hideDocumentationActions=!1,this.hideSideBar=!1,this.openedSidePanel="none",this.script="",this.sideActionBarExpanded=!1,this.arcgisDiagnosticsChange=m({bubbles:!1}),this.arcgisScriptChange=m({bubbles:!1})}static{this.properties={_apiLibrary:16,_consoleLogs:16,_editorProfile:16,_executingScript:16,_executionResult:16,_preparingArcade:16,_resultPanel:16,_showExecutionPanel:16,_arcadeAssistantRemoteState: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,arcadeAssistant:0}}static{this.shadowRootOptions=w}static{this.styles=[O,T]}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 t=this._codeEditorElt.value?.value;return await f(e.definition,t,this.testData)}async setFocus(){await this._componentReadyDefer.promise,await this._codeEditorElt.value?.setFocus()}async load(){let e=k("./assets");M(e),await this._updateDataModelDeps(),await this._updateArcadeAssistantRemoteState()}willUpdate(e){(e.has("messages")||e.has("profile"))&&this.hasUpdated&&this._updateDataModelDeps(),e.has("testData")&&this._testDataChanged(),e.has("snippets")&&o.updateApiContextForModel(this._modelId,{snippets:this.snippets}),e.has("arcadeAssistant")&&this._updateArcadeAssistantRemoteState()}async loaded(){this._componentReadyDefer.resolve(),await this._updateApiLibrary();let e=await F();this._disposables.push(e.onDiagnosticsChange(t=>!this._preparingArcade&&this.arcgisDiagnosticsChange.emit(t.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 o.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale,snippets:this.snippets}),this._editorProfile=o.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._editorProfilePromise=Promise.resolve(this._editorProfile),this._preparingArcade=!1}}async _updateApiLibrary(){this._apiLibrary=await o.getApiLibraryForModel(this._modelId)}async _executeScript(){let e=this.testData;if(!this._codeEditorElt.value||!e)return;let t=await this._editorProfilePromise;if(!t){this._executionResult={type:"error",value:"Missing editor profile",error:null};return}this._showExecutionPanel=!0,this._executingScript=!0,this._consoleLogs=[],setTimeout(()=>void(async()=>{let a=this._codeEditorElt.value?.value;this._executionResult=await f(t.definition,a,e,r=>setTimeout(()=>this._consoleLogs=[...this._consoleLogs,r],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:[I.F5],contextMenuGroupId:"code",contextMenuOrder:1,run:()=>{this.testData&&this._executeScript().catch(console.error)}});e&&(this._executeScriptAction=e,this._disposables.push(e))}_disposeSafely(e){let t=this._disposables.indexOf(e);t!==-1&&this._disposables.splice(t,1),e.dispose()}async _updateArcadeAssistantRemoteState(){this.arcadeAssistant&&(this._arcadeAssistantRemoteState=await K({...this.arcadeAssistant,profile:this.profile}))}renderMainActionBar(){return this.testData?i`<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?i`<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 i`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${o.languageId} .value=${this.script??""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${y(this._codeEditorElt)}></arcgis-code-editor>`}renderAction({id:e,label:t,icon:a,active:r,panelName:l,iconFlipRtl:d=!1,onClick:h=this._toggleSidePanel}){return i`<calcite-action id=${e??_} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${a} .active=${r} @click=${h} data-panel-name=${l??_} .iconFlipRtl=${d}></calcite-action>${!this.sideActionBarExpanded&&i`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>`||""}`}renderSideActionBar(){return this.hideSideBar?null:i`<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._arcadeAssistantRemoteState.shouldRender&&this.renderAction({id:"arcade-assistant-action",label:this.messages.arcadeassistant??"Arcade assistant",icon:"effects",active:this.openedSidePanel==="arcade-assistant",panelName:"arcade-assistant"})||""}${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 i`<arcgis-language-api-panel class=${n(e==="api"&&"code-editor-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=${n(e==="variables"&&"code-editor-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&&i`<arcgis-arcade-suggestions class=${n(e==="suggestions"&&"code-editor-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.arcadeAssistant&&this._arcadeAssistantRemoteState.shouldRender&&i`<arcgis-arcade-coding-assistant class=${n(e==="arcade-assistant"&&"code-editor-side-panel flex-panel border-inline-start")} .closed=${e!=="arcade-assistant"} .insertText=${this._insertText.bind(this)} .closePanel=${this._toggleSidePanel} .portalUrl=${this.arcadeAssistant.portalUrl} .serviceUrl=${this._arcadeAssistantRemoteState.serviceUrl} .helpBase=${this._arcadeAssistantRemoteState.helpBase} .assistantsEnabled=${this._arcadeAssistantRemoteState.assistantsEnabled} .feedbackServiceUrl=${this._arcadeAssistantRemoteState.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant.appVersion}></arcgis-arcade-coding-assistant>`||""}${this.customPanels?.map(t=>t?.useFlows?t.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==t.id,editorRef:this.el}):i`<calcite-flow class=${n(e===t.id?"code-editor-side-panel flex-panel border-inline-start":"hidden")}><calcite-flow-item .heading=${t.name} heading-level=2 closable @calciteFlowItemClose=${this._toggleSidePanel} .description=${t.description}>${t.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==t.id,editorRef:this.el})}</calcite-flow-item></calcite-flow>`)}`}renderResultsPanel(){return this._showExecutionPanel?i`<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 i`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`}};C("arcgis-arcade-editor",b);return b},"identity/IdentityManager",a,b,c,d)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import"./TUB3MA55.js";var e={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},t={defaultToken:"",tokenPostfix:".css",ws:`[
|
|
5
5
|
\r\f]*`,identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},{include:"@strings"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},[`[^)\r
|
|
6
6
|
]+`,"string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}};export{e as conf,t as language};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as A,b as Mt,c as Y}from"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{a as A,b as Mt,c as Y}from"./C765VAI3.js";var Z=globalThis,X=Z.ShadowRoot&&(Z.ShadyCSS===void 0||Z.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mt=Symbol(),It=new WeakMap,I=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==mt)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(X&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=It.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&It.set(e,t))}return t}toString(){return this.cssText}},kt=o=>new I(typeof o=="string"?o:o+"",void 0,mt),ye=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((s,i,r)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[r+1],o[0]);return new I(e,o,mt)},Ht=(o,t)=>{if(X)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),i=Z.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},yt=X?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return kt(e)})(o):o;var{is:ge,defineProperty:ve,getOwnPropertyDescriptor:Ee,getOwnPropertyNames:$e,getOwnPropertySymbols:be,getPrototypeOf:_e}=Object,et=globalThis,jt=et.trustedTypes,Ae=jt?jt.emptyScript:"",Ce=et.reactiveElementPolyfillSupport,k=(o,t)=>o,tt={toAttribute(o,t){switch(t){case Boolean:o=o?Ae: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)=>!ge(o,t),zt={attribute:!0,type:String,converter:tt,reflect:!1,useDefault:!1,hasChanged:H};Symbol.metadata??=Symbol("metadata"),et.litPropertyMetadata??=new WeakMap;var $=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=zt){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&&ve(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){let{get:i,set:r}=Ee(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:i,set(n){let a=i?.call(this);r?.call(this,n),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??zt}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;let t=_e(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){let e=this.properties,s=[...$e(e),...be(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(yt(i))}else t!==void 0&&e.push(yt(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 Ht(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 r=(s.converter?.toAttribute!==void 0?s.converter:tt).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let r=s.getPropertyOptions(i),n=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:tt;this._$Em=i,this[i]=n.fromAttribute(e,r.type)??this._$Ej?.get(i)??null,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let i=this.constructor,r=this[t];if(s??=i.getPropertyOptions(t),!((s.hasChanged??H)(r,e)||s.useDefault&&s.reflect&&r===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:r},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),r!==!0||n!==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,r]of this._$Ep)this[i]=r;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[i,r]of s){let{wrapped:n}=r,a=this[i];n!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,r,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){}};$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[k("elementProperties")]=new Map,$[k("finalized")]=new Map,Ce?.({ReactiveElement:$}),(et.reactiveElementVersions??=[]).push("2.1.0");var vt=globalThis,st=vt.trustedTypes,Vt=st?st.createPolicy("lit-html",{createHTML:o=>o}):void 0,Et="$lit$",b=`lit$${Math.random().toFixed(9).slice(2)}$`,$t="?"+b,we=`<${$t}>`,S=document,z=()=>S.createComment(""),V=o=>o===null||typeof o!="object"&&typeof o!="function",bt=Array.isArray,Kt=o=>bt(o)||typeof o?.[Symbol.iterator]=="function",gt=`[
|
|
5
5
|
\f\r]`,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Bt=/-->/g,Wt=/>/g,w=RegExp(`>|${gt}(?:([^\\s"'>=/]+)(${gt}*=${gt}*(?:[^
|
|
6
6
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ft=/'/g,Gt=/"/g,Jt=/^(?:script|style|textarea|title)$/i,_t=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),ps=_t(1),us=_t(2),fs=_t(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),qt=new WeakMap,O=S.createTreeWalker(S,129);function Qt(o,t){if(!bt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vt!==void 0?Vt.createHTML(t):t}var Yt=(o,t)=>{let e=o.length-1,s=[],i,r=t===2?"<svg>":t===3?"<math>":"",n=j;for(let a=0;a<e;a++){let c=o[a],l,u,h=-1,y=0;for(;y<c.length&&(n.lastIndex=y,u=n.exec(c),u!==null);)y=n.lastIndex,n===j?u[1]==="!--"?n=Bt:u[1]!==void 0?n=Wt:u[2]!==void 0?(Jt.test(u[2])&&(i=RegExp("</"+u[2],"g")),n=w):u[3]!==void 0&&(n=w):n===w?u[0]===">"?(n=i??j,h=-1):u[1]===void 0?h=-2:(h=n.lastIndex-u[2].length,l=u[1],n=u[3]===void 0?w:u[3]==='"'?Gt:Ft):n===Gt||n===Ft?n=w:n===Bt||n===Wt?n=j:(n=w,i=void 0);let g=n===w&&o[a+1].startsWith("/>")?" ":"";r+=n===j?c+we:h>=0?(s.push(l),c.slice(0,h)+Et+c.slice(h)+b+g):c+b+(h===-2?a:g)}return[Qt(o,r+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},B=class o{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,n=0,a=t.length-1,c=this.parts,[l,u]=Yt(t,e);if(this.el=o.createElement(l,s),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=O.nextNode())!==null&&c.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith(Et)){let y=u[n++],g=i.getAttribute(h).split(b),C=/([.?@])?(.*)/.exec(y);c.push({type:1,index:r,name:C[2],strings:g,ctor:C[1]==="."?it:C[1]==="?"?rt:C[1]==="@"?nt:P}),i.removeAttribute(h)}else h.startsWith(b)&&(c.push({type:6,index:r}),i.removeAttribute(h));if(Jt.test(i.tagName)){let h=i.textContent.split(b),y=h.length-1;if(y>0){i.textContent=st?st.emptyScript:"";for(let g=0;g<y;g++)i.append(h[g],z()),O.nextNode(),c.push({type:2,index:++r});i.append(h[y],z())}}}else if(i.nodeType===8)if(i.data===$t)c.push({type:2,index:r});else{let h=-1;for(;(h=i.data.indexOf(b,h+1))!==-1;)c.push({type:7,index:r}),h+=b.length-1}r++}}static createElement(t,e){let s=S.createElement("template");return s.innerHTML=t,s}};function T(o,t,e=o,s){if(t===f)return t;let i=s!==void 0?e._$Co?.[s]:e._$Cl,r=V(t)?void 0:t._$litDirective$;return i?.constructor!==r&&(i?._$AO?.(!1),r===void 0?i=void 0:(i=new r(o),i._$AT(o,e,s)),s!==void 0?(e._$Co??=[])[s]=i:e._$Cl=i),i!==void 0&&(t=T(o,i._$AS(o,t.values),i,s)),t}var ot=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??S).importNode(e,!0);O.currentNode=i;let r=O.nextNode(),n=0,a=0,c=s[0];for(;c!==void 0;){if(n===c.index){let l;c.type===2?l=new U(r,r.nextSibling,this,t):c.type===1?l=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(l=new at(r,this,t)),this._$AV.push(l),c=s[++a]}n!==c?.index&&(r=O.nextNode(),n++)}return O.currentNode=S,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=T(this,t,e),V(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):Kt(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&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.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=B.createElement(Qt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{let r=new ot(i,this),n=r.u(this.options);r.p(e),this.T(n),this._$AH=r}}_$AC(t){let e=qt.get(t.strings);return e===void 0&&qt.set(t.strings,e=new B(t)),e}k(t){bt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let r of t)i===e.length?e.push(s=new o(this.O(z()),this.O(z()),this,this.options)):s=e[i],s._$AI(r),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))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,r){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,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 r=this.strings,n=!1;if(r===void 0)t=T(this,t,e,0),n=!V(t)||t!==this._$AH&&t!==f,n&&(this._$AH=t);else{let a=t,c,l;for(t=r[0],c=0;c<r.length-1;c++)l=T(this,a[s+c],e,c),l===f&&(l=this._$AH[c]),n||=!V(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+r[c+1]),this._$AH[c]=l}n&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},it=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},rt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},nt=class extends P{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){if((t=T(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,r=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),r&&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)}},at=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){T(this,t)}},Zt={M:Et,P:b,A:$t,C:1,L:Yt,R:ot,D:Kt,V:T,I:U,H:P,N:rt,U:nt,B:it,F:at},Oe=vt.litHtmlPolyfillSupport;Oe?.(B,U),(vt.litHtmlVersions??=[]).push("3.3.0");var At=(o,t,e)=>{let s=e?.renderBefore??t,i=s._$litPart$;if(i===void 0){let r=e?.renderBefore??null;s._$litPart$=i=new U(t.insertBefore(z(),r),r,void 0,e??{})}return i._$AI(o),i};var Ct=globalThis,_=class extends ${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=At(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};_._$litElement$=!0,_.finalized=!0,Ct.litElementHydrateSupport?.({LitElement:_});var Se=Ct.litElementPolyfillSupport;Se?.({LitElement:_});(Ct.litElementVersions??=[]).push("4.2.0");var p=(o,t,...e)=>{try{return o?.call(t,...e)}catch(s){console.error(s,o)}},W=async(o,t,...e)=>{try{return await o?.call(t,...e)}catch(s){console.error(s,o)}};var G=Symbol.for("controller"),Te=o=>typeof o=="object"&&o!==null&&(G in o||"hostConnected"in o||"hostDisconnected"in o||"hostUpdate"in o||"hostUpdated"in o),Ts=o=>typeof o?.then=="function";var F,x=o=>{F!==o&&(F=o,queueMicrotask(()=>F===o?F=void 0:0))},q=o=>F,N=[],Xt=o=>{if(o===void 0){N=[];return}let t=N.indexOf(o);N=t===-1?[...N,o]:N.slice(0,t+1),queueMicrotask(()=>N=[])},te=()=>N,R,Ps=o=>{R!==o&&(R=o,queueMicrotask(()=>R===o?R=void 0:0))},Pe=()=>{let o=R;return R=void 0,o},ee=async(o,t)=>{let e=lt(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},se=async o=>{let t=lt(o);return await t.ready,t},lt=o=>{let e=q().manager.X(o);if(e!==void 0)return e;if(Te(o))return o;let s=Pe();if(s!==void 0)return s},ct=!1,Ns=o=>{ct=!0;try{return o()}finally{ct=!1}};var Ne=(o,t,e)=>{let s=Object.keys(o),i=s.length;M===void 0&&queueMicrotask(K),M??=new Map;let r=M.get(o);return r===void 0&&(r={callbacks:[],keyCount:i},M.set(o,r)),r.keyCount!==i&&(r.callbacks.forEach(n=>n(s)),r.callbacks=[],r.keyCount=i),r.callbacks.push(n=>{let a=l=>p(t,null,l),c=n[i];c===void 0?a(void 0):o[c]===e?a(c):a(void 0)}),e},M,K=()=>{M?.forEach(({callbacks:o},t)=>{let e=Object.keys(t);o.forEach(s=>s(e))}),M=void 0},xe=(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,r)=>p(t,void 0,e===r?i:void 0)),e},De=(o=[q(),...te()],t,e)=>{let s=Array.isArray(o)?o:[o],i=s.length+1,r=n=>{i-=1,n!==void 0&&(i=Math.min(i,0)),i===0&&t(n)};s.forEach(n=>Ne(n,a=>r(a===void 0?void 0:{key:a,host:n,isReactive:!1}),e));for(let n of s)if("manager"in n&&n.manager.component===n){xe(n,a=>r(a===void 0?void 0:{key:a,host:n,isReactive:!0}),e);break}return e},Le=(o="",t={},e=q())=>{let s={emit:i=>{o===""&&K();let r=new CustomEvent(o,{detail:i,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(r),r}};return o===""&&De(void 0,i=>o=i.key,s),s},Ue=Le.bind(null,""),re;re=G;var wt=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#o=[],this.#i=[],this.#c=[],this.#l=[],this.#p=[],this.#h=[],this.#d=!1,this.P=new A,this.connectedCalled=!1,this.loadedCalled=!1,this[re]=!0,this.#a=[];let e=this,s=t??q(new.target.name);e.#r=s,e.ready=e.P.promise,e.#n=ie(e),e.component=s,e.#r.addController(e),e.#r.manager===void 0||(Xt(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#o;#i;#c;#l;#p;#h;#d;#r;catchUpLifecycle(){let{manager:t}=this.#r;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#d&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(console.error)}#n;get exports(){return this.#n}set exports(t){let e=this.#n;e!==t&&(this.#n=t,this.#a.forEach(p),this.connectedCalled&&this.O!==!1&&this.#r.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#n=e?ie(t):t,this.#a.forEach(p)}#a;watchExports(t){let e=()=>t(this.#n);return this.#a.push(e),()=>void this.#a.splice(this.#a.indexOf(e),1)}get use(){return x(this.#r),ee}get useRef(){return x(this.#r),se}get useRefSync(){return x(this.#r),lt}controllerRemoved(){this.#r.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.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#p.push(t),this.connectedCalled&&this.#r.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 W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#n)}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(oe,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(oe,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#p.forEach(this.#u,this)}#u(t){x(this.#r);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 oe(o){p(o,void 0,this)}var ne=wt,ie=o=>{if(typeof o!="object"&&typeof o!="function"||o===null)return o;let t={get(s,i,r){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,r)}},e=new Proxy(o,t);return e};var ae=";",ht=",",ce=":";var St=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},Tt={};function Pt(){}var Re=(o,t)=>function(s,i){if(!globalThis.customElements)return;let n=(i??s??{}).resourcesUrl;n&&o.setAssetPath(n);for(let[a,[c,l=""]]of Object.entries(t)){if(customElements.get(a))continue;let[u,h,y]=l.split(ae),g=u?u?.split(ht).map(Me):void 0,C=g?.map(([L])=>L),D=class extends Ot{static{this.observedAttributes=g?.map(([,L])=>L).filter(L=>L!=="")}static{this.C=C}static{this.E=h?h?.split(ht):void 0}static{this.D=y?.split(ht)}static{this.L=a}static{this.K=o}constructor(){!D.B&&(D.B=c(),D.F()),super()}};customElements.define(a,D)}},dt=Object.defineProperty,Me=o=>{let t=o.split(ce);return t.length===1?[t[0],Y(t[0])]:t},Ie=globalThis.HTMLElement??Pt,Ot=class extends Ie{constructor(){super(),this.#e={},this.#s=[],this.I=new A,this.H=new A,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??[])dt(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])dt(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??[])dt(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=St(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,r=Object.values(t).find(h=>h.L===s),n=`${s}--lazy`,a=r;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);He(a),!e.A&&(e.A=r,customElements.define(n,r)),r.N=this;let l=document.createElement(n);r.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(i).forEach(ke,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function ke([o,t]){this[o]=t}var He=o=>{let t=o.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(i,r){e.setAttribute.call(this.el,i,r)},t.removeAttribute=function(i){e.removeAttribute.call(this.el,i)},dt(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var{I:je}=Zt;var pt=o=>o.strings===void 0,le=()=>document.createComment(""),Fs=(o,t,e)=>{let s=o._$AA.parentNode,i=t===void 0?o._$AB:t._$AA;if(e===void 0){let r=s.insertBefore(le(),i),n=s.insertBefore(le(),i);e=new je(r,n,o,o.options)}else{let r=e._$AB.nextSibling,n=e._$AM,a=n!==o;if(a){let c;e._$AQ?.(o),e._$AM=o,e._$AP!==void 0&&(c=o._$AU)!==n._$AU&&e._$AP(c)}if(r!==i||a){let c=e._$AA;for(;c!==r;){let l=c.nextSibling;s.insertBefore(c,i),c=l}}}return e},Gs=(o,t,e=o)=>(o._$AI(t,e),o),ze={},he=(o,t=ze)=>o._$AH=t,qs=o=>o._$AH,Ks=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 m={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},E=o=>(...t)=>({_$litDirective$:o,values:t}),v=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 J=(o,t)=>{let e=o._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),J(s,t);return!0},ut=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while(e?.size===0)},de=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),We(t)}};function Ve(o){this._$AN!==void 0?(ut(this),this._$AM=o,de(this)):this._$AM=o}function Be(o,t=!1,e=0){let s=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(s))for(let r=e;r<s.length;r++)J(s[r],!1),ut(s[r]);else s!=null&&(J(s,!1),ut(s));else J(this,o)}var We=o=>{o.type==m.CHILD&&(o._$AP??=Be,o._$AQ??=Ve)},ft=class extends v{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),de(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(J(this,t),ut(this))}setValue(t){if(pt(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var io=()=>new xt,xt=class{},Nt=new WeakMap,Dt=E(class extends ft{render(o){return d}update(o,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=o.options?.host,this.rt(this.ct=o.element)),d}rt(o){if(this.isConnected||(o=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=Nt.get(t);e===void 0&&(e=new WeakMap,Nt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,o),o!==void 0&&this.G.call(this.ht,o)}else this.G.value=o}get lt(){return typeof this.G=="function"?Nt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var pe=E(class extends v{constructor(o){if(super(o),o.type!==m.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 ue="important",Ge=" !"+ue,qe=E(class extends v{constructor(o){if(super(o),o.type!==m.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 r=typeof i=="string"&&i.endsWith(Ge);s.includes("-")||r?e.setProperty(s,r?i.slice(0,-11):i,r?ue:""):e[s]=i}}return f}});var Ke=E(class extends v{constructor(o){if(super(o),o.type!==m.PROPERTY&&o.type!==m.ATTRIBUTE&&o.type!==m.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!pt(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===m.PROPERTY){if(t===e[s])return f}else if(o.type===m.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(s))return f}else if(o.type===m.ATTRIBUTE&&e.getAttribute(s)===t+"")return f;return he(o),t}});var Lt=class extends ne{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=Ut in t&&typeof t.destroy=="function",_.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 ${Ut} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),K();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),x(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=Mt(t,os)}}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)}},os=1e3,Ut="autoDestroyDisabled",fe=class o extends _{constructor(){super(),this.M=[],this.manager=new Lt(this);let t=this,e=t.constructor,s=e.N,i=e.K.o,r=o.prototype.shouldUpdate;t.#o=s?.H??new A,t.I=s?.I??new A,t.J=s?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=s??t,t.#s=t.enableUpdating,t.enableUpdating=Pt,t.shouldUpdate!==r&&(t.#e=t.shouldUpdate,t.shouldUpdate=r),i&&(t.#t=new Map,e.elementProperties.forEach((n,a)=>t.#t.set(a,i()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),s=this.shadowRootOptions===Tt;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,r=i?.hasChanged??H,n={attribute:s&1&&typeof t=="string"?Y(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,c){let l=r(a,c);return n.c=l,l}};super.createProperty(t,n)}static getPropertyDescriptor(t,e,s){let i=this.K,r=super.getPropertyDescriptor(t,e,s);return s.d=r,{...r,get(){return i.t?.(this.#t.get(t)),r.get?.call(this)},set(n){let a=this.manager;if(s.readOnly&&!ct&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${n}"`);r.set.call(this,n??void 0),s.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(K(),a?.S(t,n))}}}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.#l().catch(s=>{this.#o.reject(s),setTimeout(()=>{throw s})})):t&&this.requestUpdate()}#c(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,r=t??(s===Tt?this.el:this.el.attachShadow(s));if(this.isConnected){let n=r.getRootNode();n.adoptedStyleSheets=[...n.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return r}async#l(){let t=this.el.G??St(this.el);t&&await t;let e=[];for(let i of this.M)"triggerLoad"in i?e.push(i.triggerLoad()):e.push(W(i.hostLoad,i));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(i=>i.has(Ut)&&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.#c(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 r=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,r,i),()=>t.removeEventListener(e,r,i)))}async componentOnReady(){return await this.#o.promise,this}addController(t){this.M.push(t),!(G in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var me=o=>{let t,e=i=>{t=new URL(i,globalThis.location?.href||void 0).href},s={...o,getAssetPath(i){let r=new URL(i,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:e,customElement(i,r){r.K=s,r.L=i,customElements.get(i)||customElements.define(i,r)}};return e(o.defaultAssetPath),s};var ri=o=>typeof o=="object"&&o!=null?pe(o):o;var Rt=class extends v{#t;#e;constructor(t){super(t);let e=this;this.#e=function(i){return e.#t.call(this,i)}}render(t){return typeof t=="function"?(this.#t=t,Dt(this.#e)):Dt(t)}},ni=E(Rt);var ai=d;var Q=me({defaultAssetPath:"https://jsdev.arcgis.com/next/coding-components/",hydratedAttribute:"hydrated"}),{customElement:pi,getAssetPath:ui,setAssetPath:fi}=Q;Q.t=void 0;Q.o=void 0;Q.c=void 0;Q.r=void 0;export{Ts as a,x as b,Xt as c,te as d,Ps as e,Ns as f,ye as g,ps as h,f as i,d as j,De as k,Ue as l,wt as m,Tt as n,Re as o,m as p,E as q,v as r,Fs as s,Gs as t,he as u,qs as v,Ks as w,io as x,Dt as y,fe as z,ri as A,ai as B,Q as C,pi as D,ui as E};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{Tl as s}from"./
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import{Tl as s}from"./PQJF5OON.js";var c=Object.defineProperty,p=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,a=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of g(e))!l.call(t,n)&&n!==o&&c(t,n,{get:()=>e[n],enumerable:!(i=p(e,n))||i.enumerable});return t},d=(t,e,o)=>(a(t,e,"default"),o&&a(o,e,"default")),r={};d(r,s);var m={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:r.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:r.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:r.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:r.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},x={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{m as a,x as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import a from"./L2KBYTRA.js";import{a as T}from"./4BWVZDEA.js";import"./TVSG2GVI.js";import"./T7PRQSQS.js";import{d as C}from"./4LQQZXF4.js";import"./GFX6JP7B.js";import{A as v,B as x,D as P,g as w,h as t,l as b,x as m,y as p,z as k}from"./EBESVB6H.js";import{d,h as r}from"./5GMSJZHT.js";import"./5DRTMH4P.js";export default $arcgis.t(([{b:o,c:y,d:g,e:M,f:L,g:F}])=>{var D=w`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}.ltr-container{direction:ltr}calcite-action-bar{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)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}.console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}.result-value-table{table{display:block;max-width:fit-content;overflow-x:auto;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}.tree-item-label,.number-value,.string-value,.boolean-value{font-family:var(--calcite-code-family)}.tree-item-label,.value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}.dictionary-property{color:var(--arcgis-editor-identifier)}.number-value{color:var(--arcgis-editor-number)}.string-value{color:var(--arcgis-editor-string);white-space:pre-wrap}.constant-value{color:var(--arcgis-editor-constant)}.date-value{color:var(--arcgis-editor-date)}}`,l={lines:!0,selectionMode:"none",scale:"s",oncalciteTreeSelect:e=>e.currentTarget.selectedItems.forEach(a=>a.selected=!1)},h={onClick:e=>{let a=e.currentTarget;a.expanded=!a.expanded}},n=({name:e})=>t`<span class="dictionary-property">${e}</span><span>: </span>`,O=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??x} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(e.castAsJson(),void 0,2)}</calcite-tree-item></calcite-tree>`,_=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??x} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${n({name:"type"})}${e.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${n({name:"value"})}<span class="string-value">${JSON.stringify(e,void 0,2)}</span></div></calcite-tree-item></calcite-tree>`,f=({arcadeResult:e})=>{switch(e.type){case"unknown":case"null":return t`<span class="constant-value">${e.type}</span>`;case"text":return t`<span class="string-value">${d(e.value)}</span>`;case"number":return t`<span class="number-value">${e.value.toString()}</span>`;case"boolean":return t`<span class="constant-value">${e.value.toString()}</span>`;case"date":return t`<span class="date-value">${M(e)}</span>`;case"dateOnly":return t`<span class="string-value">${d(L(e))}</span>`;case"time":return t`<span class="string-value">${d(F(e))}</span>`;default:return null}},z=({arcadeResult:e,t9nStrings:a})=>{let s=e.value??[],c=Math.max(s.length-o,0);return t`<span>${`${e.type}(${s.length??0})`}</span>${c>0?t`<span> ${r(a.showingfirstitemsformat,{count:o.toString()})}</span>`:null}`},I=({value:e,subtree:a,t9nStrings:s})=>{let c=e.geometry?.();return t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.keys().map(i=>{let u=g(e.field(i));return e.arcadeDeclaredClass==="esri.arcade.Feature"&&u.type==="geometry"?null:R({arcadeResult:u,name:i,t9nStrings:s})})}${c?R({arcadeResult:{type:"geometry",value:c},name:"geometry",t9nStrings:s}):null}</calcite-tree>`},j=({arcadeResult:e,t9nStrings:a})=>t`<div class="value-type"><span>${e.type}:</span>${e.features.length>=y?t`<span> ${r(a.showingfirstitemsformat,{count:y.toString()})}</span>`:null}</div>`,N=({items:e,subtree:a,t9nStrings:s})=>t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.map((c,i)=>{let u=g(c);return R({arcadeResult:u,name:i,expanded:!a,t9nStrings:s})})}</calcite-tree>`,R=({arcadeResult:e,name:a,expanded:s,t9nStrings:c})=>{switch(e.type){case"null":case"unknown":case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return t`<calcite-tree-item><div class="tree-item-label">${n({name:a})}${f({arcadeResult:e})}</div></calcite-tree-item>`;case"array":{let i=(e.value??[]).slice(0,o);return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}${z({arcadeResult:e,t9nStrings:c})}</div>${N({items:i,subtree:!0,t9nStrings:c})}</calcite-tree-item>`}case"geometry":return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${_({value:e.value,subtree:!0})}</calcite-tree-item>`;case"attachment":return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${O({value:e.value,subtree:!0})}</calcite-tree-item>`;case"feature":case"dictionary":case"portal":return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${I({value:e.value,subtree:!0,t9nStrings:c})}</calcite-tree-item>`;default:return null}},A=({arcadeResult:e})=>{let a=C(e.value.fields);return t`<table><thead><tr>${a.map(s=>t`<th>${s.name}</th>`)}</tr></thead><tbody>${e.features.map(s=>t`<tr>${a.map(c=>{try{let i=g(s.field(c.name));return t`<td>${f({arcadeResult:i})}</td>`}catch{return t`<td></td>`}})}</tr>`)}</tbody></table>`},$={onClick:e=>{let a=e.currentTarget;a.expanded=!a.expanded}},S=class extends k{constructor(){super(...arguments),this.messages=T(),this.outputRef=m(),this.consoleRef=m(),this.logRef=m(),this.openedResultPanel="output",this.arcgisClose=b({bubbles:!1}),this.arcgisOpenedResultPanelChange=b({bubbles:!1})}static{this.properties={consoleLogs:0,loading:5,openedResultPanel:3,result:0}}static{this.styles=D}loaded(){this.openedResultPanel&&(this.openedResultPanel==="output"&&this.outputRef.value?this.outputRef.value.setFocus():this.openedResultPanel==="console"&&this.consoleRef.value?this.consoleRef.value.setFocus():this.openedResultPanel==="log"&&this.logRef.value&&this.logRef.value.setFocus())}updateResultPanel(a){this.openedResultPanel=a,this.arcgisOpenedResultPanelChange.emit(a)}_switchResultPanel(a){let s=a.currentTarget.dataset.panelName;s&&this.updateResultPanel(s)}_emitClose(){this.arcgisClose.emit()}renderConsolePanel(){return this.openedResultPanel!=="console"?null:this.loading&&!this.consoleLogs?.length?t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`:t`<div class="console-logs-container ltr-container">${this.consoleLogs?.length?this.consoleLogs.map(a=>t`<p>${a}</p>`):t`<p>${this.messages.consolemessage}</p>`}</div>`}renderLogPanel(){if(this.openedResultPanel!=="log")return null;if(this.loading)return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;let a=this.result?.type==="error"?"color-error":"color-success";return t`<calcite-list label=results>${this.result?t`<calcite-list-item .label=${r(this.messages.lastexecutionformat,{timeStamp:new Intl.DateTimeFormat(this.messages._t9nLocale,{dateStyle:"medium",timeStyle:"medium"}).format(this.result.timeStamp)})}><calcite-icon slot=content-start icon=information scale=s class=${v(a)}></calcite-icon></calcite-list-item><calcite-list-item .label=${r(this.messages.compilationtimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.compilationTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${v(a)}></calcite-icon></calcite-list-item><calcite-list-item .label=${r(this.messages.executiontimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.executionTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${v(a)}></calcite-icon></calcite-list-item>`:t`<calcite-list-item .label=${this.messages.runscriptmessage}><calcite-icon slot=content-start icon=information scale=s class="color-info"></calcite-icon></calcite-list-item>`}</calcite-list>`}renderOutputPanel(){if(this.openedResultPanel!=="output")return null;if(this.loading)return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;switch(this.result?.type){case"error":return t`<div class="result-value-simple flex-adjustable">${r(this.messages.executionerrorformat,{message:this.result.value})}</div>`;case"null":case"unknown":return t`<div class="result-value-simple ltr-container">${f({arcadeResult:this.result})}</div>`;case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}: </span>${f({arcadeResult:this.result})}</div>`;case"array":{let a=(this.result.value??[]).slice(0,o);return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${z({arcadeResult:this.result,t9nStrings:this.messages})}</div>${N({items:a,subtree:!0,t9nStrings:this.messages})}</calcite-tree-item></calcite-tree></div>`}case"geometry":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${this.result.type}</div>${_({value:this.result.value,subtree:!0})}</calcite-tree-item></calcite-tree></div>`;case"attachment":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${this.result.type}</div>${O({value:this.result.value,subtree:!0})}</calcite-tree-item></calcite-tree></div>`;case"feature":case"dictionary":case"portal":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${this.result.type}</div>${I({value:this.result.value,subtree:!0,t9nStrings:this.messages})}</calcite-tree-item></calcite-tree></div>`;case"featureSet":return t`<div class="result-value-table ltr-container">${j({arcadeResult:this.result,t9nStrings:this.messages})}${A({arcadeResult:this.result})}</div>`;case"knowledgeGraph":return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}: </span><span class="string-value">${this.result.value.url}</span></div>`;default:return t`<div class="result-value-simple flex-adjustable ltr-container">${this.messages.runscriptmessage}</div>`}}render(){return t`<header class="flex-row"><calcite-action-bar class="flex-adjustable" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .active=${this.openedResultPanel==="output"} .text=${this.messages.output??""} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=output ${p(this.outputRef)}></calcite-action><calcite-action .active=${this.openedResultPanel==="console"} .text=${this.messages.console??""} text-enabled scale=s icon=console icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=console ${p(this.consoleRef)}></calcite-action><calcite-action .active=${this.openedResultPanel==="log"} .text=${this.messages.log??""} text-enabled scale=s icon=list icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=log ${p(this.logRef)}></calcite-action></calcite-action-group></calcite-action-bar><calcite-action scale=s icon=x .text=${this.messages.close??""} @click=${this._emitClose}></calcite-action></header><article class="flex-adjustable">${this.loading?t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`:t`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`}};P("arcgis-arcade-results",S);return S},a)
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
|
+
import a from"./KFV24GZV.js";import{a as T}from"./M2E4GMNJ.js";import"./2ILO5T4K.js";import"./EHBILRD3.js";import{d as C}from"./3HOBHPDJ.js";import"./BZPQOFQJ.js";import{A as v,B as x,D as P,g as w,h as t,l as b,x as m,y as p,z as k}from"./NMF2Y22L.js";import{d,h as r}from"./C765VAI3.js";import"./TUB3MA55.js";export default $arcgis.t(([{b:o,c:y,d:g,e:M,f:L,g:F}])=>{var D=w`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}.ltr-container{direction:ltr}calcite-action-bar{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)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}.console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}.result-value-table{table{display:block;max-width:fit-content;overflow-x:auto;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}.tree-item-label,.number-value,.string-value,.boolean-value{font-family:var(--calcite-code-family)}.tree-item-label,.value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}.dictionary-property{color:var(--arcgis-editor-identifier)}.number-value{color:var(--arcgis-editor-number)}.string-value{color:var(--arcgis-editor-string);white-space:pre-wrap}.constant-value{color:var(--arcgis-editor-constant)}.date-value{color:var(--arcgis-editor-date)}}`,l={lines:!0,selectionMode:"none",scale:"s",oncalciteTreeSelect:e=>e.currentTarget.selectedItems.forEach(a=>a.selected=!1)},h={onClick:e=>{let a=e.currentTarget;a.expanded=!a.expanded}},n=({name:e})=>t`<span class="dictionary-property">${e}</span><span>: </span>`,O=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??x} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(e.castAsJson(),void 0,2)}</calcite-tree-item></calcite-tree>`,_=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??x} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${n({name:"type"})}${e.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${n({name:"value"})}<span class="string-value">${JSON.stringify(e,void 0,2)}</span></div></calcite-tree-item></calcite-tree>`,f=({arcadeResult:e})=>{switch(e.type){case"unknown":case"null":return t`<span class="constant-value">${e.type}</span>`;case"text":return t`<span class="string-value">${d(e.value)}</span>`;case"number":return t`<span class="number-value">${e.value.toString()}</span>`;case"boolean":return t`<span class="constant-value">${e.value.toString()}</span>`;case"date":return t`<span class="date-value">${M(e)}</span>`;case"dateOnly":return t`<span class="string-value">${d(L(e))}</span>`;case"time":return t`<span class="string-value">${d(F(e))}</span>`;default:return null}},z=({arcadeResult:e,t9nStrings:a})=>{let s=e.value??[],c=Math.max(s.length-o,0);return t`<span>${`${e.type}(${s.length??0})`}</span>${c>0?t`<span> ${r(a.showingfirstitemsformat,{count:o.toString()})}</span>`:null}`},I=({value:e,subtree:a,t9nStrings:s})=>{let c=e.geometry?.();return t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.keys().map(i=>{let u=g(e.field(i));return e.arcadeDeclaredClass==="esri.arcade.Feature"&&u.type==="geometry"?null:R({arcadeResult:u,name:i,t9nStrings:s})})}${c?R({arcadeResult:{type:"geometry",value:c},name:"geometry",t9nStrings:s}):null}</calcite-tree>`},j=({arcadeResult:e,t9nStrings:a})=>t`<div class="value-type"><span>${e.type}:</span>${e.features.length>=y?t`<span> ${r(a.showingfirstitemsformat,{count:y.toString()})}</span>`:null}</div>`,N=({items:e,subtree:a,t9nStrings:s})=>t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.map((c,i)=>{let u=g(c);return R({arcadeResult:u,name:i,expanded:!a,t9nStrings:s})})}</calcite-tree>`,R=({arcadeResult:e,name:a,expanded:s,t9nStrings:c})=>{switch(e.type){case"null":case"unknown":case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return t`<calcite-tree-item><div class="tree-item-label">${n({name:a})}${f({arcadeResult:e})}</div></calcite-tree-item>`;case"array":{let i=(e.value??[]).slice(0,o);return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}${z({arcadeResult:e,t9nStrings:c})}</div>${N({items:i,subtree:!0,t9nStrings:c})}</calcite-tree-item>`}case"geometry":return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${_({value:e.value,subtree:!0})}</calcite-tree-item>`;case"attachment":return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${O({value:e.value,subtree:!0})}</calcite-tree-item>`;case"feature":case"dictionary":case"portal":return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${I({value:e.value,subtree:!0,t9nStrings:c})}</calcite-tree-item>`;default:return null}},A=({arcadeResult:e})=>{let a=C(e.value.fields);return t`<table><thead><tr>${a.map(s=>t`<th>${s.name}</th>`)}</tr></thead><tbody>${e.features.map(s=>t`<tr>${a.map(c=>{try{let i=g(s.field(c.name));return t`<td>${f({arcadeResult:i})}</td>`}catch{return t`<td></td>`}})}</tr>`)}</tbody></table>`},$={onClick:e=>{let a=e.currentTarget;a.expanded=!a.expanded}},S=class extends k{constructor(){super(...arguments),this.messages=T(),this.outputRef=m(),this.consoleRef=m(),this.logRef=m(),this.openedResultPanel="output",this.arcgisClose=b({bubbles:!1}),this.arcgisOpenedResultPanelChange=b({bubbles:!1})}static{this.properties={consoleLogs:0,loading:5,openedResultPanel:3,result:0}}static{this.styles=D}loaded(){this.openedResultPanel&&(this.openedResultPanel==="output"&&this.outputRef.value?this.outputRef.value.setFocus():this.openedResultPanel==="console"&&this.consoleRef.value?this.consoleRef.value.setFocus():this.openedResultPanel==="log"&&this.logRef.value&&this.logRef.value.setFocus())}updateResultPanel(a){this.openedResultPanel=a,this.arcgisOpenedResultPanelChange.emit(a)}_switchResultPanel(a){let s=a.currentTarget.dataset.panelName;s&&this.updateResultPanel(s)}_emitClose(){this.arcgisClose.emit()}renderConsolePanel(){return this.openedResultPanel!=="console"?null:this.loading&&!this.consoleLogs?.length?t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`:t`<div class="console-logs-container ltr-container">${this.consoleLogs?.length?this.consoleLogs.map(a=>t`<p>${a}</p>`):t`<p>${this.messages.consolemessage}</p>`}</div>`}renderLogPanel(){if(this.openedResultPanel!=="log")return null;if(this.loading)return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;let a=this.result?.type==="error"?"color-error":"color-success";return t`<calcite-list label=results>${this.result?t`<calcite-list-item .label=${r(this.messages.lastexecutionformat,{timeStamp:new Intl.DateTimeFormat(this.messages._t9nLocale,{dateStyle:"medium",timeStyle:"medium"}).format(this.result.timeStamp)})}><calcite-icon slot=content-start icon=information scale=s class=${v(a)}></calcite-icon></calcite-list-item><calcite-list-item .label=${r(this.messages.compilationtimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.compilationTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${v(a)}></calcite-icon></calcite-list-item><calcite-list-item .label=${r(this.messages.executiontimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.executionTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${v(a)}></calcite-icon></calcite-list-item>`:t`<calcite-list-item .label=${this.messages.runscriptmessage}><calcite-icon slot=content-start icon=information scale=s class="color-info"></calcite-icon></calcite-list-item>`}</calcite-list>`}renderOutputPanel(){if(this.openedResultPanel!=="output")return null;if(this.loading)return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;switch(this.result?.type){case"error":return t`<div class="result-value-simple flex-adjustable">${r(this.messages.executionerrorformat,{message:this.result.value})}</div>`;case"null":case"unknown":return t`<div class="result-value-simple ltr-container">${f({arcadeResult:this.result})}</div>`;case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}: </span>${f({arcadeResult:this.result})}</div>`;case"array":{let a=(this.result.value??[]).slice(0,o);return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${z({arcadeResult:this.result,t9nStrings:this.messages})}</div>${N({items:a,subtree:!0,t9nStrings:this.messages})}</calcite-tree-item></calcite-tree></div>`}case"geometry":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${this.result.type}</div>${_({value:this.result.value,subtree:!0})}</calcite-tree-item></calcite-tree></div>`;case"attachment":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${this.result.type}</div>${O({value:this.result.value,subtree:!0})}</calcite-tree-item></calcite-tree></div>`;case"feature":case"dictionary":case"portal":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${this.result.type}</div>${I({value:this.result.value,subtree:!0,t9nStrings:this.messages})}</calcite-tree-item></calcite-tree></div>`;case"featureSet":return t`<div class="result-value-table ltr-container">${j({arcadeResult:this.result,t9nStrings:this.messages})}${A({arcadeResult:this.result})}</div>`;case"knowledgeGraph":return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}: </span><span class="string-value">${this.result.value.url}</span></div>`;default:return t`<div class="result-value-simple flex-adjustable ltr-container">${this.messages.runscriptmessage}</div>`}}render(){return t`<header class="flex-row"><calcite-action-bar class="flex-adjustable" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .active=${this.openedResultPanel==="output"} .text=${this.messages.output??""} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=output ${p(this.outputRef)}></calcite-action><calcite-action .active=${this.openedResultPanel==="console"} .text=${this.messages.console??""} text-enabled scale=s icon=console icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=console ${p(this.consoleRef)}></calcite-action><calcite-action .active=${this.openedResultPanel==="log"} .text=${this.messages.log??""} text-enabled scale=s icon=list icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=log ${p(this.logRef)}></calcite-action></calcite-action-group></calcite-action-bar><calcite-action scale=s icon=x .text=${this.messages.close??""} @click=${this._emitClose}></calcite-action></header><article class="flex-adjustable">${this.loading?t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`:t`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`}};P("arcgis-arcade-results",S);return S},a)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.9 */
|
|
4
4
|
export default $arcgis.t(([p])=>{function d(){return!!window.MonacoEnvironment?.getWorker}var a="",j=new Map,c=!1;async function l(t,r,e){if(e)return r?r():new Worker(t);let o=window.location.origin;if(new URL(t,window.location.href).origin!==o){let n=await p(t,{responseType:"text"});return new Worker(URL.createObjectURL(new Blob([n.data],{type:"text/javascript"})),{type:"module"})}return new Worker(t,{type:"module"})}function k(t){if(d())return;a=t;let r=`${a}/code-editor`,e={arcade:`${r}/arcade.worker.js`,"arcgis-sql-expression":`${r}/sql-expr.worker.js`,html:`${r}/html.worker.js`,css:`${r}/css.worker.js`,typescript:`${r}/ts.worker.js`,json:`${r}/json.worker.js`,default:`${r}/editor.worker.js`},o={arcade:{url:e.arcade},"arcgis-sql-expression":{url:e["arcgis-sql-expression"]},html:{url:e.html},css:{url:e.css},typescript:{url:e.typescript},javascript:{url:e.typescript},json:{url:e.json},default:{url:e.default}};window.MonacoEnvironment={getWorker:async(n,s)=>{let i=j.get(s);if(i)return await l(i,void 0,c);let{url:u,localWorker:w}=o[s]||o.default;return await l(u,w,c)}}}return k},"request")
|