@arcgis/coding-components 4.30.0-next.3 → 4.30.0-next.30

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.
Files changed (131) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.css +1 -1
  2. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  3. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +25 -0
  4. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +25 -0
  5. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +25 -0
  6. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +25 -0
  7. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +25 -0
  8. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +25 -0
  9. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +25 -0
  10. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +25 -0
  11. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.en.json +25 -0
  12. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +25 -0
  13. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +25 -0
  14. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +25 -0
  15. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +25 -0
  16. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +25 -0
  17. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +25 -0
  18. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +25 -0
  19. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +25 -0
  20. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +25 -0
  21. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +25 -0
  22. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +25 -0
  23. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +25 -0
  24. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +25 -0
  25. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +25 -0
  26. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +25 -0
  27. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +25 -0
  28. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +25 -0
  29. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +25 -0
  30. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +25 -0
  31. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +25 -0
  32. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +25 -0
  33. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +25 -0
  34. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +25 -0
  35. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +25 -0
  36. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +25 -0
  37. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +25 -0
  38. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +25 -0
  39. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +25 -0
  40. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +25 -0
  41. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +25 -0
  42. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +25 -0
  43. package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +1 -1
  44. package/dist/arcgis-coding-components/assets/code-editor/css.worker.js +1 -1
  45. package/dist/arcgis-coding-components/assets/code-editor/editor.worker.js +1 -1
  46. package/dist/arcgis-coding-components/assets/code-editor/html.worker.js +1 -1
  47. package/dist/arcgis-coding-components/assets/code-editor/json.worker.js +1 -1
  48. package/dist/arcgis-coding-components/assets/code-editor/ts.worker.js +1 -1
  49. package/dist/arcgis-coding-components/index.esm.js +2 -2
  50. package/dist/arcgis-coding-components/{p-f09b91f0.js → p-05407167.js} +2 -2
  51. package/dist/arcgis-coding-components/p-0e4fd488.entry.js +6 -0
  52. package/dist/arcgis-coding-components/{p-a2e6cf69.js → p-1b04872b.js} +3 -3
  53. package/dist/arcgis-coding-components/{p-f27bc17e.js → p-305e6a27.js} +3 -3
  54. package/dist/arcgis-coding-components/{p-19754f5a.js → p-38778060.js} +2 -2
  55. package/dist/arcgis-coding-components/{p-fa769562.js → p-3e84bed2.js} +2 -2
  56. package/dist/arcgis-coding-components/{p-57e4af30.js → p-50cbdef2.js} +2 -2
  57. package/dist/arcgis-coding-components/p-51032f3c.js +68 -0
  58. package/dist/arcgis-coding-components/{p-0c7d8400.js → p-61a3a32b.js} +2 -2
  59. package/dist/arcgis-coding-components/{p-ee00010b.js → p-7f41598e.js} +2 -2
  60. package/dist/arcgis-coding-components/p-a09a2021.js +7 -0
  61. package/dist/arcgis-coding-components/{p-a8ee78f9.js → p-f2b266c1.js} +1 -1
  62. package/dist/cjs/{arcade-defaults-9108b927.js → arcade-defaults-18a60f03.js} +480 -160
  63. package/dist/cjs/{arcade-mode-99f89a80.js → arcade-mode-c53bfc0e.js} +45 -51
  64. package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1613 -202
  65. package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
  66. package/dist/cjs/{css-f717453b.js → css-56924b29.js} +1 -1
  67. package/dist/cjs/{cssMode-9a365842.js → cssMode-ea630257.js} +3 -3
  68. package/dist/cjs/{html-64741c89.js → html-3d953aa2.js} +3 -3
  69. package/dist/cjs/{htmlMode-4e8b2289.js → htmlMode-f3da6666.js} +3 -3
  70. package/dist/cjs/{index-42d71c10.js → index-084a0845.js} +42 -4
  71. package/dist/cjs/index.cjs.js +3 -3
  72. package/dist/cjs/{javascript-340e4ba6.js → javascript-470dd761.js} +4 -4
  73. package/dist/cjs/{jsonMode-bc9bd096.js → jsonMode-f2bad76f.js} +3 -3
  74. package/dist/cjs/loader.cjs.js +3 -3
  75. package/dist/cjs/{tsMode-99f43f9f.js → tsMode-4dbfa911.js} +3 -3
  76. package/dist/cjs/{typescript-4a00545a.js → typescript-8fb2fceb.js} +3 -3
  77. package/dist/components/arcade-api.js +11 -17
  78. package/dist/components/arcade-contribution.js +71 -13
  79. package/dist/components/arcade-defaults.js +61 -61
  80. package/dist/components/arcade-mode.js +44 -50
  81. package/dist/components/arcade-results.js +40 -51
  82. package/dist/components/arcade-suggestions.js +12 -18
  83. package/dist/components/arcade-variables.js +13 -22
  84. package/dist/components/arcgis-arcade-api.js +1 -1
  85. package/dist/components/arcgis-arcade-editor.js +41 -106
  86. package/dist/components/arcgis-arcade-results.js +1 -1
  87. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  88. package/dist/components/arcgis-arcade-variables.js +1 -1
  89. package/dist/components/arcgis-assets.d.ts +1 -1
  90. package/dist/components/arcgis-assets.js +1 -1
  91. package/dist/components/arcgis-code-editor.js +1 -1
  92. package/dist/components/chunk-FQ4KFKVY.js +1448 -0
  93. package/dist/components/code-editor.js +14 -14
  94. package/dist/components/fields.js +2 -66
  95. package/dist/components/index.d.ts +3 -18
  96. package/dist/components/index.js +1 -1
  97. package/dist/components/index2.js +387 -3
  98. package/dist/components/markdown.js +9 -11
  99. package/dist/components/utilities.js +3 -3
  100. package/dist/esm/{arcade-defaults-372ecf79.js → arcade-defaults-3f0e1c43.js} +467 -147
  101. package/dist/esm/{arcade-mode-b2b0b42d.js → arcade-mode-5aef1763.js} +45 -51
  102. package/dist/esm/arcgis-arcade-api_6.entry.js +1613 -202
  103. package/dist/esm/arcgis-coding-components.js +4 -4
  104. package/dist/esm/{css-81c81ba2.js → css-4c710cf8.js} +1 -1
  105. package/dist/esm/{cssMode-41873574.js → cssMode-54cea919.js} +3 -3
  106. package/dist/esm/{html-d42d34ab.js → html-3908d2da.js} +3 -3
  107. package/dist/esm/{htmlMode-143da753.js → htmlMode-2fa6e6a4.js} +3 -3
  108. package/dist/esm/{index-3bfb710a.js → index-06d390be.js} +42 -5
  109. package/dist/esm/index.js +3 -3
  110. package/dist/esm/{javascript-c5306510.js → javascript-1d86322d.js} +4 -4
  111. package/dist/esm/{jsonMode-60732e84.js → jsonMode-27eb619c.js} +3 -3
  112. package/dist/esm/loader.js +4 -4
  113. package/dist/esm/{tsMode-5a10d9e9.js → tsMode-9a8f9af2.js} +3 -3
  114. package/dist/esm/{typescript-bb6b1528.js → typescript-7a26367c.js} +3 -3
  115. package/dist/loader/cdn.js +1 -1
  116. package/dist/loader/index.cjs.js +1 -1
  117. package/dist/loader/index.es2017.js +1 -1
  118. package/dist/loader/index.js +1 -1
  119. package/dist/types/components/arcade-api/arcade-api.d.ts +4 -5
  120. package/dist/types/components/arcade-editor/arcade-editor.d.ts +7 -4
  121. package/dist/types/components/arcade-results/arcade-results.d.ts +4 -7
  122. package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +4 -5
  123. package/dist/types/components/arcade-variables/arcade-variables.d.ts +4 -6
  124. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/arcade-editor.stories.d.ts +37 -0
  125. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/code-editor/code-editor.stories.d.ts +6 -0
  126. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/reference/stories/arcade-editor.stories.d.ts +9 -0
  127. package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -1
  128. package/package.json +19 -19
  129. package/dist/arcgis-coding-components/p-84b69395.entry.js +0 -6
  130. package/dist/arcgis-coding-components/p-e75d3e9e.js +0 -68
  131. package/dist/arcgis-coding-components/p-fa458a74.js +0 -7
@@ -1,72 +1,8 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.3
4
+ * v4.30.0-next.30
5
5
  */
6
- const isAMD = "define" in window && typeof window.define === "function" && "amd" in window.define;
7
- function isDefaultModule(module) {
8
- return module.default !== undefined;
9
- }
10
- async function requireModule(modulePath) {
11
- return await new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
12
- resolve(moduleDefault);
13
- }));
14
- }
15
- async function importLayersFeatureLayer() {
16
- if (isAMD) {
17
- return await requireModule("esri/layers/FeatureLayer");
18
- }
19
- const module = await import('@arcgis/core/layers/FeatureLayer.js');
20
- return isDefaultModule(module) ? module.default : module;
21
- }
22
- async function importPortalPortalItem() {
23
- if (isAMD) {
24
- return await requireModule("esri/portal/PortalItem");
25
- }
26
- const module = await import('@arcgis/core/portal/PortalItem.js');
27
- return isDefaultModule(module) ? module.default : module;
28
- }
29
- async function newPortalPortalItem(properties) {
30
- const ModConstructor = await importPortalPortalItem();
31
- return new ModConstructor(properties);
32
- }
33
- async function importWebMap() {
34
- if (isAMD) {
35
- return await requireModule("esri/WebMap");
36
- }
37
- const module = await import('@arcgis/core/WebMap.js');
38
- return isDefaultModule(module) ? module.default : module;
39
- }
40
- async function newWebMap(properties) {
41
- const ModConstructor = await importWebMap();
42
- return new ModConstructor(properties);
43
- }
44
- async function importWebScene() {
45
- if (isAMD) {
46
- return await requireModule("esri/WebScene");
47
- }
48
- const module = await import('@arcgis/core/WebScene.js');
49
- return isDefaultModule(module) ? module.default : module;
50
- }
51
- async function newWebScene(properties) {
52
- const ModConstructor = await importWebScene();
53
- return new ModConstructor(properties);
54
- }
55
- async function importArcade() {
56
- if (isAMD) {
57
- return await requireModule("esri/arcade");
58
- }
59
- const module = await import('@arcgis/core/arcade.js');
60
- return isDefaultModule(module) ? module.default : module;
61
- }
62
- async function importRequest() {
63
- if (isAMD) {
64
- return await requireModule("esri/request");
65
- }
66
- const module = await import('@arcgis/core/request.js');
67
- return isDefaultModule(module) ? module.default : module;
68
- }
69
-
70
6
  /**
71
7
  * Returns an icon name for the field type
72
8
  */
@@ -152,4 +88,4 @@ function fieldAlias(field) {
152
88
  return field.alias || field.name;
153
89
  }
154
90
 
155
- export { importRequest as a, newWebScene as b, newWebMap as c, fieldTypeToIconName as d, fieldTypeToArcadeType as e, fieldAlias as f, importArcade as g, importLayersFeatureLayer as i, newPortalPortalItem as n, supportedFields as s };
91
+ export { fieldTypeToIconName as a, fieldTypeToArcadeType as b, fieldAlias as f, supportedFields as s };
@@ -1,21 +1,3 @@
1
- /**
2
- * Get the base path to where the assets can be found. Use "setAssetPath(path)"
3
- * if the path needs to be customized.
4
- */
5
- export declare const getAssetPath: (path: string) => string;
6
-
7
- /**
8
- * Used to manually set the base path where assets can be found.
9
- * If the script is used as "module", it's recommended to use "import.meta.url",
10
- * such as "setAssetPath(import.meta.url)". Other options include
11
- * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
12
- * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
13
- * But do note that this configuration depends on how your script is bundled, or lack of
14
- * bundling, and where your assets can be loaded from. Additionally custom bundling
15
- * will have to ensure the static assets are copied to its build directory.
16
- */
17
- export declare const setAssetPath: (path: string) => void;
18
-
19
1
  /**
20
2
  * Used to specify a nonce value that corresponds with an application's CSP.
21
3
  * When set, the nonce will be added to all dynamically created script and style tags at runtime.
@@ -31,3 +13,6 @@ export interface SetPlatformOptions {
31
13
  rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
32
14
  }
33
15
  export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
16
+
17
+ export * from "../types";
18
+ export * from "./arcgis-assets";
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.3
4
+ * v4.30.0-next.30
5
5
  */
6
6
  export { setNonce, setPlatformOptions } from '@stencil/core/internal/client';
7
7
  export { a as arcade } from './arcade-defaults.js';
@@ -1,8 +1,392 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.3
4
+ * v4.30.0-next.30
5
5
  */
6
- var h=class{constructor(){this.resolve=()=>{},this.reject=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n;});}};function S(e,t){let n=e;for(;n;){if(n===t)return !0;if(!n.parentNode)return !1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode;}return !1}function x(e,t,n=()=>{}){if(!t||t.length<=0)return;let r=new MutationObserver(o=>{for(let s of o)S(e,s.target)&&n();});return r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0}),r}function T(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let o=n.getRootNode();if(o===document)return null;n=o.host;}return null}function k(e){let t=T(e,":is(.calcite-mode-light, .calcite-mode-dark)");return t&&t.classList.contains("calcite-mode-dark")?"dark":"light"}function f(e,t,n){return T(e,`[${t}]`)?.getAttribute(t)??n}function M(e){return e.nodeType===Node.ELEMENT_NODE}function R(e){return "setFocus"in e&&typeof e.setFocus=="function"}function d(e,t=""){if(!M(e))return !1;if(e.matches(t))return R(e)&&setTimeout(()=>e.setFocus(),0),!0;for(let r of e.children)if(d(r,t))return !0;let n=e.shadowRoot;if(n){for(let r of n.children)if(d(r,t))return !0}return !1}function W(e,t){if(!e?.shadowRoot)return;if(e.hasAttribute("hydrated")||e.hasAttribute("calcite-hydrated")){d(e,t);return}let n=new MutationObserver(()=>{n.disconnect(),d(e,t);});n.observe(e,{attributes:!0,attributeFilter:["hydrated","calcite-hydrated"]});}function c(e){let t="";for(let n=0;n<e;n++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t}function U(){return [c(2),c(1),c(1),c(1),c(3)].join("-")}var E=new Set(["ar","bg","bs","ca","cs","da","de","el","en","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nl","nb","pl","pt-BR","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"]),a=new Map;async function v(e,t,n=""){let r=`${t}/${n}${e}.json`;if(a.has(r))return a.get(r);try{let o=await fetch(r);if(o.ok){let i=await o.json();return a.set(r,i),i}if(e==="en"){a.set(r,void 0);return}let s=await v("en",t,n);return a.set(r,s),s}catch{a.set(r,void 0);return}}function _(e){let t=f(e,"lang",navigator.language||"en");if(E.has(t))return {lang:t,t9nLocale:t};let n=t.slice(0,2);return {lang:t,t9nLocale:E.has(n)?n:"en"}}var p=new WeakMap,m=new WeakMap,C=new WeakMap;async function B(e,t,n){m.set(e,t),p.set(e,x(e._hostElement,["lang"],()=>{b(e,n).catch(console.error);})),await b(e,n);}function q(e){p.get(e)?.disconnect(),p.delete(e),m.delete(e);}async function b(e,t){let{lang:n,t9nLocale:r}=_(e._hostElement);if(n===e._lang&&r===e._t9nLocale||(n!==e._lang&&(e._lang=n),r===e._t9nLocale))return;let o=C.get(e);if(!o){let s=m.get(e)??"",i=e._hostElement.tagName.toLowerCase().replace("arcgis-",""),l=`${s}/${i}/t9n`,u=`${i}.t9n.`;o=await v(r,l,u);}r!==e._t9nLocale&&(e._t9nLocale=r,e._t9nStrings=o,await t?.call(e));}var N='"',w="'";function L(e,t){return new Array(t+1).join(e)}function D(e){let t=N,n=w;e.includes(t)&&!e.includes(n)&&(n=N,t=w);let o=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${n})+)`,"gu");e=e.replace(o,(i,l,u,g)=>l+u+L(n,g.length/2));let s=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${t}+)`,"gu");return e=e.replace(s,(i,l,u,g)=>l+u+L(`\\${t}`,g.length)),t+e+t}function K(e){let t=e?e.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu,"\\$&"):"^.*$";return new RegExp(t,"i")}function Z(e,t={}){return (e??"").replace(/\{(.*?)\}/gu,(n,r)=>t[r]??n)}function G(e){return `\u200E${e??""}\u200E`}function ee(e){return e!==null}function te(e){return e!==void 0}function re(e,t=100){let n;return (...r)=>{let o=()=>{clearTimeout(n),e(...r);};clearTimeout(n),n=setTimeout(o,t);}}function se(e,t,n=!1){if(!e||!t)return !1;let r=new URL(e),o=new URL(t);return !n&&r.protocol!==o.protocol||r.host==null||o.host==null?!1:r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port}function ie(e){try{return new URL(e),!0}catch{return !1}}
6
+ // src/index.ts
7
+ var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis;
8
+ function isDefaultModule(module) {
9
+ return module.default !== void 0;
10
+ }
11
+ async function importCoreAccessor() {
12
+ if (isAMD) {
13
+ return await window.$arcgis.import("esri/core/Accessor");
14
+ }
15
+ const module = await import('@arcgis/core/core/Accessor.js');
16
+ return isDefaultModule(module) ? module.default : module;
17
+ }
18
+ async function importLayersFeatureLayer() {
19
+ if (isAMD) {
20
+ return await window.$arcgis.import("esri/layers/FeatureLayer");
21
+ }
22
+ const module = await import('@arcgis/core/layers/FeatureLayer.js');
23
+ return isDefaultModule(module) ? module.default : module;
24
+ }
25
+ async function importPortalPortalItem() {
26
+ if (isAMD) {
27
+ return await window.$arcgis.import("esri/portal/PortalItem");
28
+ }
29
+ const module = await import('@arcgis/core/portal/PortalItem.js');
30
+ return isDefaultModule(module) ? module.default : module;
31
+ }
32
+ async function newPortalPortalItem(properties) {
33
+ const ModConstructor = await importPortalPortalItem();
34
+ return new ModConstructor(properties);
35
+ }
36
+ async function importWebMap() {
37
+ if (isAMD) {
38
+ return await window.$arcgis.import("esri/WebMap");
39
+ }
40
+ const module = await import('@arcgis/core/WebMap.js');
41
+ return isDefaultModule(module) ? module.default : module;
42
+ }
43
+ async function newWebMap(properties) {
44
+ const ModConstructor = await importWebMap();
45
+ return new ModConstructor(properties);
46
+ }
47
+ async function importWebScene() {
48
+ if (isAMD) {
49
+ return await window.$arcgis.import("esri/WebScene");
50
+ }
51
+ const module = await import('@arcgis/core/WebScene.js');
52
+ return isDefaultModule(module) ? module.default : module;
53
+ }
54
+ async function newWebScene(properties) {
55
+ const ModConstructor = await importWebScene();
56
+ return new ModConstructor(properties);
57
+ }
58
+ async function importArcade() {
59
+ if (isAMD) {
60
+ return await window.$arcgis.import("esri/arcade");
61
+ }
62
+ const module = await import('@arcgis/core/arcade.js');
63
+ return isDefaultModule(module) ? module.default : module;
64
+ }
65
+ async function importCoreAccessorSupportDecorators() {
66
+ if (isAMD) {
67
+ return await window.$arcgis.import("esri/core/accessorSupport/decorators");
68
+ }
69
+ const module = await import('@arcgis/core/core/accessorSupport/decorators.js');
70
+ return isDefaultModule(module) ? module.default : module;
71
+ }
72
+ async function importRequest() {
73
+ if (isAMD) {
74
+ return await window.$arcgis.import("esri/request");
75
+ }
76
+ const module = await import('@arcgis/core/request.js');
77
+ return isDefaultModule(module) ? module.default : module;
78
+ }
7
79
 
8
- export { B, D, E, G, K, U, W, Z, ee as e, h, ie as i, k, q, re as r, se as s, te as t, v, x };
80
+ // src/array-utils.ts
81
+
82
+ // src/deferred.ts
83
+ var Deferred = class {
84
+ /**
85
+ * Creates a new deferred promise.
86
+ */
87
+ constructor() {
88
+ this.resolve = () => void 0;
89
+ this.reject = () => void 0;
90
+ this.promise = new Promise((resolve, reject) => {
91
+ this.resolve = resolve;
92
+ this.reject = reject;
93
+ });
94
+ }
95
+ };
96
+
97
+ // src/dom.ts
98
+ function inTargetElement(element, targetElement) {
99
+ let currentElement = element;
100
+ while (currentElement) {
101
+ if (currentElement === targetElement) {
102
+ return true;
103
+ }
104
+ if (!currentElement.parentNode) {
105
+ return false;
106
+ }
107
+ if (currentElement.parentNode instanceof ShadowRoot) {
108
+ currentElement = currentElement.parentNode.host;
109
+ } else {
110
+ currentElement = currentElement.parentNode;
111
+ }
112
+ }
113
+ return false;
114
+ }
115
+ function observeAncestorsMutation(element, attributeFilter, callback) {
116
+ const { subscribe } = observe(attributeFilter);
117
+ return subscribe((mutations) => {
118
+ const matched = mutations.some((mutation) => inTargetElement(element, mutation.target));
119
+ if (matched)
120
+ callback();
121
+ });
122
+ }
123
+ var observers = {};
124
+ function observe(attributeFilter) {
125
+ const attributes = attributeFilter.join(",");
126
+ const previousObserver = observers[attributes];
127
+ if (previousObserver !== void 0)
128
+ return previousObserver;
129
+ const subscribers = /* @__PURE__ */ new Set();
130
+ const mutationObserver = new MutationObserver((mutations) => subscribers.forEach((callback) => callback(mutations)));
131
+ mutationObserver.observe(document.documentElement, {
132
+ attributes: true,
133
+ attributeFilter,
134
+ subtree: true
135
+ });
136
+ const observer = {
137
+ subscribe(callback) {
138
+ subscribers.add(callback);
139
+ return {
140
+ remove: () => {
141
+ subscribers.delete(callback);
142
+ if (subscribers.size === 0) {
143
+ mutationObserver.disconnect();
144
+ observers[attributes] = void 0;
145
+ }
146
+ }
147
+ };
148
+ }
149
+ };
150
+ observers[attributes] = observer;
151
+ return observer;
152
+ }
153
+ function closestElement(base, selector) {
154
+ let currentElement = base;
155
+ while (currentElement) {
156
+ const element = currentElement.closest(selector);
157
+ if (element) {
158
+ return element;
159
+ }
160
+ const rootElement = currentElement.getRootNode();
161
+ if (rootElement === document) {
162
+ return null;
163
+ }
164
+ currentElement = rootElement.host;
165
+ }
166
+ return null;
167
+ }
168
+ function getElementTheme(base) {
169
+ const themeElt = closestElement(base, ":is(.calcite-mode-light, .calcite-mode-dark)");
170
+ return themeElt && themeElt.classList.contains("calcite-mode-dark") ? "dark" : "light";
171
+ }
172
+ function isElement(ref) {
173
+ return ref.nodeType === Node.ELEMENT_NODE;
174
+ }
175
+ function isHTMLWithSetFocus(ref) {
176
+ return "setFocus" in ref && typeof ref.setFocus === "function";
177
+ }
178
+ function setFocus(ref, selector = "") {
179
+ if (!isElement(ref)) {
180
+ return false;
181
+ }
182
+ if (ref.matches(selector)) {
183
+ if (isHTMLWithSetFocus(ref)) {
184
+ setTimeout(() => ref.setFocus(), 0);
185
+ }
186
+ return true;
187
+ }
188
+ for (const child of ref.children) {
189
+ if (setFocus(child, selector)) {
190
+ return true;
191
+ }
192
+ }
193
+ const shadowRoot = ref.shadowRoot;
194
+ if (shadowRoot) {
195
+ for (const child of shadowRoot.children) {
196
+ if (setFocus(child, selector)) {
197
+ return true;
198
+ }
199
+ }
200
+ }
201
+ return false;
202
+ }
203
+ function setFocusOnElement(ref, selector) {
204
+ if (!ref?.shadowRoot) {
205
+ return;
206
+ }
207
+ if (ref.hasAttribute("hydrated") || ref.hasAttribute("calcite-hydrated")) {
208
+ setFocus(ref, selector);
209
+ return;
210
+ }
211
+ const mutationObserver = new MutationObserver(() => {
212
+ mutationObserver.disconnect();
213
+ setFocus(ref, selector);
214
+ });
215
+ mutationObserver.observe(ref, {
216
+ attributes: true,
217
+ attributeFilter: ["hydrated", "calcite-hydrated"]
218
+ });
219
+ }
220
+
221
+ // src/guid.ts
222
+ function gen(count) {
223
+ let out = "";
224
+ for (let i = 0; i < count; i++) {
225
+ out += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
226
+ }
227
+ return out;
228
+ }
229
+ function generateGuid() {
230
+ return [gen(2), gen(1), gen(1), gen(1), gen(3)].join("-");
231
+ }
232
+ var capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);
233
+ var camelToHuman = (value) => capitalize(value.replaceAll(/([a-z])([A-Z])/gu, "$1 $2"));
234
+
235
+ // src/intl.ts
236
+ var supportedLocales = /* @__PURE__ */ new Set([
237
+ "ar",
238
+ "bg",
239
+ "bs",
240
+ "ca",
241
+ "cs",
242
+ "da",
243
+ "de",
244
+ "el",
245
+ "en",
246
+ "es",
247
+ "et",
248
+ "fi",
249
+ "fr",
250
+ "he",
251
+ "hr",
252
+ "hu",
253
+ "id",
254
+ "it",
255
+ "ja",
256
+ "ko",
257
+ "lt",
258
+ "lv",
259
+ "nl",
260
+ "nb",
261
+ "pl",
262
+ "pt-BR",
263
+ "pt-PT",
264
+ "ro",
265
+ "ru",
266
+ "sk",
267
+ "sl",
268
+ "sr",
269
+ "sv",
270
+ "th",
271
+ "tr",
272
+ "uk",
273
+ "vi",
274
+ "zh-CN",
275
+ "zh-HK",
276
+ "zh-TW"
277
+ ]);
278
+ var defaultLocale = "en";
279
+ async function fetchT9NStringsBundle(locale, assetsPath, prefix = "") {
280
+ const path = `${assetsPath}/${prefix}`;
281
+ const filePath = `${path}${locale}.json`;
282
+ t9nStringsCache[filePath] ?? (t9nStringsCache[filePath] = fetchBundle(locale, path));
283
+ return await t9nStringsCache[filePath];
284
+ }
285
+ var t9nStringsCache = {};
286
+ async function fetchBundle(locale, path) {
287
+ const filePath = `${path}${locale}.json`;
288
+ try {
289
+ const response = await fetch(filePath);
290
+ if (response.ok)
291
+ return await response.json();
292
+ } catch (error) {
293
+ console.error(error);
294
+ return fallbackBundle;
295
+ }
296
+ if (locale === defaultLocale)
297
+ return fallbackBundle;
298
+ return await fetchBundle(defaultLocale, path);
299
+ }
300
+ var fallbackBundle = new Proxy(
301
+ {},
302
+ {
303
+ get: (_target, property) => camelToHuman(property.toString())
304
+ }
305
+ );
306
+
307
+ // src/strings.ts
308
+ var doubleQuote = '"';
309
+ var singleQuote = "'";
310
+ function repeatString(value, n) {
311
+ return new Array(n + 1).join(value);
312
+ }
313
+ function quoteString(value) {
314
+ let quote = doubleQuote;
315
+ let alternateQuote = singleQuote;
316
+ const avoidEscape = value.includes(quote) && !value.includes(alternateQuote);
317
+ if (avoidEscape) {
318
+ alternateQuote = doubleQuote;
319
+ quote = singleQuote;
320
+ }
321
+ const alternateEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${alternateQuote})+)`, "gu");
322
+ value = value.replace(
323
+ alternateEscape,
324
+ (_, boundaryChar, leadingEscapedSlashes, escapedQuoteChars) => (
325
+ // We divide the escapedQuoteChars by 2 since there are 2 characters in each escaped part ('\\"'.length === 2)
326
+ boundaryChar + leadingEscapedSlashes + repeatString(alternateQuote, escapedQuoteChars.length / 2)
327
+ )
328
+ );
329
+ const quoteEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${quote}+)`, "gu");
330
+ value = value.replace(
331
+ quoteEscape,
332
+ (_, boundaryChar, leadingEscapedSlashes, quoteChars) => boundaryChar + leadingEscapedSlashes + repeatString(`\\${quote}`, quoteChars.length)
333
+ );
334
+ return quote + value + quote;
335
+ }
336
+ function createFilterExpression(filterWord) {
337
+ const sanitizedWord = filterWord ? filterWord.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu, "\\$&") : "^.*$";
338
+ return new RegExp(sanitizedWord, "i");
339
+ }
340
+ function setValuesInString(message, values = {}) {
341
+ return (message ?? "").replace(/\{(.*?)\}/gu, (match, valueName) => values[valueName] ?? match);
342
+ }
343
+ function addLTRMark(value) {
344
+ return `\u200E${value ?? ""}\u200E`;
345
+ }
346
+
347
+ // src/type-guards.ts
348
+ function isNotNull(item) {
349
+ return item !== null;
350
+ }
351
+ function isNotUndefined(item) {
352
+ return item !== void 0;
353
+ }
354
+
355
+ // src/ui.ts
356
+ function debounce(func, waitFor = 100) {
357
+ let timeout;
358
+ return (...args) => {
359
+ const later = () => {
360
+ clearTimeout(timeout);
361
+ func(...args);
362
+ };
363
+ clearTimeout(timeout);
364
+ timeout = setTimeout(later, waitFor);
365
+ };
366
+ }
367
+
368
+ // src/url.ts
369
+ function hasSameOrigin(url1, url2, ignoreProtocol = false) {
370
+ if (!url1 || !url2) {
371
+ return false;
372
+ }
373
+ const url1Obj = new URL(url1);
374
+ const url2Obj = new URL(url2);
375
+ if (!ignoreProtocol && url1Obj.protocol !== url2Obj.protocol) {
376
+ return false;
377
+ }
378
+ if (url1Obj.host == null || url2Obj.host == null) {
379
+ return false;
380
+ }
381
+ return url1Obj.host.toLowerCase() === url2Obj.host.toLowerCase() && url1Obj.port === url2Obj.port;
382
+ }
383
+ function isURL(url) {
384
+ try {
385
+ new URL(url);
386
+ return true;
387
+ } catch (e) {
388
+ return false;
389
+ }
390
+ }
391
+
392
+ export { Deferred as D, importRequest as a, isNotNull as b, isNotUndefined as c, newWebScene as d, newWebMap as e, addLTRMark as f, supportedLocales as g, fetchT9NStringsBundle as h, importLayersFeatureLayer as i, createFilterExpression as j, setFocusOnElement as k, importCoreAccessor as l, importCoreAccessorSupportDecorators as m, newPortalPortalItem as n, isURL as o, hasSameOrigin as p, generateGuid as q, getElementTheme as r, setValuesInString as s, importArcade as t, quoteString as u, observeAncestorsMutation as v, debounce as w };
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.3
4
+ * v4.30.0-next.30
5
5
  */
6
6
  import { editor } from 'monaco-editor';
7
7
  import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
@@ -2935,24 +2935,22 @@ var marked_umd = createCommonjsModule(function (module, exports) {
2935
2935
  // Set up the marked library to use GitHub Flavored Markdown and to use the custom renderer for links.
2936
2936
  marked_umd.marked.use({
2937
2937
  gfm: true,
2938
+ breaks: true,
2939
+ async: false,
2938
2940
  renderer: {
2939
2941
  link(href, title, text) {
2940
2942
  return `<calcite-link href="${href}" title="${title ?? text}" target="Arcade Help">${text}</calcite-link>`;
2941
- }
2942
- }
2943
+ },
2944
+ },
2943
2945
  });
2944
2946
  /**
2945
2947
  * Converts a markdown string to HTML using the marked library.
2946
2948
  */
2947
2949
  function convertMarkdownString(value) {
2948
- value ?? (value = "");
2949
- const result = marked_umd.marked(typeof value === "string" ? value : value.value, {
2950
- gfm: true,
2951
- breaks: true,
2952
- headerIds: false,
2953
- mangle: false
2954
- });
2955
- return result;
2950
+ if (value === null || value === undefined) {
2951
+ return "";
2952
+ }
2953
+ return marked_umd.marked.parse(typeof value === "string" ? value : value.value);
2956
2954
  }
2957
2955
 
2958
2956
  export { colorizedAllCodeElements as a, colorizeCodeElement as b, convertMarkdownString as c, generateColorizeStyles as g, onColorizeThemeChanged as o };
@@ -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.30/esri/copyright.txt for details.
4
- * v4.30.0-next.3
4
+ * v4.30.0-next.30
5
5
  */
6
- import { K } from './index2.js';
6
+ import { j as createFilterExpression } from './index2.js';
7
7
 
8
8
  /**
9
9
  * Filters a collection of items by the given keys and filter word.
@@ -16,7 +16,7 @@ function filterCollection(collection, keys, filterWord, beforeFilteringFn) {
16
16
  if (!_keys.length) {
17
17
  return [];
18
18
  }
19
- const filterExpression = K(filterWord);
19
+ const filterExpression = createFilterExpression(filterWord);
20
20
  return collection.filter((item) => {
21
21
  if (beforeFilteringFn) {
22
22
  const res = beforeFilteringFn(item);