@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
1 lines • 25.2 kB
JavaScript
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[397],{1873:(t,e,n)=>{n.d(e,{$y:()=>E,Ak:()=>B,FM:()=>b,G_:()=>y,Rw:()=>O,Vb:()=>p,b3:()=>C,gJ:()=>m,jM:()=>$,lv:()=>Z,oZ:()=>D,qg:()=>v,sU:()=>L,z9:()=>g,zS:()=>q});var l=n(9760),i=n(84892);const a="<Null>",r="equal-interval",o=1,s=5,u=10,c=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,f=new Set(["esriFieldTypeDate","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeOID","esriFieldTypeBigInteger"]),h=new Set(["esriFieldTypeTimeOnly","esriFieldTypeDateOnly"]),d=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function m(t){return null==t||"string"==typeof t&&!t?a:t}function p(t){const e=null!=t.normalizationField||null!=t.normalizationType,n=null!=t.minValue||null!=t.maxValue,l=!!t.sqlExpression&&t.supportsSQLExpression;return!e&&!n&&!l}function g(t){const{outStatisticTypes:e}=t,n=t.returnDistinct?[...new Set(t.values)]:t.values,l=n.filter((t=>null!=t)).sort(),i=l.length,a={count:i,min:l[0],max:l[i-1]};return t.supportsNullCount&&(a.nullcount=n.length-i),!t.percentileParams||e?.include?.length&&!e.include.includes("median")||e?.exclude?.length&&e.exclude.includes("median")||(a.median=v(n,t.percentileParams)),a}function y(t){const{values:e,useSampleStdDev:n,supportsNullCount:l,outStatisticTypes:i}=t;let a=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=null,s=null,u=null,c=null,f=0;const h=null==t.minValue?-1/0:t.minValue,d=null==t.maxValue?1/0:t.maxValue;for(const t of e)Number.isFinite(t)?t>=h&&t<=d&&(o=null===o?t:o+t,a=Math.min(a,t),r=Math.max(r,t),f++):"string"==typeof t&&f++;if(f&&null!=o){s=o/f;let t=0;for(const n of e)Number.isFinite(n)&&n>=h&&n<=d&&(t+=(n-s)**2);c=n?f>1?t/(f-1):0:f>0?t/f:0,u=Math.sqrt(c)}else a=null,r=null;const m={avg:s,count:f,max:r,min:a,stddev:u,sum:o,variance:c};return l&&(m.nullcount=e.length-f),!t.percentileParams||i?.include?.length&&!i.include.includes("median")||i?.exclude?.length&&i.exclude.includes("median")||(m.median=v(e,t.percentileParams)),m}function v(t,e){const{fieldType:n,value:l,orderBy:i,isDiscrete:a}=e,r=b(n,"desc"===i);if(0===(t=[...t].filter((t=>null!=t)).sort(((t,e)=>r(t,e)))).length)return null;if(l<=0)return t[0];if(l>=1)return t[t.length-1];const o=(t.length-1)*l,s=Math.floor(o),u=s+1,c=o%1,f=t[s],h=t[u];return u>=t.length||a||"string"==typeof f||"string"==typeof h?f:f*(1-c)+h*c}function b(t,e){if(t){if(f.has(t))return _(e);if(h.has(t))return z(e,!1);if("esriFieldTypeTimestampOffset"===t)return function(t){return t?T:w}(e);const n=z(e,!0);if("esriFieldTypeString"===t)return n;if("esriFieldTypeGUID"===t||"esriFieldTypeGlobalID"===t)return(t,e)=>n(k(t),k(e))}const n=e?1:-1,l=_(e),i=z(e,!0),a=V(e);return(t,e)=>"number"==typeof t&&"number"==typeof e?l(t,e):"string"==typeof t&&"string"==typeof e?i(t,e):a(t,e)??n}const x=(t,e)=>null==t?null==e?0:1:null==e?-1:null,M=(t,e)=>null==t?null==e?0:-1:null==e?1:null;function V(t){return t?x:M}const w=(t,e)=>M(t,e)??(t===e?0:new Date(t).getTime()-new Date(e).getTime()),T=(t,e)=>x(t,e)??(t===e?0:new Date(e).getTime()-new Date(t).getTime()),I=(t,e)=>M(t,e)??(t===e?0:t<e?-1:1),F=(t,e)=>x(t,e)??(t===e?0:t<e?1:-1);function z(t,e){if(!e)return t?F:I;const n=V(t);return t?(t,e)=>{const l=n(t,e);return null!=l?l:(t=t.toUpperCase())>(e=e.toUpperCase())?-1:t<e?1:0}:(t,e)=>{const l=n(t,e);return null!=l?l:(t=t.toUpperCase())<(e=e.toUpperCase())?-1:t>e?1:0}}const N=(t,e)=>x(t,e)??e-t,S=(t,e)=>M(t,e)??t-e;function _(t){return t?N:S}function k(t){return t.slice(24,36)+t.slice(19,23)+t.slice(16,18)+t.slice(14,16)+t.slice(11,13)+t.slice(9,11)+t.slice(6,8)+t.slice(4,6)+t.slice(2,4)+t.slice(0,2)}function D(t,e,n){let l;for(l in t)e?.include?.length&&!e.include.includes(l)||e?.exclude?.length&&e.exclude.includes(l)?delete t[l]:d.includes(l)&&(Number.isFinite(t[l])||(t[l]=null));return n?(["avg","stddev","variance"].forEach((e=>{null!=t[e]&&(t[e]=Math.ceil(t[e]??0))})),t):t}function C(t){const e={};for(let n of t)(null==n||"string"==typeof n&&""===n.trim())&&(n=null),null==e[n]?e[n]={count:1,data:n}:e[n].count++;return{count:e}}function P(t){return"coded-value"!==t?.type?[]:t.codedValues.map((t=>t.code))}function Z(t,e,n,l){const i=t.count,a=[];if(n&&e){const t=[],n=P(e[0]);for(const i of n)if(e[1]){const n=P(e[1]);for(const a of n)if(e[2]){const n=P(e[2]);for(const e of n)t.push(`${m(i)}${l}${m(a)}${l}${m(e)}`)}else t.push(`${m(i)}${l}${m(a)}`)}else t.push(i);for(const e of t)i.hasOwnProperty(e)||(i[e]={data:e,count:0})}for(const t in i){const e=i[t];a.push({value:e.data,count:e.count,label:e.label})}return{uniqueValueInfos:a}}function q(t,e,n,l){let i=null;switch(e){case"log":0!==t&&(i=Math.log(t)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(l)&&0!==l&&(i=t/l*100);break;case"field":Number.isFinite(n)&&0!==n&&(i=t/n);break;case"natural-log":t>0&&(i=Math.log(t));break;case"square-root":t>0&&(i=t**.5)}return i}function O(t,e,n){const l=A({field:e.field,normalizationType:e.normalizationType,normalizationField:e.normalizationField,classificationMethod:e.classificationMethod,standardDeviationInterval:e.standardDeviationInterval,definedInterval:e.definedInterval,breakCount:e.numClasses||s});return t=function(t,e,n){const l=e??-1/0,i=n??1/0;return t.filter((t=>Number.isFinite(t)&&t>=l&&t<=i))}(t,e.minValue,e.maxValue),(0,i.t)({definition:l,values:t,normalizationTotal:e.normalizationTotal},n)}function A(t){const{breakCount:e,field:n,normalizationField:i,normalizationType:a}=t,s=t.classificationMethod||r,u="standard-deviation"===s?t.standardDeviationInterval||o:void 0,c="defined-interval"===s?t.definedInterval:void 0;return new l.A({breakCount:e,classificationField:n,classificationMethod:s,normalizationField:"field"===a?i:void 0,normalizationType:a,standardDeviationInterval:u,definedInterval:c})}function $(t,e){let n=t.classBreaks;const l=n.length,i=n[0]?.minValue,a=n[l-1]?.maxValue,r="standard-deviation"===e,o=c;return n=n.map((t=>{const e=t.label,n={minValue:t.minValue,maxValue:t.maxValue,label:e};if(r&&e){const t=e.match(o),l=t?.map((t=>+t.trim()))??[];2===l.length?(n.minStdDev=l[0],n.maxStdDev=l[1],l[0]<0&&l[1]>0&&(n.hasAvg=!0)):1===l.length&&(e.includes("<")?(n.minStdDev=null,n.maxStdDev=l[0]):e.includes(">")&&(n.minStdDev=l[0],n.maxStdDev=null))}return n})),{minValue:i,maxValue:a,classBreakInfos:n,normalizationTotal:t.normalizationTotal}}function E(t,e){const n=L(t,e);if(null==n.min&&null==n.max)return{bins:[],minValue:n.min,maxValue:n.max,normalizationTotal:e.normalizationTotal};const l=n.intervals,i=n.min??0,a=n.max??0,r=l.map(((t,e)=>({minValue:l[e][0],maxValue:l[e][1],count:0})));for(const e of t)if(null!=e&&e>=i&&e<=a){const t=B(l,e);t>-1&&r[t].count++}return{bins:r,minValue:i,maxValue:a,normalizationTotal:e.normalizationTotal}}function L(t,e,n=!1){const{field:l,classificationMethod:i,standardDeviationInterval:a,definedInterval:r,normalizationType:o,normalizationField:s,normalizationTotal:c,minValue:f,maxValue:h}=e,d=e.numBins||u;let m=null,g=null,v=null;if(i&&"equal-interval"!==i||o){const{classBreaks:e}=O(t,{field:l,normalizationType:o,normalizationField:s,normalizationTotal:c,classificationMethod:i,standardDeviationInterval:a,definedInterval:r,minValue:f,maxValue:h,numClasses:d},null!=f&&null!=h?[f,h]:void 0);m=e[0]?.minValue,g=e[e.length-1]?.maxValue,v=e.map((t=>[t.minValue,t.maxValue]))}else{if(null!=f&&null!=h)m=f,g=h;else{const e=y({values:t,minValue:f,maxValue:h,useSampleStdDev:!o,supportsNullCount:p({normalizationType:o,normalizationField:s,minValue:f,maxValue:h})});m=e.min??null,g=e.max??null}v=function(t,e,n){const l=(e-t)/n,i=[];let a,r=t;for(let t=1;t<=n;t++)a=r+l,a=Number(a.toFixed(16)),i.push([r,t===n?e:a]),r=a;return i}(m??0,g??0,d)}if(n&&v.length){const t=v.at(-1)[1];v.push([t,t])}return{min:m,max:g,intervals:v}}function B(t,e){let n=-1;for(let l=t.length-1;l>=0;l--)if(e>=t[l][0]){n=l;break}return n}},9760:(t,e,n)=>{n.d(e,{A:()=>f});var l=n(90237),i=n(66552),a=n(25482),r=n(10107),o=(n(44208),n(53966),n(87811),n(93223)),s=n(40608);const u=new i.J({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),c=new i.J({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let f=class extends a.A{constructor(t){super(t),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(t){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",t)}set definedInterval(t){"defined-interval"===this.classificationMethod&&this._set("definedInterval",t)}};(0,l._)([(0,o.e)({classBreaksDef:"class-breaks-definition"})],f.prototype,"type",void 0),(0,l._)([(0,r.MZ)({json:{write:!0}})],f.prototype,"breakCount",void 0),(0,l._)([(0,r.MZ)({json:{write:!0}})],f.prototype,"classificationField",void 0),(0,l._)([(0,r.MZ)({type:String,json:{read:u.read,write:u.write}})],f.prototype,"classificationMethod",void 0),(0,l._)([(0,r.MZ)({json:{write:!0}})],f.prototype,"normalizationField",void 0),(0,l._)([(0,r.MZ)({json:{read:c.read,write:c.write}})],f.prototype,"normalizationType",void 0),(0,l._)([(0,r.MZ)({value:null,json:{write:!0}})],f.prototype,"standardDeviationInterval",null),(0,l._)([(0,r.MZ)({value:null,json:{write:!0}})],f.prototype,"definedInterval",null),f=(0,l._)([(0,s.$)("esri.rest.support.ClassBreaksDefinition")],f)},27865:(t,e,n)=>{n.d(e,{O9:()=>a,dw:()=>r,mj:()=>i});var l=n(59247);function i(t,e){const n=t.length>e.length?t:e;return(t.length>e.length?e:t).every(((t,e)=>t.type===n[e].type))}function a(t,e){const n=t.length>e.length?t:e,i=t.length>e.length?e:t;for(let t=i.length;t<n.length;t++)i.push((0,l.sK)(n[t]))}function r(t){const e=t[0];return!!e&&"type"in e}},59247:(t,e,n)=>{n.d(e,{bv:()=>s,Fk:()=>u,yG:()=>c,$b:()=>f,Nd:()=>h,jm:()=>d,sK:()=>g});var l=n(40876),i=n(90629);function a(){const t=new Float32Array(16);return t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}const r=a();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:r,clone:function(t){const e=new Float32Array(16);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[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},create:a,fromValues:function(t,e,n,l,i,a,r,o,s,u,c,f,h,d,m,p){const g=new Float32Array(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=l,g[4]=i,g[5]=a,g[6]=r,g[7]=o,g[8]=s,g[9]=u,g[10]=c,g[11]=f,g[12]=h,g[13]=d,g[14]=m,g[15]=p,g}},Symbol.toStringTag,{value:"Module"}));var o=n(58083);class s{constructor(t,e,n){this.strength=t,this.radius=e,this.threshold=n,this.type="bloom"}interpolate(t,e,n){this.strength=m(t.strength,e.strength,n),this.radius=m(t.radius,e.radius,n),this.threshold=m(t.threshold,e.threshold,n)}clone(){return new s(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:p(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(t){this.radius=t,this.type="blur"}interpolate(t,e,n){this.radius=Math.round(m(t.radius,e.radius,n))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:p(this.radius)}}}class c{constructor(t,e){this.type=t,this.amount=e,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,n){this.amount=m(t.amount,e.amount,n),this._updateMatrix()}clone(){return new c(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const t=this._colorMatrix||a();switch(this.type){case"brightness":this._colorMatrix=((t,e)=>{const n=(0,o.hZ)(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1);return(0,o.mg)(n,n)})(t,this.amount);break;case"contrast":this._colorMatrix=((t,e)=>{const n=(0,o.hZ)(t,e,0,0,.5-.5*e,0,e,0,.5-.5*e,0,0,e,.5-.5*e,0,0,0,1);return(0,o.mg)(n,n)})(t,this.amount);break;case"grayscale":this._colorMatrix=(t=>{const e=1-this.amount,n=(0,o.hZ)(t,.2126+.7874*e,.7152-.7152*e,.0722-.0722*e,0,.2126-.2126*e,.7152+.2848*e,.0722-.0722*e,0,.2126-.2126*e,.7152-.7152*e,.0722+.9278*e,0,0,0,0,1);return(0,o.mg)(n,n)})(t);break;case"invert":this._colorMatrix=((t,e)=>{const n=1-2*e,l=(0,o.hZ)(t,n,0,0,e,0,n,0,e,0,0,n,e,0,0,0,1);return(0,o.mg)(l,l)})(t,this.amount);break;case"saturate":this._colorMatrix=((t,e)=>{const n=(0,o.hZ)(t,.213+.787*e,.715-.715*e,.072-.072*e,0,.213-.213*e,.715+.285*e,.072-.072*e,0,.213-.213*e,.715-.715*e,.072+.928*e,0,0,0,0,1);return(0,o.mg)(n,n)})(t,this.amount);break;case"sepia":this._colorMatrix=(t=>{const e=1-this.amount,n=(0,o.hZ)(t,.393+.607*e,.769-.769*e,.189-.189*e,0,.349-.349*e,.686+.314*e,.168-.168*e,0,.272-.272*e,.534-.534*e,.131+.869*e,0,0,0,0,1);return(0,o.mg)(n,n)})(t)}}}class f{constructor(t,e,n,l){this.offsetX=t,this.offsetY=e,this.blurRadius=n,this.color=l,this.type="drop-shadow"}interpolate(t,e,n){this.offsetX=m(t.offsetX,e.offsetX,n),this.offsetY=m(t.offsetY,e.offsetY,n),this.blurRadius=m(t.blurRadius,e.blurRadius,n),this.color[0]=Math.round(m(t.color[0],e.color[0],n)),this.color[1]=Math.round(m(t.color[1],e.color[1],n)),this.color[2]=Math.round(m(t.color[2],e.color[2],n)),this.color[3]=m(t.color[3],e.color[3],n)}clone(){return new f(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const t=[...this.color];return t[3]*=255,{type:"drop-shadow",xoffset:p(this.offsetX),yoffset:p(this.offsetY),blurRadius:p(this.blurRadius),color:t}}}class h{constructor(t){this.angle=t,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,n){this.angle=m(t.angle,e.angle,n),this._updateMatrix()}clone(){return new h(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const t=this._colorMatrix||a();this._colorMatrix=((t,e)=>{const n=Math.sin(e*Math.PI/180),l=Math.cos(e*Math.PI/180),i=(0,o.hZ)(t,.213+.787*l-.213*n,.715-.715*l-.715*n,.072-.072*l+.928*n,0,.213-.213*l+.143*n,.715+.285*l+.14*n,.072-.072*l-.283*n,0,.213-.213*l-.787*n,.715-.715*l+.715*n,.072+.928*l+.072*n,0,0,0,0,1);return(0,o.mg)(i,i)})(t,this.angle)}}class d{constructor(t){this.amount=t,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(t,e,n){this.amount=m(t.amount,e.amount,n)}clone(){return new d(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function m(t,e,n){return t+(e-t)*n}function p(t){return Math.round(1e3*(0,i.PN)(t))/1e3}function g(t){switch(t.type){case"grayscale":case"sepia":case"invert":return new c(t.type,0);case"saturate":case"brightness":case"contrast":return new c(t.type,1);case"opacity":return new d(1);case"hue-rotate":return new h(0);case"blur":return new u(0);case"drop-shadow":return new f(0,0,0,[...(0,l.TS)("transparent")]);case"bloom":return new s(0,0,1)}}},61760:(t,e,n)=>{n.d(e,{PU:()=>r,YW:()=>s,ex:()=>i,hv:()=>o,zp:()=>a}),n(34727);var l=n(90629);n(87317),n(91829);const i=2.4;function a(t){return(0,l.PN)(t*i)}function r(t){return(0,l.Lz)(t)/i}function o(t,e,n){const l=Math.sqrt(t**2+e**2)/n;return l>1?0:3/(Math.PI*n**2)*(1-l**2)**2}function s(t){return"function"==typeof t?t:t?e=>+e[t]:()=>1}},62577:(t,e,n)=>{function l(t){return t?{originPosition:"upper-left"===t.originPosition?"upperLeft":"lower-left"===t.originPosition?"lowerLeft":t.originPosition,scale:t.tolerance?[t.tolerance,t.tolerance,1,1]:[1,1,1,1],translate:null!=t.extent?[t.extent.xmin,t.extent.ymax,t.extent.zmin??0,t.extent.mmin??0]:[0,0,0,0]}:null}function i(t){if(function(t){return"lowerLeft"===t.originPosition&&4===t.scale.length&&4===t.translate.length}(t))return t;const{originPosition:e,scale:n,translate:l}=t,i=n[0]??1,a=n[1]??1;return{originPosition:"lowerLeft",scale:[i,"lowerLeft"===e?a:-a,n[2]??1,n[3]??1],translate:[l[0]??0,l[1]??0,l[2]??0,l[3]??0]}}function a({scale:t,translate:e},n){return Math.round((n-e[0])/t[0])}function r({scale:t,translate:e},n){return Math.round((n-e[1])/t[1])}function o({scale:t,translate:e},n){return n*t[0]+e[0]}function s({scale:t,translate:e},n){return n*t[1]+e[1]}function u({scale:t,translate:e},n){return(n??0)*t[2]+e[2]}function c({scale:t,translate:e},n){return n?n*t[3]+e[3]:0}function f(t,e){return t&&e?p:t&&!e?d:!t&&e?m:h}n.d(e,{$X:()=>x,B2:()=>r,Gy:()=>y,IE:()=>a,P5:()=>M,Q1:()=>i,SW:()=>v,Tr:()=>b,VV:()=>l}),n(65864);const h=(t,e)=>{const n=new Array(e.length);if(!e.length)return n;const l=e[0];let i=o(t,l[0]),a=s(t,l[1]);n[0]=[i,a];const{scale:r,originPosition:u}=t,c=r[0],f="lowerLeft"===u?r[1]:-r[1];for(let t=1;t<e.length;t++){const[l,r]=e[t];i+=c*l,a+=f*r,n[t]=[i,a]}return n},d=(t,e)=>{const n=new Array(e.length);if(!e.length)return n;const l=e[0];let i=o(t,l[0]),a=s(t,l[1]);n[0]=[i,a,u(t,l[2])];const{scale:r,originPosition:c}=t,f=r[0],h="lowerLeft"===c?r[1]:-r[1];for(let l=1;l<e.length;l++){const[r,o,s]=e[l];i+=f*r,a+=h*o,n[l]=[i,a,u(t,s)]}return n},m=(t,e)=>{const n=new Array(e.length);if(!e.length)return n;const l=e[0];let i=o(t,l[0]),a=s(t,l[1]);n[0]=[i,a,c(t,l[2])];const{scale:r,originPosition:u}=t,f=r[0],h="lowerLeft"===u?r[1]:-r[1];for(let l=1;l<e.length;l++){const[r,o,s]=e[l];i+=f*r,a+=h*o,n[l]=[i,a,c(t,s)]}return n},p=(t,e)=>{const n=new Array(e.length);if(!e.length)return n;const l=e[0];let i=o(t,l[0]),a=s(t,l[1]);n[0]=[i,a,u(t,l[2]),c(t,l[3])];const{scale:r,originPosition:f}=t,h=r[0],d="lowerLeft"===f?r[1]:-r[1];for(let l=1;l<e.length;l++){const[r,o,s,f]=e[l];i+=h*r,a+=d*o,n[l]=[i,a,u(t,s),c(t,f)]}return n};function g(t,e,n){const l=new Array(n.length);for(let i=0;i<n.length;i++)l[i]=e(t,n[i]);return l}function y(t,e,n){const l=i(t);return e.x=a(l,n.x),e.y=r(l,n.y),null!=n.z&&(e.z=function({scale:t,translate:e},n){return Math.round(((n??0)-e[2])/t[2])}(l,n.z)),null!=n.m&&(e.m=function({scale:t,translate:e},n){return n?Math.round((n-e[3])/t[3]):0}(l,n.m)),e}function v(t,e,n,l=n?.hasZ??!1,a=n?.hasM??!1){if(null!=n){const r=i(t);e.points=f(l,a)(r,n.points),e.hasZ=l,e.hasM=a}return e}function b(t,e,n,l=null!=n?.z,a=null!=n?.m){if(null==n)return e;const r=i(t);return e.x=o(r,n.x),e.y=s(r,n.y),l&&(e.z=u(r,n.z)),a&&(e.m=c(r,n.m)),e}function x(t,e,n,l=n?.hasZ??!1,a=n?.hasM??!1){if(null!=n){const r=i(t);e.rings=g(r,f(l,a),n.rings),e.hasZ=l,e.hasM=a}return e}function M(t,e,n,l=n?.hasZ??!1,a=n?.hasM??!1){if(null!=n){const r=i(t);e.paths=g(r,f(l,a),n.paths),e.hasZ=l,e.hasM=a}return e}},84892:(t,e,n)=>{n.d(e,{t:()=>r});var l=n(53966);const i=()=>l.A.getLogger("esri.rest.support.generateRendererUtils");function a(t,e){return Number(t.toFixed(e))}function r(t,e){const{normalizationTotal:n}=t;return{classBreaks:o(t,e),normalizationTotal:n}}function o(t,e){const n=t.definition,{classificationMethod:l,normalizationType:i,definedInterval:r}=n,o=n.breakCount??1,c=[];let f=t.values;if(0===f.length)return[];f=f.sort(((t,e)=>t-e));const[h,d]=e??[f.at(0),f.at(-1)];if("equal-interval"===l)if(f.length>=o){const t=(d-h)/o;let e=h;for(let n=1;n<o;n++){const l=a(h+n*t,6);c.push({minValue:e,maxValue:l,label:s(e,l,i)}),e=l}c.push({minValue:e,maxValue:d,label:s(e,d,i)})}else f.forEach((t=>{c.push({minValue:t,maxValue:t,label:s(t,t,i)})}));else if("natural-breaks"===l){const e=function(t){const e=[],n=[];let l=Number.MIN_VALUE,i=1,a=-1;for(let r=0;r<t.length;r++){const o=t[r];o===l?(i++,n[a]=i):null!==o&&(e.push(o),l=o,i=1,n.push(i),a++)}return{uniqueValues:e,valueFrequency:n}}(f),n=t.valueFrequency||e.valueFrequency,l=u(e.uniqueValues,n,o);let r=h;for(let t=1;t<o;t++)if(e.uniqueValues.length>t){const n=a(e.uniqueValues[l[t]],6);c.push({minValue:r,maxValue:n,label:s(r,n,i)}),r=n}c.push({minValue:r,maxValue:d,label:s(r,d,i)})}else if("quantile"===l)if(f.length>=o&&h!==d){let t=h,e=Math.ceil(f.length/o),n=0;for(let l=1;l<o;l++){let a=e+n-1;a>f.length&&(a=f.length-1),a<0&&(a=0),c.push({minValue:t,maxValue:f[a],label:s(t,f[a],i)}),t=f[a],n+=e,e=Math.ceil((f.length-n)/(o-l))}c.push({minValue:t,maxValue:d,label:s(t,d,i)})}else{let t=-1;for(let e=0;e<f.length;e++){const n=f[e];n!==t&&(t=n,c.push({minValue:t,maxValue:n,label:s(t,n,i)}),t=n)}}else if("standard-deviation"===l){const t=function(t){let e=0;for(let n=0;n<t.length;n++)e+=t[n];return e/=t.length,e}(f),e=function(t,e){let n=0;for(let l=0;l<t.length;l++){const i=t[l];n+=(i-e)*(i-e)}return n/=t.length,Math.sqrt(n)}(f,t);if(0===e)c.push({minValue:f[0],maxValue:f[0],label:s(f[0],f[0],i)});else{const n=function(t,e,n,l,i){let a=Math.max(l-t,e-l)/i/n;return a=a>=1?1:a>=.5?.5:.25,a}(h,d,o,t,e)*e;let l=0,r=h;for(let e=o;e>=1;e--){const o=a(t-(e-.5)*n,6);c.push({minValue:r,maxValue:o,label:s(r,o,i)}),r=o,l++}let u=a(t+.5*n,6);c.push({minValue:r,maxValue:u,label:s(r,u,i)}),r=u,l++;for(let e=1;e<=o;e++)u=l===2*o?d:a(t+(e+.5)*n,6),c.push({minValue:r,maxValue:u,label:s(r,u,i)}),r=u,l++}}else if("defined-interval"===l){if(!r)return c;const[t,n]=e??[f.at(0),f.at(-1)],l=Math.ceil((n-t)/r);let o=t;for(let e=1;e<l;e++){const n=a(t+e*r,6);c.push({minValue:o,maxValue:n,label:s(o,n,i)}),o=n}c.push({minValue:o,maxValue:n,label:s(o,n,i)})}return c}function s(t,e,n){let l=null;return l=t===e?n&&"percent-of-total"===n?t+"%":t.toString():n&&"percent-of-total"===n?t+"% - "+e+"%":t+" - "+e,l}function u(t,e,n){const l=t.length,i=[];n>l&&(n=l);for(let t=0;t<n;t++)i.push(Math.round(t*l/n-1));i.push(l-1);let a=c(i,t,e,n);return function(t,e,n,l,i,a){let r=0,o=0,s=0,u=0,c=!0;for(let h=0;h<2&&c;h++){0===h&&(c=!1);for(let h=0;h<a-1;h++)for(;n[h+1]+1!==n[h+2];){n[h+1]=n[h+1]+1;const a=f(h,n,l,i);s=a.sbMean,r=a.sbSdcm;const d=f(h+1,n,l,i);if(u=d.sbMean,o=d.sbSdcm,!(r+o<e[h]+e[h+1])){n[h+1]=n[h+1]-1;break}e[h]=r,e[h+1]=o,t[h]=s,t[h+1]=u,c=!0}for(let h=a-1;h>0;h--)for(;n[h]!==n[h-1]+1;){n[h]=n[h]-1;const a=f(h-1,n,l,i);s=a.sbMean,r=a.sbSdcm;const d=f(h,n,l,i);if(u=d.sbMean,o=d.sbSdcm,!(r+o<e[h-1]+e[h])){n[h]=n[h]+1;break}e[h-1]=r,e[h]=o,t[h-1]=s,t[h]=u,c=!0}}return c}(a.mean,a.sdcm,i,t,e,n)&&(a=c(i,t,e,n)),i}function c(t,e,n,l){let i=[],a=[],r=[],o=0;const s=[],u=[];for(let i=0;i<l;i++){const l=f(i,t,e,n);s.push(l.sbMean),u.push(l.sbSdcm),o+=u[i]}let c,h=o,d=!0;for(;d||o<h;){d=!1,i=[];for(let e=0;e<l;e++)i.push(t[e]);for(let n=0;n<l;n++)for(let i=t[n]+1;i<=t[n+1];i++)if(c=e[i],n>0&&i!==t[n+1]&&Math.abs(c-s[n])>Math.abs(c-s[n-1]))t[n]=i;else if(n<l-1&&t[n]!==i-1&&Math.abs(c-s[n])>Math.abs(c-s[n+1])){t[n+1]=i-1;break}h=o,o=0,a=[],r=[];for(let i=0;i<l;i++){a.push(s[i]),r.push(u[i]);const l=f(i,t,e,n);s[i]=l.sbMean,u[i]=l.sbSdcm,o+=u[i]}}if(o>h){for(let e=0;e<l;e++)t[e]=i[e],s[e]=a[e],u[e]=r[e];o=h}return{mean:s,sdcm:u}}function f(t,e,n,l){let a=0,r=0;for(let i=e[t]+1;i<=e[t+1];i++){const t=l[i];a+=n[i]*t,r+=t}r<=0&&i().warn("Exception in Natural Breaks calculation");const o=a/r;let s=0;for(let i=e[t]+1;i<=e[t+1];i++)s+=l[i]*(n[i]-o)**2;return{sbMean:o,sbSdcm:s}}},87445:(t,e,n)=>{n.d(e,{$r:()=>g,Jc:()=>b,gV:()=>y,rb:()=>v}),n(49186);var l=n(90629),i=n(88930),a=n(86738),r=n(16930),o=n(62577),s=n(21325),u=n(30524),c=n(61760),f=n(4560),h=n(1873),d=n(43668);let m=null;const p=/^(?<hh>([0-1][0-9])|([2][0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?([.](?<ms>\d+))?$/;function g(t,e,n,l){const i=(0,s.d9)(n)?(0,s.Vp)(n):null,r=i?Math.round((i.valid[1]-i.valid[0])/e.scale[0]):null;return t.map((t=>{const n=new a.A(t.geometry);return(0,o.Gy)(e,n,n),t.geometry=i?function(t,e,n){return t.x<0?t.x+=e:t.x>n&&(t.x-=e),t}(n,r??0,l[0]):n,t}))}function y(t,e=18,n,i,a){const r=new Float64Array(i*a);e=Math.round((0,l.Lz)(e));let o=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;const u=(0,c.YW)(n);for(const{geometry:n,attributes:l}of t){const{x:t,y:f}=n,h=Math.max(0,t-e),d=Math.max(0,f-e),m=Math.min(a,f+e),p=Math.min(i,t+e),g=+u(l);for(let n=d;n<m;n++)for(let l=h;l<p;l++){const a=n*i+l,u=(0,c.hv)(l-t,n-f,e)*g,h=r[a]+=u;o=Math.min(o,h),s=Math.max(s,h)}}return{min:o,max:s}}function v(t){const e=p.exec(t);if(!e)return null;const{hh:n,mm:l,ss:a,ms:r}=e.groups;return Number(n)*i.vf.hours+Number(l)*i.vf.minutes+Number(a)*i.vf.seconds+Number(r||0)}async function b(t,e,n=!0){if(!e)return[];const{field:l,field2:i,field3:a,fieldDelimiter:o,fieldInfos:s,timeZone:c}=t,p=l&&s?.find((t=>t.name.toLowerCase()===l.toLowerCase())),g=!!p&&(0,u.OH)(p),y=!!p&&(0,f.fs)(p),b=t.valueExpression,x=t.normalizationType,M=t.normalizationField,V=t.normalizationTotal,w=[],T=t.viewInfoParams;let I=null,F=null;if(b){if(!m){const{arcadeUtils:t}=await(0,d.l)();m=t}m.hasGeometryOperations(b)&&await m.enableGeometryOperations(),I=m.createFunction(b),F=T?m.getViewInfo({viewingMode:T.viewingMode,scale:T.scale,spatialReference:new r.A(T.spatialReference)}):null}const z=t.fieldInfos,N=e[0]&&"declaredClass"in e[0]&&"esri.Graphic"===e[0].declaredClass||!z?null:{fields:z};return e.forEach((t=>{const e=t.attributes;let r;if(b){const e=N?{...t,layer:N}:t,n=m.createExecContext(e,F,c);r=m.executeFunction(I,n)}else e&&(r=e[l],i?(r=`${(0,h.gJ)(r)}${o}${(0,h.gJ)(e[i])}`,a&&(r=`${r}${o}${(0,h.gJ)(e[a])}`)):"string"==typeof r&&n&&(y?r=r?new Date(r).getTime():null:g&&(r=r?v(r):null)));if(x&&"number"==typeof r&&isFinite(r)){const t=e&&parseFloat(e[M]);r=(0,h.zS)(r,x,t,V)}w.push(r)})),w}}}]);