@arcgis/coding-components 5.0.0-next.84 → 5.0.0-next.86
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/{NYBDXWA5.js → 2LDLCX6R.js} +2 -2
- package/dist/cdn/{3PSCA6KH.js → 33X46FFL.js} +2 -2
- package/dist/cdn/{257CE7RC.js → 3DX6HUJZ.js} +2 -2
- package/dist/cdn/{TE762HZP.js → 3JQZLQ6X.js} +1 -1
- package/dist/cdn/{5V3AU2MS.js → 5JYRNSC3.js} +2 -2
- package/dist/cdn/{G2JKJDVX.js → 5MPQLT5X.js} +2 -2
- package/dist/cdn/{KDSG4AQ2.js → 5WXTHFB6.js} +1 -1
- package/dist/cdn/{W5KQ34S3.js → 7I7EBDPY.js} +2 -2
- package/dist/cdn/{KJYFRF6Z.js → A7GC2RAP.js} +1 -1
- package/dist/cdn/{7JSSJVPI.js → BCHJVYE5.js} +2 -2
- package/dist/cdn/{GMJZSPF2.js → BLVE5YQR.js} +2 -2
- package/dist/cdn/{6VMHDHOO.js → BTHHVPUO.js} +2 -2
- package/dist/cdn/{VI5BXG53.js → CEE3ZJUA.js} +2 -2
- package/dist/cdn/{YJM4YZTR.js → DD6ZRT43.js} +2 -2
- package/dist/cdn/{5KWWFBRA.js → FITYHC24.js} +2 -2
- package/dist/cdn/{YCRGKFVI.js → G2MNT5MH.js} +2 -2
- package/dist/cdn/{R64NEFA4.js → GGKL5FWT.js} +1 -1
- package/dist/cdn/{S25WEGDV.js → GGTAF434.js} +2 -2
- package/dist/cdn/{I6JGARO3.js → HI5LKY6R.js} +2 -2
- package/dist/cdn/{NR6DB7IX.js → HMLBWY5X.js} +2 -2
- package/dist/cdn/{WJ6J6EFT.js → HMWZEC7D.js} +2 -2
- package/dist/cdn/{3QR7YQXI.js → HNMU72SH.js} +2 -2
- package/dist/cdn/{SNIPKZ5D.js → HUDN4YMY.js} +1 -1
- package/dist/cdn/{YE3Q4QRS.js → IC67HR3V.js} +2 -2
- package/dist/cdn/{6Y5QJLC2.js → IVXRAZY5.js} +1 -1
- package/dist/cdn/{44GQ5ENQ.js → J2SETKWM.js} +2 -2
- package/dist/cdn/{LNCKWEAE.js → JPLSYGHT.js} +2 -2
- package/dist/cdn/{RFJMS2XV.js → KT6E5ZTM.js} +2 -2
- package/dist/cdn/{JOZPVCEH.js → MCGQ6KRV.js} +1 -1
- package/dist/cdn/{JFCDQ5Y5.js → MDIQFVFA.js} +2 -2
- package/dist/cdn/{U3UR7PMI.js → N3MHW6AM.js} +2 -2
- package/dist/cdn/{MCREPNON.js → OVV6WXX7.js} +2 -2
- package/dist/cdn/QFHNOTXM.js +4 -0
- package/dist/cdn/{FMGFKQ7C.js → ROG4QBVE.js} +2 -2
- package/dist/cdn/{ARAAJHTT.js → RZ4DRTSI.js} +4 -4
- package/dist/cdn/{BQLRNY6M.js → S5A4U67W.js} +2 -2
- package/dist/cdn/{HBCKUC46.js → SE4PPQQW.js} +2 -2
- package/dist/cdn/{OQUYSN7I.js → SWSJLICP.js} +3 -3
- package/dist/cdn/{DB7JAMFD.js → TTAY72VH.js} +2 -2
- package/dist/cdn/{TJOEBZIJ.js → USZ2KUJP.js} +1 -1
- package/dist/cdn/{5NR5BXSU.js → V4TG6GDW.js} +2 -2
- package/dist/cdn/{FERNZR6V.js → VYCA3AJT.js} +1 -1
- package/dist/cdn/{MTMFT4XD.js → W7DH63B3.js} +2 -2
- package/dist/cdn/{HB2ES4YL.js → WHDQGCW7.js} +2 -2
- package/dist/cdn/{WJI37X25.js → WI4BDXBY.js} +2 -2
- package/dist/cdn/{TYMP4EQA.js → XDOANCWB.js} +2 -2
- package/dist/cdn/{PUM6S2YR.js → XIOTAEZY.js} +2 -2
- package/dist/cdn/{3LJIRG7F.js → ZK3HCKLO.js} +2 -2
- package/dist/cdn/assets/code-editor/sql-expr.worker.js +1 -1
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/arcade-contribution.js +1 -1
- 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/colorize.js +1 -1
- package/dist/chunks/editor.js +1 -1
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +20 -19
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +1 -1
- package/dist/chunks/monaco-theme.js +1 -1
- package/dist/chunks/runtime.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/chunks/utilities.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-code-viewer/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 +5 -5
- package/dist/cdn/ZNJU2F6X.js +0 -4
- package/dist/utils/typing.d.ts +0 -21
|
@@ -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 S}from"./
|
|
3
|
+
v5.0.0-next.86 */
|
|
4
|
+
import{a as S}from"./GGKL5FWT.js";import a from"./IVXRAZY5.js";import{a as O}from"./BTHHVPUO.js";import"./JPLSYGHT.js";import"./3JQZLQ6X.js";import{d as F}from"./HUDN4YMY.js";import{b as C,c as L}from"./A7GC2RAP.js";import{E as m,F as p,G as T,H as v,I as y,K as M,g as P,h as b,j as t,n as x,p as d,t as r}from"./DD6ZRT43.js";import"./VYCA3AJT.js";import"./MCGQ6KRV.js";export default $arcgis.t(([{b:o,c:R,d:h,e:_,f:j,g:D}])=>{var J=b`: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)},g={onClick:e=>{let a=e.currentTarget;a.expanded=!a.expanded}},n=({name:e})=>t`<span class="dictionary-property">${e}</span><span>: </span>`,z=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??y} .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>`,N=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??y} .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">${_(e)}</span>`;case"dateOnly":return t`<span class="string-value">${d(j(e))}</span>`;case"time":return t`<span class="string-value">${d(D(e))}</span>`;default:return null}},E=({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=h(e.field(i));return e.arcadeDeclaredClass==="esri.arcade.Feature"&&u.type==="geometry"?null:k({arcadeResult:u,name:i,t9nStrings:s})})}${c?k({arcadeResult:{type:"geometry",value:c},name:"geometry",t9nStrings:s}):null}</calcite-tree>`},G=({arcadeResult:e,t9nStrings:a})=>t`<div class="value-type"><span>${e.type}:</span>${e.features.length>=R?t`<span> ${r(a.showingfirstitemsformat,{count:R.toString()})}</span>`:null}</div>`,A=({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=h(c);return k({arcadeResult:u,name:i,expanded:!a,t9nStrings:s})})}</calcite-tree>`,k=({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=${g.onClick}><div class="tree-item-label">${n({name:a})}${E({arcadeResult:e,t9nStrings:c})}</div>${A({items:i,subtree:!0,t9nStrings:c})}</calcite-tree-item>`}case"geometry":return t`<calcite-tree-item .expanded=${s} @click=${g.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${N({value:e.value,subtree:!0})}</calcite-tree-item>`;case"attachment":return t`<calcite-tree-item .expanded=${s} @click=${g.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${z({value:e.value,subtree:!0})}</calcite-tree-item>`;case"feature":case"dictionary":case"portal":return t`<calcite-tree-item .expanded=${s} @click=${g.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}},V=({arcadeResult:e})=>{let a=F(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=h(s.field(c.name));return t`<td>${f({arcadeResult:i})}</td>`}catch{return t`<td></td>`}})}</tr>`)}</tbody></table>`};function q(){let e=`:host {
|
|
5
5
|
`,a=S["light-theme"];Object.entries(a).forEach(([c,i])=>{e+=` --arcgis-editor-${c}: ${i};
|
|
6
6
|
`}),e+=`}
|
|
7
7
|
`,e+=`:host([calcite-mode-dark]) {
|
|
@@ -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.86 */
|
|
4
4
|
var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(a&&(b=a(a=0)),b);var o=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),p=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var q=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d,q as e};
|
|
@@ -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.86 */
|
|
4
|
+
import{a as T}from"./WHDQGCW7.js";import{Tl as F}from"./ZK3HCKLO.js";import"./MCGQ6KRV.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,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{f as d}from"./
|
|
3
|
+
v5.0.0-next.86 */
|
|
4
|
+
import{f as d}from"./5WXTHFB6.js";import{q as c}from"./DD6ZRT43.js";function L(t,r,m,u){if(!r)return[];let e=Array.isArray(r)?r:[r];if(!e.length)return[];let l=c(m);return t.filter(o=>e.some(a=>l.test(String(o[a]??""))))}function N(t){return t?`${t.portal.url}/home/item.html?id=${t.id}`:""}function C(t,r,m="add",u){if(!t)return;let e=t.getSelection(),l=e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),o=[],a=t.getValue()??"";if(m==="replace"){let i=`${u}
|
|
5
5
|
${r}`,s=t.getModel(),n=s?.getLineCount()??1,f=s?.getLineMaxColumn(n)??1;o=[{range:{startLineNumber:1,startColumn:1,endLineNumber:n,endColumn:f},text:i}]}else{let i=l?{startLineNumber:e.startLineNumber,startColumn:e.startColumn,endLineNumber:e.endLineNumber,endColumn:e.endColumn}:(()=>{let n=t.getPosition();return{startLineNumber:n?.lineNumber??1,startColumn:n?.column??1,endLineNumber:n?.lineNumber??1,endColumn:n?.column??1}})(),s=!1;if(u){let n=u.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&");s=!new RegExp(`^\\s*${n}\\s*$`,"mu").test(a)}s&&o.push({range:{startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1},text:`${u}
|
|
6
6
|
`}),o.push({range:i,text:r})}try{t.pushUndoStop(),t.executeEdits("insertText",o),t.pushUndoStop(),t.focus()}catch(i){console.error("Failed to edit model:",i)}}function g(t){try{return d(t)}catch{return t}}export{L as a,N as b,C as c,g as d};
|
|
@@ -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{Tl as le}from"./3LJIRG7F.js";import"./JOZPVCEH.js";var Ot=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,Rt=Object.getOwnPropertyNames,Mt=Object.prototype.hasOwnProperty,fe=(e,r,i,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of Rt(r))!Mt.call(e,t)&&t!==i&&Ot(e,t,{get:()=>r[t],enumerable:!(n=Nt(r,t))||n.enumerable});return e},Dt=(e,r,i)=>(fe(e,r,"default"),i&&fe(i,r,"default")),f={};Dt(f,le);var Ft=120*1e3,Ut=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>Ft&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=f.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let r;return this._getClient().then(i=>{r=i}).then(i=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(i=>r)}},de;(function(e){function r(i){return typeof i=="string"}e.is=r})(de||(de={}));var Q;(function(e){function r(i){return typeof i=="string"}e.is=r})(Q||(Q={}));var ge;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(ge||(ge={}));var W;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(W||(W={}));var O;(function(e){function r(n,t){return n===Number.MAX_VALUE&&(n=W.MAX_VALUE),t===Number.MAX_VALUE&&(t=W.MAX_VALUE),{line:n,character:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.uinteger(t.line)&&a.uinteger(t.character)}e.is=i})(O||(O={}));var m;(function(e){function r(n,t,o,s){if(a.uinteger(n)&&a.uinteger(t)&&a.uinteger(o)&&a.uinteger(s))return{start:O.create(n,t),end:O.create(o,s)};if(O.is(n)&&O.is(t))return{start:n,end:t};throw new Error(`Range#create called with invalid arguments[${n}, ${t}, ${o}, ${s}]`)}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&O.is(t.start)&&O.is(t.end)}e.is=i})(m||(m={}));var H;(function(e){function r(n,t){return{uri:n,range:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&(a.string(t.uri)||a.undefined(t.uri))}e.is=i})(H||(H={}));var pe;(function(e){function r(n,t,o,s){return{targetUri:n,targetRange:t,targetSelectionRange:o,originSelectionRange:s}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.targetRange)&&a.string(t.targetUri)&&m.is(t.targetSelectionRange)&&(m.is(t.originSelectionRange)||a.undefined(t.originSelectionRange))}e.is=i})(pe||(pe={}));var Y;(function(e){function r(n,t,o,s){return{red:n,green:t,blue:o,alpha:s}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.numberRange(t.red,0,1)&&a.numberRange(t.green,0,1)&&a.numberRange(t.blue,0,1)&&a.numberRange(t.alpha,0,1)}e.is=i})(Y||(Y={}));var ve;(function(e){function r(n,t){return{range:n,color:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&Y.is(t.color)}e.is=i})(ve||(ve={}));var me;(function(e){function r(n,t,o){return{label:n,textEdit:t,additionalTextEdits:o}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.string(t.label)&&(a.undefined(t.textEdit)||T.is(t))&&(a.undefined(t.additionalTextEdits)||a.typedArray(t.additionalTextEdits,T.is))}e.is=i})(me||(me={}));var P;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(P||(P={}));var he;(function(e){function r(n,t,o,s,u,g){let c={startLine:n,endLine:t};return a.defined(o)&&(c.startCharacter=o),a.defined(s)&&(c.endCharacter=s),a.defined(u)&&(c.kind=u),a.defined(g)&&(c.collapsedText=g),c}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.uinteger(t.startLine)&&a.uinteger(t.startLine)&&(a.undefined(t.startCharacter)||a.uinteger(t.startCharacter))&&(a.undefined(t.endCharacter)||a.uinteger(t.endCharacter))&&(a.undefined(t.kind)||a.string(t.kind))}e.is=i})(he||(he={}));var G;(function(e){function r(n,t){return{location:n,message:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&H.is(t.location)&&a.string(t.message)}e.is=i})(G||(G={}));var F;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(F||(F={}));var _e;(function(e){e.Unnecessary=1,e.Deprecated=2})(_e||(_e={}));var ke;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&a.string(n.href)}e.is=r})(ke||(ke={}));var z;(function(e){function r(n,t,o,s,u,g){let c={range:n,message:t};return a.defined(o)&&(c.severity=o),a.defined(s)&&(c.code=s),a.defined(u)&&(c.source=u),a.defined(g)&&(c.relatedInformation=g),c}e.create=r;function i(n){var t;let o=n;return a.defined(o)&&m.is(o.range)&&a.string(o.message)&&(a.number(o.severity)||a.undefined(o.severity))&&(a.integer(o.code)||a.string(o.code)||a.undefined(o.code))&&(a.undefined(o.codeDescription)||a.string((t=o.codeDescription)===null||t===void 0?void 0:t.href))&&(a.string(o.source)||a.undefined(o.source))&&(a.undefined(o.relatedInformation)||a.typedArray(o.relatedInformation,G.is))}e.is=i})(z||(z={}));var U;(function(e){function r(n,t,...o){let s={title:n,command:t};return a.defined(o)&&o.length>0&&(s.arguments=o),s}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.title)&&a.string(t.command)}e.is=i})(U||(U={}));var T;(function(e){function r(o,s){return{range:o,newText:s}}e.replace=r;function i(o,s){return{range:{start:o,end:o},newText:s}}e.insert=i;function n(o){return{range:o,newText:""}}e.del=n;function t(o){let s=o;return a.objectLiteral(s)&&a.string(s.newText)&&m.is(s.range)}e.is=t})(T||(T={}));var Z;(function(e){function r(n,t,o){let s={label:n};return t!==void 0&&(s.needsConfirmation=t),o!==void 0&&(s.description=o),s}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.string(t.label)&&(a.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(a.string(t.description)||t.description===void 0)}e.is=i})(Z||(Z={}));var j;(function(e){function r(i){let n=i;return a.string(n)}e.is=r})(j||(j={}));var be;(function(e){function r(o,s,u){return{range:o,newText:s,annotationId:u}}e.replace=r;function i(o,s,u){return{range:{start:o,end:o},newText:s,annotationId:u}}e.insert=i;function n(o,s){return{range:o,newText:"",annotationId:s}}e.del=n;function t(o){let s=o;return T.is(s)&&(Z.is(s.annotationId)||j.is(s.annotationId))}e.is=t})(be||(be={}));var K;(function(e){function r(n,t){return{textDocument:n,edits:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&re.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(K||(K={}));var C;(function(e){function r(n,t,o){let s={kind:"create",uri:n};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=r;function i(n){let t=n;return t&&t.kind==="create"&&a.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(C||(C={}));var ee;(function(e){function r(n,t,o,s){let u={kind:"rename",oldUri:n,newUri:t};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(u.options=o),s!==void 0&&(u.annotationId=s),u}e.create=r;function i(n){let t=n;return t&&t.kind==="rename"&&a.string(t.oldUri)&&a.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(ee||(ee={}));var te;(function(e){function r(n,t,o){let s={kind:"delete",uri:n};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=r;function i(n){let t=n;return t&&t.kind==="delete"&&a.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||a.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||a.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(te||(te={}));var ne;(function(e){function r(i){let n=i;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(t=>a.string(t.kind)?C.is(t)||ee.is(t)||te.is(t):K.is(t)))}e.is=r})(ne||(ne={}));var we;(function(e){function r(n){return{uri:n}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)}e.is=i})(we||(we={}));var Ae;(function(e){function r(n,t){return{uri:n,version:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&a.integer(t.version)}e.is=i})(Ae||(Ae={}));var re;(function(e){function r(n,t){return{uri:n,version:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&(t.version===null||a.integer(t.version))}e.is=i})(re||(re={}));var Ie;(function(e){function r(n,t,o,s){return{uri:n,languageId:t,version:o,text:s}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&a.string(t.languageId)&&a.integer(t.version)&&a.string(t.text)}e.is=i})(Ie||(Ie={}));var ie;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function r(i){let n=i;return n===e.PlainText||n===e.Markdown}e.is=r})(ie||(ie={}));var V;(function(e){function r(i){let n=i;return a.objectLiteral(i)&&ie.is(n.kind)&&a.string(n.value)}e.is=r})(V||(V={}));var h;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(h||(h={}));var oe;(function(e){e.PlainText=1,e.Snippet=2})(oe||(oe={}));var Ee;(function(e){e.Deprecated=1})(Ee||(Ee={}));var Le;(function(e){function r(n,t,o){return{newText:n,insert:t,replace:o}}e.create=r;function i(n){let t=n;return t&&a.string(t.newText)&&m.is(t.insert)&&m.is(t.replace)}e.is=i})(Le||(Le={}));var Oe;(function(e){e.asIs=1,e.adjustIndentation=2})(Oe||(Oe={}));var Ne;(function(e){function r(i){let n=i;return n&&(a.string(n.detail)||n.detail===void 0)&&(a.string(n.description)||n.description===void 0)}e.is=r})(Ne||(Ne={}));var Re;(function(e){function r(i){return{label:i}}e.create=r})(Re||(Re={}));var Me;(function(e){function r(i,n){return{items:i||[],isIncomplete:!!n}}e.create=r})(Me||(Me={}));var X;(function(e){function r(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=r;function i(n){let t=n;return a.string(t)||a.objectLiteral(t)&&a.string(t.language)&&a.string(t.value)}e.is=i})(X||(X={}));var De;(function(e){function r(i){let n=i;return!!n&&a.objectLiteral(n)&&(V.is(n.contents)||X.is(n.contents)||a.typedArray(n.contents,X.is))&&(i.range===void 0||m.is(i.range))}e.is=r})(De||(De={}));var Fe;(function(e){function r(i,n){return n?{label:i,documentation:n}:{label:i}}e.create=r})(Fe||(Fe={}));var Ue;(function(e){function r(i,n,...t){let o={label:i};return a.defined(n)&&(o.documentation=n),a.defined(t)?o.parameters=t:o.parameters=[],o}e.create=r})(Ue||(Ue={}));var S;(function(e){e.Text=1,e.Read=2,e.Write=3})(S||(S={}));var Te;(function(e){function r(i,n){let t={range:i};return a.number(n)&&(t.kind=n),t}e.create=r})(Te||(Te={}));var _;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(_||(_={}));var je;(function(e){e.Deprecated=1})(je||(je={}));var xe;(function(e){function r(i,n,t,o,s){let u={name:i,kind:n,location:{uri:o,range:t}};return s&&(u.containerName=s),u}e.create=r})(xe||(xe={}));var ye;(function(e){function r(i,n,t,o){return o!==void 0?{name:i,kind:n,location:{uri:t,range:o}}:{name:i,kind:n,location:{uri:t}}}e.create=r})(ye||(ye={}));var Pe;(function(e){function r(n,t,o,s,u,g){let c={name:n,detail:t,kind:o,range:s,selectionRange:u};return g!==void 0&&(c.children=g),c}e.create=r;function i(n){let t=n;return t&&a.string(t.name)&&a.number(t.kind)&&m.is(t.range)&&m.is(t.selectionRange)&&(t.detail===void 0||a.string(t.detail))&&(t.deprecated===void 0||a.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(Pe||(Pe={}));var Se;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Se||(Se={}));var q;(function(e){e.Invoked=1,e.Automatic=2})(q||(q={}));var Ve;(function(e){function r(n,t,o){let s={diagnostics:n};return t!=null&&(s.only=t),o!=null&&(s.triggerKind=o),s}e.create=r;function i(n){let t=n;return a.defined(t)&&a.typedArray(t.diagnostics,z.is)&&(t.only===void 0||a.typedArray(t.only,a.string))&&(t.triggerKind===void 0||t.triggerKind===q.Invoked||t.triggerKind===q.Automatic)}e.is=i})(Ve||(Ve={}));var Be;(function(e){function r(n,t,o){let s={title:n},u=!0;return typeof t=="string"?(u=!1,s.kind=t):U.is(t)?s.command=t:s.edit=t,u&&o!==void 0&&(s.kind=o),s}e.create=r;function i(n){let t=n;return t&&a.string(t.title)&&(t.diagnostics===void 0||a.typedArray(t.diagnostics,z.is))&&(t.kind===void 0||a.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||U.is(t.command))&&(t.isPreferred===void 0||a.boolean(t.isPreferred))&&(t.edit===void 0||ne.is(t.edit))}e.is=i})(Be||(Be={}));var We;(function(e){function r(n,t){let o={range:n};return a.defined(t)&&(o.data=t),o}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(t.range)&&(a.undefined(t.command)||U.is(t.command))}e.is=i})(We||(We={}));var He;(function(e){function r(n,t){return{tabSize:n,insertSpaces:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.uinteger(t.tabSize)&&a.boolean(t.insertSpaces)}e.is=i})(He||(He={}));var ze;(function(e){function r(n,t,o){return{range:n,target:t,data:o}}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(t.range)&&(a.undefined(t.target)||a.string(t.target))}e.is=i})(ze||(ze={}));var Xe;(function(e){function r(n,t){return{range:n,parent:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(Xe||(Xe={}));var qe;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(qe||(qe={}));var Je;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Je||(Je={}));var $e;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}e.is=r})($e||($e={}));var Qe;(function(e){function r(n,t){return{range:n,text:t}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&a.string(t.text)}e.is=i})(Qe||(Qe={}));var Ye;(function(e){function r(n,t,o){return{range:n,variableName:t,caseSensitiveLookup:o}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&a.boolean(t.caseSensitiveLookup)&&(a.string(t.variableName)||t.variableName===void 0)}e.is=i})(Ye||(Ye={}));var Ge;(function(e){function r(n,t){return{range:n,expression:t}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&(a.string(t.expression)||t.expression===void 0)}e.is=i})(Ge||(Ge={}));var Ze;(function(e){function r(n,t){return{frameId:n,stoppedLocation:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(n.stoppedLocation)}e.is=i})(Ze||(Ze={}));var se;(function(e){e.Type=1,e.Parameter=2;function r(i){return i===1||i===2}e.is=r})(se||(se={}));var ae;(function(e){function r(n){return{value:n}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&(t.tooltip===void 0||a.string(t.tooltip)||V.is(t.tooltip))&&(t.location===void 0||H.is(t.location))&&(t.command===void 0||U.is(t.command))}e.is=i})(ae||(ae={}));var Ke;(function(e){function r(n,t,o){let s={position:n,label:t};return o!==void 0&&(s.kind=o),s}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&O.is(t.position)&&(a.string(t.label)||a.typedArray(t.label,ae.is))&&(t.kind===void 0||se.is(t.kind))&&t.textEdits===void 0||a.typedArray(t.textEdits,T.is)&&(t.tooltip===void 0||a.string(t.tooltip)||V.is(t.tooltip))&&(t.paddingLeft===void 0||a.boolean(t.paddingLeft))&&(t.paddingRight===void 0||a.boolean(t.paddingRight))}e.is=i})(Ke||(Ke={}));var Ce;(function(e){function r(i){return{kind:"snippet",value:i}}e.createSnippet=r})(Ce||(Ce={}));var et;(function(e){function r(i,n,t,o){return{insertText:i,filterText:n,range:t,command:o}}e.create=r})(et||(et={}));var tt;(function(e){function r(i){return{items:i}}e.create=r})(tt||(tt={}));var nt;(function(e){e.Invoked=0,e.Automatic=1})(nt||(nt={}));var rt;(function(e){function r(i,n){return{range:i,text:n}}e.create=r})(rt||(rt={}));var it;(function(e){function r(i,n){return{triggerKind:i,selectedCompletionInfo:n}}e.create=r})(it||(it={}));var ot;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&Q.is(n.uri)&&a.string(n.name)}e.is=r})(ot||(ot={}));var st;(function(e){function r(o,s,u,g){return new Tt(o,s,u,g)}e.create=r;function i(o){let s=o;return!!(a.defined(s)&&a.string(s.uri)&&(a.undefined(s.languageId)||a.string(s.languageId))&&a.uinteger(s.lineCount)&&a.func(s.getText)&&a.func(s.positionAt)&&a.func(s.offsetAt))}e.is=i;function n(o,s){let u=o.getText(),g=t(s,(v,d)=>{let k=v.range.start.line-d.range.start.line;return k===0?v.range.start.character-d.range.start.character:k}),c=u.length;for(let v=g.length-1;v>=0;v--){let d=g[v],k=o.offsetAt(d.range.start),p=o.offsetAt(d.range.end);if(p<=c)u=u.substring(0,k)+d.newText+u.substring(p,u.length);else throw new Error("Overlapping edit");c=k}return u}e.applyEdits=n;function t(o,s){if(o.length<=1)return o;let u=o.length/2|0,g=o.slice(0,u),c=o.slice(u);t(g,s),t(c,s);let v=0,d=0,k=0;for(;v<g.length&&d<c.length;)s(g[v],c[d])<=0?o[k++]=g[v++]:o[k++]=c[d++];for(;v<g.length;)o[k++]=g[v++];for(;d<c.length;)o[k++]=c[d++];return o}})(st||(st={}));var Tt=class{constructor(e,r,i,n){this._uri=e,this._languageId=r,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(r,i)}return this._content}update(e,r){this._content=e.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],r=this._content,i=!0;for(let n=0;n<r.length;n++){i&&(e.push(n),i=!1);let t=r.charAt(n);i=t==="\r"||t===`
|
|
3
|
+
v5.0.0-next.86 */
|
|
4
|
+
import{Tl as le}from"./ZK3HCKLO.js";import"./MCGQ6KRV.js";var Ot=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,Rt=Object.getOwnPropertyNames,Mt=Object.prototype.hasOwnProperty,fe=(e,r,i,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of Rt(r))!Mt.call(e,t)&&t!==i&&Ot(e,t,{get:()=>r[t],enumerable:!(n=Nt(r,t))||n.enumerable});return e},Dt=(e,r,i)=>(fe(e,r,"default"),i&&fe(i,r,"default")),f={};Dt(f,le);var Ft=120*1e3,Ut=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>Ft&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=f.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let r;return this._getClient().then(i=>{r=i}).then(i=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(i=>r)}},de;(function(e){function r(i){return typeof i=="string"}e.is=r})(de||(de={}));var Q;(function(e){function r(i){return typeof i=="string"}e.is=r})(Q||(Q={}));var ge;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(ge||(ge={}));var W;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function r(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=r})(W||(W={}));var O;(function(e){function r(n,t){return n===Number.MAX_VALUE&&(n=W.MAX_VALUE),t===Number.MAX_VALUE&&(t=W.MAX_VALUE),{line:n,character:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.uinteger(t.line)&&a.uinteger(t.character)}e.is=i})(O||(O={}));var m;(function(e){function r(n,t,o,s){if(a.uinteger(n)&&a.uinteger(t)&&a.uinteger(o)&&a.uinteger(s))return{start:O.create(n,t),end:O.create(o,s)};if(O.is(n)&&O.is(t))return{start:n,end:t};throw new Error(`Range#create called with invalid arguments[${n}, ${t}, ${o}, ${s}]`)}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&O.is(t.start)&&O.is(t.end)}e.is=i})(m||(m={}));var H;(function(e){function r(n,t){return{uri:n,range:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&(a.string(t.uri)||a.undefined(t.uri))}e.is=i})(H||(H={}));var pe;(function(e){function r(n,t,o,s){return{targetUri:n,targetRange:t,targetSelectionRange:o,originSelectionRange:s}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.targetRange)&&a.string(t.targetUri)&&m.is(t.targetSelectionRange)&&(m.is(t.originSelectionRange)||a.undefined(t.originSelectionRange))}e.is=i})(pe||(pe={}));var Y;(function(e){function r(n,t,o,s){return{red:n,green:t,blue:o,alpha:s}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.numberRange(t.red,0,1)&&a.numberRange(t.green,0,1)&&a.numberRange(t.blue,0,1)&&a.numberRange(t.alpha,0,1)}e.is=i})(Y||(Y={}));var ve;(function(e){function r(n,t){return{range:n,color:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&Y.is(t.color)}e.is=i})(ve||(ve={}));var me;(function(e){function r(n,t,o){return{label:n,textEdit:t,additionalTextEdits:o}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.string(t.label)&&(a.undefined(t.textEdit)||T.is(t))&&(a.undefined(t.additionalTextEdits)||a.typedArray(t.additionalTextEdits,T.is))}e.is=i})(me||(me={}));var P;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(P||(P={}));var he;(function(e){function r(n,t,o,s,u,g){let c={startLine:n,endLine:t};return a.defined(o)&&(c.startCharacter=o),a.defined(s)&&(c.endCharacter=s),a.defined(u)&&(c.kind=u),a.defined(g)&&(c.collapsedText=g),c}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.uinteger(t.startLine)&&a.uinteger(t.startLine)&&(a.undefined(t.startCharacter)||a.uinteger(t.startCharacter))&&(a.undefined(t.endCharacter)||a.uinteger(t.endCharacter))&&(a.undefined(t.kind)||a.string(t.kind))}e.is=i})(he||(he={}));var G;(function(e){function r(n,t){return{location:n,message:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&H.is(t.location)&&a.string(t.message)}e.is=i})(G||(G={}));var F;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(F||(F={}));var _e;(function(e){e.Unnecessary=1,e.Deprecated=2})(_e||(_e={}));var ke;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&a.string(n.href)}e.is=r})(ke||(ke={}));var z;(function(e){function r(n,t,o,s,u,g){let c={range:n,message:t};return a.defined(o)&&(c.severity=o),a.defined(s)&&(c.code=s),a.defined(u)&&(c.source=u),a.defined(g)&&(c.relatedInformation=g),c}e.create=r;function i(n){var t;let o=n;return a.defined(o)&&m.is(o.range)&&a.string(o.message)&&(a.number(o.severity)||a.undefined(o.severity))&&(a.integer(o.code)||a.string(o.code)||a.undefined(o.code))&&(a.undefined(o.codeDescription)||a.string((t=o.codeDescription)===null||t===void 0?void 0:t.href))&&(a.string(o.source)||a.undefined(o.source))&&(a.undefined(o.relatedInformation)||a.typedArray(o.relatedInformation,G.is))}e.is=i})(z||(z={}));var U;(function(e){function r(n,t,...o){let s={title:n,command:t};return a.defined(o)&&o.length>0&&(s.arguments=o),s}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.title)&&a.string(t.command)}e.is=i})(U||(U={}));var T;(function(e){function r(o,s){return{range:o,newText:s}}e.replace=r;function i(o,s){return{range:{start:o,end:o},newText:s}}e.insert=i;function n(o){return{range:o,newText:""}}e.del=n;function t(o){let s=o;return a.objectLiteral(s)&&a.string(s.newText)&&m.is(s.range)}e.is=t})(T||(T={}));var Z;(function(e){function r(n,t,o){let s={label:n};return t!==void 0&&(s.needsConfirmation=t),o!==void 0&&(s.description=o),s}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&a.string(t.label)&&(a.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(a.string(t.description)||t.description===void 0)}e.is=i})(Z||(Z={}));var j;(function(e){function r(i){let n=i;return a.string(n)}e.is=r})(j||(j={}));var be;(function(e){function r(o,s,u){return{range:o,newText:s,annotationId:u}}e.replace=r;function i(o,s,u){return{range:{start:o,end:o},newText:s,annotationId:u}}e.insert=i;function n(o,s){return{range:o,newText:"",annotationId:s}}e.del=n;function t(o){let s=o;return T.is(s)&&(Z.is(s.annotationId)||j.is(s.annotationId))}e.is=t})(be||(be={}));var K;(function(e){function r(n,t){return{textDocument:n,edits:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&re.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(K||(K={}));var C;(function(e){function r(n,t,o){let s={kind:"create",uri:n};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=r;function i(n){let t=n;return t&&t.kind==="create"&&a.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(C||(C={}));var ee;(function(e){function r(n,t,o,s){let u={kind:"rename",oldUri:n,newUri:t};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(u.options=o),s!==void 0&&(u.annotationId=s),u}e.create=r;function i(n){let t=n;return t&&t.kind==="rename"&&a.string(t.oldUri)&&a.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||a.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||a.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(ee||(ee={}));var te;(function(e){function r(n,t,o){let s={kind:"delete",uri:n};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(s.options=t),o!==void 0&&(s.annotationId=o),s}e.create=r;function i(n){let t=n;return t&&t.kind==="delete"&&a.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||a.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||a.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||j.is(t.annotationId))}e.is=i})(te||(te={}));var ne;(function(e){function r(i){let n=i;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(t=>a.string(t.kind)?C.is(t)||ee.is(t)||te.is(t):K.is(t)))}e.is=r})(ne||(ne={}));var we;(function(e){function r(n){return{uri:n}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)}e.is=i})(we||(we={}));var Ae;(function(e){function r(n,t){return{uri:n,version:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&a.integer(t.version)}e.is=i})(Ae||(Ae={}));var re;(function(e){function r(n,t){return{uri:n,version:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&(t.version===null||a.integer(t.version))}e.is=i})(re||(re={}));var Ie;(function(e){function r(n,t,o,s){return{uri:n,languageId:t,version:o,text:s}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.string(t.uri)&&a.string(t.languageId)&&a.integer(t.version)&&a.string(t.text)}e.is=i})(Ie||(Ie={}));var ie;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function r(i){let n=i;return n===e.PlainText||n===e.Markdown}e.is=r})(ie||(ie={}));var V;(function(e){function r(i){let n=i;return a.objectLiteral(i)&&ie.is(n.kind)&&a.string(n.value)}e.is=r})(V||(V={}));var h;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(h||(h={}));var oe;(function(e){e.PlainText=1,e.Snippet=2})(oe||(oe={}));var Ee;(function(e){e.Deprecated=1})(Ee||(Ee={}));var Le;(function(e){function r(n,t,o){return{newText:n,insert:t,replace:o}}e.create=r;function i(n){let t=n;return t&&a.string(t.newText)&&m.is(t.insert)&&m.is(t.replace)}e.is=i})(Le||(Le={}));var Oe;(function(e){e.asIs=1,e.adjustIndentation=2})(Oe||(Oe={}));var Ne;(function(e){function r(i){let n=i;return n&&(a.string(n.detail)||n.detail===void 0)&&(a.string(n.description)||n.description===void 0)}e.is=r})(Ne||(Ne={}));var Re;(function(e){function r(i){return{label:i}}e.create=r})(Re||(Re={}));var Me;(function(e){function r(i,n){return{items:i||[],isIncomplete:!!n}}e.create=r})(Me||(Me={}));var X;(function(e){function r(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=r;function i(n){let t=n;return a.string(t)||a.objectLiteral(t)&&a.string(t.language)&&a.string(t.value)}e.is=i})(X||(X={}));var De;(function(e){function r(i){let n=i;return!!n&&a.objectLiteral(n)&&(V.is(n.contents)||X.is(n.contents)||a.typedArray(n.contents,X.is))&&(i.range===void 0||m.is(i.range))}e.is=r})(De||(De={}));var Fe;(function(e){function r(i,n){return n?{label:i,documentation:n}:{label:i}}e.create=r})(Fe||(Fe={}));var Ue;(function(e){function r(i,n,...t){let o={label:i};return a.defined(n)&&(o.documentation=n),a.defined(t)?o.parameters=t:o.parameters=[],o}e.create=r})(Ue||(Ue={}));var S;(function(e){e.Text=1,e.Read=2,e.Write=3})(S||(S={}));var Te;(function(e){function r(i,n){let t={range:i};return a.number(n)&&(t.kind=n),t}e.create=r})(Te||(Te={}));var _;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(_||(_={}));var je;(function(e){e.Deprecated=1})(je||(je={}));var xe;(function(e){function r(i,n,t,o,s){let u={name:i,kind:n,location:{uri:o,range:t}};return s&&(u.containerName=s),u}e.create=r})(xe||(xe={}));var ye;(function(e){function r(i,n,t,o){return o!==void 0?{name:i,kind:n,location:{uri:t,range:o}}:{name:i,kind:n,location:{uri:t}}}e.create=r})(ye||(ye={}));var Pe;(function(e){function r(n,t,o,s,u,g){let c={name:n,detail:t,kind:o,range:s,selectionRange:u};return g!==void 0&&(c.children=g),c}e.create=r;function i(n){let t=n;return t&&a.string(t.name)&&a.number(t.kind)&&m.is(t.range)&&m.is(t.selectionRange)&&(t.detail===void 0||a.string(t.detail))&&(t.deprecated===void 0||a.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(Pe||(Pe={}));var Se;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Se||(Se={}));var q;(function(e){e.Invoked=1,e.Automatic=2})(q||(q={}));var Ve;(function(e){function r(n,t,o){let s={diagnostics:n};return t!=null&&(s.only=t),o!=null&&(s.triggerKind=o),s}e.create=r;function i(n){let t=n;return a.defined(t)&&a.typedArray(t.diagnostics,z.is)&&(t.only===void 0||a.typedArray(t.only,a.string))&&(t.triggerKind===void 0||t.triggerKind===q.Invoked||t.triggerKind===q.Automatic)}e.is=i})(Ve||(Ve={}));var Be;(function(e){function r(n,t,o){let s={title:n},u=!0;return typeof t=="string"?(u=!1,s.kind=t):U.is(t)?s.command=t:s.edit=t,u&&o!==void 0&&(s.kind=o),s}e.create=r;function i(n){let t=n;return t&&a.string(t.title)&&(t.diagnostics===void 0||a.typedArray(t.diagnostics,z.is))&&(t.kind===void 0||a.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||U.is(t.command))&&(t.isPreferred===void 0||a.boolean(t.isPreferred))&&(t.edit===void 0||ne.is(t.edit))}e.is=i})(Be||(Be={}));var We;(function(e){function r(n,t){let o={range:n};return a.defined(t)&&(o.data=t),o}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(t.range)&&(a.undefined(t.command)||U.is(t.command))}e.is=i})(We||(We={}));var He;(function(e){function r(n,t){return{tabSize:n,insertSpaces:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&a.uinteger(t.tabSize)&&a.boolean(t.insertSpaces)}e.is=i})(He||(He={}));var ze;(function(e){function r(n,t,o){return{range:n,target:t,data:o}}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(t.range)&&(a.undefined(t.target)||a.string(t.target))}e.is=i})(ze||(ze={}));var Xe;(function(e){function r(n,t){return{range:n,parent:t}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&m.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(Xe||(Xe={}));var qe;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(qe||(qe={}));var Je;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Je||(Je={}));var $e;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}e.is=r})($e||($e={}));var Qe;(function(e){function r(n,t){return{range:n,text:t}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&a.string(t.text)}e.is=i})(Qe||(Qe={}));var Ye;(function(e){function r(n,t,o){return{range:n,variableName:t,caseSensitiveLookup:o}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&a.boolean(t.caseSensitiveLookup)&&(a.string(t.variableName)||t.variableName===void 0)}e.is=i})(Ye||(Ye={}));var Ge;(function(e){function r(n,t){return{range:n,expression:t}}e.create=r;function i(n){let t=n;return t!=null&&m.is(t.range)&&(a.string(t.expression)||t.expression===void 0)}e.is=i})(Ge||(Ge={}));var Ze;(function(e){function r(n,t){return{frameId:n,stoppedLocation:t}}e.create=r;function i(n){let t=n;return a.defined(t)&&m.is(n.stoppedLocation)}e.is=i})(Ze||(Ze={}));var se;(function(e){e.Type=1,e.Parameter=2;function r(i){return i===1||i===2}e.is=r})(se||(se={}));var ae;(function(e){function r(n){return{value:n}}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&(t.tooltip===void 0||a.string(t.tooltip)||V.is(t.tooltip))&&(t.location===void 0||H.is(t.location))&&(t.command===void 0||U.is(t.command))}e.is=i})(ae||(ae={}));var Ke;(function(e){function r(n,t,o){let s={position:n,label:t};return o!==void 0&&(s.kind=o),s}e.create=r;function i(n){let t=n;return a.objectLiteral(t)&&O.is(t.position)&&(a.string(t.label)||a.typedArray(t.label,ae.is))&&(t.kind===void 0||se.is(t.kind))&&t.textEdits===void 0||a.typedArray(t.textEdits,T.is)&&(t.tooltip===void 0||a.string(t.tooltip)||V.is(t.tooltip))&&(t.paddingLeft===void 0||a.boolean(t.paddingLeft))&&(t.paddingRight===void 0||a.boolean(t.paddingRight))}e.is=i})(Ke||(Ke={}));var Ce;(function(e){function r(i){return{kind:"snippet",value:i}}e.createSnippet=r})(Ce||(Ce={}));var et;(function(e){function r(i,n,t,o){return{insertText:i,filterText:n,range:t,command:o}}e.create=r})(et||(et={}));var tt;(function(e){function r(i){return{items:i}}e.create=r})(tt||(tt={}));var nt;(function(e){e.Invoked=0,e.Automatic=1})(nt||(nt={}));var rt;(function(e){function r(i,n){return{range:i,text:n}}e.create=r})(rt||(rt={}));var it;(function(e){function r(i,n){return{triggerKind:i,selectedCompletionInfo:n}}e.create=r})(it||(it={}));var ot;(function(e){function r(i){let n=i;return a.objectLiteral(n)&&Q.is(n.uri)&&a.string(n.name)}e.is=r})(ot||(ot={}));var st;(function(e){function r(o,s,u,g){return new Tt(o,s,u,g)}e.create=r;function i(o){let s=o;return!!(a.defined(s)&&a.string(s.uri)&&(a.undefined(s.languageId)||a.string(s.languageId))&&a.uinteger(s.lineCount)&&a.func(s.getText)&&a.func(s.positionAt)&&a.func(s.offsetAt))}e.is=i;function n(o,s){let u=o.getText(),g=t(s,(v,d)=>{let k=v.range.start.line-d.range.start.line;return k===0?v.range.start.character-d.range.start.character:k}),c=u.length;for(let v=g.length-1;v>=0;v--){let d=g[v],k=o.offsetAt(d.range.start),p=o.offsetAt(d.range.end);if(p<=c)u=u.substring(0,k)+d.newText+u.substring(p,u.length);else throw new Error("Overlapping edit");c=k}return u}e.applyEdits=n;function t(o,s){if(o.length<=1)return o;let u=o.length/2|0,g=o.slice(0,u),c=o.slice(u);t(g,s),t(c,s);let v=0,d=0,k=0;for(;v<g.length&&d<c.length;)s(g[v],c[d])<=0?o[k++]=g[v++]:o[k++]=c[d++];for(;v<g.length;)o[k++]=g[v++];for(;d<c.length;)o[k++]=c[d++];return o}})(st||(st={}));var Tt=class{constructor(e,r,i,n){this._uri=e,this._languageId=r,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(r,i)}return this._content}update(e,r){this._content=e.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],r=this._content,i=!0;for(let n=0;n<r.length;n++){i&&(e.push(n),i=!1);let t=r.charAt(n);i=t==="\r"||t===`
|
|
5
5
|
`,t==="\r"&&n+1<r.length&&r.charAt(n+1)===`
|
|
6
6
|
`&&n++}i&&r.length>0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),i=0,n=r.length;if(n===0)return O.create(0,e);for(;i<n;){let o=Math.floor((i+n)/2);r[o]>e?n=o:i=o+1}let t=i-1;return O.create(t,e-r[t])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let i=r[e.line],n=e.line+1<r.length?r[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)}get lineCount(){return this.getLineOffsets().length}},a;(function(e){let r=Object.prototype.toString;function i(p){return typeof p<"u"}e.defined=i;function n(p){return typeof p>"u"}e.undefined=n;function t(p){return p===!0||p===!1}e.boolean=t;function o(p){return r.call(p)==="[object String]"}e.string=o;function s(p){return r.call(p)==="[object Number]"}e.number=s;function u(p,N,J){return r.call(p)==="[object Number]"&&N<=p&&p<=J}e.numberRange=u;function g(p){return r.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}e.integer=g;function c(p){return r.call(p)==="[object Number]"&&0<=p&&p<=2147483647}e.uinteger=c;function v(p){return r.call(p)==="[object Function]"}e.func=v;function d(p){return p!==null&&typeof p=="object"}e.objectLiteral=d;function k(p,N){return Array.isArray(p)&&p.every(N)}e.typedArray=k})(a||(a={}));var jt=class{constructor(e,r,i){this._languageId=e,this._worker=r,this._disposables=[],this._listener=Object.create(null);let n=o=>{let s=o.getLanguageId();if(s!==this._languageId)return;let u;this._listener[o.uri.toString()]=o.onDidChangeContent(()=>{window.clearTimeout(u),u=window.setTimeout(()=>this._doValidate(o.uri,s),500)}),this._doValidate(o.uri,s)},t=o=>{f.editor.setModelMarkers(o,this._languageId,[]);let s=o.uri.toString(),u=this._listener[s];u&&(u.dispose(),delete this._listener[s])};this._disposables.push(f.editor.onDidCreateModel(n)),this._disposables.push(f.editor.onWillDisposeModel(t)),this._disposables.push(f.editor.onDidChangeModelLanguage(o=>{t(o.model),n(o.model)})),this._disposables.push(i(o=>{f.editor.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(t(s),n(s))})})),this._disposables.push({dispose:()=>{f.editor.getModels().forEach(t);for(let o in this._listener)this._listener[o].dispose()}}),f.editor.getModels().forEach(n)}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables.length=0}_doValidate(e,r){this._worker(e).then(i=>i.doValidation(e.toString())).then(i=>{let n=i.map(o=>yt(e,o)),t=f.editor.getModel(e);t&&t.getLanguageId()===r&&f.editor.setModelMarkers(t,r,n)}).then(void 0,i=>{console.error(i)})}};function xt(e){switch(e){case F.Error:return f.MarkerSeverity.Error;case F.Warning:return f.MarkerSeverity.Warning;case F.Information:return f.MarkerSeverity.Info;case F.Hint:return f.MarkerSeverity.Hint;default:return f.MarkerSeverity.Info}}function yt(e,r){let i=typeof r.code=="number"?String(r.code):r.code;return{severity:xt(r.severity),startLineNumber:r.range.start.line+1,startColumn:r.range.start.character+1,endLineNumber:r.range.end.line+1,endColumn:r.range.end.character+1,message:r.message,code:i,source:r.source}}var Pt=class{constructor(e,r){this._worker=e,this._triggerCharacters=r}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(e,r,i,n){let t=e.uri;return this._worker(t).then(o=>o.doComplete(t.toString(),R(r))).then(o=>{if(!o)return;let s=e.getWordUntilPosition(r),u=new f.Range(r.lineNumber,s.startColumn,r.lineNumber,s.endColumn),g=o.items.map(c=>{let v={label:c.label,insertText:c.insertText||c.label,sortText:c.sortText,filterText:c.filterText,documentation:c.documentation,detail:c.detail,command:Bt(c.command),range:u,kind:Vt(c.kind)};return c.textEdit&&(St(c.textEdit)?v.range={insert:w(c.textEdit.insert),replace:w(c.textEdit.replace)}:v.range=w(c.textEdit.range),v.insertText=c.textEdit.newText),c.additionalTextEdits&&(v.additionalTextEdits=c.additionalTextEdits.map(B)),c.insertTextFormat===oe.Snippet&&(v.insertTextRules=f.languages.CompletionItemInsertTextRule.InsertAsSnippet),v});return{isIncomplete:o.isIncomplete,suggestions:g}})}};function R(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function mt(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function w(e){if(e)return new f.Range(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function St(e){return typeof e.insert<"u"&&typeof e.replace<"u"}function Vt(e){let r=f.languages.CompletionItemKind;switch(e){case h.Text:return r.Text;case h.Method:return r.Method;case h.Function:return r.Function;case h.Constructor:return r.Constructor;case h.Field:return r.Field;case h.Variable:return r.Variable;case h.Class:return r.Class;case h.Interface:return r.Interface;case h.Module:return r.Module;case h.Property:return r.Property;case h.Unit:return r.Unit;case h.Value:return r.Value;case h.Enum:return r.Enum;case h.Keyword:return r.Keyword;case h.Snippet:return r.Snippet;case h.Color:return r.Color;case h.File:return r.File;case h.Reference:return r.Reference}return r.Property}function B(e){if(e)return{range:w(e.range),text:e.newText}}function Bt(e){return e&&e.command==="editor.action.triggerSuggest"?{id:e.command,title:e.title,arguments:e.arguments}:void 0}var Wt=class{constructor(e){this._worker=e}provideHover(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.doHover(n.toString(),R(r))).then(t=>{if(t)return{range:w(t.range),contents:zt(t.contents)}})}};function Ht(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function at(e){return typeof e=="string"?{value:e}:Ht(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+`
|
|
7
7
|
`+e.value+"\n```\n"}}function zt(e){if(e)return Array.isArray(e)?e.map(at):[at(e)]}var mn=class{constructor(e){this._worker=e}provideDocumentHighlights(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.findDocumentHighlights(n.toString(),R(r))).then(t=>{if(t)return t.map(o=>({range:w(o.range),kind:Xt(o.kind)}))})}};function Xt(e){switch(e){case S.Read:return f.languages.DocumentHighlightKind.Read;case S.Write:return f.languages.DocumentHighlightKind.Write;case S.Text:return f.languages.DocumentHighlightKind.Text}return f.languages.DocumentHighlightKind.Text}var hn=class{constructor(e){this._worker=e}provideDefinition(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.findDefinition(n.toString(),R(r))).then(t=>{if(t)return[ht(t)]})}};function ht(e){return{uri:f.Uri.parse(e.uri),range:w(e.range)}}var _n=class{constructor(e){this._worker=e}provideReferences(e,r,i,n){let t=e.uri;return this._worker(t).then(o=>o.findReferences(t.toString(),R(r))).then(o=>{if(o)return o.map(ht)})}},kn=class{constructor(e){this._worker=e}provideRenameEdits(e,r,i,n){let t=e.uri;return this._worker(t).then(o=>o.doRename(t.toString(),R(r),i)).then(o=>qt(o))}};function qt(e){if(!e||!e.changes)return;let r=[];for(let i in e.changes){let n=f.Uri.parse(i);for(let t of e.changes[i])r.push({resource:n,versionId:void 0,textEdit:{range:w(t.range),text:t.newText}})}return{edits:r}}var Jt=class{constructor(e){this._worker=e}provideDocumentSymbols(e,r){let i=e.uri;return this._worker(i).then(n=>n.findDocumentSymbols(i.toString())).then(n=>{if(n)return n.map(t=>$t(t)?_t(t):{name:t.name,detail:"",containerName:t.containerName,kind:kt(t.kind),range:w(t.location.range),selectionRange:w(t.location.range),tags:[]})})}};function $t(e){return"children"in e}function _t(e){return{name:e.name,detail:e.detail??"",kind:kt(e.kind),range:w(e.range),selectionRange:w(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map(r=>_t(r))}}function kt(e){let r=f.languages.SymbolKind;switch(e){case _.File:return r.File;case _.Module:return r.Module;case _.Namespace:return r.Namespace;case _.Package:return r.Package;case _.Class:return r.Class;case _.Method:return r.Method;case _.Property:return r.Property;case _.Field:return r.Field;case _.Constructor:return r.Constructor;case _.Enum:return r.Enum;case _.Interface:return r.Interface;case _.Function:return r.Function;case _.Variable:return r.Variable;case _.Constant:return r.Constant;case _.String:return r.String;case _.Number:return r.Number;case _.Boolean:return r.Boolean;case _.Array:return r.Array}return r.Function}var bn=class{constructor(e){this._worker=e}provideLinks(e,r){let i=e.uri;return this._worker(i).then(n=>n.findDocumentLinks(i.toString())).then(n=>{if(n)return{links:n.map(t=>({range:w(t.range),url:t.target}))}})}},Qt=class{constructor(e){this._worker=e}provideDocumentFormattingEdits(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.format(n.toString(),null,bt(r)).then(o=>{if(!(!o||o.length===0))return o.map(B)}))}},Yt=class{constructor(e){this._worker=e,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(e,r,i,n){let t=e.uri;return this._worker(t).then(o=>o.format(t.toString(),mt(r),bt(i)).then(s=>{if(!(!s||s.length===0))return s.map(B)}))}};function bt(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}var Gt=class{constructor(e){this._worker=e}provideDocumentColors(e,r){let i=e.uri;return this._worker(i).then(n=>n.findDocumentColors(i.toString())).then(n=>{if(n)return n.map(t=>({color:t.color,range:w(t.range)}))})}provideColorPresentations(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.getColorPresentations(n.toString(),r.color,mt(r.range))).then(t=>{if(t)return t.map(o=>{let s={label:o.label};return o.textEdit&&(s.textEdit=B(o.textEdit)),o.additionalTextEdits&&(s.additionalTextEdits=o.additionalTextEdits.map(B)),s})})}},Zt=class{constructor(e){this._worker=e}provideFoldingRanges(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.getFoldingRanges(n.toString(),r)).then(t=>{if(t)return t.map(o=>{let s={start:o.startLine+1,end:o.endLine+1};return typeof o.kind<"u"&&(s.kind=Kt(o.kind)),s})})}};function Kt(e){switch(e){case P.Comment:return f.languages.FoldingRangeKind.Comment;case P.Imports:return f.languages.FoldingRangeKind.Imports;case P.Region:return f.languages.FoldingRangeKind.Region}}var Ct=class{constructor(e){this._worker=e}provideSelectionRanges(e,r,i){let n=e.uri;return this._worker(n).then(t=>t.getSelectionRanges(n.toString(),r.map(R))).then(t=>{if(t)return t.map(o=>{let s=[];for(;o;)s.push({range:w(o.range)}),o=o.parent;return s})})}};function en(e,r=!1){let i=e.length,n=0,t="",o=0,s=16,u=0,g=0,c=0,v=0,d=0;function k(l,A){let L=0,I=0;for(;L<l||!A;){let b=e.charCodeAt(n);if(b>=48&&b<=57)I=I*16+b-48;else if(b>=65&&b<=70)I=I*16+b-65+10;else if(b>=97&&b<=102)I=I*16+b-97+10;else break;n++,L++}return L<l&&(I=-1),I}function p(l){n=l,t="",o=0,s=16,d=0}function N(){let l=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&M(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&M(e.charCodeAt(n)))for(n++;n<e.length&&M(e.charCodeAt(n));)n++;else return d=3,e.substring(l,n);let A=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&M(e.charCodeAt(n))){for(n++;n<e.length&&M(e.charCodeAt(n));)n++;A=n}else d=3;return e.substring(l,A)}function J(){let l="",A=n;for(;;){if(n>=i){l+=e.substring(A,n),d=2;break}let L=e.charCodeAt(n);if(L===34){l+=e.substring(A,n),n++;break}if(L===92){if(l+=e.substring(A,n),n++,n>=i){d=2;break}switch(e.charCodeAt(n++)){case 34:l+='"';break;case 92:l+="\\";break;case 47:l+="/";break;case 98:l+="\b";break;case 102:l+="\f";break;case 110:l+=`
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
+
v5.0.0-next.86 */
|
|
4
|
+
import c from"./V4TG6GDW.js";import"./W7DH63B3.js";import b from"./HI5LKY6R.js";import a from"./RZ4DRTSI.js";import"./3JQZLQ6X.js";import"./HUDN4YMY.js";import"./N3MHW6AM.js";import"./SWSJLICP.js";import"./5WXTHFB6.js";import"./WHDQGCW7.js";import"./A7GC2RAP.js";import"./DD6ZRT43.js";import"./VYCA3AJT.js";import"./ZK3HCKLO.js";import"./MCGQ6KRV.js";export default $arcgis.t(([,,{a:a,b:b,c:c}])=>{return{getSqlExprDiagnosticService:b,getSqlExprWorker:a,setupMode:c}},a,b,c)
|
|
@@ -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"./
|
|
3
|
+
v5.0.0-next.86 */
|
|
4
|
+
import{a}from"./HNMU72SH.js";import{a as m}from"./BTHHVPUO.js";import"./JPLSYGHT.js";import c from"./HI5LKY6R.js";import b from"./RZ4DRTSI.js";import"./HUDN4YMY.js";import"./N3MHW6AM.js";import"./SWSJLICP.js";import"./5WXTHFB6.js";import"./WHDQGCW7.js";import"./A7GC2RAP.js";import{G as n,K as d,h as r,j as i,n as s}from"./DD6ZRT43.js";import"./VYCA3AJT.js";import"./ZK3HCKLO.js";import"./MCGQ6KRV.js";export default $arcgis.t(([,h])=>{var g=r`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,c=class extends n{constructor(){super(...arguments),this.messages=m(),this._filterValue="",this._flowItemRenderers=[],this._mutationCounter=1,this.loading=!1,this.arcgisClose=s({bubbles:!1}),this.arcgisFieldSelected=s({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mutationCounter:16,loading:5,modelId:1}}static{this.styles=g}willUpdate(t){t.has("modelId")&&(this._flowItemRenderers=[])}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}_handleSelectField(t){if(t.target instanceof HTMLElement)switch(t.target.tagName.toLowerCase()){case"calcite-list-item":{let e=t.target.value;this.arcgisFieldSelected.emit(e??"");break}case"calcite-action":t.stopPropagation();break}}_handleSelectDomain(t){let e=t.target.value;this.arcgisFieldSelected.emit(e?`'${e}'`:"")}_emitClose(){this.arcgisClose.emit()}render(){let t=h.getFeatureLayerForModel(this.modelId??"");return this.loading||!this.modelId||!t?i`<calcite-block .heading=${this.messages.availablefields??""}></calcite-block>`:i`<calcite-flow><calcite-flow-item heading-level=2 .heading=${this.messages.availablefields??""} closable @calciteFlowItemClose=${this._emitClose}><calcite-list label=fields filter-enabled>${a(t.fields,e=>e.name,e=>i`<calcite-list-item @click=${this._handleSelectField} .label=${e.name} .description=${e.alias??""} .value=${e.name}>${e.domain&&i`<calcite-action slot=actions-end text=open icon=chevron-right @click=${()=>{let o=e.domain;o?.type==="coded-value"&&(this._flowItemRenderers=[...this._flowItemRenderers,()=>i`<calcite-flow-item closable heading-level=2 .heading=${this.messages.domainvalues??""} .description=${e.name} @calciteFlowItemClose=${this._emitClose}><calcite-list label=domains>${a(o.codedValues,l=>l.code,l=>i`<calcite-list-item @click=${this._handleSelectDomain} .label=${l.name} .description=${String(l.code)} .value=${String(l.code)}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`])}}></calcite-action>`||""}</calcite-list-item>`)}</calcite-list></calcite-flow-item>${this._flowItemRenderers.map(e=>e())}</calcite-flow>`}};d("arcgis-sql-expression-fields",c);return c},b,c)
|
|
@@ -1,14 +1,14 @@
|
|
|
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 Q,b as X,c as
|
|
3
|
+
v5.0.0-next.86 */
|
|
4
|
+
import{a as Q,b as X,c as Z,d,e as f}from"./HUDN4YMY.js";import{b as J}from"./N3MHW6AM.js";import{a as Y}from"./SWSJLICP.js";import{b as D,c as S,d as v,e as H}from"./5WXTHFB6.js";import{i as z}from"./A7GC2RAP.js";import{L as B,r as q,t as V}from"./DD6ZRT43.js";import{Gl as $,Pl as A}from"./ZK3HCKLO.js";export default $arcgis.t(([x,_e,me,be,ge,{getDeclaredVoxelMembers:we,getDeclaredPixelMembers:Ce}])=>{var L=t=>t!==void 0,F=t=>t!==null;function le(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&typeof t.declaredClass=="string"&&t.declaredClass.startsWith("esri.layers.")&&P(t)&&"queryFeatures"in t&&typeof t.queryFeatures=="function"}function pe(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&typeof t.declaredClass=="string"&&(t.declaredClass==="esri.Map"||t.declaredClass==="esri.WebMap"||t.declaredClass==="esri.WebScene")}function De(t){return!!t&&typeof t=="object"&&"loadAll"in t&&typeof t.loadAll=="function"}function ce(t){return!!t&&typeof t=="object"&&"portalItem"in t&&t.portalItem!=null}function ue(t){return!!t&&typeof t=="object"&&"portalItem"in t&&t.portalItem!=null}function P(t){return!!t&&typeof t=="object"&&"fields"in t&&Array.isArray(t.fields)}function M(t){return!!t&&typeof t=="object"&&"url"in t&&typeof t.url=="string"}function Se(t){return M(t)&&/\/(?:featureserver|mapserver)(?:\/|$)/iu.test(t.url??"")}function he(t){return M(t)||P(t)||ue(t)}function tt(t){return he(t)&&"type"in t&&t.type==="voxel"}function it(t){return he(t)&&"type"in t&&(t.type==="imagery"||t.type==="imagery-tile")}function rt(t){return M(t)||P(t)||ue(t)}function st(t){return ce(t)||pe(t)||Se(t)}function ee(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.Subtype"}function j(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.CodedValueDomain"}function ve(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.InheritedDomain"}function nt(t){return!!t&&typeof t=="object"&&"id"in t&&typeof t.id=="string"&&"definitions"in t&&typeof t.definitions=="object"&&!Array.isArray(t.definitions)}function h(t){return!!t&&typeof t=="object"&&"title"in t&&typeof t.title=="string"}function Fe(t){return!!t&&typeof t=="object"&&"url"in t&&typeof t.url=="string"}function de(t){return!!t&&typeof t=="object"&&"layerId"in t&&typeof t.layerId=="number"}function E(t){return!!t&&typeof t=="object"&&"typeIdField"in t&&"types"in t}function te(t){return!!t&&typeof t=="object"&&"getFieldDomain"in t&&typeof t.getFieldDomain=="function"}function y(t){return!!t&&typeof t=="object"&&"subtypeField"in t}function xe(t){return y(t)&&"subtypes"in t}function Te(t){return!!t&&typeof t=="object"&&"portalItem"in t}function Ie(t){return de(t)&&"relationships"in t&&"url"in t&&Array.isArray(t.relationships)&&typeof t.url=="string"}function Pe(t){return!!t&&typeof t=="object"&&"isTable"in t&&typeof t.isTable=="boolean"}function Me(t){if(t&&typeof t=="object"){if(Pe(t))return t.isTable||"type"in t&&t.type==="table";if("geometryType"in t)return t.geometryType===""||t.geometryType==="esriGeometryNull"||t.geometryType===null}return!1}function Ve(t){return!Me(t)}function $e(t){return!!t&&typeof t=="object"&&"load"in t&&typeof t.load=="function"}function Ae(t){return!!t&&typeof t=="object"&&"type"in t&&t.type==="voxel"}function ie(t){return!!t&&typeof t=="object"&&"type"in t&&typeof t.type=="string"&&["imagery","imagery-tile"].includes(t.type)}async function fe(t){if(!t)return null;let e;return P(t)?e=t:e=new x(t),$e(e)&&await e.load(),e}async function Le(t){t+="/layers";let e=await _e(t,{responseType:"json",query:{f:"json"}}),i=t.endsWith("MapServer/layers")?"data":"query",r=re(e.data?.layers,i),s=re(e.data?.tables,i);return{layers:r,tables:s}}function re(t,e){return t?t.filter(i=>{switch(i.type){case"Feature Layer":case"Oriented Imagery Layer":case"Catalog Layer":case"Table":return(i.capabilities?i.capabilities.toLowerCase().split(",").map(r=>r.trim()):[]).includes(e);default:return!1}}):[]}async function je(t,e){let i=new x({url:`${t.url}/${e.relatedTableId}`});return await i.load(),i}function R(t){return(e,i)=>{if(e.type==="oid")return-1;if(i.type==="oid")return 1;if(y(t)){if(e.name===t.subtypeField)return-1;if(i.name===t.subtypeField)return 1}if(E(t)){if(e.name===t.typeIdField)return-1;if(i.name===t.typeIdField)return 1}return e.name.localeCompare(i.name,"en",{sensitivity:"base"})}}function se(t,e){return t?.every(i=>i.domains?.[e.name]?.type==="inherited")??!1}var Ee=/^[a-z_$][a-z0-9_$]*$/giu;function O(t,e=!0){return t.match(Ee)?`${e?".":""}${t}`:`["${t}"]`}function ye(t,e){return t?`${t}${O(e)}`:e}function ne(t){return Te(t)?t.portalItem:null}function ot(t,e,i=!1){let r=e,s=[],o=[];return d(t).forEach(n=>{r&&(r+=`
|
|
5
5
|
|
|
6
6
|
`),r+=`**${n.name}** (${n.alias})
|
|
7
7
|
${n.type}`,n.description&&(r+=`
|
|
8
|
-
'${n.description}`);let u=
|
|
8
|
+
'${n.description}`);let u=Z(n),c=O(n.name,!1),p=f(n);if(s.push({name:n.name,description:p,type:u,completion:{label:n.name,detail:p,insertText:c,insertTextMode:v.asIs,insertTextFormat:S.PlainText,kind:D.Field}}),i){if(!n.alias||n.alias.toLowerCase()===n.name.toLowerCase())return;let C=`**${n.alias}**
|
|
9
9
|
${n.type}`;n.description&&(C+=`
|
|
10
10
|
'${n.description}`),o.push({name:n.alias,description:n.name,type:u,completion:{label:n.alias,detail:n.name,insertText:c,insertTextMode:v.asIs,insertTextFormat:S.PlainText,kind:D.Field,documentation:{kind:"markdown",value:C}}})}}),[[...s,...o],r]}function at(t,e){let i=e,r=[];return t.forEach(s=>{i&&(i+=`
|
|
11
11
|
|
|
12
12
|
`),i+=`**${s.name}**
|
|
13
13
|
${s.type}`,s.name&&(i+=`
|
|
14
|
-
'${s.name}`),r.push({name:s.name,description:s.name,type:"array",completion:{label:s.name,detail:s.name,insertText:O(s.name,!1),insertTextMode:v.asIs,insertTextFormat:S.PlainText,kind:D.Field}})}),[r,i]}var T=class{constructor(e,i,r){this._profile=e,this._label=i,this.description=r,this.filterDescription=!1}getLabel(){return this._label==null?"":typeof this._label=="string"?q(this._label):V(this._profile?.intlStrings[this._label.code],this._label.formatValues)}getDescription(){return this.description==null?"":typeof this.description=="string"?this.description:V(this._profile?.intlStrings[this.description.code],this.description.formatValues)}passFilter(e){return!e||e.test(this.getLabel())?!0:this.filterDescription&&e.test(this.getDescription())}},_=class extends T{constructor(e){super(e.profile,e.label,e.description??e.declaration?.description),this.declaration=e.declaration??{},this.name=e.declaration?.name??"",this.snippet=e.snippet??"",this.nonInteractive=e.nonInteractive??!1,this.filterDescription=e.filterDescription??!1,this.icon=e.icon}},a=class extends _{constructor(e){super(e),this.type="text",this.isCollection=!1,this.type=e.declaration?.type??"text"}getDescription(){return this.description==null?this._profile?.intlStrings[this.type.toLowerCase()]??"":super.getDescription()}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration}}},N=class extends _{constructor(e){super(e),this.type="array",this.isCollection=!1,this.elementType=e.declaration?.elementType??{type:"number",name:"number"}}getDescription(){return this.description==null?this._profile?.intlStrings[this.type.toLowerCase()]??"":super.getDescription()}toProfileVariableDefinition(){return{type:this.type,elementType:this.elementType,name:"",...this.declaration}}},m=class extends _{constructor(e,i){super(i),this.owner=e,this.isCollection=!0,this._loaded=!0,this.variables=[]}get breadcrumb(){if(this.owner){let e=this.owner.breadcrumb;return e?`${e} / ${this.name}`:this.name}return this.name}get loaded(){return this._loaded}get informationUrl(){return null}get informationType(){return""}},l=class extends T{constructor(e,i,r=[],s=!1){super(e,i),this.variables=r,this.isHeader=s,this.type="group",this.isCollection=!0}passFilter(){return!0}},b=class t extends m{constructor(e,i){super(e,i),this.type="dictionary",this.dictionaryVariables=[],this.loadPropertyDeclarations(i.declaration?.properties),this.snippet&&this.dictionaryVariables.length&&(this.variables=[new l(this._profile,this.snippet,this.dictionaryVariables)])}async loadSource(){}loadPropertyDeclarations(e){this.dictionaryVariables=this.createVariableInstances(e),this.variables=this.dictionaryVariables}createVariableInstances(e){if(!Array.isArray(e))return[];let i=[];return e.forEach(r=>{let s=this.createVariableInstance(r);s&&i.push(s)}),i}createVariableInstance(e){let i=ye(this.snippet,e.name);switch(e.type){case"number":case"text":case"boolean":case"date":case"dateOnly":case"time":case"geometry":case"knowledgeGraph":return new a({profile:this._profile,declaration:e,label:i,snippet:i});case"pixel":return new U(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"voxel":return new W(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"feature":return new G(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"featureSet":return new w(this,{profile:this._profile,declaration:e,label:i,snippet:i},[new a({profile:this._profile,label:i,description:"",snippet:i})]);case"featureSetCollection":return new k(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"dictionary":return new t(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"array":return new N({profile:this._profile,declaration:e,label:i,snippet:i});default:return console.error("Editor profile: Invalid profile variable",e),null}}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,properties:this.dictionaryVariables.map(e=>e.toProfileVariableDefinition())}}},I=class extends m{constructor(e,i,r){super(e,i),this.relationshipsProperties=r,this._source=null,this._loaded=!1,this._definition=i.declaration?.definition}get title(){return h(this._source)?this._source.title??"":""}get url(){return Fe(this._source)?this._source.url??"":""}get informationUrl(){return!this.loaded||!this.url?null:de(this._source)?`${this.url}/${this._source.layerId}`:this.url}get informationType(){return this._profile?.intlStrings.layer??"layer"}async loadSource(){return F(this._loadPromise)&&L(this._loadPromise)?await this._loadPromise:(this._loadPromise=this._loadSource(),await this._loadPromise)}_getValueSnippet(e){return["feature","voxel","pixel"].includes(this.type)?ye(this.snippet,e.name):e.name}_getSubtypeOrDomainNameSnippet(e){return this.type!=="feature"?null:y(this._source)&&e.name===this._source.subtypeField?`SubtypeName(${this.snippet})`:`DomainName(${this.snippet}, "${e.name}")`}_getFieldProperty(e,i){let r=this._getDomainDictionary(e);if(r)return r;let s=this._getValueSnippet(e);return new a({profile:this._profile,label:s,description:f(e),snippet:s,icon:Q(e,i),filterDescription:!0})}_getMemberProperty(e){let i=this._getValueSnippet(e);return new a({profile:this._profile,label:i,description:e.name,snippet:i,icon:X(e),filterDescription:!0})}_getDomainDictionary(e){return te(this._source)?y(this._source)&&this._source.subtypeField?this._getSubtypeDomainDictionary(e):E(this._source)&&this._source.typeIdField?this._getFeatureTypeDomainDictionary(e):this._getFieldDomainDictionary(e):null}_getSubtypeDomainDictionary(e){if(!y(this._source))return null;if(!xe(this._source))return e.name===this._source.subtypeField?null:this._getFieldDomainDictionary(e);if(e.name===this._source.subtypeField){let s=this._createDomainDictionary(e);return s.icon="subtype",s.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes,e)),s}if(se(this._source.subtypes,e))return this._getFieldDomainDictionary(e);let i=this._getDomainValuesGroup(this._source.subtypes,e);if(!i)return null;let r=this._createDomainDictionary(e);return r.variables.push(i),r}_getFeatureTypeDomainDictionary(e){if(!E(this._source))return null;if(e.name===this._source.typeIdField){let s=this._createDomainDictionary(e);return s.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.types,e)),s}if(se(this._source.types,e))return this._getFieldDomainDictionary(e);let i=this._getDomainValuesGroup(this._source.types,e);if(!i)return null;let r=this._createDomainDictionary(e);return r.variables.push(i),r}_getFieldDomainDictionary(e){if(!te(this._source))return null;let i=this._source.getFieldDomain(e.name);if(!j(i))return null;let r=this._getCodedValueDomainGroup(i,{code:"domainvalues"}),s=this._createDomainDictionary(e);return s.variables.push(r),s}_getTypeOrSubtypeDomainGroup(e,i){if(j(i.domain))return this._getCodedValueDomainGroup(i.domain,{code:"subtypes"});let r=e?.map(s=>{let o=ee(s)?s.code:s.id;return new a({profile:this._profile,label:`${o}`,description:s.name,snippet:`"${o}"`})})??[];return new l(this._profile,{code:"subtypes"},r)}_getCodedValueDomainGroup(e,i){let r=e.codedValues.map(s=>new a({profile:this._profile,label:`${s.code}`,description:s.name,snippet:`"${s.code}"`,filterDescription:!0}));return new l(this._profile,i,r)}_getDomainValuesGroup(e,i){let r=[];return!e||e.length===0||(e.forEach(s=>{let o=s.domains?.[i.name];if(!o||ve(o)||!j(o))return;let n=f(i),u=this._getCodedValueDomainGroup(o,{code:"domainvaluesfortypeformat",formatValues:{fieldName:n,typeName:s.name}}),c=ee(s)?s.code:s.id,p=`${c}`,C=`"${c}""`,K=new b(this,{profile:this._profile,label:p,snippet:C,description:s.name,declaration:{name:n}});K.variables=[u],r.push(K)}),!r.length)?null:new l(this._profile,{code:"domainvaluesbysubtypes"},r)}_createDomainDictionary(e){let i=this._getValueSnippet(e),r=f(e),s=new b(this,{profile:this._profile,label:i,description:r,snippet:i,icon:"form-dropdown",declaration:{name:e.name}}),o=new l(this._profile,r,[new a({profile:this._profile,label:i,description:"",snippet:i})]);s.variables=[o];let n=this._getSubtypeOrDomainNameSnippet(e);return n&&o.variables.push(new a({profile:this._profile,label:n,description:"",snippet:n})),s}async _getRelationshipsProperty(){if(!this.relationshipsProperties?.exposeRelationships||!this._profile?.supportFeatureSetFunctions)return null;let e=this._source;if(!Ie(e))return null;let i=new l(this._profile,{code:"relationships"}),r=await Promise.all(e.relationships?.map(async s=>{let o=await je(e,s);if(!le(o)||s.relatedTableId===this.relationshipsProperties?.sourceTableId)return null;let n=`FeatureSetByRelationshipName(${this.snippet}, "${s.name}")`;return new w(this,{profile:this._profile,declaration:{definition:o},label:o.title,description:"",nonInteractive:!0},[new a({profile:this._profile,label:n,description:"",snippet:n})],{exposeRelationships:!0,sourceTableId:e.layerId})})??[]);return i.variables=r.filter(F),i.variables.length?i:null}},g=class extends I{constructor(e,i,r,s={exposeRelationships:!0}){super(e,i,s),this.type=r}get title(){return h(this._source)?this._source.title??"":{code:this.type}}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration}}},G=class extends g{constructor(e,i){super(e,i,"feature",{exposeRelationships:!0}),this.type="feature"}async _loadSource(){if(this.loaded)return this._source;try{if(this._source=await fe(this._definition),!this._source)throw new Error("Invalid definition");let e=h(this._source)?this._source.title??"":"";this.variables.push(new l(this._profile,e,[new a({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]));let i=new l(this._profile,{code:"values"});if(this.variables.push(i),Ve(this._source)){let o=`Geometry(${this.snippet})`,n=new a({profile:this._profile,declaration:{name:o},label:o,description:"Geometry",snippet:o,icon:"shapes",filterDescription:!0});i.variables.push(n)}let r=this._source;d(this._source.fields).map(o=>r.fields.find(n=>n.name===o.name)).sort(R(r)).forEach(o=>{i.variables.push(this._getFieldProperty(o))});let s=await this._getRelationshipsProperty();s&&this.variables.push(s)}catch(e){console.error("Error with definition",e,this._definition),this._source=null}finally{this._loaded=!0}return this._source}},W=class extends g{constructor(e,i){super(e,i,"voxel",{exposeRelationships:!1}),this.type="voxel",this._source=null}async _loadSource(){if(this.loaded)return this._source;try{if(!Ae(this._definition))throw new Error("Invalid definition - not a VoxelLayer");if(await this._definition.load(),this._source=this._definition,!this._source)throw new Error("Invalid definition");let e=h(this._source)?this._source.title??"":"";this.variables.push(new l(this._profile,e,[new a({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]));let i=new l(this._profile,{code:"values"});this.variables.push(i);let r=await we(this._source),s=this._source;d(this._source.fields).map(o=>s.fields.find(n=>n.name===o.name)).sort(R(s)).forEach(o=>{i.variables.push(this._getFieldProperty(o,r))})}catch(e){console.error("Error with definition",e,this._definition),this._source=null}finally{this._loaded=!0}return this._source}},U=class extends g{constructor(e,i){super(e,i,"pixel",{exposeRelationships:!1}),this.type="pixel",this._source=null}async _loadSource(){if(this.loaded)return this._source;try{if(!ie(this._definition))throw new Error("Invalid definition - not an ImageryLayer");if(await this._definition.load(),this._source=this._definition,!this._source)throw new Error("Invalid definition");let e=h(this._source)?this._source.title??"":"";this.variables.push(new l(this._profile,e,[new a({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]));let i=new l(this._profile,{code:"values"});if(this.variables.push(i),!ie(this._source))throw new Error("Invalid definition - not an ImageryLayer");(await Ce(this._source)).forEach(r=>{i.variables.push(this._getMemberProperty(r))})}catch(e){console.error("Error with definition",e,this._definition),this._source=null}finally{this._loaded=!0}return this._source}},w=class extends I{constructor(e,i,r=[],s){super(e,i,s),this.featureSetSnippets=r,this.type="featureSet"}get title(){return h(this._source)?this._source.title??"":{code:"featureset"}}async _loadSource(){if(this.loaded)return this._source;try{if(this._source=await fe(this._definition),!this._source)throw new Error("Invalid definition");this.variables.push(new l(this._profile,this.title,this.featureSetSnippets,!0));let e=new l(this._profile,{code:"fields"});this.variables.push(e),e.variables=d(this._source.fields).sort(R(this._source)).map(r=>this._getFieldProperty(r));let i=await this._getRelationshipsProperty();i&&this.variables.push(i)}catch(e){console.error("Error with definition",e,this._definition),this._source=null}finally{this._loaded=!0}return this._source}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,definition:this._definition}}},k=class extends m{constructor(e,i){super(e,i),this.type="featureSetCollection",this._featureSetCollections=null,this._loaded=!1,this._definition=i.declaration?.definition}get informationUrl(){return!this.loaded||!this._featureSetCollections?null:typeof this._featureSetCollections.source!="string"?J(ne(this._featureSetCollections.source)):null}get informationType(){if(!this.loaded||!this._featureSetCollections)return"";if(typeof this._featureSetCollections.source=="string")return this._profile?.intlStrings.featureservice??"featureservice";switch(this._featureSetCollections.source.declaredClass){case"esri.WebMap":return this._profile?.intlStrings.webmap??"webmap";case"esri.WebScene":return this._profile?.intlStrings.webscene??"webscene";default:return this._profile?.intlStrings.map??"map"}}async loadSource(){return F(this._loadPromise)&&L(this._loadPromise)?await this._loadPromise:(this._loadPromise=this._loadSource(),await this._loadPromise)}async _loadSource(){if(this.loaded)return this._featureSetCollections;try{if(this._featureSetCollections=await this._featureSetCollectionsFromDefinition(),!this._featureSetCollections)throw new Error("Invalid definition");let e=typeof this._featureSetCollections.source=="string"?{code:this._featureSetCollections.source.endsWith("FeatureServer")?"featureservice":"mapservice"}:{code:"webmapformat",formatValues:{webMapTitle:ne(this._featureSetCollections.source)?.title||"Untitled map"}},i=new l(this._profile,e,[new a({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]),r=new l(this._profile,{code:"layers"},this._featureSetCollections.layers),s=new l(this._profile,{code:"tables"},this._featureSetCollections.tables);this.variables.push(i,r,s)}catch(e){console.error("Error with definition",e,this._definition),this._featureSetCollections=null}finally{this._loaded=!0}return this._featureSetCollections}async _featureSetCollectionsFromDefinition(){return this._definition?pe(this._definition)?await this._featureSetCollectionFromMap(this._definition):M(this._definition)?await this._featureSetCollectionFromUrl(this._definition.url):ce(this._definition)?await this._featureSetCollectionFromPortalItem(this._definition.portalItem):null:null}async _featureSetCollectionFromMap(e){return De(e)&&await e.loadAll(),await Promise.all(e.allTables.map(async i=>await i.load())),{layers:this._convertWebMapLayersToVariables(e.allLayers),tables:this._convertWebMapLayersToVariables(e.allTables),source:e}}async _featureSetCollectionFromPortalItem(e){let i=new me(e);switch(await i.load(),i.type){case"Web Map":{let r=new be({portalItem:i});return await this._featureSetCollectionFromMap(r)}case"Web Scene":{let r=new ge({portalItem:i});return await this._featureSetCollectionFromMap(r)}case"Feature Service":return await this._featureSetCollectionFromUrl(i.url);default:return console.error("Unsupported portal item",e),null}}async _featureSetCollectionFromUrl(e){let i=e?.replace(/\/featureserver\/[0-9]*/iu,"/FeatureServer");if(i=i?.replace(/\/mapserver\/[0-9]*/iu,"/MapServer"),i=i?.split("?")[0],!i)return null;let r=await Le(i),s=Promise.all(r.layers.map(async c=>{let p=new x({url:`${i}/${c.id}`});return await p.load(),this._createFeatureSetVariable(p)})),o=Promise.all(r.tables.map(async c=>{let p=new x({url:`${i}/${c.id}`});return await p.load(),this._createFeatureSetVariable(p)})),[n,u]=await Promise.all([s,o]);return{layers:n,tables:u,source:i}}_convertWebMapLayersToVariables(e){let i=[];return e.toArray().reverse().forEach(r=>{if(le(r)){i.push(this._createFeatureSetVariable(r,!0));return}}),i}_createFeatureSetVariable(e,i=!1){return new w(this,{profile:this._profile,declaration:{name:e.title??"",definition:e},label:i?e.title:e.sourceJSON.name??e.title,description:"",nonInteractive:!0},this._makeFeatureSetSnippets(e,i))}_makeFeatureSetSnippets(e,i=!1){if(!this._profile?.supportFeatureSetFunctions)return[];if(i){let r=`FeatureSetById(${this.snippet}, "${e.id}")`,s=`FeatureSetByName(${this.snippet}, "${e.title}")`;return[new a({profile:this._profile,label:r,description:"",snippet:r}),new a({profile:this._profile,label:s,description:"",snippet:s})]}else{let r=`FeatureSetById(${this.snippet}, "${e.layerId}")`;return[new a({profile:this._profile,label:r,description:"",snippet:r})]}}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,definition:this._definition}}},oe=class extends b{constructor(e,i,r="en"){super(void 0,{profile:null,declaration:{properties:[]}}),this.definition=e,this.intlStrings=i,this.locale=r,this.variables=[],this._profile=this,this.loadPropertyDeclarations(e?.variables)}get supportFeatureSetFunctions(){return this.definition?.bundles?.includes("data-access")??!1}toEditorProfileDefinition(){return{...this.definition,variables:this.dictionaryVariables.map(e=>e.toProfileVariableDefinition())}}},Ne={locale:"en"},ae=class{constructor(e,i){this.languageId=e,this._apiConfig=i,this._onDidChange=new $,this._modelToProfileMap=new Map,this._modelToApiContextMap=new Map,this._localeToApiLibraryPromiseMap=new Map,this._onModelContextDidChange=new $,this._onDidModelContextChangeTimeout=-1,this.workerHost={getApiLibrary:async r=>await this.getApiLibrary(r)},Z().then(r=>{r.onWillDisposeModel(s=>{this.disposeForModel(s.uri)})})}_fireModelContextDidChange(e){this._onDidModelContextChangeTimeout===-1&&(this._onDidModelContextChangeTimeout=window.setTimeout(()=>{this._onDidModelContextChangeTimeout=-1,this._onModelContextDidChange.fire(e)},0))}_getApiKey(e){return A.isUri(e)||(e=A.parse(e)),e.toString()}get onDidChange(){return this._onDidChange.event}disposeForModel(e){let i=this._getApiKey(e);this._modelToProfileMap.delete(i),this._modelToApiContextMap.delete(i)&&this._fireModelContextDidChange(i)}getEditorProfileForModel(e){return this._modelToProfileMap.get(this._getApiKey(e))}getApiContextForModel(e){return this._modelToApiContextMap.get(this._getApiKey(e))??Ne}updateApiContextForModel(e,i){let r=this._getApiKey(e),s=this._modelToApiContextMap.get(r)??{};this._modelToApiContextMap.set(r,{...s,...i}),this._fireModelContextDidChange(r)}get onModelContextDidChange(){return this._onModelContextDidChange.event}async getApiLibraryForModel(e){let i=this.getApiContextForModel(e),r=this.getApiLibrary(i.locale??"en");return(await H(r,i)).categories}async fetchApiLibrary(e){try{let{apiPath:i,apiPrefix:r}=this._apiConfig,s=B(`${i}/${r}${e}.json`),o=await fetch(s);return o.ok?await o.json():[]}catch{return[]}}async getApiLibrary(e){let i=z(e);return this._localeToApiLibraryPromiseMap.has(i)||this._localeToApiLibraryPromiseMap.set(i,this.fetchApiLibrary(i)),await this._localeToApiLibraryPromiseMap.get(i)??[]}};return{a:le,b:he,c:tt,d:it,e:rt,f:st,g:nt,h:ot,i:at,j:oe,k:ae}},"layers/FeatureLayer","request","portal/PortalItem","WebMap","WebScene","applications/Components/arcadeEditorUtils")
|
|
14
|
+
'${s.name}`),r.push({name:s.name,description:s.name,type:"array",completion:{label:s.name,detail:s.name,insertText:O(s.name,!1),insertTextMode:v.asIs,insertTextFormat:S.PlainText,kind:D.Field}})}),[r,i]}var T=class{constructor(e,i,r){this._profile=e,this._label=i,this.description=r,this.filterDescription=!1}getLabel(){return this._label==null?"":typeof this._label=="string"?q(this._label):V(this._profile?.intlStrings[this._label.code],this._label.formatValues)}getDescription(){return this.description==null?"":typeof this.description=="string"?this.description:V(this._profile?.intlStrings[this.description.code],this.description.formatValues)}passFilter(e){return!e||e.test(this.getLabel())?!0:this.filterDescription&&e.test(this.getDescription())}},_=class extends T{constructor(e){super(e.profile,e.label,e.description??e.declaration?.description),this.declaration=e.declaration??{},this.name=e.declaration?.name??"",this.snippet=e.snippet??"",this.nonInteractive=e.nonInteractive??!1,this.filterDescription=e.filterDescription??!1,this.icon=e.icon}},a=class extends _{constructor(e){super(e),this.type="text",this.isCollection=!1,this.type=e.declaration?.type??"text"}getDescription(){return this.description==null?this._profile?.intlStrings[this.type.toLowerCase()]??"":super.getDescription()}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration}}},N=class extends _{constructor(e){super(e),this.type="array",this.isCollection=!1,this.elementType=e.declaration?.elementType??{type:"number",name:"number"}}getDescription(){return this.description==null?this._profile?.intlStrings[this.type.toLowerCase()]??"":super.getDescription()}toProfileVariableDefinition(){return{type:this.type,elementType:this.elementType,name:"",...this.declaration}}},m=class extends _{constructor(e,i){super(i),this.owner=e,this.isCollection=!0,this._loaded=!0,this.variables=[]}get breadcrumb(){if(this.owner){let e=this.owner.breadcrumb;return e?`${e} / ${this.name}`:this.name}return this.name}get loaded(){return this._loaded}get informationUrl(){return null}get informationType(){return""}},l=class extends T{constructor(e,i,r=[],s=!1){super(e,i),this.variables=r,this.isHeader=s,this.type="group",this.isCollection=!0}passFilter(){return!0}},b=class t extends m{constructor(e,i){super(e,i),this.type="dictionary",this.dictionaryVariables=[],this.loadPropertyDeclarations(i.declaration?.properties),this.snippet&&this.dictionaryVariables.length&&(this.variables=[new l(this._profile,this.snippet,this.dictionaryVariables)])}async loadSource(){}loadPropertyDeclarations(e){this.dictionaryVariables=this.createVariableInstances(e),this.variables=this.dictionaryVariables}createVariableInstances(e){if(!Array.isArray(e))return[];let i=[];return e.forEach(r=>{let s=this.createVariableInstance(r);s&&i.push(s)}),i}createVariableInstance(e){let i=ye(this.snippet,e.name);switch(e.type){case"number":case"text":case"boolean":case"date":case"dateOnly":case"time":case"geometry":case"knowledgeGraph":return new a({profile:this._profile,declaration:e,label:i,snippet:i});case"pixel":return new U(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"voxel":return new W(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"feature":return new G(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"featureSet":return new w(this,{profile:this._profile,declaration:e,label:i,snippet:i},[new a({profile:this._profile,label:i,description:"",snippet:i})]);case"featureSetCollection":return new k(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"dictionary":return new t(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"array":return new N({profile:this._profile,declaration:e,label:i,snippet:i});default:return console.error("Editor profile: Invalid profile variable",e),null}}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,properties:this.dictionaryVariables.map(e=>e.toProfileVariableDefinition())}}},I=class extends m{constructor(e,i,r){super(e,i),this.relationshipsProperties=r,this._source=null,this._loaded=!1,this._definition=i.declaration?.definition}get title(){return h(this._source)?this._source.title??"":""}get url(){return Fe(this._source)?this._source.url??"":""}get informationUrl(){return!this.loaded||!this.url?null:de(this._source)?`${this.url}/${this._source.layerId}`:this.url}get informationType(){return this._profile?.intlStrings.layer??"layer"}async loadSource(){return F(this._loadPromise)&&L(this._loadPromise)?await this._loadPromise:(this._loadPromise=this._loadSource(),await this._loadPromise)}_getValueSnippet(e){return["feature","voxel","pixel"].includes(this.type)?ye(this.snippet,e.name):e.name}_getSubtypeOrDomainNameSnippet(e){return this.type!=="feature"?null:y(this._source)&&e.name===this._source.subtypeField?`SubtypeName(${this.snippet})`:`DomainName(${this.snippet}, "${e.name}")`}_getFieldProperty(e,i){let r=this._getDomainDictionary(e);if(r)return r;let s=this._getValueSnippet(e);return new a({profile:this._profile,label:s,description:f(e),snippet:s,icon:Q(e,i),filterDescription:!0})}_getMemberProperty(e){let i=this._getValueSnippet(e);return new a({profile:this._profile,label:i,description:e.name,snippet:i,icon:X(e),filterDescription:!0})}_getDomainDictionary(e){return te(this._source)?y(this._source)&&this._source.subtypeField?this._getSubtypeDomainDictionary(e):E(this._source)&&this._source.typeIdField?this._getFeatureTypeDomainDictionary(e):this._getFieldDomainDictionary(e):null}_getSubtypeDomainDictionary(e){if(!y(this._source))return null;if(!xe(this._source))return e.name===this._source.subtypeField?null:this._getFieldDomainDictionary(e);if(e.name===this._source.subtypeField){let s=this._createDomainDictionary(e);return s.icon="subtype",s.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes,e)),s}if(se(this._source.subtypes,e))return this._getFieldDomainDictionary(e);let i=this._getDomainValuesGroup(this._source.subtypes,e);if(!i)return null;let r=this._createDomainDictionary(e);return r.variables.push(i),r}_getFeatureTypeDomainDictionary(e){if(!E(this._source))return null;if(e.name===this._source.typeIdField){let s=this._createDomainDictionary(e);return s.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.types,e)),s}if(se(this._source.types,e))return this._getFieldDomainDictionary(e);let i=this._getDomainValuesGroup(this._source.types,e);if(!i)return null;let r=this._createDomainDictionary(e);return r.variables.push(i),r}_getFieldDomainDictionary(e){if(!te(this._source))return null;let i=this._source.getFieldDomain(e.name);if(!j(i))return null;let r=this._getCodedValueDomainGroup(i,{code:"domainvalues"}),s=this._createDomainDictionary(e);return s.variables.push(r),s}_getTypeOrSubtypeDomainGroup(e,i){if(j(i.domain))return this._getCodedValueDomainGroup(i.domain,{code:"subtypes"});let r=e?.map(s=>{let o=ee(s)?s.code:s.id;return new a({profile:this._profile,label:`${o}`,description:s.name,snippet:`"${o}"`})})??[];return new l(this._profile,{code:"subtypes"},r)}_getCodedValueDomainGroup(e,i){let r=e.codedValues.map(s=>new a({profile:this._profile,label:`${s.code}`,description:s.name,snippet:`"${s.code}"`,filterDescription:!0}));return new l(this._profile,i,r)}_getDomainValuesGroup(e,i){let r=[];return!e||e.length===0||(e.forEach(s=>{let o=s.domains?.[i.name];if(!o||ve(o)||!j(o))return;let n=f(i),u=this._getCodedValueDomainGroup(o,{code:"domainvaluesfortypeformat",formatValues:{fieldName:n,typeName:s.name}}),c=ee(s)?s.code:s.id,p=`${c}`,C=`"${c}""`,K=new b(this,{profile:this._profile,label:p,snippet:C,description:s.name,declaration:{name:n}});K.variables=[u],r.push(K)}),!r.length)?null:new l(this._profile,{code:"domainvaluesbysubtypes"},r)}_createDomainDictionary(e){let i=this._getValueSnippet(e),r=f(e),s=new b(this,{profile:this._profile,label:i,description:r,snippet:i,icon:"form-dropdown",declaration:{name:e.name}}),o=new l(this._profile,r,[new a({profile:this._profile,label:i,description:"",snippet:i})]);s.variables=[o];let n=this._getSubtypeOrDomainNameSnippet(e);return n&&o.variables.push(new a({profile:this._profile,label:n,description:"",snippet:n})),s}async _getRelationshipsProperty(){if(!this.relationshipsProperties?.exposeRelationships||!this._profile?.supportFeatureSetFunctions)return null;let e=this._source;if(!Ie(e))return null;let i=new l(this._profile,{code:"relationships"}),r=await Promise.all(e.relationships?.map(async s=>{let o=await je(e,s);if(!le(o)||s.relatedTableId===this.relationshipsProperties?.sourceTableId)return null;let n=`FeatureSetByRelationshipName(${this.snippet}, "${s.name}")`;return new w(this,{profile:this._profile,declaration:{definition:o},label:o.title,description:"",nonInteractive:!0},[new a({profile:this._profile,label:n,description:"",snippet:n})],{exposeRelationships:!0,sourceTableId:e.layerId})})??[]);return i.variables=r.filter(F),i.variables.length?i:null}},g=class extends I{constructor(e,i,r,s={exposeRelationships:!0}){super(e,i,s),this.type=r}get title(){return h(this._source)?this._source.title??"":{code:this.type}}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration}}},G=class extends g{constructor(e,i){super(e,i,"feature",{exposeRelationships:!0}),this.type="feature"}async _loadSource(){if(this.loaded)return this._source;try{if(this._source=await fe(this._definition),!this._source)throw new Error("Invalid definition");let e=h(this._source)?this._source.title??"":"";this.variables.push(new l(this._profile,e,[new a({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]));let i=new l(this._profile,{code:"values"});if(this.variables.push(i),Ve(this._source)){let o=`Geometry(${this.snippet})`,n=new a({profile:this._profile,declaration:{name:o},label:o,description:"Geometry",snippet:o,icon:"shapes",filterDescription:!0});i.variables.push(n)}let r=this._source;d(this._source.fields).map(o=>r.fields.find(n=>n.name===o.name)).sort(R(r)).forEach(o=>{i.variables.push(this._getFieldProperty(o))});let s=await this._getRelationshipsProperty();s&&this.variables.push(s)}catch(e){console.error("Error with definition",e,this._definition),this._source=null}finally{this._loaded=!0}return this._source}},W=class extends g{constructor(e,i){super(e,i,"voxel",{exposeRelationships:!1}),this.type="voxel",this._source=null}async _loadSource(){if(this.loaded)return this._source;try{if(!Ae(this._definition))throw new Error("Invalid definition - not a VoxelLayer");if(await this._definition.load(),this._source=this._definition,!this._source)throw new Error("Invalid definition");let e=h(this._source)?this._source.title??"":"";this.variables.push(new l(this._profile,e,[new a({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]));let i=new l(this._profile,{code:"values"});this.variables.push(i);let r=await we(this._source),s=this._source;d(this._source.fields).map(o=>s.fields.find(n=>n.name===o.name)).sort(R(s)).forEach(o=>{i.variables.push(this._getFieldProperty(o,r))})}catch(e){console.error("Error with definition",e,this._definition),this._source=null}finally{this._loaded=!0}return this._source}},U=class extends g{constructor(e,i){super(e,i,"pixel",{exposeRelationships:!1}),this.type="pixel",this._source=null}async _loadSource(){if(this.loaded)return this._source;try{if(!ie(this._definition))throw new Error("Invalid definition - not an ImageryLayer");if(await this._definition.load(),this._source=this._definition,!this._source)throw new Error("Invalid definition");let e=h(this._source)?this._source.title??"":"";this.variables.push(new l(this._profile,e,[new a({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]));let i=new l(this._profile,{code:"values"});if(this.variables.push(i),!ie(this._source))throw new Error("Invalid definition - not an ImageryLayer");(await Ce(this._source)).forEach(r=>{i.variables.push(this._getMemberProperty(r))})}catch(e){console.error("Error with definition",e,this._definition),this._source=null}finally{this._loaded=!0}return this._source}},w=class extends I{constructor(e,i,r=[],s){super(e,i,s),this.featureSetSnippets=r,this.type="featureSet"}get title(){return h(this._source)?this._source.title??"":{code:"featureset"}}async _loadSource(){if(this.loaded)return this._source;try{if(this._source=await fe(this._definition),!this._source)throw new Error("Invalid definition");this.variables.push(new l(this._profile,this.title,this.featureSetSnippets,!0));let e=new l(this._profile,{code:"fields"});this.variables.push(e),e.variables=d(this._source.fields).sort(R(this._source)).map(r=>this._getFieldProperty(r));let i=await this._getRelationshipsProperty();i&&this.variables.push(i)}catch(e){console.error("Error with definition",e,this._definition),this._source=null}finally{this._loaded=!0}return this._source}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,definition:this._definition}}},k=class extends m{constructor(e,i){super(e,i),this.type="featureSetCollection",this._featureSetCollections=null,this._loaded=!1,this._definition=i.declaration?.definition}get informationUrl(){return!this.loaded||!this._featureSetCollections?null:typeof this._featureSetCollections.source!="string"?J(ne(this._featureSetCollections.source)):null}get informationType(){if(!this.loaded||!this._featureSetCollections)return"";if(typeof this._featureSetCollections.source=="string")return this._profile?.intlStrings.featureservice??"featureservice";switch(this._featureSetCollections.source.declaredClass){case"esri.WebMap":return this._profile?.intlStrings.webmap??"webmap";case"esri.WebScene":return this._profile?.intlStrings.webscene??"webscene";default:return this._profile?.intlStrings.map??"map"}}async loadSource(){return F(this._loadPromise)&&L(this._loadPromise)?await this._loadPromise:(this._loadPromise=this._loadSource(),await this._loadPromise)}async _loadSource(){if(this.loaded)return this._featureSetCollections;try{if(this._featureSetCollections=await this._featureSetCollectionsFromDefinition(),!this._featureSetCollections)throw new Error("Invalid definition");let e=typeof this._featureSetCollections.source=="string"?{code:this._featureSetCollections.source.endsWith("FeatureServer")?"featureservice":"mapservice"}:{code:"webmapformat",formatValues:{webMapTitle:ne(this._featureSetCollections.source)?.title||"Untitled map"}},i=new l(this._profile,e,[new a({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]),r=new l(this._profile,{code:"layers"},this._featureSetCollections.layers),s=new l(this._profile,{code:"tables"},this._featureSetCollections.tables);this.variables.push(i,r,s)}catch(e){console.error("Error with definition",e,this._definition),this._featureSetCollections=null}finally{this._loaded=!0}return this._featureSetCollections}async _featureSetCollectionsFromDefinition(){return this._definition?pe(this._definition)?await this._featureSetCollectionFromMap(this._definition):M(this._definition)?await this._featureSetCollectionFromUrl(this._definition.url):ce(this._definition)?await this._featureSetCollectionFromPortalItem(this._definition.portalItem):null:null}async _featureSetCollectionFromMap(e){return De(e)&&await e.loadAll(),await Promise.all(e.allTables.map(async i=>await i.load())),{layers:this._convertWebMapLayersToVariables(e.allLayers),tables:this._convertWebMapLayersToVariables(e.allTables),source:e}}async _featureSetCollectionFromPortalItem(e){let i=new me(e);switch(await i.load(),i.type){case"Web Map":{let r=new be({portalItem:i});return await this._featureSetCollectionFromMap(r)}case"Web Scene":{let r=new ge({portalItem:i});return await this._featureSetCollectionFromMap(r)}case"Feature Service":return await this._featureSetCollectionFromUrl(i.url);default:return console.error("Unsupported portal item",e),null}}async _featureSetCollectionFromUrl(e){let i=e?.replace(/\/featureserver\/[0-9]*/iu,"/FeatureServer");if(i=i?.replace(/\/mapserver\/[0-9]*/iu,"/MapServer"),i=i?.split("?")[0],!i)return null;let r=await Le(i),s=Promise.all(r.layers.map(async c=>{let p=new x({url:`${i}/${c.id}`});return await p.load(),this._createFeatureSetVariable(p)})),o=Promise.all(r.tables.map(async c=>{let p=new x({url:`${i}/${c.id}`});return await p.load(),this._createFeatureSetVariable(p)})),[n,u]=await Promise.all([s,o]);return{layers:n,tables:u,source:i}}_convertWebMapLayersToVariables(e){let i=[];return e.toArray().reverse().forEach(r=>{if(le(r)){i.push(this._createFeatureSetVariable(r,!0));return}}),i}_createFeatureSetVariable(e,i=!1){return new w(this,{profile:this._profile,declaration:{name:e.title??"",definition:e},label:i?e.title:e.sourceJSON.name??e.title,description:"",nonInteractive:!0},this._makeFeatureSetSnippets(e,i))}_makeFeatureSetSnippets(e,i=!1){if(!this._profile?.supportFeatureSetFunctions)return[];if(i){let r=`FeatureSetById(${this.snippet}, "${e.id}")`,s=`FeatureSetByName(${this.snippet}, "${e.title}")`;return[new a({profile:this._profile,label:r,description:"",snippet:r}),new a({profile:this._profile,label:s,description:"",snippet:s})]}else{let r=`FeatureSetById(${this.snippet}, "${e.layerId}")`;return[new a({profile:this._profile,label:r,description:"",snippet:r})]}}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,definition:this._definition}}},oe=class extends b{constructor(e,i,r="en"){super(void 0,{profile:null,declaration:{properties:[]}}),this.definition=e,this.intlStrings=i,this.locale=r,this.variables=[],this._profile=this,this.loadPropertyDeclarations(e?.variables)}get supportFeatureSetFunctions(){return this.definition?.bundles?.includes("data-access")??!1}toEditorProfileDefinition(){return{...this.definition,variables:this.dictionaryVariables.map(e=>e.toProfileVariableDefinition())}}},Ne={locale:"en"},ae=class{constructor(e,i){this.languageId=e,this._apiConfig=i,this._onDidChange=new $,this._modelToProfileMap=new Map,this._modelToApiContextMap=new Map,this._localeToApiLibraryPromiseMap=new Map,this._onModelContextDidChange=new $,this._onDidModelContextChangeTimeout=-1,this.workerHost={getApiLibrary:async r=>await this.getApiLibrary(r)},Y().then(r=>{r.onWillDisposeModel(s=>{this.disposeForModel(s.uri)})})}_fireModelContextDidChange(e){this._onDidModelContextChangeTimeout===-1&&(this._onDidModelContextChangeTimeout=window.setTimeout(()=>{this._onDidModelContextChangeTimeout=-1,this._onModelContextDidChange.fire(e)},0))}_getApiKey(e){return A.isUri(e)||(e=A.parse(e)),e.toString()}get onDidChange(){return this._onDidChange.event}disposeForModel(e){let i=this._getApiKey(e);this._modelToProfileMap.delete(i),this._modelToApiContextMap.delete(i)&&this._fireModelContextDidChange(i)}getEditorProfileForModel(e){return this._modelToProfileMap.get(this._getApiKey(e))}getApiContextForModel(e){return this._modelToApiContextMap.get(this._getApiKey(e))??Ne}updateApiContextForModel(e,i){let r=this._getApiKey(e),s=this._modelToApiContextMap.get(r)??{};this._modelToApiContextMap.set(r,{...s,...i}),this._fireModelContextDidChange(r)}get onModelContextDidChange(){return this._onModelContextDidChange.event}async getApiLibraryForModel(e){let i=this.getApiContextForModel(e),r=this.getApiLibrary(i.locale??"en");return(await H(r,i)).categories}async fetchApiLibrary(e){try{let{apiPath:i,apiPrefix:r}=this._apiConfig,s=B(`${i}/${r}${e}.json`),o=await fetch(s);return o.ok?await o.json():[]}catch{return[]}}async getApiLibrary(e){let i=z(e);return this._localeToApiLibraryPromiseMap.has(i)||this._localeToApiLibraryPromiseMap.set(i,this.fetchApiLibrary(i)),await this._localeToApiLibraryPromiseMap.get(i)??[]}};return{a:le,b:he,c:tt,d:it,e:rt,f:st,g:nt,h:ot,i:at,j:oe,k:ae}},"layers/FeatureLayer","request","portal/PortalItem","WebMap","WebScene","applications/Components/arcadeEditorUtils")
|
|
@@ -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 f}from"./
|
|
3
|
+
v5.0.0-next.86 */
|
|
4
|
+
import{a as f}from"./BTHHVPUO.js";import"./JPLSYGHT.js";import{e as u}from"./A7GC2RAP.js";import{F as d,G as h,K as m,h as c,j as i,n as r,q as n}from"./DD6ZRT43.js";import"./VYCA3AJT.js";import"./MCGQ6KRV.js";var b=c`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2);word-break:break-word}}`;function g(a){a.key==="Enter"&&a.stopPropagation()}var o=class extends h{constructor(){super(...arguments),this._beforeBack=async()=>{this.removeLastPanelRenderer(),this._filterValue=""},this.messages=f(),this._filterValue="",this._flowItemRenderers=[],this._mode="profile",this._mutationCounter=1,this.loading=!1,this.closed=!1,this.arcgisClose=r({bubbles:!1}),this.arcgisItemSelected=r({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mode:16,_mutationCounter:16,loading:5,modelId:1,closed:5,variable:0}}static{this.styles=b}load(){this._variableChanged()}willUpdate(e){e.has("modelId")&&(this._flowItemRenderers=[]),e.has("variable")&&this._variableChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}_variableChanged(){this._mode=this.variable?.type==="featureSet"?"featureSet":"profile"}addPanelRenderer(e){this._flowItemRenderers=[...this._flowItemRenderers,e]}removeLastPanelRenderer(){this._flowItemRenderers=this._flowItemRenderers.slice(0,-1)}_isMode(e){return this._mode===e}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{u(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e.currentTarget.value}_emitClose(){this.arcgisClose.emit()}_backToTop(){this._flowItemRenderers=[]}_emitItemSelected(e,t){if(t.nonInteractive)return;let s=e;(!s.key||s.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(t.snippet))}_showCollectionPanel(e,t){e.stopPropagation(),this.addPanelRenderer(s=>this.renderCollectionBasedVariable(t,!1,s))}_getHeadingForCollection(e){if(!e)return"";switch(this._mode){case"profile":return this.messages.profilevariables??"";case"featureSet":return this.messages.fields??""}}_getDescriptionForCollection(e){if(!e)return"";switch(this._mode){case"profile":return e.breadcrumb;case"featureSet":return e.variables[0]?.getLabel()??""}}renderCollectionBasedVariable(e,t=!1,s=!1){if(!e)return null;let l=this.loading;return!l&&!e.loaded&&(e.loadSource().then(()=>setTimeout(()=>{this._mutationCounter+=1})).catch(()=>{console.error("Error loading collection"),l=!1}),l=!0),i`<calcite-flow-item heading-level=2 .heading=${this._getHeadingForCollection(e)} .description=${this._getDescriptionForCollection(e)} .beforeBack=${this._beforeBack} closable @calciteFlowItemClose=${this._emitClose} .selected=${s}><calcite-action slot=header-actions-end .text=${this.messages.backtotop??""} scale=m .hidden=${t||this._isMode("featureSet")} icon=chevrons-left icon-flip-rtl @click=${this._backToTop}></calcite-action><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m .label=${this.messages.filterthevariablesbyname??""} name=variable-filter></calcite-input>${l?i`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??""}></calcite-loader>`:i`<calcite-list label=variables>${this.renderEditorVariables(e)}</calcite-list>`}</calcite-flow-item>`}renderEditorVariables(e){let t=n(this._filterValue),s=e.variables.filter(l=>l.passFilter(t));return s.length?s.map(l=>this.renderEditorVariable(l)):i`<div class="notice-container">${this.messages.noitems}</div>`}renderEditorVariable(e){switch(e.type){case"group":return this._isMode("featureSet")&&e.isHeader?i`<calcite-list-item-group .heading=${e.getLabel()}></calcite-list-item-group>`:this._isMode("featureSet")&&e._label?.code==="fields"?this.renderEditorVariables(e):i`<calcite-list-item-group .heading=${e.getLabel()}>${this.renderEditorVariables(e)}</calcite-list-item-group>`;default:return i`<calcite-list-item .label=${e.getLabel()} .description=${e.getDescription()} @calciteListItemSelect=${t=>this._emitItemSelected(t,e)} @keydown=${t=>this._emitItemSelected(t,e)}>${e.isCollection?i`<calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${t=>this._showCollectionPanel(t,e)} @keydown=${g}></calcite-action>`:null}${e.icon?i`<calcite-icon .icon=${e.icon} scale=s slot=content-start></calcite-icon>`:null}</calcite-list-item>`}}render(){return this.closed?null:!this.loading&&this.variable?.loaded&&!this.variable?.variables.length?i`<calcite-flow><calcite-flow-item heading-level=2 .heading=${this.messages.profilevariables} closable @calciteFlowItemClose=${this._emitClose}><div class="notice-container">${this.messages.noprofilevariablesmessage}</div></calcite-flow-item></calcite-flow>`:i`<calcite-flow ${d(this.flowFocusHandler)}>${this.renderCollectionBasedVariable(this.variable,!0,this._flowItemRenderers.length===0)}${this._flowItemRenderers.map((e,t,s)=>e(t===s.length-1))}</calcite-flow>`}};m("arcgis-editor-variables",o);export{o as ArcgisEditorVariables};
|
|
@@ -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,b}from"./
|
|
3
|
+
v5.0.0-next.86 */
|
|
4
|
+
import{a,b}from"./CEE3ZJUA.js";import"./ZK3HCKLO.js";import"./MCGQ6KRV.js";export{a as conf,b as language};
|