@arcgis/core 4.28.5 → 4.28.7
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/README.md +15 -25
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0c08d59c5d65921ba5ae.js +1 -0
- package/assets/esri/core/workers/chunks/0dbf3fa096d02d83b222.js +1 -0
- package/assets/esri/core/workers/chunks/16453ca31cc3e09fde46.js +1 -0
- package/assets/esri/core/workers/chunks/{1da721608993783dc9cf.js → 24d04cca452ba2fec5d4.js} +1 -1
- package/assets/esri/core/workers/chunks/2c121541cde5c24b1fbe.js +1 -0
- package/assets/esri/core/workers/chunks/2efd2496f7310142f928.js +1 -0
- package/assets/esri/core/workers/chunks/42880f0fac5f1606201c.js +1 -0
- package/assets/esri/core/workers/chunks/5b17de91091fc17d9821.js +1 -0
- package/assets/esri/core/workers/chunks/70eba80261d7fdc624ad.js +1 -0
- package/assets/esri/core/workers/chunks/{3dcb2a82e1e4b520c9c9.js → 7b901d0b68e5cc17533a.js} +1 -1
- package/assets/esri/core/workers/chunks/7f68c2cc1048d136fd1b.js +1 -0
- package/assets/esri/core/workers/chunks/85d6dd6703b228248e30.js +1 -0
- package/assets/esri/core/workers/chunks/adc138e5d9983a5752d4.js +1 -0
- package/assets/esri/core/workers/chunks/b35e87cf2b8244e3584f.js +1 -0
- package/assets/esri/core/workers/chunks/b49f830a8d74c4564ed8.js +1 -0
- package/assets/esri/core/workers/chunks/b6d77edf9eec757e88da.js +1 -0
- package/assets/esri/core/workers/chunks/c9306fb3ec1a2d5e137a.js +1 -0
- package/assets/esri/core/workers/chunks/cd201c627e9396edf6b9.js +1 -0
- package/assets/esri/core/workers/chunks/ceeaa8d1b0034b59eae7.js +1 -0
- package/assets/esri/core/workers/chunks/dc4a71e72e56cbdff49a.js +1 -0
- package/assets/esri/core/workers/chunks/f78b1bfacd95a6ccf7b4.js +1 -0
- package/assets/esri/themes/base/widgets/_LabeledSwitch.scss +6 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/sql/sqlCompareUtils.js +1 -1
- package/core/sql/sqlDateParsingUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/support/FieldsIndex.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/support/LabeledSwitch.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/16b56e541afa438dfb7f.js +0 -1
- package/assets/esri/core/workers/chunks/340ab726ba40fe3a99c8.js +0 -1
- package/assets/esri/core/workers/chunks/46b4a17ec898ab744861.js +0 -1
- package/assets/esri/core/workers/chunks/4747741429e8ff7112bb.js +0 -1
- package/assets/esri/core/workers/chunks/4f0412b52844aa9c7bd4.js +0 -1
- package/assets/esri/core/workers/chunks/5b80ae1eb79f1db75dc6.js +0 -1
- package/assets/esri/core/workers/chunks/80fcb63476829b6a48d2.js +0 -1
- package/assets/esri/core/workers/chunks/84725021c43f1122056a.js +0 -1
- package/assets/esri/core/workers/chunks/8cdece03397d01767593.js +0 -1
- package/assets/esri/core/workers/chunks/9607460895182d31aef9.js +0 -1
- package/assets/esri/core/workers/chunks/a0a86383e69932a25e50.js +0 -1
- package/assets/esri/core/workers/chunks/a3bf50d9e24ad1de9847.js +0 -1
- package/assets/esri/core/workers/chunks/a5db3be5eeb3005df3c1.js +0 -1
- package/assets/esri/core/workers/chunks/a87ab14d6a6ccc9004a0.js +0 -1
- package/assets/esri/core/workers/chunks/a8cf23c3a55c1834178c.js +0 -1
- package/assets/esri/core/workers/chunks/ba00df2e707550939a6f.js +0 -1
- package/assets/esri/core/workers/chunks/cfa6d1b63b794febe70a.js +0 -1
- package/assets/esri/core/workers/chunks/e0382138cf58191a9697.js +0 -1
- package/assets/esri/core/workers/chunks/fe0c6814ef56604540b3.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8968,5732],{59987:(e,t,r)=>{r.d(t,{EN:()=>c,H9:()=>s,eS:()=>u,f:()=>n});var n,a,i=r(19153);(a=n||(n={})).InvalidFunctionParameters="InvalidFunctionParameters",a.InvalidValueForAggregateFunction="InvalidValueForAggregateFunction",a.UnsupportedSqlFunction="UnsupportedSqlFunction",a.UnsupportedOperator="UnsupportedOperator",a.UnsupportedSyntax="UnsupportedSyntax",a.UnsupportedIsRhs="UnsupportedIsRhs",a.UnsupportedIsLhs="UnsupportedIsLhs",a.InvalidDataType="InvalidDataType",a.CannotCastValue="CannotCastValue",a.FunctionNotRecognized="FunctionNotRecognized",a.InvalidTime="InvalidTime",a.InvalidParameterCount="InvalidParameterCount",a.InvalidTimeStamp="InvalidTimeStamp",a.InvalidDate="InvalidDate",a.InvalidOperator="InvalidOperator",a.IllegalInterval="IllegalInterval",a.YearMonthIntervals="YearMonthIntervals",a.PrimarySecondaryQualifiers="PrimarySecondaryQualifiers",a.MissingStatisticParameters="MissingStatisticParameters";const o={[n.InvalidValueForAggregateFunction]:"Invalid value used in aggregate function",[n.MissingStatisticParameters]:"Statistic does not have 1 or 0 Parameters",[n.InvalidFunctionParameters]:"Invalid parameters for call to {function}",[n.UnsupportedIsLhs]:"Unsupported left hand expression in is statement",[n.UnsupportedIsRhs]:"Unsupported right hand expression in is statement",[n.UnsupportedOperator]:"Unsupported operator - {operator}",[n.UnsupportedSyntax]:"Unsupported syntax - {node}",[n.UnsupportedSqlFunction]:"Sql function not found = {function}",[n.InvalidDataType]:"Invalid sql data type",[n.InvalidDate]:"Invalid date encountered",[n.InvalidOperator]:"Invalid operator encountered",[n.InvalidTime]:"Invalid time encountered",[n.IllegalInterval]:"Illegal interval",[n.FunctionNotRecognized]:"Function not recognized",[n.InvalidTimeStamp]:"Invalid timestamp encountered",[n.InvalidParameterCount]:"Invalid parameter count for call to {name}",[n.PrimarySecondaryQualifiers]:"Primary and Secondary SqlInterval qualifiers not supported",[n.YearMonthIntervals]:"Year-Month Intervals not supported",[n.CannotCastValue]:"Cannot cast value to the required data type"};class u extends Error{constructor(e,t){super((0,i.gx)(o[e],t)),this.declaredRootClass="esri.arcade.featureset.support.sqlerror",Error.captureStackTrace&&Error.captureStackTrace(this,u)}}var s;!function(e){e.NeverReach="NeverReach",e.NotImplemented="NotImplemented",e.Cancelled="Cancelled",e.InvalidStatResponse="InvalidStatResponse",e.InvalidRequest="InvalidRequest",e.RequestFailed="RequestFailed",e.MissingFeatures="MissingFeatures",e.AggregationFieldNotFound="AggregationFieldNotFound",e.DataElementsNotFound="DataElementsNotFound"}(s||(s={}));const l={[s.Cancelled]:"Cancelled",[s.InvalidStatResponse]:"Invalid statistics response from service",[s.InvalidRequest]:"Invalid request",[s.RequestFailed]:"Request failed - {reason}",[s.MissingFeatures]:"Missing features",[s.AggregationFieldNotFound]:"Aggregation field not found",[s.DataElementsNotFound]:"Data elements not found on service",[s.NeverReach]:"Encountered unreachable logic",[s.NotImplemented]:"Not implemented"};class c extends Error{constructor(e,t){super((0,i.gx)(l[e],t)),this.declaredRootClass="esri.arcade.featureset.support.featureseterror",Error.captureStackTrace&&Error.captureStackTrace(this,c)}}},5732:(e,t,r)=>{r.d(t,{c:()=>n,g:()=>a});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},41555:(e,t,r)=>{r.d(t,{H:()=>i});var n=r(17126);function a(e){return Number.isNaN(e)||0===e?e:Math.trunc(e)}class i{constructor(e){this._timeStampOffset=e,this._date=null}toDateTime(){return this._date??=n.ou.fromISO(this._timeStampOffset,{setZone:!0}),this._date}get isValid(){return this.toDateTime().isValid}get timezoneOffsetHour(){return a(this.toDateTime().offset/60)}get timezoneOffsetMinutes(){return a(this.toDateTime().offset%60)}toMilliseconds(){return this.toDateTime().toMillis()}get hour(){return this.toDateTime().hour}get minute(){return this.toDateTime().minute}get second(){return this.toDateTime().second}get day(){return this.toDateTime().day}get month(){return this.toDateTime().month}get year(){return this.toDateTime().year}startOfDay(){return i.fromDateTime(this.toDateTime().startOf("day"))}static fromJSDate(e){return new i(n.ou.fromJSDate(e).toISO({includeOffset:!0}))}static fromDateTime(e){return new i(e.toISO({includeOffset:!0}))}static fromParts(e,t,r=0,n=0,a=0,o=0,u=0,s=!1,l=0,c=0){const f=`${e.toString().padStart(4,"0")}-${t.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}`;let d="";o<10&&(d="0");let p=`${n.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${d+o.toString()}`;0!==u&&(p+="."+u.toString().padStart(3,"0"));const v=`${s?"-":"+"}${l.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}`;return new i(f+"T"+p+v)}toStorageFormat(){return this._timeStampOffset}toString(){return this._timeStampOffset}toSQLValue(){let e=this.toDateTime().toSQL({includeOffset:!0,includeOffsetSpace:!0});return e&&(e=e.replace(".000","")),e}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}addMilliseconds(e){const t=this.toDateTime().plus(e);return i.fromDateTime(t)}}},8968:(e,t,r)=>{r.d(t,{WhereClause:()=>ne});var n=r(48853),a=r(59987),i=r(80442),o=r(22641),u=r(41555),s=r(53970),l=r(17126);function c(e,t){const r=f[e.toLowerCase()];return null!=r&&t>=r.minParams&&t<=r.maxParams}const f={min:{minParams:1,maxParams:1,evaluate:e=>v(e[0],"min")},max:{minParams:1,maxParams:1,evaluate:e=>v(e[0],"max")},avg:{minParams:1,maxParams:1,evaluate:e=>d(e[0])},sum:{minParams:1,maxParams:1,evaluate:e=>function(e){if(null===e)return null;let t=0;for(let r=0;r<e.length;r++){const n=e[r];if(null!==n){if(!p(n))throw new a.eS(a.f.InvalidValueForAggregateFunction);t+=n}}return t}(e[0])},stddev:{minParams:1,maxParams:1,evaluate:e=>function(e){if(null===e)return null;const t=h(e);return null===t?null:Math.sqrt(t)}(e[0])},count:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0].length},var:{minParams:1,maxParams:1,evaluate:e=>h(e[0])}};function d(e){if(null===e)return null;let t=0,r=0;for(let n=0;n<e.length;n++){const i=e[n];if(null!==i){if(!p(i))throw new a.eS(a.f.InvalidValueForAggregateFunction);r++,t+=i}}return 0===r?null:t/e.length}function p(e){return"number"==typeof e}function v(e,t){if(null===e)return null;let r=null,n=null;for(const a of e){let e=a;e=a instanceof o.u||a instanceof s.n?a.toNumber():a instanceof l.ou?a.toMillis():a instanceof u.H?a.toMilliseconds():a,(null===r||"max"===t&&null!==n&&null!==e&&n<=e||"min"===t&&null!==n&&null!==e&&n>=e)&&(r=a,n=e)}return r}function h(e){if(null===e)return null;if(0===(e=e.filter((e=>null!==e))).length)return null;const t=d(e);if(null===t)return null;let r=0;for(const n of e){if(!p(n))throw new a.eS(a.f.InvalidValueForAggregateFunction);r+=(t-n)**2}return r/(e.length-1)}class m{constructor(){this.op="+",this.day=0,this.second=0,this.hour=0,this.month=0,this.year=0,this.minute=0,this.millis=0}static _fixDefaults(e){if(null!==e.precision||null!==e.secondary)throw new a.eS(a.f.PrimarySecondaryQualifiers)}static _parseSecondsComponent(e,t){if(t.includes(".")){const r=t.split(".");e.second=parseFloat(r[0]),e.millis=parseInt(r[1],10)}else e.second=parseFloat(t)}static createFromMilliseconds(e){const t=new m;return t.second=e/1e3,t}static createFromValueAndQualifer(e,t,r){let n=null;const i=new m;if(i.op="-"===r?"-":"+","interval-period"===t.type){m._fixDefaults(t);const r=new RegExp("^[0-9]{1,}$");if("year"===t.period||"month"===t.period)throw new a.eS(a.f.YearMonthIntervals);if("second"===t.period){if(!/^[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$/.test(e))throw new a.eS(a.f.IllegalInterval);m._parseSecondsComponent(i,e)}else{if(!r.test(e))throw new a.eS(a.f.IllegalInterval);i[t.period]=parseFloat(e)}}else{if(m._fixDefaults(t.start),m._fixDefaults(t.end),"year"===t.start.period||"month"===t.start.period||"year"===t.end.period||"month"===t.end.period)throw new a.eS(a.f.YearMonthIntervals);switch(t.start.period){case"day":switch(t.end.period){case"hour":if(n=new RegExp("^[0-9]{1,} [0-9]{1,}$"),!n.test(e))throw new a.eS(a.f.IllegalInterval);i[t.start.period]=parseFloat(e.split(" ")[0]),i[t.end.period]=parseFloat(e.split(" ")[1]);break;case"minute":if(n=new RegExp("^[0-9]{1,} [0-9]{1,2}:[0-9]{1,}$"),!n.test(e))throw new a.eS(a.f.IllegalInterval);{i[t.start.period]=parseFloat(e.split(" ")[0]);const r=e.split(" ")[1].split(":");i.hour=parseFloat(r[0]),i.minute=parseFloat(r[1])}break;case"second":if(n=new RegExp("^[0-9]{1,} [0-9]{1,2}:[0-9]{1,2}:[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$"),!n.test(e))throw new a.eS(a.f.IllegalInterval);{i[t.start.period]=parseFloat(e.split(" ")[0]);const r=e.split(" ")[1].split(":");i.hour=parseFloat(r[0]),i.minute=parseFloat(r[1]),m._parseSecondsComponent(i,r[2])}break;default:throw new a.eS(a.f.IllegalInterval)}break;case"hour":switch(t.end.period){case"minute":if(n=new RegExp("^[0-9]{1,}:[0-9]{1,}$"),!n.test(e))throw new a.eS(a.f.IllegalInterval);i.hour=parseFloat(e.split(":")[0]),i.minute=parseFloat(e.split(":")[1]);break;case"second":if(n=new RegExp("^[0-9]{1,}:[0-9]{1,2}:[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$"),!n.test(e))throw new a.eS(a.f.IllegalInterval);{const t=e.split(":");i.hour=parseFloat(t[0]),i.minute=parseFloat(t[1]),m._parseSecondsComponent(i,t[2])}break;default:throw new a.eS(a.f.IllegalInterval)}break;case"minute":if("second"!==t.end.period)throw new a.eS(a.f.IllegalInterval);if(n=new RegExp("^[0-9]{1,}:[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$"),!n.test(e))throw new a.eS(a.f.IllegalInterval);{const t=e.split(":");i.minute=parseFloat(t[0]),m._parseSecondsComponent(i,t[1])}break;default:throw new a.eS(a.f.IllegalInterval)}}return i}valueInMilliseconds(){return("-"===this.op?-1:1)*(this.millis+1e3*this.second+60*this.minute*1e3+60*this.hour*60*1e3+24*this.day*60*60*1e3+this.month*(365/12)*24*60*60*1e3+365*this.year*24*60*60*1e3)}}var w=r(1542);const I=/^(\d{1,2}):(\d{1,2}):(\d{1,2})$/,S=/^(\d{1,2}):(\d{1,2})$/,g=/^(\d{1,2}):(\d{1,2}):(\d{1,2}).([0-9]+)$/,y=/^(\d{4})-(\d{1,2})-(\d{1,2})$/,T=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$/,N=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$/,O=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$/,C=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/;function b(e,t){switch(t){case"system":case"local":case null:return l.ou.fromJSDate(e);default:return"unknown"===t?.toLowerCase()?l.ou.fromMillis(e.getTime(),{zone:w.yV.instance}):l.ou.fromJSDate(e).setZone(t)}}function x(e){return"number"==typeof e}function A(e){return"string"==typeof e||e instanceof String}function M(e){return e instanceof m}function E(e){return e instanceof Date}function F(e){return e instanceof l.ou}function D(e){return e instanceof o.u}function P(e){return e instanceof s.n}function _(e){return e instanceof u.H}function L(e){let t=I.exec(e);if(null!==t){const[,e,r,n]=t,i=s.n.fromParts(parseInt(e,10),parseInt(r,10),parseInt(n,10),0);if(null!==i)return i;throw new a.eS(a.f.InvalidTime)}if(t=S.exec(e),null!==t){const[,e,r]=t,n=s.n.fromParts(parseInt(e,10),parseInt(r,10),0,0);if(null!==n)return n;throw new a.eS(a.f.InvalidTime)}if(t=g.exec(e),null!==t){const[,e,r,n,i]=t,o=s.n.fromParts(parseInt(e,10),parseInt(r,10),parseInt(n,10),parseInt(i,10));if(null!==o)return o;throw new a.eS(a.f.InvalidTime)}throw new a.eS(a.f.InvalidTime)}function R(e,t,r=!1){let n=T.exec(e);if(null!==n){const[,e,r,i,o,u,s,c]=n,f=l.ou.fromObject({year:parseInt(e,10),month:parseInt(r,10),day:parseInt(i,10),hour:parseInt(o,10),minute:parseInt(u,10),second:parseInt(s,10),millisecond:c?parseInt(c.replace(".",""),10):0},{zone:(0,w.L9)(t)});if(!1===f.isValid)throw new a.eS(a.f.InvalidTimeStamp);return f}if(n=N.exec(e),null!==n){const[,e,t,r,i,o,s,l,c,f,d]=n,p=u.H.fromParts(parseInt(e,10),parseInt(t,10),parseInt(r,10),parseInt(i,10),parseInt(o,10),parseInt(s,10),l?parseInt(l.replace(".",""),10):0,"-"===c,parseInt(f,10),parseInt(d,10));if(!1===p.isValid)throw new a.eS(a.f.InvalidTimeStamp);return p}if(n=O.exec(e),null!==n){const[,e,t,r,i,o,s,l,c]=n,f=u.H.fromParts(parseInt(e,10),parseInt(t,10),parseInt(r,10),parseInt(i,10),parseInt(o,10),0,0,"-"===s,parseInt(l,10),parseInt(c,10));if(!1===f.isValid)throw new a.eS(a.f.InvalidTimeStamp);return f}if(n=C.exec(e),null!==n){const[,e,r,i,o,u]=n,s=l.ou.fromObject({year:parseInt(e,10),month:parseInt(r,10),day:parseInt(i,10),hour:parseInt(o,10),minute:parseInt(u,10),second:0},{zone:(0,w.L9)(t)});if(!1===s.isValid)throw new a.eS(a.f.InvalidTimeStamp);return s}if(n=y.exec(e),null!==n){const[,e,r,i]=n,o=l.ou.fromObject({year:parseInt(e,10),month:parseInt(r,10),day:parseInt(i,10),hour:0,minute:0,second:0},{zone:(0,w.L9)(t)});if(!1===o.isValid)throw new a.eS(a.f.InvalidTimeStamp);return o}throw new a.eS(a.f.InvalidTimeStamp)}function U(e,t){const r=y.exec(e);if(null===r)try{return R(e,t)}catch{throw new a.eS(a.f.InvalidDate)}const[,n,i,u]=r,s=o.u.fromParts(parseInt(n,10),parseInt(i,10),parseInt(u,10));if(null===s)throw new a.eS(a.f.InvalidDate);return s}var V=r(19153);function J(e){return!!F(e)||!!_(e)}function $(e){if(F(e))return e.toMillis();if(D(e))return e.toNumber();if(_(e))return e.toMilliseconds();throw new a.eS(a.f.InvalidDataType)}function z(e,t,r,n){if(null==e||null==t)return null;if(x(e)){if(x(t))return Z(e,t,r);if(A(t))return function(e,t,r){const n=parseFloat(t);if(!isNaN(n))return Z(e,n,r);const a=e.toString();switch(r){case"<>":return a!==t;case"=":return a===t;case">":return a>t;case"<":return a<t;case">=":return a>=t;case"<=":return a<=t}}(e,t,r);if(F(i=t)||D(i)||_(i)||P(i))throw new a.eS(a.f.InvalidOperator);if(D(t))throw new a.eS(a.f.InvalidOperator)}else if(A(e)){if(x(t))return function(e,t,r){const n=parseFloat(e);if(!isNaN(n))return Z(n,t,r);const a=t.toString();switch(r){case"<>":return e!==a;case"=":return e===a;case">":return e>a;case"<":return e<a;case">=":return e>=a;case"<=":return e<=a}}(e,t,r);if(A(t))return function(e,t,r){switch(r){case"<>":return e!==t;case"=":return e===t;case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}}(e,t,r);if(F(t))throw new a.eS(a.f.InvalidOperator);if(D(t))throw new a.eS(a.f.InvalidOperator);if(P(t))throw new a.eS(a.f.InvalidOperator);if(_(t))throw new a.eS(a.f.InvalidOperator)}else if(F(e)){if(J(t))return e instanceof l.ou&&(0,w.A4)(e.zone)?t instanceof l.ou&&!1===(0,w.A4)(t.zone)?e=(0,w.Rw)(e,t.zone):t instanceof u.H&&(e=(0,w.Rw)(e,t.toDateTime().zone)):t instanceof l.ou&&(0,w.A4)(t.zone)&&(e instanceof l.ou&&!1===(0,w.A4)(e.zone)?t=(0,w.Rw)(t,e.zone):e instanceof u.H&&(t=(0,w.Rw)(t,e.toDateTime().zone))),Z($(e),$(t),r);if(A(t))throw new a.eS(a.f.InvalidOperator);if(D(t))return function(e,t,r){const n=t.toDateTimeLuxon(e.zone);return Z((e=e.startOf("day")).toMillis(),n.toMillis(),r)}(e,t,r);if(P(t))throw new a.eS(a.f.InvalidOperator);if(x(t))throw new a.eS(a.f.InvalidOperator)}else if(D(e)){if(_(t))return function(e,t,r){const n=e.toDateTimeLuxon(t.toDateTime().zone);return t=t.startOfDay(),Z(n.toMillis(),t.toMilliseconds(),r)}(e,t,r);if(F(t))return function(e,t,r){const n=e.toDateTimeLuxon(t.zone);return t=t.startOf("day"),Z(n.toMillis(),t.toMillis(),r)}(e,t,r);if(A(t))throw new a.eS(a.f.InvalidOperator);if(D(t))return Z(e.toNumber(),t.toNumber(),r);if(P(t))throw new a.eS(a.f.InvalidOperator);if(x(t))throw new a.eS(a.f.InvalidOperator)}else if(P(e)){if(P(t))return Z(e.toNumber(),t.toNumber(),r);if(A(t))throw new a.eS(a.f.InvalidOperator);if(x(t))throw new a.eS(a.f.InvalidOperator);if(D(t))throw new a.eS(a.f.InvalidOperator);if(J(t))throw new a.eS(a.f.InvalidOperator)}else if(_(e)){if(J(t))return t instanceof l.ou&&(0,w.A4)(t.zone)&&(t=(0,w.Rw)(t,e.toDateTime().zone)),Z($(e),$(t),r);if(A(t))throw new a.eS(a.f.InvalidOperator);if(D(t))return function(e,t,r){const n=t.toDateTimeLuxon(e.toDateTime().zone);return Z((e=e.startOfDay()).toMilliseconds(),n.toMillis(),r)}(e,t,r);if(P(t))throw new a.eS(a.f.InvalidOperator);if(x(t))throw new a.eS(a.f.InvalidOperator)}var i;switch(r){case"<>":return e!==t;case"=":return e===t;case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}}function Z(e,t,r){switch(r){case"<>":return e!==t;case"=":return e===t;case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}}function k(e,t,r){const n=j[e.toLowerCase()];if(null==n)throw new a.eS(a.f.FunctionNotRecognized);if(t.length<n.minParams||t.length>n.maxParams)throw new a.eS(a.f.InvalidParameterCount,{name:e.toUpperCase()});return n.evaluate(t,r)}function H(e){return"string"==typeof e||e instanceof String}function q(e){return!(E(e)||D(e)||F(e)||P(e)||_(e))}function Y(e){return D(e)||P(e)?e.toString():_(e)?e.toSQLValue():F(e)?0===e.millisecond?e.toFormat("yyyy-LL-dd HH:mm:ss"):e.toSQL({includeOffset:!1}):E(e)?Y(l.ou.fromJSDate(e)):e.toString()}const j={extract:{minParams:2,maxParams:2,evaluate:([e,t])=>{if(null==t)return null;if(E(t))switch(e.toUpperCase()){case"SECOND":return t.getSeconds();case"MINUTE":return t.getMinutes();case"HOUR":return t.getHours();case"DAY":return t.getDate();case"MONTH":return t.getMonth()+1;case"YEAR":return t.getFullYear();case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":return 0}else if(F(t))switch(e.toUpperCase()){case"SECOND":return t.second;case"MINUTE":return t.minute;case"HOUR":return t.hour;case"DAY":return t.day;case"MONTH":return t.month;case"YEAR":return t.year;case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":throw new a.eS(a.f.InvalidFunctionParameters,{function:"EXTRACT"})}else if(D(t))switch(e.toUpperCase()){case"DAY":return t.day;case"MONTH":return t.month;case"YEAR":return t.year;case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":throw new a.eS(a.f.InvalidFunctionParameters,{function:"EXTRACT"})}else if(P(t))switch(e.toUpperCase()){case"SECOND":return t.second;case"MINUTE":return t.minute;case"HOUR":return t.hour}else if(_(t))switch(e.toUpperCase()){case"SECOND":return t.second;case"MINUTE":return t.minute;case"HOUR":return t.hour;case"DAY":return t.day;case"MONTH":return t.month;case"YEAR":return t.year;case"TIMEZONE_HOUR":return t.timezoneOffsetHour;case"TIMEZONE_MINUTE":return t.timezoneOffsetMinutes}throw new a.eS(a.f.InvalidFunctionParameters,{function:"EXTRACT"})}},substring:{minParams:2,maxParams:3,evaluate:e=>{if(2===e.length){const[t,r]=e;return null==t||null==r?null:t.toString().substring(r-1)}if(3===e.length){const[t,r,n]=e;return null==t||null==r||null==n?null:n<=0?"":t.toString().substring(r-1,r+n-1)}}},position:{minParams:2,maxParams:2,evaluate:([e,t])=>null==e||null==t?null:t.indexOf(e)+1},trim:{minParams:2,maxParams:3,evaluate:e=>{const t=3===e.length,r=t?e[1]:" ",n=t?e[2]:e[1];if(null==r||null==n)return null;const i=`(${(0,V.Qs)(r)})`;switch(e[0]){case"BOTH":return n.replaceAll(new RegExp(`^${i}*|${i}*$`,"g"),"");case"LEADING":return n.replaceAll(new RegExp(`^${i}*`,"g"),"");case"TRAILING":return n.replaceAll(new RegExp(`${i}*$`,"g"),"")}throw new a.eS(a.f.InvalidFunctionParameters,{function:"TRIM"})}},abs:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.abs(e[0])},ceiling:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.ceil(e[0])},floor:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.floor(e[0])},log:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.log(e[0])},log10:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.log(e[0])*Math.LOG10E},sin:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.sin(e[0])},cos:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.cos(e[0])},tan:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.tan(e[0])},asin:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.asin(e[0])},acos:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.acos(e[0])},atan:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.atan(e[0])},sign:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0]>0?1:e[1]<0?-1:0},power:{minParams:2,maxParams:2,evaluate:e=>null==e[0]||null==e[1]?null:e[0]**e[1]},mod:{minParams:2,maxParams:2,evaluate:e=>null==e[0]||null==e[1]?null:e[0]%e[1]},round:{minParams:1,maxParams:2,evaluate:e=>{const t=e[0],r=2===e.length?10**e[1]:1;return null==t?null:Math.round(t*r)/r}},truncate:{minParams:1,maxParams:2,evaluate:e=>null==e[0]?null:1===e.length?parseInt(e[0].toFixed(0),10):parseFloat(e[0].toFixed(e[1]))},char_length:{minParams:1,maxParams:1,evaluate:e=>H(e[0])?e[0].length:0},concat:{minParams:1,maxParams:1/0,evaluate:e=>{let t="";for(let r=0;r<e.length;r++){if(null==e[r])return null;t+=e[r].toString()}return t}},lower:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0].toString().toLowerCase()},upper:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0].toString().toUpperCase()},coalesce:{minParams:1,maxParams:1/0,evaluate:e=>{for(const t of e)if(null!==t)return t;return null}},cosh:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.cosh(e[0])},sinh:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.sinh(e[0])},tanh:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.tanh(e[0])},nullif:{minParams:2,maxParams:2,evaluate:(e,t)=>z(e[0],e[1],"=")?null:e[0]},cast:{minParams:2,maxParams:2,evaluate:(e,t)=>{const r=e[0],n=e[1];if(null===r)return null;switch(n.type){case"integer":{if(!q(r))throw new a.eS(a.f.CannotCastValue);const e=parseInt(r,10);if(isNaN(e))throw new a.eS(a.f.CannotCastValue);return e}case"smallint":{if(!q(r))throw new a.eS(a.f.CannotCastValue);const e=parseInt(r,10);if(isNaN(e))throw new a.eS(a.f.CannotCastValue);if(e>32767||e<-32767)throw new a.eS(a.f.CannotCastValue);return e}case"float":case"real":{if(!q(r))throw new a.eS(a.f.CannotCastValue);const e=parseFloat(r);if(isNaN(e))throw new a.eS(a.f.CannotCastValue);return e}case"time":return function(e){if(E(e))return s.n.fromDateJS(e);if(F(e))return s.n.fromDateTime(e);if(D(e))throw new a.eS(a.f.CannotCastValue);if(P(e))return e;if(_(e))return s.n.fromSqlTimeStampOffset(e);if(H(e))return L(e);throw new a.eS(a.f.CannotCastValue)}(r);case"date":return function(e){if(E(e))return o.u.fromDateJS(e);if(F(e))return o.u.fromParts(e.year,e.month,e.day);if(D(e))return e;if(P(e))throw new a.eS(a.f.CannotCastValue);if(_(e)&&null===o.u.fromParts(e.year,e.month,e.day))throw new a.eS(a.f.CannotCastValue);if(H(e)){const t=o.u.fromReader(e);if(null!==t&&t.isValid)return t}throw new a.eS(a.f.CannotCastValue)}(r);case"timestamp":return function(e,t,r){if(E(e))return b(e,t);if(F(e))return e;if(D(e))return e.toDateTimeLuxon("unknown");if(P(e))throw new a.eS(a.f.CannotCastValue);if(_(e))return e;if(H(e))return R(e,"unknown",r);throw new a.eS(a.f.CannotCastValue)}(r,t,!0===n.withtimezone);case"varchar":{const e=Y(r);if(e.length>n.size)throw new a.eS(a.f.CannotCastValue);return e}default:throw new a.eS(a.f.InvalidDataType)}}}};function B(e,t,r,n){if("||"===e)return k("concat",[t,r],n);if(null===t||null===r)return null;if(x(t)){if(x(r))return Q(t,r,e);if(M(r))return function(e,t,r){switch(r){case"+":return m.createFromMilliseconds(e+t.valueInMilliseconds());case"-":return m.createFromMilliseconds(e-t.valueInMilliseconds());case"*":return m.createFromMilliseconds(e*t.valueInMilliseconds());case"/":return m.createFromMilliseconds(e/t.valueInMilliseconds())}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(P(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(D(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(_(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(F(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(A(r))return function(e,t,r){const n=parseFloat(t);if(isNaN(n))throw new a.eS(a.f.InvalidOperator);return Q(e,n,r)}(t,r,e);throw new a.eS(a.f.InvalidOperator)}if(D(t)){if(x(r))return function(e,t,r){const n=1e3*t*24*60*60;switch(r){case"+":return e.plus("milliseconds",n);case"-":return e.plus("milliseconds",-1*n)}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(M(r))return function(e,t,r){switch(r){case"+":return e.plus("milliseconds",t.valueInMilliseconds());case"-":return e.plus("milliseconds",-1*t.valueInMilliseconds())}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(P(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(D(r))return function(e,t,r){if("-"===r)return e.toDateTimeLuxon("UTC").diff(t.toDateTimeLuxon("UTC")).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(_(r))return function(e,t,r){if("-"===r)return e.toDateTimeLuxon(t.toDateTime().zone).diff(t.toDateTime()).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(F(r))return function(e,t,r){if("-"===r)return e.toDateTimeLuxon(t.zone).diff(t).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(A(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();throw new a.eS(a.f.InvalidOperator)}if(P(t)){if(x(r))return function(e,t,r){const n=1e3*t*24*60*60;switch(r){case"+":return e.plus("milliseconds",n);case"-":return e.plus("milliseconds",-1*n)}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(M(r))return function(e,t,r){switch(r){case"+":return e.plus("milliseconds",t.valueInMilliseconds());case"-":return e.plus("milliseconds",-1*t.valueInMilliseconds())}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(P(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(D(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(_(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(F(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(A(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();throw new a.eS(a.f.InvalidOperator)}if(M(t)){if(x(r))return function(e,t,r){switch(r){case"+":return m.createFromMilliseconds(e.valueInMilliseconds()+t);case"-":return m.createFromMilliseconds(e.valueInMilliseconds()-t);case"*":return m.createFromMilliseconds(e.valueInMilliseconds()*t);case"/":return m.createFromMilliseconds(e.valueInMilliseconds()/t)}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(M(r))return function(e,t,r){switch(r){case"+":return m.createFromMilliseconds(e.valueInMilliseconds()+t.valueInMilliseconds());case"-":return m.createFromMilliseconds(e.valueInMilliseconds()-t.valueInMilliseconds());case"*":return m.createFromMilliseconds(e.valueInMilliseconds()*t.valueInMilliseconds());case"/":return m.createFromMilliseconds(e.valueInMilliseconds()/t.valueInMilliseconds())}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(P(r))return function(e,t,r){if("+"===r)return t.plus("milliseconds",e.valueInMilliseconds());throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(D(r))return function(e,t,r){if("+"===r)return t.plus("milliseconds",e.valueInMilliseconds());throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(_(r))return function(e,t,r){if("+"===r)return t.addMilliseconds(e.valueInMilliseconds());throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(F(r))return function(e,t,r){switch(r){case"+":return t.plus({milliseconds:e.valueInMilliseconds()});case"-":return e.valueInMilliseconds()-t.toMillis()}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(A(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();throw new a.eS(a.f.InvalidOperator)}if(F(t)){if(x(r))return function(e,t,r){const n=1e3*t*24*60*60;switch(r){case"+":return e.plus({milliseconds:n});case"-":return e.minus({milliseconds:n})}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(M(r))return function(e,t,r){switch(r){case"+":return e.plus({milliseconds:t.valueInMilliseconds()});case"-":return e.minus({milliseconds:t.valueInMilliseconds()})}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(P(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(D(r))return function(e,t,r){if("-"===r)return e.diff(t.toDateTimeLuxon(e.zone)).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(_(r))return function(e,t,r){if("-"===r)return e.diff(t.toDateTime()).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(F(r))return function(e,t,r){if("-"===r)return e.diff(t).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(A(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();throw new a.eS(a.f.InvalidOperator)}if(_(t)){if(x(r))return function(e,t,r){const n=1e3*t*24*60*60;switch(r){case"+":return e.addMilliseconds(n);case"-":return e.addMilliseconds(-1*n)}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(M(r))return function(e,t,r){switch(r){case"+":return e.addMilliseconds(t.valueInMilliseconds());case"-":return e.addMilliseconds(-1*t.valueInMilliseconds())}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(P(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(D(r))return function(e,t,r){if("-"===r)return e.toDateTime().diff(t.toDateTimeLuxon(e.toDateTime().zone)).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(_(r))return function(e,t,r){if("-"===r)return e.toDateTime().diff(t.toDateTime()).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(F(r))return function(e,t,r){if("-"===r)return e.toDateTime().diff(t).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(A(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();throw new a.eS(a.f.InvalidOperator)}if(A(t)){if(x(r))return function(e,t,r){const n=parseFloat(e);if(isNaN(n))throw new a.eS(a.f.InvalidOperator);return Q(n,t,r)}(t,r,e);if(M(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(P(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(D(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(_(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(F(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(A(r))return function(e,t,r){if("+"===r)return e+t;throw new a.eS(a.f.InvalidOperator)}(t,r,e);throw new a.eS(a.f.InvalidOperator)}throw new a.eS(a.f.InvalidOperator)}function Q(e,t,r){switch(r){case"+":return e+t;case"-":return e-t;case"*":return e*t;case"/":return e/t}throw new a.eS(a.f.InvalidOperator)}r(5732);var G,W,K={exports:{}};W=function(){function e(t,r,n,a){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,e.prototype),i.expected=r,i.found=n,i.location=a,i.name="SyntaxError",i}function t(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),e.prototype.format=function(e){var r="Error: "+this.message;if(this.location){var n,a=null;for(n=0;n<e.length;n++)if(e[n].source===this.location.source){a=e[n].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,u=this.location.source+":"+o.line+":"+o.column;if(a){var s=this.location.end,l=t("",o.line.toString().length," "),c=a[i.line-1],f=(i.line===s.line?s.column:c.length+1)-i.column||1;r+="\n --\x3e "+u+"\n"+l+" |\n"+o.line+" | "+c+"\n"+l+" | "+t("",i.column-1," ")+t("",f,"^")}else r+="\n at "+u}return r},e.buildMessage=function(e,t){var r={literal:function(e){return'"'+a(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?i(e[0])+"-"+i(e[1]):i(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function a(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function i(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function o(e){return r[e.type](e)}return"Expected "+function(e){var t,r,n=e.map(o);if(n.sort(),n.length>0){for(t=1,r=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+function(e){return e?'"'+a(e)+'"':"end of input"}(t)+" found."},{SyntaxError:e,parse:function(t,r){var n,a={},i=(r=void 0!==r?r:{}).grammarSource,o={start:za},u=za,s="!",l="=",c=">=",f=">",d="<=",p="<>",v="<",h="!=",m="+",w="-",I="||",S="*",g="/",y="@",T="'",N="N'",O="''",C=".",b="null",x="true",A="false",M="in",E="is",F="like",D="escape",P="not",_="and",L="or",R="between",U="from",V="for",J="substring",$="extract",z="trim",Z="position",k="timestamp",H="date",q="time",Y="leading",j="trailing",B="both",Q="cast",G="as",W="integer",K="smallint",X="float",ee="real",te="varchar",re="to",ne="interval",ae="year",ie="timezone_hour",oe="timezone_minute",ue="month",se="day",le="hour",ce="minute",fe="second",de="case",pe="end",ve="when",he="then",me="else",we=",",Ie="(",Se=")",ge="`",ye=/^[A-Za-z_\x80-\uFFFF]/,Te=/^[A-Za-z0-9_]/,Ne=/^[A-Za-z0-9_.\x80-\uFFFF]/,Oe=/^["]/,Ce=/^[^']/,be=/^[0-9]/,xe=/^[eE]/,Ae=/^[+\-]/,Me=/^[ \t\n\r]/,Ee=/^[^`]/,Fe=La("!",!1),De=La("=",!1),Pe=La(">=",!1),_e=La(">",!1),Le=La("<=",!1),Re=La("<>",!1),Ue=La("<",!1),Ve=La("!=",!1),Je=La("+",!1),$e=La("-",!1),ze=La("||",!1),Ze=La("*",!1),ke=La("/",!1),He=Ra([["A","Z"],["a","z"],"_",["",""]],!1,!1),qe=Ra([["A","Z"],["a","z"],["0","9"],"_"],!1,!1),Ye=Ra([["A","Z"],["a","z"],["0","9"],"_",".",["",""]],!1,!1),je=Ra(['"'],!1,!1),Be=La("@",!1),Qe=La("'",!1),Ge=La("N'",!1),We=La("''",!1),Ke=Ra(["'"],!0,!1),Xe=La(".",!1),et=Ra([["0","9"]],!1,!1),tt=Ra(["e","E"],!1,!1),rt=Ra(["+","-"],!1,!1),nt=La("NULL",!0),at=La("TRUE",!0),it=La("FALSE",!0),ot=La("IN",!0),ut=La("IS",!0),st=La("LIKE",!0),lt=La("ESCAPE",!0),ct=La("NOT",!0),ft=La("AND",!0),dt=La("OR",!0),pt=La("BETWEEN",!0),vt=La("FROM",!0),ht=La("FOR",!0),mt=La("SUBSTRING",!0),wt=La("EXTRACT",!0),It=La("TRIM",!0),St=La("POSITION",!0),gt=La("TIMESTAMP",!0),yt=La("DATE",!0),Tt=La("TIME",!0),Nt=La("LEADING",!0),Ot=La("TRAILING",!0),Ct=La("BOTH",!0),bt=La("CAST",!0),xt=La("AS",!0),At=La("INTEGER",!0),Mt=La("SMALLINT",!0),Et=La("FLOAT",!0),Ft=La("REAL",!0),Dt=La("VARCHAR",!0),Pt=La("TO",!0),_t=La("INTERVAL",!0),Lt=La("YEAR",!0),Rt=La("TIMEZONE_HOUR",!0),Ut=La("TIMEZONE_MINUTE",!0),Vt=La("MONTH",!0),Jt=La("DAY",!0),$t=La("HOUR",!0),zt=La("MINUTE",!0),Zt=La("SECOND",!0),kt=La("CASE",!0),Ht=La("END",!0),qt=La("WHEN",!0),Yt=La("THEN",!0),jt=La("ELSE",!0),Bt=La(",",!1),Qt=La("(",!1),Gt=La(")",!1),Wt=Ra([" ","\t","\n","\r"],!1,!1),Kt=La("`",!1),Xt=Ra(["`"],!0,!1),er=function(e){return e},tr=function(e,t){var r={type:"expression-list"},n=function(e,t,r){return function(e,t){for(var r=[e],n=0;n<t.length;n++)r.push(t[n][3]);return r}(e,t)}(e,t);return r.value=n,r},rr=function(e,t){return Oo(e,t)},nr=function(e,t){return Oo(e,t)},ar=function(e){return function(e,t){return{type:"unary-expression",operator:"NOT",expr:t}}(0,e)},ir=function(e,t){return""==t||null==t||null==t?e:"arithmetic"==t.type?Oo(e,t.tail):No(t.op,e,t.right,t.escape)},or=function(e){return{type:"arithmetic",tail:e}},ur=function(e,t){return{op:e+"NOT",right:t}},sr=function(e,t){return{op:e,right:t}},lr=function(e,t,r){return{op:"NOT"+e,right:{type:"expression-list",value:[t,r]}}},cr=function(e,t,r){return{op:e,right:{type:"expression-list",value:[t,r]}}},fr=function(e){return e[0]+" "+e[2]},dr=function(e){return e[0]+" "+e[2]},pr=function(e,t,r){return{op:e,right:t,escape:r.value}},vr=function(e,t){return{op:e,right:t,escape:""}},hr=function(e,t){return{op:e,right:t}},mr=function(e){return{op:e,right:{type:"expression-list",value:[]}}},wr=function(e,t){return{op:e,right:t}},Ir=function(e,t){return Oo(e,t)},Sr=function(e,t){return Oo(e,t)},gr=function(e){return e.paren=!0,e},yr=function(e){return/^CURRENT_DATE$/i.test(e)?{type:"current-time",mode:"date"}:/^CURRENT_TIMESTAMP$/i.test(e)?{type:"current-time",mode:"timestamp"}:{type:"column-reference",table:"",column:e}},Tr=function(e){return{type:"column-reference",table:"",column:e,delimited:!0}},Nr=function(e){return e},Or=function(e,t){return e+t.join("")},Cr=function(e,t){return e+t.join("")},br=function(e){return e},xr=function(e){return e.join("")},Ar=function(){return'"'},Mr=function(e){return{type:"parameter",value:e[1]}},Er=function(e,t){return{type:"function",name:"extract",args:{type:"expression-list",value:[{type:"string",value:e},t]}}},Fr=function(e,t,r){return{type:"function",name:"substring",args:{type:"expression-list",value:r?[e,t,r[2]]:[e,t]}}},Dr=function(e,t){return{type:"function",name:"cast",args:{type:"expression-list",value:[e,t]}}},Pr=function(){return{type:"data-type",value:{type:"integer"}}},_r=function(){return{type:"data-type",value:{type:"smallint"}}},Lr=function(){return{type:"data-type",value:{type:"float"}}},Rr=function(){return{type:"data-type",value:{type:"real"}}},Ur=function(){return{type:"data-type",value:{type:"date"}}},Vr=function(){return{type:"data-type",value:{type:"timestamp"}}},Jr=function(){return{type:"data-type",value:{type:"time"}}},$r=function(e){return{type:"data-type",value:{type:"varchar",size:parseInt(e)}}},zr=function(e,t,r){return{type:"function",name:"trim",args:{type:"expression-list",value:[{type:"string",value:e??"BOTH"},t,r]}}},Zr=function(e,t){return{type:"function",name:"trim",args:{type:"expression-list",value:[{type:"string",value:e??"BOTH"},t]}}},kr=function(e,t){return{type:"function",name:"position",args:{type:"expression-list",value:[e,t]}}},Hr=function(e,t){return{type:"function",name:e,args:t||{type:"expression-list",value:[]}}},qr=function(e){return"string"===e.type&&function(e){!0!==/^(\d{4})-(\d{1,2})-(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/.test(e)&&_a("Timestamp literal is invalid")}(e.value),{type:"timestamp",value:e.value}},Yr=function(e){return"string"===e.type&&function(e){!0!==/^(\d{1,2}):(\d{1,2}):(\d{1,2})$|^(\d{1,2}):(\d{1,2})$|^(\d{1,2}):(\d{1,2}):(\d{1,2}).([0-9]+)$/.test(e)&&_a("Time literal is invalid")}(e.value),{type:"time",value:e.value}},jr=function(e,t,r){return{type:"interval",value:t,qualifier:r,op:e}},Br=function(e,t){return{type:"interval",value:e,qualifier:t,op:""}},Qr=function(e,t){return{type:"interval-qualifier",start:e,end:t}},Gr=function(e,t){return{type:"interval-period",period:e.value,precision:t,secondary:null}},Wr=function(e){return{type:"interval-period",period:e.value,precision:null,secondary:null}},Kr=function(e){return{type:"interval-period",period:e.value,precision:null,secondary:null}},Xr=function(e,t){return{type:"interval-period",period:"second",precision:e,secondary:t}},en=function(e){return{type:"interval-period",period:"second",precision:e,secondary:null}},tn=function(){return{type:"interval-period",period:"second",precision:null,secondary:null}},rn=function(e,t){return{type:"interval-period",period:e.value,precision:t,secondary:null}},nn=function(e){return{type:"interval-period",period:e.value,precision:null,secondary:null}},an=function(e,t){return{type:"interval-period",period:"second",precision:e,secondary:t}},on=function(e){return{type:"interval-period",period:"second",precision:e,secondary:null}},un=function(){return{type:"interval-period",period:"second",precision:null,secondary:null}},sn=function(){return{type:"string",value:"day"}},ln=function(){return{type:"string",value:"hour"}},cn=function(){return{type:"string",value:"minute"}},fn=function(){return{type:"string",value:"month"}},dn=function(){return{type:"string",value:"year"}},pn=function(e){return parseFloat(e)},vn=function(e){return parseFloat(e)},hn=function(e){return"string"===e.type&&function(e){!0!==/^(\d{4})-(\d{1,2})-(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/.test(e)&&_a("Date literal is invalid")}(e.value),{type:"date",value:e.value}},mn=function(){return{type:"null",value:null}},wn=function(){return{type:"boolean",value:!0}},In=function(){return{type:"boolean",value:!1}},Sn=function(){return"'"},gn=function(e){return{type:"string",value:e.join("")}},yn=function(e,t){return{type:"case-expression",format:"simple",operand:e,clauses:t,else:null}},Tn=function(e,t,r){return{type:"case-expression",format:"simple",operand:e,clauses:t,else:r.value}},Nn=function(e){return{type:"case-expression",format:"searched",clauses:e,else:null}},On=function(e,t){return{type:"case-expression",format:"searched",clauses:e,else:t.value}},Cn=function(e,t){return{type:"when-clause",operand:e,value:t}},bn=function(e,t){return{type:"when-clause",operand:e,value:t}},xn=function(e){return{type:"else-clause",value:e}},An=function(e){return{type:"number",value:e}},Mn=function(e,t,r){return parseFloat(e+t+r)},En=function(e,t){return parseFloat(e+t)},Fn=function(e,t){return parseFloat(e+t)},Dn=function(e){return parseFloat(e)},Pn=function(e,t){return e[0]+t},_n=function(e){return"."+(null!=e?e:"")},Ln=function(e,t){return e+t},Rn=function(e){return e.join("")},Un=function(e,t){return"e"+(null===t?"":t)},Vn=function(){return"IN"},Jn=function(){return"IS"},$n=function(){return"LIKE"},zn=function(){return"ESCAPE"},Zn=function(){return"NOT"},kn=function(){return"AND"},Hn=function(){return"OR"},qn=function(){return"BETWEEN"},Yn=function(){return"FROM"},jn=function(){return"FOR"},Bn=function(){return"SUBSTRING"},Qn=function(){return"EXTRACT"},Gn=function(){return"TRIM"},Wn=function(){return"POSITION"},Kn=function(){return"TIMESTAMP"},Xn=function(){return"DATE"},ea=function(){return"TIME"},ta=function(){return"LEADING"},ra=function(){return"TRAILING"},na=function(){return"BOTH"},aa=function(){return"CAST"},ia=function(){return"AS"},oa=function(){return"INTEGER"},ua=function(){return"SMALLINT"},sa=function(){return"FLOAT"},la=function(){return"REAL"},ca=function(){return"VARCHAR"},fa=function(){return"TO"},da=function(){return"INTERVAL"},pa=function(){return"YEAR"},va=function(){return"TIMEZONE_HOUR"},ha=function(){return"TIMEZONE_MINUTE"},ma=function(){return"MONTH"},wa=function(){return"DAY"},Ia=function(){return"HOUR"},Sa=function(){return"MINUTE"},ga=function(){return"SECOND"},ya=function(){return"CASE"},Ta=function(){return"END"},Na=function(){return"WHEN"},Oa=function(){return"THEN"},Ca=function(){return"ELSE"},ba=function(e){return e},xa=function(e){return e.join("")},Aa=0,Ma=0,Ea=[{line:1,column:1}],Fa=0,Da=[],Pa=0;if("startRule"in r){if(!(r.startRule in o))throw new Error("Can't start parsing from rule \""+r.startRule+'".');u=o[r.startRule]}function _a(e,t){throw $a(e,t=void 0!==t?t:Va(Ma,Aa))}function La(e,t){return{type:"literal",text:e,ignoreCase:t}}function Ra(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Ua(e){var r,n=Ea[e];if(n)return n;for(r=e-1;!Ea[r];)r--;for(n={line:(n=Ea[r]).line,column:n.column};r<e;)10===t.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return Ea[e]=n,n}function Va(e,t,r){var n=Ua(e),a=Ua(t),o={source:i,start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:a.line,column:a.column}};return r&&i&&"function"==typeof i.offset&&(o.start=i.offset(o.start),o.end=i.offset(o.end)),o}function Ja(e){Aa<Fa||(Aa>Fa&&(Fa=Aa,Da=[]),Da.push(e))}function $a(t,r){return new e(t,null,null,r)}function za(){var e,t;return e=Aa,go(),(t=ka())!==a?(go(),Ma=e,e=er(t)):(Aa=e,e=a),e}function Za(){var e,t,r,n,i,o,u,s;if(e=Aa,(t=ka())!==a){for(r=[],n=Aa,i=go(),(o=wo())!==a?(u=go(),(s=ka())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);n!==a;)r.push(n),n=Aa,i=go(),(o=wo())!==a?(u=go(),(s=ka())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);Ma=e,e=tr(t,r)}else Aa=e,e=a;return e}function ka(){var e,t,r,n,i,o,u,s;if(e=Aa,(t=Ha())!==a){for(r=[],n=Aa,i=go(),(o=_i())!==a?(u=go(),(s=Ha())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);n!==a;)r.push(n),n=Aa,i=go(),(o=_i())!==a?(u=go(),(s=Ha())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);Ma=e,e=rr(t,r)}else Aa=e,e=a;return e}function Ha(){var e,t,r,n,i,o,u,s;if(e=Aa,(t=qa())!==a){for(r=[],n=Aa,i=go(),(o=Pi())!==a?(u=go(),(s=qa())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);n!==a;)r.push(n),n=Aa,i=go(),(o=Pi())!==a?(u=go(),(s=qa())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);Ma=e,e=nr(t,r)}else Aa=e,e=a;return e}function qa(){var e,r,n,i,o;return e=Aa,(r=Di())===a&&(r=Aa,33===t.charCodeAt(Aa)?(n=s,Aa++):(n=a,0===Pa&&Ja(Fe)),n!==a?(i=Aa,Pa++,61===t.charCodeAt(Aa)?(o=l,Aa++):(o=a,0===Pa&&Ja(De)),Pa--,o===a?i=void 0:(Aa=i,i=a),i!==a?r=n=[n,i]:(Aa=r,r=a)):(Aa=r,r=a)),r!==a?(n=go(),(i=qa())!==a?(Ma=e,e=ar(i)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=function(){var e,t,r;return e=Aa,(t=Qa())!==a?(go(),(r=function(){var e;return(e=function(){var e,t,r,n,i,o,u;if(e=Aa,t=[],r=Aa,n=go(),(i=Ya())!==a?(o=go(),(u=Qa())!==a?r=n=[n,i,o,u]:(Aa=r,r=a)):(Aa=r,r=a),r!==a)for(;r!==a;)t.push(r),r=Aa,n=go(),(i=Ya())!==a?(o=go(),(u=Qa())!==a?r=n=[n,i,o,u]:(Aa=r,r=a)):(Aa=r,r=a);else t=a;return t!==a&&(Ma=e,t=or(t)),t}())===a&&(e=function(){var e,t,r,n;return e=Aa,(t=Ba())!==a?(go(),(r=Io())!==a?(go(),(n=Za())!==a?(go(),So()!==a?(Ma=e,e=hr(t,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=Ba())!==a?(go(),(r=Io())!==a?(go(),(n=So())!==a?(Ma=e,e=mr(t)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=Ba())!==a?(go(),(r=ui())!==a?(Ma=e,e=wr(t,r)):(Aa=e,e=a)):(Aa=e,e=a))),e}())===a&&(e=function(){var e,t,r,n,i,o;return e=Aa,(t=Di())!==a?(go(),(r=Li())!==a?(go(),(n=Qa())!==a?(go(),(i=Pi())!==a?(go(),(o=Qa())!==a?(Ma=e,e=lr(r,n,o)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=Li())!==a?(go(),(r=Qa())!==a?(go(),(n=Pi())!==a?(go(),(i=Qa())!==a?(Ma=e,e=cr(t,r,i)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)),e}())===a&&(e=function(){var e,t,r,n;return e=Aa,(t=Mi())!==a?(go(),(r=Di())!==a?(go(),(n=Qa())!==a?(Ma=e,e=ur(t,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=Mi())!==a?(go(),(r=Qa())!==a?(Ma=e,e=sr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)),e}())===a&&(e=function(){var e,t,r,n;return e=Aa,(t=ja())!==a?(go(),(r=vi())!==a?(go(),Fi()!==a?(go(),(n=hi())!==a?(Ma=e,e=pr(t,r,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=ja())!==a?(go(),(r=vi())!==a?(Ma=e,e=vr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)),e}()),e}())===a&&(r=null),Ma=e,e=ir(t,r)):(Aa=e,e=a),e}()),e}function Ya(){var e;return t.substr(Aa,2)===c?(e=c,Aa+=2):(e=a,0===Pa&&Ja(Pe)),e===a&&(62===t.charCodeAt(Aa)?(e=f,Aa++):(e=a,0===Pa&&Ja(_e)),e===a&&(t.substr(Aa,2)===d?(e=d,Aa+=2):(e=a,0===Pa&&Ja(Le)),e===a&&(t.substr(Aa,2)===p?(e=p,Aa+=2):(e=a,0===Pa&&Ja(Re)),e===a&&(60===t.charCodeAt(Aa)?(e=v,Aa++):(e=a,0===Pa&&Ja(Ue)),e===a&&(61===t.charCodeAt(Aa)?(e=l,Aa++):(e=a,0===Pa&&Ja(De)),e===a&&(t.substr(Aa,2)===h?(e=h,Aa+=2):(e=a,0===Pa&&Ja(Ve)))))))),e}function ja(){var e,t,r,n,i;return e=Aa,t=Aa,(r=Di())!==a?(n=go(),(i=Ei())!==a?t=r=[r,n,i]:(Aa=t,t=a)):(Aa=t,t=a),t!==a&&(Ma=e,t=fr(t)),(e=t)===a&&(e=Ei()),e}function Ba(){var e,t,r,n,i;return e=Aa,t=Aa,(r=Di())!==a?(n=go(),(i=Ai())!==a?t=r=[r,n,i]:(Aa=t,t=a)):(Aa=t,t=a),t!==a&&(Ma=e,t=dr(t)),(e=t)===a&&(e=Ai()),e}function Qa(){var e,t,r,n,i,o,u,s;if(e=Aa,(t=Wa())!==a){for(r=[],n=Aa,i=go(),(o=Ga())!==a?(u=go(),(s=Wa())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);n!==a;)r.push(n),n=Aa,i=go(),(o=Ga())!==a?(u=go(),(s=Wa())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);Ma=e,e=Ir(t,r)}else Aa=e,e=a;return e}function Ga(){var e;return 43===t.charCodeAt(Aa)?(e=m,Aa++):(e=a,0===Pa&&Ja(Je)),e===a&&(45===t.charCodeAt(Aa)?(e=w,Aa++):(e=a,0===Pa&&Ja($e)),e===a&&(t.substr(Aa,2)===I?(e=I,Aa+=2):(e=a,0===Pa&&Ja(ze)))),e}function Wa(){var e,t,r,n,i,o,u,s;if(e=Aa,(t=Xa())!==a){for(r=[],n=Aa,i=go(),(o=Ka())!==a?(u=go(),(s=Xa())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);n!==a;)r.push(n),n=Aa,i=go(),(o=Ka())!==a?(u=go(),(s=Xa())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);Ma=e,e=Sr(t,r)}else Aa=e,e=a;return e}function Ka(){var e;return 42===t.charCodeAt(Aa)?(e=S,Aa++):(e=a,0===Pa&&Ja(Ze)),e===a&&(47===t.charCodeAt(Aa)?(e=g,Aa++):(e=a,0===Pa&&Ja(ke))),e}function Xa(){var e,t;return(e=function(){var e;return(e=hi())===a&&(e=function(){var e,t,r,n;return e=Aa,(t=function(){var e,t,r,n;return e=Aa,(t=Si())!==a&&(r=gi())!==a&&(n=yi())!==a?(Ma=e,e=Mn(t,r,n)):(Aa=e,e=a),e===a&&(e=Aa,(t=Si())!==a&&(r=gi())!==a?(Ma=e,e=En(t,r)):(Aa=e,e=a),e===a&&(e=Aa,(t=Si())!==a&&(r=yi())!==a?(Ma=e,e=Fn(t,r)):(Aa=e,e=a),e===a&&(e=Aa,(t=Si())!==a&&(Ma=e,t=Dn(t)),e=t))),e}())!==a?(r=Aa,Pa++,n=ti(),Pa--,n===a?r=void 0:(Aa=r,r=a),r!==a?(Ma=e,e=An(t)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=function(){var e,t;return e=Aa,(t=bi())!==a&&(Ma=e,t=wn()),(e=t)===a&&(e=Aa,(t=xi())!==a&&(Ma=e,t=In()),e=t),e}())===a&&(e=function(){var e,t;return e=Aa,(t=Ci())!==a&&(Ma=e,t=mn()),t}())===a&&(e=function(){var e,t;return e=Aa,ki()!==a?(go(),(t=vi())!==a?(Ma=e,e=hn(t)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=function(){var e,t;return e=Aa,Zi()!==a?(go(),(t=vi())!==a?(Ma=e,e=qr(t)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=li())===a&&(e=function(){var e,t;return e=Aa,Hi()!==a?(go(),(t=vi())!==a?(Ma=e,e=Yr(t)):(Aa=e,e=a)):(Aa=e,e=a),e}()),e}())===a&&(e=function(){var e,t,r;return e=Aa,Ji()!==a?(go(),Io()!==a?(go(),(t=function(){var e;return(e=no())===a&&(e=oo())===a&&(e=uo())===a&&(e=so())===a&&(e=lo())===a&&(e=co())===a&&(e=ao())===a&&(e=io()),e}())!==a?(go(),Ri()!==a?(go(),(r=ka())!==a?(go(),So()!==a?(Ma=e,e=Er(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=function(){var e,t,r,n,i,o,u;return e=Aa,Vi()!==a?(go(),Io()!==a?(go(),(t=ka())!==a?(go(),Ri()!==a?(go(),(r=ka())!==a?(go(),n=Aa,(i=Ui())!==a?(o=go(),(u=ka())!==a?n=i=[i,o,u,go()]:(Aa=n,n=a)):(Aa=n,n=a),n===a&&(n=null),(i=So())!==a?(Ma=e,e=Fr(t,r,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=function(){var e,t,r,n;return e=Aa,$i()!==a?(go(),Io()!==a?(go(),(t=si())===a&&(t=null),go(),(r=ka())!==a?(go(),Ri()!==a?(go(),(n=ka())!==a?(go(),So()!==a?(Ma=e,e=zr(t,r,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,$i()!==a?(go(),Io()!==a?(go(),(t=si())===a&&(t=null),go(),(r=ka())!==a?(go(),So()!==a?(Ma=e,e=Zr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)),e}())===a&&(e=function(){var e,t,r;return e=Aa,zi()!==a?(go(),Io()!==a?(go(),(t=ka())!==a?(go(),Ai()!==a?(go(),(r=ka())!==a?(go(),So()!==a?(Ma=e,e=kr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=function(){var e,t,r;return e=Aa,Bi()!==a?(go(),Io()!==a?(go(),(t=ka())!==a?(go(),Qi()!==a?(go(),(r=function(){var e,t,r;return e=Aa,(t=Gi())!==a&&(Ma=e,t=Pr()),(e=t)===a&&(e=Aa,(t=Wi())!==a&&(Ma=e,t=_r()),(e=t)===a&&(e=Aa,(t=Ki())!==a&&(Ma=e,t=Lr()),(e=t)===a&&(e=Aa,(t=Xi())!==a&&(Ma=e,t=Rr()),(e=t)===a&&(e=Aa,(t=ki())!==a&&(Ma=e,t=Ur()),(e=t)===a&&(e=Aa,(t=Zi())!==a&&(Ma=e,t=Vr()),(e=t)===a&&(e=Aa,(t=Hi())!==a&&(Ma=e,t=Jr()),(e=t)===a&&(e=Aa,(t=eo())!==a?(go(),Io()!==a?(go(),(r=Ti())!==a?(go(),So()!==a?(Ma=e,e=$r(r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)))))))),e}())!==a?(go(),So()!==a?(Ma=e,e=Dr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=function(){var e,t,r;return e=Aa,(t=To())!==a?(go(),Io()!==a?(go(),(r=Za())===a&&(r=null),go(),So()!==a?(Ma=e,e=Hr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=function(){var e;return(e=function(){var e,t,r,n,i;if(e=Aa,fo()!==a)if(go(),(t=ka())!==a){for(go(),r=[],n=wi();n!==a;)r.push(n),n=wi();n=go(),(i=po())!==a?(Ma=e,e=yn(t,r)):(Aa=e,e=a)}else Aa=e,e=a;else Aa=e,e=a;if(e===a)if(e=Aa,fo()!==a)if(go(),(t=ka())!==a){for(go(),r=[],n=wi();n!==a;)r.push(n),n=wi();n=go(),(i=Ii())!==a?(go(),po()!==a?(Ma=e,e=Tn(t,r,i)):(Aa=e,e=a)):(Aa=e,e=a)}else Aa=e,e=a;else Aa=e,e=a;return e}())===a&&(e=function(){var e,t,r,n;if(e=Aa,fo()!==a){for(go(),t=[],r=mi();r!==a;)t.push(r),r=mi();r=go(),(n=po())!==a?(Ma=e,e=Nn(t)):(Aa=e,e=a)}else Aa=e,e=a;if(e===a)if(e=Aa,fo()!==a){for(go(),t=[],r=mi();r!==a;)t.push(r),r=mi();r=go(),(n=Ii())!==a?(go(),po()!==a?(Ma=e,e=On(t,n)):(Aa=e,e=a)):(Aa=e,e=a)}else Aa=e,e=a;return e}()),e}())===a&&(e=function(){var e,t;return e=Aa,(t=function(){var e,t;return e=Aa,(t=function(){var e,t,r,n;if(e=Aa,(t=ti())!==a){for(r=[],n=ni();n!==a;)r.push(n),n=ni();Ma=e,e=Or(t,r)}else Aa=e,e=a;return e}())!==a&&(Ma=e,t=Nr(t)),t}())!==a&&(Ma=e,t=yr(t)),(e=t)===a&&(e=Aa,(t=function(){var e,t;return e=Aa,oi()!==a?(t=function(){var e,t,r;for(e=Aa,t=[],r=ai();r!==a;)t.push(r),r=ai();return Ma=e,xr(t)}(),oi()!==a?(Ma=e,e=br(t)):(Aa=e,e=a)):(Aa=e,e=a),e}())!==a&&(Ma=e,t=Tr(t)),e=t),e}())===a&&(e=ui())===a&&(e=Aa,Io()!==a?(go(),(t=ka())!==a?(go(),So()!==a?(Ma=e,e=gr(t)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)),e}function ei(){var e,t,r,n;if(e=Aa,(t=ti())!==a){for(r=[],n=ri();n!==a;)r.push(n),n=ri();Ma=e,e=Cr(t,r)}else Aa=e,e=a;return e}function ti(){var e;return ye.test(t.charAt(Aa))?(e=t.charAt(Aa),Aa++):(e=a,0===Pa&&Ja(He)),e}function ri(){var e;return Te.test(t.charAt(Aa))?(e=t.charAt(Aa),Aa++):(e=a,0===Pa&&Ja(qe)),e}function ni(){var e;return Ne.test(t.charAt(Aa))?(e=t.charAt(Aa),Aa++):(e=a,0===Pa&&Ja(Ye)),e}function ai(){var e;return(e=ii())===a&&(e=function(){var e;return e=Aa,oi()!==a&&oi()!==a?(Ma=e,e=Ar()):(Aa=e,e=a),e}()),e}function ii(){var e;return Ne.test(t.charAt(Aa))?(e=t.charAt(Aa),Aa++):(e=a,0===Pa&&Ja(Ye)),e}function oi(){var e;return Oe.test(t.charAt(Aa))?(e=t.charAt(Aa),Aa++):(e=a,0===Pa&&Ja(je)),e}function ui(){var e,r,n,i;return e=Aa,r=Aa,64===t.charCodeAt(Aa)?(n=y,Aa++):(n=a,0===Pa&&Ja(Be)),n!==a&&(i=ei())!==a?r=n=[n,i]:(Aa=r,r=a),r!==a&&(Ma=e,r=Mr(r)),r}function si(){var e;return(e=qi())===a&&(e=Yi())===a&&(e=ji()),e}function li(){var e,r,n,i;return e=Aa,ro()!==a?(go(),45===t.charCodeAt(Aa)?(r=w,Aa++):(r=a,0===Pa&&Ja($e)),r===a&&(43===t.charCodeAt(Aa)?(r=m,Aa++):(r=a,0===Pa&&Ja(Je))),r!==a?(go(),(n=vi())!==a?(go(),(i=ci())!==a?(Ma=e,e=jr(r,n,i)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,ro()!==a?(go(),(r=vi())!==a?(go(),(n=ci())!==a?(Ma=e,e=Br(r,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)),e}function ci(){var e,t,r;return e=Aa,(t=function(){var e,t,r;return e=Aa,(t=fi())!==a?(go(),Io()!==a?(go(),(r=pi())!==a?(go(),So()!==a?(Ma=e,e=Gr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=fi())!==a&&(Ma=e,t=Wr(t)),e=t),e}())!==a?(go(),to()!==a?(go(),(r=function(){var e,t,r,n;return e=Aa,(t=fi())!==a&&(Ma=e,t=Kr(t)),(e=t)===a&&(e=Aa,(t=co())!==a?(go(),Io()!==a?(go(),(r=pi())!==a?(go(),wo()!==a?(go(),(n=di())!==a?(go(),So()!==a?(Ma=e,e=Xr(r,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=co())!==a?(go(),Io()!==a?(go(),(r=pi())!==a?(go(),So()!==a?(Ma=e,e=en(r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=co())!==a&&(Ma=e,t=tn()),e=t))),e}())!==a?(Ma=e,e=Qr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=function(){var e,t,r,n;return e=Aa,(t=fi())!==a?(go(),Io()!==a?(go(),(r=di())!==a?(go(),So()!==a?(Ma=e,e=rn(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=fi())!==a&&(Ma=e,t=nn(t)),(e=t)===a&&(e=Aa,(t=co())!==a?(go(),Io()!==a?(go(),(r=pi())!==a?(go(),wo()!==a?(go(),(n=di())!==a?(go(),So()!==a?(Ma=e,e=an(r,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=co())!==a?(go(),Io()!==a?(go(),(r=di())!==a?(go(),So()!==a?(Ma=e,e=on(r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=co())!==a&&(Ma=e,t=un()),e=t)))),e}()),e}function fi(){var e,t;return e=Aa,(t=uo())!==a&&(Ma=e,t=sn()),(e=t)===a&&(e=Aa,(t=so())!==a&&(Ma=e,t=ln()),(e=t)===a&&(e=Aa,(t=lo())!==a&&(Ma=e,t=cn()),(e=t)===a&&(e=Aa,(t=oo())!==a&&(Ma=e,t=fn()),(e=t)===a&&(e=Aa,(t=no())!==a&&(Ma=e,t=dn()),e=t)))),e}function di(){var e,t;return e=Aa,(t=Ti())!==a&&(Ma=e,t=pn(t)),t}function pi(){var e,t;return e=Aa,(t=Ti())!==a&&(Ma=e,t=vn(t)),t}function vi(){var e;return(e=hi())===a&&(e=ui()),e}function hi(){var e,r,n,i,o;if(e=Aa,39===t.charCodeAt(Aa)?(r=T,Aa++):(r=a,0===Pa&&Ja(Qe)),r===a&&(t.substr(Aa,2)===N?(r=N,Aa+=2):(r=a,0===Pa&&Ja(Ge))),r!==a){for(n=[],i=Aa,t.substr(Aa,2)===O?(o=O,Aa+=2):(o=a,0===Pa&&Ja(We)),o!==a&&(Ma=i,o=Sn()),(i=o)===a&&(Ce.test(t.charAt(Aa))?(i=t.charAt(Aa),Aa++):(i=a,0===Pa&&Ja(Ke)));i!==a;)n.push(i),i=Aa,t.substr(Aa,2)===O?(o=O,Aa+=2):(o=a,0===Pa&&Ja(We)),o!==a&&(Ma=i,o=Sn()),(i=o)===a&&(Ce.test(t.charAt(Aa))?(i=t.charAt(Aa),Aa++):(i=a,0===Pa&&Ja(Ke)));39===t.charCodeAt(Aa)?(i=T,Aa++):(i=a,0===Pa&&Ja(Qe)),i!==a?(Ma=e,e=gn(n)):(Aa=e,e=a)}else Aa=e,e=a;return e}function mi(){var e,t,r;return e=Aa,vo()!==a?(go(),(t=ka())!==a?(go(),ho()!==a?(go(),(r=ka())!==a?(Ma=e,e=Cn(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e}function wi(){var e,t,r;return e=Aa,vo()!==a?(go(),(t=ka())!==a?(go(),ho()!==a?(go(),(r=ka())!==a?(Ma=e,e=bn(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e}function Ii(){var e,t;return e=Aa,mo()!==a?(go(),(t=ka())!==a?(Ma=e,e=xn(t)):(Aa=e,e=a)):(Aa=e,e=a),e}function Si(){var e,r,n;return(e=Ti())===a&&(e=Aa,45===t.charCodeAt(Aa)?(r=w,Aa++):(r=a,0===Pa&&Ja($e)),r===a&&(43===t.charCodeAt(Aa)?(r=m,Aa++):(r=a,0===Pa&&Ja(Je))),r!==a&&(n=Ti())!==a?(Ma=e,e=Pn(r,n)):(Aa=e,e=a)),e}function gi(){var e,r,n;return e=Aa,46===t.charCodeAt(Aa)?(r=C,Aa++):(r=a,0===Pa&&Ja(Xe)),r!==a?((n=Ti())===a&&(n=null),Ma=e,e=_n(n)):(Aa=e,e=a),e}function yi(){var e,t,r;return e=Aa,(t=Oi())!==a&&(r=Ti())!==a?(Ma=e,e=Ln(t,r)):(Aa=e,e=a),e}function Ti(){var e,t,r;if(e=Aa,t=[],(r=Ni())!==a)for(;r!==a;)t.push(r),r=Ni();else t=a;return t!==a&&(Ma=e,t=Rn(t)),t}function Ni(){var e;return be.test(t.charAt(Aa))?(e=t.charAt(Aa),Aa++):(e=a,0===Pa&&Ja(et)),e}function Oi(){var e,r,n;return e=Aa,xe.test(t.charAt(Aa))?(r=t.charAt(Aa),Aa++):(r=a,0===Pa&&Ja(tt)),r!==a?(Ae.test(t.charAt(Aa))?(n=t.charAt(Aa),Aa++):(n=a,0===Pa&&Ja(rt)),n===a&&(n=null),Ma=e,e=Un(r,n)):(Aa=e,e=a),e}function Ci(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===b?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(nt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?e=r=[r,n]:(Aa=e,e=a)):(Aa=e,e=a),e}function bi(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===x?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(at)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?e=r=[r,n]:(Aa=e,e=a)):(Aa=e,e=a),e}function xi(){var e,r,n,i;return e=Aa,t.substr(Aa,5).toLowerCase()===A?(r=t.substr(Aa,5),Aa+=5):(r=a,0===Pa&&Ja(it)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?e=r=[r,n]:(Aa=e,e=a)):(Aa=e,e=a),e}function Ai(){var e,r,n,i;return e=Aa,t.substr(Aa,2).toLowerCase()===M?(r=t.substr(Aa,2),Aa+=2):(r=a,0===Pa&&Ja(ot)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Vn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Mi(){var e,r,n,i;return e=Aa,t.substr(Aa,2).toLowerCase()===E?(r=t.substr(Aa,2),Aa+=2):(r=a,0===Pa&&Ja(ut)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Jn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Ei(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===F?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(st)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=$n()):(Aa=e,e=a)):(Aa=e,e=a),e}function Fi(){var e,r,n,i;return e=Aa,t.substr(Aa,6).toLowerCase()===D?(r=t.substr(Aa,6),Aa+=6):(r=a,0===Pa&&Ja(lt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=zn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Di(){var e,r,n,i;return e=Aa,t.substr(Aa,3).toLowerCase()===P?(r=t.substr(Aa,3),Aa+=3):(r=a,0===Pa&&Ja(ct)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Zn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Pi(){var e,r,n,i;return e=Aa,t.substr(Aa,3).toLowerCase()===_?(r=t.substr(Aa,3),Aa+=3):(r=a,0===Pa&&Ja(ft)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=kn()):(Aa=e,e=a)):(Aa=e,e=a),e}function _i(){var e,r,n,i;return e=Aa,t.substr(Aa,2).toLowerCase()===L?(r=t.substr(Aa,2),Aa+=2):(r=a,0===Pa&&Ja(dt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Hn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Li(){var e,r,n,i;return e=Aa,t.substr(Aa,7).toLowerCase()===R?(r=t.substr(Aa,7),Aa+=7):(r=a,0===Pa&&Ja(pt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=qn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Ri(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===U?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(vt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Yn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Ui(){var e,r,n,i;return e=Aa,t.substr(Aa,3).toLowerCase()===V?(r=t.substr(Aa,3),Aa+=3):(r=a,0===Pa&&Ja(ht)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=jn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Vi(){var e,r,n,i;return e=Aa,t.substr(Aa,9).toLowerCase()===J?(r=t.substr(Aa,9),Aa+=9):(r=a,0===Pa&&Ja(mt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Bn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Ji(){var e,r,n,i;return e=Aa,t.substr(Aa,7).toLowerCase()===$?(r=t.substr(Aa,7),Aa+=7):(r=a,0===Pa&&Ja(wt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Qn()):(Aa=e,e=a)):(Aa=e,e=a),e}function $i(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===z?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(It)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Gn()):(Aa=e,e=a)):(Aa=e,e=a),e}function zi(){var e,r,n,i;return e=Aa,t.substr(Aa,8).toLowerCase()===Z?(r=t.substr(Aa,8),Aa+=8):(r=a,0===Pa&&Ja(St)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Wn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Zi(){var e,r,n,i;return e=Aa,t.substr(Aa,9).toLowerCase()===k?(r=t.substr(Aa,9),Aa+=9):(r=a,0===Pa&&Ja(gt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Kn()):(Aa=e,e=a)):(Aa=e,e=a),e}function ki(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===H?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(yt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Xn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Hi(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===q?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(Tt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ea()):(Aa=e,e=a)):(Aa=e,e=a),e}function qi(){var e,r,n,i;return e=Aa,t.substr(Aa,7).toLowerCase()===Y?(r=t.substr(Aa,7),Aa+=7):(r=a,0===Pa&&Ja(Nt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ta()):(Aa=e,e=a)):(Aa=e,e=a),e}function Yi(){var e,r,n,i;return e=Aa,t.substr(Aa,8).toLowerCase()===j?(r=t.substr(Aa,8),Aa+=8):(r=a,0===Pa&&Ja(Ot)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ra()):(Aa=e,e=a)):(Aa=e,e=a),e}function ji(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===B?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(Ct)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=na()):(Aa=e,e=a)):(Aa=e,e=a),e}function Bi(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===Q?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(bt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=aa()):(Aa=e,e=a)):(Aa=e,e=a),e}function Qi(){var e,r,n,i;return e=Aa,t.substr(Aa,2).toLowerCase()===G?(r=t.substr(Aa,2),Aa+=2):(r=a,0===Pa&&Ja(xt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ia()):(Aa=e,e=a)):(Aa=e,e=a),e}function Gi(){var e,r,n,i;return e=Aa,t.substr(Aa,7).toLowerCase()===W?(r=t.substr(Aa,7),Aa+=7):(r=a,0===Pa&&Ja(At)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=oa()):(Aa=e,e=a)):(Aa=e,e=a),e}function Wi(){var e,r,n,i;return e=Aa,t.substr(Aa,8).toLowerCase()===K?(r=t.substr(Aa,8),Aa+=8):(r=a,0===Pa&&Ja(Mt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ua()):(Aa=e,e=a)):(Aa=e,e=a),e}function Ki(){var e,r,n,i;return e=Aa,t.substr(Aa,5).toLowerCase()===X?(r=t.substr(Aa,5),Aa+=5):(r=a,0===Pa&&Ja(Et)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=sa()):(Aa=e,e=a)):(Aa=e,e=a),e}function Xi(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===ee?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(Ft)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=la()):(Aa=e,e=a)):(Aa=e,e=a),e}function eo(){var e,r,n,i;return e=Aa,t.substr(Aa,7).toLowerCase()===te?(r=t.substr(Aa,7),Aa+=7):(r=a,0===Pa&&Ja(Dt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ca()):(Aa=e,e=a)):(Aa=e,e=a),e}function to(){var e,r,n,i;return e=Aa,t.substr(Aa,2).toLowerCase()===re?(r=t.substr(Aa,2),Aa+=2):(r=a,0===Pa&&Ja(Pt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=fa()):(Aa=e,e=a)):(Aa=e,e=a),e}function ro(){var e,r,n,i;return e=Aa,t.substr(Aa,8).toLowerCase()===ne?(r=t.substr(Aa,8),Aa+=8):(r=a,0===Pa&&Ja(_t)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=da()):(Aa=e,e=a)):(Aa=e,e=a),e}function no(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===ae?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(Lt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=pa()):(Aa=e,e=a)):(Aa=e,e=a),e}function ao(){var e,r,n,i;return e=Aa,t.substr(Aa,13).toLowerCase()===ie?(r=t.substr(Aa,13),Aa+=13):(r=a,0===Pa&&Ja(Rt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=va()):(Aa=e,e=a)):(Aa=e,e=a),e}function io(){var e,r,n,i;return e=Aa,t.substr(Aa,15).toLowerCase()===oe?(r=t.substr(Aa,15),Aa+=15):(r=a,0===Pa&&Ja(Ut)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ha()):(Aa=e,e=a)):(Aa=e,e=a),e}function oo(){var e,r,n,i;return e=Aa,t.substr(Aa,5).toLowerCase()===ue?(r=t.substr(Aa,5),Aa+=5):(r=a,0===Pa&&Ja(Vt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ma()):(Aa=e,e=a)):(Aa=e,e=a),e}function uo(){var e,r,n,i;return e=Aa,t.substr(Aa,3).toLowerCase()===se?(r=t.substr(Aa,3),Aa+=3):(r=a,0===Pa&&Ja(Jt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=wa()):(Aa=e,e=a)):(Aa=e,e=a),e}function so(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===le?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja($t)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Ia()):(Aa=e,e=a)):(Aa=e,e=a),e}function lo(){var e,r,n,i;return e=Aa,t.substr(Aa,6).toLowerCase()===ce?(r=t.substr(Aa,6),Aa+=6):(r=a,0===Pa&&Ja(zt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Sa()):(Aa=e,e=a)):(Aa=e,e=a),e}function co(){var e,r,n,i;return e=Aa,t.substr(Aa,6).toLowerCase()===fe?(r=t.substr(Aa,6),Aa+=6):(r=a,0===Pa&&Ja(Zt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ga()):(Aa=e,e=a)):(Aa=e,e=a),e}function fo(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===de?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(kt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ya()):(Aa=e,e=a)):(Aa=e,e=a),e}function po(){var e,r,n,i;return e=Aa,t.substr(Aa,3).toLowerCase()===pe?(r=t.substr(Aa,3),Aa+=3):(r=a,0===Pa&&Ja(Ht)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Ta()):(Aa=e,e=a)):(Aa=e,e=a),e}function vo(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===ve?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(qt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Na()):(Aa=e,e=a)):(Aa=e,e=a),e}function ho(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===he?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(Yt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Oa()):(Aa=e,e=a)):(Aa=e,e=a),e}function mo(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===me?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(jt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Ca()):(Aa=e,e=a)):(Aa=e,e=a),e}function wo(){var e;return 44===t.charCodeAt(Aa)?(e=we,Aa++):(e=a,0===Pa&&Ja(Bt)),e}function Io(){var e;return 40===t.charCodeAt(Aa)?(e=Ie,Aa++):(e=a,0===Pa&&Ja(Qt)),e}function So(){var e;return 41===t.charCodeAt(Aa)?(e=Se,Aa++):(e=a,0===Pa&&Ja(Gt)),e}function go(){var e,t;for(e=[],t=yo();t!==a;)e.push(t),t=yo();return e}function yo(){var e;return Me.test(t.charAt(Aa))?(e=t.charAt(Aa),Aa++):(e=a,0===Pa&&Ja(Wt)),e}function To(){var e,r,n,i;if(e=Aa,(r=ei())!==a&&(Ma=e,r=ba(r)),(e=r)===a)if(e=Aa,96===t.charCodeAt(Aa)?(r=ge,Aa++):(r=a,0===Pa&&Ja(Kt)),r!==a){if(n=[],Ee.test(t.charAt(Aa))?(i=t.charAt(Aa),Aa++):(i=a,0===Pa&&Ja(Xt)),i!==a)for(;i!==a;)n.push(i),Ee.test(t.charAt(Aa))?(i=t.charAt(Aa),Aa++):(i=a,0===Pa&&Ja(Xt));else n=a;n!==a?(96===t.charCodeAt(Aa)?(i=ge,Aa++):(i=a,0===Pa&&Ja(Kt)),i!==a?(Ma=e,e=xa(n)):(Aa=e,e=a)):(Aa=e,e=a)}else Aa=e,e=a;return e}function No(e,t,r,n){var a={type:"binary-expression",operator:e,left:t,right:r};return void 0!==n&&(a.escape=n),a}function Oo(e,t){for(var r=e,n=0;n<t.length;n++)r=No(t[n][1],r,t[n][3]);return r}if((n=u())!==a&&Aa===t.length)return n;throw n!==a&&Aa<t.length&&Ja({type:"end"}),function(t,r,n){return new e(e.buildMessage(t,r),t,r,n)}(Da,Fa<t.length?t.charAt(Fa):null,Fa<t.length?Va(Fa,Fa+1):Va(Fa,Fa))}}},(G=K).exports&&(G.exports=W());var X=K.exports;class ee{static parse(e){return X.parse(e)}}const te=new Set(["current_timestamp","current_date","current_time"]);class re{static makeBool(e){return ae(e)}static featureValue(e,t,r,n){return pe(e,t,r,n)}static equalsNull(e){return null===e}static applyLike(e,t,r){return de(e,t,r)}static ensureArray(e){return ie(e)}static applyIn(e,t){return le(e,t)}static currentDate(e){return o.u.fromNow(e)}static makeSqlInterval(e,t,r){return m.createFromValueAndQualifer(e,t,r)}static convertInterval(e){return e instanceof m?e.valueInMilliseconds():e}static currentTimestamp(e){return b(new Date,e)}static compare(e,t,r,n){return z(t,r,e)}static calculate(e,t,r,n){return B(e,t,r,n)}static evaluateTime(e){return L(e)}static evaluateTimestamp(e,t,r){return R(e,t,r)}static evaluateDate(e,t){return U(e,t)}static evaluateFunction(e,t,r){return k(e,t,r)}static lookup(e,t){const r=t[e];return void 0===r?null:r}static between(e,t,r){return null==e||null==t[0]||null==t[1]?null:z(e,t[0],">=")&&z(e,t[1],"<=")}static notbetween(e,t,r){return null==e||null==t[0]||null==t[1]?null:z(e,t[0],"<")||z(e,t[1],">")}static ternaryNot(e){return oe(e)}static ternaryAnd(e,t){return ue(e,t)}static ternaryOr(e,t){return se(e,t)}}class ne{constructor(e,t,r="UTC"){this.fieldsIndex=t,this.timeZone=r,this.parameters={},this._hasDateFunctions=void 0,this.parseTree=ee.parse(e);const{isStandardized:n,isAggregate:a,referencedFieldNames:i}=this._extractExpressionInfo(t);this._referencedFieldNames=i,this.isStandardized=n,this.isAggregate=a}static convertValueToStorageFormat(e,t=null){if(null===t)return E(e)?e.getTime():F(e)?e.toMillis():_(e)?e.toStorageFormat():P(e)?e.toStorageString():D(e)?e.toStorageFormat():e;switch(t){case"date":return E(e)?e.getTime():F(e)?e.toMillis():_(e)?e.toMilliseconds():D(e)?e.toNumber():e;case"date-only":return E(e)?o.u.fromDateJS(e).toString():_(e)?o.u.fromSqlTimeStampOffset(e).toString():F(e)?o.u.fromDateTime(e).toString():e;case"time-only":return E(e)?s.n.fromDateJS(e).toStorageString():F(e)?s.n.fromDateTime(e).toStorageString():_(e)?s.n.fromSqlTimeStampOffset(e).toStorageString():P(e)?e.toStorageString():e;case"timestamp-offset":if(E(e))return u.H.fromJSDate(e).toStorageFormat();if(F(e))return u.H.fromDateTime(e).toStorageFormat();if(_(e))return e.toStorageFormat()}return e}static create(e,t,r="UTC"){return new ne(e,t,r)}get fieldNames(){return this._referencedFieldNames}testSet(e,t=ve){return!!this._evaluateNode(this.parseTree,null,t,e)}calculateValue(e,t=ve){const r=this._evaluateNode(this.parseTree,e,t,null);return r instanceof m?r.valueInMilliseconds()/864e5:r}calculateValueCompiled(e,t=ve){return null!=this.parseTree._compiledVersion?this.parseTree._compiledVersion(e,this.parameters,t,this.fieldsIndex,this.timeZone):(0,i.Z)("esri-csp-restrictions")?this.calculateValue(e,t):(this._compileMe(),this.parseTree._compiledVersion(e,this.parameters,t,this.fieldsIndex,this.timeZone))}testFeature(e,t=ve){return!!this._evaluateNode(this.parseTree,e,t,null)}testFeatureCompiled(e,t=ve){return null!=this.parseTree._compiledVersion?!!this.parseTree._compiledVersion(e,this.parameters,t,this.fieldsIndex,this.timeZone):(0,i.Z)("esri-csp-restrictions")?this.testFeature(e,t):(this._compileMe(),!!this.parseTree._compiledVersion(e,this.parameters,t,this.fieldsIndex,this.timeZone))}get hasDateFunctions(){return null!=this._hasDateFunctions||(this._hasDateFunctions=!1,this._visitAll(this.parseTree,(e=>{"current-time"===e.type?this._hasDateFunctions=!0:"function"===e.type&&(this._hasDateFunctions=this._hasDateFunctions||te.has(e.name.toLowerCase()))}))),this._hasDateFunctions}getFunctions(){const e=new Set;return this._visitAll(this.parseTree,(t=>{"function"===t.type&&e.add(t.name.toLowerCase())})),Array.from(e)}getExpressions(){const e=new Map;return this._visitAll(this.parseTree,(t=>{if("function"===t.type){const r=t.name.toLowerCase(),n=t.args.value[0];if("column-reference"===n.type){const t=n.column,a=`${r}-${t}`;e.has(a)||e.set(a,{aggregateType:r,field:t})}}})),[...e.values()]}getVariables(){const e=new Set;return this._visitAll(this.parseTree,(t=>{"parameter"===t.type&&e.add(t.value.toLowerCase())})),Array.from(e)}_compileMe(){const e="return this.convertInterval("+this.evaluateNodeToJavaScript(this.parseTree)+")";this.parseTree._compiledVersion=new Function("feature","lookups","attributeAdapter","fieldsIndex","timeZone",e).bind(re)}_extractExpressionInfo(e){const t=[],r=new Set;let n=!0,a=!1;return this._visitAll(this.parseTree,(i=>{switch(i.type){case"column-reference":{const n=e?.get(i.column);let a,o;n?a=o=n.name??"":(o=i.column,a=o.toLowerCase()),r.has(a)||(r.add(a),t.push(o)),i.column=o;break}case"function":{const{name:e,args:t}=i,r=t.value.length;n&&(n=function(e,t){const r=j[e.toLowerCase()];return null!=r&&t>=r.minParams&&t<=r.maxParams}(e,r)),!1===a&&(a=c(e,r));break}}})),{referencedFieldNames:Array.from(t),isStandardized:n,isAggregate:a}}_visitAll(e,t){if(null!=e)switch(t(e),e.type){case"when-clause":this._visitAll(e.operand,t),this._visitAll(e.value,t);break;case"case-expression":for(const r of e.clauses)this._visitAll(r,t);"simple"===e.format&&this._visitAll(e.operand,t),null!==e.else&&this._visitAll(e.else,t);break;case"expression-list":for(const r of e.value)this._visitAll(r,t);break;case"unary-expression":this._visitAll(e.expr,t);break;case"binary-expression":this._visitAll(e.left,t),this._visitAll(e.right,t);break;case"function":this._visitAll(e.args,t)}}evaluateNodeToJavaScript(e){switch(e.type){case"interval":return"this.makeSqlInterval("+this.evaluateNodeToJavaScript(e.value)+", "+JSON.stringify(e.qualifier)+","+JSON.stringify(e.op)+")";case"case-expression":{let t="";if("simple"===e.format){const r=this.evaluateNodeToJavaScript(e.operand);t="( ";for(let n=0;n<e.clauses.length;n++)t+=" (this.compare('=',"+r+","+this.evaluateNodeToJavaScript(e.clauses[n].operand)+") ? ("+this.evaluateNodeToJavaScript(e.clauses[n].value)+") : ";null!==e.else?t+=this.evaluateNodeToJavaScript(e.else):t+="null",t+=" )"}else{t="( ";for(let r=0;r<e.clauses.length;r++)t+=" this.makeBool("+this.evaluateNodeToJavaScript(e.clauses[r].operand)+")===true ? ("+this.evaluateNodeToJavaScript(e.clauses[r].value)+") : ";null!==e.else?t+=this.evaluateNodeToJavaScript(e.else):t+="null",t+=" )"}return t}case"parameter":return"this.lookup("+JSON.stringify(e.value.toLowerCase())+",lookups)";case"expression-list":{let t="[";for(const r of e.value)"["!==t&&(t+=","),t+=this.evaluateNodeToJavaScript(r);return t+="]",t}case"unary-expression":return"this.ternaryNot("+this.evaluateNodeToJavaScript(e.expr)+")";case"binary-expression":switch(e.operator){case"AND":return"this.ternaryAnd("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+" )";case"OR":return"this.ternaryOr("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+" )";case"IS":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return"this.equalsNull("+this.evaluateNodeToJavaScript(e.left)+")";case"ISNOT":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return"(!(this.equalsNull("+this.evaluateNodeToJavaScript(e.left)+")))";case"IN":return"this.applyIn("+this.evaluateNodeToJavaScript(e.left)+",this.ensureArray("+this.evaluateNodeToJavaScript(e.right)+"))";case"NOT IN":return"this.ternaryNot(this.applyIn("+this.evaluateNodeToJavaScript(e.left)+",this.ensureArray("+this.evaluateNodeToJavaScript(e.right)+")))";case"BETWEEN":return"this.between("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeZone)";case"NOTBETWEEN":return"this.notbetween("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeZone)";case"LIKE":return"this.applyLike("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+","+JSON.stringify(e.escape)+")";case"NOT LIKE":return"this.ternaryNot(this.applyLike("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+","+JSON.stringify(e.escape)+"))";case"<>":case"<":case">":case">=":case"<=":case"=":return"this.compare("+JSON.stringify(e.operator)+","+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeZone)";case"*":case"-":case"+":case"/":case"||":return"this.calculate("+JSON.stringify(e.operator)+","+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeZone)"}throw new a.eS(a.f.UnsupportedOperator,{operator:e.operator});case"null":case"boolean":case"string":case"number":return JSON.stringify(e.value);case"time":return"this.evaluateTime(JSON.stringify(node.value))";case"date":return"this.evaluateDate(JSON.stringify(node.value), 'unknown')";case"timestamp":return"this.evaluateTimestamp(JSON.stringify(node.value), 'unknown')";case"current-time":return"date"===e.mode?"this.currentDate(timeZone)":"this.currentTimestamp(timeZone)";case"column-reference":return"this.featureValue(feature,"+JSON.stringify(e.column)+",fieldsIndex,attributeAdapter)";case"function":return"this.evaluateFunction("+JSON.stringify(e.name)+","+this.evaluateNodeToJavaScript(e.args)+", timeZone)"}throw new a.eS(a.f.UnsupportedSyntax,{node:e.type})}_evaluateNode(e,t,r,i){let u;switch(e.type){case"interval":{const n=this._evaluateNode(e.value,t,r,i);return m.createFromValueAndQualifer(n,e.qualifier,e.op)}case"case-expression":if("simple"===e.format){const n=this._evaluateNode(e.operand,t,r,i);for(let a=0;a<e.clauses.length;a++)if(z(n,this._evaluateNode(e.clauses[a].operand,t,r,i),"=",this.timeZone))return this._evaluateNode(e.clauses[a].value,t,r,i);if(null!==e.else)return this._evaluateNode(e.else,t,r,i)}else{for(let n=0;n<e.clauses.length;n++)if(ae(this._evaluateNode(e.clauses[n].operand,t,r,i)))return this._evaluateNode(e.clauses[n].value,t,r,i);if(null!==e.else)return this._evaluateNode(e.else,t,r,i)}return null;case"parameter":return u=this.parameters[e.value.toLowerCase()],E(u)?l.ou.fromJSDate(u):u instanceof n.iG?u.toDateTime():u;case"expression-list":{const n=[];for(const a of e.value)n.push(this._evaluateNode(a,t,r,i));return n}case"unary-expression":return oe(this._evaluateNode(e.expr,t,r,i));case"binary-expression":switch(e.operator){case"AND":return ue(this._evaluateNode(e.left,t,r,i),this._evaluateNode(e.right,t,r,i));case"OR":return se(this._evaluateNode(e.left,t,r,i),this._evaluateNode(e.right,t,r,i));case"IS":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return null===this._evaluateNode(e.left,t,r,i);case"ISNOT":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return null!==this._evaluateNode(e.left,t,r,i);case"IN":{const n=ie(this._evaluateNode(e.right,t,r,i));return le(this._evaluateNode(e.left,t,r,i),n)}case"NOT IN":{const n=ie(this._evaluateNode(e.right,t,r,i));return oe(le(this._evaluateNode(e.left,t,r,i),n))}case"BETWEEN":{const n=this._evaluateNode(e.left,t,r,i),a=this._evaluateNode(e.right,t,r,i);return null==n||null==a[0]||null==a[1]?null:z(n,a[0],">=",this.timeZone)&&z(n,a[1],"<=",this.timeZone)}case"NOTBETWEEN":{const n=this._evaluateNode(e.left,t,r,i),a=this._evaluateNode(e.right,t,r,i);return null==n||null==a[0]||null==a[1]?null:z(n,a[0],"<",this.timeZone)||z(n,a[1],">",this.timeZone)}case"LIKE":return de(this._evaluateNode(e.left,t,r,i),this._evaluateNode(e.right,t,r,i),e.escape);case"NOT LIKE":return oe(de(this._evaluateNode(e.left,t,r,i),this._evaluateNode(e.right,t,r,i),e.escape));case"<>":case"<":case">":case">=":case"<=":case"=":return z(this._evaluateNode(e.left,t,r,i),this._evaluateNode(e.right,t,r,i),e.operator,this.timeZone);case"-":case"+":case"*":case"/":case"||":return B(e.operator,this._evaluateNode(e.left,t,r,i),this._evaluateNode(e.right,t,r,i),this.timeZone)}case"null":case"boolean":case"string":case"number":return e.value;case"date":return e.parsedValue??=U(e.value,"unknown"),e.parsedValue;case"timestamp":return e.parsedValue??=R(e.value,"unknown"),e.parsedValue;case"time":return L(e.value);case"current-time":return"date"===e.mode?o.u.fromNow(this.timeZone):b(new Date,this.timeZone);case"column-reference":return pe(t,e.column,this.fieldsIndex,r);case"data-type":return e.value;case"function":{if(this.isAggregate&&c(e.name,e.args.value.length)){const t=[];for(const n of e.args?.value||[]){const e=[];for(const t of i||[])e.push(this._evaluateNode(n,t,r,null));t.push(e)}return function(e,t){const r=f[e.toLowerCase()];if(null==r)throw new a.eS(a.f.FunctionNotRecognized);if(t.length<r.minParams||t.length>r.maxParams)throw new a.eS(a.f.InvalidParameterCount,{name:e.toUpperCase()});return r.evaluate(t)}(e.name,t)}const n=this._evaluateNode(e.args,t,r,i);return k(e.name,n,this.timeZone)}}throw new a.eS(a.f.UnsupportedSyntax,{node:e.type})}}function ae(e){return!0===e}function ie(e){return Array.isArray(e)?e:[e]}function oe(e){return null!==e?!0!==e:null}function ue(e,t){return null!=e&&null!=t?!0===e&&!0===t:!1!==e&&!1!==t&&null}function se(e,t){return null!=e&&null!=t?!0===e||!0===t:!0===e||!0===t||null}function le(e,t){if(null==e)return null;let r=!1;for(const n of t)if(null==n)r=null;else if(e===n){r=!0;break}return r}const ce="-[]/{}()*+?.\\^$|";var fe;function de(e,t,r){return null==e?null:function(e,t){const r=t;let n="",a=fe.Normal;for(let t=0;t<e.length;t++){const i=e.charAt(t);switch(a){case fe.Normal:i===r?a=fe.Escaped:ce.includes(i)?n+="\\"+i:n+="%"===i?".*":"_"===i?".":i;break;case fe.Escaped:ce.includes(i)?n+="\\"+i:n+=i,a=fe.Normal}}return new RegExp("^"+n+"$","m")}(t,r).test(e)}function pe(e,t,r,n){const a=n.getAttribute(e,t),i=r?.get(t);return null==a||"esriFieldTypeDate"!==i?.type&&"date"!==i?.type?null==a||"esriFieldTypeDateOnly"!==i?.type&&"date-only"!==i?.type?null==a||"esriFieldTypeTimeOnly"!==i?.type&&"time-only"!==i?.type?null==a||"esriFieldTypeTimestampOffset"!==i?.type&&"timestamp-offset"!==i?.type?a:new u.H(a):s.n.fromReader(a):o.u.fromReader(a):b(new Date(a),r.getTimeZone(i.name)??"UTC")}!function(e){e[e.Normal=0]="Normal",e[e.Escaped=1]="Escaped"}(fe||(fe={}));const ve={getAttribute:(e,t)=>(function(e){return e&&"object"==typeof e.attributes}(e)?e.attributes:e)[t]}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[178,5732,447],{5732:(e,t,r)=>{r.d(t,{c:()=>i,g:()=>o});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},22862:(e,t,r)=>{r.d(t,{Hg:()=>f,V7:()=>y,uD:()=>c});var i=r(92036),o=r(46791),n=r(1153);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.Z}function l(e){return e instanceof o.Z?Object.keys(e.items):a(e)?(0,n.vw)(e).keys():e?Object.keys(e):[]}function p(e,t){return e instanceof o.Z?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),o=l(t);if(0===i.length&&0===o.length)return;if(!i.length||!o.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=o.filter((e=>!i.includes(e))),c=i.filter((e=>!o.includes(e))),y=i.filter((r=>o.includes(r)&&p(e,r)!==p(t,r))).concat(n,c).sort(),f=u(e);if(f&&s.has(f)&&y.length)return{type:"complete",oldValue:e,newValue:t};let h;const m=a(e)&&a(t);for(const i of y){const o=p(e,i),n=p(t,i);let s;if((m||"function"!=typeof o&&"function"!=typeof n)&&o!==n&&(null!=o||null!=n)){if(r&&r[i]&&"function"==typeof r[i])s=r[i]?.(o,n);else if(o instanceof Date&&n instanceof Date){if(o.getTime()===n.getTime())continue;s={type:"complete",oldValue:o,newValue:n}}else s="object"==typeof o&&"object"==typeof n&&u(o)===u(n)?d(o,n):{type:"complete",oldValue:o,newValue:n};null!=s&&(null!=h?h.diff[i]=s:h={type:"partial",diff:{[i]:s}})}}return h}function c(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}function y(e,t){for(const r of t)if(c(e,r))return!0;return!1}function f(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},60437:(e,t,r)=>{r.d(t,{G_:()=>v,HH:()=>s,JR:()=>f,TC:()=>a,Tn:()=>d,Ue:()=>o,al:()=>n,bZ:()=>h,cS:()=>y,dp:()=>p,fS:()=>g,is:()=>m,op:()=>u,pp:()=>l,t8:()=>c});var i=r(6570);function o(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,i,n,s,a=o()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=n,a[5]=s,a}function s(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function u(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function c(e,t){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}function y(e){return e?c(e,v):o(v)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function h(e,t,r,i,o){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function m(e){return 6===e.length}function g(e,t,r){if(null==e||null==t)return e===t;if(!m(e)||!m(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const v=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];o()},44958:(e,t,r)=>{r.r(t),r.d(t,{default:()=>z});var i=r(43697),o=r(20102),n=r(35454),s=r(5600),a=r(90578),l=r(52011),p=r(19238),u=r(2368),d=r(96674),c=(r(75215),r(67676),r(80442),r(92036));const y=[2155,2194,2204,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241,2242,2243,2244,2245,2246,2247,2248,2249,2250,2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2314,2867,2868,2869,2870,2871,2872,2873,2874,2875,2876,2877,2878,2879,2880,2881,2882,2883,2884,2885,2886,2887,2888,2889,2890,2891,2892,2893,2894,2895,2896,2897,2898,2899,2900,2901,2902,2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914,2915,2916,2917,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,2964,2965,2966,2967,2968,2992,2994,3080,3089,3091,3102,3359,3359,3361,3363,3365,3366,3404,3407,3417,3418,3419,3420,3421,3422,3423,3424,3425,3426,3427,3428,3429,3430,3431,3432,3433,3434,3435,3436,3437,3438,3441,3442,3443,3444,3445,3446,3451,3452,3453,3454,3455,3456,3457,3458,3459,3479,3481,3483,3485,3487,3490,3492,3494,3496,3498,3500,3502,3504,3506,3508,3510,3512,3515,3517,3519,3521,3523,3525,3527,3529,3531,3533,3535,3537,3539,3541,3543,3545,3547,3549,3551,3553,3560,3561,3562,3563,3564,3565,3566,3567,3568,3569,3570,3582,3584,3586,3588,3590,3593,3598,3600,3605,3608,3610,3612,3614,3616,3618,3620,3622,3624,3626,3628,3630,3632,3634,3636,3640,3642,3644,3646,3648,3650,3652,3654,3656,3658,3660,3662,3664,3668,3670,3672,3674,3676,3677,3679,3680,3682,3683,3686,3688,3690,3692,3696,3698,3700,3728,3729,3730,3731,3732,3733,3734,3735,3736,3737,3738,3739,3753,3754,3755,3756,3757,3758,3759,3760,3991,3992,4217,4399,4400,4401,4402,4403,4404,4405,4406,4407,4408,4409,4410,4411,4412,4413,4418,4419,4420,4421,4422,4423,4424,4425,4426,4427,4428,4429,4430,4431,4432,4433,4438,4439,4455,4456,4457,5466,5588,5589,5623,5624,5625,5646,5654,5655,6128,6129,6141,6200,6201,6202,6391,6405,6407,6409,6411,6413,6416,6418,6420,6422,6424,6426,6428,6430,6432,6434,6436,6438,6441,6443,6445,6447,6449,6451,6453,6455,6457,6459,6461,6463,6465,6467,6469,6471,6473,6475,6477,6479,6484,6486,6488,6490,6492,6494,6496,6499,6501,6503,6505,6507,6510,6515,6517,6519,6521,6523,6525,6527,6529,6531,6533,6535,6537,6539,6541,6543,6545,6547,6549,6551,6553,6555,6557,6559,6561,6563,6565,6568,6570,6572,6574,6576,6578,6582,6584,6586,6588,6590,6593,6595,6597,6599,6601,6603,6605,6607,6609,6612,6614,6616,6618,6625,6626,6627,6633,6785,6787,6789,6791,6793,6795,6797,6799,6801,6803,6805,6807,6809,6811,6813,6815,6817,6819,6821,6823,6825,6827,6829,6831,6833,6835,6837,6839,6841,6843,6845,6847,6849,6851,6853,6855,6857,6859,6861,6863,6868,6880,6885,6887,6923,6925,6966,6997,7057,7058,7059,7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,7119,7120,7121,7122,7123,7124,7125,7126,7127,7128,7132,7258,7260,7262,7264,7266,7268,7270,7272,7274,7276,7278,7280,7282,7284,7286,7288,7290,7292,7294,7296,7298,7300,7302,7304,7306,7308,7310,7312,7314,7316,7318,7320,7322,7324,7326,7328,7330,7332,7334,7336,7338,7340,7342,7344,7346,7348,7350,7352,7354,7356,7358,7360,7362,7364,7366,7368,7370,7558,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598,7599,7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614,7615,7616,7617,7618,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628,7629,7630,7631,7632,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,24100,26729,26730,26731,26732,26733,26734,26735,26736,26737,26738,26739,26740,26741,26742,26743,26744,26745,26746,26747,26748,26749,26750,26751,26752,26753,26754,26755,26756,26757,26758,26759,26760,26766,26767,26768,26769,26770,26771,26772,26773,26774,26775,26776,26777,26778,26779,26780,26781,26782,26783,26784,26785,26786,26787,26791,26792,26793,26794,26795,26796,26797,26798,26799,26801,26802,26803,26811,26812,26813,26814,26815,26819,26820,26821,26822,26825,26826,26830,26831,26832,26833,26836,26837,26841,26842,26843,26844,26847,26848,26849,26850,26851,26852,26853,26854,26855,26856,26857,26858,26859,26860,26861,26862,26863,26864,26865,26866,26867,26868,26869,26870,32001,32002,32003,32005,32006,32007,32008,32009,32010,32011,32012,32013,32014,32015,32016,32017,32018,32019,32020,32021,32022,32023,32024,32025,32026,32027,32028,32029,32030,32031,32033,32034,32035,32036,32037,32038,32039,32040,32041,32042,32043,32044,32045,32046,32047,32048,32049,32050,32051,32052,32053,32054,32055,32056,32057,32058,32064,32065,32066,32067,32074,32075,32076,32077,32099,32164,32165,32166,32167,32664,32665,32666,32667,65061,102120,102121,102629,102630,102631,102632,102633,102634,102635,102636,102637,102638,102639,102640,102641,102642,102643,102644,102645,102646,102648,102649,102650,102651,102652,102653,102654,102655,102656,102657,102658,102659,102660,102661,102662,102663,102664,102665,102666,102667,102668,102669,102670,102671,102672,102673,102674,102675,102676,102677,102678,102679,102680,102681,102682,102683,102684,102685,102686,102687,102688,102689,102690,102691,102692,102693,102694,102695,102696,102697,102698,102700,102704,102707,102708,102709,102710,102711,102712,102713,102714,102715,102716,102717,102718,102719,102720,102721,102722,102723,102724,102725,102726,102727,102728,102729,102730,102733,102734,102735,102736,102737,102738,102739,102740,102741,102742,102743,102744,102745,102746,102747,102748,102749,102750,102751,102752,102753,102754,102755,102756,102757,102758,102761,102766],f=[5614,5702,6130,6131,6132,6358,6359,6360],h=[115700,4326];function m(e){return y.includes(e)?"feet":"meters"}function g(e,t){return"number"==typeof e?f.includes(e)?"feet":"meters":m(t)}function v(e,t){return h.includes(e)||4326===t?"ellipsoidal":"gravity-related-height"}let b=class extends c.Z{get isAdvanced(){return!1}getInfo(){const{horizontalWKID:e,verticalWKID:t}=this;let r=e,i=t;const o=this;if(4===o.type){const{properties:e}=o;r=4326,i=e.verticalWKID}return{heightModel:v(r,i),heightUnit:g(i,r),horizontalUnit:m(r)}}};(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"affineTransformations",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"focalLength",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"principalOffsetPoint",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"radialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"tangentialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"horizontalWKID",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"verticalWKID",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"x",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"y",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"z",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],b.prototype,"type",void 0),b=(0,i._)([(0,l.j)("esri.layers.orientedImagery.core.CameraOrientation")],b);const w=b;let C=class extends((0,u.J)((0,d.eC)(w))){constructor(){super(...arguments),this.type=1}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:r,radialDistortionCoefficients:i,tangentialDistortionCoefficients:o}=this;return e?.length>1||!Number.isNaN(t)||r?.length>1||i?.length>1||o?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,heading:s,pitch:a,roll:l,affineTransformations:p,focalLength:u,principalOffsetPoint:d,radialDistortionCoefficients:c,tangentialDistortionCoefficients:y}=this,f=[e,t,r,i,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>f.push(e))),f.push(u),d?.forEach((e=>f.push(e))),c?.forEach((e=>f.push(e))),y?.forEach((e=>f.push(e)))),f.map((e=>Number.isNaN(e)?"":e)).join("|")}};(0,i._)([(0,s.Cb)({json:{write:!0}})],C.prototype,"type",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],C.prototype,"affineTransformations",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"focalLength",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],C.prototype,"principalOffsetPoint",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],C.prototype,"radialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],C.prototype,"tangentialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"heading",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"pitch",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"roll",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"horizontalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"verticalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"x",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"y",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],C.prototype,"z",void 0),C=(0,i._)([(0,l.j)("esri.layers.orientedImagery.core.CameraOrientationHPR")],C);const _=C;let S=class extends((0,u.J)((0,d.eC)(w))){constructor(){super(...arguments),this.type=2}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:r,radialDistortionCoefficients:i,tangentialDistortionCoefficients:o}=this;return e?.length>1||!Number.isNaN(t)||r?.length>1||i?.length>1||o?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,omega:s,phi:a,kappa:l,affineTransformations:p,focalLength:u,principalOffsetPoint:d,radialDistortionCoefficients:c,tangentialDistortionCoefficients:y}=this,f=[e,t,r,i,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>f.push(e))),f.push(u),d?.forEach((e=>f.push(e))),c?.forEach((e=>f.push(e))),y?.forEach((e=>f.push(e)))),f.map((e=>isNaN(e)?"":e)).join("|")}};(0,i._)([(0,s.Cb)({json:{write:!0}})],S.prototype,"type",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],S.prototype,"affineTransformations",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"focalLength",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],S.prototype,"principalOffsetPoint",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],S.prototype,"radialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],S.prototype,"tangentialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"omega",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"phi",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"kappa",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"horizontalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"verticalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"x",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"y",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],S.prototype,"z",void 0),S=(0,i._)([(0,l.j)("esri.layers.orientedImagery.core.CameraOrientationOPK")],S);const j=S;let T=class extends((0,u.J)((0,d.eC)(w))){constructor(){super(...arguments),this.type=3}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:r,radialDistortionCoefficients:i,tangentialDistortionCoefficients:o}=this;return e?.length>1||!Number.isNaN(t)||r?.length>1||i?.length>1||o?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:r,x:i,y:o,z:n,yaw:s,pitch:a,roll:l,affineTransformations:p,focalLength:u,principalOffsetPoint:d,radialDistortionCoefficients:c,tangentialDistortionCoefficients:y}=this,f=[e,t,r,i,o,n,s,a,l];return this.isAdvanced&&(p?.forEach((e=>f.push(e))),f.push(u),d?.forEach((e=>f.push(e))),d?.forEach((e=>f.push(e))),c?.forEach((e=>f.push(e))),y?.forEach((e=>f.push(e)))),f.map((e=>Number.isNaN(e)?"":e)).join("|")}};(0,i._)([(0,s.Cb)({json:{write:!0}})],T.prototype,"type",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],T.prototype,"affineTransformations",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"focalLength",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],T.prototype,"principalOffsetPoint",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],T.prototype,"radialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:[Number],json:{write:!0}})],T.prototype,"tangentialDistortionCoefficients",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"yaw",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"pitch",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"roll",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"horizontalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"verticalWKID",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"x",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"y",void 0),(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],T.prototype,"z",void 0),T=(0,i._)([(0,l.j)("esri.layers.orientedImagery.core.CameraOrientationYPR")],T);const F=T;r(96187);let x=class extends d.wq{constructor(){super(...arguments),this.url=null}};(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],x.prototype,"lod",void 0),(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],x.prototype,"rasterFunction",void 0),(0,i._)([(0,s.Cb)({type:String,json:{write:!0}})],x.prototype,"url",void 0),x=(0,i._)([(0,l.j)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ElevationSource")],x);let N=class extends d.wq{};var P;(0,i._)([(0,s.Cb)({type:Number,json:{write:!0}})],N.prototype,"constantElevation",void 0),N=(0,i._)([(0,l.j)("esri.layers.orientedImagery.cor.ElevationSourceDefinitions.ConstantElevation")],N),function(e){e[e.HPR=1]="HPR",e[e.OPK=2]="OPK",e[e.YPR=3]="YPR",e[e.LTP=4]="LTP"}(P||(P={}));const D=new n.X({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),I=new n.X({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique","":null}),O=new Map;O.set(`${P.OPK}`,{desc:"Using Omega Phi Kappa",constructor:j}),O.set(`${P.HPR}`,{desc:"Using Heading, Pitch and Roll",constructor:_}),O.set(`${P.YPR}`,{desc:"Using Yaw, Pitch and Roll",constructor:F});const R=new Map;function A(e,t,r){return{name:`orientedImageryProperties.${e}`,write:!t||{target:`orientedImageryProperties.${e}`,writer:t},origins:{service:{name:`orientedImageryInfo.orientedImageryProperties.${e}`,write:t,read:r}}}}R.set(`${P.HPR}`,(function(e){const[t,r,i,o,n,s,a,l,p,u,d,c,y,f,h,m,g,v,b,w,C,_,S]=e;return{type:t,horizontalWKID:r,verticalWKID:i,x:o,y:n,z:s,heading:a,pitch:l,roll:p,affineTransformations:[u,d,c,y,f,h],focalLength:m,principalOffsetPoint:[g,v],radialDistortionCoefficients:[b,w,C],tangentialDistortionCoefficients:[_,S]}})),R.set(`${P.YPR}`,(function(e){const[t,r,i,o,n,s,a,l,p,u,d,c,y,f,h,m,g,v,b,w,C,_,S]=e;return{type:t,horizontalWKID:r,verticalWKID:i,x:o,y:n,z:s,yaw:a,pitch:l,roll:p,affineTransformations:[u,d,c,y,f,h],focalLength:m,principalOffsetPoint:[g,v],radialDistortionCoefficients:[b,w,C],tangentialDistortionCoefficients:[_,S]}})),R.set(`${P.OPK}`,(function(e){const[t,r,i,o,n,s,a,l,p,u,d,c,y,f,h,m,g,v,b,w,C,_,S]=e;return{type:t,horizontalWKID:r,verticalWKID:i,x:o,y:n,z:s,omega:a,phi:l,kappa:p,affineTransformations:[u,d,c,y,f,h],focalLength:m,principalOffsetPoint:[g,v],radialDistortionCoefficients:[b,w,C],tangentialDistortionCoefficients:[_,S]}})),R.set(`${P.LTP}`,(function(e){const[t,r,i,o,n,s,...a]=e,l=R.get(s);return l?{type:t,latitude:r,longitude:i,ellipsoidRadius:o,squaredEccentricity:n,properties:l([s,"",...a])}:null}));let M=class extends p.default{constructor(){super(...arguments),this.cameraHeading=null,this.cameraHeight=null,this.cameraPitch=null,this.cameraRoll=null,this.coveragePercent=null,this.demPathPrefix=null,this.demPathSuffix=null,this.depthImagePathPrefix=null,this.depthImagePathSuffix=null,this.elevationSource=null,this.farDistance=null,this.geometryType="point",this.horizontalFieldOfView=null,this.horizontalMeasurementUnit=null,this.imagePathPrefix=null,this.imagePathSuffix=null,this.imageRotation=null,this.maximumDistance=null,this.nearDistance=null,this.operationalLayerType="OrientedImageryLayer",this.orientationAccuracy=null,this.orientedImageryType=null,this.type="oriented-imagery",this.timeIntervalUnit=null,this.verticalFieldOfView=null,this.verticalMeasurementUnit=null,this.videoPathPrefix=null,this.videoPathSuffix=null}get effectiveElevationSource(){const{elevationSource:e,demPathPrefix:t,demPathSuffix:r}=this;return function(e,t,r){return e?"constantElevation"in e?new N(e):function(e,t,r){let{url:i}=e;return i?(i=function(e,t,r){return t&&(e=`${t}${e}`),r&&(e+=`${r}`),e}(i,t,r),new x({...e,url:i})):null}(e,t,r):e}(e,t,r)}findFirstValidLayerId(e){return e.layers?.find((e=>"Oriented Imagery Layer"===e.type))?.id}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new o.Z("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};(0,i._)([(0,s.Cb)({type:Number,json:A("cameraHeading")})],M.prototype,"cameraHeading",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("cameraHeight")})],M.prototype,"cameraHeight",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("cameraPitch")})],M.prototype,"cameraPitch",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("cameraRoll")})],M.prototype,"cameraRoll",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("coveragePercent")})],M.prototype,"coveragePercent",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("demPathPrefix")})],M.prototype,"demPathPrefix",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("demPathSuffix")})],M.prototype,"demPathSuffix",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("depthImagePathPrefix")})],M.prototype,"depthImagePathPrefix",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("depthImagePathSuffix")})],M.prototype,"depthImagePathSuffix",void 0),(0,i._)([(0,s.Cb)({type:Object,json:A("elevationSource")})],M.prototype,"elevationSource",void 0),(0,i._)([(0,s.Cb)()],M.prototype,"effectiveElevationSource",null),(0,i._)([(0,s.Cb)({type:Number,json:A("farDistance")})],M.prototype,"farDistance",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],M.prototype,"geometryType",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("horizontalFieldOfView")})],M.prototype,"horizontalFieldOfView",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("horizontalMeasurementUnit")})],M.prototype,"horizontalMeasurementUnit",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("imagePathPrefix")})],M.prototype,"imagePathPrefix",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("imagePathSuffix")})],M.prototype,"imagePathSuffix",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("imageRotation")})],M.prototype,"imageRotation",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("maximumDistance")})],M.prototype,"maximumDistance",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("nearDistance")})],M.prototype,"nearDistance",void 0),(0,i._)([(0,s.Cb)({type:["OrientedImageryLayer"]})],M.prototype,"operationalLayerType",void 0),(0,i._)([(0,s.Cb)({json:A("orientationAccuracy",((e,t)=>{e&&(t.orientationAccuracy=e.join(","))}))}),(0,a.p)((e=>e?e.trim().split(",").map(Number):null))],M.prototype,"orientationAccuracy",void 0),(0,i._)([(0,s.Cb)({json:{...A("orientedImageryType",I.write,I.read),type:I.apiValues}})],M.prototype,"orientedImageryType",void 0),(0,i._)([(0,s.Cb)({json:{read:!1},value:"oriented-imagery",readOnly:!0})],M.prototype,"type",void 0),(0,i._)([(0,s.Cb)({json:{...A("timeIntervalUnit",D.write,D.read),type:D.apiValues}})],M.prototype,"timeIntervalUnit",void 0),(0,i._)([(0,s.Cb)({type:Number,json:A("verticalFieldOfView")})],M.prototype,"verticalFieldOfView",void 0),(0,i._)([(0,s.Cb)({json:{...A("verticalMeasurementUnit"),type:new n.X({Feet:"feet",Meter:"meter"}).apiValues}})],M.prototype,"verticalMeasurementUnit",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("videoPathPrefix")})],M.prototype,"videoPathPrefix",void 0),(0,i._)([(0,s.Cb)({type:String,json:A("videoPathSuffix")})],M.prototype,"videoPathSuffix",void 0),M=(0,i._)([(0,l.j)("esri.layers.OrientedImageryLayer")],M);const z=M},54295:(e,t,r)=>{r.d(t,{V:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,o.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),o=r(92604),n=r(5600),s=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,o.Z.getLogger(this)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,s.j)("esri.layers.mixins.ArcGISService")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,o.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,n.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>b});var i=r(43697),o=r(92604),n=r(95330),s=r(5600),a=r(90578),l=(r(67676),r(80442),r(52011)),p=r(82960),u=r(46791),d=(r(66643),r(20102),r(26258),r(87538));const c=new u.Z,y=new WeakMap;function f(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function h(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:h(t,e%t):0}let m=0,g=0;function v(){const e=Date.now();let t=!1;for(const r of c){const i=r.deref();i?i.refreshInterval&&e-(y.get(i)??0)+5>=6e4*i.refreshInterval&&(y.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,d.EH)((()=>{const e=Date.now();let t=0;for(const r of c){const i=r.deref();i&&(t=h(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?y.get(i)||y.set(i,e):y.delete(i))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(v,g)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||f(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{o.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,i._)([(0,s.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.C}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,a.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,s.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,s.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),o=r(2368),n=r(35454),s=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));const p=new n.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,o.J)(s.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,i._)([(0,a.Cb)({json:{read:p.read,write:p.write}})],u.prototype,"drawingTool",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i._)([(0,l.j)("esri.layers.support.FeatureTemplate")],u);const d=u},16451:(e,t,r)=>{r.d(t,{Z:()=>y});var i=r(43697),o=r(2368),n=r(96674),s=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),p=r(30556),u=r(72729),d=r(70082);let c=class extends((0,o.J)(n.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,u.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,s.Cb)({json:{write:!0}})],c.prototype,"id",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i._)([(0,a.r)("domains")],c.prototype,"readDomains",null),(0,i._)([(0,p.c)("domains")],c.prototype,"writeDomains",null),(0,i._)([(0,s.Cb)({type:[d.Z],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i._)([(0,l.j)("esri.layers.support.FeatureType")],c);const y=c},1231:(e,t,r)=>{r.d(t,{Z:()=>m});var i,o=r(43697),n=r(35454),s=r(96674),a=r(5600),l=r(75215),p=(r(67676),r(80442),r(36030)),u=r(71715),d=r(52011),c=r(72729),y=r(86719);const f=new n.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=i=class extends s.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?f.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,o._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,o._)([(0,a.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,u.r)("description")],h.prototype,"readDescription",null),(0,o._)([(0,a.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],h.prototype,"domain",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,o._)([(0,a.Cb)({type:l.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],h.prototype,"length",void 0),(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,o._)([(0,p.J)(y.v)],h.prototype,"type",void 0),(0,o._)([(0,a.Cb)()],h.prototype,"valueType",void 0),(0,o._)([(0,u.r)("valueType",["description"])],h.prototype,"readValueType",null),(0,o._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=i=(0,o._)([(0,d.j)("esri.layers.support.Field")],h);const m=h},99514:(e,t,r)=>{r.d(t,{Z:()=>l});var i=r(20102),o=r(96674),n=r(92604),s=r(69165),a=r(25031);class l{static fromJSON(e){return new l(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new l(e.fields??[],c(e))}static fromLayerJSON(e){return new l(e.fields??[],c(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=u(t);if(t&&i){const o=p(t);this._fieldsMap.set(t,e),this._fieldsMap.set(o,e),this._normalizedFieldsMap.set(i,e),r.push(`${o}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,s.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,s.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,s.Dl)(e)||(0,s.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,s.Dl)(e)||(0,s.Se)(e)||e.nullable||void 0!==(0,s.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(p(e))??this._normalizedFieldsMap.get(u(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.Z.getLogger("esri.layers.support.FieldsIndex").error(new i.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),a.pt):d.has(t.type)?a._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,s.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,o.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function p(e){return e.trim().toLowerCase()}function u(e){return(0,s.q6)(e)?.toLowerCase()??""}const d=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function c(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:o}=e,n=(i?"startField"in i?i.startField:i.startTimeField:"")??"",s=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,a.Jv)(e.dateFieldsTimeReference):null,u=o?function(e){return"timeZone"in e}(o)?o.timeZone??l:o.dateFieldsTimeReference?(0,a.Jv)(o.dateFieldsTimeReference):l??a.pt:null,c=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,a.Jv)(i.timeReference):l:null,y=new Map([[p(o?.creationDateField??""),u],[p(o?.editDateField??""),u],[p(n),c],[p(s),c]]);for(const{name:i,type:o}of e.fields)if(d.has(o))t.set(i,a._4);else if("date"!==o&&"esriFieldTypeDate"!==o)t.set(i,null);else if(r)t.set(i,a._4);else{const e=y.get(p(i??""))??l;t.set(i,e)}return t}},56765:(e,t,r)=>{r.d(t,{Z:()=>u});var i,o=r(43697),n=r(46791),s=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011));let p=i=class extends s.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.Z}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,o._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,o._)([(0,a.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=i=(0,o._)([(0,l.j)("esri.layers.support.LayerFloorInfo")],p);const u=p},72729:(e,t,r)=>{r.d(t,{im:()=>j,V5:()=>S}),r(80442);var i,o=r(43697),n=r(22974),s=r(5600),a=(r(75215),r(36030)),l=r(52011),p=r(96674);r(67676);let u=i=class extends p.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,o._)([(0,s.Cb)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=i=(0,o._)([(0,l.j)("esri.layers.support.CodedValue")],u);const d=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends p.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,a.J)(d)],c.prototype,"type",void 0),c=(0,o._)([(0,l.j)("esri.layers.support.Domain")],c);const y=c;var f;let h=f=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,o._)([(0,s.Cb)({type:[u],json:{write:!0}})],h.prototype,"codedValues",void 0),(0,o._)([(0,a.J)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=f=(0,o._)([(0,l.j)("esri.layers.support.CodedValueDomain")],h);const m=h;var g;r(92604),r(20102);let v=g=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,o._)([(0,a.J)({inherited:"inherited"})],v.prototype,"type",void 0),v=g=(0,o._)([(0,l.j)("esri.layers.support.InheritedDomain")],v);const b=v;var w;let C=w=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new w({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,s.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],C.prototype,"maxValue",void 0),(0,o._)([(0,s.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],C.prototype,"minValue",void 0),(0,o._)([(0,a.J)({range:"range"})],C.prototype,"type",void 0),C=w=(0,o._)([(0,l.j)("esri.layers.support.RangeDomain")],C);const _=C,S={key:"type",base:y,typeMap:{range:C,"coded-value":m,inherited:b}};function j(e){if(!e?.type)return null;switch(e.type){case"range":return _.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>i});const i=new(r(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},54275:(e,t,r)=>{r.d(t,{h:()=>d});var i=r(80442),o=r(66677);function n(e,t,r){return!!a(e,t,r)}function s(e,t,r){return a(e,t,r)}function a(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const l={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function p(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function d(e,t){return{analytics:c(e),attachment:y(e),data:f(e),metadata:h(e),operations:m(e.capabilities,e,t),query:g(e,t),queryRelated:v(e),queryTopFeatures:b(e),editing:w(e)}}function c(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function y(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:n(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=l[e.name];t&&(r[t]=!!e.isEnabled)})),r}function f(e){return{isVersioned:n(e,"isDataVersioned",!1),supportsAttachment:n(e,"hasAttachments",!1),supportsM:n(e,"hasM",!1),supportsZ:n(e,"hasZ",!1)}}function h(e){return{supportsAdvancedFieldProperties:n(e,"supportsFieldDescriptionProperty",!1)}}function m(e,t,r){const i=e?e.toLowerCase().split(",").map((e=>e.trim())):[],s=r?(0,o.Qc)(r):null,a=i.includes(null!=s&&"MapServer"===s.serverType?"data":"query"),l=i.includes("editing")&&!t.datesInUnknownTimezone;let p=l&&i.includes("create"),u=l&&i.includes("delete"),d=l&&i.includes("update");const c=i.includes("changetracking"),y=t.advancedQueryCapabilities;return l&&!(p||u||d)&&(p=u=d=!0),{supportsCalculate:n(t,"supportsCalculate",!1),supportsTruncate:n(t,"supportsTruncate",!1),supportsValidateSql:n(t,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:u,supportsEditing:l,supportsChangeTracking:c,supportsQuery:a,supportsQueryAnalytics:n(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:n(y,"supportsQueryAttachments",!1),supportsQueryTopFeatures:n(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:n(t,"supportsAttachmentsResizing",!1),supportsSync:i.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:n(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:n(t,"supportsAsyncConvert3D",!1)}}function g(e,t){const r=e.advancedQueryCapabilities,a=e.ownershipBasedAccessControlForFeatures,l=e.archivingInfo,d=e.currentVersion,c=t?.includes("MapServer"),y=!c||d>=(0,i.Z)("mapserver-pbf-version-support"),f=(0,o.M8)(t),h=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:n(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:n(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:n(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:p(r),supportsCentroid:n(r,"supportsReturningGeometryCentroid",!1),supportsDistance:n(r,"supportsQueryWithDistance",!1),supportsDistinct:n(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:n(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:n(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:n(r,"supportsHavingClause",!1),supportsOrderBy:n(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:n(r,"supportsPagination",!1),supportsQuantization:n(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:n(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:n(e,"supportsReturningQueryGeometry",!1),supportsResultType:n(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:n(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:n(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:n(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:n(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:n(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:n(a,"allowOthersToQuery",!0),supportsHistoricMoment:n(l,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:y&&h.has("pbf"),supportsDisjointSpatialRelationship:n(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:n(r,"supportsQueryWithCacheHint",!1)||u(r,"query"),supportsDefaultSpatialReference:n(r,"supportsDefaultSR",!1),supportsCompactGeometry:f,supportsFullTextSearch:n(r,"supportsFullTextSearch",!1),maxRecordCountFactor:s(e,"maxRecordCountFactor",void 0),maxRecordCount:s(e,"maxRecordCount",void 0),standardMaxRecordCount:s(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:s(e,"tileMaxRecordCount",void 0)}}function v(e){const t=e.advancedQueryCapabilities,r=n(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:n(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:u(t,"queryRelated")}}function b(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function w(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:n(e,"allowGeometryUpdates",!0),supportsGlobalId:n(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:n(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:n(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:n(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:n(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:n(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:n(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:n(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:n(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:n(r,"supportsAsyncApplyEdits",!1),zDefault:s(e,"zDefault",void 0)}}},28694:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(69285);function o(e,t,r){if(!r?.features||!r.hasZ)return;const o=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=o)for(const e of r.features)o(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var i,o=r(43697),n=r(66577),s=r(38171),a=r(35454),l=r(96674),p=r(22974),u=r(5600),d=(r(75215),r(71715)),c=r(52011),y=r(30556),f=r(82971),h=r(33955),m=r(1231);const g=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],n=s.Z.fromJSON(o),a=o.geometry?.spatialReference;null==n.geometry||a||(n.geometry.spatialReference=r);const l=o.aggregateGeometries,p=n.aggregateGeometries;if(l&&null!=p)for(const e in p){const t=p[e],i=l[e],o=i?.spatialReference;null==t||o||(t.spatialReference=r)}i.push(n)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,h.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=f.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,p.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,o]}=e,n=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=n.length;e<t;e++)s?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,o],scale:[n,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const p=this._getHydrationFunction(e,(e=>e*n+i),(e=>o-e*s),a,l);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,o;const n=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===i&&s===o||(n.push([e-i,s-o]),i=e,o=s)}else i=t(a[0]),o=r(a[1]),n.push([i,o])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,h.oU)(e)?e.rings:e.paths,o=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],s=this._quantizePoints(n,t,r);s&&o.push(s)}return o.length>0?((0,h.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,h.oU)(e)?e.rings:e.paths;let s,a;for(let e=0,i=n.length;e<i;e++){const i=n[e];for(let e=0,o=i.length;e<o;e++){const o=i[e];e>0?(s+=o[0],a+=o[1]):(s=o[0],a=o[1]),o[0]=t(s),o[1]=r(a)}}if(i&&o)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let s,a;for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}if(i&&o)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}else if(o)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,u.Cb)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,u.Cb)({type:[s.Z],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,d.r)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,u.Cb)({type:[m.Z],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,u.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,y.c)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,u.Cb)({types:n.qM,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,d.r)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,u.Cb)({type:f.Z,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,y.c)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,u.Cb)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,o._)([(0,c.j)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const b=v},58333:(e,t,r)=>{r.d(t,{ET:()=>n,I4:()=>o,eG:()=>l,lF:()=>s,lj:()=>u,qP:()=>a,wW:()=>p});const i=[252,146,31,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},s={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},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2934,5732],{84552:(e,t,r)=>{r.d(t,{Z:()=>c});var s=r(43697),i=r(2368),n=r(96674),o=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),d=r(78981);let p=class extends((0,i.J)(n.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.rJ)(this.value,this.unit,"milliseconds")}};(0,s._)([(0,a.J)(d.v,{nonNullable:!0})],p.prototype,"unit",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,s._)([(0,u.j)("esri.TimeInterval")],p);const c=p},5732:(e,t,r)=>{r.d(t,{c:()=>s,g:()=>i});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},64830:(e,t,r)=>{r.d(t,{Z:()=>n});var s=r(58971),i=r(10661);class n{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new i.s,this._items=new Set}get length(){return(0,s.it)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.it)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.it)(this._observable),yield*this._items}}},22862:(e,t,r)=>{r.d(t,{Hg:()=>y,V7:()=>h,uD:()=>c});var s=r(92036),i=r(46791),n=r(1153);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof s.Z}function a(e){return e instanceof i.Z?Object.keys(e.items):l(e)?(0,n.vw)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof i.Z?e.items[t]:e[t]}function d(e){return e?e.declaredClass:null}function p(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const s=a(e),i=a(t);if(0===s.length&&0===i.length)return;if(!s.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=i.filter((e=>!s.includes(e))),c=s.filter((e=>!i.includes(e))),h=s.filter((r=>i.includes(r)&&u(e,r)!==u(t,r))).concat(n,c).sort(),y=d(e);if(y&&o.has(y)&&h.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=l(e)&&l(t);for(const s of h){const i=u(e,s),n=u(t,s);let o;if((m||"function"!=typeof i&&"function"!=typeof n)&&i!==n&&(null!=i||null!=n)){if(r&&r[s]&&"function"==typeof r[s])o=r[s]?.(i,n);else if(i instanceof Date&&n instanceof Date){if(i.getTime()===n.getTime())continue;o={type:"complete",oldValue:i,newValue:n}}else o="object"==typeof i&&"object"==typeof n&&d(i)===d(n)?p(i,n):{type:"complete",oldValue:i,newValue:n};null!=o&&(null!=f?f.diff[s]=o:f={type:"partial",diff:{[s]:o}})}}return f}function c(e,t){if(null==e)return!1;const r=t.split(".");let s=e;for(const e of r){if("complete"===s.type)return!0;if("partial"!==s.type)return!1;{const t=s.diff[e];if(!t)return!1;s=t}}return!0}function h(e,t){for(const r of t)if(c(e,r))return!0;return!1}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&d(e)!==d(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},80903:(e,t,r)=>{r.d(t,{Z:()=>u});var s=r(50758),i=r(92604),n=r(95330),o=r(64830),l=r(18948),a=r(728);class u{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new o.Z}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,s)=>{let i=!0;const o=e=>{(0,n.k_)(t.signal),i&&(i=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let i=0;i<e.length;++i){const l=e[i];(0,n.y8)(l)?this._clientPromises[i]=l.then((e=>(this._clients[i]=new a.default(e,t,this._ongoingJobsQueue),o(r),this._clients[i])),(()=>(o(s),null))):(this._clients[i]=new a.default(l,t,this._ongoingJobsQueue),this._clientPromises[i]=Promise.resolve(this._clients[i]),o(r))}}))}broadcast(e,t,r){const s=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const n=this._clientPromises[i];s[i]=n.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,n.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,l.E)(this)}invoke(e,t,r){let s;Array.isArray(r)?(i.Z.getLogger("esri.core.workers.Connection").warn("invoke()","The transferList parameter is deprecated, use the options object instead"),s={transferList:r}):s=r;const o=(0,n.hh)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:s,resolver:o});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return o.promise}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.AL)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((i=>{i&&(t[s]=i.openPort()),0==--r&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},18948:(e,t,r)=>{r.d(t,{E:()=>n,z:()=>i});const s=new FinalizationRegistry((e=>{e.close()}));function i(e,t){s.register(e,t,t)}function n(e){s.unregister(e)}},56569:(e,t,r)=>{r.d(t,{bA:()=>V});var s=r(20102),i=r(80442),n=r(95330),o=r(80903),l=r(18948),a=r(728),u=r(92604),d=r(70586),p=r(3172),c=r(17452);const h={async request(e,t){const r=e.options,s=r.responseType;r.signal=t?.signal,r.responseType="native"===s||"native-request-init"===s?"native-request-init":s&&["blob","json","text"].includes(s)&&(0,c.oh)(e.url)?.after?s:"array-buffer";const i=await(0,p.Z)(e.url,r),n={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete n.data.signal,n;case"blob":n.data=await n.data.arrayBuffer();break;case"json":n.data=(new TextEncoder).encode(JSON.stringify(n.data)).buffer;break;case"text":n.data=(new TextEncoder).encode(n.data).buffer}return{result:n,transferList:[n.data]}}};var y=r(94362),f=r(99880),m=r(68773),g=(r(2587),r(40330));const b={};var w=r(41213);class v{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class _{constructor(){this._dispatcher=new v,this._workerPostMessage({type:y.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,w.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,w.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,y.QM)(e);if(t&&t.type===y.MessageType.OPEN){const{modulePath:e,jobId:r}=t;let s=await a.default.loadWorker(e);s||(s=await import(e));const i=a.default.connect(s);this._workerPostMessage({type:y.MessageType.OPENED,jobId:r,data:i})}}}var S=r(70171),F=r(17202);const C=u.Z.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:E}=y.MessageType;let T,x;const j="Failed to create Worker. Fallback to execute module in main thread";async function I(e){return new Promise((t=>{function r(i){const n=(0,y.QM)(i);n&&n.type===E&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),C.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new _).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let O=0;const{ABORT:N,INVOKE:k,OPEN:R,OPENED:P,RESPONSE:Z}=y.MessageType;class M{static async create(e){const t=await async function(){if(!(0,i.Z)("esri-workers"))return I(new _);if(!T&&!x)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=m.default.default){const t={...m.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(m.default));e.assetsPath=(0,c.hF)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,c.hF)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,S.Kd)(),e.has={"esri-csp-restrictions":(0,i.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.Z)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.Z)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,i.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,i.Z)("esri-atomics"),"esri-shared-array-buffer":(0,i.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.Z)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,c.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,c.hF)(e.workers.workerPath):e.workers.workerPath=(0,c.hF)((0,f.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=m.default.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=b.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,S.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:F.r,fullVersion:g.bR,revision:F.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}()}'`);T=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){x=e||{}}let e;if(T)try{e=new Worker(T,{name:"esri-worker-"+O++})}catch(t){C.warn(j,x),e=new _}else C.warn(j,x),e=new _;return I(e)}();return new M(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),u.Z.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,y.jt)();return new Promise(((t,i)=>{const o={resolve:t,reject:i,abortHandle:(0,n.$F)(r,(()=>{this._outJobs.delete(s),this._post({type:N,jobId:s})}))};this._outJobs.set(s,o),this._post({type:R,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,y.QM)(e);if(t)switch(t.type){case P:this._onOpenedMessage(t);break;case Z:this._onResponseMessage(t);break;case N:this._onAbortMessage(t);break;case k:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:i}=e,o=i?new AbortController:null,l=this._inJobs,a=h[t];let u;try{if("function"!=typeof a)throw new TypeError(`${t} is not a function`);u=a.call(null,s,{signal:o?o.signal:null})}catch(e){return void this._post({type:Z,jobId:r,error:(0,y.AB)(e)})}(0,n.y8)(u)?(l.set(r,{controller:o,promise:u}),u.then((e=>{l.has(r)&&(l.delete(r),this._post({type:Z,jobId:r},e))}),(e=>{l.has(r)&&(l.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.D_)(e)||this._post({type:Z,jobId:r,error:(0,y.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:Z,jobId:r},u)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,d.hw)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:i}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,d.hw)(n.abortHandle),r?n.reject(s.Z.fromJSON(JSON.parse(r))):n.resolve(i))}_post(e,t,r){return(0,y.oi)(this.worker,e,t,r)}}const J=(0,i.Z)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.Z)("workers-pool-size")):0;let D=(0,i.Z)("esri-mobile")?Math.min(J,3):J;D||(D=(0,i.Z)("safari")&&(0,i.Z)("mac")?7:2);let A=0;const L=[];async function q(e,t){const r=new o.Z,{registryTarget:s,...i}=t;return await r.open(e,i),s&&(0,l.z)(s,r),r}async function V(e,t={}){if("string"!=typeof e)throw new s.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.Z)("host-webworker")&&!(0,i.Z)("esri-workers")&&(r="local"),"local"===r){let r=await a.default.loadWorker(e);r||(r=await import(e)),(0,n.k_)(t.signal);const s=t.client||r;return q([a.default.connect(r)],{...t,client:s})}if(await async function(){if(z)return z;U=new AbortController;const e=[];for(let t=0;t<D;t++){const r=M.create(t).then((e=>(L[t]=e,e)));e.push(r)}return z=Promise.all(e),z}(),(0,n.k_)(t.signal),"dedicated"===r){const r=A++%D;return q([await L[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,D);if(r<D){const s=new Array(r);for(let i=0;i<r;++i){const r=A++%D;s[i]=L[r].open(e,t)}return q(s,t)}}return q(L.map((r=>r.open(e,t))),t)}let U,z=null},60437:(e,t,r)=>{r.d(t,{G_:()=>b,HH:()=>o,JR:()=>y,TC:()=>l,Tn:()=>p,Ue:()=>i,al:()=>n,bZ:()=>f,cS:()=>h,dp:()=>u,fS:()=>g,is:()=>m,op:()=>d,pp:()=>a,t8:()=>c});var s=r(6570);function i(e=w){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,s,n,o,l=i()){return l[0]=e,l[1]=t,l[2]=r,l[3]=s,l[4]=n,l[5]=o,l}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new s.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function p(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function c(e,t){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}function h(e){return e?c(e,b):i(b)}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function f(e,t,r,s,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=s,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function m(e){return 6===e.length}function g(e,t,r){if(null==e||null==t)return e===t;if(!m(e)||!m(t))return!1;if(r){for(let s=0;s<e.length;s++)if(!r(e[s],t[s]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const b=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];i()},23477:(e,t,r)=>{r.r(t),r.d(t,{default:()=>G});var s=r(43697),i=(r(66577),r(51773)),n=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),o=r(16453),l=r(95330),a=r(17452),u=r(5600),d=(r(75215),r(67676),r(80442)),p=r(52011),c=r(86973),h=r(87085),y=r(20102),f=r(83379),m=r(92604),g=r(56569),b=r(25278),w=r(74889),v=r(6570),_=r(38913);let S=class extends f.Z{constructor(){super(...arguments),this.type="geojson",this.refresh=(0,l.Ds)((async e=>{await this.load();const{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}queryFeatures(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t))).then((e=>w.Z.fromJSON(e)))}queryFeaturesJSON(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t)))}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:v.Z.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}_applyEdits(e){if(!this._connection)throw new y.Z("geojson-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=[],s=[],i=[];if(e.addFeatures)for(const t of e.addFeatures)r.push(this._serializeFeature(t));if(e.deleteFeatures)for(const r of e.deleteFeatures)"objectId"in r&&null!=r.objectId?s.push(r.objectId):"attributes"in r&&null!=r.attributes[t]&&s.push(r.attributes[t]);if(e.updateFeatures)for(const t of e.updateFeatures)i.push(this._serializeFeature(t));return this._connection.invoke("applyEdits",{adds:r,updates:i,deletes:s}).then((({extent:e,timeExtent:t,featureEditResults:r})=>(this.sourceJSON.extent=e,t&&(this.sourceJSON.timeInfo.timeExtent=[t.start,t.end]),this._createEditsResult(r))))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new y.Z("geojson-layer-source:edit-failure",t.description,{code:t.code}):null}}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e);return r?{geometry:r.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:"mesh"===t.type||"extent"===t.type?_.Z.fromExtent(t.extent):t}async _startWorker(e){this._connection=await(0,g.bA)("GeoJSONSourceWorker",{strategy:(0,d.Z)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:r,hasZ:s,geometryType:i,objectIdField:n,url:o,timeInfo:l,customParameters:a}=this.layer,u="defaults"===this.layer.originOf("spatialReference"),p={url:o,customParameters:a,fields:t&&t.map((e=>e.toJSON())),geometryType:c.M.toJSON(i),hasZ:s,objectIdField:n,timeInfo:l?l.toJSON():null,spatialReference:u?null:r&&r.toJSON()},h=await this._connection.invoke("load",p,{signal:e});for(const e of h.warnings)m.Z.getLogger(this.layer).warn("#load()",`$${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});h.featureErrors.length&&m.Z.getLogger(this.layer).warn("#load()",`Encountered ${h.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:h.featureErrors}),this.sourceJSON=h.layerDefinition,this.capabilities=(0,b.MS)(this.sourceJSON.hasZ,!0)}};(0,s._)([(0,u.Cb)()],S.prototype,"capabilities",void 0),(0,s._)([(0,u.Cb)()],S.prototype,"type",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],S.prototype,"layer",void 0),(0,s._)([(0,u.Cb)()],S.prototype,"sourceJSON",void 0),S=(0,s._)([(0,p.j)("esri.layers.graphics.sources.GeoJSONSource")],S);var F=r(71612),C=r(17017),E=r(69637),T=r(6404),x=r(38009),j=r(68825),I=r(16859),O=r(34760),N=r(72965),k=r(28294),R=r(21506),P=r(70082),Z=r(16451),M=r(1231),J=r(53518),D=r(69165),A=r(54306),L=r(30707),q=r(14165),V=r(32163),U=r(25031),z=r(82971);const B=(0,J.v)();let H=class extends((0,j.c)((0,C.N)((0,T.M)((0,E.b)((0,F.h)((0,k.n)((0,N.M)((0,O.Q)((0,x.q)((0,I.I)((0,o.R)(h.Z)))))))))))){constructor(e){super(e),this.copyright=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new S({layer:this}),this.spatialReference=z.Z.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson",this.typeIdField=null,this.types=null}destroy(){this.source?.destroy()}load(e){const t=this.loadFromPortal({supportedTypes:["GeoJson"],supportsData:!1},e).catch(l.r9).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo"],"service"),(0,D.YN)(this.renderer,this.fieldsIndex),(0,D.UF)(this.timeInfo,this.fieldsIndex)}));return this.addResolvingPromise(t),Promise.resolve(this)}get capabilities(){return this.source?this.source.capabilities:null}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&null==this.geometryType}get parsedUrl(){return this.url?(0,a.mN)(this.url):null}set renderer(e){(0,D.YN)(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);const t=(0,a.mN)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){const{applyEdits:s}=await r.e(4720).then(r.bind(r,14720));await this.load();const i=await s(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),i}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,V.eZ)(this,e)}createQuery(){const e=new q.Z,t=this.capabilities?.data;e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:r,timeExtent:s}=this;return e.timeExtent=null!=r&&null!=s?s.offset(-r.value,r.unit):s||null,e}getFieldDomain(e,t){let r,s=!1;const i=t?.feature,n=i?.attributes,o=this.typeIdField&&n?.[this.typeIdField];return null!=o&&this.types&&(s=this.types.some((t=>t.id==o&&(r=t.domains&&t.domains[e],r&&"inherited"===r.type&&(r=this._getLayerDomain(e)),!0)))),s||r||(r=this._getLayerDomain(e)),r}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(q.Z.from(e)||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(q.Z.from(e)||this.createQuery(),t)))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(q.Z.from(e)||this.createQuery(),t)))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(q.Z.from(e)||this.createQuery(),t)))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}_getLayerDomain(e){if(!this.fields)return null;let t=null;return this.fields.some((r=>(r.name===e&&(t=r.domain),!!t))),t}};(0,s._)([(0,u.Cb)({readOnly:!0,json:{read:!1,write:!1}})],H.prototype,"capabilities",null),(0,s._)([(0,u.Cb)({type:String})],H.prototype,"copyright",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],H.prototype,"createQueryVersion",null),(0,s._)([(0,u.Cb)((0,U.mi)("dateFieldsTimeReference"))],H.prototype,"dateFieldsTimeZone",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],H.prototype,"defaultPopupTemplate",null),(0,s._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],H.prototype,"definitionExpression",void 0),(0,s._)([(0,u.Cb)({type:String})],H.prototype,"displayField",void 0),(0,s._)([(0,u.Cb)({type:Boolean})],H.prototype,"editingEnabled",void 0),(0,s._)([(0,u.Cb)(R.PV)],H.prototype,"elevationInfo",void 0),(0,s._)([(0,u.Cb)({type:[M.Z],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],H.prototype,"fields",void 0),(0,s._)([(0,u.Cb)(B.fieldsIndex)],H.prototype,"fieldsIndex",void 0),(0,s._)([(0,u.Cb)({type:v.Z,json:{name:"extent"}})],H.prototype,"fullExtent",void 0),(0,s._)([(0,u.Cb)({type:["point","polygon","polyline","multipoint"],json:{read:{reader:c.M.read}}})],H.prototype,"geometryType",void 0),(0,s._)([(0,u.Cb)({type:Boolean})],H.prototype,"hasZ",void 0),(0,s._)([(0,u.Cb)(R.id)],H.prototype,"id",void 0),(0,s._)([(0,u.Cb)({type:Boolean,readOnly:!0})],H.prototype,"isTable",null),(0,s._)([(0,u.Cb)(R.iR)],H.prototype,"labelsVisible",void 0),(0,s._)([(0,u.Cb)({type:[A.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:L.r},write:!0}})],H.prototype,"labelingInfo",void 0),(0,s._)([(0,u.Cb)(R.rn)],H.prototype,"legendEnabled",void 0),(0,s._)([(0,u.Cb)({type:["show","hide"]})],H.prototype,"listMode",void 0),(0,s._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],H.prototype,"objectIdField",void 0),(0,s._)([(0,u.Cb)(R.Oh)],H.prototype,"opacity",void 0),(0,s._)([(0,u.Cb)({type:["GeoJSON"]})],H.prototype,"operationalLayerType",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],H.prototype,"parsedUrl",null),(0,s._)([(0,u.Cb)(R.C_)],H.prototype,"popupEnabled",void 0),(0,s._)([(0,u.Cb)({type:i.Z,json:{name:"popupInfo",write:!0}})],H.prototype,"popupTemplate",void 0),(0,s._)([(0,u.Cb)({types:n.A,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:n.o}}}})],H.prototype,"renderer",null),(0,s._)([(0,u.Cb)(R.YI)],H.prototype,"screenSizePerspectiveEnabled",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],H.prototype,"source",void 0),(0,s._)([(0,u.Cb)({type:z.Z})],H.prototype,"spatialReference",void 0),(0,s._)([(0,u.Cb)({type:[P.Z]})],H.prototype,"templates",void 0),(0,s._)([(0,u.Cb)()],H.prototype,"title",void 0),(0,s._)([(0,u.Cb)({json:{read:!1},readOnly:!0})],H.prototype,"type",void 0),(0,s._)([(0,u.Cb)({type:String,readOnly:!0})],H.prototype,"typeIdField",void 0),(0,s._)([(0,u.Cb)({type:[Z.Z]})],H.prototype,"types",void 0),(0,s._)([(0,u.Cb)(R.HQ)],H.prototype,"url",null),H=(0,s._)([(0,p.j)("esri.layers.GeoJSONLayer")],H);const G=H},61159:(e,t,r)=>{r.d(t,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},25278:(e,t,r)=>{r.d(t,{Dm:()=>d,Hq:()=>p,MS:()=>c,bU:()=>l});var s=r(80442),i=r(22974),n=r(61159),o=r(58333);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.I4:"esriGeometryPolyline"===e?o.ET:o.lF}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function d(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${a.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.d9)(e)}}]}function c(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:n.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}}}},17017:(e,t,r)=>{r.d(t,{N:()=>o});var s=r(43697),i=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,s._)([(0,n.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},69637:(e,t,r)=>{r.d(t,{b:()=>x});var s,i=r(43697),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),l=r(20102),a=r(96674),u=r(78286),d=r(72746),p=r(66577),c=r(92835),h=r(35454),y=r(22974),f=r(14165);const m=new h.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new h.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let b=s=class extends a.wq{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:s,timeExtent:i,objectIds:n,units:o,distance:l}=this;return new f.Z({geometry:(0,y.d9)(r),objectIds:(0,y.d9)(n),spatialRelationship:s,timeExtent:(0,y.d9)(i),where:t,units:o,distance:l,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:i,objectIds:n,units:o,distance:l}=this;return new s({geometry:(0,y.d9)(t),objectIds:(0,y.d9)(n),spatialRelationship:r,timeExtent:(0,y.d9)(i),where:e,units:o,distance:l})}};(0,i._)([(0,n.Cb)({type:String,json:{write:!0}})],b.prototype,"where",void 0),(0,i._)([(0,n.Cb)({types:p.qM,json:{write:!0}})],b.prototype,"geometry",void 0),(0,i._)([(0,n.Cb)({type:m.apiValues,json:{name:"spatialRel",read:{reader:m.read},write:{allowNull:!1,writer:m.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],b.prototype,"spatialRelationship",void 0),(0,i._)([(0,n.Cb)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],b.prototype,"distance",void 0),(0,i._)([(0,n.Cb)({type:[Number],json:{write:!0}})],b.prototype,"objectIds",void 0),(0,i._)([(0,n.Cb)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],b.prototype,"units",void 0),(0,i._)([(0,n.Cb)({type:c.Z,json:{write:!0}})],b.prototype,"timeExtent",void 0),b=s=(0,i._)([(0,o.j)("esri.layers.support.FeatureFilter")],b);const w=b;var v;const _={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},S={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},F={name:"showExcludedLabels",default:!0};let C=v=class extends a.wq{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new v({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,i._)([(0,n.Cb)({type:w,json:{write:{allowNull:!0,writer(e,t,r,s){const i=e?.write({},s);i&&0!==Object.keys(i).length?(0,u.RB)(r,i,t):(0,u.RB)(r,null,t)}}}})],C.prototype,"filter",void 0),(0,i._)([(0,n.Cb)({json:{write:!0,origins:{"web-map":_,"portal-item":_}}})],C.prototype,"includedEffect",void 0),(0,i._)([(0,n.Cb)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],C.prototype,"excludedEffect",void 0),(0,i._)([(0,n.Cb)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":F,"portal-item":F}}})],C.prototype,"excludedLabelsVisible",void 0),C=v=(0,i._)([(0,o.j)("esri.layers.support.FeatureEffect")],C);const E=C,T={write:{allowNull:!0}},x=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,i._)([(0,n.Cb)({type:E,json:{origins:{"web-map":T,"portal-item":T}}})],t.prototype,"featureEffect",void 0),t=(0,i._)([(0,o.j)("esri.layers.mixins.FeatureEffectLayer")],t),t}},68825:(e,t,r)=>{r.d(t,{c:()=>f});var s,i=r(43697),n=r(78286),o=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),a=r(35454),u=r(96674);const d=new a.X({asc:"ascending",desc:"descending"});let p=s=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],p.prototype,"valueExpression",void 0),(0,i._)([(0,o.Cb)({type:d.apiValues,json:{read:d.read,write:d.write}})],p.prototype,"order",void 0),p=s=(0,i._)([(0,l.j)("esri.layers.support.OrderByInfo")],p);const c=p;function h(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const i=new c;return i.read(s,r),[i]}function y(e,t,r,s){const i=e.find((e=>!!e.field));i&&(0,n.RB)(r,[i.toJSON()],t)}const f=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,o.Cb)({type:[c],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:h},write:{target:"layerDefinition.orderBy",writer:y}}})],t.prototype,"orderBy",void 0),t=(0,i._)([(0,l.j)("esri.layers.mixins.OrderedLayer")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>w});var s=r(43697),i=r(92604),n=r(95330),o=r(5600),l=r(90578),a=(r(67676),r(80442),r(52011)),u=r(82960),d=r(46791),p=(r(66643),r(20102),r(26258),r(87538));const c=new d.Z,h=new WeakMap;function y(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let m=0,g=0;function b(){const e=Date.now();let t=!1;for(const r of c){const s=r.deref();s?s.refreshInterval&&e-(h.get(s)??0)+5>=6e4*s.refreshInterval&&(h.set(s,e),s.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,p.EH)((()=>{const e=Date.now();let t=0;for(const r of c){const s=r.deref();s&&(t=f(Math.round(6e4*s.refreshInterval),t),s.refreshInterval?h.get(s)||h.set(s,e):h.delete(s))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(b,g)}}));const w=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||y(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,s._)([(0,o.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"refreshInterval",void 0),(0,s._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,s._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,s._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>c});var s=r(43697),i=r(92835),n=r(84552),o=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(69165),d=r(76259),p=r(78981);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const s=r.timeOffset,i=p.v.fromJSON(r.timeOffsetUnits);return s&&i?new n.Z({value:s,unit:i}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,s._)([(0,o.Cb)({type:i.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,s._)([(0,o.Cb)({type:n.Z})],t.prototype,"timeOffset",void 0),(0,s._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,s._)([(0,o.Cb)({value:null,type:d.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,s._)([(0,o.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,s._)([(0,a.j)("esri.layers.mixins.TemporalLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>p});var s=r(43697),i=r(2368),n=r(35454),o=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));const u=new n.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let d=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,s._)([(0,l.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,l.Cb)({json:{write:!0}})],d.prototype,"description",void 0),(0,s._)([(0,l.Cb)({json:{read:u.read,write:u.write}})],d.prototype,"drawingTool",void 0),(0,s._)([(0,l.Cb)({json:{write:!0}})],d.prototype,"prototype",void 0),(0,s._)([(0,l.Cb)({json:{write:!0}})],d.prototype,"thumbnail",void 0),d=(0,s._)([(0,a.j)("esri.layers.support.FeatureTemplate")],d);const p=d},16451:(e,t,r)=>{r.d(t,{Z:()=>h});var s=r(43697),i=r(2368),n=r(96674),o=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(30556),d=r(72729),p=r(70082);let c=class extends((0,i.J)(n.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,d.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,s._)([(0,o.Cb)({json:{write:!0}})],c.prototype,"id",void 0),(0,s._)([(0,o.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,o.Cb)({json:{write:!0}})],c.prototype,"domains",void 0),(0,s._)([(0,l.r)("domains")],c.prototype,"readDomains",null),(0,s._)([(0,u.c)("domains")],c.prototype,"writeDomains",null),(0,s._)([(0,o.Cb)({type:[p.Z],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,s._)([(0,a.j)("esri.layers.support.FeatureType")],c);const h=c},1231:(e,t,r)=>{r.d(t,{Z:()=>m});var s,i=r(43697),n=r(35454),o=r(96674),l=r(5600),a=r(75215),u=(r(67676),r(80442),r(36030)),d=r(71715),p=r(52011),c=r(72729),h=r(86719);const y=new n.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=s=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?y.fromJSON(r.fieldValueType):null}clone(){return new s({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,i._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,i._)([(0,l.Cb)()],f.prototype,"description",void 0),(0,i._)([(0,d.r)("description")],f.prototype,"readDescription",null),(0,i._)([(0,l.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],f.prototype,"domain",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,i._)([(0,l.Cb)({type:a.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,i._)([(0,u.J)(h.v)],f.prototype,"type",void 0),(0,i._)([(0,l.Cb)()],f.prototype,"valueType",void 0),(0,i._)([(0,d.r)("valueType",["description"])],f.prototype,"readValueType",null),(0,i._)([(0,l.Cb)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=s=(0,i._)([(0,p.j)("esri.layers.support.Field")],f);const m=f},99514:(e,t,r)=>{r.d(t,{Z:()=>a});var s=r(20102),i=r(96674),n=r(92604),o=r(69165),l=r(25031);class a{static fromJSON(e){return new a(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new a(e.fields??[],c(e))}static fromLayerJSON(e){return new a(e.fields??[],c(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,s=d(t);if(t&&s){const i=u(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(s,e),r.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,o.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,o.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,o.Dl)(e)||(0,o.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,o.Dl)(e)||(0,o.Se)(e)||e.nullable||void 0!==(0,o.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(u(e))??this._normalizedFieldsMap.get(d(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.Z.getLogger("esri.layers.support.FieldsIndex").error(new s.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),l.pt):p.has(t.type)?l._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,o.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,i.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function u(e){return e.trim().toLowerCase()}function d(e){return(0,o.q6)(e)?.toLowerCase()??""}const p=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function c(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:s,editFieldsInfo:i}=e,n=(s?"startField"in s?s.startField:s.startTimeField:"")??"",o=(s?"endField"in s?s.endField:s.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,l.Jv)(e.dateFieldsTimeReference):null,d=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.dateFieldsTimeReference?(0,l.Jv)(i.dateFieldsTimeReference):a??l.pt:null,c=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.timeReference?(0,l.Jv)(s.timeReference):a:null,h=new Map([[u(i?.creationDateField??""),d],[u(i?.editDateField??""),d],[u(n),c],[u(o),c]]);for(const{name:s,type:i}of e.fields)if(p.has(i))t.set(s,l._4);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(s,null);else if(r)t.set(s,l._4);else{const e=h.get(u(s??""))??a;t.set(s,e)}return t}},76259:(e,t,r)=>{r.d(t,{Z:()=>f});var s=r(43697),i=r(92835),n=r(84552),o=r(2368),l=r(96674),a=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),d=r(52011),p=r(30556),c=r(25031);function h(e,t){return n.Z.fromJSON({value:e,unit:t})}let y=class extends((0,o.J)(l.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),s=new Date(t.timeExtent[1]);return new i.Z({start:r,end:s})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,s._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,s._)([(0,a.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,s._)([(0,a.Cb)({type:i.Z,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,s._)([(0,u.r)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,s._)([(0,p.c)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,s._)([(0,a.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,s._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,s._)([(0,p.c)("interval")],y.prototype,"writeInterval",null),(0,s._)([(0,a.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,s._)([(0,a.Cb)((0,c.mi)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),y=(0,s._)([(0,d.j)("esri.layers.support.TimeInfo")],y);const f=y},72729:(e,t,r)=>{r.d(t,{im:()=>C,V5:()=>F}),r(80442);var s,i=r(43697),n=r(22974),o=r(5600),l=(r(75215),r(36030)),a=r(52011),u=r(96674);r(67676);let d=s=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new s({name:this.name,code:this.code})}};(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],d.prototype,"code",void 0),d=s=(0,i._)([(0,a.j)("esri.layers.support.CodedValue")],d);const p=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,l.J)(p)],c.prototype,"type",void 0),c=(0,i._)([(0,a.j)("esri.layers.support.Domain")],c);const h=c;var y;let f=y=class extends h{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,i._)([(0,o.Cb)({type:[d],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,i._)([(0,l.J)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=y=(0,i._)([(0,a.j)("esri.layers.support.CodedValueDomain")],f);const m=f;var g;r(92604),r(20102);let b=g=class extends h{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,i._)([(0,l.J)({inherited:"inherited"})],b.prototype,"type",void 0),b=g=(0,i._)([(0,a.j)("esri.layers.support.InheritedDomain")],b);const w=b;var v;let _=v=class extends h{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new v({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],_.prototype,"maxValue",void 0),(0,i._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],_.prototype,"minValue",void 0),(0,i._)([(0,l.J)({range:"range"})],_.prototype,"type",void 0),_=v=(0,i._)([(0,a.j)("esri.layers.support.RangeDomain")],_);const S=_,F={key:"type",base:h,typeMap:{range:_,"coded-value":m,inherited:w}};function C(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>s});const s=new(r(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},78981:(e,t,r)=>{r.d(t,{v:()=>s});const s=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},74889:(e,t,r)=>{r.d(t,{Z:()=>w});var s,i=r(43697),n=r(66577),o=r(38171),l=r(35454),a=r(96674),u=r(22974),d=r(5600),p=(r(75215),r(71715)),c=r(52011),h=r(30556),y=r(82971),f=r(33955),m=r(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=s=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=y.Z.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const i=e[t],n=o.Z.fromJSON(i),l=i.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=r);const a=i.aggregateGeometries,u=n.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],s=a[e],i=s?.spatialReference;null==t||i||(t.spatialReference=r)}s.push(n)}return s}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.im)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=y.Z.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[n,o]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+s),(e=>i-e*o),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,i;const n=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=r(l[1]);e===s&&o===i||(n.push([e-s,o-i]),s=e,i=o)}else s=t(l[0]),i=r(l[1]),n.push([s,i])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.oU)(e)?e.rings:e.paths,i=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],o=this._quantizePoints(n,t,r);o&&i.push(o)}return i.length>0?((0,f.oU)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.oU)(e)?e.rings:e.paths;let o,l;for(let e=0,s=n.length;e<s;e++){const s=n[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],l+=i[1]):(o=i[0],l=i[1]),i[0]=t(o),i[1]=r(l)}}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,l;for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(o+=s[0],l+=s[1]):(o=s[0],l=s[1]),s[0]=t(o),s[1]=r(l)}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,d.Cb)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,d.Cb)({type:[o.Z],json:{write:!0}})],b.prototype,"features",void 0),(0,i._)([(0,p.r)("features")],b.prototype,"readFeatures",null),(0,i._)([(0,d.Cb)({type:[m.Z],json:{write:!0}})],b.prototype,"fields",void 0),(0,i._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,i._)([(0,h.c)("geometryType")],b.prototype,"writeGeometryType",null),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,i._)([(0,d.Cb)({types:n.qM,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,i._)([(0,p.r)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,i._)([(0,d.Cb)({type:y.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,i._)([(0,h.c)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,i._)([(0,d.Cb)({json:{write:!0}})],b.prototype,"transform",void 0),b=s=(0,i._)([(0,c.j)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const w=b},58333:(e,t,r)=>{r.d(t,{ET:()=>n,I4:()=>i,eG:()=>a,lF:()=>o,lj:()=>d,qP:()=>l,wW:()=>u});const s=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={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},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|