@arcgis/coding-components 5.0.0-next.84 → 5.0.0-next.85
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/{3PSCA6KH.js → 25VXBBBZ.js} +2 -2
- package/dist/cdn/{44GQ5ENQ.js → 32NQLYR2.js} +2 -2
- package/dist/cdn/{GMJZSPF2.js → 35YD3PEM.js} +2 -2
- package/dist/cdn/{DB7JAMFD.js → 37AUX6BH.js} +2 -2
- package/dist/cdn/{MCREPNON.js → 3OOLHAJG.js} +2 -2
- package/dist/cdn/{WJI37X25.js → 4IBN3AWX.js} +2 -2
- package/dist/cdn/{HBCKUC46.js → 53I2FYLO.js} +2 -2
- package/dist/cdn/{G2JKJDVX.js → 6G4QUTPJ.js} +2 -2
- package/dist/cdn/{KJYFRF6Z.js → 74T7ILOU.js} +1 -1
- package/dist/cdn/{MTMFT4XD.js → 7M55S6BG.js} +2 -2
- package/dist/cdn/B5YE5PVQ.js +4 -0
- package/dist/cdn/{257CE7RC.js → CUGN7GXB.js} +2 -2
- package/dist/cdn/{3QR7YQXI.js → DABFREVT.js} +2 -2
- package/dist/cdn/{FERNZR6V.js → DE3RLYZ4.js} +1 -1
- package/dist/cdn/{OQUYSN7I.js → DYPHLMKE.js} +3 -3
- package/dist/cdn/{TYMP4EQA.js → EAANPCRC.js} +2 -2
- package/dist/cdn/{RFJMS2XV.js → EVBLYBC7.js} +2 -2
- package/dist/cdn/{WJ6J6EFT.js → FOXTUCKL.js} +2 -2
- package/dist/cdn/{KDSG4AQ2.js → FVQB3CEW.js} +1 -1
- package/dist/cdn/{TE762HZP.js → GRS6C55W.js} +1 -1
- package/dist/cdn/{6Y5QJLC2.js → GUDZ22ZD.js} +1 -1
- package/dist/cdn/{HB2ES4YL.js → HLIW7CDL.js} +2 -2
- package/dist/cdn/{YCRGKFVI.js → HPFQALY5.js} +2 -2
- package/dist/cdn/{5NR5BXSU.js → IGOB76XZ.js} +2 -2
- package/dist/cdn/{LNCKWEAE.js → IKTBURW4.js} +2 -2
- package/dist/cdn/{YJM4YZTR.js → IM4FYC35.js} +2 -2
- package/dist/cdn/{FMGFKQ7C.js → JU3LESVV.js} +2 -2
- package/dist/cdn/{YE3Q4QRS.js → LF4MJENP.js} +2 -2
- package/dist/cdn/{ARAAJHTT.js → MI66XE4U.js} +4 -4
- package/dist/cdn/{NYBDXWA5.js → NWITL3PQ.js} +2 -2
- package/dist/cdn/{SNIPKZ5D.js → ODR3ZR5F.js} +1 -1
- package/dist/cdn/{7JSSJVPI.js → ON2IF5BP.js} +2 -2
- package/dist/cdn/{BQLRNY6M.js → P5TRO73S.js} +2 -2
- package/dist/cdn/{JOZPVCEH.js → PEEHLO66.js} +1 -1
- package/dist/cdn/{5V3AU2MS.js → PVWJMXVJ.js} +2 -2
- package/dist/cdn/{PUM6S2YR.js → Q4RKFGO6.js} +2 -2
- package/dist/cdn/{U3UR7PMI.js → QHEHI5IV.js} +2 -2
- package/dist/cdn/{S25WEGDV.js → QV67PL6P.js} +2 -2
- package/dist/cdn/{VI5BXG53.js → QZIF6LAS.js} +2 -2
- package/dist/cdn/{5KWWFBRA.js → RGPBIODJ.js} +2 -2
- package/dist/cdn/{6VMHDHOO.js → SHTZ4O47.js} +2 -2
- package/dist/cdn/{I6JGARO3.js → SLHSPJOX.js} +2 -2
- package/dist/cdn/{W5KQ34S3.js → T2L462P3.js} +2 -2
- package/dist/cdn/{3LJIRG7F.js → TLFOFTHI.js} +2 -2
- package/dist/cdn/{JFCDQ5Y5.js → VPLREMBT.js} +2 -2
- package/dist/cdn/{NR6DB7IX.js → WJJKLFSO.js} +2 -2
- package/dist/cdn/{TJOEBZIJ.js → YRBXVOZH.js} +1 -1
- package/dist/cdn/{R64NEFA4.js → ZF3VYMGU.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,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.85 */
|
|
4
|
+
import{a as Q,b as X,c as Z,d,e as f}from"./ODR3ZR5F.js";import{b as J}from"./QHEHI5IV.js";import{a as Y}from"./DYPHLMKE.js";import{b as D,c as S,d as v,e as H}from"./FVQB3CEW.js";import{i as z}from"./74T7ILOU.js";import{L as B,r as q,t as V}from"./IM4FYC35.js";import{Gl as $,Pl as A}from"./TLFOFTHI.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.85 */
|
|
4
|
+
import{a as f}from"./PVWJMXVJ.js";import{a as _}from"./SHTZ4O47.js";import"./IKTBURW4.js";import e from"./IGOB76XZ.js";import"./7M55S6BG.js";import b from"./SLHSPJOX.js";import a from"./MI66XE4U.js";import"./GRS6C55W.js";import"./ODR3ZR5F.js";import"./QHEHI5IV.js";import"./DYPHLMKE.js";import"./FVQB3CEW.js";import"./HLIW7CDL.js";import"./74T7ILOU.js";import{E as l,F as p,G as h,H as o,K as g,h as n,j as t,n as s,s as c,u as d}from"./IM4FYC35.js";import"./DE3RLYZ4.js";import"./TLFOFTHI.js";import"./PEEHLO66.js";export default $arcgis.t(([,a,{b:u}])=>{var m=n`@layer{arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border)!important;box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%}}`,r=class extends h{constructor(){super(...arguments),this._codeEditorElt=l(),this._disposables=[],this.messages=_(),this._modelId=c(),this._preparing=!1,this.sideActionBarExpanded=!1,this.script="",this.hideSideBar=!1,this.arcgisDiagnosticsChange=s({bubbles:!1}),this.arcgisScriptChange=s({bubbles:!1})}static{this.properties={_activeAction:16,_apiLibrary:16,_editorProfile:16,_preparing:16,sideActionBarExpanded:16,profile:0,script:1,hideSideBar:5}}static{this.shadowRootOptions=d}static{this.styles=[m,f]}async setFocus(){await this._codeEditorElt.value?.setFocus()}async load(){await this._updateEditorProfile().catch(console.error)}willUpdate(i){(i.has("messages")||i.has("profile"))&&this._updateDataModelDeps()}async loaded(){let i=await u();this._disposables.push(i.onDiagnosticsChange(e=>!this._preparing&&this.arcgisDiagnosticsChange.emit(e.diagnostics)))}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}async _updateEditorProfile(){this._preparing=!0;try{await a.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale}),this._editorProfile=a.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._preparing=!1}}_setActiveAction(i){if(this._activeAction===i){this._activeAction=void 0;return}this._activeAction=i}_handleActionClick(i){let e=i.target;this._setActiveAction(e.dataset.panelName)}_insertAsSnippet(i){this._codeEditorElt.value?.insertSnippet(i.detail).catch(console.error)}_insertAsText(i){this._codeEditorElt.value?.insertText(i.detail.replaceAll('"',"'")).catch(console.error)}async _updateApiLibrary(){this._apiLibrary=await a.getApiLibraryForModel(this._modelId)}_onCodeEditorValueChange(i){i.stopPropagation(),this.script=i.detail,this.arcgisScriptChange.emit(i.detail)}_getFeatureSetVariable(){let i,e=a.getEditorProfileForModel(this._modelId);return e?.variables?.length&&e?.variables?.[0]?.type!=="featureSet"?console.error("encountered unexpected editor profile"):i=e?.variables?.[0],i}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}render(){let i=this._getFeatureSetVariable();return t`<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><arcgis-code-editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script??""} @arcgisValueChange=${this._onCodeEditorValueChange} ${p(this._codeEditorElt)}></arcgis-code-editor></div>${!this.hideSideBar&&t`<arcgis-editor-variables .variable=${i} .closed=${this._activeAction!=="fields"} class=${o(this._activeAction==="fields"&&"code-editor-side-panel flex-panel border-inline-start")} .loading=${this._preparing} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${()=>this._setActiveAction(void 0)} data-panel-name=none></arcgis-editor-variables>`||""}${!this.hideSideBar&&t`<arcgis-language-api-panel class=${o(this._activeAction==="functions"&&"code-editor-side-panel flex-panel border-inline-start")} .closed=${this._activeAction!=="functions"} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${()=>this._setActiveAction(void 0)} .loading=${this._preparing} .apiLibrary=${this._apiLibrary} data-panel-name=none hide-documentation-actions .languageId=${a.languageId}></arcgis-language-api-panel>`||""}${!this.hideSideBar&&t`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action id=fields-action .text=${this.messages.fields??"Fields"} icon=profile-variables .active=${this._activeAction==="fields"} data-panel-name=fields @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded&&t`<calcite-tooltip reference-element=fields-action><span>${this.messages.fields??"Fields"}</span></calcite-tooltip>`||""}<calcite-action id=functions-action .text=${this.messages.functions??"Functions"} icon=function .active=${this._activeAction==="functions"} data-panel-name=functions @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded&&t`<calcite-tooltip reference-element=functions-action><span>${this.messages.functions??"Functions"}</span></calcite-tooltip>`||""}</calcite-action-bar>`||""}</div>`}};g("arcgis-sql-expression-editor",r);return r},a,b,e)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.85 */
|
|
4
4
|
var a="cube";function u(e,t){switch(e.type){case"oid":return"key";case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":return"number";case"global-id":case"guid":return"key";case"string":if(t?.some(n=>n.name===e.name&&n.type==="array")){let n=t?.find(c=>c.name===e.name);return n&&r(n)&&r(n)?s(n.elementType.type):"double-float-set"}return"string";case"date":return"date-time";case"date-only":return"calendar";case"time-only":return"clock";case"timestamp-offset":return"time-zone";default:return"cube"}}function i(e){switch(e.type){case"number":return"number";case"text":return"string";case"array":return r(e)?s(e.elementType.type):a;case"date":return"date-time";case"dateOnly":return"calendar";case"time":return"clock";default:return a}}function l(e){switch(e.type){case"small-integer":case"integer":case"big-integer":case"single":case"double":case"long":case"oid":return"number";case"global-id":case"guid":case"string":return"text";case"date":return"date";case"date-only":return"dateOnly";case"time-only":return"time";default:return"text"}}function o(e){return(e??[]).filter(t=>{switch(t.type){case"string":case"small-integer":case"integer":case"big-integer":case"single":case"double":case"long":case"date":case"date-only":case"time-only":case"timestamp-offset":case"oid":case"guid":case"global-id":return!0;default:return!1}})}function d(e){return e.alias||e.name}function r(e){if(typeof e=="object"&&e!==null&&"elementType"in e){let t=e.elementType;return typeof t=="object"&&t!==null&&"type"in t&&typeof t.type=="string"}return!1}function s(e){switch(e){case"text":return"string-set";case"number":return"double-float-set";default:return a}}export{u as a,i as b,l as c,o as d,d as e};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import"./
|
|
3
|
+
v5.0.0-next.85 */
|
|
4
|
+
import"./PEEHLO66.js";var e={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},t={defaultToken:"",tokenPostfix:".css",ws:`[
|
|
5
5
|
\r\f]*`,identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},{include:"@strings"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},[`[^)\r
|
|
6
6
|
]+`,"string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}};export{e as conf,t as language};
|
|
@@ -1,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.85 */
|
|
4
|
+
import{a as f}from"./SHTZ4O47.js";import"./IKTBURW4.js";import{e as u}from"./74T7ILOU.js";import{F as d,G as h,K as m,h as c,j as i,n as r,q as n}from"./IM4FYC35.js";import"./DE3RLYZ4.js";import"./PEEHLO66.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.
|
|
3
|
+
v5.0.0-next.85 */
|
|
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,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{h as o}from"./
|
|
3
|
+
v5.0.0-next.85 */
|
|
4
|
+
import{h as o}from"./IM4FYC35.js";var i=o`@layer{arcgis-arcade-editor,arcgis-sql-expression-editor{--arcgis-coding-components-border: 1px solid var(--calcite-color-border-3);--arcgis-coding-components-background-color: var(--calcite-color-foreground-1);--arcgis-coding-components-side-action-bar-max-w: 25%;--arcgis-coding-components-code-editor-side-panel-w: 600px;--arcgis-coding-components-code-editor-side-panel-max-w: 45%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border)!important;box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border)!important;box-sizing:border-box}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.code-editor-side-panel{max-width:var(--arcgis-coding-components-code-editor-side-panel-max-w);width:var(--arcgis-coding-components-code-editor-side-panel-w)}.code-editor-side-panel calcite-flow{height:100%}}}`;export{i as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as t,b as e}from"./
|
|
3
|
+
v5.0.0-next.85 */
|
|
4
|
+
import{a as t,b as e}from"./QZIF6LAS.js";import"./TLFOFTHI.js";import"./PEEHLO66.js";var i=t,o={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{i as conf,o as language};
|
|
@@ -1,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.85 */
|
|
4
|
+
import{f as d}from"./FVQB3CEW.js";import{q as c}from"./IM4FYC35.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,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{Fl as a,Gl as b,Hl as c,Il as d,Jl as e,Kl as f,Ll as g,Ml as h,Nl as i,Ol as j,Pl as k,Ql as l,Rl as m,Sl as n}from"./
|
|
3
|
+
v5.0.0-next.85 */
|
|
4
|
+
import{Fl as a,Gl as b,Hl as c,Il as d,Jl as e,Kl as f,Ll as g,Ml as h,Nl as i,Ol as j,Pl as k,Ql as l,Rl as m,Sl as n}from"./TLFOFTHI.js";import"./PEEHLO66.js";export{a as CancellationTokenSource,b as Emitter,c as KeyCode,d as KeyMod,i as MarkerSeverity,j as MarkerTag,e as Position,f as Range,g as Selection,h as SelectionDirection,l as Token,k as Uri,m as editor,n as languages};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{Tl as s}from"./
|
|
3
|
+
v5.0.0-next.85 */
|
|
4
|
+
import{Tl as s}from"./TLFOFTHI.js";var c=Object.defineProperty,p=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,a=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of g(e))!l.call(t,n)&&n!==o&&c(t,n,{get:()=>e[n],enumerable:!(i=p(e,n))||i.enumerable});return t},d=(t,e,o)=>(a(t,e,"default"),o&&a(o,e,"default")),r={};d(r,s);var m={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:r.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:r.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:r.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:r.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},x={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{m as a,x as b};
|
|
@@ -1,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 from"./
|
|
3
|
+
v5.0.0-next.85 */
|
|
4
|
+
import a from"./MI66XE4U.js";import{b as f,c,d as p}from"./FVQB3CEW.js";import{f as h,g as x}from"./74T7ILOU.js";import{L as u}from"./IM4FYC35.js";export default $arcgis.t(([{getDeclaredPixelMembers:C},{b:v,c:g,d:T,e:M,f:F,g:m,h:P,i:k,j:A,k:I}])=>{async function S(e){let{apiVersion:r,bundles:t,hiddenApiItems:a}=e.toEditorProfileDefinition(),i=await V(e.dictionaryVariables);return{apiVersion:r,bundles:t,variables:i,hiddenApiItems:a?.map(n=>n.toLowerCase())}}async function V(e,r=f.Variable){return await Promise.all(e.map(async t=>{switch(t.type){case"dictionary":return await _(t,r);case"pixel":return await K(t,r);case"voxel":case"feature":return await j(t,r);default:return $(t,r)}}))}function $(e,r){let{name:t,type:a}=e,i=e.getDescription();return{name:t,description:i,type:a,completion:{label:t,detail:t,insertText:t,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r,documentation:{kind:"markdown",value:i}}}}async function j(e,r){let t=await e.loadSource(),{name:a}=e,i=e.getDescription(),n={label:a,detail:a,insertText:a,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r},s={name:a,description:i,type:"dictionary",properties:[],completion:n};if(!t)return s;let[o,l]=P(t.fields,i,!0);return s.properties=o,n.documentation={kind:"markdown",value:l},s}async function K(e,r){let t=await e.loadSource(),a=e.toProfileVariableDefinition();if(a.type!=="pixel")throw new Error("Incorrect definition passed to pixel variable");let{name:i}=e,n=e.getDescription(),s={label:i,detail:i,insertText:i,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:r},o={name:i,description:n,type:"dictionary",properties:[],completion:s};if(!t||!a.definition)return o;let l=await C(t),[E,L]=k(l,n);return o.properties=E,s.documentation={kind:"markdown",value:L},o}async function _(e,r){let{name:t,dictionaryVariables:a}=e,i=e.getDescription(),n=a.reduce((s,o)=>{s!==""&&(s+=`
|
|
5
5
|
|
|
6
6
|
`),s+=`**${o.name}**
|
|
7
7
|
${o.type}`;let l=o.getDescription();return l&&(s+=`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{b as r}from"./
|
|
3
|
+
v5.0.0-next.85 */
|
|
4
|
+
import{b as r}from"./IKTBURW4.js";import{L as o}from"./IM4FYC35.js";var s=r(o);export{s as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import a from"./
|
|
3
|
+
v5.0.0-next.85 */
|
|
4
|
+
import a from"./MI66XE4U.js";import{b as m,c as y,d as h}from"./FVQB3CEW.js";import{g as f}from"./74T7ILOU.js";import{L as u}from"./IM4FYC35.js";export default $arcgis.t(([{e:b,g:d,h:g,j:F,k:M}])=>{var A=o=>{let e=o.variables[0],i=e&&e.type==="featureSet"?w(e):void 0,{apiVersion:t,bundles:a,hiddenApiItems:s}=o.toEditorProfileDefinition();return{apiVersion:t,bundles:a,variables:i?[i]:[],hiddenApiItems:s?.map(r=>r.toLowerCase())}};function w(o){let{name:e}=o,i=o.getDescription(),{definition:t}=o.toProfileVariableDefinition(),a={label:e,detail:e,insertText:e,insertTextMode:h.asIs,insertTextFormat:y.PlainText,kind:m.Field},s={name:e,description:i,type:"dictionary",properties:[],completion:a};if(!t||!("fields"in t))return s;let[r,l]=g(t.fields,i);return s.properties=r,a.documentation={kind:"markdown",value:l},s}var P={id:"field-calculation",variables:[{name:"$layer",type:"featureSet",description:"The layer being calculated."}]};function T(){return P}function I(o){if(!d(o))return;let e=T();if(!e)return;let i={variables:[],hiddenApiItems:o.hiddenApiItems?.map(t=>t.toLowerCase())};return e.variables.forEach(t=>{if(o.disabledVariables?.includes(t.name))return;let a=o.definitions[t.name];switch(t.type){case"featureSet":return b(a)?i.variables.push({...t,type:t.type,definition:a}):void 0;default:throw Error(`sdkVariable type not supported (yet) type: ${t.type}`)}}),i}var x="arcgis-sql-expression",p=class extends M{constructor(){super(x,{apiPath:"./assets/sql-language/api",apiPrefix:"sql-api.t9n."}),this._languageId=x,this._layerMap=new Map}updateFeatureLayerForModel(e,i){let t=this._getApiKey(e);this._layerMap.set(t,i)}getFeatureLayerForModel(e){let i=this._getApiKey(e);return this._layerMap.get(i)}async setProfileForModel(e,i,t={locale:"en"}){d(i)&&(i=I(i));let a=await f(t.locale,u("./assets/editor-profile/t9n"),"messages.");if(!a)throw new Error(`Failed to load the language bundle for ${t.locale}`);this.disposeForModel(e);let s=this._getApiKey(e),r=new F(i,a);this._modelToProfileMap.set(s,r);let l=A(r);this.updateApiContextForModel(e,{locale:t.locale,profile:l});let c=i?.variables?.find(v=>v.name==="$layer");c&&this.updateFeatureLayerForModel(e,c.definition)}},n=new p,k={setProfileForModel:n.setProfileForModel.bind(n),getApiLibraryForModel:n.getApiLibraryForModel.bind(n)};return n},a)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{b,c as r,d as _}from"./
|
|
3
|
+
v5.0.0-next.85 */
|
|
4
|
+
import{b,c as r,d as _}from"./6G4QUTPJ.js";import{a as v}from"./YRBXVOZH.js";import{a as p}from"./SHTZ4O47.js";import"./IKTBURW4.js";import{a as f}from"./QHEHI5IV.js";import"./DYPHLMKE.js";import"./FVQB3CEW.js";import"./HLIW7CDL.js";import{d as h,e as m}from"./74T7ILOU.js";import{F as l,G as d,K as u,h as g,j as s,l as c,n as a}from"./IM4FYC35.js";import"./DE3RLYZ4.js";import"./TLFOFTHI.js";import"./PEEHLO66.js";function S(o){return!Array.isArray(o)||!o.length?!1:Array.isArray(o[0].suggestions)}var $=g`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,n=class extends d{constructor(){super(...arguments),this._beforeBack=async()=>{this._selectedSuggestion=void 0},this.messages=p(),this._colorizeStyle="",this._filterValue="",this.closed=!1,this.arcgisClose=a({bubbles:!1}),this.arcgisItemSelected=a({bubbles:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedSuggestion:16,suggestions:0,closed:5}}static{this.styles=$}load(){this._colorizeStyle=r(),this._themeChangedListener=_(()=>this._colorizeStyle=r())}willUpdate(e){e.has("suggestions")&&this.suggestionsPropChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}suggestionsPropChanged(){this._selectedSuggestion=void 0}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{m(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e.currentTarget?.value??""}_emitItemSelected(e,t){let i=e;(!i.key||i.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(t.code))}_showSuggestionDetail(e,t){e.stopPropagation(),this._selectedSuggestion=t}_emitClose(){this.arcgisClose.emit()}_colorizeCode(e){e!==void 0&&b(e,this._selectedSuggestion.code,"arcade")}renderSuggestionGroups(){return this.suggestions===void 0?null:S(this.suggestions)?this.suggestions.map(e=>s`<calcite-list-item-group .heading=${e.label}>${this.renderSuggestionListItems(e.suggestions)}</calcite-list-item-group>`):this.renderSuggestionListItems(this.suggestions)}renderSuggestionListItems(e){return e=f(e,"label",this._filterValue),e.length?e.map(t=>s`<calcite-list-item .label=${t.label} .description=${t.description} @calciteListItemSelect=${i=>this._emitItemSelected(i,t)} @keydown=${i=>this._emitItemSelected(i,t)} data-item=${t??c}><calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${i=>this._showSuggestionDetail(i,t)} data-item=${t??c}></calcite-action></calcite-list-item>`):s`<div class="notice-container">${this.messages.noitems}</div>`}renderSuggestionFlowItem(){let e=this._selectedSuggestion;return e?s`<calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .beforeBack=${this._beforeBack} selected><calcite-button width=half slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${t=>this._emitItemSelected(t,e)} data-item=${e??c} ${l(h)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${e.label} .description=${e.description}><div .innerHTML=${v(e.documentation)??""}></div><pre><code ${l(this._colorizeCode)}></code></pre></calcite-block></calcite-flow-item>`:null}render(){return this.closed?null:s`<style>${this._colorizeStyle}</style><calcite-flow ${l(this.flowFocusHandler)}><calcite-flow-item heading-level=2 .heading=${this.messages.suggestions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedSuggestion}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input><calcite-list label=suggestions>${this.renderSuggestionGroups()}</calcite-list></calcite-flow-item>${this.renderSuggestionFlowItem()}</calcite-flow>`}};u("arcgis-arcade-suggestions",n);export{n as ArcgisArcadeSuggestions};
|
|
@@ -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 c9,b as $,d as NK}from"./JOZPVCEH.js";function ws(n,e=0){return n[n.length-(1+e)]}function u9(n){if(n.length===0)throw new Error("Invalid tail call");return[n.slice(0,n.length-1),n[n.length-1]]}function xt(n,e,t=(i,o)=>i===o){if(n===e)return!0;if(!n||!e||n.length!==e.length)return!1;for(let i=0,o=n.length;i<o;i++)if(!t(n[i],e[i]))return!1;return!0}function f9(n,e){let t=n.length-1;e<t&&(n[e]=n[t]),n.pop()}function g9(n,e,t){return MK(n.length,i=>t(n[i],e))}function MK(n,e){let t=0,i=n-1;for(;t<=i;){let o=(t+i)/2|0,s=e(o);if(s<0)t=o+1;else if(s>0)i=o-1;else return o}return-(t+1)}function d9(n,e,t){if(n=n|0,n>=e.length)throw new TypeError("invalid index");let i=e[Math.floor(e.length*Math.random())],o=[],s=[],r=[];for(let a of e){let l=t(a,i);l<0?o.push(a):l>0?s.push(a):r.push(a)}return n<o.length?d9(n,o,t):n<o.length+r.length?r[0]:d9(n-(o.length+r.length),s,t)}function ioe(n,e){let t=[],i;for(let o of n.slice(0).sort(e))!i||e(i[0],o)!==0?(i=[o],t.push(i)):i.push(o);return t}function*Vf(n,e){let t,i;for(let o of n)i!==void 0&&e(i,o)?t.push(o):(t&&(yield t),t=[o]),i=o;t&&(yield t)}function w0(n,e){for(let t=0;t<=n.length;t++)e(t===0?void 0:n[t-1],t===n.length?void 0:n[t])}function m9(n,e){for(let t=0;t<n.length;t++)e(t===0?void 0:n[t-1],n[t],t+1===n.length?void 0:n[t+1])}function Hf(n){return n.filter(e=>!!e)}function U2(n){let e=0;for(let t=0;t<n.length;t++)n[t]&&(n[e]=n[t],e+=1);n.length=e}function p9(n){return!Array.isArray(n)||n.length===0}function Rh(n){return Array.isArray(n)&&n.length>0}function fr(n,e=t=>t){let t=new Set;return n.filter(i=>{let o=e(i);return t.has(o)?!1:(t.add(o),!0)})}function Uf(n,e){return n.length>0?n[0]:e}function Nn(n,e){let t=typeof e=="number"?n:0;typeof e=="number"?t=n:(t=0,e=n);let i=[];if(t<=e)for(let o=t;o<e;o++)i.push(o);else for(let o=t;o>e;o--)i.push(o);return i}function Xc(n,e,t){let i=n.slice(0,e),o=n.slice(e);return i.concat(t,o)}function C0(n,e){let t=n.indexOf(e);t>-1&&(n.splice(t,1),n.unshift(e))}function u_(n,e){let t=n.indexOf(e);t>-1&&(n.splice(t,1),n.push(e))}function f_(n,e){for(let t of e)n.push(t)}function _9(n){return Array.isArray(n)?n:[n]}function AK(n,e,t){let i=b9(n,e),o=n.length,s=t.length;n.length=o+s;for(let r=o-1;r>=i;r--)n[r+s]=n[r];for(let r=0;r<s;r++)n[r+i]=t[r]}function $2(n,e,t,i){let o=b9(n,e),s=n.splice(o,t);return s===void 0&&(s=[]),AK(n,o,i),s}function b9(n,e){return e<0?Math.max(e+n.length,0):Math.min(e,n.length)}function go(n,e){return(t,i)=>e(n(t),n(i))}function v9(...n){return(e,t)=>{for(let i of n){let o=i(e,t);if(!h_.isNeitherLessOrGreaterThan(o))return o}return h_.neitherLessOrGreaterThan}}function C9(n){return(e,t)=>-n(e,t)}var h_,Gr,w9,eo,Ql,h9,tt=$(()=>{(function(n){function e(s){return s<0}n.isLessThan=e;function t(s){return s<=0}n.isLessThanOrEqual=t;function i(s){return s>0}n.isGreaterThan=i;function o(s){return s===0}n.isNeitherLessOrGreaterThan=o,n.greaterThan=1,n.lessThan=-1,n.neitherLessOrGreaterThan=0})(h_||(h_={}));Gr=(n,e)=>n-e,w9=(n,e)=>Gr(n?1:0,e?1:0);eo=class{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;let i=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,i}takeFromEndWhile(e){let t=this.lastIdx;for(;t>=0&&e(this.items[t]);)t--;let i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){let e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){let t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}},Ql=class n{static{this.empty=new n(e=>{})}constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new n(t=>this.iterate(i=>e(i)?t(i):!0))}map(e){return new n(t=>this.iterate(i=>t(e(i))))}findLast(e){let t;return this.iterate(i=>(e(i)&&(t=i),!0)),t}findLastMaxBy(e){let t,i=!0;return this.iterate(o=>((i||h_.isGreaterThan(e(o,t)))&&(i=!1,t=o),!0)),t}},h9=class n{constructor(e){this._indexMap=e}static createSortPermutation(e,t){let i=Array.from(e.keys()).sort((o,s)=>t(e[o],e[s]));return new n(i)}apply(e){return e.map((t,i)=>e[this._indexMap[i]])}inverse(){let e=this._indexMap.slice();for(let t=0;t<this._indexMap.length;t++)e[this._indexMap[t]]=t;return new n(e)}}});function fn(n){return typeof n=="string"}function Ci(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&!(n instanceof RegExp)&&!(n instanceof Date)}function y9(n){let e=Object.getPrototypeOf(Uint8Array);return typeof n=="object"&&n instanceof e}function Zr(n){return typeof n=="number"&&!isNaN(n)}function q2(n){return!!n&&typeof n[Symbol.iterator]=="function"}function y0(n){return n===!0||n===!1}function mo(n){return typeof n>"u"}function Xl(n){return!Vn(n)}function Vn(n){return mo(n)||n===null}function Cs(n,e){if(!n)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function S0(n){if(Vn(n))throw new Error("Assertion Failed: argument is undefined or null");return n}function $f(n){return typeof n=="function"}function S9(n,e){let t=Math.min(n.length,e.length);for(let i=0;i<t;i++)RK(n[i],e[i])}function RK(n,e){if(fn(e)){if(typeof n!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if($f(e)){try{if(n instanceof e)return}catch{}if(!Vn(n)&&n.constructor===e||e.length===1&&e.call(void 0,n)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}var pi=$(()=>{});function Ha(n){if(!n||typeof n!="object"||n instanceof RegExp)return n;let e=Array.isArray(n)?[]:{};return Object.entries(n).forEach(([t,i])=>{e[t]=i&&typeof i=="object"?Ha(i):i}),e}function x9(n){if(!n||typeof n!="object")return n;let e=[n];for(;e.length>0;){let t=e.shift();Object.freeze(t);for(let i in t)if(L9.call(t,i)){let o=t[i];typeof o=="object"&&!Object.isFrozen(o)&&!y9(o)&&e.push(o)}}return n}function x0(n,e){return K2(n,e,new Set)}function K2(n,e,t){if(Vn(n))return n;let i=e(n);if(typeof i<"u")return i;if(Array.isArray(n)){let o=[];for(let s of n)o.push(K2(s,e,t));return o}if(Ci(n)){if(t.has(n))throw new Error("Cannot clone recursive data-structure");t.add(n);let o={};for(let s in n)L9.call(n,s)&&(o[s]=K2(n[s],e,t));return t.delete(n),o}return n}function PK(n,e,t=!0){return Ci(n)?(Ci(e)&&Object.keys(e).forEach(i=>{i in n?t&&(Ci(n[i])&&Ci(e[i])?PK(n[i],e[i],t):n[i]=e[i]):n[i]=e[i]}),n):e}function Gi(n,e){if(n===e)return!0;if(n==null||e===null||e===void 0||typeof n!=typeof e||typeof n!="object"||Array.isArray(n)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(n)){if(n.length!==e.length)return!1;for(t=0;t<n.length;t++)if(!Gi(n[t],e[t]))return!1}else{let o=[];for(i in n)o.push(i);o.sort();let s=[];for(i in e)s.push(i);if(s.sort(),!Gi(o,s))return!1;for(t=0;t<o.length;t++)if(!Gi(n[o[t]],e[o[t]]))return!1}return!0}function OK(n){let e=[];for(;Object.prototype!==n;)e=e.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return e}function g_(n){let e=[];for(let t of OK(n))typeof n[t]=="function"&&e.push(t);return e}function k9(n,e){let t=o=>function(){let s=Array.prototype.slice.call(arguments,0);return e(o,s)},i={};for(let o of n)i[o]=t(o);return i}var L9,ys=$(()=>{pi();L9=Object.prototype.hasOwnProperty});function m_(){return globalThis._VSCODE_NLS_MESSAGES}function Ph(){return globalThis._VSCODE_NLS_LANGUAGE}var j2=$(()=>{});function k0(n,e){let t;return e.length===0?t=n:t=n.replace(/\{(\d+)\}/g,(i,o)=>{let s=o[0],r=e[s],a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),FK&&(t="\uFF3B"+t.replace(/[aouei]/g,"$&$&")+"\uFF3D"),t}function p(n,e,...t){return k0(typeof n=="number"?D9(n,e):e,t)}function D9(n,e){let t=m_()?.[n];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${n} !!!`)}return t}function roe(n,e,...t){let i;typeof n=="number"?i=D9(n,e):i=e;let o=k0(i,t);return{value:o,original:e===i?o:k0(e,t)}}var FK,ke=$(()=>{j2();j2();FK=Ph()==="pseudo"||typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0});function P9(){if(!T9){T9=!0;let n=new Uint8Array(2);n[0]=1,n[1]=2,I9=new Uint16Array(n.buffer)[0]===513}return I9}var qf,__,b_,p_,BK,N9,Z2,WK,Y2,zK,M9,D0,E0,E9,VK,Jl,ec,Vs,A9,HK,G2,_i,De,oi,ed,$a,UK,R9,Ss,I0,Ua,loe,$K,T0,to,I9,T9,Q2,O9,F9,B9,W9,dt=$(()=>{ke();qf="en",__=!1,b_=!1,p_=!1,BK=!1,N9=!1,Z2=!1,WK=!1,Y2=!1,zK=!1,M9=!1,E0=qf,E9=qf,ec=globalThis;typeof ec.vscode<"u"&&typeof ec.vscode.process<"u"?Vs=ec.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Vs=process);A9=typeof Vs?.versions?.electron=="string",HK=A9&&Vs?.type==="renderer";if(typeof Vs=="object"){__=Vs.platform==="win32",b_=Vs.platform==="darwin",p_=Vs.platform==="linux",BK=p_&&!!Vs.env.SNAP&&!!Vs.env.SNAP_REVISION,WK=A9,zK=!!Vs.env.CI||!!Vs.env.BUILD_ARTIFACTSTAGINGDIRECTORY,D0=qf,E0=qf;let n=Vs.env.VSCODE_NLS_CONFIG;if(n)try{let e=JSON.parse(n);D0=e.userLocale,E9=e.osLocale,E0=e.resolvedLanguage||qf,VK=e.languagePack?.translationsConfigFile}catch{}N9=!0}else typeof navigator=="object"&&!HK?(Jl=navigator.userAgent,__=Jl.indexOf("Windows")>=0,b_=Jl.indexOf("Macintosh")>=0,Y2=(Jl.indexOf("Macintosh")>=0||Jl.indexOf("iPad")>=0||Jl.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,p_=Jl.indexOf("Linux")>=0,M9=Jl?.indexOf("Mobi")>=0,Z2=!0,E0=Ph()||qf,D0=navigator.language.toLowerCase(),E9=D0):console.error("Unable to resolve platform.");G2=0;b_?G2=1:__?G2=3:p_&&(G2=2);_i=__,De=b_,oi=p_,ed=N9,$a=Z2,UK=Z2&&typeof ec.importScripts=="function",R9=UK?ec.origin:void 0,Ss=Y2,I0=M9,Ua=Jl,loe=E0,$K=typeof ec.postMessage=="function"&&!ec.importScripts,T0=(()=>{if($K){let n=[];ec.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,o=n.length;i<o;i++){let s=n[i];if(s.id===t.data.vscodeScheduleAsyncWork){n.splice(i,1),s.callback();return}}});let e=0;return t=>{let i=++e;n.push({id:i,callback:t}),ec.postMessage({vscodeScheduleAsyncWork:i},"*")}}return n=>setTimeout(n)})(),to=b_||Y2?2:__?1:3,I9=!0,T9=!1;Q2=!!(Ua&&Ua.indexOf("Chrome")>=0),O9=!!(Ua&&Ua.indexOf("Firefox")>=0),F9=!!(!Q2&&Ua&&Ua.indexOf("Safari")>=0),B9=!!(Ua&&Ua.indexOf("Edg/")>=0),W9=!!(Ua&&Ua.indexOf("Android")>=0)});var Zi,v_=$(()=>{Zi={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}});var Qe,Hs=$(()=>{(function(n){function e(w){return w&&typeof w=="object"&&typeof w[Symbol.iterator]=="function"}n.is=e;let t=Object.freeze([]);function i(){return t}n.empty=i;function*o(w){yield w}n.single=o;function s(w){return e(w)?w:o(w)}n.wrap=s;function r(w){return w||t}n.from=r;function*a(w){for(let S=w.length-1;S>=0;S--)yield w[S]}n.reverse=a;function l(w){return!w||w[Symbol.iterator]().next().done===!0}n.isEmpty=l;function c(w){return w[Symbol.iterator]().next().value}n.first=c;function d(w,S){let L=0;for(let x of w)if(S(x,L++))return!0;return!1}n.some=d;function h(w,S){for(let L of w)if(S(L))return L}n.find=h;function*u(w,S){for(let L of w)S(L)&&(yield L)}n.filter=u;function*f(w,S){let L=0;for(let x of w)yield S(x,L++)}n.map=f;function*g(w,S){let L=0;for(let x of w)yield*S(x,L++)}n.flatMap=g;function*m(...w){for(let S of w)yield*S}n.concat=m;function _(w,S,L){let x=L;for(let D of w)x=S(x,D);return x}n.reduce=_;function*b(w,S,L=w.length){for(S<0&&(S+=w.length),L<0?L+=w.length:L>w.length&&(L=w.length);S<L;S++)yield w[S]}n.slice=b;function v(w,S=Number.POSITIVE_INFINITY){let L=[];if(S===0)return[L,w];let x=w[Symbol.iterator]();for(let D=0;D<S;D++){let E=x.next();if(E.done)return[L,n.empty()];L.push(E.value)}return[L,{[Symbol.iterator](){return x}}]}n.consume=v;async function C(w){let S=[];for await(let L of w)S.push(L);return Promise.resolve(S)}n.asyncToArray=C})(Qe||(Qe={}))});var Fi,yi,mr=$(()=>{Fi=class n{static{this.Undefined=new n(void 0)}constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}},yi=class{constructor(){this._first=Fi.Undefined,this._last=Fi.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Fi.Undefined}clear(){let e=this._first;for(;e!==Fi.Undefined;){let t=e.next;e.prev=Fi.Undefined,e.next=Fi.Undefined,e=t}this._first=Fi.Undefined,this._last=Fi.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let i=new Fi(e);if(this._first===Fi.Undefined)this._first=i,this._last=i;else if(t){let s=this._last;this._last=i,i.prev=s,s.next=i}else{let s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(i))}}shift(){if(this._first!==Fi.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Fi.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Fi.Undefined&&e.next!==Fi.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Fi.Undefined&&e.next===Fi.Undefined?(this._first=Fi.Undefined,this._last=Fi.Undefined):e.next===Fi.Undefined?(this._last=this._last.prev,this._last.next=Fi.Undefined):e.prev===Fi.Undefined&&(this._first=this._first.next,this._first.prev=Fi.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Fi.Undefined;)yield e.element,e=e.next}}});function qK(n=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let t of X2)n.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}function C_(n){let e=w_;if(n&&n instanceof RegExp)if(n.global)e=n;else{let t="g";n.ignoreCase&&(t+="i"),n.multiline&&(t+="m"),n.unicode&&(t+="u"),e=new RegExp(n.source,t)}return e.lastIndex=0,e}function td(n,e,t,i,o){if(e=C_(e),o||(o=Qe.first(z9)),t.length>o.maxLen){let c=n-o.maxLen/2;return c<0?c=0:i+=c,t=t.substring(c,n+o.maxLen/2),td(n,e,t,i,o)}let s=Date.now(),r=n-1-i,a=-1,l=null;for(let c=1;!(Date.now()-s>=o.timeBudget);c++){let d=r-o.windowSize*c;e.lastIndex=Math.max(0,d);let h=KK(e,t,r,a);if(!h&&l||(l=h,d<=0))break;a=d}if(l){let c={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function KK(n,e,t,i){let o;for(;o=n.exec(e);){let s=o.index||0;if(s<=t&&n.lastIndex>=t)return o;if(i>0&&s>i)return null}return null}var X2,w_,z9,Kf=$(()=>{Hs();mr();X2="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";w_=qK();z9=new yi;z9.unshift({maxLen:1e3,windowSize:15,timeBudget:150})});function Ue(n){rd(n)||U9.onUnexpectedError(n)}function R0(n){rd(n)||U9.onUnexpectedExternalError(n)}function BT(n){if(n instanceof Error){let{name:e,message:t}=n,i=n.stacktrace||n.stack;return{$isError:!0,name:e,message:t,stack:i,noTelemetry:x_.isErrorNoTelemetry(n)}}return n}function rd(n){return n instanceof pr?!0:n instanceof Error&&n.name===M0&&n.message===M0}function $9(){let n=new Error(M0);return n.name=n.message,n}function ad(n){return n?new Error(`Illegal argument: ${n}`):new Error("Illegal argument")}function Qf(n){return n?new Error(`Illegal state: ${n}`):new Error("Illegal state")}var FT,U9,M0,pr,A0,x_,Ge,ht=$(()=>{FT=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?x_.isErrorNoTelemetry(e)?new x_(e.message+`
|
|
3
|
+
v5.0.0-next.85 */
|
|
4
|
+
import{a as c9,b as $,d as NK}from"./PEEHLO66.js";function ws(n,e=0){return n[n.length-(1+e)]}function u9(n){if(n.length===0)throw new Error("Invalid tail call");return[n.slice(0,n.length-1),n[n.length-1]]}function xt(n,e,t=(i,o)=>i===o){if(n===e)return!0;if(!n||!e||n.length!==e.length)return!1;for(let i=0,o=n.length;i<o;i++)if(!t(n[i],e[i]))return!1;return!0}function f9(n,e){let t=n.length-1;e<t&&(n[e]=n[t]),n.pop()}function g9(n,e,t){return MK(n.length,i=>t(n[i],e))}function MK(n,e){let t=0,i=n-1;for(;t<=i;){let o=(t+i)/2|0,s=e(o);if(s<0)t=o+1;else if(s>0)i=o-1;else return o}return-(t+1)}function d9(n,e,t){if(n=n|0,n>=e.length)throw new TypeError("invalid index");let i=e[Math.floor(e.length*Math.random())],o=[],s=[],r=[];for(let a of e){let l=t(a,i);l<0?o.push(a):l>0?s.push(a):r.push(a)}return n<o.length?d9(n,o,t):n<o.length+r.length?r[0]:d9(n-(o.length+r.length),s,t)}function ioe(n,e){let t=[],i;for(let o of n.slice(0).sort(e))!i||e(i[0],o)!==0?(i=[o],t.push(i)):i.push(o);return t}function*Vf(n,e){let t,i;for(let o of n)i!==void 0&&e(i,o)?t.push(o):(t&&(yield t),t=[o]),i=o;t&&(yield t)}function w0(n,e){for(let t=0;t<=n.length;t++)e(t===0?void 0:n[t-1],t===n.length?void 0:n[t])}function m9(n,e){for(let t=0;t<n.length;t++)e(t===0?void 0:n[t-1],n[t],t+1===n.length?void 0:n[t+1])}function Hf(n){return n.filter(e=>!!e)}function U2(n){let e=0;for(let t=0;t<n.length;t++)n[t]&&(n[e]=n[t],e+=1);n.length=e}function p9(n){return!Array.isArray(n)||n.length===0}function Rh(n){return Array.isArray(n)&&n.length>0}function fr(n,e=t=>t){let t=new Set;return n.filter(i=>{let o=e(i);return t.has(o)?!1:(t.add(o),!0)})}function Uf(n,e){return n.length>0?n[0]:e}function Nn(n,e){let t=typeof e=="number"?n:0;typeof e=="number"?t=n:(t=0,e=n);let i=[];if(t<=e)for(let o=t;o<e;o++)i.push(o);else for(let o=t;o>e;o--)i.push(o);return i}function Xc(n,e,t){let i=n.slice(0,e),o=n.slice(e);return i.concat(t,o)}function C0(n,e){let t=n.indexOf(e);t>-1&&(n.splice(t,1),n.unshift(e))}function u_(n,e){let t=n.indexOf(e);t>-1&&(n.splice(t,1),n.push(e))}function f_(n,e){for(let t of e)n.push(t)}function _9(n){return Array.isArray(n)?n:[n]}function AK(n,e,t){let i=b9(n,e),o=n.length,s=t.length;n.length=o+s;for(let r=o-1;r>=i;r--)n[r+s]=n[r];for(let r=0;r<s;r++)n[r+i]=t[r]}function $2(n,e,t,i){let o=b9(n,e),s=n.splice(o,t);return s===void 0&&(s=[]),AK(n,o,i),s}function b9(n,e){return e<0?Math.max(e+n.length,0):Math.min(e,n.length)}function go(n,e){return(t,i)=>e(n(t),n(i))}function v9(...n){return(e,t)=>{for(let i of n){let o=i(e,t);if(!h_.isNeitherLessOrGreaterThan(o))return o}return h_.neitherLessOrGreaterThan}}function C9(n){return(e,t)=>-n(e,t)}var h_,Gr,w9,eo,Ql,h9,tt=$(()=>{(function(n){function e(s){return s<0}n.isLessThan=e;function t(s){return s<=0}n.isLessThanOrEqual=t;function i(s){return s>0}n.isGreaterThan=i;function o(s){return s===0}n.isNeitherLessOrGreaterThan=o,n.greaterThan=1,n.lessThan=-1,n.neitherLessOrGreaterThan=0})(h_||(h_={}));Gr=(n,e)=>n-e,w9=(n,e)=>Gr(n?1:0,e?1:0);eo=class{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;let i=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,i}takeFromEndWhile(e){let t=this.lastIdx;for(;t>=0&&e(this.items[t]);)t--;let i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){let e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){let t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}},Ql=class n{static{this.empty=new n(e=>{})}constructor(e){this.iterate=e}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new n(t=>this.iterate(i=>e(i)?t(i):!0))}map(e){return new n(t=>this.iterate(i=>t(e(i))))}findLast(e){let t;return this.iterate(i=>(e(i)&&(t=i),!0)),t}findLastMaxBy(e){let t,i=!0;return this.iterate(o=>((i||h_.isGreaterThan(e(o,t)))&&(i=!1,t=o),!0)),t}},h9=class n{constructor(e){this._indexMap=e}static createSortPermutation(e,t){let i=Array.from(e.keys()).sort((o,s)=>t(e[o],e[s]));return new n(i)}apply(e){return e.map((t,i)=>e[this._indexMap[i]])}inverse(){let e=this._indexMap.slice();for(let t=0;t<this._indexMap.length;t++)e[this._indexMap[t]]=t;return new n(e)}}});function fn(n){return typeof n=="string"}function Ci(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&!(n instanceof RegExp)&&!(n instanceof Date)}function y9(n){let e=Object.getPrototypeOf(Uint8Array);return typeof n=="object"&&n instanceof e}function Zr(n){return typeof n=="number"&&!isNaN(n)}function q2(n){return!!n&&typeof n[Symbol.iterator]=="function"}function y0(n){return n===!0||n===!1}function mo(n){return typeof n>"u"}function Xl(n){return!Vn(n)}function Vn(n){return mo(n)||n===null}function Cs(n,e){if(!n)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function S0(n){if(Vn(n))throw new Error("Assertion Failed: argument is undefined or null");return n}function $f(n){return typeof n=="function"}function S9(n,e){let t=Math.min(n.length,e.length);for(let i=0;i<t;i++)RK(n[i],e[i])}function RK(n,e){if(fn(e)){if(typeof n!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if($f(e)){try{if(n instanceof e)return}catch{}if(!Vn(n)&&n.constructor===e||e.length===1&&e.call(void 0,n)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}var pi=$(()=>{});function Ha(n){if(!n||typeof n!="object"||n instanceof RegExp)return n;let e=Array.isArray(n)?[]:{};return Object.entries(n).forEach(([t,i])=>{e[t]=i&&typeof i=="object"?Ha(i):i}),e}function x9(n){if(!n||typeof n!="object")return n;let e=[n];for(;e.length>0;){let t=e.shift();Object.freeze(t);for(let i in t)if(L9.call(t,i)){let o=t[i];typeof o=="object"&&!Object.isFrozen(o)&&!y9(o)&&e.push(o)}}return n}function x0(n,e){return K2(n,e,new Set)}function K2(n,e,t){if(Vn(n))return n;let i=e(n);if(typeof i<"u")return i;if(Array.isArray(n)){let o=[];for(let s of n)o.push(K2(s,e,t));return o}if(Ci(n)){if(t.has(n))throw new Error("Cannot clone recursive data-structure");t.add(n);let o={};for(let s in n)L9.call(n,s)&&(o[s]=K2(n[s],e,t));return t.delete(n),o}return n}function PK(n,e,t=!0){return Ci(n)?(Ci(e)&&Object.keys(e).forEach(i=>{i in n?t&&(Ci(n[i])&&Ci(e[i])?PK(n[i],e[i],t):n[i]=e[i]):n[i]=e[i]}),n):e}function Gi(n,e){if(n===e)return!0;if(n==null||e===null||e===void 0||typeof n!=typeof e||typeof n!="object"||Array.isArray(n)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(n)){if(n.length!==e.length)return!1;for(t=0;t<n.length;t++)if(!Gi(n[t],e[t]))return!1}else{let o=[];for(i in n)o.push(i);o.sort();let s=[];for(i in e)s.push(i);if(s.sort(),!Gi(o,s))return!1;for(t=0;t<o.length;t++)if(!Gi(n[o[t]],e[o[t]]))return!1}return!0}function OK(n){let e=[];for(;Object.prototype!==n;)e=e.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return e}function g_(n){let e=[];for(let t of OK(n))typeof n[t]=="function"&&e.push(t);return e}function k9(n,e){let t=o=>function(){let s=Array.prototype.slice.call(arguments,0);return e(o,s)},i={};for(let o of n)i[o]=t(o);return i}var L9,ys=$(()=>{pi();L9=Object.prototype.hasOwnProperty});function m_(){return globalThis._VSCODE_NLS_MESSAGES}function Ph(){return globalThis._VSCODE_NLS_LANGUAGE}var j2=$(()=>{});function k0(n,e){let t;return e.length===0?t=n:t=n.replace(/\{(\d+)\}/g,(i,o)=>{let s=o[0],r=e[s],a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),FK&&(t="\uFF3B"+t.replace(/[aouei]/g,"$&$&")+"\uFF3D"),t}function p(n,e,...t){return k0(typeof n=="number"?D9(n,e):e,t)}function D9(n,e){let t=m_()?.[n];if(typeof t!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${n} !!!`)}return t}function roe(n,e,...t){let i;typeof n=="number"?i=D9(n,e):i=e;let o=k0(i,t);return{value:o,original:e===i?o:k0(e,t)}}var FK,ke=$(()=>{j2();j2();FK=Ph()==="pseudo"||typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0});function P9(){if(!T9){T9=!0;let n=new Uint8Array(2);n[0]=1,n[1]=2,I9=new Uint16Array(n.buffer)[0]===513}return I9}var qf,__,b_,p_,BK,N9,Z2,WK,Y2,zK,M9,D0,E0,E9,VK,Jl,ec,Vs,A9,HK,G2,_i,De,oi,ed,$a,UK,R9,Ss,I0,Ua,loe,$K,T0,to,I9,T9,Q2,O9,F9,B9,W9,dt=$(()=>{ke();qf="en",__=!1,b_=!1,p_=!1,BK=!1,N9=!1,Z2=!1,WK=!1,Y2=!1,zK=!1,M9=!1,E0=qf,E9=qf,ec=globalThis;typeof ec.vscode<"u"&&typeof ec.vscode.process<"u"?Vs=ec.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(Vs=process);A9=typeof Vs?.versions?.electron=="string",HK=A9&&Vs?.type==="renderer";if(typeof Vs=="object"){__=Vs.platform==="win32",b_=Vs.platform==="darwin",p_=Vs.platform==="linux",BK=p_&&!!Vs.env.SNAP&&!!Vs.env.SNAP_REVISION,WK=A9,zK=!!Vs.env.CI||!!Vs.env.BUILD_ARTIFACTSTAGINGDIRECTORY,D0=qf,E0=qf;let n=Vs.env.VSCODE_NLS_CONFIG;if(n)try{let e=JSON.parse(n);D0=e.userLocale,E9=e.osLocale,E0=e.resolvedLanguage||qf,VK=e.languagePack?.translationsConfigFile}catch{}N9=!0}else typeof navigator=="object"&&!HK?(Jl=navigator.userAgent,__=Jl.indexOf("Windows")>=0,b_=Jl.indexOf("Macintosh")>=0,Y2=(Jl.indexOf("Macintosh")>=0||Jl.indexOf("iPad")>=0||Jl.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,p_=Jl.indexOf("Linux")>=0,M9=Jl?.indexOf("Mobi")>=0,Z2=!0,E0=Ph()||qf,D0=navigator.language.toLowerCase(),E9=D0):console.error("Unable to resolve platform.");G2=0;b_?G2=1:__?G2=3:p_&&(G2=2);_i=__,De=b_,oi=p_,ed=N9,$a=Z2,UK=Z2&&typeof ec.importScripts=="function",R9=UK?ec.origin:void 0,Ss=Y2,I0=M9,Ua=Jl,loe=E0,$K=typeof ec.postMessage=="function"&&!ec.importScripts,T0=(()=>{if($K){let n=[];ec.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,o=n.length;i<o;i++){let s=n[i];if(s.id===t.data.vscodeScheduleAsyncWork){n.splice(i,1),s.callback();return}}});let e=0;return t=>{let i=++e;n.push({id:i,callback:t}),ec.postMessage({vscodeScheduleAsyncWork:i},"*")}}return n=>setTimeout(n)})(),to=b_||Y2?2:__?1:3,I9=!0,T9=!1;Q2=!!(Ua&&Ua.indexOf("Chrome")>=0),O9=!!(Ua&&Ua.indexOf("Firefox")>=0),F9=!!(!Q2&&Ua&&Ua.indexOf("Safari")>=0),B9=!!(Ua&&Ua.indexOf("Edg/")>=0),W9=!!(Ua&&Ua.indexOf("Android")>=0)});var Zi,v_=$(()=>{Zi={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}});var Qe,Hs=$(()=>{(function(n){function e(w){return w&&typeof w=="object"&&typeof w[Symbol.iterator]=="function"}n.is=e;let t=Object.freeze([]);function i(){return t}n.empty=i;function*o(w){yield w}n.single=o;function s(w){return e(w)?w:o(w)}n.wrap=s;function r(w){return w||t}n.from=r;function*a(w){for(let S=w.length-1;S>=0;S--)yield w[S]}n.reverse=a;function l(w){return!w||w[Symbol.iterator]().next().done===!0}n.isEmpty=l;function c(w){return w[Symbol.iterator]().next().value}n.first=c;function d(w,S){let L=0;for(let x of w)if(S(x,L++))return!0;return!1}n.some=d;function h(w,S){for(let L of w)if(S(L))return L}n.find=h;function*u(w,S){for(let L of w)S(L)&&(yield L)}n.filter=u;function*f(w,S){let L=0;for(let x of w)yield S(x,L++)}n.map=f;function*g(w,S){let L=0;for(let x of w)yield*S(x,L++)}n.flatMap=g;function*m(...w){for(let S of w)yield*S}n.concat=m;function _(w,S,L){let x=L;for(let D of w)x=S(x,D);return x}n.reduce=_;function*b(w,S,L=w.length){for(S<0&&(S+=w.length),L<0?L+=w.length:L>w.length&&(L=w.length);S<L;S++)yield w[S]}n.slice=b;function v(w,S=Number.POSITIVE_INFINITY){let L=[];if(S===0)return[L,w];let x=w[Symbol.iterator]();for(let D=0;D<S;D++){let E=x.next();if(E.done)return[L,n.empty()];L.push(E.value)}return[L,{[Symbol.iterator](){return x}}]}n.consume=v;async function C(w){let S=[];for await(let L of w)S.push(L);return Promise.resolve(S)}n.asyncToArray=C})(Qe||(Qe={}))});var Fi,yi,mr=$(()=>{Fi=class n{static{this.Undefined=new n(void 0)}constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}},yi=class{constructor(){this._first=Fi.Undefined,this._last=Fi.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Fi.Undefined}clear(){let e=this._first;for(;e!==Fi.Undefined;){let t=e.next;e.prev=Fi.Undefined,e.next=Fi.Undefined,e=t}this._first=Fi.Undefined,this._last=Fi.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let i=new Fi(e);if(this._first===Fi.Undefined)this._first=i,this._last=i;else if(t){let s=this._last;this._last=i,i.prev=s,s.next=i}else{let s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(i))}}shift(){if(this._first!==Fi.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Fi.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Fi.Undefined&&e.next!==Fi.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Fi.Undefined&&e.next===Fi.Undefined?(this._first=Fi.Undefined,this._last=Fi.Undefined):e.next===Fi.Undefined?(this._last=this._last.prev,this._last.next=Fi.Undefined):e.prev===Fi.Undefined&&(this._first=this._first.next,this._first.prev=Fi.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Fi.Undefined;)yield e.element,e=e.next}}});function qK(n=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(let t of X2)n.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}function C_(n){let e=w_;if(n&&n instanceof RegExp)if(n.global)e=n;else{let t="g";n.ignoreCase&&(t+="i"),n.multiline&&(t+="m"),n.unicode&&(t+="u"),e=new RegExp(n.source,t)}return e.lastIndex=0,e}function td(n,e,t,i,o){if(e=C_(e),o||(o=Qe.first(z9)),t.length>o.maxLen){let c=n-o.maxLen/2;return c<0?c=0:i+=c,t=t.substring(c,n+o.maxLen/2),td(n,e,t,i,o)}let s=Date.now(),r=n-1-i,a=-1,l=null;for(let c=1;!(Date.now()-s>=o.timeBudget);c++){let d=r-o.windowSize*c;e.lastIndex=Math.max(0,d);let h=KK(e,t,r,a);if(!h&&l||(l=h,d<=0))break;a=d}if(l){let c={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function KK(n,e,t,i){let o;for(;o=n.exec(e);){let s=o.index||0;if(s<=t&&n.lastIndex>=t)return o;if(i>0&&s>i)return null}return null}var X2,w_,z9,Kf=$(()=>{Hs();mr();X2="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";w_=qK();z9=new yi;z9.unshift({maxLen:1e3,windowSize:15,timeBudget:150})});function Ue(n){rd(n)||U9.onUnexpectedError(n)}function R0(n){rd(n)||U9.onUnexpectedExternalError(n)}function BT(n){if(n instanceof Error){let{name:e,message:t}=n,i=n.stacktrace||n.stack;return{$isError:!0,name:e,message:t,stack:i,noTelemetry:x_.isErrorNoTelemetry(n)}}return n}function rd(n){return n instanceof pr?!0:n instanceof Error&&n.name===M0&&n.message===M0}function $9(){let n=new Error(M0);return n.name=n.message,n}function ad(n){return n?new Error(`Illegal argument: ${n}`):new Error("Illegal argument")}function Qf(n){return n?new Error(`Illegal state: ${n}`):new Error("Illegal state")}var FT,U9,M0,pr,A0,x_,Ge,ht=$(()=>{FT=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?x_.isErrorNoTelemetry(e)?new x_(e.message+`
|
|
5
5
|
|
|
6
6
|
`+e.stack):new Error(e.message+`
|
|
7
7
|
|