@arcgis/coding-components 4.32.0-next.16 → 4.32.0-next.17
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/arcgis-coding-components/{6VPHKBIW.js → 2JO3YPBV.js} +2 -2
- package/dist/arcgis-coding-components/{R3Y63T6Q.js → 472M2R72.js} +2 -2
- package/dist/arcgis-coding-components/{DDHAT5BP.js → 54R6KKGA.js} +1 -1
- package/dist/arcgis-coding-components/{3JFTH6GH.js → 6CXAVCJD.js} +2 -2
- package/dist/arcgis-coding-components/{MM2G7US4.js → 7RT3IUBL.js} +2 -2
- package/dist/arcgis-coding-components/{XQSEYN2B.js → AN5XOTG3.js} +2 -2
- package/dist/arcgis-coding-components/{JVO66RKE.js → AWZRXR2G.js} +2 -2
- package/dist/arcgis-coding-components/{UP4J5M3J.js → BXMDUOG5.js} +2 -2
- package/dist/arcgis-coding-components/{LQMKPKSS.js → C7AOZLHG.js} +2 -2
- package/dist/arcgis-coding-components/{4S2563N3.js → CB7FNZGQ.js} +1 -1
- package/dist/arcgis-coding-components/{LGR6PBTH.js → DQDWUNRW.js} +2 -2
- package/dist/arcgis-coding-components/{TG5DRBH3.js → DQJ2C7BA.js} +2 -2
- package/dist/arcgis-coding-components/{2VQIJCBR.js → E55X3A5I.js} +2 -2
- package/dist/arcgis-coding-components/{XSCWBJDG.js → EIZ2XTGD.js} +2 -2
- package/dist/arcgis-coding-components/{XWS544GF.js → GYRAGUCS.js} +2 -2
- package/dist/arcgis-coding-components/{D3DQA6N7.js → H3ZXUPGI.js} +2 -2
- package/dist/arcgis-coding-components/{JFQMC6G4.js → HEMUY4EX.js} +2 -2
- package/dist/arcgis-coding-components/{KEFDG2DZ.js → ISEFWYKS.js} +2 -2
- package/dist/arcgis-coding-components/{2OJIERSK.js → JBLNDPQ4.js} +1 -1
- package/dist/arcgis-coding-components/{ZEV45O5Y.js → JRQTAI77.js} +3 -3
- package/dist/arcgis-coding-components/{ZNIDSG3O.js → K65MMKQZ.js} +2 -2
- package/dist/arcgis-coding-components/{YASFNF6B.js → KTIY5U7I.js} +2 -2
- package/dist/arcgis-coding-components/{AZG2U6SA.js → LJH27Y2G.js} +2 -2
- package/dist/arcgis-coding-components/{ZRRRDAE4.js → ONWSK62Q.js} +2 -2
- package/dist/arcgis-coding-components/{IK5DO6TU.js → PAGWYFQI.js} +2 -2
- package/dist/arcgis-coding-components/{7WDXVSPB.js → PJIM5CVB.js} +2 -2
- package/dist/arcgis-coding-components/{SVLMG4F5.js → PKO3WCVQ.js} +2 -2
- package/dist/arcgis-coding-components/{67YLQH7X.js → PP4LQMW6.js} +2 -2
- package/dist/arcgis-coding-components/{CVSFF4W5.js → PPN3MKSY.js} +2 -2
- package/dist/arcgis-coding-components/{UOO52ZAZ.js → PTUK2NVN.js} +2 -2
- package/dist/arcgis-coding-components/{KVVJILBC.js → TX2HX5VE.js} +1 -1
- package/dist/arcgis-coding-components/{FNXUGJGP.js → VYGQDML4.js} +2 -2
- package/dist/arcgis-coding-components/{D44O4N7Q.js → XAP4VSRB.js} +2 -2
- package/dist/arcgis-coding-components/{ZB5ZHU6J.js → ZGVAC5ZL.js} +2 -2
- package/dist/arcgis-coding-components/{GAU6PR7R.js → ZS5XSXBA.js} +2 -2
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.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/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +1 -1
- package/dist/chunks/markdown.js +1 -1
- package/dist/chunks/monaco-importer.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
- package/dist/components/arcgis-code-editor/customElement.js +1 -1
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.17
|
|
5
5
|
*/
|
|
6
|
-
import{a as E}from"./
|
|
6
|
+
import{a as E}from"./PKO3WCVQ.js";import{a as M}from"./PJIM5CVB.js";import"./PPN3MKSY.js";import"./CB7FNZGQ.js";import"./TX2HX5VE.js";import"./JRQTAI77.js";import"./ZS5XSXBA.js";import{c as y,d as p,e as F,g as S,h as x,i as R,k as g,l as u,m as V,n as L,o as v,p as $,s as P,w as D}from"./AWZRXR2G.js";import"./JBLNDPQ4.js";import"./K65MMKQZ.js";import"./54R6KKGA.js";var q=(a,s,t)=>{let d=new Map;for(let e=s;e<=t;e++)d.set(a[e],e);return d},_=x(class extends R{constructor(a){if(super(a),a.type!==S.CHILD)throw Error("repeat() can only be used in text expressions")}dt(a,s,t){let d;t===void 0?t=s:s!==void 0&&(d=s);let e=[],n=[],o=0;for(let m of a)e[o]=d?d(m,o):o,n[o]=t(m,o),o++;return{values:n,keys:e}}render(a,s,t){return this.dt(a,s,t).values}update(a,[s,t,d]){let e=L(a),{values:n,keys:o}=this.dt(s,t,d);if(!Array.isArray(e))return this.ut=o,n;let m=this.ut??=[],h=[],b,I,i=0,c=e.length-1,l=0,r=n.length-1;for(;i<=c&&l<=r;)if(e[i]===null)i++;else if(e[c]===null)c--;else if(m[i]===o[l])h[l]=u(e[i],n[l]),i++,l++;else if(m[c]===o[r])h[r]=u(e[c],n[r]),c--,r--;else if(m[i]===o[r])h[r]=u(e[i],n[r]),g(a,h[r+1],e[i]),i++,r--;else if(m[c]===o[l])h[l]=u(e[c],n[l]),g(a,e[i],e[c]),c--,l++;else if(b===void 0&&(b=q(o,l,r),I=q(m,i,c)),b.has(m[i]))if(b.has(m[c])){let f=I.get(o[l]),w=f!==void 0?e[f]:null;if(w===null){let k=g(a,e[i]);u(k,n[l]),h[l]=k}else h[l]=u(w,n[l]),g(a,e[i],w),e[f]=null;l++}else v(e[c]),c--;else v(e[i]),i++;for(;l<=r;){let f=g(a,h[r+1]);u(f,n[l]),h[l++]=f}for(;i<=c;){let f=e[i++];f!==null&&v(f)}return this.ut=o,V(a,h),F}});var A=y`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,C=class extends P{constructor(){super(...arguments),this.messages=E(),this._filterValue="",this._flowItemRenderers=[],this._mutationCounter=1,this.loading=!1,this.arcgisClose=$({bubbles:!1}),this.arcgisFieldSelected=$({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mutationCounter:16,loading:5,modelId:1}}static{this.styles=A}willUpdate(s){s.has("modelId")&&(this._flowItemRenderers=[])}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}_handleSelectField(s){if(s.target instanceof HTMLElement)switch(s.target.tagName.toLowerCase()){case"calcite-list-item":{let t=s.target.value;this.arcgisFieldSelected.emit(t??"");break}case"calcite-action":s.stopPropagation();break}}_handleSelectDomain(s){let t=s.target.value;this.arcgisFieldSelected.emit(t?`'${t}'`:"")}_emitClose(){this.arcgisClose.emit()}render(){let s=M.getFeatureLayerForModel(this.modelId??"");return this.loading||!this.modelId||!s?p`<calcite-block .heading=${this.messages.availablefields??""}></calcite-block>`:p`<calcite-flow><calcite-flow-item .heading=${this.messages.availablefields??""} closable @calciteFlowItemClose=${this._emitClose}><calcite-list filter-enabled>${_(s.fields,t=>t.name,t=>p`<calcite-list-item @click=${this._handleSelectField} .label=${t.name} .description=${t.alias} .value=${t.name}>${t.domain&&p`<calcite-action slot=actions-end text=open icon=chevron-right @click=${()=>{let d=t.domain;d.type==="coded-value"&&(this._flowItemRenderers=[...this._flowItemRenderers,()=>p`<calcite-flow-item closable .heading=${this.messages.domainvalues??""} .description=${t.name} @calciteFlowItemClose=${this._emitClose}><calcite-list>${_(d.codedValues,e=>e.code,e=>p`<calcite-list-item @click=${this._handleSelectDomain} .label=${e.name} .description=${String(e.code)} .value=${String(e.code)}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`])}}></calcite-action>`||""}</calcite-list-item>`)}</calcite-list></calcite-flow-item>${this._flowItemRenderers.map(t=>t())}</calcite-flow>`}};D("arcgis-sql-expression-fields",C);export{C as SqlExpressionFields};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.17
|
|
5
5
|
*/
|
|
6
|
-
import{e as u}from"./
|
|
6
|
+
import{e as u}from"./TX2HX5VE.js";var T="https://developers.arcgis.com/arcade/",k=100,m=100;function C(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.arcade.featureset.support.FeatureSet"}function v(e){return!!e&&typeof e=="object"&&"arcadeDeclaredClass"in e&&typeof e.arcadeDeclaredClass=="string"&&e.arcadeDeclaredClass==="esri.arcade.Feature"}function g(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass==="esri.arcade.Dictionary"}function b(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass.startsWith("esri.geometry.")}function w(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass.startsWith("esri.rest.knowledgeGraph.KnowledgeGraph")}function R(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass==="esri.arcade.Portal"}function A(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass==="esri.arcade.Attachment"}function h(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.arcade.arcadedate"}function j(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.core.sql.dateonly"}function D(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.core.sql.timeonly"}function F(e){return!!e&&typeof e=="object"&&"length"in e&&typeof e.length=="function"&&"get"in e&&typeof e.get=="function"&&"toArray"in e&&typeof e.toArray=="function"&&"_elements"in e&&Array.isArray(e._elements)}function S(e){return e==null?{type:"null"}:Array.isArray(e)?{type:"array",value:e}:F(e)?{type:"array",value:e.toArray()}:e instanceof Date?{type:"date",value:e}:typeof e=="string"?{type:"text",value:e}:typeof e=="number"?{type:"number",value:e}:typeof e=="boolean"?{type:"boolean",value:e}:typeof e!="object"?{type:"unknown"}:h(e)?{type:"date",value:e}:j(e)?{type:"dateOnly",value:e}:D(e)?{type:"time",value:e}:A(e)?{type:"attachment",value:e}:R(e)?{type:"portal",value:e}:C(e)?{type:"featureSet",value:e,features:[],iterator:null}:v(e)?{type:"feature",value:e}:g(e)?{type:"dictionary",value:e}:b(e)?{type:"geometry",value:e}:w(e)?{type:"knowledgeGraph",value:e}:{type:"unknown"}}function E(e,r="en"){return e.value instanceof Date?new Intl.DateTimeFormat(r,{dateStyle:"medium",timeStyle:"long"}).format(e.value):e.value.toDateTime().setLocale(r).toFormat(e.value.isUnknownTimeZone?"FF":"FF ZZZZZ")}function G(e){return e.value.toString()}function B(e){return e.value.toString()}async function Z(e,r="system"){let a=S(e);return a.type!=="featureSet"||(await a.value.load(),a.iterator=a.value.iterator({aborted:!1}),a.features=await a.iterator.nextBatchAsArcadeFeatures(m,r)??[]),a}async function I(e,r,a,s){let l=new Date;s??=()=>{};try{let o=performance.now(),t=await(await u()).createArcadeExecutor(r??"",{variables:e?.variables??[]}),c=performance.now(),{profileVariableInstances:d,spatialReference:y,timeZone:i}=a,p={spatialReference:y,timeZone:i,rawOutput:!0,console:s},f=await t.executeAsync(d,p),n=await Z(f,i);return n.timeStamp=l,n.compilationTime=c-o,n.executionTime=performance.now()-c,n}catch(o){let t="Unknown Error";return o instanceof Error&&(t=o.message),{type:"error",value:t,error:o,timeStamp:l,compilationTime:0,executionTime:0}}}export{T as a,k as b,m as c,S as d,E as e,G as f,B as g,I as h};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.17
|
|
5
5
|
*/
|
|
6
6
|
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=(b,a)=>()=>(b&&(a=b(b=0)),a);var n=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports),o=(b,a)=>{for(var c in a)e(b,c,{get:a[c],enumerable:!0})},l=(b,a,c,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of i(a))!k.call(b,d)&&d!==c&&e(b,d,{get:()=>a[d],enumerable:!(f=h(a,d))||f.enumerable});return b};var p=(b,a,c)=>(c=b!=null?g(j(b)):{},l(a||!b||!b.__esModule?e(c,"default",{value:b,enumerable:!0}):c,b));export{m as a,n as b,o as c,p as d};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.17
|
|
5
5
|
*/
|
|
6
|
-
import{a as b,h as c}from"./R3Y63T6Q.js";import{a as E,b as A}from"./TG5DRBH3.js";import{a as P}from"./SVLMG4F5.js";import{a as f,b as v,d as s}from"./XWS544GF.js";import"./CVSFF4W5.js";import"./4S2563N3.js";import"./KVVJILBC.js";import"./ZEV45O5Y.js";import"./GAU6PR7R.js";import{c as h,d as t,f as n,p as r,q as g,s as u,w as _,x as m}from"./JVO66RKE.js";import{a as d,g as p}from"./2OJIERSK.js";import{fk as x,uj as y}from"./ZNIDSG3O.js";import"./DDHAT5BP.js";y();var D=h`arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.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);box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}.sticky{position:sticky;top:0;z-index:10}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);calcite-flow{height:100%}}.main-action-bar{border-bottom:var(--arcgis-coding-components-border);flex:0 0 auto;calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}arcgis-arcade-results{border-top:var(--arcgis-coding-components-border);box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}calcite-flow{[slot=footer]{word-break:break-word}}}`,l=class extends u{constructor(){super(...arguments),this._codeEditorElt=E(),this._componentReadyDefer=new d,this._disposables=[],this._editorProfilePromise=Promise.resolve(void 0),this.messages=P(),this._modelId=p(),this._openArcadeHelp=()=>void window.open(b,"Arcade Help"),this._toggleSidePanel=e=>{if(!e.target)return;let i=e.target?.dataset.panelName??"none";this.openedSidePanel=i===this.openedSidePanel?"none":i,this.openedSidePanel==="none"&&this._codeEditorElt.value?.setFocus().catch(console.error)},this._consoleLogs=[],this._executingScript=!1,this._preparingArcade=!1,this._resultPanel="output",this._showExecutionPanel=!1,this.hideDocumentationActions=!1,this.hideSideBar=!1,this.openedSidePanel="none",this.script="",this.sideActionBarExpanded=!1,this.arcgisDiagnosticsChange=r({bubbles:!1}),this.arcgisScriptChange=r({bubbles:!1})}static{this.properties={_apiLibrary:16,_consoleLogs:16,_editorProfile:16,_executingScript:16,_executionResult:16,_preparingArcade:16,_resultPanel:16,_showExecutionPanel:16,editorInstance:32,editorOptions:0,hideDocumentationActions:5,hideSideBar:5,openedSidePanel:3,profile:0,script:1,sideActionBarExpanded:7,snippets:0,suggestions:0,testData:0}}static{this.shadowRootOptions=g}static{this.styles=D}get editorInstance(){return this._codeEditorElt.value?.editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.editorInstance}async getScript(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.value}async getTestResult(){if(!this.testData)return{type:"error",value:"Missing test data",error:null};let e=await this._editorProfilePromise;if(!e)return{type:"error",value:"Missing editor profile",error:null};await this._componentReadyDefer.promise;let i=this._codeEditorElt.value?.value;return await c(e.definition,i,this.testData)}async setFocus(){await this._componentReadyDefer.promise,await this._codeEditorElt.value?.setFocus()}async load(){let e=m("./assets");f(e),await this._updateEditorProfile()}willUpdate(e){(e.has("messages")||e.has("profile"))&&this._updateDataModelDeps(),e.has("testData")&&this._testDataChanged(),e.has("snippets")&&s.updateApiContextForModel(this._modelId,{snippets:this.snippets})}async loaded(){this._componentReadyDefer.resolve(),await this._updateApiLibrary();let e=await v();this._disposables.push(e.onDiagnosticsChange(i=>!this._preparingArcade&&this.arcgisDiagnosticsChange.emit(i.diagnostics))),this.testData&&this._addExecuteScriptAction(),await this._codeEditorElt.value?.setFocus()}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}_testDataChanged(){!this.testData&&this._executeScriptAction&&(this._disposeSafely(this._executeScriptAction),this._executeScriptAction=void 0),this.testData&&!this._executeScriptAction&&this._addExecuteScriptAction(),this._showExecutionPanel&&this._executeScript().catch(console.error)}async _updateEditorProfile(){this._preparingArcade=!0;try{await s.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale,snippets:this.snippets}),this._editorProfile=s.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._editorProfilePromise=Promise.resolve(this._editorProfile),this._preparingArcade=!1}}async _updateApiLibrary(){this._apiLibrary=await s.getApiLibraryForModel(this._modelId)}async _executeScript(){let e=this.testData;if(!this._codeEditorElt.value||!e)return;let i=await this._editorProfilePromise;if(!i){this._executionResult={type:"error",value:"Missing editor profile",error:null};return}this._showExecutionPanel=!0,this._executingScript=!0,this._consoleLogs=[],setTimeout(()=>void(async()=>{let a=this._codeEditorElt.value?.value;this._executionResult=await c(i.definition,a,e,o=>setTimeout(()=>this._consoleLogs=[...this._consoleLogs,o],0)),this._executingScript=!1})(),0)}_toggleShowExecutionPanel(){this._showExecutionPanel=!this._showExecutionPanel}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}_onCodeEditorValueChange(e){e.stopPropagation(),this.script=e.detail,this.arcgisScriptChange.emit(e.detail)}_insertAsSnippet(e){this._codeEditorElt.value?.insertSnippet(e.detail).catch(console.error)}_insertAsText(e){this._codeEditorElt.value?.insertText(e.detail).catch(console.error)}_onResultPanelChange(e){this._resultPanel=e.detail}_onExecutionPanelClose(){this._showExecutionPanel=!1}_addExecuteScriptAction(){let e=this.editorInstance?.addAction({id:"run-script",label:"Run Arcade Expression",keybindings:[x.F5],contextMenuGroupId:"code",contextMenuOrder:1,run:()=>{this.testData&&this._executeScript().catch(console.error)}});e&&(this._executeScriptAction=e,this._disposables.push(e))}_disposeSafely(e){let i=this._disposables.indexOf(e);i!==-1&&this._disposables.splice(i,1),e.dispose()}renderMainActionBar(){return this.testData?t`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${this.messages.run??""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${()=>void this._executeScript().catch(console.error)}></calcite-action>${this._executionResult?t`<calcite-action .text=${this.messages.lastresults??""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>`:null}</calcite-action-group></calcite-action-bar>`:null}renderMainPanel(){return t`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${s.languageId} .value=${this.script??""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${A(this._codeEditorElt)}></arcgis-code-editor>`}renderAction({id:e,label:i,icon:a,active:o,panelName:S,iconFlipRtl:w=!1,onClick:$=this._toggleSidePanel}){return t`<calcite-action id=${e??n} .text=${i} .icon=${a} .active=${o} @click=${$} data-panel-name=${S??n} .iconFlipRtl=${w}></calcite-action>${!this.sideActionBarExpanded&&t`<calcite-tooltip .referenceElement=${e}><span>${i}</span></calcite-tooltip>`||""}`}renderSideActionBar(){return this.hideSideBar?null:t`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({id:"profile-variables-action",label:this.messages.profilevariables??"",icon:"profile-variables",active:this.openedSidePanel==="variables",panelName:"variables"})}${this.renderAction({id:"function-action",label:this.messages.constantsandfunctions??"",icon:"function",active:this.openedSidePanel==="api",panelName:"api"})}${this.suggestions?.length?this.renderAction({id:"suggestions-action",label:this.messages.suggestions??"",icon:"lightbulb",active:this.openedSidePanel==="suggestions",panelName:"suggestions"}):null}${this.hideDocumentationActions?null:this.renderAction({id:"developer-website-action",label:this.messages.help??"",icon:"question",active:!1,panelName:"none",iconFlipRtl:this.messages._lang==="ar",onClick:this._openArcadeHelp})}</calcite-action-group></calcite-action-bar>`}renderSidePanel(){if(this.hideSideBar)return null;switch(this.openedSidePanel){case"api":return t`<arcgis-language-api-panel class="side-panel flex-panel border-inline-start" .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-language-api-panel>`;case"variables":return t`<arcgis-editor-variables class="side-panel flex-panel border-inline-start" .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile}></arcgis-editor-variables>`;case"suggestions":return t`<arcgis-arcade-suggestions class="side-panel flex-panel border-inline-start" .suggestions=${this.suggestions} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>`;default:return null}}renderResultsPanel(){return this._showExecutionPanel?t`<arcgis-arcade-results class="flex-adjustable" .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisOpenedResultPanelChange=${this._onResultPanelChange} @arcgisClose=${this._onExecutionPanelClose}></arcgis-arcade-results>`:null}render(){return t`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`}};_("arcgis-arcade-editor",l);export{l as ArcgisArcadeEditor};
|
|
6
|
+
import{a as b,h as c}from"./472M2R72.js";import{a as E,b as A}from"./DQJ2C7BA.js";import{a as P}from"./PKO3WCVQ.js";import{a as f,b as v,d as s}from"./GYRAGUCS.js";import"./PPN3MKSY.js";import"./CB7FNZGQ.js";import"./TX2HX5VE.js";import"./JRQTAI77.js";import"./ZS5XSXBA.js";import{c as h,d as t,f as n,p as r,q as g,s as u,w as _,x as m}from"./AWZRXR2G.js";import{a as d,g as p}from"./JBLNDPQ4.js";import{fk as x,uj as y}from"./K65MMKQZ.js";import"./54R6KKGA.js";y();var D=h`arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.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);box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}.sticky{position:sticky;top:0;z-index:10}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);calcite-flow{height:100%}}.main-action-bar{border-bottom:var(--arcgis-coding-components-border);flex:0 0 auto;calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}arcgis-arcade-results{border-top:var(--arcgis-coding-components-border);box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}calcite-flow{[slot=footer]{word-break:break-word}}}`,l=class extends u{constructor(){super(...arguments),this._codeEditorElt=E(),this._componentReadyDefer=new d,this._disposables=[],this._editorProfilePromise=Promise.resolve(void 0),this.messages=P(),this._modelId=p(),this._openArcadeHelp=()=>void window.open(b,"Arcade Help"),this._toggleSidePanel=e=>{if(!e.target)return;let i=e.target?.dataset.panelName??"none";this.openedSidePanel=i===this.openedSidePanel?"none":i,this.openedSidePanel==="none"&&this._codeEditorElt.value?.setFocus().catch(console.error)},this._consoleLogs=[],this._executingScript=!1,this._preparingArcade=!1,this._resultPanel="output",this._showExecutionPanel=!1,this.hideDocumentationActions=!1,this.hideSideBar=!1,this.openedSidePanel="none",this.script="",this.sideActionBarExpanded=!1,this.arcgisDiagnosticsChange=r({bubbles:!1}),this.arcgisScriptChange=r({bubbles:!1})}static{this.properties={_apiLibrary:16,_consoleLogs:16,_editorProfile:16,_executingScript:16,_executionResult:16,_preparingArcade:16,_resultPanel:16,_showExecutionPanel:16,editorInstance:32,editorOptions:0,hideDocumentationActions:5,hideSideBar:5,openedSidePanel:3,profile:0,script:1,sideActionBarExpanded:7,snippets:0,suggestions:0,testData:0}}static{this.shadowRootOptions=g}static{this.styles=D}get editorInstance(){return this._codeEditorElt.value?.editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.editorInstance}async getScript(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.value}async getTestResult(){if(!this.testData)return{type:"error",value:"Missing test data",error:null};let e=await this._editorProfilePromise;if(!e)return{type:"error",value:"Missing editor profile",error:null};await this._componentReadyDefer.promise;let i=this._codeEditorElt.value?.value;return await c(e.definition,i,this.testData)}async setFocus(){await this._componentReadyDefer.promise,await this._codeEditorElt.value?.setFocus()}async load(){let e=m("./assets");f(e),await this._updateEditorProfile()}willUpdate(e){(e.has("messages")||e.has("profile"))&&this._updateDataModelDeps(),e.has("testData")&&this._testDataChanged(),e.has("snippets")&&s.updateApiContextForModel(this._modelId,{snippets:this.snippets})}async loaded(){this._componentReadyDefer.resolve(),await this._updateApiLibrary();let e=await v();this._disposables.push(e.onDiagnosticsChange(i=>!this._preparingArcade&&this.arcgisDiagnosticsChange.emit(i.diagnostics))),this.testData&&this._addExecuteScriptAction(),await this._codeEditorElt.value?.setFocus()}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}_testDataChanged(){!this.testData&&this._executeScriptAction&&(this._disposeSafely(this._executeScriptAction),this._executeScriptAction=void 0),this.testData&&!this._executeScriptAction&&this._addExecuteScriptAction(),this._showExecutionPanel&&this._executeScript().catch(console.error)}async _updateEditorProfile(){this._preparingArcade=!0;try{await s.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale,snippets:this.snippets}),this._editorProfile=s.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._editorProfilePromise=Promise.resolve(this._editorProfile),this._preparingArcade=!1}}async _updateApiLibrary(){this._apiLibrary=await s.getApiLibraryForModel(this._modelId)}async _executeScript(){let e=this.testData;if(!this._codeEditorElt.value||!e)return;let i=await this._editorProfilePromise;if(!i){this._executionResult={type:"error",value:"Missing editor profile",error:null};return}this._showExecutionPanel=!0,this._executingScript=!0,this._consoleLogs=[],setTimeout(()=>void(async()=>{let a=this._codeEditorElt.value?.value;this._executionResult=await c(i.definition,a,e,o=>setTimeout(()=>this._consoleLogs=[...this._consoleLogs,o],0)),this._executingScript=!1})(),0)}_toggleShowExecutionPanel(){this._showExecutionPanel=!this._showExecutionPanel}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}_onCodeEditorValueChange(e){e.stopPropagation(),this.script=e.detail,this.arcgisScriptChange.emit(e.detail)}_insertAsSnippet(e){this._codeEditorElt.value?.insertSnippet(e.detail).catch(console.error)}_insertAsText(e){this._codeEditorElt.value?.insertText(e.detail).catch(console.error)}_onResultPanelChange(e){this._resultPanel=e.detail}_onExecutionPanelClose(){this._showExecutionPanel=!1}_addExecuteScriptAction(){let e=this.editorInstance?.addAction({id:"run-script",label:"Run Arcade Expression",keybindings:[x.F5],contextMenuGroupId:"code",contextMenuOrder:1,run:()=>{this.testData&&this._executeScript().catch(console.error)}});e&&(this._executeScriptAction=e,this._disposables.push(e))}_disposeSafely(e){let i=this._disposables.indexOf(e);i!==-1&&this._disposables.splice(i,1),e.dispose()}renderMainActionBar(){return this.testData?t`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${this.messages.run??""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${()=>void this._executeScript().catch(console.error)}></calcite-action>${this._executionResult?t`<calcite-action .text=${this.messages.lastresults??""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>`:null}</calcite-action-group></calcite-action-bar>`:null}renderMainPanel(){return t`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${s.languageId} .value=${this.script??""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${A(this._codeEditorElt)}></arcgis-code-editor>`}renderAction({id:e,label:i,icon:a,active:o,panelName:S,iconFlipRtl:w=!1,onClick:$=this._toggleSidePanel}){return t`<calcite-action id=${e??n} .text=${i} .icon=${a} .active=${o} @click=${$} data-panel-name=${S??n} .iconFlipRtl=${w}></calcite-action>${!this.sideActionBarExpanded&&t`<calcite-tooltip .referenceElement=${e}><span>${i}</span></calcite-tooltip>`||""}`}renderSideActionBar(){return this.hideSideBar?null:t`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({id:"profile-variables-action",label:this.messages.profilevariables??"",icon:"profile-variables",active:this.openedSidePanel==="variables",panelName:"variables"})}${this.renderAction({id:"function-action",label:this.messages.constantsandfunctions??"",icon:"function",active:this.openedSidePanel==="api",panelName:"api"})}${this.suggestions?.length?this.renderAction({id:"suggestions-action",label:this.messages.suggestions??"",icon:"lightbulb",active:this.openedSidePanel==="suggestions",panelName:"suggestions"}):null}${this.hideDocumentationActions?null:this.renderAction({id:"developer-website-action",label:this.messages.help??"",icon:"question",active:!1,panelName:"none",iconFlipRtl:this.messages._lang==="ar",onClick:this._openArcadeHelp})}</calcite-action-group></calcite-action-bar>`}renderSidePanel(){if(this.hideSideBar)return null;switch(this.openedSidePanel){case"api":return t`<arcgis-language-api-panel class="side-panel flex-panel border-inline-start" .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-language-api-panel>`;case"variables":return t`<arcgis-editor-variables class="side-panel flex-panel border-inline-start" .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile}></arcgis-editor-variables>`;case"suggestions":return t`<arcgis-arcade-suggestions class="side-panel flex-panel border-inline-start" .suggestions=${this.suggestions} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>`;default:return null}}renderResultsPanel(){return this._showExecutionPanel?t`<arcgis-arcade-results class="flex-adjustable" .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisOpenedResultPanelChange=${this._onResultPanelChange} @arcgisClose=${this._onExecutionPanelClose}></arcgis-arcade-results>`:null}render(){return t`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`}};_("arcgis-arcade-editor",l);export{l as ArcgisArcadeEditor};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.17
|
|
5
5
|
*/
|
|
6
|
-
import{rk as s}from"./
|
|
6
|
+
import{rk as s}from"./K65MMKQZ.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,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.17
|
|
5
5
|
*/
|
|
6
|
-
import{a as C,c as i,d as l,e as h}from"./
|
|
6
|
+
import{a as C,c as i,d as l,e as h}from"./CB7FNZGQ.js";import{c as F}from"./JRQTAI77.js";import"./ZS5XSXBA.js";import{a as y,u as T}from"./JBLNDPQ4.js";import{ek as P,ik as k,lk as g,qk as f,uj as z}from"./K65MMKQZ.js";import"./54R6KKGA.js";z();var j={False:"false",Null:"null",True:"true"},$={Break:"break",Continue:"continue",Else:"else",For:"for",From:"from",Function:"function",If:"if",Import:"import",Export:"export",In:"in",Return:"return",Var:"var",While:"while"};var O=["++","--"],V=["-","+","!","~"],W=["=","/=","*=","%=","+=","-="],R=["||","&&"],K=["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"];var s={InvalidModuleUri:"InvalidModuleUri",ForInOfLoopInitializer:"ForInOfLoopInitializer",IdentiferExpected:"IdentiferExpected",InvalidEscapedReservedWord:"InvalidEscapedReservedWord",InvalidExpression:"InvalidExpression",InvalidFunctionIdentifier:"InvalidFunctionIdentifier",InvalidHexEscapeSequence:"InvalidHexEscapeSequence",InvalidLeftHandSideInAssignment:"InvalidLeftHandSideInAssignment",InvalidLeftHandSideInForIn:"InvalidLeftHandSideInForIn",InvalidTemplateHead:"InvalidTemplateHead",InvalidVariableAssignment:"InvalidVariableAssignment",KeyMustBeString:"KeyMustBeString",NoFunctionInsideBlock:"NoFunctionInsideBlock",NoFunctionInsideFunction:"NoFunctionInsideFunction",ModuleExportRootOnly:"ModuleExportRootOnly",ModuleImportRootOnly:"ModuleImportRootOnly",PunctuatorExpected:"PunctuatorExpected",TemplateOctalLiteral:"TemplateOctalLiteral",UnexpectedBoolean:"UnexpectedBoolean",UnexpectedEndOfScript:"UnexpectedEndOfScript",UnexpectedIdentifier:"UnexpectedIdentifier",UnexpectedKeyword:"UnexpectedKeyword",UnexpectedNull:"UnexpectedNull",UnexpectedNumber:"UnexpectedNumber",UnexpectedPunctuator:"UnexpectedPunctuator",UnexpectedString:"UnexpectedString",UnexpectedTemplate:"UnexpectedTemplate",UnexpectedToken:"UnexpectedToken"},H={[s.InvalidModuleUri]:"Module uri must be a text literal.",[s.ForInOfLoopInitializer]:"for-in loop variable declaration may not have an initializer.",[s.IdentiferExpected]:"'${value}' is an invalid identifier.",[s.InvalidEscapedReservedWord]:"Keyword cannot contain escaped characters.",[s.InvalidExpression]:"Invalid expression.",[s.InvalidFunctionIdentifier]:"'${value}' is an invalid function identifier.",[s.InvalidHexEscapeSequence]:"Invalid hexadecimal escape sequence.",[s.InvalidLeftHandSideInAssignment]:"Invalid left-hand side in assignment.",[s.InvalidLeftHandSideInForIn]:"Invalid left-hand side in for-in.",[s.InvalidTemplateHead]:"Invalid template structure.",[s.InvalidVariableAssignment]:"Invalid variable assignment.",[s.KeyMustBeString]:"Object property keys must be a word starting with a letter.",[s.NoFunctionInsideBlock]:"Functions cannot be declared inside of code blocks.",[s.NoFunctionInsideFunction]:"Functions cannot be declared inside another function.",[s.ModuleExportRootOnly]:"Module exports cannot be declared inside of code blocks.",[s.ModuleImportRootOnly]:"Module import cannot be declared inside of code blocks.",[s.PunctuatorExpected]:"'${value}' expected.",[s.TemplateOctalLiteral]:"Octal literals are not allowed in template literals.",[s.UnexpectedBoolean]:"Unexpected boolean literal.",[s.UnexpectedEndOfScript]:"Unexpected end of Arcade expression.",[s.UnexpectedIdentifier]:"Unexpected identifier.",[s.UnexpectedKeyword]:"Unexpected keyword.",[s.UnexpectedNull]:"Unexpected null literal.",[s.UnexpectedNumber]:"Unexpected number.",[s.UnexpectedPunctuator]:"Unexpected ponctuator.",[s.UnexpectedString]:"Unexpected text literal.",[s.UnexpectedTemplate]:"Unexpected quasi '${value}'.",[s.UnexpectedToken]:"Unexpected token '${value}'."};var E=[[],[],[]];O.forEach(t=>E[t.length-1]?.push(t));V.forEach(t=>E[t.length-1]?.push(t));R.forEach(t=>E[t.length-1]?.push(t));W.forEach(t=>E[t.length-1]?.push(t));K.forEach(t=>E[t.length-1]?.push(t));var a={AlreadyDefined:"AlreadyDefined",ApiConflict:"ApiConflict",AssignedNeverUsed:"AssignedNeverUsed",DefinedNeverAssigned:"DefinedNeverAssigned",DefinedNeverUsed:"DefinedNeverUsed",EmptyBlockStatement:"EmptyBlockStatement",ExecutionError:"ExecutionError",InvalidApiFunctionUsage:"InvalidApiFunctionUsage",InvalidConstantIdentifier:"InvalidConstantIdentifier",InvalidPropertyIdentifier:"InvalidPropertyIdentifier",NoArgumentExpected:"NoArgumentExpected",NotADictionary:"NotADictionary",NotDefined:"NotDefined",NotEnoughArguments:"NotEnoughArguments",ProfileVariablesAreImmutable:"ProfileVariablesAreImmutable",ProfileVariablesConflict:"ProfileVariablesConflict",ReservedKeyword:"ReservedKeyword",TooManyArguments:"TooManyArguments",UnexpectedEmptyFunction:"UnexpectedEmptyFunction",UnexpectedPropertyIdentifier:"UnexpectedPropertyIdentifier",UnknownPropertyIdentifier:"UnknownPropertyIdentifier"},se={[a.AlreadyDefined]:"'${identifier}' is already defined.",[a.ApiConflict]:"'${identifier}' is already defined as an Arcade constant or function.",[a.AssignedNeverUsed]:"'${identifier}' is assigned but never used.",[a.DefinedNeverAssigned]:"'${identifier}' is defined but never assigned.",[a.DefinedNeverUsed]:"'${identifier}' is defined but never used.",[a.EmptyBlockStatement]:"Empty block statement.",[a.ExecutionError]:"Execution Error: '${stack}'",[a.InvalidApiFunctionUsage]:"Arcade function '${identifier}' not used in a call expression.",[a.InvalidConstantIdentifier]:"Invalid constant identifier, expecting ${list}.",[a.InvalidPropertyIdentifier]:"Invalid property identifier, expecting ${list}.",[a.NoArgumentExpected]:"Expecting no argument.",[a.NotADictionary]:"'${identifier}' doesn't have properties.",[a.NotDefined]:"'${identifier}' is not defined.",[a.NotEnoughArguments]:"Expecting at least ${min} argument(s).",[a.ProfileVariablesAreImmutable]:"Profile variables cannot be modified.",[a.ProfileVariablesConflict]:"'${identifier}' is already defined as a profile variable.",[a.ReservedKeyword]:"'${identifier}' is a reserved keyword.",[a.TooManyArguments]:"Too many arguments, expecting ${max}.",[a.UnexpectedEmptyFunction]:"Unexpected empty function '${identifier}'.",[a.UnexpectedPropertyIdentifier]:"Unexpected property identifier.",[a.UnknownPropertyIdentifier]:"Unknown property identifier '${identifier}'.",...H};var w=Object.values($),q=Object.values(j);var le=q.map(t=>({label:t,kind:i.Constant})),ce=w.map(t=>({label:t,kind:i.Keyword})),he=[{label:"exportfunction",kind:i.Snippet,detail:"Export Function Statement",insertText:`export function \${1:functionName} ($2) {
|
|
7
7
|
$0
|
|
8
8
|
}`,insertTextMode:h.adjustIndentation,insertTextFormat:l.Snippet},{label:"exportvar",kind:i.Snippet,detail:"Export Variable Statement",insertText:"export var ${0:variableName}\n",insertTextMode:h.adjustIndentation,insertTextFormat:l.Snippet},{label:"for",kind:i.Snippet,detail:"For Loop Statement",insertText:"for (var ${1:i} = 0; ${1:i} < ${2:array.length}; ${1:i}++) {\n $0\n}",insertTextMode:h.adjustIndentation,insertTextFormat:l.Snippet},{label:"forin",kind:i.Snippet,detail:"For-In Loop Statement",insertText:"for (var ${1:i} in ${2:arrayOrObject}) {\n $0\n}",insertTextMode:h.adjustIndentation,insertTextFormat:l.Snippet},{label:"function",kind:i.Snippet,detail:"Function Statement",insertText:`function \${1:functionName} ($2) {
|
|
9
9
|
$0
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.17
|
|
5
5
|
*/
|
|
6
|
-
import{a as b,e as p,f as I,j as Nt,l as kt,q as yt,r as Ut,t as Rt}from"./2OJIERSK.js";function Mt(e,t){if(t){let o=e.constructor.elementProperties;e.manager.internals.members=Object.fromEntries(Array.from(o,([s,r])=>r.noAccessor?void 0:[s,[(r.readOnly?2048:0)|(r.state?32:16)]]).filter(Rt))}else{let o=e.constructor,s=o.__registerControllers?.(e)??void 0;if(o.__registerControllers=void 0,typeof s!="object")throw new Error("Failed to retrieve component meta");e.manager.internals.members=Object.fromEntries(Object.entries(s).filter(([r,[n]])=>(n&63)!==0))}}function jt(e,t=8){return e==null||typeof e=="object"||typeof e=="function"?e:t&4?e==="false"?!1:e===""||!!e:t&2?Number.parseFloat(e):t&1?String(e):e}var Vt=(e,t)=>e.manager.internals.members?.[t]?.[0];var tt=Symbol.for("controller");var Wt=e=>typeof e=="object"&&e!==null&&(tt in e||"hostConnected"in e||"hostDisconnected"in e||"hostUpdate"in e||"hostUpdated"in e);var W;function x(e){W!==e&&(W=e,queueMicrotask(()=>{W===e&&(W=void 0)}))}function G(e){return W}var P=[];function et(e){if(e===void 0){P=[];return}let t=P.indexOf(e);P=t===-1?[...P,e]:P.slice(0,t+1),queueMicrotask(()=>{P=[]})}function zt(){return P}var M;function Se(e){M!==e&&(M=e,queueMicrotask(()=>{M===e&&(M=void 0)}))}function Pe(){let e=M;return M=void 0,e}var Le=async(e,t)=>{let o=vt(e);if(o===void 0)return e;if(await o.ready,typeof t=="function"){let s=o.watchExports(r=>t(r,s))}return o.exports},xe=async e=>{let t=vt(e);return await t.ready,t},vt=e=>{let t=Pe();if(t!==void 0)return t;let s=G().manager.internals.resolveExports(e);if(s!==void 0)return s;if(Wt(e))return e},z={setter:!1,getter:!1,readOnly:!1},B=new WeakMap,Bt;Bt=tt;var bt=class{constructor(e){this._callbacks={hostConnected:[],hostDisconnected:[],hostLoad:[],hostLoaded:[],hostUpdate:[],hostUpdated:[],hostDestroy:[],hostLifecycle:[]},this._ready=new b,this._lifecycleCleanups=[],this.connectedCalled=!1,this._loadCalled=!1,this.loadedCalled=!1,this[Bt]=!0,this.ready=this._ready.promise,this._exports=It(this),this._exportWatchers=new Set;let t=e??G(new.target.name);this.component=t,this.component.addController(this),et(this),this.component.manager===void 0||queueMicrotask(()=>this.catchUpLifecycle())}catchUpLifecycle(){let{manager:e}=this.component;e.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),e._loadCalled&&this.triggerLoad().then(()=>{e.loadedCalled&&this.triggerLoaded()}).catch(console.error)}get exports(){return this._exports}set exports(e){let t=this._exports;t!==e&&(this._exports=e,this._exportWatchers.forEach(p),this.connectedCalled&&this.assignedProperty!==!1&&this.component.requestUpdate(this.assignedProperty,t)),this._ready.resolve(e)}setProvisionalExports(e,t=!0){this._exports=t?It(e):e,this._exportWatchers.forEach(p)}watchExports(e){let t=()=>e(this._exports);return this._exportWatchers.add(t),()=>void this._exportWatchers.delete(t)}get use(){return x(this.component),Le}get useRef(){return x(this.component),xe}get useRefSync(){return x(this.component),vt}controllerRemoved(){this.component.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(e){this._callbacks.hostConnected.push(e)}onDisconnected(e){this._callbacks.hostDisconnected.push(e)}onLoad(e){this._callbacks.hostLoad.push(e)}onLoaded(e){this._callbacks.hostLoaded.push(e)}onUpdate(e){this._callbacks.hostUpdate.push(e)}onUpdated(e){this._callbacks.hostUpdated.push(e)}onDestroy(e){this._callbacks.hostDestroy.push(e)}onLifecycle(e){this._callbacks.hostLifecycle.push(e),this.connectedCalled&&this.component.el.isConnected&&this._callLifecycle(e)}triggerConnected(){let e=this;e.hostConnected&&p(e.hostConnected,e),this._callbacks.hostConnected.forEach(p),this.triggerLifecycle(),this.connectedCalled=!0}triggerDisconnected(){let e=this;e.hostDisconnected&&p(e.hostDisconnected,e),this._callbacks.hostDisconnected.forEach(p),this._lifecycleCleanups.forEach(p),this._lifecycleCleanups=[]}async triggerLoad(){if(this._loadCalled)return;this._loadCalled=!0;let e=this;e.hostLoad&&await I(e.hostLoad,e),this._callbacks.hostLoad.length>0&&await Promise.allSettled(this._callbacks.hostLoad.map(I)),this._ready.resolve(this._exports)}triggerLoaded(){if(this.loadedCalled)return;let e=this;e.hostLoaded&&p(e.hostLoaded,e),this._callbacks.hostLoaded.forEach(p),this.loadedCalled=!0}triggerUpdate(e){let t=this;t.hostUpdate&&p(t.hostUpdate,t,e),this._callbacks.hostUpdate.forEach(Ht,e)}triggerUpdated(e){let t=this;t.hostUpdated&&p(t.hostUpdated,t,e),this._callbacks.hostUpdated.forEach(Ht,e)}triggerDestroy(){let e=this;e.hostDestroy&&p(e.hostDestroy,e),this._callbacks.hostDestroy.forEach(p)}triggerLifecycle(){let e=this;e.hostLifecycle&&this._callLifecycle(()=>e.hostLifecycle()),this._callbacks.hostLifecycle.forEach(this._callLifecycle,this)}_callLifecycle(e){x(this.component);let t=p(e);(Array.isArray(t)?t:[t]).forEach(s=>{typeof s=="function"?this._lifecycleCleanups.push(s):typeof s=="object"&&typeof s.remove=="function"&&this._lifecycleCleanups.push(s.remove)})}};function Ht(e){p(e,void 0,this)}var Gt=bt;function It(e){if(typeof e!="object"&&typeof e!="function"||e===null)return e;let t=new Proxy(e,{get(o,s,r){if(!(De.has(s)&&s in o&&o[s]===t)&&(s in o||s in Promise.prototype||typeof s=="symbol"))return typeof o=="function"?o[s]:Reflect.get(o,s,r)},set:(o,s,r,n)=>Reflect.set(o,s,r,n)});return t}var De=new Set(["exports","_exports"]);function ot(e,t,o){let s=Object.keys(e),r=s.length;L===void 0&&queueMicrotask(q),L??(L=new Map);let n=L.get(e);return n===void 0&&(n={callbacks:[],keyCount:r},L.set(e,n)),n.keyCount!==r&&(n.callbacks.forEach(i=>i(s)),n.callbacks=[],n.keyCount=r),n.callbacks.push(i=>{let c=l=>p(t,null,l),a=i[r];a===void 0?c(void 0):e[a]===o?c(a):c(void 0)}),o}var L=void 0;function q(){Array.from(L?.entries()??[]).forEach(([e,{callbacks:t}])=>{let o=Object.keys(e);t.forEach(s=>s(o))}),L=void 0}function st(e,t,o){var s;let r=t,n=e.manager.internals;(s=n.allWatchers)[r]??(s[r]=[]);let i=n.allWatchers[r],c=o,a=(l,d,h)=>p(c,null,l,d,h);return i.push(a),()=>{let l=i.indexOf(a);l!==-1&&i.splice(l,1)}}var qt=class{constructor(e){this.enabledWatchers={},this.allWatchers={},this.enableReadonly=()=>{if(this.enableReadonly=void 0,!this.component.manager.isLit)return;let t=this.component.manager.internals;Object.entries(t.members).forEach(([o,[s]])=>{var r;s&2048&&((r=t.setters)[o]??(r[o]=[]),t.setters[o].push(t.readonlySetter))})},this.trackedValue=_t,this.keyTrackers=[],this.getters={},this.setters={},this.accessorGetter={},this.accessorSetter={},this._exports=new WeakMap,this.readonlySetter=(t,o,s)=>{if(z.readOnly)return t;throw new Error(`Cannot assign to read-only property "${s}" of ${this.component.el.tagName.toLowerCase()}. Trying to assign "${String(t)}"`)},this.component=e}firePropTrackers(e,t){let o=this.keyTrackers;this.trackedValue=_t,this.keyTrackers=[],o.forEach(s=>s(e,t))}getSetProxy(e){let t=this.component,o=t.constructor.prototype;if(this._getSetProxy(o,e,"class"),t.manager.isLit)return;let s=t.el.constructor.prototype;o!==s&&this._getSetProxy(s,e,"html")}_getSetProxy(e,t,o){let s=this.component,r=Vt(s,t),n;do n=Object.getOwnPropertyDescriptor(e,t);while(!n&&(e=Object.getPrototypeOf(e)));if(!n)return;let i=n.get,c=n.set,a=X in i,l=X in c;if(a&&l)return;let d=!a,h=!l,f=d?function(){let _=i.call(this),E=B.get(this);if(z.getter||E===void 0)return _;let R=E.manager.internals;_=R.accessorGetter[t](_,t);let y=R.getters[t]??gt;for(let C=0;C<y.length;C++)_=y[C](_,t);return _}:i,g=h?function(_){let E=i.call(this),R=B.get(this);if(R===void 0){c.call(this,_);return}let y=R.manager.isLit?_??void 0:jt(_,r),C=R.manager.internals;if(y===E)c.call(this,y);else{let Tt=z.setter?gt:C.setters[t]??gt;for(let H=0;H<Tt.length&&(y=Tt[H](y,E,t),y!==E);H++);y=C.accessorSetter[t](y,E,t),c.call(this,y),y!==E&&C.enabledWatchers[t]?.forEach(H=>H(y,E,t))}C.keyTrackers.length>0&&C?.firePropTrackers(t,_)}:c;d&&(f[X]=!0),h&&(g[X]=!0),Object.defineProperty(e,t,{...n,get:f,set:g})}markExports(e,t){(typeof t=="object"&&t!==null||typeof t=="function")&&this._exports.set(t,e)}resolveExports(e){if(typeof e=="object"&&e!==null||typeof e=="function")return this._exports.get(e)}},gt=[],X=Symbol(),_t=Symbol();function Ft(e,t,o){let s=e.manager.internals;return s.trackedValue!==_t&&s.trackedValue!==o&&s.firePropTrackers(void 0,void 0),s.keyTrackers.length===0&&queueMicrotask(()=>s.firePropTrackers(void 0,void 0)),s.trackedValue=o,s.keyTrackers.push((r,n)=>p(t,void 0,o===n?r:void 0)),o}function Kt(e,t,o){let s=Array.isArray(e)?e:[e],r=s.length+1,n=c=>{r-=1,c!==void 0&&(r=Math.min(r,0)),r===0&&t(c)};s.forEach(c=>ot(c,a=>n(a===void 0?void 0:{key:a,host:c,isReactive:!1}),o));let i=s.find(c=>"manager"in c&&typeof c.manager=="object"&&c.manager.component===c);return i&&Ft(i,c=>n(c===void 0?void 0:{key:c,host:i,isReactive:!0}),o),o}function Yt(e){z.readOnly=!0;try{return e()}finally{z.readOnly=!1}}var Jt=e=>(...t)=>{let o=zt(),s=new e(...t),r=s.exports;et(o.at(-1));let n=s.component.manager.internals;n.markExports(s,r),s.watchExports(c=>n.markExports(s,c)),Se(s);let i=[s.component,...o].reverse();return Kt(i,c=>c===void 0?void 0:Te(s,c,r),r)};function Te(e,{host:t,key:o,isReactive:s},r){let n=t,i=n[o]!==e.exports,c=n[o]!==r,a=r!==e.exports;if(i&&!c&&a&&(n[o]=e.exports),t===e.component){if(s){let d=e.component.manager.internals;c&&d.markExports(e,n[o]),st(e.component,o,h=>{h!==e.exports&&d.markExports(e,h)})}e.assignedProperty=s?void 0:o}e.watchExports(()=>{if(n[o]===e.exports)return;let d=e.component.manager;d.internals.setters[o]?.includes(d.internals.readonlySetter)?Yt(()=>{n[o]=e.exports}):n[o]=e.exports})}var Zt=(e,t)=>new Ne(e,t),Ne=class extends Gt{constructor(e,t){let o="addController"in e,s=new Set;function r(a){s.add(a),!(tt in a)&&e.renderRoot&&e.el.isConnected&&a.hostConnected?.()}function n(a){s.delete(a),a.controllerRemoved?.()}let i=e;if(i.addController=r,i.removeController=n,!o){let a=t??e.constructor.__forceUpdate;i.requestUpdate=()=>a(e)}super(e),this.internals=new qt(this.component),this.destroyed=!1,this._updatePromise=new b,this._originalLifecycles={},this.isLit=o,this.component.manager=this,Mt(e,o),this._controllers=s,this.exports=void 0,this.hasDestroy=Et in this.component&&typeof this.component.destroy=="function",this._bindLifecycleMethods();let c=this.internals;Object.keys(c.members).forEach(a=>{c.accessorGetter[a]=Qt,c.accessorSetter[a]=Qt,c.getSetProxy(a)}),o?this.internals.enabledWatchers=this.internals.allWatchers:Object.defineProperty(e,"updateComplete",{get:async()=>await this._updatePromise.promise}),queueMicrotask(c.enableReadonly),et(void 0),x(e),B.set(e.el,e),B.set(e,e)}_bindLifecycleMethods(){let e=this.component,t=this.isLit,o=e.el===e;this._originalLifecycles={_connectedCallback:t||o?void 0:e.connectedCallback,_disconnectedCallback:t||o?void 0:e.disconnectedCallback,_load:t?e.load:e.componentWillLoad,_loaded:t?e.loaded:e.componentDidLoad,_willUpdate:t?void 0:e.componentWillUpdate,_updated:t?void 0:e.componentDidUpdate,_destroy:e.destroy};let s=this._connectedCallback.bind(this),r=this._disconnectedCallback.bind(this),n=this._update.bind(this),i=this._updated.bind(this);t?e.constructor.prototype.addController.call(e,{hostConnected:s,hostDisconnected:r,hostUpdate:n,hostUpdated:i}):(e.connectedCallback=s,e.disconnectedCallback=r,e.componentWillLoad=this._load.bind(this),e.componentDidLoad=this._loaded.bind(this),e.componentWillUpdate=n,e.componentDidUpdate=i),this.hasDestroy&&(e.destroy=this.destroy.bind(this))}_connectedCallback(){if(this.destroyed){let t=this.component.el.tagName.toLowerCase();throw this.component.el.remove(),new Error(`The ${t} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${Et} prop.`)}this._autoDestroyTimeout!==void 0&&clearTimeout(this._autoDestroyTimeout);let e=this.internals;e.enabledWatchers=e.allWatchers,q(),e.enableReadonly?.(),this._controllers.forEach(Ue),this._originalLifecycles._connectedCallback?.call(this.component)}_disconnectedCallback(){this.destroyed||(this._controllers.forEach(Re),this._originalLifecycles._disconnectedCallback?.call(this.component),this.hasDestroy&&this._setAutoDestroyTimeout())}async _load(){await Promise.allSettled(Array.from(this._controllers,Me)),await this._originalLifecycles._load?.call(this.component),this.hasDestroy&&st(this.component,Et,()=>this._setAutoDestroyTimeout())}_loaded(){this._controllers.forEach(je),this._originalLifecycles._loaded?.call(this.component)}_update(){let e=this.component;this._controllers.forEach(Ve,e.$changes),this._originalLifecycles._willUpdate?.call(this.component)}_updated(){let e=this.component;if(this._controllers.forEach(He,e.$changes),this._originalLifecycles._updated?.call(this.component),this.isLit)e.$changes=new Map;else{let t=this._updatePromise;this._updatePromise=new b,t.resolve(!0)}}async destroy(){if(!this.destroyed){if(this.component.el.isConnected){this.hasDestroy=!1;try{this.component.el.remove()}finally{this.hasDestroy=!0}}this._autoDestroyTimeout=void 0,this.destroyed=!0,this._controllers.forEach(Ie),this._controllers.clear(),await this._originalLifecycles._destroy?.call(this.component)}}_setAutoDestroyTimeout(){if(this._autoDestroyTimeout!==void 0&&clearTimeout(this._autoDestroyTimeout),!this.component.el.isConnected&&!this.component.autoDestroyDisabled){let e=()=>void this.destroy().catch(console.error);this._autoDestroyTimeout=Ut(e,ke)}}},Et="autoDestroyDisabled",ke=1e3;var Qt=e=>e;function Ue(e){"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)}function Re(e){"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e)}async function Me(e){"triggerLoad"in e?await e.triggerLoad():await I(e.hostLoad,e)}function je(e){"triggerLoaded"in e?e.triggerLoaded():p(e.hostLoaded,e)}function Ve(e){"triggerUpdate"in e?e.triggerUpdate(this):p(e.hostUpdate,e,this)}function He(e){"triggerUpdated"in e?e.triggerUpdated(this):p(e.hostUpdated,e,this)}function Ie(e){"triggerDestroy"in e?e.triggerDestroy():p(e.hostDestroy,e)}var Xt=e=>ze(void 0,e);var We=class extends bt{constructor(e,t){super(e);let o=this.exports;try{x(this.component);let s=t(this.component,this),r=this.exports!==o;if(s instanceof Promise){r||this.setProvisionalExports(s);let n=s.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this._ready.reject(i),console.error(i)});this.onLoad(async()=>await n)}else(!r||s!==void 0)&&(this.exports=s),queueMicrotask(()=>super.catchUpLifecycle())}catch(s){this._ready.reject(s),console.error(s)}}catchUpLifecycle(){}},ze=Jt(We);var Mo=Xt;var Vo=e=>(t={})=>Xt((o,s)=>{let r=Nt(o.el),n={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},i=o;queueMicrotask(()=>s.onLifecycle(()=>kt(o.el,e("./assets"),({t9nLocale:a,t9nStrings:l,lang:d})=>{let h={...l,_lang:d,_t9nLocale:a,_loading:!1};s.exports=h;let f=l.componentLabel??l.widgetLabel;typeof f=="string"&&"label"in o&&o.label==null&&(o.label??(o.label=f)),c(i.messageOverrides)},t.name)));function c(a){let l=s.exports,d=l._original??l,h=te(d,a);a&&(h._original=d),s.exports=h}return"messageOverrides"in i&&s.onLifecycle(()=>st(i,"messageOverrides",c)),t.blocking?(s.setProvisionalExports(n,!1),s.ready):n});function te(e,t){if(!t)return e;let o={...e};return Object.entries(t).forEach(([s,r])=>{typeof r=="object"?o[s]=te(e[s],r):o[s]=r??e[s]}),o}var rt=globalThis,nt=rt.ShadowRoot&&(rt.ShadyCSS===void 0||rt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ct=Symbol(),ee=new WeakMap,F=class{constructor(t,o,s){if(this._$cssResult$=!0,s!==Ct)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=o}get styleSheet(){let t=this.o,o=this.t;if(nt&&t===void 0){let s=o!==void 0&&o.length===1;s&&(t=ee.get(o)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&ee.set(o,t))}return t}toString(){return this.cssText}},oe=e=>new F(typeof e=="string"?e:e+"",void 0,Ct),Be=(e,...t)=>{let o=e.length===1?e[0]:t.reduce((s,r,n)=>s+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1],e[0]);return new F(o,e,Ct)},$t=(e,t)=>{if(nt)e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let s=document.createElement("style"),r=rt.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=o.cssText,e.appendChild(s)}},it=nt?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let o="";for(let s of t.cssRules)o+=s.cssText;return oe(o)})(e):e;var At=globalThis,at=At.trustedTypes,se=at?at.createPolicy("lit-html",{createHTML:e=>e}):void 0,Ot="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,St="?"+$,Ge=`<${St}>`,N=document,Y=()=>N.createComment(""),J=e=>e===null||typeof e!="object"&&typeof e!="function",Pt=Array.isArray,le=e=>Pt(e)||typeof e?.[Symbol.iterator]=="function",wt=`[
|
|
6
|
+
import{a as b,e as p,f as I,j as Nt,l as kt,q as yt,r as Ut,t as Rt}from"./JBLNDPQ4.js";function Mt(e,t){if(t){let o=e.constructor.elementProperties;e.manager.internals.members=Object.fromEntries(Array.from(o,([s,r])=>r.noAccessor?void 0:[s,[(r.readOnly?2048:0)|(r.state?32:16)]]).filter(Rt))}else{let o=e.constructor,s=o.__registerControllers?.(e)??void 0;if(o.__registerControllers=void 0,typeof s!="object")throw new Error("Failed to retrieve component meta");e.manager.internals.members=Object.fromEntries(Object.entries(s).filter(([r,[n]])=>(n&63)!==0))}}function jt(e,t=8){return e==null||typeof e=="object"||typeof e=="function"?e:t&4?e==="false"?!1:e===""||!!e:t&2?Number.parseFloat(e):t&1?String(e):e}var Vt=(e,t)=>e.manager.internals.members?.[t]?.[0];var tt=Symbol.for("controller");var Wt=e=>typeof e=="object"&&e!==null&&(tt in e||"hostConnected"in e||"hostDisconnected"in e||"hostUpdate"in e||"hostUpdated"in e);var W;function x(e){W!==e&&(W=e,queueMicrotask(()=>{W===e&&(W=void 0)}))}function G(e){return W}var P=[];function et(e){if(e===void 0){P=[];return}let t=P.indexOf(e);P=t===-1?[...P,e]:P.slice(0,t+1),queueMicrotask(()=>{P=[]})}function zt(){return P}var M;function Se(e){M!==e&&(M=e,queueMicrotask(()=>{M===e&&(M=void 0)}))}function Pe(){let e=M;return M=void 0,e}var Le=async(e,t)=>{let o=vt(e);if(o===void 0)return e;if(await o.ready,typeof t=="function"){let s=o.watchExports(r=>t(r,s))}return o.exports},xe=async e=>{let t=vt(e);return await t.ready,t},vt=e=>{let t=Pe();if(t!==void 0)return t;let s=G().manager.internals.resolveExports(e);if(s!==void 0)return s;if(Wt(e))return e},z={setter:!1,getter:!1,readOnly:!1},B=new WeakMap,Bt;Bt=tt;var bt=class{constructor(e){this._callbacks={hostConnected:[],hostDisconnected:[],hostLoad:[],hostLoaded:[],hostUpdate:[],hostUpdated:[],hostDestroy:[],hostLifecycle:[]},this._ready=new b,this._lifecycleCleanups=[],this.connectedCalled=!1,this._loadCalled=!1,this.loadedCalled=!1,this[Bt]=!0,this.ready=this._ready.promise,this._exports=It(this),this._exportWatchers=new Set;let t=e??G(new.target.name);this.component=t,this.component.addController(this),et(this),this.component.manager===void 0||queueMicrotask(()=>this.catchUpLifecycle())}catchUpLifecycle(){let{manager:e}=this.component;e.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),e._loadCalled&&this.triggerLoad().then(()=>{e.loadedCalled&&this.triggerLoaded()}).catch(console.error)}get exports(){return this._exports}set exports(e){let t=this._exports;t!==e&&(this._exports=e,this._exportWatchers.forEach(p),this.connectedCalled&&this.assignedProperty!==!1&&this.component.requestUpdate(this.assignedProperty,t)),this._ready.resolve(e)}setProvisionalExports(e,t=!0){this._exports=t?It(e):e,this._exportWatchers.forEach(p)}watchExports(e){let t=()=>e(this._exports);return this._exportWatchers.add(t),()=>void this._exportWatchers.delete(t)}get use(){return x(this.component),Le}get useRef(){return x(this.component),xe}get useRefSync(){return x(this.component),vt}controllerRemoved(){this.component.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(e){this._callbacks.hostConnected.push(e)}onDisconnected(e){this._callbacks.hostDisconnected.push(e)}onLoad(e){this._callbacks.hostLoad.push(e)}onLoaded(e){this._callbacks.hostLoaded.push(e)}onUpdate(e){this._callbacks.hostUpdate.push(e)}onUpdated(e){this._callbacks.hostUpdated.push(e)}onDestroy(e){this._callbacks.hostDestroy.push(e)}onLifecycle(e){this._callbacks.hostLifecycle.push(e),this.connectedCalled&&this.component.el.isConnected&&this._callLifecycle(e)}triggerConnected(){let e=this;e.hostConnected&&p(e.hostConnected,e),this._callbacks.hostConnected.forEach(p),this.triggerLifecycle(),this.connectedCalled=!0}triggerDisconnected(){let e=this;e.hostDisconnected&&p(e.hostDisconnected,e),this._callbacks.hostDisconnected.forEach(p),this._lifecycleCleanups.forEach(p),this._lifecycleCleanups=[]}async triggerLoad(){if(this._loadCalled)return;this._loadCalled=!0;let e=this;e.hostLoad&&await I(e.hostLoad,e),this._callbacks.hostLoad.length>0&&await Promise.allSettled(this._callbacks.hostLoad.map(I)),this._ready.resolve(this._exports)}triggerLoaded(){if(this.loadedCalled)return;let e=this;e.hostLoaded&&p(e.hostLoaded,e),this._callbacks.hostLoaded.forEach(p),this.loadedCalled=!0}triggerUpdate(e){let t=this;t.hostUpdate&&p(t.hostUpdate,t,e),this._callbacks.hostUpdate.forEach(Ht,e)}triggerUpdated(e){let t=this;t.hostUpdated&&p(t.hostUpdated,t,e),this._callbacks.hostUpdated.forEach(Ht,e)}triggerDestroy(){let e=this;e.hostDestroy&&p(e.hostDestroy,e),this._callbacks.hostDestroy.forEach(p)}triggerLifecycle(){let e=this;e.hostLifecycle&&this._callLifecycle(()=>e.hostLifecycle()),this._callbacks.hostLifecycle.forEach(this._callLifecycle,this)}_callLifecycle(e){x(this.component);let t=p(e);(Array.isArray(t)?t:[t]).forEach(s=>{typeof s=="function"?this._lifecycleCleanups.push(s):typeof s=="object"&&typeof s.remove=="function"&&this._lifecycleCleanups.push(s.remove)})}};function Ht(e){p(e,void 0,this)}var Gt=bt;function It(e){if(typeof e!="object"&&typeof e!="function"||e===null)return e;let t=new Proxy(e,{get(o,s,r){if(!(De.has(s)&&s in o&&o[s]===t)&&(s in o||s in Promise.prototype||typeof s=="symbol"))return typeof o=="function"?o[s]:Reflect.get(o,s,r)},set:(o,s,r,n)=>Reflect.set(o,s,r,n)});return t}var De=new Set(["exports","_exports"]);function ot(e,t,o){let s=Object.keys(e),r=s.length;L===void 0&&queueMicrotask(q),L??(L=new Map);let n=L.get(e);return n===void 0&&(n={callbacks:[],keyCount:r},L.set(e,n)),n.keyCount!==r&&(n.callbacks.forEach(i=>i(s)),n.callbacks=[],n.keyCount=r),n.callbacks.push(i=>{let c=l=>p(t,null,l),a=i[r];a===void 0?c(void 0):e[a]===o?c(a):c(void 0)}),o}var L=void 0;function q(){Array.from(L?.entries()??[]).forEach(([e,{callbacks:t}])=>{let o=Object.keys(e);t.forEach(s=>s(o))}),L=void 0}function st(e,t,o){var s;let r=t,n=e.manager.internals;(s=n.allWatchers)[r]??(s[r]=[]);let i=n.allWatchers[r],c=o,a=(l,d,h)=>p(c,null,l,d,h);return i.push(a),()=>{let l=i.indexOf(a);l!==-1&&i.splice(l,1)}}var qt=class{constructor(e){this.enabledWatchers={},this.allWatchers={},this.enableReadonly=()=>{if(this.enableReadonly=void 0,!this.component.manager.isLit)return;let t=this.component.manager.internals;Object.entries(t.members).forEach(([o,[s]])=>{var r;s&2048&&((r=t.setters)[o]??(r[o]=[]),t.setters[o].push(t.readonlySetter))})},this.trackedValue=_t,this.keyTrackers=[],this.getters={},this.setters={},this.accessorGetter={},this.accessorSetter={},this._exports=new WeakMap,this.readonlySetter=(t,o,s)=>{if(z.readOnly)return t;throw new Error(`Cannot assign to read-only property "${s}" of ${this.component.el.tagName.toLowerCase()}. Trying to assign "${String(t)}"`)},this.component=e}firePropTrackers(e,t){let o=this.keyTrackers;this.trackedValue=_t,this.keyTrackers=[],o.forEach(s=>s(e,t))}getSetProxy(e){let t=this.component,o=t.constructor.prototype;if(this._getSetProxy(o,e,"class"),t.manager.isLit)return;let s=t.el.constructor.prototype;o!==s&&this._getSetProxy(s,e,"html")}_getSetProxy(e,t,o){let s=this.component,r=Vt(s,t),n;do n=Object.getOwnPropertyDescriptor(e,t);while(!n&&(e=Object.getPrototypeOf(e)));if(!n)return;let i=n.get,c=n.set,a=X in i,l=X in c;if(a&&l)return;let d=!a,h=!l,f=d?function(){let _=i.call(this),E=B.get(this);if(z.getter||E===void 0)return _;let R=E.manager.internals;_=R.accessorGetter[t](_,t);let y=R.getters[t]??gt;for(let C=0;C<y.length;C++)_=y[C](_,t);return _}:i,g=h?function(_){let E=i.call(this),R=B.get(this);if(R===void 0){c.call(this,_);return}let y=R.manager.isLit?_??void 0:jt(_,r),C=R.manager.internals;if(y===E)c.call(this,y);else{let Tt=z.setter?gt:C.setters[t]??gt;for(let H=0;H<Tt.length&&(y=Tt[H](y,E,t),y!==E);H++);y=C.accessorSetter[t](y,E,t),c.call(this,y),y!==E&&C.enabledWatchers[t]?.forEach(H=>H(y,E,t))}C.keyTrackers.length>0&&C?.firePropTrackers(t,_)}:c;d&&(f[X]=!0),h&&(g[X]=!0),Object.defineProperty(e,t,{...n,get:f,set:g})}markExports(e,t){(typeof t=="object"&&t!==null||typeof t=="function")&&this._exports.set(t,e)}resolveExports(e){if(typeof e=="object"&&e!==null||typeof e=="function")return this._exports.get(e)}},gt=[],X=Symbol(),_t=Symbol();function Ft(e,t,o){let s=e.manager.internals;return s.trackedValue!==_t&&s.trackedValue!==o&&s.firePropTrackers(void 0,void 0),s.keyTrackers.length===0&&queueMicrotask(()=>s.firePropTrackers(void 0,void 0)),s.trackedValue=o,s.keyTrackers.push((r,n)=>p(t,void 0,o===n?r:void 0)),o}function Kt(e,t,o){let s=Array.isArray(e)?e:[e],r=s.length+1,n=c=>{r-=1,c!==void 0&&(r=Math.min(r,0)),r===0&&t(c)};s.forEach(c=>ot(c,a=>n(a===void 0?void 0:{key:a,host:c,isReactive:!1}),o));let i=s.find(c=>"manager"in c&&typeof c.manager=="object"&&c.manager.component===c);return i&&Ft(i,c=>n(c===void 0?void 0:{key:c,host:i,isReactive:!0}),o),o}function Yt(e){z.readOnly=!0;try{return e()}finally{z.readOnly=!1}}var Jt=e=>(...t)=>{let o=zt(),s=new e(...t),r=s.exports;et(o.at(-1));let n=s.component.manager.internals;n.markExports(s,r),s.watchExports(c=>n.markExports(s,c)),Se(s);let i=[s.component,...o].reverse();return Kt(i,c=>c===void 0?void 0:Te(s,c,r),r)};function Te(e,{host:t,key:o,isReactive:s},r){let n=t,i=n[o]!==e.exports,c=n[o]!==r,a=r!==e.exports;if(i&&!c&&a&&(n[o]=e.exports),t===e.component){if(s){let d=e.component.manager.internals;c&&d.markExports(e,n[o]),st(e.component,o,h=>{h!==e.exports&&d.markExports(e,h)})}e.assignedProperty=s?void 0:o}e.watchExports(()=>{if(n[o]===e.exports)return;let d=e.component.manager;d.internals.setters[o]?.includes(d.internals.readonlySetter)?Yt(()=>{n[o]=e.exports}):n[o]=e.exports})}var Zt=(e,t)=>new Ne(e,t),Ne=class extends Gt{constructor(e,t){let o="addController"in e,s=new Set;function r(a){s.add(a),!(tt in a)&&e.renderRoot&&e.el.isConnected&&a.hostConnected?.()}function n(a){s.delete(a),a.controllerRemoved?.()}let i=e;if(i.addController=r,i.removeController=n,!o){let a=t??e.constructor.__forceUpdate;i.requestUpdate=()=>a(e)}super(e),this.internals=new qt(this.component),this.destroyed=!1,this._updatePromise=new b,this._originalLifecycles={},this.isLit=o,this.component.manager=this,Mt(e,o),this._controllers=s,this.exports=void 0,this.hasDestroy=Et in this.component&&typeof this.component.destroy=="function",this._bindLifecycleMethods();let c=this.internals;Object.keys(c.members).forEach(a=>{c.accessorGetter[a]=Qt,c.accessorSetter[a]=Qt,c.getSetProxy(a)}),o?this.internals.enabledWatchers=this.internals.allWatchers:Object.defineProperty(e,"updateComplete",{get:async()=>await this._updatePromise.promise}),queueMicrotask(c.enableReadonly),et(void 0),x(e),B.set(e.el,e),B.set(e,e)}_bindLifecycleMethods(){let e=this.component,t=this.isLit,o=e.el===e;this._originalLifecycles={_connectedCallback:t||o?void 0:e.connectedCallback,_disconnectedCallback:t||o?void 0:e.disconnectedCallback,_load:t?e.load:e.componentWillLoad,_loaded:t?e.loaded:e.componentDidLoad,_willUpdate:t?void 0:e.componentWillUpdate,_updated:t?void 0:e.componentDidUpdate,_destroy:e.destroy};let s=this._connectedCallback.bind(this),r=this._disconnectedCallback.bind(this),n=this._update.bind(this),i=this._updated.bind(this);t?e.constructor.prototype.addController.call(e,{hostConnected:s,hostDisconnected:r,hostUpdate:n,hostUpdated:i}):(e.connectedCallback=s,e.disconnectedCallback=r,e.componentWillLoad=this._load.bind(this),e.componentDidLoad=this._loaded.bind(this),e.componentWillUpdate=n,e.componentDidUpdate=i),this.hasDestroy&&(e.destroy=this.destroy.bind(this))}_connectedCallback(){if(this.destroyed){let t=this.component.el.tagName.toLowerCase();throw this.component.el.remove(),new Error(`The ${t} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${Et} prop.`)}this._autoDestroyTimeout!==void 0&&clearTimeout(this._autoDestroyTimeout);let e=this.internals;e.enabledWatchers=e.allWatchers,q(),e.enableReadonly?.(),this._controllers.forEach(Ue),this._originalLifecycles._connectedCallback?.call(this.component)}_disconnectedCallback(){this.destroyed||(this._controllers.forEach(Re),this._originalLifecycles._disconnectedCallback?.call(this.component),this.hasDestroy&&this._setAutoDestroyTimeout())}async _load(){await Promise.allSettled(Array.from(this._controllers,Me)),await this._originalLifecycles._load?.call(this.component),this.hasDestroy&&st(this.component,Et,()=>this._setAutoDestroyTimeout())}_loaded(){this._controllers.forEach(je),this._originalLifecycles._loaded?.call(this.component)}_update(){let e=this.component;this._controllers.forEach(Ve,e.$changes),this._originalLifecycles._willUpdate?.call(this.component)}_updated(){let e=this.component;if(this._controllers.forEach(He,e.$changes),this._originalLifecycles._updated?.call(this.component),this.isLit)e.$changes=new Map;else{let t=this._updatePromise;this._updatePromise=new b,t.resolve(!0)}}async destroy(){if(!this.destroyed){if(this.component.el.isConnected){this.hasDestroy=!1;try{this.component.el.remove()}finally{this.hasDestroy=!0}}this._autoDestroyTimeout=void 0,this.destroyed=!0,this._controllers.forEach(Ie),this._controllers.clear(),await this._originalLifecycles._destroy?.call(this.component)}}_setAutoDestroyTimeout(){if(this._autoDestroyTimeout!==void 0&&clearTimeout(this._autoDestroyTimeout),!this.component.el.isConnected&&!this.component.autoDestroyDisabled){let e=()=>void this.destroy().catch(console.error);this._autoDestroyTimeout=Ut(e,ke)}}},Et="autoDestroyDisabled",ke=1e3;var Qt=e=>e;function Ue(e){"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)}function Re(e){"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e)}async function Me(e){"triggerLoad"in e?await e.triggerLoad():await I(e.hostLoad,e)}function je(e){"triggerLoaded"in e?e.triggerLoaded():p(e.hostLoaded,e)}function Ve(e){"triggerUpdate"in e?e.triggerUpdate(this):p(e.hostUpdate,e,this)}function He(e){"triggerUpdated"in e?e.triggerUpdated(this):p(e.hostUpdated,e,this)}function Ie(e){"triggerDestroy"in e?e.triggerDestroy():p(e.hostDestroy,e)}var Xt=e=>ze(void 0,e);var We=class extends bt{constructor(e,t){super(e);let o=this.exports;try{x(this.component);let s=t(this.component,this),r=this.exports!==o;if(s instanceof Promise){r||this.setProvisionalExports(s);let n=s.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this._ready.reject(i),console.error(i)});this.onLoad(async()=>await n)}else(!r||s!==void 0)&&(this.exports=s),queueMicrotask(()=>super.catchUpLifecycle())}catch(s){this._ready.reject(s),console.error(s)}}catchUpLifecycle(){}},ze=Jt(We);var Mo=Xt;var Vo=e=>(t={})=>Xt((o,s)=>{let r=Nt(o.el),n={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},i=o;queueMicrotask(()=>s.onLifecycle(()=>kt(o.el,e("./assets"),({t9nLocale:a,t9nStrings:l,lang:d})=>{let h={...l,_lang:d,_t9nLocale:a,_loading:!1};s.exports=h;let f=l.componentLabel??l.widgetLabel;typeof f=="string"&&"label"in o&&o.label==null&&(o.label??(o.label=f)),c(i.messageOverrides)},t.name)));function c(a){let l=s.exports,d=l._original??l,h=te(d,a);a&&(h._original=d),s.exports=h}return"messageOverrides"in i&&s.onLifecycle(()=>st(i,"messageOverrides",c)),t.blocking?(s.setProvisionalExports(n,!1),s.ready):n});function te(e,t){if(!t)return e;let o={...e};return Object.entries(t).forEach(([s,r])=>{typeof r=="object"?o[s]=te(e[s],r):o[s]=r??e[s]}),o}var rt=globalThis,nt=rt.ShadowRoot&&(rt.ShadyCSS===void 0||rt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ct=Symbol(),ee=new WeakMap,F=class{constructor(t,o,s){if(this._$cssResult$=!0,s!==Ct)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=o}get styleSheet(){let t=this.o,o=this.t;if(nt&&t===void 0){let s=o!==void 0&&o.length===1;s&&(t=ee.get(o)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&ee.set(o,t))}return t}toString(){return this.cssText}},oe=e=>new F(typeof e=="string"?e:e+"",void 0,Ct),Be=(e,...t)=>{let o=e.length===1?e[0]:t.reduce((s,r,n)=>s+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[n+1],e[0]);return new F(o,e,Ct)},$t=(e,t)=>{if(nt)e.adoptedStyleSheets=t.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of t){let s=document.createElement("style"),r=rt.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=o.cssText,e.appendChild(s)}},it=nt?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let o="";for(let s of t.cssRules)o+=s.cssText;return oe(o)})(e):e;var At=globalThis,at=At.trustedTypes,se=at?at.createPolicy("lit-html",{createHTML:e=>e}):void 0,Ot="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,St="?"+$,Ge=`<${St}>`,N=document,Y=()=>N.createComment(""),J=e=>e===null||typeof e!="object"&&typeof e!="function",Pt=Array.isArray,le=e=>Pt(e)||typeof e?.[Symbol.iterator]=="function",wt=`[
|
|
7
7
|
\f\r]`,K=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,re=/-->/g,ne=/>/g,D=RegExp(`>|${wt}(?:([^\\s"'>=/]+)(${wt}*=${wt}*(?:[^
|
|
8
8
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),ie=/'/g,ae=/"/g,he=/^(?:script|style|textarea|title)$/i,Lt=e=>(t,...o)=>({_$litType$:e,strings:t,values:o}),Bo=Lt(1),Go=Lt(2),qo=Lt(3),m=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),ce=new WeakMap,T=N.createTreeWalker(N,129);function de(e,t){if(!Pt(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return se!==void 0?se.createHTML(t):t}var pe=(e,t)=>{let o=e.length-1,s=[],r,n=t===2?"<svg>":t===3?"<math>":"",i=K;for(let c=0;c<o;c++){let a=e[c],l,d,h=-1,f=0;for(;f<a.length&&(i.lastIndex=f,d=i.exec(a),d!==null);)f=i.lastIndex,i===K?d[1]==="!--"?i=re:d[1]!==void 0?i=ne:d[2]!==void 0?(he.test(d[2])&&(r=RegExp("</"+d[2],"g")),i=D):d[3]!==void 0&&(i=D):i===D?d[0]===">"?(i=r??K,h=-1):d[1]===void 0?h=-2:(h=i.lastIndex-d[2].length,l=d[1],i=d[3]===void 0?D:d[3]==='"'?ae:ie):i===ae||i===ie?i=D:i===re||i===ne?i=K:(i=D,r=void 0);let g=i===D&&e[c+1].startsWith("/>")?" ":"";n+=i===K?a+Ge:h>=0?(s.push(l),a.slice(0,h)+Ot+a.slice(h)+$+g):a+$+(h===-2?c:g)}return[de(e,n+(e[o]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},Q=class e{constructor({strings:t,_$litType$:o},s){let r;this.parts=[];let n=0,i=0,c=t.length-1,a=this.parts,[l,d]=pe(t,o);if(this.el=e.createElement(l,s),T.currentNode=this.el.content,o===2||o===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=T.nextNode())!==null&&a.length<c;){if(r.nodeType===1){if(r.hasAttributes())for(let h of r.getAttributeNames())if(h.endsWith(Ot)){let f=d[i++],g=r.getAttribute(h).split($),S=/([.?@])?(.*)/.exec(f);a.push({type:1,index:n,name:S[2],strings:g,ctor:S[1]==="."?lt:S[1]==="?"?ht:S[1]==="@"?dt:U}),r.removeAttribute(h)}else h.startsWith($)&&(a.push({type:6,index:n}),r.removeAttribute(h));if(he.test(r.tagName)){let h=r.textContent.split($),f=h.length-1;if(f>0){r.textContent=at?at.emptyScript:"";for(let g=0;g<f;g++)r.append(h[g],Y()),T.nextNode(),a.push({type:2,index:++n});r.append(h[f],Y())}}}else if(r.nodeType===8)if(r.data===St)a.push({type:2,index:n});else{let h=-1;for(;(h=r.data.indexOf($,h+1))!==-1;)a.push({type:7,index:n}),h+=$.length-1}n++}}static createElement(t,o){let s=N.createElement("template");return s.innerHTML=t,s}};function k(e,t,o=e,s){if(t===m)return t;let r=s!==void 0?o.o?.[s]:o.l,n=J(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),n===void 0?r=void 0:(r=new n(e),r._$AT(e,o,s)),s!==void 0?(o.o??=[])[s]=r:o.l=r),r!==void 0&&(t=k(e,r._$AS(e,t.values),r,s)),t}var ct=class{constructor(t,o){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:o},parts:s}=this._$AD,r=(t?.creationScope??N).importNode(o,!0);T.currentNode=r;let n=T.nextNode(),i=0,c=0,a=s[0];for(;a!==void 0;){if(i===a.index){let l;a.type===2?l=new j(n,n.nextSibling,this,t):a.type===1?l=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(l=new pt(n,this,t)),this._$AV.push(l),a=s[++c]}i!==a?.index&&(n=T.nextNode(),i++)}return T.currentNode=N,r}p(t){let o=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,o),o+=s.strings.length-2):s._$AI(t[o])),o++}},j=class e{get _$AU(){return this._$AM?._$AU??this.v}constructor(t,o,s,r){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=o,this._$AM=s,this.options=r,this.v=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,o=this._$AM;return o!==void 0&&t?.nodeType===11&&(t=o.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,o=this){t=k(this,t,o),J(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==m&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):le(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==u&&J(this._$AH)?this._$AA.nextSibling.data=t:this.T(N.createTextNode(t)),this._$AH=t}$(t){let{values:o,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=Q.createElement(de(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(o);else{let n=new ct(r,this),i=n.u(this.options);n.p(o),this.T(i),this._$AH=n}}_$AC(t){let o=ce.get(t.strings);return o===void 0&&ce.set(t.strings,o=new Q(t)),o}k(t){Pt(this._$AH)||(this._$AH=[],this._$AR());let o=this._$AH,s,r=0;for(let n of t)r===o.length?o.push(s=new e(this.O(Y()),this.O(Y()),this,this.options)):s=o[r],s._$AI(n),r++;r<o.length&&(this._$AR(s&&s._$AB.nextSibling,r),o.length=r)}_$AR(t=this._$AA.nextSibling,o){for(this._$AP?.(!1,!0,o);t&&t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this.v=t,this._$AP?.(t))}},U=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,o,s,r,n){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=o,this._$AM=r,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}_$AI(t,o=this,s,r){let n=this.strings,i=!1;if(n===void 0)t=k(this,t,o,0),i=!J(t)||t!==this._$AH&&t!==m,i&&(this._$AH=t);else{let c=t,a,l;for(t=n[0],a=0;a<n.length-1;a++)l=k(this,c[s+a],o,a),l===m&&(l=this._$AH[a]),i||=!J(l)||l!==this._$AH[a],l===u?t=u:t!==u&&(t+=(l??"")+n[a+1]),this._$AH[a]=l}i&&!r&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},lt=class extends U{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}},ht=class extends U{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==u)}},dt=class extends U{constructor(t,o,s,r,n){super(t,o,s,r,n),this.type=5}_$AI(t,o=this){if((t=k(this,t,o,0)??u)===m)return;let s=this._$AH,r=t===u&&s!==u||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==u&&(s===u||r);r&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},pt=class{constructor(t,o,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=o,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){k(this,t)}},ue={M:Ot,P:$,A:St,C:1,L:pe,R:ct,D:le,V:k,I:j,H:U,N:ht,U:dt,B:lt,F:pt},qe=At.litHtmlPolyfillSupport;qe?.(Q,j),(At.litHtmlVersions??=[]).push("3.2.0");var me=(e,t,o)=>{let s=o?.renderBefore??t,r=s._$litPart$;if(r===void 0){let n=o?.renderBefore??null;s._$litPart$=r=new j(t.insertBefore(Y(),n),n,void 0,o??{})}return r._$AI(e),r};var{is:Fe,defineProperty:Ke,getOwnPropertyDescriptor:Ye,getOwnPropertyNames:Je,getOwnPropertySymbols:Qe,getPrototypeOf:Ze}=Object,mt=globalThis,fe=mt.trustedTypes,Xe=fe?fe.emptyScript:"",to=mt.reactiveElementPolyfillSupport,Z=(e,t)=>e,ut={toAttribute(e,t){switch(t){case Boolean:e=e?Xe:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let o=e;switch(t){case Boolean:o=e!==null;break;case Number:o=e===null?null:Number(e);break;case Object:case Array:try{o=JSON.parse(e)}catch{o=null}}return o}},xt=(e,t)=>!Fe(e,t),ye={attribute:!0,type:String,converter:ut,reflect:!1,hasChanged:xt};Symbol.metadata??=Symbol("metadata"),mt.litPropertyMetadata??=new WeakMap;var w=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,o=ye){if(o.state&&(o.attribute=!1),this._$Ei(),this.elementProperties.set(t,o),!o.noAccessor){let s=Symbol(),r=this.getPropertyDescriptor(t,s,o);r!==void 0&&Ke(this.prototype,t,r)}}static getPropertyDescriptor(t,o,s){let{get:r,set:n}=Ye(this.prototype,t)??{get(){return this[o]},set(i){this[o]=i}};return{get(){return r?.call(this)},set(i){let c=r?.call(this);n.call(this,i),this.requestUpdate(t,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ye}static _$Ei(){if(this.hasOwnProperty(Z("elementProperties")))return;let t=Ze(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Z("properties"))){let o=this.properties,s=[...Je(o),...Qe(o)];for(let r of s)this.createProperty(r,o[r])}let t=this[Symbol.metadata];if(t!==null){let o=litPropertyMetadata.get(t);if(o!==void 0)for(let[s,r]of o)this.elementProperties.set(s,r)}this._$Eh=new Map;for(let[o,s]of this.elementProperties){let r=this._$Eu(o,s);r!==void 0&&this._$Eh.set(r,o)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let o=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let r of s)o.unshift(it(r))}else t!==void 0&&o.push(it(t));return o}static _$Eu(t,o){let s=o.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,o=this.constructor.elementProperties;for(let s of o.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return $t(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,o,s){this._$AK(t,s)}_$EC(t,o){let s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){let n=(s.converter?.toAttribute!==void 0?s.converter:ut).toAttribute(o,s.type);this._$Em=t,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(t,o){let s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let n=s.getPropertyOptions(r),i=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:ut;this._$Em=r,this[r]=i.fromAttribute(o,n.type),this._$Em=null}}requestUpdate(t,o,s){if(t!==void 0){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??xt)(this[t],o))return;this.P(t,o,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,o,s){this._$AL.has(t)||this._$AL.set(t,o),s.reflect===!0&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(o){Promise.reject(o)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,n]of this._$Ep)this[r]=n;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[r,n]of s)n.wrapped!==!0||this._$AL.has(r)||this[r]===void 0||this.P(r,this[r],n)}let t=!1,o=this._$AL;try{t=this.shouldUpdate(o),t?(this.willUpdate(o),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(o)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(o)}willUpdate(t){}_$AE(t){this._$EO?.forEach(o=>o.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach(o=>this._$EC(o,this[o])),this._$EU()}updated(t){}firstUpdated(t){}};w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[Z("elementProperties")]=new Map,w[Z("finalized")]=new Map,to?.({ReactiveElement:w}),(mt.reactiveElementVersions??=[]).push("2.0.4");var A=class extends w{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let o=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=me(o,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return m}};A._$litElement$=!0,A.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:A});var eo=globalThis.litElementPolyfillSupport;eo?.({LitElement:A});(globalThis.litElementVersions??=[]).push("4.1.0");var v={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},V=e=>(...t)=>({_$litDirective$:e,values:t}),O=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,o,s){this.t=t,this._$AM=o,this.i=s}_$AS(t,o){return this.update(t,o)}update(t,o){return this.render(...o)}};var ge=V(class extends O{constructor(e){if(super(e),e.type!==v.ATTRIBUTE||e.name!=="class"||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(let s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}let o=e.element.classList;for(let s of this.st)s in t||(o.remove(s),this.st.delete(s));for(let s in t){let r=!!t[s];r===this.st.has(s)||this.nt?.has(s)||(r?(o.add(s),this.st.add(s)):(o.remove(s),this.st.delete(s)))}return m}});var _e="important",oo=" !"+_e,bs=V(class extends O{constructor(e){if(super(e),e.type!==v.ATTRIBUTE||e.name!=="style"||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,o)=>{let s=e[o];return s==null?t:t+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`},"")}update(e,[t]){let{style:o}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?o.removeProperty(s):o[s]=null);for(let s in t){let r=t[s];if(r!=null){this.ft.add(s);let n=typeof r=="string"&&r.endsWith(oo);s.includes("-")||n?o.setProperty(s,n?r.slice(0,-11):r,n?_e:""):o[s]=r}}return m}});var{I:so}=ue;var be=e=>e.strings===void 0,ve=()=>document.createComment(""),Os=(e,t,o)=>{let s=e._$AA.parentNode,r=t===void 0?e._$AB:t._$AA;if(o===void 0){let n=s.insertBefore(ve(),r),i=s.insertBefore(ve(),r);o=new so(n,i,e,e.options)}else{let n=o._$AB.nextSibling,i=o._$AM,c=i!==e;if(c){let a;o._$AQ?.(e),o._$AM=e,o._$AP!==void 0&&(a=e._$AU)!==i._$AU&&o._$AP(a)}if(n!==r||c){let a=o._$AA;for(;a!==n;){let l=a.nextSibling;s.insertBefore(a,r),a=l}}}return o},Ss=(e,t,o=e)=>(e._$AI(t,o),e),ro={},Ee=(e,t=ro)=>e._$AH=t,Ps=e=>e._$AH,Ls=e=>{e._$AP?.(!1,!0);let t=e._$AA,o=e._$AB.nextSibling;for(;t!==o;){let s=t.nextSibling;t.remove(),t=s}};var ks=V(class extends O{constructor(e){if(super(e),e.type!==v.PROPERTY&&e.type!==v.ATTRIBUTE&&e.type!==v.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!be(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===m||t===u)return t;let o=e.element,s=e.name;if(e.type===v.PROPERTY){if(t===o[s])return m}else if(e.type===v.BOOLEAN_ATTRIBUTE){if(!!t===o.hasAttribute(s))return m}else if(e.type===v.ATTRIBUTE&&o.getAttribute(s)===t+"")return m;return Ee(e),t}});var io=";",Dt=",",ao=":",$e=(e="",t={},o=G())=>{let s={emit:r=>{e===""&&q();let n=new CustomEvent(e,{detail:r,cancelable:!0,bubbles:!0,composed:!0,...t});return o.el.dispatchEvent(n),n}};return e===""&&ot(o,r=>{e=r},s),s},Fs=$e.bind(null,"");function we(e){let t=e;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let o=t;return o.manager?.loadedCalled||o._offspring.push(e),o._postLoad.promise}return!1}var Ce={},Ks=(e,t)=>function(o,s){if(!globalThis.customElements)return;let r=(s??o??{}).resourcesUrl;r&&e.setAssetPath(r),Object.entries(t).forEach(co)};function co([e,[t,o=""]]){if(customElements.get(e))return;let[s,r,n]=o.split(io),i=s?s?.split(Dt).map(Ae):void 0,c=i?.map(([l])=>l),a=class extends ho{static{this.observedAttributes=i?.map(([,l])=>l).filter(l=>l!=="")}static{this._properties=c}static{this._asyncMethods=r?r?.split(Dt):void 0}static{this._syncMethods=n?.split(Dt)}static{this._name=e}constructor(){!a._loadPromise&&(a._loadPromise=t(),a._initializePrototype()),super()}};customElements.define(e,a)}var ft=Object.defineProperty;function Ae(e){let t=e.split(ao);return t.length===1?[t[0],yt(t[0])]:t}var lo=globalThis.HTMLElement??Ae,ho=class extends lo{constructor(){super(),this._store={},this._pendingAttributes=[],this._postLoad=new b,this._postLoaded=new b,this._offspring=[],this._saveInstanceProperties();let e=this.constructor;e._LitConstructor?this._initializeComponent({a:e._LitConstructor}):e._loadPromise.then(this._initializeComponent.bind(this)).catch(t=>{this._postLoaded.reject(t),setTimeout(()=>{throw t})})}static{this.lumina=!0}static _initializePrototype(){this._properties?.forEach(this._bindProp,this),this._asyncMethods?.forEach(this._bindAsync,this),this._syncMethods?.forEach(this._bindSync,this)}static _bindProp(e){ft(this.prototype,e,{configurable:!0,enumerable:!0,get(){return this._store[e]},set(t){this._store[e]=t}})}static _bindAsync(e){ft(this.prototype,e,{async value(...t){return this._litElement||await this._postLoaded.promise,await this._litElement[e](...t)},configurable:!0})}static _bindSync(e){ft(this.prototype,e,{value(...t){return this._litElement[e](...t)},configurable:!0})}get manager(){return this._litElement?.manager}_saveInstanceProperties(){let e=this.constructor,t=this;e._properties?.forEach(o=>{Object.hasOwn(this,o)&&(this._store[o]=t[o],delete t[o])})}attributeChangedCallback(e,t,o){this._litElement?.attributeChangedCallback(e,t,o),this._litElement||this._pendingAttributes.push(e)}connectedCallback(){this._litElement?this._litElement.connectedCallback?.():queueMicrotask(()=>{this._ancestorLoad=we(this)})}disconnectedCallback(){this._litElement?.disconnectedCallback?.()}async componentOnReady(){return await this._postLoaded.promise,this}_initializeComponent(e){let t=this.constructor,o=t._name,s=Object.values(e).find(c=>c.tagName===o),r=`${o}--lazy`;t._LitConstructor||(t._LitConstructor=s,s.prototype.removeAttribute=function(c){HTMLElement.prototype.removeAttribute.call(this.el,c)},s.prototype.setAttribute=function(c,a){HTMLElement.prototype.setAttribute.call(this.el,c,a)},ft(s.prototype,"isConnected",{get(){return this.el.isConnected}}),customElements.define(r,s)),s.lazy=this;let n=document.createElement(r);s.lazy=void 0,this._litElement=n,this._pendingAttributes.forEach(c=>{let a=this.getAttribute(c);n.attributeChangedCallback(c,null,a)}),Object.entries(this._store).forEach(po,n),this._store=n;let i=this.isConnected;(i||this._ancestorLoad)&&(n.connectedCallback?.(),i||n.disconnectedCallback())}};function po([e,t]){this[e]=t}var uo=()=>{},mo=class Oe extends A{constructor(){super(),this.el=this.constructor.lazy??this,this.manager=Zt(this),this._postLoad=this.constructor.lazy?._postLoad??new b,this._offspring=this.constructor.lazy?._offspring??[],this._postLoaded=this.constructor.lazy?._postLoaded??new b,this._enableUpdating=this.enableUpdating,this.enableUpdating=uo;let t=Oe.prototype.shouldUpdate;this.shouldUpdate!==t&&(this._originalShouldUpdate=this.shouldUpdate,this.shouldUpdate=t),!1}static finalizeStyles(t){let o=super.finalizeStyles(t),s=this.shadowRootOptions===Ce;return this.runtime?.commonStyles===void 0||s?o:[this.runtime.commonStyles,...o]}static createProperty(t,o){let s=typeof o=="number"?o:Array.isArray(o)?o[0]:0,r=Array.isArray(o)?o[1]:void 0;super.createProperty(t,{attribute:s&1&&typeof t=="string"?yt(t):!1,reflect:!!(s&2),type:s&4?Boolean:s&8?Number:void 0,state:!!(s&16),readOnly:!!(s&32),noAccessor:!!(s&64),...r})}static{this.lumina=!0}connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;let t=!this.manager.connectedCalled;super.connectedCallback(),t&&queueMicrotask(()=>this._load().catch(o=>{this._postLoaded.reject(o),setTimeout(()=>{throw o})}))}createRenderRoot(){let t=this.el.shadowRoot,o=this.constructor,s=o.shadowRootOptions,r=t??(s===Ce?this.el:this.el.attachShadow(s));if(Object.defineProperty(this,"shadowRoot",{value:r}),t)return A.prototype.createRenderRoot.call(this),t;if(this.isConnected){let n=r.getRootNode();n.adoptedStyleSheets=[...n.adoptedStyleSheets,...o.elementStyles.map(i=>"styleSheet"in i?i.styleSheet:i)]}return r}async _load(){let t=this.el._ancestorLoad??we(this.el);t&&await t,await this.manager._load(),this._enableUpdating(!0),this.performUpdate(),this._postLoad.resolve(),await Promise.resolve();let o=this._offspring.filter(s=>!s.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async s=>await s.componentOnReady())),this._offspring.length=0,this.el.setAttribute(this.constructor.runtime.hydratedAttribute,""),this.manager._loaded(),this._postLoaded.resolve()}shouldUpdate(t){return this.$changes=t,this._originalShouldUpdate?.(t)??!0}listen(t,o,s){let r=o?.bind(this)??o;this.manager.onLifecycle(()=>(this.el.addEventListener(t,r,s),()=>this.el.removeEventListener(t,r,s)))}listenOn(t,o,s,r){let n=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(o,n,r),()=>t.removeEventListener(o,n,r)))}async componentOnReady(){return await this._postLoaded.promise,this}};mo.$createEvent=$e;function fo(e){let t,o=r=>{t=new URL(r,globalThis.location?.href).href},s={...e,getAssetPath(r){let n=new URL(r,t);return n.origin!==globalThis.location?.origin?n.href:n.pathname},setAssetPath:o,customElement(r,n){n.runtime=s,n.tagName=r,customElements.get(r)||customElements.define(r,n)}};return o(e.defaultAssetPath),s}var Ys=e=>typeof e=="object"&&e!=null?ge(e):e,Js=u,yo=fo({defaultAssetPath:"https://jsdev.arcgis.com/coding-components/next/",hydratedAttribute:"hydrated"}),{customElement:Qs,getAssetPath:Zs,setAssetPath:Xs}=yo;export{Mo as a,Vo as b,Be as c,Bo as d,m as e,u as f,v as g,V as h,O as i,be as j,Os as k,Ss as l,Ee as m,Ps as n,Ls as o,Fs as p,Ce as q,Ks as r,mo as s,Ys as t,Js as u,yo as v,Qs as w,Zs as x};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://js.arcgis.com/4.32/esri/copyright.txt for details.
|
|
4
|
-
* v4.32.0-next.
|
|
4
|
+
* v4.32.0-next.17
|
|
5
5
|
*/
|
|
6
|
-
import{rk as J}from"./ZNIDSG3O.js";import"./DDHAT5BP.js";var Le=Object.defineProperty,je=Object.getOwnPropertyDescriptor,Ne=Object.getOwnPropertyNames,We=Object.prototype.hasOwnProperty,Y=(t,n,i,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let e of Ne(n))!We.call(t,e)&&e!==i&&Le(t,e,{get:()=>n[e],enumerable:!(r=je(n,e))||r.enumerable});return t},Ue=(t,n,i)=>(Y(t,n,"default"),i&&Y(i,n,"default")),c={};Ue(c,J);var Oe=2*60*1e3,Ve=class{_defaults;_idleCheckInterval;_lastUsedTime;_configChangeListener;_worker;_client;constructor(t){this._defaults=t,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>Oe&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=c.editor.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...t){let n;return this._getClient().then(i=>{n=i}).then(i=>{if(this._worker)return this._worker.withSyncedResources(t)}).then(i=>n)}},Z;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647})(Z||(Z={}));var W;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647})(W||(W={}));var k;(function(t){function n(r,e){return r===Number.MAX_VALUE&&(r=W.MAX_VALUE),e===Number.MAX_VALUE&&(e=W.MAX_VALUE),{line:r,character:e}}t.create=n;function i(r){var e=r;return s.objectLiteral(e)&&s.uinteger(e.line)&&s.uinteger(e.character)}t.is=i})(k||(k={}));var p;(function(t){function n(r,e,a,o){if(s.uinteger(r)&&s.uinteger(e)&&s.uinteger(a)&&s.uinteger(o))return{start:k.create(r,e),end:k.create(a,o)};if(k.is(r)&&k.is(e))return{start:r,end:e};throw new Error("Range#create called with invalid arguments["+r+", "+e+", "+a+", "+o+"]")}t.create=n;function i(r){var e=r;return s.objectLiteral(e)&&k.is(e.start)&&k.is(e.end)}t.is=i})(p||(p={}));var z;(function(t){function n(r,e){return{uri:r,range:e}}t.create=n;function i(r){var e=r;return s.defined(e)&&p.is(e.range)&&(s.string(e.uri)||s.undefined(e.uri))}t.is=i})(z||(z={}));var K;(function(t){function n(r,e,a,o){return{targetUri:r,targetRange:e,targetSelectionRange:a,originSelectionRange:o}}t.create=n;function i(r){var e=r;return s.defined(e)&&p.is(e.targetRange)&&s.string(e.targetUri)&&(p.is(e.targetSelectionRange)||s.undefined(e.targetSelectionRange))&&(p.is(e.originSelectionRange)||s.undefined(e.originSelectionRange))}t.is=i})(K||(K={}));var X;(function(t){function n(r,e,a,o){return{red:r,green:e,blue:a,alpha:o}}t.create=n;function i(r){var e=r;return s.numberRange(e.red,0,1)&&s.numberRange(e.green,0,1)&&s.numberRange(e.blue,0,1)&&s.numberRange(e.alpha,0,1)}t.is=i})(X||(X={}));var ee;(function(t){function n(r,e){return{range:r,color:e}}t.create=n;function i(r){var e=r;return p.is(e.range)&&X.is(e.color)}t.is=i})(ee||(ee={}));var te;(function(t){function n(r,e,a){return{label:r,textEdit:e,additionalTextEdits:a}}t.create=n;function i(r){var e=r;return s.string(e.label)&&(s.undefined(e.textEdit)||x.is(e))&&(s.undefined(e.additionalTextEdits)||s.typedArray(e.additionalTextEdits,x.is))}t.is=i})(te||(te={}));var R;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(R||(R={}));var re;(function(t){function n(r,e,a,o,u){var g={startLine:r,endLine:e};return s.defined(a)&&(g.startCharacter=a),s.defined(o)&&(g.endCharacter=o),s.defined(u)&&(g.kind=u),g}t.create=n;function i(r){var e=r;return s.uinteger(e.startLine)&&s.uinteger(e.startLine)&&(s.undefined(e.startCharacter)||s.uinteger(e.startCharacter))&&(s.undefined(e.endCharacter)||s.uinteger(e.endCharacter))&&(s.undefined(e.kind)||s.string(e.kind))}t.is=i})(re||(re={}));var B;(function(t){function n(r,e){return{location:r,message:e}}t.create=n;function i(r){var e=r;return s.defined(e)&&z.is(e.location)&&s.string(e.message)}t.is=i})(B||(B={}));var y;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(y||(y={}));var ne;(function(t){t.Unnecessary=1,t.Deprecated=2})(ne||(ne={}));var ie;(function(t){function n(i){var r=i;return r!=null&&s.string(r.href)}t.is=n})(ie||(ie={}));var U;(function(t){function n(r,e,a,o,u,g){var d={range:r,message:e};return s.defined(a)&&(d.severity=a),s.defined(o)&&(d.code=o),s.defined(u)&&(d.source=u),s.defined(g)&&(d.relatedInformation=g),d}t.create=n;function i(r){var e,a=r;return s.defined(a)&&p.is(a.range)&&s.string(a.message)&&(s.number(a.severity)||s.undefined(a.severity))&&(s.integer(a.code)||s.string(a.code)||s.undefined(a.code))&&(s.undefined(a.codeDescription)||s.string((e=a.codeDescription)===null||e===void 0?void 0:e.href))&&(s.string(a.source)||s.undefined(a.source))&&(s.undefined(a.relatedInformation)||s.typedArray(a.relatedInformation,B.is))}t.is=i})(U||(U={}));var D;(function(t){function n(r,e){for(var a=[],o=2;o<arguments.length;o++)a[o-2]=arguments[o];var u={title:r,command:e};return s.defined(a)&&a.length>0&&(u.arguments=a),u}t.create=n;function i(r){var e=r;return s.defined(e)&&s.string(e.title)&&s.string(e.command)}t.is=i})(D||(D={}));var x;(function(t){function n(a,o){return{range:a,newText:o}}t.replace=n;function i(a,o){return{range:{start:a,end:a},newText:o}}t.insert=i;function r(a){return{range:a,newText:""}}t.del=r;function e(a){var o=a;return s.objectLiteral(o)&&s.string(o.newText)&&p.is(o.range)}t.is=e})(x||(x={}));var I;(function(t){function n(r,e,a){var o={label:r};return e!==void 0&&(o.needsConfirmation=e),a!==void 0&&(o.description=a),o}t.create=n;function i(r){var e=r;return e!==void 0&&s.objectLiteral(e)&&s.string(e.label)&&(s.boolean(e.needsConfirmation)||e.needsConfirmation===void 0)&&(s.string(e.description)||e.description===void 0)}t.is=i})(I||(I={}));var m;(function(t){function n(i){var r=i;return typeof r=="string"}t.is=n})(m||(m={}));var E;(function(t){function n(a,o,u){return{range:a,newText:o,annotationId:u}}t.replace=n;function i(a,o,u){return{range:{start:a,end:a},newText:o,annotationId:u}}t.insert=i;function r(a,o){return{range:a,newText:"",annotationId:o}}t.del=r;function e(a){var o=a;return x.is(o)&&(I.is(o.annotationId)||m.is(o.annotationId))}t.is=e})(E||(E={}));var O;(function(t){function n(r,e){return{textDocument:r,edits:e}}t.create=n;function i(r){var e=r;return s.defined(e)&&V.is(e.textDocument)&&Array.isArray(e.edits)}t.is=i})(O||(O={}));var M;(function(t){function n(r,e,a){var o={kind:"create",uri:r};return e!==void 0&&(e.overwrite!==void 0||e.ignoreIfExists!==void 0)&&(o.options=e),a!==void 0&&(o.annotationId=a),o}t.create=n;function i(r){var e=r;return e&&e.kind==="create"&&s.string(e.uri)&&(e.options===void 0||(e.options.overwrite===void 0||s.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||s.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||m.is(e.annotationId))}t.is=i})(M||(M={}));var T;(function(t){function n(r,e,a,o){var u={kind:"rename",oldUri:r,newUri:e};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(u.options=a),o!==void 0&&(u.annotationId=o),u}t.create=n;function i(r){var e=r;return e&&e.kind==="rename"&&s.string(e.oldUri)&&s.string(e.newUri)&&(e.options===void 0||(e.options.overwrite===void 0||s.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||s.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||m.is(e.annotationId))}t.is=i})(T||(T={}));var S;(function(t){function n(r,e,a){var o={kind:"delete",uri:r};return e!==void 0&&(e.recursive!==void 0||e.ignoreIfNotExists!==void 0)&&(o.options=e),a!==void 0&&(o.annotationId=a),o}t.create=n;function i(r){var e=r;return e&&e.kind==="delete"&&s.string(e.uri)&&(e.options===void 0||(e.options.recursive===void 0||s.boolean(e.options.recursive))&&(e.options.ignoreIfNotExists===void 0||s.boolean(e.options.ignoreIfNotExists)))&&(e.annotationId===void 0||m.is(e.annotationId))}t.is=i})(S||(S={}));var $;(function(t){function n(i){var r=i;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(e){return s.string(e.kind)?M.is(e)||T.is(e)||S.is(e):O.is(e)}))}t.is=n})($||($={}));var N=function(){function t(n,i){this.edits=n,this.changeAnnotations=i}return t.prototype.insert=function(n,i,r){var e,a;if(r===void 0?e=x.insert(n,i):m.is(r)?(a=r,e=E.insert(n,i,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),e=E.insert(n,i,a)),this.edits.push(e),a!==void 0)return a},t.prototype.replace=function(n,i,r){var e,a;if(r===void 0?e=x.replace(n,i):m.is(r)?(a=r,e=E.replace(n,i,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),e=E.replace(n,i,a)),this.edits.push(e),a!==void 0)return a},t.prototype.delete=function(n,i){var r,e;if(i===void 0?r=x.del(n):m.is(i)?(e=i,r=E.del(n,i)):(this.assertChangeAnnotations(this.changeAnnotations),e=this.changeAnnotations.manage(i),r=E.del(n,e)),this.edits.push(r),e!==void 0)return e},t.prototype.add=function(n){this.edits.push(n)},t.prototype.all=function(){return this.edits},t.prototype.clear=function(){this.edits.splice(0,this.edits.length)},t.prototype.assertChangeAnnotations=function(n){if(n===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},t}(),ae=function(){function t(n){this._annotations=n===void 0?Object.create(null):n,this._counter=0,this._size=0}return t.prototype.all=function(){return this._annotations},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.manage=function(n,i){var r;if(m.is(n)?r=n:(r=this.nextId(),i=n),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(i===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=i,this._size++,r},t.prototype.nextId=function(){return this._counter++,this._counter.toString()},t}(),lt=function(){function t(n){var i=this;this._textEditChanges=Object.create(null),n!==void 0?(this._workspaceEdit=n,n.documentChanges?(this._changeAnnotations=new ae(n.changeAnnotations),n.changeAnnotations=this._changeAnnotations.all(),n.documentChanges.forEach(function(r){if(O.is(r)){var e=new N(r.edits,i._changeAnnotations);i._textEditChanges[r.textDocument.uri]=e}})):n.changes&&Object.keys(n.changes).forEach(function(r){var e=new N(n.changes[r]);i._textEditChanges[r]=e})):this._workspaceEdit={}}return Object.defineProperty(t.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),t.prototype.getTextEditChange=function(n){if(V.is(n)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:n.uri,version:n.version},r=this._textEditChanges[i.uri];if(!r){var e=[],a={textDocument:i,edits:e};this._workspaceEdit.documentChanges.push(a),r=new N(e,this._changeAnnotations),this._textEditChanges[i.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[n];if(!r){var e=[];this._workspaceEdit.changes[n]=e,r=new N(e),this._textEditChanges[n]=r}return r}},t.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ae,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},t.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},t.prototype.createFile=function(n,i,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;I.is(i)||m.is(i)?e=i:r=i;var a,o;if(e===void 0?a=M.create(n,r):(o=m.is(e)?e:this._changeAnnotations.manage(e),a=M.create(n,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},t.prototype.renameFile=function(n,i,r,e){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;I.is(r)||m.is(r)?a=r:e=r;var o,u;if(a===void 0?o=T.create(n,i,e):(u=m.is(a)?a:this._changeAnnotations.manage(a),o=T.create(n,i,e,u)),this._workspaceEdit.documentChanges.push(o),u!==void 0)return u},t.prototype.deleteFile=function(n,i,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;I.is(i)||m.is(i)?e=i:r=i;var a,o;if(e===void 0?a=S.create(n,r):(o=m.is(e)?e:this._changeAnnotations.manage(e),a=S.create(n,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},t}(),oe;(function(t){function n(r){return{uri:r}}t.create=n;function i(r){var e=r;return s.defined(e)&&s.string(e.uri)}t.is=i})(oe||(oe={}));var se;(function(t){function n(r,e){return{uri:r,version:e}}t.create=n;function i(r){var e=r;return s.defined(e)&&s.string(e.uri)&&s.integer(e.version)}t.is=i})(se||(se={}));var V;(function(t){function n(r,e){return{uri:r,version:e}}t.create=n;function i(r){var e=r;return s.defined(e)&&s.string(e.uri)&&(e.version===null||s.integer(e.version))}t.is=i})(V||(V={}));var ue;(function(t){function n(r,e,a,o){return{uri:r,languageId:e,version:a,text:o}}t.create=n;function i(r){var e=r;return s.defined(e)&&s.string(e.uri)&&s.string(e.languageId)&&s.integer(e.version)&&s.string(e.text)}t.is=i})(ue||(ue={}));var F;(function(t){t.PlainText="plaintext",t.Markdown="markdown"})(F||(F={}));(function(t){function n(i){var r=i;return r===t.PlainText||r===t.Markdown}t.is=n})(F||(F={}));var q;(function(t){function n(i){var r=i;return s.objectLiteral(i)&&F.is(r.kind)&&s.string(r.value)}t.is=n})(q||(q={}));var l;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(l||(l={}));var Q;(function(t){t.PlainText=1,t.Snippet=2})(Q||(Q={}));var ce;(function(t){t.Deprecated=1})(ce||(ce={}));var de;(function(t){function n(r,e,a){return{newText:r,insert:e,replace:a}}t.create=n;function i(r){var e=r;return e&&s.string(e.newText)&&p.is(e.insert)&&p.is(e.replace)}t.is=i})(de||(de={}));var fe;(function(t){t.asIs=1,t.adjustIndentation=2})(fe||(fe={}));var ge;(function(t){function n(i){return{label:i}}t.create=n})(ge||(ge={}));var le;(function(t){function n(i,r){return{items:i||[],isIncomplete:!!r}}t.create=n})(le||(le={}));var H;(function(t){function n(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=n;function i(r){var e=r;return s.string(e)||s.objectLiteral(e)&&s.string(e.language)&&s.string(e.value)}t.is=i})(H||(H={}));var he;(function(t){function n(i){var r=i;return!!r&&s.objectLiteral(r)&&(q.is(r.contents)||H.is(r.contents)||s.typedArray(r.contents,H.is))&&(i.range===void 0||p.is(i.range))}t.is=n})(he||(he={}));var ve;(function(t){function n(i,r){return r?{label:i,documentation:r}:{label:i}}t.create=n})(ve||(ve={}));var pe;(function(t){function n(i,r){for(var e=[],a=2;a<arguments.length;a++)e[a-2]=arguments[a];var o={label:i};return s.defined(r)&&(o.documentation=r),s.defined(e)?o.parameters=e:o.parameters=[],o}t.create=n})(pe||(pe={}));var P;(function(t){t.Text=1,t.Read=2,t.Write=3})(P||(P={}));var me;(function(t){function n(i,r){var e={range:i};return s.number(r)&&(e.kind=r),e}t.create=n})(me||(me={}));var h;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(h||(h={}));var _e;(function(t){t.Deprecated=1})(_e||(_e={}));var we;(function(t){function n(i,r,e,a,o){var u={name:i,kind:r,location:{uri:a,range:e}};return o&&(u.containerName=o),u}t.create=n})(we||(we={}));var ke;(function(t){function n(r,e,a,o,u,g){var d={name:r,detail:e,kind:a,range:o,selectionRange:u};return g!==void 0&&(d.children=g),d}t.create=n;function i(r){var e=r;return e&&s.string(e.name)&&s.number(e.kind)&&p.is(e.range)&&p.is(e.selectionRange)&&(e.detail===void 0||s.string(e.detail))&&(e.deprecated===void 0||s.boolean(e.deprecated))&&(e.children===void 0||Array.isArray(e.children))&&(e.tags===void 0||Array.isArray(e.tags))}t.is=i})(ke||(ke={}));var be;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(be||(be={}));var Ee;(function(t){function n(r,e){var a={diagnostics:r};return e!=null&&(a.only=e),a}t.create=n;function i(r){var e=r;return s.defined(e)&&s.typedArray(e.diagnostics,U.is)&&(e.only===void 0||s.typedArray(e.only,s.string))}t.is=i})(Ee||(Ee={}));var xe;(function(t){function n(r,e,a){var o={title:r},u=!0;return typeof e=="string"?(u=!1,o.kind=e):D.is(e)?o.command=e:o.edit=e,u&&a!==void 0&&(o.kind=a),o}t.create=n;function i(r){var e=r;return e&&s.string(e.title)&&(e.diagnostics===void 0||s.typedArray(e.diagnostics,U.is))&&(e.kind===void 0||s.string(e.kind))&&(e.edit!==void 0||e.command!==void 0)&&(e.command===void 0||D.is(e.command))&&(e.isPreferred===void 0||s.boolean(e.isPreferred))&&(e.edit===void 0||$.is(e.edit))}t.is=i})(xe||(xe={}));var Ce;(function(t){function n(r,e){var a={range:r};return s.defined(e)&&(a.data=e),a}t.create=n;function i(r){var e=r;return s.defined(e)&&p.is(e.range)&&(s.undefined(e.command)||D.is(e.command))}t.is=i})(Ce||(Ce={}));var Ae;(function(t){function n(r,e){return{tabSize:r,insertSpaces:e}}t.create=n;function i(r){var e=r;return s.defined(e)&&s.uinteger(e.tabSize)&&s.boolean(e.insertSpaces)}t.is=i})(Ae||(Ae={}));var ye;(function(t){function n(r,e,a){return{range:r,target:e,data:a}}t.create=n;function i(r){var e=r;return s.defined(e)&&p.is(e.range)&&(s.undefined(e.target)||s.string(e.target))}t.is=i})(ye||(ye={}));var Ie;(function(t){function n(r,e){return{range:r,parent:e}}t.create=n;function i(r){var e=r;return e!==void 0&&p.is(e.range)&&(e.parent===void 0||t.is(e.parent))}t.is=i})(Ie||(Ie={}));var Re;(function(t){function n(a,o,u,g){return new He(a,o,u,g)}t.create=n;function i(a){var o=a;return!!(s.defined(o)&&s.string(o.uri)&&(s.undefined(o.languageId)||s.string(o.languageId))&&s.uinteger(o.lineCount)&&s.func(o.getText)&&s.func(o.positionAt)&&s.func(o.offsetAt))}t.is=i;function r(a,o){for(var u=a.getText(),g=e(o,function(A,j){var G=A.range.start.line-j.range.start.line;return G===0?A.range.start.character-j.range.start.character:G}),d=u.length,v=g.length-1;v>=0;v--){var w=g[v],b=a.offsetAt(w.range.start),f=a.offsetAt(w.range.end);if(f<=d)u=u.substring(0,b)+w.newText+u.substring(f,u.length);else throw new Error("Overlapping edit");d=b}return u}t.applyEdits=r;function e(a,o){if(a.length<=1)return a;var u=a.length/2|0,g=a.slice(0,u),d=a.slice(u);e(g,o),e(d,o);for(var v=0,w=0,b=0;v<g.length&&w<d.length;){var f=o(g[v],d[w]);f<=0?a[b++]=g[v++]:a[b++]=d[w++]}for(;v<g.length;)a[b++]=g[v++];for(;w<d.length;)a[b++]=d[w++];return a}})(Re||(Re={}));var He=function(){function t(n,i,r,e){this._uri=n,this._languageId=i,this._version=r,this._content=e,this._lineOffsets=void 0}return Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),t.prototype.getText=function(n){if(n){var i=this.offsetAt(n.start),r=this.offsetAt(n.end);return this._content.substring(i,r)}return this._content},t.prototype.update=function(n,i){this._content=n.text,this._version=i,this._lineOffsets=void 0},t.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var n=[],i=this._content,r=!0,e=0;e<i.length;e++){r&&(n.push(e),r=!1);var a=i.charAt(e);r=a==="\r"||a===`
|
|
6
|
+
import{rk as J}from"./K65MMKQZ.js";import"./54R6KKGA.js";var Le=Object.defineProperty,je=Object.getOwnPropertyDescriptor,Ne=Object.getOwnPropertyNames,We=Object.prototype.hasOwnProperty,Y=(t,n,i,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let e of Ne(n))!We.call(t,e)&&e!==i&&Le(t,e,{get:()=>n[e],enumerable:!(r=je(n,e))||r.enumerable});return t},Ue=(t,n,i)=>(Y(t,n,"default"),i&&Y(i,n,"default")),c={};Ue(c,J);var Oe=2*60*1e3,Ve=class{_defaults;_idleCheckInterval;_lastUsedTime;_configChangeListener;_worker;_client;constructor(t){this._defaults=t,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>Oe&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=c.editor.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...t){let n;return this._getClient().then(i=>{n=i}).then(i=>{if(this._worker)return this._worker.withSyncedResources(t)}).then(i=>n)}},Z;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647})(Z||(Z={}));var W;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647})(W||(W={}));var k;(function(t){function n(r,e){return r===Number.MAX_VALUE&&(r=W.MAX_VALUE),e===Number.MAX_VALUE&&(e=W.MAX_VALUE),{line:r,character:e}}t.create=n;function i(r){var e=r;return s.objectLiteral(e)&&s.uinteger(e.line)&&s.uinteger(e.character)}t.is=i})(k||(k={}));var p;(function(t){function n(r,e,a,o){if(s.uinteger(r)&&s.uinteger(e)&&s.uinteger(a)&&s.uinteger(o))return{start:k.create(r,e),end:k.create(a,o)};if(k.is(r)&&k.is(e))return{start:r,end:e};throw new Error("Range#create called with invalid arguments["+r+", "+e+", "+a+", "+o+"]")}t.create=n;function i(r){var e=r;return s.objectLiteral(e)&&k.is(e.start)&&k.is(e.end)}t.is=i})(p||(p={}));var z;(function(t){function n(r,e){return{uri:r,range:e}}t.create=n;function i(r){var e=r;return s.defined(e)&&p.is(e.range)&&(s.string(e.uri)||s.undefined(e.uri))}t.is=i})(z||(z={}));var K;(function(t){function n(r,e,a,o){return{targetUri:r,targetRange:e,targetSelectionRange:a,originSelectionRange:o}}t.create=n;function i(r){var e=r;return s.defined(e)&&p.is(e.targetRange)&&s.string(e.targetUri)&&(p.is(e.targetSelectionRange)||s.undefined(e.targetSelectionRange))&&(p.is(e.originSelectionRange)||s.undefined(e.originSelectionRange))}t.is=i})(K||(K={}));var X;(function(t){function n(r,e,a,o){return{red:r,green:e,blue:a,alpha:o}}t.create=n;function i(r){var e=r;return s.numberRange(e.red,0,1)&&s.numberRange(e.green,0,1)&&s.numberRange(e.blue,0,1)&&s.numberRange(e.alpha,0,1)}t.is=i})(X||(X={}));var ee;(function(t){function n(r,e){return{range:r,color:e}}t.create=n;function i(r){var e=r;return p.is(e.range)&&X.is(e.color)}t.is=i})(ee||(ee={}));var te;(function(t){function n(r,e,a){return{label:r,textEdit:e,additionalTextEdits:a}}t.create=n;function i(r){var e=r;return s.string(e.label)&&(s.undefined(e.textEdit)||x.is(e))&&(s.undefined(e.additionalTextEdits)||s.typedArray(e.additionalTextEdits,x.is))}t.is=i})(te||(te={}));var R;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(R||(R={}));var re;(function(t){function n(r,e,a,o,u){var g={startLine:r,endLine:e};return s.defined(a)&&(g.startCharacter=a),s.defined(o)&&(g.endCharacter=o),s.defined(u)&&(g.kind=u),g}t.create=n;function i(r){var e=r;return s.uinteger(e.startLine)&&s.uinteger(e.startLine)&&(s.undefined(e.startCharacter)||s.uinteger(e.startCharacter))&&(s.undefined(e.endCharacter)||s.uinteger(e.endCharacter))&&(s.undefined(e.kind)||s.string(e.kind))}t.is=i})(re||(re={}));var B;(function(t){function n(r,e){return{location:r,message:e}}t.create=n;function i(r){var e=r;return s.defined(e)&&z.is(e.location)&&s.string(e.message)}t.is=i})(B||(B={}));var y;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(y||(y={}));var ne;(function(t){t.Unnecessary=1,t.Deprecated=2})(ne||(ne={}));var ie;(function(t){function n(i){var r=i;return r!=null&&s.string(r.href)}t.is=n})(ie||(ie={}));var U;(function(t){function n(r,e,a,o,u,g){var d={range:r,message:e};return s.defined(a)&&(d.severity=a),s.defined(o)&&(d.code=o),s.defined(u)&&(d.source=u),s.defined(g)&&(d.relatedInformation=g),d}t.create=n;function i(r){var e,a=r;return s.defined(a)&&p.is(a.range)&&s.string(a.message)&&(s.number(a.severity)||s.undefined(a.severity))&&(s.integer(a.code)||s.string(a.code)||s.undefined(a.code))&&(s.undefined(a.codeDescription)||s.string((e=a.codeDescription)===null||e===void 0?void 0:e.href))&&(s.string(a.source)||s.undefined(a.source))&&(s.undefined(a.relatedInformation)||s.typedArray(a.relatedInformation,B.is))}t.is=i})(U||(U={}));var D;(function(t){function n(r,e){for(var a=[],o=2;o<arguments.length;o++)a[o-2]=arguments[o];var u={title:r,command:e};return s.defined(a)&&a.length>0&&(u.arguments=a),u}t.create=n;function i(r){var e=r;return s.defined(e)&&s.string(e.title)&&s.string(e.command)}t.is=i})(D||(D={}));var x;(function(t){function n(a,o){return{range:a,newText:o}}t.replace=n;function i(a,o){return{range:{start:a,end:a},newText:o}}t.insert=i;function r(a){return{range:a,newText:""}}t.del=r;function e(a){var o=a;return s.objectLiteral(o)&&s.string(o.newText)&&p.is(o.range)}t.is=e})(x||(x={}));var I;(function(t){function n(r,e,a){var o={label:r};return e!==void 0&&(o.needsConfirmation=e),a!==void 0&&(o.description=a),o}t.create=n;function i(r){var e=r;return e!==void 0&&s.objectLiteral(e)&&s.string(e.label)&&(s.boolean(e.needsConfirmation)||e.needsConfirmation===void 0)&&(s.string(e.description)||e.description===void 0)}t.is=i})(I||(I={}));var m;(function(t){function n(i){var r=i;return typeof r=="string"}t.is=n})(m||(m={}));var E;(function(t){function n(a,o,u){return{range:a,newText:o,annotationId:u}}t.replace=n;function i(a,o,u){return{range:{start:a,end:a},newText:o,annotationId:u}}t.insert=i;function r(a,o){return{range:a,newText:"",annotationId:o}}t.del=r;function e(a){var o=a;return x.is(o)&&(I.is(o.annotationId)||m.is(o.annotationId))}t.is=e})(E||(E={}));var O;(function(t){function n(r,e){return{textDocument:r,edits:e}}t.create=n;function i(r){var e=r;return s.defined(e)&&V.is(e.textDocument)&&Array.isArray(e.edits)}t.is=i})(O||(O={}));var M;(function(t){function n(r,e,a){var o={kind:"create",uri:r};return e!==void 0&&(e.overwrite!==void 0||e.ignoreIfExists!==void 0)&&(o.options=e),a!==void 0&&(o.annotationId=a),o}t.create=n;function i(r){var e=r;return e&&e.kind==="create"&&s.string(e.uri)&&(e.options===void 0||(e.options.overwrite===void 0||s.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||s.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||m.is(e.annotationId))}t.is=i})(M||(M={}));var T;(function(t){function n(r,e,a,o){var u={kind:"rename",oldUri:r,newUri:e};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(u.options=a),o!==void 0&&(u.annotationId=o),u}t.create=n;function i(r){var e=r;return e&&e.kind==="rename"&&s.string(e.oldUri)&&s.string(e.newUri)&&(e.options===void 0||(e.options.overwrite===void 0||s.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||s.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||m.is(e.annotationId))}t.is=i})(T||(T={}));var S;(function(t){function n(r,e,a){var o={kind:"delete",uri:r};return e!==void 0&&(e.recursive!==void 0||e.ignoreIfNotExists!==void 0)&&(o.options=e),a!==void 0&&(o.annotationId=a),o}t.create=n;function i(r){var e=r;return e&&e.kind==="delete"&&s.string(e.uri)&&(e.options===void 0||(e.options.recursive===void 0||s.boolean(e.options.recursive))&&(e.options.ignoreIfNotExists===void 0||s.boolean(e.options.ignoreIfNotExists)))&&(e.annotationId===void 0||m.is(e.annotationId))}t.is=i})(S||(S={}));var $;(function(t){function n(i){var r=i;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(e){return s.string(e.kind)?M.is(e)||T.is(e)||S.is(e):O.is(e)}))}t.is=n})($||($={}));var N=function(){function t(n,i){this.edits=n,this.changeAnnotations=i}return t.prototype.insert=function(n,i,r){var e,a;if(r===void 0?e=x.insert(n,i):m.is(r)?(a=r,e=E.insert(n,i,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),e=E.insert(n,i,a)),this.edits.push(e),a!==void 0)return a},t.prototype.replace=function(n,i,r){var e,a;if(r===void 0?e=x.replace(n,i):m.is(r)?(a=r,e=E.replace(n,i,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),e=E.replace(n,i,a)),this.edits.push(e),a!==void 0)return a},t.prototype.delete=function(n,i){var r,e;if(i===void 0?r=x.del(n):m.is(i)?(e=i,r=E.del(n,i)):(this.assertChangeAnnotations(this.changeAnnotations),e=this.changeAnnotations.manage(i),r=E.del(n,e)),this.edits.push(r),e!==void 0)return e},t.prototype.add=function(n){this.edits.push(n)},t.prototype.all=function(){return this.edits},t.prototype.clear=function(){this.edits.splice(0,this.edits.length)},t.prototype.assertChangeAnnotations=function(n){if(n===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},t}(),ae=function(){function t(n){this._annotations=n===void 0?Object.create(null):n,this._counter=0,this._size=0}return t.prototype.all=function(){return this._annotations},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.manage=function(n,i){var r;if(m.is(n)?r=n:(r=this.nextId(),i=n),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(i===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=i,this._size++,r},t.prototype.nextId=function(){return this._counter++,this._counter.toString()},t}(),lt=function(){function t(n){var i=this;this._textEditChanges=Object.create(null),n!==void 0?(this._workspaceEdit=n,n.documentChanges?(this._changeAnnotations=new ae(n.changeAnnotations),n.changeAnnotations=this._changeAnnotations.all(),n.documentChanges.forEach(function(r){if(O.is(r)){var e=new N(r.edits,i._changeAnnotations);i._textEditChanges[r.textDocument.uri]=e}})):n.changes&&Object.keys(n.changes).forEach(function(r){var e=new N(n.changes[r]);i._textEditChanges[r]=e})):this._workspaceEdit={}}return Object.defineProperty(t.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),t.prototype.getTextEditChange=function(n){if(V.is(n)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:n.uri,version:n.version},r=this._textEditChanges[i.uri];if(!r){var e=[],a={textDocument:i,edits:e};this._workspaceEdit.documentChanges.push(a),r=new N(e,this._changeAnnotations),this._textEditChanges[i.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[n];if(!r){var e=[];this._workspaceEdit.changes[n]=e,r=new N(e),this._textEditChanges[n]=r}return r}},t.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ae,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},t.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},t.prototype.createFile=function(n,i,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;I.is(i)||m.is(i)?e=i:r=i;var a,o;if(e===void 0?a=M.create(n,r):(o=m.is(e)?e:this._changeAnnotations.manage(e),a=M.create(n,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},t.prototype.renameFile=function(n,i,r,e){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;I.is(r)||m.is(r)?a=r:e=r;var o,u;if(a===void 0?o=T.create(n,i,e):(u=m.is(a)?a:this._changeAnnotations.manage(a),o=T.create(n,i,e,u)),this._workspaceEdit.documentChanges.push(o),u!==void 0)return u},t.prototype.deleteFile=function(n,i,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;I.is(i)||m.is(i)?e=i:r=i;var a,o;if(e===void 0?a=S.create(n,r):(o=m.is(e)?e:this._changeAnnotations.manage(e),a=S.create(n,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},t}(),oe;(function(t){function n(r){return{uri:r}}t.create=n;function i(r){var e=r;return s.defined(e)&&s.string(e.uri)}t.is=i})(oe||(oe={}));var se;(function(t){function n(r,e){return{uri:r,version:e}}t.create=n;function i(r){var e=r;return s.defined(e)&&s.string(e.uri)&&s.integer(e.version)}t.is=i})(se||(se={}));var V;(function(t){function n(r,e){return{uri:r,version:e}}t.create=n;function i(r){var e=r;return s.defined(e)&&s.string(e.uri)&&(e.version===null||s.integer(e.version))}t.is=i})(V||(V={}));var ue;(function(t){function n(r,e,a,o){return{uri:r,languageId:e,version:a,text:o}}t.create=n;function i(r){var e=r;return s.defined(e)&&s.string(e.uri)&&s.string(e.languageId)&&s.integer(e.version)&&s.string(e.text)}t.is=i})(ue||(ue={}));var F;(function(t){t.PlainText="plaintext",t.Markdown="markdown"})(F||(F={}));(function(t){function n(i){var r=i;return r===t.PlainText||r===t.Markdown}t.is=n})(F||(F={}));var q;(function(t){function n(i){var r=i;return s.objectLiteral(i)&&F.is(r.kind)&&s.string(r.value)}t.is=n})(q||(q={}));var l;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(l||(l={}));var Q;(function(t){t.PlainText=1,t.Snippet=2})(Q||(Q={}));var ce;(function(t){t.Deprecated=1})(ce||(ce={}));var de;(function(t){function n(r,e,a){return{newText:r,insert:e,replace:a}}t.create=n;function i(r){var e=r;return e&&s.string(e.newText)&&p.is(e.insert)&&p.is(e.replace)}t.is=i})(de||(de={}));var fe;(function(t){t.asIs=1,t.adjustIndentation=2})(fe||(fe={}));var ge;(function(t){function n(i){return{label:i}}t.create=n})(ge||(ge={}));var le;(function(t){function n(i,r){return{items:i||[],isIncomplete:!!r}}t.create=n})(le||(le={}));var H;(function(t){function n(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=n;function i(r){var e=r;return s.string(e)||s.objectLiteral(e)&&s.string(e.language)&&s.string(e.value)}t.is=i})(H||(H={}));var he;(function(t){function n(i){var r=i;return!!r&&s.objectLiteral(r)&&(q.is(r.contents)||H.is(r.contents)||s.typedArray(r.contents,H.is))&&(i.range===void 0||p.is(i.range))}t.is=n})(he||(he={}));var ve;(function(t){function n(i,r){return r?{label:i,documentation:r}:{label:i}}t.create=n})(ve||(ve={}));var pe;(function(t){function n(i,r){for(var e=[],a=2;a<arguments.length;a++)e[a-2]=arguments[a];var o={label:i};return s.defined(r)&&(o.documentation=r),s.defined(e)?o.parameters=e:o.parameters=[],o}t.create=n})(pe||(pe={}));var P;(function(t){t.Text=1,t.Read=2,t.Write=3})(P||(P={}));var me;(function(t){function n(i,r){var e={range:i};return s.number(r)&&(e.kind=r),e}t.create=n})(me||(me={}));var h;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(h||(h={}));var _e;(function(t){t.Deprecated=1})(_e||(_e={}));var we;(function(t){function n(i,r,e,a,o){var u={name:i,kind:r,location:{uri:a,range:e}};return o&&(u.containerName=o),u}t.create=n})(we||(we={}));var ke;(function(t){function n(r,e,a,o,u,g){var d={name:r,detail:e,kind:a,range:o,selectionRange:u};return g!==void 0&&(d.children=g),d}t.create=n;function i(r){var e=r;return e&&s.string(e.name)&&s.number(e.kind)&&p.is(e.range)&&p.is(e.selectionRange)&&(e.detail===void 0||s.string(e.detail))&&(e.deprecated===void 0||s.boolean(e.deprecated))&&(e.children===void 0||Array.isArray(e.children))&&(e.tags===void 0||Array.isArray(e.tags))}t.is=i})(ke||(ke={}));var be;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(be||(be={}));var Ee;(function(t){function n(r,e){var a={diagnostics:r};return e!=null&&(a.only=e),a}t.create=n;function i(r){var e=r;return s.defined(e)&&s.typedArray(e.diagnostics,U.is)&&(e.only===void 0||s.typedArray(e.only,s.string))}t.is=i})(Ee||(Ee={}));var xe;(function(t){function n(r,e,a){var o={title:r},u=!0;return typeof e=="string"?(u=!1,o.kind=e):D.is(e)?o.command=e:o.edit=e,u&&a!==void 0&&(o.kind=a),o}t.create=n;function i(r){var e=r;return e&&s.string(e.title)&&(e.diagnostics===void 0||s.typedArray(e.diagnostics,U.is))&&(e.kind===void 0||s.string(e.kind))&&(e.edit!==void 0||e.command!==void 0)&&(e.command===void 0||D.is(e.command))&&(e.isPreferred===void 0||s.boolean(e.isPreferred))&&(e.edit===void 0||$.is(e.edit))}t.is=i})(xe||(xe={}));var Ce;(function(t){function n(r,e){var a={range:r};return s.defined(e)&&(a.data=e),a}t.create=n;function i(r){var e=r;return s.defined(e)&&p.is(e.range)&&(s.undefined(e.command)||D.is(e.command))}t.is=i})(Ce||(Ce={}));var Ae;(function(t){function n(r,e){return{tabSize:r,insertSpaces:e}}t.create=n;function i(r){var e=r;return s.defined(e)&&s.uinteger(e.tabSize)&&s.boolean(e.insertSpaces)}t.is=i})(Ae||(Ae={}));var ye;(function(t){function n(r,e,a){return{range:r,target:e,data:a}}t.create=n;function i(r){var e=r;return s.defined(e)&&p.is(e.range)&&(s.undefined(e.target)||s.string(e.target))}t.is=i})(ye||(ye={}));var Ie;(function(t){function n(r,e){return{range:r,parent:e}}t.create=n;function i(r){var e=r;return e!==void 0&&p.is(e.range)&&(e.parent===void 0||t.is(e.parent))}t.is=i})(Ie||(Ie={}));var Re;(function(t){function n(a,o,u,g){return new He(a,o,u,g)}t.create=n;function i(a){var o=a;return!!(s.defined(o)&&s.string(o.uri)&&(s.undefined(o.languageId)||s.string(o.languageId))&&s.uinteger(o.lineCount)&&s.func(o.getText)&&s.func(o.positionAt)&&s.func(o.offsetAt))}t.is=i;function r(a,o){for(var u=a.getText(),g=e(o,function(A,j){var G=A.range.start.line-j.range.start.line;return G===0?A.range.start.character-j.range.start.character:G}),d=u.length,v=g.length-1;v>=0;v--){var w=g[v],b=a.offsetAt(w.range.start),f=a.offsetAt(w.range.end);if(f<=d)u=u.substring(0,b)+w.newText+u.substring(f,u.length);else throw new Error("Overlapping edit");d=b}return u}t.applyEdits=r;function e(a,o){if(a.length<=1)return a;var u=a.length/2|0,g=a.slice(0,u),d=a.slice(u);e(g,o),e(d,o);for(var v=0,w=0,b=0;v<g.length&&w<d.length;){var f=o(g[v],d[w]);f<=0?a[b++]=g[v++]:a[b++]=d[w++]}for(;v<g.length;)a[b++]=g[v++];for(;w<d.length;)a[b++]=d[w++];return a}})(Re||(Re={}));var He=function(){function t(n,i,r,e){this._uri=n,this._languageId=i,this._version=r,this._content=e,this._lineOffsets=void 0}return Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),t.prototype.getText=function(n){if(n){var i=this.offsetAt(n.start),r=this.offsetAt(n.end);return this._content.substring(i,r)}return this._content},t.prototype.update=function(n,i){this._content=n.text,this._version=i,this._lineOffsets=void 0},t.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var n=[],i=this._content,r=!0,e=0;e<i.length;e++){r&&(n.push(e),r=!1);var a=i.charAt(e);r=a==="\r"||a===`
|
|
7
7
|
`,a==="\r"&&e+1<i.length&&i.charAt(e+1)===`
|
|
8
8
|
`&&e++}r&&i.length>0&&n.push(i.length),this._lineOffsets=n}return this._lineOffsets},t.prototype.positionAt=function(n){n=Math.max(Math.min(n,this._content.length),0);var i=this.getLineOffsets(),r=0,e=i.length;if(e===0)return k.create(0,n);for(;r<e;){var a=Math.floor((r+e)/2);i[a]>n?e=a:r=a+1}var o=r-1;return k.create(o,n-i[o])},t.prototype.offsetAt=function(n){var i=this.getLineOffsets();if(n.line>=i.length)return this._content.length;if(n.line<0)return 0;var r=i[n.line],e=n.line+1<i.length?i[n.line+1]:this._content.length;return Math.max(Math.min(r+n.character,e),r)},Object.defineProperty(t.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),t}(),s;(function(t){var n=Object.prototype.toString;function i(f){return typeof f<"u"}t.defined=i;function r(f){return typeof f>"u"}t.undefined=r;function e(f){return f===!0||f===!1}t.boolean=e;function a(f){return n.call(f)==="[object String]"}t.string=a;function o(f){return n.call(f)==="[object Number]"}t.number=o;function u(f,A,j){return n.call(f)==="[object Number]"&&A<=f&&f<=j}t.numberRange=u;function g(f){return n.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}t.integer=g;function d(f){return n.call(f)==="[object Number]"&&0<=f&&f<=2147483647}t.uinteger=d;function v(f){return n.call(f)==="[object Function]"}t.func=v;function w(f){return f!==null&&typeof f=="object"}t.objectLiteral=w;function b(f,A){return Array.isArray(f)&&f.every(A)}t.typedArray=b})(s||(s={}));var ze=class{constructor(t,n,i){this._languageId=t,this._worker=n;let r=a=>{let o=a.getLanguageId();if(o!==this._languageId)return;let u;this._listener[a.uri.toString()]=a.onDidChangeContent(()=>{window.clearTimeout(u),u=window.setTimeout(()=>this._doValidate(a.uri,o),500)}),this._doValidate(a.uri,o)},e=a=>{c.editor.setModelMarkers(a,this._languageId,[]);let o=a.uri.toString(),u=this._listener[o];u&&(u.dispose(),delete this._listener[o])};this._disposables.push(c.editor.onDidCreateModel(r)),this._disposables.push(c.editor.onWillDisposeModel(e)),this._disposables.push(c.editor.onDidChangeModelLanguage(a=>{e(a.model),r(a.model)})),this._disposables.push(i(a=>{c.editor.getModels().forEach(o=>{o.getLanguageId()===this._languageId&&(e(o),r(o))})})),this._disposables.push({dispose:()=>{c.editor.getModels().forEach(e);for(let a in this._listener)this._listener[a].dispose()}}),c.editor.getModels().forEach(r)}_disposables=[];_listener=Object.create(null);dispose(){this._disposables.forEach(t=>t&&t.dispose()),this._disposables.length=0}_doValidate(t,n){this._worker(t).then(i=>i.doValidation(t.toString())).then(i=>{let r=i.map(a=>Be(t,a)),e=c.editor.getModel(t);e&&e.getLanguageId()===n&&c.editor.setModelMarkers(e,n,r)}).then(void 0,i=>{console.error(i)})}};function Xe(t){switch(t){case y.Error:return c.MarkerSeverity.Error;case y.Warning:return c.MarkerSeverity.Warning;case y.Information:return c.MarkerSeverity.Info;case y.Hint:return c.MarkerSeverity.Hint;default:return c.MarkerSeverity.Info}}function Be(t,n){let i=typeof n.code=="number"?String(n.code):n.code;return{severity:Xe(n.severity),startLineNumber:n.range.start.line+1,startColumn:n.range.start.character+1,endLineNumber:n.range.end.line+1,endColumn:n.range.end.character+1,message:n.message,code:i,source:n.source}}var $e=class{constructor(t,n){this._worker=t,this._triggerCharacters=n}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(t,n,i,r){let e=t.uri;return this._worker(e).then(a=>a.doComplete(e.toString(),C(n))).then(a=>{if(!a)return;let o=t.getWordUntilPosition(n),u=new c.Range(n.lineNumber,o.startColumn,n.lineNumber,o.endColumn),g=a.items.map(d=>{let v={label:d.label,insertText:d.insertText||d.label,sortText:d.sortText,filterText:d.filterText,documentation:d.documentation,detail:d.detail,command:Ge(d.command),range:u,kind:Qe(d.kind)};return d.textEdit&&(qe(d.textEdit)?v.range={insert:_(d.textEdit.insert),replace:_(d.textEdit.replace)}:v.range=_(d.textEdit.range),v.insertText=d.textEdit.newText),d.additionalTextEdits&&(v.additionalTextEdits=d.additionalTextEdits.map(L)),d.insertTextFormat===Q.Snippet&&(v.insertTextRules=c.languages.CompletionItemInsertTextRule.InsertAsSnippet),v});return{isIncomplete:a.isIncomplete,suggestions:g}})}};function C(t){if(t)return{character:t.column-1,line:t.lineNumber-1}}function Me(t){if(t)return{start:{line:t.startLineNumber-1,character:t.startColumn-1},end:{line:t.endLineNumber-1,character:t.endColumn-1}}}function _(t){if(t)return new c.Range(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function qe(t){return typeof t.insert<"u"&&typeof t.replace<"u"}function Qe(t){let n=c.languages.CompletionItemKind;switch(t){case l.Text:return n.Text;case l.Method:return n.Method;case l.Function:return n.Function;case l.Constructor:return n.Constructor;case l.Field:return n.Field;case l.Variable:return n.Variable;case l.Class:return n.Class;case l.Interface:return n.Interface;case l.Module:return n.Module;case l.Property:return n.Property;case l.Unit:return n.Unit;case l.Value:return n.Value;case l.Enum:return n.Enum;case l.Keyword:return n.Keyword;case l.Snippet:return n.Snippet;case l.Color:return n.Color;case l.File:return n.File;case l.Reference:return n.Reference}return n.Property}function L(t){if(t)return{range:_(t.range),text:t.newText}}function Ge(t){return t&&t.command==="editor.action.triggerSuggest"?{id:t.command,title:t.title,arguments:t.arguments}:void 0}var Je=class{constructor(t){this._worker=t}provideHover(t,n,i){let r=t.uri;return this._worker(r).then(e=>e.doHover(r.toString(),C(n))).then(e=>{if(e)return{range:_(e.range),contents:Ze(e.contents)}})}};function Ye(t){return t&&typeof t=="object"&&typeof t.kind=="string"}function Pe(t){return typeof t=="string"?{value:t}:Ye(t)?t.kind==="plaintext"?{value:t.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:t.value}:{value:"```"+t.language+`
|
|
9
9
|
`+t.value+"\n```\n"}}function Ze(t){if(t)return Array.isArray(t)?t.map(Pe):[Pe(t)]}var Ke=class{constructor(t){this._worker=t}provideDocumentHighlights(t,n,i){let r=t.uri;return this._worker(r).then(e=>e.findDocumentHighlights(r.toString(),C(n))).then(e=>{if(e)return e.map(a=>({range:_(a.range),kind:et(a.kind)}))})}};function et(t){switch(t){case P.Read:return c.languages.DocumentHighlightKind.Read;case P.Write:return c.languages.DocumentHighlightKind.Write;case P.Text:return c.languages.DocumentHighlightKind.Text}return c.languages.DocumentHighlightKind.Text}var tt=class{constructor(t){this._worker=t}provideDefinition(t,n,i){let r=t.uri;return this._worker(r).then(e=>e.findDefinition(r.toString(),C(n))).then(e=>{if(e)return[Te(e)]})}};function Te(t){return{uri:c.Uri.parse(t.uri),range:_(t.range)}}var rt=class{constructor(t){this._worker=t}provideReferences(t,n,i,r){let e=t.uri;return this._worker(e).then(a=>a.findReferences(e.toString(),C(n))).then(a=>{if(a)return a.map(Te)})}},nt=class{constructor(t){this._worker=t}provideRenameEdits(t,n,i,r){let e=t.uri;return this._worker(e).then(a=>a.doRename(e.toString(),C(n),i)).then(a=>it(a))}};function it(t){if(!t||!t.changes)return;let n=[];for(let i in t.changes){let r=c.Uri.parse(i);for(let e of t.changes[i])n.push({resource:r,versionId:void 0,textEdit:{range:_(e.range),text:e.newText}})}return{edits:n}}var at=class{constructor(t){this._worker=t}provideDocumentSymbols(t,n){let i=t.uri;return this._worker(i).then(r=>r.findDocumentSymbols(i.toString())).then(r=>{if(r)return r.map(e=>({name:e.name,detail:"",containerName:e.containerName,kind:ot(e.kind),range:_(e.location.range),selectionRange:_(e.location.range),tags:[]}))})}};function ot(t){let n=c.languages.SymbolKind;switch(t){case h.File:return n.Array;case h.Module:return n.Module;case h.Namespace:return n.Namespace;case h.Package:return n.Package;case h.Class:return n.Class;case h.Method:return n.Method;case h.Property:return n.Property;case h.Field:return n.Field;case h.Constructor:return n.Constructor;case h.Enum:return n.Enum;case h.Interface:return n.Interface;case h.Function:return n.Function;case h.Variable:return n.Variable;case h.Constant:return n.Constant;case h.String:return n.String;case h.Number:return n.Number;case h.Boolean:return n.Boolean;case h.Array:return n.Array}return n.Function}var ht=class{constructor(t){this._worker=t}provideLinks(t,n){let i=t.uri;return this._worker(i).then(r=>r.findDocumentLinks(i.toString())).then(r=>{if(r)return{links:r.map(e=>({range:_(e.range),url:e.target}))}})}},st=class{constructor(t){this._worker=t}provideDocumentFormattingEdits(t,n,i){let r=t.uri;return this._worker(r).then(e=>e.format(r.toString(),null,Se(n)).then(a=>{if(!(!a||a.length===0))return a.map(L)}))}},ut=class{constructor(t){this._worker=t}canFormatMultipleRanges=!1;provideDocumentRangeFormattingEdits(t,n,i,r){let e=t.uri;return this._worker(e).then(a=>a.format(e.toString(),Me(n),Se(i)).then(o=>{if(!(!o||o.length===0))return o.map(L)}))}};function Se(t){return{tabSize:t.tabSize,insertSpaces:t.insertSpaces}}var ct=class{constructor(t){this._worker=t}provideDocumentColors(t,n){let i=t.uri;return this._worker(i).then(r=>r.findDocumentColors(i.toString())).then(r=>{if(r)return r.map(e=>({color:e.color,range:_(e.range)}))})}provideColorPresentations(t,n,i){let r=t.uri;return this._worker(r).then(e=>e.getColorPresentations(r.toString(),n.color,Me(n.range))).then(e=>{if(e)return e.map(a=>{let o={label:a.label};return a.textEdit&&(o.textEdit=L(a.textEdit)),a.additionalTextEdits&&(o.additionalTextEdits=a.additionalTextEdits.map(L)),o})})}},dt=class{constructor(t){this._worker=t}provideFoldingRanges(t,n,i){let r=t.uri;return this._worker(r).then(e=>e.getFoldingRanges(r.toString(),n)).then(e=>{if(e)return e.map(a=>{let o={start:a.startLine+1,end:a.endLine+1};return typeof a.kind<"u"&&(o.kind=ft(a.kind)),o})})}};function ft(t){switch(t){case R.Comment:return c.languages.FoldingRangeKind.Comment;case R.Imports:return c.languages.FoldingRangeKind.Imports;case R.Region:return c.languages.FoldingRangeKind.Region}}var gt=class{constructor(t){this._worker=t}provideSelectionRanges(t,n,i){let r=t.uri;return this._worker(r).then(e=>e.getSelectionRanges(r.toString(),n.map(C))).then(e=>{if(e)return e.map(a=>{let o=[];for(;a;)o.push({range:_(a.range)}),a=a.parent;return o})})}};function vt(t){let n=[],i=[],r=new Ve(t);n.push(r);let e=(...o)=>r.getLanguageServiceWorker(...o);function a(){let{languageId:o,modeConfiguration:u}=t;Fe(i),u.completionItems&&i.push(c.languages.registerCompletionItemProvider(o,new $e(e,["/","-",":"]))),u.hovers&&i.push(c.languages.registerHoverProvider(o,new Je(e))),u.documentHighlights&&i.push(c.languages.registerDocumentHighlightProvider(o,new Ke(e))),u.definitions&&i.push(c.languages.registerDefinitionProvider(o,new tt(e))),u.references&&i.push(c.languages.registerReferenceProvider(o,new rt(e))),u.documentSymbols&&i.push(c.languages.registerDocumentSymbolProvider(o,new at(e))),u.rename&&i.push(c.languages.registerRenameProvider(o,new nt(e))),u.colors&&i.push(c.languages.registerColorProvider(o,new ct(e))),u.foldingRanges&&i.push(c.languages.registerFoldingRangeProvider(o,new dt(e))),u.diagnostics&&i.push(new ze(o,e,t.onDidChange)),u.selectionRanges&&i.push(c.languages.registerSelectionRangeProvider(o,new gt(e))),u.documentFormattingEdits&&i.push(c.languages.registerDocumentFormattingEditProvider(o,new st(e))),u.documentRangeFormattingEdits&&i.push(c.languages.registerDocumentRangeFormattingEditProvider(o,new ut(e)))}return a(),n.push(De(i)),De(n)}function De(t){return{dispose:()=>Fe(t)}}function Fe(t){for(;t.length;)t.pop().dispose()}export{$e as CompletionAdapter,tt as DefinitionAdapter,ze as DiagnosticsAdapter,ct as DocumentColorAdapter,st as DocumentFormattingEditProvider,Ke as DocumentHighlightAdapter,ht as DocumentLinkAdapter,ut as DocumentRangeFormattingEditProvider,at as DocumentSymbolAdapter,dt as FoldingRangeAdapter,Je as HoverAdapter,rt as ReferenceAdapter,nt as RenameAdapter,gt as SelectionRangeAdapter,Ve as WorkerManager,C as fromPosition,Me as fromRange,vt as setupMode,_ as toRange,L as toTextEdit};
|