@arcgis/coding-components 4.31.0-next.72 → 4.31.0-next.74
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/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/index.esm.js +2 -2
- package/dist/arcgis-coding-components/{p-d568bf12.js → p-2be39584.js} +2 -2
- package/dist/arcgis-coding-components/{p-b2d3b699.js → p-30c460e5.js} +2 -2
- package/dist/arcgis-coding-components/{p-f7eb1981.entry.js → p-3a31c8f1.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-26b0e8f3.js → p-3ba2a4ad.js} +2 -2
- package/dist/arcgis-coding-components/{p-bde70f64.js → p-6cfdf3e4.js} +2 -2
- package/dist/arcgis-coding-components/{p-0d2c65af.js → p-6f72d8a9.js} +2 -2
- package/dist/arcgis-coding-components/{p-87888cf7.js → p-7b78a7cb.js} +2 -2
- package/dist/arcgis-coding-components/{p-54a2618e.entry.js → p-8decd808.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-d9149996.entry.js → p-90a62435.entry.js} +2 -2
- package/dist/arcgis-coding-components/{p-12bbbbf9.js → p-9301042c.js} +10 -10
- package/dist/arcgis-coding-components/{p-848bb795.js → p-a112dc38.js} +1 -1
- package/dist/arcgis-coding-components/{p-553e05dd.js → p-a158a145.js} +2 -2
- package/dist/arcgis-coding-components/{p-25fad1e9.js → p-a802dcfc.js} +1 -1
- package/dist/arcgis-coding-components/{p-2cebb9af.js → p-add5b808.js} +2 -2
- package/dist/arcgis-coding-components/{p-3b3828c3.js → p-ca6e5ccb.js} +2 -2
- package/dist/arcgis-coding-components/{p-5f4fb81a.js → p-ddafc6d4.js} +3 -3
- package/dist/arcgis-coding-components/{p-a4b8ae8b.js → p-e79633fc.js} +2 -2
- package/dist/arcgis-coding-components/{p-54299ea4.js → p-f6eb269e.js} +1 -1
- package/dist/cjs/{app-globals-344fbae2.js → app-globals-b65b77f5.js} +1 -1
- package/dist/cjs/{arcade-defaults-d536ebc3.js → arcade-defaults-642d79ea.js} +3 -3
- package/dist/cjs/{arcade-mode-0e928b24.js → arcade-mode-39a5a908.js} +3 -3
- package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +7 -7
- package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
- package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +4 -4
- package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
- package/dist/cjs/{css-f21340dc.js → css-e8e93d2f.js} +1 -1
- package/dist/cjs/{cssMode-ba77bf27.js → cssMode-70e7691f.js} +3 -3
- package/dist/cjs/{html-437bf7ed.js → html-6f1f4d96.js} +3 -3
- package/dist/cjs/{htmlMode-c977fc7d.js → htmlMode-47395f0a.js} +3 -3
- package/dist/cjs/{index-ea3c7106.js → index-10ef0c5a.js} +1 -1
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{javascript-a2ea7c4d.js → javascript-3fa7439f.js} +4 -4
- package/dist/cjs/{jsonMode-3bcfc31d.js → jsonMode-6bfed21e.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{sql-expr-defaults-70d76d32.js → sql-expr-defaults-87f3c06a.js} +10 -10
- package/dist/cjs/{sql-expr-mode-56b5f48b.js → sql-expr-mode-905707b6.js} +3 -3
- package/dist/cjs/{tsMode-e1adf1e2.js → tsMode-09b9aff2.js} +3 -3
- package/dist/cjs/{typescript-13f5adea.js → typescript-8188e813.js} +3 -3
- package/dist/cjs/{useT9n-a7c74609.js → useT9n-7bbff67a.js} +3 -3
- package/dist/components/arcade-defaults.js +1 -1
- package/dist/components/arcade-mode.js +1 -1
- package/dist/components/arcade-results.js +1 -1
- package/dist/components/arcade-suggestions.js +1 -1
- package/dist/components/arcade-variables.js +1 -1
- package/dist/components/arcgis-arcade-editor.js +1 -1
- package/dist/components/arcgis-arcade-results.js +1 -1
- package/dist/components/arcgis-arcade-suggestions.js +1 -1
- package/dist/components/arcgis-arcade-variables.js +1 -1
- package/dist/components/arcgis-assets.d.ts +1 -1
- package/dist/components/arcgis-assets.js +1 -1
- package/dist/components/arcgis-code-editor.js +1 -1
- package/dist/components/arcgis-language-api-panel.js +1 -1
- package/dist/components/arcgis-sql-expression-editor.js +1 -1
- package/dist/components/arcgis-sql-expression-fields.js +1 -1
- package/dist/components/chunk-2GNSHPGN.js +1 -1
- package/dist/components/code-editor.js +1 -1
- package/dist/components/fields.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +1 -1
- package/dist/components/language-api-panel.js +1 -1
- package/dist/components/language-defaults-base.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/sql-expr-defaults.js +1 -1
- package/dist/components/sql-expr-mode.js +1 -1
- package/dist/components/sql-expression-fields.js +1 -1
- package/dist/components/useT9n.js +1 -1
- package/dist/components/utilities.js +1 -1
- package/dist/esm/{app-globals-0426c86b.js → app-globals-8213fff7.js} +1 -1
- package/dist/esm/{arcade-defaults-99f1c6d7.js → arcade-defaults-8fd0dab0.js} +3 -3
- package/dist/esm/{arcade-mode-41860ab0.js → arcade-mode-90fe2753.js} +3 -3
- package/dist/esm/arcgis-arcade-editor_6.entry.js +7 -7
- package/dist/esm/arcgis-coding-components.js +4 -4
- package/dist/esm/arcgis-sql-expression-editor.entry.js +4 -4
- package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
- package/dist/esm/{css-01c9381c.js → css-3d85ca84.js} +1 -1
- package/dist/esm/{cssMode-8fe2ce75.js → cssMode-28aa4ec1.js} +3 -3
- package/dist/esm/{html-a111e0d7.js → html-5688949c.js} +3 -3
- package/dist/esm/{htmlMode-0e9606a0.js → htmlMode-564664e8.js} +3 -3
- package/dist/esm/{index-bd8888a1.js → index-b2b8052b.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{javascript-79f4b313.js → javascript-6746bac9.js} +4 -4
- package/dist/esm/{jsonMode-aa7ffb25.js → jsonMode-62788154.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{sql-expr-defaults-1ef84658.js → sql-expr-defaults-66df57a5.js} +10 -10
- package/dist/esm/{sql-expr-mode-cdb00ee7.js → sql-expr-mode-5907d58e.js} +3 -3
- package/dist/esm/{tsMode-390a40a5.js → tsMode-98db35a0.js} +3 -3
- package/dist/esm/{typescript-cb0e3968.js → typescript-5f9c165b.js} +3 -3
- package/dist/esm/{useT9n-af81d13e.js → useT9n-b56f567c.js} +3 -3
- package/dist/loader/cdn.js +1 -1
- package/dist/loader/index.cjs.js +1 -1
- package/dist/loader/index.es2017.js +1 -1
- package/dist/loader/index.js +1 -1
- package/package.json +11 -11
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.74
|
|
5
5
|
*/
|
|
6
|
-
import{p as e,b as a}from"./p-
|
|
6
|
+
import{p as e,b as a}from"./p-a112dc38.js";export{s as setNonce}from"./p-a112dc38.js";import{g as i}from"./p-f6eb269e.js";(()=>{const a=import.meta.url,i={};return""!==a&&(i.resourcesUrl=new URL(".",a).href),e(i)})().then((async e=>(await i(),a([["p-3a31c8f1",[[1,"arcgis-sql-expression-fields",{loading:[4],modelId:[1,"model-id"],_mutationCounter:[32],_flowItemRenderers:[32],_filterValue:[32]},null,{modelId:["modelIdPropChanged"]}]]],["p-8decd808",[[0,"arcgis-arcade-editor",{profile:[16],script:[1025],testData:[16],suggestions:[16],snippets:[16],hideDocumentationActions:[4,"hide-documentation-actions"],hideSideBar:[4,"hide-side-bar"],sideActionBarExpanded:[1540,"side-action-bar-expanded"],openedSidePanel:[1537,"opened-side-panel"],editorOptions:[16],editorInstance:[16],_preparingArcade:[32],_editorProfile:[32],_apiLibrary:[32],_showExecutionPanel:[32],_resultPanel:[32],_executingScript:[32],_consoleLogs:[32],_executionResult:[32],messages:[32],getScript:[64],setFocus:[64],getEditorInstance:[64],getTestResult:[64],updateThemeColors:[64]},null,{messages:["_messagesChanged"],profile:["_profileChanged"],testData:["_testDataChanged"],snippets:["_snippetChanged"]}],[1,"arcgis-arcade-results",{loading:[4],openedResultPanel:[1537,"opened-result-panel"],result:[16],consoleLogs:[16]}],[1,"arcgis-arcade-suggestions",{suggestions:[16],_selectedSuggestion:[32],_filterValue:[32],_colorizeStyle:[32]},null,{suggestions:["suggestionsPropChanged"]}],[1,"arcgis-arcade-variables",{loading:[4],modelId:[1,"model-id"],_mutationCounter:[32],_flowItemRenderers:[32],_filterValue:[32]},null,{modelId:["modelIdPropChanged"]}],[0,"arcgis-code-editor",{value:[1],language:[1],modelId:[1,"model-id"],editorOptions:[16],editorInstance:[16],getValue:[64],setValue:[64],insertText:[64],insertSnippet:[64],getEditorInstance:[64],setFocus:[64]},null,{language:["languagePropChange"],modelId:["modelIdPropChange"],editorOptions:["editorOptionsPropChange"]}],[1,"arcgis-language-api-panel",{hideDocumentationActions:[4,"hide-documentation-actions"],loading:[4],apiLibrary:[16],_selectedApiItem:[32],_filterValue:[32],_colorizeStyle:[32]},null,{apiLibrary:["_apiLibraryChanged"]}]]],["p-90a62435",[[0,"arcgis-sql-expression-editor",{profile:[16],script:[1025],_preparing:[32],_editorProfile:[32],_activeAction:[32],_apiLibrary:[32],messages:[32]},null,{messages:["_messagesChanged"],profile:["_profileChanged"]}]]]],e))));
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.74
|
|
5
5
|
*/
|
|
6
|
-
export{a as arcade}from"./p-
|
|
6
|
+
export{a as arcade}from"./p-a158a145.js";export{s as sqlExpression}from"./p-9301042c.js";import"./p-a112dc38.js";
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.74
|
|
5
5
|
*/
|
|
6
|
-
import{F as t,D as i,G as s,H as o,J as n,M as e,N as h}from"./p-12bbbbf9.js";import{g as c}from"./p-848bb795.js";var r,a=(t,i)=>t.manager.internals.members?.[i]?.[0],d=Symbol.for("controller");function u(t){r!==t&&(r=t,queueMicrotask((()=>{r===t&&(r=void 0)})))}function f(){return r}var l,v=[];function y(t){if(void 0===t)return void(v=[]);const i=v.indexOf(t);v=-1===i?[...v,t]:v.slice(0,i+1),queueMicrotask((()=>{v=[]}))}var p,g=async(t,i)=>{const s=w(t);if(void 0===s)return t;if(await s.ready,"function"==typeof i){const t=s.watchExports((s=>i(s,t)))}return s.exports},b=async t=>{const i=w(t);return await i.ready,i},w=t=>{const i=function(){const t=l;return l=void 0,t}();if(void 0!==i)return i;const s=f().manager.internals.resolveExports(t);return void 0!==s?s:(t=>"object"==typeof t&&null!==t&&(d in t||"hostConnected"in t||"hostDisconnected"in t||"hostUpdate"in t||"hostUpdated"in t))(t)?t:void 0},m={setter:!1,getter:!1,readOnly:!1},_=new WeakMap;p=d;var j=class{constructor(t){this._callbacks={hostConnected:[],hostDisconnected:[],hostLoad:[],hostLoaded:[],hostUpdate:[],hostUpdated:[],hostDestroy:[],hostLifecycle:[]},this._ready=new i,this._lifecycleCleanups=[],this.connectedCalled=!1,this._loadCalled=!1,this.loadedCalled=!1,this[p]=!0,this.ready=this._ready.promise,this._exports=M(this),this._exportWatchers=new Set;const s=t??f();this.component=s,this.component.addController(this),y(this),void 0===this.component.manager||queueMicrotask((()=>this.catchUpLifecycle()))}catchUpLifecycle(){const{manager:t}=this.component;!t.connectedCalled||this.connectedCalled||this.triggerConnected(),!t._loadCalled||this.triggerLoad().then((()=>{!t.loadedCalled||this.triggerLoaded()})).catch(console.error)}get exports(){return this._exports}set exports(t){const i=this._exports;i!==t&&(this._exports=t,this._exportWatchers.forEach(n),this.connectedCalled&&!1!==this.assignedProperty&&this.component.requestUpdate(this.assignedProperty,i)),this._ready.resolve(t)}setProvisionalExports(t){this._exports=M(t),this._exportWatchers.forEach(n)}watchExports(t){const i=()=>t(this._exports);return this._exportWatchers.add(i),()=>{this._exportWatchers.delete(i)}}get use(){return u(this.component),g}get useRef(){return u(this.component),b}get useRefSync(){return u(this.component),w}controllerRemoved(){this.component.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this._callbacks.hostConnected.push(t)}onDisconnected(t){this._callbacks.hostDisconnected.push(t)}onLoad(t){this._callbacks.hostLoad.push(t)}onLoaded(t){this._callbacks.hostLoaded.push(t)}onUpdate(t){this._callbacks.hostUpdate.push(t)}onUpdated(t){this._callbacks.hostUpdated.push(t)}onDestroy(t){this._callbacks.hostDestroy.push(t)}onLifecycle(t){this._callbacks.hostLifecycle.push(t),this.connectedCalled&&this.component.el.isConnected&&this._callLifecycle(t)}triggerConnected(){const t=this;t.hostConnected&&n(t.hostConnected,t),this._callbacks.hostConnected.forEach(n),this.triggerLifecycle(),this.connectedCalled=!0}triggerDisconnected(){const t=this;t.hostDisconnected&&n(t.hostDisconnected,t),this._callbacks.hostDisconnected.forEach(n),this._lifecycleCleanups.forEach(n),this._lifecycleCleanups=[]}async triggerLoad(){if(this._loadCalled)return;this._loadCalled=!0;const t=this;t.hostLoad&&await s(t.hostLoad,t),this._callbacks.hostLoad.length>0&&await Promise.allSettled(this._callbacks.hostLoad.map(s)),this._ready.resolve(this._exports)}triggerLoaded(){if(this.loadedCalled)return;const t=this;t.hostLoaded&&n(t.hostLoaded,t),this._callbacks.hostLoaded.forEach(n),this.loadedCalled=!0}triggerUpdate(t){const i=this;i.hostUpdate&&n(i.hostUpdate,i,t),this._callbacks.hostUpdate.forEach(k,t)}triggerUpdated(t){const i=this;i.hostUpdated&&n(i.hostUpdated,i,t),this._callbacks.hostUpdated.forEach(k,t)}triggerDestroy(){const t=this;t.hostDestroy&&n(t.hostDestroy,t),this._callbacks.hostDestroy.forEach(n)}triggerLifecycle(){const t=this;t.hostLifecycle&&this._callLifecycle((()=>t.hostLifecycle())),this._callbacks.hostLifecycle.forEach(this._callLifecycle,this)}_callLifecycle(t){u(this.component);const i=n(t);(Array.isArray(i)?i:[i]).forEach((t=>{"function"==typeof t?this._lifecycleCleanups.push(t):"object"==typeof t&&"function"==typeof t.remove&&this._lifecycleCleanups.push(t.remove)}))}};function k(t){n(t,void 0,this)}var L=j;function M(t){if("object"!=typeof t&&"function"!=typeof t||null===t)return t;const i=new Proxy(t,{get(t,s,o){if(!O.has(s)||!(s in t)||t[s]!==i)return s in t||s in Promise.prototype||"symbol"==typeof s?"function"==typeof t?t[s]:Reflect.get(t,s,o):void 0},set:(t,i,s,o)=>Reflect.set(t,i,s,o)});return i}var O=new Set(["exports","_exports"]),U=void 0;function x(){Array.from(U?.entries()??[]).forEach((([t,{callbacks:i}])=>{const s=Object.keys(t);i.forEach((t=>t(s)))})),U=void 0}function C(t,i,s){var o;const e=i,h=t.manager.internals;(o=h.allWatchers)[e]??(o[e]=[]);const c=h.allWatchers[e],r=s,a=(t,i,s)=>n(r,null,t,i,s);return c.push(a),()=>{const t=c.indexOf(a);-1!==t&&c.splice(t,1)}}var D=class{constructor(t){this.enabledWatchers={},this.allWatchers={},this.enableReadonly=()=>{if(this.enableReadonly=void 0,!this.component.manager.isLit)return;const t=this.component.manager.internals;Object.entries(t.members).forEach((([i,[s]])=>{var o;2048&s&&((o=t.setters)[i]??(o[i]=[]),t.setters[i].push(t.readonlySetter))}))},this.trackedValue=q,this.keyTrackers=[],this.getters={},this.setters={},this.accessorGetter={},this.accessorSetter={},this.reactiveUtilsIntegrations=new Set,this._exports=new WeakMap,this.readonlySetter=(t,i,s)=>{if(m.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=t}firePropTrackers(t,i){const s=this.keyTrackers;this.trackedValue=q,this.keyTrackers=[],s.forEach((s=>s(t,i)))}getSetProxy(t){const i=this.component,s=i.constructor.prototype;if(this._getSetProxy(s,t,"class"),i.manager.isLit)return;const o=i.el.constructor.prototype;s!==o&&this._getSetProxy(o,t,"html")}_getSetProxy(t,i,s){const o=a(this.component,i);let n;do{n=Object.getOwnPropertyDescriptor(t,i)}while(!n&&(t=Object.getPrototypeOf(t)));if(!n)return;const e=n.get,h=n.set,c=P in e,r=P in h;if(c&&r)return;const d=!c,u=!r,f=d?function(){let t=e.call(this);const s=_.get(this);if(void 0===s)return t;const o=s.manager.internals;t=o.accessorGetter[i](t,i);const n=o.getters[i]??S;for(let s=0;s<n.length;s++)t=n[s](t,i);return t}:e,l=u?function(t){const s=e.call(this),n=_.get(this);if(void 0===n)return void h.call(this,t);let c=n.manager.isLit?t??void 0:function(t,i=8){return null==t||"object"==typeof t||"function"==typeof t?t:4&i?"false"!==t&&(""===t||!!t):2&i?Number.parseFloat(t):1&i?String(t):t}(t,o);const r=n.manager.internals;if(c===s)h.call(this,c);else{const t=m.setter?S:r.setters[i]??S;for(let o=0;o<t.length&&(c=t[o](c,s,i),c!==s);o++);c=r.accessorSetter[i](c,s,i),h.call(this,c),c!==s&&r.enabledWatchers[i]?.forEach((t=>t(c,s,i)))}r.keyTrackers.length>0&&r?.firePropTrackers(i,t)}:h;d&&(f[P]=!0),u&&(l[P]=!0),Object.defineProperty(t,i,{...n,get:f,set:l})}markExports(t,i){("object"==typeof i&&null!==i||"function"==typeof i)&&this._exports.set(i,t)}resolveExports(t){return"object"==typeof t&&null!==t||"function"==typeof t?this._exports.get(t):void 0}},S=[],P=Symbol(),q=Symbol(),R=(t,i)=>new E(t,i),E=class extends L{constructor(s,o){const n="addController"in s,e=new Set,h=s;if(h.addController=function(t){e.add(t),!(d in t)&&s.renderRoot&&s.el.isConnected&&t.hostConnected?.()},h.removeController=function(t){e.delete(t),t.controllerRemoved?.()},!n){const t=o??s.constructor.__forceUpdate;h.requestUpdate=()=>t(s)}super(s),this.internals=new D(this.component),this.destroyed=!1,this._updatePromise=new i,this._originalLifecycles={},this.isLit=n,this.component.manager=this,function(i,s){if(s)i.manager.internals.members=Object.fromEntries(Array.from(i.constructor.elementProperties,(([t,i])=>i.noAccessor?void 0:[t,[(i.readOnly?2048:0)|(i.state?32:16)]])).filter(t));else{const t=i.constructor,s=t.__registerControllers?.(i)??void 0;if(t.__registerControllers=void 0,"object"!=typeof s)throw new Error("Failed to retrieve component meta");i.manager.internals.members=Object.fromEntries(Object.entries(s).filter((([t,[i]])=>!!(63&i))))}}(s,n),this._controllers=e,this.exports=void 0,this.hasDestroy=A in this.component&&"function"==typeof this.component.destroy,this._bindLifecycleMethods();const c=this.internals;Object.keys(c.members).forEach((t=>{c.accessorGetter[t]=$,c.accessorSetter[t]=$,c.getSetProxy(t)})),n?this.internals.enabledWatchers=this.internals.allWatchers:Object.defineProperty(s,"updateComplete",{get:async()=>await this._updatePromise.promise}),queueMicrotask(c.enableReadonly),y(void 0),u(s),_.set(s.el,s),_.set(s,s)}_bindLifecycleMethods(){const t=this.component,i=this.isLit,s=t.el===t;this._originalLifecycles={_connectedCallback:i||s?void 0:t.connectedCallback,_disconnectedCallback:i||s?void 0:t.disconnectedCallback,_load:i?t.load:t.componentWillLoad,_loaded:i?t.loaded:t.componentDidLoad,_willUpdate:i?void 0:t.componentWillUpdate,_updated:i?void 0:t.componentDidUpdate,_destroy:t.destroy};const o=this._connectedCallback.bind(this),n=this._disconnectedCallback.bind(this),e=this._update.bind(this),h=this._updated.bind(this);i?t.constructor.prototype.addController.call(t,{hostConnected:o,hostDisconnected:n,hostUpdate:e,hostUpdated:h}):(t.connectedCallback=o,t.disconnectedCallback=n,t.componentWillLoad=this._load.bind(this),t.componentDidLoad=this._loaded.bind(this),t.componentWillUpdate=e,t.componentDidUpdate=h),this.hasDestroy&&(t.destroy=this.destroy.bind(this))}_connectedCallback(){if(this.destroyed){const t=this.component.el.tagName.toLowerCase();throw this.component.el.remove(),new Error(`The ${t} component has already been destroyed. It can not be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${A} prop.`)}void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout);const t=this.internals;t.enabledWatchers=t.allWatchers,x(),t.enableReadonly?.(),this._controllers.forEach(F),this._originalLifecycles._connectedCallback?.call(this.component)}_disconnectedCallback(){this.destroyed||(this._controllers.forEach(I),this._originalLifecycles._disconnectedCallback?.call(this.component),this.hasDestroy&&this._setAutoDestroyTimeout())}async _load(){const t=this.internals.reactiveUtilsIntegrations;if(t.size>0)for(const i of t)"triggerLoad"in i?await i.triggerLoad():await s(i.hostLoad,i);await Promise.allSettled(Array.from(this._controllers,N,t)),await(this._originalLifecycles._load?.call(this.component)),this.hasDestroy&&C(this.component,A,(()=>this._setAutoDestroyTimeout()))}_loaded(){this._controllers.forEach(W),this._originalLifecycles._loaded?.call(this.component)}_update(){this._controllers.forEach(G,this.component.changedProperties),this._originalLifecycles._willUpdate?.call(this.component)}_updated(){const t=this.component;if(this._controllers.forEach(H,t.changedProperties),this._originalLifecycles._updated?.call(this.component),this.isLit)t.changedProperties=new Map;else{const t=this._updatePromise;this._updatePromise=new i,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(J),this._controllers.clear(),await(this._originalLifecycles._destroy?.call(this.component))}}_setAutoDestroyTimeout(){void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout),this.component.el.isConnected||this.component.autoDestroyDisabled||(this._autoDestroyTimeout=o((()=>{this.destroy().catch(console.error)}),T))}},A="autoDestroyDisabled",T=1e3,$=t=>t;function F(t){"triggerConnected"in t?t.triggerConnected():n(t.hostConnected,t)}function I(t){"triggerDisconnected"in t?t.triggerDisconnected():n(t.hostDisconnected,t)}async function N(t){this.has(t)||("triggerLoad"in t?await t.triggerLoad():await s(t.hostLoad,t))}function W(t){"triggerLoaded"in t?t.triggerLoaded():n(t.hostLoaded,t)}function G(t){"triggerUpdate"in t?t.triggerUpdate(this):n(t.hostUpdate,t,this)}function H(t){"triggerUpdated"in t?t.triggerUpdated(this):n(t.hostUpdated,t,this)}function J(t){"triggerDestroy"in t?t.triggerDestroy():n(t.hostDestroy,t)}function z(t,i,s){const o=t.manager.internals;return o.trackedValue!==q&&o.trackedValue!==s&&o.firePropTrackers(void 0,void 0),0===o.keyTrackers.length&&queueMicrotask((()=>o.firePropTrackers(void 0,void 0))),o.trackedValue=s,o.keyTrackers.push(((t,o)=>n(i,void 0,s===o?t:void 0))),s}function B(t,i){const s=f();return z(s,(o=>{const n=o,e=s.manager,h=s,c=h[n];if(null!=c&&c!==t&&"function"==typeof i.set){const s=i.set(c,t,n);if(s!==c)if(e.isLit)h[n]=s;else{let t=!0;e.onConnected((()=>{t&&(t=!0,function(){m.setter=!0;try{return void(h[n]=s)}finally{m.setter=!1}}())}))}}!function(t,i,s){var o,n;const e=s,h=t.manager.internals,c="function"==typeof e.get?e.get:void 0;c&&((o=h.getters)[i]??(o[i]=[]),h.getters[i].unshift(c));const r="ignore"===e.set?Q:e.set;r&&((n=h.setters)[i]??(n[i]=[]),h.setters[i].unshift(r))}(s,n,i)}),t)}var K,Q=(t,i)=>i,V=(K=class extends j{constructor(t,i){super(t);const s=this.exports;try{u(this.component);const t=i(this.component,this),o=this.exports!==s;if(t instanceof Promise){o||this.setProvisionalExports(t);const i=t.then((t=>{this.exports=t,super.catchUpLifecycle()})).catch((t=>{this._ready.reject(t),console.error(t)}));this.onLoad((async()=>await i))}else o&&void 0===t||(this.exports=t),queueMicrotask((()=>super.catchUpLifecycle()))}catch(t){this._ready.reject(t),console.error(t)}}catchUpLifecycle(){}},(...t)=>{const i=v,s=new K(...t),o=s.exports;y(i.at(-1));const e=s.component.manager.internals;var h;return e.markExports(s,o),s.watchExports((t=>e.markExports(s,t))),l!==(h=s)&&(l=h,queueMicrotask((()=>{l===h&&(l=void 0)}))),function(t,i,s){const o=Array.isArray(t)?t:[t];let e=o.length+1;const h=t=>{e-=1,void 0!==t&&(e=Math.min(e,0)),0===e&&i(t)};o.forEach((t=>function(t,i,s){const o=Object.keys(t),e=o.length;void 0===U&&queueMicrotask(x),U??(U=new Map);let h=U.get(t);return void 0===h&&(h={callbacks:[],keyCount:e},U.set(t,h)),h.keyCount!==e&&(h.callbacks.forEach((t=>t(o))),h.callbacks=[],h.keyCount=e),h.callbacks.push((o=>{const h=o[e];n(i,null,void 0===h?void 0:t[h]===s?h:void 0)})),s}(t,(i=>h(void 0===i?void 0:{key:i,host:t,isReactive:!1})),s)));const c=o.find((t=>"manager"in t&&"object"==typeof t.manager&&t.manager.component===t));return c&&z(c,(t=>h(void 0===t?void 0:{key:t,host:c,isReactive:void 0!==a(c,t)})),s),s}([s.component,...i].reverse(),(t=>void 0===t?void 0:function(t,{host:i,key:s,isReactive:o},n){const e=i,h=e[s]!==n;e[s]!==t.exports&&!h&&n!==t.exports&&(e[s]=t.exports);if(i===t.component){if(o){const i=t.component.manager.internals;h&&i.markExports(t,e[s]),C(t.component,s,(s=>{s!==t.exports&&i.markExports(t,s)}))}t.assignedProperty=o?void 0:s}t.watchExports((()=>{if(e[s]===t.exports)return;const i=t.component.manager,o=i.internals.setters[s]?.includes(i.internals.readonlySetter);o?function(){m.readOnly=!0;try{return void(e[s]=t.exports)}finally{m.readOnly=!1}}():e[s]=t.exports}))}(s,t,o)),o)});function X(t,i){if(!i)return t;const s={...t};return Object.entries(i).forEach((([i,o])=>{s[i]="object"==typeof o?X(t[i],o):o??t[i]})),s}const Y=(t=>(i={})=>V(void 0,((s,o)=>{const n=s;function c(t){const i=o.exports,s=i._original??i,n=X(s,t);n._original=s,o.exports=n}if(o.onLifecycle((()=>e(s.el,t("./assets"),(({t9nLocale:t,t9nStrings:i,lang:e})=>{const h={...i,_lang:e,_t9nLocale:t,_loading:!1};o.exports=h;const r=i.componentLabel??i.widgetLabel;"string"==typeof r&&"label"in s&&null==s.label&&(s.label??(s.label=r)),c(n.messageOverrides)}),i.name))),"messageOverrides"in n&&o.onLifecycle((()=>C(n,"messageOverrides",c))),i.blocking)return o.ready;const r=h(s.el);return{_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0}})))(c);export{Y as a,B as g,R as u}
|
|
6
|
+
import{F as t,D as i,G as s,H as o,J as n,M as e,N as h}from"./p-9301042c.js";import{g as c}from"./p-a112dc38.js";var r,a=(t,i)=>t.manager.internals.members?.[i]?.[0],d=Symbol.for("controller");function u(t){r!==t&&(r=t,queueMicrotask((()=>{r===t&&(r=void 0)})))}function f(){return r}var l,v=[];function y(t){if(void 0===t)return void(v=[]);const i=v.indexOf(t);v=-1===i?[...v,t]:v.slice(0,i+1),queueMicrotask((()=>{v=[]}))}var p,g=async(t,i)=>{const s=b(t);if(void 0===s)return t;if(await s.ready,"function"==typeof i){const t=s.watchExports((s=>i(s,t)))}return s.exports},w=async t=>{const i=b(t);return await i.ready,i},b=t=>{const i=function(){const t=l;return l=void 0,t}();if(void 0!==i)return i;const s=f().manager.internals.resolveExports(t);return void 0!==s?s:(t=>"object"==typeof t&&null!==t&&(d in t||"hostConnected"in t||"hostDisconnected"in t||"hostUpdate"in t||"hostUpdated"in t))(t)?t:void 0},m={setter:!1,getter:!1,readOnly:!1},_=new WeakMap;p=d;var j=class{constructor(t){this._callbacks={hostConnected:[],hostDisconnected:[],hostLoad:[],hostLoaded:[],hostUpdate:[],hostUpdated:[],hostDestroy:[],hostLifecycle:[]},this._ready=new i,this._lifecycleCleanups=[],this.connectedCalled=!1,this._loadCalled=!1,this.loadedCalled=!1,this[p]=!0,this.ready=this._ready.promise,this._exports=M(this),this._exportWatchers=new Set;const s=t??f();this.component=s,this.component.addController(this),y(this),void 0===this.component.manager||queueMicrotask((()=>this.catchUpLifecycle()))}catchUpLifecycle(){const{manager:t}=this.component;!t.connectedCalled||this.connectedCalled||this.triggerConnected(),!t._loadCalled||this.triggerLoad().then((()=>{!t.loadedCalled||this.triggerLoaded()})).catch(console.error)}get exports(){return this._exports}set exports(t){const i=this._exports;i!==t&&(this._exports=t,this._exportWatchers.forEach(n),this.connectedCalled&&!1!==this.assignedProperty&&this.component.requestUpdate(this.assignedProperty,i)),this._ready.resolve(t)}setProvisionalExports(t){this._exports=M(t),this._exportWatchers.forEach(n)}watchExports(t){const i=()=>t(this._exports);return this._exportWatchers.add(i),()=>{this._exportWatchers.delete(i)}}get use(){return u(this.component),g}get useRef(){return u(this.component),w}get useRefSync(){return u(this.component),b}controllerRemoved(){this.component.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this._callbacks.hostConnected.push(t)}onDisconnected(t){this._callbacks.hostDisconnected.push(t)}onLoad(t){this._callbacks.hostLoad.push(t)}onLoaded(t){this._callbacks.hostLoaded.push(t)}onUpdate(t){this._callbacks.hostUpdate.push(t)}onUpdated(t){this._callbacks.hostUpdated.push(t)}onDestroy(t){this._callbacks.hostDestroy.push(t)}onLifecycle(t){this._callbacks.hostLifecycle.push(t),this.connectedCalled&&this.component.el.isConnected&&this._callLifecycle(t)}triggerConnected(){const t=this;t.hostConnected&&n(t.hostConnected,t),this._callbacks.hostConnected.forEach(n),this.triggerLifecycle(),this.connectedCalled=!0}triggerDisconnected(){const t=this;t.hostDisconnected&&n(t.hostDisconnected,t),this._callbacks.hostDisconnected.forEach(n),this._lifecycleCleanups.forEach(n),this._lifecycleCleanups=[]}async triggerLoad(){if(this._loadCalled)return;this._loadCalled=!0;const t=this;t.hostLoad&&await s(t.hostLoad,t),this._callbacks.hostLoad.length>0&&await Promise.allSettled(this._callbacks.hostLoad.map(s)),this._ready.resolve(this._exports)}triggerLoaded(){if(this.loadedCalled)return;const t=this;t.hostLoaded&&n(t.hostLoaded,t),this._callbacks.hostLoaded.forEach(n),this.loadedCalled=!0}triggerUpdate(t){const i=this;i.hostUpdate&&n(i.hostUpdate,i,t),this._callbacks.hostUpdate.forEach(k,t)}triggerUpdated(t){const i=this;i.hostUpdated&&n(i.hostUpdated,i,t),this._callbacks.hostUpdated.forEach(k,t)}triggerDestroy(){const t=this;t.hostDestroy&&n(t.hostDestroy,t),this._callbacks.hostDestroy.forEach(n)}triggerLifecycle(){const t=this;t.hostLifecycle&&this._callLifecycle((()=>t.hostLifecycle())),this._callbacks.hostLifecycle.forEach(this._callLifecycle,this)}_callLifecycle(t){u(this.component);const i=n(t);(Array.isArray(i)?i:[i]).forEach((t=>{"function"==typeof t?this._lifecycleCleanups.push(t):"object"==typeof t&&"function"==typeof t.remove&&this._lifecycleCleanups.push(t.remove)}))}};function k(t){n(t,void 0,this)}var L=j;function M(t){if("object"!=typeof t&&"function"!=typeof t||null===t)return t;const i=new Proxy(t,{get(t,s,o){if(!O.has(s)||!(s in t)||t[s]!==i)return s in t||s in Promise.prototype||"symbol"==typeof s?"function"==typeof t?t[s]:Reflect.get(t,s,o):void 0},set:(t,i,s,o)=>Reflect.set(t,i,s,o)});return i}var O=new Set(["exports","_exports"]),U=void 0;function x(){Array.from(U?.entries()??[]).forEach((([t,{callbacks:i}])=>{const s=Object.keys(t);i.forEach((t=>t(s)))})),U=void 0}function C(t,i,s){var o;const e=i,h=t.manager.internals;(o=h.allWatchers)[e]??(o[e]=[]);const c=h.allWatchers[e],r=s,a=(t,i,s)=>n(r,null,t,i,s);return c.push(a),()=>{const t=c.indexOf(a);-1!==t&&c.splice(t,1)}}var D=class{constructor(t){this.enabledWatchers={},this.allWatchers={},this.enableReadonly=()=>{if(this.enableReadonly=void 0,!this.component.manager.isLit)return;const t=this.component.manager.internals;Object.entries(t.members).forEach((([i,[s]])=>{var o;2048&s&&((o=t.setters)[i]??(o[i]=[]),t.setters[i].push(t.readonlySetter))}))},this.trackedValue=q,this.keyTrackers=[],this.getters={},this.setters={},this.accessorGetter={},this.accessorSetter={},this.reactiveUtilsIntegrations=new Set,this._exports=new WeakMap,this.readonlySetter=(t,i,s)=>{if(m.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=t}firePropTrackers(t,i){const s=this.keyTrackers;this.trackedValue=q,this.keyTrackers=[],s.forEach((s=>s(t,i)))}getSetProxy(t){const i=this.component,s=i.constructor.prototype;if(this._getSetProxy(s,t,"class"),i.manager.isLit)return;const o=i.el.constructor.prototype;s!==o&&this._getSetProxy(o,t,"html")}_getSetProxy(t,i,s){const o=a(this.component,i);let n;do{n=Object.getOwnPropertyDescriptor(t,i)}while(!n&&(t=Object.getPrototypeOf(t)));if(!n)return;const e=n.get,h=n.set,c=P in e,r=P in h;if(c&&r)return;const d=!c,u=!r,f=d?function(){let t=e.call(this);const s=_.get(this);if(void 0===s)return t;const o=s.manager.internals;t=o.accessorGetter[i](t,i);const n=o.getters[i]??S;for(let s=0;s<n.length;s++)t=n[s](t,i);return t}:e,l=u?function(t){const s=e.call(this),n=_.get(this);if(void 0===n)return void h.call(this,t);let c=n.manager.isLit?t??void 0:function(t,i=8){return null==t||"object"==typeof t||"function"==typeof t?t:4&i?"false"!==t&&(""===t||!!t):2&i?Number.parseFloat(t):1&i?String(t):t}(t,o);const r=n.manager.internals;if(c===s)h.call(this,c);else{const t=m.setter?S:r.setters[i]??S;for(let o=0;o<t.length&&(c=t[o](c,s,i),c!==s);o++);c=r.accessorSetter[i](c,s,i),h.call(this,c),c!==s&&r.enabledWatchers[i]?.forEach((t=>t(c,s,i)))}r.keyTrackers.length>0&&r?.firePropTrackers(i,t)}:h;d&&(f[P]=!0),u&&(l[P]=!0),Object.defineProperty(t,i,{...n,get:f,set:l})}markExports(t,i){("object"==typeof i&&null!==i||"function"==typeof i)&&this._exports.set(i,t)}resolveExports(t){return"object"==typeof t&&null!==t||"function"==typeof t?this._exports.get(t):void 0}},S=[],P=Symbol(),q=Symbol(),R=(t,i)=>new E(t,i),E=class extends L{constructor(s,o){const n="addController"in s,e=new Set,h=s;if(h.addController=function(t){e.add(t),!(d in t)&&s.renderRoot&&s.el.isConnected&&t.hostConnected?.()},h.removeController=function(t){e.delete(t),t.controllerRemoved?.()},!n){const t=o??s.constructor.__forceUpdate;h.requestUpdate=()=>t(s)}super(s),this.internals=new D(this.component),this.destroyed=!1,this._updatePromise=new i,this._originalLifecycles={},this.isLit=n,this.component.manager=this,function(i,s){if(s)i.manager.internals.members=Object.fromEntries(Array.from(i.constructor.elementProperties,(([t,i])=>i.noAccessor?void 0:[t,[(i.readOnly?2048:0)|(i.state?32:16)]])).filter(t));else{const t=i.constructor,s=t.__registerControllers?.(i)??void 0;if(t.__registerControllers=void 0,"object"!=typeof s)throw new Error("Failed to retrieve component meta");i.manager.internals.members=Object.fromEntries(Object.entries(s).filter((([t,[i]])=>!!(63&i))))}}(s,n),this._controllers=e,this.exports=void 0,this.hasDestroy=A in this.component&&"function"==typeof this.component.destroy,this._bindLifecycleMethods();const c=this.internals;Object.keys(c.members).forEach((t=>{c.accessorGetter[t]=$,c.accessorSetter[t]=$,c.getSetProxy(t)})),n?this.internals.enabledWatchers=this.internals.allWatchers:Object.defineProperty(s,"updateComplete",{get:async()=>await this._updatePromise.promise}),queueMicrotask(c.enableReadonly),y(void 0),u(s),_.set(s.el,s),_.set(s,s)}_bindLifecycleMethods(){const t=this.component,i=this.isLit,s=t.el===t;this._originalLifecycles={_connectedCallback:i||s?void 0:t.connectedCallback,_disconnectedCallback:i||s?void 0:t.disconnectedCallback,_load:i?t.load:t.componentWillLoad,_loaded:i?t.loaded:t.componentDidLoad,_willUpdate:i?void 0:t.componentWillUpdate,_updated:i?void 0:t.componentDidUpdate,_destroy:t.destroy};const o=this._connectedCallback.bind(this),n=this._disconnectedCallback.bind(this),e=this._update.bind(this),h=this._updated.bind(this);i?t.constructor.prototype.addController.call(t,{hostConnected:o,hostDisconnected:n,hostUpdate:e,hostUpdated:h}):(t.connectedCallback=o,t.disconnectedCallback=n,t.componentWillLoad=this._load.bind(this),t.componentDidLoad=this._loaded.bind(this),t.componentWillUpdate=e,t.componentDidUpdate=h),this.hasDestroy&&(t.destroy=this.destroy.bind(this))}_connectedCallback(){if(this.destroyed){const t=this.component.el.tagName.toLowerCase();throw this.component.el.remove(),new Error(`The ${t} component has already been destroyed. It can not be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${A} prop.`)}void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout);const t=this.internals;t.enabledWatchers=t.allWatchers,x(),t.enableReadonly?.(),this._controllers.forEach(F),this._originalLifecycles._connectedCallback?.call(this.component)}_disconnectedCallback(){this.destroyed||(this._controllers.forEach(I),this._originalLifecycles._disconnectedCallback?.call(this.component),this.hasDestroy&&this._setAutoDestroyTimeout())}async _load(){const t=this.internals.reactiveUtilsIntegrations;if(t.size>0)for(const i of t)"triggerLoad"in i?await i.triggerLoad():await s(i.hostLoad,i);await Promise.allSettled(Array.from(this._controllers,N,t)),await(this._originalLifecycles._load?.call(this.component)),this.hasDestroy&&C(this.component,A,(()=>this._setAutoDestroyTimeout()))}_loaded(){this._controllers.forEach(W),this._originalLifecycles._loaded?.call(this.component)}_update(){this._controllers.forEach(G,this.component.changedProperties),this._originalLifecycles._willUpdate?.call(this.component)}_updated(){const t=this.component;if(this._controllers.forEach(H,t.changedProperties),this._originalLifecycles._updated?.call(this.component),this.isLit)t.changedProperties=new Map;else{const t=this._updatePromise;this._updatePromise=new i,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(J),this._controllers.clear(),await(this._originalLifecycles._destroy?.call(this.component))}}_setAutoDestroyTimeout(){void 0!==this._autoDestroyTimeout&&clearTimeout(this._autoDestroyTimeout),this.component.el.isConnected||this.component.autoDestroyDisabled||(this._autoDestroyTimeout=o((()=>{this.destroy().catch(console.error)}),T))}},A="autoDestroyDisabled",T=1e3,$=t=>t;function F(t){"triggerConnected"in t?t.triggerConnected():n(t.hostConnected,t)}function I(t){"triggerDisconnected"in t?t.triggerDisconnected():n(t.hostDisconnected,t)}async function N(t){this.has(t)||("triggerLoad"in t?await t.triggerLoad():await s(t.hostLoad,t))}function W(t){"triggerLoaded"in t?t.triggerLoaded():n(t.hostLoaded,t)}function G(t){"triggerUpdate"in t?t.triggerUpdate(this):n(t.hostUpdate,t,this)}function H(t){"triggerUpdated"in t?t.triggerUpdated(this):n(t.hostUpdated,t,this)}function J(t){"triggerDestroy"in t?t.triggerDestroy():n(t.hostDestroy,t)}function z(t,i,s){const o=t.manager.internals;return o.trackedValue!==q&&o.trackedValue!==s&&o.firePropTrackers(void 0,void 0),0===o.keyTrackers.length&&queueMicrotask((()=>o.firePropTrackers(void 0,void 0))),o.trackedValue=s,o.keyTrackers.push(((t,o)=>n(i,void 0,s===o?t:void 0))),s}function B(t,i){const s=f();return z(s,(o=>{const n=o,e=s.manager,h=s,c=h[n];if(null!=c&&c!==t&&"function"==typeof i.set){const s=i.set(c,t,n);if(s!==c)if(e.isLit)h[n]=s;else{let t=!0;e.onConnected((()=>{t&&(t=!0,function(){m.setter=!0;try{return void(h[n]=s)}finally{m.setter=!1}}())}))}}!function(t,i,s){var o,n;const e=s,h=t.manager.internals,c="function"==typeof e.get?e.get:void 0;c&&((o=h.getters)[i]??(o[i]=[]),h.getters[i].unshift(c));const r="ignore"===e.set?Q:e.set;r&&((n=h.setters)[i]??(n[i]=[]),h.setters[i].unshift(r))}(s,n,i)}),t)}var K,Q=(t,i)=>i,V=(K=class extends j{constructor(t,i){super(t);const s=this.exports;try{u(this.component);const t=i(this.component,this),o=this.exports!==s;if(t instanceof Promise){o||this.setProvisionalExports(t);const i=t.then((t=>{this.exports=t,super.catchUpLifecycle()})).catch((t=>{this._ready.reject(t),console.error(t)}));this.onLoad((async()=>await i))}else o&&void 0===t||(this.exports=t),queueMicrotask((()=>super.catchUpLifecycle()))}catch(t){this._ready.reject(t),console.error(t)}}catchUpLifecycle(){}},(...t)=>{const i=v,s=new K(...t),o=s.exports;y(i.at(-1));const e=s.component.manager.internals;var h;return e.markExports(s,o),s.watchExports((t=>e.markExports(s,t))),l!==(h=s)&&(l=h,queueMicrotask((()=>{l===h&&(l=void 0)}))),function(t,i,s){const o=Array.isArray(t)?t:[t];let e=o.length+1;const h=t=>{e-=1,void 0!==t&&(e=Math.min(e,0)),0===e&&i(t)};o.forEach((t=>function(t,i,s){const o=Object.keys(t),e=o.length;void 0===U&&queueMicrotask(x),U??(U=new Map);let h=U.get(t);return void 0===h&&(h={callbacks:[],keyCount:e},U.set(t,h)),h.keyCount!==e&&(h.callbacks.forEach((t=>t(o))),h.callbacks=[],h.keyCount=e),h.callbacks.push((o=>{const h=o[e];n(i,null,void 0===h?void 0:t[h]===s?h:void 0)})),s}(t,(i=>h(void 0===i?void 0:{key:i,host:t,isReactive:!1})),s)));const c=o.find((t=>"manager"in t&&"object"==typeof t.manager&&t.manager.component===t));return c&&z(c,(t=>h(void 0===t?void 0:{key:t,host:c,isReactive:void 0!==a(c,t)})),s),s}([s.component,...i].reverse(),(t=>void 0===t?void 0:function(t,{host:i,key:s,isReactive:o},n){const e=i,h=e[s]!==n;e[s]!==t.exports&&!h&&n!==t.exports&&(e[s]=t.exports);if(i===t.component){if(o){const i=t.component.manager.internals;h&&i.markExports(t,e[s]),C(t.component,s,(s=>{s!==t.exports&&i.markExports(t,s)}))}t.assignedProperty=o?void 0:s}t.watchExports((()=>{if(e[s]===t.exports)return;const i=t.component.manager,o=i.internals.setters[s]?.includes(i.internals.readonlySetter);o?function(){m.readOnly=!0;try{return void(e[s]=t.exports)}finally{m.readOnly=!1}}():e[s]=t.exports}))}(s,t,o)),o)});function X(t,i){if(!i)return t;const s={...t};return Object.entries(i).forEach((([i,o])=>{s[i]="object"==typeof o?X(t[i],o):o??t[i]})),s}const Y=(t=>(i={})=>V(void 0,((s,o)=>{const n=s;function c(t){const i=o.exports,s=i._original??i,n=X(s,t);n._original=s,o.exports=n}if(o.onLifecycle((()=>e(s.el,t("./assets"),(({t9nLocale:t,t9nStrings:i,lang:e})=>{const h={...i,_lang:e,_t9nLocale:t,_loading:!1};o.exports=h;const r=i.componentLabel??i.widgetLabel;"string"==typeof r&&"label"in s&&null==s.label&&(s.label??(s.label=r)),c(n.messageOverrides)}),i.name))),"messageOverrides"in n&&o.onLifecycle((()=>C(n,"messageOverrides",c))),i.blocking)return o.ready;const r=h(s.el);return{_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0}})))(c);export{Y as a,B as g,R as u}
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.74
|
|
5
5
|
*/
|
|
6
|
-
import{O as t}from"./p-
|
|
6
|
+
import{O as t}from"./p-9301042c.js";import"./p-a112dc38.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.74
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as s,a as e}from"./p-
|
|
6
|
+
import{r as t,c as i,h as s,a as e}from"./p-a112dc38.js";import{u as c,a as l}from"./p-2be39584.js";import{z as o}from"./p-9301042c.js";const a=class{constructor(s){t(this,s),this.arcgisClose=i(this,"arcgisClose",3),this.arcgisFieldSelected=i(this,"arcgisFieldSelected",3),this.manager=c(this),this.messages=l(),this._handleSelectField=t=>{if(t.target instanceof HTMLElement)switch(t.target.tagName.toLowerCase()){case"calcite-list-item":this.arcgisFieldSelected.emit(t.target.value??"");break;case"calcite-action":t.stopPropagation()}},this._handleSelectDomain=t=>{const i=t.target.value;this.arcgisFieldSelected.emit(i?`'${i}'`:"")},this._emitClose=()=>{this.arcgisClose.emit()},this._mutationCounter=1,this._flowItemRenderers=[],this._filterValue="",this.loading=!1,this.modelId=void 0}modelIdPropChanged(){this._flowItemRenderers=[]}disconnectedCallback(){this._flowObserver?.disconnect()}render(){const t=o.getFeatureLayerForModel(this.modelId??"");return!this.loading&&this.modelId&&t?s("calcite-flow",null,s("calcite-flow-item",{heading:this.messages.availablefields??"",closable:!0,onCalciteFlowItemClose:this._emitClose},s("calcite-list",{filterEnabled:!0},t.fields.map((t=>s("calcite-list-item",{key:t.name,onClick:this._handleSelectField,label:t.name,description:t.alias,value:t.name},t.domain&&s("calcite-action",{slot:"actions-end",text:"open",icon:"chevron-right",onClick:()=>{const i=t.domain;"coded-value"===i.type&&(this._flowItemRenderers=[...this._flowItemRenderers,()=>s("calcite-flow-item",{closable:!0,heading:this.messages.domainvalues??"",description:t.name,onCalciteFlowItemClose:this._emitClose},s("calcite-list",null,i.codedValues.map((t=>s("calcite-list-item",{key:t.code,onClick:this._handleSelectDomain,label:t.name,description:String(t.code),value:String(t.code)})))))])}})))))),this._flowItemRenderers.map((t=>t()))):s("calcite-block",{heading:this.messages.availablefields??""})}static get assetsDirs(){return["assets"]}get el(){return e(this)}static get watchers(){return{modelId:["modelIdPropChanged"]}}};a.style=":host calcite-flow{height:100%}:host calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}";export{a as arcgis_sql_expression_fields}
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.74
|
|
5
5
|
*/
|
|
6
|
-
import{O as t}from"./p-
|
|
6
|
+
import{O as t}from"./p-9301042c.js";import"./p-a112dc38.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.74
|
|
5
5
|
*/
|
|
6
|
-
import{D as e,h as t,T as s,y as i,z as n,V as o}from"./p-
|
|
6
|
+
import{D as e,h as t,T as s,y as i,z as n,V as o}from"./p-9301042c.js";import"./p-a112dc38.js";let r=new e;class a{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((()=>this.stopWorker()))}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null,r=new e),this._client=null}static async waitForWorker(){return await r.promise}async _getClientProxy(){if(!this._client){const{languageId:e}=this._defaults;this._worker=t.createWebWorker({moduleId:"SqlExprWorker",label:e,createData:{languageId:e},host:this._defaults.workerHost}),r.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){const t=await this._getClientProxy();return await(this._worker?.withSyncedResources(e)),t}}var c,l;!function(e){e.ARGS="args",e.CLAUSES="clauses",e.ELSE="else",e.END="end",e.EXPR="expr",e.LEFT="left",e.OPERAND="operand",e.QUALIFIER="qualifier",e.RIGHT="right",e.START="start",e.VALUE="value"}(c||(c={})),function(e){e.CASE_EXPRESSION="case-expression",e.EXPRESSION_LIST="expression-list",e.FUNCTION="function",e.INTERVAL="interval",e.INTERVAL_QUALIFIER="interval-qualifier",e.WHEN_CLAUSE="when-clause",e.UNARY_EXPRESSION="unary-expression",e.BINARY_EXPRESSION="binary-expression"}(l||(l={})),Object.values({date:"DATE",float:"FLOAT",integer:"INTEGER",real:"REAL",smallint:"SMALLINT",time:"TIME",timestamp:"TIMESTAMP",varchar:"VARCHAR"});const h={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},u={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["AND","AS","BETWEEN","BOTH","CASE","CAST","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE","DAY","ELSE","END","ESCAPE","FALSE","FLOAT","FOR","FROM","HOUR","IN","INTEGER","INTERVAL","IS","LEADING","LIKE","MINUTE","MONTH","NOT","NULL","OR","POSITION","REAL","SECOND","SMALLINT","SUBSTRING","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRIM","TRUE","VARCHAR","WHEN","WITH","YEAR","ZONE"],operators:["AND","BETWEEN","IN","LIKE","NOT","OR","IS","NULL"],builtinFunctions:["CAST","EXTRACT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","ABS","ACOS","ASIN","ATAN","CEILING","COS","FLOOR","LOG","LOG10","POWER","ROUND","SIGN","SIN","TAN","CHAR_LENGTH","COALESCE","CONCAT","LOWER","POSITION","TRIM","UPPER"],builtinVariables:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@keywords":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]]}};class E{constructor(e,t){this._worker=e,this._defaults=t}async provideCompletionItems(e,t){try{const s=await this._worker(e.uri),i=e.getWordUntilPosition(t),n={startLineNumber:t.lineNumber,endLineNumber:t.lineNumber,startColumn:i.startColumn,endColumn:i.endColumn},o=this._defaults.getApiContextForModel(e.uri);return await s.doComplete(e.uri.toString(),n,t,o)}catch(e){return console.error(e),{suggestions:[]}}}}class d{constructor(e,i,{defaults:n,diagnosticService:o}){this._languageId=e,this._worker=i,this._disposables=[],this._listener=new Map,this._diagnosticsService=o,this._defaults=n;const r=e=>{const t=e.getLanguageId();if(t!==this._languageId)return;const i=s((()=>{this._doValidate(e,t).catch((e=>{throw e}))}));this._listener.set(e.uri.toString(),e.onDidChangeContent(i)),this._doValidate(e,t).catch(console.error)},a=e=>{const s=e.uri.toString();t.setModelMarkers(e,this._languageId,[]);const i=this._listener.get(s);i&&(i.dispose(),this._listener.delete(s))};this._disposables.push(t.onDidCreateModel(r)),this._disposables.push(t.onWillDisposeModel((e=>a(e)))),this._disposables.push(t.onDidChangeModelLanguage((e=>{a(e.model),r(e.model)}))),this._disposables.push(n.onDidChange((()=>{t.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(a(e),r(e))}))}))),this._disposables.push(n.onModelContextDidChange((e=>{t.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&t.uri.toString()===e&&this._doValidate(t,this._languageId).catch(console.error)}))}))),this._disposables.push({dispose:()=>{this._listener.forEach((e=>e.dispose())),this._listener.clear()}}),t.getModels().forEach(r)}async _doValidate(e,s){if(e.isAttachedToEditor())try{const i=await this._worker(e.uri),n=this._defaults.getApiContextForModel(e.uri),o=await i.doValidation(e.uri.toString(),n);this._diagnosticsService.fireDiagnosticsChange(e.uri,o),t.setModelMarkers(e,s,o)}catch(e){console.error(e)}}}let T;async function N(...e){return await a.waitForWorker(),await new Promise(((t,s)=>{T?t(T(...e)):s(new Error("sql expression worker not registered!"))}))}const p=new class{constructor(){this._onDiagnosticsChange=new o}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}};function m(){return p}function I(e){const t=new a(e),s=async(...e)=>await t.getLanguageServiceWorker(...e);T=s,i.setMonarchTokensProvider(n.languageId,u),i.setLanguageConfiguration(n.languageId,h);const o=new E(s,n);i.registerCompletionItemProvider(n.languageId,o),new d(e.languageId,s,{defaults:e,diagnosticService:p})}export{m as getSqlExprDiagnosticService,N as getSqlExprWorker,I as setupMode}
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.74
|
|
5
5
|
*/
|
|
6
|
-
import{m as e,h as t,Q as s,R as r,y as n,T as i,D as a,V as o}from"./p-12bbbbf9.js";import"./p-848bb795.js";var c=[[],[],[]];["++","--"].forEach((e=>c[e.length-1]?.push(e))),["-","+","!","~"].forEach((e=>c[e.length-1]?.push(e))),["||","&&"].forEach((e=>c[e.length-1]?.push(e))),["=","/=","*=","%=","+=","-="].forEach((e=>c[e.length-1]?.push(e))),["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"].forEach((e=>c[e.length-1]?.push(e)));var u=Object.values({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"});Object.values({False:"false",Null:"null",True:"true"}).map((t=>({label:t,kind:e.exports.CompletionItemKind.Constant}))),u.map((t=>({label:t,kind:e.exports.CompletionItemKind.Keyword})));const l={wordPattern:/(-?\d*\.\d\w*)|([^`~!#%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>\/\?\s]+)/gu,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]}],autoCloseBefore:";:.,=}])` \n\t",folding:{markers:{start:/^\s*\/\/\s*#?region\b/u,end:/^\s*\/\/\s*#?endregion\b/u}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u}},g={defaultToken:"invalid",tokenPostfix:".arc",ignoreCase:!0,keywords:u.filter((e=>"from"!==e)),operators:["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/u,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/u,digits:/\d+(_+\d+)*/u,octaldigits:/[0-7]+(_+[0-7]+)*/u,binarydigits:/[0-1]+(_+[0-1]+)*/u,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/u,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/u,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/u,tokenizer:{root:[[/[{}]/u,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/u,{token:"keyword",next:"@import"}],[/[a-z_$][\w$]*/u,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/u,"@brackets"],[/[<>](?!@symbols)/u,"@brackets"],[/@symbols/u,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/u,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/u,"number"],[/0[xX](@hexdigits)/u,"number"],[/0[oO]?(@octaldigits)/u,"number"],[/0[bB](@binarydigits)/u,"number"],[/(@digits)/u,"number"],[/[;,.]/u,"delimiter"],[/"([^"\\]|\\.)*$/u,"string.invalid"],[/'([^'\\]|\\.)*$/u,"string.invalid"],[/"/u,"string","@string_double"],[/'/u,"string","@string_single"],[/`/u,"string","@string_backtick"]],import:[[/import(?=\s)/u,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier"],{include:"@whitespace"},[/from/u,{token:"keyword",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/u,""],[/\/\*/u,"comment","@comment"],[/\/\/.*$/u,"comment"]],comment:[[/[^\/*]+/u,"comment"],[/\*\//u,"comment","@pop"],[/[\/*]/u,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/u,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/u,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/u,["regexp.escape.control","regexp.escape.control"]],[/[()]/u,"regexp.escape.control"],[/@regexpctl/u,"regexp.escape.control"],[/[^\\\/]/u,"regexp"],[/@regexpesc/u,"regexp.escape"],[/\\\./u,"regexp.invalid"],[/(\/)([gimsuy]*)/u,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/u,"regexp.escape.control"],[/\^/u,"regexp.invalid"],[/@regexpesc/u,"regexp.escape"],[/[^\]]/u,"regexp"],[/\]/u,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/"/u,"string","@pop"]],string_single:[[/[^\\']+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/'/u,"string","@pop"]],string_backtick:[[/\$\{/u,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/`/u,"string","@pop"]],bracketCounting:[[/\{/u,"delimiter.bracket","@bracketCounting"],[/\}/u,"delimiter.bracket","@pop"],{include:"common"}]}};class p{constructor(e,s,{defaults:r,diagnosticsService:n}){this._languageId=e,this._worker=s,this._disposables=[],this._listener=new Map,this._diagnosticsService=n,this._defaults=r;const a=e=>{const t=e.getLanguageId();if(t!==this._languageId)return;const s=i((()=>{this._doValidate(e,t).catch((e=>{throw e}))}));this._listener.set(e.uri.toString(),e.onDidChangeContent(s)),this._doValidate(e,t).catch(console.error)},o=e=>{const s=e.uri.toString();t.setModelMarkers(e,this._languageId,[]);const r=this._listener.get(s);r&&(r.dispose(),this._listener.delete(s))};this._disposables.push(t.onDidCreateModel(a)),this._disposables.push(t.onWillDisposeModel((e=>{o(e)}))),this._disposables.push(t.onDidChangeModelLanguage((e=>{o(e.model),a(e.model)}))),this._disposables.push(r.onDidChange((()=>{t.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(o(e),a(e))}))}))),this._disposables.push(r.onModelContextDidChange((e=>{t.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&t.uri.toString()===e&&this._doValidate(t,this._languageId).catch(console.error)}))}))),this._disposables.push({dispose:()=>{this._listener.forEach((e=>e.dispose())),this._listener.clear()}}),t.getModels().forEach(a)}dispose(){this._disposables.forEach((e=>e.dispose())),this._disposables=[]}async _doValidate(e,s){if(e.isAttachedToEditor())try{const r=await this._worker(e.uri),n=this._defaults.getApiContextForModel(e.uri),i=await r.doValidation(e.uri.toString(),n),a=i.map((e=>{return{severity:d((t=e).severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message};var t}));this._diagnosticsService.fireDiagnosticsChange(e.uri,i),t.setModelMarkers(e,s,a)}catch(e){console.error(e)}}}function d(t){switch(t){case e.exports.DiagnosticSeverity.Error:return s.Error;case e.exports.DiagnosticSeverity.Warning:return s.Warning;case e.exports.DiagnosticSeverity.Information:return s.Info;case e.exports.DiagnosticSeverity.Hint:return s.Hint;default:return s.Info}}function h(e){return new r(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function m(e){return{range:h(e.range),text:e.newText}}function x(t){const s=n.CompletionItemKind;switch(t){case e.exports.CompletionItemKind.Text:return s.Text;case e.exports.CompletionItemKind.Method:return s.Method;case e.exports.CompletionItemKind.Function:return s.Function;case e.exports.CompletionItemKind.Constructor:return s.Constructor;case e.exports.CompletionItemKind.Field:return s.Field;case e.exports.CompletionItemKind.Variable:return s.Variable;case e.exports.CompletionItemKind.Class:return s.Class;case e.exports.CompletionItemKind.Interface:return s.Interface;case e.exports.CompletionItemKind.Module:return s.Module;case e.exports.CompletionItemKind.Property:return s.Property;case e.exports.CompletionItemKind.Unit:return s.Unit;case e.exports.CompletionItemKind.Value:return s.Value;case e.exports.CompletionItemKind.Enum:return s.Enum;case e.exports.CompletionItemKind.Keyword:return s.Keyword;case e.exports.CompletionItemKind.Snippet:return s.Snippet;case e.exports.CompletionItemKind.Color:return s.Color;case e.exports.CompletionItemKind.File:return s.File;case e.exports.CompletionItemKind.Reference:return s.Reference;case e.exports.CompletionItemKind.Folder:return s.Folder;case e.exports.CompletionItemKind.EnumMember:return s.EnumMember;case e.exports.CompletionItemKind.Constant:return s.Constant;case e.exports.CompletionItemKind.Struct:return s.Struct;case e.exports.CompletionItemKind.Event:return s.Event;case e.exports.CompletionItemKind.Operator:return s.Operator;case e.exports.CompletionItemKind.TypeParameter:return s.TypeParameter;default:return s.Property}}class b{constructor(e,t){this._worker=e,this._defaults=t,this.triggerCharacters=[".","("]}async provideCompletionItems(t,s){const i=await this._worker(t.uri),a=this._defaults.getApiContextForModel(t.uri),o=await i.doComplete(t.uri.toString(),function(e){return{character:e.column-1,line:e.lineNumber-1}}(s),a),c=t.getWordUntilPosition(s),u=new r(s.lineNumber,c.startColumn,s.lineNumber,c.endColumn),l=o.items.map((t=>{const s={label:t.label,insertText:t.insertText||t.label,sortText:t.sortText,filterText:t.filterText,detail:t.detail,range:u,kind:x(t.kind)};var r;return t.textEdit&&(s.range=void 0!==(r=t.textEdit).insert&&void 0!==r.replace?{insert:h(t.textEdit.insert),replace:h(t.textEdit.replace)}:h(t.textEdit.range),s.insertText=t.textEdit.newText),t.additionalTextEdits&&(s.additionalTextEdits=t.additionalTextEdits.map(m)),t.insertTextFormat===e.exports.InsertTextFormat.Snippet&&(s.insertTextRules=n.CompletionItemInsertTextRule.InsertAsSnippet),t.documentation&&(s.documentation="string"==typeof t.documentation?t.documentation:{supportThemeIcons:!1,value:t.documentation.value,supportHtml:!0}),s}));return{incomplete:o.isIncomplete,suggestions:l}}}class w{constructor(e,t){this._worker=e,this._defaults=t}async provideDocumentFormattingEdits(e){const t=await this._worker(e.uri),s=this._defaults.getApiContextForModel(e.uri.toString());return(await t.doFormat(e.uri.toString(),s)).map((e=>({range:h(e.range),text:e.newText})))}}let f,k=new a;class y{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((()=>this.stopWorker()))}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null,k=new a),this._client=null}static async waitForWorker(){return await k.promise}async _getClientProxy(){if(!this._client){const{languageId:e}=this._defaults;this._worker=t.createWebWorker({moduleId:"ArcadeWorker",label:e,createData:{languageId:e},host:this._defaults.workerHost}),k.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){const t=await this._getClientProxy();return await(this._worker?.withSyncedResources(e)),t}}async function v(...e){return await y.waitForWorker(),await new Promise(((t,s)=>{f?t(f(...e)):s(new Error("Arcade not registered!"))}))}const C=new class{constructor(){this._onDiagnosticsChange=new o}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}};function _(){return C}function F(e){const t=new y(e),s=async(...e)=>await t.getLanguageServiceWorker(...e);f=s,n.setMonarchTokensProvider(e.languageId,g),n.setLanguageConfiguration(e.languageId,l),n.registerCompletionItemProvider(e.languageId,new b(s,e)),n.registerDocumentFormattingEditProvider(e.languageId,new w(s,e)),new p(e.languageId,s,{defaults:e,diagnosticsService:C})}export{_ as getArcadeDiagnosticService,v as getArcadeWorker,F as setupMode}
|
|
6
|
+
import{m as e,h as t,Q as s,R as r,y as n,T as i,D as a,V as o}from"./p-9301042c.js";import"./p-a112dc38.js";var c=[[],[],[]];["++","--"].forEach((e=>c[e.length-1]?.push(e))),["-","+","!","~"].forEach((e=>c[e.length-1]?.push(e))),["||","&&"].forEach((e=>c[e.length-1]?.push(e))),["=","/=","*=","%=","+=","-="].forEach((e=>c[e.length-1]?.push(e))),["|","&",">>","<<",">>>","^","==","!=","<","<=",">",">=","+","-","*","/","%"].forEach((e=>c[e.length-1]?.push(e)));var u=Object.values({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"});Object.values({False:"false",Null:"null",True:"true"}).map((t=>({label:t,kind:e.exports.CompletionItemKind.Constant}))),u.map((t=>({label:t,kind:e.exports.CompletionItemKind.Keyword})));const l={wordPattern:/(-?\d*\.\d\w*)|([^`~!#%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>\/\?\s]+)/gu,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]}],autoCloseBefore:";:.,=}])` \n\t",folding:{markers:{start:/^\s*\/\/\s*#?region\b/u,end:/^\s*\/\/\s*#?endregion\b/u}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u}},g={defaultToken:"invalid",tokenPostfix:".arc",ignoreCase:!0,keywords:u.filter((e=>"from"!==e)),operators:["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/u,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/u,digits:/\d+(_+\d+)*/u,octaldigits:/[0-7]+(_+[0-7]+)*/u,binarydigits:/[0-1]+(_+[0-1]+)*/u,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/u,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/u,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/u,tokenizer:{root:[[/[{}]/u,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/u,{token:"keyword",next:"@import"}],[/[a-z_$][\w$]*/u,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/u,"@brackets"],[/[<>](?!@symbols)/u,"@brackets"],[/@symbols/u,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/u,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/u,"number"],[/0[xX](@hexdigits)/u,"number"],[/0[oO]?(@octaldigits)/u,"number"],[/0[bB](@binarydigits)/u,"number"],[/(@digits)/u,"number"],[/[;,.]/u,"delimiter"],[/"([^"\\]|\\.)*$/u,"string.invalid"],[/'([^'\\]|\\.)*$/u,"string.invalid"],[/"/u,"string","@string_double"],[/'/u,"string","@string_single"],[/`/u,"string","@string_backtick"]],import:[[/import(?=\s)/u,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier"],{include:"@whitespace"},[/from/u,{token:"keyword",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/u,""],[/\/\*/u,"comment","@comment"],[/\/\/.*$/u,"comment"]],comment:[[/[^\/*]+/u,"comment"],[/\*\//u,"comment","@pop"],[/[\/*]/u,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/u,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/u,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/u,["regexp.escape.control","regexp.escape.control"]],[/[()]/u,"regexp.escape.control"],[/@regexpctl/u,"regexp.escape.control"],[/[^\\\/]/u,"regexp"],[/@regexpesc/u,"regexp.escape"],[/\\\./u,"regexp.invalid"],[/(\/)([gimsuy]*)/u,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/u,"regexp.escape.control"],[/\^/u,"regexp.invalid"],[/@regexpesc/u,"regexp.escape"],[/[^\]]/u,"regexp"],[/\]/u,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/"/u,"string","@pop"]],string_single:[[/[^\\']+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/'/u,"string","@pop"]],string_backtick:[[/\$\{/u,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/`/u,"string","@pop"]],bracketCounting:[[/\{/u,"delimiter.bracket","@bracketCounting"],[/\}/u,"delimiter.bracket","@pop"],{include:"common"}]}};class p{constructor(e,s,{defaults:r,diagnosticsService:n}){this._languageId=e,this._worker=s,this._disposables=[],this._listener=new Map,this._diagnosticsService=n,this._defaults=r;const a=e=>{const t=e.getLanguageId();if(t!==this._languageId)return;const s=i((()=>{this._doValidate(e,t).catch((e=>{throw e}))}));this._listener.set(e.uri.toString(),e.onDidChangeContent(s)),this._doValidate(e,t).catch(console.error)},o=e=>{const s=e.uri.toString();t.setModelMarkers(e,this._languageId,[]);const r=this._listener.get(s);r&&(r.dispose(),this._listener.delete(s))};this._disposables.push(t.onDidCreateModel(a)),this._disposables.push(t.onWillDisposeModel((e=>{o(e)}))),this._disposables.push(t.onDidChangeModelLanguage((e=>{o(e.model),a(e.model)}))),this._disposables.push(r.onDidChange((()=>{t.getModels().forEach((e=>{e.getLanguageId()===this._languageId&&(o(e),a(e))}))}))),this._disposables.push(r.onModelContextDidChange((e=>{t.getModels().forEach((t=>{t.getLanguageId()===this._languageId&&t.uri.toString()===e&&this._doValidate(t,this._languageId).catch(console.error)}))}))),this._disposables.push({dispose:()=>{this._listener.forEach((e=>e.dispose())),this._listener.clear()}}),t.getModels().forEach(a)}dispose(){this._disposables.forEach((e=>e.dispose())),this._disposables=[]}async _doValidate(e,s){if(e.isAttachedToEditor())try{const r=await this._worker(e.uri),n=this._defaults.getApiContextForModel(e.uri),i=await r.doValidation(e.uri.toString(),n),a=i.map((e=>{return{severity:d((t=e).severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message};var t}));this._diagnosticsService.fireDiagnosticsChange(e.uri,i),t.setModelMarkers(e,s,a)}catch(e){console.error(e)}}}function d(t){switch(t){case e.exports.DiagnosticSeverity.Error:return s.Error;case e.exports.DiagnosticSeverity.Warning:return s.Warning;case e.exports.DiagnosticSeverity.Information:return s.Info;case e.exports.DiagnosticSeverity.Hint:return s.Hint;default:return s.Info}}function h(e){return new r(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function m(e){return{range:h(e.range),text:e.newText}}function x(t){const s=n.CompletionItemKind;switch(t){case e.exports.CompletionItemKind.Text:return s.Text;case e.exports.CompletionItemKind.Method:return s.Method;case e.exports.CompletionItemKind.Function:return s.Function;case e.exports.CompletionItemKind.Constructor:return s.Constructor;case e.exports.CompletionItemKind.Field:return s.Field;case e.exports.CompletionItemKind.Variable:return s.Variable;case e.exports.CompletionItemKind.Class:return s.Class;case e.exports.CompletionItemKind.Interface:return s.Interface;case e.exports.CompletionItemKind.Module:return s.Module;case e.exports.CompletionItemKind.Property:return s.Property;case e.exports.CompletionItemKind.Unit:return s.Unit;case e.exports.CompletionItemKind.Value:return s.Value;case e.exports.CompletionItemKind.Enum:return s.Enum;case e.exports.CompletionItemKind.Keyword:return s.Keyword;case e.exports.CompletionItemKind.Snippet:return s.Snippet;case e.exports.CompletionItemKind.Color:return s.Color;case e.exports.CompletionItemKind.File:return s.File;case e.exports.CompletionItemKind.Reference:return s.Reference;case e.exports.CompletionItemKind.Folder:return s.Folder;case e.exports.CompletionItemKind.EnumMember:return s.EnumMember;case e.exports.CompletionItemKind.Constant:return s.Constant;case e.exports.CompletionItemKind.Struct:return s.Struct;case e.exports.CompletionItemKind.Event:return s.Event;case e.exports.CompletionItemKind.Operator:return s.Operator;case e.exports.CompletionItemKind.TypeParameter:return s.TypeParameter;default:return s.Property}}class w{constructor(e,t){this._worker=e,this._defaults=t,this.triggerCharacters=[".","("]}async provideCompletionItems(t,s){const i=await this._worker(t.uri),a=this._defaults.getApiContextForModel(t.uri),o=await i.doComplete(t.uri.toString(),function(e){return{character:e.column-1,line:e.lineNumber-1}}(s),a),c=t.getWordUntilPosition(s),u=new r(s.lineNumber,c.startColumn,s.lineNumber,c.endColumn),l=o.items.map((t=>{const s={label:t.label,insertText:t.insertText||t.label,sortText:t.sortText,filterText:t.filterText,detail:t.detail,range:u,kind:x(t.kind)};var r;return t.textEdit&&(s.range=void 0!==(r=t.textEdit).insert&&void 0!==r.replace?{insert:h(t.textEdit.insert),replace:h(t.textEdit.replace)}:h(t.textEdit.range),s.insertText=t.textEdit.newText),t.additionalTextEdits&&(s.additionalTextEdits=t.additionalTextEdits.map(m)),t.insertTextFormat===e.exports.InsertTextFormat.Snippet&&(s.insertTextRules=n.CompletionItemInsertTextRule.InsertAsSnippet),t.documentation&&(s.documentation="string"==typeof t.documentation?t.documentation:{supportThemeIcons:!1,value:t.documentation.value,supportHtml:!0}),s}));return{incomplete:o.isIncomplete,suggestions:l}}}class k{constructor(e,t){this._worker=e,this._defaults=t}async provideDocumentFormattingEdits(e){const t=await this._worker(e.uri),s=this._defaults.getApiContextForModel(e.uri.toString());return(await t.doFormat(e.uri.toString(),s)).map((e=>({range:h(e.range),text:e.newText})))}}let f,b=new a;class y{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((()=>this.stopWorker()))}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null,b=new a),this._client=null}static async waitForWorker(){return await b.promise}async _getClientProxy(){if(!this._client){const{languageId:e}=this._defaults;this._worker=t.createWebWorker({moduleId:"ArcadeWorker",label:e,createData:{languageId:e},host:this._defaults.workerHost}),b.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){const t=await this._getClientProxy();return await(this._worker?.withSyncedResources(e)),t}}async function v(...e){return await y.waitForWorker(),await new Promise(((t,s)=>{f?t(f(...e)):s(new Error("Arcade not registered!"))}))}const C=new class{constructor(){this._onDiagnosticsChange=new o}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,t){this._onDiagnosticsChange.fire({uri:e,diagnostics:t})}};function _(){return C}function F(e){const t=new y(e),s=async(...e)=>await t.getLanguageServiceWorker(...e);f=s,n.setMonarchTokensProvider(e.languageId,g),n.setLanguageConfiguration(e.languageId,l),n.registerCompletionItemProvider(e.languageId,new w(s,e)),n.registerDocumentFormattingEditProvider(e.languageId,new k(s,e)),new p(e.languageId,s,{defaults:e,diagnosticsService:C})}export{_ as getArcadeDiagnosticService,v as getArcadeWorker,F as setupMode}
|
|
@@ -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.31/esri/copyright.txt for details.
|
|
4
|
-
* v4.31.0-next.
|
|
4
|
+
* v4.31.0-next.74
|
|
5
5
|
*/
|
|
6
|
-
import{O as e}from"./p-
|
|
6
|
+
import{O as e}from"./p-9301042c.js";import"./p-a112dc38.js";
|
|
7
7
|
/*!-----------------------------------------------------------------------------
|
|
8
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9
9
|
* Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
|