@arcgis/core 4.29.0-next.20231221 → 4.29.0-next.20231222
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01dbff2fdff9d5c95892.js +1 -0
- package/assets/esri/core/workers/chunks/046b3920f4aca1061d06.js +1 -0
- package/assets/esri/core/workers/chunks/15af5fd13722ef57c8f7.js +1 -0
- package/assets/esri/core/workers/chunks/3a4598c384c4c31ab35b.js +1 -0
- package/assets/esri/core/workers/chunks/5c269c59f61a185ed5c7.js +1 -0
- package/assets/esri/core/workers/chunks/7435463436cda9eb4246.js +1 -0
- package/assets/esri/core/workers/chunks/c1c4f3909b724c13033d.js +1 -0
- package/assets/esri/core/workers/chunks/ccfdd3d278756f01f630.js +1 -0
- package/assets/esri/core/workers/chunks/d4cf3af5f5c30925539c.js +1 -0
- package/assets/esri/core/workers/chunks/ee0b43679cc0cc531d7c.js +1 -0
- package/assets/esri/core/workers/chunks/f9f3d6b4347e63f440e0.js +1 -0
- package/assets/esri/core/workers/chunks/fbfdb4779198f4c35c65.js +1 -0
- package/assets/esri/core/workers/chunks/ffad926201d92c4d6b4e.js +1 -0
- package/chunks/HUDMaterial.glsl.js +1 -1
- package/core/MemCache.js +1 -1
- package/core/MemCachePool.js +1 -1
- package/core/deprecate.js +1 -1
- package/layers/mixins/operationalLayerModuleMap.js +1 -1
- package/layers/mixins/operationalLayers.js +1 -1
- package/layers/support/editableLayers.js +1 -1
- package/layers/support/layersCreator.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/FeatureSourceEventLog.js +5 -0
- package/views/2d/layers/features/PipelineConnectionHandlers.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/featureServiceUtils.js +5 -0
- package/views/2d/layers/features/layerAdapters/geometryUtils.js +5 -0
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ATileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/DrillDownTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/PagedTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/SnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/DrillDownTileSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/PagedTileSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
- package/views/3d/effects/RenderNode.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/terrain/TerrainAttributesCache.js +1 -1
- package/views/3d/webgl-engine/effects/RenderNodes.js +5 -0
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/TableList.js +1 -1
- package/assets/esri/core/workers/chunks/251ceefdea4b345698a4.js +0 -1
- package/assets/esri/core/workers/chunks/2e6f1c788813b4162adf.js +0 -1
- package/assets/esri/core/workers/chunks/49ca15b23dd363bc3546.js +0 -1
- package/assets/esri/core/workers/chunks/521a38edbeff0073bfdd.js +0 -1
- package/assets/esri/core/workers/chunks/573ad8aa1c2cfad61eb8.js +0 -1
- package/assets/esri/core/workers/chunks/831283ac6653d7af90b6.js +0 -1
- package/assets/esri/core/workers/chunks/90444e25dd487d0bc438.js +0 -1
- package/assets/esri/core/workers/chunks/90b34ce04d5a83ea4344.js +0 -1
- package/assets/esri/core/workers/chunks/9c80cfae983c8ccfe616.js +0 -1
- package/assets/esri/core/workers/chunks/a1cf80c67ee8dbe9c897.js +0 -1
- package/assets/esri/core/workers/chunks/c76094c26e80656a2f8d.js +0 -1
- package/assets/esri/core/workers/chunks/df394ec25adfc9798f74.js +0 -1
- package/assets/esri/core/workers/chunks/e4ab40d895fccc81fe44.js +0 -1
- package/views/3d/webgl-engine/effects/RenderNodeCollection.js +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1690],{13867:(e,t,s)=>{s.d(t,{z:()=>n});var i=s(69801);class n{constructor(e,t){this._storage=new i.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,s)=>{s.d(t,{WJ:()=>a,Xq:()=>o});var i,n,r=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this,e,t,s,i)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.Z,this._users=new r.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}getSize(e,t){const s=e.id+t,i=this._db.get(s);return i?i.size:0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,i.ALL);const a=1+Math.max(r,-3)- -3;this._db.set(t,{entry:s,size:n,lifetime:a,lives:a}),this._size+=n,e.size+=n,this._checkSizeLimits()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,i.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s){let i;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,s);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,s]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,s,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0},20188:(e,t,s)=>{function i(e){return null!=a(e)||null!=o(e)}function n(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let s=!0;if(h&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,i=0;for(;!t&&i<=e.length;)t=!u.test(e[i]),i++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const s=t.groups,i=+s.year,n=+s.month-1,r=+s.day,o=+(s.hours??"0"),a=+(s.minutes??"0"),u=+(s.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const h=s.ms??"0",c=h?+h.padEnd(3,"0").substring(0,3):0;let d;if(s.isUTC||!s.offsetSign)d=Date.UTC(i,n,r,o,a,u,c);else{const e=+s.offsetHours,t=+s.offsetMinutes;d=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,n,r,o,a,u,c)}return Number.isNaN(d)?null:d}s.d(t,{mu:()=>n,of:()=>i,sG:()=>r});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,h=!Number.isNaN(new Date("technology 10").getTime())},24133:(e,t,s)=>{s.d(t,{Q:()=>o});var i=s(67676),n=s(44553),r=s(88764);class o{constructor(e=9,t){this._compareMinX=h,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),S.prune(),b.prune(),I.prune()}all(e){this._all(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(g(e,s))for(x.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;g(e,o)&&(s.leaf?t(r):y(e,o)?this._all(r,t):x.push(r))}s=x.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!g(e,t))return!1;for(x.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(g(e,r)){if(t.leaf||y(e,r))return!0;x.push(n)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(b.clear(),I.clear();s||b.length>0;){if(s||(s=b.pop(),n=b.data[b.length-1],r=I.pop()??0,o=!0),s.leaf&&(t=(0,i.cq)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),b.push(s),this._condense(b),this;o||s.leaf||!y(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(b.push(s),I.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let s=e;for(S.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else S.pushArray(s.children);s=S.pop()??null}}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new F(e.slice(t,s+1));return a(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new M([]);o.height=i;const l=Math.ceil(n/r),u=l*Math.ceil(Math.sqrt(r));_(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);_(e,n,t,l,this._compareMinY);for(let s=n;s<=t;s+=l){const n=Math.min(s+l-1,t);o.children.push(this._build(e,s,n,i-1))}}return a(o,this._toBBox),o}_chooseSubtree(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=d(o),l=p(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);b.clear();const r=this._chooseSubtree(n,this._data,t,b);for(r.children.push(e),u(r,n);t>=0&&b.data[t].children.length>this._maxEntries;)this._split(b,t),t--;this._adjustParentBBoxes(n,b,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),l=s.leaf?new F(o):new M(o);l.height=s.height,a(s,this._toBBox),a(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(s,l)}_splitRoot(e,t){this._data=new M([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=l(e,0,o,this._toBBox),a=l(e,o,s,this._toBBox),u=m(t,a),h=d(t)+d(a);u<i?(i=u,r=o,n=h<n?h:n):u===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:h,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=l(e,0,t,n),o=l(e,s-t,s,n);let a=f(r)+f(o);for(let i=t;i<s-t;i++){const t=e.children[i];u(r,e.leaf?n(t):t),a+=f(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?n(t):t),a+=f(o)}return a}_adjustParentBBoxes(e,t,s){for(let i=s;i>=0;i--)u(t.data[i],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.cq)(r,s,r.length,n.indexHint),1)}else this.clear();else a(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){l(e,0,e.children.length,t,e)}function l(e,t,s,i,n){n||(n=new F([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],u(n,e.leaf?i(r):r);return n}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function h(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function d(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function m(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function y(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function g(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function _(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const x=new n.Z,S=new n.Z,b=new n.Z,I=new n.Z({deallocator:void 0});class w{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class v extends w{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class F extends v{constructor(e){super(),this.children=e,this.leaf=!0}}class M extends v{constructor(e){super(),this.children=e,this.leaf=!1}}},17445:(e,t,s)=>{s.d(t,{N1:()=>d,YP:()=>l,Z_:()=>m,gx:()=>u,nn:()=>y,on:()=>c,tX:()=>g}),s(66643),s(46791);var i=s(91460),n=s(50758),r=s(70586),o=s(95330),a=s(26258);function l(e,t,s={}){return h(e,t,s,f)}function u(e,t,s={}){return h(e,t,s,p)}function h(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.hw)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.aQ)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.hw)(h),s(e)}const f=l(e,((e,s)=>{c(),(0,i.vT)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,n.kB)((()=>{f.remove(),c()})),h}function d(e,t){return function(e,t,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,n.AL)([(0,o.fu)(s,(()=>{l(),r((0,o.zE)())})),h(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??f)])}))}(e,p,t)}function f(e){return!0}function p(e){return!!e}s(87538);const m={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},16306:(e,t,s)=>{s.d(t,{aX:()=>I});var i=s(68773),n=s(20102),r=s(92604),o=s(38913),a=s(58901),l=s(73913),u=s(8744),h=s(40488),c=(s(66577),s(3172)),d=s(33955),f=s(11282),p=s(17452);async function m(e,t,s){const i="string"==typeof e?(0,p.mN)(e):e,n=t[0].spatialReference,r=(0,d.Ji)(t[0]),o={...s,query:{...i.query,f:"json",sr:(0,u.B9)(n),geometries:JSON.stringify((l=t,{geometryType:(0,d.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:a}=await(0,c.Z)(i.path+"/simplify",o);var l;return function(e,t,s){const i=(0,d.q9)(t);return e.map((e=>{const t=i.fromJSON(e);return t.spatialReference=s,t}))}(a.geometries,r,n)}const y=()=>r.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof a.Z||e instanceof o.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new n.Z(e)}const s=(0,l.x3)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],l=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),u=(a-r)/l,h=(o-n)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,o=h*i+n,a=u*i+r;s.push([o,a])}const e=(l+Math.floor(c-1)*t)/2,i=h*e+n,o=u*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.Z({rings:i,spatialReference:e.spatialReference}):new a.Z({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,h.Sx)(t,!0)}return s&&(e=(0,l.Sy)(e,s)),e}function S(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,l.XZ)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,l.XZ)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,l.XZ)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,l.XZ)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function b(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,l.x3)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.XZ)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(g(e))for(const t of(0,l.x3)(r))e[n]=e[n].addRing(t);else if(_(e))for(const t of(0,l.x3)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function I(e,t,s){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.default.geometryServiceUrl;let r,p,g,_,w,v,F,M,B=0;const z=[],E=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,p=(0,u.C5)(r),g=r.isWebMercator,v=g?102100:4326,_=l.UZ[v].maxX,w=l.UZ[v].minX,F=l.UZ[v].plus180Line,M=l.UZ[v].minus180Line),p)if("mesh"===t.type)E.push(t);else if("point"===t.type)E.push(S(t.clone(),_,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>S(e,_,w))),E.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,p);E.push(e.rings?new o.Z(e):e)}else if(t.extent){const e=t.extent,s=(0,l.XZ)(e.xmin,w)*(2*_);let i=0===s?t.clone():(0,l.Sy)(t.clone(),s);e.offset(s,0),e.intersects(F)&&e.xmax!==_?(B=e.xmax>B?e.xmax:B,i=x(i,g),z.push(i),E.push("cut")):e.intersects(M)&&e.xmin!==w?(B=e.xmax*(2*_)>B?e.xmax*(2*_):B,i=x(i,g,360),z.push(i),E.push("cut")):E.push(i)}else E.push(t.clone());else E.push(t);else E.push(t);let R=(0,l.XZ)(B,_),T=-90;const Z=R,j=new a.Z;for(;R>0;){const e=360*R-180;j.addPath([[e,T],[e,-1*T]]),T*=-1,R--}if(z.length>0&&Z>0){const t=b(z,await async function(e,t,s,i){const n=(0,f.en)(e),r=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,u.B9)(r),target:JSON.stringify({geometryType:(0,d.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,c.Z)(n.path+"/cut",o),{cutIndexes:l,geometries:h=[]}=a.data;return{cutIndexes:l,geometries:h.map((e=>{const t=(0,d.im)(e);return t.spatialReference=r,t}))}}(n,z,j,s)),i=[],r=[];for(let s=0;s<E.length;s++){const n=E[s];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(g?(0,h.$)(n):n)}}if(!i.length)return r;const o=await m(n,i,s),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(g?(0,h.$)(o.shift()):o.shift())}return a}const q=[];for(let e=0;e<E.length;e++){const t=E[e];if("cut"!==t)q.push(t);else{const e=z.shift();q.push(!0===g?(0,h.$)(e):e)}}return q}},73913:(e,t,s)=>{s.d(t,{Sy:()=>l,UZ:()=>o,XZ:()=>a,x3:()=>u});var i=s(58901),n=s(82971),r=s(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator}),minus180Line:new i.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.Z({paths:[[[180,-180],[180,180]]],spatialReference:n.Z.WGS84}),minus180Line:new i.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:n.Z.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,r.oU)(e)?e.rings:e.paths}},37549:(e,t,s)=>{s.d(t,{H:()=>a});var i=s(80442),n=s(24133),r=s(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,i.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.cS)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},78990:(e,t,s)=>{s.d(t,{Z:()=>p});var i=s(67676),n=s(20102),r=s(32448),o=s(92604),a=s(60437),l=s(24470),u=s(98732),h=s(37549),c=s(42712),d=s(65326);const f=(0,a.Ue)();class p{constructor(e){this.geometryInfo=e,this._boundsStore=new h.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.Z,this.featureAdapter=d.n}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,c.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.pC)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.JR)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(this._markedIds.add(t),s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.$)(null!=i?i:(0,l.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.Z("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;this._markedIds.add(t);const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,u.$)((0,l.Ue)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},97845:(e,t,s)=>{s.r(t),s.d(t,{default:()=>I});var i=s(3172),n=s(66643),r=s(20102),o=s(92604),a=s(95330),l=s(33955),u=s(8744),h=s(98732),c=s(78990),d=s(37427),f=s(3489),p=s(92722),m=s(25278),y=s(23095),g=s(99514),_=s(86719),x=s(73012),S=s(25031);const b={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!1,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};class I{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e,t={}){this._loadOptions={url:e.url,customParameters:e.customParameters};const s=[],[i]=await Promise.all([e.url?this._fetch(t?.signal):null,this._checkProjection(e.spatialReference)]),n=(0,p.my)(i,{geometryType:e.geometryType}),o=e.fields||n.fields||[],a=null!=e.hasZ?e.hasZ:n.hasZ,l=n.geometryType;let h=e.objectIdField||n.objectIdFieldName||"__OBJECTID";const d=e.spatialReference||u.Zn;let y=e.timeInfo;o===n.fields&&n.unknownFields.length>0&&s.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:n.unknownFields}});const I=new g.Z(o);let w=I.get(h);w?("esriFieldTypeString"!==w.type&&(w.type="esriFieldTypeOID"),w.editable=!1,w.nullable=!1,h=w.name):(w={alias:h,name:h,type:"string"===n.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(w));const v={};for(const e of o){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new r.Z("geojson-layer:invalid-field-name","field name is missing",{field:e});if(!_.v.jsonValues.includes(e.type))throw new r.Z("geojson-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});if(e.name!==w.name){const t=(0,x.os)(e);void 0!==t&&(v[e.name]=t)}null==e.length&&(e.length=(0,x.ZR)(e))}if(y){if(y.startTimeField){const e=I.get(y.startTimeField);e?(y.startTimeField=e.name,e.type="esriFieldTypeDate"):y.startTimeField=null}if(y.endTimeField){const e=I.get(y.endTimeField);e?(y.endTimeField=e.name,e.type="esriFieldTypeDate"):y.endTimeField=null}if(y.trackIdField){const e=I.get(y.trackIdField);e?y.trackIdField=e.name:(y.trackIdField=null,s.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:y}}))}y.startTimeField||y.endTimeField||(s.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:y}}),y=null)}const F=l?(0,m.bU)(l):void 0,M=I.dateFields.length?{timeZoneIANA:S.pt}:null,B={warnings:s,featureErrors:[],layerDefinition:{...b,drawingInfo:F??void 0,templates:(0,m.Hq)(v),extent:void 0,geometryType:l,objectIdField:h,fields:o,hasZ:!!a,timeInfo:y,dateFieldsTimeReference:M}};this._queryEngine=new f.q({fieldsIndex:g.Z.fromLayerJSON({fields:o,timeInfo:y,dateFieldsTimeReference:M}),geometryType:l,hasM:!1,hasZ:a,objectIdField:h,spatialReference:d,timeInfo:y,featureStore:new c.Z({geometryType:l,hasM:!1,hasZ:a}),cacheSpatialQueries:!0});const z=this._queryEngine.fieldsIndex.requiredFields.indexOf(w);z>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(z,1),this._createDefaultAttributes=(0,m.Dm)(v,h);const E=await this._createFeatures(i);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,E);const R=this._normalizeFeatures(E,B.featureErrors);this._queryEngine.featureStore.addMany(R);const{fullExtent:T,timeExtent:Z}=await this._queryEngine.fetchRecomputedExtents();if(B.layerDefinition.extent=T,Z){const{start:e,end:t}=Z;B.layerDefinition.timeInfo.timeExtent=[e,t]}return B}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([(0,y.b)(t,s),(0,d._W)(e.adds,t),(0,d._W)(e.updates,t)]),await this._waitSnapshotComplete(),this._applyEdits(e)}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,n.vr)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,e);const t=this._normalizeFeatures(e);t&&this._queryEngine.featureStore.addMany(t)}),(e=>{this._queryEngine.featureStore.clear(),(0,a.D_)(e)||o.Z.getLogger("esri.layers.GeoJSONLayer").error(new r.Z("geojson-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:s}}async _createFeatures(e){if(null==e)return[];const{geometryType:t,hasZ:s,objectIdField:i}=this._queryEngine,n=(0,p.lG)(e,{geometryType:t,hasZ:s,objectIdField:i});if(!(0,u.fS)(this._queryEngine.spatialReference,u.Zn))for(const e of n)null!=e.geometry&&(e.geometry=(0,h.GH)((0,d.iV)((0,h.di)(e.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),u.Zn,this._queryEngine.spatialReference)));return n}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:s}=this._loadOptions,n=(await(0,i.Z)(t,{responseType:"json",query:{...s},signal:e})).data;return(0,p.O3)(n),n}_normalizeFeatures(e,t){const{objectIdField:s,fieldsIndex:i}=this._queryEngine,n=[];for(const r of e){const e=this._createDefaultAttributes(),o=(0,y.O0)(i,e,r.attributes,!0);o?t?.push(o):(this._assignObjectId(e,r.attributes,!0),r.attributes=e,r.objectId=e[s],n.push(r))}return n}async _applyEdits(e){const{adds:t,updates:s,deletes:i}=e,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(n,t),s?.length&&this._applyUpdateEdits(n,s),i?.length){for(const e of i)n.deleteResults.push((0,y.d1)(e));this._queryEngine.featureStore.removeManyById(i)}const{fullExtent:r,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:r,timeExtent:o,featureEditResults:n}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:i,hasM:n,hasZ:r,objectIdField:o,spatialReference:a,featureStore:u,fieldsIndex:c}=this._queryEngine,f=[];for(const n of t){if(n.geometry&&i!==(0,l.Ji)(n.geometry)){s.push((0,y.av)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=(0,y.O0)(c,t,n.attributes);if(r)s.push(r);else{if(this._assignObjectId(t,n.attributes),n.attributes=t,null!=n.uid){const t=n.attributes[o];e.uidToObjectId[n.uid]=t}if(null!=n.geometry){const e=n.geometry.spatialReference??a;n.geometry=(0,d.iV)((0,y.og)(n.geometry,e),e,a)}f.push(n),s.push((0,y.d1)(n.attributes[o]))}}u.addMany((0,h.Yn)([],f,i,r,n,o))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:i,hasZ:n,objectIdField:r,spatialReference:o,featureStore:a,fieldsIndex:u}=this._queryEngine;for(const c of t){const{attributes:t,geometry:f}=c,p=t?.[r];if(null==p){e.push((0,y.av)(`Identifier field ${r} missing`));continue}if(!a.has(p)){e.push((0,y.av)(`Feature with object id ${p} missing`));continue}const m=(0,h.EI)(a.getFeature(p),s,n,i);if(null!=f){if(s!==(0,l.Ji)(f)){e.push((0,y.av)("Incorrect geometry type."));continue}const t=f.spatialReference??o;m.geometry=(0,d.iV)((0,y.og)(f,t),t,o)}if(t){const s=(0,y.O0)(u,m.attributes,t);if(s){e.push(s);continue}}a.add((0,h.XA)(m,s,n,i,r)),e.push((0,y.d1)(p))}}_createObjectIdGenerator(e,t){const s=e.fieldsIndex.get(e.objectIdField);if("esriFieldTypeString"===s.type)return()=>s.name+"-"+Date.now().toString(16);let i=Number.NEGATIVE_INFINITY;for(const e of t)e.objectId&&(i=Math.max(i,e.objectId));return i=Math.max(0,i)+1,()=>i++}_assignObjectId(e,t,s=!1){const i=this._queryEngine.objectIdField;e[i]=s&&i in t?t[i]:this._objectIdGenerator()}async _checkProjection(e){try{await(0,d._W)(u.Zn,e)}catch{throw new r.Z("geojson-layer","Projection not supported")}}}},92722:(e,t,s)=>{s.d(t,{O3:()=>w,lG:()=>F,my:()=>v,q9:()=>h});var i=s(20188),n=s(20102),r=s(8744),o=s(70272),a=s(5428),l=s(73012);const u={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function h(e){return u[e]}function*c(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*d(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function f(e){for(const t of e)if(t.length>2)return!0;return!1}function p(e){let t=0;for(let s=0;s<e.length;s++){const i=e[s],n=e[(s+1)%e.length];t+=i[0]*n[1]-n[0]*i[1]}return t<=0}function m(e){const t=e[0],s=e[e.length-1];return t[0]===s[0]&&t[1]===s[1]&&t[2]===s[2]||e.push(t),e}function y(e,t,s){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,s){return x(e,t.coordinates,s),e}(e,t,s);case"MultiLineString":return function(e,t,s){for(const i of t.coordinates)x(e,i,s);return e}(e,t,s);case"MultiPolygon":return function(e,t,s){for(const i of t.coordinates){g(e,i[0],s);for(let t=1;t<i.length;t++)_(e,i[t],s)}return e}(e,t,s);case"Point":return function(e,t,s){return b(e,t.coordinates,s),e}(e,t,s);case"Polygon":return function(e,t,s){const i=t.coordinates;g(e,i[0],s);for(let t=1;t<i.length;t++)_(e,i[t],s);return e}(e,t,s)}}function g(e,t,s){const i=m(t);!function(e){return!p(e)}(i)?x(e,i,s):S(e,i,s)}function _(e,t,s){const i=m(t);!function(e){return p(e)}(i)?x(e,i,s):S(e,i,s)}function x(e,t,s){for(const i of t)b(e,i,s);e.lengths.push(t.length)}function S(e,t,s){for(let i=t.length-1;i>=0;i--)b(e,t[i],s);e.lengths.push(t.length)}function b(e,t,s){const[i,n,r]=t;e.coords.push(i,n),s.hasZ&&e.coords.push(r||0)}function I(e){switch(typeof e){case"string":return(0,i.mu)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function w(e,t=4326){if(!e)throw new n.Z("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new n.Z("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:s}=e;if(!s)return;const i="string"==typeof s?s:"name"===s.type?s.properties.name:"EPSG"===s.type?s.properties.code:null,o=(0,r.oR)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!i||!o.test(i))throw new n.Z("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:s})}function v(e,t={}){const s=[],i=new Set,n=new Set;let r,o=!1,a=null,u=!1,{geometryType:p=null}=t,m=!1;for(const t of c(e)){const{geometry:e,properties:c,id:y}=t;if((!e||(p||(p=h(e.type)),h(e.type)===p))&&(o||(o=f(d(e))),u||(u=null!=y,u&&(r=typeof y,c&&(a=Object.keys(c).filter((e=>c[e]===y))))),c&&a&&u&&null!=y&&(a.length>1?a=a.filter((e=>c[e]===y)):1===a.length&&(a=c[a[0]]===y?a:[])),!m&&c)){let e=!0;for(const t in c){if(i.has(t))continue;const r=c[t];if(null==r){e=!1,n.add(t);continue}const o=I(r);if("unknown"===o){n.add(t);continue}n.delete(t),i.add(t);const a=(0,l.q6)(t);a&&s.push({name:a,alias:t,type:o})}m=e}}const y=(0,l.q6)(1===a?.length&&a[0]||null)??void 0;if(y)for(const e of s)if(e.name===y&&(0,l.H7)(e)){e.type="esriFieldTypeOID";break}return{fields:s,geometryType:p,hasZ:o,objectIdFieldName:y,objectIdFieldType:r,unknownFields:Array.from(n)}}function F(e,t){return Array.from(function*(e,t={}){const{geometryType:s,objectIdField:i}=t;for(const n of e){const{geometry:e,properties:r,id:l}=n;if(e&&h(e.type)!==s)continue;const u=r||{};let c;i&&(c=u[i],null==l||c||(u[i]=c=l));const d=new o.u_(e?y(new a.Z,e,t):null,u,null,c??void 0);yield d}}(c(e),t))}},25278:(e,t,s)=>{s.d(t,{Dm:()=>h,Hq:()=>c,MS:()=>d,bU:()=>a});var i=s(80442),n=s(22974),r=s(61159),o=s(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.I4:"esriGeometryPolyline"===e?o.ET:o.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function h(e,t){if((0,i.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this.${t} = null;`;for(const t in e)s+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},23095:(e,t,s)=>{s.d(t,{O0:()=>d,av:()=>l,b:()=>y,d1:()=>h,og:()=>m});var i=s(20188),n=s(8744),r=s(73012);class o{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function l(e){return new a(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function h(e){return new u(e)}const c=new Set;function d(e,t,s,i=!1){c.clear();for(const n in s){const o=e.get(n);if(!o)continue;const a=f(o,s[n]);if(c.add(o.name),o&&(i||o.editable)){const e=(0,r.Qc)(o,a);if(e)return l((0,r.vP)(e,o,a));t[o.name]=a}}for(const t of e?.requiredFields??[])if(!c.has(t.name))return l(`missing required field "${t.name}"`);return null}function f(e,t){let s=t;return(0,r.H7)(e)&&"string"==typeof t?s=parseFloat(t):(0,r.qN)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,r.y2)(e)&&"string"==typeof t&&(s=(0,i.sG)(t)),(0,r.Pz)(s)}let p;function m(e,t){if(!e||!(0,n.JY)(t))return e;if("rings"in e||"paths"in e){if(null==p)throw new TypeError("geometry engine not loaded");return p.simplify(t,e)}return e}async function y(e,t){!(0,n.JY)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==p&&(p=await Promise.all([s.e(5837),s.e(5946)]).then(s.bind(s,30247))),p}()}},11282:(e,t,s)=>{s.d(t,{cv:()=>a,en:()=>o,lA:()=>r}),s(68773),s(40330);var i=s(22974),n=s(17452);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.mN)(e):(0,i.d9)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){i[n]=[];for(let e=0;e<r.length;e++)i[n][e]=a(r[e])}else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(71058)},58333:(e,t,s)=>{s.d(t,{ET:()=>r,I4:()=>n,eG:()=>l,lF:()=>o,lj:()=>h,qP:()=>a,wW:()=>u});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8812],{79087:(t,e,s)=>{s.d(e,{Z:()=>O});const i=[["(",")"],[")","("],["<",">"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],n=["آ","أ","إ","ا"],r=["ﻵ","ﻷ","ﻹ","ﻻ"],h=["ﻶ","ﻸ","ﻺ","ﻼ"],o=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],a=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],c=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],u=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],l=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],_=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],f=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],p=["ء","ف"],d=["غ","ي"],g=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],m=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],P=0,x=1,y=2,b=3,M=4,S=5,C=6,w=7,z=8,A=10,v=11,L=12,T=18,E=["UBAT_L","UBAT_R","UBAT_EN","UBAT_AN","UBAT_ON","UBAT_B","UBAT_S","UBAT_AL","UBAT_WS","UBAT_CS","UBAT_ES","UBAT_ET","UBAT_NSM","UBAT_LRE","UBAT_RLE","UBAT_PDF","UBAT_LRO","UBAT_RLO","UBAT_BN"],I=100,k=[I+0,P,P,P,P,I+1,I+2,I+3,x,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,I+4,M,M,M,P,M,P,M,P,M,M,M,P,P,M,M,P,P,P,P,P,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,P,P,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,P,P,P,P,P,P,P,P,P,P,P,P,P,P,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,P,P,M,M,P,P,M,M,P,P,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,P,P,P,I+5,w,w,I+6,I+7],N=[[T,T,T,T,T,T,T,T,T,C,S,C,z,S,T,T,T,T,T,T,T,T,T,T,T,T,T,T,S,S,S,C,z,M,M,v,v,v,M,M,M,M,M,A,9,A,9,9,y,y,y,y,y,y,y,y,y,y,9,M,M,M,M,M,M,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,M,M,M,M,M,M,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,M,M,M,M,T,T,T,T,T,T,S,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,9,M,v,v,v,v,M,M,M,M,P,M,M,T,M,M,v,v,y,y,M,P,M,M,M,y,P,M,M,M,M,M,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,M,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,M,P,P,P,P,P,P,P,P],[P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,M,M,M,M,M,M,M,M,M,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,M,M,P,P,P,P,P,P,P,M,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,M,P,M,M,M,M,M,M,M,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,x,L,x,L,L,x,L,L,x,L,M,M,M,M,M,M,M,M,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,M,M,M,M,M,x,x,x,x,x,M,M,M,M,M,M,M,M,M,M,M],[b,b,b,b,M,M,M,M,w,v,v,w,9,w,M,M,L,L,L,L,L,L,L,L,L,L,L,w,M,M,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,b,b,b,b,b,b,b,b,b,b,v,b,b,w,w,w,L,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,L,L,L,L,L,L,L,b,M,L,L,L,L,L,L,w,w,L,L,M,L,L,L,L,w,w,y,y,y,y,y,y,y,y,y,y,w,w,w,w,w,w],[w,w,w,w,w,w,w,w,w,w,w,w,w,w,M,w,w,L,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,M,M,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,L,L,L,L,L,L,L,L,L,L,L,w,M,M,M,M,M,M,M,M,M,M,M,M,M,M,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,L,L,L,L,L,L,L,L,L,x,x,M,M,M,M,x,M,M,M,M,M],[z,z,z,z,z,z,z,z,z,z,z,T,T,T,P,x,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,z,S,13,14,15,16,17,9,v,v,v,v,v,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,9,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,z,T,T,T,T,T,M,M,M,M,M,T,T,T,T,T,T,y,P,M,M,y,y,y,y,y,y,A,A,M,M,M,P,y,y,y,y,y,y,y,y,y,y,A,A,M,M,M,M,P,P,P,P,P,P,P,P,P,P,P,P,P,M,M,M,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M],[P,P,P,P,P,P,P,M,M,M,M,M,M,M,M,M,M,M,M,P,P,P,P,P,M,M,M,M,M,x,L,x,x,x,x,x,x,x,x,x,x,A,x,x,x,x,x,x,x,x,x,x,x,x,x,M,x,x,x,x,x,M,x,M,x,x,M,x,x,M,x,x,x,x,x,x,x,x,x,x,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w],[L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,L,L,L,L,L,L,L,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,9,M,9,M,M,9,M,M,M,M,M,M,M,M,M,v,M,M,A,A,M,M,M,M,M,v,v,M,M,M,M,M,w,w,w,w,w,M,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,M,M,T],[M,M,M,v,v,v,M,M,M,M,M,A,9,A,9,9,y,y,y,y,y,y,y,y,y,y,9,M,M,M,M,M,M,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,M,M,M,M,M,M,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,M,M,M,M,M,M,M,M,M,M,M,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,M,M,M,P,P,P,P,P,P,M,M,P,P,P,P,P,P,M,M,P,P,P,P,P,P,M,M,P,P,P,M,M,M,v,v,M,M,M,v,v,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M,M]];class O{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,e,s){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(function(t,e,s){it=[],rt=[];for(let i=0;i<s;i++)t[i]=i,e[i]=i,it[i]=i}(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(e,s))return t;e=this.inputFormat,s=this.outputFormat;let i=t;const o=ht,u=Q(e.charAt(1)),_=Q(s.charAt(1)),p=("I"===e.charAt(0)?"L":e.charAt(0))+u,d=("I"===s.charAt(0)?"L":s.charAt(0))+_,g=e.charAt(2)+s.charAt(2);o.defInFormat=p,o.defOutFormat=d,o.defSwap=g;const m=F(t,p,d,g,o);let P=!1;return"R"===s.charAt(1)?P=!0:"C"!==s.charAt(1)&&"D"!==s.charAt(1)||(P="rtl"===this.checkContextual(m)),this.sourceToTarget=it,this.targetToSource=function(t){const e=new Array(t.length);for(let s=0;s<t.length;s++)e[t[s]]=s;return e}(this.sourceToTarget),nt=this.targetToSource,i=e.charAt(3)===s.charAt(3)?m:"S"===s.charAt(3)?function(t,e,s){if(0===e.length)return"";void 0===t&&(t=!0),void 0===s&&(s=!0);const i=(e=String(e)).split("");let n=0,o=1,u=i.length;t||(n=i.length-1,o=-1,u=1);const _=function(t,e,s,i,n){let o=0;const u=[];let _=0;for(let f=e;f*s<i;f+=s)if(Y(t[f])||K(t[f])){if("ل"===t[f]&&D(t,f+s,s,i)){t[f]=et(t[f+s],0===o?r:h),f+=s,tt(t,f,s,i),n&&(u[_]=f,_++),o=0;continue}const e=t[f];1===o?t[f]=H(t,f+s,s,i)?q(t[f]):$(t[f],c):!0===H(t,f+s,s,i)?t[f]=$(t[f],l):t[f]=$(t[f],a),K(e)||(o=1),!0===j(e)&&(o=0)}else o=0;return u}(i,n,o,u,s);let f="";for(let e=0;e<i.length;e++)s&&U(_,_.length,e)>-1?(st(nt,e,!t,-1),it.splice(e,1)):f+=i[e];return f}(P,m,!0):function(t,e,s){if(0===t.length)return"";void 0===s&&(s=!0),void 0===e&&(e=!0);let i="";const r=(t=String(t)).split("");for(let h=0;h<t.length;h++){let o=!1;if(r[h]>="ﹰ"&&r[h]<"\ufeff"){const a=t.charCodeAt(h);r[h]>="ﻵ"&&r[h]<="ﻼ"?(e?(h>0&&s&&" "===r[h-1]?i=i.substring(0,i.length-1)+"ل":(i+="ل",o=!0),i+=n[(a-65269)/2]):(i+=n[(a-65269)/2],i+="ل",h+1<t.length&&s&&" "===r[h+1]?h++:o=!0),o&&(st(nt,h,!0,1),it.splice(h,0,it[h]))):i+=f[a-65136]}else i+=r[h]}return i}(m,P,!0),this.sourceToTarget=it,this.targetToSource=nt,this.levels=rt,i}_inputFormatSetter(t){if(!lt.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!lt.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,e){return t?this._inputFormatSetter(t):t=this.inputFormat,e?this._outputFormatSetter(e):e=this.outputFormat,t!==e}checkContextual(t){let e=R(t);if("ltr"!==e&&"rtl"!==e){try{e=document.dir.toLowerCase()}catch(t){}"ltr"!==e&&"rtl"!==e&&(e="ltr")}return e}hasBidiChar(t){return _t.test(t)}}function F(t,e,s,i,n){const r=function(t,e,s){if(void 0===e.inFormat&&(e.inFormat=s.defInFormat),void 0===e.outFormat&&(e.outFormat=s.defOutFormat),void 0===e.swap&&(e.swap=s.defSwap),e.inFormat===e.outFormat)return e;const i=e.inFormat.substring(0,1),n=e.outFormat.substring(0,1);let r,h=e.inFormat.substring(1,4),o=e.outFormat.substring(1,4);return"C"===h.charAt(0)&&(r=R(t),h="ltr"===r||"rtl"===r?r.toUpperCase():"L"===e.inFormat.charAt(2)?"LTR":"RTL",e.inFormat=i+h),"C"===o.charAt(0)&&(r=R(t),"rtl"===r?o="RTL":"ltr"===r?(r=function(t){const e=t.split("");return e.reverse(),R(e.join(""))}(t),o=r.toUpperCase()):o="L"===e.outFormat.charAt(2)?"LTR":"RTL",e.outFormat=n+o),e}(t,{inFormat:e,outFormat:s,swap:i},n);if(r.inFormat===r.outFormat)return t;e=r.inFormat,s=r.outFormat,i=r.swap;const h=e.substring(0,1),o=e.substring(1,4),a=s.substring(0,1),c=s.substring(1,4);if(n.inFormat=e,n.outFormat=s,n.swap=i,"L"===h&&"VLTR"===s){if("LTR"===o)return n.dir=ct,G(t,n);if("RTL"===o)return n.dir=ut,G(t,n)}if("V"===h&&"V"===a)return n.dir="RTL"===o?ut:ct,V(t,n);if("L"===h&&"VRTL"===s)return"LTR"===o?(n.dir=ct,t=G(t,n)):(n.dir=ut,t=G(t,n)),V(t);if("VLTR"===e&&"LLTR"===s)return n.dir=ct,G(t,n);if("V"===h&&"L"===a&&o!==c)return t=V(t),"RTL"===o?F(t,"LLTR","VLTR",i,n):F(t,"LRTL","VRTL",i,n);if("VRTL"===e&&"LRTL"===s)return F(t,"LRTL","VRTL",i,n);if("L"===h&&"L"===a){const e=n.swap;return n.swap=e.substr(0,1)+"N","RTL"===o?(n.dir=ut,t=G(t,n),n.swap="N"+e.substr(1,2),n.dir=ct,t=G(t,n)):(n.dir=ct,t=G(t,n),n.swap="N"+e.substr(1,2),t=F(t,"VLTR","LRTL",n.swap,n)),t}return t}function R(t){const e=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(t);return e?e[0]<="z"?"ltr":"rtl":""}function G(t,e){const s=t.split(""),i=[];return B(s,i,e),function(t,e,s){if(0!==s.hiLevel&&s.swap.substr(0,1)!==s.swap.substr(1,2))for(let s=0;s<t.length;s++)1===e[s]&&(t[s]=Z(t[s]))}(s,i,e),W(2,s,i,e),W(1,s,i,e),rt=i,s.join("")}function B(t,e,s){const i=t.length,n=s.dir?m:g;let r=0,h=-1;const o=[],a=[];s.hiLevel=s.dir,s.lastArabic=!1,s.hasUbatAl=!1,s.hasUbatB=!1,s.hasUbatS=!1;for(let e=0;e<i;e++)o[e]=X(t[e]);for(let c=0;c<i;c++){const i=r,u=J(t,o,a,c,s);a[c]=u,r=n[i][u];const l=240&r;r&=15;const _=n[r][ot];if(e[c]=_,l>0)if(16===l){for(let t=h;t<c;t++)e[t]=1;h=-1}else h=-1;if(n[r][at])-1===h&&(h=c);else if(h>-1){for(let t=h;t<c;t++)e[t]=_;h=-1}o[c]===S&&(e[c]=0),s.hiLevel|=_}s.hasUbatS&&function(t,e,s,i){for(let n=0;n<s;n++)if(t[n]===C){e[n]=i.dir;for(let s=n-1;s>=0&&t[s]===z;s--)e[s]=i.dir}}(o,e,i,s)}function X(t){const e=t.charCodeAt(0),s=k[e>>8];return s<I?s:N[s-I][255&e]}function V(t,e){const s=t.split("");if(e){const t=[];B(s,t,e),rt=t}return s.reverse(),it.reverse(),s.join("")}function U(t,e,s){for(let i=0;i<e;i++)if(t[i]===s)return i;return-1}function Y(t){for(let e=0;e<p.length;e++)if(t>=p[e]&&t<=d[e])return!0;return!1}function H(t,e,s,i){for(;e*s<i&&K(t[e]);)e+=s;return!!(e*s<i&&Y(t[e]))}function D(t,e,s,i){for(;e*s<i&&K(t[e]);)e+=s;let r=" ";if(!(e*s<i))return!1;r=t[e];for(let t=0;t<n.length;t++)if(n[t]===r)return!0;return!1}function W(t,e,s,i){if(i.hiLevel<t)return;if(1===t&&i.dir===ut&&!i.hasUbatB)return e.reverse(),void it.reverse();const n=e.length;let r,h,o,a,c,u=0;for(;u<n;){if(s[u]>=t){for(r=u+1;r<n&&s[r]>=t;)r++;for(h=u,o=r-1;h<o;h++,o--)a=e[h],e[h]=e[o],e[o]=a,c=it[h],it[h]=it[o],it[o]=c;u=r}u++}}function J(t,e,s,i,n){const r=e[i];return{UBAT_L:()=>(n.lastArabic=!1,P),UBAT_R:()=>(n.lastArabic=!1,x),UBAT_ON:()=>M,UBAT_AN:()=>b,UBAT_EN:()=>n.lastArabic?b:y,UBAT_AL:()=>(n.lastArabic=!0,n.hasUbatAl=!0,x),UBAT_WS:()=>M,UBAT_CS:()=>{let t,r;return i<1||i+1>=e.length||(t=s[i-1])!==y&&t!==b||(r=e[i+1])!==y&&r!==b?M:(n.lastArabic&&(r=b),r===t?r:M)},UBAT_ES:()=>(i>0?s[i-1]:S)===y&&i+1<e.length&&e[i+1]===y?y:M,UBAT_ET:()=>{if(i>0&&s[i-1]===y)return y;if(n.lastArabic)return M;let t=i+1;const r=e.length;for(;t<r&&e[t]===v;)t++;return t<r&&e[t]===y?y:M},UBAT_NSM:()=>{if("VLTR"===n.inFormat){const s=e.length;let n=i+1;for(;n<s&&e[n]===L;)n++;if(n<s){const s=t[i].charCodeAt(0),r=s>=1425&&s<=2303||64286===s,h=e[n];if(r&&(h===x||h===w))return x}}return i<1||e[i-1]===S?M:s[i-1]},UBAT_B:()=>(n.lastArabic=!0,n.hasUbatB=!0,n.dir),UBAT_S:()=>(n.hasUbatS=!0,M),UBAT_LRE:()=>(n.lastArabic=!1,M),UBAT_RLE:()=>(n.lastArabic=!1,M),UBAT_LRO:()=>(n.lastArabic=!1,M),UBAT_RLO:()=>(n.lastArabic=!1,M),UBAT_PDF:()=>(n.lastArabic=!1,M),UBAT_BN:()=>M}[E[r]]()}function Z(t){let e,s=0,n=i.length-1;for(;s<=n;)if(e=Math.floor((s+n)/2),t<i[e][0])n=e-1;else{if(!(t>i[e][0]))return i[e][1];s=e+1}return t}function j(t){for(let e=0;e<_.length;e++)if(_[e]===t)return!0;return!1}function q(t){for(let e=0;e<o.length;e++)if(t===o[e])return u[e];return t}function $(t,e){for(let s=0;s<o.length;s++)if(t===o[s])return e[s];return t}function K(t){return t>="ً"&&t<="ٕ"}function Q(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function tt(t,e,s,i){for(;e*s<i&&K(t[e]);)e+=s;return e*s<i&&(t[e]=" ",!0)}function et(t,e){for(let s=0;s<n.length;s++)if(t===n[s])return e[s];return t}function st(t,e,s,i){for(let n=0;n<t.length;n++)(t[n]>e||!s&&t[n]===e)&&(t[n]+=i)}let it=[],nt=[],rt=[];const ht={dir:0,defInFormat:"LLTR",defoutFormat:"VLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,hasBlockSep:!1,hasSegSep:!1,defOutFormat:""},ot=5,at=6,ct=0,ut=1,lt=/^[(I|V)][(L|R|C|D)][(Y|N)][(S|N)][N]$/,_t=/[\u0591-\u06ff\ufb1d-\ufefc]/},13867:(t,e,s)=>{s.d(e,{z:()=>n});var i=s(69801);class n{constructor(t,e){this._storage=new i.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,s=1){this._storage.put(this,t,e,s,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69801:(t,e,s)=>{s.d(e,{WJ:()=>o,Xq:()=>h});var i,n,r=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class h{constructor(t,e,s){this.name=t,this._storage=e,this.id=a+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}getSize(t){return this._storage.getSize(this,t)}resetHitRate(){this._hit=this._miss=0}put(t,e,s,i=0){this._storage.put(this,t,e,s,i)}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}peek(t){return this._storage.peek(this,t)}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}updateSize(t,e,s){this._storage.updateSize(this,t,e,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class o{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.Z,this._users=new r.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,0),this._checkSizeLimits()}getSize(t,e){const s=t.id+e,i=this._db.get(s);return i?i.size:0}put(t,e,s,n,r){e=t.id+e;const h=this._db.get(e);if(h&&(this._size-=h.size,t.size-=h.size,this._db.delete(e),h.entry!==s&&this._notifyRemove(e,h.entry,i.ALL)),n>this._maxSize)return void this._notifyRemove(e,s,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${e}`),void this._notifyRemove(e,s,i.ALL);const o=1+Math.max(r,-3)- -3;this._db.set(e,{entry:s,size:n,lifetime:o,lives:o}),this._size+=n,t.size+=n,this._checkSizeLimits()}updateSize(t,e,s,n){e=t.id+e;const r=this._db.get(e);if(r&&r.entry===s){for(this._size-=r.size,t.size-=r.size;n>this._maxSize;){const t=this._notifyRemove(e,s,i.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);n=t}r.size=n,this._size+=n,t.size+=n,this._checkSizeLimits()}}pop(t,e){e=t.id+e;const s=this._db.get(e);if(s)return this._size-=s.size,t.size-=s.size,this._db.delete(e),++this._hit,s.entry;++this._miss}get(t,e){e=t.id+e;const s=this._db.get(e);if(void 0!==s)return this._db.delete(e),s.lives=s.lifetime,this._db.set(e,s),++this._hit,s.entry;++this._miss}peek(t,e){const s=this._db.get(t.id+e);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},s=new Array;this._db.forEach(((t,i)=>{const n=t.lifetime;s[n]=(s[n]||0)+t.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=e[r]||0;e[r]=s+t.size}}))}));const i={};this._users.forAll((t=>{const s=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const n=e[s]||0;e[s]=n,i[s]=Math.round(100*t.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(e);n.sort(((t,s)=>e[s]-e[t])),n.forEach((s=>t[s]=Math.round(e[s]/2**20)+"MB / "+i[s]));for(let e=s.length-1;e>=0;--e){const i=s[e];i&&(t["Priority "+(e+-3-1)]=Math.round(i/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,i.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,i.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,s){let i;return this._removeFuncs.some((n=>{if(t.startsWith(n[0])){const t=n[1](e,s);return"number"==typeof t&&(i=t),!0}return!1})),i}_checkSizeLimits(){if(this._size>this._maxSize)for(const[t,e]of this._db)if(this._purgeItem(t,e),this._size<=.9*this.maxSize)return;this._users.forEach((t=>{if(t.maxSize>0&&t.size>t.maxSize)for(const[e,s]of this._db)if(e.startsWith(t.id)&&(this._purgeItem(e,s,t),t.size<=.9*t.maxSize))return}))}_purgeItem(t,e,s=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,s&&(s.size-=e.size);const n=this._notifyRemove(t,e.entry,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),e.lives=e.lifetime,e.size=n,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let a=0},22862:(t,e,s)=>{s.d(e,{$c:()=>p,Hg:()=>d,V7:()=>f,uD:()=>_});var i=s(92036),n=s(46791),r=s(1153);const h=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function o(t){return t instanceof i.Z}function a(t){return t instanceof n.Z?Object.keys(t.items):o(t)?(0,r.vw)(t).keys():t?Object.keys(t):[]}function c(t,e){return t instanceof n.Z?t.items[e]:t[e]}function u(t){return t?t.declaredClass:null}function l(t,e){const s=t.diff;if(s&&"function"==typeof s)return s(t,e);const i=a(t),n=a(e);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(t,e){return!(!Array.isArray(t)||!Array.isArray(e))&&t.length!==e.length}(t,e))return{type:"complete",oldValue:t,newValue:e};const r=n.filter((t=>!i.includes(t))),_=i.filter((t=>!n.includes(t))),f=i.filter((s=>n.includes(s)&&c(t,s)!==c(e,s))).concat(r,_).sort(),p=u(t);if(p&&h.has(p)&&f.length)return{type:"complete",oldValue:t,newValue:e};let d;const g=o(t)&&o(e);for(const i of f){const n=c(t,i),r=c(e,i);let h;if((g||"function"!=typeof n&&"function"!=typeof r)&&n!==r&&(null!=n||null!=r)){if(s&&s[i]&&"function"==typeof s[i])h=s[i]?.(n,r);else if(n instanceof Date&&r instanceof Date){if(n.getTime()===r.getTime())continue;h={type:"complete",oldValue:n,newValue:r}}else h="object"==typeof n&&"object"==typeof r&&u(n)===u(r)?l(n,r):{type:"complete",oldValue:n,newValue:r};null!=h&&(null!=d?d.diff[i]=h:d={type:"partial",diff:{[i]:h}})}}return d}function _(t,e){if(null==t)return!1;const s=e.split(".");let i=t;for(const t of s){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const e=i.diff[t];if(!e)return!1;i=e}}return!0}function f(t,e){for(const s of e)if(_(t,s))return!0;return!1}function p(t,e){if(!t)return!1;if("partial"===t.type){const s=Object.keys(t.diff);return 1===s.length&&s[0]===e}return!1}function d(t,e){if("function"!=typeof t&&"function"!=typeof e&&(null!=t||null!=e))return null==t||null==e||"object"==typeof t&&"object"==typeof e&&u(t)!==u(e)?{type:"complete",oldValue:t,newValue:e}:l(t,e)}},57490:(t,e,s)=>{function i(){const t=new Float32Array(6);return t[0]=1,t[3]=1,t}function n(t,e,s,i){const n=e[i],r=e[i+1];t[i]=s[0]*n+s[2]*r+s[4],t[i+1]=s[1]*n+s[3]*r+s[5]}function r(t,e,s,i=0,r=0,h=2){const o=r||e.length/h;for(let r=i;r<o;r++)n(t,e,s,r*h)}s.d(e,{Ue:()=>i,Zz:()=>r}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){const e=new Float32Array(6);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},create:i,createView:function(t,e){return new Float32Array(t,e,6)},fromValues:function(t,e,s,i,n,r){const h=new Float32Array(6);return h[0]=t,h[1]=e,h[2]=s,h[3]=i,h[4]=n,h[5]=r,h},transform:n,transformMany:r},Symbol.toStringTag,{value:"Module"}))},10787:(t,e,s)=>{function i(){return new Float32Array(2)}function n(t,e){const s=new Float32Array(2);return s[0]=t,s[1]=e,s}function r(){return i()}function h(){return n(1,1)}function o(){return n(1,0)}function a(){return n(0,1)}s.d(e,{AG:()=>c,Ue:()=>i,al:()=>n,hq:()=>u});const c=r(),u=h(),l=o(),_=a();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:l,UNIT_Y:_,ZEROS:c,clone:function(t){const e=new Float32Array(2);return e[0]=t[0],e[1]=t[1],e},create:i,createView:function(t,e){return new Float32Array(t,e,2)},fromValues:n,ones:h,unitX:o,unitY:a,zeros:r},Symbol.toStringTag,{value:"Module"}))},55308:(t,e,s)=>{s.d(e,{Iu:()=>o,Jp:()=>r,U1:()=>h,Us:()=>a,yR:()=>n});var i=s(39514);function n(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function r(t,e,s){const i=e[0],n=e[1],r=e[2],h=e[3],o=e[4],a=e[5],c=s[0],u=s[1],l=s[2],_=s[3],f=s[4],p=s[5];return t[0]=i*c+r*u,t[1]=n*c+h*u,t[2]=i*l+r*_,t[3]=n*l+h*_,t[4]=i*f+r*p+o,t[5]=n*f+h*p+a,t}function h(t,e,s){const i=e[0],n=e[1],r=e[2],h=e[3],o=e[4],a=e[5],c=Math.sin(s),u=Math.cos(s);return t[0]=i*u+r*c,t[1]=n*u+h*c,t[2]=i*-c+r*u,t[3]=n*-c+h*u,t[4]=o,t[5]=a,t}function o(t,e,s){const i=e[0],n=e[1],r=e[2],h=e[3],o=e[4],a=e[5],c=s[0],u=s[1];return t[0]=i,t[1]=n,t[2]=r,t[3]=h,t[4]=i*c+r*u+o,t[5]=n*c+h*u+a,t}function a(t,e){const s=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=s,t[2]=-s,t[3]=i,t[4]=0,t[5]=0,t}function c(t,e,s){return t[0]=e[0]-s[0],t[1]=e[1]-s[1],t[2]=e[2]-s[2],t[3]=e[3]-s[3],t[4]=e[4]-s[4],t[5]=e[5]-s[5],t}const u=r,l=c;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,s){return t[0]=e[0]+s[0],t[1]=e[1]+s[1],t[2]=e[2]+s[2],t[3]=e[3]+s[3],t[4]=e[4]+s[4],t[5]=e[5]+s[5],t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},determinant:function(t){return t[0]*t[3]-t[1]*t[2]},equals:function(t,e){const s=t[0],n=t[1],r=t[2],h=t[3],o=t[4],a=t[5],c=e[0],u=e[1],l=e[2],_=e[3],f=e[4],p=e[5],d=(0,i.bn)();return Math.abs(s-c)<=d*Math.max(1,Math.abs(s),Math.abs(c))&&Math.abs(n-u)<=d*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(r-l)<=d*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(h-_)<=d*Math.max(1,Math.abs(h),Math.abs(_))&&Math.abs(o-f)<=d*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(a-p)<=d*Math.max(1,Math.abs(a),Math.abs(p))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+1)},fromRotation:a,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=e[1],t[4]=0,t[5]=0,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=e[0],t[5]=e[1],t},identity:n,invert:function(t,e){const s=e[0],i=e[1],n=e[2],r=e[3],h=e[4],o=e[5];let a=s*r-i*n;return a?(a=1/a,t[0]=r*a,t[1]=-i*a,t[2]=-n*a,t[3]=s*a,t[4]=(n*o-r*h)*a,t[5]=(i*h-s*o)*a,t):null},mul:u,multiply:r,multiplyScalar:function(t,e,s){return t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t[3]=e[3]*s,t[4]=e[4]*s,t[5]=e[5]*s,t},multiplyScalarAndAdd:function(t,e,s,i){return t[0]=e[0]+s[0]*i,t[1]=e[1]+s[1]*i,t[2]=e[2]+s[2]*i,t[3]=e[3]+s[3]*i,t[4]=e[4]+s[4]*i,t[5]=e[5]+s[5]*i,t},rotate:h,scale:function(t,e,s){const i=e[0],n=e[1],r=e[2],h=e[3],o=e[4],a=e[5],c=s[0],u=s[1];return t[0]=i*c,t[1]=n*c,t[2]=r*u,t[3]=h*u,t[4]=o,t[5]=a,t},set:function(t,e,s,i,n,r,h){return t[0]=e,t[1]=s,t[2]=i,t[3]=n,t[4]=r,t[5]=h,t},str:function(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"},sub:l,subtract:c,translate:o},Symbol.toStringTag,{value:"Module"}))},23727:(t,e,s)=>{s.d(e,{TE:()=>a,U1:()=>p,iu:()=>f,t7:()=>_,t8:()=>n});var i=s(39514);function n(t,e,s){return t[0]=e,t[1]=s,t}function r(t,e,s){return t[0]=e[0]-s[0],t[1]=e[1]-s[1],t}function h(t,e,s){return t[0]=e[0]*s[0],t[1]=e[1]*s[1],t}function o(t,e,s){return t[0]=e[0]/s[0],t[1]=e[1]/s[1],t}function a(t,e){const s=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(s*s+i*i)}function c(t,e){const s=e[0]-t[0],i=e[1]-t[1];return s*s+i*i}function u(t){const e=t[0],s=t[1];return Math.sqrt(e*e+s*s)}function l(t){const e=t[0],s=t[1];return e*e+s*s}function _(t,e,s,i){const n=e[0],r=e[1];return t[0]=n+i*(s[0]-n),t[1]=r+i*(s[1]-r),t}function f(t,e,s){const i=e[0],n=e[1];return t[0]=s[0]*i+s[2]*n+s[4],t[1]=s[1]*i+s[3]*n+s[5],t}function p(t,e,s,i){const n=e[0]-s[0],r=e[1]-s[1],h=Math.sin(i),o=Math.cos(i);return t[0]=n*o-r*h+s[0],t[1]=n*h+r*o+s[1],t}const d=u,g=r,m=h,P=o,x=a,y=c,b=l;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,s){return t[0]=e[0]+s[0],t[1]=e[1]+s[1],t},angle:function(t,e){const s=t[0],i=t[1],n=e[0],r=e[1];let h=s*s+i*i;h>0&&(h=1/Math.sqrt(h));let o=n*n+r*r;o>0&&(o=1/Math.sqrt(o));const a=(s*n+i*r)*h*o;return a>1?0:a<-1?Math.PI:Math.acos(a)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},cross:function(t,e,s){const i=e[0]*s[1]-e[1]*s[0];return t[0]=t[1]=0,t[2]=i,t},dist:x,distance:a,div:P,divide:o,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:function(t,e){const s=t[0],n=t[1],r=e[0],h=e[1],o=(0,i.bn)();return Math.abs(s-r)<=o*Math.max(1,Math.abs(s),Math.abs(r))&&Math.abs(n-h)<=o*Math.max(1,Math.abs(n),Math.abs(h))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:d,length:u,lerp:_,max:function(t,e,s){return t[0]=Math.max(e[0],s[0]),t[1]=Math.max(e[1],s[1]),t},min:function(t,e,s){return t[0]=Math.min(e[0],s[0]),t[1]=Math.min(e[1],s[1]),t},mul:m,multiply:h,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:function(t,e){const s=e[0],i=e[1];let n=s*s+i*i;return n>0&&(n=1/Math.sqrt(n),t[0]=e[0]*n,t[1]=e[1]*n),t},projectAndScale:function(t,e,s,i,n){let r=e[0]-s[0],h=e[1]-s[1];const o=(i[0]*r+i[1]*h)*(n-1);return r=i[0]*o,h=i[1]*o,t[0]=e[0]+r,t[1]=e[1]+h,t},random:function(t,e){e=e||1;const s=2*(0,i.FD)()*Math.PI;return t[0]=Math.cos(s)*e,t[1]=Math.sin(s)*e,t},rotate:p,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:function(t,e,s){return t[0]=e[0]*s,t[1]=e[1]*s,t},scaleAndAdd:function(t,e,s,i){return t[0]=e[0]+s[0]*i,t[1]=e[1]+s[1]*i,t},set:n,sqrDist:y,sqrLen:b,squaredDistance:c,squaredLength:l,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:g,subtract:r,transformMat2:function(t,e,s){const i=e[0],n=e[1];return t[0]=s[0]*i+s[2]*n,t[1]=s[1]*i+s[3]*n,t},transformMat2d:f,transformMat3:function(t,e,s){const i=e[0],n=e[1];return t[0]=s[0]*i+s[3]*n+s[6],t[1]=s[1]*i+s[4]*n+s[7],t},transformMat4:function(t,e,s){const i=e[0],n=e[1];return t[0]=s[0]*i+s[4]*n+s[12],t[1]=s[1]*i+s[5]*n+s[13],t}},Symbol.toStringTag,{value:"Module"}))},58835:(t,e,s)=>{s.d(e,{z:()=>o});var i=s(22974),n=s(95961),r=s(33955),h=s(5428);class o{static fromOptimized(t,e,s=!1,i=!1,n=1){return(new a).initialize(t,e,s,i,n)}static fromJSON(t,e=!1,s=!1){const[i,n]=u(t);return(new l).initialize(i,n,e,s,1)}static fromOptimizedCIM(t,e,s=!1,i=!1,n=1){return(new _).initialize(t,e,s,i,n)}static fromJSONCIM(t,e=!1,s=!1,i=1){const[n,r]=u(t);return(new f).initialize(n,r,e,s,i)}static fromFeatureSetReader(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimized(e,s):null}static fromFeatureSetReaderCIM(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimizedCIM(e,s):null}static createEmptyOptimized(t,e=!1,s=!1,i=1){return(new a).initialize(new h.Z,t,e,s,i)}static createEmptyJSON(t,e=!1,s=!1){return(new l).initialize([],t,e,s,1)}static createEmptyOptimizedCIM(t,e=!1,s=!1,i=1){return(new _).initialize(new h.Z,t,e,s,i)}static createEmptyJSONCIM(t,e=!1,s=!1,i=1){return(new f).initialize([],t,e,s,i)}asJSON(){const t=(0,n.M)(this);return"esriGeometryEnvelope"===this.geometryType?{xmin:t[0][0][0],ymin:t[0][0][1],xmax:t[0][2][0],ymax:t[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:t.flat()}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1]}:"esriGeometryPolygon"===this.geometryType?{rings:t}:{paths:t}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,s=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;const i=t,n=e;for(;this.nextPoint();)s+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return s+=(t-i)*(e+n),-.5*s}invertY(){this.yFactor*=-1}}class a extends o{constructor(){super(...arguments),this._end=-1}initialize(t,e,s,i,n){return this.hasZ=s,this.hasM=i,this.geometryType=e,this._stride=2+Number(s)+Number(i),this._geometry=t,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=n,this}reset(){this.initialize(this._geometry,this.geometryType,this.hasZ,this.hasM,this.yFactor)}seekPath(t){if(t>=0&&t<this.totalSize){if(this._pathIndex<t)for(;this._pathIndex<t&&this.nextPath(););else if(this._pathIndex>t)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){const e=this._pathOffset+t*this._stride;return e>=0&&e<this._end&&(this._pointOffset=e,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1||(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,0))}prevPath(){return!(this.pathIndex<=0||(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,0))}pathLength(){const t=this._end,e=this._stride,s=this._geometry.coords;let i=0;for(let n=this._pathOffset+e;n<t;n+=e){const t=s[n-e],r=s[n-e+1],h=s[n]-t,o=s[n+1]-r;i+=Math.sqrt(h*h+o*o)}return i}startPath(){this._geometry.lengths.push(0)}pushPath(t){this.startPath(),this.pushPoints(t)}pushPoint(t){for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]++}pushXY(t,e){this._geometry.coords.push(t,e),this._geometry.lengths[this.totalSize-1]++}pushPoints(t){for(const e of t)for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]+=t.length}pushCursor(t){const e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){const t=this._geometry.clone();if(1!==this.yFactor)for(let e=1;e<t.coords.length;e+=this._stride)t.coords[e]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(t.lengths.length=0),t}isClosed(){const t=this._geometry.coords,e=this._pathOffset,s=this._end-this._stride;for(let i=0;i<this._stride;i++)if(t[e+i]!==t[s+i])return!1;return!0}clone(){return(new a).initialize(this._geometry.clone(),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce(((t,e)=>t+e))}get pathSize(){const{lengths:t}=this._geometry;return this._pathIndex<0||this._pathIndex>t.length-1?0:this._geometry.isPoint?1:t[this._pathIndex]}get totalSize(){return this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){const t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function c(t){const e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e}function u(t){return(0,r.oU)(t)?[t.rings,"esriGeometryPolygon"]:(0,r.l9)(t)?[t.paths,"esriGeometryPolyline"]:(0,r.aW)(t)?[[t.points],"esriGeometryMultipoint"]:(0,r.YX)(t)?[[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]],"esriGeometryEnvelope"]:(0,r.wp)(t)?[[[c(t)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class l extends o{initialize(t,e,s,i,n){return this._paths=t,this.geometryType=e,this.hasZ=s,this.hasM=i,this._pathIndex=this._pointIndex=-1,this.yFactor=n,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t<this.totalSize&&(this._currentPath=this._paths[t],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(t){return t>=0&&t<this._currentPath.length&&(this._pointIndex=t,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){const t=this._currentPath.length,e=this._currentPath;let s=0;for(let i=1;i<t;i++){const t=e[i-1],n=e[i],r=t[0],h=t[1],o=n[0]-r,a=n[1]-h;s+=Math.sqrt(o*o+a*a)}return s}startPath(){this._paths.push([])}pushPath(t){this._paths.push(t)}pushPoint(t){this._paths[this.totalSize-1].push(t)}pushXY(t,e){this._paths[this.totalSize-1].push([t,e])}pushPoints(t){this._paths[this.totalSize-1].push(...t)}pushCursor(t){const e=(0,n.M)(t);for(const t of e)this.pushPath(t)}asOptimized(){const t=new h.Z;if("esriGeometryPoint"===this.geometryType)t.coords.push(...this._paths[0][0]),t.lengths.length=0;else for(const e of this._paths){for(const s of e)t.coords.push(s[0]),t.coords.push(s[1]*this.yFactor),this.hasZ&&t.coords.push(s[2]),this.hasM&&t.coords.push(s[this._mIndex]);t.lengths.push(e.length)}return t}isClosed(){const t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}clone(){return(new l).initialize((0,i.d9)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map((t=>t.length)).reduce(((t,e)=>t+e))}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(t){this._currentPoint[0]=t}get y(){return this.yFactor*this._currentPoint[1]}set y(t){this._currentPoint[1]=this.yFactor*t}get z(){return this._currentPoint[2]}set z(t){this._currentPoint[2]=t}get m(){return this._currentPoint[this._mIndex]}set m(t){this._currentPoint[this._mIndex]=t}get pathIndex(){return this._pathIndex}}class _ extends a{initialize(t,e,s,i,n){return super.initialize(t,e,s,i,n),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map((t=>new Set))),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const t=(new _).initialize(this._geometry.clone(),this.geometryType,this.hasZ,this.hasM,this.yFactor);return t._controlPoints=this._controlPoints,t}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(t){this._controlPoints[this.pathIndex].add(t)}getControlPointAt(t){return this._controlPoints[this.pathIndex].has(t)}}class f extends l{initialize(t,e,s,i,n){return super.initialize(t,e,s,i,n)}clone(){return(new f).initialize((0,i.d9)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][4]=1}getControlPoint(){return 1===this._paths[this.pathIndex][this._pointIndex][4]}setControlPointAt(t){this._paths[this.pathIndex][t][4]=1}getControlPointAt(t){return 1===this._paths[this.pathIndex][t][4]}}},32724:(t,e,s)=>{s.d(e,{r:()=>c});var i=s(24470),n=s(20322),r=s(35308),h=s(86662),o=s(87416);const a=222045e-19;function c(t){if(0===t.totalSize)return null;const e=(0,n.Cs)(t);if(!e)return null;const s=4*(Math.abs(e[0])+Math.abs(e[2])+Math.abs(e[1])+Math.abs(e[3])+1)*a;let h=0,o=0;t.reset();for(let e=0;t.nextPath();e++){const s=t.getCurrentRingArea();s>o&&(o=s,h=e)}if(t.seekPath(h),0===t.pathSize)return null;t.seekPathStart();const c=(0,n.qu)(t);if(Math.abs(o)<=2*s*s)return[(c[0]+c[2])/2,(c[1]+c[3])/2];t.seekPathStart();const f=(0,r.Zc)(t,(0,i.Ue)());if(null===f)return null;if(t.totalPoints<4)return f;const p=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],d=[NaN,NaN,NaN,NaN],g=[NaN,NaN,NaN,NaN];let m=!1,P=l(f,t,!0);0===P.distance&&(m=!0,p[0][0]=f[0],p[0][1]=f[1],P=l(f,t,!1)),d[0]=P.distance,g[0]=0;const x=[NaN,NaN];let S=!1,C=.25,w=-1,z=NaN;do{if(z=NaN,p[1]=_(t,y(c[0],c[2],C),0,e),isNaN(p[1][0])||isNaN(p[1][1])||(P=l(p[1],t,!1),z=P.distance),!isNaN(z)&&z>s&&u(p[1],t))S=!0,d[1]=z,g[1]=b(p[1],f);else if(!isNaN(z)&&z>w&&(w=z,x[0]=p[1][0],x[1]=p[1][1]),C-=.01,C<.1){if(!(w>=0))break;S=!0,d[1]=w,p[1][0]=x[0],p[1][1]=x[1],g[1]=b(p[1],f)}}while(!S);S=!1,C=.5,w=-1;let A=.01,v=1;do{if(z=NaN,p[2]=_(t,y(c[0],c[2],C),0,e),isNaN(p[2][0])||isNaN(p[2][1])||(P=l(p[2],t,!1),z=P.distance),!isNaN(z)&&z>s&&u(p[2],t))S=!0,d[2]=z,g[2]=b(p[2],f);else if(!isNaN(z)&&z>w)w=z,x[0]=p[2][0],x[1]=p[2][1];else if(z>w&&(w=z,x[0]=p[2][0],x[1]=p[2][1]),C=.5+A*v,A+=.01,v*=-1,C<.3||C>.7){if(!(w>=0))break;S=!0,d[2]=w,p[2][0]=x[0],p[2][1]=x[1],g[2]=b(p[2],f)}}while(!S);S=!1,C=.75,w=-1;do{if(z=NaN,p[3]=_(t,y(c[0],c[2],C),0,e),isNaN(p[3][0])||isNaN(p[3][1])||(P=l(p[3],t,!1),z=P.distance),!isNaN(z)&&z>s&&u(p[3],t))S=!0,d[3]=z,g[3]=b(p[3],f);else if(z>w&&(w=z,x[0]=p[3][0],x[1]=p[3][1]),C+=.01,C>.9){if(!(w>=0))break;S=!0,d[3]=w,p[3][0]=x[0],p[3][1]=x[1],g[3]=b(p[3],f)}}while(!S);const L=[0,1,2,3],T=m?0:1;let E;for(let t=T;t<4;t++)for(let t=T;t<3;t++){const e=g[t],s=g[t+1];M(e,s)>0&&(E=L[t],L[t]=L[t+1],L[t+1]=E,g[t]=s,g[t+1]=e)}let I=T,k=0,N=0;for(let t=T;t<4;t++){switch(t){case 0:N=2*d[L[t]];break;case 1:N=1.66666666*d[L[t]];break;case 2:N=1.33333333*d[L[t]];break;case 3:N=d[L[t]]}N>k&&(k=N,I=L[t])}return p[I]}function u(t,e){let s,i,n,r,h=0;for(e.reset();e.nextPath()&&e.nextPoint();)for(s=e.x,i=e.y;e.nextPoint();s=n,i=r)n=e.x,r=e.y,i>t[1]!=r>t[1]&&((n-s)*(t[1]-i)-(r-i)*(t[0]-s)>0?h++:h--);return 0!==h}function l(t,e,s){if(s&&u(t,e))return{coord:t,distance:0};let i=1/0,n=0,r=0,o=[0,0],a=[0,0];const c=[0,0];for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(o[0]=e.x,o[1]=e.y;e.nextPoint();o=a){a=[e.x,e.y],(0,h.r8)(c,t,o,a);const s=b(t,c);s<i&&(i=s,n=c[0],r=c[1])}return{coord:[n,r],distance:Math.sqrt(i)}}function _(t,e,s,n){const r=[e,0];let h=1/0,a=1/0,c=!1,u=!1;const l=[[e,n[1]-1],[e,n[3]+1]],_=[0,0],p=[0,0],d=[0,0],g=[[0,0],[0,0]],m=(0,i.Ue)();for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(g[0][0]=t.x,g[0][1]=t.y;t.nextPoint();g[0][0]=g[1][0],g[0][1]=g[1][1]){if(g[1][0]=t.x,g[1][1]=t.y,null===f(m,g))continue;if(p[0]=l[0][0],p[1]=l[0][1],d[0]=l[1][0],d[1]=l[1][1],0===P(m,p,d))continue;if(!(0,o.UT)(l[0],l[1],g[0],g[1],_))continue;const e=_[1];h>a?e<h&&(h=e,c=!0):e<a&&(a=e,u=!0)}return c&&u?r[1]=(h+a)/2:r[0]=r[1]=NaN,r}function f(t,e){if(e.length<2)return null;t||(t=(0,i.Ue)());const[s,n]=e[0],[r,h]=e[1];return t[0]=Math.min(s,r),t[1]=Math.min(n,h),t[2]=Math.max(s,r),t[3]=Math.max(n,h),t}const p=1,d=4,g=3,m=12;function P(t,e,s){let i=x(e,t),n=x(s,t);const r=t[0],h=t[1],o=t[2],a=t[3];if(i&n)return 0;if(!(i|n))return 4;const c=(i?1:0)|(n?2:0);do{const c=s[0]-e[0],u=s[1]-e[1];if(c>u)i&g?(i&p?(e[1]+=u*(r-e[0])/c,e[0]=r):(e[1]+=u*(o-e[0])/c,e[0]=o),i=x(e,t)):n&g?(n&p?(s[1]+=u*(r-s[0])/c,s[0]=r):(s[1]+=u*(o-s[0])/c,s[0]=o),n=x(s,t)):i?(i&d?(e[0]+=c*(h-e[1])/u,e[1]=h):(e[0]+=c*(a-e[1])/u,e[1]=a),i=x(e,t)):(n&d?(s[0]+=c*(h-s[1])/u,s[1]=h):(s[0]+=c*(a-s[1])/u,s[1]=a),n=x(s,t));else if(i&m?(i&d?(e[0]+=c*(h-e[1])/u,e[1]=h):(e[0]+=c*(a-e[1])/u,e[1]=a),i=x(e,t)):n&m?(n&d?(s[0]+=c*(h-s[1])/u,s[1]=h):(s[0]+=c*(a-s[1])/u,s[1]=a),n=x(s,t)):i?(i&p?(e[1]+=u*(r-e[0])/c,e[0]=r):(e[1]+=u*(o-e[0])/c,e[0]=o),i=x(e,t)):(n&p?(s[1]+=u*(r-s[0])/c,s[0]=r):(s[1]+=u*(o-s[0])/c,s[0]=o),n=x(s,t)),i&n)return 0}while(i|n);return c}function x(t,e){return(t[0]<e[0]?1:0)|(t[0]>e[2]?1:0)<<1|(t[1]<e[1]?1:0)<<2|(t[1]>e[3]?1:0)<<3}function y(t,e,s){return t+(e-t)*s}function b(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function M(t,e){if(t<e)return-1;if(t>e)return 1;if(t===e)return 0;const s=isNaN(t),i=isNaN(e);return s<i?-1:s>i?1:0}},21793:(t,e,s)=>{s.d(e,{L:()=>a,z:()=>o});var i=s(58835),n=s(59255);const r=512;let h;class o{constructor(t){this._geometry=t}next(){const t=this._geometry;return this._geometry=null,t}}function a(t,e){h||(h=new n.bN(0,0,0,1));const s="esriGeometryPolygon"===t.geometryType,o=s?n.Vl.Polygon:n.Vl.LineString,a=s?3:2;let c,u;for(h.reset(o),h.setPixelMargin(e+1),h.setExtent(r);t.nextPath();)if(!(t.pathSize<a)){for(t.nextPoint(),c=t.x,u=-t.y,h.moveTo(c,u);t.nextPoint();)c=t.x,u=-t.y,h.lineTo(c,u);s&&h.close()}const l=h.result(!1);if(l){const e=i.z.createEmptyOptimizedCIM(t.geometryType);for(const t of l){e.startPath();for(const s of t)e.pushXY(s.x,-s.y)}return e.reset(),e}return null}},66221:(t,e,s)=>{s.d(e,{h:()=>yt,W:()=>bt});class i{static local(){return null===i.instance&&(i.instance=new i),i.instance}execute(t,e,s,i,r){return new n(t,e,s)}}i.instance=null;class n{constructor(t,e,s){this._inputGeometries=t,this._angleTolerance=void 0!==e.angleTolerance?e.angleTolerance:120,this._maxCosAngle=Math.cos((1-Math.abs(this._angleTolerance)/180)*Math.PI)}next(){let t=this._inputGeometries.next();for(;t;){if("esriGeometryPolygon"===t.geometryType)this._isClosed=!0;else if("esriGeometryPolyline"===t.geometryType)this._isClosed=!1;else{if("esriGeometryEnvelope"!==t.geometryType){t=this._inputGeometries.next();continue}if(this._maxCosAngle)return t;this._isClosed=!0}for(;t.nextPath();)this._processPath(t);return t.reset(),t}return null}_processPath(t){if(t.nextPoint()){const e=t.x,s=t.y;let i=e,n=s,r=t.pathSize,h=0,o=0,a=0,c=0,u=0,l=0;this._isClosed&&++r;for(let _=1;t.nextPoint()||_<r;++_){let f,p;this._isClosed&&_===r-1?(f=e,p=s):(f=t.x,p=t.y);const d=f-i,g=p-n,m=Math.sqrt(d*d+g*g);_>1&&m>0&&a>0&&(h*d+o*g)/m/a<=this._maxCosAngle&&t.setControlPointAt(_-1),1===_&&(c=d,u=g,l=m),m>0&&(i=f,n=p,h=d,o=g,a=m)}this._isClosed&&a>0&&l>0&&(h*c+o*u)/l/a<=this._maxCosAngle&&t.setControlPointAt(0)}}}var r=s(58835),h=s(95961);class o{constructor(){this.setIdentity()}getAngle(){return(null==this.rz||0===this.rz&&1!==this.rzCos&&0!==this.rzSin)&&(this.rz=Math.atan2(this.rzSin,this.rzCos)),this.rz}setIdentity(){this.tx=0,this.ty=0,this.tz=0,this.s=1,this.rx=0,this.ry=0,this.rz=0,this.rzCos=1,this.rzSin=0}setTranslate(t,e){this.tx=t,this.ty=e}setTranslateZ(t){this.tz=t}setRotateCS(t,e){this.rz=void 0,this.rzCos=t,this.rzSin=e}setRotate(t){this.rz=t,this.rzCos=void 0,this.rzSin=void 0}setRotateY(t){this.ry=t}setScale(t){this.s=t}setMeasure(t){this.m=t}}function a(t,e){t[4]=e}class c{constructor(t,e=!0,s=!0,i=0){this.isClosed=!1,this.geometryCursor=null,this.geometryCursor=!e&&"esriGeometryPolygon"===t.geometryType||!s&&"esriGeometryPolyline"===t.geometryType?null:t,this.geomUnitsPerPoint=i,this.iteratePath=!1,this.internalPlacement=new o}next(){if(!this.geometryCursor)return null;for(;this.iteratePath||this.geometryCursor.pathIndex<this.geometryCursor.totalSize-1;){this.iteratePath||this.geometryCursor.nextPath();const t=this.processPath(this.geometryCursor);if(t)return t}return this.geometryCursor=null,null}}class u{constructor(t,e,s,i=0){this.isClosed=!1,this.inputGeometries=t,this.acceptPolygon=e,this.acceptPolyline=s,this.geomUnitsPerPoint=i,this.iteratePath=!1,this.multiPathCursor=null}next(){for(;;){if(!this.multiPathCursor){let t=this.inputGeometries.next();for(;t&&(this.isClosed=this.acceptPolygon&&"esriGeometryPolygon"===t.geometryType||"esriGeometryEnvelope"===t.geometryType,this.multiPathCursor=t,!this.multiPathCursor);)t=this.inputGeometries.next();if(!this.multiPathCursor)return null}for(;this.iteratePath||this.multiPathCursor.nextPath();){this.multiPathCursor.seekPathStart();const t=this.processPath(this.multiPathCursor);if(t)return t}this.multiPathCursor=null}}}var l=s(95648);const _=.03;class f{constructor(t=0,e=!1){}isEmpty(t){if(!t.nextPoint())return!0;let e,s,i,n;for(e=t.x,s=t.y;t.nextPoint();e=s,s=n)if(i=t.x,n=t.y,i!==e||n!==s)return t.seekPathStart(),!1;return t.seekPathStart(),!0}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);0!==e&&(t[0]/=e,t[1]/=e)}getLength(t,e,s,i){const n=s-t,r=i-e;return Math.sqrt(n*n+r*r)}getSegLength(t){const[[e,s],[i,n]]=t;return this.getLength(e,s,i,n)}getCoord2D(t,e,s,i,n){return[t+(s-t)*n,e+(i-e)*n]}getSegCoord2D(t,e){const[[s,i],[n,r]]=t;return this.getCoord2D(s,i,n,r,e)}getAngle(t,e,s,i,n){const r=s-t,h=i-e;return Math.atan2(h,r)}getAngleCS(t,e,s,i,n){const r=s-t,h=i-e,o=Math.sqrt(r*r+h*h);return o>0?[r/o,h/o]:[1,0]}getSegAngleCS(t,e){const[[s,i],[n,r]]=t;return this.getAngleCS(s,i,n,r,e)}cut(t,e,s,i,n,r){return[n<=0?[t,e]:this.getCoord2D(t,e,s,i,n),r>=1?[s,i]:this.getCoord2D(t,e,s,i,r)]}getSubCurve(t,e,s){const i=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");return this.appendSubCurve(i,t,e,s)?i:null}appendSubCurve(t,e,s,i){t.startPath(),e.seekPathStart();let n=0,r=!0;if(!e.nextPoint())return!1;let h=e.x,o=e.y;for(;e.nextPoint();){const a=this.getLength(h,o,e.x,e.y);if(0!==a){if(r){if(n+a>s){const c=(s-n)/a;let u=1,l=!1;n+a>=i&&(u=(i-n)/a,l=!0);const _=this.cut(h,o,e.x,e.y,c,u);if(_&&t.pushPoints(_),l)break;r=!1}}else{if(n+a>i){const s=this.cut(h,o,e.x,e.y,0,(i-n)/a);s&&t.pushPoint(s[1]);break}t.pushXY(e.x,e.y)}n+=a,h=e.x,o=e.y}else h=e.x,o=e.y}return!0}getCIMPointAlong(t,e){if(!t.nextPoint())return null;let s,i,n,r,h=0;for(s=t.x,i=t.y;t.nextPoint();s=n,i=r){n=t.x,r=t.y;const o=this.getLength(s,i,n,r);if(0!==o){if(h+o>e){const t=(e-h)/o;return this.getCoord2D(s,i,n,r,t)}h+=o}}return null}offset(t,e,s,i,n){if(!t||t.length<2)return null;let r=0,h=t[r++],o=r;for(;r<t.length;){const e=t[r];e[0]===h[0]&&e[1]===h[1]||(r!==o&&(t[o]=t[r]),h=t[o++]),r++}const a=t[0][0]===t[o-1][0]&&t[0][1]===t[o-1][1];if(a&&--o,o<(a?3:2))return null;const c=[];h=a?t[o-1]:null;let u=t[0];for(let n=0;n<o;n++){const r=n===o-1?a?t[0]:null:t[n+1];if(h)if(r){const t=[r[0]-u[0],r[1]-u[1]];this.normalize(t);const n=[u[0]-h[0],u[1]-h[1]];this.normalize(n);const o=n[0]*t[1]-n[1]*t[0],a=n[0]*t[0]+n[1]*t[1];if(0===o&&1===a){u=r;continue}if(o>=0==e<=0){if(a<1){const s=[t[0]-n[0],t[1]-n[1]];this.normalize(s);const r=Math.sqrt((1+a)/2);if(r>1/i){const t=-Math.abs(e)/r;c.push([u[0]-s[0]*t,u[1]-s[1]*t])}}}else switch(s){case l.id.Mitered:{const s=Math.sqrt((1+a)/2);if(s>0&&1/s<i){const i=[t[0]-n[0],t[1]-n[1]];this.normalize(i);const r=Math.abs(e)/s;c.push([u[0]-i[0]*r,u[1]-i[1]*r]);break}}case l.id.Bevelled:c.push([u[0]+n[1]*e,u[1]-n[0]*e]),c.push([u[0]+t[1]*e,u[1]-t[0]*e]);break;case l.id.Rounded:if(a<1){c.push([u[0]+n[1]*e,u[1]-n[0]*e]);const s=Math.floor(2.5*(1-a));if(s>0){const i=1/s;let r=i;for(let h=1;h<s;h++,r+=i){const s=[n[1]*(1-r)+t[1]*r,-n[0]*(1-r)-t[0]*r];this.normalize(s),c.push([u[0]+s[0]*e,u[1]+s[1]*e])}}c.push([u[0]+t[1]*e,u[1]-t[0]*e])}break;case l.id.Square:default:if(o<0)c.push([u[0]+(n[1]+n[0])*e,u[1]+(n[1]-n[0])*e]),c.push([u[0]+(t[1]-t[0])*e,u[1]-(t[0]+t[1])*e]);else{const s=Math.sqrt((1+Math.abs(a))/2),i=[t[0]-n[0],t[1]-n[1]];this.normalize(i);const r=e/s;c.push([u[0]-i[0]*r,u[1]-i[1]*r])}}}else{const t=[u[0]-h[0],u[1]-h[1]];this.normalize(t),c.push([u[0]+t[1]*e,u[1]-t[0]*e])}else{const t=[r[0]-u[0],r[1]-u[1]];this.normalize(t),c.push([u[0]+t[1]*e,u[1]-t[0]*e])}h=u,u=r}return c.length<(a?3:2)?null:(a&&c.push([c[0][0],c[0][1]]),c)}}const p=1.7320508075688772,d=l.TF.OpenEnded;class g{static local(){return null===g.instance&&(g.instance=new g),g.instance}execute(t,e,s,i,n){return new m(t,e,s)}}g.instance=null;class m extends u{constructor(t,e,s){super(t,!1,!0),this._curveHelper=new f,this._width=(void 0!==e.width?e.width:5)*s,this._arrowType=void 0!==e.geometricEffectArrowType?e.geometricEffectArrowType:void 0!==e.arrowType?e.arrowType:d,this._offsetFlattenError=_*s}processPath(t){const e=r.z.createEmptyOptimizedCIM(t.geometryType);switch(this._arrowType){case l.TF.OpenEnded:default:this._constructSimpleArrow(e,t,!0);break;case l.TF.Block:this._constructSimpleArrow(e,t,!1);break;case l.TF.Crossed:this._constructCrossedArrow(e,t)}return e}_constructSimpleArrow(t,e,s){const i=e.pathLength();let n=this._width;i<2*n&&(n=i/2);const r=this._curveHelper.getSubCurve(e,0,i-n);if(!r||!r.nextPath())return;r.seekPathStart();const o=n/2;if(this._curveHelper.isEmpty(r))return;const a=(0,h.l)(r),c=this._constructOffset(a,-o);if(!c)return;const u=this._constructOffset(a,o);if(!u)return;const l=this._constructArrowBasePoint(c,-o/2);if(!l)return;const _=this._constructArrowBasePoint(u,o/2);if(!_)return;e.seekInPath(e.pathSize-1);const f=[e.x,e.y];t.pushPath(u),t.nextPath(),t.nextPoint(),t.setControlPoint(),t.pushPoint(_),t.nextPoint(),t.setControlPoint(),t.pushPoint(f),t.nextPoint(),t.setControlPoint(),t.pushPoint(l),t.nextPoint(),t.setControlPoint(),t.pushPoints(c.reverse()),t.setControlPoint(),s||(t.setControlPointAt(0),t.setControlPointAt(t.pathSize-1),t.pushPoint(u[0])),t.reset()}_constructCrossedArrow(t,e){const s=e.pathLength();let i=this._width;s<i*(1+p+1)&&(i=s/(1+p+1)),e.seekPathStart();const n=this._curveHelper.getSubCurve(e,0,s-i*(1+p));if(!n)return;n.nextPath();const r=i/2;if(this._curveHelper.isEmpty(n))return;const o=(0,h.l)(n),a=this._constructOffset(o,r);if(!a)return;const c=this._constructOffset(o,-r);if(!c)return;const u=this._curveHelper.getSubCurve(e,0,s-i);if(!u)return;if(u.nextPath(),this._curveHelper.isEmpty(u))return;const l=(0,h.l)(u),_=this._constructOffset(l,r);if(!_)return;const f=this._constructOffset(l,-r);if(!f)return;const d=_[_.length-1],g=this._constructArrowBasePoint(_,r/2);if(!g)return;const m=f[f.length-1],P=this._constructArrowBasePoint(f,-r/2);if(!P)return;e.seekInPath(e.pathSize-1);const x=[e.x,e.y];t.pushPath(a),t.nextPath(),t.nextPoint(),t.setControlPoint(),t.pushPoint(m),t.nextPoint(),t.setControlPoint(),t.pushPoint(P),t.nextPoint(),t.setControlPoint(),t.pushPoint(x),t.nextPoint(),t.setControlPoint(),t.pushPoint(g),t.nextPoint(),t.setControlPoint(),t.pushPoint(d),t.nextPoint(),t.setControlPoint(),t.pushPoints(c.reverse()),t.nextPoint(),t.setControlPoint(),t.reset()}_constructOffset(t,e){return this._curveHelper.offset(t,e,l.id.Rounded,4,this._offsetFlattenError)}_constructArrowBasePoint(t,e){if(!t||t.length<2)return null;const s=t[t.length-2],i=t[t.length-1],n=[i[0]-s[0],i[1]-s[1]];return this._curveHelper.normalize(n),[i[0]+n[1]*e,i[1]-n[0]*e]}}s(66577);var P,x=s(21793),y=s(82971);class b{static local(){return null===b.instance&&(b.instance=new b),b.instance}execute(t,e,s,i,n,r){return new M(t,e,s,i,n,r)}}b.instance=null;class M{constructor(t,e,s,i,n,r){this._inputGeometries=t,this._tileKey=i,this._geometryEngine=n,this._curveHelper=new f,this._size=(void 0!==e.size?e.size:1)*s,this._maxInflateSize=r*s,this._offsetFlattenError=_*s}next(){let t;for(;t=this._inputGeometries.next();){if(0===this._size)return t;if("esriGeometryEnvelope"===t.geometryType)if(this._size>0){const e=r.z.createEmptyOptimizedCIM(t.geometryType),s=(0,h.M)(t)[0],i=this._curveHelper.offset(s,this._size,l.id.Rounded,4,this._offsetFlattenError);if(i)return e.pushPath(i),e}else if(this._size<0){const e=t.asJSON();if(Math.min(e.xmax-e.xmin,e.ymax-e.ymin)+2*this._size>0)return r.z.fromJSONCIM({xmin:e.xmin-this._size,xmax:e.xmax+this._size,ymin:e.ymin-this._size,ymax:e.ymax+this._size})}const e=this._geometryEngine;if(null==e)return null;const s=this._tileKey?(0,x.L)(t,this._maxInflateSize):t;if(!s)continue;const i=e.buffer(y.Z.WebMercator,s.asJSON(),this._size,1);return i?r.z.fromJSONCIM(i):null}return null}}class S{static local(){return null===S.instance&&(S.instance=new S),S.instance}execute(t,e,s,i,n){return new C(t,e,s)}}S.instance=null;class C{constructor(t,e,s){this._defaultPointSize=20,this._inputGeometries=t,this._geomUnitsPerPoint=s,this._rule=e.rule??l.Em.FullGeometry,this._defaultSize=this._defaultPointSize*s}next(){let t;for(;t=this._inputGeometries.next();){const e=this._processGeom((0,h.M)(t));if(e&&e.length)return r.z.fromJSONCIM({paths:e})}return null}_clone(t){return[t[0],t[1]]}_mid(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}_mix(t,e,s,i){return[t[0]*e+s[0]*i,t[1]*e+s[1]*i]}_add(t,e){return[t[0]+e[0],t[1]+e[1]]}_add2(t,e,s){return[t[0]+e,t[1]+s]}_sub(t,e){return[t[0]-e[0],t[1]-e[1]]}_dist(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}_norm(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}_normalize(t,e=1){const s=e/this._norm(t);t[0]*=s,t[1]*=s}_leftPerpendicular(t){const e=-t[1],s=t[0];t[0]=e,t[1]=s}_leftPerp(t){return[-t[1],t[0]]}_rightPerpendicular(t){const e=t[1],s=-t[0];t[0]=e,t[1]=s}_rightPerp(t){return[t[1],-t[0]]}_dotProduct(t,e){return t[0]*e[0]+t[1]*e[1]}_crossProduct(t,e){return t[0]*e[1]-t[1]*e[0]}_rotateDirect(t,e,s){const i=t[0]*e-t[1]*s,n=t[0]*s+t[1]*e;t[0]=i,t[1]=n}_makeCtrlPt(t){const e=[t[0],t[1]];return a(e,1),e}_addAngledTicks(t,e,s,i){const n=this._sub(s,e);this._normalize(n);const r=this._crossProduct(n,this._sub(i,e));let h;h=r>0?this._rightPerp(n):this._leftPerp(n);const o=Math.abs(r)/2,a=[];a.push([e[0]+(h[0]-n[0])*o,e[1]+(h[1]-n[1])*o]),a.push(e),a.push(s),a.push([s[0]+(h[0]+n[0])*o,s[1]+(h[1]+n[1])*o]),t.push(a)}_addBezier2(t,e,s,i,n){if(0==n--)return void t.push(i);const r=this._mid(e,s),h=this._mid(s,i),o=this._mid(r,h);this._addBezier2(t,e,r,o,n),this._addBezier2(t,o,h,i,n)}_addBezier3(t,e,s,i,n,r){if(0==r--)return void t.push(n);const h=this._mid(e,s),o=this._mid(s,i),a=this._mid(i,n),c=this._mid(h,o),u=this._mid(o,a),l=this._mid(c,u);this._addBezier3(t,e,h,c,l,r),this._addBezier3(t,l,u,a,n,r)}_add90DegArc(t,e,s,i,n){const r=n??this._crossProduct(this._sub(s,e),this._sub(i,e))>0,h=this._mid(e,s),o=this._sub(h,e);r?this._leftPerpendicular(o):this._rightPerpendicular(o),h[0]+=o[0],h[1]+=o[1],this._addBezier3(t,e,this._mix(e,.33333,h,.66667),this._mix(s,.33333,h,.66667),s,4)}_addArrow(t,e,s){const i=e[0],n=e[1],r=e[e.length-1],h=this._sub(i,n);this._normalize(h);const o=this._crossProduct(h,this._sub(r,n)),a=.5*o,c=this._leftPerp(h),u=[r[0]-c[0]*o,r[1]-c[1]*o],l=e.length-1,_=[];_.push(s?[-c[0],-c[1]]:c);let f=[-h[0],-h[1]];for(let t=1;t<l-1;t++){const s=this._sub(e[t+1],e[t]);this._normalize(s);const i=this._dotProduct(s,f),n=this._crossProduct(s,f),r=Math.sqrt((1+i)/2),h=this._sub(s,f);this._normalize(h),h[0]/=r,h[1]/=r,_.push(n<0?[-h[0],-h[1]]:h),f=s}_.push(this._rightPerp(f));for(let s=_.length-1;s>0;s--)t.push([e[s][0]+_[s][0]*a,e[s][1]+_[s][1]*a]);t.push([u[0]+_[0][0]*a,u[1]+_[0][1]*a]),t.push([u[0]+_[0][0]*o,u[1]+_[0][1]*o]),t.push(i),t.push([u[0]-_[0][0]*o,u[1]-_[0][1]*o]),t.push([u[0]-_[0][0]*a,u[1]-_[0][1]*a]);for(let s=1;s<_.length;s++)t.push([e[s][0]-_[s][0]*a,e[s][1]-_[s][1]*a])}_cp2(t,e,s){return t.length>=2?t[1]:this._add2(t[0],e*this._defaultSize,s*this._defaultSize)}_cp3(t,e,s,i){if(t.length>=3)return t[2];const n=this._mix(t[0],1-s,e,s),r=this._sub(e,t[0]);return this._normalize(r),this._rightPerpendicular(r),[n[0]+r[0]*i*this._defaultSize,n[1]+r[1]*i*this._defaultSize]}_arrowPath(t){if(t.length>2)return t;const e=t[0],s=this._cp2(t,-4,0),i=this._sub(e,s);this._normalize(i);const n=this._rightPerp(i);return[e,s,[e[0]+(n[0]-i[0])*this._defaultSize,e[1]+(n[1]-i[1])*this._defaultSize]]}_arrowLastSeg(t){const e=t[0],s=this._cp2(t,-4,0);let i;if(t.length>=3)i=t[t.length-1];else{const t=this._sub(e,s);this._normalize(t);const n=this._rightPerp(t);i=[e[0]+(n[0]-t[0])*this._defaultSize,e[1]+(n[1]-t[1])*this._defaultSize]}return[s,i]}_processGeom(t){if(!t)return null;const e=[];for(const s of t){if(!s||0===s.length)continue;const t=s.length;let i=s[0];switch(this._rule){case l.Em.PerpendicularFromFirstSegment:{const t=this._cp2(s,0,-1),n=this._cp3(s,t,.5,4),r=[];r.push(n),r.push(this._mid(i,t)),e.push(r);break}case l.Em.ReversedFirstSegment:{const t=this._cp2(s,0,-1);e.push([t,i]);break}case l.Em.PerpendicularToSecondSegment:{const t=this._cp2(s,-4,1),n=this._cp3(s,t,.882353,-1.94),r=[];r.push(this._mid(t,n)),r.push(i),e.push(r);break}case l.Em.SecondSegmentWithTicks:{const t=this._cp2(s,-4,1),n=this._cp3(s,t,.882353,-1.94),r=this._sub(n,t);let h;h=this._crossProduct(r,this._sub(i,t))>0?this._rightPerp(h):this._leftPerp(r);const o=[];o.push([t[0]+(h[0]-r[0])/3,t[1]+(h[1]-r[1])/3]),o.push(t),o.push(n),o.push([n[0]+(h[0]+r[0])/3,n[1]+(h[1]+r[1])/3]),e.push(o);break}case l.Em.DoublePerpendicular:{const t=this._cp2(s,0,-1),n=this._cp3(s,t,.5,3),r=this._mid(i,t),h=this._sub(r,n);this._normalize(h);const o=this._crossProduct(h,this._sub(i,n));this._leftPerpendicular(h);const a=[];a.push(i),a.push([n[0]+h[0]*o,n[1]+h[1]*o]),e.push(a);const c=[];c.push([n[0]-h[0]*o,n[1]-h[1]*o]),c.push(t),e.push(c);break}case l.Em.OppositeToFirstSegment:{const t=this._cp2(s,0,-1),n=this._cp3(s,t,.5,3),r=this._mid(i,t),h=this._sub(r,n);this._normalize(h);const o=this._crossProduct(h,this._sub(i,n));this._leftPerpendicular(h);const a=[];a.push([n[0]+h[0]*o,n[1]+h[1]*o]),a.push([n[0]-h[0]*o,n[1]-h[1]*o]),e.push(a);break}case l.Em.TriplePerpendicular:{const t=this._cp2(s,0,-1),n=this._cp3(s,t,.5,4),r=this._mid(i,t),h=this._sub(r,n);this._normalize(h);const o=this._crossProduct(h,this._sub(i,n));this._leftPerpendicular(h);const a=[];a.push([n[0]+h[0]*o*.8,n[1]+h[1]*o*.8]),a.push([r[0]+.8*(i[0]-r[0]),r[1]+.8*(i[1]-r[1])]),e.push(a),e.push([n,r]);const c=[];c.push([n[0]-h[0]*o*.8,n[1]-h[1]*o*.8]),c.push([r[0]+.8*(t[0]-r[0]),r[1]+.8*(t[1]-r[1])]),e.push(c);break}case l.Em.HalfCircleFirstSegment:{const t=this._cp2(s,0,-1),n=this._cp3(s,t,.5,4),r=this._mid(i,t);let h=this._sub(t,i);const o=Math.cos(Math.PI/18),a=Math.sin(Math.PI/18),c=Math.sqrt((1+o)/2),u=Math.sqrt((1-o)/2),l=[];let _;this._crossProduct(h,this._sub(n,i))>0?(l.push(i),h=this._sub(i,r),_=t):(l.push(t),h=this._sub(t,r),_=i),this._rotateDirect(h,c,u),h[0]/=c,h[1]/=c;for(let t=1;t<=18;t++)l.push(this._add(r,h)),this._rotateDirect(h,o,a);l.push(_),e.push(l);break}case l.Em.HalfCircleSecondSegment:{const t=this._cp2(s,0,-1),n=this._cp3(s,t,1,-1);let r=this._sub(i,t);this._normalize(r);const h=this._crossProduct(r,this._sub(n,t))/2;this._leftPerpendicular(r);const o=[t[0]+r[0]*h,t[1]+r[1]*h];r=this._sub(t,o);const a=Math.cos(Math.PI/18);let c=Math.sin(Math.PI/18);h>0&&(c=-c);const u=[t];for(let t=1;t<=18;t++)this._rotateDirect(r,a,c),u.push(this._add(o,r));e.push(u);break}case l.Em.HalfCircleExtended:{const n=this._cp2(s,0,-2),r=this._cp3(s,n,1,-1);let h;if(t>=4)h=s[3];else{const t=this._sub(i,n);h=this._add(r,t)}const o=this._dist(n,r)/2/.75,a=this._sub(n,i);this._normalize(a,o);const c=this._sub(r,h);this._normalize(c,o);const u=[h,r];e.push(u);const l=[this._clone(r)];this._addBezier3(l,r,this._add(r,c),this._add(n,a),n,4),l.push(i),e.push(l);break}case l.Em.OpenCircle:{const t=this._cp2(s,-2,0),n=this._sub(t,i),r=Math.cos(Math.PI/18),h=-Math.sin(Math.PI/18),o=[t];for(let t=1;t<=33;t++)this._rotateDirect(n,r,h),o.push(this._add(i,n));e.push(o);break}case l.Em.CoverageEdgesWithTicks:{const n=this._cp2(s,0,-1);let r,h;if(t>=3)r=s[2];else{const t=this._sub(n,i),e=this._leftPerp(t);r=[i[0]+e[0]-.25*t[0],i[1]+e[1]-.25*t[1]]}if(t>=4)h=s[3];else{const t=this._mid(i,n),e=this._sub(i,n);this._normalize(e),this._leftPerpendicular(e);const s=this._crossProduct(e,this._sub(r,t));this._rightPerpendicular(e),h=[r[0]+e[0]*s*2,r[1]+e[1]*s*2]}const o=this._sub(n,i);let a,c;a=this._crossProduct(o,this._sub(r,i))>0?this._rightPerp(o):this._leftPerp(o),c=[],c.push(r),c.push(i),c.push([i[0]+(a[0]-o[0])/3,i[1]+(a[1]-o[1])/3]),e.push(c),a=this._crossProduct(o,this._sub(h,n))>0?this._rightPerp(a):this._leftPerp(o),c=[],c.push([n[0]+(a[0]+o[0])/3,n[1]+(a[1]+o[1])/3]),c.push(n),c.push(h),e.push(c);break}case l.Em.GapExtentWithDoubleTicks:{const n=this._cp2(s,0,2),r=this._cp3(s,n,0,1);let h;if(t>=4)h=s[3];else{const t=this._sub(n,i);h=this._add(r,t)}this._addAngledTicks(e,i,n,this._mid(r,h)),this._addAngledTicks(e,r,h,this._mid(i,n));break}case l.Em.GapExtentMidline:{const n=this._cp2(s,2,0),r=this._cp3(s,n,0,1);let h;if(t>=4)h=s[3];else{const t=this._sub(n,i);h=this._add(r,t)}const o=[];o.push(this._mid(i,r)),o.push(this._mid(n,h)),e.push(o);break}case l.Em.Chevron:{const n=this._cp2(s,-1,-1);let r;if(t>=3)r=s[2];else{const t=this._sub(n,i);this._leftPerpendicular(t),r=this._add(i,t)}e.push([n,this._makeCtrlPt(i),r]);break}case l.Em.PerpendicularWithArc:{const t=this._cp2(s,0,-2),n=this._cp3(s,t,.5,-1);let r=this._sub(t,i);const h=this._norm(r);r[0]/=h,r[1]/=h;const o=this._crossProduct(r,this._sub(n,i));let a=this._dotProduct(r,this._sub(n,i));a<.05*h?a=.05*h:a>.95*h&&(a=.95*h);const c=[i[0]+r[0]*a,i[1]+r[1]*a];this._leftPerpendicular(r);let u=[];u.push([c[0]-r[0]*o,c[1]-r[1]*o]),u.push([c[0]+r[0]*o,c[1]+r[1]*o]),e.push(u);const l=[t[0]+r[0]*o,t[1]+r[1]*o];r=this._sub(t,l);const _=Math.cos(Math.PI/18);let f=Math.sin(Math.PI/18);o<0&&(f=-f),u=[i,t];for(let t=1;t<=9;t++)this._rotateDirect(r,_,f),u.push(this._add(l,r));e.push(u);break}case l.Em.ClosedHalfCircle:{const t=this._cp2(s,2,0),n=this._mid(i,t),r=this._sub(t,n),h=Math.cos(Math.PI/18),o=Math.sin(Math.PI/18),a=[i,t];for(let t=1;t<=18;t++)this._rotateDirect(r,h,o),a.push(this._add(n,r));e.push(a);break}case l.Em.TripleParallelExtended:{const t=this._cp2(s,0,-2),n=this._cp3(s,t,1,-2),r=this._mid(i,t),h=this._sub(n,t);this._normalize(h);const o=Math.abs(this._crossProduct(h,this._sub(r,t)))/2,c=this._dist(t,n),u=[t,i];u.push([i[0]+h[0]*c*.5,i[1]+h[1]*c*.5]),e.push(u);const l=[];l.push([r[0]-h[0]*o,r[1]-h[1]*o]),l.push([r[0]+h[0]*c*.375,r[1]+h[1]*c*.375]),a(l[l.length-1],1),l.push([r[0]+h[0]*c*.75,r[1]+h[1]*c*.75]),e.push(l);const _=[t,n];e.push(_);break}case l.Em.ParallelWithTicks:{const t=this._cp2(s,3,0),n=this._cp3(s,t,.5,-1),r=this._sub(n,t);this._normalize(r);const h=this._crossProduct(r,this._sub(n,i));this._leftPerpendicular(r),this._addAngledTicks(e,i,t,n),this._addAngledTicks(e,this._mix(i,1,r,h),this._mix(t,1,r,h),this._mid(i,t));break}case l.Em.Parallel:{const t=this._cp2(s,3,0),n=this._cp3(s,t,.5,-1),r=this._sub(t,i);this._normalize(r);const h=this._leftPerp(r),o=this._crossProduct(r,this._sub(n,i));let a=[i,t];e.push(a),a=[],a.push([i[0]+h[0]*o,i[1]+h[1]*o]),a.push([t[0]+h[0]*o,t[1]+h[1]*o]),e.push(a);break}case l.Em.PerpendicularToFirstSegment:{const t=this._cp2(s,3,0),n=this._cp3(s,t,.5,-1),r=this._mid(i,t),h=this._sub(t,i);this._normalize(h);const o=this._crossProduct(h,this._sub(n,i));this._leftPerpendicular(h);const a=[];a.push([r[0]-h[0]*o*.25,r[1]-h[1]*o*.25]),a.push([r[0]+h[0]*o*1.25,r[1]+h[1]*o*1.25]),e.push(a);break}case l.Em.ParallelOffset:{const t=this._cp2(s,3,0),n=this._cp3(s,t,.5,-1),r=this._sub(t,i);this._normalize(r);const h=this._crossProduct(r,this._sub(n,i));this._leftPerpendicular(r);const o=[];o.push([i[0]-r[0]*h,i[1]-r[1]*h]),o.push([t[0]-r[0]*h,t[1]-r[1]*h]),e.push(o);const a=[];a.push([i[0]+r[0]*h,i[1]+r[1]*h]),a.push([t[0]+r[0]*h,t[1]+r[1]*h]),e.push(a);break}case l.Em.OffsetOpposite:{const t=this._cp2(s,3,0),n=this._cp3(s,t,.5,-1),r=this._sub(t,i);this._normalize(r);const h=this._crossProduct(r,this._sub(n,i));this._leftPerpendicular(r);const o=[];o.push([i[0]-r[0]*h,i[1]-r[1]*h]),o.push([t[0]-r[0]*h,t[1]-r[1]*h]),e.push(o);break}case l.Em.OffsetSame:{const t=this._cp2(s,3,0),n=this._cp3(s,t,.5,-1),r=this._sub(t,i);this._normalize(r);const h=this._crossProduct(r,this._sub(n,i));this._leftPerpendicular(r);const o=[];o.push([i[0]+r[0]*h,i[1]+r[1]*h]),o.push([t[0]+r[0]*h,t[1]+r[1]*h]),e.push(o);break}case l.Em.CircleWithArc:{let n=this._cp2(s,3,0);const r=this._cp3(s,n,.5,-1);let h,o;if(t>=4)h=s[3],o=this._crossProduct(this._sub(h,n),this._sub(r,n))>0;else{h=n,o=this._crossProduct(this._sub(h,i),this._sub(r,i))>0;const t=24*this._geomUnitsPerPoint,e=this._sub(h,i);this._normalize(e,t);const s=Math.sqrt(2)/2;this._rotateDirect(e,s,o?s:-s),n=this._add(i,e)}const c=this._sub(n,i),u=Math.cos(Math.PI/18),l=Math.sin(Math.PI/18),_=[n];for(let t=1;t<=36;t++)this._rotateDirect(c,u,l),_.push(this._add(i,c));this._add90DegArc(_,n,h,r,o),a(_[_.length-8],1),e.push(_);break}case l.Em.DoubleJog:{let n,r,h=this._cp2(s,-3,1);if(n=t>=3?s[2]:this._add(i,this._sub(i,h)),t>=4)r=s[3];else{const t=i;i=h,r=n;const e=this._dist(i,t),s=this._dist(r,t);let o=30*this._geomUnitsPerPoint;.5*e<o&&(o=.5*e),.5*s<o&&(o=.5*s),h=this._mix(i,o/e,t,(e-o)/e),n=this._mix(r,o/s,t,(s-o)/s)}const o=this._mid(i,h),a=this._mid(r,n),c=this._dist(i,h),u=this._dist(n,r);let l=Math.min(c,u)/8;l=Math.min(l,24*this._geomUnitsPerPoint);const _=Math.cos(Math.PI/4);let f=this._sub(i,h);this._normalize(f,l),this._crossProduct(f,this._sub(r,h))>0?this._rotateDirect(f,_,-_):this._rotateDirect(f,_,_);let p=[];p.push(h),p.push(this._add(o,f)),p.push(this._sub(o,f)),p.push(i),e.push(p),f=this._sub(r,n),this._normalize(f,l),this._crossProduct(f,this._sub(i,n))<0?this._rotateDirect(f,_,_):this._rotateDirect(f,_,-_),p=[],p.push(n),p.push(this._add(a,f)),p.push(this._sub(a,f)),p.push(r),e.push(p);break}case l.Em.PerpendicularOffset:{const t=this._cp2(s,-4,1),n=this._cp3(s,t,.882353,-1.94),r=this._sub(n,t);this._crossProduct(r,this._sub(i,t))>0?this._rightPerpendicular(r):this._leftPerpendicular(r);const h=[r[0]/8,r[1]/8],o=this._sub(this._mid(t,n),h);e.push([o,i]);break}case l.Em.LineExcludingLastSegment:{const t=this._arrowPath(s),i=[];let n=t.length-2;for(;n--;)i.push(t[n]);e.push(i);break}case l.Em.MultivertexArrow:{const t=this._arrowPath(s),i=[];this._addArrow(i,t,!1),e.push(i);break}case l.Em.CrossedArrow:{const t=this._arrowPath(s),i=[];this._addArrow(i,t,!0),e.push(i);break}case l.Em.ChevronArrow:{const[t,n]=this._arrowLastSeg(s),r=10*this._geomUnitsPerPoint,h=this._sub(i,t);this._normalize(h);const o=this._crossProduct(h,this._sub(n,t)),a=this._leftPerp(h),c=[n[0]-a[0]*o*2,n[1]-a[1]*o*2],u=[];u.push([n[0]+h[0]*r,n[1]+h[1]*r]),u.push(i),u.push([c[0]+h[0]*r,c[1]+h[1]*r]),e.push(u);break}case l.Em.ChevronArrowOffset:{const[t,n]=this._arrowLastSeg(s),r=this._sub(i,t);this._normalize(r);const h=this._crossProduct(r,this._sub(n,t));this._leftPerpendicular(r);const o=[n[0]-r[0]*h,n[1]-r[1]*h],a=[];a.push([o[0]+r[0]*h*.5,o[1]+r[1]*h*.5]),a.push(this._mid(o,i)),a.push([o[0]-r[0]*h*.5,o[1]-r[1]*h*.5]),e.push(a);break}case l.Em.PartialFirstSegment:{const[t,n]=this._arrowLastSeg(s),r=this._sub(i,t);this._normalize(r);const h=this._crossProduct(r,this._sub(n,t));this._leftPerpendicular(r);const o=[n[0]-r[0]*h,n[1]-r[1]*h];e.push([t,o]);break}case l.Em.Arch:{const t=this._cp2(s,0,-1),n=this._cp3(s,t,.5,1),r=this._sub(i,t),h=this._mix(n,1,r,.55),o=this._mix(n,1,r,-.55),a=[i];this._addBezier2(a,i,h,n,4),this._addBezier2(a,n,o,t,4),e.push(a);break}case l.Em.CurvedParallelTicks:{const t=this._cp2(s,-4,1),n=this._cp3(s,t,.882353,-1.94),r=this._sub(n,t);this._crossProduct(r,this._sub(i,t))>0?this._rightPerpendicular(r):this._leftPerpendicular(r);const h=[r[0]/8,r[1]/8],o=this._sub(this._mid(t,n),h),a=this._sub(this._mix(t,.75,n,.25),h),c=this._sub(this._mix(t,.25,n,.75),h),u=[t];this._addBezier2(u,t,a,o,3),this._addBezier2(u,o,c,n,3),e.push(u);for(let t=0;t<8;t++){const s=u[2*t+1],i=[this._clone(s)];i.push(this._add(s,[r[0]/4,r[1]/4])),e.push(i)}break}case l.Em.Arc90Degrees:{const t=this._cp2(s,0,-1),n=this._cp3(s,t,.5,1),r=[t];this._add90DegArc(r,t,i,n),e.push(r);break}case l.Em.FullGeometry:default:e.push(s)}}return e}}class w{static local(){return null===w.instance&&(w.instance=new w),w.instance}execute(t,e,s,i,n){return new z(t,e,s)}}w.instance=null;class z extends u{constructor(t,e,s){super(t,!0,!0),this._curveHelper=new f,this._beginCut=(void 0!==e.beginCut?e.beginCut:1)*s,this._endCut=(void 0!==e.endCut?e.endCut:1)*s,this._middleCut=(void 0!==e.middleCut?e.middleCut:0)*s,this._invert=void 0!==e.invert&&e.invert,this._beginCut<0&&(this._beginCut=0),this._endCut<0&&(this._endCut=0),this._middleCut<0&&(this._middleCut=0)}processPath(t){const{_beginCut:e,_endCut:s,_middleCut:i}=this,n=t.pathLength(),h=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");if(this._invert){if(0!==e||0!==s||0!==i)if(e+s+i>=n)for(h.startPath();t.nextPoint();)h.pushXY(t.x,t.y);else this._curveHelper.appendSubCurve(h,t,0,e),this._curveHelper.appendSubCurve(h,t,.5*(n-i),.5*(n+i)),this._curveHelper.appendSubCurve(h,t,n-s,s)}else if(0===e&&0===s&&0===i)for(h.startPath();t.nextPoint();)h.pushXY(t.x,t.y);else e+s+i<n&&(0===i?this._curveHelper.appendSubCurve(h,t,e,n-s):(this._curveHelper.appendSubCurve(h,t,e,.5*(n-i)),this._curveHelper.appendSubCurve(h,t,.5*(n+i),n-s)));return 0===h.totalSize?null:h}}class A{constructor(){this._values=[],this.extPtGap=0,this.ctrlPtGap=0,this._length=0,this._currentValue=0}isEmpty(){return 0===this._values.length}size(){return this._values.length}init(t,e,s=!0){if(this._setEmpty(),!t||0===t.length)return!1;for(let e=0;e<t.length;e++){let i=Math.abs(t[e]);s&&i<1e-7&&(i=1e-7),this._values.push(i),this._length+=i}return e&&1&t.length&&(this._length*=2),0!==this._length&&(this.ctrlPtGap=this.extPtGap=0,this._currentValue=-1,!0)}scale(t){const e=this._values?this._values.length:0;for(let s=0;s<e;++s)this._values[s]*=t;this._length*=t,this.extPtGap*=t,this.ctrlPtGap*=t}addValue(t){this._length+=t,this._values.push(t)}firstValue(){return this._values[0]}lastValue(){return this._values[this._values.length-1]}nextValue(){return this._currentValue++,this._currentValue===this._values.length&&(this._currentValue=0),this._values[this._currentValue]}reset(){this._currentValue=-1}length(){return this._length}_setEmpty(){this.extPtGap=this.ctrlPtGap=this._length=0,this._currentValue=-1,this._values.length=0}}class v{constructor(){this.pt=null,this.ca=0,this.sa=0}}!function(t){t[t.FAIL=0]="FAIL",t[t.END=1]="END",t[t.CONTINUE=2]="CONTINUE"}(P||(P={}));class L{constructor(){this.reset()}reset(){this.segment=null,this.segmentLength=0,this.abscissa=0,this.isPathEnd=!1,this.isPartEnd=!1}isValid(){return null!==this.segment}copyTo(t){t.segment=this.segment,t.segmentLength=this.segmentLength,t.abscissa=this.abscissa,t.isPathEnd=this.isPathEnd,t.isPartEnd=this.isPartEnd}}class T extends f{constructor(t=0,e=!1){super(t,e),this._tolerance=_,this._currentPosition=new L}updateTolerance(t){this._tolerance=_*t}init(t,e,s=!0){return s?(this._patternLength=e.length(),this._partExtPtGap=e.extPtGap,this._partCtrlPtGap=e.ctrlPtGap):(this._patternLength=0,this._partExtPtGap=0,this._partCtrlPtGap=0),this._currentPosition.reset(),this._partSegCount=0,this._pathCursor=t,this._seg=-1,this._setPosAtNextPart()}curPositionIsValid(){return this._currentPosition.isValid()}nextPosition(t,e=P.FAIL){const s=new L;return!!this._nextPosition(t,s,null,e)&&(s.copyTo(this._currentPosition),!0)}curPointAndAngle(t){t.pt=this._getPoint(this._currentPosition);const[e,s]=this._getAngleCS(this._currentPosition);t.ca=e,t.sa=s}nextPointAndAngle(t,e,s=P.FAIL){const i=new L;if(!this._nextPosition(t,i,null,s))return!1;i.copyTo(this._currentPosition),e.pt=this._getPoint(i);const[n,r]=this._getAngleCS(i);return e.ca=n,e.sa=r,!0}nextCurve(t){if(0===t)return null;const e=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");e.startPath(),e.nextPath();const s=new L;return this._nextPosition(t,s,e,P.END)?(s.copyTo(this._currentPosition),e):null}isPathEnd(){return this._currentPosition.isPathEnd}getPathEnd(){return this._currentPosition.segment[1]}getPt(t){return this._pathCursor.seekInPath(t),[this._pathCursor.x,this._pathCursor.y]}getSeg(t){return[this.getPt(t),this.getPt(t+1)]}_nextPosition(t,e,s,i){if(this._currentPosition.isPathEnd)return!1;let n=this._currentPosition.abscissa;for(this._currentPosition.segmentLength>0&&(n/=this._currentPosition.segmentLength),this._currentPosition.copyTo(e);e.abscissa+t*this._partLengthRatio>e.segmentLength+this._tolerance;){if(s){if(0===s.pathSize)if(0===n){const t=e.segment[0];s.pushXY(t[0],t[1])}else s.pushPoint(this.getSegCoord2D(e.segment,n));const t=e.segment[1];s.pushXY(t[0],t[1])}if(n=0,t-=(e.segmentLength-e.abscissa)/this._partLengthRatio,this._partSegCount)e.segment=this._nextSegment(),e.segmentLength=this.getSegLength(e.segment),e.abscissa=0,this._partSegCount--;else{if(!this._setPosAtNextPart())return i!==P.FAIL&&(e.segmentLength=this.getSegLength(e.segment),e.isPartEnd=!0,i===P.END?(e.abscissa=e.segmentLength,e.isPathEnd=!0):e.abscissa=e.segmentLength+t,!0);this._currentPosition.copyTo(e)}}if(e.abscissa+=t*this._partLengthRatio,s){0===s.pathSize&&(0===n?s.pushPoint(e.segment[0]):s.pushPoint(this.getSegCoord2D(e.segment,n)));const t=e.abscissa/e.segmentLength;1===t?s.pushPoint(e.segment[1]):s.pushPoint(this.getSegCoord2D(e.segment,t))}return this._partSegCount||Math.abs(e.abscissa-e.segmentLength)<this._tolerance&&(e.isPathEnd=this._partIsLast,e.isPartEnd=!0),!0}_getPoint(t){const e=t.segmentLength<=0?0:t.abscissa/t.segmentLength;return this.getSegCoord2D(this._currentPosition.segment,e)}_getAngleCS(t){const e=t.segmentLength<=0?0:t.abscissa/t.segmentLength;return this.getSegAngleCS(this._currentPosition.segment,e)}_setPosAtNextPart(){for(;this._partSegCount;)this._hasNextSegment()&&this._nextSegment(),this._partSegCount--;if(!this._hasNextSegment())return!1;for(this._partLength=0,this._partIsLast=!0,this._partSegCount=0;this._hasNextSegment();)if(this._partLength+=this.getSegLength(this._nextSegment()),this._partSegCount++,this._pathCursor.getControlPointAt(this._getEndPointIndex())){this._partIsLast=!this._hasNextSegment();break}let t=this._partSegCount;for(;t;)this._previousSegment(),--t;this._currentPosition.segment=this._nextSegment(),this._currentPosition.segmentLength=this.getSegLength(this._currentPosition.segment),this._currentPosition.abscissa=0,this._currentPosition.isPathEnd=this._currentPosition.isPartEnd=!1,--this._partSegCount;const e=this._getStartPointIndex();this._ctrlPtBegin=this._pathCursor.getControlPointAt(e);let s=e+this._partSegCount+1;if(s>=this._pathCursor.pathSize&&(s=0),this._ctrlPtEnd=this._pathCursor.getControlPointAt(s),this._patternLength>0){const t=this._ctrlPtBegin?this._partCtrlPtGap:this._partExtPtGap,e=this._ctrlPtEnd?this._partCtrlPtGap:this._partExtPtGap;let s=Math.round((this._partLength-(t+e))/this._patternLength);s<=0&&(s=t+e>0?0:1),this._partLengthRatio=this._partLength/(t+e+s*this._patternLength),this._partLengthRatio<.01&&(this._partLengthRatio=1)}else this._partLengthRatio=1;return!0}_hasNextSegment(){return this._seg<this._pathCursor.pathSize-2}_previousSegment(){return this.getSeg(--this._seg)}_nextSegment(){return this.getSeg(++this._seg)}_getStartPointIndex(){return this._seg}_getEndPointIndex(){return this._seg+1}}class E{static local(){return null===E.instance&&(E.instance=new E),E.instance}execute(t,e,s,i,n){return new I(t,e,s)}}E.instance=null;class I extends u{constructor(t,e,s){super(t,!0,!0),this._firstCurve=null,this._walker=new T,this._walker.updateTolerance(s),this._endings=e.lineDashEnding,this._customDashPos=-(e.offsetAlongLine??0)*s,this._offsetAtEnd=(e.customEndingOffset??0)*s,this._pattern=new A,this._pattern.init(e.dashTemplate,!0),this._pattern.scale(s)}processPath(t){if(0===this._pattern.length()){this.iteratePath=!1;const e=(0,h.l)(t);return r.z.fromJSONCIM({paths:[e]})}if(!this.iteratePath){let e=!0;switch(this._endings){case l.sj.HalfPattern:case l.sj.HalfGap:default:this._pattern.extPtGap=0;break;case l.sj.FullPattern:this.isClosed||(this._pattern.extPtGap=.5*this._pattern.firstValue());break;case l.sj.FullGap:this.isClosed||(this._pattern.extPtGap=.5*this._pattern.lastValue());break;case l.sj.NoConstraint:this.isClosed||(e=!1);break;case l.sj.Custom:this.isClosed||(this._pattern.extPtGap=.5*this._offsetAtEnd)}const s=t.pathLength();if(this._pattern.isEmpty()||s<.1*this._pattern.length()){const e=(0,h.l)(t);return r.z.fromJSONCIM({paths:[e]})}if(!this._walker.init(t,this._pattern,e)){const e=(0,h.l)(t);return r.z.fromJSONCIM({paths:[e]})}}let e;if(this.iteratePath)e=this._pattern.nextValue();else{let t;switch(this._endings){case l.sj.HalfPattern:default:t=.5*this._pattern.firstValue();break;case l.sj.HalfGap:t=.5*-this._pattern.lastValue();break;case l.sj.FullGap:t=-this._pattern.lastValue();break;case l.sj.FullPattern:t=0;break;case l.sj.NoConstraint:case l.sj.Custom:t=-this._customDashPos}let s=t/this._pattern.length();s-=Math.floor(s),t=s*this._pattern.length(),this._pattern.reset(),e=this._pattern.nextValue();let i=!1;for(;t>=e;)t-=e,e=this._pattern.nextValue(),i=!i;e-=t,i?(this._walker.nextPosition(e),e=this._pattern.nextValue()):this.isClosed&&(this._firstCurve=this._walker.nextCurve(e),e=this._pattern.nextValue(),this._walker.nextPosition(e),e=this._pattern.nextValue())}let s=this._walker.nextCurve(e);if(s)if(this._walker.isPathEnd()){if(this.iteratePath=!1,this._firstCurve){for(this._firstCurve.nextPath();this._firstCurve.nextPoint();)s.pushXY(this._firstCurve.x,this._firstCurve.y);this._firstCurve=null}}else e=this._pattern.nextValue(),!this._walker.nextPosition(e)||this._walker.isPathEnd()?(this.iteratePath=!1,this._firstCurve&&(s.pushCursor(this._firstCurve),this._firstCurve=null)):this.iteratePath=!0;else this.iteratePath=!1,s=this._firstCurve,this._firstCurve=null;return s?.reset(),s}}class k{static local(){return null===k.instance&&(k.instance=new k),k.instance}execute(t,e,s,i,n,r){return new N(t,e,s,i,n,r)}}k.instance=null;class N{constructor(t,e,s,i,n,r){switch(this._inputGeometries=t,this._tileKey=i,this._geometryEngine=n,this._maxInflateSize=r*s,this._width=(void 0!==e.width?e.width:2)*s,e.method){case l.$y.Mitered:case l.$y.Bevelled:case l.$y.Rounded:case l.$y.TrueBuffer:case l.$y.Square:}this._option=e.option}next(){let t;for(;t=this._inputGeometries.next();){if("esriGeometryEnvelope"===t.geometryType&&this._width>0){const e=t.asJSON();return Math.min(e.xmax-e.xmin,e.ymax-e.ymin)-2*this._width<0?t:r.z.fromJSONCIM({paths:[[[e.xmin+this._width,e.ymin+this._width],[e.xmax-this._width,e.ymin+this._width],[e.xmax-this._width,e.ymax-this._width],[e.xmin+this._width,e.ymax-this._width],[e.xmin+this._width,e.ymin+this._width]],[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]})}if("esriGeometryPolygon"===t.geometryType){if(0===this._width)return t.clone();const e=this._geometryEngine;if(null==e)return null;const s=this._tileKey?(0,x.L)(t,this._maxInflateSize):t.clone();if(!s)continue;const i=e.buffer(y.Z.WebMercator,s.asJSON(),-this._width,1);if(i)for(const t of i.rings)if(t){s.startPath();for(const e of t.reverse())s.pushXY(e[0],s.yFactor*e[1])}return s}}return null}}class O{static local(){return null===O.instance&&(O.instance=new O),O.instance}execute(t,e,s,i,n){return new F(t,e,s)}}O.instance=null;class F extends u{constructor(t,e,s){super(t,!1,!0),this._curveHelper=new f,this._length=(void 0!==e.length?e.length:20)*s,this._angle=void 0!==e.angle?e.angle:225,this._position=void 0!==e.position?e.position:50,this._length<0&&(this._length=-this._length),this._position<20&&(this._position=20),this._position>80&&(this._position=80),this._mirror=!1}processPath(t){const e=r.z.createEmptyOptimizedCIM("esriGeometryPolyline");if(this._curveHelper.isEmpty(t))return null;t.seekInPath(0);const s=t.x,i=t.y;t.seekInPath(t.pathSize-1);const n=t.x,h=t.y,o=[n-s,h-i];this._curveHelper.normalize(o);const a=s+(n-s)*this._position/100,c=i+(h-i)*this._position/100,u=Math.cos((90-this._angle)/180*Math.PI);let l=Math.sin((90-this._angle)/180*Math.PI);this._mirror&&(l=-l),this._mirror=!this._mirror;const _=[a-this._length/2*u,c-this._length/2*l],f=[a+this._length/2*u,c+this._length/2*l];return e.pushPath([[s,i],_,f,[n,h]]),e}}class R{static local(){return null===R.instance&&(R.instance=new R),R.instance}execute(t,e,s,i,n){return new G(t,e,s)}}R.instance=null;class G{constructor(t,e,s){this._inputGeometries=t,this._offsetX=void 0!==e.offsetX?e.offsetX*s:0,this._offsetY=void 0!==e.offsetY?e.offsetY*s:0}next(){let t=this._inputGeometries.next();for(;t;){if(t.totalSize>0)return this._move(t.clone(),this._offsetX,this._offsetY);t=this._inputGeometries.next()}return null}_move(t,e,s){for(;t.nextPath();)for(;t.nextPoint();)t.x=t.x+e,t.y=t.y+s;return t.reset(),t}}var B=s(33955);class X{static local(){return null===X.instance&&(X.instance=new X),X.instance}execute(t,e,s,i,n,r){return new V(t,e,s,i,n,r)}}X.instance=null;class V{constructor(t,e,s,i,n,r){this._inputGeometries=t,this._tileKey=i,this._geometryEngine=n,this._curveHelper=new f,this._offset=(e.offset??1)*s,this._method=e.method,this._maxInflateSize=r*s,this._option=e.option,this._offsetFlattenError=_*s}next(){let t;for(;t=this._inputGeometries.next();){if(0===this._offset)return t.clone();if("esriGeometryEnvelope"===t.geometryType){if(this._method===l.id.Rounded&&this._offset>0){const e=(0,h.l)(t),s=this._curveHelper.offset(e,-this._offset,this._method,4,this._offsetFlattenError);if(s){const e=r.z.createEmptyOptimizedCIM(t.geometryType);return e.pushPath(s),e}return null}const e=t.asJSON();if((0,B.YX)(e)&&Math.min(e.xmax-e.xmin,e.ymax-e.ymin)+2*this._offset>0)return r.z.fromJSONCIM({xmin:e.xmin-this._offset,xmax:e.xmax+this._offset,ymin:e.ymin-this._offset,ymax:e.ymax+this._offset})}const e=this._geometryEngine;if(null==e)continue;const s=this._tileKey?(0,x.L)(t,this._maxInflateSize):t.clone();if(!s)continue;const i=e.offset(y.Z.WebMercator,s.asJSON(),-this._offset,1,this._method,4,this._offsetFlattenError);return i?r.z.fromJSONCIM(i):null}return null}}class U{static local(){return null===U.instance&&(U.instance=new U),U.instance}execute(t,e,s,i,n){return new Y(t,e,s)}}U.instance=null;class Y{constructor(t,e,s){this._inputGeometries=t,this._reverse=void 0===e.reverse||e.reverse}next(){let t=this._inputGeometries.next();for(;t;){if(!this._reverse)return t;if("esriGeometryPolyline"===t.geometryType)return H(t.clone());t=this._inputGeometries.next()}return null}}function H(t){for(;t.nextPath();)for(let e=0;e<t.pathSize/2;e++){t.seekInPath(e);const s=t.x,i=t.y;t.seekInPath(t.pathSize-e-1);const n=t.x,r=t.y;t.x=s,t.y=i,t.seekInPath(e),t.x=n,t.y=r}return t.reset(),t}var D=s(20322);class W{static local(){return null===W.instance&&(W.instance=new W),W.instance}execute(t,e,s,i,n){return new J(t,e,s)}}W.instance=null;class J{constructor(t,e,s){this._inputGeometries=t,this._rotateAngle=void 0!==e.angle?e.angle*Math.PI/180:0}next(){let t=this._inputGeometries.next();for(;t;){if(0===this._rotateAngle||"esriGeometryPoint"===t.geometryType)return t;if(t.totalSize>0){const e=(0,D.Cs)(t),s=(e[2]+e[0])/2,i=(e[3]+e[1])/2;return t.reset(),this._rotate(t.clone(),s,i)}t=this._inputGeometries.next()}return null}_rotate(t,e,s){const i=Math.cos(this._rotateAngle),n=Math.sin(this._rotateAngle);for(;t.nextPath();)for(;t.nextPoint();){const r=t.x-e,h=t.y-s;t.x=e+r*i-h*n,t.y=s+r*n+h*i}return t.reset(),t}}class Z{static local(){return null===Z.instance&&(Z.instance=new Z),Z.instance}execute(t,e,s,i,n){return new j(t,e,s)}}Z.instance=null;class j{constructor(t,e,s){this._inputGeometries=t,this._xFactor=void 0!==e.XScaleFactor?e.XScaleFactor:1.15,this._yFactor=void 0!==e.YScaleFactor?e.YScaleFactor:1.15}next(){const t=this._inputGeometries.next();if(t){if(1===this._xFactor&&1===this._yFactor)return t;if("esriGeometryPoint"===t.geometryType)return t;if(t.totalSize>0){const e=(0,D.Cs)(t),s=(e[2]+e[0])/2,i=(e[3]+e[1])/2;return t.reset(),this._scaleCursor(t.clone(),s,i)}}return null}_scaleCursor(t,e,s){for(;t.nextPath();)for(;t.nextPoint();)t.x=e+(t.x-e)*this._xFactor,t.y=s+(t.y-s)*this._yFactor;return t.reset(),t}}class q{static local(){return null===q.instance&&(q.instance=new q),q.instance}execute(t,e,s,i,n){return new $(t,e,s)}}q.instance=null;class ${constructor(t,e,s){this._inputGeometries=t,this._height=(void 0!==e.amplitude?e.amplitude:2)*s,this._period=(void 0!==e.period?e.period:3)*s,this._style=e.waveform,this._height<=0&&(this._height=Math.abs(this._height)),this._period<=0&&(this._period=Math.abs(this._period)),this._pattern=new A,this._pattern.addValue(this._period),this._pattern.addValue(this._period),this._walker=new T,this._walker.updateTolerance(s)}next(){let t=this._inputGeometries.next();for(;t;){if(0===this._height||0===this._period)return t;const e=this._processGeom(t);if(e)return e;t=this._inputGeometries.next()}return null}_processGeom(t){const e=r.z.createEmptyOptimizedCIM(t.geometryType);for(;t.nextPath();){e.startPath();const s=t.pathLength();if(this._walker.init(t,this._pattern))switch(this._style){case l.zQ.Sinus:default:this._constructCurve(e,s,!1);break;case l.zQ.Square:this._constructSquare(e,s);break;case l.zQ.Triangle:this._constructTriangle(e,s);break;case l.zQ.Random:this._constructCurve(e,s,!0)}else for(;t.nextPoint();)e.pushXY(t.x,t.y)}return e}_constructCurve(t,e,s){let i=Math.round(e/this._period);0===i&&(i=1);const n=16*i+1,r=e/i,h=this._period/16,o=1/n,a=2*Math.PI*e/r,c=2*Math.PI*Math.random(),u=2*Math.PI*Math.random(),l=2*Math.PI*Math.random(),_=.75-Math.random()/2,f=.75-Math.random()/2,p=new v;this._walker.curPointAndAngle(p),t.pushPoint(p.pt);let d=0;for(;;){if(!this._walker.nextPointAndAngle(h,p)){t.pushPoint(this._walker.getPathEnd());break}{const e=d;let i;if(d+=o,s){const t=this._height/2*(1+.3*Math.sin(_*a*e+c));i=t*Math.sin(a*e+u),i+=t*Math.sin(f*a*e+l),i/=2}else i=.5*this._height*Math.sin(.5*a*e);t.pushXY(p.pt[0]-i*p.sa,p.pt[1]+i*p.ca)}}}_constructSquare(t,e){Math.round(e/this._period);let s=!0;for(;;){let e=!1;if(this._walker.curPositionIsValid()){const i=new v;this._walker.curPointAndAngle(i);const n=new v;if(this._walker.nextPointAndAngle(this._period,n)){const r=new v;this._walker.nextPointAndAngle(this._period,r)&&(s?(t.pushPoint(i.pt),s=!1):t.pushPoint(i.pt),t.pushXY(i.pt[0]-this._height/2*i.sa,i.pt[1]+this._height/2*i.ca),t.pushXY(n.pt[0]-this._height/2*n.sa,n.pt[1]+this._height/2*n.ca),t.pushXY(n.pt[0]+this._height/2*n.sa,n.pt[1]-this._height/2*n.ca),t.pushXY(r.pt[0]+this._height/2*r.sa,r.pt[1]-this._height/2*r.ca),e=!0)}}if(!e){t.pushPoint(this._walker.getPathEnd());break}}}_constructTriangle(t,e){Math.round(e/this._period);let s=!0;for(;;){let e=!1;if(this._walker.curPositionIsValid()){const i=new v;this._walker.curPointAndAngle(i);const n=new v;if(this._walker.nextPointAndAngle(this._period/2,n)){const r=new v;this._walker.nextPointAndAngle(this._period,r)&&(this._walker.nextPosition(this._period/2)&&(s?(t.pushPoint(i.pt),s=!1):t.pushPoint(i.pt),t.pushXY(n.pt[0]-this._height/2*n.sa,n.pt[1]+this._height/2*n.ca),t.pushXY(r.pt[0]+this._height/2*r.sa,r.pt[1]-this._height/2*r.ca)),e=!0)}}if(!e){t.pushPoint(this._walker.getPathEnd());break}}}}class K{static local(){return null===K.instance&&(K.instance=new K),K.instance}execute(t,e,s,i,n){return new Q(t,e,s)}}K.instance=null;class Q extends c{constructor(t,e,s){super(t),this._geometryWalker=new T,this._geometryWalker.updateTolerance(s),this._angleToLine=e.angleToLine??!0,this._offset=(e.offset?e.offset:0)*s,this._originalEndings=e.endings,this._offsetAtEnd=(e.customEndingOffset?e.customEndingOffset:0)*s,this._position=-(e.offsetAlongLine?e.offsetAlongLine:0)*s,this._pattern=new A,this._pattern.init(e.placementTemplate,!1),this._pattern.scale(s),this._endings=this._originalEndings}processPath(t){if(this._pattern.isEmpty())return null;let e;if(this.iteratePath)e=this._pattern.nextValue();else{this._originalEndings===l.JS.WithFullGap&&this.isClosed?this._endings=l.JS.WithMarkers:this._endings=this._originalEndings,this._pattern.extPtGap=0;let s,i=!0;switch(this._endings){case l.JS.NoConstraint:s=-this._position,s=this._adjustPosition(s),i=!1;break;case l.JS.WithHalfGap:default:s=-this._pattern.lastValue()/2;break;case l.JS.WithFullGap:s=-this._pattern.lastValue(),this._pattern.extPtGap=this._pattern.lastValue();break;case l.JS.WithMarkers:s=0;break;case l.JS.Custom:s=-this._position,s=this._adjustPosition(s),this._pattern.extPtGap=.5*this._offsetAtEnd}if(!this._geometryWalker.init(t,this._pattern,i))return null;this._pattern.reset();let n=0;for(;s>n;)s-=n,n=this._pattern.nextValue();n-=s,e=n,this.iteratePath=!0}const s=new v;return this._geometryWalker.nextPointAndAngle(e,s)?this._endings===l.JS.WithFullGap&&this._geometryWalker.isPathEnd()?(this.iteratePath=!1,null):this._endings===l.JS.WithMarkers&&this._geometryWalker.isPathEnd()&&(this.iteratePath=!1,this.isClosed)?null:(this.internalPlacement.setTranslate(s.pt[0]-this._offset*s.sa,s.pt[1]+this._offset*s.ca),this._angleToLine&&this.internalPlacement.setRotateCS(s.ca,s.sa),this.internalPlacement):(this.iteratePath=!1,null)}_adjustPosition(t){let e=t/this._pattern.length();return e-=Math.floor(e),e*this._pattern.length()}}class tt{static local(){return null===tt.instance&&(tt.instance=new tt),tt.instance}execute(t,e,s,i,n){return new et(t,e,s)}}tt.instance=null;class et extends c{constructor(t,e,s){super(t,!1,!0),this._curveHelper=new f,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._offset=void 0!==e.offset?e.offset*s:0,this._type=e.extremityPlacement,this._position=void 0!==e.offsetAlongLine?e.offsetAlongLine*s:0,this._beginProcessed=!1}processPath(t){let e;switch(this._type){case l.Tx.Both:default:this._beginProcessed?(e=this._atExtremities(t,this._position,!1),this._beginProcessed=!1,this.iteratePath=!1):(e=this._atExtremities(t,this._position,!0),this._beginProcessed=!0,this.iteratePath=!0);break;case l.Tx.JustBegin:e=this._atExtremities(t,this._position,!0);break;case l.Tx.JustEnd:e=this._atExtremities(t,this._position,!1);case l.Tx.None:}return e}_atExtremities(t,e,s){if(s||t.seekPathEnd(),s?t.nextPoint():t.prevPoint()){let i=0,[n,r]=[0,0],[h,o]=[t.x,t.y];for(;s?t.nextPoint():t.prevPoint();){n=h,r=o,h=t.x,o=t.y;const s=this._curveHelper.getLength(n,r,h,o);if(i+s>e){const t=(e-i)/s,[a,c]=this._curveHelper.getAngleCS(n,r,h,o,t),u=this._curveHelper.getCoord2D(n,r,h,o,t);return this.internalPlacement.setTranslate(u[0]-this._offset*c,u[1]+this._offset*a),this._angleToLine&&this.internalPlacement.setRotateCS(-a,-c),this.internalPlacement}i+=s}}return null}}class st{static local(){return null===st.instance&&(st.instance=new st),st.instance}execute(t,e,s,i,n){return new it(t,e,s)}}st.instance=null;class it extends c{constructor(t,e,s){super(t),this._walker=new T,this._walker.updateTolerance(s),this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._offset=void 0!==e.offset?e.offset*s:0,this._beginGap=void 0!==e.beginPosition?e.beginPosition*s:0,this._endGap=void 0!==e.endPosition?e.endPosition*s:0,this._flipFirst=void 0===e.flipFirst||e.flipFirst,this._pattern=new A,this._pattern.init(e.positionArray,!1,!1),this._subPathLen=0,this._posCount=this._pattern.size(),this._isFirst=!0,this._prevPos=0}processPath(t){if(this._pattern.isEmpty())return null;let e;if(this.iteratePath){const t=this._pattern.nextValue()*this._subPathLen,s=this._beginGap+t;e=s-this._prevPos,this._prevPos=s}else{if(this._posCount=this._pattern.size(),this._isFirst=!0,this._prevPos=0,this._subPathLen=t.pathLength()-this._beginGap-this._endGap,this._subPathLen<0)return this.iteratePath=!1,null;if(!this._walker.init(t,this._pattern,!1))return null;this._pattern.reset();const s=this._pattern.nextValue()*this._subPathLen,i=this._beginGap+s;e=i-this._prevPos,this._prevPos=i,this.iteratePath=!0}const s=new v;if(!this._walker.nextPointAndAngle(e,s,P.END))return this.iteratePath=!1,null;this.internalPlacement.setTranslate(s.pt[0]-this._offset*s.sa,s.pt[1]+this._offset*s.ca);const i=this._isFirst&&this._flipFirst;let n,r;return this._angleToLine?(n=s.ca,r=s.sa):(n=1,r=0),i&&(n=-n,r=-r),this.internalPlacement.setRotateCS(n,r),this._isFirst=!1,this._posCount--,0===this._posCount&&(this.iteratePath=!1),this.internalPlacement}}var nt=s(77734);const rt=512,ht=24,ot=1e-6;class at{static local(){return null===at.instance&&(at.instance=new at),at.instance}execute(t,e,s,i,n){return new ct(t,e,s,i,n)}}at.instance=null;class ct{constructor(t,e,s,i,n){if(this._xMin=0,this._xMax=0,this._yMin=0,this._yMax=0,this._currentX=0,this._currentY=0,this._accelerationMap=null,this._testInsidePolygon=!1,this._verticalSubdivision=!0,this._stepX=Math.abs(e.stepX??16)*s,this._stepY=Math.abs(e.stepY??16)*s,this._stepX=Math.round(128*this._stepX)/128,this._stepY=Math.round(128*this._stepY)/128,0!==this._stepX&&0!==this._stepY){if(this._gridType=e.gridType??l.bj.Fixed,this._gridType===l.bj.Random){const t=e.seed??13,s=1;this._randomLCG=new nt.Z(t*s),this._randomness=(e.randomness??100)/100,this._gridAngle=0,this._shiftOddRows=!1,this._cosAngle=1,this._sinAngle=0,this._offsetX=0,this._offsetY=0,this._buildRandomValues()}else{if(this._randomness=0,this._gridAngle=e.gridAngle??0,this._shiftOddRows=e.shiftOddRows??!1,this._offsetX=(e.offsetX??0)*s,this._offsetY=(e.offsetY??0)*s,this._cosAngle=Math.cos(this._gridAngle/180*Math.PI),this._sinAngle=-Math.sin(this._gridAngle/180*Math.PI),this._stepX)if(this._offsetX<0)for(;this._offsetX<-.5*this._stepX;)this._offsetX+=this._stepX;else for(;this._offsetX>=.5*this._stepX;)this._offsetX-=this._stepX;if(this._stepY)if(this._offsetY<0)for(;this._offsetY<-.5*this._stepY;)this._offsetY+=this._stepY;else for(;this._offsetY>=.5*this._stepY;)this._offsetY-=this._stepY}if(this._graphicOriginX=0,this._graphicOriginY=0,null!=i){const[t,e,s,n]=i.split("/"),r=parseFloat(t),h=parseFloat(e),o=parseFloat(s),a=parseFloat(n);this._graphicOriginX=-(a*2**r+o)*rt,this._graphicOriginY=h*rt,this._testInsidePolygon=!0}this._internalPlacement=new o,this._calculateMinMax(t),this._geometryCursor=t}}next(){return this._geometryCursor?this._nextInside():null}_buildRandomValues(){if(!ct._randValues){ct._randValues=[];for(let t=0;t<ht;t++)for(let t=0;t<ht;t++)ct._randValues.push(this._randomLCG.getFloat()),ct._randValues.push(this._randomLCG.getFloat())}}_calculateMinMax(t){let e,s,i,n,r,h,o,a,c,u,l,_,f,p;this._xMin=0,this._xMax=0,this._yMin=0,this._yMax=0,o=a=f=l=Number.MAX_VALUE,c=u=p=_=-Number.MAX_VALUE;const d=1!==this._cosAngle;for(t.reset();t.nextPath();)for(;t.nextPoint();)h=t.x,r=t.y,e=h-this._graphicOriginX-this._offsetX,s=r-this._graphicOriginY-this._offsetY,d?(i=this._cosAngle*e-this._sinAngle*s,n=this._sinAngle*e+this._cosAngle*s):(i=e,n=s),o=Math.min(o,i),c=Math.max(c,i),a=Math.min(a,n),u=Math.max(u,n),l=Math.min(l,r),_=Math.max(_,r),f=Math.min(f,h),p=Math.max(p,h);l=l!==Number.MAX_VALUE?l:-512-this._stepY,_=_!==-Number.MAX_VALUE?_:this._stepY,f=f!==Number.MAX_VALUE?f:-this._stepX,p=p!==-Number.MAX_VALUE?p:rt+this._stepX;const g=_-l,m=p-f;if(this._verticalSubdivision=g>=m,this._polygonMin=this._verticalSubdivision?l:f,this._testInsidePolygon){let t=0-this._graphicOriginX-this._offsetX-this._stepX,e=rt-this._graphicOriginX-this._offsetX+this._stepX,s=-512-this._graphicOriginY-this._offsetY-this._stepY,i=0-this._graphicOriginY-this._offsetY+this._stepY;if(d){const n=[[t,s],[t,i],[e,s],[e,i]];t=s=Number.MAX_VALUE,e=i=-Number.MAX_VALUE;for(const r of n){const n=this._cosAngle*r[0]-this._sinAngle*r[1],h=this._sinAngle*r[0]+this._cosAngle*r[1];t=Math.min(t,n),e=Math.max(e,n),s=Math.min(s,h),i=Math.max(i,h)}}o=o!==Number.MAX_VALUE?Math.max(o,t):t,a=a!==Number.MAX_VALUE?Math.max(a,s):s,c=c!==-Number.MAX_VALUE?Math.min(c,e):e,u=u!==-Number.MAX_VALUE?Math.min(u,i):i}this._xMin=Math.round(o/this._stepX),this._xMax=Math.round(c/this._stepX),this._yMin=Math.round(a/this._stepY),this._yMax=Math.round(u/this._stepY),this._currentX=this._xMax+1,this._currentY=this._yMin-1,this._buildAccelerationMap(t,f,p,l,_)}_buildAccelerationMap(t,e,s,i,n){t.reset();const r=new Map,h=this._verticalSubdivision,o=h?n-i:s-e;let a=Math.ceil(o/10);if(a<=1)return;const c=Math.floor(o/a);let u,l,_,f,p,d,g,m,P,x,y;for(a++,this._delta=c,h?(P=-512-this._stepY,x=this._stepY,y=i):(P=-this._stepX,x=rt+this._stepX,y=e);t.nextPath();)if(!(t.pathSize<2)&&t.nextPoint())for(u=t.x,l=t.y;t.nextPoint();u=_,l=f){if(_=t.x,f=t.y,h){if(l===f||l<P&&f<P||l>x&&f>x)continue;p=Math.min(l,f),d=Math.max(l,f)}else{if(u===_||u<P&&_<P||u>x&&_>x)continue;p=Math.min(u,_),d=Math.max(u,_)}for(;p<d;)g=Math.floor((p-y)/c),ut(g,u,l,_,f,r),p+=c;m=Math.floor((d-y)/c),m>g&&ut(m,u,l,_,f,r)}this._accelerationMap=r}_nextInside(){for(;;){if(this._currentX>this._xMax){if(this._currentY++,this._currentY>this._yMax)return null;this._currentX=this._xMin,this._shiftOddRows&&this._currentY%2&&this._currentX--}let t=this._currentX*this._stepX+this._offsetX;this._shiftOddRows&&this._currentY%2&&(t+=.5*this._stepX);const e=this._currentY*this._stepY+this._offsetY;let s,i;if(this._currentX++,this._gridType===l.bj.Random){const n=(this._currentX%ht+ht)%ht,r=(this._currentY%ht+ht)%ht;s=this._graphicOriginX+t+this._stepX*this._randomness*(.5-ct._randValues[r*ht+n])*2/3,i=this._graphicOriginY+e+this._stepY*this._randomness*(.5-ct._randValues[r*ht+n+1])*2/3}else s=this._graphicOriginX+this._cosAngle*t+this._sinAngle*e,i=this._graphicOriginY-this._sinAngle*t+this._cosAngle*e;if(!this._testInsidePolygon||this._isInsidePolygon(s,i,this._geometryCursor))return this._internalPlacement.setTranslate(s,i),this._internalPlacement}}_isInsidePolygon(t,e,s){if(null==this._accelerationMap)return function(t,e,s){let i,n,r,h,o=0;for(t+=ot,e+=ot,s.reset();s.nextPath();)if(s.nextPoint())for(i=s.x,n=s.y;s.nextPoint();i=r,n=h)r=s.x,h=s.y,n>e!=h>e&&((r-i)*(e-n)-(h-n)*(t-i)>0?o++:o--);return 0!==o}(t,e,s);t+=ot,e+=ot;const i=this._verticalSubdivision,n=i?e:t,r=Math.floor((n-this._polygonMin)/this._delta),h=this._accelerationMap.get(r);if(!h)return!1;let o,a,c,u=0;for(const s of h){if(o=s[0],a=s[1],i){if(o[1]>e==a[1]>e)continue;c=(a[0]-o[0])*(e-o[1])-(a[1]-o[1])*(t-o[0])}else{if(o[0]>t==a[0]>t)continue;c=(a[1]-o[1])*(t-o[0])-(a[0]-o[0])*(e-o[1])}c>0?u++:u--}return 0!==u}}function ut(t,e,s,i,n,r){let h=r.get(t);h||(h=[],r.set(t,h)),h.push([[e,s],[i,n]])}class lt{static local(){return null===lt.instance&&(lt.instance=new lt),lt.instance}execute(t,e,s,i,n){return new _t(t,e,s)}}lt.instance=null;class _t extends c{constructor(t,e,s){super(t),this._curveHelper=new f,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._offset=void 0!==e.offset?e.offset*s:0,this._relativeTo=e.relativeTo,this._position=void 0!==e.startPointOffset?e.startPointOffset*s:0,this._epsilon=.001*s}processPath(t){const e=this._position;if(this._relativeTo===l.CS.SegmentMidpoint){if(this.iteratePath||(this.iteratePath=!0),t.nextPoint()){let[e,s]=[t.x,t.y],[i,n]=[0,0];for(;t.nextPoint();){i=t.x,n=t.y;const r=this._curveHelper.getLength(e,s,i,n);if(r<this._epsilon){e=i,s=n;continue}const h=.5+this._position/r,[o,a]=this._curveHelper.getAngleCS(e,s,i,n,h),c=this._curveHelper.getCoord2D(e,s,i,n,h);return this.internalPlacement.setTranslate(c[0]-this._offset*a,c[1]+this._offset*o),this._angleToLine&&this.internalPlacement.setRotateCS(o,a),this.internalPlacement}}return this.iteratePath=!1,null}const s=this._relativeTo===l.CS.LineEnd;return this.onLine(t,e,s)}onLine(t,e,s){let i,n=!1;switch(this._relativeTo){case l.CS.LineMiddle:default:t.seekPathStart(),i=t.pathLength()/2+e;break;case l.CS.LineBeginning:i=e;break;case l.CS.LineEnd:i=e,n=!0}s?t.seekPathEnd():t.seekPathStart();let r=0;if(s?t.prevPoint():t.nextPoint()){let[e,h]=[t.x,t.y],[o,a]=[0,0];for(;s?t.prevPoint():t.nextPoint();){o=t.x,a=t.y;const s=this._curveHelper.getLength(e,h,o,a);if(r+s>i){const t=(i-r)/s,[c,u]=this._curveHelper.getAngleCS(e,h,o,a,t),l=this._curveHelper.getCoord2D(e,h,o,a,t),_=n?-this._offset:this._offset;return this.internalPlacement.setTranslate(l[0]-_*u,l[1]+_*c),this._angleToLine&&(n?this.internalPlacement.setRotateCS(-c,-u):this.internalPlacement.setRotateCS(c,u)),this.internalPlacement}e=o,h=a,r+=s}}return null}}class ft{static local(){return null===ft.instance&&(ft.instance=new ft),ft.instance}execute(t,e,s,i,n){return new pt(t,e,s)}}ft.instance=null;class pt extends c{constructor(t,e,s){super(t),this._curveHelper=new f,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._offset=void 0!==e.offset?e.offset*s:0,this._endPoints=void 0===e.placeOnEndPoints||e.placeOnEndPoints,this._controlPoints=void 0===e.placeOnControlPoints||e.placeOnControlPoints,this._regularVertices=void 0===e.placeOnRegularVertices||e.placeOnRegularVertices,this._tags=[],this._tagIterator=0}processPath(t){if(this.iteratePath||(this._preparePath(t),this.iteratePath=!0),this._tagIterator>=this._tags.length)return this._tags.length=0,this._tagIterator=0,this.iteratePath=!1,null;const e=this._tags[this._tagIterator];this._angleToLine&&this.internalPlacement.setRotate(e[2]);let s=e[0],i=e[1];if(0!==this._offset){const t=Math.cos(e[2]),n=Math.sin(e[2]);s-=this._offset*n,i+=this._offset*t}return this.internalPlacement.setTranslate(s,i),this._tagIterator++,this.internalPlacement}_preparePath(t){this._tags.length=0,this._tagIterator=0,t.seekPathStart();const e=t.isClosed();let s=0,i=!1,n=0,r=0;if(t.seekPathStart(),t.nextPoint()){let h=t.x,o=t.y,a=t.getControlPoint(),c=!0,u=t.nextPoint();for(;u;){const l=t.x,_=t.y,f=t.getControlPoint();(this._angleToLine||0!==this._offset)&&(n=this._curveHelper.getAngle(h,o,l,_,0)),c?(c=!1,e?(s=n,i=a):(this._endPoints||this._controlPoints&&a)&&this._tags.push([h,o,n])):a?this._controlPoints&&this._tags.push([h,o,dt(r,n)]):this._regularVertices&&this._tags.push([h,o,dt(r,n)]),(this._angleToLine||0!==this._offset)&&(r=this._curveHelper.getAngle(h,o,l,_,1)),u=t.nextPoint(),u||(e?f||i?this._controlPoints&&this._tags.push([l,_,dt(r,s)]):this._regularVertices&&this._tags.push([l,_,dt(r,s)]):(this._endPoints||this._controlPoints&&f)&&this._tags.push([l,_,r])),h=l,o=_,a=f}}this._tagIterator=0}}function dt(t,e){const s=Math.PI;for(;Math.abs(e-t)>s+2e-15;)e-t>s?e-=2*s:e+=2*s;return(t+e)/2}var gt=s(35308),mt=s(32724);class Pt{static local(){return null===Pt.instance&&(Pt.instance=new Pt),Pt.instance}execute(t,e,s,i,n){return new xt(t,e,s)}}Pt.instance=null;class xt{constructor(t,e,s){this._geometryCursor=t,this._offsetX=void 0!==e.offsetX?e.offsetX*s:0,this._offsetY=void 0!==e.offsetY?e.offsetY*s:0,this._method=void 0!==e.method?e.method:l.Lh.OnPolygon,this._internalPlacement=new o}next(){const t=this._geometryCursor;return this._geometryCursor=null,t?this._polygonCenter(t):null}_polygonCenter(t){let e=!1;switch(this._method){case l.Lh.CenterOfMass:{const s=(0,gt.NA)(t);s&&(this._internalPlacement.setTranslate(s[0]+this._offsetX,s[1]+this._offsetY),e=!0)}break;case l.Lh.BoundingBoxCenter:{const s=(0,D.Cs)(t);s&&(this._internalPlacement.setTranslate((s[2]+s[0])/2+this._offsetX,(s[3]+s[1])/2+this._offsetY),e=!0)}break;case l.Lh.OnPolygon:default:{const s=(0,mt.r)(t);null!==s&&(this._internalPlacement.setTranslate(s[0]+this._offsetX,s[1]+this._offsetY),e=!0)}}return e?this._internalPlacement:null}}function yt(t){if(!t)return null;switch(t.type){case"CIMGeometricEffectAddControlPoints":return i.local();case"CIMGeometricEffectArrow":return g.local();case"CIMGeometricEffectBuffer":return b.local();case"CIMGeometricEffectControlMeasureLine":return S.local();case"CIMGeometricEffectCut":return w.local();case"CIMGeometricEffectDashes":return E.local();case"CIMGeometricEffectDonut":return k.local();case"CIMGeometricEffectJog":return O.local();case"CIMGeometricEffectMove":return R.local();case"CIMGeometricEffectOffset":return X.local();case"CIMGeometricEffectReverse":return U.local();case"CIMGeometricEffectRotate":return W.local();case"CIMGeometricEffectScale":return Z.local();case"CIMGeometricEffectWave":return q.local()}return null}function bt(t){if(!t)return null;switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":return K.local();case"CIMMarkerPlacementAtExtremities":return tt.local();case"CIMMarkerPlacementAtRatioPositions":return st.local();case"CIMMarkerPlacementInsidePolygon":return at.local();case"CIMMarkerPlacementOnLine":return lt.local();case"CIMMarkerPlacementOnVertices":return ft.local();case"CIMMarkerPlacementPolygonCenter":return Pt.local()}return null}},25844:(t,e,s)=>{s.d(e,{Tg:()=>r,K:()=>h}),new(s(79087).Z),s(80442),s(22974),s(92604),s(77734),s(24470),s(20322),s(31134),s(68773),new Map,new Set,s(71143),s(58835),s(35308),s(33955),s(21793),s(66221),s(36431),s(95648),s(61565);var i=s(72233);function n(t){if(!t)return 0;switch(t.type){case"CIMGeometricEffectArrow":return Math.abs(.5*t.width);case"CIMGeometricEffectBuffer":return Math.abs(t.size);case"CIMGeometricEffectExtension":case"CIMGeometricEffectRadial":return Math.abs(t.length);case"CIMGeometricEffectJog":return Math.abs(.5*t.length);case"CIMGeometricEffectMove":return Math.max(Math.abs((0,i.NA)(t.offsetX)),Math.abs((0,i.NA)(t.offsetY)));case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":return Math.abs(t.offset);case"CIMGeometricEffectRegularPolygon":return Math.abs(t.radius);case"CIMGeometricEffectRotate":case"CIMGeometricEffectScale":default:return 0;case"CIMGeometricEffectTaperedPolygon":return.5*Math.max(Math.abs(t.fromWidth),Math.abs(t.toWidth));case"CIMGeometricEffectWave":return Math.abs(t.amplitude);case"CIMGeometricEffectDonut":return Math.abs(t.width)}}function r(t){if(!t)return 0;let e=0;for(const s of t)e+=n(s);return e}s(16534),s(48050),Math.PI,s(28412),s(31363),Math.PI,Math.PI;const h=t=>{if(!t)return[0,0,0,0];const{r:e,g:s,b:i,a:n}=t;return[e,s,i,255*n]}},36431:(t,e,s)=>{},72233:(t,e,s)=>{s.d(e,{E_:()=>h,H1:()=>r,Le:()=>c,NA:()=>o,Qf:()=>a,e0:()=>l,yl:()=>u}),s(36431);const i=" /-,\n";function n(t){let e=t.length;for(;e--;)if(!i.includes(t.charAt(e)))return!1;return!0}function r(t,e){const s=[];let i=0,r=-1;do{if(r=t.indexOf("[",i),r>=i){if(r>i){const e=t.substr(i,r-i);s.push([e,null,n(e)])}if(i=r+1,r=t.indexOf("]",i),r>=i){if(r>i){const n=e[t.substr(i,r-i)];n&&s.push([null,n,!1])}i=r+1}}}while(-1!==r);if(i<t.length-1){const e=t.substr(i);s.push([e,null,n(e)])}return s}function h(t,e,s){let i="",n=null;for(const s of e){const[e,r,h]=s;if(e)h?n=e:(n&&(i+=n,n=null),i+=e);else{const e=t.attributes[r];e&&(n&&(i+=n,n=null),i+=e)}}return function(t,e){switch("string"!=typeof t&&(t=String(t)),e){case"LowerCase":return t.toLowerCase();case"Allcaps":return t.toUpperCase();default:return t}}(i,s)}const o=(t,e=0)=>null==t||isNaN(t)?e:t;function a(t){return(t?Object.keys(t):[]).map((e=>({name:e,alias:e,type:"string"==typeof t[e]?"esriFieldTypeString":"esriFieldTypeDouble"})))}function c(t){return t?t.charAt(0).toLowerCase()+t.substring(1):t}function u(t,e,s,i,n,r){const{infos:h}=r;let o=1,a=0,c=0,u=0;for(const{offsetX:t,offsetY:e,rotation:s,size:i,frameHeight:n,rotateClockWise:r}of h)c=f(t,e,a,o,c),u=_(t,e,a,o,u),n&&(o*=i/n),a=p(s,r,a);const l=f(i,n,a,o,c),d=_(i,n,a,o,u);return{size:t*o,rotation:p(e,s,a),offsetX:l,offsetY:d}}function l(t){if(null==t)return"Normal";switch(t.type){case"CIMTextSymbol":return t.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const e=t.symbolLayers;if(!e)return"Normal";for(const t of e)if("CIMVectorMarker"===t.type)return l(t)}break;case"CIMVectorMarker":{const e=t.markerGraphics;if(!e)return"Normal";for(const t of e)if(t.symbol)return l(t.symbol)}}return"Normal"}function _(t,e,s,i,n){const r=s*Math.PI/180;if(r){const s=Math.cos(r);return(Math.sin(r)*t+s*e)*i+n}return e*i+n}function f(t,e,s,i,n){const r=s*Math.PI/180;return r?(Math.cos(r)*t-Math.sin(r)*e)*i+n:t*i+n}function p(t,e,s){return e?s-t:s+t}},28412:(t,e,s)=>{s.d(e,{CJ:()=>c,Rz:()=>l,xA:()=>a,z3:()=>u}),s(80442);var i=s(20256),n=s(4095),r=s(77987),h=s(78724),o=s(58333);const a=r.Z.fromJSON(o.I4),c=n.Z.fromJSON(o.ET),u=i.Z.fromJSON(o.lF),l=h.Z.fromJSON(o.qP);r.Z.fromJSON(o.eG),n.Z.fromJSON(o.wW),i.Z.fromJSON(o.lj)},58333:(t,e,s)=>{s.d(e,{ET:()=>r,I4:()=>n,eG:()=>a,lF:()=>h,lj:()=>u,qP:()=>o,wW:()=>c});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},h={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},o={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},87893:(t,e,s)=>{s.d(e,{Z:()=>i});class i{constructor(t=0,e=0,s=0,i=0){this.x=t,this.y=e,this.width=s,this.height=i}get isEmpty(){return this.width<=0||this.height<=0}union(t){this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.width=Math.max(this.width,t.width),this.height=Math.max(this.height,t.height)}}},30729:(t,e,s)=>{s.d(e,{TR:()=>h,b7:()=>c,g:()=>u,kH:()=>a,tf:()=>l});var i=s(92604);const n=()=>i.Z.getLogger("esri.views.2d.engine.webgl.alignmentUtils");var r,h,o;function a(t){if(!t)return r.Center;switch(t){case"Left":case"left":return r.Left;case"Right":case"right":return r.Right;case"Justify":return n().warnOnce("Horizontal alignment 'justify' is not implemented. Falling back to 'center'."),r.Center;case"Center":case"center":return r.Center}}function c(t){if(!t)return h.Center;switch(t){case"Top":case"top":return h.Top;case"Center":case"middle":return h.Center;case"Baseline":case"baseline":return h.Baseline;case"Bottom":case"bottom":return h.Bottom}}function u(t){switch(t){case r.Right:case"right":return-1;case r.Center:case"center":return 0;case r.Left:case"left":return 1;default:return console.debug(`Found invalid horizontal alignment ${t}`),0}}function l(t){switch(t){case h.Top:case"top":return 1;case h.Center:case"middle":return 0;case h.Bottom:case h.Baseline:case"baseline":case"bottom":return-1;default:return console.debug(`Found invalid vertical alignment ${t}`),0}}(o=r||(r={}))[o.Left=-1]="Left",o[o.Center=0]="Center",o[o.Right=1]="Right",function(t){t[t.Top=1]="Top",t[t.Center=0]="Center",t[t.Bottom=-1]="Bottom",t[t.Baseline=2]="Baseline"}(h||(h={}))},43823:(t,e,s)=>{s.d(e,{Z:()=>n});var i=s(10787);class n{constructor(t,e,s,n){this.computedX=0,this.computedY=0,this.center=(0,i.al)(t,e),this.centerT=(0,i.Ue)(),this.halfWidth=s/2,this.halfHeight=n/2,this.width=s,this.height=n}get x(){return this.center[0]}get y(){return this.center[1]}get blX(){return this.center[0]+this.halfWidth}get blY(){return this.center[1]+this.halfHeight}get trX(){return this.center[0]-this.halfWidth}get trY(){return this.center[1]-this.halfHeight}get xmin(){return this.x-this.halfWidth}get xmax(){return this.x+this.halfWidth}get ymin(){return this.y-this.halfHeight}get ymax(){return this.y+this.halfHeight}set x(t){this.center[0]=t}set y(t){this.center[1]=t}clone(){return new n(this.x,this.y,this.width,this.height)}serialize(t){return t.writeF32(this.center[0]),t.writeF32(this.center[1]),t.push(this.width),t.push(this.height),t}findCollisionDelta(t,e=4){const s=Math.abs(t.centerT[0]-this.centerT[0]),i=Math.abs(t.centerT[1]-this.centerT[1]),n=(t.halfWidth+this.halfWidth+e)/s,r=(t.halfHeight+this.halfHeight+e)/i,h=Math.min(n,r);return Math.log2(h)}extend(t){const e=Math.min(this.xmin,t.xmin),s=Math.min(this.ymin,t.ymin),i=Math.max(this.xmax,t.xmax)-e,n=Math.max(this.ymax,t.ymax)-s,r=e+i/2,h=s+n/2;this.width=i,this.height=n,this.halfWidth=i/2,this.halfHeight=n/2,this.x=r,this.y=h}static deserialize(t){const e=t.readF32(),s=t.readF32(),i=t.readInt32(),r=t.readInt32();return new n(e,s,i,r)}}},48050:(t,e,s)=>{s.d(e,{Nr:()=>C});var i=s(55308),n=s(57490),r=s(23727),h=s(10787),o=s(30729),a=s(87893),c=s(43823);const u=22,l=4,_=u+l,f=u-6,p=3,d=Math.PI/180;class g{constructor(t,e,s,i){this._rotationT=(0,n.Ue)(),this._xBounds=0,this._yBounds=0,this.minZoom=0,this.maxZoom=255,this._bounds=null;const r=s.rect,h=new Float32Array(8);t*=i,e*=i;const o=s.code?r.width*i:s.metrics.width,a=s.code?r.height*i:s.metrics.height;this.width=o,this.height=a,h[0]=t,h[1]=e,h[2]=t+o,h[3]=e,h[4]=t,h[5]=e+a,h[6]=t+o,h[7]=e+a,this._data=h,this._setTextureCoords(r),this._scale=i,this._mosaic=s,this.x=t,this.y=e,this.maxOffset=Math.max(t+o,e+a)}get mosaic(){return this._mosaic}set angle(t){this._angle=t,(0,i.Us)(this._rotationT,-t),this._setOffsets()}get angle(){return this._angle}get xTopLeft(){return this._data[0]}get yTopLeft(){return this._data[1]}get xBottomRight(){return this._data[6]}get yBottomRight(){return this._data[7]}get texcoords(){return this._texcoords}get textureBinding(){return this._mosaic.textureBinding}get offsets(){return this._offsets||this._setOffsets(),this._offsets}get char(){return String.fromCharCode(this._mosaic.code)}get code(){return this._mosaic.code}get bounds(){if(!this._bounds){const{height:t,width:e}=this._mosaic.metrics,s=e*this._scale,r=Math.abs(t)*this._scale,h=new Float32Array(8);h[0]=this.x,h[1]=this.y,h[2]=this.x+s,h[3]=this.y,h[4]=this.x,h[5]=this.y+r,h[6]=this.x+s,h[7]=this.y+r;const o=(0,i.Jp)((0,n.Ue)(),this._rotationT,this._transform);(0,n.Zz)(h,h,o);let a=1/0,u=1/0,l=0,_=0;for(let t=0;t<4;t++){const e=h[2*t],s=h[2*t+1];a=Math.min(a,e),u=Math.min(u,s),l=Math.max(l,e),_=Math.max(_,s)}const f=l-a,p=_-u,d=a+f/2,g=u+p/2;this._bounds=new c.Z(d,g,f,p)}return this._bounds}setTransform(t){this._transform=t,this._offsets=null}_setOffsets(){this._offsets||(this._offsets={topLeft:[0,0],topRight:[0,0],bottomLeft:[0,0],bottomRight:[0,0]});const t=(0,i.Jp)((0,n.Ue)(),this._rotationT,this._transform);this._offsets.topLeft[0]=this._data[0],this._offsets.topLeft[1]=this._data[1],this._offsets.topRight[0]=this._data[2],this._offsets.topRight[1]=this._data[3],this._offsets.bottomLeft[0]=this._data[4],this._offsets.bottomLeft[1]=this._data[5],this._offsets.bottomRight[0]=this._data[6],this._offsets.bottomRight[1]=this._data[7],(0,r.iu)(this._offsets.topLeft,this._offsets.topLeft,t),(0,r.iu)(this._offsets.topRight,this._offsets.topRight,t),(0,r.iu)(this._offsets.bottomLeft,this._offsets.bottomLeft,t),(0,r.iu)(this._offsets.bottomRight,this._offsets.bottomRight,t)}_setTextureCoords({x:t,y:e,width:s,height:i}){this._texcoords={topLeft:[t,e],topRight:[t+s,e],bottomLeft:[t,e+i],bottomRight:[t+s,e+i]}}}const m=(t,e)=>({code:0,page:0,sdf:!0,rect:new a.Z(0,0,11,8),textureBinding:e,metrics:{advance:0,height:4,width:t,left:0,top:0}});function P(t,e){return t.forEach((t=>(0,r.iu)(t,t,e))),{topLeft:t[0],topRight:t[1],bottomLeft:t[2],bottomRight:t[3]}}class x{constructor(t,e,s){this._rotation=0,this._decorate(t,e,s),this.glyphs=t,this.bounds=this._createBounds(t),this.isMultiline=e.length>1,this._hasRotation=0!==s.angle,this._transform=this._createGlyphTransform(this.bounds,s),this._borderLineSizePx=s.borderLineSizePx,(s.borderLineSizePx||s.hasBackground)&&([this.bounds,this.textBox]=this.shapeBackground(this._transform));for(const e of t)e.setTransform(this._transform)}setRotation(t){if(0===t&&0===this._rotation)return;this._rotation=t;const e=this._transform,s=(0,i.Us)((0,n.Ue)(),t);(0,i.Jp)(e,s,e);for(const t of this.glyphs)t.setTransform(this._transform)}_decorate(t,e,s){if(!s.decoration||"none"===s.decoration||!t.length)return;const i=s.scale,n="underline"===s.decoration?_:f,r=t[0].textureBinding;for(const s of e){const e=s.startX*i,h=s.startY*i,o=(s.width+s.glyphWidthEnd)*i;t.push(new g(e,h+n*i,m(o,r),1))}}shapeBackground(t){const e=(1.5+(this._borderLineSizePx||0))/2,s=this._borderLineSizePx?e:0,{xmin:i,ymin:n,xmax:r,ymax:h,x:o,y:a,width:u,height:l}=this.bounds,_=[i-8,n-8],f=[r+8,n-8],p=[i-8,h+8],d=[r+8,h+8],g=P([[_[0]-e,_[1]-e],[f[0]+e,f[1]-e],[_[0]+s,_[1]+s],[f[0]-s,f[1]+s]],t),m=P([[p[0]+s,p[1]-s],[d[0]-s,d[1]-s],[p[0]-e,p[1]+e],[d[0]+e,d[1]+e]],t),x=P([[_[0]-e,_[1]-e],[_[0]+s,_[1]+s],[p[0]-e,p[1]+e],[p[0]+s,p[1]-s]],t),y=P([[f[0]-s,f[1]+s],[f[0]+e,f[1]-e],[d[0]-s,d[1]-s],[d[0]+e,d[1]+e]],t),b={main:P([_,f,p,d],t),top:g,bot:m,left:x,right:y};return[new c.Z(o,a,u+2*e,l+2*e),b]}get boundsT(){const t=this.bounds,e=(0,r.t8)((0,h.Ue)(),t.x,t.y);if((0,r.iu)(e,e,this._transform),this._hasRotation){const s=Math.max(t.width,t.height);return new c.Z(e[0],e[1],s,s)}return new c.Z(e[0],e[1],t.width,t.height)}_createBounds(t){let e=1/0,s=1/0,i=0,n=0;for(const r of t)e=Math.min(e,r.xTopLeft),s=Math.min(s,r.yTopLeft),i=Math.max(i,r.xBottomRight),n=Math.max(n,r.yBottomRight);const r=i-e,h=n-s;return new c.Z(e+r/2,s+h/2,r,h)}_createGlyphTransform(t,e){const s=d*e.angle,o=(0,n.Ue)(),a=(0,h.Ue)();return(0,i.Iu)(o,o,(0,r.t8)(a,e.xOffset,-e.yOffset)),e.useCIMAngleBehavior?(0,i.U1)(o,o,s):((0,i.Iu)(o,o,(0,r.t8)(a,t.x,t.y)),(0,i.U1)(o,o,s),(0,i.Iu)(o,o,(0,r.t8)(a,-t.x,-t.y))),o}}class y{constructor(t,e,s,i,n,r){this.glyphWidthEnd=0,this.startX=0,this.startY=0,this.start=Math.max(0,Math.min(e,s)),this.end=Math.max(0,Math.max(e,s)),this.end<t.length&&(this.glyphWidthEnd=t[this.end].metrics.width),this.width=i,this.yMin=n,this.yMax=r}}const b=t=>10===t,M=t=>32===t;function S(t,e){let s=0;for(let e=0;e<t.length;e++){const{width:i}=t[e];s=Math.max(i,s)}const i="underline"===e.decoration?l:0,n=t[0].yMin;return{x:0,y:n,height:t[t.length-1].yMax+e.lineHeight*(t.length-1)+i-n,width:s}}function C(t,e){const s=e.scale,i=new Array,{glyphs:n,isRightToLeft:r}=t,h=function(t,e,s){const i=new Array,n=1/s.scale,r=s.maxLineWidth*n,h=e?t.length-1:0,o=e?-1:t.length,a=e?-1:1;let c=h,u=0,l=0,_=c,f=_,p=0,d=1/0,g=0;for(;c!==o;){const{code:e,metrics:s}=t[c],n=Math.abs(s.top);if(b(e)||M(e)||(d=Math.min(d,n),g=Math.max(g,n+s.height)),b(e))c!==h&&(i.push(new y(t,_,c-a,u,d,g)),d=1/0,g=0),u=0,_=c+a,f=c+a,l=0;else if(M(e))f=c+a,l=0,p=s.advance,u+=s.advance;else if(u>r){if(f!==_){const e=f-2*a;u-=p,i.push(new y(t,_,e,u-l,d,g)),d=1/0,g=0,_=f,u=l}else i.push(new y(t,_,c-a,u,d,g)),d=1/0,g=0,_=c,f=c,u=0;u+=s.advance,l+=s.advance}else u+=s.advance,l+=s.advance;c+=a}const m=new y(t,_,c-a,u,d,g);return m.start>=0&&m.end<t.length&&i.push(m),i}(n,r,e),a=S(h,e),c=(0,o.kH)(e.horizontalAlignment),l=(0,o.b7)(e.verticalAlignment),_=l===o.TR.Baseline?1:0,f=_?0:l-1,d=(1-_)*-a.y+f*(a.height/2)+(_?1:0)*-u;for(let t=0;t<h.length;t++){const{start:r,end:o,width:a}=h[t];let u=-1*(c+1)*(a/2)-p;const l=t*e.lineHeight+d-p;h[t].startX=u,h[t].startY=l;for(let t=r;t<=o;t++){const e=n[t];if(b(e.code))continue;const r=new g(u+e.metrics.left,l-e.metrics.top,e,s);u+=e.metrics.advance,i.push(r)}}return new x(i,h,e)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8062,8008],{7335:(e,a,r)=>{r.d(a,{L:()=>n});var t=r(96187);class n{constructor(){this._serviceMetadatas=new Map}async fetchServiceMetadata(e,a){const r=this._serviceMetadatas.get(e);if(r)return r;const n=await(0,t.T)(e,a);return this._serviceMetadatas.set(e,n),n}}},71592:(e,a,r)=>{r.d(a,{w:()=>y});var t=r(40330),n=r(3172),i=r(20102),l=r(95330),s=r(66677),c=r(48522),o=r(15235);async function y(e,a){const r=(0,s.Qc)(e);if(!r)throw new i.Z("invalid-url","Invalid scene service url");const y={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(y.sceneLayerItem??=await async function(e){const a=(await u(e)).serviceItemId;if(!a)return null;const r=new o.default({id:a,apiKey:e.apiKey}),i=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.Z)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,l.r9)(e)}return null}(e);null!=i&&(r.portal=new c.Z({url:i}));try{return r.load({signal:e.signal})}catch(e){return(0,l.r9)(e),null}}(y),null==y.sceneLayerItem)return d(y.sceneServerUrl.replace("/SceneServer","/FeatureServer"),y);const p=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!r)return null;const t=new o.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,l.r9)(e),null}}(y);if(!p?.url)throw new i.Z("related-service-not-found","Could not find feature service through portal item relationship");const f=await d(p.url,y);return f.portalItem=p,f}async function u(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.Z)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,s.Qc)(e);if(!r)throw new i.Z("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,l=a.layerId;if(null==l)return{serverUrl:t};const c=u(a),o=e=>{const r={query:{f:"json"},responseType:"json",authMode:e,signal:a.signal};return(0,n.Z)(t,r)},y=o("anonymous").catch((()=>o("no-prompt"))),[d,p]=await Promise.all([y,c]),f=p?.layers,L=d.data&&d.data.layers;if(!Array.isArray(L))throw new Error("expected layers array");if(Array.isArray(f)){for(let e=0;e<Math.min(f.length,L.length);e++)if(f[e].id===l)return{serverUrl:t,layerId:L[e].id}}else if(null!=l&&l<L.length)return{serverUrl:t,layerId:L[l].id};throw new Error("could not find matching associated sublayer")}},52104:(e,a,r)=>{r.d(a,{V:()=>n});var t=r(96187);async function n(e,a){const r=await(0,t.T)(e,a);y(r),s(r);const n={serviceJSON:r};if((r.currentVersion??0)<10.5)return n;const i=await(0,t.T)(e+"/layers",a);return y(i),s(i),n.layersJSON={layers:i.layers,tables:i.tables},n}function i(e){return"Feature Layer"===e.type||"Oriented Imagery Layer"===e.type}function l(e){return"Table"===e.type}function s(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(l)}function c(e){e.type||="Feature Layer"}function o(e){e.type||="Table"}function y(e){e.layers?.forEach(c),e.tables?.forEach(o)}},70024:(e,a,r)=>{r.d(a,{k:()=>M,populateOperationalLayers:()=>y});var t=r(46791),n=(r(80442),r(7335)),i=r(87344),l=r(15235);function s(e,a){return!(!e.layerType||"ArcGISFeatureLayer"!==e.layerType)&&e.featureCollectionType===a}var c=r(28008),o=r(40555);async function y(e,a,r){if(!a)return;const t=a.map((e=>async function(e,a){return async function(e,a,r){const t=new e;return t.read(a,r.context),"group"===t.type&&("GroupLayer"===a.layerType?await M(t,a,r):v(a)?function(e,a,r){a.itemId&&(e.portalItem=new l.default({id:a.itemId,portal:r?.portal}),e.when((()=>{const t=t=>{const n=t.layerId;G(t,e,a,n,r);const i=a.featureCollection?.layers?.[n];i&&t.read(i,r)};e.layers?.forEach(t),e.tables?.forEach(t)})))}(t,a,r.context):b(a)&&await async function(e,a,r){const t=i.T.FeatureLayer,n=await t(),l=a.featureCollection,s=l?.showLegend,c=l?.layers?.map(((t,i)=>{const l=new n;l.read(t,r);const c={...r,ignoreDefaults:!0};return G(l,e,a,i,c),null!=s&&l.read({showLegend:s},c),l}));e.layers.addMany(c??[])}(t,a,r.context)),await(0,o.y)(t,r.context),t}(await g(e,a),e,a)}(e,r))),n=await Promise.allSettled(t);for(const a of n)"rejected"===a.status||a.value&&e.add(a.value)}const u={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",PointCloudLayer:"PointCloudLayer",ArcGISSceneServiceLayer:"SceneLayer",IntegratedMeshLayer:"IntegratedMeshLayer",OGCFeatureLayer:"OGCFeatureLayer",BuildingSceneLayer:"BuildingSceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",GroupLayer:"GroupLayer",GeoJSON:"GeoJSONLayer",WebTiledLayer:"WebTileLayer",CSV:"CSVLayer",VectorTileLayer:"VectorTileLayer",WFS:"WFSLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",KML:"KMLLayer",RasterDataLayer:"UnsupportedLayer",Voxel:"VoxelLayer",LineOfSightLayer:"LineOfSightLayer"},d={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},p={ArcGISFeatureLayer:"FeatureLayer"},f={ArcGISTiledMapServiceLayer:"TileLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",OpenStreetMap:"OpenStreetMapLayer",WebTiledLayer:"WebTileLayer",VectorTileLayer:"VectorTileLayer",ArcGISImageServiceLayer:"UnsupportedLayer",WMS:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",DefaultTileLayer:"TileLayer"},L={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",CSV:"CSVLayer",DefaultTileLayer:"TileLayer",GeoRSS:"GeoRSSLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"UnsupportedLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},m={ArcGISFeatureLayer:"FeatureLayer"},w={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",BingMapsAerial:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"},S={...L,LinkChartLayer:"LinkChartLayer"},h={...m},I={...w};async function g(e,a){const r=a.context,t=T(r);let o=e.layerType||e.type;!o&&a?.defaultLayerType&&(o=a.defaultLayerType);const y=t[o];let u=y?i.T[y]:i.T.UnknownLayer;if(v(e)){const a=r?.portal;if(e.itemId){const r=new l.default({id:e.itemId,portal:a});await r.load();const t=(await(0,c.v)(r,new n.L)).className||"UnknownLayer";u=i.T[t]}}else"ArcGISFeatureLayer"===o?function(e){return s(e,"notes")}(e)||function(e){return s(e,"markup")}(e)?u=i.T.MapNotesLayer:function(e){return s(e,"route")}(e)?u=i.T.RouteLayer:b(e)&&(u=i.T.GroupLayer):e.wmtsInfo?.url&&e.wmtsInfo.layerIdentifier?u=i.T.WMTSLayer:"WFS"===o&&"2.0.0"!==e.wfsInfo?.version&&(u=i.T.UnsupportedLayer);return u()}function b(e){return"ArcGISFeatureLayer"===e.layerType&&!v(e)&&(e.featureCollection?.layers?.length??0)>1}function v(e){return"Feature Collection"===e.type}function T(e){let a;switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap":a=f;break;case"ground":a=d;break;case"tables":a=p;break;default:a=u}break;case"link-chart":switch(e.layerContainerType){case"basemap":a=I;break;case"tables":a=h;break;default:a=S}break;default:switch(e.layerContainerType){case"basemap":a=w;break;case"tables":a=m;break;default:a=L}}return a}async function M(e,a,r){const n=new t.Z,i=y(n,Array.isArray(a.layers)?a.layers:[],r);try{try{if(await i,"group"===e.type)return e.layers.addMany(n),e}catch(a){e.destroy();for(const e of n)e.destroy();throw a}}catch(e){throw e}}function G(e,a,r,t,n){e.read({id:`${a.id}-sublayer-${t}`,visibility:r.visibleLayers?.includes(t)??!0},n)}},87344:(e,a,r)=>{r.d(a,{T:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(8153)]).then(r.bind(r,2723))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(4165),r.e(7407),r.e(1469),r.e(4723),r.e(9238),r.e(6170),r.e(1767),r.e(5476),r.e(2313),r.e(9498)]).then(r.bind(r,30223))).default,CSVLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(4165),r.e(7407),r.e(1469),r.e(4723),r.e(9238),r.e(6364)]).then(r.bind(r,45425))).default,DimensionLayer:async()=>(await Promise.all([r.e(163),r.e(9717)]).then(r.bind(r,40081))).default,ElevationLayer:async()=>(await Promise.all([r.e(163),r.e(9016),r.e(2763)]).then(r.bind(r,65665))).default,FeatureLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(4165),r.e(7407),r.e(1469),r.e(4723),r.e(9238),r.e(2797)]).then(r.bind(r,19238))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(4165),r.e(7407),r.e(1469),r.e(2859)]).then(r.bind(r,23477))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(9790),r.e(9102),r.e(3212)]).then(r.bind(r,3723))).default,GroupLayer:async()=>(await Promise.all([r.e(163),r.e(118)]).then(r.bind(r,40504))).default,ImageryLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(4165),r.e(4599),r.e(6610),r.e(9970),r.e(4592)]).then(r.bind(r,3519))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(6610),r.e(9970),r.e(4216),r.e(9236)]).then(r.bind(r,78719))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(163),r.e(1767),r.e(1537)]).then(r.bind(r,9310))).default,KMLLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(8652)]).then(r.bind(r,42756))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(163),r.e(4998)]).then(r.bind(r,21786))).default,LinkChartLayer:async()=>(await Promise.all([r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(4165),r.e(1469),r.e(8968),r.e(2936),r.e(9885)]).then(r.bind(r,30606))).default,MapImageLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(4165),r.e(7407),r.e(4599),r.e(9735),r.e(4143),r.e(7374)]).then(r.bind(r,27374))).default,MapNotesLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(4165),r.e(7407),r.e(1469),r.e(4723),r.e(9238),r.e(6356)]).then(r.bind(r,62128))).default,MediaLayer:async()=>(await Promise.all([r.e(163),r.e(4828)]).then(r.bind(r,57765))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(4165),r.e(7407),r.e(1469),r.e(2882),r.e(2118)]).then(r.bind(r,88068))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(9971),r.e(6237)]).then(r.bind(r,66237))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(4165),r.e(7407),r.e(1469),r.e(4723),r.e(9238),r.e(5501)]).then(r.bind(r,44958))).default,PointCloudLayer:async()=>(await Promise.all([r.e(163),r.e(1773),r.e(1767),r.e(7863)]).then(r.bind(r,10608))).default,RouteLayer:async()=>(await Promise.all([r.e(163),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(9625)]).then(r.bind(r,40153))).default,SceneLayer:async()=>(await Promise.all([r.e(163),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(4165),r.e(7407),r.e(6170),r.e(1767),r.e(5476),r.e(2313),r.e(299)]).then(r.bind(r,57476))).default,StreamLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(4165),r.e(7407),r.e(1469),r.e(9319)]).then(r.bind(r,88387))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(4165),r.e(7407),r.e(4723),r.e(6540),r.e(5460)]).then(r.bind(r,20697))).default,TileLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(4165),r.e(7407),r.e(4599),r.e(9735),r.e(9016),r.e(4143),r.e(8636)]).then(r.bind(r,98636))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(163),r.e(8393)]).then(r.bind(r,33717))).default,UnknownLayer:async()=>(await r.e(4166).then(r.bind(r,44166))).default,UnsupportedLayer:async()=>(await r.e(9296).then(r.bind(r,39296))).default,VectorTileLayer:async()=>(await Promise.all([r.e(163),r.e(3366),r.e(9016),r.e(9805),r.e(5481)]).then(r.bind(r,94756))).default,VoxelLayer:async()=>(await Promise.all([r.e(163),r.e(1773),r.e(1767),r.e(7528)]).then(r.bind(r,28865))).default,WFSLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(6621),r.e(3366),r.e(8812),r.e(1423),r.e(4165),r.e(7407),r.e(1469),r.e(8089),r.e(6134)]).then(r.bind(r,12653))).default,WMSLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(1773),r.e(9790),r.e(9102),r.e(2363)]).then(r.bind(r,25906))).default,WMTSLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(9971),r.e(2594)]).then(r.bind(r,72594))).default,WebTileLayer:async()=>(await Promise.all([r.e(163),r.e(1566),r.e(9971)]).then(r.bind(r,16199))).default}},33516:(e,a,r)=>{r.d(a,{Y:()=>l,h:()=>i});var t=r(17452),n=r(48522);function i(e,a){return{...s(e,a),readResourcePaths:[]}}function l(e,a,r){const n=(0,t.mN)(e.itemUrl);return{...s(e,a),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function s(e,a){return{origin:a,url:(0,t.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e}}},18062:(e,a,r)=>{r.d(a,{load:()=>L});var t=r(20102),n=r(66677),i=r(52104),l=r(7335),s=r(70024),c=r(87344),o=r(48522),y=r(33516),u=r(3072),d=r(14661),p=r(40555),f=r(96187);async function L(e,a){const r=e.instance.portalItem;if(r?.id)return await r.load(a),function(e){const a=e.instance.portalItem;if(!a?.type||!e.supportedTypes.includes(a.type))throw new t.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:a?.type,expectedType:e.supportedTypes.join(", ")})}(e),e.validateItem&&e.validateItem(r),async function(e,a){const r=e.instance,n=r.portalItem;if(!n)return;const{url:c,title:o}=n,L=(0,y.h)(n,"portal-item");if("group"===r.type)return async function(e,a,r){const n=e.portalItem;if(!e.sourceIsPortalItem)return;const{title:c,type:o}=n;if("Group Layer"===o){if(!(0,d._$)(n,"Map"))throw new t.Z("portal:invalid-layer-item-typekeyword","'Group Layer' item without 'Map' type keyword is not supported");return async function(e){const a=e.portalItem,r=await a.fetchData("json");if(!r)return;const t=(0,y.h)(a,"web-map");e.read(r,t),await(0,s.k)(e,r,{context:t}),e.resourceReferences={portalItem:a,paths:t.readResourcePaths??[]}}(e)}return e.read({title:c},a),async function(e,a){let r;const{portalItem:n}=e;if(!n)return;const s=n.type,c=a.layerModuleTypeMap;switch(s){case"Feature Service":case"Feature Collection":r=c.FeatureLayer;break;case"Stream Service":r=c.StreamLayer;break;case"Scene Service":r=c.SceneLayer;break;default:throw new t.Z("portal:unsupported-item-type-as-group",`The item type '${s}' is not supported as a 'IGroupLayer'`)}const o=new l.L;let[y,d]=await Promise.all([r(),S(a,o)]),p=()=>y;if("Feature Service"===s){d=n.url?await(0,u.$O)(d,n.url,o):{};const a=(0,u.XX)(d),r=(0,u._Y)(d),t=[];if(a.length||r?.length){a.length&&t.push("SubtypeGroupLayer"),r?.length&&t.push("OrientedImageryLayer");const e=[];for(const a of t){const r=c[a];e.push(r())}const n=await Promise.all(e),i=new Map;t.forEach(((e,a)=>{i.set(e,n[a])})),p=e=>e.layerType?i.get(e.layerType)??y:y}const l=await async function(e){const{layersJSON:a}=await(0,i.V)(e);if(!a)return null;const r=[...a.layers,...a.tables];return e=>r.find((a=>a.id===e.id))}(n.url);return await m(e,p,d,l)}return"Scene Service"===s&&n.url&&(d=await(0,u.CD)(n,d,o)),(0,u.Q4)(d)>0?await m(e,p,d):await async function(e,a){const{portalItem:r}=e;if(!r?.url)return;const t=await(0,f.T)(r.url);t&&m(e,a,{layers:t.layers?.map(u.bS),tables:t.tables?.map(u.bS)})}(e,p)}(e,r)}(r,L,e);c&&r.read({url:c},L);const w=new l.L,h=await S(e,w,a);return h&&r.read(h,L),r.resourceReferences={portalItem:n,paths:L.readResourcePaths??[]},"subtype-group"!==r.type&&r.read({title:o},L),(0,p.y)(r,L)}(e,a)}async function m(e,a,r,t){let n=r.layers||[];const i=r.tables||[];if("Feature Collection"===e.portalItem?.type?(n.forEach(((e,a)=>{e.id=a,"Table"===e?.layerDefinition?.type&&i.push(e)})),n=n.filter((e=>"Table"!==e?.layerDefinition?.type))):(n.reverse(),i.reverse()),n.forEach((n=>{const i=t?.(n);if(i||!t){const t=w(e,a(n),r,n,i);e.add(t)}})),i.length){const a=await c.T.FeatureLayer();i.forEach((n=>{const i=t?.(n);if(i||!t){const t=w(e,a,r,n,i);e.tables.add(t)}}))}}function w(e,a,r,t,n){const i=e.portalItem,l={portalItem:i.clone(),layerId:t.id};null!=t.url&&(l.url=t.url);const s=new a(l);if("sourceJSON"in s&&(s.sourceJSON=n),"subtype-group"!==s.type&&(s.sublayerTitleMode="service-name"),"Feature Collection"===i.type){const e={origin:"portal-item",portal:i.portal||o.Z.getDefault()};s.read(t,e);const a=r.showLegend;null!=a&&s.read({showLegend:a},e)}return s}async function S(e,a,r){if(!1===e.supportsData)return;const t=e.instance,i=t.portalItem;if(!i)return;let l=null;try{l=await i.fetchData("json",r)}catch(e){}if(function(e){return"stream"!==e.type&&"layerId"in e}(t)){let e=null;const r=await async function(e,a,r){if(a?.layers&&a?.tables)return(0,u.Q4)(a);const t=(0,n.Qc)(e.url);if(!t)return 1;const i=await r.fetchServiceMetadata(t.url.path).catch((()=>null));return(a?.layers?.length??i?.layers?.length??0)+(a?.tables?.length??i?.tables?.length??0)}(i,l,a);if((l?.layers||l?.tables)&&r>0){if(null==t.layerId){const e=(0,u.XX)(l);t.layerId="subtype-group"===t.type?e?.[0]:(0,u.Ok)(l)}e=function(e,a){const{layerId:r}=a,t=e.layers?.find((e=>e.id===r))||e.tables?.find((e=>e.id===r));return t&&function(e,a){return!("feature"===a.type&&"layerType"in e&&"SubtypeGroupLayer"===e.layerType||"subtype-group"===a.type&&!("layerType"in e))}(t,a)?t:null}(l,t),e&&null!=l.showLegend&&(e.showLegend=l.showLegend)}return r>1&&"sublayerTitleMode"in t&&"service-name"!==t.sublayerTitleMode&&(t.sublayerTitleMode="item-title-and-service-name"),e}return l}},3072:(e,a,r)=>{r.d(a,{$O:()=>i,CD:()=>y,Ok:()=>l,Q4:()=>s,XX:()=>c,_Y:()=>o,bS:()=>n});var t=r(71592);function n(e){const a={id:e.id,name:e.name};return"Oriented Imagery Layer"===e.type&&(a.layerType="OrientedImageryLayer"),a}async function i(e,a,r){if(null==e?.layers||null==e?.tables){const t=await r.fetchServiceMetadata(a);(e=e||{}).layers=e.layers||t?.layers?.map(n),e.tables=e.tables||t?.tables?.map(n)}return e}function l(e){const a=e.layers;if(a?.length)return a[0].id;const r=e.tables;return r?.length?r[0].id:null}function s(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}function c(e){const a=[];return e?.layers?.forEach((e=>{"SubtypeGroupLayer"===e.layerType&&a.push(e.id)})),a}function o(e){return e?.layers?.filter((({layerType:e})=>"OrientedImageryLayer"===e)).map((({id:e})=>e))}async function y(e,a,r){if(!e?.url)return a??{};if(a??={},!a.layers){const t=await r.fetchServiceMetadata(e.url);a.layers=t.layers?.map(n)}const{serverUrl:i,portalItem:l}=await(0,t.w)(e.url,{sceneLayerItem:e}).catch((()=>({serverUrl:null,portalItem:null})));if(null==i)return a.tables=[],a;if(!a.tables&&l){const e=await l.fetchData();if(e?.tables)a.tables=e.tables.map(n);else{const e=await r.fetchServiceMetadata(i);a.tables=e?.tables?.map(n)}}if(a.tables)for(const e of a.tables)e.url=`${i}/${e.id}`;return a}},28008:(e,a,r)=>{r.d(a,{fromItem:()=>u,v:()=>d});var t=r(20102),n=r(71592),i=r(7335),l=r(84230),s=r(87344),c=r(15235),o=r(3072),y=r(14661);async function u(e){!e.portalItem||e.portalItem instanceof c.default||(e={...e,portalItem:new c.default(e.portalItem)});const a=await async function(e){await e.load();const a=new i.L;return async function(e){const a=e.className,r=s.T[a];return{constructor:await r(),properties:e.properties}}(await d(e,a))}(e.portalItem);return new(0,a.constructor)({portalItem:e.portalItem,...a.properties})}async function d(e,a){switch(e.type){case"Map Service":return async function(e,a){return await async function(e,a){return(await a.fetchServiceMetadata(e.url)).tileInfo}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Feature Service":return async function(e,a){const r=await p(e,a);if("object"==typeof r){const e={};return null!=r.id&&(e.layerId=r.id),{className:r.className||"FeatureLayer",properties:e}}return{className:"GroupLayer"}}(e,a);case"Feature Collection":return async function(e){await e.load();const a=(0,y._$)(e,"Map Notes"),r=(0,y._$)(e,"Markup");if(a||r)return{className:"MapNotesLayer"};if((0,y._$)(e,"Route Layer"))return{className:"RouteLayer"};const t=await e.fetchData();return 1===(0,o.Q4)(t)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Scene Service":return async function(e,a){const r=await p(e,a,(async()=>{try{if(!e.url)return[];const{serverUrl:r}=await(0,n.w)(e.url,{sceneLayerItem:e}),t=await a.fetchServiceMetadata(r);return t?.tables??[]}catch{return[]}}));if("object"==typeof r){const t={};let n;if(null!=r.id?(t.layerId=r.id,n=`${e.url}/layers/${r.id}`):n=e.url,e.typeKeywords?.length)for(const a of Object.keys(l.fb))if(e.typeKeywords.includes(a))return{className:l.fb[a]};const i=await a.fetchServiceMetadata(n);return{className:l.fb[i?.layerType]||"SceneLayer",properties:t}}if(!1===r){const r=await a.fetchServiceMetadata(e.url);if("Voxel"===r?.layerType)return{className:"VoxelLayer"}}return{className:"GroupLayer"}}(e,a);case"3DTiles Service":return{className:"IntegratedMesh3DTilesLayer"};case"Image Service":return async function(e,a){await e.load();const r=e.typeKeywords?.map((e=>e.toLowerCase()))??[];if(r.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(r.includes("tiled imagery"))return{className:"ImageryTileLayer"};const t=await e.fetchData(),n=t?.layerType;if("ArcGISTiledImageServiceLayer"===n)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===n)return{className:"ImageryLayer"};const i=await a.fetchServiceMetadata(e.url),l=i.cacheType?.toLowerCase(),s=i.capabilities?.toLowerCase().includes("tilesonly");return"map"===l||s?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"Stream Service":case"Feed":return{className:"StreamLayer"};case"Vector Tile Service":return{className:"VectorTileLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"CSV":return{className:"CSVLayer"};case"KML":return{className:"KMLLayer"};case"WFS":return{className:"WFSLayer"};case"WMTS":return{className:"WMTSLayer"};case"WMS":return{className:"WMSLayer"};case"Group Layer":return{className:"GroupLayer"};default:throw new t.Z("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function p(e,a,r){const t=e.url;if(!t||/\/\d+$/.test(t))return{};await e.load();let n=await e.fetchData();if("Feature Service"===e.type){const e=await(0,o.$O)(n,t,a),r=f(e);if("object"==typeof r){const a=(0,o.XX)(e),t=(0,o._Y)(e);r.className=null!=r.id&&a.includes(r.id)?"SubtypeGroupLayer":null!=r.id&&t?.includes(r.id)?"OrientedImageryLayer":"FeatureLayer"}return r}if("Scene Service"===e.type&&(n=await(0,o.CD)(e,n,a)),(0,o.Q4)(n)>0)return f(n);const i=await a.fetchServiceMetadata(t);return r&&(i.tables=await r()),f(i)}function f(e){return 1===(0,o.Q4)(e)&&{id:(0,o.Ok)(e)}}},40555:(e,a,r)=>{r.d(a,{y:()=>l});var t=r(66643),n=r(95330),i=r(20941);async function l(e,a,r){const l=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(l&&"unique-value"===l.type&&l.styleOrigin){const s=await(0,t.q6)(l.populateFromStyle());if((0,n.k_)(r),!1===s.ok){const r=s.error;a?.messages&&a.messages.push(new i.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:a})),e.clear("renderer",a?.origin)}}}},96187:(e,a,r)=>{r.d(a,{T:()=>n});var t=r(3172);async function n(e,a){const{data:r}=await(0,t.Z)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}}}]);
|