@arcgis/core 5.2.0-next.30 → 5.2.0-next.32

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 (156) hide show
  1. package/WebDocument2D.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/arcade/ArcadePortal.js +1 -1
  4. package/arcade/Attachment.js +1 -1
  5. package/arcade/Dictionary.js +1 -1
  6. package/arcade/Feature.js +1 -1
  7. package/arcade/arcadeAsyncRuntime.js +1 -1
  8. package/arcade/arcadeCompiler.js +1 -1
  9. package/arcade/arcadeRuntime.js +1 -1
  10. package/arcade/containerUtils.js +1 -1
  11. package/arcade/debug.js +1 -1
  12. package/arcade/deepClone.js +1 -1
  13. package/arcade/featureSetUtils.js +1 -1
  14. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  15. package/arcade/featureset/support/shared.js +1 -1
  16. package/arcade/functions/convertdirection.js +1 -1
  17. package/arcade/functions/date.js +1 -1
  18. package/arcade/functions/feature.js +1 -1
  19. package/arcade/functions/featuresetbase.js +1 -1
  20. package/arcade/functions/featuresetgeom.js +1 -1
  21. package/arcade/functions/featuresetstats.js +1 -1
  22. package/arcade/functions/featuresetstring.js +1 -1
  23. package/arcade/functions/geomasync.js +1 -1
  24. package/arcade/functions/geometry.js +1 -1
  25. package/arcade/functions/geomsync.js +1 -1
  26. package/arcade/functions/knowledgegraph.js +1 -1
  27. package/arcade/functions/maths.js +1 -1
  28. package/arcade/functions/stats.js +1 -1
  29. package/arcade/functions/string.js +1 -1
  30. package/arcade/geometry/constructors.js +1 -1
  31. package/arcade/geometry/functions.js +1 -1
  32. package/arcade/languageUtils.js +1 -1
  33. package/assets/esri/core/workers/RemoteClient.js +1 -1
  34. package/assets/esri/core/workers/chunks/{e5d2fab228d54b18a8a8.js → 08405116b5feb2d00101.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{774615303c1cc9a77e20.js → 11af659688cf963ea6cd.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{2665337e1b665e7e2b70.js → 15081b361fc42f40b865.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{bcb2092c87d8d21c6458.js → 197b9f8483fad2258650.js} +1 -1
  38. package/assets/esri/core/workers/chunks/1cd8dff4373494b01ad4.js +1 -0
  39. package/assets/esri/core/workers/chunks/1d92da90fbbc3f98b201.js +1 -0
  40. package/assets/esri/core/workers/chunks/210ffc448c73a7bf63aa.js +1 -0
  41. package/assets/esri/core/workers/chunks/{a14e5607c5c091c77e3d.js → 2540beb53f1443a070d7.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{689673173ca1c0e098fe.js → 25932fa010f9a32475c1.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{e2d500ac1a264d09c857.js → 32b5d2537feefe6e94a3.js} +1 -1
  44. package/assets/esri/core/workers/chunks/34a024eda22d228e1fbe.js +1 -0
  45. package/assets/esri/core/workers/chunks/3f63b14b53b5ca716e3a.js +1 -0
  46. package/assets/esri/core/workers/chunks/{6df54132299b9e8f6dad.js → 456b77b8f13933a75b68.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{3c342e662c13a05f4caf.js → 49713dfa4c8b788079d1.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{45e4b9069263adeae394.js → 49a45083a9a155614c1c.js} +1 -1
  49. package/assets/esri/core/workers/chunks/4be31fcc5482a2526d2b.js +1 -0
  50. package/assets/esri/core/workers/chunks/{31d92ba9089617aa59ab.js → 57c003c6745d450558a7.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{8104ac2eee69d79ada86.js → 6048c89fc4dcd2e9988d.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{1b9c68e8431bb4608209.js → 6162f6735ea4622e54d8.js} +1 -1
  53. package/assets/esri/core/workers/chunks/684c9b4bd9590d2db12f.js +1 -0
  54. package/assets/esri/core/workers/chunks/684d3cb4fb233180b2d0.js +1 -0
  55. package/assets/esri/core/workers/chunks/{fe6385115d76e16e8da0.js → 75baf6dff6e7658b17b3.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{166a0df6e37627e18976.js → 7a2dfa42610fe8414ed7.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{43847d66726fd0bcbbb7.js → 83ae56c7fa8d84865605.js} +1 -1
  58. package/assets/esri/core/workers/chunks/8722e2790272e90a1897.js +1 -0
  59. package/assets/esri/core/workers/chunks/{1282598516cd0e3056b7.js → 977e6f589bd266d6067d.js} +2 -2
  60. package/assets/esri/core/workers/chunks/9f3d37e5f42bf1529673.js +1 -0
  61. package/assets/esri/core/workers/chunks/a833fc9250635eb4152f.js +1 -0
  62. package/assets/esri/core/workers/chunks/{47290f27375c76bcc9c7.js → b0253fe7b3529bc22270.js} +1 -1
  63. package/assets/esri/core/workers/chunks/b324bdb9c74fc3f956db.js +1 -0
  64. package/assets/esri/core/workers/chunks/{1bd7b7f4ee7ea6cb7ef9.js → b60f24a6c777301803f4.js} +1 -1
  65. package/assets/esri/core/workers/chunks/bd155794e9bc16dd0474.js +1 -0
  66. package/assets/esri/core/workers/chunks/{906f4c0fa8135e6c2f03.js → c660a5a1086870a3a6b9.js} +1 -1
  67. package/assets/esri/core/workers/chunks/cb58aff1ff186fa18345.js +1 -0
  68. package/assets/esri/core/workers/chunks/{17b98787a0698f584882.js → e7cb1b72f0b54e845741.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{21122f3f3e19a7fd7d33.js → f69d3ff8a69c1985bca3.js} +1 -1
  70. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  71. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  72. package/chunks/ShadowCastVisualize.glsl.js +4 -10
  73. package/chunks/aiServices.js +1 -1
  74. package/chunks/array.js +1 -1
  75. package/chunks/languageUtils.js +1 -1
  76. package/chunks/lyr3DMain.js +1 -1
  77. package/config.js +1 -1
  78. package/core/has.js +1 -1
  79. package/graphic/AnnotationFeatureGraphicOrigin.d.ts +3 -3
  80. package/graphic/AnnotationFeatureGraphicOrigin.js +1 -1
  81. package/intl/messages.d.ts +12 -2
  82. package/intl/t9n.d.ts +8 -1
  83. package/intl.d.ts +4 -0
  84. package/kernel.js +1 -1
  85. package/layers/AnnotationFeatureLayer.d.ts +1 -4
  86. package/layers/AnnotationFeatureLayer.js +1 -1
  87. package/layers/DimensionFeatureLayer.js +1 -1
  88. package/layers/VoxelWasmPerSceneView.js +1 -1
  89. package/layers/mixins/DataElementMixin.js +2 -0
  90. package/layers/support/AnnotationFeatureSublayer.js +1 -1
  91. package/layers/support/parquetUtils.js +1 -1
  92. package/package.json +1 -1
  93. package/support/ArcadeExpression.js +1 -1
  94. package/support/arcadeUtils.js +1 -1
  95. package/support/revision.js +1 -1
  96. package/symbols/cim/supportUtils.js +2 -0
  97. package/views/2d/engine/webgl/util/DimensionMatcher.js +1 -1
  98. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  99. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  100. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  101. package/views/2d/layers/support/annodime/annotationSchema.js +1 -1
  102. package/views/2d/layers/support/annodime/dimensionSchema.js +1 -1
  103. package/views/2d/layers/support/annodime/utils.js +1 -1
  104. package/views/2d/layers/support/annodime/virtualFields.js +1 -1
  105. package/views/3d/camera/constraintUtils.js +1 -1
  106. package/views/3d/state/ConstraintsManager.js +1 -1
  107. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  108. package/views/3d/terrain/PatchRenderData.js +1 -1
  109. package/views/3d/terrain/PatchRenderDataWaterproofness.js +2 -0
  110. package/views/3d/terrain/PlanarPatch.js +1 -1
  111. package/views/3d/terrain/SphericalPatch.js +1 -1
  112. package/views/3d/terrain/TileRenderer.js +1 -1
  113. package/views/3d/webgl-engine/effects/OpaqueEnvironment.js +1 -1
  114. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  115. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  116. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.js +1 -1
  117. package/views/3d/webgl-engine/effects/geometry/ObjectAndLayerID.js +1 -1
  118. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  119. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  120. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.js +1 -1
  121. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  122. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  123. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  124. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  125. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  126. package/views/3d/webgl-engine/lib/CutFillComputation.js +1 -1
  127. package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
  128. package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
  129. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  130. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  131. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  132. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  133. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  134. package/views/3d/webgl.js +1 -1
  135. package/views/PopupView.js +1 -1
  136. package/views/layers/FeatureLikeLayerView.js +1 -1
  137. package/views/popupAdapter.js +1 -1
  138. package/webdoc/support/thumbnailUtils.js +1 -1
  139. package/webdoc/support/webdocSaveUtils.js +1 -1
  140. package/widgets/support/widget.d.ts +1 -0
  141. package/assets/esri/core/workers/chunks/125edba5c618c6257cb8.js +0 -1
  142. package/assets/esri/core/workers/chunks/168be2eac0fa3c67ae27.js +0 -1
  143. package/assets/esri/core/workers/chunks/32740b075d7a890d7888.js +0 -1
  144. package/assets/esri/core/workers/chunks/5189413a83faf3480e29.js +0 -1
  145. package/assets/esri/core/workers/chunks/a2be8784f2cfdbb42681.js +0 -1
  146. package/assets/esri/core/workers/chunks/a9db775210ebeee41738.js +0 -1
  147. package/assets/esri/core/workers/chunks/bca6abc185dedec0f41b.js +0 -1
  148. package/assets/esri/core/workers/chunks/bee56a6ac99312f03109.js +0 -1
  149. package/assets/esri/core/workers/chunks/d1d135a54233092ad637.js +0 -1
  150. package/assets/esri/core/workers/chunks/d750e4abeb777caa8c36.js +0 -1
  151. package/assets/esri/core/workers/chunks/daf539e9f88fc9e101e4.js +0 -1
  152. package/assets/esri/core/workers/chunks/e774303efefee31952d0.js +0 -1
  153. package/assets/esri/core/workers/chunks/e8546ab510fc9515bd23.js +0 -1
  154. package/assets/esri/core/workers/chunks/fc9664d3282b052ef40f.js +0 -1
  155. package/views/2d/layers/support/annodime/DimensionMatcherSchema.js +0 -2
  156. package/views/2d/layers/support/annodime/unsupported.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- async function e(e={}){var r,t,n=e,o="./this.program",a="",i="";function s(e){return n.locateFile?n.locateFile(e,i):i+e}try{i=new URL(".",a).href}catch{}r=async e=>{var r=await fetch(e,{credentials:"same-origin"});if(r.ok)return r.arrayBuffer();throw new Error(r.status+" : "+r.url)};var l,u,d,c,m,f,h,p,v,w,g,y,E,k,b=console.log.bind(console),_=console.error.bind(console),T=!1,A=!1;function D(){var e=wt.buffer;p=new Int8Array(e),m=new Int16Array(e),n.HEAPU8=k=new Uint8Array(e),g=new Uint16Array(e),f=new Int32Array(e),n.HEAPU32=y=new Uint32Array(e),v=new Float32Array(e),n.HEAPF64=w=new Float64Array(e),h=new BigInt64Array(e),E=new BigUint64Array(e)}function F(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)L(n.preRun.shift());I(O)}function P(){A=!0,n.noFSInit||at.initialized||at.init(),Ct.L(),at.ignorePermissions=!1}function S(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)j(n.postRun.shift());I(W)}function C(e){n.onAbort?.(e),_(e=`Aborted(${e})`),T=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw d?.(r),r}function x(){return n.locateFile?s("lyr3DMain.wasm"):new URL("lyr3DMain.wasm","").href}function M(e){if(e==c&&l)return new Uint8Array(l);throw"both async and sync fetching of the wasm failed"}async function R(e){if(!l)try{var t=await r(e);return new Uint8Array(t)}catch{}return M(e)}async function N(e,r){try{var t=await R(e);return await WebAssembly.instantiate(t,r)}catch(n){_(`failed to asynchronously prepare wasm: ${n}`),C(n)}}async function z(e,r,t){if(!e)try{var n=fetch(r,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,t)}catch(o){_(`wasm streaming compile failed: ${o}`),_("falling back to ArrayBuffer instantiation")}return N(r,t)}function B(){return{a:xt}}async function $(){function e(e,r){return St(Ct=e.exports),D(),Ct}function r(r){return e(r.instance)}var t=B();return n.instantiateWasm?new Promise((r,o)=>{n.instantiateWasm(t,(t,n)=>{r(e(t))})}):(c??=x(),r(await z(l,c,t)))}var I=e=>{for(;e.length>0;)e.shift()(n)},W=[],j=e=>W.push(e),O=[],L=e=>O.push(e);class U{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){y[this.ptr+4>>2]=e}get_type(){return y[this.ptr+4>>2]}set_destructor(e){y[this.ptr+8>>2]=e}get_destructor(){return y[this.ptr+8>>2]}set_caught(e){e=e?1:0,p[this.ptr+12]=e}get_caught(){return 0!=p[this.ptr+12]}set_rethrown(e){e=e?1:0,p[this.ptr+13]=e}get_rethrown(){return 0!=p[this.ptr+13]}init(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)}set_adjusted_ptr(e){y[this.ptr+16>>2]=e}get_adjusted_ptr(){return y[this.ptr+16>>2]}}var H=(e,r,t)=>{new U(e).init(r,t),C()},V=()=>C(""),q={},X=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function G(e){return this.fromWireType(y[e>>2])}var K={},Y={},J={},Q=class extends Error{constructor(e){super(e),this.name="InternalError"}},Z=e=>{throw new Q(e)},ee=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Z("Mismatched type converter count");for(var o=0;o<e.length;++o)le(e[o],n[o])}e.forEach(e=>J[e]=r);var o=new Array(r.length),a=[],i=0;for(let[s,l]of r.entries())Y.hasOwnProperty(l)?o[s]=Y[l]:(a.push(l),K.hasOwnProperty(l)||(K[l]=[]),K[l].push(()=>{o[s]=Y[l],++i===a.length&&n(o)}));0===a.length&&n(o)},re=e=>{var r=q[e];delete q[e];var t=r.elements,n=t.length,o=t.map(e=>e.getterReturnType).concat(t.map(e=>e.setterArgumentType)),a=r.rawConstructor,i=r.rawDestructor;ee([e],o,e=>{for(const[r,o]of t.entries()){const t=e[r],a=o.getter,i=o.getterContext,s=e[r+n],l=o.setter,u=o.setterContext;o.read=e=>t.fromWireType(a(i,e)),o.write=(e,r)=>{var t=[];l(u,e,s.toWireType(t,r)),X(t)}}return[{name:r.name,fromWireType:e=>{for(var r=new Array(n),o=0;o<n;++o)r[o]=t[o].read(e);return i(e),r},toWireType:(e,o)=>{if(n!==o.length)throw new TypeError(`Incorrect number of tuple elements for ${r.name}: expected=${n}, actual=${o.length}`);for(var s=a(),l=0;l<n;++l)t[l].write(s,o[l]);return null!==e&&e.push(i,s),s},readValueFromPointer:G,destructorFunction:i}]})},te={},ne=e=>{var r=te[e];delete te[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map(e=>e.getterReturnType).concat(o.map(e=>e.setterArgumentType));ee([e],a,e=>{var a={};for(var[i,s]of o.entries()){const r=e[i],t=s.getter,n=s.getterContext,l=e[i+o.length],u=s.setter,d=s.setterContext;a[s.fieldName]={read:e=>r.fromWireType(t(n,e)),write:(e,r)=>{var t=[];u(d,e,l.toWireType(t,r)),X(t)},optional:r.optional}}return[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r)&&!a[o].optional)throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},readValueFromPointer:G,destructorFunction:n}]})},oe=e=>{for(var r="";;){var t=k[e++];if(!t)return r;r+=String.fromCharCode(t)}},ae=class extends Error{constructor(e){super(e),this.name="BindingError"}},ie=e=>{throw new ae(e)};function se(e,r,t={}){var n=r.name;if(e||ie(`type "${n}" must have a positive integer typeid pointer`),Y.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;ie(`Cannot register type '${n}' twice`)}if(Y[e]=r,delete J[e],K.hasOwnProperty(e)){var o=K[e];delete K[e],o.forEach(e=>e())}}function le(e,r,t={}){return se(e,r,t)}var ue=(e,r,t)=>{switch(r){case 1:return t?e=>p[e]:e=>k[e];case 2:return t?e=>m[e>>1]:e=>g[e>>1];case 4:return t?e=>f[e>>2]:e=>y[e>>2];case 8:return t?e=>h[e>>3]:e=>E[e>>3];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},de=(e,r,t,n,o)=>{r=oe(r);const a=0n===n;let i=e=>e;if(a){const e=8*t;i=r=>BigInt.asUintN(e,r),o=i(o)}le(e,{name:r,fromWireType:i,toWireType:(e,r)=>("number"==typeof r&&(r=BigInt(r)),r),readValueFromPointer:ue(r,t,!a),destructorFunction:null})},ce=(e,r,t,n)=>{le(e,{name:r=oe(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},readValueFromPointer:function(e){return this.fromWireType(k[e])},destructorFunction:null})},me=[],fe=[0,1,,1,null,1,!0,1,!1,1],he=e=>{e>9&&0===--fe[e+1]&&(fe[e]=void 0,me.push(e))},pe={toValue:e=>(e||ie(`Cannot use deleted val. handle = ${e}`),fe[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const r=me.pop()||fe.length;return fe[r]=e,fe[r+1]=1,r}}}},ve={name:"emscripten::val",fromWireType:e=>{var r=pe.toValue(e);return he(e),r},toWireType:(e,r)=>pe.toHandle(r),readValueFromPointer:G,destructorFunction:null},we=e=>le(e,ve),ge=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(v[e>>2])};case 8:return function(e){return this.fromWireType(w[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},ye=(e,r,t)=>{le(e,{name:r=oe(r),fromWireType:e=>e,toWireType:(e,r)=>r,readValueFromPointer:ge(r,t),destructorFunction:null})},Ee=(e,r)=>Object.defineProperty(r,"name",{value:e});function ke(e){for(var r=1;r<e.length;++r)if(null!==e[r]&&void 0===e[r].destructorFunction)return!0;return!1}function be(e,r,t,n,o,a){var i=r.length;i<2&&ie("argTypes array size mismatch! Must at least get return value and 'this' types!"),r[1];var s=ke(r),l=!r[0].isVoid,u=i-2,d=new Array(u),c=[],m=[];return Ee(e,function(...e){var t;m.length=0,c.length=1,c[0]=o;for(var a=0;a<u;++a)d[a]=r[a+2].toWireType(m,e[a]),c.push(d[a]);function i(e){if(s)X(m);else for(var n=2;n<r.length;n++){var o=1===n?t:d[n-2];null!==r[n].destructorFunction&&r[n].destructorFunction(o)}if(l)return r[0].fromWireType(e)}return i(n(...c))})}var _e=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(...n){return e[r].overloadTable.hasOwnProperty(n.length)||ie(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[n.length].apply(this,n)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},Te=(e,r,t)=>{n.hasOwnProperty(e)?((void 0===t||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[t])&&ie(`Cannot register public name '${e}' twice`),_e(n,e,e),n[e].overloadTable.hasOwnProperty(t)&&ie(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),n[e].overloadTable[t]=r):(n[e]=r,n[e].argCount=t)},Ae=(e,r)=>{for(var t=[],n=0;n<e;n++)t.push(y[r+4*n>>2]);return t},De=(e,r,t)=>{n.hasOwnProperty(e)||Z("Replacing nonexistent public symbol"),void 0!==n[e].overloadTable&&void 0!==t?n[e].overloadTable[t]=r:(n[e]=r,n[e].argCount=t)},Fe=[],Pe=e=>{var r=Fe[e];return r||(Fe[e]=r=gt.get(e)),r},Se=(e,r,t=!1)=>{function n(){return Pe(r)}e=oe(e);var o=n();return"function"!=typeof o&&ie(`unknown function pointer with signature ${e}: ${r}`),o};class Ce extends Error{}var xe=e=>{var r=ht(e),t=oe(r);return vt(r),t},Me=(e,r)=>{var t=[],n={};function o(e){n[e]||Y[e]||(J[e]?J[e].forEach(o):(t.push(e),n[e]=!0))}throw r.forEach(o),new Ce(`${e}: `+t.map(xe).join([", "]))},Re=e=>{const r=(e=e.trim()).indexOf("(");return-1===r?e:e.slice(0,r)},Ne=(e,r,t,n,o,a,i,s)=>{var l=Ae(r,t);e=oe(e),e=Re(e),o=Se(n,o,i),Te(e,function(){Me(`Cannot call ${e} due to unbound types`,l)},r-1),ee([],l,t=>{var n=[t[0],null].concat(t.slice(1));return De(e,be(e,n,null,o,a),r-1),[]})},ze=(e,r,t,n,o)=>{r=oe(r);let a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i,o=a(o)}le(e,{name:r,fromWireType:a,toWireType:(e,r)=>r,readValueFromPointer:ue(r,t,0!==n),destructorFunction:null})},Be=(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][r];function o(e){var r=y[e>>2],t=y[e+4>>2];return new n(p.buffer,t,r)}le(e,{name:t=oe(t),fromWireType:o,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},$e=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.codePointAt(i);if(s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s,i++}}return r[t]=0,t-o},Ie=(e,r,t)=>$e(e,k,r,t),We=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},je=globalThis.TextDecoder&&new TextDecoder,Oe=(e,r,t,n)=>{var o=r+t;if(n)return o;for(;e[r]&&!(r>=o);)++r;return r},Le=(e,r=0,t,n)=>{var o=Oe(e,r,t,n);if(o-r>16&&e.buffer&&je)return je.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var l=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|l:(7&i)<<18|s<<12|l<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var u=i-65536;a+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},Ue=(e,r,t)=>e?Le(k,e,r,t):"",He=(e,r)=>{le(e,{name:r=oe(r),fromWireType(e){var r,t=y[e>>2];return r=Ue(e+4,t,!0),vt(e),r},toWireType(e,r){var t;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var n="string"==typeof r;n||ArrayBuffer.isView(r)&&1==r.BYTES_PER_ELEMENT||ie("Cannot pass non-string to std::string"),t=n?We(r):r.length;var o=pt(4+t+1),a=o+4;return y[o>>2]=t,n?Ie(r,a,t+1):k.set(r,a),null!==e&&e.push(vt,o),o},readValueFromPointer:G,destructorFunction(e){vt(e)}})},Ve=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,qe=(e,r,t)=>{var n=e>>1,o=Oe(g,n,r/2,t);if(o-n>16&&Ve)return Ve.decode(g.subarray(n,o));for(var a="",i=n;i<o;++i){var s=g[i];a+=String.fromCharCode(s)}return a},Xe=(e,r,t)=>{if(t??=2147483647,t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);m[r>>1]=i,r+=2}return m[r>>1]=0,r-n},Ge=e=>2*e.length,Ke=(e,r,t)=>{for(var n="",o=e>>2,a=0;!(a>=r/4);a++){var i=y[o+a];if(!i&&!t)break;n+=String.fromCodePoint(i)}return n},Ye=(e,r,t)=>{if(t??=2147483647,t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.codePointAt(a);if(i>65535&&a++,f[r>>2]=i,(r+=4)+4>o)break}return f[r>>2]=0,r-n},Je=e=>{for(var r=0,t=0;t<e.length;++t){e.codePointAt(t)>65535&&t++,r+=4}return r},Qe=(e,r,t)=>{var n,o,a;t=oe(t),2===r?(n=qe,o=Xe,a=Ge):(n=Ke,o=Ye,a=Je),le(e,{name:t,fromWireType:e=>{var t=y[e>>2],o=n(e+4,t*r,!0);return vt(e),o},toWireType:(e,n)=>{"string"!=typeof n&&ie(`Cannot pass non-string to C++ string type ${t}`);var i=a(n),s=pt(4+i+r);return y[s>>2]=i/r,o(n,s+4,i+r),null!==e&&e.push(vt,s),s},readValueFromPointer:G,destructorFunction(e){vt(e)}})},Ze=(e,r,t,n,o,a)=>{q[e]={name:oe(r),rawConstructor:Se(t,n),rawDestructor:Se(o,a),elements:[]}},er=(e,r,t,n,o,a,i,s,l)=>{q[e].elements.push({getterReturnType:r,getter:Se(t,n),getterContext:o,setterArgumentType:a,setter:Se(i,s),setterContext:l})},rr=(e,r,t,n,o,a)=>{te[e]={name:oe(r),rawConstructor:Se(t,n),rawDestructor:Se(o,a),fields:[]}},tr=(e,r,t,n,o,a,i,s,l,u)=>{te[e].fields.push({fieldName:oe(r),getterReturnType:t,getter:Se(n,o),getterContext:a,setterArgumentType:i,setter:Se(s,l),setterContext:u})},nr=(e,r)=>{le(e,{isVoid:!0,name:r=oe(r),fromWireType:()=>{},toWireType:(e,r)=>{}})},or=[],ar=e=>{var r=or.length;return or.push(e),r},ir=(e,r)=>{var t=Y[e];return void 0===t&&ie(`${r} has unknown type ${xe(e)}`),t},sr=(e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=ir(y[r+4*n>>2],`parameter ${n}`);return t},lr=(e,r,t)=>{var n=[],o=e(n,t);return n.length&&(y[r>>2]=pe.toHandle(n)),o},ur={},dr=e=>{var r=ur[e];return void 0===r?oe(e):r},cr=(e,r,t)=>{var n=8,[o,...a]=sr(e,r),i=o.toWireType.bind(o),s=a.map(e=>e.readValueFromPointer.bind(e));e--;var l=new Array(e),u=(r,o,a,u)=>{for(var d,c=0,m=0;m<e;++m)l[m]=s[m](u+c),c+=n;switch(t){case 0:d=pe.toValue(r).apply(null,l);break;case 2:d=Reflect.construct(pe.toValue(r),l);break;case 3:d=l[0];break;case 1:d=pe.toValue(r)[dr(o)](...l)}return lr(i,a,d)},d=`methodCaller<(${a.map(e=>e.name)}) => ${o.name}>`;return ar(Ee(d,u))},mr=e=>{e>9&&(fe[e+1]+=1)},fr=(e,r,t,n,o)=>or[e](r,t,n,o),hr=()=>pe.toHandle([]),pr=e=>pe.toHandle(dr(e)),vr=()=>pe.toHandle({}),wr=e=>{var r=pe.toValue(e);X(r),he(e)},gr=(e,r,t)=>{e=pe.toValue(e),r=pe.toValue(r),t=pe.toValue(t),e[r]=t},yr=(e,r,t,n)=>{var o=(new Date).getFullYear(),a=new Date(o,0,1),i=new Date(o,6,1),s=a.getTimezoneOffset(),l=i.getTimezoneOffset(),u=Math.max(s,l);y[e>>2]=60*u,f[r>>2]=Number(s!=l);var d=e=>{var r=e>=0?"-":"+",t=Math.abs(e);return`UTC${r}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`},c=d(s),m=d(l);l<s?(Ie(c,t,17),Ie(m,n,17)):(Ie(c,n,17),Ie(m,t,17))},Er=()=>performance.now(),kr=()=>Date.now(),br=e=>e>=0&&e<=3,_r=9007199254740992,Tr=-9007199254740992,Ar=e=>e<Tr||e>_r?NaN:Number(e);function Dr(e,r,t){if(!br(e))return 28;var n;n=0===e?kr():Er();var o=Math.round(1e3*n*1e3);return h[t>>3]=BigInt(o),0}var Fr=()=>2147483648,Pr=(e,r)=>Math.ceil(e/r)*r,Sr=e=>{var r=(e-wt.buffer.byteLength+65535)/65536|0;try{return wt.grow(r),D(),1}catch(t){}},Cr=e=>{var r=k.length;e>>>=0;var t=Fr();if(e>t)return!1;for(var n=1;n<=4;n*=2){var o=r*(1+.2/n);o=Math.min(o,e+100663296);var a=Math.min(t,Pr(Math.max(e,o),65536));if(Sr(a))return!0}return!1},xr={},Mr=()=>o,Rr=()=>{if(!Rr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:Mr()};for(var r in xr)void 0===xr[r]?delete e[r]:e[r]=xr[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);Rr.strings=t}return Rr.strings},Nr=(e,r)=>{var t=0,n=0;for(var o of Rr()){var a=r+t;y[e+n>>2]=a,t+=Ie(o,a,1/0)+1,n+=4}return 0},zr=(e,r)=>{var t=Rr();y[e>>2]=t.length;var n=0;for(var o of t)n+=We(o)+1;return y[r>>2]=n,0},Br={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=Br.isAbs(e),t="/"===e.slice(-1);return(e=Br.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=Br.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.slice(0,-1)),t+n):"."},basename:e=>e&&e.match(/([^\/]+|\/)\/*$/)[1],join:(...e)=>Br.normalize(e.join("/")),join2:(e,r)=>Br.normalize(e+"/"+r)},$r=()=>e=>(crypto.getRandomValues(e),0),Ir=e=>(Ir=$r())(e),Wr={resolve:(...e)=>{for(var r="",t=!1,n=e.length-1;n>=-1&&!t;n--){var o=n>=0?e[n]:at.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");if(!o)return"";r=o+"/"+r,t=Br.isAbs(o)}return(t?"/":"")+(r=Br.normalizeArray(r.split("/").filter(e=>!!e),!t).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=Wr.resolve(e).slice(1),r=Wr.resolve(r).slice(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var l=[];for(s=i;s<n.length;s++)l.push("..");return(l=l.concat(o.slice(i))).join("/")}},jr=[],Or=(e,r,t)=>{var n=We(e)+1,o=new Array(n),a=$e(e,o,0,o.length);return o.length=a,o},Lr=()=>{if(!jr.length){var e=null;if(globalThis.window?.prompt&&null!==(e=window.prompt("Input: "))&&(e+="\n"),!e)return null;jr=Or(e)}return jr.shift()},Ur={ttys:[],init(){},shutdown(){},register(e,r){Ur.ttys[e]={input:[],output:[],ops:r},at.registerDevice(e,Ur.stream_ops)},stream_ops:{open(e){var r=Ur.ttys[e.node.rdev];if(!r)throw new at.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new at.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(l){throw new at.ErrnoError(29)}if(void 0===s&&0===a)throw new at.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.atime=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new at.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(i){throw new at.ErrnoError(29)}return n&&(e.node.mtime=e.node.ctime=Date.now()),a}},default_tty_ops:{get_char:e=>Lr(),put_char(e,r){null===r||10===r?(b(Le(e.output)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output?.length>0&&(b(Le(e.output)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(_(Le(e.output)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output?.length>0&&(_(Le(e.output)),e.output=[])}}},Hr=e=>{C()},Vr={ops_table:null,mount:e=>Vr.createNode(null,"/",16895,0),createNode(e,r,t,n){if(at.isBlkdev(t)||at.isFIFO(t))throw new at.ErrnoError(63);Vr.ops_table||={dir:{node:{getattr:Vr.node_ops.getattr,setattr:Vr.node_ops.setattr,lookup:Vr.node_ops.lookup,mknod:Vr.node_ops.mknod,rename:Vr.node_ops.rename,unlink:Vr.node_ops.unlink,rmdir:Vr.node_ops.rmdir,readdir:Vr.node_ops.readdir,symlink:Vr.node_ops.symlink},stream:{llseek:Vr.stream_ops.llseek}},file:{node:{getattr:Vr.node_ops.getattr,setattr:Vr.node_ops.setattr},stream:{llseek:Vr.stream_ops.llseek,read:Vr.stream_ops.read,write:Vr.stream_ops.write,mmap:Vr.stream_ops.mmap,msync:Vr.stream_ops.msync}},link:{node:{getattr:Vr.node_ops.getattr,setattr:Vr.node_ops.setattr,readlink:Vr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Vr.node_ops.getattr,setattr:Vr.node_ops.setattr},stream:at.chrdev_stream_ops}};var o=at.createNode(e,r,t,n);return at.isDir(o.mode)?(o.node_ops=Vr.ops_table.dir.node,o.stream_ops=Vr.ops_table.dir.stream,o.contents={}):at.isFile(o.mode)?(o.node_ops=Vr.ops_table.file.node,o.stream_ops=Vr.ops_table.file.stream,o.usedBytes=0,o.contents=Vr.emptyFileContents??=new Uint8Array(0)):at.isLink(o.mode)?(o.node_ops=Vr.ops_table.link.node,o.stream_ops=Vr.ops_table.link.stream):at.isChrdev(o.mode)&&(o.node_ops=Vr.ops_table.chrdev.node,o.stream_ops=Vr.ops_table.chrdev.stream),o.atime=o.mtime=o.ctime=Date.now(),e&&(e.contents[r]=o,e.atime=e.mtime=e.ctime=o.atime),o},getFileDataAsTypedArray:e=>e.contents.subarray(0,e.usedBytes),expandFileStorage(e,r){var t=e.contents.length;if(!(t>=r)){var n=1048576;r=Math.max(r,t*(t<n?2:1.125)>>>0),t&&(r=Math.max(r,256));var o=Vr.getFileDataAsTypedArray(e);e.contents=new Uint8Array(r),e.contents.set(o)}},resizeFileStorage(e,r){if(e.usedBytes!=r){var t=e.contents;e.contents=new Uint8Array(r),e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=at.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,at.isDir(e.mode)?r.size=4096:at.isFile(e.mode)?r.size=e.usedBytes:at.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.atime),r.mtime=new Date(e.mtime),r.ctime=new Date(e.ctime),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){for(const t of["mode","atime","mtime","ctime"])null!=r[t]&&(e[t]=r[t]);void 0!==r.size&&Vr.resizeFileStorage(e,r.size)},lookup(e,r){throw Vr.doesNotExistError||(Vr.doesNotExistError=new at.ErrnoError(44),Vr.doesNotExistError.stack="<generic error, no stack>"),Vr.doesNotExistError},mknod:(e,r,t,n)=>Vr.createNode(e,r,t,n),rename(e,r,t){var n;try{n=at.lookupNode(r,t)}catch(a){}if(n){if(at.isDir(e.mode))for(var o in n.contents)throw new at.ErrnoError(55);at.hashRemoveNode(n)}delete e.parent.contents[e.name],r.contents[t]=e,e.name=t,r.ctime=r.mtime=e.parent.ctime=e.parent.mtime=Date.now()},unlink(e,r){delete e.contents[r],e.ctime=e.mtime=Date.now()},rmdir(e,r){var t=at.lookupNode(e,r);for(var n in t.contents)throw new at.ErrnoError(55);delete e.contents[r],e.ctime=e.mtime=Date.now()},readdir:e=>[".","..",...Object.keys(e.contents)],symlink(e,r,t){var n=Vr.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!at.isLink(e.mode))throw new at.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);return r.set(a.subarray(o,o+i),t),i},write(e,r,t,n,o,a){if(r.buffer===p.buffer&&(a=!1),!n)return 0;var i=e.node;return i.mtime=i.ctime=Date.now(),a?(i.contents=r.subarray(t,t+n),i.usedBytes=n):0===i.usedBytes&&0===o?(i.contents=r.slice(t,t+n),i.usedBytes=n):(Vr.expandFileStorage(i,o+n),i.contents.set(r.subarray(t,t+n),o),i.usedBytes=Math.max(i.usedBytes,o+n)),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&at.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new at.ErrnoError(28);return n},mmap(e,r,t,n,o){if(!at.isFile(e.node.mode))throw new at.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==p.buffer){if(i=!0,!(a=Hr()))throw new at.ErrnoError(48);s&&((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),p.set(s,a))}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(Vr.stream_ops.write(e,r,0,n,t,!1),0)}},qr=e=>{if("string"!=typeof e)return e;var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r},Xr=e=>("string"==typeof e&&(e=Or(e)),e.subarray||(e=new Uint8Array(e)),e),Gr=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},Kr=async e=>{var t=await r(e);return new Uint8Array(t)},Yr=(...e)=>at.createDataFile(...e),Jr=0,Qr=null,Zr=e=>{if(Jr--,n.monitorRunDependencies?.(Jr),0==Jr&&Qr){var r=Qr;Qr=null,r()}},et=e=>{Jr++,n.monitorRunDependencies?.(Jr)},rt=[],tt=async(e,r)=>{for(var t of("undefined"!=typeof Browser&&Browser.init(),rt))if(t.canHandle(r))return t.handle(e,r);return e},nt=async(e,r,t,n,o,a,i,s)=>{var l=r?Wr.resolve(Br.join2(e,r)):e;et();try{var u=t;"string"==typeof t&&(u=await Kr(t)),u=await tt(u,l),s?.(),a||Yr(e,r,u,n,o,i)}finally{Zr()}},ot=(e,r,t,n,o,a,i,s,l,u)=>{nt(e,r,t,n,o,s,l,u).then(a).catch(i)},at={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,filesystems:null,syncFSRequests:0,ErrnoError:class{name="ErrnoError";constructor(e){this.errno=e}},FSStream:class{shared={};get object(){return this.node}set object(e){this.node=e}get isRead(){return 1!=(2097155&this.flags)}get isWrite(){return!!(2097155&this.flags)}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.id=at.nextInode++,this.name=r,this.mode=t,this.rdev=n,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return at.isDir(this.mode)}get isDevice(){return at.isChrdev(this.mode)}},lookupPath(e,r={}){if(!e)throw new at.ErrnoError(44);r.follow_mount??=!0,Br.isAbs(e)||(e=at.cwd()+"/"+e);e:for(var t=0;t<40;t++){for(var n=e.split("/").filter(e=>!!e),o=at.root,a="/",i=0;i<n.length;i++){var s=i===n.length-1;if(s&&r.parent)break;if("."!==n[i])if(".."!==n[i]){a=Br.join2(a,n[i]);try{o=at.lookupNode(o,n[i])}catch(u){if(44===u?.errno&&s&&r.noent_okay)return{path:a};throw u}if(!at.isMountpoint(o)||s&&!r.follow_mount||(o=o.mounted.root),at.isLink(o.mode)&&(!s||r.follow)){if(!o.node_ops.readlink)throw new at.ErrnoError(52);var l=o.node_ops.readlink(o);Br.isAbs(l)||(l=Br.dirname(a)+"/"+l),e=l+"/"+n.slice(i+1).join("/");continue e}}else{if(a=Br.dirname(a),at.isRoot(o)){e=a+"/"+n.slice(i+1).join("/"),t--;continue e}o=o.parent}}return{path:a,node:o}}throw new at.ErrnoError(32)},getPath(e){for(var r;;){if(at.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%at.nameTable.length},hashAddNode(e){var r=at.hashName(e.parent.id,e.name);e.name_next=at.nameTable[r],at.nameTable[r]=e},hashRemoveNode(e){var r=at.hashName(e.parent.id,e.name);if(at.nameTable[r]===e)at.nameTable[r]=e.name_next;else for(var t=at.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=at.mayLookup(e);if(t)throw new at.ErrnoError(t);for(var n=at.hashName(e.id,r),o=at.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return at.lookup(e,r)},createNode(e,r,t,n){var o=new at.FSNode(e,r,t,n);return at.hashAddNode(o),o},destroyNode(e){at.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>at.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){if(!at.isDir(e.mode))return 54;var r=at.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){if(!at.isDir(e.mode))return 54;try{at.lookupNode(e,r);return 20}catch(t){}return at.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=at.lookupNode(e,r)}catch(a){return a.errno}var o=at.nodePermissions(e,"wx");if(o)return o;if(t){if(!at.isDir(n.mode))return 54;if(at.isRoot(n)||at.getPath(n)===at.cwd())return 10}else if(at.isDir(n.mode))return 31;return 0},mayOpen(e,r){if(!e)return 44;if(at.isLink(e.mode))return 32;var t=at.flagsToPermissionString(r);return at.isDir(e.mode)&&("r"!==t||576&r)?31:at.nodePermissions(e,t)},checkOpExists(e,r){if(!e)throw new at.ErrnoError(r);return e},MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=at.MAX_OPEN_FDS;e++)if(!at.streams[e])return e;throw new at.ErrnoError(33)},getStreamChecked(e){var r=at.getStream(e);if(!r)throw new at.ErrnoError(8);return r},getStream:e=>at.streams[e],createStream:(e,r=-1)=>(e=Object.assign(new at.FSStream,e),-1==r&&(r=at.nextfd()),e.fd=r,at.streams[r]=e,e),closeStream(e){at.streams[e]=null},dupStream(e,r=-1){var t=at.createStream(e,r);return t.stream_ops?.dup?.(t),t},doSetAttr(e,r,t){var n=e?.stream_ops.setattr,o=n?e:r;n??=r.node_ops.setattr,at.checkOpExists(n,63);try{n(o,t)}catch(a){if(a instanceof RangeError)throw new at.ErrnoError(22);throw a}},chrdev_stream_ops:{open(e){var r=at.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open?.(e)},llseek(){throw new at.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){at.devices[e]={stream_ops:r}},getDevice:e=>at.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push(...n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),at.syncFSRequests++,at.syncFSRequests>1&&_(`warning: ${at.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=at.getMounts(at.root.mount),n=0;function o(e){return at.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}for(var i of t)i.type.syncfs?i.type.syncfs(i,e,a):a(null)},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&at.root)throw new at.ErrnoError(10);if(!o&&!a){var i=at.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,at.isMountpoint(n))throw new at.ErrnoError(10);if(!at.isDir(n.mode))throw new at.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,o?at.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(e){var r=at.lookupPath(e,{follow_mount:!1});if(!at.isMountpoint(r.node))throw new at.ErrnoError(28);var t=r.node,n=t.mounted,o=at.getMounts(n);for(var[a,i]of Object.entries(at.nameTable))for(;i;){var s=i.name_next;o.includes(i.mount)&&at.destroyNode(i),i=s}t.mounted=null;var l=t.mount.mounts.indexOf(n);t.mount.mounts.splice(l,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=at.lookupPath(e,{parent:!0}).node,o=Br.basename(e);if(!o)throw new at.ErrnoError(28);if("."===o||".."===o)throw new at.ErrnoError(20);var a=at.mayCreate(n,o);if(a)throw new at.ErrnoError(a);if(!n.node_ops.mknod)throw new at.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},statfs:e=>at.statfsNode(at.lookupPath(e,{follow:!0}).node),statfsStream:e=>at.statfsNode(e.node),statfsNode(e){var r={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:at.nextInode,ffree:at.nextInode-1,fsid:42,flags:2,namelen:255};return e.node_ops.statfs&&Object.assign(r,e.node_ops.statfs(e.mount.opts.root)),r},create:(e,r=438)=>(r&=4095,r|=32768,at.mknod(e,r,0)),mkdir:(e,r=511)=>(r&=1023,r|=16384,at.mknod(e,r,0)),mkdirTree(e,r){var t=e.split("/"),n="";for(var o of t)if(o){(n||Br.isAbs(e))&&(n+="/"),n+=o;try{at.mkdir(n,r)}catch(a){if(20!=a.errno)throw a}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,at.mknod(e,r,t)),symlink(e,r){if(!Wr.resolve(e))throw new at.ErrnoError(44);var t=at.lookupPath(r,{parent:!0}).node;if(!t)throw new at.ErrnoError(44);var n=Br.basename(r),o=at.mayCreate(t,n);if(o)throw new at.ErrnoError(o);if(!t.node_ops.symlink)throw new at.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=Br.dirname(e),a=Br.dirname(r),i=Br.basename(e),s=Br.basename(r);if(t=at.lookupPath(e,{parent:!0}).node,n=at.lookupPath(r,{parent:!0}).node,!t||!n)throw new at.ErrnoError(44);if(t.mount!==n.mount)throw new at.ErrnoError(75);var l,u=at.lookupNode(t,i),d=Wr.relative(e,a);if("."!==d.charAt(0))throw new at.ErrnoError(28);if("."!==(d=Wr.relative(r,o)).charAt(0))throw new at.ErrnoError(55);try{l=at.lookupNode(n,s)}catch(f){}if(u!==l){var c=at.isDir(u.mode),m=at.mayDelete(t,i,c);if(m)throw new at.ErrnoError(m);if(m=l?at.mayDelete(n,s,c):at.mayCreate(n,s))throw new at.ErrnoError(m);if(!t.node_ops.rename)throw new at.ErrnoError(63);if(at.isMountpoint(u)||l&&at.isMountpoint(l))throw new at.ErrnoError(10);if(n!==t&&(m=at.nodePermissions(t,"w")))throw new at.ErrnoError(m);at.hashRemoveNode(u);try{t.node_ops.rename(u,n,s),u.parent=n}catch(f){throw f}finally{at.hashAddNode(u)}}},rmdir(e){var r=at.lookupPath(e,{parent:!0}).node,t=Br.basename(e),n=at.lookupNode(r,t),o=at.mayDelete(r,t,!0);if(o)throw new at.ErrnoError(o);if(!r.node_ops.rmdir)throw new at.ErrnoError(63);if(at.isMountpoint(n))throw new at.ErrnoError(10);r.node_ops.rmdir(r,t),at.destroyNode(n)},readdir(e){var r=at.lookupPath(e,{follow:!0}).node;return at.checkOpExists(r.node_ops.readdir,54)(r)},unlink(e){var r=at.lookupPath(e,{parent:!0}).node;if(!r)throw new at.ErrnoError(44);var t=Br.basename(e),n=at.lookupNode(r,t),o=at.mayDelete(r,t,!1);if(o)throw new at.ErrnoError(o);if(!r.node_ops.unlink)throw new at.ErrnoError(63);if(at.isMountpoint(n))throw new at.ErrnoError(10);r.node_ops.unlink(r,t),at.destroyNode(n)},readlink(e){var r=at.lookupPath(e).node;if(!r)throw new at.ErrnoError(44);if(!r.node_ops.readlink)throw new at.ErrnoError(28);return r.node_ops.readlink(r)},stat(e,r){var t=at.lookupPath(e,{follow:!r}).node;return at.checkOpExists(t.node_ops.getattr,63)(t)},fstat(e){var r=at.getStreamChecked(e),t=r.node,n=r.stream_ops.getattr,o=n?r:t;return n??=t.node_ops.getattr,at.checkOpExists(n,63),n(o)},lstat:e=>at.stat(e,!0),doChmod(e,r,t,n){at.doSetAttr(e,r,{mode:4095&t|-4096&r.mode,ctime:Date.now(),dontFollow:n})},chmod(e,r,t){var n;"string"==typeof e?n=at.lookupPath(e,{follow:!t}).node:n=e;at.doChmod(null,n,r,t)},lchmod(e,r){at.chmod(e,r,!0)},fchmod(e,r){var t=at.getStreamChecked(e);at.doChmod(t,t.node,r,!1)},doChown(e,r,t){at.doSetAttr(e,r,{timestamp:Date.now(),dontFollow:t})},chown(e,r,t,n){var o;"string"==typeof e?o=at.lookupPath(e,{follow:!n}).node:o=e;at.doChown(null,o,n)},lchown(e,r,t){at.chown(e,r,t,!0)},fchown(e,r,t){var n=at.getStreamChecked(e);at.doChown(n,n.node,!1)},doTruncate(e,r,t){if(at.isDir(r.mode))throw new at.ErrnoError(31);if(!at.isFile(r.mode))throw new at.ErrnoError(28);var n=at.nodePermissions(r,"w");if(n)throw new at.ErrnoError(n);at.doSetAttr(e,r,{size:t,timestamp:Date.now()})},truncate(e,r){if(r<0)throw new at.ErrnoError(28);var t;"string"==typeof e?t=at.lookupPath(e,{follow:!0}).node:t=e;at.doTruncate(null,t,r)},ftruncate(e,r){var t=at.getStreamChecked(e);if(r<0||!(2097155&t.flags))throw new at.ErrnoError(28);at.doTruncate(t,t.node,r)},utime(e,r,t){var n=at.lookupPath(e,{follow:!0}).node;at.checkOpExists(n.node_ops.setattr,63)(n,{atime:r,mtime:t})},open(e,r,t=438){if(""===e)throw new at.ErrnoError(44);var n,o;if(t=64&(r=qr(r))?4095&t|32768:0,"object"==typeof e)n=e;else{o=e.endsWith("/");var a=at.lookupPath(e,{follow:!(131072&r),noent_okay:!0});n=a.node,e=a.path}var i=!1;if(64&r)if(n){if(128&r)throw new at.ErrnoError(20)}else{if(o)throw new at.ErrnoError(31);n=at.mknod(e,511|t,0),i=!0}if(!n)throw new at.ErrnoError(44);if(at.isChrdev(n.mode)&&(r&=-513),65536&r&&!at.isDir(n.mode))throw new at.ErrnoError(54);if(!i){var s=at.mayOpen(n,r);if(s)throw new at.ErrnoError(s)}512&r&&!i&&at.truncate(n,0),r&=-131713;var l=at.createStream({node:n,path:at.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return l.stream_ops.open&&l.stream_ops.open(l),i&&at.chmod(n,511&t),l},close(e){if(at.isClosed(e))throw new at.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(r){throw r}finally{at.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(at.isClosed(e))throw new at.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new at.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new at.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new at.ErrnoError(28);if(at.isClosed(e))throw new at.ErrnoError(8);if(1==(2097155&e.flags))throw new at.ErrnoError(8);if(at.isDir(e.node.mode))throw new at.ErrnoError(31);if(!e.stream_ops.read)throw new at.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new at.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new at.ErrnoError(28);if(at.isClosed(e))throw new at.ErrnoError(8);if(!(2097155&e.flags))throw new at.ErrnoError(8);if(at.isDir(e.node.mode))throw new at.ErrnoError(31);if(!e.stream_ops.write)throw new at.ErrnoError(28);e.seekable&&1024&e.flags&&at.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new at.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},mmap(e,r,t,n,o){if(2&n&&!(2&o)&&2!=(2097155&e.flags))throw new at.ErrnoError(2);if(1==(2097155&e.flags))throw new at.ErrnoError(2);if(!e.stream_ops.mmap)throw new at.ErrnoError(43);if(!r)throw new at.ErrnoError(28);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new at.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){r.flags=r.flags??0,r.encoding=r.encoding??"binary","utf8"!==r.encoding&&"binary"!==r.encoding&&C(`Invalid encoding type "${r.encoding}"`);var t=at.open(e,r.flags),n=at.stat(e).size,o=new Uint8Array(n);return at.read(t,o,0,n,0),"utf8"===r.encoding&&(o=Le(o)),at.close(t),o},writeFile(e,r,t={}){t.flags=t.flags??577;var n=at.open(e,t.flags,t.mode);r=Xr(r),at.write(n,r,0,r.byteLength,void 0,t.canOwn),at.close(n)},cwd:()=>at.currentPath,chdir(e){var r=at.lookupPath(e,{follow:!0});if(null===r.node)throw new at.ErrnoError(44);if(!at.isDir(r.node.mode))throw new at.ErrnoError(54);var t=at.nodePermissions(r.node,"x");if(t)throw new at.ErrnoError(t);at.currentPath=r.path},createDefaultDirectories(){at.mkdir("/tmp"),at.mkdir("/home"),at.mkdir("/home/web_user")},createDefaultDevices(){at.mkdir("/dev"),at.registerDevice(at.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n,llseek:()=>0}),at.mkdev("/dev/null",at.makedev(1,3)),Ur.register(at.makedev(5,0),Ur.default_tty_ops),Ur.register(at.makedev(6,0),Ur.default_tty1_ops),at.mkdev("/dev/tty",at.makedev(5,0)),at.mkdev("/dev/tty1",at.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(Ir(e),r=e.byteLength),e[--r]);at.createDevice("/dev","random",t),at.createDevice("/dev","urandom",t),at.mkdir("/dev/shm"),at.mkdir("/dev/shm/tmp")},createSpecialDirectories(){at.mkdir("/proc");var e=at.mkdir("/proc/self");at.mkdir("/proc/self/fd"),at.mount({mount(){var r=at.createNode(e,"fd",16895,73);return r.stream_ops={llseek:Vr.stream_ops.llseek},r.node_ops={lookup(e,r){var t=+r,n=at.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path},id:t+1};return o.parent=o,o},readdir:()=>Array.from(at.streams.entries()).filter(([e,r])=>r).map(([e,r])=>e.toString())},r}},{},"/proc/self/fd")},createStandardStreams(e,r,t){e?at.createDevice("/dev","stdin",e):at.symlink("/dev/tty","/dev/stdin"),r?at.createDevice("/dev","stdout",null,r):at.symlink("/dev/tty","/dev/stdout"),t?at.createDevice("/dev","stderr",null,t):at.symlink("/dev/tty1","/dev/stderr"),at.open("/dev/stdin",0),at.open("/dev/stdout",1),at.open("/dev/stderr",1)},staticInit(){at.nameTable=new Array(4096),at.mount(Vr,{},"/"),at.createDefaultDirectories(),at.createDefaultDevices(),at.createSpecialDirectories(),at.filesystems={MEMFS:Vr}},init(e,r,t){at.initialized=!0,e??=n.stdin,r??=n.stdout,t??=n.stderr,at.createStandardStreams(e,r,t)},quit(){for(var e of(at.initialized=!1,at.streams))e&&at.close(e)},findObject(e,r){var t=at.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=at.lookupPath(e,{follow:!r})).path}catch(o){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=at.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=Br.basename(e),n=at.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(o){t.error=o.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:at.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=Br.join2(e,a);try{at.mkdir(i)}catch(s){if(20!=s.errno)throw s}e=i}}return i},createFile(e,r,t,n,o){var a=Br.join2("string"==typeof e?e:at.getPath(e),r),i=Gr(n,o);return at.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:at.getPath(e),i=r?Br.join2(e,r):e);var s=Gr(n,o),l=at.create(i,s);if(t){t=Xr(t),at.chmod(l,146|s);var u=at.open(l,577);at.write(u,t,0,t.length,0,a),at.close(u),at.chmod(l,s)}},createDevice(e,r,t,n){var o=Br.join2("string"==typeof e?e:at.getPath(e),r),a=Gr(!!t,!!n);at.createDevice.major??=64;var i=at.makedev(at.createDevice.major++,0);return at.registerDevice(i,{open(e){e.seekable=!1},close(e){n?.buffer?.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var l;try{l=t()}catch(u){throw new at.ErrnoError(29)}if(void 0===l&&0===i)throw new at.ErrnoError(6);if(null==l)break;i++,r[n+s]=l}return i&&(e.node.atime=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(s){throw new at.ErrnoError(29)}return o&&(e.node.mtime=e.node.ctime=Date.now()),i}}),at.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if(globalThis.XMLHttpRequest)C("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");else try{e.contents=t(e.url)}catch(r){throw new at.ErrnoError(29)}},createLazyFile(e,r,t,n,o){class a{lengthKnown=!1;chunks=[];get(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}}setDataGetter(e){this.getter=e}cacheLength(){var e=new XMLHttpRequest;e.open("HEAD",t,!1),e.send(null),e.status>=200&&e.status<300||304===e.status||C("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=(e,r)=>{e>r&&C(`invalid range (${e}, ${r}) or no bytes requested!`),r>n-1&&C(`only ${n} bytes available! programmer error!`);var o=new XMLHttpRequest;return o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),o.status>=200&&o.status<300||304===o.status||C("Couldn't load "+t+". Status: "+o.status),void 0!==o.response?new Uint8Array(o.response||[]):Or(o.responseText??"")},l=this;l.setDataGetter(e=>{var r=e*i,t=(e+1)*i-1;return t=Math.min(t,n-1),void 0===l.chunks[e]&&(l.chunks[e]=s(r,t)),void 0===l.chunks[e]&&C("doXHR failed!"),l.chunks[e]}),!a&&n||(i=n=1,n=this.getter(0).length,i=n,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(globalThis.XMLHttpRequest){C("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc");var i={isDevice:!1,contents:new a}}else i={isDevice:!1,url:t};var s=at.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var l={};for(const[d,c]of Object.entries(s.stream_ops))l[d]=(...e)=>(at.forceLoadFile(s),c(...e));function u(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return l.read=(e,r,t,n,o)=>(at.forceLoadFile(s),u(e,r,t,n,o)),l.mmap=(e,r,t,n,o)=>{at.forceLoadFile(s);var a=Hr();if(!a)throw new at.ErrnoError(48);return u(e,p,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=l,s}},it={currentUmask:18,calculateAt(e,r,t){if(Br.isAbs(r))return r;var n;-100===e?n=at.cwd():n=it.getStreamFromFD(e).path;if(0==r.length){if(!t)throw new at.ErrnoError(44);return n}return n+"/"+r},writeStat(e,r){y[e>>2]=r.dev,y[e+4>>2]=r.mode,y[e+8>>2]=r.nlink,y[e+12>>2]=r.uid,y[e+16>>2]=r.gid,y[e+20>>2]=r.rdev,h[e+24>>3]=BigInt(r.size),f[e+32>>2]=4096,f[e+36>>2]=r.blocks;var t=r.atime.getTime(),n=r.mtime.getTime(),o=r.ctime.getTime();return h[e+40>>3]=BigInt(Math.floor(t/1e3)),y[e+48>>2]=t%1e3*1e3*1e3,h[e+56>>3]=BigInt(Math.floor(n/1e3)),y[e+64>>2]=n%1e3*1e3*1e3,h[e+72>>3]=BigInt(Math.floor(o/1e3)),y[e+80>>2]=o%1e3*1e3*1e3,h[e+88>>3]=BigInt(r.ino),0},writeStatFs(e,r){y[e+4>>2]=r.bsize,y[e+60>>2]=r.bsize,h[e+8>>3]=BigInt(r.blocks),h[e+16>>3]=BigInt(r.bfree),h[e+24>>3]=BigInt(r.bavail),h[e+32>>3]=BigInt(r.files),h[e+40>>3]=BigInt(r.ffree),y[e+48>>2]=r.fsid,y[e+64>>2]=r.flags,y[e+56>>2]=r.namelen},doMsync(e,r,t,n,o){if(!at.isFile(r.node.mode))throw new at.ErrnoError(43);if(2&n)return 0;var a=k.slice(e,e+t);at.msync(r,a,o,t,n)},getStreamFromFD:e=>at.getStreamChecked(e),varargs:void 0,getStr:e=>Ue(e)};function st(e){try{var r=it.getStreamFromFD(e);return at.close(r),0}catch(t){if(void 0===at||"ErrnoError"!==t.name)throw t;return t.errno}}var lt=(e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=y[r>>2],s=y[r+4>>2];r+=8;var l=at.read(e,p,i,s,n);if(l<0)return-1;if(o+=l,l<s)break}return o};function ut(e,r,t,n){try{var o=it.getStreamFromFD(e),a=lt(o,r,t);return y[n>>2]=a,0}catch(i){if(void 0===at||"ErrnoError"!==i.name)throw i;return i.errno}}function dt(e,r,t,n){r=Ar(r);try{if(isNaN(r))return 22;var o=it.getStreamFromFD(e);return at.llseek(o,r,t),h[n>>3]=BigInt(o.position),o.getdents&&0===r&&0===t&&(o.getdents=null),0}catch(a){if(void 0===at||"ErrnoError"!==a.name)throw a;return a.errno}}var ct=(e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=y[r>>2],s=y[r+4>>2];r+=8;var l=at.write(e,p,i,s,n);if(l<0)return-1;if(o+=l,l<s)break}return o};function mt(e,r,t,n){try{var o=it.getStreamFromFD(e),a=ct(o,r,t);return y[n>>2]=a,0}catch(i){if(void 0===at||"ErrnoError"!==i.name)throw i;return i.errno}}var ft,ht,pt,vt,wt,gt,yt=(e,r)=>{if(ft)for(var t=e;t<e+r;t++){var n=Pe(t);n&&ft.set(n,t)}},Et=e=>(ft||(ft=new WeakMap,yt(0,gt.length)),ft.get(e)||0),kt=[],bt=()=>kt.length?kt.pop():gt.grow(1),_t=(e,r)=>{gt.set(e,r),Fe[e]=gt.get(e)},Tt=e=>{const r=e.length;return[r%128|128,r>>7,...e]},At={i:127,p:127,j:126,f:125,d:124,e:111},Dt=e=>Tt(Array.from(e,e=>At[e])),Ft=(e,r)=>{var t=Uint8Array.of(0,97,115,109,1,0,0,0,1,...Tt([1,96,...Dt(r.slice(1)),...Dt("v"===r[0]?"":r[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),n=new WebAssembly.Module(t);return new WebAssembly.Instance(n,{e:{f:e}}).exports.f},Pt=(e,r)=>{var t=Et(e);if(t)return t;var n=bt();try{_t(n,e)}catch(_){if(!(_ instanceof TypeError))throw _;var o=Ft(e,r);_t(n,o)}return ft.set(e,n),n};if(at.createPreloadedFile=ot,at.preloadFile=nt,at.staticInit(),n.noExitRuntime&&n.noExitRuntime,n.preloadPlugins&&(rt=n.preloadPlugins),n.print&&(b=n.print),n.printErr&&(_=n.printErr),n.wasmBinary&&(l=n.wasmBinary),n.arguments&&n.arguments,n.thisProgram&&(o=n.thisProgram),n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.shift()();function St(e){ht=e.M,pt=n._malloc=e.O,vt=n._free=e.P,wt=e.K,gt=e.N}n.addFunction=Pt,n.UTF8ToString=Ue;var Ct,xt={c:H,E:V,n:re,r:ne,v:de,I:ce,G:we,u:ye,b:Ne,i:ze,d:Be,H:He,q:Qe,o:Ze,h:er,s:rr,g:tr,J:nr,j:cr,a:he,p:mr,m:fr,F:hr,e:pr,k:vr,l:wr,f:gr,w:yr,C:Dr,D:Cr,x:Nr,y:zr,z:st,A:ut,B:dt,t:mt};function Mt(){function e(){n.calledRun=!0,T||(P(),u?.(n),n.onRuntimeInitialized?.(),S())}Jr>0?Qr=Mt:(F(),Jr>0?Qr=Mt:n.setStatus?(n.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>n.setStatus(""),1),e()},1)):e())}return Ct=await $(),Mt(),A?n:new Promise((e,r)=>{u=e,d=r})}export{e as default};
2
+ async function r(r={}){var e,t=r,n="./this.program",a="",o="";function i(r){return t.locateFile?t.locateFile(r,o):o+r}try{o=new URL(".",a).href}catch{}e=async r=>{var e=await fetch(r,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)};var u,s,l,f,c,p,h,v,d,y,g,m,w,T,b=console.log.bind(console),A=console.error.bind(console),C=!1,W=!1;function F(){var r=$e.buffer;v=new Int8Array(r),c=new Int16Array(r),t.HEAPU8=T=new Uint8Array(r),g=new Uint16Array(r),p=new Int32Array(r),t.HEAPU32=m=new Uint32Array(r),d=new Float32Array(r),t.HEAPF64=y=new Float64Array(r),h=new BigInt64Array(r),w=new BigUint64Array(r)}function P(){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)H(t.preRun.shift());D(O)}function $(){W=!0,Xe.I()}function E(){if(t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;)k(t.postRun.shift());D(B)}function R(r){t.onAbort?.(r),A(r=`Aborted(${r})`),C=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw l?.(e),e}function x(){return t.locateFile?i("lyr3DMain.wasm"):new URL("lyr3DMain.wasm","").href}function _(r){if(r==f&&u)return new Uint8Array(u);throw"both async and sync fetching of the wasm failed"}async function I(r){if(!u)try{var t=await e(r);return new Uint8Array(t)}catch{}return _(r)}async function V(r,e){try{var t=await I(r);return await WebAssembly.instantiate(t,e)}catch(n){A(`failed to asynchronously prepare wasm: ${n}`),R(n)}}async function S(r,e,t){if(!r)try{var n=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,t)}catch(a){A(`wasm streaming compile failed: ${a}`),A("falling back to ArrayBuffer instantiation")}return V(e,t)}function U(){return{a:Ze}}async function M(){function r(r,e){return Qe(Xe=r.exports),F(),Xe}function e(e){return r(e.instance)}var n=U();return t.instantiateWasm?new Promise((e,a)=>{t.instantiateWasm(n,(t,n)=>{e(r(t))})}):(f??=x(),e(await S(u,f,n)))}var D=r=>{for(;r.length>0;)r.shift()(t)},B=[],k=r=>B.push(r),O=[],H=r=>O.push(r);class N{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){m[this.ptr+4>>2]=r}get_type(){return m[this.ptr+4>>2]}set_destructor(r){m[this.ptr+8>>2]=r}get_destructor(){return m[this.ptr+8>>2]}set_caught(r){r=r?1:0,v[this.ptr+12]=r}get_caught(){return 0!=v[this.ptr+12]}set_rethrown(r){r=r?1:0,v[this.ptr+13]=r}get_rethrown(){return 0!=v[this.ptr+13]}init(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)}set_adjusted_ptr(r){m[this.ptr+16>>2]=r}get_adjusted_ptr(){return m[this.ptr+16>>2]}}var j=(r,e,t)=>{new N(r).init(e,t),R()},L=()=>R(""),z={},G=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function Y(r){return this.fromWireType(m[r>>2])}var q={},J={},K={},Q=class extends Error{constructor(r){super(r),this.name="InternalError"}},X=r=>{throw new Q(r)},Z=(r,e,t)=>{function n(e){var n=t(e);n.length!==r.length&&X("Mismatched type converter count");for(var a=0;a<r.length;++a)ur(r[a],n[a])}r.forEach(r=>K[r]=e);var a=new Array(e.length),o=[],i=0;for(let[u,s]of e.entries())J.hasOwnProperty(s)?a[u]=J[s]:(o.push(s),q.hasOwnProperty(s)||(q[s]=[]),q[s].push(()=>{a[u]=J[s],++i===o.length&&n(a)}));0===o.length&&n(a)},rr=r=>{var e=z[r];delete z[r];var t=e.elements,n=t.length,a=t.map(r=>r.getterReturnType).concat(t.map(r=>r.setterArgumentType)),o=e.rawConstructor,i=e.rawDestructor;Z([r],a,r=>{for(const[e,a]of t.entries()){const t=r[e],o=a.getter,i=a.getterContext,u=r[e+n],s=a.setter,l=a.setterContext;a.read=r=>t.fromWireType(o(i,r)),a.write=(r,e)=>{var t=[];s(l,r,u.toWireType(t,e)),G(t)}}return[{name:e.name,fromWireType:r=>{for(var e=new Array(n),a=0;a<n;++a)e[a]=t[a].read(r);return i(r),e},toWireType:(r,a)=>{if(n!==a.length)throw new TypeError(`Incorrect number of tuple elements for ${e.name}: expected=${n}, actual=${a.length}`);for(var u=o(),s=0;s<n;++s)t[s].write(u,a[s]);return null!==r&&r.push(i,u),u},readValueFromPointer:Y,destructorFunction:i}]})},er={},tr=r=>{var e=er[r];delete er[r];var t=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(r=>r.getterReturnType).concat(a.map(r=>r.setterArgumentType));Z([r],o,r=>{var o={};for(var[i,u]of a.entries()){const e=r[i],t=u.getter,n=u.getterContext,s=r[i+a.length],l=u.setter,f=u.setterContext;o[u.fieldName]={read:r=>e.fromWireType(t(n,r)),write:(r,e)=>{var t=[];l(f,r,s.toWireType(t,e)),G(t)},optional:e.optional}}return[{name:e.name,fromWireType:r=>{var e={};for(var t in o)e[t]=o[t].read(r);return n(r),e},toWireType:(r,e)=>{for(var a in o)if(!(a in e)&&!o[a].optional)throw new TypeError(`Missing field: "${a}"`);var i=t();for(a in o)o[a].write(i,e[a]);return null!==r&&r.push(n,i),i},readValueFromPointer:Y,destructorFunction:n}]})},nr=r=>{for(var e="";;){var t=T[r++];if(!t)return e;e+=String.fromCharCode(t)}},ar=class extends Error{constructor(r){super(r),this.name="BindingError"}},or=r=>{throw new ar(r)};function ir(r,e,t={}){var n=e.name;if(r||or(`type "${n}" must have a positive integer typeid pointer`),J.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;or(`Cannot register type '${n}' twice`)}if(J[r]=e,delete K[r],q.hasOwnProperty(r)){var a=q[r];delete q[r],a.forEach(r=>r())}}function ur(r,e,t={}){return ir(r,e,t)}var sr=(r,e,t)=>{switch(e){case 1:return t?r=>v[r]:r=>T[r];case 2:return t?r=>c[r>>1]:r=>g[r>>1];case 4:return t?r=>p[r>>2]:r=>m[r>>2];case 8:return t?r=>h[r>>3]:r=>w[r>>3];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},lr=(r,e,t,n,a)=>{e=nr(e);const o=0n===n;let i=r=>r;if(o){const r=8*t;i=e=>BigInt.asUintN(r,e),a=i(a)}ur(r,{name:e,fromWireType:i,toWireType:(r,e)=>("number"==typeof e&&(e=BigInt(e)),e),readValueFromPointer:sr(e,t,!o),destructorFunction:null})},fr=(r,e,t,n)=>{ur(r,{name:e=nr(e),fromWireType:function(r){return!!r},toWireType:function(r,e){return e?t:n},readValueFromPointer:function(r){return this.fromWireType(T[r])},destructorFunction:null})},cr=[],pr=[0,1,,1,null,1,!0,1,!1,1],hr=r=>{r>9&&0===--pr[r+1]&&(pr[r]=void 0,cr.push(r))},vr={toValue:r=>(r||or(`Cannot use deleted val. handle = ${r}`),pr[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=cr.pop()||pr.length;return pr[e]=r,pr[e+1]=1,e}}}},dr={name:"emscripten::val",fromWireType:r=>{var e=vr.toValue(r);return hr(r),e},toWireType:(r,e)=>vr.toHandle(e),readValueFromPointer:Y,destructorFunction:null},yr=r=>ur(r,dr),gr=(r,e)=>{switch(e){case 4:return function(r){return this.fromWireType(d[r>>2])};case 8:return function(r){return this.fromWireType(y[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},mr=(r,e,t)=>{ur(r,{name:e=nr(e),fromWireType:r=>r,toWireType:(r,e)=>e,readValueFromPointer:gr(e,t),destructorFunction:null})},wr=(r,e)=>Object.defineProperty(e,"name",{value:r});function Tr(r){for(var e=1;e<r.length;++e)if(null!==r[e]&&void 0===r[e].destructorFunction)return!0;return!1}function br(r,e,t,n,a,o){var i=e.length;i<2&&or("argTypes array size mismatch! Must at least get return value and 'this' types!"),e[1];var u=Tr(e),s=!e[0].isVoid,l=i-2,f=new Array(l),c=[],p=[];return wr(r,function(...r){var t;p.length=0,c.length=1,c[0]=a;for(var o=0;o<l;++o)f[o]=e[o+2].toWireType(p,r[o]),c.push(f[o]);function i(r){if(u)G(p);else for(var n=2;n<e.length;n++){var a=1===n?t:f[n-2];null!==e[n].destructorFunction&&e[n].destructorFunction(a)}if(s)return e[0].fromWireType(r)}return i(n(...c))})}var Ar=(r,e,t)=>{if(void 0===r[e].overloadTable){var n=r[e];r[e]=function(...n){return r[e].overloadTable.hasOwnProperty(n.length)||or(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[n.length].apply(this,n)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},Cr=(r,e,n)=>{t.hasOwnProperty(r)?((void 0===n||void 0!==t[r].overloadTable&&void 0!==t[r].overloadTable[n])&&or(`Cannot register public name '${r}' twice`),Ar(t,r,r),t[r].overloadTable.hasOwnProperty(n)&&or(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),t[r].overloadTable[n]=e):(t[r]=e,t[r].argCount=n)},Wr=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(m[e+4*n>>2]);return t},Fr=(r,e,n)=>{t.hasOwnProperty(r)||X("Replacing nonexistent public symbol"),void 0!==t[r].overloadTable&&void 0!==n?t[r].overloadTable[n]=e:(t[r]=e,t[r].argCount=n)},Pr=[],$r=r=>{var e=Pr[r];return e||(Pr[r]=e=Ee.get(r)),e},Er=(r,e,t=!1)=>{function n(){return $r(e)}r=nr(r);var a=n();return"function"!=typeof a&&or(`unknown function pointer with signature ${r}: ${e}`),a};class Rr extends Error{}var xr=r=>{var e=We(r),t=nr(e);return Pe(e),t},_r=(r,e)=>{var t=[],n={};function a(r){n[r]||J[r]||(K[r]?K[r].forEach(a):(t.push(r),n[r]=!0))}throw e.forEach(a),new Rr(`${r}: `+t.map(xr).join([", "]))},Ir=r=>{const e=(r=r.trim()).indexOf("(");return-1===e?r:r.slice(0,e)},Vr=(r,e,t,n,a,o,i,u)=>{var s=Wr(e,t);r=nr(r),r=Ir(r),a=Er(n,a,i),Cr(r,function(){_r(`Cannot call ${r} due to unbound types`,s)},e-1),Z([],s,t=>{var n=[t[0],null].concat(t.slice(1));return Fr(r,br(r,n,null,a,o),e-1),[]})},Sr=(r,e,t,n,a)=>{e=nr(e);let o=r=>r;if(0===n){var i=32-8*t;o=r=>r<<i>>>i,a=o(a)}ur(r,{name:e,fromWireType:o,toWireType:(r,e)=>e,readValueFromPointer:sr(e,t,0!==n),destructorFunction:null})},Ur=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][e];function a(r){var e=m[r>>2],t=m[r+4>>2];return new n(v.buffer,t,e)}ur(r,{name:t=nr(t),fromWireType:a,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},Mr=(r,e,t,n)=>{if(!(n>0))return 0;for(var a=t,o=t+n-1,i=0;i<r.length;++i){var u=r.codePointAt(i);if(u<=127){if(t>=o)break;e[t++]=u}else if(u<=2047){if(t+1>=o)break;e[t++]=192|u>>6,e[t++]=128|63&u}else if(u<=65535){if(t+2>=o)break;e[t++]=224|u>>12,e[t++]=128|u>>6&63,e[t++]=128|63&u}else{if(t+3>=o)break;e[t++]=240|u>>18,e[t++]=128|u>>12&63,e[t++]=128|u>>6&63,e[t++]=128|63&u,i++}}return e[t]=0,t-a},Dr=(r,e,t)=>Mr(r,T,e,t),Br=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},kr=globalThis.TextDecoder&&new TextDecoder,Or=(r,e,t,n)=>{var a=e+t;if(n)return a;for(;r[e]&&!(e>=a);)++e;return e},Hr=(r,e=0,t,n)=>{var a=Or(r,e,t,n);if(a-e>16&&r.buffer&&kr)return kr.decode(r.subarray(e,a));for(var o="";e<a;){var i=r[e++];if(128&i){var u=63&r[e++];if(192!=(224&i)){var s=63&r[e++];if((i=224==(240&i)?(15&i)<<12|u<<6|s:(7&i)<<18|u<<12|s<<6|63&r[e++])<65536)o+=String.fromCharCode(i);else{var l=i-65536;o+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else o+=String.fromCharCode((31&i)<<6|u)}else o+=String.fromCharCode(i)}return o},Nr=(r,e,t)=>r?Hr(T,r,e,t):"",jr=(r,e)=>{ur(r,{name:e=nr(e),fromWireType(r){var e,t=m[r>>2];return e=Nr(r+4,t,!0),Pe(r),e},toWireType(r,e){var t;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var n="string"==typeof e;n||ArrayBuffer.isView(e)&&1==e.BYTES_PER_ELEMENT||or("Cannot pass non-string to std::string"),t=n?Br(e):e.length;var a=Fe(4+t+1),o=a+4;return m[a>>2]=t,n?Dr(e,o,t+1):T.set(e,o),null!==r&&r.push(Pe,a),a},readValueFromPointer:Y,destructorFunction(r){Pe(r)}})},Lr=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,zr=(r,e,t)=>{var n=r>>1,a=Or(g,n,e/2,t);if(a-n>16&&Lr)return Lr.decode(g.subarray(n,a));for(var o="",i=n;i<a;++i){var u=g[i];o+=String.fromCharCode(u)}return o},Gr=(r,e,t)=>{if(t??=2147483647,t<2)return 0;for(var n=e,a=(t-=2)<2*r.length?t/2:r.length,o=0;o<a;++o){var i=r.charCodeAt(o);c[e>>1]=i,e+=2}return c[e>>1]=0,e-n},Yr=r=>2*r.length,qr=(r,e,t)=>{for(var n="",a=r>>2,o=0;!(o>=e/4);o++){var i=m[a+o];if(!i&&!t)break;n+=String.fromCodePoint(i)}return n},Jr=(r,e,t)=>{if(t??=2147483647,t<4)return 0;for(var n=e,a=n+t-4,o=0;o<r.length;++o){var i=r.codePointAt(o);if(i>65535&&o++,p[e>>2]=i,(e+=4)+4>a)break}return p[e>>2]=0,e-n},Kr=r=>{for(var e=0,t=0;t<r.length;++t){r.codePointAt(t)>65535&&t++,e+=4}return e},Qr=(r,e,t)=>{var n,a,o;t=nr(t),2===e?(n=zr,a=Gr,o=Yr):(n=qr,a=Jr,o=Kr),ur(r,{name:t,fromWireType:r=>{var t=m[r>>2],a=n(r+4,t*e,!0);return Pe(r),a},toWireType:(r,n)=>{"string"!=typeof n&&or(`Cannot pass non-string to C++ string type ${t}`);var i=o(n),u=Fe(4+i+e);return m[u>>2]=i/e,a(n,u+4,i+e),null!==r&&r.push(Pe,u),u},readValueFromPointer:Y,destructorFunction(r){Pe(r)}})},Xr=(r,e,t,n,a,o)=>{z[r]={name:nr(e),rawConstructor:Er(t,n),rawDestructor:Er(a,o),elements:[]}},Zr=(r,e,t,n,a,o,i,u,s)=>{z[r].elements.push({getterReturnType:e,getter:Er(t,n),getterContext:a,setterArgumentType:o,setter:Er(i,u),setterContext:s})},re=(r,e,t,n,a,o)=>{er[r]={name:nr(e),rawConstructor:Er(t,n),rawDestructor:Er(a,o),fields:[]}},ee=(r,e,t,n,a,o,i,u,s,l)=>{er[r].fields.push({fieldName:nr(e),getterReturnType:t,getter:Er(n,a),getterContext:o,setterArgumentType:i,setter:Er(u,s),setterContext:l})},te=(r,e)=>{ur(r,{isVoid:!0,name:e=nr(e),fromWireType:()=>{},toWireType:(r,e)=>{}})},ne=[],ae=r=>{var e=ne.length;return ne.push(r),e},oe=(r,e)=>{var t=J[r];return void 0===t&&or(`${e} has unknown type ${xr(r)}`),t},ie=(r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=oe(m[e+4*n>>2],`parameter ${n}`);return t},ue=(r,e,t)=>{var n=[],a=r(n,t);return n.length&&(m[e>>2]=vr.toHandle(n)),a},se={},le=r=>{var e=se[r];return void 0===e?nr(r):e},fe=(r,e,t)=>{var n=8,[a,...o]=ie(r,e),i=a.toWireType.bind(a),u=o.map(r=>r.readValueFromPointer.bind(r));r--;var s=new Array(r),l=(e,a,o,l)=>{for(var f,c=0,p=0;p<r;++p)s[p]=u[p](l+c),c+=n;switch(t){case 0:f=vr.toValue(e).apply(null,s);break;case 2:f=Reflect.construct(vr.toValue(e),s);break;case 3:f=s[0];break;case 1:f=vr.toValue(e)[le(a)](...s)}return ue(i,o,f)},f=`methodCaller<(${o.map(r=>r.name)}) => ${a.name}>`;return ae(wr(f,l))},ce=r=>{r>9&&(pr[r+1]+=1)},pe=(r,e,t,n,a)=>ne[r](e,t,n,a),he=()=>vr.toHandle([]),ve=r=>vr.toHandle(le(r)),de=()=>vr.toHandle({}),ye=r=>{var e=vr.toValue(r);G(e),hr(r)},ge=(r,e,t)=>{r=vr.toValue(r),e=vr.toValue(e),t=vr.toValue(t),r[e]=t},me=(r,e,t,n)=>{var a=(new Date).getFullYear(),o=new Date(a,0,1),i=new Date(a,6,1),u=o.getTimezoneOffset(),s=i.getTimezoneOffset(),l=Math.max(u,s);m[r>>2]=60*l,p[e>>2]=Number(u!=s);var f=r=>{var e=r>=0?"-":"+",t=Math.abs(r);return`UTC${e}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`},c=f(u),h=f(s);s<u?(Dr(c,t,17),Dr(h,n,17)):(Dr(c,n,17),Dr(h,t,17))},we=()=>performance.now(),Te=()=>Date.now(),be=r=>r>=0&&r<=3;function Ae(r,e,t){if(!be(r))return 28;var n;n=0===r?Te():we();var a=Math.round(1e3*n*1e3);return h[t>>3]=BigInt(a),0}var Ce,We,Fe,Pe,$e,Ee,Re=()=>2147483648,xe=(r,e)=>Math.ceil(r/e)*e,_e=r=>{var e=(r-$e.buffer.byteLength+65535)/65536|0;try{return $e.grow(e),F(),1}catch(t){}},Ie=r=>{var e=T.length;r>>>=0;var t=Re();if(r>t)return!1;for(var n=1;n<=4;n*=2){var a=e*(1+.2/n);a=Math.min(a,r+100663296);var o=Math.min(t,xe(Math.max(r,a),65536));if(_e(o))return!0}return!1},Ve={},Se=()=>n,Ue=()=>{if(!Ue.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:Se()};for(var e in Ve)void 0===Ve[e]?delete r[e]:r[e]=Ve[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);Ue.strings=t}return Ue.strings},Me=(r,e)=>{var t=0,n=0;for(var a of Ue()){var o=e+t;m[r+n>>2]=o,t+=Dr(a,o,1/0)+1,n+=4}return 0},De=(r,e)=>{var t=Ue();m[r>>2]=t.length;var n=0;for(var a of t)n+=Br(a)+1;return m[e>>2]=n,0},Be=[null,[],[]],ke=(r,e)=>{var t=Be[r];0===e||10===e?((1===r?b:A)(Hr(t)),t.length=0):t.push(e)},Oe=(r,e,t,n)=>{for(var a=0,o=0;o<t;o++){var i=m[e>>2],u=m[e+4>>2];e+=8;for(var s=0;s<u;s++)ke(r,T[i+s]);a+=u}return m[n>>2]=a,0},He=(r,e)=>{if(Ce)for(var t=r;t<r+e;t++){var n=$r(t);n&&Ce.set(n,t)}},Ne=r=>(Ce||(Ce=new WeakMap,He(0,Ee.length)),Ce.get(r)||0),je=[],Le=()=>je.length?je.pop():Ee.grow(1),ze=(r,e)=>{Ee.set(r,e),Pr[r]=Ee.get(r)},Ge=r=>{const e=r.length;return[e%128|128,e>>7,...r]},Ye={i:127,p:127,j:126,f:125,d:124,e:111},qe=r=>Ge(Array.from(r,r=>Ye[r])),Je=(r,e)=>{var t=Uint8Array.of(0,97,115,109,1,0,0,0,1,...Ge([1,96,...qe(e.slice(1)),...qe("v"===e[0]?"":e[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),n=new WebAssembly.Module(t);return new WebAssembly.Instance(n,{e:{f:r}}).exports.f},Ke=(r,e)=>{var t=Ne(r);if(t)return t;var n=Le();try{ze(n,r)}catch(A){if(!(A instanceof TypeError))throw A;var a=Je(r,e);ze(n,a)}return Ce.set(r,n),n};if(t.noExitRuntime&&t.noExitRuntime,t.print&&(b=t.print),t.printErr&&(A=t.printErr),t.wasmBinary&&(u=t.wasmBinary),t.arguments&&t.arguments,t.thisProgram&&(n=t.thisProgram),t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.shift()();function Qe(r){We=r.J,Fe=t._malloc=r.L,Pe=t._free=r.M,$e=r.H,Ee=r.K}t.addFunction=Ke,t.UTF8ToString=Nr;var Xe,Ze={c:j,B:L,n:rr,r:tr,v:lr,F:fr,D:yr,u:mr,b:Vr,i:Sr,d:Ur,E:jr,q:Qr,o:Xr,h:Zr,s:re,g:ee,G:te,j:fe,a:hr,p:ce,m:pe,C:he,e:ve,k:de,l:ye,f:ge,w:me,z:Ae,A:Ie,x:Me,y:De,t:Oe};function rt(){function r(){t.calledRun=!0,C||($(),s?.(t),t.onRuntimeInitialized?.(),E())}P(),t.setStatus?(t.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>t.setStatus(""),1),r()},1)):r()}return Xe=await M(),rt(),W?t:new Promise((r,e)=>{s=r,l=e})}export{r as default};
package/config.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.30";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
2
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.32";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
package/core/has.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const e=globalThis,a={...e.esriConfig?.has};function has(d){return"function"==typeof a[d]?a[d]=a[d](e):a[d]}has.add=(e,d,r,t)=>{(t||void 0===a[e])&&(a[e]=d),r&&has(e)},has.cache=a,has.add("big-integer-warning-enabled",!0),has.add("esri-deprecation-warnings",!0),has.add("esri-tests-disable-screenshots",!1),has.add("esri-tests-use-full-window",!1),has.add("esri-tests-post-to-influx",!0),has.add("esri-cim-animations-enable-status","enabled"),has.add("esri-cim-animations-spotlight",!1),has.add("esri-cim-animations-freeze-time",!1),(()=>{has.add("host-webworker",void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope);const a="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",a),has.add("host-node",!("object"!=typeof e.process||!e.process.versions?.node||!e.process.versions.v8)),has.add("dom",a),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,r=parseFloat(d);if(has.add("wp",parseFloat(a.split("Windows Phone")[1])||void 0),has.add("msapp",parseFloat(a.split("MSAppHost/")[1])||void 0),has.add("khtml",d.includes("Konqueror")?r:void 0),has.add("edge",parseFloat(a.split("Edge/")[1])||void 0),has.add("opr",parseFloat(a.split("OPR/")[1])||void 0),has.add("webkit",!has("wp")&&!has("edge")&&parseFloat(a.split("WebKit/")[1])||void 0),has.add("chrome",!has("edge")&&!has("opr")&&parseFloat(a.split("Chrome/")[1])||void 0),has.add("android",!has("wp")&&parseFloat(a.split("Android ")[1])||void 0),has.add("safari",!d.includes("Safari")||has("wp")||has("chrome")||has("android")||has("edge")||has("opr")?void 0:parseFloat(d.split("Version/")[1])),has.add("mac",d.includes("Macintosh")),!has("wp")&&/(iPhone|iPod|iPad)/.test(a)){const e=RegExp.$1.replace(/P/,"p"),d=/OS ([\d_]+)/.test(a)?RegExp.$1:"1",r=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,r),has.add("ios",r)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",r),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(e.navigator){const e=navigator.userAgent,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),d=/iPhone/i.test(e);a&&has.add("esri-mobile",a),d&&has.add("esri-iPhone",d),has.add("esri-geolocation",!!navigator.geolocation)}has.add("esri-wasm","WebAssembly"in e),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",()=>{const a="SharedArrayBuffer"in e,d=!1===e.crossOriginIsolated;return a&&!d}),has.add("wasm-simd",()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))}),has.add("esri-atomics","Atomics"in e),has.add("esri-workers","Worker"in e),has.add("web-feat:cache","caches"in e),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("min-workers-pool-size",2),has.add("max-workers-pool-size",has("esri-mobile")?3:8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-hybrid-tile-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-initial-tolerance",0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-multipoint-min-threshold",2e4),has.add("featurelayer-snapshot-multipoint-max-threshold",1e5),has.add("featurelayer-snapshot-polygon-min-threshold",2e3),has.add("featurelayer-snapshot-polygon-max-threshold",2e3),has.add("featurelayer-snapshot-polyline-min-threshold",2e3),has.add("featurelayer-snapshot-polyline-max-threshold",2e3),has.add("featurelayer-snapshot-max-vertex-count",25e4),has.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled",!0),has.add("featurelayer-snapshot-concurrency",4),has.add("featurelayer-snapshot-allow-editable",!1),has.add("featurelayer-snapshot-coverage",.1),has.add("featurelayer-query-max-depth",4),has.add("featurelayer-query-max-page-size",8e3),has.add("featurelayer-query-pausing-enabled",!1),has.add("featurelayer-query-tile-concurrency",4),has.add("featurelayer-query-tile-max-features",6e5),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("featurelayer-pbf-true-curves",!0),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),has.add("featurelayer-relative-time-queries-enabled",!0),has.add("featurelayer-relative-time-queries-bin-window-public",1),has.add("featurelayer-relative-time-queries-bin-window-private",60),has.add("parquetlayer-full-query-feature-count",5e5),has.add("parquetlayer-persistence-enabled",!0),has.add("parquetlayer-cache-enabled",!0),has.add("mapview-transitions-duration",200),has.add("mapview-essential-goto-duration",200),has.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),has.add("mapserver-pbf-version-support",10.81),has.add("mapservice-popup-identify-max-tolerance",20),has.add("request-queue-concurrency-global",64),has.add("request-queue-concurrency-hosted",16),has.add("request-queue-concurrency-non-hosted",16),has.add("curve-densification-coarse-segments",128),has.add("curve-densification-max-segments",2e3),has.add("curve-densification-min-segments",3),has.add("curve-densification-pixel-deviation",.5),has.add("view-readyState-waiting-delay",1e3),has.add("gradient-depth-bias",.01),has.add("gradient-depth-epsilon",1e-8),has.add("enable-feature:analysis-drawtool-line-of-sight",!1),has.add("enable-feature:analysis-drawtool-line-of-sight-placement-visuals",!1),has.add("enable-feature:esri-compress-textures",!0),has.add("enable-feature:analysis-new-viewshed-tool",!1),has.add("enable-feature:basemap-groundlayers",!0),has.add("enable-feature:im-shading",!0),has.add("enable-feature:im-vertex-normals",!0),!has("host-webworker")&&has("host-browser")&&(has.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),has.add("esri-url-encodes-apostrophe",()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")}))})();export{has as default};
2
+ const e=globalThis,a={...e.esriConfig?.has};function has(d){return"function"==typeof a[d]?a[d]=a[d](e):a[d]}has.add=(e,d,r,t)=>{(t||void 0===a[e])&&(a[e]=d),r&&has(e)},has.cache=a,has.add("big-integer-warning-enabled",!0),has.add("esri-deprecation-warnings",!0),has.add("esri-tests-disable-screenshots",!1),has.add("esri-tests-use-full-window",!1),has.add("esri-tests-post-to-influx",!0),has.add("esri-cim-animations-enable-status","enabled"),has.add("esri-cim-animations-spotlight",!1),has.add("esri-cim-animations-freeze-time",!1),(()=>{has.add("host-webworker",void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope);const a="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",a),has.add("host-node",!("object"!=typeof e.process||!e.process.versions?.node||!e.process.versions.v8)),has.add("dom",a),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,r=parseFloat(d);if(has.add("wp",parseFloat(a.split("Windows Phone")[1])||void 0),has.add("msapp",parseFloat(a.split("MSAppHost/")[1])||void 0),has.add("khtml",d.includes("Konqueror")?r:void 0),has.add("edge",parseFloat(a.split("Edge/")[1])||void 0),has.add("opr",parseFloat(a.split("OPR/")[1])||void 0),has.add("webkit",!has("wp")&&!has("edge")&&parseFloat(a.split("WebKit/")[1])||void 0),has.add("chrome",!has("edge")&&!has("opr")&&parseFloat(a.split("Chrome/")[1])||void 0),has.add("android",!has("wp")&&parseFloat(a.split("Android ")[1])||void 0),has.add("safari",!d.includes("Safari")||has("wp")||has("chrome")||has("android")||has("edge")||has("opr")?void 0:parseFloat(d.split("Version/")[1])),has.add("mac",d.includes("Macintosh")),!has("wp")&&/(iPhone|iPod|iPad)/.test(a)){const e=RegExp.$1.replace(/P/,"p"),d=/OS ([\d_]+)/.test(a)?RegExp.$1:"1",r=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,r),has.add("ios",r)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",r),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(e.navigator){const e=navigator.userAgent,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),d=/iPhone/i.test(e);a&&has.add("esri-mobile",a),d&&has.add("esri-iPhone",d),has.add("esri-geolocation",!!navigator.geolocation)}has.add("esri-wasm","WebAssembly"in e),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",()=>{const a="SharedArrayBuffer"in e,d=!1===e.crossOriginIsolated;return a&&!d}),has.add("wasm-simd",()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))}),has.add("esri-atomics","Atomics"in e),has.add("esri-workers","Worker"in e),has.add("web-feat:cache","caches"in e),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("min-workers-pool-size",2),has.add("max-workers-pool-size",has("esri-mobile")?3:8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-hybrid-tile-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-initial-tolerance",0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-multipoint-min-threshold",2e4),has.add("featurelayer-snapshot-multipoint-max-threshold",1e5),has.add("featurelayer-snapshot-polygon-min-threshold",2e3),has.add("featurelayer-snapshot-polygon-max-threshold",2e3),has.add("featurelayer-snapshot-polyline-min-threshold",2e3),has.add("featurelayer-snapshot-polyline-max-threshold",2e3),has.add("featurelayer-snapshot-max-vertex-count",25e4),has.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled",!0),has.add("featurelayer-snapshot-concurrency",4),has.add("featurelayer-snapshot-allow-editable",!1),has.add("featurelayer-snapshot-coverage",.1),has.add("featurelayer-query-max-depth",4),has.add("featurelayer-query-max-page-size",8e3),has.add("featurelayer-query-pausing-enabled",!1),has.add("featurelayer-query-tile-concurrency",4),has.add("featurelayer-query-tile-max-features",6e5),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("featurelayer-pbf-true-curves",!0),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),has.add("featurelayer-relative-time-queries-enabled",!0),has.add("featurelayer-relative-time-queries-bin-window-public",1),has.add("featurelayer-relative-time-queries-bin-window-private",60),has.add("parquetlayer-full-query-feature-count",5e5),has.add("parquetlayer-persistence-enabled",!0),has.add("parquetlayer-cache-enabled",!0),has.add("parquetlayer-legacy-field-overrides-enabled",!1),has.add("mapview-transitions-duration",200),has.add("mapview-essential-goto-duration",200),has.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),has.add("mapserver-pbf-version-support",10.81),has.add("mapservice-popup-identify-max-tolerance",20),has.add("request-queue-concurrency-global",64),has.add("request-queue-concurrency-hosted",16),has.add("request-queue-concurrency-non-hosted",16),has.add("curve-densification-coarse-segments",128),has.add("curve-densification-max-segments",2e3),has.add("curve-densification-min-segments",3),has.add("curve-densification-pixel-deviation",.5),has.add("view-readyState-waiting-delay",1e3),has.add("gradient-depth-bias",.01),has.add("gradient-depth-epsilon",1e-8),has.add("enable-feature:analysis-drawtool-line-of-sight",!1),has.add("enable-feature:analysis-drawtool-line-of-sight-placement-visuals",!1),has.add("enable-feature:esri-compress-textures",!0),has.add("enable-feature:analysis-new-viewshed-tool",!1),has.add("enable-feature:basemap-groundlayers",!0),has.add("enable-feature:im-shading",!0),has.add("enable-feature:im-vertex-normals",!0),!has("host-webworker")&&has("host-browser")&&(has.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),has.add("esri-url-encodes-apostrophe",()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")}))})();export{has as default};
@@ -23,11 +23,11 @@ import type AnnotationFeatureSublayer from "../layers/support/AnnotationFeatureS
23
23
  * });
24
24
  */
25
25
  export default class AnnotationFeatureGraphicOrigin extends GraphicOrigin {
26
- constructor(sublayer: AnnotationFeatureSublayer);
26
+ constructor(layer: AnnotationFeatureLayer, sublayer: AnnotationFeatureSublayer | null);
27
27
  /** A layer from which a graphic originates. */
28
- get layer(): AnnotationFeatureLayer;
28
+ readonly layer: AnnotationFeatureLayer;
29
29
  /** The [AnnotationFeatureSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AnnotationFeatureSublayer/) from which a graphic originates. */
30
- readonly sublayer: AnnotationFeatureSublayer;
30
+ readonly sublayer: AnnotationFeatureSublayer | null;
31
31
  /**
32
32
  * Indicates the type of layer the graphic originated from.
33
33
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{idFieldsProviderSymbol as r}from"./getIdFieldsProvider.js";import{popupProviderSymbol as t}from"./getPopupProvider.js";import{getSliceableContainerSymbol as e}from"./getSliceableContainer.js";import i from"./GraphicOrigin.js";import{isAnnotationFeatureGraphicOriginSymbol as s}from"./isAnnotationFeatureGraphicOrigin.js";var a;class o extends i{get[(a=s,t)](){return this.layer}get[r](){return this.layer}get[e](){return this.layer}constructor(r){super(),this[a]=!0,this.type="annotation-feature",this.sublayer=r}get layer(){return this.sublayer.parent}get id(){return`${this.layer.id}:__${this.sublayer.subtypeCode}__`}}export{o as default};
2
+ import{idFieldsProviderSymbol as r}from"./getIdFieldsProvider.js";import{popupProviderSymbol as t}from"./getPopupProvider.js";import{getSliceableContainerSymbol as e}from"./getSliceableContainer.js";import i from"./GraphicOrigin.js";import{isAnnotationFeatureGraphicOriginSymbol as s}from"./isAnnotationFeatureGraphicOrigin.js";var o;class a extends i{get[(o=s,t)](){return this.layer}get[r](){return this.layer}get[e](){return this.layer}constructor(r,t){super(),this[o]=!0,this.type="annotation-feature",this.layer=r,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer?.subtypeCode??null}__`}}export{a as default};
@@ -1,4 +1,7 @@
1
- /** @since 5.0 */
1
+ /**
2
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
3
+ * @since 5.0
4
+ */
2
5
  export type MessageBundleLocale = "ar" | "bg" | "bs" | "ca" | "cs" | "da" | "de" | "el" | "en" | "es" | "et" | "fi" | "fr" | "he" | "hr" | "hu" | "id" | "it" | "ja" | "ko" | "lt" | "lv" | "nb" | "nl" | "no" | "nn" | "pl" | "pt" | "pt-BR" | "pt-PT" | "ro" | "ru" | "sk" | "sl" | "sr" | "sv" | "th" | "tr" | "uk" | "vi" | "zh" | "zh-CN" | "zh-HK" | "zh-TW";
3
6
 
4
7
  /**
@@ -6,6 +9,7 @@ export type MessageBundleLocale = "ar" | "bg" | "bs" | "ca" | "cs" | "da" | "de"
6
9
  * It must be registered in `intl` using [registerMessageBundleLoader()](https://developers.arcgis.com/javascript/latest/references/core/intl/#registerMessageBundleLoader).
7
10
  * When loading message bundles in the API, the last registered loader is evaluated first.
8
11
  *
12
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
9
13
  * @since 4.18
10
14
  * @see [fetchMessageBundle()](https://developers.arcgis.com/javascript/latest/references/core/intl/#fetchMessageBundle)
11
15
  * @see [registerMessageBundleLoader()](https://developers.arcgis.com/javascript/latest/references/core/intl/#registerMessageBundleLoader)
@@ -31,12 +35,14 @@ export interface MessageBundleLoader {
31
35
  /**
32
36
  * Used to check if the loader should be used to load a candidate message bundle.
33
37
  *
38
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
34
39
  * @since 5.0
35
40
  */
36
41
  pattern: string | RegExp;
37
42
  /**
38
43
  * Called to load the message bundle if the `pattern` matches the bundle identifier.
39
44
  *
45
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
40
46
  * @since 5.0
41
47
  */
42
48
  fetchMessageBundle: FetchMessageBundle;
@@ -48,10 +54,14 @@ export interface MessageBundleLoader {
48
54
  * @param bundleId - The identifier of the bundle to localize.
49
55
  * @param locale - The locale in which to load the bundle.
50
56
  * @returns Resolves to an object containing the localized message strings.
57
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
51
58
  * @since 4.18
52
59
  * @see [registerMessageBundleLoader()](https://developers.arcgis.com/javascript/latest/references/core/intl/#registerMessageBundleLoader)
53
60
  */
54
61
  export type FetchMessageBundle = (bundleId: string, locale: string) => Promise<MessageBundle>;
55
62
 
56
- /** @since 5.0 */
63
+ /**
64
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
65
+ * @since 5.0
66
+ */
57
67
  export type MessageBundle = any;
package/intl/t9n.d.ts CHANGED
@@ -1,14 +1,19 @@
1
- /** @since 5.0 */
1
+ /**
2
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
3
+ * @since 5.0
4
+ */
2
5
  export interface JSONLoaderOptions {
3
6
  /**
4
7
  * Used to calculate the relative path of the file to load.
5
8
  *
9
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
6
10
  * @since 5.0
7
11
  */
8
12
  base?: string;
9
13
  /**
10
14
  * Used to check if the loader should be used to load a candidate's message bundle.
11
15
  *
16
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
12
17
  * @since 5.0
13
18
  */
14
19
  pattern: string | RegExp;
@@ -17,6 +22,7 @@ export interface JSONLoaderOptions {
17
22
  * It can be either a `string` or `URL` pointing to the folder where the files are located, or
18
23
  * a function called with a specified path. The function should return the final path.
19
24
  *
25
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
20
26
  * @since 5.0
21
27
  */
22
28
  location: string | URL | LocationFunction;
@@ -27,6 +33,7 @@ export interface JSONLoaderOptions {
27
33
  *
28
34
  * @param path - The path.
29
35
  * @returns The location path
36
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
30
37
  * @since 4.18
31
38
  * @see [createJSONLoader()](https://developers.arcgis.com/javascript/latest/references/core/intl/#createJSONLoader)
32
39
  */
package/intl.d.ts CHANGED
@@ -215,6 +215,7 @@ export function convertNumberFormatToIntlOptions(format?: NumberFormat): Intl.Nu
215
215
  * Creates a message bundle loader specialized in loading translation files as JSON files.
216
216
  * Internally, this is the loader used to load locales by the ArcGIS Maps SDK for JavaScript.
217
217
  *
218
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
218
219
  * @param params - The configuration of the loader.
219
220
  * @returns loader - A message bundle loader.
220
221
  * @since 4.18
@@ -280,6 +281,7 @@ export function createJSONLoader(params: JSONLoaderOptions): MessageBundle;
280
281
  * widget localized for US English locale.
281
282
  * Below that is a bundle translated for France's French locale for the same widget's strings.
282
283
  *
284
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
283
285
  * @param bundleId - The identifier of the message bundle, passed to the loader registered with [registerMessageBundleLoader()](https://developers.arcgis.com/javascript/latest/references/core/intl/#registerMessageBundleLoader).
284
286
  * @returns When resolved, an object containing the localized message strings.
285
287
  * @since 4.18
@@ -481,6 +483,7 @@ export function getLocaleLanguage(): string | null | undefined;
481
483
  * `pt-PT`, `ro`, `ru`, `sk`, `sl`, `sr`, `sv`, `th`, `tr`, `uk`, `vi`, `zh-CN`, `zh-HK`, and
482
484
  * `zh-TW`.
483
485
  *
486
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
484
487
  * @param locale - Any locale string.
485
488
  * @returns The normalized locale, or null if no known locale was found.
486
489
  * @since 4.18
@@ -542,6 +545,7 @@ export function prefersRTL(locale?: string): boolean;
542
545
  *
543
546
  * Examples for both are provided below.
544
547
  *
548
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
545
549
  * @param loader - A message bundle loader.
546
550
  * @returns Returns a handler with a `remove()` method that should be called to unregister the message loader.
547
551
  *
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.30",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
2
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.32",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
@@ -42,7 +42,6 @@ export interface AnnotationFeatureLayerProperties extends LayerProperties, APIKe
42
42
  * is set to `true`.
43
43
  *
44
44
  * @see [createPopupTemplate()](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/#createPopupTemplate)
45
- * @see [SceneView.popup](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#popup)
46
45
  * @see [View2D.popup](https://developers.arcgis.com/javascript/latest/references/core/views/View2D/#popup)
47
46
  */
48
47
  popupTemplate?: PopupTemplateProperties | null;
@@ -89,7 +88,7 @@ export interface AnnotationFeatureLayerEvents extends EditBusLayerEvents, Refres
89
88
  * AnnotationFeatureLayers may be created from a [url](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/#url).
90
89
  * AnnotationFeatureLayers are published with specific fonts and symbols to be used for display. Annotation features text use the same client-side rendering engine as labels.
91
90
  * If the font specified by the service is not available, a default font will be used instead.
92
- * See the [Labeling guide](/Labeling/) for more information on how to configure labeling and text symbols.
91
+ * See the [Labeling guide](https://developers.arcgis.com/javascript/latest/guide/labeling/) for more information on how to configure labeling and text symbols.
93
92
  *
94
93
  * ```js
95
94
  * // get a reference to arcgis-map
@@ -164,7 +163,6 @@ export default class AnnotationFeatureLayer extends AnnotationFeatureLayerSuperc
164
163
  *
165
164
  * @default true
166
165
  * @see [createPopupTemplate()](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/#createPopupTemplate)
167
- * @see [SceneView.popup](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#popup)
168
166
  * @see [View2D.popup](https://developers.arcgis.com/javascript/latest/references/core/views/View2D/#popup)
169
167
  */
170
168
  accessor popupEnabled: boolean;
@@ -181,7 +179,6 @@ export default class AnnotationFeatureLayer extends AnnotationFeatureLayerSuperc
181
179
  * is set to `true`.
182
180
  *
183
181
  * @see [createPopupTemplate()](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/#createPopupTemplate)
184
- * @see [SceneView.popup](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#popup)
185
182
  * @see [View2D.popup](https://developers.arcgis.com/javascript/latest/references/core/views/View2D/#popup)
186
183
  */
187
184
  get popupTemplate(): PopupTemplate | null | undefined;
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__addDisposableResource as e,__disposeResources as t,__decorate as r}from"tslib";import i from"../PopupTemplate.js";import s from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import a from"../core/Collection.js";import n from"../core/Error.js";import{disposable as l,makeHandle as p}from"../core/handleUtils.js";import{MultiOriginJSONSupportMixin as u}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,whenOrAbort as y,onAbort as m}from"../core/promiseUtils.js";import{watch as h,sync as c}from"../core/reactiveUtils.js";import{join as f}from"../core/urlUtils.js";import{property as b,subclass as v}from"../core/accessorSupport/decorators.js";import g from"../geometry/SpatialReference.js";import S from"./Layer.js";import{APIKeyMixin as j}from"./mixins/APIKeyMixin.js";import{ArcGISService as L}from"./mixins/ArcGISService.js";import{BlendLayer as F}from"./mixins/BlendLayer.js";import{CustomParametersMixin as E}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as I}from"./mixins/EditBusLayer.js";import{FeatureLayerBase as w}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as T}from"./mixins/OperationalLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{RefreshableLayer as P}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as _}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as O}from"./mixins/TemporalLayer.js";import C from"./support/AnnotationFeatureSublayer.js";import{parse as A,cleanTitle as q,titleFromUrlAndName as D}from"./support/arcgisLayerUrl.js";import{barrierWeight as U,id as k,popupEnabled as M}from"./support/commonProperties.js";import{ensureLayerCredential as R,createQuery as G,getFieldDomain as N,hasDataChanged as Q}from"./support/featureLayerUtils.js";import{defineFieldProperties as H}from"./support/fieldProperties.js";import{fixTimeInfoFields as J}from"./support/fieldUtils.js";import{serviceSupportsSpatialReference as $}from"./support/versionUtils.js";import B from"../rest/support/Query.js";import{createPopupTemplate as K}from"../support/popupUtils.js";import{reader as V}from"../core/accessorSupport/decorators/reader.js";const W="annotation-feature-layer",Z=H(),z=a.ofType(C);let X=class extends(w(F(O(I(_(P(L(T(x(u(E(j(o(S)))))))))))))){constructor(e){super(e),this._sublayerLookup=new Map,this.barrierWeight="high",this.elementField="element",this.fields=null,this.fieldsIndex=null,this.operationalLayerType="ArcGISAnnotationLayer",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.source=null,this.sublayers=new z,this.sublayerTitleMode="item-title",this.supportedSourceTypes=new Set(["Annotation Layer"]),this.type="annotation-feature",this._dataElementPromise=null,this.addHandles(h(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),c))}destroy(){this.source?.destroy()}load(e){const t=e?.signal,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(d).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url)throw new n(`${W}:missing-url`,"AnnotationFeatureLayer must be created with a url");return this.initLayerProperties(await this.createGraphicsSource(t))}).then(()=>R(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveEditingEnabled(){return!1}get defaultPopupTemplate(){return this.createPopupTemplate()}readSublayers(e,t){const r=new z(t.subtypes.map(({code:e})=>new C({subtypeCode:e})).reverse());if(this.visibleLayers){const e=new Set(this.visibleLayers);r.forEach(t=>{t.visible=e.has(t.subtypeCode)})}return r}readTitleFromService(e,t){const{url:r}=this,i=t.name||A(r)?.title;switch(this.sublayerTitleMode){case"item-title":if(r)return D(r,i);break;case"item-title-and-service-name":{let e=this.portalItem?.title;if(e&&e!==i)return e=q(e),i?`${e} - ${q(i)}`:e;break}}return i?q(i):void 0}readTitleFromPortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}get visibleLayers(){return 0===this.sublayers.length?this._get("visibleLayers")??null:Array.from(new Set(this.sublayers?.toArray().filter(e=>e.visible).map(e=>e.subtypeCode).sort((e,t)=>e-t)??null))}set visibleLayers(e){this._set("visibleLayers",e)}createPopupTemplate(e){return K(this,e)}async createGraphicsSource(r){const i={stack:[],error:void 0,hasError:!1};try{const{default:t}=await y(import("./graphics/sources/FeatureLayerSource.js"),r),s=new t({layer:this,supportedSourceTypes:this.supportedSourceTypes});e(i,l(m(r,()=>s.cancelLoad())??p()),!1);return await s.load({signal:r}),s}catch(s){i.error=s,i.hasError=!0}finally{t(i)}}createQuery(){const e=G(this);return e.where=this.definitionExpression||"1=1",e}async fetchDataElement(e){if(this._dataElementPromise)return this._dataElementPromise;if(!this.url)throw new Error("InternalError: A URL is required to retrieve the data element for this layer.");const t=f(this.url,"queryDataElements"),r={f:"json",layers:this.layerId};return this._dataElementPromise=s(t,{...e,responseType:"json",query:r}).then(e=>{const t=e.data.layerDataElements,r=this.layerId,i=t.find(e=>e.layerId===r);if(!i)throw new n("fetchDataElement:not-available","A data element for this layer could not be retrieved.");return i.dataElement}),this._dataElementPromise}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){return N(this,e,t,this.getField(e)?.domain??null)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(B.from(e)??r.createQuery(),t);if(i?.features)for(const s of i.features){const e=this.findSublayerForFeature(s);s.origin=e?.graphicOrigin,s.layer=s.sourceLayer=this}return i}async queryObjectIds(e,t){const r=await this.load();return r.source.queryObjectIds(B.from(e)??r.createQuery(),t)}async queryFeatureCount(e,t){const r=await this.load();return r.source.queryFeatureCount(B.from(e)??r.createQuery(),t)}async queryExtent(e,t){const r=await this.load();return r.source.queryExtent(B.from(e)??r.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&$(this,e)}async initLayerProperties(e){this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),J(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return Q(this)}_verifySource(){if(this.version&&this.version<10.8)throw new n(W+":unsupported-version","The feature service must be version 10.8 or above.");const e=["ZOrder","AnnotationClassID","Element","SymbolID","Status"],t=e.filter(e=>!this.fieldsIndex.has(e));if(this.fieldsIndex.has("FeatureID")||this.fieldsIndex.has("FeatureGlobalID")||t.unshift("FeatureID","FeatureGlobalID"),t.length)throw new n(W+":missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:t})}_fetchFirstValidLayerId(e){return s(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(!t)return;this.applyPreferredHost(t);const r=[...t.layers||[],...t.tables||[]];return r.find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id})}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach(e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),e.on("after-remove",({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})],"sublayers-owner"))}};r([b({type:g,json:{origins:{service:{read:{source:"sourceSpatialReference"}}}}})],X.prototype,"attributeSpatialReference",void 0),r([b(U)],X.prototype,"barrierWeight",void 0),r([b({json:{write:!0}})],X.prototype,"editingEnabled",null),r([b({readOnly:!0})],X.prototype,"elementField",void 0),r([b({readOnly:!0})],X.prototype,"effectiveEditingEnabled",null),r([b({...Z.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],X.prototype,"fields",void 0),r([b(Z.fieldsIndex)],X.prototype,"fieldsIndex",void 0),r([b(k)],X.prototype,"id",void 0),r([b({type:["ArcGISAnnotationLayer"]})],X.prototype,"operationalLayerType",void 0),r([b(Z.outFields)],X.prototype,"outFields",void 0),r([b(M)],X.prototype,"popupEnabled",void 0),r([b({type:i,json:{name:"popupInfo",write:!0}})],X.prototype,"popupTemplate",void 0),r([b({readOnly:!0})],X.prototype,"defaultPopupTemplate",null),r([b({clonable:!1,readOnly:!0})],X.prototype,"source",void 0),r([b({type:z})],X.prototype,"sublayers",void 0),r([V("service","sublayers",["subtypes"])],X.prototype,"readSublayers",null),r([b({type:String})],X.prototype,"sublayerTitleMode",void 0),r([V("service","title",["name"])],X.prototype,"readTitleFromService",null),r([V("portal-item","title")],X.prototype,"readTitleFromPortalItem",null),r([b({json:{read:!1},value:"annotation-feature",readOnly:!0})],X.prototype,"type",void 0),r([b({type:[Number],json:{write:{ignoreOrigin:!0}}})],X.prototype,"visibleLayers",null),X=r([v("esri.layers.AnnotationFeatureLayer")],X);const Y=X;export{Y as default};
2
+ import{__addDisposableResource as e,__disposeResources as t,__decorate as r}from"tslib";import i from"../PopupTemplate.js";import s from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import a from"../core/Collection.js";import n from"../core/Error.js";import{disposable as l,makeHandle as p}from"../core/handleUtils.js";import{MultiOriginJSONSupportMixin as u}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,whenOrAbort as y,onAbort as m}from"../core/promiseUtils.js";import{watch as h,sync as c}from"../core/reactiveUtils.js";import{property as f,subclass as b}from"../core/accessorSupport/decorators.js";import v from"../geometry/SpatialReference.js";import g from"../graphic/AnnotationFeatureGraphicOrigin.js";import S from"./Layer.js";import{APIKeyMixin as j}from"./mixins/APIKeyMixin.js";import{ArcGISService as F}from"./mixins/ArcGISService.js";import{BlendLayer as L}from"./mixins/BlendLayer.js";import{CustomParametersMixin as w}from"./mixins/CustomParametersMixin.js";import{DataElementMixin as I}from"./mixins/DataElementMixin.js";import{EditBusLayer as x}from"./mixins/EditBusLayer.js";import{FeatureLayerBase as E}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as O}from"./mixins/OperationalLayer.js";import{PortalLayer as T}from"./mixins/PortalLayer.js";import{RefreshableLayer as P}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as C}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as _}from"./mixins/TemporalLayer.js";import A from"./support/AnnotationFeatureSublayer.js";import{parse as q,cleanTitle as k,titleFromUrlAndName as D}from"./support/arcgisLayerUrl.js";import{barrierWeight as M,id as U,popupEnabled as G}from"./support/commonProperties.js";import{ensureLayerCredential as R,createQuery as N,getFieldDomain as Q,hasDataChanged as H}from"./support/featureLayerUtils.js";import{defineFieldProperties as J}from"./support/fieldProperties.js";import{fixTimeInfoFields as $}from"./support/fieldUtils.js";import{serviceSupportsSpatialReference as V}from"./support/versionUtils.js";import B from"../rest/support/Query.js";import{createPopupTemplate as K}from"../support/popupUtils.js";import{reader as W}from"../core/accessorSupport/decorators/reader.js";const Z="annotation-feature-layer",z=J(),X=a.ofType(A);let Y=class extends(I(E(L(_(x(C(P(F(O(T(u(w(j(o(S))))))))))))))){constructor(e){super(e),this._sublayerLookup=new Map,this.barrierWeight="high",this.elementField="element",this.fields=null,this.fieldsIndex=null,this.graphicOrigin=new g(this,null),this.operationalLayerType="ArcGISAnnotationLayer",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.referenceScale=0,this.source=null,this.statusField="status",this.sublayers=new X,this.sublayerTitleMode="item-title",this.supportedSourceTypes=new Set(["Annotation Layer"]),this.symbolCollection=null,this.type="annotation-feature",this.unplacedAnnotationsVisible=!1,this.addHandles(h(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),c))}destroy(){this.source?.destroy()}load(e){const t=e?.signal,r=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(d).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url)throw new n(`${Z}:missing-url`,"AnnotationFeatureLayer must be created with a url");return Promise.all([this.loadDataElement(e).then(()=>{if(!this.symbolCollection)throw new n(`${Z}:missing-symbol-collection`,"Invalid service with no symbol collection")}),this.initLayerProperties(await this.createGraphicsSource(t))])}).then(()=>R(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveEditingEnabled(){return!1}get defaultPopupTemplate(){return this.createPopupTemplate()}readSublayers(e,t){const r=new X(t.subtypes.map(({code:e})=>new A({subtypeCode:e})).reverse());if(this.visibleLayers){const e=new Set(this.visibleLayers);r.forEach(t=>{t.visible=e.has(t.subtypeCode)})}return r}readTitleFromService(e,t){const{url:r}=this,i=t.name||q(r)?.title;switch(this.sublayerTitleMode){case"item-title":if(r)return D(r,i);break;case"item-title-and-service-name":{let e=this.portalItem?.title;if(e&&e!==i)return e=k(e),i?`${e} - ${k(i)}`:e;break}}return i?k(i):void 0}readTitleFromPortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}get visibleLayers(){return 0===this.sublayers.length?this._get("visibleLayers")??null:Array.from(new Set(this.sublayers?.toArray().filter(e=>e.visible).map(e=>e.subtypeCode).sort((e,t)=>e-t)??null))}set visibleLayers(e){this._set("visibleLayers",e)}createPopupTemplate(e){return K(this,e)}async createGraphicsSource(r){const i={stack:[],error:void 0,hasError:!1};try{const{default:t}=await y(import("./graphics/sources/FeatureLayerSource.js"),r),s=new t({layer:this,supportedSourceTypes:this.supportedSourceTypes});e(i,l(m(r,()=>s.cancelLoad())??p()),!1);return await s.load({signal:r}),s}catch(s){i.error=s,i.hasError=!0}finally{t(i)}}createQuery(){const e=N(this);return e.where=this.definitionExpression||"1=1",e}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.findSublayerForSubtypeCode(r)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){return Q(this,e,t,this.getField(e)?.domain??null)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(B.from(e)??r.createQuery(),t);if(i?.features)for(const s of i.features){const e=this.findSublayerForFeature(s);s.origin=e?.graphicOrigin??this.graphicOrigin,s.layer=s.sourceLayer=this}return i}async queryObjectIds(e,t){const r=await this.load();return r.source.queryObjectIds(B.from(e)??r.createQuery(),t)}async queryFeatureCount(e,t){const r=await this.load();return r.source.queryFeatureCount(B.from(e)??r.createQuery(),t)}async queryExtent(e,t){const r=await this.load();return r.source.queryExtent(B.from(e)??r.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&V(this,e)}async initLayerProperties(e){this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),$(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return H(this)}_verifySource(){if(this.version&&this.version<10.8)throw new n(Z+":unsupported-version","The feature service must be version 10.8 or above.");const e=["ZOrder","AnnotationClassID","Element","SymbolID","Status"],t=e.filter(e=>!this.fieldsIndex.has(e));if(this.fieldsIndex.has("FeatureID")||this.fieldsIndex.has("FeatureGlobalID")||t.unshift("FeatureID","FeatureGlobalID"),t.length)throw new n(Z+":missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:t})}_fetchFirstValidLayerId(e){return s(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(!t)return;this.applyPreferredHost(t);const r=[...t.layers||[],...t.tables||[]];return r.find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id})}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach(e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),e.on("after-remove",({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})],"sublayers-owner"))}};r([f({type:v,json:{origins:{service:{read:{source:"sourceSpatialReference"}}}}})],Y.prototype,"attributeSpatialReference",void 0),r([f(M)],Y.prototype,"barrierWeight",void 0),r([f({json:{write:!0}})],Y.prototype,"editingEnabled",null),r([f({readOnly:!0})],Y.prototype,"elementField",void 0),r([f({readOnly:!0})],Y.prototype,"effectiveEditingEnabled",null),r([f({...z.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Y.prototype,"fields",void 0),r([f(z.fieldsIndex)],Y.prototype,"fieldsIndex",void 0),r([f({readOnly:!0})],Y.prototype,"graphicOrigin",void 0),r([f(U)],Y.prototype,"id",void 0),r([f({type:["ArcGISAnnotationLayer"]})],Y.prototype,"operationalLayerType",void 0),r([f(z.outFields)],Y.prototype,"outFields",void 0),r([f(G)],Y.prototype,"popupEnabled",void 0),r([f({type:i,json:{name:"popupInfo",write:!0}})],Y.prototype,"popupTemplate",void 0),r([f({readOnly:!0})],Y.prototype,"defaultPopupTemplate",null),r([f({readOnly:!0})],Y.prototype,"referenceScale",void 0),r([f({clonable:!1,readOnly:!0})],Y.prototype,"source",void 0),r([f({readOnly:!0})],Y.prototype,"statusField",void 0),r([f({type:X})],Y.prototype,"sublayers",void 0),r([W("service","sublayers",["subtypes"])],Y.prototype,"readSublayers",null),r([f({type:String})],Y.prototype,"sublayerTitleMode",void 0),r([f({readOnly:!0})],Y.prototype,"symbolCollection",void 0),r([W("service","title",["name"])],Y.prototype,"readTitleFromService",null),r([W("portal-item","title")],Y.prototype,"readTitleFromPortalItem",null),r([f({json:{read:!1},value:"annotation-feature",readOnly:!0})],Y.prototype,"type",void 0),r([f()],Y.prototype,"unplacedAnnotationsVisible",void 0),r([f({type:[Number],json:{write:{ignoreOrigin:!0}}})],Y.prototype,"visibleLayers",null),Y=r([b("esri.layers.AnnotationFeatureLayer")],Y);const ee=Y;export{ee as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__addDisposableResource as e,__disposeResources as r,__decorate as t}from"tslib";import i from"../PopupTemplate.js";import s from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import a from"../core/Error.js";import{disposable as n,makeHandle as l}from"../core/handleUtils.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as u,whenOrAbort as d,onAbort as m}from"../core/promiseUtils.js";import{join as c}from"../core/urlUtils.js";import{property as h,subclass as y}from"../core/accessorSupport/decorators.js";import f from"../geometry/SpatialReference.js";import E from"../graphic/DimensionFeatureGraphicOrigin.js";import T from"./Layer.js";import{APIKeyMixin as I}from"./mixins/APIKeyMixin.js";import{ArcGISService as v}from"./mixins/ArcGISService.js";import{BlendLayer as S}from"./mixins/BlendLayer.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{FeatureLayerBase as j}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as L}from"./mixins/OperationalLayer.js";import{PortalLayer as b}from"./mixins/PortalLayer.js";import{RefreshableLayer as D}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as P}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as w}from"./mixins/TemporalLayer.js";import{parse as F,cleanTitle as O,titleFromUrlAndName as M}from"./support/arcgisLayerUrl.js";import{barrierWeight as N,id as x,popupEnabled as G}from"./support/commonProperties.js";import{ensureLayerCredential as A,createQuery as X,getFieldDomain as Y,hasDataChanged as U}from"./support/featureLayerUtils.js";import{defineFieldProperties as q}from"./support/fieldProperties.js";import{fixTimeInfoFields as _}from"./support/fieldUtils.js";import{serviceSupportsSpatialReference as R}from"./support/versionUtils.js";import C from"../rest/support/Query.js";import{createPopupTemplate as H}from"../support/popupUtils.js";import{reader as B}from"../core/accessorSupport/decorators/reader.js";const Q="dimension-feature-layer",J=q();let k=class extends(j(S(w(P(D(v(L(b(p(g(I(o(T))))))))))))){constructor(e){super(e),this.barrierWeight="high",this.fields=null,this.fieldsIndex=null,this.graphicOrigin=new E(this),this.operationalLayerType="ArcGISDimensionLayer",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.source=null,this.sublayerTitleMode="item-title",this.supportedSourceTypes=new Set(["Dimension Layer"]),this.symbolFields=["STYLEID","BEGINX","BEGINY","ENDX","ENDY","DIMDISPLAY","EXTDISPLAY","MARKERDISPLAY","DIMX","DIMY","TEXTX","TEXTY","DIMLENGTH","DIMTYPE","EXTANGLE","TEXTANGLE","USECUSTOMLENGTH","CUSTOMLENGTH "],this.type="dimension-feature",this._dataElementPromise=null}destroy(){this.source?.destroy()}load(e){const r=e?.signal,t=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(u).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(r);null!=e&&(this.layerId=e)}if(!this.url)throw new a(`${Q}:missing-url`,"DimensionFeatureLayer must be created with a url");return this.initLayerProperties(await this.createGraphicsSource(r))}).then(()=>A(this,"load",e));return this.addResolvingPromise(t),Promise.resolve(this)}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveEditingEnabled(){return!1}get defaultPopupTemplate(){return this.createPopupTemplate()}readTitleFromService(e,r){const{url:t}=this,i=r.name||F(t)?.title;switch(this.sublayerTitleMode){case"item-title":if(t)return M(t,i);break;case"item-title-and-service-name":{let e=this.portalItem?.title;if(e&&e!==i)return e=O(e),i?`${e} - ${O(i)}`:e;break}}return i?O(i):void 0}readTitleFromPortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}createPopupTemplate(e){return H(this,e)}async createGraphicsSource(t){const i={stack:[],error:void 0,hasError:!1};try{const{default:r}=await d(import("./graphics/sources/FeatureLayerSource.js"),t),s=new r({layer:this,supportedSourceTypes:this.supportedSourceTypes});e(i,n(m(t,()=>s.cancelLoad())??l()),!1);return await s.load({signal:t}),s}catch(s){i.error=s,i.hasError=!0}finally{r(i)}}createQuery(){const e=X(this);return e.where=this.definitionExpression||"1=1",e}async fetchDataElement(e){if(this._dataElementPromise)return this._dataElementPromise;if(!this.url)throw new Error("InternalError: A URL is required to retrieve the data element for this layer.");const r=c(this.url,"queryDataElements"),t={f:"json",layers:this.layerId};return this._dataElementPromise=s(r,{...e,responseType:"json",query:t}).then(e=>{const r=e.data.layerDataElements,t=this.layerId,i=r.find(e=>e.layerId===t);if(!i)throw new a("fetchDataElement:not-available","A data element for this layer could not be retrieved.");return i.dataElement}),this._dataElementPromise}getFieldDomain(e,r){return Y(this,e,r,this.getField(e)?.domain??null)}async queryFeatures(e,r){const t=await this.load(),i=await t.source.queryFeatures(C.from(e)??t.createQuery(),r),s=this.graphicOrigin;if(i?.features)for(const o of i.features)o.layer=o.sourceLayer=t,o.origin=s;return i}async queryObjectIds(e,r){const t=await this.load();return t.source.queryObjectIds(C.from(e)??t.createQuery(),r)}async queryFeatureCount(e,r){const t=await this.load();return t.source.queryFeatureCount(C.from(e)??t.createQuery(),r)}async queryExtent(e,r){const t=await this.load();return t.source.queryExtent(C.from(e)??t.createQuery(),r)}serviceSupportsSpatialReference(e){return this.loaded&&R(this,e)}async initLayerProperties(e){this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),_(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return U(this)}_verifySource(){if(this.version&&this.version<10.8)throw new a(Q+":unsupported-version","The feature service must be version 10.8 or above.");const e=["DIMLENGTH","BEGINX","BEGINY","ENDX","ENDY","DIMX","DIMY","TEXTX","TEXTY","DIMTYPE","EXTANGLE","STYLEID","USECUSTOMLENGTH","CUSTOMLENGTH","DIMDISPLAY","EXTDISPLAY","MARKERDISPLAY","TEXTANGLE"],r=e.filter(e=>!this.fieldsIndex.has(e));if(r.length)throw new a(Q+":missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:r})}_fetchFirstValidLayerId(e){return s(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const r=e.data;if(!r)return;this.applyPreferredHost(r);const t=[...r.layers||[],...r.tables||[]];return t.find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id})}};t([h({type:f,json:{origins:{service:{read:{source:"sourceSpatialReference"}}}}})],k.prototype,"attributeSpatialReference",void 0),t([h(N)],k.prototype,"barrierWeight",void 0),t([h({json:{write:!0}})],k.prototype,"editingEnabled",null),t([h({readOnly:!0})],k.prototype,"effectiveEditingEnabled",null),t([h({...J.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],k.prototype,"fields",void 0),t([h(J.fieldsIndex)],k.prototype,"fieldsIndex",void 0),t([h({readOnly:!0,clonable:!1})],k.prototype,"graphicOrigin",void 0),t([h(x)],k.prototype,"id",void 0),t([h({type:["ArcGISDimensionLayer"]})],k.prototype,"operationalLayerType",void 0),t([h(J.outFields)],k.prototype,"outFields",void 0),t([h(G)],k.prototype,"popupEnabled",void 0),t([h({type:i,json:{name:"popupInfo",write:!0}})],k.prototype,"popupTemplate",void 0),t([h({readOnly:!0})],k.prototype,"defaultPopupTemplate",null),t([h({clonable:!1,readOnly:!0})],k.prototype,"source",void 0),t([h({type:String})],k.prototype,"sublayerTitleMode",void 0),t([h({readOnly:!0})],k.prototype,"symbolFields",void 0),t([B("service","title",["name"])],k.prototype,"readTitleFromService",null),t([B("portal-item","title")],k.prototype,"readTitleFromPortalItem",null),t([h({json:{read:!1},value:"dimension-feature",readOnly:!0})],k.prototype,"type",void 0),k=t([y("esri.layers.DimensionFeatureLayer")],k);const K=k;export{K as default};
2
+ import{__addDisposableResource as e,__disposeResources as r,__decorate as t}from"tslib";import i from"../PopupTemplate.js";import o from"../request.js";import{ClonableMixin as s}from"../core/Clonable.js";import a from"../core/Error.js";import{disposable as n,makeHandle as l}from"../core/handleUtils.js";import{MultiOriginJSONSupportMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as u,whenOrAbort as d,onAbort as m}from"../core/promiseUtils.js";import{property as c,subclass as y}from"../core/accessorSupport/decorators.js";import h from"../geometry/SpatialReference.js";import f from"../graphic/DimensionFeatureGraphicOrigin.js";import E from"./Layer.js";import{APIKeyMixin as T}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{BlendLayer as v}from"./mixins/BlendLayer.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{DataElementMixin as I}from"./mixins/DataElementMixin.js";import{FeatureLayerBase as L}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{PortalLayer as b}from"./mixins/PortalLayer.js";import{RefreshableLayer as D}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as P}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as F}from"./mixins/TemporalLayer.js";import{parse as w,cleanTitle as O,titleFromUrlAndName as M}from"./support/arcgisLayerUrl.js";import{barrierWeight as x,id as N,popupEnabled as G}from"./support/commonProperties.js";import{ensureLayerCredential as X,createQuery as Y,getFieldDomain as A,hasDataChanged as U}from"./support/featureLayerUtils.js";import{defineFieldProperties as C}from"./support/fieldProperties.js";import{fixTimeInfoFields as q}from"./support/fieldUtils.js";import{serviceSupportsSpatialReference as R}from"./support/versionUtils.js";import H from"../rest/support/Query.js";import{createPopupTemplate as _}from"../support/popupUtils.js";import{reader as B}from"../core/accessorSupport/decorators/reader.js";const Q="dimension-feature-layer",J=C();let $=class extends(I(L(v(F(P(D(S(j(b(p(g(T(s(E)))))))))))))){constructor(e){super(e),this.barrierWeight="high",this.fields=null,this.fieldsIndex=null,this.graphicOrigin=new f(this),this.operationalLayerType="ArcGISDimensionLayer",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.referenceScale=0,this.source=null,this.styleCollection=null,this.sublayerTitleMode="item-title",this.supportedSourceTypes=new Set(["Dimension Layer"]),this.symbolFields=["STYLEID","BEGINX","BEGINY","ENDX","ENDY","DIMDISPLAY","EXTDISPLAY","MARKERDISPLAY","DIMX","DIMY","TEXTX","TEXTY","DIMLENGTH","DIMTYPE","EXTANGLE","TEXTANGLE","USECUSTOMLENGTH","CUSTOMLENGTH "],this.type="dimension-feature"}destroy(){this.source?.destroy()}load(e){const r=e?.signal,t=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(u).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(r);null!=e&&(this.layerId=e)}if(!this.url)throw new a(`${Q}:missing-url`,"DimensionFeatureLayer must be created with a url");return Promise.all([this.loadDataElement(e).then(()=>{if(!this.styleCollection)throw new a(`${Q}:missing-style-collection`,"Invalid service with no style collection")}),this.initLayerProperties(await this.createGraphicsSource(r))])}).then(()=>X(this,"load",e));return this.addResolvingPromise(t),Promise.resolve(this)}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveEditingEnabled(){return!1}get defaultPopupTemplate(){return this.createPopupTemplate()}readTitleFromService(e,r){const{url:t}=this,i=r.name||w(t)?.title;switch(this.sublayerTitleMode){case"item-title":if(t)return M(t,i);break;case"item-title-and-service-name":{let e=this.portalItem?.title;if(e&&e!==i)return e=O(e),i?`${e} - ${O(i)}`:e;break}}return i?O(i):void 0}readTitleFromPortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}createPopupTemplate(e){return _(this,e)}async createGraphicsSource(t){const i={stack:[],error:void 0,hasError:!1};try{const{default:r}=await d(import("./graphics/sources/FeatureLayerSource.js"),t),o=new r({layer:this,supportedSourceTypes:this.supportedSourceTypes});e(i,n(m(t,()=>o.cancelLoad())??l()),!1);return await o.load({signal:t}),o}catch(o){i.error=o,i.hasError=!0}finally{r(i)}}createQuery(){const e=Y(this);return e.where=this.definitionExpression||"1=1",e}getFieldDomain(e,r){return A(this,e,r,this.getField(e)?.domain??null)}async queryFeatures(e,r){const t=await this.load(),i=await t.source.queryFeatures(H.from(e)??t.createQuery(),r),o=this.graphicOrigin;if(i?.features)for(const s of i.features)s.layer=s.sourceLayer=t,s.origin=o;return i}async queryObjectIds(e,r){const t=await this.load();return t.source.queryObjectIds(H.from(e)??t.createQuery(),r)}async queryFeatureCount(e,r){const t=await this.load();return t.source.queryFeatureCount(H.from(e)??t.createQuery(),r)}async queryExtent(e,r){const t=await this.load();return t.source.queryExtent(H.from(e)??t.createQuery(),r)}serviceSupportsSpatialReference(e){return this.loaded&&R(this,e)}async initLayerProperties(e){this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),q(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return U(this)}_verifySource(){if(this.version&&this.version<10.8)throw new a(Q+":unsupported-version","The feature service must be version 10.8 or above.");const e=["DIMLENGTH","BEGINX","BEGINY","ENDX","ENDY","DIMX","DIMY","TEXTX","TEXTY","DIMTYPE","EXTANGLE","STYLEID","USECUSTOMLENGTH","CUSTOMLENGTH","DIMDISPLAY","EXTDISPLAY","MARKERDISPLAY","TEXTANGLE"],r=e.filter(e=>!this.fieldsIndex.has(e));if(r.length)throw new a(Q+":missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:r})}_fetchFirstValidLayerId(e){return o(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const r=e.data;if(!r)return;this.applyPreferredHost(r);const t=[...r.layers||[],...r.tables||[]];return t.find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id})}};t([c({type:h,json:{origins:{service:{read:{source:"sourceSpatialReference"}}}}})],$.prototype,"attributeSpatialReference",void 0),t([c(x)],$.prototype,"barrierWeight",void 0),t([c({json:{write:!0}})],$.prototype,"editingEnabled",null),t([c({readOnly:!0})],$.prototype,"effectiveEditingEnabled",null),t([c({...J.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],$.prototype,"fields",void 0),t([c(J.fieldsIndex)],$.prototype,"fieldsIndex",void 0),t([c({readOnly:!0,clonable:!1})],$.prototype,"graphicOrigin",void 0),t([c(N)],$.prototype,"id",void 0),t([c({type:["ArcGISDimensionLayer"]})],$.prototype,"operationalLayerType",void 0),t([c(J.outFields)],$.prototype,"outFields",void 0),t([c(G)],$.prototype,"popupEnabled",void 0),t([c({type:i,json:{name:"popupInfo",write:!0}})],$.prototype,"popupTemplate",void 0),t([c({readOnly:!0})],$.prototype,"defaultPopupTemplate",null),t([c({readOnly:!0})],$.prototype,"referenceScale",void 0),t([c({clonable:!1,readOnly:!0})],$.prototype,"source",void 0),t([c()],$.prototype,"styleCollection",void 0),t([c({type:String})],$.prototype,"sublayerTitleMode",void 0),t([c({readOnly:!0})],$.prototype,"symbolFields",void 0),t([B("service","title",["name"])],$.prototype,"readTitleFromService",null),t([B("portal-item","title")],$.prototype,"readTitleFromPortalItem",null),t([c({json:{read:!1},value:"dimension-feature",readOnly:!0})],$.prototype,"type",void 0),$=t([y("esri.layers.DimensionFeatureLayer")],$);const k=$;export{k as default};