@arcgis/coding-components 4.31.0-next.49 → 4.31.0-next.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  2. package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +3 -3
  3. package/dist/arcgis-coding-components/index.esm.js +2 -2
  4. package/dist/arcgis-coding-components/{p-52b5a46f.js → p-0317229d.js} +1 -1
  5. package/dist/arcgis-coding-components/{p-d2b2935a.js → p-2e8fbb4b.js} +2 -2
  6. package/dist/arcgis-coding-components/{p-66f131e7.js → p-33addfb3.js} +2 -2
  7. package/dist/arcgis-coding-components/{p-45972b31.js → p-4673c357.js} +2 -2
  8. package/dist/arcgis-coding-components/{p-30162547.js → p-480eb4c5.js} +9 -9
  9. package/dist/arcgis-coding-components/{p-76ddf758.js → p-4c73eabe.js} +1 -1
  10. package/dist/arcgis-coding-components/{p-f4e72b80.js → p-4d6ca874.js} +2 -2
  11. package/dist/arcgis-coding-components/{p-ee868f26.js → p-767c5225.js} +2 -2
  12. package/dist/arcgis-coding-components/{p-df56cc4c.js → p-98e04042.js} +2 -2
  13. package/dist/arcgis-coding-components/{p-f4ca37d3.js → p-a9813986.js} +2 -2
  14. package/dist/arcgis-coding-components/{p-45c98979.js → p-b044f79f.js} +1 -1
  15. package/dist/arcgis-coding-components/{p-a4753900.js → p-b8a43324.js} +2 -2
  16. package/dist/arcgis-coding-components/{p-95c0d42c.js → p-ece33ee3.js} +2 -2
  17. package/dist/arcgis-coding-components/{p-5c895110.js → p-ee1bcd4a.js} +2 -2
  18. package/dist/arcgis-coding-components/{p-19f2f28e.entry.js → p-f482a7be.entry.js} +2 -2
  19. package/dist/arcgis-coding-components/{p-0b570145.entry.js → p-f48664f6.entry.js} +2 -2
  20. package/dist/arcgis-coding-components/{p-8d3b075f.entry.js → p-f4cde30a.entry.js} +2 -2
  21. package/dist/arcgis-coding-components/{p-3c0be840.js → p-fdc7cb89.js} +2 -2
  22. package/dist/cjs/{app-globals-eff0bc40.js → app-globals-1ba015ed.js} +1 -1
  23. package/dist/cjs/{arcade-defaults-0f79c32e.js → arcade-defaults-ad5cf484.js} +4 -4
  24. package/dist/cjs/{arcade-mode-cab9e0f1.js → arcade-mode-649fa51a.js} +3 -3
  25. package/dist/cjs/arcgis-arcade-editor_6.cjs.entry.js +5 -5
  26. package/dist/cjs/arcgis-coding-components.cjs.js +3 -3
  27. package/dist/cjs/arcgis-sql-expression-editor.cjs.entry.js +4 -4
  28. package/dist/cjs/arcgis-sql-expression-fields.cjs.entry.js +4 -4
  29. package/dist/cjs/{css-cab0af50.js → css-2cb6ed68.js} +1 -1
  30. package/dist/cjs/{cssMode-08b4850a.js → cssMode-59149f47.js} +2 -2
  31. package/dist/cjs/{html-abf2912c.js → html-7eb8e26e.js} +2 -2
  32. package/dist/cjs/{htmlMode-8f6e37d8.js → htmlMode-ca858966.js} +2 -2
  33. package/dist/cjs/{index-4b0dd48e.js → index-823cb4fb.js} +1 -1
  34. package/dist/cjs/index.cjs.js +4 -4
  35. package/dist/cjs/{javascript-f5fbd998.js → javascript-4ca4d95c.js} +3 -3
  36. package/dist/cjs/{jsonMode-e8d2914a.js → jsonMode-8a504873.js} +2 -2
  37. package/dist/cjs/{language-defaults-base-b3c1d51b.js → language-defaults-base-5776f8e9.js} +9 -9
  38. package/dist/cjs/loader.cjs.js +3 -3
  39. package/dist/cjs/{sql-expr-defaults-293125ba.js → sql-expr-defaults-beafe7a2.js} +4 -4
  40. package/dist/cjs/{sql-expr-mode-3bfdf4de.js → sql-expr-mode-f7d4dbce.js} +4 -4
  41. package/dist/cjs/{tsMode-183ebe36.js → tsMode-47b28437.js} +2 -2
  42. package/dist/cjs/{typescript-05060a49.js → typescript-ab07dc5e.js} +2 -2
  43. package/dist/components/arcade-defaults.js +1 -1
  44. package/dist/components/arcade-mode.js +2 -2
  45. package/dist/components/arcade-results.js +2 -2
  46. package/dist/components/arcade-suggestions.js +2 -2
  47. package/dist/components/arcade-variables.js +2 -2
  48. package/dist/components/arcgis-arcade-editor.js +2 -2
  49. package/dist/components/arcgis-arcade-results.js +1 -1
  50. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  51. package/dist/components/arcgis-arcade-variables.js +1 -1
  52. package/dist/components/arcgis-assets.d.ts +1 -1
  53. package/dist/components/arcgis-assets.js +1 -1
  54. package/dist/components/arcgis-code-editor.js +1 -1
  55. package/dist/components/arcgis-language-api-panel.js +1 -1
  56. package/dist/components/arcgis-sql-expression-editor.js +2 -2
  57. package/dist/components/arcgis-sql-expression-fields.js +1 -1
  58. package/dist/components/{chunk-WXWXR4PG.js → chunk-BMBYH3VH.js} +1 -1
  59. package/dist/components/code-editor.js +2 -2
  60. package/dist/components/fields.js +1 -1
  61. package/dist/components/index.js +1 -1
  62. package/dist/components/index2.js +1 -1
  63. package/dist/components/language-api-panel.js +2 -2
  64. package/dist/components/language-defaults-base.js +1 -1
  65. package/dist/components/markdown.js +1 -1
  66. package/dist/components/sql-expr-defaults.js +1 -1
  67. package/dist/components/sql-expr-mode.js +1 -1
  68. package/dist/components/sql-expression-fields.js +2 -2
  69. package/dist/components/useT9n.js +2 -2
  70. package/dist/components/utilities.js +1 -1
  71. package/dist/esm/{app-globals-f93a4777.js → app-globals-7e5121c7.js} +1 -1
  72. package/dist/esm/{arcade-defaults-295ed820.js → arcade-defaults-aee40b8e.js} +4 -4
  73. package/dist/esm/{arcade-mode-d1cc9aa9.js → arcade-mode-24feb5c6.js} +3 -3
  74. package/dist/esm/arcgis-arcade-editor_6.entry.js +5 -5
  75. package/dist/esm/arcgis-coding-components.js +4 -4
  76. package/dist/esm/arcgis-sql-expression-editor.entry.js +4 -4
  77. package/dist/esm/arcgis-sql-expression-fields.entry.js +4 -4
  78. package/dist/esm/{css-5a4db90b.js → css-7ff32064.js} +1 -1
  79. package/dist/esm/{cssMode-962cc9d5.js → cssMode-72ada24a.js} +2 -2
  80. package/dist/esm/{html-7b9b13a3.js → html-97b20a90.js} +2 -2
  81. package/dist/esm/{htmlMode-4eadc36d.js → htmlMode-7b3b3c64.js} +2 -2
  82. package/dist/esm/{index-b8c3bdf1.js → index-fd2a2c8b.js} +1 -1
  83. package/dist/esm/index.js +4 -4
  84. package/dist/esm/{javascript-f92c46c1.js → javascript-4e95c52b.js} +3 -3
  85. package/dist/esm/{jsonMode-bd1a9708.js → jsonMode-64dc7360.js} +2 -2
  86. package/dist/esm/{language-defaults-base-ad0d1a75.js → language-defaults-base-4727c213.js} +9 -9
  87. package/dist/esm/loader.js +4 -4
  88. package/dist/esm/{sql-expr-defaults-12d43adc.js → sql-expr-defaults-1a3cc4d4.js} +4 -4
  89. package/dist/esm/{sql-expr-mode-9786a8ed.js → sql-expr-mode-cb99d3b8.js} +4 -4
  90. package/dist/esm/{tsMode-19500b8a.js → tsMode-0dd42b2d.js} +2 -2
  91. package/dist/esm/{typescript-2207fd19.js → typescript-6cc96cd7.js} +2 -2
  92. package/dist/loader/cdn.js +1 -1
  93. package/dist/loader/index.cjs.js +1 -1
  94. package/dist/loader/index.es2017.js +1 -1
  95. package/dist/loader/index.js +1 -1
  96. package/package.json +11 -11
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{var kk=Object.defineProperty;var W5=e=>t=>{var r=e[t];if(r)return r();throw new Error("Module not found in bundle: "+t)};var L=(e,t)=>()=>(e&&(t=e(e=0)),t);var z5=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),li=(e,t)=>{for(var r in t)kk(e,r,{get:t[r],enumerable:!0})};var $s,To=L(()=>{$s=class e{constructor(t=1){this._seed=t}set seed(t){this._seed=t??Math.random()*e._m}getInt(){return this._seed=(e._a*this._seed+e._c)%e._m,this._seed}getFloat(){return this.getInt()/(e._m-1)}getIntRange(t,r){return Math.round(this.getFloatRange(t,r))}getFloatRange(t,r){let n=r-t;return t+this.getInt()/e._m*n}};$s._m=2147483647,$s._a=48271,$s._c=0});function Eo(e,t,r){if(e==null&&t==null)return!0;if(e==null||t==null||e.length!==t.length)return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Q2(e,t,r,n){n=n||i7;let i=Math.max(0,n.last-10);for(let s=i;s<r;++s)if(e[s]===t)return n.last=s,s;let o=Math.min(i,r);for(let s=0;s<o;++s)if(e[s]===t)return n.last=s,s;return-1}function o7(e,t,r=e.length,n=t.length,i,o){if(n===0||r===0)return r;Wn.clear();for(let a=0;a<n;++a)Wn.add(t[a]);i=i||i7;let s=Math.max(0,i.last-10);for(let a=s;a<r;++a)if(Wn.has(e[a])&&(o?.push(e[a]),Wn.delete(e[a]),e[a]=e[r-1],--r,--a,Wn.size===0||r===0))return Wn.clear(),r;for(let a=0;a<s;++a)if(Wn.has(e[a])&&(o?.push(e[a]),Wn.delete(e[a]),e[a]=e[r-1],--r,--a,Wn.size===0||r===0))return Wn.clear(),r;return Wn.clear(),r}function s7(e,t){let r=e.indexOf(t);return r!==-1?(e.splice(r,1),t):null}function a7(e,t){return e!=null}var bD,bee,pu,i7,Wn,_ee,Mo=L(()=>{To();bD=1.5,bee=1/bD;pu=class{constructor(){this.last=0}},i7=new pu;Wn=new Set;_ee=new $s});var l7=L(()=>{});function Q(e){return typeof Lo[e]=="function"?Lo[e]=Lo[e](globalThis):Lo[e]}var Lo,Be=L(()=>{Lo=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},Q.add=(e,t,r,n)=>((n||Lo[e]===void 0)&&(Lo[e]=t),r&&Q(e)),Q.cache=Lo,Q.add("big-integer-warning-enabled",!0),Q.add("esri-deprecation-warnings",!0),Q.add("esri-tests-disable-screenshots",!1),Q.add("esri-tests-use-full-window",!1),Q.add("esri-tests-post-to-influx",!0),Q.add("esri-cim-animations-enable-status","enabled"),Q.add("esri-cim-animations-spotlight",!1),Q.add("esri-cim-animations-freeze-time",!1),(()=>{Q.add("host-webworker",globalThis.WorkerGlobalScope!==void 0&&self instanceof globalThis.WorkerGlobalScope);let e=typeof window<"u"&&typeof location<"u"&&typeof document<"u"&&window.location===location&&window.document===document;if(Q.add("host-browser",e),Q.add("host-node",typeof globalThis.process=="object"&&globalThis.process.versions?.node&&globalThis.process.versions.v8),Q.add("dom",e),Q("host-browser")){let t=navigator,r=t.userAgent,n=t.appVersion,i=parseFloat(n);if(Q.add("wp",parseFloat(r.split("Windows Phone")[1])||void 0),Q.add("msapp",parseFloat(r.split("MSAppHost/")[1])||void 0),Q.add("khtml",n.includes("Konqueror")?i:void 0),Q.add("edge",parseFloat(r.split("Edge/")[1])||void 0),Q.add("opr",parseFloat(r.split("OPR/")[1])||void 0),Q.add("webkit",!Q("wp")&&!Q("edge")&&parseFloat(r.split("WebKit/")[1])||void 0),Q.add("chrome",!Q("edge")&&!Q("opr")&&parseFloat(r.split("Chrome/")[1])||void 0),Q.add("android",!Q("wp")&&parseFloat(r.split("Android ")[1])||void 0),Q.add("safari",!n.includes("Safari")||Q("wp")||Q("chrome")||Q("android")||Q("edge")||Q("opr")?void 0:parseFloat(n.split("Version/")[1])),Q.add("mac",n.includes("Macintosh")),!Q("wp")&&/(iPhone|iPod|iPad)/.test(r)){let o=RegExp.$1.replace(/P/,"p"),s=/OS ([\d_]+)/.test(r)?RegExp.$1:"1",a=parseFloat(s.replace(/_/,".").replaceAll("_",""));Q.add(o,a),Q.add("ios",a)}Q("webkit")||(!r.includes("Gecko")||Q("wp")||Q("khtml")||Q("edge")||Q.add("mozilla",i),Q("mozilla")&&Q.add("ff",parseFloat(r.split("Firefox/")[1]||r.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){let e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&Q.add("esri-mobile",t),r&&Q.add("esri-iPhone",r),Q.add("esri-geolocation",!!navigator.geolocation)}Q.add("esri-wasm","WebAssembly"in globalThis),Q.add("esri-performance-mode-frames-between-render",20),Q.add("esri-force-performance-mode",!1),Q.add("esri-shared-array-buffer",()=>{let e="SharedArrayBuffer"in globalThis,t=globalThis.crossOriginIsolated===!1;return e&&!t}),Q.add("wasm-simd",()=>{let e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))}),Q.add("esri-atomics","Atomics"in globalThis),Q.add("esri-workers","Worker"in globalThis),Q.add("web-feat:cache","caches"in globalThis),Q.add("esri-workers-arraybuffer-transfer",!Q("safari")||Number(Q("safari"))>=12),Q.add("workers-pool-size",8),Q.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),Q.add("featurelayer-simplify-payload-size-factors",[1,1,4]),Q.add("featurelayer-fast-triangulation-enabled",!0),Q.add("featurelayer-animation-enabled",!0),Q.add("featurelayer-snapshot-enabled",!0),Q.add("featurelayer-snapshot-point-min-threshold",8e4),Q.add("featurelayer-snapshot-point-max-threshold",4e5),Q.add("featurelayer-snapshot-point-coverage",.1),Q.add("featurelayer-query-max-depth",4),Q.add("featurelayer-query-pausing-enabled",!1),Q.add("featurelayer-advanced-symbols",!1),Q.add("featurelayer-pbf",!0),Q.add("featurelayer-pbf-statistics",!1),Q.add("feature-layers-workers",!0),Q.add("feature-polyline-generalization-factor",1),Q.add("mapview-transitions-duration",200),Q.add("mapview-essential-goto-duration",200),Q.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),Q.add("mapserver-pbf-version-support",10.81),Q.add("mapservice-popup-identify-max-tolerance",20),Q("host-webworker")||Q("host-browser")&&(Q.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),Q.add("esri-image-decode",()=>{if("decode"in new Image){let e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then(()=>{Q.add("esri-image-decode",!0,!0,!0)}).catch(()=>{Q.add("esri-image-decode",!1,!0,!0)})}return!1}),Q.add("esri-url-encodes-apostrophe",()=>{let e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")}))})()});function c7(e){return e?.constructor?.name==="Int8Array"}function u7(e){return e?.constructor?.name==="Uint8Array"}function d7(e){return e?.constructor?.name==="Uint8ClampedArray"}function f7(e){return e?.constructor?.name==="Int16Array"}function p7(e){return e?.constructor?.name==="Uint16Array"}function m7(e){return e?.constructor?.name==="Int32Array"}function h7(e){return e?.constructor?.name==="Uint32Array"}function g7(e){return e?.constructor?.name==="Float32Array"}function w7(e){return e?.constructor?.name==="Float64Array"}var y7=L(()=>{l7();Be()});function w1(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(e[r]===void 0?delete e[r]:e[r]instanceof Object&&w1(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&e[r]===void 0&&delete e[r];return e}function Ne(e){if(!e||typeof e!="object"||typeof e=="function")return e;let t=xD(e);if(t!=null)return t;if(_D(e))return e.clone();if(vD(e))return e.map(Ne);if(SD(e))return e.clone();let r={};for(let n of Object.getOwnPropertyNames(e))r[n]=Ne(e[n]);return r}function _D(e){return typeof e.clone=="function"}function vD(e){return typeof e.map=="function"&&typeof e.forEach=="function"}function SD(e){return typeof e.notifyChange=="function"&&typeof e.watch=="function"}function b7(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function xD(e){if(c7(e)||u7(e)||d7(e)||f7(e)||p7(e)||m7(e)||h7(e)||g7(e)||w7(e))return e.slice();if(e instanceof Date)return new Date(e.getTime());if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){let t=new Map;for(let[r,n]of e)t.set(r,Ne(n));return t}if(e instanceof Set){let t=new Set;for(let r of e)t.add(Ne(r));return t}return null}function mu(e,t){return e===t||typeof e=="number"&&isNaN(e)&&typeof t=="number"&&isNaN(t)||typeof e?.getTime=="function"&&typeof t?.getTime=="function"&&e.getTime()===t.getTime()||!1}function _7(e,t){return e===t||(e==null||typeof e=="string"?e===t:typeof e=="number"?e===t||typeof t=="number"&&isNaN(e)&&isNaN(t):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():Array.isArray(e)?Array.isArray(t)&&Eo(e,t):e instanceof Set?t instanceof Set&&TD(e,t):e instanceof Map?t instanceof Map&&ED(e,t):!!b7(e)&&b7(t)&&CD(e,t))}function CD(e,t){if(e===null||t===null)return!1;let r=Object.keys(e);if(t===null||Object.keys(t).length!==r.length)return!1;for(let n of r)if(e[n]!==t[n]||!Object.prototype.hasOwnProperty.call(t,n))return!1;return!0}function TD(e,t){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}function ED(e,t){if(e.size!==t.size)return!1;for(let[r,n]of e){let i=t.get(r);if(i!==n||i===void 0&&!t.has(r))return!1}return!0}var er=L(()=>{Mo();y7()});function v7(e,t,r=!1){return x7(e,t,r)}function xn(e,t){if(t!=null)return t[e]||S7(e.split("."),!1,t)}function Bi(e,t,r){let n=e.split("."),i=n.pop(),o=S7(n,!0,r);o&&i&&(o[i]=t)}function S7(e,t,r){let n=r;for(let i of e){if(n==null)return;if(!(i in n)){if(!t)return;n[i]={}}n=n[i]}return n}function x7(e,t,r){return t?Object.keys(t).reduce((n,i)=>{let o=n[i],s=t[i];return o===s?n:o===void 0?(n[i]=Ne(s),n):(Array.isArray(s)||Array.isArray(n)?(o=o?Array.isArray(o)?n[i]=o.slice():n[i]=[o]:n[i]=[],s&&(Array.isArray(s)||(s=[s]),r?s.forEach(a=>{o.includes(a)||o.push(a)}):n[i]=s.slice())):s&&typeof s=="object"?n[i]=x7(o,s,r):n.hasOwnProperty(i)&&!t.hasOwnProperty(i)||(n[i]=s),n)},e||{}):e}var hi=L(()=>{er()});function C7(e){return e??""}function gi(e,t){return t?e.replaceAll(MD,typeof t=="object"?(r,n)=>C7(xn(n,t)):(r,n)=>C7(t(n))):e}function T7(e,t){return e.replaceAll(/([.$?*|{}()[\]\\/+\-^])/g,r=>t?.includes(r)?r:`\\${r}`)}function E7(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}var MD,Io=L(()=>{hi();MD=/\{([^}]+)\}/g});var qi,y1,b1,_1,zn,cl,xt,Gn,Po=L(()=>{qi=class extends Error{},y1=class extends qi{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}},b1=class extends qi{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}},_1=class extends qi{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}},zn=class extends qi{},cl=class extends qi{constructor(t){super(`Invalid unit ${t}`)}},xt=class extends qi{},Gn=class extends qi{constructor(){super("Zone is an abstract class")}}});var ce,Bn,sn,Ao,hu,K2,gu,wu,yu,bu,_u,vu,Su,xu,Cu,Tu,Eu,Mu,Lu,Iu,eb,Pu,Au,Nu,ku,Ru=L(()=>{ce="numeric",Bn="short",sn="long",Ao={year:ce,month:ce,day:ce},hu={year:ce,month:Bn,day:ce},K2={year:ce,month:Bn,day:ce,weekday:Bn},gu={year:ce,month:sn,day:ce},wu={year:ce,month:sn,day:ce,weekday:sn},yu={hour:ce,minute:ce},bu={hour:ce,minute:ce,second:ce},_u={hour:ce,minute:ce,second:ce,timeZoneName:Bn},vu={hour:ce,minute:ce,second:ce,timeZoneName:sn},Su={hour:ce,minute:ce,hourCycle:"h23"},xu={hour:ce,minute:ce,second:ce,hourCycle:"h23"},Cu={hour:ce,minute:ce,second:ce,hourCycle:"h23",timeZoneName:Bn},Tu={hour:ce,minute:ce,second:ce,hourCycle:"h23",timeZoneName:sn},Eu={year:ce,month:ce,day:ce,hour:ce,minute:ce},Mu={year:ce,month:ce,day:ce,hour:ce,minute:ce,second:ce},Lu={year:ce,month:Bn,day:ce,hour:ce,minute:ce},Iu={year:ce,month:Bn,day:ce,hour:ce,minute:ce,second:ce},eb={year:ce,month:Bn,day:ce,weekday:Bn,hour:ce,minute:ce},Pu={year:ce,month:sn,day:ce,hour:ce,minute:ce,timeZoneName:Bn},Au={year:ce,month:sn,day:ce,hour:ce,minute:ce,second:ce,timeZoneName:Bn},Nu={year:ce,month:sn,day:ce,weekday:sn,hour:ce,minute:ce,timeZoneName:sn},ku={year:ce,month:sn,day:ce,weekday:sn,hour:ce,minute:ce,second:ce,timeZoneName:sn}});var kt,Fs=L(()=>{Po();kt=class{get type(){throw new Gn}get name(){throw new Gn}get ianaName(){return this.name}get isUniversal(){throw new Gn}offsetName(t,r){throw new Gn}formatOffset(t,r){throw new Gn}offset(t){throw new Gn}equals(t){throw new Gn}get isValid(){throw new Gn}}});var tb,No,S1=L(()=>{$r();Fs();tb=null,No=class e extends kt{static get instance(){return tb===null&&(tb=new e),tb}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:r,locale:n}){return x1(t,r,n)}formatOffset(t,r){return ko(this.offset(t),r)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}});function LD(e){return T1[e]||(T1[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),T1[e]}function PD(e,t){let r=e.format(t).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,i,o,s,a,u,d,p]=n;return[s,i,o,a,u,d,p]}function AD(e,t){let r=e.formatToParts(t),n=[];for(let i=0;i<r.length;i++){let{type:o,value:s}=r[i],a=ID[o];o==="era"?n[a]=s:_e(a)||(n[a]=parseInt(s,10))}return n}var T1,ID,C1,Ct,Ro=L(()=>{$r();Fs();T1={};ID={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};C1={},Ct=class e extends kt{static create(t){return C1[t]||(C1[t]=new e(t)),C1[t]}static resetCache(){C1={},T1={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=e.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:r,locale:n}){return x1(t,r,n,this.name)}formatOffset(t,r){return ko(this.offset(t),r)}offset(t){let r=new Date(t);if(isNaN(r))return NaN;let n=LD(this.name),[i,o,s,a,u,d,p]=n.formatToParts?AD(n,r):PD(n,r);a==="BC"&&(i=-Math.abs(i)+1);let w=ul({year:i,month:o,day:s,hour:u===24?0:u,minute:d,second:p,millisecond:0}),_=+r,S=_%1e3;return _-=S>=0?S:1e3+S,(w-_)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}});function ND(e,t={}){let r=JSON.stringify([e,t]),n=M7[r];return n||(n=new Intl.ListFormat(e,t),M7[r]=n),n}function nb(e,t={}){let r=JSON.stringify([e,t]),n=rb[r];return n||(n=new Intl.DateTimeFormat(e,t),rb[r]=n),n}function kD(e,t={}){let r=JSON.stringify([e,t]),n=ib[r];return n||(n=new Intl.NumberFormat(e,t),ib[r]=n),n}function RD(e,t={}){let{base:r,...n}=t,i=JSON.stringify([e,n]),o=ob[i];return o||(o=new Intl.RelativeTimeFormat(e,t),ob[i]=o),o}function DD(){return Du||(Du=new Intl.DateTimeFormat().resolvedOptions().locale,Du)}function OD(e){let t=L7[e];if(!t){let r=new Intl.Locale(e);t="getWeekInfo"in r?r.getWeekInfo():r.weekInfo,L7[e]=t}return t}function $D(e){let t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));let r=e.indexOf("-u-");if(r===-1)return[e];{let n,i;try{n=nb(e).resolvedOptions(),i=e}catch{let u=e.substring(0,r);n=nb(u).resolvedOptions(),i=u}let{numberingSystem:o,calendar:s}=n;return[i,o,s]}}function FD(e,t,r){return(r||t)&&(e.includes("-u-")||(e+="-u"),r&&(e+=`-ca-${r}`),t&&(e+=`-nu-${t}`)),e}function VD(e){let t=[];for(let r=1;r<=12;r++){let n=oe.utc(2009,r,1);t.push(e(n))}return t}function UD(e){let t=[];for(let r=1;r<=7;r++){let n=oe.utc(2016,11,13+r);t.push(e(n))}return t}function E1(e,t,r,n){let i=e.listingMode();return i==="error"?null:i==="en"?r(t):n(t)}function WD(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}var M7,rb,ib,ob,Du,L7,sb,ab,lb,zD,Ue,$u=L(()=>{$r();I1();Do();Oo();Ro();M7={};rb={};ib={};ob={};Du=null;L7={};sb=class{constructor(t,r,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:i,floor:o,...s}=n;if(!r||Object.keys(s).length>0){let a={useGrouping:!1,...n};n.padTo>0&&(a.minimumIntegerDigits=n.padTo),this.inf=kD(t,a)}}format(t){if(this.inf){let r=this.floor?Math.floor(t):t;return this.inf.format(r)}else{let r=this.floor?Math.floor(t):dl(t,3);return ht(r,this.padTo)}}},ab=class{constructor(t,r,n){this.opts=n,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){let s=-1*(t.offset/60),a=s>=0?`Etc/GMT+${s}`:`Etc/GMT${s}`;t.offset!==0&&Ct.create(a).valid?(i=a,this.dt=t):(i="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,i=t.zone.name):(i="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);let o={...this.opts};o.timeZone=o.timeZone||i,this.dtf=nb(r,o)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(r=>{if(r.type==="timeZoneName"){let n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...r,value:n}}else return r}):t}resolvedOptions(){return this.dtf.resolvedOptions()}},lb=class{constructor(t,r,n){this.opts={style:"long",...n},!r&&M1()&&(this.rtf=RD(t,n))}format(t,r){return this.rtf?this.rtf.format(t,r):I7(r,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,r){return this.rtf?this.rtf.formatToParts(t,r):[]}},zD={firstDay:1,minimalDays:4,weekend:[6,7]},Ue=class e{static fromOpts(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,r,n,i,o=!1){let s=t||Ve.defaultLocale,a=s||(o?"en-US":DD()),u=r||Ve.defaultNumberingSystem,d=n||Ve.defaultOutputCalendar,p=Ou(i)||Ve.defaultWeekSettings;return new e(a,u,d,p,s)}static resetCache(){Du=null,rb={},ib={},ob={}}static fromObject({locale:t,numberingSystem:r,outputCalendar:n,weekSettings:i}={}){return e.create(t,r,n,i)}constructor(t,r,n,i,o){let[s,a,u]=$D(t);this.locale=s,this.numberingSystem=r||a||null,this.outputCalendar=n||u||null,this.weekSettings=i,this.intl=FD(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=WD(this)),this.fastNumbersCached}listingMode(){let t=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&r?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Ou(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,r=!1){return E1(this,t,cb,()=>{let n=r?{month:t,day:"numeric"}:{month:t},i=r?"format":"standalone";return this.monthsCache[i][t]||(this.monthsCache[i][t]=VD(o=>this.extract(o,n,"month"))),this.monthsCache[i][t]})}weekdays(t,r=!1){return E1(this,t,ub,()=>{let n=r?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},i=r?"format":"standalone";return this.weekdaysCache[i][t]||(this.weekdaysCache[i][t]=UD(o=>this.extract(o,n,"weekday"))),this.weekdaysCache[i][t]})}meridiems(){return E1(this,void 0,()=>db,()=>{if(!this.meridiemCache){let t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[oe.utc(2016,11,13,9),oe.utc(2016,11,13,19)].map(r=>this.extract(r,t,"dayperiod"))}return this.meridiemCache})}eras(t){return E1(this,t,fb,()=>{let r={era:t};return this.eraCache[t]||(this.eraCache[t]=[oe.utc(-40,1,1),oe.utc(2017,1,1)].map(n=>this.extract(n,r,"era"))),this.eraCache[t]})}extract(t,r,n){let i=this.dtFormatter(t,r),o=i.formatToParts(),s=o.find(a=>a.type.toLowerCase()===n);return s?s.value:null}numberFormatter(t={}){return new sb(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,r={}){return new ab(t,this.intl,r)}relFormatter(t={}){return new lb(this.intl,this.isEnglish(),t)}listFormatter(t={}){return ND(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:L1()?OD(this.locale):zD}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}});var mb,He,fl=L(()=>{$r();Fs();mb=null,He=class e extends kt{static get utcInstance(){return mb===null&&(mb=new e(0)),mb}static instance(t){return t===0?e.utcInstance:new e(t)}static parseSpecifier(t){if(t){let r=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new e(Vs(r[1],r[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ko(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ko(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,r){return ko(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}});var pl,hb=L(()=>{Fs();pl=class extends kt{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}});function qn(e,t){let r;if(_e(e)||e===null)return t;if(e instanceof kt)return e;if(P7(e)){let n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?No.instance:n==="utc"||n==="gmt"?He.utcInstance:He.parseSpecifier(n)||Ct.create(e)}else return jn(e)?He.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new pl(e)}var P1=L(()=>{Fs();Ro();fl();hb();$r();S1()});function N7(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(e[r].search(gb.hanidec)!==-1)t+=GD.indexOf(e[r]);else for(let i in A7){let[o,s]=A7[i];n>=o&&n<=s&&(t+=n-o)}}return parseInt(t,10)}else return t}function k7(){ml={}}function Cn({numberingSystem:e},t=""){let r=e||"latn";return ml[r]||(ml[r]={}),ml[r][t]||(ml[r][t]=new RegExp(`${gb[r]}${t}`)),ml[r][t]}var gb,A7,GD,ml,wb=L(()=>{gb={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},A7={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},GD=gb.hanidec.replace(/[\[|\]]/g,"").split("");ml={}});var R7,D7,O7,$7,F7,V7,U7,W7,Ve,Do=L(()=>{S1();Ro();$u();Oo();P1();$r();wb();R7=()=>Date.now(),D7="system",O7=null,$7=null,F7=null,V7=60,W7=null,Ve=class{static get now(){return R7}static set now(t){R7=t}static set defaultZone(t){D7=t}static get defaultZone(){return qn(D7,No.instance)}static get defaultLocale(){return O7}static set defaultLocale(t){O7=t}static get defaultNumberingSystem(){return $7}static set defaultNumberingSystem(t){$7=t}static get defaultOutputCalendar(){return F7}static set defaultOutputCalendar(t){F7=t}static get defaultWeekSettings(){return W7}static set defaultWeekSettings(t){W7=Ou(t)}static get twoDigitCutoffYear(){return V7}static set twoDigitCutoffYear(t){V7=t%100}static get throwOnInvalid(){return U7}static set throwOnInvalid(t){U7=t}static resetCaches(){Ue.resetCache(),Ct.resetCache(),oe.resetCache(),k7()}}});var tr,Fu=L(()=>{tr=class{constructor(t,r){this.reason=t,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}});function Tn(e,t){return new tr("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function A1(e,t,r){let n=new Date(Date.UTC(e,t-1,r));e<100&&e>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);let i=n.getUTCDay();return i===0?7:i}function B7(e,t,r){return r+(Ws(e)?G7:z7)[t-1]}function q7(e,t){let r=Ws(e)?G7:z7,n=r.findIndex(o=>o<t),i=t-r[n];return{month:n+1,day:i}}function N1(e,t){return(e-t+7)%7+1}function Vu(e,t=4,r=1){let{year:n,month:i,day:o}=e,s=B7(n,i,o),a=N1(A1(n,i,o),r),u=Math.floor((s-a+14-t)/7),d;return u<1?(d=n-1,u=Us(d,t,r)):u>Us(n,t,r)?(d=n+1,u=1):d=n,{weekYear:d,weekNumber:u,weekday:a,...Wu(e)}}function yb(e,t=4,r=1){let{weekYear:n,weekNumber:i,weekday:o}=e,s=N1(A1(n,1,t),r),a=$o(n),u=i*7+o-s-7+t,d;u<1?(d=n-1,u+=$o(d)):u>a?(d=n+1,u-=$o(n)):d=n;let{month:p,day:m}=q7(d,u);return{year:d,month:p,day:m,...Wu(e)}}function k1(e){let{year:t,month:r,day:n}=e,i=B7(t,r,n);return{year:t,ordinal:i,...Wu(e)}}function bb(e){let{year:t,ordinal:r}=e,{month:n,day:i}=q7(t,r);return{year:t,month:n,day:i,...Wu(e)}}function _b(e,t){if(!_e(e.localWeekday)||!_e(e.localWeekNumber)||!_e(e.localWeekYear)){if(!_e(e.weekday)||!_e(e.weekNumber)||!_e(e.weekYear))throw new zn("Cannot mix locale-based week fields with ISO-based week fields");return _e(e.localWeekday)||(e.weekday=e.localWeekday),_e(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),_e(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function j7(e,t=4,r=1){let n=Uu(e.weekYear),i=an(e.weekNumber,1,Us(e.weekYear,t,r)),o=an(e.weekday,1,7);return n?i?o?!1:Tn("weekday",e.weekday):Tn("week",e.weekNumber):Tn("weekYear",e.weekYear)}function H7(e){let t=Uu(e.year),r=an(e.ordinal,1,$o(e.year));return t?r?!1:Tn("ordinal",e.ordinal):Tn("year",e.year)}function vb(e){let t=Uu(e.year),r=an(e.month,1,12),n=an(e.day,1,hl(e.year,e.month));return t?r?n?!1:Tn("day",e.day):Tn("month",e.month):Tn("year",e.year)}function Sb(e){let{hour:t,minute:r,second:n,millisecond:i}=e,o=an(t,0,23)||t===24&&r===0&&n===0&&i===0,s=an(r,0,59),a=an(n,0,59),u=an(i,0,999);return o?s?a?u?!1:Tn("millisecond",i):Tn("second",n):Tn("minute",r):Tn("hour",t)}var z7,G7,xb=L(()=>{$r();Fu();Po();z7=[0,31,59,90,120,151,181,212,243,273,304,334],G7=[0,31,60,91,121,152,182,213,244,274,305,335]});function _e(e){return typeof e>"u"}function jn(e){return typeof e=="number"}function Uu(e){return typeof e=="number"&&e%1===0}function P7(e){return typeof e=="string"}function Y7(e){return Object.prototype.toString.call(e)==="[object Date]"}function M1(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function L1(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function J7(e){return Array.isArray(e)?e:[e]}function Cb(e,t,r){if(e.length!==0)return e.reduce((n,i)=>{let o=[t(i),i];return n&&r(n[0],o[0])===n[0]?n:o},null)[1]}function X7(e,t){return t.reduce((r,n)=>(r[n]=e[n],r),{})}function Fo(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ou(e){if(e==null)return null;if(typeof e!="object")throw new xt("Week settings must be an object");if(!an(e.firstDay,1,7)||!an(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!an(t,1,7)))throw new xt("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function an(e,t,r){return Uu(e)&&e>=t&&e<=r}function BD(e,t){return e-t*Math.floor(e/t)}function ht(e,t=2){let r=e<0,n;return r?n="-"+(""+-e).padStart(t,"0"):n=(""+e).padStart(t,"0"),n}function ji(e){if(!(_e(e)||e===null||e===""))return parseInt(e,10)}function Vo(e){if(!(_e(e)||e===null||e===""))return parseFloat(e)}function zu(e){if(!(_e(e)||e===null||e==="")){let t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function dl(e,t,r=!1){let n=10**t;return(r?Math.trunc:Math.round)(e*n)/n}function Ws(e){return e%4===0&&(e%100!==0||e%400===0)}function $o(e){return Ws(e)?366:365}function hl(e,t){let r=BD(t-1,12)+1,n=e+(t-r)/12;return r===2?Ws(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function ul(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Z7(e,t,r){return-N1(A1(e,1,t),r)+t-1}function Us(e,t=4,r=1){let n=Z7(e,t,r),i=Z7(e+1,t,r);return($o(e)-n+i)/7}function Gu(e){return e>99?e:e>Ve.twoDigitCutoffYear?1900+e:2e3+e}function x1(e,t,r,n=null){let i=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(o.timeZone=n);let s={timeZoneName:t,...o},a=new Intl.DateTimeFormat(r,s).formatToParts(i).find(u=>u.type.toLowerCase()==="timezonename");return a?a.value:null}function Vs(e,t){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);let n=parseInt(t,10)||0,i=r<0||Object.is(r,-0)?-n:n;return r*60+i}function Tb(e){let t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new xt(`Invalid unit value ${e}`);return t}function gl(e,t){let r={};for(let n in e)if(Fo(e,n)){let i=e[n];if(i==null)continue;r[t(n)]=Tb(i)}return r}function ko(e,t){let r=Math.trunc(Math.abs(e/60)),n=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${ht(r,2)}:${ht(n,2)}`;case"narrow":return`${i}${r}${n>0?`:${n}`:""}`;case"techie":return`${i}${ht(r,2)}${ht(n,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Wu(e){return X7(e,["hour","minute","second","millisecond"])}var $r=L(()=>{Po();Do();xb()});function cb(e){switch(e){case"narrow":return[...jD];case"short":return[...Eb];case"long":return[...qD];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}function ub(e){switch(e){case"narrow":return[...HD];case"short":return[...Lb];case"long":return[...Mb];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}function fb(e){switch(e){case"narrow":return[...JD];case"short":return[...YD];case"long":return[...ZD];default:return null}}function Q7(e){return db[e.hour<12?0:1]}function K7(e,t){return ub(t)[e.weekday-1]}function e6(e,t){return cb(t)[e.month-1]}function t6(e,t){return fb(t)[e.year<0?0:1]}function I7(e,t,r="always",n=!1){let i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(e)===-1;if(r==="auto"&&o){let m=e==="days";switch(t){case 1:return m?"tomorrow":`next ${i[e][0]}`;case-1:return m?"yesterday":`last ${i[e][0]}`;case 0:return m?"today":`this ${i[e][0]}`;default:}}let s=Object.is(t,-0)||t<0,a=Math.abs(t),u=a===1,d=i[e],p=n?u?d[1]:d[2]||d[1]:u?i[e][0]:e;return s?`${a} ${p} ago`:`in ${a} ${p}`}var qD,Eb,jD,Mb,Lb,HD,db,ZD,YD,JD,I1=L(()=>{Ru();$r();qD=["January","February","March","April","May","June","July","August","September","October","November","December"],Eb=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],jD=["J","F","M","A","M","J","J","A","S","O","N","D"];Mb=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Lb=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],HD=["M","T","W","T","F","S","S"];db=["AM","PM"],ZD=["Before Christ","Anno Domini"],YD=["BC","AD"],JD=["B","A"]});function r6(e,t){let r="";for(let n of e)n.literal?r+=n.val:r+=t(n.val);return r}var XD,rr,Bu=L(()=>{I1();Ru();$r();XD={D:Ao,DD:hu,DDD:gu,DDDD:wu,t:yu,tt:bu,ttt:_u,tttt:vu,T:Su,TT:xu,TTT:Cu,TTTT:Tu,f:Eu,ff:Lu,fff:Pu,ffff:Nu,F:Mu,FF:Iu,FFF:Au,FFFF:ku},rr=class e{static create(t,r={}){return new e(t,r)}static parseFormat(t){let r=null,n="",i=!1,o=[];for(let s=0;s<t.length;s++){let a=t.charAt(s);a==="'"?(n.length>0&&o.push({literal:i||/^\s+$/.test(n),val:n}),r=null,n="",i=!i):i||a===r?n+=a:(n.length>0&&o.push({literal:/^\s+$/.test(n),val:n}),n=a,r=a)}return n.length>0&&o.push({literal:i||/^\s+$/.test(n),val:n}),o}static macroTokenToFormatOpts(t){return XD[t]}constructor(t,r){this.opts=r,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...r}).format()}dtFormatter(t,r={}){return this.loc.dtFormatter(t,{...this.opts,...r})}formatDateTime(t,r){return this.dtFormatter(t,r).format()}formatDateTimeParts(t,r){return this.dtFormatter(t,r).formatToParts()}formatInterval(t,r){return this.dtFormatter(t.start,r).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,r){return this.dtFormatter(t,r).resolvedOptions()}num(t,r=0){if(this.opts.forceSimple)return ht(t,r);let n={...this.opts};return r>0&&(n.padTo=r),this.loc.numberFormatter(n).format(t)}formatDateTimeFromString(t,r){let n=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(_,S)=>this.loc.extract(t,_,S),s=_=>t.isOffsetFixed&&t.offset===0&&_.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,_.format):"",a=()=>n?Q7(t):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(_,S)=>n?e6(t,_):o(S?{month:_}:{month:_,day:"numeric"},"month"),d=(_,S)=>n?K7(t,_):o(S?{weekday:_}:{weekday:_,month:"long",day:"numeric"},"weekday"),p=_=>{let S=e.macroTokenToFormatOpts(_);return S?this.formatWithSystemDefault(t,S):_},m=_=>n?t6(t,_):o({era:_},"era"),w=_=>{switch(_){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return a();case"d":return i?o({day:"numeric"},"day"):this.num(t.day);case"dd":return i?o({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return i?o({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return i?o({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return i?o({month:"numeric"},"month"):this.num(t.month);case"MM":return i?o({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return i?o({year:"numeric"},"year"):this.num(t.year);case"yy":return i?o({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return i?o({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return i?o({year:"numeric"},"year"):this.num(t.year,6);case"G":return m("short");case"GG":return m("long");case"GGGGG":return m("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return p(_)}};return r6(e.parseFormat(r),w)}formatDurationFromString(t,r){let n=u=>{switch(u[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=u=>d=>{let p=n(d);return p?this.num(u.get(p),d.length):d},o=e.parseFormat(r),s=o.reduce((u,{literal:d,val:p})=>d?u:u.concat(p),[]),a=t.shiftTo(...s.map(n).filter(u=>u));return r6(o,i(a))}}});function yl(...e){let t=e.reduce((r,n)=>r+n.source,"");return RegExp(`^${t}$`)}function bl(...e){return t=>e.reduce(([r,n,i],o)=>{let[s,a,u]=o(t,i);return[{...r,...s},a||n,u]},[{},null,1]).slice(0,2)}function _l(e,...t){if(e==null)return[null,null];for(let[r,n]of t){let i=r.exec(e);if(i)return n(i)}return[null,null]}function o6(...e){return(t,r)=>{let n={},i;for(i=0;i<e.length;i++)n[e[i]]=ji(t[r+i]);return[n,null,r+i]}}function wl(e,t,r){let n=e[t];return _e(n)?r:ji(n)}function sO(e,t){return[{year:wl(e,t),month:wl(e,t+1,1),day:wl(e,t+2,1)},null,t+3]}function vl(e,t){return[{hours:wl(e,t,0),minutes:wl(e,t+1,0),seconds:wl(e,t+2,0),milliseconds:zu(e[t+3])},null,t+4]}function qu(e,t){let r=!e[t]&&!e[t+1],n=Vs(e[t+1],e[t+2]),i=r?null:He.instance(n);return[{},i,t+3]}function ju(e,t){let r=e[t]?Ct.create(e[t]):null;return[{},r,t+1]}function cO(e){let[t,r,n,i,o,s,a,u,d]=e,p=t[0]==="-",m=u&&u[0]==="-",w=(_,S=!1)=>_!==void 0&&(S||_&&p)?-_:_;return[{years:w(Vo(r)),months:w(Vo(n)),weeks:w(Vo(i)),days:w(Vo(o)),hours:w(Vo(s)),minutes:w(Vo(a)),seconds:w(Vo(u),u==="-0"),milliseconds:w(zu(d),m)}]}function Ab(e,t,r,n,i,o,s){let a={year:t.length===2?Gu(ji(t)):ji(t),month:Eb.indexOf(r)+1,day:ji(n),hour:ji(i),minute:ji(o)};return s&&(a.second=ji(s)),e&&(a.weekday=e.length>3?Mb.indexOf(e)+1:Lb.indexOf(e)+1),a}function fO(e){let[,t,r,n,i,o,s,a,u,d,p,m]=e,w=Ab(t,i,n,r,o,s,a),_;return u?_=uO[u]:d?_=0:_=Vs(p,m),[w,new He(_)]}function pO(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}function n6(e){let[,t,r,n,i,o,s,a]=e;return[Ab(t,i,n,r,o,s,a),He.utcInstance]}function wO(e){let[,t,r,n,i,o,s,a]=e;return[Ab(t,a,r,n,i,o,s),He.utcInstance]}function u6(e){return _l(e,[yO,c6],[bO,SO],[_O,xO],[vO,CO])}function d6(e){return _l(pO(e),[dO,fO])}function f6(e){return _l(e,[mO,n6],[hO,n6],[gO,wO])}function p6(e){return _l(e,[lO,cO])}function m6(e){return _l(e,[aO,TO])}function h6(e){return _l(e,[EO,c6],[MO,LO])}var i6,s6,QD,Ib,a6,Pb,KD,eO,tO,rO,nO,iO,l6,oO,aO,lO,uO,dO,mO,hO,gO,yO,bO,_O,vO,c6,SO,xO,CO,TO,EO,MO,LO,Nb=L(()=>{$r();I1();fl();Ro();i6=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;s6=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,QD=`(?:${s6.source}?(?:\\[(${i6.source})\\])?)?`,Ib=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,a6=RegExp(`${Ib.source}${QD}`),Pb=RegExp(`(?:T${a6.source})?`),KD=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,eO=/(\d{4})-?W(\d\d)(?:-?(\d))?/,tO=/(\d{4})-?(\d{3})/,rO=o6("weekYear","weekNumber","weekDay"),nO=o6("year","ordinal"),iO=/(\d{4})-(\d\d)-(\d\d)/,l6=RegExp(`${Ib.source} ?(?:${s6.source}|(${i6.source}))?`),oO=RegExp(`(?: ${l6.source})?`);aO=RegExp(`^T?${Ib.source}$`),lO=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;uO={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};dO=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;mO=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,hO=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,gO=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;yO=yl(KD,Pb),bO=yl(eO,Pb),_O=yl(tO,Pb),vO=yl(a6),c6=bl(sO,vl,qu,ju),SO=bl(rO,vl,qu,ju),xO=bl(nO,vl,qu,ju),CO=bl(vl,qu,ju);TO=bl(vl);EO=yl(iO,oO),MO=yl(l6),LO=bl(vl,qu,ju)});function Uo(e,t,r=!1){let n={values:r?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new gt(n)}function b6(e,t){let r=t.milliseconds??0;for(let n of AO.slice(1))t[n]&&(r+=t[n]*e[n].milliseconds);return r}function w6(e,t){let r=b6(e,t)<0?-1:1;zs.reduceRight((n,i)=>{if(_e(t[i]))return n;if(n){let o=t[n]*r,s=e[i][n],a=Math.floor(o/s);t[i]+=a*r,t[n]-=a*s*r}return i},null),zs.reduce((n,i)=>{if(_e(t[i]))return n;if(n){let o=t[n]%1;t[n]-=o,t[i]+=o*e[n][i]}return i},null)}function NO(e){let t={};for(let[r,n]of Object.entries(e))n!==0&&(t[r]=n);return t}var g6,y6,IO,En,Sl,PO,zs,AO,gt,Hu=L(()=>{Po();Bu();Fu();$u();Nb();$r();Do();Oo();g6="Invalid Duration",y6={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},IO={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...y6},En=146097/400,Sl=146097/4800,PO={years:{quarters:4,months:12,weeks:En/7,days:En,hours:En*24,minutes:En*24*60,seconds:En*24*60*60,milliseconds:En*24*60*60*1e3},quarters:{months:3,weeks:En/28,days:En/4,hours:En*24/4,minutes:En*24*60/4,seconds:En*24*60*60/4,milliseconds:En*24*60*60*1e3/4},months:{weeks:Sl/7,days:Sl,hours:Sl*24,minutes:Sl*24*60,seconds:Sl*24*60*60,milliseconds:Sl*24*60*60*1e3},...y6},zs=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],AO=zs.slice(0).reverse();gt=class e{constructor(t){let r=t.conversionAccuracy==="longterm"||!1,n=r?PO:IO;t.matrix&&(n=t.matrix),this.values=t.values,this.loc=t.loc||Ue.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,r){return e.fromObject({milliseconds:t},r)}static fromObject(t,r={}){if(t==null||typeof t!="object")throw new xt(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new e({values:gl(t,e.normalizeUnit),loc:Ue.fromObject(r),conversionAccuracy:r.conversionAccuracy,matrix:r.matrix})}static fromDurationLike(t){if(jn(t))return e.fromMillis(t);if(e.isDuration(t))return t;if(typeof t=="object")return e.fromObject(t);throw new xt(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,r){let[n]=p6(t);return n?e.fromObject(n,r):e.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,r){let[n]=m6(t);return n?e.fromObject(n,r):e.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,r=null){if(!t)throw new xt("need to specify a reason the Duration is invalid");let n=t instanceof tr?t:new tr(t,r);if(Ve.throwOnInvalid)throw new _1(n);return new e({invalid:n})}static normalizeUnit(t){let r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!r)throw new cl(t);return r}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,r={}){let n={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?rr.create(this.loc,n).formatDurationFromString(this,t):g6}toHuman(t={}){if(!this.isValid)return g6;let r=zs.map(n=>{let i=this.values[n];return _e(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:n.slice(0,-1)}).format(i)}).filter(n=>n);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=dl(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;let r=this.toMillis();return r<0||r>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},oe.fromMillis(r,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?b6(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;let r=e.fromDurationLike(t),n={};for(let i of zs)(Fo(r.values,i)||Fo(this.values,i))&&(n[i]=r.get(i)+this.get(i));return Uo(this,{values:n},!0)}minus(t){if(!this.isValid)return this;let r=e.fromDurationLike(t);return this.plus(r.negate())}mapUnits(t){if(!this.isValid)return this;let r={};for(let n of Object.keys(this.values))r[n]=Tb(t(this.values[n],n));return Uo(this,{values:r},!0)}get(t){return this[e.normalizeUnit(t)]}set(t){if(!this.isValid)return this;let r={...this.values,...gl(t,e.normalizeUnit)};return Uo(this,{values:r})}reconfigure({locale:t,numberingSystem:r,conversionAccuracy:n,matrix:i}={}){let s={loc:this.loc.clone({locale:t,numberingSystem:r}),matrix:i,conversionAccuracy:n};return Uo(this,s)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;let t=this.toObject();return w6(this.matrix,t),Uo(this,{values:t},!0)}rescale(){if(!this.isValid)return this;let t=NO(this.normalize().shiftToAll().toObject());return Uo(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(s=>e.normalizeUnit(s));let r={},n={},i=this.toObject(),o;for(let s of zs)if(t.indexOf(s)>=0){o=s;let a=0;for(let d in n)a+=this.matrix[d][s]*n[d],n[d]=0;jn(i[s])&&(a+=i[s]);let u=Math.trunc(a);r[s]=u,n[s]=(a*1e3-u*1e3)/1e3}else jn(i[s])&&(n[s]=i[s]);for(let s in n)n[s]!==0&&(r[o]+=s===o?n[s]:n[s]/this.matrix[o][s]);return w6(this.matrix,r),Uo(this,{values:r},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let t={};for(let r of Object.keys(this.values))t[r]=this.values[r]===0?0:-this.values[r];return Uo(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function r(n,i){return n===void 0||n===0?i===void 0||i===0:n===i}for(let n of zs)if(!r(this.values[n],t.values[n]))return!1;return!0}}});function kO(e,t){return!e||!e.isValid?Hi.invalid("missing or invalid start"):!t||!t.isValid?Hi.invalid("missing or invalid end"):t<e?Hi.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}var xl,Hi,kb=L(()=>{Oo();Hu();Do();Po();Fu();Bu();Ru();xl="Invalid Interval";Hi=class e{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,r=null){if(!t)throw new xt("need to specify a reason the Interval is invalid");let n=t instanceof tr?t:new tr(t,r);if(Ve.throwOnInvalid)throw new b1(n);return new e({invalid:n})}static fromDateTimes(t,r){let n=Cl(t),i=Cl(r),o=kO(n,i);return o??new e({start:n,end:i})}static after(t,r){let n=gt.fromDurationLike(r),i=Cl(t);return e.fromDateTimes(i,i.plus(n))}static before(t,r){let n=gt.fromDurationLike(r),i=Cl(t);return e.fromDateTimes(i.minus(n),i)}static fromISO(t,r){let[n,i]=(t||"").split("/",2);if(n&&i){let o,s;try{o=oe.fromISO(n,r),s=o.isValid}catch{s=!1}let a,u;try{a=oe.fromISO(i,r),u=a.isValid}catch{u=!1}if(s&&u)return e.fromDateTimes(o,a);if(s){let d=gt.fromISO(i,r);if(d.isValid)return e.after(o,d)}else if(u){let d=gt.fromISO(n,r);if(d.isValid)return e.before(a,d)}}return e.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",r){if(!this.isValid)return NaN;let n=this.start.startOf(t,r),i;return r?.useLocaleWeeks?i=this.end.reconfigure({locale:n.locale}):i=this.end,i=i.startOf(t,r),Math.floor(i.diff(n,t).get(t))+(i.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:r}={}){return this.isValid?e.fromDateTimes(t||this.s,r||this.e):this}splitAt(...t){if(!this.isValid)return[];let r=t.map(Cl).filter(s=>this.contains(s)).sort((s,a)=>s.toMillis()-a.toMillis()),n=[],{s:i}=this,o=0;for(;i<this.e;){let s=r[o]||this.e,a=+s>+this.e?this.e:s;n.push(e.fromDateTimes(i,a)),i=a,o+=1}return n}splitBy(t){let r=gt.fromDurationLike(t);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:n}=this,i=1,o,s=[];for(;n<this.e;){let a=this.start.plus(r.mapUnits(u=>u*i));o=+a>+this.e?this.e:a,s.push(e.fromDateTimes(n,o)),n=o,i+=1}return s}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;let r=this.s>t.s?this.s:t.s,n=this.e<t.e?this.e:t.e;return r>=n?null:e.fromDateTimes(r,n)}union(t){if(!this.isValid)return this;let r=this.s<t.s?this.s:t.s,n=this.e>t.e?this.e:t.e;return e.fromDateTimes(r,n)}static merge(t){let[r,n]=t.sort((i,o)=>i.s-o.s).reduce(([i,o],s)=>o?o.overlaps(s)||o.abutsStart(s)?[i,o.union(s)]:[i.concat([o]),s]:[i,s],[[],null]);return n&&r.push(n),r}static xor(t){let r=null,n=0,i=[],o=t.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),s=Array.prototype.concat(...o),a=s.sort((u,d)=>u.time-d.time);for(let u of a)n+=u.type==="s"?1:-1,n===1?r=u.time:(r&&+r!=+u.time&&i.push(e.fromDateTimes(r,u.time)),r=null);return e.merge(i)}difference(...t){return e.xor([this].concat(t)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:xl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=Ao,r={}){return this.isValid?rr.create(this.s.loc.clone(r),t).formatInterval(this):xl}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:xl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:xl}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:xl}toFormat(t,{separator:r=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(t)}${r}${this.e.toFormat(t)}`:xl}toDuration(t,r){return this.isValid?this.e.diff(this.s,t,r):gt.invalid(this.invalidReason)}mapEndpoints(t){return e.fromDateTimes(t(this.s),t(this.e))}}});var Zi,Rb=L(()=>{Oo();Do();$u();Ro();P1();$r();Zi=class{static hasDST(t=Ve.defaultZone){let r=oe.now().setZone(t).set({month:12});return!t.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(t){return Ct.isValidZone(t)}static normalizeZone(t){return qn(t,Ve.defaultZone)}static getStartOfWeek({locale:t=null,locObj:r=null}={}){return(r||Ue.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:r=null}={}){return(r||Ue.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:r=null}={}){return(r||Ue.create(t)).getWeekendDays().slice()}static months(t="long",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||Ue.create(r,n,o)).months(t)}static monthsFormat(t="long",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||Ue.create(r,n,o)).months(t,!0)}static weekdays(t="long",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Ue.create(r,n,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Ue.create(r,n,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Ue.create(t).meridiems()}static eras(t="short",{locale:r=null}={}){return Ue.create(r,null,"gregory").eras(t)}static features(){return{relative:M1(),localeWeek:L1()}}}});function _6(e,t){let r=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=r(t)-r(e);return Math.floor(gt.fromMillis(n).as("days"))}function RO(e,t,r){let n=[["years",(u,d)=>d.year-u.year],["quarters",(u,d)=>d.quarter-u.quarter+(d.year-u.year)*4],["months",(u,d)=>d.month-u.month+(d.year-u.year)*12],["weeks",(u,d)=>{let p=_6(u,d);return(p-p%7)/7}],["days",_6]],i={},o=e,s,a;for(let[u,d]of n)r.indexOf(u)>=0&&(s=u,i[u]=d(e,t),a=o.plus(i),a>t?(i[u]--,e=o.plus(i),e>t&&(a=e,i[u]--,e=o.plus(i))):e=a);return[e,i,a,s]}function v6(e,t,r,n){let[i,o,s,a]=RO(e,t,r),u=t-i,d=r.filter(m=>["hours","minutes","seconds","milliseconds"].indexOf(m)>=0);d.length===0&&(s<t&&(s=i.plus({[a]:1})),s!==i&&(o[a]=(o[a]||0)+u/(s-i)));let p=gt.fromObject(o,n);return d.length>0?gt.fromMillis(u,n).shiftTo(...d).plus(p):p}var S6=L(()=>{Hu()});function qe(e,t=r=>r){return{regex:e,deser:([r])=>t(N7(r))}}function $O(e){return e.replace(/\./g,"\\.?").replace(E6,T6)}function x6(e){return e.replace(/\./g,"").replace(E6," ").toLowerCase()}function Hn(e,t){return e===null?null:{regex:RegExp(e.map($O).join("|")),deser:([r])=>e.findIndex(n=>x6(r)===x6(n))+t}}function C6(e,t){return{regex:e,deser:([,r,n])=>Vs(r,n),groups:t}}function R1(e){return{regex:e,deser:([t])=>t}}function FO(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function VO(e,t){let r=Cn(t),n=Cn(t,"{2}"),i=Cn(t,"{3}"),o=Cn(t,"{4}"),s=Cn(t,"{6}"),a=Cn(t,"{1,2}"),u=Cn(t,"{1,3}"),d=Cn(t,"{1,6}"),p=Cn(t,"{1,9}"),m=Cn(t,"{2,4}"),w=Cn(t,"{4,6}"),_=M=>({regex:RegExp(FO(M.val)),deser:([k])=>k,literal:!0}),C=(M=>{if(e.literal)return _(M);switch(M.val){case"G":return Hn(t.eras("short"),0);case"GG":return Hn(t.eras("long"),0);case"y":return qe(d);case"yy":return qe(m,Gu);case"yyyy":return qe(o);case"yyyyy":return qe(w);case"yyyyyy":return qe(s);case"M":return qe(a);case"MM":return qe(n);case"MMM":return Hn(t.months("short",!0),1);case"MMMM":return Hn(t.months("long",!0),1);case"L":return qe(a);case"LL":return qe(n);case"LLL":return Hn(t.months("short",!1),1);case"LLLL":return Hn(t.months("long",!1),1);case"d":return qe(a);case"dd":return qe(n);case"o":return qe(u);case"ooo":return qe(i);case"HH":return qe(n);case"H":return qe(a);case"hh":return qe(n);case"h":return qe(a);case"mm":return qe(n);case"m":return qe(a);case"q":return qe(a);case"qq":return qe(n);case"s":return qe(a);case"ss":return qe(n);case"S":return qe(u);case"SSS":return qe(i);case"u":return R1(p);case"uu":return R1(a);case"uuu":return qe(r);case"a":return Hn(t.meridiems(),0);case"kkkk":return qe(o);case"kk":return qe(m,Gu);case"W":return qe(a);case"WW":return qe(n);case"E":case"c":return qe(r);case"EEE":return Hn(t.weekdays("short",!1),1);case"EEEE":return Hn(t.weekdays("long",!1),1);case"ccc":return Hn(t.weekdays("short",!0),1);case"cccc":return Hn(t.weekdays("long",!0),1);case"Z":case"ZZ":return C6(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return C6(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return R1(/[a-z_+-/]{1,256}?/i);case" ":return R1(/[^\S\n\r]/);default:return _(M)}})(e)||{invalidReason:DO};return C.token=e,C}function WO(e,t,r){let{type:n,value:i}=e;if(n==="literal"){let u=/^\s+$/.test(i);return{literal:!u,val:u?" ":i}}let o=t[n],s=n;n==="hour"&&(t.hour12!=null?s=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?s="hour12":s="hour24":s=r.hour12?"hour12":"hour24");let a=UO[s];if(typeof a=="object"&&(a=a[o]),a)return{literal:!1,val:a}}function zO(e){return[`^${e.map(r=>r.regex).reduce((r,n)=>`${r}(${n.source})`,"")}$`,e]}function GO(e,t,r){let n=e.match(t);if(n){let i={},o=1;for(let s in r)if(Fo(r,s)){let a=r[s],u=a.groups?a.groups+1:1;!a.literal&&a.token&&(i[a.token.val[0]]=a.deser(n.slice(o,o+u))),o+=u}return[n,i]}else return[n,{}]}function BO(e){let t=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},r=null,n;return _e(e.z)||(r=Ct.create(e.z)),_e(e.Z)||(r||(r=new He(e.Z)),n=e.Z),_e(e.q)||(e.M=(e.q-1)*3+1),_e(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),_e(e.u)||(e.S=zu(e.u)),[Object.keys(e).reduce((o,s)=>{let a=t(s);return a&&(o[a]=e[s]),o},{}),r,n]}function qO(){return Db||(Db=oe.fromMillis(1555555555555)),Db}function jO(e,t){if(e.literal)return e;let r=rr.macroTokenToFormatOpts(e.val),n=Fb(r,t);return n==null||n.includes(void 0)?e:n}function Ob(e,t){return Array.prototype.concat(...e.map(r=>jO(r,t)))}function $b(e,t,r){return new Zu(e,r).explainFromTokens(t)}function M6(e,t,r){let{result:n,zone:i,specificOffset:o,invalidReason:s}=$b(e,t,r);return[n,i,o,s]}function Fb(e,t){if(!e)return null;let n=rr.create(t,e).dtFormatter(qO()),i=n.formatToParts(),o=n.resolvedOptions();return i.map(s=>WO(s,e,o))}var DO,OO,T6,E6,UO,Db,Zu,L6=L(()=>{$r();Bu();fl();Ro();Oo();wb();Po();DO="missing Intl.DateTimeFormat.formatToParts support";OO="\xA0",T6=`[ ${OO}]`,E6=new RegExp(T6,"g");UO={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};Db=null;Zu=class{constructor(t,r){if(this.locale=t,this.format=r,this.tokens=Ob(rr.parseFormat(r),t),this.units=this.tokens.map(n=>VO(n,t)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){let[n,i]=zO(this.units);this.regex=RegExp(n,"i"),this.handlers=i}}explainFromTokens(t){if(this.isValid){let[r,n]=GO(t,this.regex,this.handlers),[i,o,s]=n?BO(n):[null,null,void 0];if(Fo(n,"a")&&Fo(n,"H"))throw new zn("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:r,matches:n,result:i,zone:o,specificOffset:s}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}});function Yu(e){return new tr("unsupported zone",`the zone "${e.name}" is not supported`)}function Ub(e){return e.weekData===null&&(e.weekData=Vu(e.c)),e.weekData}function Wb(e){return e.localWeekData===null&&(e.localWeekData=Vu(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Gs(e,t){let r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new oe({...r,...t,old:r})}function O6(e,t,r){let n=e-t*60*1e3,i=r.offset(n);if(t===i)return[n,t];n-=(i-t)*60*1e3;let o=r.offset(n);return i===o?[n,i]:[e-Math.min(i,o)*60*1e3,Math.max(i,o)]}function D1(e,t){e+=t*60*1e3;let r=new Date(e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function $1(e,t,r){return O6(ul(e),t,r)}function P6(e,t){let r=e.o,n=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,o={...e.c,year:n,month:i,day:Math.min(e.c.day,hl(n,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},s=gt.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=ul(o),[u,d]=O6(a,r,e.zone);return s!==0&&(u+=s,d=e.zone.offset(u)),{ts:u,o:d}}function Tl(e,t,r,n,i,o){let{setZone:s,zone:a}=r;if(e&&Object.keys(e).length!==0||t){let u=t||a,d=oe.fromObject(e,{...r,zone:u,specificOffset:o});return s?d:d.setZone(a)}else return oe.invalid(new tr("unparsable",`the input "${i}" can't be parsed as ${n}`))}function O1(e,t,r=!0){return e.isValid?rr.create(Ue.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,t):null}function zb(e,t){let r=e.c.year>9999||e.c.year<0,n="";return r&&e.c.year>=0&&(n+="+"),n+=ht(e.c.year,r?6:4),t?(n+="-",n+=ht(e.c.month),n+="-",n+=ht(e.c.day)):(n+=ht(e.c.month),n+=ht(e.c.day)),n}function A6(e,t,r,n,i,o){let s=ht(e.c.hour);return t?(s+=":",s+=ht(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!r)&&(s+=":")):s+=ht(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!r)&&(s+=ht(e.c.second),(e.c.millisecond!==0||!n)&&(s+=".",s+=ht(e.c.millisecond,3))),i&&(e.isOffsetFixed&&e.offset===0&&!o?s+="Z":e.o<0?(s+="-",s+=ht(Math.trunc(-e.o/60)),s+=":",s+=ht(Math.trunc(-e.o%60))):(s+="+",s+=ht(Math.trunc(e.o/60)),s+=":",s+=ht(Math.trunc(e.o%60)))),o&&(s+="["+e.zone.ianaName+"]"),s}function XO(e){let t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new cl(e);return t}function N6(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return XO(e)}}function QO(e){return V1[e]||(F1===void 0&&(F1=Ve.now()),V1[e]=e.offset(F1)),V1[e]}function k6(e,t){let r=qn(t.zone,Ve.defaultZone);if(!r.isValid)return oe.invalid(Yu(r));let n=Ue.fromObject(t),i,o;if(_e(e.year))i=Ve.now();else{for(let u of F6)_e(e[u])&&(e[u]=$6[u]);let s=vb(e)||Sb(e);if(s)return oe.invalid(s);let a=QO(r);[i,o]=$1(e,a,r)}return new oe({ts:i,zone:r,loc:n,o})}function R6(e,t,r){let n=_e(r.round)?!0:r.round,i=(s,a)=>(s=dl(s,n||r.calendary?0:2,!0),t.loc.clone(r).relFormatter(r).format(s,a)),o=s=>r.calendary?t.hasSame(e,s)?0:t.startOf(s).diff(e.startOf(s),s).get(s):t.diff(e,s).get(s);if(r.unit)return i(o(r.unit),r.unit);for(let s of r.units){let a=o(s);if(Math.abs(a)>=1)return i(a,s)}return i(e>t?-0:0,r.units[r.units.length-1])}function D6(e){let t={},r;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],r=Array.from(e).slice(0,e.length-1)):r=Array.from(e),[t,r]}function Cl(e){if(oe.isDateTime(e))return e;if(e&&e.valueOf&&jn(e.valueOf()))return oe.fromJSDate(e);if(e&&typeof e=="object")return oe.fromObject(e);throw new xt(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var Vb,I6,$6,HO,ZO,F6,YO,JO,F1,V1,oe,Oo=L(()=>{Hu();kb();Do();Rb();Bu();fl();$u();$r();P1();S6();Nb();L6();xb();Ru();Po();Fu();Vb="Invalid DateTime",I6=864e13;$6={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},HO={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ZO={ordinal:1,hour:0,minute:0,second:0,millisecond:0},F6=["year","month","day","hour","minute","second","millisecond"],YO=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],JO=["year","ordinal","hour","minute","second","millisecond"];V1={},oe=class e{constructor(t){let r=t.zone||Ve.defaultZone,n=t.invalid||(Number.isNaN(t.ts)?new tr("invalid input"):null)||(r.isValid?null:Yu(r));this.ts=_e(t.ts)?Ve.now():t.ts;let i=null,o=null;if(!n)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(r))[i,o]=[t.old.c,t.old.o];else{let a=jn(t.o)&&!t.old?t.o:r.offset(this.ts);i=D1(this.ts,a),n=Number.isNaN(i.year)?new tr("invalid input"):null,i=n?null:i,o=n?null:a}this._zone=r,this.loc=t.loc||Ue.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=o,this.isLuxonDateTime=!0}static now(){return new e({})}static local(){let[t,r]=D6(arguments),[n,i,o,s,a,u,d]=r;return k6({year:n,month:i,day:o,hour:s,minute:a,second:u,millisecond:d},t)}static utc(){let[t,r]=D6(arguments),[n,i,o,s,a,u,d]=r;return t.zone=He.utcInstance,k6({year:n,month:i,day:o,hour:s,minute:a,second:u,millisecond:d},t)}static fromJSDate(t,r={}){let n=Y7(t)?t.valueOf():NaN;if(Number.isNaN(n))return e.invalid("invalid input");let i=qn(r.zone,Ve.defaultZone);return i.isValid?new e({ts:n,zone:i,loc:Ue.fromObject(r)}):e.invalid(Yu(i))}static fromMillis(t,r={}){if(jn(t))return t<-I6||t>I6?e.invalid("Timestamp out of range"):new e({ts:t,zone:qn(r.zone,Ve.defaultZone),loc:Ue.fromObject(r)});throw new xt(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,r={}){if(jn(t))return new e({ts:t*1e3,zone:qn(r.zone,Ve.defaultZone),loc:Ue.fromObject(r)});throw new xt("fromSeconds requires a numerical input")}static fromObject(t,r={}){t=t||{};let n=qn(r.zone,Ve.defaultZone);if(!n.isValid)return e.invalid(Yu(n));let i=Ue.fromObject(r),o=gl(t,N6),{minDaysInFirstWeek:s,startOfWeek:a}=_b(o,i),u=Ve.now(),d=_e(r.specificOffset)?n.offset(u):r.specificOffset,p=!_e(o.ordinal),m=!_e(o.year),w=!_e(o.month)||!_e(o.day),_=m||w,S=o.weekYear||o.weekNumber;if((_||p)&&S)throw new zn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(w&&p)throw new zn("Can't mix ordinal dates with month/day");let C=S||o.weekday&&!_,M,k,I=D1(u,d);C?(M=YO,k=HO,I=Vu(I,s,a)):p?(M=JO,k=ZO,I=k1(I)):(M=F6,k=$6);let N=!1;for(let be of M){let de=o[be];_e(de)?N?o[be]=k[be]:o[be]=I[be]:N=!0}let V=C?j7(o,s,a):p?H7(o):vb(o),Y=V||Sb(o);if(Y)return e.invalid(Y);let re=C?yb(o,s,a):p?bb(o):o,[te,ie]=$1(re,d,n),ge=new e({ts:te,zone:n,o:ie,loc:i});return o.weekday&&_&&t.weekday!==ge.weekday?e.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${ge.toISO()}`):ge.isValid?ge:e.invalid(ge.invalid)}static fromISO(t,r={}){let[n,i]=u6(t);return Tl(n,i,r,"ISO 8601",t)}static fromRFC2822(t,r={}){let[n,i]=d6(t);return Tl(n,i,r,"RFC 2822",t)}static fromHTTP(t,r={}){let[n,i]=f6(t);return Tl(n,i,r,"HTTP",r)}static fromFormat(t,r,n={}){if(_e(t)||_e(r))throw new xt("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:o=null}=n,s=Ue.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0}),[a,u,d,p]=M6(s,t,r);return p?e.invalid(p):Tl(a,u,n,`format ${r}`,t,d)}static fromString(t,r,n={}){return e.fromFormat(t,r,n)}static fromSQL(t,r={}){let[n,i]=h6(t);return Tl(n,i,r,"SQL",t)}static invalid(t,r=null){if(!t)throw new xt("need to specify a reason the DateTime is invalid");let n=t instanceof tr?t:new tr(t,r);if(Ve.throwOnInvalid)throw new y1(n);return new e({invalid:n})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,r={}){let n=Fb(t,Ue.fromObject(r));return n?n.map(i=>i?i.val:null).join(""):null}static expandFormat(t,r={}){return Ob(rr.parseFormat(t),Ue.fromObject(r)).map(i=>i.val).join("")}static resetCache(){F1=void 0,V1={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ub(this).weekYear:NaN}get weekNumber(){return this.isValid?Ub(this).weekNumber:NaN}get weekday(){return this.isValid?Ub(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Wb(this).weekday:NaN}get localWeekNumber(){return this.isValid?Wb(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Wb(this).weekYear:NaN}get ordinal(){return this.isValid?k1(this.c).ordinal:NaN}get monthShort(){return this.isValid?Zi.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Zi.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Zi.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Zi.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let t=864e5,r=6e4,n=ul(this.c),i=this.zone.offset(n-t),o=this.zone.offset(n+t),s=this.zone.offset(n-i*r),a=this.zone.offset(n-o*r);if(s===a)return[this];let u=n-s*r,d=n-a*r,p=D1(u,s),m=D1(d,a);return p.hour===m.hour&&p.minute===m.minute&&p.second===m.second&&p.millisecond===m.millisecond?[Gs(this,{ts:u}),Gs(this,{ts:d})]:[this]}get isInLeapYear(){return Ws(this.year)}get daysInMonth(){return hl(this.year,this.month)}get daysInYear(){return this.isValid?$o(this.year):NaN}get weeksInWeekYear(){return this.isValid?Us(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Us(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){let{locale:r,numberingSystem:n,calendar:i}=rr.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:r,numberingSystem:n,outputCalendar:i}}toUTC(t=0,r={}){return this.setZone(He.instance(t),r)}toLocal(){return this.setZone(Ve.defaultZone)}setZone(t,{keepLocalTime:r=!1,keepCalendarTime:n=!1}={}){if(t=qn(t,Ve.defaultZone),t.equals(this.zone))return this;if(t.isValid){let i=this.ts;if(r||n){let o=t.offset(this.ts),s=this.toObject();[i]=$1(s,o,t)}return Gs(this,{ts:i,zone:t})}else return e.invalid(Yu(t))}reconfigure({locale:t,numberingSystem:r,outputCalendar:n}={}){let i=this.loc.clone({locale:t,numberingSystem:r,outputCalendar:n});return Gs(this,{loc:i})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;let r=gl(t,N6),{minDaysInFirstWeek:n,startOfWeek:i}=_b(r,this.loc),o=!_e(r.weekYear)||!_e(r.weekNumber)||!_e(r.weekday),s=!_e(r.ordinal),a=!_e(r.year),u=!_e(r.month)||!_e(r.day),d=a||u,p=r.weekYear||r.weekNumber;if((d||s)&&p)throw new zn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&s)throw new zn("Can't mix ordinal dates with month/day");let m;o?m=yb({...Vu(this.c,n,i),...r},n,i):_e(r.ordinal)?(m={...this.toObject(),...r},_e(r.day)&&(m.day=Math.min(hl(m.year,m.month),m.day))):m=bb({...k1(this.c),...r});let[w,_]=$1(m,this.o,this.zone);return Gs(this,{ts:w,o:_})}plus(t){if(!this.isValid)return this;let r=gt.fromDurationLike(t);return Gs(this,P6(this,r))}minus(t){if(!this.isValid)return this;let r=gt.fromDurationLike(t).negate();return Gs(this,P6(this,r))}startOf(t,{useLocaleWeeks:r=!1}={}){if(!this.isValid)return this;let n={},i=gt.normalizeUnit(t);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break;case"milliseconds":break}if(i==="weeks")if(r){let o=this.loc.getStartOfWeek(),{weekday:s}=this;s<o&&(n.weekNumber=this.weekNumber-1),n.weekday=o}else n.weekday=1;if(i==="quarters"){let o=Math.ceil(this.month/3);n.month=(o-1)*3+1}return this.set(n)}endOf(t,r){return this.isValid?this.plus({[t]:1}).startOf(t,r).minus(1):this}toFormat(t,r={}){return this.isValid?rr.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,t):Vb}toLocaleString(t=Ao,r={}){return this.isValid?rr.create(this.loc.clone(r),t).formatDateTime(this):Vb}toLocaleParts(t={}){return this.isValid?rr.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:r=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:o=!1}={}){if(!this.isValid)return null;let s=t==="extended",a=zb(this,s);return a+="T",a+=A6(this,s,r,n,i,o),a}toISODate({format:t="extended"}={}){return this.isValid?zb(this,t==="extended"):null}toISOWeekDate(){return O1(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:r=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:o=!1,format:s="extended"}={}){return this.isValid?(i?"T":"")+A6(this,s==="extended",r,t,n,o):null}toRFC2822(){return O1(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return O1(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?zb(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:r=!1,includeOffsetSpace:n=!0}={}){let i="HH:mm:ss.SSS";return(r||t)&&(n&&(i+=" "),r?i+="z":t&&(i+="ZZ")),O1(this,i,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Vb}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};let r={...this.c};return t.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,r="milliseconds",n={}){if(!this.isValid||!t.isValid)return gt.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...n},o=J7(r).map(gt.normalizeUnit),s=t.valueOf()>this.valueOf(),a=s?this:t,u=s?t:this,d=v6(a,u,o,i);return s?d.negate():d}diffNow(t="milliseconds",r={}){return this.diff(e.now(),t,r)}until(t){return this.isValid?Hi.fromDateTimes(this,t):this}hasSame(t,r,n){if(!this.isValid)return!1;let i=t.valueOf(),o=this.setZone(t.zone,{keepLocalTime:!0});return o.startOf(r,n)<=i&&i<=o.endOf(r,n)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;let r=t.base||e.fromObject({},{zone:this.zone}),n=t.padding?this<r?-t.padding:t.padding:0,i=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(i=t.unit,o=void 0),R6(r,this.plus(n),{...t,numeric:"always",units:i,unit:o})}toRelativeCalendar(t={}){return this.isValid?R6(t.base||e.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(e.isDateTime))throw new xt("min requires all arguments be DateTimes");return Cb(t,r=>r.valueOf(),Math.min)}static max(...t){if(!t.every(e.isDateTime))throw new xt("max requires all arguments be DateTimes");return Cb(t,r=>r.valueOf(),Math.max)}static fromFormatExplain(t,r,n={}){let{locale:i=null,numberingSystem:o=null}=n,s=Ue.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});return $b(s,t,r)}static fromStringExplain(t,r,n={}){return e.fromFormatExplain(t,r,n)}static buildFormatParser(t,r={}){let{locale:n=null,numberingSystem:i=null}=r,o=Ue.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new Zu(o,t)}static fromFormatParser(t,r,n={}){if(_e(t)||_e(r))throw new xt("fromFormatParser requires an input string and a format parser");let{locale:i=null,numberingSystem:o=null}=n,s=Ue.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});if(!s.equals(r.locale))throw new xt(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${r.locale}`);let{result:a,zone:u,specificOffset:d,invalidReason:p}=r.explainFromTokens(t);return p?e.invalid(p):Tl(a,u,n,`format ${r.format}`,t,d)}static get DATE_SHORT(){return Ao}static get DATE_MED(){return hu}static get DATE_MED_WITH_WEEKDAY(){return K2}static get DATE_FULL(){return gu}static get DATE_HUGE(){return wu}static get TIME_SIMPLE(){return yu}static get TIME_WITH_SECONDS(){return bu}static get TIME_WITH_SHORT_OFFSET(){return _u}static get TIME_WITH_LONG_OFFSET(){return vu}static get TIME_24_SIMPLE(){return Su}static get TIME_24_WITH_SECONDS(){return xu}static get TIME_24_WITH_SHORT_OFFSET(){return Cu}static get TIME_24_WITH_LONG_OFFSET(){return Tu}static get DATETIME_SHORT(){return Eu}static get DATETIME_SHORT_WITH_SECONDS(){return Mu}static get DATETIME_MED(){return Lu}static get DATETIME_MED_WITH_SECONDS(){return Iu}static get DATETIME_MED_WITH_WEEKDAY(){return eb}static get DATETIME_FULL(){return Pu}static get DATETIME_FULL_WITH_SECONDS(){return Au}static get DATETIME_HUGE(){return Nu}static get DATETIME_HUGE_WITH_SECONDS(){return ku}}});var Fr=L(()=>{Oo();Hu();kb();Rb();Fs();fl();Ro();hb();S1();Do()});function Bs(e){return e instanceof kt?e===qt.instance:e?.toString().toLowerCase()==="unknown"}function U1(e){return Bs(e)?qt.instance:e}var qt,Ju=L(()=>{Fr();qt=class{};qt.instance=new Ct("Etc/UTC")});function El(e,t,r){return e<t?e-t:e>r?e-r:0}function Ml(e,t,r){return e<t?t:e>r?r:e}function Zn(e,t=!0){if(e instanceof kt)return e;if(e.toLowerCase()==="system")return"system";if(e.toLowerCase()==="utc")return"UTC";if(e.toLowerCase()==="unknown")return qt.instance;if(/^[+-]?[0-9]{1,2}([:][0-9]{2})?$/.test(e)){let n=He.parseSpecifier("UTC"+(e.startsWith("+")||e.startsWith("-")?"":"+")+e);if(n)return n}let r=Ct.create(e);if(!r.isValid){if(t)throw new Gb(W1.TimeZoneNotRecognized);return null}return r}var W1,KO,Gb,qs,Bb=L(()=>{Io();Ju();Fr();(function(e){e.TimeZoneNotRecognized="TimeZoneNotRecognized"})(W1||(W1={}));KO={[W1.TimeZoneNotRecognized]:"Timezone identifier has not been recognized."},Gb=class e extends Error{constructor(t,r){super(gi(KO[t],r)),this.declaredRootClass="esri.arcade.arcadedate.dateerror",Error.captureStackTrace&&Error.captureStackTrace(this,e)}};qs=class e{constructor(t){this._date=t,this.declaredRootClass="esri.arcade.arcadedate"}static fromParts(t=0,r=1,n=1,i=0,o=0,s=0,a=0,u){if(isNaN(t)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(o)||isNaN(s)||isNaN(a))return null;let d=oe.local(t,r).daysInMonth,p=oe.fromObject({day:Ml(n,1,d),year:t,month:Ml(r,1,12),hour:Ml(i,0,23),minute:Ml(o,0,59),second:Ml(s,0,59),millisecond:Ml(a,0,999)},{zone:Zn(u)});return p=p.plus({months:El(r,1,12),days:El(n,1,d),hours:El(i,0,23),minutes:El(o,0,59),seconds:El(s,0,59),milliseconds:El(a,0,999)}),new e(p)}static get systemTimeZoneCanonicalName(){return Intl.DateTimeFormat().resolvedOptions().timeZone??"system"}static arcadeDateAndZoneToArcadeDate(t,r){let n=Zn(r);return t.isUnknownTimeZone||n===qt.instance?e.fromParts(t.year,t.monthJS+1,t.day,t.hour,t.minute,t.second,t.millisecond,n):new e(t._date.setZone(n))}static dateJSToArcadeDate(t){return new e(oe.fromJSDate(t,{zone:"system"}))}static dateJSAndZoneToArcadeDate(t,r="system"){let n=Zn(r);return new e(oe.fromJSDate(t,{zone:n}))}static unknownEpochToArcadeDate(t){return new e(oe.fromMillis(t,{zone:qt.instance}))}static unknownDateJSToArcadeDate(t){return new e(oe.fromMillis(t.getTime(),{zone:qt.instance}))}static epochToArcadeDate(t,r="system"){let n=Zn(r);return new e(oe.fromMillis(t,{zone:n}))}static dateTimeToArcadeDate(t){return new e(t)}clone(){return new e(this._date)}changeTimeZone(t){let r=Zn(t);return e.dateTimeToArcadeDate(this._date.setZone(r))}static dateTimeAndZoneToArcadeDate(t,r){let n=Zn(r);return t.zone===qt.instance||n===qt.instance?e.fromParts(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond,n):new e(t.setZone(n))}static nowToArcadeDate(t){let r=Zn(t);return new e(oe.fromJSDate(new Date,{zone:r}))}static nowUTCToArcadeDate(){return new e(oe.utc())}get isSystem(){return this.timeZone==="system"||this.timeZone===e.systemTimeZoneCanonicalName}equals(t){return this.isSystem&&t.isSystem?this.toNumber()===t.toNumber():this.isUnknownTimeZone===t.isUnknownTimeZone&&this._date.equals(t._date)}get isUnknownTimeZone(){return this._date.zone===qt.instance}get isValid(){return this._date.isValid}get hour(){return this._date.hour}get second(){return this._date.second}get day(){return this._date.day}get dayOfWeekISO(){return this._date.weekday}get dayOfWeekJS(){let t=this._date.weekday;return t>6&&(t=0),t}get millisecond(){return this._date.millisecond}get monthISO(){return this._date.month}get weekISO(){return this._date.weekNumber}get yearISO(){return this._date.weekYear}get monthJS(){return this._date.month-1}get year(){return this._date.year}get minute(){return this._date.minute}get zone(){return this._date.zone}get timeZoneOffset(){return this.isUnknownTimeZone?0:this._date.offset}get timeZone(){if(this.isUnknownTimeZone)return"unknown";if(this._date.zone.type==="system")return"system";let t=this.zone;return t.type==="fixed"?t.fixed===0?"UTC":t.formatOffset(0,"short"):t.name}stringify(){return JSON.stringify(this.toJSDate())}plus(t){return new e(this._date.plus(t))}diff(t,r="milliseconds"){return this._date.diff(t._date,r)[r]}toISODate(){return this._date.toISODate()}toISOString(t){return t?this._date.toISO({suppressMilliseconds:!0,includeOffset:!this.isUnknownTimeZone}):this._date.toISO({includeOffset:!this.isUnknownTimeZone})}toISOTime(t,r){return this._date.toISOTime({suppressMilliseconds:t,includeOffset:r&&!this.isUnknownTimeZone})}toFormat(t,r){return this.isUnknownTimeZone&&(t=t.replaceAll("Z","")),this._date.toFormat(t,r)}toJSDate(){return this._date.toJSDate()}toSQLValue(){return this._date.toFormat("yyyy-LL-dd HH:mm:ss")}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}toDateTime(){return this._date}toNumber(){return this._date.toMillis()}getTime(){return this._date.toMillis()}toUTC(){return new e(this._date.toUTC())}toLocal(){return new e(this._date.toLocal())}toString(){return this.toISOString(!0)}static fromReaderAsTimeStampOffset(t){if(!t)return null;let r=oe.fromISO(t,{setZone:!0});return new e(r)}}});var F,e$,z,Yn,Hre,Wo=L(()=>{Io();(function(e){e.InvalidFunctionParameters="InvalidFunctionParameters",e.InvalidValueForAggregateFunction="InvalidValueForAggregateFunction",e.UnsupportedSqlFunction="UnsupportedSqlFunction",e.UnsupportedOperator="UnsupportedOperator",e.UnsupportedSyntax="UnsupportedSyntax",e.UnsupportedIsRhs="UnsupportedIsRhs",e.UnsupportedIsLhs="UnsupportedIsLhs",e.InvalidDataType="InvalidDataType",e.CannotCastValue="CannotCastValue",e.FunctionNotRecognized="FunctionNotRecognized",e.InvalidTime="InvalidTime",e.InvalidParameterCount="InvalidParameterCount",e.InvalidTimeStamp="InvalidTimeStamp",e.InvalidDate="InvalidDate",e.InvalidOperator="InvalidOperator",e.IllegalInterval="IllegalInterval",e.YearMonthIntervals="YearMonthIntervals",e.PrimarySecondaryQualifiers="PrimarySecondaryQualifiers",e.MissingStatisticParameters="MissingStatisticParameters"})(F||(F={}));e$={[F.InvalidValueForAggregateFunction]:"Invalid value used in aggregate function",[F.MissingStatisticParameters]:"Statistic does not have 1 or 0 Parameters",[F.InvalidFunctionParameters]:"Invalid parameters for call to {function}",[F.UnsupportedIsLhs]:"Unsupported left hand expression in is statement",[F.UnsupportedIsRhs]:"Unsupported right hand expression in is statement",[F.UnsupportedOperator]:"Unsupported operator - {operator}",[F.UnsupportedSyntax]:"Unsupported syntax - {node}",[F.UnsupportedSqlFunction]:"Sql function not found = {function}",[F.InvalidDataType]:"Invalid sql data type",[F.InvalidDate]:"Invalid date encountered",[F.InvalidOperator]:"Invalid operator encountered",[F.InvalidTime]:"Invalid time encountered",[F.IllegalInterval]:"Illegal interval",[F.FunctionNotRecognized]:"Function not recognized",[F.InvalidTimeStamp]:"Invalid timestamp encountered",[F.InvalidParameterCount]:"Invalid parameter count for call to {name}",[F.PrimarySecondaryQualifiers]:"Primary and Secondary SqlInterval qualifiers not supported",[F.YearMonthIntervals]:"Year-Month Intervals not supported",[F.CannotCastValue]:"Cannot cast value to the required data type"},z=class e extends Error{constructor(t,r){super(gi(e$[t],r)),this.declaredRootClass="esri.arcade.featureset.support.sqlerror",Error.captureStackTrace&&Error.captureStackTrace(this,e)}};(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"})(Yn||(Yn={}));Hre={[Yn.Cancelled]:"Cancelled",[Yn.InvalidStatResponse]:"Invalid statistics response from service",[Yn.InvalidRequest]:"Invalid request",[Yn.RequestFailed]:"Request failed - {reason}",[Yn.MissingFeatures]:"Missing features",[Yn.AggregationFieldNotFound]:"Aggregation field not found",[Yn.DataElementsNotFound]:"Data elements not found on service",[Yn.NeverReach]:"Encountered unreachable logic",[Yn.NotImplemented]:"Not implemented"}});function je(e){return e?{remove(){e&&(e(),e=void 0)}}:t$}function r$(e){e.forEach(t=>t?.remove())}function js(e){return je(()=>r$(e))}var t$,Yr=L(()=>{t$={remove:()=>{}}});function V6(){return i$??globalThis.navigator?.language??"en"}function ln(){return Xu===void 0&&(Xu=V6()),Xu}function qb(e){return z1.push(e),je(()=>z1.splice(z1.indexOf(e),1))}function Ll(e){return G1.push(e),je(()=>G1.splice(G1.indexOf(e),1))}function o$(){let e=n$??V6();Xu!==e&&([...G1].forEach(t=>t(e)),Xu=e,[...z1].forEach(t=>t(e)))}var n$,Xu,i$,z1,G1,Yi=L(()=>{Yr();i$=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;z1=[];G1=[];globalThis.addEventListener?.("languagechange",o$)});function U6(e){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let t="",r=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;for(let n of e.match(r)||[])switch(n){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"X":case"x":t+=n;break;default:n.length>=2&&n.slice(0,1)==="["&&n.slice(-1)==="]"?t+=`'${n.slice(1,-1)}'`:t+=`'${n}'`}return t}var jt,Qu=L(()=>{Bb();Yi();Fr();jt=class e{constructor(t,r,n){this._year=t,this._month=r,this._day=n,this.declaredRootClass="esri.core.sql.dateonly"}get month(){return this._month}get monthJS(){return this._month-1}get year(){return this._year}get day(){return this._day}get isValid(){return this.toDateTime("unknown").isValid}equals(t){return t instanceof e&&t.day===this.day&&t.month===this.month&&t.year===this.year}clone(){return new e(this._year,this._month,this._day)}toDateTime(t){return oe.fromObject({day:this.day,month:this.month,year:this.year},{zone:Zn(t)})}toDateTimeLuxon(t){return oe.fromObject({day:this.day,month:this.month,year:this.year},{zone:Zn(t)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(t=null,r=!0){if(t===null||t==="")return this.toString();if(r&&(t=U6(t)),!t)return"";let n=this.toDateTime("unknown");return qs.dateTimeToArcadeDate(n).toFormat(t,{locale:ln(),numberingSystem:"latn"})}toArcadeDate(){let t=this.toDateTime("unknown");return qs.dateTimeToArcadeDate(t)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd",!1)}toSQLValue(){return this.toFormat("yyyy-LL-dd",!1)}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd",!1)+"'"}plus(t,r){return e.fromDateTime(this.toUTCDateTime().plus({[t]:r}))}toUTCDateTime(){return oe.utc(this.year,this.month,this.day,0,0,0,0)}difference(t,r){switch(r.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(t.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(t.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return r==="M"?this.toUTCDateTime().diff(t.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(t.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(t.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(t.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(t.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(t.toUTCDateTime(),"years").years}}static fromMilliseconds(t){let r=oe.fromMillis(t,{zone:He.utcInstance});return r.isValid?e.fromParts(r.year,r.month,r.day):null}static fromSeconds(t){let r=oe.fromSeconds(t,{zone:He.utcInstance});return r.isValid?e.fromParts(r.year,r.month,r.day):null}static fromReader(t){if(!t)return null;let r=t.split("-");return r.length!==3?null:new e(parseInt(r[0],10),parseInt(r[1],10),parseInt(r[2],10))}static fromParts(t,r,n){let i=new e(t,r,n);return i.isValid===!1?null:i}static fromDateJS(t){return e.fromParts(t.getFullYear(),t.getMonth()+1,t.getDay())}static fromDateTime(t){return e.fromParts(t.year,t.month,t.day)}static fromSqlTimeStampOffset(t){return this.fromDateTime(t.toDateTime())}static fromString(t,r=null){if(t===""||t===null)return null;let n=[];if(r)(r=U6(r))&&n.push(r);else if(r===null||r===""){let i=oe.fromISO(t,{setZone:!0});return i.isValid?e.fromParts(i.year,i.month,i.day):null}for(let i of n){let o=oe.fromFormat(t,r??i);if(o.isValid)return new e(o.year,o.month,o.day)}return null}static fromNow(t="system"){let r=oe.fromJSDate(new Date).setZone(Zn(t));return new e(r.year,r.month,r.day)}}});function W6(e){return Number.isNaN(e)||e===0?e:Math.trunc(e)}var hr,Ku=L(()=>{Fr();hr=class e{constructor(t){this._timeStampOffset=t,this._date=null}toDateTime(){return this._date??(this._date=oe.fromISO(this._timeStampOffset,{setZone:!0})),this._date}get isValid(){return this.toDateTime().isValid}get timezoneOffsetHour(){return W6(this.toDateTime().offset/60)}get timezoneOffsetMinutes(){return W6(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 e.fromDateTime(this.toDateTime().startOf("day"))}static fromJSDate(t){return new e(oe.fromJSDate(t).toISO({includeOffset:!0}))}static fromDateTime(t){return new e(t.toISO({includeOffset:!0}))}static fromParts(t,r,n=0,i=0,o=0,s=0,a=0,u=!1,d=0,p=0){let m=`${t.toString().padStart(4,"0")}-${r.toString().padStart(2,"0")}-${n.toString().padStart(2,"0")}`,w="";s<10&&(w="0");let _=`${i.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${w+s.toString()}`;a!==0&&(_+="."+a.toString().padStart(3,"0"));let S=`${u?"-":"+"}${d.toString().padStart(2,"0")}:${p.toString().padStart(2,"0")}`;return new e(m+"T"+_+S)}toStorageFormat(){return this._timeStampOffset}toString(){return this._timeStampOffset}toSQLValue(){let t=this.toDateTime().toSQL({includeOffset:!0,includeOffsetSpace:!0});return t&&(t=t.replace(".000","")),t}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}addMilliseconds(t){let r=this.toDateTime().plus(t);return e.fromDateTime(r)}}});function O(e,t,r,n){var i,o=arguments.length,s=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}var nr=L(()=>{});var B1,jb=L(()=>{B1="20240807"});var Qe,Hs=L(()=>{Be();hi();jb();Qe={apiKey:void 0,applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(v7(Qe,globalThis.esriConfig,!0),delete Qe.has),!Qe.assetsPath){{let e="4.31.0";Qe.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${B1}/assets`}Qe.defaultAssetsPath=Qe.assetsPath}});function s$(e,t,...r){console[e](`[${t}]`,...r)}function a$(...e){return E7(JSON.stringify(e,(r,n)=>typeof n!="object"||Array.isArray(n)?n:"[Object]"))}var z6,Me,Ze=L(()=>{Hs();Be();Io();z6={info:0,warn:1,error:2,none:3},Me=class e{constructor(t){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},t.level!=null&&(this.level=t.level),t.writer!=null&&(this.writer=t.writer),this._module=t.module,e._loggers.set(this.module,this);let r=this.module.lastIndexOf(".");r!==-1&&(this._parent=e.getLogger(this.module.slice(0,r)))}get module(){return this._module}get parent(){return this._parent}error(...t){this._log("error","always",...t)}warn(...t){this._log("warn","always",...t)}info(...t){this._log("info","always",...t)}errorOnce(...t){this._log("error","once",...t)}warnOnce(...t){this._log("warn","once",...t)}infoOnce(...t){this._log("info","once",...t)}errorOncePerTick(...t){this._log("error","oncePerTick",...t)}warnOncePerTick(...t){this._log("warn","oncePerTick",...t)}infoOncePerTick(...t){this._log("info","oncePerTick",...t)}get test(){}static get test(){}static getLogger(t){return t=typeof t!="string"?t.declaredClass:t,e._loggers.get(t)||new e({module:t})}_log(t,r,...n){if(this._matchLevel(t)){if(r!=="always"&&!e._throttlingDisabled){let i=a$(n),o=this._loggedMessages[t].get(i);if(r==="once"&&o!=null||r==="oncePerTick"&&o&&o>=e._tickCounter)return;this._loggedMessages[t].set(i,e._tickCounter),e._scheduleTickCounterIncrement()}for(let i of Qe.log.interceptors)if(i(t,this.module,...n))return;this._inheritedWriter()(t,this.module,...n)}}_parentWithMember(t,r){let n=this;for(;n!=null;){let i=n[t];if(i!=null)return i;n=n.parent}return r}_inheritedWriter(){return this._parentWithMember("writer",s$)}_matchLevel(t){let r=Qe.log.level||"warn";return z6[this._parentWithMember("level",r)]<=z6[t]}static _scheduleTickCounterIncrement(){e._tickCounterScheduled||(e._tickCounterScheduled=!0,Promise.resolve().then(()=>{e._tickCounter++,e._tickCounterScheduled=!1}))}};Me._loggers=new Map,Me._tickCounter=0,Me._tickCounterScheduled=!1,Me._throttlingDisabled=!1});function q1(e,t,r){let n=e.get(t);if(n!==void 0)return n;let i=r();return e.set(t,i),i}var Hb=L(()=>{});function l$(e){return e==null?e:new Date(e)}function c$(e){return e==null?e:!!e}function u$(e){return e==null?e:e.toString()}function Xb(e){return e==null?e:(e=parseFloat(e),isNaN(e)?0:e)}function d$(e){return e==null?e:Math.round(parseFloat(e))}function f$(e){return null}function B6(e){return e?.constructor&&e.constructor.__accessorMetadata__!==void 0}function j1(e,t){return t!=null&&e&&!(t instanceof e)}function q6(e){return e&&"isCollection"in e}function G6(e){return e?.Type?typeof e.Type=="function"?e.Type:e.Type.base:null}function p$(e,t){if(!t?.constructor||!q6(t.constructor))return Zb(e,t)?t:new e(t);let r=G6(e.prototype.itemType),n=G6(t.constructor.prototype.itemType);return r?n?r===n?t:r.prototype.isPrototypeOf(n.prototype)?new e(t):(Zb(e,t),t):new e(t):t}function Zb(e,t){return!!B6(t)&&(Il().error("Accessor#set","Assigning an instance of '"+(t.declaredClass||"unknown")+"' which is not a subclass of '"+H1(e)+"'"),!0)}function m$(e,t){return t==null?t:q6(e)?p$(e,t):j1(e,t)?Zb(e,t)?t:new e(t):t}function H1(e){return e?.prototype?.declaredClass||"unknown"}function g$(e){switch(e){case Number:return Xb;case wi:return d$;case Boolean:return c$;case String:return u$;case Date:return l$;case td:return f$;default:return q1(h$,e,()=>m$.bind(null,e))}}function Mn(e,t){let r=g$(e);return arguments.length===1?r:r(t)}function Pl(e,t,r){return arguments.length===1?Pl.bind(null,e):t&&(Array.isArray(t)?t.map(n=>e(n,r)):[e(t,r)])}function j6(e,t){return arguments.length===1?Pl(r=>Mn(e,r)):Pl(r=>Mn(e,r),t)}function H6(e,t,r){return t!==0&&Array.isArray(r)?r.map(n=>H6(e,t-1,n)):e(r)}function ed(e,t,r){if(arguments.length===2)return o=>ed(e,t,o);if(!r)return r;r=H6(e,t,r);let n=t,i=r;for(;n>0&&Array.isArray(i);)n--,i=i[0];if(i!==void 0)for(let o=0;o<n;o++)r=[r];return r}function Z6(e,t,r){return arguments.length===2?ed(n=>Mn(e,n),t):ed(n=>Mn(e,n),t,r)}function Z1(e){return!!Array.isArray(e)&&!e.some(t=>{let r=typeof t;return!(r==="string"||r==="number"||r==="function"&&e.length>1)})}function Y1(e,t){if(arguments.length===2)return Y1(e).call(null,t);let r=new Set,n=e.filter(a=>typeof a!="function"),i=e.filter(a=>typeof a=="function");for(let a of e)typeof a!="string"&&typeof a!="number"||r.add(a);let o=null,s=null;return(a,u)=>{if(a==null)return a;let d=typeof a,p=d==="string"||d==="number";return p&&(r.has(a)||i.some(m=>d==="string"&&m===String||d==="number"&&m===Number))||d==="object"&&i.some(m=>!j1(a,m))?a:(p&&n.length?(o||(o=n.map(m=>typeof m=="string"?`'${m}'`:`${m}`).join(", ")),Il().error("Accessor#set",`'${a}' is not a valid value for this property, only the following values are valid: ${o}`)):typeof a=="object"&&i.length?(s||(s=i.map(m=>H1(m)).join(", ")),Il().error("Accessor#set",`'${a}' is not a valid value for this property, value must be one of ${s}`)):Il().error("Accessor#set",`'${a}' is not a valid value for this property`),u&&(u.valid=!1),null)}}function zo(e,t){if(arguments.length===2)return zo(e).call(null,t);let r={},n=[],i=[];for(let u in e.typeMap){let d=e.typeMap[u];r[u]=Mn(d),n.push(H1(d)),i.push(u)}let o=()=>`'${n.join("', '")}'`,s=()=>`'${i.join("', '")}'`,a=typeof e.key=="string"?u=>u[e.key]:e.key;return u=>{if(e.base&&!j1(e.base,u)||u==null)return u;let d=a(u)||e.defaultKeyValue,p=r[d];if(!p)return Il().error("Accessor#set",`Invalid property value, value needs to be one of ${o()}, or a plain object that can autocast (having .type = ${s()})`),null;if(!j1(e.typeMap[d],u))return u;if(typeof e.key=="string"&&!B6(u)){let m={};for(let w in u)w!==e.key&&(m[w]=u[w]);return p(m)}return p(u)}}function Y6(e){if(!e||!("type"in e))return!1;switch(e.type){case"native":case"array":case"one-of":return!0}return!1}function Qb(e){switch(e.type){case"native":return Mn(e.value);case"array":return Pl(Qb(e.value));case"one-of":return w$(e);default:return null}}function w$(e){let t=null;return(r,n)=>Jb(r,e)?r:(t==null&&(t=Yb(e)),Il().error("Accessor#set",`Invalid property value, value needs to be of type ${t}`),n&&(n.valid=!1),null)}function Yb(e){switch(e.type){case"native":switch(e.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case wi:return"integer";case Date:return"date";case td:return"null";default:return H1(e.value)}case"array":return`array of ${Yb(e.value)}`;case"one-of":{let t=e.values.map(r=>Yb(r));return`one of ${t.slice(0,-1)} or ${t[t.length-1]}`}}return"unknown"}function Jb(e,t){if(e==null)return!0;switch(t.type){case"native":switch(t.value){case Number:case wi:return typeof e=="number";case Boolean:return typeof e=="boolean";case String:return typeof e=="string";case td:return e===null}return e instanceof t.value;case"array":return!!Array.isArray(e)&&!e.some(r=>!Jb(r,t.value));case"one-of":return t.values.some(r=>Jb(e,r))}}var Il,h$,wi,td,Go=L(()=>{Be();Ze();Hb();Il=()=>Me.getLogger("esri.core.accessorSupport.ensureTypes");h$=new WeakMap;wi=class{},td=class{}});function yi(e){return e.__accessor__??null}function X6(e,t){return e?.metadata?.[t]!=null}function Al(e,t,r){return r?J1(e,t,{policy:r,path:""}):J1(e,t,null)}function J1(e,t,r){return t?Object.keys(t).reduce((n,i)=>{let o=i,s=null,a="merge";if(r&&(s=r.path?`${r.path}.${i}`:i,a=r.policy(s)),a==="replace"||a==="replace-arrays"&&Array.isArray(n[o]))return n[o]=t[o],n;if(n[o]===void 0)return n[o]=Ne(t[o]),n;let u=n[o],d=t[o];if(u===d)return n;if(Array.isArray(d)||Array.isArray(n))u=u?Array.isArray(u)?n[o]=u.slice():n[o]=[u]:n[o]=[],d&&(Array.isArray(d)||(d=[d]),d.forEach(p=>{u.includes(p)||u.push(p)}));else if(d&&typeof d=="object")if(r){let p=r.path;r.path=s,n[o]=J1(u,d,r),r.path=p}else n[o]=J1(u,d,null);else n.hasOwnProperty(i)&&!t.hasOwnProperty(i)||(n[o]=d);return n},e||{}):e}function X1(e){return Array.isArray(e)?e:e.split(".")}function J6(e){return e.includes(",")?e.split(",").map(t=>t.trim()):[e.trim()]}function y$(e){if(Array.isArray(e)){let t=[];for(let r of e)t.push(...J6(r));return t}return J6(e)}function Kb(e,t,r,n){let i=y$(t);if(i.length!==1){let o=i.map(s=>n(e,s,r));return js(o)}return n(e,i[0],r)}var Bo=L(()=>{Yr();er()});function Q6(e,t){let r=e[e.length-1]==="?"?e.slice(0,-1):e;if(t.getItemAt!=null||Array.isArray(t)){let i=parseInt(r,10);if(!isNaN(i))return Array.isArray(t)?t[i]:t.at(i)}let n=yi(t);return X6(n,r)?n.get(r):t[r]}function K6(e,t,r){if(e==null)return e;let n=Q6(t[r],e);return!n&&r<t.length-1?void 0:r===t.length-1?n:K6(n,t,r+1)}function Zs(e,t,r=0){return typeof t!="string"||t.includes(".")?K6(e,X1(t),r):Q6(t,e)}function Jn(e,t){return Zs(e,t)}function e_(e,t){return Zs(t,e)!==void 0}var Ys=L(()=>{Bo()});function qo(e){let t=e.constructor.__accessorMetadata__,r=Object.prototype.hasOwnProperty.call(e.constructor,"__accessorMetadata__");if(t){if(!r){t=Object.create(t);for(let n in t)t[n]=Ne(t[n]);Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0})}}else t={},Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0});return e.constructor.__accessorMetadata__}function Nl(e,t){let r=qo(e),n=r[t];return n||(n=r[t]={}),n}function e8(e,t){return Al(e,t,_$)}function _$(e){return b$.test(e)?"replace":"merge"}var b$,kl=L(()=>{er();Bo();b$=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/});function v$(e,t){return e.replaceAll(/\$\{([^\s:}]*)(?::([^\s:}]+))?\}/g,(r,n)=>n===""?"$":(xn(n,t)??"").toString())}var Rl,t_=L(()=>{hi();Rl=class{constructor(t,r,n=void 0){this.name=t,this.details=n,this.message=(r&&v$(r,n))??""}toString(){return"["+this.name+"]: "+this.message}}});var ye,Tr=L(()=>{er();Ze();t_();ye=class e extends Rl{constructor(t,r,n){super(t,r,n)}toJSON(){if(this.details!=null)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,(t,r)=>{if(r&&typeof r=="object"&&typeof r.toJSON=="function")return r;try{return Ne(r)}catch{return"[object]"}}))}}catch(t){throw Me.getLogger("esri.core.Error").error(t),t}return{name:this.name,message:this.message,details:this.details}}static fromJSON(t){return new e(t.name,t.message,t.details)}};ye.prototype.type="error"});function Dl(e,t,r){if(e&&t)if(typeof t=="object")for(let n of Object.getOwnPropertyNames(t))Dl(e,n,t[n]);else{if(t.includes(".")){let i=t.split("."),o=i.splice(-1,1)[0];return void Dl(Jn(e,i),o,r)}let n=e.__accessor__;n!=null&&S$(t,n),e[t]=r}}function S$(e,t){if(Q("esri-unknown-property-errors")&&!x$(e,t))throw new ye("set:unknown-property",C$(e,t))}function x$(e,t){return t.metadata[e]!=null}function C$(e,t){return"setting unknown property '"+e+"' on instance of "+t.host.declaredClass}var r_=L(()=>{Tr();Be();Ze();Ys()});function H(e={}){return(t,r)=>{if(t===Function.prototype)throw new Error(`Inappropriate use of @property() on a static field: ${t.name}.${r}. Accessor does not support static properties.`);let n=Object.getOwnPropertyDescriptor(t,r),i=Nl(t,r);n&&(n.get||n.set?(i.get=n.get||i.get,i.set=n.set||i.set):"value"in n&&("value"in e&&Me.getLogger("esri.core.accessorSupport.decorators.property").warn(`@property() will redefine the value of "${r}" on "${t.constructor.name}" already defined in the metadata`,e),i.value=e.value=n.value)),e.readOnly!=null&&(i.readOnly=e.readOnly);let o=e.aliasOf;if(o){let u=typeof o=="string"?o:o.source,d=typeof o=="string"?null:o.overridable===!0,p;i.dependsOn=[u],i.get=function(){let m=Jn(this,u);if(typeof m=="function"){p||(p=u.split(".").slice(0,-1).join("."));let w=Jn(this,p);w&&(m=m.bind(w))}return m},i.readOnly||(i.set=d?function(m){this._override(r,m)}:function(m){Dl(this,u,m)})}let s=e.type,a=e.types;i.cast||(s?i.cast=T$(s):a&&(Array.isArray(a)?i.cast=Pl(zo(a[0])):i.cast=zo(a))),e8(i,e),e.range&&(i.cast=E$(i.cast,e.range))}}function Q1(e,t,r){let n=Nl(e,r);n.json||(n.json={});let i=n.json;return t!==void 0&&(i.origins||(i.origins={}),i.origins[t]||(i.origins[t]={}),i=i.origins[t]),i}function T$(e){let t=0,r=e;if(Y6(e))return Qb(e);for(;Array.isArray(r)&&r.length===1&&typeof r[0]!="string"&&typeof r[0]!="number";)r=r[0],t++;let n=r;if(Z1(n))return t===0?Y1(n):ed(Y1(n),t);if(t===1)return j6(n);if(t>1)return Z6(n,t);let i=e;return i.from?i.from:Mn(i)}function E$(e,t){return r=>{let n=+e(r);return t.step!=null&&(n=Math.round(n/t.step)*t.step),t.min!=null&&(n=Math.max(t.min,n)),t.max!=null&&(n=Math.min(t.max,n)),n}}var ir=L(()=>{Ze();Go();Ys();kl();r_()});var K1,n_=L(()=>{K1=Symbol("Accessor-beforeDestroy")});var or,rd=L(()=>{(function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CONSTRUCTING=1]="CONSTRUCTING",e[e.CONSTRUCTED=2]="CONSTRUCTED",e[e.DESTROYED=3]="DESTROYED"})(or||(or={}))});var $e,e0=L(()=>{(function(e){e[e.Dirty=1]="Dirty",e[e.Overridden=2]="Overridden",e[e.Computing=4]="Computing",e[e.NonNullable=8]="NonNullable",e[e.HasDefaultValue=16]="HasDefaultValue",e[e.DepTrackingInitialized=32]="DepTrackingInitialized",e[e.AutoTracked=64]="AutoTracked",e[e.ExplicitlyTracking=128]="ExplicitlyTracking"})($e||($e={}))});function Ce(e){id.onObservableAccessed(e)}function Xn(e,t,r){if(t0)return i_(e,t,r);let n=null;return n8(e),n=t.call(r),i8(),n}function r8(e,t){return Xn(n0,e,t)}function i_(e,t,r){let n=t0;t0=!0,n8(e);let i=null;try{i=t.call(r)}catch(o){r0&&Me.getLogger("esri.core.accessorSupport.tracking").error(o)}return i8(),t0=n,i}function n8(e){id=e,nd.push(e)}function i8(){let e=nd.length;if(e>1){let t=nd.pop();id=nd[e-2],t.onTrackingEnd()}else if(e===1){let t=nd.pop();id=n0,t.onTrackingEnd()}else id=n0}function o_(e,t){if(t.flags&$e.DepTrackingInitialized)return;let r=r0;r0=!1,t.flags&$e.AutoTracked?i_(t,t.metadata.get,e):s_(e,t),r0=r}function s_(e,t){t.flags&$e.ExplicitlyTracking||(t.flags|=$e.ExplicitlyTracking,i_(t,()=>{let r=t.metadata.dependsOn||M$;for(let n of r)if(typeof n!="string"||n.includes(".")){let i=X1(n);for(let o=0,s=e;o<i.length&&s!=null&&typeof s=="object";++o)s=t8(s,i[o],o!==i.length-1)}else t8(e,n,!1)}),t.flags&=~$e.ExplicitlyTracking)}function t8(e,t,r){let n=t[t.length-1]==="?"?t.slice(0,-1):t;if(e.getItemAt!=null||Array.isArray(e)){let o=parseInt(n,10);if(!isNaN(o))return Array.isArray(e)?e[o]:e.at(o)}let i=yi(e);if(i){let o=i.propertiesByName.get(n);o&&(Ce(o),o_(e,o))}return r?e[n]:void 0}var n0,nd,id,t0,r0,M$,Js=L(()=>{Be();Ze();Bo();e0();n0={onObservableAccessed:()=>{},onTrackingEnd:()=>{}},nd=[],id=n0;t0=!1,r0=!1;M$=[]});function o8(e){if(e.json&&e.json.origins){let t=e.json.origins,r={"web-document":["web-scene","web-map"]};for(let n in r)if(t[n]){let i=t[n];r[n].forEach(o=>{t[o]=i}),delete t[n]}}}var s8=L(()=>{});var od,a8=L(()=>{t_();od=class extends Rl{constructor(t,r,n){super(t,r,n)}};od.prototype.type="warning"});function i0(e){return!!e&&e.prototype?.declaredClass&&e.prototype.declaredClass.indexOf("esri.core.Collection")===0}var a_=L(()=>{});function c_(e,t,r){e&&(!r&&!t.read||t.read?.reader||t.read?.enabled===!1||A$(e)&&Bi("read.reader",L$(e),t))}function L$(e){let t=e.ndimArray??0;if(t>1)return P$(e);if(t===1)return l8(e);if("type"in e&&u8(e.type)){let r=e.type.prototype?.itemType?.Type,n=l8(typeof r=="function"?{type:r}:{types:r});return(i,o,s)=>{let a=n(i,o,s);return a&&new e.type(a)}}return u_(e)}function u_(e){return"type"in e?I$(e.type):N$(e.types)}function I$(e){return e.prototype.read?(t,r,n)=>{if(t==null)return t;let i=typeof t;if(i!=="object")return void l_().error(`Expected JSON value of type 'object' to deserialize type '${e.prototype.declaredClass}', but got '${i}'`);let o=new e;return o.read(t,n),o}:e.fromJSON}function c8(e,t,r,n){return n!==0&&Array.isArray(t)?t.map(i=>c8(e,i,r,n-1)):e(t,void 0,r)}function P$(e){let t=u_(e),r=c8.bind(null,t),n=e.ndimArray??0;return(i,o,s)=>{if(i==null)return i;i=r(i,s,n);let a=n,u=i;for(;a>0&&Array.isArray(u);)a--,u=u[0];if(u!==void 0)for(let d=0;d<a;d++)i=[i];return i}}function l8(e){let t=u_(e);return(r,n,i)=>{if(r==null)return r;if(Array.isArray(r)){let s=[];for(let a of r){let u=t(a,void 0,i);u!==void 0&&s.push(u)}return s}let o=t(r,void 0,i);return o!==void 0?[o]:void 0}}function u8(e){if(!i0(e))return!1;let t=e.prototype.itemType;return!(!t||!t.Type)&&(typeof t.Type=="function"?d_(t.Type):d8(t.Type))}function A$(e){return"types"in e?d8(e.types):d_(e.type)}function d_(e){return!Array.isArray(e)&&!!e&&e.prototype&&("read"in e.prototype||"fromJSON"in e||u8(e))}function d8(e){for(let t in e.typeMap)if(!d_(e.typeMap[t]))return!1;return!0}function N$(e){let t=null,r=e.errorContext??"type",n=e.validate;return(i,o,s)=>{if(i==null)return i;let a=typeof i;if(a!=="object")return void l_().error(`Expected JSON value of type 'object' to deserialize, but got '${a}'`);t||(t=k$(e));let u=e.key;if(typeof u!="string")return;let d=i[u],p=d?t[d]:e.defaultKeyValue?e.typeMap[e.defaultKeyValue]:void 0;if(!p){let w=`Type '${d||"unknown"}' is not supported`;return s?.messages&&i&&s.messages.push(new od(`${r}:unsupported`,w,{definition:i,context:s})),void l_().error(w)}let m=new p;return m.read(i,s),n?n(m):m}}function k$(e){let t={};for(let r in e.typeMap){let n=e.typeMap[r],i=qo(n.prototype);if(typeof e.key=="function")continue;let o=i[e.key];if(!o)continue;if(o.json?.type&&Array.isArray(o.json.type)&&o.json.type.length===1&&typeof o.json.type[0]=="string"){t[o.json.type[0]]=n;continue}let s=o.json?.write;if(!s?.writer){t[r]=n;continue}let a=s.target,u=typeof a=="string"?a:e.key,d={};s.writer(r,d,u),d[u]&&(t[d[u]]=n)}return t}var l_,f8=L(()=>{Ze();hi();a8();kl();a_();l_=()=>Me.getLogger("esri.core.accessorSupport.extensions.serializableProperty.reader")});function g8(e){if(e.json||(e.json={}),m8(e.json),h8(e.json),p8(e.json),e.json.origins)for(let t in e.json.origins)m8(e.json.origins[t]),h8(e.json.origins[t]),p8(e.json.origins[t]);return!0}function p8(e){e.name&&(e.read&&typeof e.read=="object"?e.read.source===void 0&&(e.read.source=e.name):e.read={source:e.name},e.write&&typeof e.write=="object"?e.write.target===void 0&&(e.write.target=e.name):e.write={target:e.name})}function m8(e){typeof e.read=="boolean"?e.read={enabled:e.read}:typeof e.read=="function"?e.read={enabled:!0,reader:e.read}:e.read&&typeof e.read=="object"&&e.read.enabled===void 0&&(e.read.enabled=!0)}function h8(e){typeof e.write=="boolean"?e.write={enabled:e.write}:typeof e.write=="function"?e.write={enabled:!0,writer:e.write}:e.write&&typeof e.write=="object"&&e.write.enabled===void 0&&(e.write.enabled=!0)}var w8=L(()=>{});function f_(e,t){if(!t.write||t.write.writer||t.write.enabled===!1&&!t.write.overridePolicy)return;let r=e?.ndimArray??0;e&&(r===1||"type"in e&&i0(e.type))?t.write.writer=$$:r>1?t.write.writer=F$(r):t.types?Array.isArray(t.types)?t.write.writer=D$(t.types[0]):t.write.writer=R$(t.types):t.write.writer=sd}function R$(e){return(t,r,n,i)=>t?y8(t,e,i)?sd(t,r,n,i):void 0:sd(t,r,n,i)}function y8(e,t,r){for(let n in t.typeMap)if(e instanceof t.typeMap[n])return!0;if(r?.messages){let n=t.errorContext??"type",i=`Values of type '${(typeof t.key!="function"?e[t.key]:e.declaredClass)??"Unknown"}' cannot be written`;r&&r.messages&&e&&r.messages.push(new ye(`${n}:unsupported`,i,{definition:e,context:r})),Me.getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer").error(i)}return!1}function D$(e){return(t,r,n,i)=>!t||!Array.isArray(t)?sd(t,r,n,i):sd(t.filter(o=>y8(o,e,i)),r,n,i)}function sd(e,t,r,n){Bi(r,o0(e,n),t)}function o0(e,t){return e&&typeof e.write=="function"?e.write({},t):e&&typeof e.toJSON=="function"?e.toJSON():typeof e=="number"?O$(e):e}function O$(e){return e===-1/0?-Number.MAX_VALUE:e===1/0?Number.MAX_VALUE:isNaN(e)?null:e}function $$(e,t,r,n){let i;e===null?i=null:e&&typeof e.map=="function"?(i=e.map(o=>o0(o,n)),typeof i.toArray=="function"&&(i=i.toArray())):i=[o0(e,n)],Bi(r,i,t)}function b8(e,t,r){return r!==0&&Array.isArray(e)?e.map(n=>b8(n,t,r-1)):o0(e,t)}function F$(e){return(t,r,n,i)=>{let o;if(t===null)o=null;else{o=b8(t,i,e);let s=e,a=o;for(;s>0&&Array.isArray(a);)s--,a=a[0];if(a!==void 0)for(let u=0;u<s;u++)o=[o]}Bi(n,o,r)}}var _8=L(()=>{Tr();Ze();hi();a_()});function v8(e,t){return m_(e,"any",t?.origin)}function s0(e,t){return m_(e,"read",t?.origin)}function S8(e,t){return m_(e,"write",t?.origin)}function m_(e,t,r){let n=e?.json;if(n?.origins&&r){let i;i=r==="link-chart"?n.origins[r]&&(t==="any"||t in n.origins[r])?n.origins[r]:n.origins["web-map"]:n.origins[r],i&&(t==="any"||t in i)&&(n=i)}return n}function V$(e){let t=U$(e);if(e.json.origins)for(let r in e.json.origins){let n=e.json.origins[r],i=n.types?W$(n):t;c_(i,n,!1),n.types&&!n.write&&e.json.write?.enabled&&(n.write={...e.json.write}),f_(i,n)}c_(t,e.json,!0),f_(t,e.json)}function U$(e){return e.json.types?p_(e.json):e.type?x8(e):p_(e)}function W$(e){return e.type?x8(e):p_(e)}function x8(e){if(!e.type)return;let t=0,r=e.type;for(;Array.isArray(r)&&!Z1(r);)r=r[0],t++;return{type:r,ndimArray:t}}function p_(e){if(!e.types)return;let t=0,r=e.types;for(;Array.isArray(r);)r=r[0],t++;return{types:r,ndimArray:t}}function C8(e){g8(e)&&(o8(e),V$(e))}var a0=L(()=>{Go();s8();f8();w8();_8()});function Pe(e){return t=>{e??(e="esri.core.Accessor"),t.prototype.declaredClass=e,G$(t);let r=[],n=[],i=t.prototype;for(;i;)i.hasOwnProperty("initialize")&&!h_.has(i.initialize)&&(h_.add(i.initialize),r.push(i.initialize)),i.hasOwnProperty("destroy")&&!g_.has(i.destroy)&&(g_.add(i.destroy),n.push(i.destroy)),i=Object.getPrototypeOf(i);h_.clear(),g_.clear();let o=class extends t{constructor(...a){if(super(...a),this.constructor===o&&typeof this.postscript=="function"){if(r.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let u=r.length-1;u>=0;u--)r[u].call(this)}}),n.length){let u=!1,d=this[K1];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!u){u=!0,d.call(this);for(let p=0;p<n.length;p++)n[p].call(this)}}})}Object.defineProperty(this,Symbol.dispose,{enumerable:!1,configurable:!0,value(){this.destroy()}}),this.postscript()}}};o.__accessorMetadata__=qo(t.prototype),o.prototype.declaredClass=e;let s=(e||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(o,"name",{value:s,configurable:!0}),o}}function z$(e,t){return t.get==null?function(){let r=this.__accessor__,n=r.propertiesByName.get(e);if(n===void 0)return;Ce(n);let i=r.store;return i.has(e)?i.get(e):n.metadata.value}:function(){let r=this.__accessor__,n=r.propertiesByName.get(e);if(n!==void 0)return n.getComputed(r)}}function G$(e){let t=e.prototype,r=qo(t),n={};for(let i of Object.getOwnPropertyNames(r)){let o=r[i];C8(o),n[i]={enumerable:!0,configurable:!0,get:z$(i,o),set(s){let a=this.__accessor__;if(a!==void 0){if(!Object.isFrozen(this))return a.initialized&&o.readOnly?T8("read-only",i):a.lifecycle===or.CONSTRUCTED&&o.constructOnly?T8("construct-only",i):void a.set(i,s)}else Object.defineProperty(this,i,{enumerable:!0,configurable:!0,writable:!0,value:s})}}}Object.defineProperties(e.prototype,n)}var h_,g_,T8,Ht=L(()=>{Be();Ze();n_();rd();kl();Js();a0();h_=new Set,g_=new Set;T8=(e,t)=>{Me.getLogger("esri.core.Accessor").error(`cannot assign to ${e} property '${t}'`)}});function B$(e,t,r=!1){let n=`\u{1F6D1} DEPRECATED - ${t}`;if(!r)return void e.warn(n);let i=E8.get(e);i||(i=new Set,E8.set(e,i)),i.has(t)||(i.add(t),e.warn(n))}function l0(e,t,r={}){if(Q("esri-deprecation-warnings")){let{moduleName:n}=r;q$(e,`Function: ${(n?n+"::":"")+t+"()"}`,r)}}function q$(e,t,r={}){if(Q("esri-deprecation-warnings")){let{replacement:n,version:i,see:o,warnOnce:s}=r,a=t;n&&(a+=`
1
+ "use strict";(()=>{var kk=Object.defineProperty;var W5=e=>t=>{var r=e[t];if(r)return r();throw new Error("Module not found in bundle: "+t)};var L=(e,t)=>()=>(e&&(t=e(e=0)),t);var z5=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),li=(e,t)=>{for(var r in t)kk(e,r,{get:t[r],enumerable:!0})};var $s,To=L(()=>{$s=class e{constructor(t=1){this._seed=t}set seed(t){this._seed=t??Math.random()*e._m}getInt(){return this._seed=(e._a*this._seed+e._c)%e._m,this._seed}getFloat(){return this.getInt()/(e._m-1)}getIntRange(t,r){return Math.round(this.getFloatRange(t,r))}getFloatRange(t,r){let n=r-t;return t+this.getInt()/e._m*n}};$s._m=2147483647,$s._a=48271,$s._c=0});function Eo(e,t,r){if(e==null&&t==null)return!0;if(e==null||t==null||e.length!==t.length)return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Q2(e,t,r,n){n=n||i7;let i=Math.max(0,n.last-10);for(let s=i;s<r;++s)if(e[s]===t)return n.last=s,s;let o=Math.min(i,r);for(let s=0;s<o;++s)if(e[s]===t)return n.last=s,s;return-1}function o7(e,t,r=e.length,n=t.length,i,o){if(n===0||r===0)return r;Wn.clear();for(let a=0;a<n;++a)Wn.add(t[a]);i=i||i7;let s=Math.max(0,i.last-10);for(let a=s;a<r;++a)if(Wn.has(e[a])&&(o?.push(e[a]),Wn.delete(e[a]),e[a]=e[r-1],--r,--a,Wn.size===0||r===0))return Wn.clear(),r;for(let a=0;a<s;++a)if(Wn.has(e[a])&&(o?.push(e[a]),Wn.delete(e[a]),e[a]=e[r-1],--r,--a,Wn.size===0||r===0))return Wn.clear(),r;return Wn.clear(),r}function s7(e,t){let r=e.indexOf(t);return r!==-1?(e.splice(r,1),t):null}function a7(e,t){return e!=null}var bD,bee,pu,i7,Wn,_ee,Mo=L(()=>{To();bD=1.5,bee=1/bD;pu=class{constructor(){this.last=0}},i7=new pu;Wn=new Set;_ee=new $s});var l7=L(()=>{});function Q(e){return typeof Lo[e]=="function"?Lo[e]=Lo[e](globalThis):Lo[e]}var Lo,Be=L(()=>{Lo=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},Q.add=(e,t,r,n)=>((n||Lo[e]===void 0)&&(Lo[e]=t),r&&Q(e)),Q.cache=Lo,Q.add("big-integer-warning-enabled",!0),Q.add("esri-deprecation-warnings",!0),Q.add("esri-tests-disable-screenshots",!1),Q.add("esri-tests-use-full-window",!1),Q.add("esri-tests-post-to-influx",!0),Q.add("esri-cim-animations-enable-status","enabled"),Q.add("esri-cim-animations-spotlight",!1),Q.add("esri-cim-animations-freeze-time",!1),(()=>{Q.add("host-webworker",globalThis.WorkerGlobalScope!==void 0&&self instanceof globalThis.WorkerGlobalScope);let e=typeof window<"u"&&typeof location<"u"&&typeof document<"u"&&window.location===location&&window.document===document;if(Q.add("host-browser",e),Q.add("host-node",typeof globalThis.process=="object"&&globalThis.process.versions?.node&&globalThis.process.versions.v8),Q.add("dom",e),Q("host-browser")){let t=navigator,r=t.userAgent,n=t.appVersion,i=parseFloat(n);if(Q.add("wp",parseFloat(r.split("Windows Phone")[1])||void 0),Q.add("msapp",parseFloat(r.split("MSAppHost/")[1])||void 0),Q.add("khtml",n.includes("Konqueror")?i:void 0),Q.add("edge",parseFloat(r.split("Edge/")[1])||void 0),Q.add("opr",parseFloat(r.split("OPR/")[1])||void 0),Q.add("webkit",!Q("wp")&&!Q("edge")&&parseFloat(r.split("WebKit/")[1])||void 0),Q.add("chrome",!Q("edge")&&!Q("opr")&&parseFloat(r.split("Chrome/")[1])||void 0),Q.add("android",!Q("wp")&&parseFloat(r.split("Android ")[1])||void 0),Q.add("safari",!n.includes("Safari")||Q("wp")||Q("chrome")||Q("android")||Q("edge")||Q("opr")?void 0:parseFloat(n.split("Version/")[1])),Q.add("mac",n.includes("Macintosh")),!Q("wp")&&/(iPhone|iPod|iPad)/.test(r)){let o=RegExp.$1.replace(/P/,"p"),s=/OS ([\d_]+)/.test(r)?RegExp.$1:"1",a=parseFloat(s.replace(/_/,".").replaceAll("_",""));Q.add(o,a),Q.add("ios",a)}Q("webkit")||(!r.includes("Gecko")||Q("wp")||Q("khtml")||Q("edge")||Q.add("mozilla",i),Q("mozilla")&&Q.add("ff",parseFloat(r.split("Firefox/")[1]||r.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){let e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&Q.add("esri-mobile",t),r&&Q.add("esri-iPhone",r),Q.add("esri-geolocation",!!navigator.geolocation)}Q.add("esri-wasm","WebAssembly"in globalThis),Q.add("esri-performance-mode-frames-between-render",20),Q.add("esri-force-performance-mode",!1),Q.add("esri-shared-array-buffer",()=>{let e="SharedArrayBuffer"in globalThis,t=globalThis.crossOriginIsolated===!1;return e&&!t}),Q.add("wasm-simd",()=>{let e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))}),Q.add("esri-atomics","Atomics"in globalThis),Q.add("esri-workers","Worker"in globalThis),Q.add("web-feat:cache","caches"in globalThis),Q.add("esri-workers-arraybuffer-transfer",!Q("safari")||Number(Q("safari"))>=12),Q.add("workers-pool-size",8),Q.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),Q.add("featurelayer-simplify-payload-size-factors",[1,1,4]),Q.add("featurelayer-fast-triangulation-enabled",!0),Q.add("featurelayer-animation-enabled",!0),Q.add("featurelayer-snapshot-enabled",!0),Q.add("featurelayer-snapshot-point-min-threshold",8e4),Q.add("featurelayer-snapshot-point-max-threshold",4e5),Q.add("featurelayer-snapshot-point-coverage",.1),Q.add("featurelayer-query-max-depth",4),Q.add("featurelayer-query-pausing-enabled",!1),Q.add("featurelayer-advanced-symbols",!1),Q.add("featurelayer-pbf",!0),Q.add("featurelayer-pbf-statistics",!1),Q.add("feature-layers-workers",!0),Q.add("feature-polyline-generalization-factor",1),Q.add("mapview-transitions-duration",200),Q.add("mapview-essential-goto-duration",200),Q.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),Q.add("mapserver-pbf-version-support",10.81),Q.add("mapservice-popup-identify-max-tolerance",20),Q("host-webworker")||Q("host-browser")&&(Q.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),Q.add("esri-image-decode",()=>{if("decode"in new Image){let e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then(()=>{Q.add("esri-image-decode",!0,!0,!0)}).catch(()=>{Q.add("esri-image-decode",!1,!0,!0)})}return!1}),Q.add("esri-url-encodes-apostrophe",()=>{let e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")}))})()});function c7(e){return e?.constructor?.name==="Int8Array"}function u7(e){return e?.constructor?.name==="Uint8Array"}function d7(e){return e?.constructor?.name==="Uint8ClampedArray"}function f7(e){return e?.constructor?.name==="Int16Array"}function p7(e){return e?.constructor?.name==="Uint16Array"}function m7(e){return e?.constructor?.name==="Int32Array"}function h7(e){return e?.constructor?.name==="Uint32Array"}function g7(e){return e?.constructor?.name==="Float32Array"}function w7(e){return e?.constructor?.name==="Float64Array"}var y7=L(()=>{l7();Be()});function w1(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(e[r]===void 0?delete e[r]:e[r]instanceof Object&&w1(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&e[r]===void 0&&delete e[r];return e}function Ne(e){if(!e||typeof e!="object"||typeof e=="function")return e;let t=xD(e);if(t!=null)return t;if(_D(e))return e.clone();if(vD(e))return e.map(Ne);if(SD(e))return e.clone();let r={};for(let n of Object.getOwnPropertyNames(e))r[n]=Ne(e[n]);return r}function _D(e){return typeof e.clone=="function"}function vD(e){return typeof e.map=="function"&&typeof e.forEach=="function"}function SD(e){return typeof e.notifyChange=="function"&&typeof e.watch=="function"}function b7(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function xD(e){if(c7(e)||u7(e)||d7(e)||f7(e)||p7(e)||m7(e)||h7(e)||g7(e)||w7(e))return e.slice();if(e instanceof Date)return new Date(e.getTime());if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){let t=new Map;for(let[r,n]of e)t.set(r,Ne(n));return t}if(e instanceof Set){let t=new Set;for(let r of e)t.add(Ne(r));return t}return null}function mu(e,t){return e===t||typeof e=="number"&&isNaN(e)&&typeof t=="number"&&isNaN(t)||typeof e?.getTime=="function"&&typeof t?.getTime=="function"&&e.getTime()===t.getTime()||!1}function _7(e,t){return e===t||(e==null||typeof e=="string"?e===t:typeof e=="number"?e===t||typeof t=="number"&&isNaN(e)&&isNaN(t):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():Array.isArray(e)?Array.isArray(t)&&Eo(e,t):e instanceof Set?t instanceof Set&&TD(e,t):e instanceof Map?t instanceof Map&&ED(e,t):!!b7(e)&&b7(t)&&CD(e,t))}function CD(e,t){if(e===null||t===null)return!1;let r=Object.keys(e);if(t===null||Object.keys(t).length!==r.length)return!1;for(let n of r)if(e[n]!==t[n]||!Object.prototype.hasOwnProperty.call(t,n))return!1;return!0}function TD(e,t){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}function ED(e,t){if(e.size!==t.size)return!1;for(let[r,n]of e){let i=t.get(r);if(i!==n||i===void 0&&!t.has(r))return!1}return!0}var er=L(()=>{Mo();y7()});function v7(e,t,r=!1){return x7(e,t,r)}function xn(e,t){if(t!=null)return t[e]||S7(e.split("."),!1,t)}function Bi(e,t,r){let n=e.split("."),i=n.pop(),o=S7(n,!0,r);o&&i&&(o[i]=t)}function S7(e,t,r){let n=r;for(let i of e){if(n==null)return;if(!(i in n)){if(!t)return;n[i]={}}n=n[i]}return n}function x7(e,t,r){return t?Object.keys(t).reduce((n,i)=>{let o=n[i],s=t[i];return o===s?n:o===void 0?(n[i]=Ne(s),n):(Array.isArray(s)||Array.isArray(n)?(o=o?Array.isArray(o)?n[i]=o.slice():n[i]=[o]:n[i]=[],s&&(Array.isArray(s)||(s=[s]),r?s.forEach(a=>{o.includes(a)||o.push(a)}):n[i]=s.slice())):s&&typeof s=="object"?n[i]=x7(o,s,r):n.hasOwnProperty(i)&&!t.hasOwnProperty(i)||(n[i]=s),n)},e||{}):e}var hi=L(()=>{er()});function C7(e){return e??""}function gi(e,t){return t?e.replaceAll(MD,typeof t=="object"?(r,n)=>C7(xn(n,t)):(r,n)=>C7(t(n))):e}function T7(e,t){return e.replaceAll(/([.$?*|{}()[\]\\/+\-^])/g,r=>t?.includes(r)?r:`\\${r}`)}function E7(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}var MD,Io=L(()=>{hi();MD=/\{([^}]+)\}/g});var qi,y1,b1,_1,zn,cl,xt,Gn,Po=L(()=>{qi=class extends Error{},y1=class extends qi{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}},b1=class extends qi{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}},_1=class extends qi{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}},zn=class extends qi{},cl=class extends qi{constructor(t){super(`Invalid unit ${t}`)}},xt=class extends qi{},Gn=class extends qi{constructor(){super("Zone is an abstract class")}}});var ce,Bn,sn,Ao,hu,K2,gu,wu,yu,bu,_u,vu,Su,xu,Cu,Tu,Eu,Mu,Lu,Iu,eb,Pu,Au,Nu,ku,Ru=L(()=>{ce="numeric",Bn="short",sn="long",Ao={year:ce,month:ce,day:ce},hu={year:ce,month:Bn,day:ce},K2={year:ce,month:Bn,day:ce,weekday:Bn},gu={year:ce,month:sn,day:ce},wu={year:ce,month:sn,day:ce,weekday:sn},yu={hour:ce,minute:ce},bu={hour:ce,minute:ce,second:ce},_u={hour:ce,minute:ce,second:ce,timeZoneName:Bn},vu={hour:ce,minute:ce,second:ce,timeZoneName:sn},Su={hour:ce,minute:ce,hourCycle:"h23"},xu={hour:ce,minute:ce,second:ce,hourCycle:"h23"},Cu={hour:ce,minute:ce,second:ce,hourCycle:"h23",timeZoneName:Bn},Tu={hour:ce,minute:ce,second:ce,hourCycle:"h23",timeZoneName:sn},Eu={year:ce,month:ce,day:ce,hour:ce,minute:ce},Mu={year:ce,month:ce,day:ce,hour:ce,minute:ce,second:ce},Lu={year:ce,month:Bn,day:ce,hour:ce,minute:ce},Iu={year:ce,month:Bn,day:ce,hour:ce,minute:ce,second:ce},eb={year:ce,month:Bn,day:ce,weekday:Bn,hour:ce,minute:ce},Pu={year:ce,month:sn,day:ce,hour:ce,minute:ce,timeZoneName:Bn},Au={year:ce,month:sn,day:ce,hour:ce,minute:ce,second:ce,timeZoneName:Bn},Nu={year:ce,month:sn,day:ce,weekday:sn,hour:ce,minute:ce,timeZoneName:sn},ku={year:ce,month:sn,day:ce,weekday:sn,hour:ce,minute:ce,second:ce,timeZoneName:sn}});var kt,Fs=L(()=>{Po();kt=class{get type(){throw new Gn}get name(){throw new Gn}get ianaName(){return this.name}get isUniversal(){throw new Gn}offsetName(t,r){throw new Gn}formatOffset(t,r){throw new Gn}offset(t){throw new Gn}equals(t){throw new Gn}get isValid(){throw new Gn}}});var tb,No,S1=L(()=>{$r();Fs();tb=null,No=class e extends kt{static get instance(){return tb===null&&(tb=new e),tb}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:r,locale:n}){return x1(t,r,n)}formatOffset(t,r){return ko(this.offset(t),r)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}});function LD(e){return T1[e]||(T1[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),T1[e]}function PD(e,t){let r=e.format(t).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,i,o,s,a,u,d,p]=n;return[s,i,o,a,u,d,p]}function AD(e,t){let r=e.formatToParts(t),n=[];for(let i=0;i<r.length;i++){let{type:o,value:s}=r[i],a=ID[o];o==="era"?n[a]=s:_e(a)||(n[a]=parseInt(s,10))}return n}var T1,ID,C1,Ct,Ro=L(()=>{$r();Fs();T1={};ID={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};C1={},Ct=class e extends kt{static create(t){return C1[t]||(C1[t]=new e(t)),C1[t]}static resetCache(){C1={},T1={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=e.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:r,locale:n}){return x1(t,r,n,this.name)}formatOffset(t,r){return ko(this.offset(t),r)}offset(t){let r=new Date(t);if(isNaN(r))return NaN;let n=LD(this.name),[i,o,s,a,u,d,p]=n.formatToParts?AD(n,r):PD(n,r);a==="BC"&&(i=-Math.abs(i)+1);let w=ul({year:i,month:o,day:s,hour:u===24?0:u,minute:d,second:p,millisecond:0}),_=+r,S=_%1e3;return _-=S>=0?S:1e3+S,(w-_)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}});function ND(e,t={}){let r=JSON.stringify([e,t]),n=M7[r];return n||(n=new Intl.ListFormat(e,t),M7[r]=n),n}function nb(e,t={}){let r=JSON.stringify([e,t]),n=rb[r];return n||(n=new Intl.DateTimeFormat(e,t),rb[r]=n),n}function kD(e,t={}){let r=JSON.stringify([e,t]),n=ib[r];return n||(n=new Intl.NumberFormat(e,t),ib[r]=n),n}function RD(e,t={}){let{base:r,...n}=t,i=JSON.stringify([e,n]),o=ob[i];return o||(o=new Intl.RelativeTimeFormat(e,t),ob[i]=o),o}function DD(){return Du||(Du=new Intl.DateTimeFormat().resolvedOptions().locale,Du)}function OD(e){let t=L7[e];if(!t){let r=new Intl.Locale(e);t="getWeekInfo"in r?r.getWeekInfo():r.weekInfo,L7[e]=t}return t}function $D(e){let t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));let r=e.indexOf("-u-");if(r===-1)return[e];{let n,i;try{n=nb(e).resolvedOptions(),i=e}catch{let u=e.substring(0,r);n=nb(u).resolvedOptions(),i=u}let{numberingSystem:o,calendar:s}=n;return[i,o,s]}}function FD(e,t,r){return(r||t)&&(e.includes("-u-")||(e+="-u"),r&&(e+=`-ca-${r}`),t&&(e+=`-nu-${t}`)),e}function VD(e){let t=[];for(let r=1;r<=12;r++){let n=oe.utc(2009,r,1);t.push(e(n))}return t}function UD(e){let t=[];for(let r=1;r<=7;r++){let n=oe.utc(2016,11,13+r);t.push(e(n))}return t}function E1(e,t,r,n){let i=e.listingMode();return i==="error"?null:i==="en"?r(t):n(t)}function WD(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}var M7,rb,ib,ob,Du,L7,sb,ab,lb,zD,Ue,$u=L(()=>{$r();I1();Do();Oo();Ro();M7={};rb={};ib={};ob={};Du=null;L7={};sb=class{constructor(t,r,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:i,floor:o,...s}=n;if(!r||Object.keys(s).length>0){let a={useGrouping:!1,...n};n.padTo>0&&(a.minimumIntegerDigits=n.padTo),this.inf=kD(t,a)}}format(t){if(this.inf){let r=this.floor?Math.floor(t):t;return this.inf.format(r)}else{let r=this.floor?Math.floor(t):dl(t,3);return ht(r,this.padTo)}}},ab=class{constructor(t,r,n){this.opts=n,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){let s=-1*(t.offset/60),a=s>=0?`Etc/GMT+${s}`:`Etc/GMT${s}`;t.offset!==0&&Ct.create(a).valid?(i=a,this.dt=t):(i="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,i=t.zone.name):(i="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);let o={...this.opts};o.timeZone=o.timeZone||i,this.dtf=nb(r,o)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(r=>{if(r.type==="timeZoneName"){let n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...r,value:n}}else return r}):t}resolvedOptions(){return this.dtf.resolvedOptions()}},lb=class{constructor(t,r,n){this.opts={style:"long",...n},!r&&M1()&&(this.rtf=RD(t,n))}format(t,r){return this.rtf?this.rtf.format(t,r):I7(r,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,r){return this.rtf?this.rtf.formatToParts(t,r):[]}},zD={firstDay:1,minimalDays:4,weekend:[6,7]},Ue=class e{static fromOpts(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,r,n,i,o=!1){let s=t||Ve.defaultLocale,a=s||(o?"en-US":DD()),u=r||Ve.defaultNumberingSystem,d=n||Ve.defaultOutputCalendar,p=Ou(i)||Ve.defaultWeekSettings;return new e(a,u,d,p,s)}static resetCache(){Du=null,rb={},ib={},ob={}}static fromObject({locale:t,numberingSystem:r,outputCalendar:n,weekSettings:i}={}){return e.create(t,r,n,i)}constructor(t,r,n,i,o){let[s,a,u]=$D(t);this.locale=s,this.numberingSystem=r||a||null,this.outputCalendar=n||u||null,this.weekSettings=i,this.intl=FD(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=WD(this)),this.fastNumbersCached}listingMode(){let t=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&r?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,Ou(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,r=!1){return E1(this,t,cb,()=>{let n=r?{month:t,day:"numeric"}:{month:t},i=r?"format":"standalone";return this.monthsCache[i][t]||(this.monthsCache[i][t]=VD(o=>this.extract(o,n,"month"))),this.monthsCache[i][t]})}weekdays(t,r=!1){return E1(this,t,ub,()=>{let n=r?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},i=r?"format":"standalone";return this.weekdaysCache[i][t]||(this.weekdaysCache[i][t]=UD(o=>this.extract(o,n,"weekday"))),this.weekdaysCache[i][t]})}meridiems(){return E1(this,void 0,()=>db,()=>{if(!this.meridiemCache){let t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[oe.utc(2016,11,13,9),oe.utc(2016,11,13,19)].map(r=>this.extract(r,t,"dayperiod"))}return this.meridiemCache})}eras(t){return E1(this,t,fb,()=>{let r={era:t};return this.eraCache[t]||(this.eraCache[t]=[oe.utc(-40,1,1),oe.utc(2017,1,1)].map(n=>this.extract(n,r,"era"))),this.eraCache[t]})}extract(t,r,n){let i=this.dtFormatter(t,r),o=i.formatToParts(),s=o.find(a=>a.type.toLowerCase()===n);return s?s.value:null}numberFormatter(t={}){return new sb(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,r={}){return new ab(t,this.intl,r)}relFormatter(t={}){return new lb(this.intl,this.isEnglish(),t)}listFormatter(t={}){return ND(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:L1()?OD(this.locale):zD}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}});var mb,He,fl=L(()=>{$r();Fs();mb=null,He=class e extends kt{static get utcInstance(){return mb===null&&(mb=new e(0)),mb}static instance(t){return t===0?e.utcInstance:new e(t)}static parseSpecifier(t){if(t){let r=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new e(Vs(r[1],r[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ko(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ko(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,r){return ko(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}});var pl,hb=L(()=>{Fs();pl=class extends kt{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}});function qn(e,t){let r;if(_e(e)||e===null)return t;if(e instanceof kt)return e;if(P7(e)){let n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?No.instance:n==="utc"||n==="gmt"?He.utcInstance:He.parseSpecifier(n)||Ct.create(e)}else return jn(e)?He.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new pl(e)}var P1=L(()=>{Fs();Ro();fl();hb();$r();S1()});function N7(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(e[r].search(gb.hanidec)!==-1)t+=GD.indexOf(e[r]);else for(let i in A7){let[o,s]=A7[i];n>=o&&n<=s&&(t+=n-o)}}return parseInt(t,10)}else return t}function k7(){ml={}}function Cn({numberingSystem:e},t=""){let r=e||"latn";return ml[r]||(ml[r]={}),ml[r][t]||(ml[r][t]=new RegExp(`${gb[r]}${t}`)),ml[r][t]}var gb,A7,GD,ml,wb=L(()=>{gb={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},A7={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},GD=gb.hanidec.replace(/[\[|\]]/g,"").split("");ml={}});var R7,D7,O7,$7,F7,V7,U7,W7,Ve,Do=L(()=>{S1();Ro();$u();Oo();P1();$r();wb();R7=()=>Date.now(),D7="system",O7=null,$7=null,F7=null,V7=60,W7=null,Ve=class{static get now(){return R7}static set now(t){R7=t}static set defaultZone(t){D7=t}static get defaultZone(){return qn(D7,No.instance)}static get defaultLocale(){return O7}static set defaultLocale(t){O7=t}static get defaultNumberingSystem(){return $7}static set defaultNumberingSystem(t){$7=t}static get defaultOutputCalendar(){return F7}static set defaultOutputCalendar(t){F7=t}static get defaultWeekSettings(){return W7}static set defaultWeekSettings(t){W7=Ou(t)}static get twoDigitCutoffYear(){return V7}static set twoDigitCutoffYear(t){V7=t%100}static get throwOnInvalid(){return U7}static set throwOnInvalid(t){U7=t}static resetCaches(){Ue.resetCache(),Ct.resetCache(),oe.resetCache(),k7()}}});var tr,Fu=L(()=>{tr=class{constructor(t,r){this.reason=t,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}});function Tn(e,t){return new tr("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function A1(e,t,r){let n=new Date(Date.UTC(e,t-1,r));e<100&&e>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);let i=n.getUTCDay();return i===0?7:i}function B7(e,t,r){return r+(Ws(e)?G7:z7)[t-1]}function q7(e,t){let r=Ws(e)?G7:z7,n=r.findIndex(o=>o<t),i=t-r[n];return{month:n+1,day:i}}function N1(e,t){return(e-t+7)%7+1}function Vu(e,t=4,r=1){let{year:n,month:i,day:o}=e,s=B7(n,i,o),a=N1(A1(n,i,o),r),u=Math.floor((s-a+14-t)/7),d;return u<1?(d=n-1,u=Us(d,t,r)):u>Us(n,t,r)?(d=n+1,u=1):d=n,{weekYear:d,weekNumber:u,weekday:a,...Wu(e)}}function yb(e,t=4,r=1){let{weekYear:n,weekNumber:i,weekday:o}=e,s=N1(A1(n,1,t),r),a=$o(n),u=i*7+o-s-7+t,d;u<1?(d=n-1,u+=$o(d)):u>a?(d=n+1,u-=$o(n)):d=n;let{month:p,day:m}=q7(d,u);return{year:d,month:p,day:m,...Wu(e)}}function k1(e){let{year:t,month:r,day:n}=e,i=B7(t,r,n);return{year:t,ordinal:i,...Wu(e)}}function bb(e){let{year:t,ordinal:r}=e,{month:n,day:i}=q7(t,r);return{year:t,month:n,day:i,...Wu(e)}}function _b(e,t){if(!_e(e.localWeekday)||!_e(e.localWeekNumber)||!_e(e.localWeekYear)){if(!_e(e.weekday)||!_e(e.weekNumber)||!_e(e.weekYear))throw new zn("Cannot mix locale-based week fields with ISO-based week fields");return _e(e.localWeekday)||(e.weekday=e.localWeekday),_e(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),_e(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function j7(e,t=4,r=1){let n=Uu(e.weekYear),i=an(e.weekNumber,1,Us(e.weekYear,t,r)),o=an(e.weekday,1,7);return n?i?o?!1:Tn("weekday",e.weekday):Tn("week",e.weekNumber):Tn("weekYear",e.weekYear)}function H7(e){let t=Uu(e.year),r=an(e.ordinal,1,$o(e.year));return t?r?!1:Tn("ordinal",e.ordinal):Tn("year",e.year)}function vb(e){let t=Uu(e.year),r=an(e.month,1,12),n=an(e.day,1,hl(e.year,e.month));return t?r?n?!1:Tn("day",e.day):Tn("month",e.month):Tn("year",e.year)}function Sb(e){let{hour:t,minute:r,second:n,millisecond:i}=e,o=an(t,0,23)||t===24&&r===0&&n===0&&i===0,s=an(r,0,59),a=an(n,0,59),u=an(i,0,999);return o?s?a?u?!1:Tn("millisecond",i):Tn("second",n):Tn("minute",r):Tn("hour",t)}var z7,G7,xb=L(()=>{$r();Fu();Po();z7=[0,31,59,90,120,151,181,212,243,273,304,334],G7=[0,31,60,91,121,152,182,213,244,274,305,335]});function _e(e){return typeof e>"u"}function jn(e){return typeof e=="number"}function Uu(e){return typeof e=="number"&&e%1===0}function P7(e){return typeof e=="string"}function Y7(e){return Object.prototype.toString.call(e)==="[object Date]"}function M1(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function L1(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function J7(e){return Array.isArray(e)?e:[e]}function Cb(e,t,r){if(e.length!==0)return e.reduce((n,i)=>{let o=[t(i),i];return n&&r(n[0],o[0])===n[0]?n:o},null)[1]}function X7(e,t){return t.reduce((r,n)=>(r[n]=e[n],r),{})}function Fo(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ou(e){if(e==null)return null;if(typeof e!="object")throw new xt("Week settings must be an object");if(!an(e.firstDay,1,7)||!an(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!an(t,1,7)))throw new xt("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function an(e,t,r){return Uu(e)&&e>=t&&e<=r}function BD(e,t){return e-t*Math.floor(e/t)}function ht(e,t=2){let r=e<0,n;return r?n="-"+(""+-e).padStart(t,"0"):n=(""+e).padStart(t,"0"),n}function ji(e){if(!(_e(e)||e===null||e===""))return parseInt(e,10)}function Vo(e){if(!(_e(e)||e===null||e===""))return parseFloat(e)}function zu(e){if(!(_e(e)||e===null||e==="")){let t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function dl(e,t,r=!1){let n=10**t;return(r?Math.trunc:Math.round)(e*n)/n}function Ws(e){return e%4===0&&(e%100!==0||e%400===0)}function $o(e){return Ws(e)?366:365}function hl(e,t){let r=BD(t-1,12)+1,n=e+(t-r)/12;return r===2?Ws(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function ul(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Z7(e,t,r){return-N1(A1(e,1,t),r)+t-1}function Us(e,t=4,r=1){let n=Z7(e,t,r),i=Z7(e+1,t,r);return($o(e)-n+i)/7}function Gu(e){return e>99?e:e>Ve.twoDigitCutoffYear?1900+e:2e3+e}function x1(e,t,r,n=null){let i=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(o.timeZone=n);let s={timeZoneName:t,...o},a=new Intl.DateTimeFormat(r,s).formatToParts(i).find(u=>u.type.toLowerCase()==="timezonename");return a?a.value:null}function Vs(e,t){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);let n=parseInt(t,10)||0,i=r<0||Object.is(r,-0)?-n:n;return r*60+i}function Tb(e){let t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new xt(`Invalid unit value ${e}`);return t}function gl(e,t){let r={};for(let n in e)if(Fo(e,n)){let i=e[n];if(i==null)continue;r[t(n)]=Tb(i)}return r}function ko(e,t){let r=Math.trunc(Math.abs(e/60)),n=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${ht(r,2)}:${ht(n,2)}`;case"narrow":return`${i}${r}${n>0?`:${n}`:""}`;case"techie":return`${i}${ht(r,2)}${ht(n,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Wu(e){return X7(e,["hour","minute","second","millisecond"])}var $r=L(()=>{Po();Do();xb()});function cb(e){switch(e){case"narrow":return[...jD];case"short":return[...Eb];case"long":return[...qD];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}function ub(e){switch(e){case"narrow":return[...HD];case"short":return[...Lb];case"long":return[...Mb];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}function fb(e){switch(e){case"narrow":return[...JD];case"short":return[...YD];case"long":return[...ZD];default:return null}}function Q7(e){return db[e.hour<12?0:1]}function K7(e,t){return ub(t)[e.weekday-1]}function e6(e,t){return cb(t)[e.month-1]}function t6(e,t){return fb(t)[e.year<0?0:1]}function I7(e,t,r="always",n=!1){let i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(e)===-1;if(r==="auto"&&o){let m=e==="days";switch(t){case 1:return m?"tomorrow":`next ${i[e][0]}`;case-1:return m?"yesterday":`last ${i[e][0]}`;case 0:return m?"today":`this ${i[e][0]}`;default:}}let s=Object.is(t,-0)||t<0,a=Math.abs(t),u=a===1,d=i[e],p=n?u?d[1]:d[2]||d[1]:u?i[e][0]:e;return s?`${a} ${p} ago`:`in ${a} ${p}`}var qD,Eb,jD,Mb,Lb,HD,db,ZD,YD,JD,I1=L(()=>{Ru();$r();qD=["January","February","March","April","May","June","July","August","September","October","November","December"],Eb=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],jD=["J","F","M","A","M","J","J","A","S","O","N","D"];Mb=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Lb=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],HD=["M","T","W","T","F","S","S"];db=["AM","PM"],ZD=["Before Christ","Anno Domini"],YD=["BC","AD"],JD=["B","A"]});function r6(e,t){let r="";for(let n of e)n.literal?r+=n.val:r+=t(n.val);return r}var XD,rr,Bu=L(()=>{I1();Ru();$r();XD={D:Ao,DD:hu,DDD:gu,DDDD:wu,t:yu,tt:bu,ttt:_u,tttt:vu,T:Su,TT:xu,TTT:Cu,TTTT:Tu,f:Eu,ff:Lu,fff:Pu,ffff:Nu,F:Mu,FF:Iu,FFF:Au,FFFF:ku},rr=class e{static create(t,r={}){return new e(t,r)}static parseFormat(t){let r=null,n="",i=!1,o=[];for(let s=0;s<t.length;s++){let a=t.charAt(s);a==="'"?(n.length>0&&o.push({literal:i||/^\s+$/.test(n),val:n}),r=null,n="",i=!i):i||a===r?n+=a:(n.length>0&&o.push({literal:/^\s+$/.test(n),val:n}),n=a,r=a)}return n.length>0&&o.push({literal:i||/^\s+$/.test(n),val:n}),o}static macroTokenToFormatOpts(t){return XD[t]}constructor(t,r){this.opts=r,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...r}).format()}dtFormatter(t,r={}){return this.loc.dtFormatter(t,{...this.opts,...r})}formatDateTime(t,r){return this.dtFormatter(t,r).format()}formatDateTimeParts(t,r){return this.dtFormatter(t,r).formatToParts()}formatInterval(t,r){return this.dtFormatter(t.start,r).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,r){return this.dtFormatter(t,r).resolvedOptions()}num(t,r=0){if(this.opts.forceSimple)return ht(t,r);let n={...this.opts};return r>0&&(n.padTo=r),this.loc.numberFormatter(n).format(t)}formatDateTimeFromString(t,r){let n=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(_,S)=>this.loc.extract(t,_,S),s=_=>t.isOffsetFixed&&t.offset===0&&_.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,_.format):"",a=()=>n?Q7(t):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(_,S)=>n?e6(t,_):o(S?{month:_}:{month:_,day:"numeric"},"month"),d=(_,S)=>n?K7(t,_):o(S?{weekday:_}:{weekday:_,month:"long",day:"numeric"},"weekday"),p=_=>{let S=e.macroTokenToFormatOpts(_);return S?this.formatWithSystemDefault(t,S):_},m=_=>n?t6(t,_):o({era:_},"era"),w=_=>{switch(_){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return a();case"d":return i?o({day:"numeric"},"day"):this.num(t.day);case"dd":return i?o({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return i?o({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return i?o({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return i?o({month:"numeric"},"month"):this.num(t.month);case"MM":return i?o({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return i?o({year:"numeric"},"year"):this.num(t.year);case"yy":return i?o({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return i?o({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return i?o({year:"numeric"},"year"):this.num(t.year,6);case"G":return m("short");case"GG":return m("long");case"GGGGG":return m("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return p(_)}};return r6(e.parseFormat(r),w)}formatDurationFromString(t,r){let n=u=>{switch(u[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=u=>d=>{let p=n(d);return p?this.num(u.get(p),d.length):d},o=e.parseFormat(r),s=o.reduce((u,{literal:d,val:p})=>d?u:u.concat(p),[]),a=t.shiftTo(...s.map(n).filter(u=>u));return r6(o,i(a))}}});function yl(...e){let t=e.reduce((r,n)=>r+n.source,"");return RegExp(`^${t}$`)}function bl(...e){return t=>e.reduce(([r,n,i],o)=>{let[s,a,u]=o(t,i);return[{...r,...s},a||n,u]},[{},null,1]).slice(0,2)}function _l(e,...t){if(e==null)return[null,null];for(let[r,n]of t){let i=r.exec(e);if(i)return n(i)}return[null,null]}function o6(...e){return(t,r)=>{let n={},i;for(i=0;i<e.length;i++)n[e[i]]=ji(t[r+i]);return[n,null,r+i]}}function wl(e,t,r){let n=e[t];return _e(n)?r:ji(n)}function sO(e,t){return[{year:wl(e,t),month:wl(e,t+1,1),day:wl(e,t+2,1)},null,t+3]}function vl(e,t){return[{hours:wl(e,t,0),minutes:wl(e,t+1,0),seconds:wl(e,t+2,0),milliseconds:zu(e[t+3])},null,t+4]}function qu(e,t){let r=!e[t]&&!e[t+1],n=Vs(e[t+1],e[t+2]),i=r?null:He.instance(n);return[{},i,t+3]}function ju(e,t){let r=e[t]?Ct.create(e[t]):null;return[{},r,t+1]}function cO(e){let[t,r,n,i,o,s,a,u,d]=e,p=t[0]==="-",m=u&&u[0]==="-",w=(_,S=!1)=>_!==void 0&&(S||_&&p)?-_:_;return[{years:w(Vo(r)),months:w(Vo(n)),weeks:w(Vo(i)),days:w(Vo(o)),hours:w(Vo(s)),minutes:w(Vo(a)),seconds:w(Vo(u),u==="-0"),milliseconds:w(zu(d),m)}]}function Ab(e,t,r,n,i,o,s){let a={year:t.length===2?Gu(ji(t)):ji(t),month:Eb.indexOf(r)+1,day:ji(n),hour:ji(i),minute:ji(o)};return s&&(a.second=ji(s)),e&&(a.weekday=e.length>3?Mb.indexOf(e)+1:Lb.indexOf(e)+1),a}function fO(e){let[,t,r,n,i,o,s,a,u,d,p,m]=e,w=Ab(t,i,n,r,o,s,a),_;return u?_=uO[u]:d?_=0:_=Vs(p,m),[w,new He(_)]}function pO(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}function n6(e){let[,t,r,n,i,o,s,a]=e;return[Ab(t,i,n,r,o,s,a),He.utcInstance]}function wO(e){let[,t,r,n,i,o,s,a]=e;return[Ab(t,a,r,n,i,o,s),He.utcInstance]}function u6(e){return _l(e,[yO,c6],[bO,SO],[_O,xO],[vO,CO])}function d6(e){return _l(pO(e),[dO,fO])}function f6(e){return _l(e,[mO,n6],[hO,n6],[gO,wO])}function p6(e){return _l(e,[lO,cO])}function m6(e){return _l(e,[aO,TO])}function h6(e){return _l(e,[EO,c6],[MO,LO])}var i6,s6,QD,Ib,a6,Pb,KD,eO,tO,rO,nO,iO,l6,oO,aO,lO,uO,dO,mO,hO,gO,yO,bO,_O,vO,c6,SO,xO,CO,TO,EO,MO,LO,Nb=L(()=>{$r();I1();fl();Ro();i6=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;s6=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,QD=`(?:${s6.source}?(?:\\[(${i6.source})\\])?)?`,Ib=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,a6=RegExp(`${Ib.source}${QD}`),Pb=RegExp(`(?:T${a6.source})?`),KD=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,eO=/(\d{4})-?W(\d\d)(?:-?(\d))?/,tO=/(\d{4})-?(\d{3})/,rO=o6("weekYear","weekNumber","weekDay"),nO=o6("year","ordinal"),iO=/(\d{4})-(\d\d)-(\d\d)/,l6=RegExp(`${Ib.source} ?(?:${s6.source}|(${i6.source}))?`),oO=RegExp(`(?: ${l6.source})?`);aO=RegExp(`^T?${Ib.source}$`),lO=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;uO={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};dO=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;mO=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,hO=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,gO=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;yO=yl(KD,Pb),bO=yl(eO,Pb),_O=yl(tO,Pb),vO=yl(a6),c6=bl(sO,vl,qu,ju),SO=bl(rO,vl,qu,ju),xO=bl(nO,vl,qu,ju),CO=bl(vl,qu,ju);TO=bl(vl);EO=yl(iO,oO),MO=yl(l6),LO=bl(vl,qu,ju)});function Uo(e,t,r=!1){let n={values:r?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new gt(n)}function b6(e,t){let r=t.milliseconds??0;for(let n of AO.slice(1))t[n]&&(r+=t[n]*e[n].milliseconds);return r}function w6(e,t){let r=b6(e,t)<0?-1:1;zs.reduceRight((n,i)=>{if(_e(t[i]))return n;if(n){let o=t[n]*r,s=e[i][n],a=Math.floor(o/s);t[i]+=a*r,t[n]-=a*s*r}return i},null),zs.reduce((n,i)=>{if(_e(t[i]))return n;if(n){let o=t[n]%1;t[n]-=o,t[i]+=o*e[n][i]}return i},null)}function NO(e){let t={};for(let[r,n]of Object.entries(e))n!==0&&(t[r]=n);return t}var g6,y6,IO,En,Sl,PO,zs,AO,gt,Hu=L(()=>{Po();Bu();Fu();$u();Nb();$r();Do();Oo();g6="Invalid Duration",y6={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},IO={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...y6},En=146097/400,Sl=146097/4800,PO={years:{quarters:4,months:12,weeks:En/7,days:En,hours:En*24,minutes:En*24*60,seconds:En*24*60*60,milliseconds:En*24*60*60*1e3},quarters:{months:3,weeks:En/28,days:En/4,hours:En*24/4,minutes:En*24*60/4,seconds:En*24*60*60/4,milliseconds:En*24*60*60*1e3/4},months:{weeks:Sl/7,days:Sl,hours:Sl*24,minutes:Sl*24*60,seconds:Sl*24*60*60,milliseconds:Sl*24*60*60*1e3},...y6},zs=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],AO=zs.slice(0).reverse();gt=class e{constructor(t){let r=t.conversionAccuracy==="longterm"||!1,n=r?PO:IO;t.matrix&&(n=t.matrix),this.values=t.values,this.loc=t.loc||Ue.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,r){return e.fromObject({milliseconds:t},r)}static fromObject(t,r={}){if(t==null||typeof t!="object")throw new xt(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new e({values:gl(t,e.normalizeUnit),loc:Ue.fromObject(r),conversionAccuracy:r.conversionAccuracy,matrix:r.matrix})}static fromDurationLike(t){if(jn(t))return e.fromMillis(t);if(e.isDuration(t))return t;if(typeof t=="object")return e.fromObject(t);throw new xt(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,r){let[n]=p6(t);return n?e.fromObject(n,r):e.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,r){let[n]=m6(t);return n?e.fromObject(n,r):e.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,r=null){if(!t)throw new xt("need to specify a reason the Duration is invalid");let n=t instanceof tr?t:new tr(t,r);if(Ve.throwOnInvalid)throw new _1(n);return new e({invalid:n})}static normalizeUnit(t){let r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!r)throw new cl(t);return r}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,r={}){let n={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?rr.create(this.loc,n).formatDurationFromString(this,t):g6}toHuman(t={}){if(!this.isValid)return g6;let r=zs.map(n=>{let i=this.values[n];return _e(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:n.slice(0,-1)}).format(i)}).filter(n=>n);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=dl(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;let r=this.toMillis();return r<0||r>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},oe.fromMillis(r,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?b6(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;let r=e.fromDurationLike(t),n={};for(let i of zs)(Fo(r.values,i)||Fo(this.values,i))&&(n[i]=r.get(i)+this.get(i));return Uo(this,{values:n},!0)}minus(t){if(!this.isValid)return this;let r=e.fromDurationLike(t);return this.plus(r.negate())}mapUnits(t){if(!this.isValid)return this;let r={};for(let n of Object.keys(this.values))r[n]=Tb(t(this.values[n],n));return Uo(this,{values:r},!0)}get(t){return this[e.normalizeUnit(t)]}set(t){if(!this.isValid)return this;let r={...this.values,...gl(t,e.normalizeUnit)};return Uo(this,{values:r})}reconfigure({locale:t,numberingSystem:r,conversionAccuracy:n,matrix:i}={}){let s={loc:this.loc.clone({locale:t,numberingSystem:r}),matrix:i,conversionAccuracy:n};return Uo(this,s)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;let t=this.toObject();return w6(this.matrix,t),Uo(this,{values:t},!0)}rescale(){if(!this.isValid)return this;let t=NO(this.normalize().shiftToAll().toObject());return Uo(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(s=>e.normalizeUnit(s));let r={},n={},i=this.toObject(),o;for(let s of zs)if(t.indexOf(s)>=0){o=s;let a=0;for(let d in n)a+=this.matrix[d][s]*n[d],n[d]=0;jn(i[s])&&(a+=i[s]);let u=Math.trunc(a);r[s]=u,n[s]=(a*1e3-u*1e3)/1e3}else jn(i[s])&&(n[s]=i[s]);for(let s in n)n[s]!==0&&(r[o]+=s===o?n[s]:n[s]/this.matrix[o][s]);return w6(this.matrix,r),Uo(this,{values:r},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let t={};for(let r of Object.keys(this.values))t[r]=this.values[r]===0?0:-this.values[r];return Uo(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function r(n,i){return n===void 0||n===0?i===void 0||i===0:n===i}for(let n of zs)if(!r(this.values[n],t.values[n]))return!1;return!0}}});function kO(e,t){return!e||!e.isValid?Hi.invalid("missing or invalid start"):!t||!t.isValid?Hi.invalid("missing or invalid end"):t<e?Hi.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}var xl,Hi,kb=L(()=>{Oo();Hu();Do();Po();Fu();Bu();Ru();xl="Invalid Interval";Hi=class e{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,r=null){if(!t)throw new xt("need to specify a reason the Interval is invalid");let n=t instanceof tr?t:new tr(t,r);if(Ve.throwOnInvalid)throw new b1(n);return new e({invalid:n})}static fromDateTimes(t,r){let n=Cl(t),i=Cl(r),o=kO(n,i);return o??new e({start:n,end:i})}static after(t,r){let n=gt.fromDurationLike(r),i=Cl(t);return e.fromDateTimes(i,i.plus(n))}static before(t,r){let n=gt.fromDurationLike(r),i=Cl(t);return e.fromDateTimes(i.minus(n),i)}static fromISO(t,r){let[n,i]=(t||"").split("/",2);if(n&&i){let o,s;try{o=oe.fromISO(n,r),s=o.isValid}catch{s=!1}let a,u;try{a=oe.fromISO(i,r),u=a.isValid}catch{u=!1}if(s&&u)return e.fromDateTimes(o,a);if(s){let d=gt.fromISO(i,r);if(d.isValid)return e.after(o,d)}else if(u){let d=gt.fromISO(n,r);if(d.isValid)return e.before(a,d)}}return e.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",r){if(!this.isValid)return NaN;let n=this.start.startOf(t,r),i;return r?.useLocaleWeeks?i=this.end.reconfigure({locale:n.locale}):i=this.end,i=i.startOf(t,r),Math.floor(i.diff(n,t).get(t))+(i.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:r}={}){return this.isValid?e.fromDateTimes(t||this.s,r||this.e):this}splitAt(...t){if(!this.isValid)return[];let r=t.map(Cl).filter(s=>this.contains(s)).sort((s,a)=>s.toMillis()-a.toMillis()),n=[],{s:i}=this,o=0;for(;i<this.e;){let s=r[o]||this.e,a=+s>+this.e?this.e:s;n.push(e.fromDateTimes(i,a)),i=a,o+=1}return n}splitBy(t){let r=gt.fromDurationLike(t);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:n}=this,i=1,o,s=[];for(;n<this.e;){let a=this.start.plus(r.mapUnits(u=>u*i));o=+a>+this.e?this.e:a,s.push(e.fromDateTimes(n,o)),n=o,i+=1}return s}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;let r=this.s>t.s?this.s:t.s,n=this.e<t.e?this.e:t.e;return r>=n?null:e.fromDateTimes(r,n)}union(t){if(!this.isValid)return this;let r=this.s<t.s?this.s:t.s,n=this.e>t.e?this.e:t.e;return e.fromDateTimes(r,n)}static merge(t){let[r,n]=t.sort((i,o)=>i.s-o.s).reduce(([i,o],s)=>o?o.overlaps(s)||o.abutsStart(s)?[i,o.union(s)]:[i.concat([o]),s]:[i,s],[[],null]);return n&&r.push(n),r}static xor(t){let r=null,n=0,i=[],o=t.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),s=Array.prototype.concat(...o),a=s.sort((u,d)=>u.time-d.time);for(let u of a)n+=u.type==="s"?1:-1,n===1?r=u.time:(r&&+r!=+u.time&&i.push(e.fromDateTimes(r,u.time)),r=null);return e.merge(i)}difference(...t){return e.xor([this].concat(t)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:xl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=Ao,r={}){return this.isValid?rr.create(this.s.loc.clone(r),t).formatInterval(this):xl}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:xl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:xl}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:xl}toFormat(t,{separator:r=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(t)}${r}${this.e.toFormat(t)}`:xl}toDuration(t,r){return this.isValid?this.e.diff(this.s,t,r):gt.invalid(this.invalidReason)}mapEndpoints(t){return e.fromDateTimes(t(this.s),t(this.e))}}});var Zi,Rb=L(()=>{Oo();Do();$u();Ro();P1();$r();Zi=class{static hasDST(t=Ve.defaultZone){let r=oe.now().setZone(t).set({month:12});return!t.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(t){return Ct.isValidZone(t)}static normalizeZone(t){return qn(t,Ve.defaultZone)}static getStartOfWeek({locale:t=null,locObj:r=null}={}){return(r||Ue.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:r=null}={}){return(r||Ue.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:r=null}={}){return(r||Ue.create(t)).getWeekendDays().slice()}static months(t="long",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||Ue.create(r,n,o)).months(t)}static monthsFormat(t="long",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||Ue.create(r,n,o)).months(t,!0)}static weekdays(t="long",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Ue.create(r,n,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Ue.create(r,n,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Ue.create(t).meridiems()}static eras(t="short",{locale:r=null}={}){return Ue.create(r,null,"gregory").eras(t)}static features(){return{relative:M1(),localeWeek:L1()}}}});function _6(e,t){let r=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=r(t)-r(e);return Math.floor(gt.fromMillis(n).as("days"))}function RO(e,t,r){let n=[["years",(u,d)=>d.year-u.year],["quarters",(u,d)=>d.quarter-u.quarter+(d.year-u.year)*4],["months",(u,d)=>d.month-u.month+(d.year-u.year)*12],["weeks",(u,d)=>{let p=_6(u,d);return(p-p%7)/7}],["days",_6]],i={},o=e,s,a;for(let[u,d]of n)r.indexOf(u)>=0&&(s=u,i[u]=d(e,t),a=o.plus(i),a>t?(i[u]--,e=o.plus(i),e>t&&(a=e,i[u]--,e=o.plus(i))):e=a);return[e,i,a,s]}function v6(e,t,r,n){let[i,o,s,a]=RO(e,t,r),u=t-i,d=r.filter(m=>["hours","minutes","seconds","milliseconds"].indexOf(m)>=0);d.length===0&&(s<t&&(s=i.plus({[a]:1})),s!==i&&(o[a]=(o[a]||0)+u/(s-i)));let p=gt.fromObject(o,n);return d.length>0?gt.fromMillis(u,n).shiftTo(...d).plus(p):p}var S6=L(()=>{Hu()});function qe(e,t=r=>r){return{regex:e,deser:([r])=>t(N7(r))}}function $O(e){return e.replace(/\./g,"\\.?").replace(E6,T6)}function x6(e){return e.replace(/\./g,"").replace(E6," ").toLowerCase()}function Hn(e,t){return e===null?null:{regex:RegExp(e.map($O).join("|")),deser:([r])=>e.findIndex(n=>x6(r)===x6(n))+t}}function C6(e,t){return{regex:e,deser:([,r,n])=>Vs(r,n),groups:t}}function R1(e){return{regex:e,deser:([t])=>t}}function FO(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function VO(e,t){let r=Cn(t),n=Cn(t,"{2}"),i=Cn(t,"{3}"),o=Cn(t,"{4}"),s=Cn(t,"{6}"),a=Cn(t,"{1,2}"),u=Cn(t,"{1,3}"),d=Cn(t,"{1,6}"),p=Cn(t,"{1,9}"),m=Cn(t,"{2,4}"),w=Cn(t,"{4,6}"),_=M=>({regex:RegExp(FO(M.val)),deser:([k])=>k,literal:!0}),C=(M=>{if(e.literal)return _(M);switch(M.val){case"G":return Hn(t.eras("short"),0);case"GG":return Hn(t.eras("long"),0);case"y":return qe(d);case"yy":return qe(m,Gu);case"yyyy":return qe(o);case"yyyyy":return qe(w);case"yyyyyy":return qe(s);case"M":return qe(a);case"MM":return qe(n);case"MMM":return Hn(t.months("short",!0),1);case"MMMM":return Hn(t.months("long",!0),1);case"L":return qe(a);case"LL":return qe(n);case"LLL":return Hn(t.months("short",!1),1);case"LLLL":return Hn(t.months("long",!1),1);case"d":return qe(a);case"dd":return qe(n);case"o":return qe(u);case"ooo":return qe(i);case"HH":return qe(n);case"H":return qe(a);case"hh":return qe(n);case"h":return qe(a);case"mm":return qe(n);case"m":return qe(a);case"q":return qe(a);case"qq":return qe(n);case"s":return qe(a);case"ss":return qe(n);case"S":return qe(u);case"SSS":return qe(i);case"u":return R1(p);case"uu":return R1(a);case"uuu":return qe(r);case"a":return Hn(t.meridiems(),0);case"kkkk":return qe(o);case"kk":return qe(m,Gu);case"W":return qe(a);case"WW":return qe(n);case"E":case"c":return qe(r);case"EEE":return Hn(t.weekdays("short",!1),1);case"EEEE":return Hn(t.weekdays("long",!1),1);case"ccc":return Hn(t.weekdays("short",!0),1);case"cccc":return Hn(t.weekdays("long",!0),1);case"Z":case"ZZ":return C6(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return C6(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return R1(/[a-z_+-/]{1,256}?/i);case" ":return R1(/[^\S\n\r]/);default:return _(M)}})(e)||{invalidReason:DO};return C.token=e,C}function WO(e,t,r){let{type:n,value:i}=e;if(n==="literal"){let u=/^\s+$/.test(i);return{literal:!u,val:u?" ":i}}let o=t[n],s=n;n==="hour"&&(t.hour12!=null?s=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?s="hour12":s="hour24":s=r.hour12?"hour12":"hour24");let a=UO[s];if(typeof a=="object"&&(a=a[o]),a)return{literal:!1,val:a}}function zO(e){return[`^${e.map(r=>r.regex).reduce((r,n)=>`${r}(${n.source})`,"")}$`,e]}function GO(e,t,r){let n=e.match(t);if(n){let i={},o=1;for(let s in r)if(Fo(r,s)){let a=r[s],u=a.groups?a.groups+1:1;!a.literal&&a.token&&(i[a.token.val[0]]=a.deser(n.slice(o,o+u))),o+=u}return[n,i]}else return[n,{}]}function BO(e){let t=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},r=null,n;return _e(e.z)||(r=Ct.create(e.z)),_e(e.Z)||(r||(r=new He(e.Z)),n=e.Z),_e(e.q)||(e.M=(e.q-1)*3+1),_e(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),_e(e.u)||(e.S=zu(e.u)),[Object.keys(e).reduce((o,s)=>{let a=t(s);return a&&(o[a]=e[s]),o},{}),r,n]}function qO(){return Db||(Db=oe.fromMillis(1555555555555)),Db}function jO(e,t){if(e.literal)return e;let r=rr.macroTokenToFormatOpts(e.val),n=Fb(r,t);return n==null||n.includes(void 0)?e:n}function Ob(e,t){return Array.prototype.concat(...e.map(r=>jO(r,t)))}function $b(e,t,r){return new Zu(e,r).explainFromTokens(t)}function M6(e,t,r){let{result:n,zone:i,specificOffset:o,invalidReason:s}=$b(e,t,r);return[n,i,o,s]}function Fb(e,t){if(!e)return null;let n=rr.create(t,e).dtFormatter(qO()),i=n.formatToParts(),o=n.resolvedOptions();return i.map(s=>WO(s,e,o))}var DO,OO,T6,E6,UO,Db,Zu,L6=L(()=>{$r();Bu();fl();Ro();Oo();wb();Po();DO="missing Intl.DateTimeFormat.formatToParts support";OO="\xA0",T6=`[ ${OO}]`,E6=new RegExp(T6,"g");UO={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};Db=null;Zu=class{constructor(t,r){if(this.locale=t,this.format=r,this.tokens=Ob(rr.parseFormat(r),t),this.units=this.tokens.map(n=>VO(n,t)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){let[n,i]=zO(this.units);this.regex=RegExp(n,"i"),this.handlers=i}}explainFromTokens(t){if(this.isValid){let[r,n]=GO(t,this.regex,this.handlers),[i,o,s]=n?BO(n):[null,null,void 0];if(Fo(n,"a")&&Fo(n,"H"))throw new zn("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:r,matches:n,result:i,zone:o,specificOffset:s}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}});function Yu(e){return new tr("unsupported zone",`the zone "${e.name}" is not supported`)}function Ub(e){return e.weekData===null&&(e.weekData=Vu(e.c)),e.weekData}function Wb(e){return e.localWeekData===null&&(e.localWeekData=Vu(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Gs(e,t){let r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new oe({...r,...t,old:r})}function O6(e,t,r){let n=e-t*60*1e3,i=r.offset(n);if(t===i)return[n,t];n-=(i-t)*60*1e3;let o=r.offset(n);return i===o?[n,i]:[e-Math.min(i,o)*60*1e3,Math.max(i,o)]}function D1(e,t){e+=t*60*1e3;let r=new Date(e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function $1(e,t,r){return O6(ul(e),t,r)}function P6(e,t){let r=e.o,n=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,o={...e.c,year:n,month:i,day:Math.min(e.c.day,hl(n,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},s=gt.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=ul(o),[u,d]=O6(a,r,e.zone);return s!==0&&(u+=s,d=e.zone.offset(u)),{ts:u,o:d}}function Tl(e,t,r,n,i,o){let{setZone:s,zone:a}=r;if(e&&Object.keys(e).length!==0||t){let u=t||a,d=oe.fromObject(e,{...r,zone:u,specificOffset:o});return s?d:d.setZone(a)}else return oe.invalid(new tr("unparsable",`the input "${i}" can't be parsed as ${n}`))}function O1(e,t,r=!0){return e.isValid?rr.create(Ue.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,t):null}function zb(e,t){let r=e.c.year>9999||e.c.year<0,n="";return r&&e.c.year>=0&&(n+="+"),n+=ht(e.c.year,r?6:4),t?(n+="-",n+=ht(e.c.month),n+="-",n+=ht(e.c.day)):(n+=ht(e.c.month),n+=ht(e.c.day)),n}function A6(e,t,r,n,i,o){let s=ht(e.c.hour);return t?(s+=":",s+=ht(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!r)&&(s+=":")):s+=ht(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!r)&&(s+=ht(e.c.second),(e.c.millisecond!==0||!n)&&(s+=".",s+=ht(e.c.millisecond,3))),i&&(e.isOffsetFixed&&e.offset===0&&!o?s+="Z":e.o<0?(s+="-",s+=ht(Math.trunc(-e.o/60)),s+=":",s+=ht(Math.trunc(-e.o%60))):(s+="+",s+=ht(Math.trunc(e.o/60)),s+=":",s+=ht(Math.trunc(e.o%60)))),o&&(s+="["+e.zone.ianaName+"]"),s}function XO(e){let t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new cl(e);return t}function N6(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return XO(e)}}function QO(e){return V1[e]||(F1===void 0&&(F1=Ve.now()),V1[e]=e.offset(F1)),V1[e]}function k6(e,t){let r=qn(t.zone,Ve.defaultZone);if(!r.isValid)return oe.invalid(Yu(r));let n=Ue.fromObject(t),i,o;if(_e(e.year))i=Ve.now();else{for(let u of F6)_e(e[u])&&(e[u]=$6[u]);let s=vb(e)||Sb(e);if(s)return oe.invalid(s);let a=QO(r);[i,o]=$1(e,a,r)}return new oe({ts:i,zone:r,loc:n,o})}function R6(e,t,r){let n=_e(r.round)?!0:r.round,i=(s,a)=>(s=dl(s,n||r.calendary?0:2,!0),t.loc.clone(r).relFormatter(r).format(s,a)),o=s=>r.calendary?t.hasSame(e,s)?0:t.startOf(s).diff(e.startOf(s),s).get(s):t.diff(e,s).get(s);if(r.unit)return i(o(r.unit),r.unit);for(let s of r.units){let a=o(s);if(Math.abs(a)>=1)return i(a,s)}return i(e>t?-0:0,r.units[r.units.length-1])}function D6(e){let t={},r;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],r=Array.from(e).slice(0,e.length-1)):r=Array.from(e),[t,r]}function Cl(e){if(oe.isDateTime(e))return e;if(e&&e.valueOf&&jn(e.valueOf()))return oe.fromJSDate(e);if(e&&typeof e=="object")return oe.fromObject(e);throw new xt(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var Vb,I6,$6,HO,ZO,F6,YO,JO,F1,V1,oe,Oo=L(()=>{Hu();kb();Do();Rb();Bu();fl();$u();$r();P1();S6();Nb();L6();xb();Ru();Po();Fu();Vb="Invalid DateTime",I6=864e13;$6={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},HO={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ZO={ordinal:1,hour:0,minute:0,second:0,millisecond:0},F6=["year","month","day","hour","minute","second","millisecond"],YO=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],JO=["year","ordinal","hour","minute","second","millisecond"];V1={},oe=class e{constructor(t){let r=t.zone||Ve.defaultZone,n=t.invalid||(Number.isNaN(t.ts)?new tr("invalid input"):null)||(r.isValid?null:Yu(r));this.ts=_e(t.ts)?Ve.now():t.ts;let i=null,o=null;if(!n)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(r))[i,o]=[t.old.c,t.old.o];else{let a=jn(t.o)&&!t.old?t.o:r.offset(this.ts);i=D1(this.ts,a),n=Number.isNaN(i.year)?new tr("invalid input"):null,i=n?null:i,o=n?null:a}this._zone=r,this.loc=t.loc||Ue.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=o,this.isLuxonDateTime=!0}static now(){return new e({})}static local(){let[t,r]=D6(arguments),[n,i,o,s,a,u,d]=r;return k6({year:n,month:i,day:o,hour:s,minute:a,second:u,millisecond:d},t)}static utc(){let[t,r]=D6(arguments),[n,i,o,s,a,u,d]=r;return t.zone=He.utcInstance,k6({year:n,month:i,day:o,hour:s,minute:a,second:u,millisecond:d},t)}static fromJSDate(t,r={}){let n=Y7(t)?t.valueOf():NaN;if(Number.isNaN(n))return e.invalid("invalid input");let i=qn(r.zone,Ve.defaultZone);return i.isValid?new e({ts:n,zone:i,loc:Ue.fromObject(r)}):e.invalid(Yu(i))}static fromMillis(t,r={}){if(jn(t))return t<-I6||t>I6?e.invalid("Timestamp out of range"):new e({ts:t,zone:qn(r.zone,Ve.defaultZone),loc:Ue.fromObject(r)});throw new xt(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,r={}){if(jn(t))return new e({ts:t*1e3,zone:qn(r.zone,Ve.defaultZone),loc:Ue.fromObject(r)});throw new xt("fromSeconds requires a numerical input")}static fromObject(t,r={}){t=t||{};let n=qn(r.zone,Ve.defaultZone);if(!n.isValid)return e.invalid(Yu(n));let i=Ue.fromObject(r),o=gl(t,N6),{minDaysInFirstWeek:s,startOfWeek:a}=_b(o,i),u=Ve.now(),d=_e(r.specificOffset)?n.offset(u):r.specificOffset,p=!_e(o.ordinal),m=!_e(o.year),w=!_e(o.month)||!_e(o.day),_=m||w,S=o.weekYear||o.weekNumber;if((_||p)&&S)throw new zn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(w&&p)throw new zn("Can't mix ordinal dates with month/day");let C=S||o.weekday&&!_,M,k,I=D1(u,d);C?(M=YO,k=HO,I=Vu(I,s,a)):p?(M=JO,k=ZO,I=k1(I)):(M=F6,k=$6);let N=!1;for(let be of M){let de=o[be];_e(de)?N?o[be]=k[be]:o[be]=I[be]:N=!0}let V=C?j7(o,s,a):p?H7(o):vb(o),Y=V||Sb(o);if(Y)return e.invalid(Y);let re=C?yb(o,s,a):p?bb(o):o,[te,ie]=$1(re,d,n),ge=new e({ts:te,zone:n,o:ie,loc:i});return o.weekday&&_&&t.weekday!==ge.weekday?e.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${ge.toISO()}`):ge.isValid?ge:e.invalid(ge.invalid)}static fromISO(t,r={}){let[n,i]=u6(t);return Tl(n,i,r,"ISO 8601",t)}static fromRFC2822(t,r={}){let[n,i]=d6(t);return Tl(n,i,r,"RFC 2822",t)}static fromHTTP(t,r={}){let[n,i]=f6(t);return Tl(n,i,r,"HTTP",r)}static fromFormat(t,r,n={}){if(_e(t)||_e(r))throw new xt("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:o=null}=n,s=Ue.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0}),[a,u,d,p]=M6(s,t,r);return p?e.invalid(p):Tl(a,u,n,`format ${r}`,t,d)}static fromString(t,r,n={}){return e.fromFormat(t,r,n)}static fromSQL(t,r={}){let[n,i]=h6(t);return Tl(n,i,r,"SQL",t)}static invalid(t,r=null){if(!t)throw new xt("need to specify a reason the DateTime is invalid");let n=t instanceof tr?t:new tr(t,r);if(Ve.throwOnInvalid)throw new y1(n);return new e({invalid:n})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,r={}){let n=Fb(t,Ue.fromObject(r));return n?n.map(i=>i?i.val:null).join(""):null}static expandFormat(t,r={}){return Ob(rr.parseFormat(t),Ue.fromObject(r)).map(i=>i.val).join("")}static resetCache(){F1=void 0,V1={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ub(this).weekYear:NaN}get weekNumber(){return this.isValid?Ub(this).weekNumber:NaN}get weekday(){return this.isValid?Ub(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Wb(this).weekday:NaN}get localWeekNumber(){return this.isValid?Wb(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Wb(this).weekYear:NaN}get ordinal(){return this.isValid?k1(this.c).ordinal:NaN}get monthShort(){return this.isValid?Zi.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Zi.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Zi.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Zi.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let t=864e5,r=6e4,n=ul(this.c),i=this.zone.offset(n-t),o=this.zone.offset(n+t),s=this.zone.offset(n-i*r),a=this.zone.offset(n-o*r);if(s===a)return[this];let u=n-s*r,d=n-a*r,p=D1(u,s),m=D1(d,a);return p.hour===m.hour&&p.minute===m.minute&&p.second===m.second&&p.millisecond===m.millisecond?[Gs(this,{ts:u}),Gs(this,{ts:d})]:[this]}get isInLeapYear(){return Ws(this.year)}get daysInMonth(){return hl(this.year,this.month)}get daysInYear(){return this.isValid?$o(this.year):NaN}get weeksInWeekYear(){return this.isValid?Us(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Us(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){let{locale:r,numberingSystem:n,calendar:i}=rr.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:r,numberingSystem:n,outputCalendar:i}}toUTC(t=0,r={}){return this.setZone(He.instance(t),r)}toLocal(){return this.setZone(Ve.defaultZone)}setZone(t,{keepLocalTime:r=!1,keepCalendarTime:n=!1}={}){if(t=qn(t,Ve.defaultZone),t.equals(this.zone))return this;if(t.isValid){let i=this.ts;if(r||n){let o=t.offset(this.ts),s=this.toObject();[i]=$1(s,o,t)}return Gs(this,{ts:i,zone:t})}else return e.invalid(Yu(t))}reconfigure({locale:t,numberingSystem:r,outputCalendar:n}={}){let i=this.loc.clone({locale:t,numberingSystem:r,outputCalendar:n});return Gs(this,{loc:i})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;let r=gl(t,N6),{minDaysInFirstWeek:n,startOfWeek:i}=_b(r,this.loc),o=!_e(r.weekYear)||!_e(r.weekNumber)||!_e(r.weekday),s=!_e(r.ordinal),a=!_e(r.year),u=!_e(r.month)||!_e(r.day),d=a||u,p=r.weekYear||r.weekNumber;if((d||s)&&p)throw new zn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&s)throw new zn("Can't mix ordinal dates with month/day");let m;o?m=yb({...Vu(this.c,n,i),...r},n,i):_e(r.ordinal)?(m={...this.toObject(),...r},_e(r.day)&&(m.day=Math.min(hl(m.year,m.month),m.day))):m=bb({...k1(this.c),...r});let[w,_]=$1(m,this.o,this.zone);return Gs(this,{ts:w,o:_})}plus(t){if(!this.isValid)return this;let r=gt.fromDurationLike(t);return Gs(this,P6(this,r))}minus(t){if(!this.isValid)return this;let r=gt.fromDurationLike(t).negate();return Gs(this,P6(this,r))}startOf(t,{useLocaleWeeks:r=!1}={}){if(!this.isValid)return this;let n={},i=gt.normalizeUnit(t);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break;case"milliseconds":break}if(i==="weeks")if(r){let o=this.loc.getStartOfWeek(),{weekday:s}=this;s<o&&(n.weekNumber=this.weekNumber-1),n.weekday=o}else n.weekday=1;if(i==="quarters"){let o=Math.ceil(this.month/3);n.month=(o-1)*3+1}return this.set(n)}endOf(t,r){return this.isValid?this.plus({[t]:1}).startOf(t,r).minus(1):this}toFormat(t,r={}){return this.isValid?rr.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,t):Vb}toLocaleString(t=Ao,r={}){return this.isValid?rr.create(this.loc.clone(r),t).formatDateTime(this):Vb}toLocaleParts(t={}){return this.isValid?rr.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:r=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:o=!1}={}){if(!this.isValid)return null;let s=t==="extended",a=zb(this,s);return a+="T",a+=A6(this,s,r,n,i,o),a}toISODate({format:t="extended"}={}){return this.isValid?zb(this,t==="extended"):null}toISOWeekDate(){return O1(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:r=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:o=!1,format:s="extended"}={}){return this.isValid?(i?"T":"")+A6(this,s==="extended",r,t,n,o):null}toRFC2822(){return O1(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return O1(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?zb(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:r=!1,includeOffsetSpace:n=!0}={}){let i="HH:mm:ss.SSS";return(r||t)&&(n&&(i+=" "),r?i+="z":t&&(i+="ZZ")),O1(this,i,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Vb}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};let r={...this.c};return t.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,r="milliseconds",n={}){if(!this.isValid||!t.isValid)return gt.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...n},o=J7(r).map(gt.normalizeUnit),s=t.valueOf()>this.valueOf(),a=s?this:t,u=s?t:this,d=v6(a,u,o,i);return s?d.negate():d}diffNow(t="milliseconds",r={}){return this.diff(e.now(),t,r)}until(t){return this.isValid?Hi.fromDateTimes(this,t):this}hasSame(t,r,n){if(!this.isValid)return!1;let i=t.valueOf(),o=this.setZone(t.zone,{keepLocalTime:!0});return o.startOf(r,n)<=i&&i<=o.endOf(r,n)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;let r=t.base||e.fromObject({},{zone:this.zone}),n=t.padding?this<r?-t.padding:t.padding:0,i=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(i=t.unit,o=void 0),R6(r,this.plus(n),{...t,numeric:"always",units:i,unit:o})}toRelativeCalendar(t={}){return this.isValid?R6(t.base||e.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(e.isDateTime))throw new xt("min requires all arguments be DateTimes");return Cb(t,r=>r.valueOf(),Math.min)}static max(...t){if(!t.every(e.isDateTime))throw new xt("max requires all arguments be DateTimes");return Cb(t,r=>r.valueOf(),Math.max)}static fromFormatExplain(t,r,n={}){let{locale:i=null,numberingSystem:o=null}=n,s=Ue.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});return $b(s,t,r)}static fromStringExplain(t,r,n={}){return e.fromFormatExplain(t,r,n)}static buildFormatParser(t,r={}){let{locale:n=null,numberingSystem:i=null}=r,o=Ue.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new Zu(o,t)}static fromFormatParser(t,r,n={}){if(_e(t)||_e(r))throw new xt("fromFormatParser requires an input string and a format parser");let{locale:i=null,numberingSystem:o=null}=n,s=Ue.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});if(!s.equals(r.locale))throw new xt(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${r.locale}`);let{result:a,zone:u,specificOffset:d,invalidReason:p}=r.explainFromTokens(t);return p?e.invalid(p):Tl(a,u,n,`format ${r.format}`,t,d)}static get DATE_SHORT(){return Ao}static get DATE_MED(){return hu}static get DATE_MED_WITH_WEEKDAY(){return K2}static get DATE_FULL(){return gu}static get DATE_HUGE(){return wu}static get TIME_SIMPLE(){return yu}static get TIME_WITH_SECONDS(){return bu}static get TIME_WITH_SHORT_OFFSET(){return _u}static get TIME_WITH_LONG_OFFSET(){return vu}static get TIME_24_SIMPLE(){return Su}static get TIME_24_WITH_SECONDS(){return xu}static get TIME_24_WITH_SHORT_OFFSET(){return Cu}static get TIME_24_WITH_LONG_OFFSET(){return Tu}static get DATETIME_SHORT(){return Eu}static get DATETIME_SHORT_WITH_SECONDS(){return Mu}static get DATETIME_MED(){return Lu}static get DATETIME_MED_WITH_SECONDS(){return Iu}static get DATETIME_MED_WITH_WEEKDAY(){return eb}static get DATETIME_FULL(){return Pu}static get DATETIME_FULL_WITH_SECONDS(){return Au}static get DATETIME_HUGE(){return Nu}static get DATETIME_HUGE_WITH_SECONDS(){return ku}}});var Fr=L(()=>{Oo();Hu();kb();Rb();Fs();fl();Ro();hb();S1();Do()});function Bs(e){return e instanceof kt?e===qt.instance:e?.toString().toLowerCase()==="unknown"}function U1(e){return Bs(e)?qt.instance:e}var qt,Ju=L(()=>{Fr();qt=class{};qt.instance=new Ct("Etc/UTC")});function El(e,t,r){return e<t?e-t:e>r?e-r:0}function Ml(e,t,r){return e<t?t:e>r?r:e}function Zn(e,t=!0){if(e instanceof kt)return e;if(e.toLowerCase()==="system")return"system";if(e.toLowerCase()==="utc")return"UTC";if(e.toLowerCase()==="unknown")return qt.instance;if(/^[+-]?[0-9]{1,2}([:][0-9]{2})?$/.test(e)){let n=He.parseSpecifier("UTC"+(e.startsWith("+")||e.startsWith("-")?"":"+")+e);if(n)return n}let r=Ct.create(e);if(!r.isValid){if(t)throw new Gb(W1.TimeZoneNotRecognized);return null}return r}var W1,KO,Gb,qs,Bb=L(()=>{Io();Ju();Fr();(function(e){e.TimeZoneNotRecognized="TimeZoneNotRecognized"})(W1||(W1={}));KO={[W1.TimeZoneNotRecognized]:"Timezone identifier has not been recognized."},Gb=class e extends Error{constructor(t,r){super(gi(KO[t],r)),this.declaredRootClass="esri.arcade.arcadedate.dateerror",Error.captureStackTrace&&Error.captureStackTrace(this,e)}};qs=class e{constructor(t){this._date=t,this.declaredRootClass="esri.arcade.arcadedate"}static fromParts(t=0,r=1,n=1,i=0,o=0,s=0,a=0,u){if(isNaN(t)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(o)||isNaN(s)||isNaN(a))return null;let d=oe.local(t,r).daysInMonth,p=oe.fromObject({day:Ml(n,1,d),year:t,month:Ml(r,1,12),hour:Ml(i,0,23),minute:Ml(o,0,59),second:Ml(s,0,59),millisecond:Ml(a,0,999)},{zone:Zn(u)});return p=p.plus({months:El(r,1,12),days:El(n,1,d),hours:El(i,0,23),minutes:El(o,0,59),seconds:El(s,0,59),milliseconds:El(a,0,999)}),new e(p)}static get systemTimeZoneCanonicalName(){return Intl.DateTimeFormat().resolvedOptions().timeZone??"system"}static arcadeDateAndZoneToArcadeDate(t,r){let n=Zn(r);return t.isUnknownTimeZone||n===qt.instance?e.fromParts(t.year,t.monthJS+1,t.day,t.hour,t.minute,t.second,t.millisecond,n):new e(t._date.setZone(n))}static dateJSToArcadeDate(t){return new e(oe.fromJSDate(t,{zone:"system"}))}static dateJSAndZoneToArcadeDate(t,r="system"){let n=Zn(r);return new e(oe.fromJSDate(t,{zone:n}))}static unknownEpochToArcadeDate(t){return new e(oe.fromMillis(t,{zone:qt.instance}))}static unknownDateJSToArcadeDate(t){return new e(oe.fromMillis(t.getTime(),{zone:qt.instance}))}static epochToArcadeDate(t,r="system"){let n=Zn(r);return new e(oe.fromMillis(t,{zone:n}))}static dateTimeToArcadeDate(t){return new e(t)}clone(){return new e(this._date)}changeTimeZone(t){let r=Zn(t);return e.dateTimeToArcadeDate(this._date.setZone(r))}static dateTimeAndZoneToArcadeDate(t,r){let n=Zn(r);return t.zone===qt.instance||n===qt.instance?e.fromParts(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond,n):new e(t.setZone(n))}static nowToArcadeDate(t){let r=Zn(t);return new e(oe.fromJSDate(new Date,{zone:r}))}static nowUTCToArcadeDate(){return new e(oe.utc())}get isSystem(){return this.timeZone==="system"||this.timeZone===e.systemTimeZoneCanonicalName}equals(t){return this.isSystem&&t.isSystem?this.toNumber()===t.toNumber():this.isUnknownTimeZone===t.isUnknownTimeZone&&this._date.equals(t._date)}get isUnknownTimeZone(){return this._date.zone===qt.instance}get isValid(){return this._date.isValid}get hour(){return this._date.hour}get second(){return this._date.second}get day(){return this._date.day}get dayOfWeekISO(){return this._date.weekday}get dayOfWeekJS(){let t=this._date.weekday;return t>6&&(t=0),t}get millisecond(){return this._date.millisecond}get monthISO(){return this._date.month}get weekISO(){return this._date.weekNumber}get yearISO(){return this._date.weekYear}get monthJS(){return this._date.month-1}get year(){return this._date.year}get minute(){return this._date.minute}get zone(){return this._date.zone}get timeZoneOffset(){return this.isUnknownTimeZone?0:this._date.offset}get timeZone(){if(this.isUnknownTimeZone)return"unknown";if(this._date.zone.type==="system")return"system";let t=this.zone;return t.type==="fixed"?t.fixed===0?"UTC":t.formatOffset(0,"short"):t.name}stringify(){return JSON.stringify(this.toJSDate())}plus(t){return new e(this._date.plus(t))}diff(t,r="milliseconds"){return this._date.diff(t._date,r)[r]}toISODate(){return this._date.toISODate()}toISOString(t){return t?this._date.toISO({suppressMilliseconds:!0,includeOffset:!this.isUnknownTimeZone}):this._date.toISO({includeOffset:!this.isUnknownTimeZone})}toISOTime(t,r){return this._date.toISOTime({suppressMilliseconds:t,includeOffset:r&&!this.isUnknownTimeZone})}toFormat(t,r){return this.isUnknownTimeZone&&(t=t.replaceAll("Z","")),this._date.toFormat(t,r)}toJSDate(){return this._date.toJSDate()}toSQLValue(){return this._date.toFormat("yyyy-LL-dd HH:mm:ss")}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}toDateTime(){return this._date}toNumber(){return this._date.toMillis()}getTime(){return this._date.toMillis()}toUTC(){return new e(this._date.toUTC())}toLocal(){return new e(this._date.toLocal())}toString(){return this.toISOString(!0)}static fromReaderAsTimeStampOffset(t){if(!t)return null;let r=oe.fromISO(t,{setZone:!0});return new e(r)}}});var F,e$,z,Yn,Hre,Wo=L(()=>{Io();(function(e){e.InvalidFunctionParameters="InvalidFunctionParameters",e.InvalidValueForAggregateFunction="InvalidValueForAggregateFunction",e.UnsupportedSqlFunction="UnsupportedSqlFunction",e.UnsupportedOperator="UnsupportedOperator",e.UnsupportedSyntax="UnsupportedSyntax",e.UnsupportedIsRhs="UnsupportedIsRhs",e.UnsupportedIsLhs="UnsupportedIsLhs",e.InvalidDataType="InvalidDataType",e.CannotCastValue="CannotCastValue",e.FunctionNotRecognized="FunctionNotRecognized",e.InvalidTime="InvalidTime",e.InvalidParameterCount="InvalidParameterCount",e.InvalidTimeStamp="InvalidTimeStamp",e.InvalidDate="InvalidDate",e.InvalidOperator="InvalidOperator",e.IllegalInterval="IllegalInterval",e.YearMonthIntervals="YearMonthIntervals",e.PrimarySecondaryQualifiers="PrimarySecondaryQualifiers",e.MissingStatisticParameters="MissingStatisticParameters"})(F||(F={}));e$={[F.InvalidValueForAggregateFunction]:"Invalid value used in aggregate function",[F.MissingStatisticParameters]:"Statistic does not have 1 or 0 Parameters",[F.InvalidFunctionParameters]:"Invalid parameters for call to {function}",[F.UnsupportedIsLhs]:"Unsupported left hand expression in is statement",[F.UnsupportedIsRhs]:"Unsupported right hand expression in is statement",[F.UnsupportedOperator]:"Unsupported operator - {operator}",[F.UnsupportedSyntax]:"Unsupported syntax - {node}",[F.UnsupportedSqlFunction]:"Sql function not found = {function}",[F.InvalidDataType]:"Invalid sql data type",[F.InvalidDate]:"Invalid date encountered",[F.InvalidOperator]:"Invalid operator encountered",[F.InvalidTime]:"Invalid time encountered",[F.IllegalInterval]:"Illegal interval",[F.FunctionNotRecognized]:"Function not recognized",[F.InvalidTimeStamp]:"Invalid timestamp encountered",[F.InvalidParameterCount]:"Invalid parameter count for call to {name}",[F.PrimarySecondaryQualifiers]:"Primary and Secondary SqlInterval qualifiers not supported",[F.YearMonthIntervals]:"Year-Month Intervals not supported",[F.CannotCastValue]:"Cannot cast value to the required data type"},z=class e extends Error{constructor(t,r){super(gi(e$[t],r)),this.declaredRootClass="esri.arcade.featureset.support.sqlerror",Error.captureStackTrace&&Error.captureStackTrace(this,e)}};(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"})(Yn||(Yn={}));Hre={[Yn.Cancelled]:"Cancelled",[Yn.InvalidStatResponse]:"Invalid statistics response from service",[Yn.InvalidRequest]:"Invalid request",[Yn.RequestFailed]:"Request failed - {reason}",[Yn.MissingFeatures]:"Missing features",[Yn.AggregationFieldNotFound]:"Aggregation field not found",[Yn.DataElementsNotFound]:"Data elements not found on service",[Yn.NeverReach]:"Encountered unreachable logic",[Yn.NotImplemented]:"Not implemented"}});function je(e){return e?{remove(){e&&(e(),e=void 0)}}:t$}function r$(e){e.forEach(t=>t?.remove())}function js(e){return je(()=>r$(e))}var t$,Yr=L(()=>{t$={remove:()=>{}}});function V6(){return i$??globalThis.navigator?.language??"en"}function ln(){return Xu===void 0&&(Xu=V6()),Xu}function qb(e){return z1.push(e),je(()=>z1.splice(z1.indexOf(e),1))}function Ll(e){return G1.push(e),je(()=>G1.splice(G1.indexOf(e),1))}function o$(){let e=n$??V6();Xu!==e&&([...G1].forEach(t=>t(e)),Xu=e,[...z1].forEach(t=>t(e)))}var n$,Xu,i$,z1,G1,Yi=L(()=>{Yr();i$=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;z1=[];G1=[];globalThis.addEventListener?.("languagechange",o$)});function U6(e){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let t="",r=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;for(let n of e.match(r)||[])switch(n){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"X":case"x":t+=n;break;default:n.length>=2&&n.slice(0,1)==="["&&n.slice(-1)==="]"?t+=`'${n.slice(1,-1)}'`:t+=`'${n}'`}return t}var jt,Qu=L(()=>{Bb();Yi();Fr();jt=class e{constructor(t,r,n){this._year=t,this._month=r,this._day=n,this.declaredRootClass="esri.core.sql.dateonly"}get month(){return this._month}get monthJS(){return this._month-1}get year(){return this._year}get day(){return this._day}get isValid(){return this.toDateTime("unknown").isValid}equals(t){return t instanceof e&&t.day===this.day&&t.month===this.month&&t.year===this.year}clone(){return new e(this._year,this._month,this._day)}toDateTime(t){return oe.fromObject({day:this.day,month:this.month,year:this.year},{zone:Zn(t)})}toDateTimeLuxon(t){return oe.fromObject({day:this.day,month:this.month,year:this.year},{zone:Zn(t)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(t=null,r=!0){if(t===null||t==="")return this.toString();if(r&&(t=U6(t)),!t)return"";let n=this.toDateTime("unknown");return qs.dateTimeToArcadeDate(n).toFormat(t,{locale:ln(),numberingSystem:"latn"})}toArcadeDate(){let t=this.toDateTime("unknown");return qs.dateTimeToArcadeDate(t)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd",!1)}toSQLValue(){return this.toFormat("yyyy-LL-dd",!1)}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd",!1)+"'"}plus(t,r){return e.fromDateTime(this.toUTCDateTime().plus({[t]:r}))}toUTCDateTime(){return oe.utc(this.year,this.month,this.day,0,0,0,0)}difference(t,r){switch(r.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(t.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(t.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return r==="M"?this.toUTCDateTime().diff(t.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(t.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(t.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(t.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(t.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(t.toUTCDateTime(),"years").years}}static fromMilliseconds(t){let r=oe.fromMillis(t,{zone:He.utcInstance});return r.isValid?e.fromParts(r.year,r.month,r.day):null}static fromSeconds(t){let r=oe.fromSeconds(t,{zone:He.utcInstance});return r.isValid?e.fromParts(r.year,r.month,r.day):null}static fromReader(t){if(!t)return null;let r=t.split("-");return r.length!==3?null:new e(parseInt(r[0],10),parseInt(r[1],10),parseInt(r[2],10))}static fromParts(t,r,n){let i=new e(t,r,n);return i.isValid===!1?null:i}static fromDateJS(t){return e.fromParts(t.getFullYear(),t.getMonth()+1,t.getDay())}static fromDateTime(t){return e.fromParts(t.year,t.month,t.day)}static fromSqlTimeStampOffset(t){return this.fromDateTime(t.toDateTime())}static fromString(t,r=null){if(t===""||t===null)return null;let n=[];if(r)(r=U6(r))&&n.push(r);else if(r===null||r===""){let i=oe.fromISO(t,{setZone:!0});return i.isValid?e.fromParts(i.year,i.month,i.day):null}for(let i of n){let o=oe.fromFormat(t,r??i);if(o.isValid)return new e(o.year,o.month,o.day)}return null}static fromNow(t="system"){let r=oe.fromJSDate(new Date).setZone(Zn(t));return new e(r.year,r.month,r.day)}}});function W6(e){return Number.isNaN(e)||e===0?e:Math.trunc(e)}var hr,Ku=L(()=>{Fr();hr=class e{constructor(t){this._timeStampOffset=t,this._date=null}toDateTime(){return this._date??(this._date=oe.fromISO(this._timeStampOffset,{setZone:!0})),this._date}get isValid(){return this.toDateTime().isValid}get timezoneOffsetHour(){return W6(this.toDateTime().offset/60)}get timezoneOffsetMinutes(){return W6(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 e.fromDateTime(this.toDateTime().startOf("day"))}static fromJSDate(t){return new e(oe.fromJSDate(t).toISO({includeOffset:!0}))}static fromDateTime(t){return new e(t.toISO({includeOffset:!0}))}static fromParts(t,r,n=0,i=0,o=0,s=0,a=0,u=!1,d=0,p=0){let m=`${t.toString().padStart(4,"0")}-${r.toString().padStart(2,"0")}-${n.toString().padStart(2,"0")}`,w="";s<10&&(w="0");let _=`${i.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${w+s.toString()}`;a!==0&&(_+="."+a.toString().padStart(3,"0"));let S=`${u?"-":"+"}${d.toString().padStart(2,"0")}:${p.toString().padStart(2,"0")}`;return new e(m+"T"+_+S)}toStorageFormat(){return this._timeStampOffset}toString(){return this._timeStampOffset}toSQLValue(){let t=this.toDateTime().toSQL({includeOffset:!0,includeOffsetSpace:!0});return t&&(t=t.replace(".000","")),t}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}addMilliseconds(t){let r=this.toDateTime().plus(t);return e.fromDateTime(r)}}});function O(e,t,r,n){var i,o=arguments.length,s=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}var nr=L(()=>{});var B1,jb=L(()=>{B1="20240808"});var Qe,Hs=L(()=>{Be();hi();jb();Qe={apiKey:void 0,applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(v7(Qe,globalThis.esriConfig,!0),delete Qe.has),!Qe.assetsPath){{let e="4.31.0";Qe.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${B1}/assets`}Qe.defaultAssetsPath=Qe.assetsPath}});function s$(e,t,...r){console[e](`[${t}]`,...r)}function a$(...e){return E7(JSON.stringify(e,(r,n)=>typeof n!="object"||Array.isArray(n)?n:"[Object]"))}var z6,Me,Ze=L(()=>{Hs();Be();Io();z6={info:0,warn:1,error:2,none:3},Me=class e{constructor(t){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},t.level!=null&&(this.level=t.level),t.writer!=null&&(this.writer=t.writer),this._module=t.module,e._loggers.set(this.module,this);let r=this.module.lastIndexOf(".");r!==-1&&(this._parent=e.getLogger(this.module.slice(0,r)))}get module(){return this._module}get parent(){return this._parent}error(...t){this._log("error","always",...t)}warn(...t){this._log("warn","always",...t)}info(...t){this._log("info","always",...t)}errorOnce(...t){this._log("error","once",...t)}warnOnce(...t){this._log("warn","once",...t)}infoOnce(...t){this._log("info","once",...t)}errorOncePerTick(...t){this._log("error","oncePerTick",...t)}warnOncePerTick(...t){this._log("warn","oncePerTick",...t)}infoOncePerTick(...t){this._log("info","oncePerTick",...t)}get test(){}static get test(){}static getLogger(t){return t=typeof t!="string"?t.declaredClass:t,e._loggers.get(t)||new e({module:t})}_log(t,r,...n){if(this._matchLevel(t)){if(r!=="always"&&!e._throttlingDisabled){let i=a$(n),o=this._loggedMessages[t].get(i);if(r==="once"&&o!=null||r==="oncePerTick"&&o&&o>=e._tickCounter)return;this._loggedMessages[t].set(i,e._tickCounter),e._scheduleTickCounterIncrement()}for(let i of Qe.log.interceptors)if(i(t,this.module,...n))return;this._inheritedWriter()(t,this.module,...n)}}_parentWithMember(t,r){let n=this;for(;n!=null;){let i=n[t];if(i!=null)return i;n=n.parent}return r}_inheritedWriter(){return this._parentWithMember("writer",s$)}_matchLevel(t){let r=Qe.log.level||"warn";return z6[this._parentWithMember("level",r)]<=z6[t]}static _scheduleTickCounterIncrement(){e._tickCounterScheduled||(e._tickCounterScheduled=!0,Promise.resolve().then(()=>{e._tickCounter++,e._tickCounterScheduled=!1}))}};Me._loggers=new Map,Me._tickCounter=0,Me._tickCounterScheduled=!1,Me._throttlingDisabled=!1});function q1(e,t,r){let n=e.get(t);if(n!==void 0)return n;let i=r();return e.set(t,i),i}var Hb=L(()=>{});function l$(e){return e==null?e:new Date(e)}function c$(e){return e==null?e:!!e}function u$(e){return e==null?e:e.toString()}function Xb(e){return e==null?e:(e=parseFloat(e),isNaN(e)?0:e)}function d$(e){return e==null?e:Math.round(parseFloat(e))}function f$(e){return null}function B6(e){return e?.constructor&&e.constructor.__accessorMetadata__!==void 0}function j1(e,t){return t!=null&&e&&!(t instanceof e)}function q6(e){return e&&"isCollection"in e}function G6(e){return e?.Type?typeof e.Type=="function"?e.Type:e.Type.base:null}function p$(e,t){if(!t?.constructor||!q6(t.constructor))return Zb(e,t)?t:new e(t);let r=G6(e.prototype.itemType),n=G6(t.constructor.prototype.itemType);return r?n?r===n?t:r.prototype.isPrototypeOf(n.prototype)?new e(t):(Zb(e,t),t):new e(t):t}function Zb(e,t){return!!B6(t)&&(Il().error("Accessor#set","Assigning an instance of '"+(t.declaredClass||"unknown")+"' which is not a subclass of '"+H1(e)+"'"),!0)}function m$(e,t){return t==null?t:q6(e)?p$(e,t):j1(e,t)?Zb(e,t)?t:new e(t):t}function H1(e){return e?.prototype?.declaredClass||"unknown"}function g$(e){switch(e){case Number:return Xb;case wi:return d$;case Boolean:return c$;case String:return u$;case Date:return l$;case td:return f$;default:return q1(h$,e,()=>m$.bind(null,e))}}function Mn(e,t){let r=g$(e);return arguments.length===1?r:r(t)}function Pl(e,t,r){return arguments.length===1?Pl.bind(null,e):t&&(Array.isArray(t)?t.map(n=>e(n,r)):[e(t,r)])}function j6(e,t){return arguments.length===1?Pl(r=>Mn(e,r)):Pl(r=>Mn(e,r),t)}function H6(e,t,r){return t!==0&&Array.isArray(r)?r.map(n=>H6(e,t-1,n)):e(r)}function ed(e,t,r){if(arguments.length===2)return o=>ed(e,t,o);if(!r)return r;r=H6(e,t,r);let n=t,i=r;for(;n>0&&Array.isArray(i);)n--,i=i[0];if(i!==void 0)for(let o=0;o<n;o++)r=[r];return r}function Z6(e,t,r){return arguments.length===2?ed(n=>Mn(e,n),t):ed(n=>Mn(e,n),t,r)}function Z1(e){return!!Array.isArray(e)&&!e.some(t=>{let r=typeof t;return!(r==="string"||r==="number"||r==="function"&&e.length>1)})}function Y1(e,t){if(arguments.length===2)return Y1(e).call(null,t);let r=new Set,n=e.filter(a=>typeof a!="function"),i=e.filter(a=>typeof a=="function");for(let a of e)typeof a!="string"&&typeof a!="number"||r.add(a);let o=null,s=null;return(a,u)=>{if(a==null)return a;let d=typeof a,p=d==="string"||d==="number";return p&&(r.has(a)||i.some(m=>d==="string"&&m===String||d==="number"&&m===Number))||d==="object"&&i.some(m=>!j1(a,m))?a:(p&&n.length?(o||(o=n.map(m=>typeof m=="string"?`'${m}'`:`${m}`).join(", ")),Il().error("Accessor#set",`'${a}' is not a valid value for this property, only the following values are valid: ${o}`)):typeof a=="object"&&i.length?(s||(s=i.map(m=>H1(m)).join(", ")),Il().error("Accessor#set",`'${a}' is not a valid value for this property, value must be one of ${s}`)):Il().error("Accessor#set",`'${a}' is not a valid value for this property`),u&&(u.valid=!1),null)}}function zo(e,t){if(arguments.length===2)return zo(e).call(null,t);let r={},n=[],i=[];for(let u in e.typeMap){let d=e.typeMap[u];r[u]=Mn(d),n.push(H1(d)),i.push(u)}let o=()=>`'${n.join("', '")}'`,s=()=>`'${i.join("', '")}'`,a=typeof e.key=="string"?u=>u[e.key]:e.key;return u=>{if(e.base&&!j1(e.base,u)||u==null)return u;let d=a(u)||e.defaultKeyValue,p=r[d];if(!p)return Il().error("Accessor#set",`Invalid property value, value needs to be one of ${o()}, or a plain object that can autocast (having .type = ${s()})`),null;if(!j1(e.typeMap[d],u))return u;if(typeof e.key=="string"&&!B6(u)){let m={};for(let w in u)w!==e.key&&(m[w]=u[w]);return p(m)}return p(u)}}function Y6(e){if(!e||!("type"in e))return!1;switch(e.type){case"native":case"array":case"one-of":return!0}return!1}function Qb(e){switch(e.type){case"native":return Mn(e.value);case"array":return Pl(Qb(e.value));case"one-of":return w$(e);default:return null}}function w$(e){let t=null;return(r,n)=>Jb(r,e)?r:(t==null&&(t=Yb(e)),Il().error("Accessor#set",`Invalid property value, value needs to be of type ${t}`),n&&(n.valid=!1),null)}function Yb(e){switch(e.type){case"native":switch(e.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case wi:return"integer";case Date:return"date";case td:return"null";default:return H1(e.value)}case"array":return`array of ${Yb(e.value)}`;case"one-of":{let t=e.values.map(r=>Yb(r));return`one of ${t.slice(0,-1)} or ${t[t.length-1]}`}}return"unknown"}function Jb(e,t){if(e==null)return!0;switch(t.type){case"native":switch(t.value){case Number:case wi:return typeof e=="number";case Boolean:return typeof e=="boolean";case String:return typeof e=="string";case td:return e===null}return e instanceof t.value;case"array":return!!Array.isArray(e)&&!e.some(r=>!Jb(r,t.value));case"one-of":return t.values.some(r=>Jb(e,r))}}var Il,h$,wi,td,Go=L(()=>{Be();Ze();Hb();Il=()=>Me.getLogger("esri.core.accessorSupport.ensureTypes");h$=new WeakMap;wi=class{},td=class{}});function yi(e){return e.__accessor__??null}function X6(e,t){return e?.metadata?.[t]!=null}function Al(e,t,r){return r?J1(e,t,{policy:r,path:""}):J1(e,t,null)}function J1(e,t,r){return t?Object.keys(t).reduce((n,i)=>{let o=i,s=null,a="merge";if(r&&(s=r.path?`${r.path}.${i}`:i,a=r.policy(s)),a==="replace"||a==="replace-arrays"&&Array.isArray(n[o]))return n[o]=t[o],n;if(n[o]===void 0)return n[o]=Ne(t[o]),n;let u=n[o],d=t[o];if(u===d)return n;if(Array.isArray(d)||Array.isArray(n))u=u?Array.isArray(u)?n[o]=u.slice():n[o]=[u]:n[o]=[],d&&(Array.isArray(d)||(d=[d]),d.forEach(p=>{u.includes(p)||u.push(p)}));else if(d&&typeof d=="object")if(r){let p=r.path;r.path=s,n[o]=J1(u,d,r),r.path=p}else n[o]=J1(u,d,null);else n.hasOwnProperty(i)&&!t.hasOwnProperty(i)||(n[o]=d);return n},e||{}):e}function X1(e){return Array.isArray(e)?e:e.split(".")}function J6(e){return e.includes(",")?e.split(",").map(t=>t.trim()):[e.trim()]}function y$(e){if(Array.isArray(e)){let t=[];for(let r of e)t.push(...J6(r));return t}return J6(e)}function Kb(e,t,r,n){let i=y$(t);if(i.length!==1){let o=i.map(s=>n(e,s,r));return js(o)}return n(e,i[0],r)}var Bo=L(()=>{Yr();er()});function Q6(e,t){let r=e[e.length-1]==="?"?e.slice(0,-1):e;if(t.getItemAt!=null||Array.isArray(t)){let i=parseInt(r,10);if(!isNaN(i))return Array.isArray(t)?t[i]:t.at(i)}let n=yi(t);return X6(n,r)?n.get(r):t[r]}function K6(e,t,r){if(e==null)return e;let n=Q6(t[r],e);return!n&&r<t.length-1?void 0:r===t.length-1?n:K6(n,t,r+1)}function Zs(e,t,r=0){return typeof t!="string"||t.includes(".")?K6(e,X1(t),r):Q6(t,e)}function Jn(e,t){return Zs(e,t)}function e_(e,t){return Zs(t,e)!==void 0}var Ys=L(()=>{Bo()});function qo(e){let t=e.constructor.__accessorMetadata__,r=Object.prototype.hasOwnProperty.call(e.constructor,"__accessorMetadata__");if(t){if(!r){t=Object.create(t);for(let n in t)t[n]=Ne(t[n]);Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0})}}else t={},Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0});return e.constructor.__accessorMetadata__}function Nl(e,t){let r=qo(e),n=r[t];return n||(n=r[t]={}),n}function e8(e,t){return Al(e,t,_$)}function _$(e){return b$.test(e)?"replace":"merge"}var b$,kl=L(()=>{er();Bo();b$=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/});function v$(e,t){return e.replaceAll(/\$\{([^\s:}]*)(?::([^\s:}]+))?\}/g,(r,n)=>n===""?"$":(xn(n,t)??"").toString())}var Rl,t_=L(()=>{hi();Rl=class{constructor(t,r,n=void 0){this.name=t,this.details=n,this.message=(r&&v$(r,n))??""}toString(){return"["+this.name+"]: "+this.message}}});var ye,Tr=L(()=>{er();Ze();t_();ye=class e extends Rl{constructor(t,r,n){super(t,r,n)}toJSON(){if(this.details!=null)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,(t,r)=>{if(r&&typeof r=="object"&&typeof r.toJSON=="function")return r;try{return Ne(r)}catch{return"[object]"}}))}}catch(t){throw Me.getLogger("esri.core.Error").error(t),t}return{name:this.name,message:this.message,details:this.details}}static fromJSON(t){return new e(t.name,t.message,t.details)}};ye.prototype.type="error"});function Dl(e,t,r){if(e&&t)if(typeof t=="object")for(let n of Object.getOwnPropertyNames(t))Dl(e,n,t[n]);else{if(t.includes(".")){let i=t.split("."),o=i.splice(-1,1)[0];return void Dl(Jn(e,i),o,r)}let n=e.__accessor__;n!=null&&S$(t,n),e[t]=r}}function S$(e,t){if(Q("esri-unknown-property-errors")&&!x$(e,t))throw new ye("set:unknown-property",C$(e,t))}function x$(e,t){return t.metadata[e]!=null}function C$(e,t){return"setting unknown property '"+e+"' on instance of "+t.host.declaredClass}var r_=L(()=>{Tr();Be();Ze();Ys()});function H(e={}){return(t,r)=>{if(t===Function.prototype)throw new Error(`Inappropriate use of @property() on a static field: ${t.name}.${r}. Accessor does not support static properties.`);let n=Object.getOwnPropertyDescriptor(t,r),i=Nl(t,r);n&&(n.get||n.set?(i.get=n.get||i.get,i.set=n.set||i.set):"value"in n&&("value"in e&&Me.getLogger("esri.core.accessorSupport.decorators.property").warn(`@property() will redefine the value of "${r}" on "${t.constructor.name}" already defined in the metadata`,e),i.value=e.value=n.value)),e.readOnly!=null&&(i.readOnly=e.readOnly);let o=e.aliasOf;if(o){let u=typeof o=="string"?o:o.source,d=typeof o=="string"?null:o.overridable===!0,p;i.dependsOn=[u],i.get=function(){let m=Jn(this,u);if(typeof m=="function"){p||(p=u.split(".").slice(0,-1).join("."));let w=Jn(this,p);w&&(m=m.bind(w))}return m},i.readOnly||(i.set=d?function(m){this._override(r,m)}:function(m){Dl(this,u,m)})}let s=e.type,a=e.types;i.cast||(s?i.cast=T$(s):a&&(Array.isArray(a)?i.cast=Pl(zo(a[0])):i.cast=zo(a))),e8(i,e),e.range&&(i.cast=E$(i.cast,e.range))}}function Q1(e,t,r){let n=Nl(e,r);n.json||(n.json={});let i=n.json;return t!==void 0&&(i.origins||(i.origins={}),i.origins[t]||(i.origins[t]={}),i=i.origins[t]),i}function T$(e){let t=0,r=e;if(Y6(e))return Qb(e);for(;Array.isArray(r)&&r.length===1&&typeof r[0]!="string"&&typeof r[0]!="number";)r=r[0],t++;let n=r;if(Z1(n))return t===0?Y1(n):ed(Y1(n),t);if(t===1)return j6(n);if(t>1)return Z6(n,t);let i=e;return i.from?i.from:Mn(i)}function E$(e,t){return r=>{let n=+e(r);return t.step!=null&&(n=Math.round(n/t.step)*t.step),t.min!=null&&(n=Math.max(t.min,n)),t.max!=null&&(n=Math.min(t.max,n)),n}}var ir=L(()=>{Ze();Go();Ys();kl();r_()});var K1,n_=L(()=>{K1=Symbol("Accessor-beforeDestroy")});var or,rd=L(()=>{(function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CONSTRUCTING=1]="CONSTRUCTING",e[e.CONSTRUCTED=2]="CONSTRUCTED",e[e.DESTROYED=3]="DESTROYED"})(or||(or={}))});var $e,e0=L(()=>{(function(e){e[e.Dirty=1]="Dirty",e[e.Overridden=2]="Overridden",e[e.Computing=4]="Computing",e[e.NonNullable=8]="NonNullable",e[e.HasDefaultValue=16]="HasDefaultValue",e[e.DepTrackingInitialized=32]="DepTrackingInitialized",e[e.AutoTracked=64]="AutoTracked",e[e.ExplicitlyTracking=128]="ExplicitlyTracking"})($e||($e={}))});function Ce(e){id.onObservableAccessed(e)}function Xn(e,t,r){if(t0)return i_(e,t,r);let n=null;return n8(e),n=t.call(r),i8(),n}function r8(e,t){return Xn(n0,e,t)}function i_(e,t,r){let n=t0;t0=!0,n8(e);let i=null;try{i=t.call(r)}catch(o){r0&&Me.getLogger("esri.core.accessorSupport.tracking").error(o)}return i8(),t0=n,i}function n8(e){id=e,nd.push(e)}function i8(){let e=nd.length;if(e>1){let t=nd.pop();id=nd[e-2],t.onTrackingEnd()}else if(e===1){let t=nd.pop();id=n0,t.onTrackingEnd()}else id=n0}function o_(e,t){if(t.flags&$e.DepTrackingInitialized)return;let r=r0;r0=!1,t.flags&$e.AutoTracked?i_(t,t.metadata.get,e):s_(e,t),r0=r}function s_(e,t){t.flags&$e.ExplicitlyTracking||(t.flags|=$e.ExplicitlyTracking,i_(t,()=>{let r=t.metadata.dependsOn||M$;for(let n of r)if(typeof n!="string"||n.includes(".")){let i=X1(n);for(let o=0,s=e;o<i.length&&s!=null&&typeof s=="object";++o)s=t8(s,i[o],o!==i.length-1)}else t8(e,n,!1)}),t.flags&=~$e.ExplicitlyTracking)}function t8(e,t,r){let n=t[t.length-1]==="?"?t.slice(0,-1):t;if(e.getItemAt!=null||Array.isArray(e)){let o=parseInt(n,10);if(!isNaN(o))return Array.isArray(e)?e[o]:e.at(o)}let i=yi(e);if(i){let o=i.propertiesByName.get(n);o&&(Ce(o),o_(e,o))}return r?e[n]:void 0}var n0,nd,id,t0,r0,M$,Js=L(()=>{Be();Ze();Bo();e0();n0={onObservableAccessed:()=>{},onTrackingEnd:()=>{}},nd=[],id=n0;t0=!1,r0=!1;M$=[]});function o8(e){if(e.json&&e.json.origins){let t=e.json.origins,r={"web-document":["web-scene","web-map"]};for(let n in r)if(t[n]){let i=t[n];r[n].forEach(o=>{t[o]=i}),delete t[n]}}}var s8=L(()=>{});var od,a8=L(()=>{t_();od=class extends Rl{constructor(t,r,n){super(t,r,n)}};od.prototype.type="warning"});function i0(e){return!!e&&e.prototype?.declaredClass&&e.prototype.declaredClass.indexOf("esri.core.Collection")===0}var a_=L(()=>{});function c_(e,t,r){e&&(!r&&!t.read||t.read?.reader||t.read?.enabled===!1||A$(e)&&Bi("read.reader",L$(e),t))}function L$(e){let t=e.ndimArray??0;if(t>1)return P$(e);if(t===1)return l8(e);if("type"in e&&u8(e.type)){let r=e.type.prototype?.itemType?.Type,n=l8(typeof r=="function"?{type:r}:{types:r});return(i,o,s)=>{let a=n(i,o,s);return a&&new e.type(a)}}return u_(e)}function u_(e){return"type"in e?I$(e.type):N$(e.types)}function I$(e){return e.prototype.read?(t,r,n)=>{if(t==null)return t;let i=typeof t;if(i!=="object")return void l_().error(`Expected JSON value of type 'object' to deserialize type '${e.prototype.declaredClass}', but got '${i}'`);let o=new e;return o.read(t,n),o}:e.fromJSON}function c8(e,t,r,n){return n!==0&&Array.isArray(t)?t.map(i=>c8(e,i,r,n-1)):e(t,void 0,r)}function P$(e){let t=u_(e),r=c8.bind(null,t),n=e.ndimArray??0;return(i,o,s)=>{if(i==null)return i;i=r(i,s,n);let a=n,u=i;for(;a>0&&Array.isArray(u);)a--,u=u[0];if(u!==void 0)for(let d=0;d<a;d++)i=[i];return i}}function l8(e){let t=u_(e);return(r,n,i)=>{if(r==null)return r;if(Array.isArray(r)){let s=[];for(let a of r){let u=t(a,void 0,i);u!==void 0&&s.push(u)}return s}let o=t(r,void 0,i);return o!==void 0?[o]:void 0}}function u8(e){if(!i0(e))return!1;let t=e.prototype.itemType;return!(!t||!t.Type)&&(typeof t.Type=="function"?d_(t.Type):d8(t.Type))}function A$(e){return"types"in e?d8(e.types):d_(e.type)}function d_(e){return!Array.isArray(e)&&!!e&&e.prototype&&("read"in e.prototype||"fromJSON"in e||u8(e))}function d8(e){for(let t in e.typeMap)if(!d_(e.typeMap[t]))return!1;return!0}function N$(e){let t=null,r=e.errorContext??"type",n=e.validate;return(i,o,s)=>{if(i==null)return i;let a=typeof i;if(a!=="object")return void l_().error(`Expected JSON value of type 'object' to deserialize, but got '${a}'`);t||(t=k$(e));let u=e.key;if(typeof u!="string")return;let d=i[u],p=d?t[d]:e.defaultKeyValue?e.typeMap[e.defaultKeyValue]:void 0;if(!p){let w=`Type '${d||"unknown"}' is not supported`;return s?.messages&&i&&s.messages.push(new od(`${r}:unsupported`,w,{definition:i,context:s})),void l_().error(w)}let m=new p;return m.read(i,s),n?n(m):m}}function k$(e){let t={};for(let r in e.typeMap){let n=e.typeMap[r],i=qo(n.prototype);if(typeof e.key=="function")continue;let o=i[e.key];if(!o)continue;if(o.json?.type&&Array.isArray(o.json.type)&&o.json.type.length===1&&typeof o.json.type[0]=="string"){t[o.json.type[0]]=n;continue}let s=o.json?.write;if(!s?.writer){t[r]=n;continue}let a=s.target,u=typeof a=="string"?a:e.key,d={};s.writer(r,d,u),d[u]&&(t[d[u]]=n)}return t}var l_,f8=L(()=>{Ze();hi();a8();kl();a_();l_=()=>Me.getLogger("esri.core.accessorSupport.extensions.serializableProperty.reader")});function g8(e){if(e.json||(e.json={}),m8(e.json),h8(e.json),p8(e.json),e.json.origins)for(let t in e.json.origins)m8(e.json.origins[t]),h8(e.json.origins[t]),p8(e.json.origins[t]);return!0}function p8(e){e.name&&(e.read&&typeof e.read=="object"?e.read.source===void 0&&(e.read.source=e.name):e.read={source:e.name},e.write&&typeof e.write=="object"?e.write.target===void 0&&(e.write.target=e.name):e.write={target:e.name})}function m8(e){typeof e.read=="boolean"?e.read={enabled:e.read}:typeof e.read=="function"?e.read={enabled:!0,reader:e.read}:e.read&&typeof e.read=="object"&&e.read.enabled===void 0&&(e.read.enabled=!0)}function h8(e){typeof e.write=="boolean"?e.write={enabled:e.write}:typeof e.write=="function"?e.write={enabled:!0,writer:e.write}:e.write&&typeof e.write=="object"&&e.write.enabled===void 0&&(e.write.enabled=!0)}var w8=L(()=>{});function f_(e,t){if(!t.write||t.write.writer||t.write.enabled===!1&&!t.write.overridePolicy)return;let r=e?.ndimArray??0;e&&(r===1||"type"in e&&i0(e.type))?t.write.writer=$$:r>1?t.write.writer=F$(r):t.types?Array.isArray(t.types)?t.write.writer=D$(t.types[0]):t.write.writer=R$(t.types):t.write.writer=sd}function R$(e){return(t,r,n,i)=>t?y8(t,e,i)?sd(t,r,n,i):void 0:sd(t,r,n,i)}function y8(e,t,r){for(let n in t.typeMap)if(e instanceof t.typeMap[n])return!0;if(r?.messages){let n=t.errorContext??"type",i=`Values of type '${(typeof t.key!="function"?e[t.key]:e.declaredClass)??"Unknown"}' cannot be written`;r&&r.messages&&e&&r.messages.push(new ye(`${n}:unsupported`,i,{definition:e,context:r})),Me.getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer").error(i)}return!1}function D$(e){return(t,r,n,i)=>!t||!Array.isArray(t)?sd(t,r,n,i):sd(t.filter(o=>y8(o,e,i)),r,n,i)}function sd(e,t,r,n){Bi(r,o0(e,n),t)}function o0(e,t){return e&&typeof e.write=="function"?e.write({},t):e&&typeof e.toJSON=="function"?e.toJSON():typeof e=="number"?O$(e):e}function O$(e){return e===-1/0?-Number.MAX_VALUE:e===1/0?Number.MAX_VALUE:isNaN(e)?null:e}function $$(e,t,r,n){let i;e===null?i=null:e&&typeof e.map=="function"?(i=e.map(o=>o0(o,n)),typeof i.toArray=="function"&&(i=i.toArray())):i=[o0(e,n)],Bi(r,i,t)}function b8(e,t,r){return r!==0&&Array.isArray(e)?e.map(n=>b8(n,t,r-1)):o0(e,t)}function F$(e){return(t,r,n,i)=>{let o;if(t===null)o=null;else{o=b8(t,i,e);let s=e,a=o;for(;s>0&&Array.isArray(a);)s--,a=a[0];if(a!==void 0)for(let u=0;u<s;u++)o=[o]}Bi(n,o,r)}}var _8=L(()=>{Tr();Ze();hi();a_()});function v8(e,t){return m_(e,"any",t?.origin)}function s0(e,t){return m_(e,"read",t?.origin)}function S8(e,t){return m_(e,"write",t?.origin)}function m_(e,t,r){let n=e?.json;if(n?.origins&&r){let i;i=r==="link-chart"?n.origins[r]&&(t==="any"||t in n.origins[r])?n.origins[r]:n.origins["web-map"]:n.origins[r],i&&(t==="any"||t in i)&&(n=i)}return n}function V$(e){let t=U$(e);if(e.json.origins)for(let r in e.json.origins){let n=e.json.origins[r],i=n.types?W$(n):t;c_(i,n,!1),n.types&&!n.write&&e.json.write?.enabled&&(n.write={...e.json.write}),f_(i,n)}c_(t,e.json,!0),f_(t,e.json)}function U$(e){return e.json.types?p_(e.json):e.type?x8(e):p_(e)}function W$(e){return e.type?x8(e):p_(e)}function x8(e){if(!e.type)return;let t=0,r=e.type;for(;Array.isArray(r)&&!Z1(r);)r=r[0],t++;return{type:r,ndimArray:t}}function p_(e){if(!e.types)return;let t=0,r=e.types;for(;Array.isArray(r);)r=r[0],t++;return{types:r,ndimArray:t}}function C8(e){g8(e)&&(o8(e),V$(e))}var a0=L(()=>{Go();s8();f8();w8();_8()});function Pe(e){return t=>{e??(e="esri.core.Accessor"),t.prototype.declaredClass=e,G$(t);let r=[],n=[],i=t.prototype;for(;i;)i.hasOwnProperty("initialize")&&!h_.has(i.initialize)&&(h_.add(i.initialize),r.push(i.initialize)),i.hasOwnProperty("destroy")&&!g_.has(i.destroy)&&(g_.add(i.destroy),n.push(i.destroy)),i=Object.getPrototypeOf(i);h_.clear(),g_.clear();let o=class extends t{constructor(...a){if(super(...a),this.constructor===o&&typeof this.postscript=="function"){if(r.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let u=r.length-1;u>=0;u--)r[u].call(this)}}),n.length){let u=!1,d=this[K1];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!u){u=!0,d.call(this);for(let p=0;p<n.length;p++)n[p].call(this)}}})}Object.defineProperty(this,Symbol.dispose,{enumerable:!1,configurable:!0,value(){this.destroy()}}),this.postscript()}}};o.__accessorMetadata__=qo(t.prototype),o.prototype.declaredClass=e;let s=(e||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(o,"name",{value:s,configurable:!0}),o}}function z$(e,t){return t.get==null?function(){let r=this.__accessor__,n=r.propertiesByName.get(e);if(n===void 0)return;Ce(n);let i=r.store;return i.has(e)?i.get(e):n.metadata.value}:function(){let r=this.__accessor__,n=r.propertiesByName.get(e);if(n!==void 0)return n.getComputed(r)}}function G$(e){let t=e.prototype,r=qo(t),n={};for(let i of Object.getOwnPropertyNames(r)){let o=r[i];C8(o),n[i]={enumerable:!0,configurable:!0,get:z$(i,o),set(s){let a=this.__accessor__;if(a!==void 0){if(!Object.isFrozen(this))return a.initialized&&o.readOnly?T8("read-only",i):a.lifecycle===or.CONSTRUCTED&&o.constructOnly?T8("construct-only",i):void a.set(i,s)}else Object.defineProperty(this,i,{enumerable:!0,configurable:!0,writable:!0,value:s})}}}Object.defineProperties(e.prototype,n)}var h_,g_,T8,Ht=L(()=>{Be();Ze();n_();rd();kl();Js();a0();h_=new Set,g_=new Set;T8=(e,t)=>{Me.getLogger("esri.core.Accessor").error(`cannot assign to ${e} property '${t}'`)}});function B$(e,t,r=!1){let n=`\u{1F6D1} DEPRECATED - ${t}`;if(!r)return void e.warn(n);let i=E8.get(e);i||(i=new Set,E8.set(e,i)),i.has(t)||(i.add(t),e.warn(n))}function l0(e,t,r={}){if(Q("esri-deprecation-warnings")){let{moduleName:n}=r;q$(e,`Function: ${(n?n+"::":"")+t+"()"}`,r)}}function q$(e,t,r={}){if(Q("esri-deprecation-warnings")){let{replacement:n,version:i,see:o,warnOnce:s}=r,a=t;n&&(a+=`
2
2
  \u{1F6E0}\uFE0F Replacement: ${n}`),i&&(a+=`
3
3
  \u2699\uFE0F Version: ${i}`),o&&(a+=`
4
4
  \u{1F517} See ${o} for more details.`),B$(e,a,s)}}var E8,w_=L(()=>{Be();E8=new WeakMap});function y_(e){return e!=null&&typeof e[Symbol.iterator]=="function"}var M8=L(()=>{});function c0(e){return e||"_default_"}function L8(e){for(let t of e)t instanceof Ol?t.removeAll():t.remove()}function I8(e){return e!=null&&(!!e.remove||e instanceof Ol)}var Ol,P8=L(()=>{M8();Ol=class{constructor(){this._groups=new Map}destroy(){this.removeAll()}get size(){let t=0;return this._groups.forEach(r=>{t+=r.length}),t}add(t,r){if(y_(t)){let n=this._getOrCreateGroup(r);for(let i of t)I8(i)&&n.push(i)}else I8(t)&&this._getOrCreateGroup(r).push(t);return this}forEach(t,r){if(typeof t=="function")this._groups.forEach(n=>n.forEach(t));else{let n=this._getGroup(t);n&&r&&n.forEach(r)}}has(t){return this._groups.has(c0(t))}remove(t){if(typeof t!="string"&&y_(t)){for(let r of t)this.remove(r);return this}return this.has(t)?(L8(this._getGroup(t)),this._groups.delete(c0(t)),this):this}removeAll(){return this._groups.forEach(L8),this._groups.clear(),this}removeReference(t){return this._groups.delete(t),this}_getOrCreateGroup(t){if(this.has(t))return this._getGroup(t);let r=[];return this._groups.set(c0(t),r),r}_getGroup(t){return this._groups.get(c0(t))}}});function ad(e){return e?.destroy(),null}function ld(e){return e?.remove(),null}function A8(e){return e?.abort(),null}var Xs=L(()=>{});function j$(e){return e?.release&&typeof e.release=="function"}function H$(e){return e?.acquire&&typeof e.acquire=="function"}var Qn,cd=L(()=>{Qn=class e{constructor(t,r,n,i=1,o=0){this._ctor=t,this._acquireFunction=r,this._releaseFunction=n,this.allocationSize=i,this._pool=new Array(o),this._initialSize=o;for(let s=0;s<o;s++)this._pool[s]=new this._ctor;this.allocationSize=Math.max(i,1)}destroy(){this.prune(0)}acquire(...t){let r;if(e.test.disabled)r=new this._ctor;else{if(this._pool.length===0){let n=this.allocationSize;for(let i=0;i<n;i++)this._pool[i]=new this._ctor}r=this._pool.pop()}return this._acquireFunction?this._acquireFunction(r,...t):H$(r)&&r.acquire(...t),r}release(t){t&&!e.test.disabled&&(this._releaseFunction?this._releaseFunction(t):j$(t)&&t.release(),this._pool.push(t))}prune(t=this._initialSize){if(!(t>=this._pool.length)){for(let r=t;r<this._pool.length;++r){let n=this._pool[r];this._dispose(n)}this._pool.length=t}}_dispose(t){t.dispose&&typeof t.dispose=="function"&&t.dispose()}};Qn.test={disabled:!1}});var u0,N8=L(()=>{Mo();u0=class{constructor(t,r){this._observers=t,this._observer=r}remove(){s7(this._observers,this._observer)}}});var $l,Z$,b_=L(()=>{Yr();N8();$l=class{constructor(){this._observers=null,this.destroyed=!1}observe(t){if(this.destroyed||t.destroyed)return Z$;this._observers==null&&(this._observers=[]);let r=this._observers,n=!1,i=!1,o=r.length;for(let s=0;s<o;++s){let a=r[s];if(a.destroyed)i=!0;else if(a===t){n=!0;break}}return n||(r.push(t),i&&this._removeDestroyedObservers()),new u0(r,t)}_removeDestroyedObservers(){let t=this._observers;if(!t||t.length===0)return;let r=t.length,n=0;for(let i=0;i<r;++i){for(;i+n<r&&t[i+n].destroyed;)++n;if(n>0){if(!(i+n<r))break;t[i]=t[i+n]}}t.length=r-n}destroy(){if(this.destroyed)return;this.destroyed=!0;let t=this._observers;if(t!=null){for(let r of t)r.onCommitted();this._observers=null}}},Z$=je()});function d0(e){switch(e){case"defaults":return Re.DEFAULTS;case"service":return Re.SERVICE;case"portal-item":return Re.PORTAL_ITEM;case"web-scene":return Re.WEB_SCENE;case"web-map":return Re.WEB_MAP;case"link-chart":return Re.LINK_CHART;case"user":return Re.USER;default:return null}}function f0(e){switch(e){case Re.DEFAULTS:return"defaults";case Re.SERVICE:return"service";case Re.PORTAL_ITEM:return"portal-item";case Re.WEB_SCENE:return"web-scene";case Re.WEB_MAP:return"web-map";case Re.LINK_CHART:return"link-chart";case Re.USER:return"user"}}function k8(e){return f0(e)}var Re,Wie,Qs=L(()=>{(function(e){e[e.DEFAULTS=0]="DEFAULTS",e[e.COMPUTED=1]="COMPUTED",e[e.SERVICE=2]="SERVICE",e[e.PORTAL_ITEM=3]="PORTAL_ITEM",e[e.WEB_SCENE=4]="WEB_SCENE",e[e.WEB_MAP=5]="WEB_MAP",e[e.LINK_CHART=6]="LINK_CHART",e[e.USER=7]="USER"})(Re||(Re={}));Wie=Re.USER+1});var ud,R8=L(()=>{b_();Qs();Js();e0();ud=class extends $l{constructor(t,r){super(),this.propertyName=t,this.metadata=r,this._accessed=null,this._handles=null,this.flags=0,this.flags=$e.Dirty|(r.nonNullable?$e.NonNullable:0)|(r.hasOwnProperty("value")?$e.HasDefaultValue:0)|(r.get===void 0?$e.DepTrackingInitialized:0)|(r.dependsOn===void 0?$e.AutoTracked:0)}destroy(){this.flags&$e.Dirty&&this.onCommitted(),super.destroy(),this._accessed=null,this._clearObservationHandles()}getComputed(t){Ce(this);let r=t.store,n=this.propertyName,i=this.flags,o=r.get(n);if(i&$e.Computing||~i&$e.Dirty&&r.has(n))return o;this.flags|=$e.Computing;let s=t.host,a;i&$e.AutoTracked?a=Xn(this,this.metadata.get,s):(s_(s,this),a=this.metadata.get.call(s)),r.set(n,a,Re.COMPUTED);let u=r.get(n);return u===o?this.flags&=~$e.Dirty:r8(this.commit,this),this.flags&=~$e.Computing,u}onObservableAccessed(t){t!==this&&(this._accessed??(this._accessed=new Set),this._accessed.add(t))}onTrackingEnd(){this._clearObservationHandles(),this.flags|=$e.DepTrackingInitialized,this._accessed!=null&&(this._handles??(this._handles=[]),this._accessed.forEach(t=>{this._handles.push(t.observe(this))}),this._accessed.clear())}notifyChange(){this.onInvalidated(),this.onCommitted()}invalidate(){this.onInvalidated()}commit(){this.flags&=~$e.Dirty,this.onCommitted()}_clearObservationHandles(){let t=this._handles;if(t!==null){for(let r=0;r<t.length;++r)t[r].remove();t.length=0}}onInvalidated(){~this.flags&$e.Overridden&&(this.flags|=$e.Dirty);let t=this._observers;if(t&&t.length>0)for(let r of t)r.onInvalidated()}onCommitted(){let t=this._observers;if(t&&t.length>0){let r=t.slice();for(let n of r)n.onCommitted()}}}});var p0,D8=L(()=>{er();Qs();p0=class e{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(t){let r=new e;return this._values.forEach((n,i)=>{t&&t.has(i)||r.set(i,Ne(n))}),r}get(t){return this._values.get(t)}originOf(){return Re.USER}keys(){return[...this._values.keys()]}set(t,r){this._values.set(t,r)}delete(t){this._values.delete(t)}has(t){return this._values.has(t)}forEach(t){this._values.forEach(t)}}});function m0(e,t,r){return e!==void 0}function O8(e,t,r,n){return e!==void 0&&(!(r==null&&e.flags&$e.NonNullable)||(n.lifecycle,or.INITIALIZING,!1))}var h0,v_,__,$8=L(()=>{Be();er();Ze();cd();rd();R8();Qs();D8();Js();e0();h0=class{constructor(t){this.host=t,this.propertiesByName=new Map,this.ctorArgs=null,this.lifecycle=or.INITIALIZING,this.store=new p0,this._origin=Re.USER;let r=this.host.constructor.__accessorMetadata__;for(let n in r){let i=new ud(n,r[n]);this.propertiesByName.set(n,i)}this.metadata=r}initialize(){this.lifecycle=or.CONSTRUCTING}constructed(){this.lifecycle=or.CONSTRUCTED}destroy(){this.lifecycle=or.DESTROYED,this.propertiesByName.forEach(t=>t.destroy())}get initialized(){return this.lifecycle!==or.INITIALIZING}get(t){let r=this.propertiesByName.get(t);if(r.metadata.get)return r.getComputed(this);Ce(r);let n=this.store;return n.has(t)?n.get(t):r.metadata.value}originOf(t){let r=this.store.originOf(t);if(r===void 0){let n=this.propertiesByName.get(t);if(n!==void 0&&n.flags&$e.HasDefaultValue)return"defaults"}return f0(r)}has(t){return this.propertiesByName.has(t)&&this.store.has(t)}keys(){return[...this.propertiesByName.keys()]}internalGet(t){let r=this.propertiesByName.get(t);if(m0(r))return this.store.has(t)?this.store.get(t):r.metadata.value}internalSet(t,r){let n=this.propertiesByName.get(t);m0(n)&&this._internalSet(n,r)}getDependsInfo(t,r,n){let i=this.propertiesByName.get(r);if(!m0(i))return"";let o=new Set,s=Xn({onObservableAccessed:u=>o.add(u),onTrackingEnd:()=>{}},()=>i.metadata.get?.call(t)),a=`${n}${t.declaredClass.split(".").pop()}.${r}: ${s}
@@ -111,7 +111,7 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`)}vz(thi
111
111
  1
112
112
  )
113
113
  )
114
- )}:host{display:flex}:host([open]) .container{pointer-events:auto;display:flex;max-block-size:100%;align-items:center;border-width:2px;opacity:1;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0px;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0px;display:inline;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2);margin-inline-end:var(--calcite-notice-spacing-token-small)}.notice-content{box-sizing:border-box;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-small)}.notice-content:first-of-type:not(:only-child){padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto}.notice-close{display:flex;cursor:pointer;align-items:center;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-color-text-3);outline:2px solid transparent;outline-offset:2px;box-sizing:border-box;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;-webkit-appearance:none}.notice-close:hover,.notice-close:focus{background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-1)}.notice-close:active{background-color:var(--calcite-color-foreground-3)}.actions-end{display:flex;align-self:stretch}:host([kind=brand]) .container{border-color:var(--calcite-color-brand)}:host([kind=brand]) .container .notice-icon{color:var(--calcite-color-brand)}:host([kind=info]) .container{border-color:var(--calcite-color-status-info)}:host([kind=info]) .container .notice-icon{color:var(--calcite-color-status-info)}:host([kind=danger]) .container{border-color:var(--calcite-color-status-danger)}:host([kind=danger]) .container .notice-icon{color:var(--calcite-color-status-danger)}:host([kind=success]) .container{border-color:var(--calcite-color-status-success)}:host([kind=success]) .container .notice-icon{color:var(--calcite-color-status-success)}:host([kind=warning]) .container{border-color:var(--calcite-color-status-warning)}:host([kind=warning]) .container .notice-icon{color:var(--calcite-color-status-warning)}:host([hidden]){display:none}[hidden]{display:none}`,uq=cq,hI=Dt(class extends Rt{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.calciteNoticeBeforeClose=wr(this,"calciteNoticeBeforeClose",6),this.calciteNoticeBeforeOpen=wr(this,"calciteNoticeBeforeOpen",6),this.calciteNoticeClose=wr(this,"calciteNoticeClose",6),this.calciteNoticeOpen=wr(this,"calciteNoticeOpen",6),this.setTransitionEl=t=>{this.transitionEl=t},this.close=()=>{this.open=!1},this.openTransitionProp="opacity",this.open=!1,this.kind="brand",this.closable=!1,this.icon=void 0,this.iconFlipRtl=!1,this.scale="m",this.width="auto",this.messages=void 0,this.messageOverrides=void 0,this.effectiveLocale=void 0,this.defaultMessages=void 0}openHandler(){Xd(this)}onMessagesChange(){}updateRequestedIcon(){this.requestedIcon=no(FS,this.icon,this.kind)}connectedCallback(){ow(this),Mi(this),Ai(this)}disconnectedCallback(){sw(this),Li(this),Ni(this)}async componentWillLoad(){us(this),this.requestedIcon=no(FS,this.icon,this.kind),await Ii(this),this.open&&Xd(this)}componentDidLoad(){ds(this)}render(){let{el:t}=this,r=X("button",{key:"4de511d4d93ee2078a4ed0d5fee2397d4d433691","aria-label":this.messages.close,class:Kd.close,onClick:this.close,ref:i=>this.closeButton=i},X("calcite-icon",{key:"bb983d2377b1f8c20b9d23cb63f258b4b6a670d9",icon:"x",scale:Kr(this.scale)})),n=ro(t,Qd.actionsEnd);return X("div",{key:"d83f3161115f422c6a6bc8591a2763f0ab17dd83",class:Kd.container,ref:this.setTransitionEl},this.requestedIcon?X("div",{class:Kd.icon},X("calcite-icon",{flipRtl:this.iconFlipRtl,icon:this.requestedIcon,scale:Kr(this.scale)})):null,X("div",{key:"3851d512eaea58676aa7c3de513e4aedf4e644c9",class:Kd.content},X("slot",{key:"6393d41eb420b92fc94467c108fc5aa4ab6e941c",name:Qd.title}),X("slot",{key:"f750570f0675e9f3ef9f76ed8362e848e5c6311c",name:Qd.message}),X("slot",{key:"2c8ded4623c885d3b2d9897c7c402f96dffbc8d7",name:Qd.link})),n?X("div",{class:Kd.actionsEnd},X("slot",{name:Qd.actionsEnd})):null,this.closable?r:null)}async setFocus(){await fs(this);let t=this.el.querySelector("calcite-link");if(!(!this.closeButton&&!t)){if(t)return t.setFocus();this.closeButton&&this.closeButton.focus()}}onBeforeClose(){this.calciteNoticeBeforeClose.emit()}onBeforeOpen(){this.calciteNoticeBeforeOpen.emit()}onClose(){this.calciteNoticeClose.emit()}onOpen(){this.calciteNoticeOpen.emit()}effectiveLocaleChange(){Pi(this,this.effectiveLocale)}static get assetsDirs(){return["assets"]}get el(){return this}static get watchers(){return{open:["openHandler"],messageOverrides:["onMessagesChange"],icon:["updateRequestedIcon"],kind:["updateRequestedIcon"],effectiveLocale:["effectiveLocaleChange"]}}static get style(){return uq}},[1,"calcite-notice",{open:[1540],kind:[513],closable:[516],icon:[520],iconFlipRtl:[516,"icon-flip-rtl"],scale:[513],width:[513],messages:[1040],messageOverrides:[1040],effectiveLocale:[32],defaultMessages:[32],setFocus:[64]},void 0,{open:["openHandler"],messageOverrides:["onMessagesChange"],icon:["updateRequestedIcon"],kind:["updateRequestedIcon"],effectiveLocale:["effectiveLocaleChange"]}]);gI();dq=hI,fq=gI});var VS,US,pq,hn,WS,bI=L(()=>{nr();X0();ir();Be();Ze();To();Ht();xM();Kv();dg();CM();EM();LM();ev();VS="esri-identity-modal",US={base:VS,info:`${VS}__info`,notice:`${VS}__notice`},pq="ArcGIS Online",hn=class extends SM{constructor(e,t){super(e,t),this.container=document.createElement("div"),this.error=null,this.oAuthPrompt=!1,this.open=!1,this.signingIn=!1,this.server=null,this.resource=null,this._usernameInputNode=null,this._passwordInputNode=null,document.body.appendChild(this.container)}loadDependencies(){return hM({button:()=>Promise.resolve().then(()=>(NL(),AL)),input:()=>Promise.resolve().then(()=>(GL(),zL)),label:()=>Promise.resolve().then(()=>(jL(),qL)),modal:()=>Promise.resolve().then(()=>(pI(),fI)),notice:()=>Promise.resolve().then(()=>(yI(),wI))})}get title(){return this.commonMessages?.auth.signIn}render(){let{open:e,title:t,messages:r,signingIn:n,oAuthPrompt:i,server:o,resource:s,error:a}=this,{info:u,oAuthInfo:d,lblItem:p,invalidUser:m,noAuthService:w,lblUser:_,lblPwd:S,lblCancel:C,lblSigning:M,lblOk:k}=r;return Wr("div",{class:this.classes(US.base,MM())},Wr("form",{bind:this,onsubmit:this._submit},Wr("calcite-modal",{bind:this,open:e,outsideCloseDisabled:!0,scale:"s",widthScale:"s",onCalciteModalClose:this._cancel,onCalciteModalOpen:this._focusUsernameInput},Wr("div",{slot:"header"},t),Wr("div",{slot:"content"},Wr("div",{class:US.info},Q_(i?d:u,{server:o&&/\.arcgis\.com/i.test(o)?pq:o,resource:`(${s||p})`})),a?Wr("calcite-notice",{class:US.notice,icon:"exclamation-mark-triangle",kind:"danger",open:!0},Wr("div",{slot:"message"},a.details?.httpStatus?m:w)):null,i?null:[Wr("calcite-label",null,_,Wr("calcite-input",{afterCreate:I=>this._usernameInputNode=I,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),Wr("calcite-label",null,S,Wr("calcite-input",{afterCreate:I=>this._passwordInputNode=I,bind:this,name:"password",required:!0,type:"password",value:""}))]),Wr("calcite-button",{appearance:"outline",bind:this,onclick:this._cancel,slot:"secondary",type:"button",width:"full"},C),Wr("calcite-button",{loading:!!n,slot:"primary",type:"submit",width:"full"},n?M:k))))}_focusUsernameInput(){requestAnimationFrame(()=>{this._usernameInputNode?.setFocus()})}_cancel(){this._set("signingIn",!1),this.open=!1,this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(e){e.preventDefault(),this._set("signingIn",!0);let t=this.oAuthPrompt?{}:{username:this._usernameInputNode?.value,password:this._passwordInputNode?.value};this.emit("submit",t)}};O([H({readOnly:!0})],hn.prototype,"container",void 0),O([H(),iS("esri/t9n/common")],hn.prototype,"commonMessages",void 0),O([H()],hn.prototype,"error",void 0),O([H(),iS("esri/identity/t9n/identity")],hn.prototype,"messages",void 0),O([H()],hn.prototype,"oAuthPrompt",void 0),O([H()],hn.prototype,"open",void 0),O([H()],hn.prototype,"signingIn",void 0),O([H()],hn.prototype,"server",void 0),O([H({readOnly:!0})],hn.prototype,"title",null),O([H()],hn.prototype,"resource",void 0),hn=O([Pe("esri.identity.IdentityModal")],hn);WS=hn});var zS,fc,_I=L(()=>{zS="esriJSAPIOAuth",fc=class{constructor(t,r){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=t,this.storage=r,this._init()}isValid(){let t=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token)){if(this.expires==null&&this.refreshToken)t=!0;else if(this.expires){let r=Date.now();this.expires>r&&(this.expires-r)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(t=!0)}}return t}save(){if(!this.storage)return!1;let t=this._load(),r=this.oAuthInfo;if(r?.authNamespace&&r.portalUrl){let n=t[r.authNamespace];n||(n=t[r.authNamespace]={}),this.appId||(this.appId=r.appId),n[r.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(zS,JSON.stringify(t))}catch(i){return console.warn(i),!1}return!0}return!1}destroy(){let t=this._load(),r=this.oAuthInfo;if(r?.appId&&r?.portalUrl&&(this.expires==null||this.expires>Date.now())&&(this.refreshToken||this.token)){let n=r.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken",i=new FormData;if(i.append("f","json"),i.append("auth_token",this.refreshToken||this.token),i.append("client_id",r.appId),i.append("token_type_hint",this.refreshToken?"refresh_token":"access_token"),typeof navigator.sendBeacon=="function")navigator.sendBeacon(n,i);else{let o=new XMLHttpRequest;o.open("POST",n),o.send(i)}}if(r?.authNamespace&&r.portalUrl&&this.storage){let n=t[r.authNamespace];if(n){delete n[r.portalUrl];try{this.storage.setItem(zS,JSON.stringify(t))}catch(i){console.log(i)}}}r&&(r._oAuthCred=null,this.oAuthInfo=null)}_init(){let t=this._load(),r=this.oAuthInfo;if(r?.authNamespace&&r.portalUrl){let n=t[r.authNamespace];n&&(n=n[r.portalUrl],n&&(this.appId=n.appId,this.codeVerifier=n.codeVerifier,this.expires=n.expires,this.refreshToken=n.refreshToken,this.ssl=n.ssl,this.stateUID=n.stateUID,this.token=n.token,this.userId=n.userId))}}_load(){let t={};if(this.storage){let r=this.storage.getItem(zS);if(r)try{t=JSON.parse(r)}catch(n){console.warn(n)}}return t}};fc.prototype.declaredClass="esri.identity.OAuthCredential"});var GS,yr,BS,vI=L(()=>{nr();ta();ir();Be();Ze();To();Ht();yr=GS=class extends Si{constructor(e){super(e),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return GS.fromJSON(this.toJSON())}};O([H({json:{write:!0}})],yr.prototype,"appId",void 0),O([H({json:{write:!0}})],yr.prototype,"authNamespace",void 0),O([H({json:{write:!0}})],yr.prototype,"expiration",void 0),O([H({json:{write:!0}})],yr.prototype,"flowType",void 0),O([H({json:{write:!0}})],yr.prototype,"forceLogin",void 0),O([H({json:{write:!0}})],yr.prototype,"forceUserId",void 0),O([H({json:{write:!0}})],yr.prototype,"locale",void 0),O([H({json:{write:!0}})],yr.prototype,"minTimeUntilExpiration",void 0),O([H({json:{write:!0}})],yr.prototype,"popup",void 0),O([H({json:{write:!0}})],yr.prototype,"popupCallbackUrl",void 0),O([H({json:{write:!0}})],yr.prototype,"popupWindowFeatures",void 0),O([H({json:{write:!0}})],yr.prototype,"portalUrl",void 0),O([H({json:{write:!0}})],yr.prototype,"preserveUrlHash",void 0),O([H({json:{write:!0}})],yr.prototype,"userId",void 0),yr=GS=O([Pe("esri.identity.OAuthInfo")],yr);BS=yr});var gn,cw,SI=L(()=>{nr();ta();ir();Be();Ze();To();Ht();gn=class extends Si{constructor(e){super(e),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};O([H({json:{write:!0}})],gn.prototype,"adminTokenServiceUrl",void 0),O([H({json:{write:!0}})],gn.prototype,"currentVersion",void 0),O([H({json:{write:!0}})],gn.prototype,"hasPortal",void 0),O([H({json:{write:!0}})],gn.prototype,"hasServer",void 0),O([H({json:{write:!0}})],gn.prototype,"owningSystemUrl",void 0),O([H({json:{write:!0}})],gn.prototype,"owningTenant",void 0),O([H({json:{write:!0}})],gn.prototype,"server",void 0),O([H({json:{write:!0}})],gn.prototype,"shortLivedTokenValidity",void 0),O([H({json:{write:!0}})],gn.prototype,"tokenServiceUrl",void 0),O([H({json:{write:!0}})],gn.prototype,"webTierAuth",void 0),gn=O([Pe("esri.identity.ServerInfo")],gn);cw=gn});var uw,xI,qS,dw,fw,ef,pt,CI=L(()=>{nr();Hs();G0();Y0();Tr();B0();md();er();hi();bi();Ko();ir();Be();Ze();Ht();bI();_I();vI();SI();R0();uw={},xI=e=>{let t=new Mr(e.owningSystemUrl).host,r=new Mr(e.server).host,n=/.+\.arcgis\.com$/i;return n.test(t)&&n.test(r)},qS=(e,t)=>!!(xI(e)&&t&&t.some(r=>r.test(e.server))),dw=null,fw=null;try{dw=window.localStorage,fw=window.sessionStorage}catch{}ef=class extends na{constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin=window.origin!=="null"?window.origin:window.location.origin,this._appUrlObj=Yo(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^/]+\/[^/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer)).*/gi,this._gwUser=/http.+\/users\/([^/]+).*/i,this._gwItem=/http.+\/items\/([^/]+).*/i,this._gwGroup=/http.+\/groups\/([^/]+).*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getPlatformSelfError=null,this._getOAuthLocationParams(),window.addEventListener("pageshow",t=>{this._pageShowHandler(t)})}registerServers(t){let r=this.serverInfos;r?(t=t.filter(n=>!this.findServerInfo(n.server)),this.serverInfos=r.concat(t)):this.serverInfos=t,t.forEach(n=>{n.owningSystemUrl&&this._portals.push(n.owningSystemUrl),n.hasPortal&&this._portals.push(n.server)})}registerOAuthInfos(t){let r=this.oAuthInfos;if(r){for(let n of t){let i=this.findOAuthInfo(n.portalUrl);i&&r.splice(r.indexOf(i),1)}this.oAuthInfos=r.concat(t)}else this.oAuthInfos=t}registerToken(t){t={...t};let r=this._sanitizeUrl(t.server),n=this._isServerRsrc(r),i,o=this.findServerInfo(r),s=!0;o||(o=new cw,o.server=this._getServerInstanceRoot(r),n?o.hasServer=!0:(o.tokenServiceUrl=this._getTokenSvcUrl(r),o.hasPortal=!0),this.registerServers([o])),i=this._findCredential(r),i?(delete t.server,Object.assign(i,t),s=!1):(i=new pt({userId:t.userId,server:o.server??void 0,token:t.token,expires:t.expires,ssl:t.ssl,scope:n?"server":"portal"}),i.resources=[r],this.credentials.push(i)),i.emitTokenChange(!1),s||i.refreshServerTokens()}toJSON(){return w1({serverInfos:this.serverInfos.map(t=>t.toJSON()),oAuthInfos:this.oAuthInfos.map(t=>t.toJSON()),credentials:this.credentials.map(t=>t.toJSON())})}initialize(t){if(!t)return;typeof t=="string"&&(t=JSON.parse(t));let r=t.serverInfos,n=t.oAuthInfos,i=t.credentials;if(r){let o=[];r.forEach(s=>{s.server&&s.tokenServiceUrl&&o.push(s.declaredClass?s:new cw(s))}),o.length&&this.registerServers(o)}if(n){let o=[];n.forEach(s=>{s.appId&&o.push(s.declaredClass?s:new BS(s))}),o.length&&this.registerOAuthInfos(o)}i&&i.forEach(o=>{o.server&&o.token&&o.expires&&o.expires>Date.now()&&((o=o.declaredClass?o:new pt(o)).emitTokenChange(),this.credentials.push(o))})}findServerInfo(t){let r;t=this._sanitizeUrl(t);for(let n of this.serverInfos)if(this._hasSameServerInstance(n.server,t)){r=n;break}return r}findOAuthInfo(t){let r;t=this._sanitizeUrl(t);for(let n of this.oAuthInfos)if(this._hasSameServerInstance(n.portalUrl,t)){r=n;break}return r}findCredential(t,r){if(!t)return;let n;t=this._sanitizeUrl(t);let i=this._isServerRsrc(t)?"server":"portal";if(r){for(let o of this.credentials)if(this._hasSameServerInstance(o.server,t)&&r===o.userId&&o.scope===i){n=o;break}}else for(let o of this.credentials)if(this._hasSameServerInstance(o.server,t)&&this._getIdenticalSvcIdx(t,o)!==-1&&o.scope===i){n=o;break}return n}getCredential(t,r){let n,i,o=!0;r&&(n=!!r.token,i=r.error,o=r.prompt!==!1),r={...r},t=this._sanitizeUrl(t);let s=new AbortController,a=un();if(r.signal&&cn(r.signal,()=>{s.abort()}),cn(s,()=>{a.reject(new ye("identity-manager:user-aborted","ABORTED"))}),Ho(s))return a.promise;r.signal=s.signal;let u=this._isAdminResource(t),d=n?this.findCredential(t):null,p;if(d&&i&&i.details&&i.details.httpStatus===498)d.destroy();else if(d)return p=new ye("identity-manager:not-authorized","You are currently signed in as: '"+d.userId+"'. You do not have access to this resource: "+t,{error:i}),a.reject(p),a.promise;let m=this._findCredential(t,r);if(m)return a.resolve(m),a.promise;let w=this.findServerInfo(t);if(w)!w.hasPortal&&w.server&&w.owningSystemUrl&&this._hasSameServerInstance(w.server,w.owningSystemUrl)&&(w.hasPortal=!0),!w.hasServer&&this._isServerRsrc(t)&&(w._restInfoPms=this._getTokenSvcUrl(t),w.hasServer=!0);else{let _=this._getTokenSvcUrl(t);if(!_)return p=new ye("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),a.reject(p),a.promise;w=new cw,w.server=this._getServerInstanceRoot(t),typeof _=="string"?(w.tokenServiceUrl=_,w.hasPortal=!0):(w._restInfoPms=_,w.hasServer=!0),this.registerServers([w])}return w.hasPortal&&w._selfReq===void 0&&(o||Ur(w.tokenServiceUrl,this._appOrigin)||this._gwDomains.some(_=>_.tokenServiceUrl===w.tokenServiceUrl))&&(w._selfReq={owningTenant:r?.owningTenant,selfDfd:this._getPortalSelf(w.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),t)}),this._enqueue(t,w,r,a,u)}getResourceName(t){return this._isRESTService(t)?t.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(t)&&t.replace(this._gwUser,"$1")||this._gwItem.test(t)&&t.replace(this._gwItem,"$1")||this._gwGroup.test(t)&&t.replace(this._gwGroup,"$1")||""}generateToken(t,r,n){let i=this._rePortalTokenSvc.test(t.tokenServiceUrl),o=new Mr(this._appOrigin),s=t.shortLivedTokenValidity,a,u,d,p,m,w,_,S;r&&(S=this.tokenValidity||s||this._defaultTokenValidity,S>s&&s>0&&(S=s)),n&&(a=n.isAdmin,u=n.serverUrl,d=n.token,w=n.signal,_=n.ssl,t.customParameters=n.customParameters),a?p=t.adminTokenServiceUrl:(p=t.tokenServiceUrl,m=new Mr(p.toLowerCase()),t.webTierAuth&&n?.serverUrl&&!_&&o.scheme==="http"&&(Ur(o.uri,p,!0)||m.scheme==="https"&&o.host===m.host&&o.port==="7080"&&m.port==="7443")&&(p=p.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));let C={query:{request:"getToken",username:r?.username,password:r?.password,serverUrl:u,token:d,expiration:S,referer:a||i?this._appOrigin:null,client:a?"referer":null,f:"json",...t.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(t,n),signal:w,...n?.ioArgs};return i||(C.withCredentials=!1),wt(p,C).then(M=>{let k=M.data;if(!k?.token)return new ye("identity-manager:authentication-failed","Unable to generate token");let I=t.server;return uw[I]||(uw[I]={}),r&&(uw[I][r.username]=r.password),k.validity=S,k})}isBusy(){return!!this._busy}async checkSignInStatus(t){return(await this.checkAppAccess(t,"")).credential}checkAppAccess(t,r,n){let i=!1;return this.getCredential(t,{prompt:!1}).then(o=>{let s,a={f:"json"};if(o.scope==="portal")if(r&&(this._doPortalSignIn(t)||n?.force))s=o.server+"/sharing/rest/oauth2/validateAppAccess",a.client_id=r;else{if(!o.token)return{credential:o};s=o.server+"/sharing/rest"}else{if(!o.token)return{credential:o};s=o.server+"/rest/services"}return o.token&&(a.token=o.token),wt(s,{query:a,authMode:"anonymous"}).then(u=>{if(u.data.valid===!1)throw new ye("identity-manager:not-authorized",`You are currently signed in as: '${o.userId}'.`,u.data);return i=!!u.data.viewOnlyUserTypeApp,{credential:o}}).catch(u=>{if(u.name==="identity-manager:not-authorized")throw u;let d=u.details?.httpStatus;if(d===498)throw o.destroy(),new ye("identity-manager:not-authenticated","User is not signed in.");if(d===400)throw new ye("identity-manager:invalid-request");return{credential:o}})}).then(o=>({credential:o.credential,viewOnly:i}))}setOAuthResponseHash(t){t&&(t.charAt(0)==="#"&&(t=t.slice(1)),this._processOAuthPopupParams(Jo(t)))}setOAuthRedirectionHandler(t){this._oAuthRedirectFunc=t}setProtocolErrorHandler(t){this._protocolFunc=t}signIn(t,r,n={}){let i=un(),o=()=>{u?.remove(),d?.remove(),this.dialog?.destroy(),this.dialog=u=d=null},s=()=>{o(),this._oAuthDfd=null,i.reject(new ye("identity-manager:user-aborted","ABORTED"))};n.signal&&cn(n.signal,()=>{s()});let a=new WS({open:!0,resource:this.getResourceName(t),server:r.server});this.dialog=a,this.emit("dialog-create");let u=a.on("cancel",s),d=a.on("submit",p=>{this.generateToken(r,p,{isAdmin:n.isAdmin,signal:n.signal}).then(m=>{o();let w=new pt({userId:p.username,server:r.server??void 0,token:m.token,expires:m.expires!=null?Number(m.expires):null,ssl:!!m.ssl,isAdmin:n.isAdmin,validity:m.validity});i.resolve(w)}).catch(m=>{a.error=m,a.signingIn=!1})});return i.promise}oAuthSignIn(t,r,n,i){this._oAuthDfd=un();let o=this._oAuthDfd,s;i?.signal&&cn(i.signal,()=>{let w=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;w&&!w.closed?w.close():this.dialog&&p()}),o.resUrl_=t,o.sinfo_=r,o.oinfo_=n;let a=n._oAuthCred;if(a.storage&&(n.flowType==="authorization-code"||n.flowType==="auto"&&r.currentVersion>=8.4)){let w=crypto.getRandomValues(new Uint8Array(32));s=W0(w),a.codeVerifier=s,w=crypto.getRandomValues(new Uint8Array(32)),a.stateUID=W0(w),a.save()||(a.codeVerifier=s=null)}else a.codeVerifier=null;let u,d;this._getCodeChallenge(s).then(w=>{let _=!i||i.oAuthPopupConfirmation!==!1;if(!n.popup||!_)return void this._doOAuthSignIn(t,r,n,w);let S=new WS({oAuthPrompt:!0,server:r.server,open:!0});this.dialog=S,this.emit("dialog-create"),u=S.on("cancel",p),d=S.on("submit",()=>{m(),this._doOAuthSignIn(t,r,n,w)})});let p=()=>{m(),this._oAuthDfd=null,o.reject(new ye("identity-manager:user-aborted","ABORTED"))},m=()=>{u?.remove(),d?.remove(),this.dialog?.destroy(),this.dialog=null};return o.promise}destroyCredentials(){this.credentials&&this.credentials.slice().forEach(t=>{t.destroy()}),this.emit("credentials-destroy")}enablePostMessageAuth(t="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=jo(window,"message",r=>{if((r.origin===this._appOrigin||r.origin.endsWith(".arcgis.com"))&&r.data?.type==="arcgis:auth:requestCredential"){let n=r.source;this.getCredential(t).then(i=>{n.postMessage({type:"arcgis:auth:credential",credential:{expires:i.expires,server:i.server,ssl:i.ssl,token:i.token,userId:i.userId}},r.origin)}).catch(i=>{n.postMessage({type:"arcgis:auth:error",error:{name:i.name,message:i.message}},r.origin)})}})}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){let t=window.location.hash;if(t){t.charAt(0)==="#"&&(t=t.slice(1));let n=Jo(t),i=!1;if(n.access_token&&n.expires_in&&n.state&&n.hasOwnProperty("username"))try{n.state=JSON.parse(n.state),n.state.portalUrl&&(this._oAuthLocationParams=n,i=!0)}catch{}else if(n.error&&n.error_description&&(console.log("IdentityManager OAuth Error: ",n.error," - ",n.error_description),n.error==="access_denied"&&(i=!0,n.state)))try{n.state=JSON.parse(n.state)}catch{}i&&(window.location.hash=n.state?.hash||"")}let r=window.location.search;if(r){r.charAt(0)==="?"&&(r=r.slice(1));let n=Jo(r),i=!1;if(n.code&&n.state)try{n.state=JSON.parse(n.state),n.state.portalUrl&&n.state.uid&&(this._oAuthLocationParams=n,i=!0)}catch{}else if(n.error&&n.error_description&&(console.log("IdentityManager OAuth Error: ",n.error," - ",n.error_description),n.error==="access_denied"&&(i=!0,n.state)))try{n.state=JSON.parse(n.state)}catch{}if(i){let o={...n};["code","error","error_description","message_code","persist","state"].forEach(u=>{delete o[u]});let s=ra(o),a=window.location.pathname+(s?`?${s}`:"")+(n.state?.hash||"");window.history.replaceState(window.history.state,"",a)}}}_getOAuthToken(t,r,n,i,o){return t=t.replace(/^http:/i,"https:"),wt(`${t}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:i&&o?{grant_type:"authorization_code",code:r,redirect_uri:i,client_id:n,code_verifier:o}:{grant_type:"refresh_token",refresh_token:r,client_id:n}}).then(s=>s.data)}async _getCodeChallenge(t){if(t&&globalThis.isSecureContext){let r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r);return W0(new Uint8Array(n))}return null}_pageShowHandler(t){if(t.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){let r=new ye("identity-manager:user-aborted","ABORTED");this._errbackFunc(r)}}_findCredential(t,r){let n,i,o,s,a=-1,u=r?.token,d=r?.resource,p=this._isServerRsrc(t)?"server":"portal",m=this.credentials.filter(w=>this._hasSameServerInstance(w.server,t)&&w.scope===p);if(t=d||t,m.length)if(m.length===1){if(n=m[0],o=this.findServerInfo(n.server),i=o?.owningSystemUrl,s=i?this.findCredential(i,n.userId):void 0,a=this._getIdenticalSvcIdx(t,n),!u)return a===-1&&n.resources.push(t),this._addResource(t,s),n;a!==-1&&(n.resources.splice(a,1),this._removeResource(t,s))}else{let w,_;if(m.some(S=>(_=this._getIdenticalSvcIdx(t,S),_!==-1&&(w=S,o=this.findServerInfo(w.server),i=o?.owningSystemUrl,s=i?this.findCredential(i,w.userId):void 0,a=_,!0))),u)w&&(w.resources.splice(a,1),this._removeResource(t,s));else if(w)return this._addResource(t,s),w}}_findOAuthInfo(t){let r=this.findOAuthInfo(t);if(!r){for(let n of this.oAuthInfos)if(this._isIdProvider(n.portalUrl,t)){r=n;break}}return r}_addResource(t,r){r&&this._getIdenticalSvcIdx(t,r)===-1&&r.resources.push(t)}_removeResource(t,r){let n=-1;r&&(n=this._getIdenticalSvcIdx(t,r),n>-1&&r.resources.splice(n,1))}_useProxy(t,r){return r?.isAdmin&&!Ur(t.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(t.tokenServiceUrl)&&String(t.currentVersion)==="10.1"&&!Ur(t.tokenServiceUrl,this._appOrigin)}_getOrigin(t){let r=new Mr(t);return r.scheme+"://"+r.host+(r.port!=null?":"+r.port:"")}_getServerInstanceRoot(t){let r=t.toLowerCase(),n=r.indexOf(this._agsRest);return n===-1&&this._isAdminResource(t)&&(n=this._agsAdmin.test(t)?t.replace(this._agsAdmin,"$1").length:t.search(this._adminSvcs)),n!==-1||k0(r)||(n=r.indexOf("/sharing")),n===-1&&r.endsWith("/")&&(n=r.length-1),n>-1?t.slice(0,n):t}_hasSameServerInstance(t,r){return t.endsWith("/")&&(t=t.slice(0,-1)),t=t.toLowerCase(),r=this._getServerInstanceRoot(r).toLowerCase(),t=G_(t),r=G_(r),(t=t.slice(Math.max(0,t.indexOf(":"))))===(r=r.slice(Math.max(0,r.indexOf(":"))))}_sanitizeUrl(t){let r=(Qe.request.proxyUrl||"").toLowerCase(),n=r?t.toLowerCase().indexOf(r+"?"):-1;return n!==-1&&(t=t.slice(n+r.length+1)),t=F0(t),Yo(t).path}_isRESTService(t){return t.includes(this._agsRest)}_isAdminResource(t){return this._agsAdmin.test(t)||this._adminSvcs.test(t)}_isServerRsrc(t){return this._isRESTService(t)||this._isAdminResource(t)}_isIdenticalService(t,r){let n=!1;if(this._isRESTService(t)&&this._isRESTService(r)){let i=this._getSuffix(t).toLowerCase(),o=this._getSuffix(r).toLowerCase();if(n=i===o,!n){let s=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;n=i.replaceAll(s,"$1")===o.replaceAll(s,"$1")}}else this._isAdminResource(t)&&this._isAdminResource(r)?n=!0:this._isServerRsrc(t)||this._isServerRsrc(r)||!this._isPortalDomain(t)||(n=!0);return n}_isPortalDomain(t){let r=new Mr(t.toLowerCase()),n=this._portalConfig,i=this._gwDomains.some(o=>o.regex.test(r.uri));return!i&&n&&(i=this._hasSameServerInstance(this._getServerInstanceRoot(n.restBaseUrl),r.uri)),i||Qe.portalUrl&&(i=Ur(r,Qe.portalUrl,!0)),i||(i=this._portals.some(o=>this._hasSameServerInstance(o,r.uri))),i=i||this._agsPortal.test(r.path),i}_isIdProvider(t,r){let n=-1,i=-1;this._gwDomains.forEach((s,a)=>{n===-1&&s.regex.test(t)&&(n=a),i===-1&&s.regex.test(r)&&(i=a)});let o=!1;if(n>-1&&i>-1&&(n===0||n===4?i!==0&&i!==4||(o=!0):n===1?i!==1&&i!==2||(o=!0):n===2?i===2&&(o=!0):n===3&&i===3&&(o=!0)),!o){let s=this.findServerInfo(r),a=s?.owningSystemUrl;a&&xI(s)&&this._isPortalDomain(a)&&this._isIdProvider(t,a)&&(o=!0)}return o}_getIdenticalSvcIdx(t,r){let n=-1;for(let i=0;i<r.resources.length;i++){let o=r.resources[i];if(this._isIdenticalService(t,o)){n=i;break}}return n}_getSuffix(t){return t.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(t){let r,n,i;if(this._isRESTService(t)||this._isAdminResource(t)){let o=this._getServerInstanceRoot(t);return r=o+"/admin/generateToken",n=wt(t=o+"/rest/info",{query:{f:"json"}}).then(s=>s.data),{adminUrl:r,promise:n}}if(this._isPortalDomain(t)){let o="";if(this._gwDomains.some(s=>(s.regex.test(t)&&(o=s.tokenServiceUrl),!!o)),o||this._portals.some(s=>(this._hasSameServerInstance(s,t)&&(o=s+this._gwTokenUrl),!!o)),o||(i=t.toLowerCase().indexOf("/sharing"),i!==-1&&(o=t.slice(0,i)+this._gwTokenUrl)),o||(o=this._getOrigin(t)+this._gwTokenUrl),o){let s=new Mr(t).port;/^http:\/\//i.test(t)&&s==="7080"&&(o=o.replace(/:7080/i,":7443")),o=o.replace(/http:/i,"https:")}return o}}_processOAuthResponseParams(t,r,n){let i=r._oAuthCred;if(t.code){let s=i.codeVerifier;return i.codeVerifier=null,i.stateUID=null,i.save(),this._getOAuthToken(n.server,t.code,r.appId,this._getRedirectURI(r,!0),s).then(a=>{let u=new pt({userId:a.username,server:n.server??void 0,token:a.access_token,expires:Date.now()+1e3*a.expires_in,ssl:a.ssl,oAuthState:t.state,_oAuthCred:i});return r.userId=u.userId,i.storage=a.persist?dw:fw,i.refreshToken=a.refresh_token,i.token=null,i.expires=a.refresh_token_expires_in?Date.now()+1e3*a.refresh_token_expires_in:null,i.userId=u.userId,i.ssl=u.ssl,i.save(),u})}let o=new pt({userId:t.username,server:n.server??void 0,token:t.access_token,expires:Date.now()+1e3*Number(t.expires_in),ssl:t.ssl==="true",oAuthState:t.state,_oAuthCred:i});return r.userId=o.userId,i.storage=t.persist?dw:fw,i.refreshToken=null,i.token=o.token,i.expires=o.expires,i.userId=o.userId,i.ssl=o.ssl,i.save(),Promise.resolve(o)}_processOAuthPopupParams(t){let r=this._oAuthDfd;if(this._oAuthDfd=null,r)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),t.error){let n=t.error==="access_denied",i=new ye(n?"identity-manager:user-aborted":"identity-manager:authentication-failed",n?"ABORTED":"OAuth: "+t.error+" - "+t.error_description);r.reject(i)}else this._processOAuthResponseParams(t,r.oinfo_,r.sinfo_).then(n=>{r.resolve(n)}).catch(n=>{r.reject(n)})}_setOAuthResponseQueryString(t){t&&(t.charAt(0)==="?"&&(t=t.slice(1)),this._processOAuthPopupParams(Jo(t)))}async _exchangeToken(t,r,n){return(await wt(`${t}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:r,token:n}})).data.token}async _getPlatformSelf(t,r){if(this._getPlatformSelfError&&Date.now()-this._getPlatformSelfError[1]<1e3)throw this._getPlatformSelfError[0];t=t.replace(/^http:/i,"https:");try{let n=await wt(`${t}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":r,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0});return this._getPlatformSelfError=null,n.data}catch(n){throw n.details?.messageCode==="OAUTH_0066"&&(this._getPlatformSelfError=[n,Date.now()]),n}}_getPortalSelf(t,r){let n;return this._gwDomains.some(i=>(i.regex.test(t)&&(n=i.customBaseUrl),!!n)),n?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:n,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?t=t.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(r)&&(t=t.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),wt(t,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then(i=>i.data))}_doPortalSignIn(t){let r=this._portalConfig,n=window.location.href,i=this.findServerInfo(t);return!(!r&&!this._isPortalDomain(n)||!(i?i.hasPortal||i.owningSystemUrl&&this._isPortalDomain(i.owningSystemUrl):this._isPortalDomain(t))||!(this._isIdProvider(n,t)||r&&(this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),t)||this._isIdProvider(r.restBaseUrl,t))||Ur(n,t,!0)))}_checkProtocol(t,r,n,i){let o=!0,s=i?r.adminTokenServiceUrl:r.tokenServiceUrl;return s.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&Ul(s)&&(o=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:t,serverInfo:r}),!o)&&n(new ye("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection.")),o}_enqueue(t,r,n,i,o,s){return i||(i=un()),i.resUrl_=t,i.sinfo_=r,i.options_=n,i.admin_=o,i.refresh_=s,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(t),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(i)):this._xoReqs.push(i):this._doSignIn(i),i.promise}_doSignIn(t){this._busy=t,this._rejectOnPersistedPageShow=!1;let r=d=>{let p=t.options_?.resource,m=t.resUrl_,w=t.refresh_,_=!1;this.credentials.includes(d)||(w&&this.credentials.includes(w)?(w.userId=d.userId,w.token=d.token,w.expires=d.expires,w.validity=d.validity,w.ssl=d.ssl,w.creationTime=d.creationTime,_=!0,d=w):this.credentials.push(d)),d.resources||(d.resources=[]),d.resources.includes(p||m)||d.resources.push(p||m),d.scope=this._isServerRsrc(m)?"server":"portal",d.emitTokenChange();let S=this._soReqs,C={};this._soReqs=[],S.forEach(M=>{if(!this._isIdenticalService(m,M.resUrl_)){let k=this._getSuffix(M.resUrl_);C[k]||(C[k]=!0,d.resources.push(M.resUrl_))}}),t.resolve(d),S.forEach(M=>{this._hasSameServerInstance(this._getServerInstanceRoot(m),M.resUrl_)?M.resolve(d):this._soReqs.push(M)}),this._busy=t.resUrl_=t.sinfo_=t.refresh_=null,_||this.emit("credential-create",{credential:d}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},n=d=>{t.reject(d),this._busy=t.resUrl_=t.sinfo_=t.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},i=(d,p,m,w)=>{let _=t.sinfo_,S=!t.options_||t.options_.prompt!==!1,C=_.hasPortal&&this._findOAuthInfo(t.resUrl_),M,k;if(d)r(new pt({userId:d,server:_.server??void 0,token:m??void 0,expires:w!=null?Number(w):null,ssl:!!p}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),t.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);let I=jo(window,"message",N=>{N.source===window.parent&&N.data&&(N.data.type==="arcgis:auth:credential"?(I.remove(),N.data.credential.expires<Date.now()?n(new ye("identity-manager:credential-request-failed","Parent application's token has expired.")):r(new pt(N.data.credential))):N.data.type==="arcgis:auth:error"&&(I.remove(),N.data.error.name==="tokenExpiredError"?n(new ye("identity-manager:credential-request-failed","Parent application's token has expired.")):n(ye.fromJSON(N.data.error))))});cn(t.options_?.signal,()=>{I.remove()})}else if(C){let I=C._oAuthCred;if(!I){let N=new fc(C,dw),V=new fc(C,fw);N.isValid()&&V.isValid()?N.expires>V.expires?(I=N,V.destroy()):(I=V,N.destroy()):I=N.isValid()?N:V,C._oAuthCred=I}if(I.isValid()){M=new pt({userId:I.userId??void 0,server:_.server??void 0,token:I.token??void 0,expires:I.expires,ssl:I.ssl??void 0,_oAuthCred:I});let N=C.appId!==I.appId&&this._doPortalSignIn(t.resUrl_);N||I.refreshToken?(t._pendingDfd=I.refreshToken?this._getOAuthToken(_.server,I.refreshToken,I.appId).then(V=>(M.expires=Date.now()+1e3*V.expires_in,M.token=V.access_token,M)):Promise.resolve(M),t._pendingDfd.then(V=>N?this._exchangeToken(V.server,C.appId,V.token).then(Y=>(V.token=Y,V)).catch(()=>V):V).then(V=>{r(V)}).catch(V=>{let Y=V.details?.httpStatus;Y>0&&Y!==404?(I.destroy(),i()):n(V)})):r(M)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(C.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===I.stateUID&&I.codeVerifier)){let N=this._oAuthLocationParams;this._oAuthLocationParams=null,t._pendingDfd=this._processOAuthResponseParams(N,C,_).then(V=>{r(V)}).catch(n)}else{let N=()=>{S?t._pendingDfd=this.oAuthSignIn(t.resUrl_,_,C,t.options_).then(r,n):(k=new ye("identity-manager:not-authenticated","User is not signed in."),n(k))};this._doPortalSignIn(t.resUrl_)?t._pendingDfd=this._getPlatformSelf(_.server,C.appId).then(V=>{Ur(V.portalUrl,this._appOrigin,!0)?(M=new pt({userId:V.username,server:_.server??void 0,expires:Date.now()+1e3*V.expires_in,token:V.token}),r(M)):N()}).catch(N):N()}}else if(S){if(this._checkProtocol(t.resUrl_,_,n,t.admin_)){let I=t.options_;t.admin_&&(I=I||{},I.isAdmin=!0),t._pendingDfd=this.signIn(t.resUrl_,_,I).then(r,n)}}else k=new ye("identity-manager:not-authenticated","User is not signed in."),n(k)},o=()=>{let d=t.sinfo_,p=d.owningSystemUrl,m=t.options_,w,_,S,C;if(m&&(w=m.token,_=m.error,S=m.prompt),C=this._findCredential(p,{token:w,resource:t.resUrl_}),!C){for(let M of this.credentials)if(this._isIdProvider(p,M.server)){C=M;break}}if(C){let M=this.findCredential(t.resUrl_,C.userId);if(M)r(M);else if(qS(d,this._legacyFed)){let k=C.toJSON();k.server=d.server,k.resources=null,r(new pt(k))}else(t._pendingDfd=this.generateToken(this.findServerInfo(C.server),null,{serverUrl:t.resUrl_,token:C.token,signal:t.options_.signal,ssl:C.ssl})).then(k=>{r(new pt({userId:C?.userId,server:d.server??void 0,token:k.token,expires:k.expires!=null?Number(k.expires):null,ssl:!!k.ssl,isAdmin:t.admin_,validity:k.validity}))},n)}else this._busy=null,w&&(t.options_.token=null),(t._pendingDfd=this.getCredential(p.replace(/\/?$/,"/sharing"),{resource:t.resUrl_,owningTenant:d.owningTenant,signal:t.options_.signal,token:w,error:_,prompt:S})).then(()=>{this._enqueue(t.resUrl_,t.sinfo_,t.options_,t,t.admin_)},M=>{t.resUrl_=t.sinfo_=t.refresh_=null,t.reject(M)})};this._errbackFunc=n;let s=t.sinfo_.owningSystemUrl,a=this._isServerRsrc(t.resUrl_),u=t.sinfo_._restInfoPms;u?u.promise.then(d=>{let p=t.sinfo_;if(p._restInfoPms){p.adminTokenServiceUrl=p._restInfoPms.adminUrl,p._restInfoPms=null,p.tokenServiceUrl=(xn("authInfo.tokenServicesUrl",d)||xn("authInfo.tokenServiceUrl",d)||xn("tokenServiceUrl",d))??null,p.shortLivedTokenValidity=xn("authInfo.shortLivedTokenValidity",d)??null,p.currentVersion=d.currentVersion,p.owningTenant=d.owningTenant;let m=p.owningSystemUrl=d.owningSystemUrl;m&&this._portals.push(m)}a&&p.owningSystemUrl?o():i()},()=>{t.sinfo_._restInfoPms=null;let d=new ye("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");n(d)}):a&&s?o():t.sinfo_._selfReq?t.sinfo_._selfReq.selfDfd.then(d=>{let p={},m,w,_,S;return d&&(m=d.user?.username,p.username=m,p.allSSL=d.allSSL,w=d.supportsOAuth,S=parseFloat(d.currentVersion),d.portalMode==="multitenant"&&(_=d.customBaseUrl),t.sinfo_.currentVersion=S),t.sinfo_.webTierAuth=!!m,m&&this.normalizeWebTierAuth?this.generateToken(t.sinfo_,null,{ssl:p.allSSL}).catch(()=>null).then(C=>(p.portalToken=C?.token,p.tokenExpiration=C?.expires,p)):!m&&w&&S>=4.4&&!this._findOAuthInfo(t.resUrl_)?this._generateOAuthInfo({portalUrl:t.sinfo_.server,customBaseUrl:_,owningTenant:t.sinfo_._selfReq.owningTenant}).catch(()=>null).then(()=>p):p}).catch(()=>null).then(d=>{t.sinfo_._selfReq=null,d?i(d.username,d.allSSL,d.portalToken,d.tokenExpiration):i()}):i()}_generateOAuthInfo(t){let r,n=null,i=t.portalUrl,o=t.customBaseUrl,s=t.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){n=window.location.href;let u=n.indexOf("?");u>-1&&(n=n.slice(0,u)),u=n.search(/\/(apps|home)\//),n=u>-1?n.slice(0,u):null}return a&&n?(this._hasTestedIfAppIsOnPortal=!0,r=wt(n+"/sharing/rest",{query:{f:"json"}}).then(()=>{this._defaultOAuthInfo=new BS({appId:"arcgisonline",popupCallbackUrl:n+"/home/oauth-callback.html"})})):r=Promise.resolve(),r.then(()=>{if(this._defaultOAuthInfo)return i=i.replace(/^http:/i,"https:"),wt(i+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:s,client_id:this._defaultOAuthInfo.appId,redirect_uri:Xo(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then(u=>{if(u.data.valid){let d=this._defaultOAuthInfo.clone();u.data.urlKey&&o?d.portalUrl="https://"+u.data.urlKey.toLowerCase()+"."+o:d.portalUrl=i,d.popup=window!==window.top||!(Ur(i,this._appOrigin)||this._gwDomains.some(p=>p.regex.test(i)&&p.regex.test(this._appOrigin))),this.oAuthInfos.push(d)}})})}_doOAuthSignIn(t,r,n,i){let o=n._oAuthCred,s={portalUrl:n.portalUrl};!n.popup&&n.preserveUrlHash&&window.location.hash&&(s.hash=window.location.hash),o.stateUID&&(s.uid=o.stateUID);let a={client_id:n.appId,response_type:o.codeVerifier?"code":"token",state:JSON.stringify(s),expiration:n.expiration,locale:n.locale,redirect_uri:this._getRedirectURI(n,!!o.codeVerifier)};n.forceLogin&&(a.force_login=!0),n.forceUserId&&n.userId&&(a.prepopulatedusername=n.userId),!n.popup&&this._doPortalSignIn(t)&&(a.redirectToUserOrgUrl=!0),o.codeVerifier&&(a.code_challenge=i||o.codeVerifier,a.code_challenge_method=i?"S256":"plain");let u=n.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",d=u+"?"+ra(a);if(n.popup){let p=window.open(d,"esriJSAPIOAuth",n.popupWindowFeatures);if(p)p.focus(),this._oAuthDfd.oAuthWin_=p,this._oAuthIntervalId=setInterval(()=>{if(p.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();let m=this._oAuthDfd;if(m){let w=new ye("identity-manager:user-aborted","ABORTED");m.reject(w)}}},500),this._oAuthOnPopupHandle=jo(window,["arcgis:auth:hash","arcgis:auth:location:search"],m=>{m.type==="arcgis:auth:hash"?this.setOAuthResponseHash(m.detail):this._setOAuthResponseQueryString(m.detail)});else{let m=new ye("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(m)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:a,authorizeUrl:u,resourceUrl:t,serverInfo:r,oAuthInfo:n}):window.location.href=d}_getRedirectURI(t,r){let n=window.location.href.replace(/#.*$/,"");if(t.popup)return Xo(t.popupCallbackUrl);if(r){let i=Yo(n);return i.query&&["code","error","error_description","message_code","persist","state"].forEach(o=>{delete i.query[o]}),Wl(i.path,i.query)}return n}};ef.prototype.declaredClass="esri.identity.IdentityManagerBase";pt=class extends na.EventedAccessor{constructor(e){super(e),this._oAuthCred=null,this.tokenRefreshBuffer=2,e?._oAuthCred&&(this._oAuthCred=e._oAuthCred)}initialize(){this.resources=this.resources||[],this.creationTime==null&&(this.creationTime=Date.now())}refreshToken(){let e=Zt,t=e.findServerInfo(this.server),r=t?.owningSystemUrl,n=!!r&&this.scope==="server",i=n&&qS(t,e._legacyFed),o=t.webTierAuth,s=o&&e.normalizeWebTierAuth,a=uw[this.server],u=a?.[this.userId],d,p=this.resources&&this.resources[0],m=n?e.findServerInfo(r):null,w={username:this.userId,password:u};if(o&&!s)return;n&&!m&&e.serverInfos.some(S=>(e._isIdProvider(r,S.server)&&(m=S),!!m));let _=m?e.findCredential(m.server,this.userId):null;if(!n||_){if(!i){if(n)d={serverUrl:p,token:_?.token,ssl:_?.ssl};else if(s)w=null,d={ssl:this.ssl};else{if(!u){let S;return p&&(p=e._sanitizeUrl(p),this._enqueued=1,S=e._enqueue(p,t,null,null,this.isAdmin,this),S.then(()=>{this._enqueued=0,this.refreshServerTokens()}).catch(()=>{this._enqueued=0})),S}this.isAdmin&&(d={isAdmin:!0})}return e.generateToken(n?m:t,n?null:w,d).then(S=>{this.token=S.token,this.expires=S.expires!=null?Number(S.expires):null,this.creationTime=Date.now(),this.validity=S.validity,this.emitTokenChange(),this.refreshServerTokens()}).catch(()=>{})}_?.refreshToken()}}refreshServerTokens(){if(this.scope==="portal"){let e=Zt;e.credentials.forEach(t=>{let r=e.findServerInfo(t.server),n=r?.owningSystemUrl;t!==this&&t.userId===this.userId&&n&&t.scope==="server"&&(e._hasSameServerInstance(this.server,n)||e._isIdProvider(n,this.server))&&(qS(r,e._legacyFed)?(t.token=this.token,t.expires=this.expires,t.creationTime=this.creationTime,t.validity=this.validity,t.emitTokenChange()):t.refreshToken())})}}emitTokenChange(e){clearTimeout(this._refreshTimer);let t=Zt,r=this.server?t.findServerInfo(this.server):null,n=r?.owningSystemUrl,i=n?t.findServerInfo(n):null;e===!1||n&&this.scope!=="portal"&&(!i?.webTierAuth||t.normalizeWebTierAuth)||this.expires==null&&this.validity==null||this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);let e=Zt,t=e.credentials.indexOf(this);t>-1&&e.credentials.splice(t,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){let e=w1({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),t=this.resources;return t&&t.length>0&&(e.resources=t.slice()),e}_startRefreshTimer(){clearTimeout(this._refreshTimer);let e=6e4*this.tokenRefreshBuffer,t=2**31-1,r=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();r<0?r=0:r>t&&(r=t),this._refreshTimer=setTimeout(this.refreshToken.bind(this),r>e?r-e:r)}};O([H()],pt.prototype,"creationTime",void 0),O([H()],pt.prototype,"expires",void 0),O([H()],pt.prototype,"isAdmin",void 0),O([H()],pt.prototype,"oAuthState",void 0),O([H()],pt.prototype,"resources",void 0),O([H()],pt.prototype,"scope",void 0),O([H()],pt.prototype,"server",void 0),O([H()],pt.prototype,"ssl",void 0),O([H()],pt.prototype,"token",void 0),O([H()],pt.prototype,"tokenRefreshBuffer",void 0),O([H()],pt.prototype,"userId",void 0),O([H()],pt.prototype,"validity",void 0),pt=O([Pe("esri.identity.Credential")],pt)});var EI={};li(EI,{default:()=>TI});var pw,TI,MI=L(()=>{G0();CI();pw=class extends ef{};pw.prototype.declaredClass="esri.identity.IdentityManager";TI=new pw;RC(TI)});async function wt(e,t){e instanceof URL&&(e=e.toString()),t?.query instanceof URLSearchParams&&(t.query=Jo(t.query.toString().replaceAll("+"," ")));let r=U0(e),n=V0(e);n||r||(e=F0(e));let i={url:e,requestOptions:{...t}},o=w=>({data:w,getAllHeaders:pc,getHeader:pc,httpStatus:200,requestOptions:i.requestOptions,url:i.url}),s=j_(e,Pn.internalInterceptors);if(s){let w=await II(s,i);if(w!=null)return o(w)}let a=j_(e);if(a){let w=await II(a,i);if(w!=null)return o(w);a.after||a.error||(a=null)}if(e=i.url,(t=i.requestOptions).responseType==="image"&&(Q("host-webworker")||Q("host-node")))throw ki("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),i);if(t.method==="head"){if(t.body)throw ki("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),i);if(r||n)throw ki("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),i)}if(await yq(),mw)return mw.execute(e,t);let u=new AbortController,d=cn(t,()=>u.abort()),p={controller:u,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:a,params:i,redoRequest:!1,useIdentity:Pn.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},m=await Sq(p).finally(()=>d?.remove());return a?.after?.(m),m}function wq(e){let t=Jr(e);t&&!wt._corsServers.includes(t)&&wt._corsServers.push(t)}function LI(e){let t=Jr(e);return!t||t.endsWith(".arcgis.com")||wt._corsServers.includes(t)||$0(t)}function ki(e,t,r,n){let i="Error",o={url:r.url,requestOptions:r.requestOptions,getAllHeaders:pc,getHeader:pc,ssl:!1};if(t instanceof ye)return t.details?(t.details=Ne(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=o,t;if(t){let s=n&&(()=>Array.from(n.headers)),a=n&&(p=>n.headers.get(p)),u=n?.status,d=t.message;d&&(i=d),s&&a&&(o.getAllHeaders=s,o.getHeader=a),o.httpStatus=(t.httpCode!=null?t.httpCode:t.code)||u||0,o.subCode=t.subcode,o.messageCode=t.messageCode,typeof t.details=="string"?o.messages=[t.details]:o.messages=t.details,o.raw=hw in t?t[hw]:t}return hd(t)?Ji():new ye(e,i,o)}async function yq(){Q("host-webworker")&&!mw&&(mw=await Promise.resolve().then(()=>(qC(),BC)))}async function jS(){Zt||await Promise.resolve().then(()=>(MI(),EI))}async function bq(e){let t=e.params.url,r=e.params.requestOptions,n=e.controller.signal,i=r.body,o=null,s=null;if(NI&&"HTMLFormElement"in globalThis&&(i instanceof FormData?o=i:i instanceof HTMLFormElement&&(o=new FormData(i))),typeof i=="string"&&(s=i),e.fetchOptions={cache:r.cacheBust?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:r.method==="head"?"HEAD":"GET",mode:"cors",priority:Pn.priority,redirect:"follow",signal:n},(o||s)&&(e.fetchOptions.body=o||s),r.authMode==="anonymous"&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||o?.get("token")),!e.hasToken&&Qe.apiKey&&DC(t)&&(r.query||(r.query={}),r.query.token=Qe.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!kI(t)&&!Ho(n)){let a;r.authMode==="immediate"?(await jS(),a=await Zt.getCredential(t,{signal:n}),e.credential=a):r.authMode==="no-prompt"?(await jS(),a=await Zt.getCredential(t,{prompt:!1,signal:n}).catch(()=>{}),e.credential=a):Zt&&(a=Zt.findCredential(t)),a&&(e.credentialToken=a.token,e.useSSL=!!a.ssl)}}function kI(e){return gq.some(t=>t.test(e))}async function _q(e){let t=e.params.url,r=e.params.requestOptions,n=e.fetchOptions??{},i=V0(t)||U0(t),o=r.responseType||"json",s=i?0:r.timeout!=null?r.timeout:Pn.timeout,a=!1;if(!i){e.useSSL&&(t=z0(t));let w={...r.query};e.credentialToken&&(w.token=e.credentialToken);let _=ra(w);Q("esri-url-encodes-apostrophe")&&(_=_.replaceAll("'","%27"));let S=t.length+1+_.length,C;a=r.method==="delete"||r.method==="post"||r.method==="put"||!!r.body||S>Pn.maxUrlLength;let M=r.useProxy||!!Ul(t);if(M){let k=LC(t);C=k.path,!a&&C.length+1+S>Pn.maxUrlLength&&(a=!0),k.query&&(w={...k.query,...w})}if(n.method==="HEAD"&&(a||M)){if(a)throw S>Pn.maxUrlLength?ki("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params):ki("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params);if(M)throw ki("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}a?(n.method=r.method==="delete"?"DELETE":r.method==="put"?"PUT":"POST",r.body?t=Wl(t,w):(n.body=ra(w),n.headers||(n.headers={}),n.headers["Content-Type"]="application/x-www-form-urlencoded")):t=Wl(t,w),M&&(e.useProxy=!0,t=`${C}?${t}`),w.token&&NI&&n.body instanceof FormData&&!k0(t)&&n.body.set("token",w.token),r.hasOwnProperty("withCredentials")?e.withCredentials=r.withCredentials:Ur(t,O0())||($0(t)||Zt&&Zt.findServerInfo(t)?.webTierAuth)&&(e.withCredentials=!0),e.withCredentials&&(n.credentials="include",WC(t)&&await zC(a?Wl(t,w):t))}let u,d,p=0,m=!1;s>0&&(p=setTimeout(()=>{m=!0,e.controller.abort()},s));try{if(r.responseType==="native-request-init")d=n,d.url=t;else if(r.responseType!=="image"||n.cache!=="default"||n.method!=="GET"||a||vq(r.headers)||!i&&!e.useProxy&&Pn.proxyUrl&&!LI(t)){if(wt._beforeFetch&&await wt._beforeFetch(t,n),u=await fetch(t,n),wt._afterFetch&&await wt._afterFetch(u),e.useProxy||wq(t),r.responseType==="native")d=u;else if(n.method!=="HEAD")if(u.ok){switch(o){case"array-buffer":d=await u.arrayBuffer();break;case"blob":case"image":d=await u.blob();break;default:d=await u.text()}if(p&&(clearTimeout(p),p=0),o==="json"||o==="xml"||o==="document")if(d)switch(o){case"json":d=JSON.parse(d);break;case"xml":d=PI(d,"application/xml");break;case"document":d=PI(d,"text/html")}else d=null;if(d){if(o==="array-buffer"||o==="blob"){let w=u.headers.get("Content-Type");if(w&&/application\/json|text\/plain/i.test(w)&&d[o==="blob"?"size":"byteLength"]<=750)try{let _=await new Response(d).json();_.error&&(d=_)}catch{}}o==="image"&&d instanceof Blob&&(d=await AI(URL.createObjectURL(d),e,!0))}}else{d=await u.text();try{d=JSON.parse(d)}catch{}}}else d=await AI(t,e)}catch(w){if(w.name==="AbortError")throw m?VC():Ji("Request canceled");if(!(!u&&w instanceof TypeError&&Pn.proxyUrl)||r.body||r.method==="delete"||r.method==="head"||r.method==="post"||r.method==="put"||e.useProxy||LI(t))throw w;e.redoRequest=!0,AC({proxyUrl:Pn.proxyUrl,urlPrefix:Jr(t)??""})}finally{p&&clearTimeout(p)}return[u,d]}async function II(e,t){if(e.responseData!=null)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,n;try{n=await e.before(t)}catch(i){r=ki("request:interceptor",i,t)}if((n instanceof Error||n instanceof ye)&&(r=ki("request:interceptor",n,t)),r)throw e.error&&e.error(r),r;return n}}function vq(e){if(e){for(let t of Object.getOwnPropertyNames(e))if(e[t])return!0}return!1}function PI(e,t){let r;try{r=new DOMParser().parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function Sq(e){let t,r;await bq(e);try{do[t,r]=await _q(e);while(!await xq(e,t,r))}catch(s){let a=ki("request:server",s,e.params,t);throw a.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(a),a}let n=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(n)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!$0(n)){let s=Jr(n,!0);s&&Pn.trustedServers.push(s)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&UC(r.authorizedCrossOriginNoCorsDomains)}let i=e.credential;if(i&&Zt){let a=Zt.findServerInfo(i.server)?.owningSystemUrl;if(a){a=a.replace(/\/?$/,"/sharing");let u=Zt.findCredential(a,i.userId);u&&Zt._getIdenticalSvcIdx(a,u)===-1&&u.resources.unshift(a)}}let o=e.params.requestOptions;return o.responseType==="native-request-init"&&(o.signal?r.signal=o.signal:delete r.signal),{data:r,getAllHeaders:t?()=>Array.from(t.headers):pc,getHeader:t?s=>t.headers.get(s):pc,httpStatus:t?.status??200,requestOptions:o,ssl:e.useSSL,url:e.params.url}}async function xq(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;let n=e.params.requestOptions;if(!t||n.responseType==="native"||n.responseType==="native-request-init")return!0;let i,o;if(r&&(r.error&&typeof r.error=="object"?i=r.error:r.status==="error"&&Array.isArray(r.messages)&&(i={...r},i[hw]=r,i.details=r.messages)),!i&&!t.ok)throw i=new Error(`Unable to load ${t.url} status: ${t.status}`),i[hw]=r,i;let s,a=null;i&&(o=Number(i.code),a=i.hasOwnProperty("subcode")?Number(i.subcode):null,s=i.messageCode,s=s?.toUpperCase());let u=n.authMode;if(o===403&&(a===4||i.message?.toLowerCase().includes("ssl")&&!i.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&(u!=="no-prompt"||o===498)&&o!==void 0&&mq.has(o)&&!kI(e.params.url)&&(o!==403||(!s||!hq.has(s))&&(a==null||a===2&&e.credentialToken))){await jS();try{let d=await Zt.getCredential(e.params.url,{error:ki("request:server",i,e.params),prompt:u!=="no-prompt",signal:e.controller.signal,token:e.credentialToken});return e.credential=d,e.credentialToken=d.token,e.useSSL=e.useSSL||d.ssl,!1}catch(d){if(u==="no-prompt")return e.credential=void 0,e.credentialToken=void 0,!1;i=d}}if(i)throw i;return!0}function AI(e,t,r=!1){let n=t.controller.signal,i=new Image;return t.withCredentials?i.crossOrigin="use-credentials":i.crossOrigin="anonymous",i.alt="",i.fetchPriority=Pn.priority,i.src=e,FC(i,e,r,n)}var mw,Pn,NI,mq,hq,gq,pc,hw,Y0=L(()=>{Hs();G0();Tr();Be();er();bi();Ko();R0();OC();GC();Pn=Qe.request,NI="FormData"in globalThis,mq=new Set([499,498,403,401]),hq=new Set(["COM_0056","COM_0057","SB_0008"]),gq=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],pc=()=>null,hw=Symbol();wt._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"],wt._beforeFetch=void 0,wt._afterFetch=void 0});function ql(e){if(!Qe.assetsPath)throw Me.getLogger("esri.assets").errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new ye("assets:path-not-set","config.assetsPath is not set");return H_(Qe.assetsPath,e)}var J0=L(()=>{Hs();Y0();Tr();Ze();Ko()});function RI(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var DI=L(()=>{});var OI=z5(()=>{});var $I=z5(()=>{});var WI={};li(WI,{p:()=>Tq});var FI,gw,VI,UI,Cq,Tq,zI=L(()=>{DI();UI={exports:{}};FI=UI,gw=typeof document<"u"?document.currentScript?.src:void 0,typeof __filename<"u"&&(gw||(gw=__filename)),VI=function(e={}){var t,r,n,i,o=e,s=new Promise((f,T)=>{t=f,r=T}),a=typeof window=="object",u=typeof importScripts=="function",d=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",p=Object.assign({},o),m="./this.program",w="";function _(f){return o.locateFile?o.locateFile(f,w):w+f}if(d){var S=OI(),C=$I();w=__dirname+"/",i=f=>(f=Da(f)?new URL(f):C.normalize(f),S.readFileSync(f)),n=(f,T=!0)=>(f=Da(f)?new URL(f):C.normalize(f),new Promise((A,B)=>{S.readFile(f,T?void 0:"utf8",(J,le)=>{J?B(J):A(T?le.buffer:le)})})),!o.thisProgram&&process.argv.length>1&&(m=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2)}else(a||u)&&(u?w=self.location.href:typeof document<"u"&&document.currentScript&&(w=document.currentScript.src),gw&&(w=gw),w=w.startsWith("blob:")?"":w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1),u&&(i=f=>{var T=new XMLHttpRequest;return T.open("GET",f,!1),T.responseType="arraybuffer",T.send(null),new Uint8Array(T.response)}),n=f=>Da(f)?new Promise((T,A)=>{var B=new XMLHttpRequest;B.open("GET",f,!0),B.responseType="arraybuffer",B.onload=()=>{(B.status==200||B.status==0&&B.response)&&A(B.response),T(B.status)},B.onerror=T,B.send(null)}):fetch(f,{credentials:"same-origin"}).then(T=>T.ok?T.arrayBuffer():Promise.reject(new Error(T.status+" : "+T.url))));var M,k,I=console.log.bind(console),N=console.error.bind(console);Object.assign(o,p),p=null;var V,Y,re,te,ie,ge,be,de=!1;function G(f,T){f||tn(T)}function $(){var f=k.buffer;o.HEAP8=V=new Int8Array(f),o.HEAP16=re=new Int16Array(f),o.HEAPU8=Y=new Uint8Array(f),o.HEAPU16=new Uint16Array(f),o.HEAP32=te=new Int32Array(f),o.HEAPU32=ie=new Uint32Array(f),o.HEAPF32=ge=new Float32Array(f),o.HEAPF64=be=new Float64Array(f)}var q=[],K=[],ee=[];function ae(){Cc(q)}function pe(){Cc(K)}function ve(){Cc(ee)}function Ae(f){K.unshift(f)}var We=0,Pt=null;function lr(f){We++}function cr(f){if(--We==0&&Pt){var T=Pt;Pt=null,T()}}function tn(f){N(f="Aborted("+f+")"),de=!0,f+=". Build with -sASSERTIONS for more info.";var T=new WebAssembly.RuntimeError(f);throw r(T),T}var Ar,Vi="data:application/octet-stream;base64,",Ra=f=>f.startsWith(Vi),Da=f=>f.startsWith("file://");function Gw(){var f="pe-wasm.wasm";return Ra(f)?f:_(f)}function Bw(f){if(f==Ar&&M)return new Uint8Array(M);if(i)return i(f);throw"both async and sync fetching of the wasm failed"}function qw(f){return n(f).then(T=>new Uint8Array(T),()=>Bw(f))}function gf(f,T,A){return qw(f).then(B=>WebAssembly.instantiate(B,T)).then(A,B=>{N(`failed to asynchronously prepare wasm: ${B}`),tn(B)})}function jw(f,T,A,B){return typeof WebAssembly.instantiateStreaming!="function"||Ra(T)||Da(T)||d||typeof fetch!="function"?gf(T,A,B):fetch(T,{credentials:"same-origin"}).then(J=>WebAssembly.instantiateStreaming(J,A).then(B,function(le){return N(`wasm streaming compile failed: ${le}`),N("falling back to ArrayBuffer instantiation"),gf(T,A,B)}))}function Hw(){return{a:uy}}function Zw(){var f=Hw();function T(B,J){return R=B.exports,k=R.t,$(),Ae(R.u),cr(),R}function A(B){T(B.instance)}return lr(),Ar||(Ar=Gw()),jw(M,Ar,f,A).catch(r),{}}var Cc=f=>{for(;f.length>0;)f.shift()(o)};function Yw(f,T="i8"){switch(T.endsWith("*")&&(T="*"),T){case"i1":case"i8":return V[f];case"i16":return re[f>>1];case"i32":return te[f>>2];case"i64":tn("to do getValue(i64) use WASM_BIGINT");case"float":return ge[f>>2];case"double":return be[f>>3];case"*":return ie[f>>2];default:tn(`invalid type for getValue: ${T}`)}}var wf=typeof TextDecoder<"u"?new TextDecoder:void 0,yf=(f,T,A)=>{for(var B=T+A,J=T;f[J]&&!(J>=B);)++J;if(J-T>16&&f.buffer&&wf)return wf.decode(f.subarray(T,J));for(var le="";T<J;){var he=f[T++];if(128&he){var fe=63&f[T++];if((224&he)!=192){var Ee=63&f[T++];if((he=(240&he)==224?(15&he)<<12|fe<<6|Ee:(7&he)<<18|fe<<12|Ee<<6|63&f[T++])<65536)le+=String.fromCharCode(he);else{var Sr=he-65536;le+=String.fromCharCode(55296|Sr>>10,56320|1023&Sr)}}else le+=String.fromCharCode((31&he)<<6|fe)}else le+=String.fromCharCode(he)}return le},qr=(f,T)=>f?yf(Y,f,T):"";function Jw(f,T,A){return 0}var bf=(f,T,A,B)=>{if(!(B>0))return 0;for(var J=A,le=A+B-1,he=0;he<f.length;++he){var fe=f.charCodeAt(he);if(fe>=55296&&fe<=57343&&(fe=65536+((1023&fe)<<10)|1023&f.charCodeAt(++he)),fe<=127){if(A>=le)break;T[A++]=fe}else if(fe<=2047){if(A+1>=le)break;T[A++]=192|fe>>6,T[A++]=128|63&fe}else if(fe<=65535){if(A+2>=le)break;T[A++]=224|fe>>12,T[A++]=128|fe>>6&63,T[A++]=128|63&fe}else{if(A+3>=le)break;T[A++]=240|fe>>18,T[A++]=128|fe>>12&63,T[A++]=128|fe>>6&63,T[A++]=128|63&fe}}return T[A]=0,A-J},Oa=(f,T,A)=>bf(f,Y,T,A);function Xw(f,T,A){return 0}function Qw(f,T,A,B){}var Kw=f=>f%4==0&&(f%100!=0||f%400==0),ey=[0,31,60,91,121,152,182,213,244,274,305,335],ty=[0,31,59,90,120,151,181,212,243,273,304,334],ry=f=>(Kw(f.getFullYear())?ey:ty)[f.getMonth()]+f.getDate()-1,ny=(f,T)=>T+2097152>>>0<4194305-!!f?(f>>>0)+4294967296*T:NaN;function _f(f,T,A){var B=ny(f,T),J=new Date(1e3*B);te[A>>2]=J.getSeconds(),te[A+4>>2]=J.getMinutes(),te[A+8>>2]=J.getHours(),te[A+12>>2]=J.getDate(),te[A+16>>2]=J.getMonth(),te[A+20>>2]=J.getFullYear()-1900,te[A+24>>2]=J.getDay();var le=0|ry(J);te[A+28>>2]=le,te[A+36>>2]=-60*J.getTimezoneOffset();var he=new Date(J.getFullYear(),0,1),fe=new Date(J.getFullYear(),6,1).getTimezoneOffset(),Ee=he.getTimezoneOffset(),Sr=0|(fe!=Ee&&J.getTimezoneOffset()==Math.min(Ee,fe));te[A+32>>2]=Sr}var iy=()=>2147483648,$a=f=>{var T=(f-k.buffer.byteLength+65535)/65536;try{return k.grow(T),$(),1}catch{}},Tc={},oy=()=>m||"./this.program",xs=()=>{if(!xs.strings){var f={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:oy()};for(var T in Tc)Tc[T]===void 0?delete f[T]:f[T]=Tc[T];var A=[];for(var T in f)A.push(`${T}=${f[T]}`);xs.strings=A}return xs.strings},vf=(f,T)=>{for(var A=0;A<f.length;++A)V[T++]=f.charCodeAt(A);V[T]=0};function sy(f,T,A,B,J){return 70}var Sf=[null,[],[]],ay=(f,T)=>{var A=Sf[f];T===0||T===10?((f===1?I:N)(yf(A,0)),A.length=0):A.push(T)},ly=f=>{for(var T=0,A=0;A<f.length;++A){var B=f.charCodeAt(A);B<=127?T++:B<=2047?T+=2:B>=55296&&B<=57343?(T+=4,++A):T+=3}return T};function cy(f,T,A){var B=ly(f)+1,J=new Array(B);return bf(f,J,0,J.length),J}var xf=(f,T)=>Math.ceil(f/T)*T,uy={c:Jw,q:(f,T,A)=>{},h:Xw,d:Qw,o:f=>{},n:(f,T)=>{},p:(f,T,A)=>{},l:()=>{tn("")},s:(f,T,A)=>Y.copyWithin(f,T,T+A),j:_f,r:(f,T,A,B)=>{var J=new Date().getFullYear(),le=new Date(J,0,1),he=new Date(J,6,1),fe=le.getTimezoneOffset(),Ee=he.getTimezoneOffset(),Sr=Math.max(fe,Ee);ie[f>>2]=60*Sr,te[T>>2]=+(fe!=Ee);var rh=oh=>{var by=oh>=0?"-":"+",sh=Math.abs(oh);return`UTC${by}${String(Math.floor(sh/60)).padStart(2,"0")}${String(sh%60).padStart(2,"0")}`},nh=rh(fe),ih=rh(Ee);Ee<fe?(Oa(nh,A,17),Oa(ih,B,17)):(Oa(nh,B,17),Oa(ih,A,17))},i:()=>Date.now(),m:f=>{var T=Y.length;f>>>=0;var A=iy();if(f>A)return!1;for(var B=(fe,Ee)=>fe+(Ee-fe%Ee)%Ee,J=1;J<=4;J*=2){var le=T*(1+.2/J);le=Math.min(le,f+100663296);var he=Math.min(A,B(Math.max(f,le),65536));if($a(he))return!0}return!1},e:(f,T)=>{var A=0;return xs().forEach((B,J)=>{var le=T+A;ie[f+4*J>>2]=le,vf(B,le),A+=B.length+1}),0},f:(f,T)=>{var A=xs();ie[f>>2]=A.length;var B=0;return A.forEach(J=>B+=J.length+1),ie[T>>2]=B,0},a:f=>52,g:(f,T,A,B)=>52,k:sy,b:(f,T,A,B)=>{for(var J=0,le=0;le<A;le++){var he=ie[T>>2],fe=ie[T+4>>2];T+=8;for(var Ee=0;Ee<fe;Ee++)ay(f,Y[he+Ee]);J+=fe}return ie[B>>2]=J,0}},R=Zw();o._webidl_free=f=>(o._webidl_free=R.v)(f),o._webidl_malloc=f=>(o._webidl_malloc=R.w)(f);var Fa,Cf=o._emscripten_bind_PeObject_getCode_0=f=>(Cf=o._emscripten_bind_PeObject_getCode_0=R.x)(f),Tf=o._emscripten_bind_PeObject_getName_1=(f,T)=>(Tf=o._emscripten_bind_PeObject_getName_1=R.y)(f,T),Ef=o._emscripten_bind_PeObject_getType_0=f=>(Ef=o._emscripten_bind_PeObject_getType_0=R.z)(f),Mf=o._emscripten_bind_PeCoordsys_isEqual_1=(f,T)=>(Mf=o._emscripten_bind_PeCoordsys_isEqual_1=R.A)(f,T),Lf=o._emscripten_bind_PeCoordsys_getCode_0=f=>(Lf=o._emscripten_bind_PeCoordsys_getCode_0=R.B)(f),Cs=o._emscripten_bind_PeCoordsys_getName_1=(f,T)=>(Cs=o._emscripten_bind_PeCoordsys_getName_1=R.C)(f,T),If=o._emscripten_bind_PeCoordsys_getType_0=f=>(If=o._emscripten_bind_PeCoordsys_getType_0=R.D)(f),Pf=o._emscripten_bind_VoidPtr___destroy___0=f=>(Pf=o._emscripten_bind_VoidPtr___destroy___0=R.E)(f),Af=o._emscripten_bind_PeDatum_getSpheroid_0=f=>(Af=o._emscripten_bind_PeDatum_getSpheroid_0=R.F)(f),Nf=o._emscripten_bind_PeDatum_getCode_0=f=>(Nf=o._emscripten_bind_PeDatum_getCode_0=R.G)(f),Ec=o._emscripten_bind_PeDatum_getName_1=(f,T)=>(Ec=o._emscripten_bind_PeDatum_getName_1=R.H)(f,T),kf=o._emscripten_bind_PeDatum_getType_0=f=>(kf=o._emscripten_bind_PeDatum_getType_0=R.I)(f),Rf=o._emscripten_bind_PeDefs_get_PE_BUFFER_MAX_0=f=>(Rf=o._emscripten_bind_PeDefs_get_PE_BUFFER_MAX_0=R.J)(f),Mc=o._emscripten_bind_PeDefs_get_PE_NAME_MAX_0=f=>(Mc=o._emscripten_bind_PeDefs_get_PE_NAME_MAX_0=R.K)(f),Df=o._emscripten_bind_PeDefs_get_PE_MGRS_MAX_0=f=>(Df=o._emscripten_bind_PeDefs_get_PE_MGRS_MAX_0=R.L)(f),Lc=o._emscripten_bind_PeDefs_get_PE_USNG_MAX_0=f=>(Lc=o._emscripten_bind_PeDefs_get_PE_USNG_MAX_0=R.M)(f),Ic=o._emscripten_bind_PeDefs_get_PE_DD_MAX_0=f=>(Ic=o._emscripten_bind_PeDefs_get_PE_DD_MAX_0=R.N)(f),Of=o._emscripten_bind_PeDefs_get_PE_DMS_MAX_0=f=>(Of=o._emscripten_bind_PeDefs_get_PE_DMS_MAX_0=R.O)(f),$f=o._emscripten_bind_PeDefs_get_PE_DDM_MAX_0=f=>($f=o._emscripten_bind_PeDefs_get_PE_DDM_MAX_0=R.P)(f),Ff=o._emscripten_bind_PeDefs_get_PE_UTM_MAX_0=f=>(Ff=o._emscripten_bind_PeDefs_get_PE_UTM_MAX_0=R.Q)(f),Vf=o._emscripten_bind_PeDefs_get_PE_PARM_MAX_0=f=>(Vf=o._emscripten_bind_PeDefs_get_PE_PARM_MAX_0=R.R)(f),Uf=o._emscripten_bind_PeDefs_get_PE_TYPE_NONE_0=f=>(Uf=o._emscripten_bind_PeDefs_get_PE_TYPE_NONE_0=R.S)(f),Wf=o._emscripten_bind_PeDefs_get_PE_TYPE_GEOGCS_0=f=>(Wf=o._emscripten_bind_PeDefs_get_PE_TYPE_GEOGCS_0=R.T)(f),zf=o._emscripten_bind_PeDefs_get_PE_TYPE_PROJCS_0=f=>(zf=o._emscripten_bind_PeDefs_get_PE_TYPE_PROJCS_0=R.U)(f),Gf=o._emscripten_bind_PeDefs_get_PE_TYPE_GEOGTRAN_0=f=>(Gf=o._emscripten_bind_PeDefs_get_PE_TYPE_GEOGTRAN_0=R.V)(f),Bf=o._emscripten_bind_PeDefs_get_PE_TYPE_COORDSYS_0=f=>(Bf=o._emscripten_bind_PeDefs_get_PE_TYPE_COORDSYS_0=R.W)(f),qf=o._emscripten_bind_PeDefs_get_PE_TYPE_UNIT_0=f=>(qf=o._emscripten_bind_PeDefs_get_PE_TYPE_UNIT_0=R.X)(f),jf=o._emscripten_bind_PeDefs_get_PE_TYPE_LINUNIT_0=f=>(jf=o._emscripten_bind_PeDefs_get_PE_TYPE_LINUNIT_0=R.Y)(f),Hf=o._emscripten_bind_PeDefs_get_PE_STR_OPTS_NONE_0=f=>(Hf=o._emscripten_bind_PeDefs_get_PE_STR_OPTS_NONE_0=R.Z)(f),Zf=o._emscripten_bind_PeDefs_get_PE_STR_AUTH_NONE_0=f=>(Zf=o._emscripten_bind_PeDefs_get_PE_STR_AUTH_NONE_0=R._)(f),Yf=o._emscripten_bind_PeDefs_get_PE_STR_AUTH_TOP_0=f=>(Yf=o._emscripten_bind_PeDefs_get_PE_STR_AUTH_TOP_0=R.$)(f),Jf=o._emscripten_bind_PeDefs_get_PE_STR_NAME_CANON_0=f=>(Jf=o._emscripten_bind_PeDefs_get_PE_STR_NAME_CANON_0=R.aa)(f),Xf=o._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT_0=f=>(Xf=o._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT_0=R.ba)(f),Qf=o._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT2_0=f=>(Qf=o._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT2_0=R.ca)(f),Kf=o._emscripten_bind_PeDefs_get_PE_PARM_X0_0=f=>(Kf=o._emscripten_bind_PeDefs_get_PE_PARM_X0_0=R.da)(f),ep=o._emscripten_bind_PeDefs_get_PE_PARM_ND_0=f=>(ep=o._emscripten_bind_PeDefs_get_PE_PARM_ND_0=R.ea)(f),tp=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_1_TO_2_0=f=>(tp=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_1_TO_2_0=R.fa)(f),rp=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_2_TO_1_0=f=>(rp=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_2_TO_1_0=R.ga)(f),np=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_P_TO_G_0=f=>(np=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_P_TO_G_0=R.ha)(f),ip=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_G_TO_P_0=f=>(ip=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_G_TO_P_0=R.ia)(f),op=o._emscripten_bind_PeDefs_get_PE_HORIZON_RECT_0=f=>(op=o._emscripten_bind_PeDefs_get_PE_HORIZON_RECT_0=R.ja)(f),sp=o._emscripten_bind_PeDefs_get_PE_HORIZON_POLY_0=f=>(sp=o._emscripten_bind_PeDefs_get_PE_HORIZON_POLY_0=R.ka)(f),ap=o._emscripten_bind_PeDefs_get_PE_HORIZON_LINE_0=f=>(ap=o._emscripten_bind_PeDefs_get_PE_HORIZON_LINE_0=R.la)(f),lp=o._emscripten_bind_PeDefs_get_PE_HORIZON_DELTA_0=f=>(lp=o._emscripten_bind_PeDefs_get_PE_HORIZON_DELTA_0=R.ma)(f),cp=o._emscripten_bind_PeDouble_PeDouble_1=f=>(cp=o._emscripten_bind_PeDouble_PeDouble_1=R.na)(f),up=o._emscripten_bind_PeDouble_get_val_0=f=>(up=o._emscripten_bind_PeDouble_get_val_0=R.oa)(f),dp=o._emscripten_bind_PeDouble_set_val_1=(f,T)=>(dp=o._emscripten_bind_PeDouble_set_val_1=R.pa)(f,T),fp=o._emscripten_bind_PeDouble___destroy___0=f=>(fp=o._emscripten_bind_PeDouble___destroy___0=R.qa)(f),pp=o._emscripten_bind_PeFactory_initialize_1=f=>(pp=o._emscripten_bind_PeFactory_initialize_1=R.ra)(f),mp=o._emscripten_bind_PeFactory_factoryByType_2=(f,T)=>(mp=o._emscripten_bind_PeFactory_factoryByType_2=R.sa)(f,T),hp=o._emscripten_bind_PeFactory_fromString_2=(f,T)=>(hp=o._emscripten_bind_PeFactory_fromString_2=R.ta)(f,T),gp=o._emscripten_bind_PeFactory_getCode_1=f=>(gp=o._emscripten_bind_PeFactory_getCode_1=R.ua)(f),wp=o._emscripten_bind_PeGCSExtent_PeGCSExtent_6=(f,T,A,B,J,le)=>(wp=o._emscripten_bind_PeGCSExtent_PeGCSExtent_6=R.va)(f,T,A,B,J,le),yp=o._emscripten_bind_PeGCSExtent_getLLon_0=f=>(yp=o._emscripten_bind_PeGCSExtent_getLLon_0=R.wa)(f),bp=o._emscripten_bind_PeGCSExtent_getSLat_0=f=>(bp=o._emscripten_bind_PeGCSExtent_getSLat_0=R.xa)(f),_p=o._emscripten_bind_PeGCSExtent_getRLon_0=f=>(_p=o._emscripten_bind_PeGCSExtent_getRLon_0=R.ya)(f),vp=o._emscripten_bind_PeGCSExtent_getNLat_0=f=>(vp=o._emscripten_bind_PeGCSExtent_getNLat_0=R.za)(f),Sp=o._emscripten_bind_PeGCSExtent___destroy___0=f=>(Sp=o._emscripten_bind_PeGCSExtent___destroy___0=R.Aa)(f),xp=o._emscripten_bind_PeGeogcs_getDatum_0=f=>(xp=o._emscripten_bind_PeGeogcs_getDatum_0=R.Ba)(f),Cp=o._emscripten_bind_PeGeogcs_getPrimem_0=f=>(Cp=o._emscripten_bind_PeGeogcs_getPrimem_0=R.Ca)(f),Tp=o._emscripten_bind_PeGeogcs_getUnit_0=f=>(Tp=o._emscripten_bind_PeGeogcs_getUnit_0=R.Da)(f),Ep=o._emscripten_bind_PeGeogcs_isEqual_1=(f,T)=>(Ep=o._emscripten_bind_PeGeogcs_isEqual_1=R.Ea)(f,T),Mp=o._emscripten_bind_PeGeogcs_getCode_0=f=>(Mp=o._emscripten_bind_PeGeogcs_getCode_0=R.Fa)(f),Lp=o._emscripten_bind_PeGeogcs_getName_1=(f,T)=>(Lp=o._emscripten_bind_PeGeogcs_getName_1=R.Ga)(f,T),Ip=o._emscripten_bind_PeGeogcs_getType_0=f=>(Ip=o._emscripten_bind_PeGeogcs_getType_0=R.Ha)(f),Pp=o._emscripten_bind_PeGeogtran_isEqual_1=(f,T)=>(Pp=o._emscripten_bind_PeGeogtran_isEqual_1=R.Ia)(f,T),Ap=o._emscripten_bind_PeGeogtran_getGeogcs1_0=f=>(Ap=o._emscripten_bind_PeGeogtran_getGeogcs1_0=R.Ja)(f),Np=o._emscripten_bind_PeGeogtran_getGeogcs2_0=f=>(Np=o._emscripten_bind_PeGeogtran_getGeogcs2_0=R.Ka)(f),kp=o._emscripten_bind_PeGeogtran_getParameters_0=f=>(kp=o._emscripten_bind_PeGeogtran_getParameters_0=R.La)(f),Pc=o._emscripten_bind_PeGeogtran_loadConstants_0=f=>(Pc=o._emscripten_bind_PeGeogtran_loadConstants_0=R.Ma)(f),Ac=o._emscripten_bind_PeGeogtran_getCode_0=f=>(Ac=o._emscripten_bind_PeGeogtran_getCode_0=R.Na)(f),Rp=o._emscripten_bind_PeGeogtran_getName_1=(f,T)=>(Rp=o._emscripten_bind_PeGeogtran_getName_1=R.Oa)(f,T),Dp=o._emscripten_bind_PeGeogtran_getType_0=f=>(Dp=o._emscripten_bind_PeGeogtran_getType_0=R.Pa)(f),Nc=o._emscripten_bind_PeGTlistExtended_getGTlist_6=(f,T,A,B,J,le)=>(Nc=o._emscripten_bind_PeGTlistExtended_getGTlist_6=R.Qa)(f,T,A,B,J,le),Op=o._emscripten_bind_PeGTlistExtended_get_PE_GTLIST_OPTS_COMMON_0=f=>(Op=o._emscripten_bind_PeGTlistExtended_get_PE_GTLIST_OPTS_COMMON_0=R.Ra)(f),kc=o._emscripten_bind_PeGTlistExtendedEntry_getEntries_0=f=>(kc=o._emscripten_bind_PeGTlistExtendedEntry_getEntries_0=R.Sa)(f),$p=o._emscripten_bind_PeGTlistExtendedEntry_getSteps_0=f=>($p=o._emscripten_bind_PeGTlistExtendedEntry_getSteps_0=R.Ta)(f),Fp=o._emscripten_bind_PeGTlistExtendedEntry_Delete_1=f=>(Fp=o._emscripten_bind_PeGTlistExtendedEntry_Delete_1=R.Ua)(f),Vp=o._emscripten_bind_PeGTlistExtendedGTs_getDirection_0=f=>(Vp=o._emscripten_bind_PeGTlistExtendedGTs_getDirection_0=R.Va)(f),Rc=o._emscripten_bind_PeGTlistExtendedGTs_getGeogtran_0=f=>(Rc=o._emscripten_bind_PeGTlistExtendedGTs_getGeogtran_0=R.Wa)(f),Up=o._emscripten_bind_PeHorizon_getNump_0=f=>(Up=o._emscripten_bind_PeHorizon_getNump_0=R.Xa)(f),Wp=o._emscripten_bind_PeHorizon_getKind_0=f=>(Wp=o._emscripten_bind_PeHorizon_getKind_0=R.Ya)(f),zp=o._emscripten_bind_PeHorizon_getInclusive_0=f=>(zp=o._emscripten_bind_PeHorizon_getInclusive_0=R.Za)(f),Gp=o._emscripten_bind_PeHorizon_getSize_0=f=>(Gp=o._emscripten_bind_PeHorizon_getSize_0=R._a)(f),Bp=o._emscripten_bind_PeHorizon_getCoord_0=f=>(Bp=o._emscripten_bind_PeHorizon_getCoord_0=R.$a)(f),qp=o._emscripten_bind_PeInteger_PeInteger_1=f=>(qp=o._emscripten_bind_PeInteger_PeInteger_1=R.ab)(f),jp=o._emscripten_bind_PeInteger_get_val_0=f=>(jp=o._emscripten_bind_PeInteger_get_val_0=R.bb)(f),Hp=o._emscripten_bind_PeInteger_set_val_1=(f,T)=>(Hp=o._emscripten_bind_PeInteger_set_val_1=R.cb)(f,T),Zp=o._emscripten_bind_PeInteger___destroy___0=f=>(Zp=o._emscripten_bind_PeInteger___destroy___0=R.db)(f),Yp=o._emscripten_bind_PeLineType_geodetic_distance_10=(f,T,A,B,J,le,he,fe,Ee,Sr)=>(Yp=o._emscripten_bind_PeLineType_geodetic_distance_10=R.eb)(f,T,A,B,J,le,he,fe,Ee,Sr),Jp=o._emscripten_bind_PeLineType_geodetic_coordinate_9=(f,T,A,B,J,le,he,fe,Ee)=>(Jp=o._emscripten_bind_PeLineType_geodetic_coordinate_9=R.fb)(f,T,A,B,J,le,he,fe,Ee),Xp=o._emscripten_bind_PeLineType_geodesic_coordinate_8=(f,T,A,B,J,le,he,fe)=>(Xp=o._emscripten_bind_PeLineType_geodesic_coordinate_8=R.gb)(f,T,A,B,J,le,he,fe),Qp=o._emscripten_bind_PeLineType_great_elliptic_distance_9=(f,T,A,B,J,le,he,fe,Ee)=>(Qp=o._emscripten_bind_PeLineType_great_elliptic_distance_9=R.hb)(f,T,A,B,J,le,he,fe,Ee),Dc=o._emscripten_bind_PeMath_q_3=(f,T,A)=>(Dc=o._emscripten_bind_PeMath_q_3=R.ib)(f,T,A),Kp=o._emscripten_bind_PeMath_q90_2=(f,T)=>(Kp=o._emscripten_bind_PeMath_q90_2=R.jb)(f,T),Oc=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_NEW_0=f=>(Oc=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_NEW_0=R.kb)(f),em=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_OLD_0=f=>(em=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_OLD_0=R.lb)(f),tm=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_AUTO_0=f=>(tm=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_AUTO_0=R.mb)(f),rm=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_180_ZONE_1_PLUS_0=f=>(rm=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_180_ZONE_1_PLUS_0=R.nb)(f),nm=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_ADD_SPACES_0=f=>(nm=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_ADD_SPACES_0=R.ob)(f),im=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NONE_0=f=>(im=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NONE_0=R.pb)(f),om=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_0=f=>(om=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_0=R.qb)(f),sm=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_STRICT_0=f=>(sm=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_STRICT_0=R.rb)(f),am=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_ADD_SPACES_0=f=>(am=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_ADD_SPACES_0=R.sb)(f),lm=o._emscripten_bind_PeParameter_getValue_0=f=>(lm=o._emscripten_bind_PeParameter_getValue_0=R.tb)(f),cm=o._emscripten_bind_PeParameter_getCode_0=f=>(cm=o._emscripten_bind_PeParameter_getCode_0=R.ub)(f),um=o._emscripten_bind_PeParameter_getName_1=(f,T)=>(um=o._emscripten_bind_PeParameter_getName_1=R.vb)(f,T),dm=o._emscripten_bind_PeParameter_getType_0=f=>(dm=o._emscripten_bind_PeParameter_getType_0=R.wb)(f),fm=o._emscripten_bind_PePCSInfo_getCentralMeridian_0=f=>(fm=o._emscripten_bind_PePCSInfo_getCentralMeridian_0=R.xb)(f),pm=o._emscripten_bind_PePCSInfo_getDomainMinx_0=f=>(pm=o._emscripten_bind_PePCSInfo_getDomainMinx_0=R.yb)(f),mm=o._emscripten_bind_PePCSInfo_getDomainMiny_0=f=>(mm=o._emscripten_bind_PePCSInfo_getDomainMiny_0=R.zb)(f),hm=o._emscripten_bind_PePCSInfo_getDomainMaxx_0=f=>(hm=o._emscripten_bind_PePCSInfo_getDomainMaxx_0=R.Ab)(f),gm=o._emscripten_bind_PePCSInfo_getDomainMaxy_0=f=>(gm=o._emscripten_bind_PePCSInfo_getDomainMaxy_0=R.Bb)(f),wm=o._emscripten_bind_PePCSInfo_getNorthPoleLocation_0=f=>(wm=o._emscripten_bind_PePCSInfo_getNorthPoleLocation_0=R.Cb)(f),ym=o._emscripten_bind_PePCSInfo_getNorthPoleGeometry_0=f=>(ym=o._emscripten_bind_PePCSInfo_getNorthPoleGeometry_0=R.Db)(f),bm=o._emscripten_bind_PePCSInfo_getSouthPoleLocation_0=f=>(bm=o._emscripten_bind_PePCSInfo_getSouthPoleLocation_0=R.Eb)(f),_m=o._emscripten_bind_PePCSInfo_getSouthPoleGeometry_0=f=>(_m=o._emscripten_bind_PePCSInfo_getSouthPoleGeometry_0=R.Fb)(f),vm=o._emscripten_bind_PePCSInfo_isDensificationNeeded_0=f=>(vm=o._emscripten_bind_PePCSInfo_isDensificationNeeded_0=R.Gb)(f),Sm=o._emscripten_bind_PePCSInfo_isGcsHorizonMultiOverlap_0=f=>(Sm=o._emscripten_bind_PePCSInfo_isGcsHorizonMultiOverlap_0=R.Hb)(f),xm=o._emscripten_bind_PePCSInfo_isPannableRectangle_0=f=>(xm=o._emscripten_bind_PePCSInfo_isPannableRectangle_0=R.Ib)(f),Cm=o._emscripten_bind_PePCSInfo_generate_2=(f,T)=>(Cm=o._emscripten_bind_PePCSInfo_generate_2=R.Jb)(f,T),Tm=o._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_NONE_0=f=>(Tm=o._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_NONE_0=R.Kb)(f),Em=o._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_DOMAIN_0=f=>(Em=o._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_DOMAIN_0=R.Lb)(f),Mm=o._emscripten_bind_PePCSInfo_get_PE_POLE_OUTSIDE_BOUNDARY_0=f=>(Mm=o._emscripten_bind_PePCSInfo_get_PE_POLE_OUTSIDE_BOUNDARY_0=R.Mb)(f),Lm=o._emscripten_bind_PePCSInfo_get_PE_POLE_POINT_0=f=>(Lm=o._emscripten_bind_PePCSInfo_get_PE_POLE_POINT_0=R.Nb)(f),Im=o._emscripten_bind_PePrimem_getLongitude_0=f=>(Im=o._emscripten_bind_PePrimem_getLongitude_0=R.Ob)(f),Pm=o._emscripten_bind_PePrimem_getCode_0=f=>(Pm=o._emscripten_bind_PePrimem_getCode_0=R.Pb)(f),Am=o._emscripten_bind_PePrimem_getName_1=(f,T)=>(Am=o._emscripten_bind_PePrimem_getName_1=R.Qb)(f,T),Nm=o._emscripten_bind_PePrimem_getType_0=f=>(Nm=o._emscripten_bind_PePrimem_getType_0=R.Rb)(f),km=o._emscripten_bind_PeProjcs_getGeogcs_0=f=>(km=o._emscripten_bind_PeProjcs_getGeogcs_0=R.Sb)(f),Rm=o._emscripten_bind_PeProjcs_getProjection_0=f=>(Rm=o._emscripten_bind_PeProjcs_getProjection_0=R.Tb)(f),Dm=o._emscripten_bind_PeProjcs_getParameters_0=f=>(Dm=o._emscripten_bind_PeProjcs_getParameters_0=R.Ub)(f),Om=o._emscripten_bind_PeProjcs_getUnit_0=f=>(Om=o._emscripten_bind_PeProjcs_getUnit_0=R.Vb)(f),$m=o._emscripten_bind_PeProjcs_loadConstants_0=f=>($m=o._emscripten_bind_PeProjcs_loadConstants_0=R.Wb)(f),Fm=o._emscripten_bind_PeProjcs_horizonGcsGenerate_0=f=>(Fm=o._emscripten_bind_PeProjcs_horizonGcsGenerate_0=R.Xb)(f),Vm=o._emscripten_bind_PeProjcs_horizonPcsGenerate_0=f=>(Vm=o._emscripten_bind_PeProjcs_horizonPcsGenerate_0=R.Yb)(f),Um=o._emscripten_bind_PeProjcs_isEqual_1=(f,T)=>(Um=o._emscripten_bind_PeProjcs_isEqual_1=R.Zb)(f,T),Wm=o._emscripten_bind_PeProjcs_getCode_0=f=>(Wm=o._emscripten_bind_PeProjcs_getCode_0=R._b)(f),zm=o._emscripten_bind_PeProjcs_getName_1=(f,T)=>(zm=o._emscripten_bind_PeProjcs_getName_1=R.$b)(f,T),Gm=o._emscripten_bind_PeProjcs_getType_0=f=>(Gm=o._emscripten_bind_PeProjcs_getType_0=R.ac)(f),Bm=o._emscripten_bind_PeSpheroid_getAxis_0=f=>(Bm=o._emscripten_bind_PeSpheroid_getAxis_0=R.bc)(f),qm=o._emscripten_bind_PeSpheroid_getFlattening_0=f=>(qm=o._emscripten_bind_PeSpheroid_getFlattening_0=R.cc)(f),jm=o._emscripten_bind_PeSpheroid_getCode_0=f=>(jm=o._emscripten_bind_PeSpheroid_getCode_0=R.dc)(f),Hm=o._emscripten_bind_PeSpheroid_getName_1=(f,T)=>(Hm=o._emscripten_bind_PeSpheroid_getName_1=R.ec)(f,T),Zm=o._emscripten_bind_PeSpheroid_getType_0=f=>(Zm=o._emscripten_bind_PeSpheroid_getType_0=R.fc)(f),Ym=o._emscripten_bind_PeUnit_getUnitFactor_0=f=>(Ym=o._emscripten_bind_PeUnit_getUnitFactor_0=R.gc)(f),Jm=o._emscripten_bind_PeUnit_getCode_0=f=>(Jm=o._emscripten_bind_PeUnit_getCode_0=R.hc)(f),Xm=o._emscripten_bind_PeUnit_getName_1=(f,T)=>(Xm=o._emscripten_bind_PeUnit_getName_1=R.ic)(f,T),Qm=o._emscripten_bind_PeUnit_getType_0=f=>(Qm=o._emscripten_bind_PeUnit_getType_0=R.jc)(f),Km=o._emscripten_bind_PeVersion_version_string_0=f=>(Km=o._emscripten_bind_PeVersion_version_string_0=R.kc)(f);function eh(){function f(){Fa||(Fa=!0,o.calledRun=!0,de||(pe(),t(o),ve()))}We>0||(ae(),We>0||f())}function Ye(){}function co(f){return(f||Ye).__cache__}function vt(f,T){var A=co(T),B=A[f];return B||((B=Object.create((T||Ye).prototype)).ptr=f,A[f]=B)}function dy(f,T){return vt(f.ptr,T)}function fy(f){if(!f.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";f.__destroy__(),delete co(f.__class__)[f.ptr]}function py(f,T){return f.ptr===T.ptr}function th(f){return f.ptr}function my(f){return f.__class__}o._pe_getPeGTlistExtendedEntrySize=()=>(o._pe_getPeGTlistExtendedEntrySize=R.lc)(),o._pe_getPeGTlistExtendedGTsSize=()=>(o._pe_getPeGTlistExtendedGTsSize=R.mc)(),o._pe_getPeHorizonSize=()=>(o._pe_getPeHorizonSize=R.nc)(),o._pe_geog_to_geog=(f,T,A,B,J)=>(o._pe_geog_to_geog=R.pc)(f,T,A,B,J),o._pe_geog_to_proj=(f,T,A)=>(o._pe_geog_to_proj=R.qc)(f,T,A),o._pe_geog_to_dd=(f,T,A,B,J)=>(o._pe_geog_to_dd=R.rc)(f,T,A,B,J),o._pe_dd_to_geog=(f,T,A,B)=>(o._pe_dd_to_geog=R.sc)(f,T,A,B),o._pe_geog_to_ddm=(f,T,A,B,J)=>(o._pe_geog_to_ddm=R.tc)(f,T,A,B,J),o._pe_ddm_to_geog=(f,T,A,B)=>(o._pe_ddm_to_geog=R.uc)(f,T,A,B),o._pe_geog_to_dms=(f,T,A,B,J)=>(o._pe_geog_to_dms=R.vc)(f,T,A,B,J),o._pe_dms_to_geog=(f,T,A,B)=>(o._pe_dms_to_geog=R.wc)(f,T,A,B),o._pe_geog_to_mgrs_extended=(f,T,A,B,J,le,he)=>(o._pe_geog_to_mgrs_extended=R.xc)(f,T,A,B,J,le,he),o._pe_mgrs_to_geog_extended=(f,T,A,B,J)=>(o._pe_mgrs_to_geog_extended=R.yc)(f,T,A,B,J),o._pe_geog_to_usng=(f,T,A,B,J,le,he)=>(o._pe_geog_to_usng=R.zc)(f,T,A,B,J,le,he),o._pe_usng_to_geog=(f,T,A,B)=>(o._pe_usng_to_geog=R.Ac)(f,T,A,B),o._pe_geog_to_utm=(f,T,A,B,J)=>(o._pe_geog_to_utm=R.Bc)(f,T,A,B,J),o._pe_utm_to_geog=(f,T,A,B,J)=>(o._pe_utm_to_geog=R.Cc)(f,T,A,B,J),o._pe_object_to_string_ext=(f,T,A)=>(o._pe_object_to_string_ext=R.Dc)(f,T,A),o._pe_proj_to_geog_center=(f,T,A,B)=>(o._pe_proj_to_geog_center=R.Ec)(f,T,A,B),o.getValue=Yw,o.UTF8ToString=qr,Pt=function f(){Fa||eh(),Fa||(Pt=f)},eh(),Ye.prototype=Object.create(Ye.prototype),Ye.prototype.constructor=Ye,Ye.prototype.__class__=Ye,Ye.__cache__={},o.WrapperObject=Ye,o.getCache=co,o.wrapPointer=vt,o.castObject=dy,o.NULL=vt(0),o.destroy=fy,o.compare=py,o.getPointer=th,o.getClass=my;var xe={buffer:0,size:0,pos:0,temps:[],needed:0,prepare(){if(xe.needed){for(var f=0;f<xe.temps.length;f++)o._webidl_free(xe.temps[f]);xe.temps.length=0,o._webidl_free(xe.buffer),xe.buffer=0,xe.size+=xe.needed,xe.needed=0}xe.buffer||(xe.size+=128,xe.buffer=o._webidl_malloc(xe.size),G(xe.buffer)),xe.pos=0},alloc(f,T){G(xe.buffer);var A,B=T.BYTES_PER_ELEMENT,J=f.length*B;return J=xf(J,8),xe.pos+J>=xe.size?(G(J>0),xe.needed+=J,A=o._webidl_malloc(J),xe.temps.push(A)):(A=xe.buffer+xe.pos,xe.pos+=J),A},copy(f,T,A){A/=T.BYTES_PER_ELEMENT;for(var B=0;B<f.length;B++)T[A+B]=f[B]}};function $c(f){if(typeof f=="string"){var T=cy(f),A=xe.alloc(T,V);return xe.copy(T,V,A),A}return f}function rn(f){if(typeof f=="object"){var T=xe.alloc(f,V);return xe.copy(f,V,T),T}return f}function hy(f){if(typeof f=="object"){var T=xe.alloc(f,re);return xe.copy(f,re,T),T}return f}function gy(f){if(typeof f=="object"){var T=xe.alloc(f,te);return xe.copy(f,te,T),T}return f}function wy(f){if(typeof f=="object"){var T=xe.alloc(f,ge);return xe.copy(f,ge,T),T}return f}function yy(f){if(typeof f=="object"){var T=xe.alloc(f,be);return xe.copy(f,be,T),T}return f}function dt(){throw"cannot construct a PeObject, no constructor in IDL"}function Vt(){throw"cannot construct a PeCoordsys, no constructor in IDL"}function kn(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Jt(){throw"cannot construct a PeDatum, no constructor in IDL"}function Z(){throw"cannot construct a PeDefs, no constructor in IDL"}function Ut(f){f&&typeof f=="object"&&(f=f.ptr),this.ptr=cp(f),co(Ut)[this.ptr]=this}function ur(){throw"cannot construct a PeFactory, no constructor in IDL"}function At(f,T,A,B,J,le){f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),A&&typeof A=="object"&&(A=A.ptr),B&&typeof B=="object"&&(B=B.ptr),J&&typeof J=="object"&&(J=J.ptr),le&&typeof le=="object"&&(le=le.ptr),this.ptr=wp(f,T,A,B,J,le),co(At)[this.ptr]=this}function at(){throw"cannot construct a PeGeogcs, no constructor in IDL"}function lt(){throw"cannot construct a PeGeogtran, no constructor in IDL"}function Nr(){throw"cannot construct a PeGTlistExtended, no constructor in IDL"}function vr(){throw"cannot construct a PeGTlistExtendedEntry, no constructor in IDL"}function jr(){throw"cannot construct a PeGTlistExtendedGTs, no constructor in IDL"}function Et(){throw"cannot construct a PeHorizon, no constructor in IDL"}function Wt(f){f&&typeof f=="object"&&(f=f.ptr),this.ptr=qp(f),co(Wt)[this.ptr]=this}function dr(){throw"cannot construct a PeLineType, no constructor in IDL"}function nn(){throw"cannot construct a PeMath, no constructor in IDL"}function Je(){throw"cannot construct a PeNotationMgrs, no constructor in IDL"}function ft(){throw"cannot construct a PeNotationUtm, no constructor in IDL"}function fr(){throw"cannot construct a PeParameter, no constructor in IDL"}function Se(){throw"cannot construct a PePCSInfo, no constructor in IDL"}function Xt(){throw"cannot construct a PePrimem, no constructor in IDL"}function ze(){throw"cannot construct a PeProjcs, no constructor in IDL"}function Nt(){throw"cannot construct a PeSpheroid, no constructor in IDL"}function zt(){throw"cannot construct a PeUnit, no constructor in IDL"}function Rn(){throw"cannot construct a PeVersion, no constructor in IDL"}return dt.prototype=Object.create(Ye.prototype),dt.prototype.constructor=dt,dt.prototype.__class__=dt,dt.__cache__={},o.PeObject=dt,dt.prototype.getCode=dt.prototype.getCode=function(){var f=this.ptr;return Cf(f)},dt.prototype.getName=dt.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Tf(T,f))},dt.prototype.getType=dt.prototype.getType=function(){var f=this.ptr;return Ef(f)},Vt.prototype=Object.create(dt.prototype),Vt.prototype.constructor=Vt,Vt.prototype.__class__=Vt,Vt.__cache__={},o.PeCoordsys=Vt,Vt.prototype.isEqual=Vt.prototype.isEqual=function(f){var T=this.ptr;return f&&typeof f=="object"&&(f=f.ptr),!!Mf(T,f)},Vt.prototype.getCode=Vt.prototype.getCode=function(){var f=this.ptr;return Lf(f)},Vt.prototype.getName=Vt.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Cs(T,f))},Vt.prototype.getType=Vt.prototype.getType=function(){var f=this.ptr;return If(f)},kn.prototype=Object.create(Ye.prototype),kn.prototype.constructor=kn,kn.prototype.__class__=kn,kn.__cache__={},o.VoidPtr=kn,kn.prototype.__destroy__=kn.prototype.__destroy__=function(){var f=this.ptr;Pf(f)},Jt.prototype=Object.create(dt.prototype),Jt.prototype.constructor=Jt,Jt.prototype.__class__=Jt,Jt.__cache__={},o.PeDatum=Jt,Jt.prototype.getSpheroid=Jt.prototype.getSpheroid=function(){var f=this.ptr;return vt(Af(f),Nt)},Jt.prototype.getCode=Jt.prototype.getCode=function(){var f=this.ptr;return Nf(f)},Jt.prototype.getName=Jt.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Ec(T,f))},Jt.prototype.getType=Jt.prototype.getType=function(){var f=this.ptr;return kf(f)},Z.prototype=Object.create(Ye.prototype),Z.prototype.constructor=Z,Z.prototype.__class__=Z,Z.__cache__={},o.PeDefs=Z,Z.prototype.get_PE_BUFFER_MAX=Z.prototype.get_PE_BUFFER_MAX=function(){var f=this.ptr;return Rf(f)},Object.defineProperty(Z.prototype,"PE_BUFFER_MAX",{get:Z.prototype.get_PE_BUFFER_MAX}),Z.prototype.get_PE_NAME_MAX=Z.prototype.get_PE_NAME_MAX=function(){var f=this.ptr;return Mc(f)},Object.defineProperty(Z.prototype,"PE_NAME_MAX",{get:Z.prototype.get_PE_NAME_MAX}),Z.prototype.get_PE_MGRS_MAX=Z.prototype.get_PE_MGRS_MAX=function(){var f=this.ptr;return Df(f)},Object.defineProperty(Z.prototype,"PE_MGRS_MAX",{get:Z.prototype.get_PE_MGRS_MAX}),Z.prototype.get_PE_USNG_MAX=Z.prototype.get_PE_USNG_MAX=function(){var f=this.ptr;return Lc(f)},Object.defineProperty(Z.prototype,"PE_USNG_MAX",{get:Z.prototype.get_PE_USNG_MAX}),Z.prototype.get_PE_DD_MAX=Z.prototype.get_PE_DD_MAX=function(){var f=this.ptr;return Ic(f)},Object.defineProperty(Z.prototype,"PE_DD_MAX",{get:Z.prototype.get_PE_DD_MAX}),Z.prototype.get_PE_DMS_MAX=Z.prototype.get_PE_DMS_MAX=function(){var f=this.ptr;return Of(f)},Object.defineProperty(Z.prototype,"PE_DMS_MAX",{get:Z.prototype.get_PE_DMS_MAX}),Z.prototype.get_PE_DDM_MAX=Z.prototype.get_PE_DDM_MAX=function(){var f=this.ptr;return $f(f)},Object.defineProperty(Z.prototype,"PE_DDM_MAX",{get:Z.prototype.get_PE_DDM_MAX}),Z.prototype.get_PE_UTM_MAX=Z.prototype.get_PE_UTM_MAX=function(){var f=this.ptr;return Ff(f)},Object.defineProperty(Z.prototype,"PE_UTM_MAX",{get:Z.prototype.get_PE_UTM_MAX}),Z.prototype.get_PE_PARM_MAX=Z.prototype.get_PE_PARM_MAX=function(){var f=this.ptr;return Vf(f)},Object.defineProperty(Z.prototype,"PE_PARM_MAX",{get:Z.prototype.get_PE_PARM_MAX}),Z.prototype.get_PE_TYPE_NONE=Z.prototype.get_PE_TYPE_NONE=function(){var f=this.ptr;return Uf(f)},Object.defineProperty(Z.prototype,"PE_TYPE_NONE",{get:Z.prototype.get_PE_TYPE_NONE}),Z.prototype.get_PE_TYPE_GEOGCS=Z.prototype.get_PE_TYPE_GEOGCS=function(){var f=this.ptr;return Wf(f)},Object.defineProperty(Z.prototype,"PE_TYPE_GEOGCS",{get:Z.prototype.get_PE_TYPE_GEOGCS}),Z.prototype.get_PE_TYPE_PROJCS=Z.prototype.get_PE_TYPE_PROJCS=function(){var f=this.ptr;return zf(f)},Object.defineProperty(Z.prototype,"PE_TYPE_PROJCS",{get:Z.prototype.get_PE_TYPE_PROJCS}),Z.prototype.get_PE_TYPE_GEOGTRAN=Z.prototype.get_PE_TYPE_GEOGTRAN=function(){var f=this.ptr;return Gf(f)},Object.defineProperty(Z.prototype,"PE_TYPE_GEOGTRAN",{get:Z.prototype.get_PE_TYPE_GEOGTRAN}),Z.prototype.get_PE_TYPE_COORDSYS=Z.prototype.get_PE_TYPE_COORDSYS=function(){var f=this.ptr;return Bf(f)},Object.defineProperty(Z.prototype,"PE_TYPE_COORDSYS",{get:Z.prototype.get_PE_TYPE_COORDSYS}),Z.prototype.get_PE_TYPE_UNIT=Z.prototype.get_PE_TYPE_UNIT=function(){var f=this.ptr;return qf(f)},Object.defineProperty(Z.prototype,"PE_TYPE_UNIT",{get:Z.prototype.get_PE_TYPE_UNIT}),Z.prototype.get_PE_TYPE_LINUNIT=Z.prototype.get_PE_TYPE_LINUNIT=function(){var f=this.ptr;return jf(f)},Object.defineProperty(Z.prototype,"PE_TYPE_LINUNIT",{get:Z.prototype.get_PE_TYPE_LINUNIT}),Z.prototype.get_PE_STR_OPTS_NONE=Z.prototype.get_PE_STR_OPTS_NONE=function(){var f=this.ptr;return Hf(f)},Object.defineProperty(Z.prototype,"PE_STR_OPTS_NONE",{get:Z.prototype.get_PE_STR_OPTS_NONE}),Z.prototype.get_PE_STR_AUTH_NONE=Z.prototype.get_PE_STR_AUTH_NONE=function(){var f=this.ptr;return Zf(f)},Object.defineProperty(Z.prototype,"PE_STR_AUTH_NONE",{get:Z.prototype.get_PE_STR_AUTH_NONE}),Z.prototype.get_PE_STR_AUTH_TOP=Z.prototype.get_PE_STR_AUTH_TOP=function(){var f=this.ptr;return Yf(f)},Object.defineProperty(Z.prototype,"PE_STR_AUTH_TOP",{get:Z.prototype.get_PE_STR_AUTH_TOP}),Z.prototype.get_PE_STR_NAME_CANON=Z.prototype.get_PE_STR_NAME_CANON=function(){var f=this.ptr;return Jf(f)},Object.defineProperty(Z.prototype,"PE_STR_NAME_CANON",{get:Z.prototype.get_PE_STR_NAME_CANON}),Z.prototype.get_PE_STR_FMT_WKT=Z.prototype.get_PE_STR_FMT_WKT=function(){var f=this.ptr;return Xf(f)},Object.defineProperty(Z.prototype,"PE_STR_FMT_WKT",{get:Z.prototype.get_PE_STR_FMT_WKT}),Z.prototype.get_PE_STR_FMT_WKT2=Z.prototype.get_PE_STR_FMT_WKT2=function(){var f=this.ptr;return Qf(f)},Object.defineProperty(Z.prototype,"PE_STR_FMT_WKT2",{get:Z.prototype.get_PE_STR_FMT_WKT2}),Z.prototype.get_PE_PARM_X0=Z.prototype.get_PE_PARM_X0=function(){var f=this.ptr;return Kf(f)},Object.defineProperty(Z.prototype,"PE_PARM_X0",{get:Z.prototype.get_PE_PARM_X0}),Z.prototype.get_PE_PARM_ND=Z.prototype.get_PE_PARM_ND=function(){var f=this.ptr;return ep(f)},Object.defineProperty(Z.prototype,"PE_PARM_ND",{get:Z.prototype.get_PE_PARM_ND}),Z.prototype.get_PE_TRANSFORM_1_TO_2=Z.prototype.get_PE_TRANSFORM_1_TO_2=function(){var f=this.ptr;return tp(f)},Object.defineProperty(Z.prototype,"PE_TRANSFORM_1_TO_2",{get:Z.prototype.get_PE_TRANSFORM_1_TO_2}),Z.prototype.get_PE_TRANSFORM_2_TO_1=Z.prototype.get_PE_TRANSFORM_2_TO_1=function(){var f=this.ptr;return rp(f)},Object.defineProperty(Z.prototype,"PE_TRANSFORM_2_TO_1",{get:Z.prototype.get_PE_TRANSFORM_2_TO_1}),Z.prototype.get_PE_TRANSFORM_P_TO_G=Z.prototype.get_PE_TRANSFORM_P_TO_G=function(){var f=this.ptr;return np(f)},Object.defineProperty(Z.prototype,"PE_TRANSFORM_P_TO_G",{get:Z.prototype.get_PE_TRANSFORM_P_TO_G}),Z.prototype.get_PE_TRANSFORM_G_TO_P=Z.prototype.get_PE_TRANSFORM_G_TO_P=function(){var f=this.ptr;return ip(f)},Object.defineProperty(Z.prototype,"PE_TRANSFORM_G_TO_P",{get:Z.prototype.get_PE_TRANSFORM_G_TO_P}),Z.prototype.get_PE_HORIZON_RECT=Z.prototype.get_PE_HORIZON_RECT=function(){var f=this.ptr;return op(f)},Object.defineProperty(Z.prototype,"PE_HORIZON_RECT",{get:Z.prototype.get_PE_HORIZON_RECT}),Z.prototype.get_PE_HORIZON_POLY=Z.prototype.get_PE_HORIZON_POLY=function(){var f=this.ptr;return sp(f)},Object.defineProperty(Z.prototype,"PE_HORIZON_POLY",{get:Z.prototype.get_PE_HORIZON_POLY}),Z.prototype.get_PE_HORIZON_LINE=Z.prototype.get_PE_HORIZON_LINE=function(){var f=this.ptr;return ap(f)},Object.defineProperty(Z.prototype,"PE_HORIZON_LINE",{get:Z.prototype.get_PE_HORIZON_LINE}),Z.prototype.get_PE_HORIZON_DELTA=Z.prototype.get_PE_HORIZON_DELTA=function(){var f=this.ptr;return lp(f)},Object.defineProperty(Z.prototype,"PE_HORIZON_DELTA",{get:Z.prototype.get_PE_HORIZON_DELTA}),Ut.prototype=Object.create(Ye.prototype),Ut.prototype.constructor=Ut,Ut.prototype.__class__=Ut,Ut.__cache__={},o.PeDouble=Ut,Ut.prototype.get_val=Ut.prototype.get_val=function(){var f=this.ptr;return up(f)},Ut.prototype.set_val=Ut.prototype.set_val=function(f){var T=this.ptr;f&&typeof f=="object"&&(f=f.ptr),dp(T,f)},Object.defineProperty(Ut.prototype,"val",{get:Ut.prototype.get_val,set:Ut.prototype.set_val}),Ut.prototype.__destroy__=Ut.prototype.__destroy__=function(){var f=this.ptr;fp(f)},ur.prototype=Object.create(Ye.prototype),ur.prototype.constructor=ur,ur.prototype.__class__=ur,ur.__cache__={},o.PeFactory=ur,ur.prototype.initialize=ur.prototype.initialize=function(f){xe.prepare(),f=f&&typeof f=="object"?f.ptr:$c(f),pp(f)},ur.prototype.factoryByType=ur.prototype.factoryByType=function(f,T){return f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),vt(mp(f,T),dt)},ur.prototype.fromString=ur.prototype.fromString=function(f,T){return xe.prepare(),f&&typeof f=="object"&&(f=f.ptr),T=T&&typeof T=="object"?T.ptr:$c(T),vt(hp(f,T),dt)},ur.prototype.getCode=ur.prototype.getCode=function(f){return f&&typeof f=="object"&&(f=f.ptr),gp(f)},At.prototype=Object.create(Ye.prototype),At.prototype.constructor=At,At.prototype.__class__=At,At.__cache__={},o.PeGCSExtent=At,At.prototype.getLLon=At.prototype.getLLon=function(){var f=this.ptr;return yp(f)},At.prototype.getSLat=At.prototype.getSLat=function(){var f=this.ptr;return bp(f)},At.prototype.getRLon=At.prototype.getRLon=function(){var f=this.ptr;return _p(f)},At.prototype.getNLat=At.prototype.getNLat=function(){var f=this.ptr;return vp(f)},At.prototype.__destroy__=At.prototype.__destroy__=function(){var f=this.ptr;Sp(f)},at.prototype=Object.create(Vt.prototype),at.prototype.constructor=at,at.prototype.__class__=at,at.__cache__={},o.PeGeogcs=at,at.prototype.getDatum=at.prototype.getDatum=function(){var f=this.ptr;return vt(xp(f),Jt)},at.prototype.getPrimem=at.prototype.getPrimem=function(){var f=this.ptr;return vt(Cp(f),Xt)},at.prototype.getUnit=at.prototype.getUnit=function(){var f=this.ptr;return vt(Tp(f),zt)},at.prototype.isEqual=at.prototype.isEqual=function(f){var T=this.ptr;return f&&typeof f=="object"&&(f=f.ptr),!!Ep(T,f)},at.prototype.getCode=at.prototype.getCode=function(){var f=this.ptr;return Mp(f)},at.prototype.getName=at.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Lp(T,f))},at.prototype.getType=at.prototype.getType=function(){var f=this.ptr;return Ip(f)},lt.prototype=Object.create(dt.prototype),lt.prototype.constructor=lt,lt.prototype.__class__=lt,lt.__cache__={},o.PeGeogtran=lt,lt.prototype.isEqual=lt.prototype.isEqual=function(f){var T=this.ptr;return f&&typeof f=="object"&&(f=f.ptr),!!Pp(T,f)},lt.prototype.getGeogcs1=lt.prototype.getGeogcs1=function(){var f=this.ptr;return vt(Ap(f),at)},lt.prototype.getGeogcs2=lt.prototype.getGeogcs2=function(){var f=this.ptr;return vt(Np(f),at)},lt.prototype.getParameters=lt.prototype.getParameters=function(){var f=this.ptr;return kp(f)},lt.prototype.loadConstants=lt.prototype.loadConstants=function(){var f=this.ptr;return!!Pc(f)},lt.prototype.getCode=lt.prototype.getCode=function(){var f=this.ptr;return Ac(f)},lt.prototype.getName=lt.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Rp(T,f))},lt.prototype.getType=lt.prototype.getType=function(){var f=this.ptr;return Dp(f)},Nr.prototype=Object.create(Ye.prototype),Nr.prototype.constructor=Nr,Nr.prototype.__class__=Nr,Nr.__cache__={},o.PeGTlistExtended=Nr,Nr.prototype.getGTlist=Nr.prototype.getGTlist=function(f,T,A,B,J,le){return f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),A&&typeof A=="object"&&(A=A.ptr),B&&typeof B=="object"&&(B=B.ptr),J&&typeof J=="object"&&(J=J.ptr),le&&typeof le=="object"&&(le=le.ptr),vt(Nc(f,T,A,B,J,le),vr)},Nr.prototype.get_PE_GTLIST_OPTS_COMMON=Nr.prototype.get_PE_GTLIST_OPTS_COMMON=function(){var f=this.ptr;return Op(f)},Object.defineProperty(Nr.prototype,"PE_GTLIST_OPTS_COMMON",{get:Nr.prototype.get_PE_GTLIST_OPTS_COMMON}),vr.prototype=Object.create(Ye.prototype),vr.prototype.constructor=vr,vr.prototype.__class__=vr,vr.__cache__={},o.PeGTlistExtendedEntry=vr,vr.prototype.getEntries=vr.prototype.getEntries=function(){var f=this.ptr;return vt(kc(f),jr)},vr.prototype.getSteps=vr.prototype.getSteps=function(){var f=this.ptr;return $p(f)},vr.prototype.Delete=vr.prototype.Delete=function(f){f&&typeof f=="object"&&(f=f.ptr),Fp(f)},jr.prototype=Object.create(Ye.prototype),jr.prototype.constructor=jr,jr.prototype.__class__=jr,jr.__cache__={},o.PeGTlistExtendedGTs=jr,jr.prototype.getDirection=jr.prototype.getDirection=function(){var f=this.ptr;return Vp(f)},jr.prototype.getGeogtran=jr.prototype.getGeogtran=function(){var f=this.ptr;return vt(Rc(f),lt)},Et.prototype=Object.create(Ye.prototype),Et.prototype.constructor=Et,Et.prototype.__class__=Et,Et.__cache__={},o.PeHorizon=Et,Et.prototype.getNump=Et.prototype.getNump=function(){var f=this.ptr;return Up(f)},Et.prototype.getKind=Et.prototype.getKind=function(){var f=this.ptr;return Wp(f)},Et.prototype.getInclusive=Et.prototype.getInclusive=function(){var f=this.ptr;return zp(f)},Et.prototype.getSize=Et.prototype.getSize=function(){var f=this.ptr;return Gp(f)},Et.prototype.getCoord=Et.prototype.getCoord=function(){var f=this.ptr;return Bp(f)},Wt.prototype=Object.create(Ye.prototype),Wt.prototype.constructor=Wt,Wt.prototype.__class__=Wt,Wt.__cache__={},o.PeInteger=Wt,Wt.prototype.get_val=Wt.prototype.get_val=function(){var f=this.ptr;return jp(f)},Wt.prototype.set_val=Wt.prototype.set_val=function(f){var T=this.ptr;f&&typeof f=="object"&&(f=f.ptr),Hp(T,f)},Object.defineProperty(Wt.prototype,"val",{get:Wt.prototype.get_val,set:Wt.prototype.set_val}),Wt.prototype.__destroy__=Wt.prototype.__destroy__=function(){var f=this.ptr;Zp(f)},dr.prototype=Object.create(Ye.prototype),dr.prototype.constructor=dr,dr.prototype.__class__=dr,dr.__cache__={},o.PeLineType=dr,dr.prototype.geodetic_distance=dr.prototype.geodetic_distance=function(f,T,A,B,J,le,he,fe,Ee,Sr){f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),A&&typeof A=="object"&&(A=A.ptr),B&&typeof B=="object"&&(B=B.ptr),J&&typeof J=="object"&&(J=J.ptr),le&&typeof le=="object"&&(le=le.ptr),he&&typeof he=="object"&&(he=he.ptr),fe&&typeof fe=="object"&&(fe=fe.ptr),Ee&&typeof Ee=="object"&&(Ee=Ee.ptr),Sr&&typeof Sr=="object"&&(Sr=Sr.ptr),Yp(f,T,A,B,J,le,he,fe,Ee,Sr)},dr.prototype.geodetic_coordinate=dr.prototype.geodetic_coordinate=function(f,T,A,B,J,le,he,fe,Ee){f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),A&&typeof A=="object"&&(A=A.ptr),B&&typeof B=="object"&&(B=B.ptr),J&&typeof J=="object"&&(J=J.ptr),le&&typeof le=="object"&&(le=le.ptr),he&&typeof he=="object"&&(he=he.ptr),fe&&typeof fe=="object"&&(fe=fe.ptr),Ee&&typeof Ee=="object"&&(Ee=Ee.ptr),Jp(f,T,A,B,J,le,he,fe,Ee)},dr.prototype.geodesic_coordinate=dr.prototype.geodesic_coordinate=function(f,T,A,B,J,le,he,fe){f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),A&&typeof A=="object"&&(A=A.ptr),B&&typeof B=="object"&&(B=B.ptr),J&&typeof J=="object"&&(J=J.ptr),le&&typeof le=="object"&&(le=le.ptr),he&&typeof he=="object"&&(he=he.ptr),fe&&typeof fe=="object"&&(fe=fe.ptr),Xp(f,T,A,B,J,le,he,fe)},dr.prototype.great_elliptic_distance=dr.prototype.great_elliptic_distance=function(f,T,A,B,J,le,he,fe,Ee){f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),A&&typeof A=="object"&&(A=A.ptr),B&&typeof B=="object"&&(B=B.ptr),J&&typeof J=="object"&&(J=J.ptr),le&&typeof le=="object"&&(le=le.ptr),he&&typeof he=="object"&&(he=he.ptr),fe&&typeof fe=="object"&&(fe=fe.ptr),Ee&&typeof Ee=="object"&&(Ee=Ee.ptr),Qp(f,T,A,B,J,le,he,fe,Ee)},nn.prototype=Object.create(Ye.prototype),nn.prototype.constructor=nn,nn.prototype.__class__=nn,nn.__cache__={},o.PeMath=nn,nn.prototype.q=nn.prototype.q=function(f,T,A){return f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),A&&typeof A=="object"&&(A=A.ptr),Dc(f,T,A)},nn.prototype.q90=nn.prototype.q90=function(f,T){return f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),Kp(f,T)},Je.prototype=Object.create(Ye.prototype),Je.prototype.constructor=Je,Je.prototype.__class__=Je,Je.__cache__={},o.PeNotationMgrs=Je,Je.prototype.get_PE_MGRS_STYLE_NEW=Je.prototype.get_PE_MGRS_STYLE_NEW=function(){var f=this.ptr;return Oc(f)},Object.defineProperty(Je.prototype,"PE_MGRS_STYLE_NEW",{get:Je.prototype.get_PE_MGRS_STYLE_NEW}),Je.prototype.get_PE_MGRS_STYLE_OLD=Je.prototype.get_PE_MGRS_STYLE_OLD=function(){var f=this.ptr;return em(f)},Object.defineProperty(Je.prototype,"PE_MGRS_STYLE_OLD",{get:Je.prototype.get_PE_MGRS_STYLE_OLD}),Je.prototype.get_PE_MGRS_STYLE_AUTO=Je.prototype.get_PE_MGRS_STYLE_AUTO=function(){var f=this.ptr;return tm(f)},Object.defineProperty(Je.prototype,"PE_MGRS_STYLE_AUTO",{get:Je.prototype.get_PE_MGRS_STYLE_AUTO}),Je.prototype.get_PE_MGRS_180_ZONE_1_PLUS=Je.prototype.get_PE_MGRS_180_ZONE_1_PLUS=function(){var f=this.ptr;return rm(f)},Object.defineProperty(Je.prototype,"PE_MGRS_180_ZONE_1_PLUS",{get:Je.prototype.get_PE_MGRS_180_ZONE_1_PLUS}),Je.prototype.get_PE_MGRS_ADD_SPACES=Je.prototype.get_PE_MGRS_ADD_SPACES=function(){var f=this.ptr;return nm(f)},Object.defineProperty(Je.prototype,"PE_MGRS_ADD_SPACES",{get:Je.prototype.get_PE_MGRS_ADD_SPACES}),ft.prototype=Object.create(Ye.prototype),ft.prototype.constructor=ft,ft.prototype.__class__=ft,ft.__cache__={},o.PeNotationUtm=ft,ft.prototype.get_PE_UTM_OPTS_NONE=ft.prototype.get_PE_UTM_OPTS_NONE=function(){var f=this.ptr;return im(f)},Object.defineProperty(ft.prototype,"PE_UTM_OPTS_NONE",{get:ft.prototype.get_PE_UTM_OPTS_NONE}),ft.prototype.get_PE_UTM_OPTS_NS=ft.prototype.get_PE_UTM_OPTS_NS=function(){var f=this.ptr;return om(f)},Object.defineProperty(ft.prototype,"PE_UTM_OPTS_NS",{get:ft.prototype.get_PE_UTM_OPTS_NS}),ft.prototype.get_PE_UTM_OPTS_NS_STRICT=ft.prototype.get_PE_UTM_OPTS_NS_STRICT=function(){var f=this.ptr;return sm(f)},Object.defineProperty(ft.prototype,"PE_UTM_OPTS_NS_STRICT",{get:ft.prototype.get_PE_UTM_OPTS_NS_STRICT}),ft.prototype.get_PE_UTM_OPTS_ADD_SPACES=ft.prototype.get_PE_UTM_OPTS_ADD_SPACES=function(){var f=this.ptr;return am(f)},Object.defineProperty(ft.prototype,"PE_UTM_OPTS_ADD_SPACES",{get:ft.prototype.get_PE_UTM_OPTS_ADD_SPACES}),fr.prototype=Object.create(dt.prototype),fr.prototype.constructor=fr,fr.prototype.__class__=fr,fr.__cache__={},o.PeParameter=fr,fr.prototype.getValue=fr.prototype.getValue=function(){var f=this.ptr;return lm(f)},fr.prototype.getCode=fr.prototype.getCode=function(){var f=this.ptr;return cm(f)},fr.prototype.getName=fr.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(um(T,f))},fr.prototype.getType=fr.prototype.getType=function(){var f=this.ptr;return dm(f)},Se.prototype=Object.create(Ye.prototype),Se.prototype.constructor=Se,Se.prototype.__class__=Se,Se.__cache__={},o.PePCSInfo=Se,Se.prototype.getCentralMeridian=Se.prototype.getCentralMeridian=function(){var f=this.ptr;return fm(f)},Se.prototype.getDomainMinx=Se.prototype.getDomainMinx=function(){var f=this.ptr;return pm(f)},Se.prototype.getDomainMiny=Se.prototype.getDomainMiny=function(){var f=this.ptr;return mm(f)},Se.prototype.getDomainMaxx=Se.prototype.getDomainMaxx=function(){var f=this.ptr;return hm(f)},Se.prototype.getDomainMaxy=Se.prototype.getDomainMaxy=function(){var f=this.ptr;return gm(f)},Se.prototype.getNorthPoleLocation=Se.prototype.getNorthPoleLocation=function(){var f=this.ptr;return wm(f)},Se.prototype.getNorthPoleGeometry=Se.prototype.getNorthPoleGeometry=function(){var f=this.ptr;return ym(f)},Se.prototype.getSouthPoleLocation=Se.prototype.getSouthPoleLocation=function(){var f=this.ptr;return bm(f)},Se.prototype.getSouthPoleGeometry=Se.prototype.getSouthPoleGeometry=function(){var f=this.ptr;return _m(f)},Se.prototype.isDensificationNeeded=Se.prototype.isDensificationNeeded=function(){var f=this.ptr;return!!vm(f)},Se.prototype.isGcsHorizonMultiOverlap=Se.prototype.isGcsHorizonMultiOverlap=function(){var f=this.ptr;return!!Sm(f)},Se.prototype.isPannableRectangle=Se.prototype.isPannableRectangle=function(){var f=this.ptr;return!!xm(f)},Se.prototype.generate=Se.prototype.generate=function(f,T){return f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),vt(Cm(f,T),Se)},Se.prototype.get_PE_PCSINFO_OPTION_NONE=Se.prototype.get_PE_PCSINFO_OPTION_NONE=function(){var f=this.ptr;return Tm(f)},Object.defineProperty(Se.prototype,"PE_PCSINFO_OPTION_NONE",{get:Se.prototype.get_PE_PCSINFO_OPTION_NONE}),Se.prototype.get_PE_PCSINFO_OPTION_DOMAIN=Se.prototype.get_PE_PCSINFO_OPTION_DOMAIN=function(){var f=this.ptr;return Em(f)},Object.defineProperty(Se.prototype,"PE_PCSINFO_OPTION_DOMAIN",{get:Se.prototype.get_PE_PCSINFO_OPTION_DOMAIN}),Se.prototype.get_PE_POLE_OUTSIDE_BOUNDARY=Se.prototype.get_PE_POLE_OUTSIDE_BOUNDARY=function(){var f=this.ptr;return Mm(f)},Object.defineProperty(Se.prototype,"PE_POLE_OUTSIDE_BOUNDARY",{get:Se.prototype.get_PE_POLE_OUTSIDE_BOUNDARY}),Se.prototype.get_PE_POLE_POINT=Se.prototype.get_PE_POLE_POINT=function(){var f=this.ptr;return Lm(f)},Object.defineProperty(Se.prototype,"PE_POLE_POINT",{get:Se.prototype.get_PE_POLE_POINT}),Xt.prototype=Object.create(dt.prototype),Xt.prototype.constructor=Xt,Xt.prototype.__class__=Xt,Xt.__cache__={},o.PePrimem=Xt,Xt.prototype.getLongitude=Xt.prototype.getLongitude=function(){var f=this.ptr;return Im(f)},Xt.prototype.getCode=Xt.prototype.getCode=function(){var f=this.ptr;return Pm(f)},Xt.prototype.getName=Xt.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Am(T,f))},Xt.prototype.getType=Xt.prototype.getType=function(){var f=this.ptr;return Nm(f)},ze.prototype=Object.create(Vt.prototype),ze.prototype.constructor=ze,ze.prototype.__class__=ze,ze.__cache__={},o.PeProjcs=ze,ze.prototype.getGeogcs=ze.prototype.getGeogcs=function(){var f=this.ptr;return vt(km(f),at)},ze.prototype.getProjection=ze.prototype.getProjection=function(){var f=this.ptr;return vt(Rm(f),dt)},ze.prototype.getParameters=ze.prototype.getParameters=function(){var f=this.ptr;return Dm(f)},ze.prototype.getUnit=ze.prototype.getUnit=function(){var f=this.ptr;return vt(Om(f),zt)},ze.prototype.loadConstants=ze.prototype.loadConstants=function(){var f=this.ptr;return!!$m(f)},ze.prototype.horizonGcsGenerate=ze.prototype.horizonGcsGenerate=function(){var f=this.ptr;return vt(Fm(f),Et)},ze.prototype.horizonPcsGenerate=ze.prototype.horizonPcsGenerate=function(){var f=this.ptr;return vt(Vm(f),Et)},ze.prototype.isEqual=ze.prototype.isEqual=function(f){var T=this.ptr;return f&&typeof f=="object"&&(f=f.ptr),!!Um(T,f)},ze.prototype.getCode=ze.prototype.getCode=function(){var f=this.ptr;return Wm(f)},ze.prototype.getName=ze.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(zm(T,f))},ze.prototype.getType=ze.prototype.getType=function(){var f=this.ptr;return Gm(f)},Nt.prototype=Object.create(dt.prototype),Nt.prototype.constructor=Nt,Nt.prototype.__class__=Nt,Nt.__cache__={},o.PeSpheroid=Nt,Nt.prototype.getAxis=Nt.prototype.getAxis=function(){var f=this.ptr;return Bm(f)},Nt.prototype.getFlattening=Nt.prototype.getFlattening=function(){var f=this.ptr;return qm(f)},Nt.prototype.getCode=Nt.prototype.getCode=function(){var f=this.ptr;return jm(f)},Nt.prototype.getName=Nt.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Hm(T,f))},Nt.prototype.getType=Nt.prototype.getType=function(){var f=this.ptr;return Zm(f)},zt.prototype=Object.create(dt.prototype),zt.prototype.constructor=zt,zt.prototype.__class__=zt,zt.__cache__={},o.PeUnit=zt,zt.prototype.getUnitFactor=zt.prototype.getUnitFactor=function(){var f=this.ptr;return Ym(f)},zt.prototype.getCode=zt.prototype.getCode=function(){var f=this.ptr;return Jm(f)},zt.prototype.getName=zt.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Xm(T,f))},zt.prototype.getType=zt.prototype.getType=function(){var f=this.ptr;return Qm(f)},Rn.prototype=Object.create(Ye.prototype),Rn.prototype.constructor=Rn,Rn.prototype.__class__=Rn,Rn.__cache__={},o.PeVersion=Rn,Rn.prototype.version_string=Rn.prototype.version_string=function(){var f=this.ptr;return qr(Km(f))},o.ensureCache=xe,o.ensureString=$c,o.ensureInt8=rn,o.ensureInt16=hy,o.ensureInt32=gy,o.ensureFloat32=wy,o.ensureFloat64=yy,s},FI.exports=VI;Cq=RI(UI.exports),Tq=Object.freeze(Object.defineProperty({__proto__:null,default:Cq},Symbol.toStringTag,{value:"Module"}))});function GI(){return!!P}function Eq(){return!!Q("esri-wasm")}function BI(){return HS||(HS=Promise.resolve().then(()=>(zI(),WI)).then(e=>e.p).then(({default:e})=>e({locateFile:t=>ql(`esri/geometry/support/${t}`)})).then(e=>{HI(e)}),HS)}function HI(e){function t(o,s,a){o[s]=a(o[s])}P=e,ut.init(),bw.init(),_w.init(),vw.init(),Sw.init(),qI=class extends P.PeDouble{constructor(o=0){super(o)}destroy(){P.destroy(this)}[Symbol.dispose](){this.destroy()}},jI=class extends P.PeGCSExtent{destroy(){P.destroy(this)}[Symbol.dispose](){this.destroy()}};let r=[P.PeDatum,P.PeGeogcs,P.PeGeogtran,P.PeObject,P.PeParameter,P.PePrimem,P.PeProjcs,P.PeSpheroid,P.PeUnit];for(let o of r)t(o.prototype,"getName",s=>function(){return s.call(this,new Array(ut.PE_NAME_MAX))});for(let o of[P.PeGeogtran,P.PeProjcs])t(o.prototype,"getParameters",s=>function(){let a=new Array(ut.PE_PARM_MAX),u=s.call(this);for(let d=0;d<a.length;d++){let p=P.getValue(u,"*");a[d]=p?P.wrapPointer(p,P.PeParameter):null,u+=Int32Array.BYTES_PER_ELEMENT}return a});t(P.PeHorizon.prototype,"getCoord",o=>function(s=!1){let a=this.getSize();if(!a)return null;let u=[];return hs(u,a,o.call(this),s),u}),t(P.PeGTlistExtendedEntry.prototype,"getEntries",o=>{let s=P._pe_getPeGTlistExtendedGTsSize();return function(){let a=null,u=o.call(this);if(!P.compare(u,P.NULL)){a=[u];let d=this.getSteps();if(d>1){let p=P.getPointer(u);for(let m=1;m<d;m++)a.push(P.wrapPointer(p+s*m,P.PeGTlistExtendedGTs))}}return a}});let n=P._pe_getPeHorizonSize(),i=o=>function(){let s=this._cache;if(s||(s=new Map,this._cache=s),s.has(o))return s.get(o);let a=null,u=o.call(this);if(!P.compare(u,P.NULL)){a=[u];let d=u.getNump();if(d>1){let p=P.getPointer(u);for(let m=1;m<d;m++)a.push(P.wrapPointer(p+n*m,P.PeHorizon))}}return s.set(o,a),a};t(P.PeProjcs.prototype,"horizonGcsGenerate",i),t(P.PeProjcs.prototype,"horizonPcsGenerate",i),P.PeObject.prototype.toString=function(o=ut.PE_STR_OPTS_NONE){P.ensureCache.prepare();let s=P.getPointer(this),a=P.ensureInt8(new Array(ut.PE_BUFFER_MAX));return P.UTF8ToString(P._pe_object_to_string_ext(s,o,a))}}function io(e){if(!e)return;let t=P.getClass(e);if(!t)return;let r=P.getCache(t);if(!r)return;let n=P.getPointer(e);n&&delete r[n]}function ww(e,t){let r=[],n=new Array(t);for(let i=0;i<e;i++)r.push(P.ensureInt8(n));return r}function Sa(e){return ArrayBuffer.isView(e)?e:Array.isArray(e[0])?e.flat():e}function hs(e,t,r,n=!1){if(n)for(let i=0;i<2*t;i++)e[i]=P.getValue(r+i*Float64Array.BYTES_PER_ELEMENT,"double");else{let i=e.length===0;for(let o=0;o<t;o++)i&&(e[o]=new Array(2)),e[o][0]=P.getValue(r,"double"),e[o][1]=P.getValue(r+Float64Array.BYTES_PER_ELEMENT,"double"),r+=2*Float64Array.BYTES_PER_ELEMENT}}var HS,P,ZS,ut,qI,yw,jI,bw,YS,JS,XS,QS,KS,_w,e4,vw,Sw,t4,Ihe,ZI=L(()=>{J0();Be();P=null;(function(e){function t(o,s,a){P.ensureCache.prepare();let u=Sa(a),d=a===u,p=P.ensureFloat64(u),m=P._pe_geog_to_proj(P.getPointer(o),s,p);return m&&hs(a,s,p,d),m}function r(o,s,a,u){switch(u){case ut.PE_TRANSFORM_P_TO_G:return n(o,s,a);case ut.PE_TRANSFORM_G_TO_P:return t(o,s,a)}return 0}function n(o,s,a){return i(o,s,a,0)}function i(o,s,a,u){P.ensureCache.prepare();let d=Sa(a),p=a===d,m=P.ensureFloat64(d),w=P._pe_proj_to_geog_center(P.getPointer(o),s,m,u);return w&&hs(a,s,m,p),w}e.geogToProj=t,e.projGeog=r,e.projToGeog=n,e.projToGeogCenter=i})(ZS||(ZS={})),function(e){function t(){e.PE_BUFFER_MAX=P.PeDefs.prototype.PE_BUFFER_MAX,e.PE_NAME_MAX=P.PeDefs.prototype.PE_NAME_MAX,e.PE_MGRS_MAX=P.PeDefs.prototype.PE_MGRS_MAX,e.PE_USNG_MAX=P.PeDefs.prototype.PE_USNG_MAX,e.PE_DD_MAX=P.PeDefs.prototype.PE_DD_MAX,e.PE_DDM_MAX=P.PeDefs.prototype.PE_DDM_MAX,e.PE_DMS_MAX=P.PeDefs.prototype.PE_DMS_MAX,e.PE_UTM_MAX=P.PeDefs.prototype.PE_UTM_MAX,e.PE_PARM_MAX=P.PeDefs.prototype.PE_PARM_MAX,e.PE_TYPE_NONE=P.PeDefs.prototype.PE_TYPE_NONE,e.PE_TYPE_GEOGCS=P.PeDefs.prototype.PE_TYPE_GEOGCS,e.PE_TYPE_PROJCS=P.PeDefs.prototype.PE_TYPE_PROJCS,e.PE_TYPE_GEOGTRAN=P.PeDefs.prototype.PE_TYPE_GEOGTRAN,e.PE_TYPE_COORDSYS=P.PeDefs.prototype.PE_TYPE_COORDSYS,e.PE_TYPE_UNIT=P.PeDefs.prototype.PE_TYPE_UNIT,e.PE_TYPE_LINUNIT=P.PeDefs.prototype.PE_TYPE_LINUNIT,e.PE_STR_OPTS_NONE=P.PeDefs.prototype.PE_STR_OPTS_NONE,e.PE_STR_AUTH_NONE=P.PeDefs.prototype.PE_STR_AUTH_NONE,e.PE_STR_AUTH_TOP=P.PeDefs.prototype.PE_STR_AUTH_TOP,e.PE_STR_NAME_CANON=P.PeDefs.prototype.PE_STR_NAME_CANON,e.PE_STR_FMT_WKT=P.PeDefs.prototype.PE_STR_FMT_WKT,e.PE_STR_FMT_WKT2=P.PeDefs.prototype.PE_STR_FMT_WKT2,e.PE_PARM_X0=P.PeDefs.prototype.PE_PARM_X0,e.PE_PARM_ND=P.PeDefs.prototype.PE_PARM_ND,e.PE_TRANSFORM_1_TO_2=P.PeDefs.prototype.PE_TRANSFORM_1_TO_2,e.PE_TRANSFORM_2_TO_1=P.PeDefs.prototype.PE_TRANSFORM_2_TO_1,e.PE_TRANSFORM_P_TO_G=P.PeDefs.prototype.PE_TRANSFORM_P_TO_G,e.PE_TRANSFORM_G_TO_P=P.PeDefs.prototype.PE_TRANSFORM_G_TO_P,e.PE_HORIZON_RECT=P.PeDefs.prototype.PE_HORIZON_RECT,e.PE_HORIZON_POLY=P.PeDefs.prototype.PE_HORIZON_POLY,e.PE_HORIZON_LINE=P.PeDefs.prototype.PE_HORIZON_LINE,e.PE_HORIZON_DELTA=P.PeDefs.prototype.PE_HORIZON_DELTA}e.init=t}(ut||(ut={}));qI=null;(function(e){let t={},r={},n=_=>{if(_){let S=_.getType();switch(S){case ut.PE_TYPE_GEOGCS:_=P.castObject(_,P.PeGeogcs);break;case ut.PE_TYPE_PROJCS:_=P.castObject(_,P.PeProjcs);break;case ut.PE_TYPE_GEOGTRAN:_=P.castObject(_,P.PeGeogtran);break;default:S&ut.PE_TYPE_UNIT&&(_=P.castObject(_,P.PeUnit))}}return _};function i(){P.PeFactory.prototype.initialize(null)}function o(_){return s(ut.PE_TYPE_COORDSYS,_)}function s(_,S){let C=null,M=t[_];if(M||(M={},t[_]=M),M.hasOwnProperty(String(S)))C=M[S];else{let k=P.PeFactory.prototype.factoryByType(_,S);P.compare(k,P.NULL)||(C=k,M[S]=C)}return C=n(C),C}function a(_,S){let C=null,M=r[_];if(M||(M={},r[_]=M),M.hasOwnProperty(S))C=M[S];else{let k=P.PeFactory.prototype.fromString(_,S);P.compare(k,P.NULL)||(C=k,M[S]=C)}return C=n(C),C}function u(_){return s(ut.PE_TYPE_GEOGCS,_)}function d(_){return s(ut.PE_TYPE_GEOGTRAN,_)}function p(_){return P.PeFactory.prototype.getCode(_)}function m(_){return s(ut.PE_TYPE_PROJCS,_)}function w(_){return s(ut.PE_TYPE_UNIT,_)}e.initialize=i,e.coordsys=o,e.factoryByType=s,e.fromString=a,e.geogcs=u,e.geogtran=d,e.getCode=p,e.projcs=m,e.unit=w})(yw||(yw={}));jI=null;(function(e){let t;function r(){e.PE_GTLIST_OPTS_COMMON=P.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,t=P._pe_getPeGTlistExtendedEntrySize()}function n(i,o,s,a,u,d){let p=null,m=new P.PeInteger(d);try{let w=P.PeGTlistExtended.prototype.getGTlist(i,o,s,a,u,m);if((d=m.val)&&(p=[w],d>1)){let _=P.getPointer(w);for(let S=1;S<d;S++)p.push(P.wrapPointer(_+t*S,P.PeGTlistExtendedEntry))}}finally{P.destroy(m)}return p}e.init=r,e.getGTlist=n})(bw||(bw={})),function(e){function t(r){if(r?.length){for(let n of r)io(n),n.getEntries().forEach(i=>{io(i);let o=i.getGeogtran();io(o),o.getParameters().forEach(io),[o.getGeogcs1(),o.getGeogcs2()].forEach(s=>{io(s);let a=s.getDatum();io(a),io(a.getSpheroid()),io(s.getPrimem()),io(s.getUnit())})});P.PeGTlistExtendedEntry.prototype.Delete(r[0])}}e.destroy=t}(YS||(YS={})),function(e){function t(r,n,i,o,s){P.ensureCache.prepare();let a=Sa(i),u=i===a,d=P.ensureFloat64(a),p=0;o&&(p=P.ensureFloat64(o));let m=P._pe_geog_to_geog(P.getPointer(r),n,d,p,s);return m&&hs(i,n,d,u),m}e.geogToGeog=t}(JS||(JS={})),function(e){function t(o,s,a,u,d,p,m,w){P.PeLineType.prototype.geodesic_coordinate(o,s,a,u,d,p,m,w)}function r(o,s,a,u,d,p,m,w,_){P.PeLineType.prototype.geodetic_coordinate(o,s,a,u,d,p,m,w,_)}function n(o,s,a,u,d,p,m,w,_,S){P.PeLineType.prototype.geodetic_distance(o,s,a,u,d,p,m,w,_,S)}function i(o,s,a,u,d,p,m,w,_){P.PeLineType.prototype.great_elliptic_distance(o,s,a,u,d,p,m,w,_)}e.geodesicCoordinate=t,e.geodeticCoordinate=r,e.geodeticDistance=n,e.greatEllipticDistance=i}(XS||(XS={})),function(e){function t(n,i,o){return P.PeMath.prototype.q(n,i,o)}function r(n,i){return P.PeMath.prototype.q90(n,i)}e.q=t,e.q90=r}(QS||(QS={})),function(e){let t=(d,p,m,w,_,S)=>{let C,M;switch(P.ensureCache.prepare(),d){case"dd":C=P._pe_geog_to_dd,M=ut.PE_DD_MAX;break;case"ddm":C=P._pe_geog_to_ddm,M=ut.PE_DDM_MAX;break;case"dms":C=P._pe_geog_to_dms,M=ut.PE_DMS_MAX}let k=0;p&&(k=P.getPointer(p));let I=Sa(w),N=P.ensureFloat64(I),V=ww(m,M),Y=C(k,m,N,_,P.ensureInt32(V));if(Y)for(let re=0;re<m;re++)S[re]=P.UTF8ToString(V[re]);return Y},r=(d,p,m,w,_)=>{let S;switch(P.ensureCache.prepare(),d){case"dd":S=P._pe_dd_to_geog;break;case"ddm":S=P._pe_ddm_to_geog;break;case"dms":S=P._pe_dms_to_geog}let C=0;p&&(C=P.getPointer(p));let M=w.map(V=>P.ensureString(V)),k=P.ensureInt32(M),I=P.ensureFloat64(new Array(2*m)),N=S(C,m,k,I);return N&&hs(_,m,I),N};function n(d,p,m,w,_){return t("dms",d,p,m,w,_)}function i(d,p,m,w){return r("dms",d,p,m,w)}function o(d,p,m,w,_){return t("ddm",d,p,m,w,_)}function s(d,p,m,w){return r("ddm",d,p,m,w)}function a(d,p,m,w,_){return t("dd",d,p,m,w,_)}function u(d,p,m,w){return r("dd",d,p,m,w)}e.geogToDms=n,e.dmsToGeog=i,e.geogToDdm=o,e.ddmToGeog=s,e.geogToDd=a,e.ddToGeog=u}(KS||(KS={})),function(e){function t(){e.PE_MGRS_STYLE_NEW=P.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,e.PE_MGRS_STYLE_OLD=P.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,e.PE_MGRS_STYLE_AUTO=P.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,e.PE_MGRS_180_ZONE_1_PLUS=P.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,e.PE_MGRS_ADD_SPACES=P.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES}function r(i,o,s,a,u,d,p){P.ensureCache.prepare();let m=0;i&&(m=P.getPointer(i));let w=Sa(s),_=P.ensureFloat64(w),S=ww(o,ut.PE_MGRS_MAX),C=P.ensureInt32(S),M=P._pe_geog_to_mgrs_extended(m,o,_,a,u,d,C);if(M)for(let k=0;k<o;k++)p[k]=P.UTF8ToString(S[k]);return M}function n(i,o,s,a,u){P.ensureCache.prepare();let d=0;i&&(d=P.getPointer(i));let p=s.map(S=>P.ensureString(S)),m=P.ensureInt32(p),w=P.ensureFloat64(new Array(2*o)),_=P._pe_mgrs_to_geog_extended(d,o,m,a,w);return _&&hs(u,o,w),_}e.init=t,e.geogToMgrsExtended=r,e.mgrsToGeogExtended=n}(_w||(_w={})),function(e){function t(n,i,o,s,a,u,d){P.ensureCache.prepare();let p=0;n&&(p=P.getPointer(n));let m=Sa(o),w=P.ensureFloat64(m),_=ww(i,ut.PE_MGRS_MAX),S=P.ensureInt32(_),C=P._pe_geog_to_usng(p,i,w,s,a,u,S);if(C)for(let M=0;M<i;M++)d[M]=P.UTF8ToString(_[M]);return C}function r(n,i,o,s){P.ensureCache.prepare();let a=0;n&&(a=P.getPointer(n));let u=o.map(w=>P.ensureString(w)),d=P.ensureInt32(u),p=P.ensureFloat64(new Array(2*i)),m=P._pe_usng_to_geog(a,i,d,p);return m&&hs(s,i,p),m}e.geogToUsng=t,e.usngToGeog=r}(e4||(e4={})),function(e){function t(){e.PE_UTM_OPTS_NONE=P.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,e.PE_UTM_OPTS_ADD_SPACES=P.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,e.PE_UTM_OPTS_NS=P.PeNotationUtm.prototype.PE_UTM_OPTS_NS}function r(i,o,s,a,u){P.ensureCache.prepare();let d=0;i&&(d=P.getPointer(i));let p=Sa(s),m=P.ensureFloat64(p),w=ww(o,ut.PE_UTM_MAX),_=P.ensureInt32(w),S=P._pe_geog_to_utm(d,o,m,a,_);if(S)for(let C=0;C<o;C++)u[C]=P.UTF8ToString(w[C]);return S}function n(i,o,s,a,u){P.ensureCache.prepare();let d=0;i&&(d=P.getPointer(i));let p=s.map(S=>P.ensureString(S)),m=P.ensureInt32(p),w=P.ensureFloat64(new Array(2*o)),_=P._pe_utm_to_geog(d,o,m,a,w);return _&&hs(u,o,w),_}e.init=t,e.geogToUtm=r,e.utmToGeog=n}(vw||(vw={})),function(e){let t=new Map;function r(){e.PE_PCSINFO_OPTION_NONE=P.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,e.PE_PCSINFO_OPTION_DOMAIN=P.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,e.PE_POLE_OUTSIDE_BOUNDARY=P.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,e.PE_POLE_POINT=P.PePCSInfo.prototype.PE_POLE_POINT}function n(i,o=e.PE_PCSINFO_OPTION_DOMAIN){let s=null,a=null;return t.has(i)&&(a=t.get(i),a[o]&&(s=a[o])),s||(s=P.PePCSInfo.prototype.generate(i,o),a||(a=[],t.set(i,a)),a[o]=s),s}e.init=r,e.generate=n}(Sw||(Sw={})),function(e){function t(){return P.PeVersion.prototype.version_string()}e.versionString=t}(t4||(t4={}));Ihe=Object.freeze(Object.defineProperty({__proto__:null,get PeCSTransformations(){return ZS},get PeDefs(){return ut},get PeDouble(){return qI},get PeFactory(){return yw},get PeGCSExtent(){return jI},get PeGTTransformations(){return JS},get PeGTlistExtended(){return bw},get PeGTlistExtendedEntry(){return YS},get PeLineType(){return XS},get PeMath(){return QS},get PeNotationDms(){return KS},get PeNotationMgrs(){return _w},get PeNotationUsng(){return e4},get PeNotationUtm(){return vw},get PePCSInfo(){return Sw},get PeVersion(){return t4},_init:HI,get _pe(){return P},isLoaded:GI,isSupported:Eq,load:BI},Symbol.toStringTag,{value:"Module"}))});var mc,YI=L(()=>{(function(e){e[e.CGCS2000=4490]="CGCS2000",e[e.GCSMARS2000=104971]="GCSMARS2000",e[e.GCSMARS2000_SPHERE=104905]="GCSMARS2000_SPHERE",e[e.GCSMOON2000=104903]="GCSMOON2000"})(mc||(mc={}))});var l,v,r4=L(()=>{v={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.1168,20.116756,5e4,15e4],units:["Meter","Foot","Foot_US","Foot_Clarke","Yard_Clarke","Link_Clarke","Yard_Sears","Foot_Sears","Chain_Sears","Chain_Benoit_1895_B","Yard_Indian","Yard_Indian_1937","Foot_Gold_Coast","Chain","Chain_Sears_1922_Truncated","50_Kilometers","150_Kilometers"],2066:5,2136:12,2155:2,2157:0,2158:0,2159:12,2160:12,2204:2,2219:0,2220:0,2254:2,2255:2,2256:1,2265:1,2266:1,2267:2,2268:2,2269:1,2270:1,2271:2,2272:2,2273:1,2294:0,2295:0,2314:3,2899:2,2900:2,2901:1,2909:1,2910:1,2911:2,2912:2,2913:1,2914:1,2992:1,2993:0,2994:1,3080:1,3089:2,3090:0,3091:2,3102:2,3141:0,3142:0,3167:14,3359:2,3360:0,3361:1,3362:0,3363:2,3364:0,3365:2,3366:3,3404:2,3405:0,3406:0,3407:3,3439:0,3440:0,3479:1,3480:0,3481:1,3482:0,3483:1,3484:0,3485:2,3486:0,3487:2,3488:0,3489:0,3490:2,3491:0,3492:2,3493:0,3494:2,3495:0,3496:2,3497:0,3498:2,3499:0,3500:2,3501:0,3502:2,3503:0,3504:2,3505:0,3506:2,3507:0,3508:2,3509:0,3510:2,3511:0,3512:2,3513:0,3514:0,3515:2,3516:0,3517:2,3518:0,3519:2,3520:0,3521:2,3522:0,3523:2,3524:0,3525:2,3526:0,3527:2,3528:0,3529:2,3530:0,3531:2,3532:0,3533:2,3534:0,3535:2,3536:0,3537:2,3538:0,3539:2,3540:0,3541:2,3542:0,3543:2,3544:0,3545:2,3546:0,3547:2,3548:0,3549:2,3550:0,3551:2,3552:0,3553:2,3582:2,3583:0,3584:2,3585:0,3586:2,3587:0,3588:1,3589:0,3590:1,3591:0,3592:0,3593:1,3598:2,3599:0,3600:2,3605:1,3606:0,3607:0,3608:2,3609:0,3610:2,3611:0,3612:2,3613:0,3614:2,3615:0,3616:2,3617:0,3618:2,3619:0,3620:2,3621:0,3622:2,3623:0,3624:2,3625:0,3626:2,3627:0,3628:2,3629:0,3630:2,3631:0,3632:2,3633:0,3634:1,3635:0,3636:1,3640:2,3641:0,3642:2,3643:0,3644:1,3645:0,3646:1,3647:0,3648:1,3649:0,3650:2,3651:0,3652:2,3653:0,3654:2,3655:0,3656:1,3657:0,3658:2,3659:0,3660:2,3661:0,3662:2,3663:0,3664:2,3668:2,3669:0,3670:2,3671:0,3672:2,3673:0,3674:2,3675:0,3676:1,3677:2,3678:0,3679:1,3680:2,3681:0,3682:1,3683:2,3684:0,3685:0,3686:2,3687:0,3688:2,3689:0,3690:2,3691:0,3692:2,3696:2,3697:0,3698:2,3699:0,3700:2,3793:0,3794:0,3812:0,3854:0,3857:0,3920:0,3978:0,3979:0,3991:2,3992:2,4026:0,4037:0,4038:0,4071:0,4082:0,4083:0,4087:0,4088:0,4217:2,4414:0,4415:0,4417:0,4434:0,4437:0,4438:2,4439:2,4462:0,4467:0,4471:0,4474:0,4559:0,4647:0,4822:0,4826:0,4839:0,5018:0,5041:0,5042:0,5048:0,5221:0,5223:0,5234:0,5235:0,5243:0,5247:0,5266:0,5316:0,5320:0,5321:0,5325:0,5337:0,5361:0,5362:0,5367:0,5382:0,5383:0,5396:0,5456:0,5457:0,5469:0,5472:4,5490:0,5513:0,5514:0,5523:0,5559:0,5588:1,5589:3,5596:0,5627:0,5629:0,5641:0,5643:0,5644:0,5646:2,5654:2,5655:2,5659:0,5700:0,5825:0,5836:0,5837:0,5839:0,5842:0,5844:0,5858:0,5879:0,5880:0,5887:0,5890:0,6128:1,6129:1,6141:1,6204:0,6210:0,6211:0,6307:0,6312:0,6316:0,6362:0,6391:1,6405:1,6406:0,6407:1,6408:0,6409:1,6410:0,6411:2,6412:0,6413:2,6414:0,6415:0,6416:2,6417:0,6418:2,6419:0,6420:2,6421:0,6422:2,6423:0,6424:2,6425:0,6426:2,6427:0,6428:2,6429:0,6430:2,6431:0,6432:2,6433:0,6434:2,6435:0,6436:2,6437:0,6438:2,6439:0,6440:0,6441:2,6442:0,6443:2,6444:0,6445:2,6446:0,6447:2,6448:0,6449:2,6450:0,6451:2,6452:0,6453:2,6454:0,6455:2,6456:0,6457:2,6458:0,6459:2,6460:0,6461:2,6462:0,6463:2,6464:0,6465:2,6466:0,6467:2,6468:0,6469:2,6470:0,6471:2,6472:0,6473:2,6474:0,6475:2,6476:0,6477:2,6478:0,6479:2,6484:2,6485:0,6486:2,6487:0,6488:2,6489:0,6490:2,6491:0,6492:2,6493:0,6494:1,6495:0,6496:1,6497:0,6498:0,6499:1,6500:0,6501:2,6502:0,6503:2,6504:0,6505:2,6506:0,6507:2,6508:0,6509:0,6510:2,6515:1,6516:0,6518:0,6519:2,6520:0,6521:2,6522:0,6523:2,6524:0,6525:2,6526:0,6527:2,6528:0,6529:2,6530:0,6531:2,6532:0,6533:2,6534:0,6535:2,6536:0,6537:2,6538:0,6539:2,6540:0,6541:2,6542:0,6543:2,6544:0,6545:1,6546:0,6547:1,6548:0,6549:2,6550:0,6551:2,6552:0,6553:2,6554:0,6555:2,6556:0,6557:1,6558:0,6559:1,6560:0,6561:1,6562:0,6563:2,6564:0,6565:2,6566:0,6567:0,6568:2,6569:0,6570:1,6571:0,6572:2,6573:0,6574:2,6575:0,6576:2,6577:0,6578:2,6582:2,6583:0,6584:2,6585:0,6586:2,6587:0,6588:2,6589:0,6590:2,6591:0,6592:0,6593:2,6594:0,6595:2,6596:0,6597:2,6598:0,6599:2,6600:0,6601:2,6602:0,6603:2,6605:2,6606:0,6607:2,6608:0,6609:2,6610:0,6611:0,6612:2,6613:0,6614:2,6615:0,6616:2,6617:0,6618:2,6633:2,6646:0,6703:0,6784:0,6785:1,6786:0,6787:1,6788:0,6789:1,6790:0,6791:1,6792:0,6793:1,6794:0,6795:1,6796:0,6797:1,6798:0,6799:1,6800:0,6801:1,6802:0,6803:1,6804:0,6805:1,6806:0,6807:1,6808:0,6809:1,6810:0,6811:1,6812:0,6813:1,6814:0,6815:1,6816:0,6817:1,6818:0,6819:1,6820:0,6821:1,6822:0,6823:1,6824:0,6825:1,6826:0,6827:1,6828:0,6829:1,6830:0,6831:1,6832:0,6833:1,6834:0,6835:1,6836:0,6837:1,6838:0,6839:1,6840:0,6841:1,6842:0,6843:1,6844:0,6845:1,6846:0,6847:1,6848:0,6849:1,6850:0,6851:1,6852:0,6853:1,6854:0,6855:1,6856:0,6857:1,6858:0,6859:1,6860:0,6861:1,6862:0,6863:1,6867:0,6868:1,6870:0,6875:0,6876:0,6879:0,6880:2,6884:0,6885:1,6886:0,6887:1,6915:0,6922:0,6923:2,6924:0,6925:2,6962:0,6984:0,6991:0,7128:2,7131:0,7132:2,7142:0,7257:0,7258:2,7259:0,7260:2,7261:0,7262:2,7263:0,7264:2,7265:0,7266:2,7267:0,7268:2,7269:0,7270:2,7271:0,7272:2,7273:0,7274:2,7275:0,7276:2,7277:0,7278:2,7279:0,7280:2,7281:0,7282:2,7283:0,7284:2,7285:0,7286:2,7287:0,7288:2,7289:0,7290:2,7291:0,7292:2,7293:0,7294:2,7295:0,7296:2,7297:0,7298:2,7299:0,7300:2,7301:0,7302:2,7303:0,7304:2,7305:0,7306:2,7307:0,7308:2,7309:0,7310:2,7311:0,7312:2,7313:0,7314:2,7315:0,7316:2,7317:0,7318:2,7319:0,7320:2,7321:0,7322:2,7323:0,7324:2,7325:0,7326:2,7327:0,7328:2,7329:0,7330:2,7331:0,7332:2,7333:0,7334:2,7335:0,7336:2,7337:0,7338:2,7339:0,7340:2,7341:0,7342:2,7343:0,7344:2,7345:0,7346:2,7347:0,7348:2,7349:0,7350:2,7351:0,7352:2,7353:0,7354:2,7355:0,7356:2,7357:0,7358:2,7359:0,7360:2,7361:0,7362:2,7363:0,7364:2,7365:0,7366:2,7367:0,7368:2,7369:0,7370:2,7877:0,7878:0,7882:0,7883:0,7887:0,7899:0,7991:0,7992:0,8035:2,8036:2,8058:0,8059:0,8082:0,8083:0,8088:0,8090:0,8091:2,8092:0,8093:2,8095:0,8096:2,8097:0,8098:2,8099:0,8100:2,8101:0,8102:2,8103:0,8104:2,8105:0,8106:2,8107:0,8108:2,8109:0,8110:2,8111:0,8112:2,8113:0,8114:2,8115:0,8116:2,8117:0,8118:2,8119:0,8120:2,8121:0,8122:2,8123:0,8124:2,8125:0,8126:2,8127:0,8128:2,8129:0,8130:2,8131:0,8132:2,8133:0,8134:2,8135:0,8136:2,8137:0,8138:2,8139:0,8140:2,8141:0,8142:2,8143:0,8144:2,8145:0,8146:2,8147:0,8148:2,8149:0,8150:2,8151:0,8152:2,8153:0,8154:2,8155:0,8156:2,8157:0,8158:2,8159:0,8160:2,8161:0,8162:2,8163:0,8164:2,8165:0,8166:2,8167:0,8168:2,8169:0,8170:2,8171:0,8172:2,8173:0,8177:2,8179:0,8180:2,8181:0,8182:2,8184:0,8185:2,8187:0,8189:2,8191:0,8193:2,8196:0,8197:2,8198:0,8200:2,8201:0,8202:2,8203:0,8204:2,8205:0,8206:2,8207:0,8208:2,8209:0,8210:2,8212:0,8213:2,8214:0,8216:2,8218:0,8220:2,8222:0,8224:2,8225:0,8226:2,8311:0,8312:1,8313:0,8314:1,8315:0,8316:1,8317:0,8318:1,8319:0,8320:1,8321:0,8322:1,8323:0,8324:1,8325:0,8326:1,8327:0,8328:1,8329:0,8330:1,8331:0,8332:1,8333:0,8334:1,8335:0,8336:1,8337:0,8338:1,8339:0,8340:1,8341:0,8342:1,8343:0,8344:1,8345:0,8346:1,8347:0,8348:1,8352:0,8353:0,8379:0,8380:2,8381:0,8382:2,8383:0,8384:2,8385:0,8387:2,8391:0,8395:0,8433:0,8441:0,8455:0,8456:0,8531:2,8682:0,8686:0,8687:0,8692:0,8693:0,8826:0,8903:0,8950:0,8951:0,9039:0,9040:0,9141:0,9149:0,9150:0,9191:0,9221:0,9222:0,9249:0,9250:0,9252:0,9254:0,9265:0,9284:0,9285:0,9300:0,9354:0,9367:0,9373:0,9377:0,9387:0,9391:0,9456:0,9473:0,9498:0,9674:0,9678:0,9680:0,9709:0,9712:0,9713:0,9716:0,9741:0,9748:2,9749:2,9761:0,9766:0,9793:0,9794:0,9869:0,9874:0,9875:0,9880:0,9895:0,9943:0,9945:0,9947:0,9967:0,9972:0,9977:0,10160:0,10183:0,10188:0,10194:0,10199:0,10207:0,10212:0,10217:0,10222:0,10227:0,10235:0,10240:0,10250:0,10254:0,10270:0,10275:0,10280:0,10306:0,10329:0,10471:0,10477:0,10481:2,10516:2,20002:0,20042:0,20050:1,20499:0,20538:0,20539:0,20790:0,20791:0,21291:0,21292:0,21500:0,21817:0,21818:0,22032:0,22033:0,22091:0,22092:0,22239:0,22240:0,22332:0,22337:0,22338:0,22391:0,22392:0,22639:0,22700:0,22739:0,22770:0,22780:0,22832:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,24047:0,24048:0,24100:3,24200:0,24305:0,24306:0,24382:10,24383:0,24500:0,24547:0,24548:0,24571:9,24600:0,25e3:0,25231:0,25884:0,25932:0,26237:0,26331:0,26332:0,26432:0,26591:0,26592:0,26632:0,26692:0,27120:0,27200:0,27291:6,27292:6,27429:0,27492:0,27493:0,27500:0,28232:0,28600:0,28991:0,28992:0,29100:0,29101:0,29220:0,29221:0,29333:0,29635:0,29636:0,29701:0,29738:0,29739:0,29849:0,29850:0,29871:8,29872:7,29873:0,29874:0,30200:5,30339:0,30340:0,30591:0,30592:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,31171:0,31370:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31900:0,31901:0,32061:0,32062:0,32098:0,32099:2,32100:0,32104:0,32161:0,32766:0,53048:0,53049:0,54090:0,54091:0,65061:2,65062:2,65161:0,65163:0,102041:2,102064:11,102068:15,102069:16,102118:2,102119:1,102120:2,102121:2,102217:2,102218:0,102219:2,102220:2,102378:1,102379:1,102380:0,102381:1,102589:2,102599:2,102600:2,102604:2,102647:0,102704:2,102705:2,102706:0,102731:0,102732:0,102759:1,102760:1,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102970:1,102974:2,102993:0,102994:0,102995:2,102996:2,103015:0,103016:2,103017:0,103018:2,103025:0,103026:0,103027:2,103028:2,103035:0,103036:0,103037:2,103038:2,103039:0,103040:0,103041:2,103042:2,103043:0,103044:0,103045:2,103046:2,103047:0,103048:0,103049:2,103050:2,103051:0,103052:2,103053:0,103054:2,103055:0,103056:2,103057:0,103058:0,103059:2,103060:2,103061:0,103062:0,103063:2,103064:2,103069:2,103070:0,103071:0,103072:2,103073:2,103086:0,103087:0,103088:2,103089:2,103094:1,103095:0,103096:2,103103:0,103104:2,103105:0,103106:2,103121:0,103122:2,103123:0,103124:0,103125:1,103126:1,103127:0,103128:0,103129:2,103130:2,103131:0,103132:0,103133:2,103134:2,103135:0,103136:0,103137:1,103138:1,103139:0,103140:2,103141:0,103142:2,103143:0,103144:2,103145:0,103146:1,103147:0,103148:0,103149:2,103150:2,103151:0,103152:2,103172:0,103173:2,103174:0,103175:0,103176:2,103177:2,103178:0,103179:0,103180:2,103181:2,103182:0,103183:0,103184:2,103185:2,103228:0,103229:0,103230:2,103231:2,103250:0,103251:2,103252:0,103253:2,103260:0,103261:0,103262:2,103263:2,103270:0,103271:0,103272:2,103273:2,103274:0,103275:0,103276:2,103277:2,103278:0,103279:0,103280:2,103281:2,103282:0,103283:0,103284:2,103285:2,103286:0,103287:2,103288:0,103289:2,103290:0,103291:2,103292:0,103293:0,103294:2,103295:2,103296:0,103297:0,103298:2,103299:2,103376:2,103377:0,103378:0,103379:2,103380:2,103393:0,103394:0,103395:2,103396:2,103472:0,103473:1,103474:0,103475:2,103482:0,103483:2,103484:0,103485:2,103500:0,103501:2,103502:0,103503:0,103504:1,103505:1,103506:0,103507:0,103508:2,103509:2,103510:0,103511:0,103512:2,103513:2,103514:0,103515:2,103516:0,103517:2,103518:0,103519:2,103520:0,103521:1,103522:0,103523:0,103524:2,103525:2,103526:0,103527:2,103561:2,103562:2,103563:0,103564:0,103565:2,103566:2,103567:0,103568:0,103569:2,103570:2,103584:0,103585:2,103586:0,103587:2,103588:1,103589:0,103590:2,103591:1,103592:0,103593:2,103594:1,103695:2,103897:1};for(l=2e3;l<=2045;l++)v[l]=0;for(l=2056;l<=2065;l++)v[l]=0;for(l=2067;l<=2135;l++)v[l]=0;for(l=2137;l<=2154;l++)v[l]=0;for(l=2161;l<=2170;l++)v[l]=0;for(l=2172;l<=2193;l++)v[l]=0;for(l=2195;l<=2198;l++)v[l]=0;for(l=2200;l<=2203;l++)v[l]=0;for(l=2205;l<=2217;l++)v[l]=0;for(l=2222;l<=2224;l++)v[l]=1;for(l=2225;l<=2250;l++)v[l]=2;for(l=2251;l<=2253;l++)v[l]=1;for(l=2257;l<=2264;l++)v[l]=2;for(l=2274;l<=2279;l++)v[l]=2;for(l=2280;l<=2282;l++)v[l]=1;for(l=2283;l<=2289;l++)v[l]=2;for(l=2290;l<=2292;l++)v[l]=0;for(l=2308;l<=2313;l++)v[l]=0;for(l=2315;l<=2491;l++)v[l]=0;for(l=2494;l<=2866;l++)v[l]=0;for(l=2867;l<=2869;l++)v[l]=1;for(l=2870;l<=2888;l++)v[l]=2;for(l=2891;l<=2895;l++)v[l]=2;for(l=2896;l<=2898;l++)v[l]=1;for(l=2902;l<=2908;l++)v[l]=2;for(l=2915;l<=2920;l++)v[l]=2;for(l=2921;l<=2923;l++)v[l]=1;for(l=2924;l<=2930;l++)v[l]=2;for(l=2931;l<=2962;l++)v[l]=0;for(l=2964;l<=2968;l++)v[l]=2;for(l=2969;l<=2973;l++)v[l]=0;for(l=2975;l<=2991;l++)v[l]=0;for(l=2995;l<=3051;l++)v[l]=0;for(l=3054;l<=3079;l++)v[l]=0;for(l=3081;l<=3088;l++)v[l]=0;for(l=3092;l<=3101;l++)v[l]=0;for(l=3106;l<=3138;l++)v[l]=0;for(l=3146;l<=3151;l++)v[l]=0;for(l=3153;l<=3166;l++)v[l]=0;for(l=3168;l<=3172;l++)v[l]=0;for(l=3174;l<=3203;l++)v[l]=0;for(l=3294;l<=3358;l++)v[l]=0;for(l=3367;l<=3403;l++)v[l]=0;for(l=3408;l<=3416;l++)v[l]=0;for(l=3417;l<=3438;l++)v[l]=2;for(l=3441;l<=3446;l++)v[l]=2;for(l=3447;l<=3450;l++)v[l]=0;for(l=3451;l<=3459;l++)v[l]=2;for(l=3460;l<=3478;l++)v[l]=0;for(l=3554;l<=3559;l++)v[l]=0;for(l=3560;l<=3570;l++)v[l]=2;for(l=3571;l<=3581;l++)v[l]=0;for(l=3594;l<=3597;l++)v[l]=0;for(l=3601;l<=3604;l++)v[l]=0;for(l=3637;l<=3639;l++)v[l]=0;for(l=3665;l<=3667;l++)v[l]=0;for(l=3693;l<=3695;l++)v[l]=0;for(l=3701;l<=3727;l++)v[l]=0;for(l=3728;l<=3739;l++)v[l]=2;for(l=3740;l<=3751;l++)v[l]=0;for(l=3753;l<=3760;l++)v[l]=2;for(l=3761;l<=3773;l++)v[l]=0;for(l=3775;l<=3777;l++)v[l]=0;for(l=3779;l<=3781;l++)v[l]=0;for(l=3783;l<=3785;l++)v[l]=0;for(l=3788;l<=3791;l++)v[l]=0;for(l=3797;l<=3802;l++)v[l]=0;for(l=3814;l<=3816;l++)v[l]=0;for(l=3825;l<=3829;l++)v[l]=0;for(l=3832;l<=3841;l++)v[l]=0;for(l=3844;l<=3852;l++)v[l]=0;for(l=3873;l<=3885;l++)v[l]=0;for(l=3890;l<=3893;l++)v[l]=0;for(l=3907;l<=3912;l++)v[l]=0;for(l=3942;l<=3950;l++)v[l]=0;for(l=3968;l<=3970;l++)v[l]=0;for(l=3973;l<=3976;l++)v[l]=0;for(l=3986;l<=3989;l++)v[l]=0;for(l=3994;l<=3997;l++)v[l]=0;for(l=4048;l<=4051;l++)v[l]=0;for(l=4056;l<=4063;l++)v[l]=0;for(l=4093;l<=4096;l++)v[l]=0;for(l=4390;l<=4398;l++)v[l]=0;for(l=4399;l<=4413;l++)v[l]=2;for(l=4418;l<=4433;l++)v[l]=2;for(l=4455;l<=4457;l++)v[l]=2;for(l=4484;l<=4489;l++)v[l]=0;for(l=4491;l<=4554;l++)v[l]=0;for(l=4568;l<=4589;l++)v[l]=0;for(l=4652;l<=4656;l++)v[l]=0;for(l=4766;l<=4800;l++)v[l]=0;for(l=5014;l<=5016;l++)v[l]=0;for(l=5069;l<=5072;l++)v[l]=0;for(l=5105;l<=5130;l++)v[l]=0;for(l=5167;l<=5188;l++)v[l]=0;for(l=5253;l<=5259;l++)v[l]=0;for(l=5269;l<=5275;l++)v[l]=0;for(l=5292;l<=5311;l++)v[l]=0;for(l=5329;l<=5331;l++)v[l]=0;for(l=5343;l<=5349;l++)v[l]=0;for(l=5355;l<=5357;l++)v[l]=0;for(l=5387;l<=5389;l++)v[l]=0;for(l=5459;l<=5463;l++)v[l]=0;for(l=5479;l<=5482;l++)v[l]=0;for(l=5518;l<=5520;l++)v[l]=0;for(l=5530;l<=5539;l++)v[l]=0;for(l=5550;l<=5552;l++)v[l]=0;for(l=5562;l<=5583;l++)v[l]=0;for(l=5623;l<=5625;l++)v[l]=2;for(l=5631;l<=5639;l++)v[l]=0;for(l=5649;l<=5653;l++)v[l]=0;for(l=5663;l<=5680;l++)v[l]=0;for(l=5682;l<=5685;l++)v[l]=0;for(l=5875;l<=5877;l++)v[l]=0;for(l=5896;l<=5899;l++)v[l]=0;for(l=5921;l<=5940;l++)v[l]=0;for(l=6050;l<=6125;l++)v[l]=0;for(l=6244;l<=6275;l++)v[l]=0;for(l=6328;l<=6348;l++)v[l]=0;for(l=6350;l<=6356;l++)v[l]=0;for(l=6366;l<=6372;l++)v[l]=0;for(l=6381;l<=6387;l++)v[l]=0;for(l=6393;l<=6404;l++)v[l]=0;for(l=6480;l<=6483;l++)v[l]=0;for(l=6511;l<=6514;l++)v[l]=0;for(l=6579;l<=6581;l++)v[l]=0;for(l=6619;l<=6624;l++)v[l]=0;for(l=6625;l<=6627;l++)v[l]=2;for(l=6628;l<=6632;l++)v[l]=0;for(l=6634;l<=6637;l++)v[l]=0;for(l=6669;l<=6692;l++)v[l]=0;for(l=6707;l<=6709;l++)v[l]=0;for(l=6720;l<=6723;l++)v[l]=0;for(l=6732;l<=6738;l++)v[l]=0;for(l=6931;l<=6933;l++)v[l]=0;for(l=6956;l<=6959;l++)v[l]=0;for(l=7005;l<=7007;l++)v[l]=0;for(l=7057;l<=7070;l++)v[l]=2;for(l=7074;l<=7082;l++)v[l]=0;for(l=7109;l<=7118;l++)v[l]=0;for(l=7119;l<=7127;l++)v[l]=1;for(l=7374;l<=7376;l++)v[l]=0;for(l=7528;l<=7586;l++)v[l]=0;for(l=7587;l<=7645;l++)v[l]=2;for(l=7692;l<=7696;l++)v[l]=0;for(l=7755;l<=7787;l++)v[l]=0;for(l=7791;l<=7795;l++)v[l]=0;for(l=7799;l<=7801;l++)v[l]=0;for(l=7803;l<=7805;l++)v[l]=0;for(l=7825;l<=7831;l++)v[l]=0;for(l=7845;l<=7859;l++)v[l]=0;for(l=8013;l<=8032;l++)v[l]=0;for(l=8065;l<=8068;l++)v[l]=1;for(l=8518;l<=8529;l++)v[l]=2;for(l=8533;l<=8536;l++)v[l]=2;for(l=8538;l<=8540;l++)v[l]=2;for(l=8677;l<=8679;l++)v[l]=0;for(l=8836;l<=8840;l++)v[l]=0;for(l=8857;l<=8859;l++)v[l]=0;for(l=8908;l<=8910;l++)v[l]=0;for(l=9154;l<=9159;l++)v[l]=0;for(l=9205;l<=9218;l++)v[l]=0;for(l=9271;l<=9273;l++)v[l]=0;for(l=9295;l<=9297;l++)v[l]=0;for(l=9356;l<=9360;l++)v[l]=0;for(l=9404;l<=9407;l++)v[l]=0;for(l=9476;l<=9482;l++)v[l]=0;for(l=9487;l<=9494;l++)v[l]=0;for(l=9697;l<=9699;l++)v[l]=0;for(l=9821;l<=9865;l++)v[l]=0;for(l=10285;l<=10291;l++)v[l]=0;for(l=10314;l<=10317;l++)v[l]=0;for(l=10448;l<=10465;l++)v[l]=0;for(l=10731;l<=10733;l++)v[l]=0;for(l=11114;l<=11118;l++)v[l]=0;for(l=20004;l<=20032;l++)v[l]=0;for(l=20047;l<=20049;l++)v[l]=0;for(l=20062;l<=20092;l++)v[l]=0;for(l=20135;l<=20138;l++)v[l]=0;for(l=20248;l<=20258;l++)v[l]=0;for(l=20348;l<=20358;l++)v[l]=0;for(l=20436;l<=20440;l++)v[l]=0;for(l=20822;l<=20824;l++)v[l]=0;for(l=20904;l<=20932;l++)v[l]=0;for(l=20934;l<=20936;l++)v[l]=0;for(l=21004;l<=21032;l++)v[l]=0;for(l=21035;l<=21037;l++)v[l]=0;for(l=21095;l<=21097;l++)v[l]=0;for(l=21148;l<=21150;l++)v[l]=0;for(l=21207;l<=21264;l++)v[l]=0;for(l=21307;l<=21364;l++)v[l]=0;for(l=21413;l<=21423;l++)v[l]=0;for(l=21453;l<=21463;l++)v[l]=0;for(l=21473;l<=21483;l++)v[l]=0;for(l=21780;l<=21782;l++)v[l]=0;for(l=21891;l<=21894;l++)v[l]=0;for(l=21896;l<=21899;l++)v[l]=0;for(l=22171;l<=22177;l++)v[l]=0;for(l=22181;l<=22187;l++)v[l]=0;for(l=22191;l<=22197;l++)v[l]=0;for(l=22207;l<=22222;l++)v[l]=0;for(l=22229;l<=22232;l++)v[l]=0;for(l=22234;l<=22236;l++)v[l]=0;for(l=22243;l<=22250;l++)v[l]=0;for(l=22262;l<=22265;l++)v[l]=0;for(l=22307;l<=22322;l++)v[l]=0;for(l=22348;l<=22357;l++)v[l]=0;for(l=22407;l<=22422;l++)v[l]=0;for(l=22462;l<=22465;l++)v[l]=0;for(l=22521;l<=22525;l++)v[l]=0;for(l=22607;l<=22622;l++)v[l]=0;for(l=22641;l<=22646;l++)v[l]=0;for(l=22648;l<=22657;l++)v[l]=0;for(l=22707;l<=22722;l++)v[l]=0;for(l=22762;l<=22765;l++)v[l]=0;for(l=22807;l<=22822;l++)v[l]=0;for(l=22991;l<=22994;l++)v[l]=0;for(l=23028;l<=23038;l++)v[l]=0;for(l=23301;l<=23333;l++)v[l]=2;for(l=23830;l<=23853;l++)v[l]=0;for(l=23866;l<=23872;l++)v[l]=0;for(l=23877;l<=23884;l++)v[l]=0;for(l=23886;l<=23894;l++)v[l]=0;for(l=23946;l<=23948;l++)v[l]=0;for(l=24311;l<=24313;l++)v[l]=0;for(l=24342;l<=24347;l++)v[l]=0;for(l=24370;l<=24374;l++)v[l]=10;for(l=24375;l<=24381;l++)v[l]=0;for(l=24718;l<=24721;l++)v[l]=0;for(l=24817;l<=24821;l++)v[l]=0;for(l=24877;l<=24882;l++)v[l]=0;for(l=24891;l<=24893;l++)v[l]=0;for(l=25391;l<=25395;l++)v[l]=0;for(l=25828;l<=25838;l++)v[l]=0;for(l=26191;l<=26195;l++)v[l]=0;for(l=26391;l<=26393;l++)v[l]=0;for(l=26701;l<=26722;l++)v[l]=0;for(l=26729;l<=26799;l++)v[l]=2;for(l=26801;l<=26803;l++)v[l]=2;for(l=26811;l<=26813;l++)v[l]=2;for(l=26847;l<=26870;l++)v[l]=2;for(l=26891;l<=26899;l++)v[l]=0;for(l=26901;l<=26923;l++)v[l]=0;for(l=26929;l<=26946;l++)v[l]=0;for(l=26948;l<=26998;l++)v[l]=0;for(l=27037;l<=27040;l++)v[l]=0;for(l=27205;l<=27232;l++)v[l]=0;for(l=27258;l<=27260;l++)v[l]=0;for(l=27391;l<=27398;l++)v[l]=0;for(l=27561;l<=27564;l++)v[l]=0;for(l=27571;l<=27574;l++)v[l]=0;for(l=27581;l<=27584;l++)v[l]=0;for(l=27591;l<=27594;l++)v[l]=0;for(l=27700;l<=27707;l++)v[l]=0;for(l=28191;l<=28193;l++)v[l]=0;for(l=28348;l<=28358;l++)v[l]=0;for(l=28402;l<=28432;l++)v[l]=0;for(l=28462;l<=28492;l++)v[l]=0;for(l=29118;l<=29122;l++)v[l]=0;for(l=29168;l<=29172;l++)v[l]=0;for(l=29177;l<=29185;l++)v[l]=0;for(l=29187;l<=29195;l++)v[l]=0;for(l=29900;l<=29903;l++)v[l]=0;for(l=30161;l<=30179;l++)v[l]=0;for(l=30491;l<=30494;l++)v[l]=0;for(l=30729;l<=30732;l++)v[l]=0;for(l=31251;l<=31259;l++)v[l]=0;for(l=31265;l<=31268;l++)v[l]=0;for(l=31275;l<=31279;l++)v[l]=0;for(l=31281;l<=31297;l++)v[l]=0;for(l=31461;l<=31469;l++)v[l]=0;for(l=31491;l<=31495;l++)v[l]=0;for(l=31917;l<=31922;l++)v[l]=0;for(l=31965;l<=32e3;l++)v[l]=0;for(l=32001;l<=32003;l++)v[l]=2;for(l=32005;l<=32031;l++)v[l]=2;for(l=32033;l<=32060;l++)v[l]=2;for(l=32064;l<=32067;l++)v[l]=2;for(l=32074;l<=32077;l++)v[l]=2;for(l=32081;l<=32086;l++)v[l]=0;for(l=32107;l<=32130;l++)v[l]=0;for(l=32133;l<=32159;l++)v[l]=0;for(l=32164;l<=32167;l++)v[l]=2;for(l=32180;l<=32199;l++)v[l]=0;for(l=32201;l<=32260;l++)v[l]=0;for(l=32301;l<=32360;l++)v[l]=0;for(l=32401;l<=32460;l++)v[l]=0;for(l=32501;l<=32560;l++)v[l]=0;for(l=32601;l<=32662;l++)v[l]=0;for(l=32664;l<=32667;l++)v[l]=2;for(l=32701;l<=32761;l++)v[l]=0;for(l=53001;l<=53004;l++)v[l]=0;for(l=53008;l<=53019;l++)v[l]=0;for(l=53021;l<=53032;l++)v[l]=0;for(l=53034;l<=53037;l++)v[l]=0;for(l=53042;l<=53046;l++)v[l]=0;for(l=53074;l<=53080;l++)v[l]=0;for(l=54001;l<=54004;l++)v[l]=0;for(l=54008;l<=54019;l++)v[l]=0;for(l=54021;l<=54032;l++)v[l]=0;for(l=54034;l<=54037;l++)v[l]=0;for(l=54042;l<=54046;l++)v[l]=0;for(l=54048;l<=54053;l++)v[l]=0;for(l=54074;l<=54080;l++)v[l]=0;for(l=54098;l<=54101;l++)v[l]=0;for(l=102001;l<=102040;l++)v[l]=0;for(l=102042;l<=102063;l++)v[l]=0;for(l=102065;l<=102067;l++)v[l]=0;for(l=102070;l<=102117;l++)v[l]=0;for(l=102122;l<=102216;l++)v[l]=0;for(l=102221;l<=102377;l++)v[l]=0;for(l=102382;l<=102388;l++)v[l]=0;for(l=102389;l<=102398;l++)v[l]=2;for(l=102399;l<=102444;l++)v[l]=0;for(l=102445;l<=102447;l++)v[l]=2;for(l=102448;l<=102458;l++)v[l]=0;for(l=102459;l<=102468;l++)v[l]=2;for(l=102469;l<=102499;l++)v[l]=0;for(l=102500;l<=102519;l++)v[l]=1;for(l=102520;l<=102524;l++)v[l]=0;for(l=102525;l<=102529;l++)v[l]=2;for(l=102530;l<=102588;l++)v[l]=0;for(l=102590;l<=102598;l++)v[l]=0;for(l=102601;l<=102603;l++)v[l]=0;for(l=102605;l<=102628;l++)v[l]=0;for(l=102629;l<=102646;l++)v[l]=2;for(l=102648;l<=102700;l++)v[l]=2;for(l=102701;l<=102703;l++)v[l]=0;for(l=102707;l<=102730;l++)v[l]=2;for(l=102733;l<=102758;l++)v[l]=2;for(l=102767;l<=102900;l++)v[l]=0;for(l=102901;l<=102933;l++)v[l]=2;for(l=102934;l<=102950;l++)v[l]=13;for(l=102951;l<=102963;l++)v[l]=0;for(l=102965;l<=102969;l++)v[l]=0;for(l=102971;l<=102973;l++)v[l]=0;for(l=102975;l<=102989;l++)v[l]=0;for(l=102990;l<=102992;l++)v[l]=1;for(l=102997;l<=103002;l++)v[l]=0;for(l=103003;l<=103008;l++)v[l]=2;for(l=103009;l<=103011;l++)v[l]=0;for(l=103012;l<=103014;l++)v[l]=2;for(l=103019;l<=103021;l++)v[l]=0;for(l=103022;l<=103024;l++)v[l]=2;for(l=103029;l<=103031;l++)v[l]=0;for(l=103032;l<=103034;l++)v[l]=2;for(l=103065;l<=103068;l++)v[l]=0;for(l=103074;l<=103076;l++)v[l]=0;for(l=103077;l<=103079;l++)v[l]=1;for(l=103080;l<=103082;l++)v[l]=0;for(l=103083;l<=103085;l++)v[l]=2;for(l=103090;l<=103093;l++)v[l]=0;for(l=103097;l<=103099;l++)v[l]=0;for(l=103100;l<=103102;l++)v[l]=2;for(l=103107;l<=103109;l++)v[l]=0;for(l=103110;l<=103112;l++)v[l]=2;for(l=103113;l<=103116;l++)v[l]=0;for(l=103117;l<=103120;l++)v[l]=2;for(l=103153;l<=103157;l++)v[l]=0;for(l=103158;l<=103162;l++)v[l]=2;for(l=103163;l<=103165;l++)v[l]=0;for(l=103166;l<=103168;l++)v[l]=1;for(l=103169;l<=103171;l++)v[l]=2;for(l=103186;l<=103188;l++)v[l]=0;for(l=103189;l<=103191;l++)v[l]=2;for(l=103192;l<=103195;l++)v[l]=0;for(l=103196;l<=103199;l++)v[l]=2;for(l=103200;l<=103224;l++)v[l]=0;for(l=103225;l<=103227;l++)v[l]=1;for(l=103232;l<=103237;l++)v[l]=0;for(l=103238;l<=103243;l++)v[l]=2;for(l=103244;l<=103246;l++)v[l]=0;for(l=103247;l<=103249;l++)v[l]=2;for(l=103254;l<=103256;l++)v[l]=0;for(l=103257;l<=103259;l++)v[l]=2;for(l=103264;l<=103266;l++)v[l]=0;for(l=103267;l<=103269;l++)v[l]=2;for(l=103300;l<=103375;l++)v[l]=0;for(l=103381;l<=103383;l++)v[l]=0;for(l=103384;l<=103386;l++)v[l]=1;for(l=103387;l<=103389;l++)v[l]=0;for(l=103390;l<=103392;l++)v[l]=2;for(l=103397;l<=103399;l++)v[l]=0;for(l=103400;l<=103471;l++)v[l]=2;for(l=103476;l<=103478;l++)v[l]=0;for(l=103479;l<=103481;l++)v[l]=2;for(l=103486;l<=103488;l++)v[l]=0;for(l=103489;l<=103491;l++)v[l]=2;for(l=103492;l<=103495;l++)v[l]=0;for(l=103496;l<=103499;l++)v[l]=2;for(l=103528;l<=103543;l++)v[l]=0;for(l=103544;l<=103548;l++)v[l]=2;for(l=103549;l<=103551;l++)v[l]=0;for(l=103552;l<=103554;l++)v[l]=1;for(l=103555;l<=103557;l++)v[l]=2;for(l=103558;l<=103560;l++)v[l]=0;for(l=103571;l<=103573;l++)v[l]=0;for(l=103574;l<=103576;l++)v[l]=2;for(l=103577;l<=103580;l++)v[l]=0;for(l=103581;l<=103583;l++)v[l]=2;for(l=103595;l<=103694;l++)v[l]=0;for(l=103696;l<=103699;l++)v[l]=0;for(l=103700;l<=103793;l++)v[l]=2;for(l=103794;l<=103890;l++)v[l]=0;for(l=103891;l<=103896;l++)v[l]=2;for(l=103900;l<=103971;l++)v[l]=2;for(l=103972;l<=103977;l++)v[l]=0;for(l=112e3;l<=112101;l++)v[l]=0});function gs(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let r=e.wkid,n=t.wkid;if(r!=null||n!=null){if(r===n||Ri(e)&&Ri(t))return!0;let s=e.latestWkid;if(s!=null&&n===s)return!0;let a=t.latestWkid;return a!=null&&r===a}let i,o;return e.wkt2&&t.wkt2?(i=e.wkt2,o=t.wkt2):e.wkt&&t.wkt&&(i=e.wkt,o=t.wkt),!(!i||!o)&&i.toUpperCase()===o.toUpperCase()}function xa(e){let t=e?.wkid;return t!=null&&t>=2e3&&XI[t]||null}function tf(e){if(!KI(e))return!1;let{wkid:t}=e;if(t)return v[t]==null;let r=e.wkt2||e.wkt;return!!r&&/^\s*(?:GEOGCS|GEOGCRS|GEOGRAPHICCRS)/i.test(r)}function hc(e){return e?.wkid===4326}function Ri(e){let t=e?.wkid;return t!=null&&t>=2e3&&JI.includes(t)}function s4(e){return e===mc.GCSMARS2000||e===mc.GCSMARS2000_SPHERE}function a4(e){return e===mc.GCSMOON2000}function QI(e){let t=e?.wkid;return t!=null&&t>=2e3&&Lq.includes(t)}function KI(e){if(e==null)return!1;let t=e.wkid;return t!=null&&t>=2e3||e.wkt2!=null||e.wkt!=null}var JI,Mq,Lq,i4,o4,n4,XI,l4,c4,eP,oo=L(()=>{Io();ZI();YI();r4();JI=[102100,102113,3857,3785,900913],Mq=[104905,104971],Lq=[4326,...JI,...Mq],i4=[-20037508342788905e-9,20037508342788905e-9],o4=[-20037508342787e-6,20037508342787e-6],n4={wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',valid:i4,origin:o4,dx:1e-5},XI={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:i4,origin:o4,dx:1e-5},102100:n4,3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:i4,origin:o4,dx:1e-5},3857:n4,4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104971:{wkTemplate:'GEOGCS["Mars_2000_(Sphere)",DATUM["Mars_2000_(Sphere)",SPHEROID["Mars_2000_(Sphere)",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104905:{wkTemplate:'GEOGCS["GCS_Mars_2000",DATUM["D_Mars_2000",SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.8944472236118]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},900913:n4};l4={wkid:4326,wkt:gi(XI[4326].wkTemplate,{Central_Meridian:"0.0"})},c4={wkid:102100,latestWkid:3857},eP={wkid:32662}});function u4(e){return{wkt:`GEOCCS["Spherical geocentric",
114
+ )}:host{display:flex}:host([open]) .container{pointer-events:auto;display:flex;max-block-size:100%;align-items:center;border-width:2px;opacity:1;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0px;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0px;display:inline;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2);margin-inline-end:var(--calcite-notice-spacing-token-small)}.notice-content{box-sizing:border-box;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-small)}.notice-content:first-of-type:not(:only-child){padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto}.notice-close{display:flex;cursor:pointer;align-items:center;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-color-text-3);outline:2px solid transparent;outline-offset:2px;box-sizing:border-box;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;-webkit-appearance:none}.notice-close:hover,.notice-close:focus{background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-1)}.notice-close:active{background-color:var(--calcite-color-foreground-3)}.actions-end{display:flex;align-self:stretch}:host([kind=brand]) .container{border-color:var(--calcite-color-brand)}:host([kind=brand]) .container .notice-icon{color:var(--calcite-color-brand)}:host([kind=info]) .container{border-color:var(--calcite-color-status-info)}:host([kind=info]) .container .notice-icon{color:var(--calcite-color-status-info)}:host([kind=danger]) .container{border-color:var(--calcite-color-status-danger)}:host([kind=danger]) .container .notice-icon{color:var(--calcite-color-status-danger)}:host([kind=success]) .container{border-color:var(--calcite-color-status-success)}:host([kind=success]) .container .notice-icon{color:var(--calcite-color-status-success)}:host([kind=warning]) .container{border-color:var(--calcite-color-status-warning)}:host([kind=warning]) .container .notice-icon{color:var(--calcite-color-status-warning)}:host([hidden]){display:none}[hidden]{display:none}`,uq=cq,hI=Dt(class extends Rt{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.calciteNoticeBeforeClose=wr(this,"calciteNoticeBeforeClose",6),this.calciteNoticeBeforeOpen=wr(this,"calciteNoticeBeforeOpen",6),this.calciteNoticeClose=wr(this,"calciteNoticeClose",6),this.calciteNoticeOpen=wr(this,"calciteNoticeOpen",6),this.setTransitionEl=t=>{this.transitionEl=t},this.close=()=>{this.open=!1},this.openTransitionProp="opacity",this.open=!1,this.kind="brand",this.closable=!1,this.icon=void 0,this.iconFlipRtl=!1,this.scale="m",this.width="auto",this.messages=void 0,this.messageOverrides=void 0,this.effectiveLocale=void 0,this.defaultMessages=void 0}openHandler(){Xd(this)}onMessagesChange(){}updateRequestedIcon(){this.requestedIcon=no(FS,this.icon,this.kind)}connectedCallback(){ow(this),Mi(this),Ai(this)}disconnectedCallback(){sw(this),Li(this),Ni(this)}async componentWillLoad(){us(this),this.requestedIcon=no(FS,this.icon,this.kind),await Ii(this),this.open&&Xd(this)}componentDidLoad(){ds(this)}render(){let{el:t}=this,r=X("button",{key:"4de511d4d93ee2078a4ed0d5fee2397d4d433691","aria-label":this.messages.close,class:Kd.close,onClick:this.close,ref:i=>this.closeButton=i},X("calcite-icon",{key:"bb983d2377b1f8c20b9d23cb63f258b4b6a670d9",icon:"x",scale:Kr(this.scale)})),n=ro(t,Qd.actionsEnd);return X("div",{key:"d83f3161115f422c6a6bc8591a2763f0ab17dd83",class:Kd.container,ref:this.setTransitionEl},this.requestedIcon?X("div",{class:Kd.icon},X("calcite-icon",{flipRtl:this.iconFlipRtl,icon:this.requestedIcon,scale:Kr(this.scale)})):null,X("div",{key:"3851d512eaea58676aa7c3de513e4aedf4e644c9",class:Kd.content},X("slot",{key:"6393d41eb420b92fc94467c108fc5aa4ab6e941c",name:Qd.title}),X("slot",{key:"f750570f0675e9f3ef9f76ed8362e848e5c6311c",name:Qd.message}),X("slot",{key:"2c8ded4623c885d3b2d9897c7c402f96dffbc8d7",name:Qd.link})),n?X("div",{class:Kd.actionsEnd},X("slot",{name:Qd.actionsEnd})):null,this.closable?r:null)}async setFocus(){await fs(this);let t=this.el.querySelector("calcite-link");if(!(!this.closeButton&&!t)){if(t)return t.setFocus();this.closeButton&&this.closeButton.focus()}}onBeforeClose(){this.calciteNoticeBeforeClose.emit()}onBeforeOpen(){this.calciteNoticeBeforeOpen.emit()}onClose(){this.calciteNoticeClose.emit()}onOpen(){this.calciteNoticeOpen.emit()}effectiveLocaleChange(){Pi(this,this.effectiveLocale)}static get assetsDirs(){return["assets"]}get el(){return this}static get watchers(){return{open:["openHandler"],messageOverrides:["onMessagesChange"],icon:["updateRequestedIcon"],kind:["updateRequestedIcon"],effectiveLocale:["effectiveLocaleChange"]}}static get style(){return uq}},[1,"calcite-notice",{open:[1540],kind:[513],closable:[516],icon:[520],iconFlipRtl:[516,"icon-flip-rtl"],scale:[513],width:[513],messages:[1040],messageOverrides:[1040],effectiveLocale:[32],defaultMessages:[32],setFocus:[64]},void 0,{open:["openHandler"],messageOverrides:["onMessagesChange"],icon:["updateRequestedIcon"],kind:["updateRequestedIcon"],effectiveLocale:["effectiveLocaleChange"]}]);gI();dq=hI,fq=gI});var VS,US,pq,hn,WS,bI=L(()=>{nr();X0();ir();Be();Ze();To();Ht();xM();Kv();dg();CM();EM();LM();ev();VS="esri-identity-modal",US={base:VS,info:`${VS}__info`,notice:`${VS}__notice`},pq="ArcGIS Online",hn=class extends SM{constructor(e,t){super(e,t),this.container=document.createElement("div"),this.error=null,this.oAuthPrompt=!1,this.open=!1,this.signingIn=!1,this.server=null,this.resource=null,this._usernameInputNode=null,this._passwordInputNode=null,document.body.appendChild(this.container)}loadDependencies(){return hM({button:()=>Promise.resolve().then(()=>(NL(),AL)),input:()=>Promise.resolve().then(()=>(GL(),zL)),label:()=>Promise.resolve().then(()=>(jL(),qL)),modal:()=>Promise.resolve().then(()=>(pI(),fI)),notice:()=>Promise.resolve().then(()=>(yI(),wI))})}get title(){return this.commonMessages?.auth.signIn}render(){let{open:e,title:t,messages:r,signingIn:n,oAuthPrompt:i,server:o,resource:s,error:a}=this,{info:u,oAuthInfo:d,lblItem:p,invalidUser:m,noAuthService:w,lblUser:_,lblPwd:S,lblCancel:C,lblSigning:M,lblOk:k}=r;return Wr("div",{class:this.classes(US.base,MM())},Wr("form",{bind:this,onsubmit:this._submit},Wr("calcite-modal",{bind:this,open:e,outsideCloseDisabled:!0,scale:"s",widthScale:"s",onCalciteModalClose:this._cancel,onCalciteModalOpen:this._focusUsernameInput},Wr("div",{slot:"header"},t),Wr("div",{slot:"content"},Wr("div",{class:US.info},Q_(i?d:u,{server:o&&/\.arcgis\.com/i.test(o)?pq:o,resource:`(${s||p})`})),a?Wr("calcite-notice",{class:US.notice,icon:"exclamation-mark-triangle",kind:"danger",open:!0},Wr("div",{slot:"message"},a.details?.httpStatus?m:w)):null,i?null:[Wr("calcite-label",null,_,Wr("calcite-input",{afterCreate:I=>this._usernameInputNode=I,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),Wr("calcite-label",null,S,Wr("calcite-input",{afterCreate:I=>this._passwordInputNode=I,bind:this,name:"password",required:!0,type:"password",value:""}))]),Wr("calcite-button",{appearance:"outline",bind:this,onclick:this._cancel,slot:"secondary",type:"button",width:"full"},C),Wr("calcite-button",{loading:!!n,slot:"primary",type:"submit",width:"full"},n?M:k))))}_focusUsernameInput(){requestAnimationFrame(()=>{this._usernameInputNode?.setFocus()})}_cancel(){this._set("signingIn",!1),this.open=!1,this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(e){e.preventDefault(),this._set("signingIn",!0);let t=this.oAuthPrompt?{}:{username:this._usernameInputNode?.value,password:this._passwordInputNode?.value};this.emit("submit",t)}};O([H({readOnly:!0})],hn.prototype,"container",void 0),O([H(),iS("esri/t9n/common")],hn.prototype,"commonMessages",void 0),O([H()],hn.prototype,"error",void 0),O([H(),iS("esri/identity/t9n/identity")],hn.prototype,"messages",void 0),O([H()],hn.prototype,"oAuthPrompt",void 0),O([H()],hn.prototype,"open",void 0),O([H()],hn.prototype,"signingIn",void 0),O([H()],hn.prototype,"server",void 0),O([H({readOnly:!0})],hn.prototype,"title",null),O([H()],hn.prototype,"resource",void 0),hn=O([Pe("esri.identity.IdentityModal")],hn);WS=hn});var zS,fc,_I=L(()=>{zS="esriJSAPIOAuth",fc=class{constructor(t,r){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=t,this.storage=r,this._init()}isValid(){let t=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token)){if(this.expires==null&&this.refreshToken)t=!0;else if(this.expires){let r=Date.now();this.expires>r&&(this.expires-r)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(t=!0)}}return t}save(){if(!this.storage)return!1;let t=this._load(),r=this.oAuthInfo;if(r?.authNamespace&&r.portalUrl){let n=t[r.authNamespace];n||(n=t[r.authNamespace]={}),this.appId||(this.appId=r.appId),n[r.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(zS,JSON.stringify(t))}catch(i){return console.warn(i),!1}return!0}return!1}destroy(){let t=this._load(),r=this.oAuthInfo;if(r?.appId&&r?.portalUrl&&(this.expires==null||this.expires>Date.now())&&(this.refreshToken||this.token)){let n=r.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken",i=new FormData;if(i.append("f","json"),i.append("auth_token",this.refreshToken||this.token),i.append("client_id",r.appId),i.append("token_type_hint",this.refreshToken?"refresh_token":"access_token"),typeof navigator.sendBeacon=="function")navigator.sendBeacon(n,i);else{let o=new XMLHttpRequest;o.open("POST",n),o.send(i)}}if(r?.authNamespace&&r.portalUrl&&this.storage){let n=t[r.authNamespace];if(n){delete n[r.portalUrl];try{this.storage.setItem(zS,JSON.stringify(t))}catch(i){console.log(i)}}}r&&(r._oAuthCred=null,this.oAuthInfo=null)}_init(){let t=this._load(),r=this.oAuthInfo;if(r?.authNamespace&&r.portalUrl){let n=t[r.authNamespace];n&&(n=n[r.portalUrl],n&&(this.appId=n.appId,this.codeVerifier=n.codeVerifier,this.expires=n.expires,this.refreshToken=n.refreshToken,this.ssl=n.ssl,this.stateUID=n.stateUID,this.token=n.token,this.userId=n.userId))}}_load(){let t={};if(this.storage){let r=this.storage.getItem(zS);if(r)try{t=JSON.parse(r)}catch(n){console.warn(n)}}return t}};fc.prototype.declaredClass="esri.identity.OAuthCredential"});var GS,yr,BS,vI=L(()=>{nr();ta();ir();Be();Ze();To();Ht();yr=GS=class extends Si{constructor(e){super(e),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return GS.fromJSON(this.toJSON())}};O([H({json:{write:!0}})],yr.prototype,"appId",void 0),O([H({json:{write:!0}})],yr.prototype,"authNamespace",void 0),O([H({json:{write:!0}})],yr.prototype,"expiration",void 0),O([H({json:{write:!0}})],yr.prototype,"flowType",void 0),O([H({json:{write:!0}})],yr.prototype,"forceLogin",void 0),O([H({json:{write:!0}})],yr.prototype,"forceUserId",void 0),O([H({json:{write:!0}})],yr.prototype,"locale",void 0),O([H({json:{write:!0}})],yr.prototype,"minTimeUntilExpiration",void 0),O([H({json:{write:!0}})],yr.prototype,"popup",void 0),O([H({json:{write:!0}})],yr.prototype,"popupCallbackUrl",void 0),O([H({json:{write:!0}})],yr.prototype,"popupWindowFeatures",void 0),O([H({json:{write:!0}})],yr.prototype,"portalUrl",void 0),O([H({json:{write:!0}})],yr.prototype,"preserveUrlHash",void 0),O([H({json:{write:!0}})],yr.prototype,"userId",void 0),yr=GS=O([Pe("esri.identity.OAuthInfo")],yr);BS=yr});var gn,cw,SI=L(()=>{nr();ta();ir();Be();Ze();To();Ht();gn=class extends Si{constructor(e){super(e),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};O([H({json:{write:!0}})],gn.prototype,"adminTokenServiceUrl",void 0),O([H({json:{write:!0}})],gn.prototype,"currentVersion",void 0),O([H({json:{write:!0}})],gn.prototype,"hasPortal",void 0),O([H({json:{write:!0}})],gn.prototype,"hasServer",void 0),O([H({json:{write:!0}})],gn.prototype,"owningSystemUrl",void 0),O([H({json:{write:!0}})],gn.prototype,"owningTenant",void 0),O([H({json:{write:!0}})],gn.prototype,"server",void 0),O([H({json:{write:!0}})],gn.prototype,"shortLivedTokenValidity",void 0),O([H({json:{write:!0}})],gn.prototype,"tokenServiceUrl",void 0),O([H({json:{write:!0}})],gn.prototype,"webTierAuth",void 0),gn=O([Pe("esri.identity.ServerInfo")],gn);cw=gn});var uw,xI,qS,dw,fw,ef,pt,CI=L(()=>{nr();Hs();G0();Y0();Tr();B0();md();er();hi();bi();Ko();ir();Be();Ze();Ht();bI();_I();vI();SI();R0();uw={},xI=e=>{let t=new Mr(e.owningSystemUrl).host,r=new Mr(e.server).host,n=/.+\.arcgis\.com$/i;return n.test(t)&&n.test(r)},qS=(e,t)=>!!(xI(e)&&t&&t.some(r=>r.test(e.server))),dw=null,fw=null;try{dw=window.localStorage,fw=window.sessionStorage}catch{}ef=class extends na{constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin=window.origin!=="null"?window.origin:window.location.origin,this._appUrlObj=Yo(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^/]+\/[^/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer)).*/gi,this._gwUser=/http.+\/users\/([^/]+).*/i,this._gwItem=/http.+\/items\/([^/]+).*/i,this._gwGroup=/http.+\/groups\/([^/]+).*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getPlatformSelfError=null,this._getOAuthLocationParams(),window.addEventListener("pageshow",t=>{this._pageShowHandler(t)})}registerServers(t){let r=this.serverInfos;r?(t=t.filter(n=>!this.findServerInfo(n.server)),this.serverInfos=r.concat(t)):this.serverInfos=t,t.forEach(n=>{n.owningSystemUrl&&this._portals.push(n.owningSystemUrl),n.hasPortal&&this._portals.push(n.server)})}registerOAuthInfos(t){let r=this.oAuthInfos;if(r){for(let n of t){let i=this.findOAuthInfo(n.portalUrl);i&&r.splice(r.indexOf(i),1)}this.oAuthInfos=r.concat(t)}else this.oAuthInfos=t}registerToken(t){t={...t};let r=this._sanitizeUrl(t.server),n=this._isServerRsrc(r),i,o=this.findServerInfo(r),s=!0;o||(o=new cw,o.server=this._getServerInstanceRoot(r),n?o.hasServer=!0:(o.tokenServiceUrl=this._getTokenSvcUrl(r),o.hasPortal=!0),this.registerServers([o])),i=this._findCredential(r),i?(delete t.server,Object.assign(i,t),s=!1):(i=new pt({userId:t.userId,server:o.server??void 0,token:t.token,expires:t.expires,ssl:t.ssl,scope:n?"server":"portal"}),i.resources=[r],this.credentials.push(i)),i.emitTokenChange(!1),s||i.refreshServerTokens()}toJSON(){return w1({serverInfos:this.serverInfos.map(t=>t.toJSON()),oAuthInfos:this.oAuthInfos.map(t=>t.toJSON()),credentials:this.credentials.map(t=>t.toJSON())})}initialize(t){if(!t)return;typeof t=="string"&&(t=JSON.parse(t));let r=t.serverInfos,n=t.oAuthInfos,i=t.credentials;if(r){let o=[];r.forEach(s=>{s.server&&s.tokenServiceUrl&&o.push(s.declaredClass?s:new cw(s))}),o.length&&this.registerServers(o)}if(n){let o=[];n.forEach(s=>{s.appId&&o.push(s.declaredClass?s:new BS(s))}),o.length&&this.registerOAuthInfos(o)}i&&i.forEach(o=>{o.server&&o.token&&o.expires&&o.expires>Date.now()&&((o=o.declaredClass?o:new pt(o)).emitTokenChange(),this.credentials.push(o))})}findServerInfo(t){let r;t=this._sanitizeUrl(t);for(let n of this.serverInfos)if(this._hasSameServerInstance(n.server,t)){r=n;break}return r}findOAuthInfo(t){let r;t=this._sanitizeUrl(t);for(let n of this.oAuthInfos)if(this._hasSameServerInstance(n.portalUrl,t)){r=n;break}return r}findCredential(t,r){if(!t)return;let n;t=this._sanitizeUrl(t);let i=this._isServerRsrc(t)?"server":"portal";if(r){for(let o of this.credentials)if(this._hasSameServerInstance(o.server,t)&&r===o.userId&&o.scope===i){n=o;break}}else for(let o of this.credentials)if(this._hasSameServerInstance(o.server,t)&&this._getIdenticalSvcIdx(t,o)!==-1&&o.scope===i){n=o;break}return n}getCredential(t,r){let n,i,o=!0;r&&(n=!!r.token,i=r.error,o=r.prompt!==!1),r={...r},t=this._sanitizeUrl(t);let s=new AbortController,a=un();if(r.signal&&cn(r.signal,()=>{s.abort()}),cn(s,()=>{a.reject(new ye("identity-manager:user-aborted","ABORTED"))}),Ho(s))return a.promise;r.signal=s.signal;let u=this._isAdminResource(t),d=n?this.findCredential(t):null,p;if(d&&i&&i.details&&i.details.httpStatus===498)d.destroy();else if(d)return p=new ye("identity-manager:not-authorized","You are currently signed in as: '"+d.userId+"'. You do not have access to this resource: "+t,{error:i}),a.reject(p),a.promise;let m=this._findCredential(t,r);if(m)return a.resolve(m),a.promise;let w=this.findServerInfo(t);if(w)!w.hasPortal&&w.server&&w.owningSystemUrl&&this._hasSameServerInstance(w.server,w.owningSystemUrl)&&(w.hasPortal=!0),!w.hasServer&&this._isServerRsrc(t)&&(w._restInfoPms=this._getTokenSvcUrl(t),w.hasServer=!0);else{let _=this._getTokenSvcUrl(t);if(!_)return p=new ye("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),a.reject(p),a.promise;w=new cw,w.server=this._getServerInstanceRoot(t),typeof _=="string"?(w.tokenServiceUrl=_,w.hasPortal=!0):(w._restInfoPms=_,w.hasServer=!0),this.registerServers([w])}return w.hasPortal&&w._selfReq===void 0&&(o||Ur(w.tokenServiceUrl,this._appOrigin)||this._gwDomains.some(_=>_.tokenServiceUrl===w.tokenServiceUrl))&&(w._selfReq={owningTenant:r?.owningTenant,selfDfd:this._getPortalSelf(w.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),t)}),this._enqueue(t,w,r,a,u)}getResourceName(t){return this._isRESTService(t)?t.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(t)&&t.replace(this._gwUser,"$1")||this._gwItem.test(t)&&t.replace(this._gwItem,"$1")||this._gwGroup.test(t)&&t.replace(this._gwGroup,"$1")||""}generateToken(t,r,n){let i=this._rePortalTokenSvc.test(t.tokenServiceUrl),o=new Mr(this._appOrigin),s=t.shortLivedTokenValidity,a,u,d,p,m,w,_,S;r&&(S=this.tokenValidity||s||this._defaultTokenValidity,S>s&&s>0&&(S=s)),n&&(a=n.isAdmin,u=n.serverUrl,d=n.token,w=n.signal,_=n.ssl,t.customParameters=n.customParameters),a?p=t.adminTokenServiceUrl:(p=t.tokenServiceUrl,m=new Mr(p.toLowerCase()),t.webTierAuth&&n?.serverUrl&&!_&&o.scheme==="http"&&(Ur(o.uri,p,!0)||m.scheme==="https"&&o.host===m.host&&o.port==="7080"&&m.port==="7443")&&(p=p.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));let C={query:{request:"getToken",username:r?.username,password:r?.password,serverUrl:u,token:d,expiration:S,referer:a||i?this._appOrigin:null,client:a?"referer":null,f:"json",...t.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(t,n),signal:w,...n?.ioArgs};return i||(C.withCredentials=!1),wt(p,C).then(M=>{let k=M.data;if(!k?.token)return new ye("identity-manager:authentication-failed","Unable to generate token");let I=t.server;return uw[I]||(uw[I]={}),r&&(uw[I][r.username]=r.password),k.validity=S,k})}isBusy(){return!!this._busy}async checkSignInStatus(t){return(await this.checkAppAccess(t,"")).credential}checkAppAccess(t,r,n){let i=!1;return this.getCredential(t,{prompt:!1}).then(o=>{let s,a={f:"json"};if(o.scope==="portal")if(r&&(this._doPortalSignIn(t)||n?.force))s=o.server+"/sharing/rest/oauth2/validateAppAccess",a.client_id=r;else{if(!o.token)return{credential:o};s=o.server+"/sharing/rest"}else{if(!o.token)return{credential:o};s=o.server+"/rest/services"}return o.token&&(a.token=o.token),wt(s,{query:a,authMode:"anonymous"}).then(u=>{if(u.data.valid===!1)throw new ye("identity-manager:not-authorized",`You are currently signed in as: '${o.userId}'.`,u.data);return i=!!u.data.viewOnlyUserTypeApp,{credential:o}}).catch(u=>{if(u.name==="identity-manager:not-authorized")throw u;let d=u.details?.httpStatus;if(d===498)throw o.destroy(),new ye("identity-manager:not-authenticated","User is not signed in.");if(d===400)throw new ye("identity-manager:invalid-request");return{credential:o}})}).then(o=>({credential:o.credential,viewOnly:i}))}setOAuthResponseHash(t){t&&(t.charAt(0)==="#"&&(t=t.slice(1)),this._processOAuthPopupParams(Jo(t)))}setOAuthRedirectionHandler(t){this._oAuthRedirectFunc=t}setProtocolErrorHandler(t){this._protocolFunc=t}signIn(t,r,n={}){let i=un(),o=()=>{u?.remove(),d?.remove(),this.dialog?.destroy(),this.dialog=u=d=null},s=()=>{o(),this._oAuthDfd=null,i.reject(new ye("identity-manager:user-aborted","ABORTED"))};n.signal&&cn(n.signal,()=>{s()});let a=new WS({open:!0,resource:this.getResourceName(t),server:r.server});this.dialog=a,this.emit("dialog-create");let u=a.on("cancel",s),d=a.on("submit",p=>{this.generateToken(r,p,{isAdmin:n.isAdmin,signal:n.signal}).then(m=>{o();let w=new pt({userId:p.username,server:r.server??void 0,token:m.token,expires:m.expires!=null?Number(m.expires):null,ssl:!!m.ssl,isAdmin:n.isAdmin,validity:m.validity});i.resolve(w)}).catch(m=>{a.error=m,a.signingIn=!1})});return i.promise}oAuthSignIn(t,r,n,i){this._oAuthDfd=un();let o=this._oAuthDfd,s;i?.signal&&cn(i.signal,()=>{let w=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;w&&!w.closed?w.close():this.dialog&&p()}),o.resUrl_=t,o.sinfo_=r,o.oinfo_=n;let a=n._oAuthCred;if(a.storage&&(n.flowType==="authorization-code"||n.flowType==="auto"&&r.currentVersion>=8.4)){let w=crypto.getRandomValues(new Uint8Array(32));s=W0(w),a.codeVerifier=s,w=crypto.getRandomValues(new Uint8Array(32)),a.stateUID=W0(w),a.save()||(a.codeVerifier=s=null)}else a.codeVerifier=null;let u,d;this._getCodeChallenge(s).then(w=>{let _=!i||i.oAuthPopupConfirmation!==!1;if(!n.popup||!_)return void this._doOAuthSignIn(t,r,n,w);let S=new WS({oAuthPrompt:!0,server:r.server,open:!0});this.dialog=S,this.emit("dialog-create"),u=S.on("cancel",p),d=S.on("submit",()=>{m(),this._doOAuthSignIn(t,r,n,w)})});let p=()=>{m(),this._oAuthDfd=null,o.reject(new ye("identity-manager:user-aborted","ABORTED"))},m=()=>{u?.remove(),d?.remove(),this.dialog?.destroy(),this.dialog=null};return o.promise}destroyCredentials(){this.credentials&&this.credentials.slice().forEach(t=>{t.destroy()}),this.emit("credentials-destroy")}enablePostMessageAuth(t="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=jo(window,"message",r=>{if((r.origin===this._appOrigin||r.origin.endsWith(".arcgis.com"))&&r.data?.type==="arcgis:auth:requestCredential"){let n=r.source;this.getCredential(t).then(i=>{n.postMessage({type:"arcgis:auth:credential",credential:{expires:i.expires,server:i.server,ssl:i.ssl,token:i.token,userId:i.userId}},r.origin)}).catch(i=>{n.postMessage({type:"arcgis:auth:error",error:{name:i.name,message:i.message}},r.origin)})}})}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){let t=window.location.hash;if(t){t.charAt(0)==="#"&&(t=t.slice(1));let n=Jo(t),i=!1;if(n.access_token&&n.expires_in&&n.state&&n.hasOwnProperty("username"))try{n.state=JSON.parse(n.state),n.state.portalUrl&&(this._oAuthLocationParams=n,i=!0)}catch{}else if(n.error&&n.error_description&&(console.log("IdentityManager OAuth Error: ",n.error," - ",n.error_description),n.error==="access_denied"&&(i=!0,n.state)))try{n.state=JSON.parse(n.state)}catch{}i&&(window.location.hash=n.state?.hash||"")}let r=window.location.search;if(r){r.charAt(0)==="?"&&(r=r.slice(1));let n=Jo(r),i=!1;if(n.code&&n.state)try{n.state=JSON.parse(n.state),n.state.portalUrl&&n.state.uid&&(this._oAuthLocationParams=n,i=!0)}catch{}else if(n.error&&n.error_description&&(console.log("IdentityManager OAuth Error: ",n.error," - ",n.error_description),n.error==="access_denied"&&(i=!0,n.state)))try{n.state=JSON.parse(n.state)}catch{}if(i){let o={...n};["code","error","error_description","message_code","persist","state"].forEach(u=>{delete o[u]});let s=ra(o),a=window.location.pathname+(s?`?${s}`:"")+(n.state?.hash||"");window.history.replaceState(window.history.state,"",a)}}}_getOAuthToken(t,r,n,i,o){return t=t.replace(/^http:/i,"https:"),wt(`${t}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:i&&o?{grant_type:"authorization_code",code:r,redirect_uri:i,client_id:n,code_verifier:o}:{grant_type:"refresh_token",refresh_token:r,client_id:n}}).then(s=>s.data)}async _getCodeChallenge(t){if(t&&globalThis.isSecureContext){let r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r);return W0(new Uint8Array(n))}return null}_pageShowHandler(t){if(t.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){let r=new ye("identity-manager:user-aborted","ABORTED");this._errbackFunc(r)}}_findCredential(t,r){let n,i,o,s,a=-1,u=r?.token,d=r?.resource,p=this._isServerRsrc(t)?"server":"portal",m=this.credentials.filter(w=>this._hasSameServerInstance(w.server,t)&&w.scope===p);if(t=d||t,m.length)if(m.length===1){if(n=m[0],o=this.findServerInfo(n.server),i=o?.owningSystemUrl,s=i?this.findCredential(i,n.userId):void 0,a=this._getIdenticalSvcIdx(t,n),!u)return a===-1&&n.resources.push(t),this._addResource(t,s),n;a!==-1&&(n.resources.splice(a,1),this._removeResource(t,s))}else{let w,_;if(m.some(S=>(_=this._getIdenticalSvcIdx(t,S),_!==-1&&(w=S,o=this.findServerInfo(w.server),i=o?.owningSystemUrl,s=i?this.findCredential(i,w.userId):void 0,a=_,!0))),u)w&&(w.resources.splice(a,1),this._removeResource(t,s));else if(w)return this._addResource(t,s),w}}_findOAuthInfo(t){let r=this.findOAuthInfo(t);if(!r){for(let n of this.oAuthInfos)if(this._isIdProvider(n.portalUrl,t)){r=n;break}}return r}_addResource(t,r){r&&this._getIdenticalSvcIdx(t,r)===-1&&r.resources.push(t)}_removeResource(t,r){let n=-1;r&&(n=this._getIdenticalSvcIdx(t,r),n>-1&&r.resources.splice(n,1))}_useProxy(t,r){return r?.isAdmin&&!Ur(t.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(t.tokenServiceUrl)&&String(t.currentVersion)==="10.1"&&!Ur(t.tokenServiceUrl,this._appOrigin)}_getOrigin(t){let r=new Mr(t);return r.scheme+"://"+r.host+(r.port!=null?":"+r.port:"")}_getServerInstanceRoot(t){let r=t.toLowerCase(),n=r.indexOf(this._agsRest);return n===-1&&this._isAdminResource(t)&&(n=this._agsAdmin.test(t)?t.replace(this._agsAdmin,"$1").length:t.search(this._adminSvcs)),n!==-1||k0(r)||(n=r.indexOf("/sharing")),n===-1&&r.endsWith("/")&&(n=r.length-1),n>-1?t.slice(0,n):t}_hasSameServerInstance(t,r){return t.endsWith("/")&&(t=t.slice(0,-1)),t=t.toLowerCase(),r=this._getServerInstanceRoot(r).toLowerCase(),t=G_(t),r=G_(r),(t=t.slice(Math.max(0,t.indexOf(":"))))===(r=r.slice(Math.max(0,r.indexOf(":"))))}_sanitizeUrl(t){let r=(Qe.request.proxyUrl||"").toLowerCase(),n=r?t.toLowerCase().indexOf(r+"?"):-1;return n!==-1&&(t=t.slice(n+r.length+1)),t=F0(t),Yo(t).path}_isRESTService(t){return t.includes(this._agsRest)}_isAdminResource(t){return this._agsAdmin.test(t)||this._adminSvcs.test(t)}_isServerRsrc(t){return this._isRESTService(t)||this._isAdminResource(t)}_isIdenticalService(t,r){let n=!1;if(this._isRESTService(t)&&this._isRESTService(r)){let i=this._getSuffix(t).toLowerCase(),o=this._getSuffix(r).toLowerCase();if(n=i===o,!n){let s=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;n=i.replaceAll(s,"$1")===o.replaceAll(s,"$1")}}else this._isAdminResource(t)&&this._isAdminResource(r)?n=!0:this._isServerRsrc(t)||this._isServerRsrc(r)||!this._isPortalDomain(t)||(n=!0);return n}_isPortalDomain(t){let r=new Mr(t.toLowerCase()),n=this._portalConfig,i=this._gwDomains.some(o=>o.regex.test(r.uri));return!i&&n&&(i=this._hasSameServerInstance(this._getServerInstanceRoot(n.restBaseUrl),r.uri)),i||Qe.portalUrl&&(i=Ur(r,Qe.portalUrl,!0)),i||(i=this._portals.some(o=>this._hasSameServerInstance(o,r.uri))),i=i||this._agsPortal.test(r.path),i}_isIdProvider(t,r){let n=-1,i=-1;this._gwDomains.forEach((s,a)=>{n===-1&&s.regex.test(t)&&(n=a),i===-1&&s.regex.test(r)&&(i=a)});let o=!1;if(n>-1&&i>-1&&(n===0||n===4?i!==0&&i!==4||(o=!0):n===1?i!==1&&i!==2||(o=!0):n===2?i===2&&(o=!0):n===3&&i===3&&(o=!0)),!o){let s=this.findServerInfo(r),a=s?.owningSystemUrl;a&&xI(s)&&this._isPortalDomain(a)&&this._isIdProvider(t,a)&&(o=!0)}return o}_getIdenticalSvcIdx(t,r){let n=-1;for(let i=0;i<r.resources.length;i++){let o=r.resources[i];if(this._isIdenticalService(t,o)){n=i;break}}return n}_getSuffix(t){return t.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(t){let r,n,i;if(this._isRESTService(t)||this._isAdminResource(t)){let o=this._getServerInstanceRoot(t);return r=o+"/admin/generateToken",n=wt(t=o+"/rest/info",{query:{f:"json"}}).then(s=>s.data),{adminUrl:r,promise:n}}if(this._isPortalDomain(t)){let o="";if(this._gwDomains.some(s=>(s.regex.test(t)&&(o=s.tokenServiceUrl),!!o)),o||this._portals.some(s=>(this._hasSameServerInstance(s,t)&&(o=s+this._gwTokenUrl),!!o)),o||(i=t.toLowerCase().indexOf("/sharing"),i!==-1&&(o=t.slice(0,i)+this._gwTokenUrl)),o||(o=this._getOrigin(t)+this._gwTokenUrl),o){let s=new Mr(t).port;/^http:\/\//i.test(t)&&s==="7080"&&(o=o.replace(/:7080/i,":7443")),o=o.replace(/http:/i,"https:")}return o}}_processOAuthResponseParams(t,r,n){let i=r._oAuthCred;if(t.code){let s=i.codeVerifier;return i.codeVerifier=null,i.stateUID=null,i.save(),this._getOAuthToken(n.server,t.code,r.appId,this._getRedirectURI(r,!0),s).then(a=>{let u=new pt({userId:a.username,server:n.server??void 0,token:a.access_token,expires:Date.now()+1e3*a.expires_in,ssl:a.ssl,oAuthState:t.state,_oAuthCred:i});return r.userId=u.userId,i.storage=a.persist?dw:fw,i.refreshToken=a.refresh_token,i.token=null,i.expires=a.refresh_token_expires_in?Date.now()+1e3*a.refresh_token_expires_in:null,i.userId=u.userId,i.ssl=u.ssl,i.save(),u})}let o=new pt({userId:t.username,server:n.server??void 0,token:t.access_token,expires:Date.now()+1e3*Number(t.expires_in),ssl:t.ssl==="true",oAuthState:t.state,_oAuthCred:i});return r.userId=o.userId,i.storage=t.persist?dw:fw,i.refreshToken=null,i.token=o.token,i.expires=o.expires,i.userId=o.userId,i.ssl=o.ssl,i.save(),Promise.resolve(o)}_processOAuthPopupParams(t){let r=this._oAuthDfd;if(this._oAuthDfd=null,r)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),t.error){let n=t.error==="access_denied",i=new ye(n?"identity-manager:user-aborted":"identity-manager:authentication-failed",n?"ABORTED":"OAuth: "+t.error+" - "+t.error_description);r.reject(i)}else this._processOAuthResponseParams(t,r.oinfo_,r.sinfo_).then(n=>{r.resolve(n)}).catch(n=>{r.reject(n)})}_setOAuthResponseQueryString(t){t&&(t.charAt(0)==="?"&&(t=t.slice(1)),this._processOAuthPopupParams(Jo(t)))}async _exchangeToken(t,r,n){return(await wt(`${t}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:r,token:n}})).data.token}async _getPlatformSelf(t,r){if(this._getPlatformSelfError&&Date.now()-this._getPlatformSelfError[1]<1e3)throw this._getPlatformSelfError[0];t=t.replace(/^http:/i,"https:");try{let n=await wt(`${t}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":r,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0});return this._getPlatformSelfError=null,n.data}catch(n){throw n.details?.messageCode==="OAUTH_0066"&&(this._getPlatformSelfError=[n,Date.now()]),n}}_getPortalSelf(t,r){let n;return this._gwDomains.some(i=>(i.regex.test(t)&&(n=i.customBaseUrl),!!n)),n?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:n,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?t=t.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(r)&&(t=t.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),wt(t,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then(i=>i.data))}_doPortalSignIn(t){let r=this._portalConfig,n=window.location.href,i=this.findServerInfo(t);return!(!r&&!this._isPortalDomain(n)||!(i?i.hasPortal||i.owningSystemUrl&&this._isPortalDomain(i.owningSystemUrl):this._isPortalDomain(t))||!(this._isIdProvider(n,t)||r&&(this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),t)||this._isIdProvider(r.restBaseUrl,t))||Ur(n,t,!0)))}_checkProtocol(t,r,n,i){let o=!0,s=i?r.adminTokenServiceUrl:r.tokenServiceUrl;return s.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&Ul(s)&&(o=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:t,serverInfo:r}),!o)&&n(new ye("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection.")),o}_enqueue(t,r,n,i,o,s){return i||(i=un()),i.resUrl_=t,i.sinfo_=r,i.options_=n,i.admin_=o,i.refresh_=s,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(t),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(i)):this._xoReqs.push(i):this._doSignIn(i),i.promise}_doSignIn(t){this._busy=t,this._rejectOnPersistedPageShow=!1;let r=d=>{let p=t.options_?.resource,m=t.resUrl_,w=t.refresh_,_=!1;this.credentials.includes(d)||(w&&this.credentials.includes(w)?(w.userId=d.userId,w.token=d.token,w.expires=d.expires,w.validity=d.validity,w.ssl=d.ssl,w.creationTime=d.creationTime,_=!0,d=w):this.credentials.push(d)),d.resources||(d.resources=[]),d.resources.includes(p||m)||d.resources.push(p||m),d.scope=this._isServerRsrc(m)?"server":"portal",d.emitTokenChange();let S=this._soReqs,C={};this._soReqs=[],S.forEach(M=>{if(!this._isIdenticalService(m,M.resUrl_)){let k=this._getSuffix(M.resUrl_);C[k]||(C[k]=!0,d.resources.push(M.resUrl_))}}),t.resolve(d),S.forEach(M=>{this._hasSameServerInstance(this._getServerInstanceRoot(m),M.resUrl_)?M.resolve(d):this._soReqs.push(M)}),this._busy=t.resUrl_=t.sinfo_=t.refresh_=null,_||this.emit("credential-create",{credential:d}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},n=d=>{t.reject(d),this._busy=t.resUrl_=t.sinfo_=t.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},i=(d,p,m,w)=>{let _=t.sinfo_,S=!t.options_||t.options_.prompt!==!1,C=_.hasPortal&&this._findOAuthInfo(t.resUrl_),M,k;if(d)r(new pt({userId:d,server:_.server??void 0,token:m??void 0,expires:w!=null?Number(w):null,ssl:!!p}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),t.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);let I=jo(window,"message",N=>{N.source===window.parent&&N.data&&(N.data.type==="arcgis:auth:credential"?(I.remove(),N.data.credential.expires<Date.now()?n(new ye("identity-manager:credential-request-failed","Parent application's token has expired.")):r(new pt(N.data.credential))):N.data.type==="arcgis:auth:error"&&(I.remove(),N.data.error.name==="tokenExpiredError"?n(new ye("identity-manager:credential-request-failed","Parent application's token has expired.")):n(ye.fromJSON(N.data.error))))});cn(t.options_?.signal,()=>{I.remove()})}else if(C){let I=C._oAuthCred;if(!I){let N=new fc(C,dw),V=new fc(C,fw);N.isValid()&&V.isValid()?N.expires>V.expires?(I=N,V.destroy()):(I=V,N.destroy()):I=N.isValid()?N:V,C._oAuthCred=I}if(I.isValid()){M=new pt({userId:I.userId??void 0,server:_.server??void 0,token:I.token??void 0,expires:I.expires,ssl:I.ssl??void 0,_oAuthCred:I});let N=C.appId!==I.appId&&this._doPortalSignIn(t.resUrl_);N||I.refreshToken?(t._pendingDfd=I.refreshToken?this._getOAuthToken(_.server,I.refreshToken,I.appId).then(V=>(M.expires=Date.now()+1e3*V.expires_in,M.token=V.access_token,M)):Promise.resolve(M),t._pendingDfd.then(V=>N?this._exchangeToken(V.server,C.appId,V.token).then(Y=>(V.token=Y,V)).catch(()=>V):V).then(V=>{r(V)}).catch(V=>{let Y=V.details?.httpStatus;Y>0&&Y!==404?(I.destroy(),i()):n(V)})):r(M)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(C.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===I.stateUID&&I.codeVerifier)){let N=this._oAuthLocationParams;this._oAuthLocationParams=null,t._pendingDfd=this._processOAuthResponseParams(N,C,_).then(V=>{r(V)}).catch(n)}else{let N=()=>{S?t._pendingDfd=this.oAuthSignIn(t.resUrl_,_,C,t.options_).then(r,n):(k=new ye("identity-manager:not-authenticated","User is not signed in."),n(k))};this._doPortalSignIn(t.resUrl_)?t._pendingDfd=this._getPlatformSelf(_.server,C.appId).then(V=>{Ur(V.portalUrl,this._appOrigin,!0)?(M=new pt({userId:V.username,server:_.server??void 0,expires:Date.now()+1e3*V.expires_in,token:V.token}),r(M)):N()}).catch(N):N()}}else if(S){if(this._checkProtocol(t.resUrl_,_,n,t.admin_)){let I=t.options_;t.admin_&&(I=I||{},I.isAdmin=!0),t._pendingDfd=this.signIn(t.resUrl_,_,I).then(r,n)}}else k=new ye("identity-manager:not-authenticated","User is not signed in."),n(k)},o=()=>{let d=t.sinfo_,p=d.owningSystemUrl,m=t.options_,w,_,S,C;if(m&&(w=m.token,_=m.error,S=m.prompt),C=this._findCredential(p,{token:w,resource:t.resUrl_}),!C){for(let M of this.credentials)if(this._isIdProvider(p,M.server)){C=M;break}}if(C){let M=this.findCredential(t.resUrl_,C.userId);if(M)r(M);else if(qS(d,this._legacyFed)){let k=C.toJSON();k.server=d.server,k.resources=null,r(new pt(k))}else(t._pendingDfd=this.generateToken(this.findServerInfo(C.server),null,{serverUrl:t.resUrl_,token:C.token,signal:t.options_.signal,ssl:C.ssl})).then(k=>{r(new pt({userId:C?.userId,server:d.server??void 0,token:k.token,expires:k.expires!=null?Number(k.expires):null,ssl:!!k.ssl,isAdmin:t.admin_,validity:k.validity}))},n)}else this._busy=null,w&&(t.options_.token=null),(t._pendingDfd=this.getCredential(p.replace(/\/?$/,"/sharing"),{resource:t.resUrl_,owningTenant:d.owningTenant,signal:t.options_.signal,token:w,error:_,prompt:S})).then(()=>{this._enqueue(t.resUrl_,t.sinfo_,t.options_,t,t.admin_)},M=>{t.resUrl_=t.sinfo_=t.refresh_=null,t.reject(M)})};this._errbackFunc=n;let s=t.sinfo_.owningSystemUrl,a=this._isServerRsrc(t.resUrl_),u=t.sinfo_._restInfoPms;u?u.promise.then(d=>{let p=t.sinfo_;if(p._restInfoPms){p.adminTokenServiceUrl=p._restInfoPms.adminUrl,p._restInfoPms=null,p.tokenServiceUrl=(xn("authInfo.tokenServicesUrl",d)||xn("authInfo.tokenServiceUrl",d)||xn("tokenServiceUrl",d))??null,p.shortLivedTokenValidity=xn("authInfo.shortLivedTokenValidity",d)??null,p.currentVersion=d.currentVersion,p.owningTenant=d.owningTenant;let m=p.owningSystemUrl=d.owningSystemUrl;m&&this._portals.push(m)}a&&p.owningSystemUrl?o():i()},()=>{t.sinfo_._restInfoPms=null;let d=new ye("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");n(d)}):a&&s?o():t.sinfo_._selfReq?t.sinfo_._selfReq.selfDfd.then(d=>{let p={},m,w,_,S;return d&&(m=d.user?.username,p.username=m,p.allSSL=d.allSSL,w=d.supportsOAuth,S=parseFloat(d.currentVersion),d.portalMode==="multitenant"&&(_=d.customBaseUrl),t.sinfo_.currentVersion=S),t.sinfo_.webTierAuth=!!m,m&&this.normalizeWebTierAuth?this.generateToken(t.sinfo_,null,{ssl:p.allSSL}).catch(()=>null).then(C=>(p.portalToken=C?.token,p.tokenExpiration=C?.expires,p)):!m&&w&&S>=4.4&&!this._findOAuthInfo(t.resUrl_)?this._generateOAuthInfo({portalUrl:t.sinfo_.server,customBaseUrl:_,owningTenant:t.sinfo_._selfReq.owningTenant}).catch(()=>null).then(()=>p):p}).catch(()=>null).then(d=>{t.sinfo_._selfReq=null,d?i(d.username,d.allSSL,d.portalToken,d.tokenExpiration):i()}):i()}_generateOAuthInfo(t){let r,n=null,i=t.portalUrl,o=t.customBaseUrl,s=t.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){n=window.location.href;let u=n.indexOf("?");u>-1&&(n=n.slice(0,u)),u=n.search(/\/(apps|home)\//),n=u>-1?n.slice(0,u):null}return a&&n?(this._hasTestedIfAppIsOnPortal=!0,r=wt(n+"/sharing/rest",{query:{f:"json"}}).then(()=>{this._defaultOAuthInfo=new BS({appId:"arcgisonline",popupCallbackUrl:n+"/home/oauth-callback.html"})})):r=Promise.resolve(),r.then(()=>{if(this._defaultOAuthInfo)return i=i.replace(/^http:/i,"https:"),wt(i+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:s,client_id:this._defaultOAuthInfo.appId,redirect_uri:Xo(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then(u=>{if(u.data.valid){let d=this._defaultOAuthInfo.clone();u.data.urlKey&&o?d.portalUrl="https://"+u.data.urlKey.toLowerCase()+"."+o:d.portalUrl=i,d.popup=window!==window.top||!(Ur(i,this._appOrigin)||this._gwDomains.some(p=>p.regex.test(i)&&p.regex.test(this._appOrigin))),this.oAuthInfos.push(d)}})})}_doOAuthSignIn(t,r,n,i){let o=n._oAuthCred,s={portalUrl:n.portalUrl};!n.popup&&n.preserveUrlHash&&window.location.hash&&(s.hash=window.location.hash),o.stateUID&&(s.uid=o.stateUID);let a={client_id:n.appId,response_type:o.codeVerifier?"code":"token",state:JSON.stringify(s),expiration:n.expiration,locale:n.locale,redirect_uri:this._getRedirectURI(n,!!o.codeVerifier)};n.forceLogin&&(a.force_login=!0),n.forceUserId&&n.userId&&(a.prepopulatedusername=n.userId),!n.popup&&this._doPortalSignIn(t)&&(a.redirectToUserOrgUrl=!0),o.codeVerifier&&(a.code_challenge=i||o.codeVerifier,a.code_challenge_method=i?"S256":"plain");let u=n.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",d=u+"?"+ra(a);if(n.popup){let p=window.open(d,"esriJSAPIOAuth",n.popupWindowFeatures);if(p)p.focus(),this._oAuthDfd.oAuthWin_=p,this._oAuthIntervalId=setInterval(()=>{if(p.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();let m=this._oAuthDfd;if(m){let w=new ye("identity-manager:user-aborted","ABORTED");m.reject(w)}}},500),this._oAuthOnPopupHandle=jo(window,["arcgis:auth:hash","arcgis:auth:location:search"],m=>{m.type==="arcgis:auth:hash"?this.setOAuthResponseHash(m.detail):this._setOAuthResponseQueryString(m.detail)});else{let m=new ye("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(m)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:a,authorizeUrl:u,resourceUrl:t,serverInfo:r,oAuthInfo:n}):window.location.href=d}_getRedirectURI(t,r){let n=window.location.href.replace(/#.*$/,"");if(t.popup)return Xo(t.popupCallbackUrl);if(r){let i=Yo(n);return i.query&&["code","error","error_description","message_code","persist","state"].forEach(o=>{delete i.query[o]}),Wl(i.path,i.query)}return n}};ef.prototype.declaredClass="esri.identity.IdentityManagerBase";pt=class extends na.EventedAccessor{constructor(e){super(e),this._oAuthCred=null,this.tokenRefreshBuffer=2,e?._oAuthCred&&(this._oAuthCred=e._oAuthCred)}initialize(){this.resources=this.resources||[],this.creationTime==null&&(this.creationTime=Date.now())}refreshToken(){let e=Zt,t=e.findServerInfo(this.server),r=t?.owningSystemUrl,n=!!r&&this.scope==="server",i=n&&qS(t,e._legacyFed),o=t.webTierAuth,s=o&&e.normalizeWebTierAuth,a=uw[this.server],u=a?.[this.userId],d,p=this.resources&&this.resources[0],m=n?e.findServerInfo(r):null,w={username:this.userId,password:u};if(o&&!s)return;n&&!m&&e.serverInfos.some(S=>(e._isIdProvider(r,S.server)&&(m=S),!!m));let _=m?e.findCredential(m.server,this.userId):null;if(!n||_){if(!i){if(n)d={serverUrl:p,token:_?.token,ssl:_?.ssl};else if(s)w=null,d={ssl:this.ssl};else{if(!u){let S;return p&&(p=e._sanitizeUrl(p),this._enqueued=1,S=e._enqueue(p,t,null,null,this.isAdmin,this),S.then(()=>{this._enqueued=0,this.refreshServerTokens()}).catch(()=>{this._enqueued=0})),S}this.isAdmin&&(d={isAdmin:!0})}return e.generateToken(n?m:t,n?null:w,d).then(S=>{this.token=S.token,this.expires=S.expires!=null?Number(S.expires):null,this.creationTime=Date.now(),this.validity=S.validity,this.emitTokenChange(),this.refreshServerTokens()}).catch(()=>{})}_?.refreshToken()}}refreshServerTokens(){if(this.scope==="portal"){let e=Zt;e.credentials.forEach(t=>{let r=e.findServerInfo(t.server),n=r?.owningSystemUrl;t!==this&&t.userId===this.userId&&n&&t.scope==="server"&&(e._hasSameServerInstance(this.server,n)||e._isIdProvider(n,this.server))&&(qS(r,e._legacyFed)?(t.token=this.token,t.expires=this.expires,t.creationTime=this.creationTime,t.validity=this.validity,t.emitTokenChange()):t.refreshToken())})}}emitTokenChange(e){clearTimeout(this._refreshTimer);let t=Zt,r=this.server?t.findServerInfo(this.server):null,n=r?.owningSystemUrl,i=n?t.findServerInfo(n):null;e===!1||n&&this.scope!=="portal"&&(!i?.webTierAuth||t.normalizeWebTierAuth)||this.expires==null&&this.validity==null||this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);let e=Zt,t=e.credentials.indexOf(this);t>-1&&e.credentials.splice(t,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){let e=w1({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),t=this.resources;return t&&t.length>0&&(e.resources=t.slice()),e}_startRefreshTimer(){clearTimeout(this._refreshTimer);let e=6e4*this.tokenRefreshBuffer,t=2**31-1,r=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();r<0?r=0:r>t&&(r=t),this._refreshTimer=setTimeout(this.refreshToken.bind(this),r>e?r-e:r)}};O([H()],pt.prototype,"creationTime",void 0),O([H()],pt.prototype,"expires",void 0),O([H()],pt.prototype,"isAdmin",void 0),O([H()],pt.prototype,"oAuthState",void 0),O([H()],pt.prototype,"resources",void 0),O([H()],pt.prototype,"scope",void 0),O([H()],pt.prototype,"server",void 0),O([H()],pt.prototype,"ssl",void 0),O([H()],pt.prototype,"token",void 0),O([H()],pt.prototype,"tokenRefreshBuffer",void 0),O([H()],pt.prototype,"userId",void 0),O([H()],pt.prototype,"validity",void 0),pt=O([Pe("esri.identity.Credential")],pt)});var EI={};li(EI,{default:()=>TI});var pw,TI,MI=L(()=>{G0();CI();pw=class extends ef{};pw.prototype.declaredClass="esri.identity.IdentityManager";TI=new pw;RC(TI)});async function wt(e,t){e instanceof URL&&(e=e.toString()),t?.query instanceof URLSearchParams&&(t.query=Jo(t.query.toString().replaceAll("+"," ")));let r=U0(e),n=V0(e);n||r||(e=F0(e));let i={url:e,requestOptions:{...t}},o=w=>({data:w,getAllHeaders:pc,getHeader:pc,httpStatus:200,requestOptions:i.requestOptions,url:i.url}),s=j_(e,Pn.internalInterceptors);if(s){let w=await II(s,i);if(w!=null)return o(w)}let a=j_(e);if(a){let w=await II(a,i);if(w!=null)return o(w);a.after||a.error||(a=null)}if(e=i.url,(t=i.requestOptions).responseType==="image"&&(Q("host-webworker")||Q("host-node")))throw ki("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),i);if(t.method==="head"){if(t.body)throw ki("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),i);if(r||n)throw ki("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),i)}if(await yq(),mw)return mw.execute(e,t);let u=new AbortController,d=cn(t,()=>u.abort()),p={controller:u,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:a,params:i,redoRequest:!1,useIdentity:Pn.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},m=await Sq(p).finally(()=>d?.remove());return a?.after?.(m),m}function wq(e){let t=Jr(e);t&&!wt._corsServers.includes(t)&&wt._corsServers.push(t)}function LI(e){let t=Jr(e);return!t||t.endsWith(".arcgis.com")||wt._corsServers.includes(t)||$0(t)}function ki(e,t,r,n){let i="Error",o={url:r.url,requestOptions:r.requestOptions,getAllHeaders:pc,getHeader:pc,ssl:!1};if(t instanceof ye)return t.details?(t.details=Ne(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=o,t;if(t){let s=n&&(()=>Array.from(n.headers)),a=n&&(p=>n.headers.get(p)),u=n?.status,d=t.message;d&&(i=d),s&&a&&(o.getAllHeaders=s,o.getHeader=a),o.httpStatus=(t.httpCode!=null?t.httpCode:t.code)||u||0,o.subCode=t.subcode,o.messageCode=t.messageCode,typeof t.details=="string"?o.messages=[t.details]:o.messages=t.details,o.raw=hw in t?t[hw]:t}return hd(t)?Ji():new ye(e,i,o)}async function yq(){Q("host-webworker")&&!mw&&(mw=await Promise.resolve().then(()=>(qC(),BC)))}async function jS(){Zt||await Promise.resolve().then(()=>(MI(),EI))}async function bq(e){let t=e.params.url,r=e.params.requestOptions,n=e.controller.signal,i=r.body,o=null,s=null;if(NI&&"HTMLFormElement"in globalThis&&(i instanceof FormData?o=i:i instanceof HTMLFormElement&&(o=new FormData(i))),typeof i=="string"&&(s=i),e.fetchOptions={cache:r.cacheBust?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:r.method==="head"?"HEAD":"GET",mode:"cors",priority:Pn.priority,redirect:"follow",signal:n},(o||s)&&(e.fetchOptions.body=o||s),r.authMode==="anonymous"&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||o?.get("token")),!e.hasToken&&Qe.apiKey&&DC(t)&&(r.query||(r.query={}),r.query.token=Qe.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!kI(t)&&!Ho(n)){let a;r.authMode==="immediate"?(await jS(),a=await Zt.getCredential(t,{signal:n}),e.credential=a):r.authMode==="no-prompt"?(await jS(),a=await Zt.getCredential(t,{prompt:!1,signal:n}).catch(()=>{}),e.credential=a):Zt&&(a=Zt.findCredential(t)),a&&(e.credentialToken=a.token,e.useSSL=!!a.ssl)}}function kI(e){return gq.some(t=>t.test(e))}async function _q(e){let t=e.params.url,r=e.params.requestOptions,n=e.fetchOptions??{},i=V0(t)||U0(t),o=r.responseType||"json",s=i?0:r.timeout!=null?r.timeout:Pn.timeout,a=!1;if(!i){e.useSSL&&(t=z0(t));let w={...r.query};e.credentialToken&&(w.token=e.credentialToken);let _=ra(w);Q("esri-url-encodes-apostrophe")&&(_=_.replaceAll("'","%27"));let S=t.length+1+_.length,C;a=r.method==="delete"||r.method==="post"||r.method==="put"||!!r.body||S>Pn.maxUrlLength;let M=r.useProxy||!!Ul(t);if(M){let k=LC(t);C=k.path,!a&&C.length+1+S>Pn.maxUrlLength&&(a=!0),k.query&&(w={...k.query,...w})}if(n.method==="HEAD"&&(a||M)){if(a)throw S>Pn.maxUrlLength?ki("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params):ki("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params);if(M)throw ki("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}a?(n.method=r.method==="delete"?"DELETE":r.method==="put"?"PUT":"POST",r.body?t=Wl(t,w):(n.body=ra(w),n.headers||(n.headers={}),n.headers["Content-Type"]="application/x-www-form-urlencoded")):t=Wl(t,w),M&&(e.useProxy=!0,t=`${C}?${t}`),w.token&&NI&&n.body instanceof FormData&&!k0(t)&&n.body.set("token",w.token),r.hasOwnProperty("withCredentials")?e.withCredentials=r.withCredentials:Ur(t,O0())||($0(t)||Zt&&Zt.findServerInfo(t)?.webTierAuth)&&(e.withCredentials=!0),e.withCredentials&&(n.credentials="include",WC(t)&&await zC(a?Wl(t,w):t))}let u,d,p=0,m=!1;s>0&&(p=setTimeout(()=>{m=!0,e.controller.abort()},s));try{if(r.responseType==="native-request-init")d=n,d.url=t,r.signal?d.signal=r.signal:delete d.signal;else if(r.responseType!=="image"||n.cache!=="default"||n.method!=="GET"||a||vq(r.headers)||!i&&!e.useProxy&&Pn.proxyUrl&&!LI(t)){if(wt._beforeFetch&&await wt._beforeFetch(t,n),u=await fetch(t,n),wt._afterFetch&&await wt._afterFetch(u),e.useProxy||wq(t),r.responseType==="native")d=u;else if(n.method!=="HEAD")if(u.ok){switch(o){case"array-buffer":d=await u.arrayBuffer();break;case"blob":case"image":d=await u.blob();break;default:d=await u.text()}if(p&&(clearTimeout(p),p=0),o==="json"||o==="xml"||o==="document")if(d)switch(o){case"json":d=JSON.parse(d);break;case"xml":d=PI(d,"application/xml");break;case"document":d=PI(d,"text/html")}else d=null;if(d){if(o==="array-buffer"||o==="blob"){let w=u.headers.get("Content-Type");if(w&&/application\/json|text\/plain/i.test(w)&&d[o==="blob"?"size":"byteLength"]<=750)try{let _=await new Response(d).json();_.error&&(d=_)}catch{}}o==="image"&&d instanceof Blob&&(d=await AI(URL.createObjectURL(d),e,!0))}}else{d=await u.text();try{d=JSON.parse(d)}catch{}}}else d=await AI(t,e)}catch(w){if(w.name==="AbortError")throw m?VC():Ji("Request canceled");if(!(!u&&w instanceof TypeError&&Pn.proxyUrl)||r.body||r.method==="delete"||r.method==="head"||r.method==="post"||r.method==="put"||e.useProxy||LI(t))throw w;e.redoRequest=!0,AC({proxyUrl:Pn.proxyUrl,urlPrefix:Jr(t)??""})}finally{p&&clearTimeout(p)}return[u,d]}async function II(e,t){if(e.responseData!=null)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,n;try{n=await e.before(t)}catch(i){r=ki("request:interceptor",i,t)}if((n instanceof Error||n instanceof ye)&&(r=ki("request:interceptor",n,t)),r)throw e.error&&e.error(r),r;return n}}function vq(e){if(e){for(let t of Object.getOwnPropertyNames(e))if(e[t])return!0}return!1}function PI(e,t){let r;try{r=new DOMParser().parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function Sq(e){let t,r;await bq(e);try{do[t,r]=await _q(e);while(!await xq(e,t,r))}catch(o){let s=ki("request:server",o,e.params,t);throw s.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(s),s}let n=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(n)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!$0(n)){let o=Jr(n,!0);o&&Pn.trustedServers.push(o)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&UC(r.authorizedCrossOriginNoCorsDomains)}let i=e.credential;if(i&&Zt){let s=Zt.findServerInfo(i.server)?.owningSystemUrl;if(s){s=s.replace(/\/?$/,"/sharing");let a=Zt.findCredential(s,i.userId);a&&Zt._getIdenticalSvcIdx(s,a)===-1&&a.resources.unshift(s)}}return{data:r,getAllHeaders:t?()=>Array.from(t.headers):pc,getHeader:t?o=>t.headers.get(o):pc,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}async function xq(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;let n=e.params.requestOptions;if(!t||n.responseType==="native"||n.responseType==="native-request-init")return!0;let i,o;if(r&&(r.error&&typeof r.error=="object"?i=r.error:r.status==="error"&&Array.isArray(r.messages)&&(i={...r},i[hw]=r,i.details=r.messages)),!i&&!t.ok)throw i=new Error(`Unable to load ${t.url} status: ${t.status}`),i[hw]=r,i;let s,a=null;i&&(o=Number(i.code),a=i.hasOwnProperty("subcode")?Number(i.subcode):null,s=i.messageCode,s=s?.toUpperCase());let u=n.authMode;if(o===403&&(a===4||i.message?.toLowerCase().includes("ssl")&&!i.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&(u!=="no-prompt"||o===498)&&o!==void 0&&mq.has(o)&&!kI(e.params.url)&&(o!==403||(!s||!hq.has(s))&&(a==null||a===2&&e.credentialToken))){await jS();try{let d=await Zt.getCredential(e.params.url,{error:ki("request:server",i,e.params),prompt:u!=="no-prompt",signal:e.controller.signal,token:e.credentialToken});return e.credential=d,e.credentialToken=d.token,e.useSSL=e.useSSL||d.ssl,!1}catch(d){if(u==="no-prompt")return e.credential=void 0,e.credentialToken=void 0,!1;i=d}}if(i)throw i;return!0}function AI(e,t,r=!1){let n=t.controller.signal,i=new Image;return t.withCredentials?i.crossOrigin="use-credentials":i.crossOrigin="anonymous",i.alt="",i.fetchPriority=Pn.priority,i.src=e,FC(i,e,r,n)}var mw,Pn,NI,mq,hq,gq,pc,hw,Y0=L(()=>{Hs();G0();Tr();Be();er();bi();Ko();R0();OC();GC();Pn=Qe.request,NI="FormData"in globalThis,mq=new Set([499,498,403,401]),hq=new Set(["COM_0056","COM_0057","SB_0008"]),gq=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],pc=()=>null,hw=Symbol();wt._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"],wt._beforeFetch=void 0,wt._afterFetch=void 0});function ql(e){if(!Qe.assetsPath)throw Me.getLogger("esri.assets").errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new ye("assets:path-not-set","config.assetsPath is not set");return H_(Qe.assetsPath,e)}var J0=L(()=>{Hs();Y0();Tr();Ze();Ko()});function RI(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var DI=L(()=>{});var OI=z5(()=>{});var $I=z5(()=>{});var WI={};li(WI,{p:()=>Tq});var FI,gw,VI,UI,Cq,Tq,zI=L(()=>{DI();UI={exports:{}};FI=UI,gw=typeof document<"u"?document.currentScript?.src:void 0,typeof __filename<"u"&&(gw||(gw=__filename)),VI=function(e={}){var t,r,n,i,o=e,s=new Promise((f,T)=>{t=f,r=T}),a=typeof window=="object",u=typeof importScripts=="function",d=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",p=Object.assign({},o),m="./this.program",w="";function _(f){return o.locateFile?o.locateFile(f,w):w+f}if(d){var S=OI(),C=$I();w=__dirname+"/",i=f=>(f=Da(f)?new URL(f):C.normalize(f),S.readFileSync(f)),n=(f,T=!0)=>(f=Da(f)?new URL(f):C.normalize(f),new Promise((A,B)=>{S.readFile(f,T?void 0:"utf8",(J,le)=>{J?B(J):A(T?le.buffer:le)})})),!o.thisProgram&&process.argv.length>1&&(m=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2)}else(a||u)&&(u?w=self.location.href:typeof document<"u"&&document.currentScript&&(w=document.currentScript.src),gw&&(w=gw),w=w.startsWith("blob:")?"":w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1),u&&(i=f=>{var T=new XMLHttpRequest;return T.open("GET",f,!1),T.responseType="arraybuffer",T.send(null),new Uint8Array(T.response)}),n=f=>Da(f)?new Promise((T,A)=>{var B=new XMLHttpRequest;B.open("GET",f,!0),B.responseType="arraybuffer",B.onload=()=>{(B.status==200||B.status==0&&B.response)&&A(B.response),T(B.status)},B.onerror=T,B.send(null)}):fetch(f,{credentials:"same-origin"}).then(T=>T.ok?T.arrayBuffer():Promise.reject(new Error(T.status+" : "+T.url))));var M,k,I=console.log.bind(console),N=console.error.bind(console);Object.assign(o,p),p=null;var V,Y,re,te,ie,ge,be,de=!1;function G(f,T){f||tn(T)}function $(){var f=k.buffer;o.HEAP8=V=new Int8Array(f),o.HEAP16=re=new Int16Array(f),o.HEAPU8=Y=new Uint8Array(f),o.HEAPU16=new Uint16Array(f),o.HEAP32=te=new Int32Array(f),o.HEAPU32=ie=new Uint32Array(f),o.HEAPF32=ge=new Float32Array(f),o.HEAPF64=be=new Float64Array(f)}var q=[],K=[],ee=[];function ae(){Cc(q)}function pe(){Cc(K)}function ve(){Cc(ee)}function Ae(f){K.unshift(f)}var We=0,Pt=null;function lr(f){We++}function cr(f){if(--We==0&&Pt){var T=Pt;Pt=null,T()}}function tn(f){N(f="Aborted("+f+")"),de=!0,f+=". Build with -sASSERTIONS for more info.";var T=new WebAssembly.RuntimeError(f);throw r(T),T}var Ar,Vi="data:application/octet-stream;base64,",Ra=f=>f.startsWith(Vi),Da=f=>f.startsWith("file://");function Gw(){var f="pe-wasm.wasm";return Ra(f)?f:_(f)}function Bw(f){if(f==Ar&&M)return new Uint8Array(M);if(i)return i(f);throw"both async and sync fetching of the wasm failed"}function qw(f){return n(f).then(T=>new Uint8Array(T),()=>Bw(f))}function gf(f,T,A){return qw(f).then(B=>WebAssembly.instantiate(B,T)).then(A,B=>{N(`failed to asynchronously prepare wasm: ${B}`),tn(B)})}function jw(f,T,A,B){return typeof WebAssembly.instantiateStreaming!="function"||Ra(T)||Da(T)||d||typeof fetch!="function"?gf(T,A,B):fetch(T,{credentials:"same-origin"}).then(J=>WebAssembly.instantiateStreaming(J,A).then(B,function(le){return N(`wasm streaming compile failed: ${le}`),N("falling back to ArrayBuffer instantiation"),gf(T,A,B)}))}function Hw(){return{a:uy}}function Zw(){var f=Hw();function T(B,J){return R=B.exports,k=R.t,$(),Ae(R.u),cr(),R}function A(B){T(B.instance)}return lr(),Ar||(Ar=Gw()),jw(M,Ar,f,A).catch(r),{}}var Cc=f=>{for(;f.length>0;)f.shift()(o)};function Yw(f,T="i8"){switch(T.endsWith("*")&&(T="*"),T){case"i1":case"i8":return V[f];case"i16":return re[f>>1];case"i32":return te[f>>2];case"i64":tn("to do getValue(i64) use WASM_BIGINT");case"float":return ge[f>>2];case"double":return be[f>>3];case"*":return ie[f>>2];default:tn(`invalid type for getValue: ${T}`)}}var wf=typeof TextDecoder<"u"?new TextDecoder:void 0,yf=(f,T,A)=>{for(var B=T+A,J=T;f[J]&&!(J>=B);)++J;if(J-T>16&&f.buffer&&wf)return wf.decode(f.subarray(T,J));for(var le="";T<J;){var he=f[T++];if(128&he){var fe=63&f[T++];if((224&he)!=192){var Ee=63&f[T++];if((he=(240&he)==224?(15&he)<<12|fe<<6|Ee:(7&he)<<18|fe<<12|Ee<<6|63&f[T++])<65536)le+=String.fromCharCode(he);else{var Sr=he-65536;le+=String.fromCharCode(55296|Sr>>10,56320|1023&Sr)}}else le+=String.fromCharCode((31&he)<<6|fe)}else le+=String.fromCharCode(he)}return le},qr=(f,T)=>f?yf(Y,f,T):"";function Jw(f,T,A){return 0}var bf=(f,T,A,B)=>{if(!(B>0))return 0;for(var J=A,le=A+B-1,he=0;he<f.length;++he){var fe=f.charCodeAt(he);if(fe>=55296&&fe<=57343&&(fe=65536+((1023&fe)<<10)|1023&f.charCodeAt(++he)),fe<=127){if(A>=le)break;T[A++]=fe}else if(fe<=2047){if(A+1>=le)break;T[A++]=192|fe>>6,T[A++]=128|63&fe}else if(fe<=65535){if(A+2>=le)break;T[A++]=224|fe>>12,T[A++]=128|fe>>6&63,T[A++]=128|63&fe}else{if(A+3>=le)break;T[A++]=240|fe>>18,T[A++]=128|fe>>12&63,T[A++]=128|fe>>6&63,T[A++]=128|63&fe}}return T[A]=0,A-J},Oa=(f,T,A)=>bf(f,Y,T,A);function Xw(f,T,A){return 0}function Qw(f,T,A,B){}var Kw=f=>f%4==0&&(f%100!=0||f%400==0),ey=[0,31,60,91,121,152,182,213,244,274,305,335],ty=[0,31,59,90,120,151,181,212,243,273,304,334],ry=f=>(Kw(f.getFullYear())?ey:ty)[f.getMonth()]+f.getDate()-1,ny=(f,T)=>T+2097152>>>0<4194305-!!f?(f>>>0)+4294967296*T:NaN;function _f(f,T,A){var B=ny(f,T),J=new Date(1e3*B);te[A>>2]=J.getSeconds(),te[A+4>>2]=J.getMinutes(),te[A+8>>2]=J.getHours(),te[A+12>>2]=J.getDate(),te[A+16>>2]=J.getMonth(),te[A+20>>2]=J.getFullYear()-1900,te[A+24>>2]=J.getDay();var le=0|ry(J);te[A+28>>2]=le,te[A+36>>2]=-60*J.getTimezoneOffset();var he=new Date(J.getFullYear(),0,1),fe=new Date(J.getFullYear(),6,1).getTimezoneOffset(),Ee=he.getTimezoneOffset(),Sr=0|(fe!=Ee&&J.getTimezoneOffset()==Math.min(Ee,fe));te[A+32>>2]=Sr}var iy=()=>2147483648,$a=f=>{var T=(f-k.buffer.byteLength+65535)/65536;try{return k.grow(T),$(),1}catch{}},Tc={},oy=()=>m||"./this.program",xs=()=>{if(!xs.strings){var f={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:oy()};for(var T in Tc)Tc[T]===void 0?delete f[T]:f[T]=Tc[T];var A=[];for(var T in f)A.push(`${T}=${f[T]}`);xs.strings=A}return xs.strings},vf=(f,T)=>{for(var A=0;A<f.length;++A)V[T++]=f.charCodeAt(A);V[T]=0};function sy(f,T,A,B,J){return 70}var Sf=[null,[],[]],ay=(f,T)=>{var A=Sf[f];T===0||T===10?((f===1?I:N)(yf(A,0)),A.length=0):A.push(T)},ly=f=>{for(var T=0,A=0;A<f.length;++A){var B=f.charCodeAt(A);B<=127?T++:B<=2047?T+=2:B>=55296&&B<=57343?(T+=4,++A):T+=3}return T};function cy(f,T,A){var B=ly(f)+1,J=new Array(B);return bf(f,J,0,J.length),J}var xf=(f,T)=>Math.ceil(f/T)*T,uy={c:Jw,q:(f,T,A)=>{},h:Xw,d:Qw,o:f=>{},n:(f,T)=>{},p:(f,T,A)=>{},l:()=>{tn("")},s:(f,T,A)=>Y.copyWithin(f,T,T+A),j:_f,r:(f,T,A,B)=>{var J=new Date().getFullYear(),le=new Date(J,0,1),he=new Date(J,6,1),fe=le.getTimezoneOffset(),Ee=he.getTimezoneOffset(),Sr=Math.max(fe,Ee);ie[f>>2]=60*Sr,te[T>>2]=+(fe!=Ee);var rh=oh=>{var by=oh>=0?"-":"+",sh=Math.abs(oh);return`UTC${by}${String(Math.floor(sh/60)).padStart(2,"0")}${String(sh%60).padStart(2,"0")}`},nh=rh(fe),ih=rh(Ee);Ee<fe?(Oa(nh,A,17),Oa(ih,B,17)):(Oa(nh,B,17),Oa(ih,A,17))},i:()=>Date.now(),m:f=>{var T=Y.length;f>>>=0;var A=iy();if(f>A)return!1;for(var B=(fe,Ee)=>fe+(Ee-fe%Ee)%Ee,J=1;J<=4;J*=2){var le=T*(1+.2/J);le=Math.min(le,f+100663296);var he=Math.min(A,B(Math.max(f,le),65536));if($a(he))return!0}return!1},e:(f,T)=>{var A=0;return xs().forEach((B,J)=>{var le=T+A;ie[f+4*J>>2]=le,vf(B,le),A+=B.length+1}),0},f:(f,T)=>{var A=xs();ie[f>>2]=A.length;var B=0;return A.forEach(J=>B+=J.length+1),ie[T>>2]=B,0},a:f=>52,g:(f,T,A,B)=>52,k:sy,b:(f,T,A,B)=>{for(var J=0,le=0;le<A;le++){var he=ie[T>>2],fe=ie[T+4>>2];T+=8;for(var Ee=0;Ee<fe;Ee++)ay(f,Y[he+Ee]);J+=fe}return ie[B>>2]=J,0}},R=Zw();o._webidl_free=f=>(o._webidl_free=R.v)(f),o._webidl_malloc=f=>(o._webidl_malloc=R.w)(f);var Fa,Cf=o._emscripten_bind_PeObject_getCode_0=f=>(Cf=o._emscripten_bind_PeObject_getCode_0=R.x)(f),Tf=o._emscripten_bind_PeObject_getName_1=(f,T)=>(Tf=o._emscripten_bind_PeObject_getName_1=R.y)(f,T),Ef=o._emscripten_bind_PeObject_getType_0=f=>(Ef=o._emscripten_bind_PeObject_getType_0=R.z)(f),Mf=o._emscripten_bind_PeCoordsys_isEqual_1=(f,T)=>(Mf=o._emscripten_bind_PeCoordsys_isEqual_1=R.A)(f,T),Lf=o._emscripten_bind_PeCoordsys_getCode_0=f=>(Lf=o._emscripten_bind_PeCoordsys_getCode_0=R.B)(f),Cs=o._emscripten_bind_PeCoordsys_getName_1=(f,T)=>(Cs=o._emscripten_bind_PeCoordsys_getName_1=R.C)(f,T),If=o._emscripten_bind_PeCoordsys_getType_0=f=>(If=o._emscripten_bind_PeCoordsys_getType_0=R.D)(f),Pf=o._emscripten_bind_VoidPtr___destroy___0=f=>(Pf=o._emscripten_bind_VoidPtr___destroy___0=R.E)(f),Af=o._emscripten_bind_PeDatum_getSpheroid_0=f=>(Af=o._emscripten_bind_PeDatum_getSpheroid_0=R.F)(f),Nf=o._emscripten_bind_PeDatum_getCode_0=f=>(Nf=o._emscripten_bind_PeDatum_getCode_0=R.G)(f),Ec=o._emscripten_bind_PeDatum_getName_1=(f,T)=>(Ec=o._emscripten_bind_PeDatum_getName_1=R.H)(f,T),kf=o._emscripten_bind_PeDatum_getType_0=f=>(kf=o._emscripten_bind_PeDatum_getType_0=R.I)(f),Rf=o._emscripten_bind_PeDefs_get_PE_BUFFER_MAX_0=f=>(Rf=o._emscripten_bind_PeDefs_get_PE_BUFFER_MAX_0=R.J)(f),Mc=o._emscripten_bind_PeDefs_get_PE_NAME_MAX_0=f=>(Mc=o._emscripten_bind_PeDefs_get_PE_NAME_MAX_0=R.K)(f),Df=o._emscripten_bind_PeDefs_get_PE_MGRS_MAX_0=f=>(Df=o._emscripten_bind_PeDefs_get_PE_MGRS_MAX_0=R.L)(f),Lc=o._emscripten_bind_PeDefs_get_PE_USNG_MAX_0=f=>(Lc=o._emscripten_bind_PeDefs_get_PE_USNG_MAX_0=R.M)(f),Ic=o._emscripten_bind_PeDefs_get_PE_DD_MAX_0=f=>(Ic=o._emscripten_bind_PeDefs_get_PE_DD_MAX_0=R.N)(f),Of=o._emscripten_bind_PeDefs_get_PE_DMS_MAX_0=f=>(Of=o._emscripten_bind_PeDefs_get_PE_DMS_MAX_0=R.O)(f),$f=o._emscripten_bind_PeDefs_get_PE_DDM_MAX_0=f=>($f=o._emscripten_bind_PeDefs_get_PE_DDM_MAX_0=R.P)(f),Ff=o._emscripten_bind_PeDefs_get_PE_UTM_MAX_0=f=>(Ff=o._emscripten_bind_PeDefs_get_PE_UTM_MAX_0=R.Q)(f),Vf=o._emscripten_bind_PeDefs_get_PE_PARM_MAX_0=f=>(Vf=o._emscripten_bind_PeDefs_get_PE_PARM_MAX_0=R.R)(f),Uf=o._emscripten_bind_PeDefs_get_PE_TYPE_NONE_0=f=>(Uf=o._emscripten_bind_PeDefs_get_PE_TYPE_NONE_0=R.S)(f),Wf=o._emscripten_bind_PeDefs_get_PE_TYPE_GEOGCS_0=f=>(Wf=o._emscripten_bind_PeDefs_get_PE_TYPE_GEOGCS_0=R.T)(f),zf=o._emscripten_bind_PeDefs_get_PE_TYPE_PROJCS_0=f=>(zf=o._emscripten_bind_PeDefs_get_PE_TYPE_PROJCS_0=R.U)(f),Gf=o._emscripten_bind_PeDefs_get_PE_TYPE_GEOGTRAN_0=f=>(Gf=o._emscripten_bind_PeDefs_get_PE_TYPE_GEOGTRAN_0=R.V)(f),Bf=o._emscripten_bind_PeDefs_get_PE_TYPE_COORDSYS_0=f=>(Bf=o._emscripten_bind_PeDefs_get_PE_TYPE_COORDSYS_0=R.W)(f),qf=o._emscripten_bind_PeDefs_get_PE_TYPE_UNIT_0=f=>(qf=o._emscripten_bind_PeDefs_get_PE_TYPE_UNIT_0=R.X)(f),jf=o._emscripten_bind_PeDefs_get_PE_TYPE_LINUNIT_0=f=>(jf=o._emscripten_bind_PeDefs_get_PE_TYPE_LINUNIT_0=R.Y)(f),Hf=o._emscripten_bind_PeDefs_get_PE_STR_OPTS_NONE_0=f=>(Hf=o._emscripten_bind_PeDefs_get_PE_STR_OPTS_NONE_0=R.Z)(f),Zf=o._emscripten_bind_PeDefs_get_PE_STR_AUTH_NONE_0=f=>(Zf=o._emscripten_bind_PeDefs_get_PE_STR_AUTH_NONE_0=R._)(f),Yf=o._emscripten_bind_PeDefs_get_PE_STR_AUTH_TOP_0=f=>(Yf=o._emscripten_bind_PeDefs_get_PE_STR_AUTH_TOP_0=R.$)(f),Jf=o._emscripten_bind_PeDefs_get_PE_STR_NAME_CANON_0=f=>(Jf=o._emscripten_bind_PeDefs_get_PE_STR_NAME_CANON_0=R.aa)(f),Xf=o._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT_0=f=>(Xf=o._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT_0=R.ba)(f),Qf=o._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT2_0=f=>(Qf=o._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT2_0=R.ca)(f),Kf=o._emscripten_bind_PeDefs_get_PE_PARM_X0_0=f=>(Kf=o._emscripten_bind_PeDefs_get_PE_PARM_X0_0=R.da)(f),ep=o._emscripten_bind_PeDefs_get_PE_PARM_ND_0=f=>(ep=o._emscripten_bind_PeDefs_get_PE_PARM_ND_0=R.ea)(f),tp=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_1_TO_2_0=f=>(tp=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_1_TO_2_0=R.fa)(f),rp=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_2_TO_1_0=f=>(rp=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_2_TO_1_0=R.ga)(f),np=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_P_TO_G_0=f=>(np=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_P_TO_G_0=R.ha)(f),ip=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_G_TO_P_0=f=>(ip=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_G_TO_P_0=R.ia)(f),op=o._emscripten_bind_PeDefs_get_PE_HORIZON_RECT_0=f=>(op=o._emscripten_bind_PeDefs_get_PE_HORIZON_RECT_0=R.ja)(f),sp=o._emscripten_bind_PeDefs_get_PE_HORIZON_POLY_0=f=>(sp=o._emscripten_bind_PeDefs_get_PE_HORIZON_POLY_0=R.ka)(f),ap=o._emscripten_bind_PeDefs_get_PE_HORIZON_LINE_0=f=>(ap=o._emscripten_bind_PeDefs_get_PE_HORIZON_LINE_0=R.la)(f),lp=o._emscripten_bind_PeDefs_get_PE_HORIZON_DELTA_0=f=>(lp=o._emscripten_bind_PeDefs_get_PE_HORIZON_DELTA_0=R.ma)(f),cp=o._emscripten_bind_PeDouble_PeDouble_1=f=>(cp=o._emscripten_bind_PeDouble_PeDouble_1=R.na)(f),up=o._emscripten_bind_PeDouble_get_val_0=f=>(up=o._emscripten_bind_PeDouble_get_val_0=R.oa)(f),dp=o._emscripten_bind_PeDouble_set_val_1=(f,T)=>(dp=o._emscripten_bind_PeDouble_set_val_1=R.pa)(f,T),fp=o._emscripten_bind_PeDouble___destroy___0=f=>(fp=o._emscripten_bind_PeDouble___destroy___0=R.qa)(f),pp=o._emscripten_bind_PeFactory_initialize_1=f=>(pp=o._emscripten_bind_PeFactory_initialize_1=R.ra)(f),mp=o._emscripten_bind_PeFactory_factoryByType_2=(f,T)=>(mp=o._emscripten_bind_PeFactory_factoryByType_2=R.sa)(f,T),hp=o._emscripten_bind_PeFactory_fromString_2=(f,T)=>(hp=o._emscripten_bind_PeFactory_fromString_2=R.ta)(f,T),gp=o._emscripten_bind_PeFactory_getCode_1=f=>(gp=o._emscripten_bind_PeFactory_getCode_1=R.ua)(f),wp=o._emscripten_bind_PeGCSExtent_PeGCSExtent_6=(f,T,A,B,J,le)=>(wp=o._emscripten_bind_PeGCSExtent_PeGCSExtent_6=R.va)(f,T,A,B,J,le),yp=o._emscripten_bind_PeGCSExtent_getLLon_0=f=>(yp=o._emscripten_bind_PeGCSExtent_getLLon_0=R.wa)(f),bp=o._emscripten_bind_PeGCSExtent_getSLat_0=f=>(bp=o._emscripten_bind_PeGCSExtent_getSLat_0=R.xa)(f),_p=o._emscripten_bind_PeGCSExtent_getRLon_0=f=>(_p=o._emscripten_bind_PeGCSExtent_getRLon_0=R.ya)(f),vp=o._emscripten_bind_PeGCSExtent_getNLat_0=f=>(vp=o._emscripten_bind_PeGCSExtent_getNLat_0=R.za)(f),Sp=o._emscripten_bind_PeGCSExtent___destroy___0=f=>(Sp=o._emscripten_bind_PeGCSExtent___destroy___0=R.Aa)(f),xp=o._emscripten_bind_PeGeogcs_getDatum_0=f=>(xp=o._emscripten_bind_PeGeogcs_getDatum_0=R.Ba)(f),Cp=o._emscripten_bind_PeGeogcs_getPrimem_0=f=>(Cp=o._emscripten_bind_PeGeogcs_getPrimem_0=R.Ca)(f),Tp=o._emscripten_bind_PeGeogcs_getUnit_0=f=>(Tp=o._emscripten_bind_PeGeogcs_getUnit_0=R.Da)(f),Ep=o._emscripten_bind_PeGeogcs_isEqual_1=(f,T)=>(Ep=o._emscripten_bind_PeGeogcs_isEqual_1=R.Ea)(f,T),Mp=o._emscripten_bind_PeGeogcs_getCode_0=f=>(Mp=o._emscripten_bind_PeGeogcs_getCode_0=R.Fa)(f),Lp=o._emscripten_bind_PeGeogcs_getName_1=(f,T)=>(Lp=o._emscripten_bind_PeGeogcs_getName_1=R.Ga)(f,T),Ip=o._emscripten_bind_PeGeogcs_getType_0=f=>(Ip=o._emscripten_bind_PeGeogcs_getType_0=R.Ha)(f),Pp=o._emscripten_bind_PeGeogtran_isEqual_1=(f,T)=>(Pp=o._emscripten_bind_PeGeogtran_isEqual_1=R.Ia)(f,T),Ap=o._emscripten_bind_PeGeogtran_getGeogcs1_0=f=>(Ap=o._emscripten_bind_PeGeogtran_getGeogcs1_0=R.Ja)(f),Np=o._emscripten_bind_PeGeogtran_getGeogcs2_0=f=>(Np=o._emscripten_bind_PeGeogtran_getGeogcs2_0=R.Ka)(f),kp=o._emscripten_bind_PeGeogtran_getParameters_0=f=>(kp=o._emscripten_bind_PeGeogtran_getParameters_0=R.La)(f),Pc=o._emscripten_bind_PeGeogtran_loadConstants_0=f=>(Pc=o._emscripten_bind_PeGeogtran_loadConstants_0=R.Ma)(f),Ac=o._emscripten_bind_PeGeogtran_getCode_0=f=>(Ac=o._emscripten_bind_PeGeogtran_getCode_0=R.Na)(f),Rp=o._emscripten_bind_PeGeogtran_getName_1=(f,T)=>(Rp=o._emscripten_bind_PeGeogtran_getName_1=R.Oa)(f,T),Dp=o._emscripten_bind_PeGeogtran_getType_0=f=>(Dp=o._emscripten_bind_PeGeogtran_getType_0=R.Pa)(f),Nc=o._emscripten_bind_PeGTlistExtended_getGTlist_6=(f,T,A,B,J,le)=>(Nc=o._emscripten_bind_PeGTlistExtended_getGTlist_6=R.Qa)(f,T,A,B,J,le),Op=o._emscripten_bind_PeGTlistExtended_get_PE_GTLIST_OPTS_COMMON_0=f=>(Op=o._emscripten_bind_PeGTlistExtended_get_PE_GTLIST_OPTS_COMMON_0=R.Ra)(f),kc=o._emscripten_bind_PeGTlistExtendedEntry_getEntries_0=f=>(kc=o._emscripten_bind_PeGTlistExtendedEntry_getEntries_0=R.Sa)(f),$p=o._emscripten_bind_PeGTlistExtendedEntry_getSteps_0=f=>($p=o._emscripten_bind_PeGTlistExtendedEntry_getSteps_0=R.Ta)(f),Fp=o._emscripten_bind_PeGTlistExtendedEntry_Delete_1=f=>(Fp=o._emscripten_bind_PeGTlistExtendedEntry_Delete_1=R.Ua)(f),Vp=o._emscripten_bind_PeGTlistExtendedGTs_getDirection_0=f=>(Vp=o._emscripten_bind_PeGTlistExtendedGTs_getDirection_0=R.Va)(f),Rc=o._emscripten_bind_PeGTlistExtendedGTs_getGeogtran_0=f=>(Rc=o._emscripten_bind_PeGTlistExtendedGTs_getGeogtran_0=R.Wa)(f),Up=o._emscripten_bind_PeHorizon_getNump_0=f=>(Up=o._emscripten_bind_PeHorizon_getNump_0=R.Xa)(f),Wp=o._emscripten_bind_PeHorizon_getKind_0=f=>(Wp=o._emscripten_bind_PeHorizon_getKind_0=R.Ya)(f),zp=o._emscripten_bind_PeHorizon_getInclusive_0=f=>(zp=o._emscripten_bind_PeHorizon_getInclusive_0=R.Za)(f),Gp=o._emscripten_bind_PeHorizon_getSize_0=f=>(Gp=o._emscripten_bind_PeHorizon_getSize_0=R._a)(f),Bp=o._emscripten_bind_PeHorizon_getCoord_0=f=>(Bp=o._emscripten_bind_PeHorizon_getCoord_0=R.$a)(f),qp=o._emscripten_bind_PeInteger_PeInteger_1=f=>(qp=o._emscripten_bind_PeInteger_PeInteger_1=R.ab)(f),jp=o._emscripten_bind_PeInteger_get_val_0=f=>(jp=o._emscripten_bind_PeInteger_get_val_0=R.bb)(f),Hp=o._emscripten_bind_PeInteger_set_val_1=(f,T)=>(Hp=o._emscripten_bind_PeInteger_set_val_1=R.cb)(f,T),Zp=o._emscripten_bind_PeInteger___destroy___0=f=>(Zp=o._emscripten_bind_PeInteger___destroy___0=R.db)(f),Yp=o._emscripten_bind_PeLineType_geodetic_distance_10=(f,T,A,B,J,le,he,fe,Ee,Sr)=>(Yp=o._emscripten_bind_PeLineType_geodetic_distance_10=R.eb)(f,T,A,B,J,le,he,fe,Ee,Sr),Jp=o._emscripten_bind_PeLineType_geodetic_coordinate_9=(f,T,A,B,J,le,he,fe,Ee)=>(Jp=o._emscripten_bind_PeLineType_geodetic_coordinate_9=R.fb)(f,T,A,B,J,le,he,fe,Ee),Xp=o._emscripten_bind_PeLineType_geodesic_coordinate_8=(f,T,A,B,J,le,he,fe)=>(Xp=o._emscripten_bind_PeLineType_geodesic_coordinate_8=R.gb)(f,T,A,B,J,le,he,fe),Qp=o._emscripten_bind_PeLineType_great_elliptic_distance_9=(f,T,A,B,J,le,he,fe,Ee)=>(Qp=o._emscripten_bind_PeLineType_great_elliptic_distance_9=R.hb)(f,T,A,B,J,le,he,fe,Ee),Dc=o._emscripten_bind_PeMath_q_3=(f,T,A)=>(Dc=o._emscripten_bind_PeMath_q_3=R.ib)(f,T,A),Kp=o._emscripten_bind_PeMath_q90_2=(f,T)=>(Kp=o._emscripten_bind_PeMath_q90_2=R.jb)(f,T),Oc=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_NEW_0=f=>(Oc=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_NEW_0=R.kb)(f),em=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_OLD_0=f=>(em=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_OLD_0=R.lb)(f),tm=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_AUTO_0=f=>(tm=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_AUTO_0=R.mb)(f),rm=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_180_ZONE_1_PLUS_0=f=>(rm=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_180_ZONE_1_PLUS_0=R.nb)(f),nm=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_ADD_SPACES_0=f=>(nm=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_ADD_SPACES_0=R.ob)(f),im=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NONE_0=f=>(im=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NONE_0=R.pb)(f),om=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_0=f=>(om=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_0=R.qb)(f),sm=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_STRICT_0=f=>(sm=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_STRICT_0=R.rb)(f),am=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_ADD_SPACES_0=f=>(am=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_ADD_SPACES_0=R.sb)(f),lm=o._emscripten_bind_PeParameter_getValue_0=f=>(lm=o._emscripten_bind_PeParameter_getValue_0=R.tb)(f),cm=o._emscripten_bind_PeParameter_getCode_0=f=>(cm=o._emscripten_bind_PeParameter_getCode_0=R.ub)(f),um=o._emscripten_bind_PeParameter_getName_1=(f,T)=>(um=o._emscripten_bind_PeParameter_getName_1=R.vb)(f,T),dm=o._emscripten_bind_PeParameter_getType_0=f=>(dm=o._emscripten_bind_PeParameter_getType_0=R.wb)(f),fm=o._emscripten_bind_PePCSInfo_getCentralMeridian_0=f=>(fm=o._emscripten_bind_PePCSInfo_getCentralMeridian_0=R.xb)(f),pm=o._emscripten_bind_PePCSInfo_getDomainMinx_0=f=>(pm=o._emscripten_bind_PePCSInfo_getDomainMinx_0=R.yb)(f),mm=o._emscripten_bind_PePCSInfo_getDomainMiny_0=f=>(mm=o._emscripten_bind_PePCSInfo_getDomainMiny_0=R.zb)(f),hm=o._emscripten_bind_PePCSInfo_getDomainMaxx_0=f=>(hm=o._emscripten_bind_PePCSInfo_getDomainMaxx_0=R.Ab)(f),gm=o._emscripten_bind_PePCSInfo_getDomainMaxy_0=f=>(gm=o._emscripten_bind_PePCSInfo_getDomainMaxy_0=R.Bb)(f),wm=o._emscripten_bind_PePCSInfo_getNorthPoleLocation_0=f=>(wm=o._emscripten_bind_PePCSInfo_getNorthPoleLocation_0=R.Cb)(f),ym=o._emscripten_bind_PePCSInfo_getNorthPoleGeometry_0=f=>(ym=o._emscripten_bind_PePCSInfo_getNorthPoleGeometry_0=R.Db)(f),bm=o._emscripten_bind_PePCSInfo_getSouthPoleLocation_0=f=>(bm=o._emscripten_bind_PePCSInfo_getSouthPoleLocation_0=R.Eb)(f),_m=o._emscripten_bind_PePCSInfo_getSouthPoleGeometry_0=f=>(_m=o._emscripten_bind_PePCSInfo_getSouthPoleGeometry_0=R.Fb)(f),vm=o._emscripten_bind_PePCSInfo_isDensificationNeeded_0=f=>(vm=o._emscripten_bind_PePCSInfo_isDensificationNeeded_0=R.Gb)(f),Sm=o._emscripten_bind_PePCSInfo_isGcsHorizonMultiOverlap_0=f=>(Sm=o._emscripten_bind_PePCSInfo_isGcsHorizonMultiOverlap_0=R.Hb)(f),xm=o._emscripten_bind_PePCSInfo_isPannableRectangle_0=f=>(xm=o._emscripten_bind_PePCSInfo_isPannableRectangle_0=R.Ib)(f),Cm=o._emscripten_bind_PePCSInfo_generate_2=(f,T)=>(Cm=o._emscripten_bind_PePCSInfo_generate_2=R.Jb)(f,T),Tm=o._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_NONE_0=f=>(Tm=o._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_NONE_0=R.Kb)(f),Em=o._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_DOMAIN_0=f=>(Em=o._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_DOMAIN_0=R.Lb)(f),Mm=o._emscripten_bind_PePCSInfo_get_PE_POLE_OUTSIDE_BOUNDARY_0=f=>(Mm=o._emscripten_bind_PePCSInfo_get_PE_POLE_OUTSIDE_BOUNDARY_0=R.Mb)(f),Lm=o._emscripten_bind_PePCSInfo_get_PE_POLE_POINT_0=f=>(Lm=o._emscripten_bind_PePCSInfo_get_PE_POLE_POINT_0=R.Nb)(f),Im=o._emscripten_bind_PePrimem_getLongitude_0=f=>(Im=o._emscripten_bind_PePrimem_getLongitude_0=R.Ob)(f),Pm=o._emscripten_bind_PePrimem_getCode_0=f=>(Pm=o._emscripten_bind_PePrimem_getCode_0=R.Pb)(f),Am=o._emscripten_bind_PePrimem_getName_1=(f,T)=>(Am=o._emscripten_bind_PePrimem_getName_1=R.Qb)(f,T),Nm=o._emscripten_bind_PePrimem_getType_0=f=>(Nm=o._emscripten_bind_PePrimem_getType_0=R.Rb)(f),km=o._emscripten_bind_PeProjcs_getGeogcs_0=f=>(km=o._emscripten_bind_PeProjcs_getGeogcs_0=R.Sb)(f),Rm=o._emscripten_bind_PeProjcs_getProjection_0=f=>(Rm=o._emscripten_bind_PeProjcs_getProjection_0=R.Tb)(f),Dm=o._emscripten_bind_PeProjcs_getParameters_0=f=>(Dm=o._emscripten_bind_PeProjcs_getParameters_0=R.Ub)(f),Om=o._emscripten_bind_PeProjcs_getUnit_0=f=>(Om=o._emscripten_bind_PeProjcs_getUnit_0=R.Vb)(f),$m=o._emscripten_bind_PeProjcs_loadConstants_0=f=>($m=o._emscripten_bind_PeProjcs_loadConstants_0=R.Wb)(f),Fm=o._emscripten_bind_PeProjcs_horizonGcsGenerate_0=f=>(Fm=o._emscripten_bind_PeProjcs_horizonGcsGenerate_0=R.Xb)(f),Vm=o._emscripten_bind_PeProjcs_horizonPcsGenerate_0=f=>(Vm=o._emscripten_bind_PeProjcs_horizonPcsGenerate_0=R.Yb)(f),Um=o._emscripten_bind_PeProjcs_isEqual_1=(f,T)=>(Um=o._emscripten_bind_PeProjcs_isEqual_1=R.Zb)(f,T),Wm=o._emscripten_bind_PeProjcs_getCode_0=f=>(Wm=o._emscripten_bind_PeProjcs_getCode_0=R._b)(f),zm=o._emscripten_bind_PeProjcs_getName_1=(f,T)=>(zm=o._emscripten_bind_PeProjcs_getName_1=R.$b)(f,T),Gm=o._emscripten_bind_PeProjcs_getType_0=f=>(Gm=o._emscripten_bind_PeProjcs_getType_0=R.ac)(f),Bm=o._emscripten_bind_PeSpheroid_getAxis_0=f=>(Bm=o._emscripten_bind_PeSpheroid_getAxis_0=R.bc)(f),qm=o._emscripten_bind_PeSpheroid_getFlattening_0=f=>(qm=o._emscripten_bind_PeSpheroid_getFlattening_0=R.cc)(f),jm=o._emscripten_bind_PeSpheroid_getCode_0=f=>(jm=o._emscripten_bind_PeSpheroid_getCode_0=R.dc)(f),Hm=o._emscripten_bind_PeSpheroid_getName_1=(f,T)=>(Hm=o._emscripten_bind_PeSpheroid_getName_1=R.ec)(f,T),Zm=o._emscripten_bind_PeSpheroid_getType_0=f=>(Zm=o._emscripten_bind_PeSpheroid_getType_0=R.fc)(f),Ym=o._emscripten_bind_PeUnit_getUnitFactor_0=f=>(Ym=o._emscripten_bind_PeUnit_getUnitFactor_0=R.gc)(f),Jm=o._emscripten_bind_PeUnit_getCode_0=f=>(Jm=o._emscripten_bind_PeUnit_getCode_0=R.hc)(f),Xm=o._emscripten_bind_PeUnit_getName_1=(f,T)=>(Xm=o._emscripten_bind_PeUnit_getName_1=R.ic)(f,T),Qm=o._emscripten_bind_PeUnit_getType_0=f=>(Qm=o._emscripten_bind_PeUnit_getType_0=R.jc)(f),Km=o._emscripten_bind_PeVersion_version_string_0=f=>(Km=o._emscripten_bind_PeVersion_version_string_0=R.kc)(f);function eh(){function f(){Fa||(Fa=!0,o.calledRun=!0,de||(pe(),t(o),ve()))}We>0||(ae(),We>0||f())}function Ye(){}function co(f){return(f||Ye).__cache__}function vt(f,T){var A=co(T),B=A[f];return B||((B=Object.create((T||Ye).prototype)).ptr=f,A[f]=B)}function dy(f,T){return vt(f.ptr,T)}function fy(f){if(!f.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";f.__destroy__(),delete co(f.__class__)[f.ptr]}function py(f,T){return f.ptr===T.ptr}function th(f){return f.ptr}function my(f){return f.__class__}o._pe_getPeGTlistExtendedEntrySize=()=>(o._pe_getPeGTlistExtendedEntrySize=R.lc)(),o._pe_getPeGTlistExtendedGTsSize=()=>(o._pe_getPeGTlistExtendedGTsSize=R.mc)(),o._pe_getPeHorizonSize=()=>(o._pe_getPeHorizonSize=R.nc)(),o._pe_geog_to_geog=(f,T,A,B,J)=>(o._pe_geog_to_geog=R.pc)(f,T,A,B,J),o._pe_geog_to_proj=(f,T,A)=>(o._pe_geog_to_proj=R.qc)(f,T,A),o._pe_geog_to_dd=(f,T,A,B,J)=>(o._pe_geog_to_dd=R.rc)(f,T,A,B,J),o._pe_dd_to_geog=(f,T,A,B)=>(o._pe_dd_to_geog=R.sc)(f,T,A,B),o._pe_geog_to_ddm=(f,T,A,B,J)=>(o._pe_geog_to_ddm=R.tc)(f,T,A,B,J),o._pe_ddm_to_geog=(f,T,A,B)=>(o._pe_ddm_to_geog=R.uc)(f,T,A,B),o._pe_geog_to_dms=(f,T,A,B,J)=>(o._pe_geog_to_dms=R.vc)(f,T,A,B,J),o._pe_dms_to_geog=(f,T,A,B)=>(o._pe_dms_to_geog=R.wc)(f,T,A,B),o._pe_geog_to_mgrs_extended=(f,T,A,B,J,le,he)=>(o._pe_geog_to_mgrs_extended=R.xc)(f,T,A,B,J,le,he),o._pe_mgrs_to_geog_extended=(f,T,A,B,J)=>(o._pe_mgrs_to_geog_extended=R.yc)(f,T,A,B,J),o._pe_geog_to_usng=(f,T,A,B,J,le,he)=>(o._pe_geog_to_usng=R.zc)(f,T,A,B,J,le,he),o._pe_usng_to_geog=(f,T,A,B)=>(o._pe_usng_to_geog=R.Ac)(f,T,A,B),o._pe_geog_to_utm=(f,T,A,B,J)=>(o._pe_geog_to_utm=R.Bc)(f,T,A,B,J),o._pe_utm_to_geog=(f,T,A,B,J)=>(o._pe_utm_to_geog=R.Cc)(f,T,A,B,J),o._pe_object_to_string_ext=(f,T,A)=>(o._pe_object_to_string_ext=R.Dc)(f,T,A),o._pe_proj_to_geog_center=(f,T,A,B)=>(o._pe_proj_to_geog_center=R.Ec)(f,T,A,B),o.getValue=Yw,o.UTF8ToString=qr,Pt=function f(){Fa||eh(),Fa||(Pt=f)},eh(),Ye.prototype=Object.create(Ye.prototype),Ye.prototype.constructor=Ye,Ye.prototype.__class__=Ye,Ye.__cache__={},o.WrapperObject=Ye,o.getCache=co,o.wrapPointer=vt,o.castObject=dy,o.NULL=vt(0),o.destroy=fy,o.compare=py,o.getPointer=th,o.getClass=my;var xe={buffer:0,size:0,pos:0,temps:[],needed:0,prepare(){if(xe.needed){for(var f=0;f<xe.temps.length;f++)o._webidl_free(xe.temps[f]);xe.temps.length=0,o._webidl_free(xe.buffer),xe.buffer=0,xe.size+=xe.needed,xe.needed=0}xe.buffer||(xe.size+=128,xe.buffer=o._webidl_malloc(xe.size),G(xe.buffer)),xe.pos=0},alloc(f,T){G(xe.buffer);var A,B=T.BYTES_PER_ELEMENT,J=f.length*B;return J=xf(J,8),xe.pos+J>=xe.size?(G(J>0),xe.needed+=J,A=o._webidl_malloc(J),xe.temps.push(A)):(A=xe.buffer+xe.pos,xe.pos+=J),A},copy(f,T,A){A/=T.BYTES_PER_ELEMENT;for(var B=0;B<f.length;B++)T[A+B]=f[B]}};function $c(f){if(typeof f=="string"){var T=cy(f),A=xe.alloc(T,V);return xe.copy(T,V,A),A}return f}function rn(f){if(typeof f=="object"){var T=xe.alloc(f,V);return xe.copy(f,V,T),T}return f}function hy(f){if(typeof f=="object"){var T=xe.alloc(f,re);return xe.copy(f,re,T),T}return f}function gy(f){if(typeof f=="object"){var T=xe.alloc(f,te);return xe.copy(f,te,T),T}return f}function wy(f){if(typeof f=="object"){var T=xe.alloc(f,ge);return xe.copy(f,ge,T),T}return f}function yy(f){if(typeof f=="object"){var T=xe.alloc(f,be);return xe.copy(f,be,T),T}return f}function dt(){throw"cannot construct a PeObject, no constructor in IDL"}function Vt(){throw"cannot construct a PeCoordsys, no constructor in IDL"}function kn(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Jt(){throw"cannot construct a PeDatum, no constructor in IDL"}function Z(){throw"cannot construct a PeDefs, no constructor in IDL"}function Ut(f){f&&typeof f=="object"&&(f=f.ptr),this.ptr=cp(f),co(Ut)[this.ptr]=this}function ur(){throw"cannot construct a PeFactory, no constructor in IDL"}function At(f,T,A,B,J,le){f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),A&&typeof A=="object"&&(A=A.ptr),B&&typeof B=="object"&&(B=B.ptr),J&&typeof J=="object"&&(J=J.ptr),le&&typeof le=="object"&&(le=le.ptr),this.ptr=wp(f,T,A,B,J,le),co(At)[this.ptr]=this}function at(){throw"cannot construct a PeGeogcs, no constructor in IDL"}function lt(){throw"cannot construct a PeGeogtran, no constructor in IDL"}function Nr(){throw"cannot construct a PeGTlistExtended, no constructor in IDL"}function vr(){throw"cannot construct a PeGTlistExtendedEntry, no constructor in IDL"}function jr(){throw"cannot construct a PeGTlistExtendedGTs, no constructor in IDL"}function Et(){throw"cannot construct a PeHorizon, no constructor in IDL"}function Wt(f){f&&typeof f=="object"&&(f=f.ptr),this.ptr=qp(f),co(Wt)[this.ptr]=this}function dr(){throw"cannot construct a PeLineType, no constructor in IDL"}function nn(){throw"cannot construct a PeMath, no constructor in IDL"}function Je(){throw"cannot construct a PeNotationMgrs, no constructor in IDL"}function ft(){throw"cannot construct a PeNotationUtm, no constructor in IDL"}function fr(){throw"cannot construct a PeParameter, no constructor in IDL"}function Se(){throw"cannot construct a PePCSInfo, no constructor in IDL"}function Xt(){throw"cannot construct a PePrimem, no constructor in IDL"}function ze(){throw"cannot construct a PeProjcs, no constructor in IDL"}function Nt(){throw"cannot construct a PeSpheroid, no constructor in IDL"}function zt(){throw"cannot construct a PeUnit, no constructor in IDL"}function Rn(){throw"cannot construct a PeVersion, no constructor in IDL"}return dt.prototype=Object.create(Ye.prototype),dt.prototype.constructor=dt,dt.prototype.__class__=dt,dt.__cache__={},o.PeObject=dt,dt.prototype.getCode=dt.prototype.getCode=function(){var f=this.ptr;return Cf(f)},dt.prototype.getName=dt.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Tf(T,f))},dt.prototype.getType=dt.prototype.getType=function(){var f=this.ptr;return Ef(f)},Vt.prototype=Object.create(dt.prototype),Vt.prototype.constructor=Vt,Vt.prototype.__class__=Vt,Vt.__cache__={},o.PeCoordsys=Vt,Vt.prototype.isEqual=Vt.prototype.isEqual=function(f){var T=this.ptr;return f&&typeof f=="object"&&(f=f.ptr),!!Mf(T,f)},Vt.prototype.getCode=Vt.prototype.getCode=function(){var f=this.ptr;return Lf(f)},Vt.prototype.getName=Vt.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Cs(T,f))},Vt.prototype.getType=Vt.prototype.getType=function(){var f=this.ptr;return If(f)},kn.prototype=Object.create(Ye.prototype),kn.prototype.constructor=kn,kn.prototype.__class__=kn,kn.__cache__={},o.VoidPtr=kn,kn.prototype.__destroy__=kn.prototype.__destroy__=function(){var f=this.ptr;Pf(f)},Jt.prototype=Object.create(dt.prototype),Jt.prototype.constructor=Jt,Jt.prototype.__class__=Jt,Jt.__cache__={},o.PeDatum=Jt,Jt.prototype.getSpheroid=Jt.prototype.getSpheroid=function(){var f=this.ptr;return vt(Af(f),Nt)},Jt.prototype.getCode=Jt.prototype.getCode=function(){var f=this.ptr;return Nf(f)},Jt.prototype.getName=Jt.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Ec(T,f))},Jt.prototype.getType=Jt.prototype.getType=function(){var f=this.ptr;return kf(f)},Z.prototype=Object.create(Ye.prototype),Z.prototype.constructor=Z,Z.prototype.__class__=Z,Z.__cache__={},o.PeDefs=Z,Z.prototype.get_PE_BUFFER_MAX=Z.prototype.get_PE_BUFFER_MAX=function(){var f=this.ptr;return Rf(f)},Object.defineProperty(Z.prototype,"PE_BUFFER_MAX",{get:Z.prototype.get_PE_BUFFER_MAX}),Z.prototype.get_PE_NAME_MAX=Z.prototype.get_PE_NAME_MAX=function(){var f=this.ptr;return Mc(f)},Object.defineProperty(Z.prototype,"PE_NAME_MAX",{get:Z.prototype.get_PE_NAME_MAX}),Z.prototype.get_PE_MGRS_MAX=Z.prototype.get_PE_MGRS_MAX=function(){var f=this.ptr;return Df(f)},Object.defineProperty(Z.prototype,"PE_MGRS_MAX",{get:Z.prototype.get_PE_MGRS_MAX}),Z.prototype.get_PE_USNG_MAX=Z.prototype.get_PE_USNG_MAX=function(){var f=this.ptr;return Lc(f)},Object.defineProperty(Z.prototype,"PE_USNG_MAX",{get:Z.prototype.get_PE_USNG_MAX}),Z.prototype.get_PE_DD_MAX=Z.prototype.get_PE_DD_MAX=function(){var f=this.ptr;return Ic(f)},Object.defineProperty(Z.prototype,"PE_DD_MAX",{get:Z.prototype.get_PE_DD_MAX}),Z.prototype.get_PE_DMS_MAX=Z.prototype.get_PE_DMS_MAX=function(){var f=this.ptr;return Of(f)},Object.defineProperty(Z.prototype,"PE_DMS_MAX",{get:Z.prototype.get_PE_DMS_MAX}),Z.prototype.get_PE_DDM_MAX=Z.prototype.get_PE_DDM_MAX=function(){var f=this.ptr;return $f(f)},Object.defineProperty(Z.prototype,"PE_DDM_MAX",{get:Z.prototype.get_PE_DDM_MAX}),Z.prototype.get_PE_UTM_MAX=Z.prototype.get_PE_UTM_MAX=function(){var f=this.ptr;return Ff(f)},Object.defineProperty(Z.prototype,"PE_UTM_MAX",{get:Z.prototype.get_PE_UTM_MAX}),Z.prototype.get_PE_PARM_MAX=Z.prototype.get_PE_PARM_MAX=function(){var f=this.ptr;return Vf(f)},Object.defineProperty(Z.prototype,"PE_PARM_MAX",{get:Z.prototype.get_PE_PARM_MAX}),Z.prototype.get_PE_TYPE_NONE=Z.prototype.get_PE_TYPE_NONE=function(){var f=this.ptr;return Uf(f)},Object.defineProperty(Z.prototype,"PE_TYPE_NONE",{get:Z.prototype.get_PE_TYPE_NONE}),Z.prototype.get_PE_TYPE_GEOGCS=Z.prototype.get_PE_TYPE_GEOGCS=function(){var f=this.ptr;return Wf(f)},Object.defineProperty(Z.prototype,"PE_TYPE_GEOGCS",{get:Z.prototype.get_PE_TYPE_GEOGCS}),Z.prototype.get_PE_TYPE_PROJCS=Z.prototype.get_PE_TYPE_PROJCS=function(){var f=this.ptr;return zf(f)},Object.defineProperty(Z.prototype,"PE_TYPE_PROJCS",{get:Z.prototype.get_PE_TYPE_PROJCS}),Z.prototype.get_PE_TYPE_GEOGTRAN=Z.prototype.get_PE_TYPE_GEOGTRAN=function(){var f=this.ptr;return Gf(f)},Object.defineProperty(Z.prototype,"PE_TYPE_GEOGTRAN",{get:Z.prototype.get_PE_TYPE_GEOGTRAN}),Z.prototype.get_PE_TYPE_COORDSYS=Z.prototype.get_PE_TYPE_COORDSYS=function(){var f=this.ptr;return Bf(f)},Object.defineProperty(Z.prototype,"PE_TYPE_COORDSYS",{get:Z.prototype.get_PE_TYPE_COORDSYS}),Z.prototype.get_PE_TYPE_UNIT=Z.prototype.get_PE_TYPE_UNIT=function(){var f=this.ptr;return qf(f)},Object.defineProperty(Z.prototype,"PE_TYPE_UNIT",{get:Z.prototype.get_PE_TYPE_UNIT}),Z.prototype.get_PE_TYPE_LINUNIT=Z.prototype.get_PE_TYPE_LINUNIT=function(){var f=this.ptr;return jf(f)},Object.defineProperty(Z.prototype,"PE_TYPE_LINUNIT",{get:Z.prototype.get_PE_TYPE_LINUNIT}),Z.prototype.get_PE_STR_OPTS_NONE=Z.prototype.get_PE_STR_OPTS_NONE=function(){var f=this.ptr;return Hf(f)},Object.defineProperty(Z.prototype,"PE_STR_OPTS_NONE",{get:Z.prototype.get_PE_STR_OPTS_NONE}),Z.prototype.get_PE_STR_AUTH_NONE=Z.prototype.get_PE_STR_AUTH_NONE=function(){var f=this.ptr;return Zf(f)},Object.defineProperty(Z.prototype,"PE_STR_AUTH_NONE",{get:Z.prototype.get_PE_STR_AUTH_NONE}),Z.prototype.get_PE_STR_AUTH_TOP=Z.prototype.get_PE_STR_AUTH_TOP=function(){var f=this.ptr;return Yf(f)},Object.defineProperty(Z.prototype,"PE_STR_AUTH_TOP",{get:Z.prototype.get_PE_STR_AUTH_TOP}),Z.prototype.get_PE_STR_NAME_CANON=Z.prototype.get_PE_STR_NAME_CANON=function(){var f=this.ptr;return Jf(f)},Object.defineProperty(Z.prototype,"PE_STR_NAME_CANON",{get:Z.prototype.get_PE_STR_NAME_CANON}),Z.prototype.get_PE_STR_FMT_WKT=Z.prototype.get_PE_STR_FMT_WKT=function(){var f=this.ptr;return Xf(f)},Object.defineProperty(Z.prototype,"PE_STR_FMT_WKT",{get:Z.prototype.get_PE_STR_FMT_WKT}),Z.prototype.get_PE_STR_FMT_WKT2=Z.prototype.get_PE_STR_FMT_WKT2=function(){var f=this.ptr;return Qf(f)},Object.defineProperty(Z.prototype,"PE_STR_FMT_WKT2",{get:Z.prototype.get_PE_STR_FMT_WKT2}),Z.prototype.get_PE_PARM_X0=Z.prototype.get_PE_PARM_X0=function(){var f=this.ptr;return Kf(f)},Object.defineProperty(Z.prototype,"PE_PARM_X0",{get:Z.prototype.get_PE_PARM_X0}),Z.prototype.get_PE_PARM_ND=Z.prototype.get_PE_PARM_ND=function(){var f=this.ptr;return ep(f)},Object.defineProperty(Z.prototype,"PE_PARM_ND",{get:Z.prototype.get_PE_PARM_ND}),Z.prototype.get_PE_TRANSFORM_1_TO_2=Z.prototype.get_PE_TRANSFORM_1_TO_2=function(){var f=this.ptr;return tp(f)},Object.defineProperty(Z.prototype,"PE_TRANSFORM_1_TO_2",{get:Z.prototype.get_PE_TRANSFORM_1_TO_2}),Z.prototype.get_PE_TRANSFORM_2_TO_1=Z.prototype.get_PE_TRANSFORM_2_TO_1=function(){var f=this.ptr;return rp(f)},Object.defineProperty(Z.prototype,"PE_TRANSFORM_2_TO_1",{get:Z.prototype.get_PE_TRANSFORM_2_TO_1}),Z.prototype.get_PE_TRANSFORM_P_TO_G=Z.prototype.get_PE_TRANSFORM_P_TO_G=function(){var f=this.ptr;return np(f)},Object.defineProperty(Z.prototype,"PE_TRANSFORM_P_TO_G",{get:Z.prototype.get_PE_TRANSFORM_P_TO_G}),Z.prototype.get_PE_TRANSFORM_G_TO_P=Z.prototype.get_PE_TRANSFORM_G_TO_P=function(){var f=this.ptr;return ip(f)},Object.defineProperty(Z.prototype,"PE_TRANSFORM_G_TO_P",{get:Z.prototype.get_PE_TRANSFORM_G_TO_P}),Z.prototype.get_PE_HORIZON_RECT=Z.prototype.get_PE_HORIZON_RECT=function(){var f=this.ptr;return op(f)},Object.defineProperty(Z.prototype,"PE_HORIZON_RECT",{get:Z.prototype.get_PE_HORIZON_RECT}),Z.prototype.get_PE_HORIZON_POLY=Z.prototype.get_PE_HORIZON_POLY=function(){var f=this.ptr;return sp(f)},Object.defineProperty(Z.prototype,"PE_HORIZON_POLY",{get:Z.prototype.get_PE_HORIZON_POLY}),Z.prototype.get_PE_HORIZON_LINE=Z.prototype.get_PE_HORIZON_LINE=function(){var f=this.ptr;return ap(f)},Object.defineProperty(Z.prototype,"PE_HORIZON_LINE",{get:Z.prototype.get_PE_HORIZON_LINE}),Z.prototype.get_PE_HORIZON_DELTA=Z.prototype.get_PE_HORIZON_DELTA=function(){var f=this.ptr;return lp(f)},Object.defineProperty(Z.prototype,"PE_HORIZON_DELTA",{get:Z.prototype.get_PE_HORIZON_DELTA}),Ut.prototype=Object.create(Ye.prototype),Ut.prototype.constructor=Ut,Ut.prototype.__class__=Ut,Ut.__cache__={},o.PeDouble=Ut,Ut.prototype.get_val=Ut.prototype.get_val=function(){var f=this.ptr;return up(f)},Ut.prototype.set_val=Ut.prototype.set_val=function(f){var T=this.ptr;f&&typeof f=="object"&&(f=f.ptr),dp(T,f)},Object.defineProperty(Ut.prototype,"val",{get:Ut.prototype.get_val,set:Ut.prototype.set_val}),Ut.prototype.__destroy__=Ut.prototype.__destroy__=function(){var f=this.ptr;fp(f)},ur.prototype=Object.create(Ye.prototype),ur.prototype.constructor=ur,ur.prototype.__class__=ur,ur.__cache__={},o.PeFactory=ur,ur.prototype.initialize=ur.prototype.initialize=function(f){xe.prepare(),f=f&&typeof f=="object"?f.ptr:$c(f),pp(f)},ur.prototype.factoryByType=ur.prototype.factoryByType=function(f,T){return f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),vt(mp(f,T),dt)},ur.prototype.fromString=ur.prototype.fromString=function(f,T){return xe.prepare(),f&&typeof f=="object"&&(f=f.ptr),T=T&&typeof T=="object"?T.ptr:$c(T),vt(hp(f,T),dt)},ur.prototype.getCode=ur.prototype.getCode=function(f){return f&&typeof f=="object"&&(f=f.ptr),gp(f)},At.prototype=Object.create(Ye.prototype),At.prototype.constructor=At,At.prototype.__class__=At,At.__cache__={},o.PeGCSExtent=At,At.prototype.getLLon=At.prototype.getLLon=function(){var f=this.ptr;return yp(f)},At.prototype.getSLat=At.prototype.getSLat=function(){var f=this.ptr;return bp(f)},At.prototype.getRLon=At.prototype.getRLon=function(){var f=this.ptr;return _p(f)},At.prototype.getNLat=At.prototype.getNLat=function(){var f=this.ptr;return vp(f)},At.prototype.__destroy__=At.prototype.__destroy__=function(){var f=this.ptr;Sp(f)},at.prototype=Object.create(Vt.prototype),at.prototype.constructor=at,at.prototype.__class__=at,at.__cache__={},o.PeGeogcs=at,at.prototype.getDatum=at.prototype.getDatum=function(){var f=this.ptr;return vt(xp(f),Jt)},at.prototype.getPrimem=at.prototype.getPrimem=function(){var f=this.ptr;return vt(Cp(f),Xt)},at.prototype.getUnit=at.prototype.getUnit=function(){var f=this.ptr;return vt(Tp(f),zt)},at.prototype.isEqual=at.prototype.isEqual=function(f){var T=this.ptr;return f&&typeof f=="object"&&(f=f.ptr),!!Ep(T,f)},at.prototype.getCode=at.prototype.getCode=function(){var f=this.ptr;return Mp(f)},at.prototype.getName=at.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Lp(T,f))},at.prototype.getType=at.prototype.getType=function(){var f=this.ptr;return Ip(f)},lt.prototype=Object.create(dt.prototype),lt.prototype.constructor=lt,lt.prototype.__class__=lt,lt.__cache__={},o.PeGeogtran=lt,lt.prototype.isEqual=lt.prototype.isEqual=function(f){var T=this.ptr;return f&&typeof f=="object"&&(f=f.ptr),!!Pp(T,f)},lt.prototype.getGeogcs1=lt.prototype.getGeogcs1=function(){var f=this.ptr;return vt(Ap(f),at)},lt.prototype.getGeogcs2=lt.prototype.getGeogcs2=function(){var f=this.ptr;return vt(Np(f),at)},lt.prototype.getParameters=lt.prototype.getParameters=function(){var f=this.ptr;return kp(f)},lt.prototype.loadConstants=lt.prototype.loadConstants=function(){var f=this.ptr;return!!Pc(f)},lt.prototype.getCode=lt.prototype.getCode=function(){var f=this.ptr;return Ac(f)},lt.prototype.getName=lt.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Rp(T,f))},lt.prototype.getType=lt.prototype.getType=function(){var f=this.ptr;return Dp(f)},Nr.prototype=Object.create(Ye.prototype),Nr.prototype.constructor=Nr,Nr.prototype.__class__=Nr,Nr.__cache__={},o.PeGTlistExtended=Nr,Nr.prototype.getGTlist=Nr.prototype.getGTlist=function(f,T,A,B,J,le){return f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),A&&typeof A=="object"&&(A=A.ptr),B&&typeof B=="object"&&(B=B.ptr),J&&typeof J=="object"&&(J=J.ptr),le&&typeof le=="object"&&(le=le.ptr),vt(Nc(f,T,A,B,J,le),vr)},Nr.prototype.get_PE_GTLIST_OPTS_COMMON=Nr.prototype.get_PE_GTLIST_OPTS_COMMON=function(){var f=this.ptr;return Op(f)},Object.defineProperty(Nr.prototype,"PE_GTLIST_OPTS_COMMON",{get:Nr.prototype.get_PE_GTLIST_OPTS_COMMON}),vr.prototype=Object.create(Ye.prototype),vr.prototype.constructor=vr,vr.prototype.__class__=vr,vr.__cache__={},o.PeGTlistExtendedEntry=vr,vr.prototype.getEntries=vr.prototype.getEntries=function(){var f=this.ptr;return vt(kc(f),jr)},vr.prototype.getSteps=vr.prototype.getSteps=function(){var f=this.ptr;return $p(f)},vr.prototype.Delete=vr.prototype.Delete=function(f){f&&typeof f=="object"&&(f=f.ptr),Fp(f)},jr.prototype=Object.create(Ye.prototype),jr.prototype.constructor=jr,jr.prototype.__class__=jr,jr.__cache__={},o.PeGTlistExtendedGTs=jr,jr.prototype.getDirection=jr.prototype.getDirection=function(){var f=this.ptr;return Vp(f)},jr.prototype.getGeogtran=jr.prototype.getGeogtran=function(){var f=this.ptr;return vt(Rc(f),lt)},Et.prototype=Object.create(Ye.prototype),Et.prototype.constructor=Et,Et.prototype.__class__=Et,Et.__cache__={},o.PeHorizon=Et,Et.prototype.getNump=Et.prototype.getNump=function(){var f=this.ptr;return Up(f)},Et.prototype.getKind=Et.prototype.getKind=function(){var f=this.ptr;return Wp(f)},Et.prototype.getInclusive=Et.prototype.getInclusive=function(){var f=this.ptr;return zp(f)},Et.prototype.getSize=Et.prototype.getSize=function(){var f=this.ptr;return Gp(f)},Et.prototype.getCoord=Et.prototype.getCoord=function(){var f=this.ptr;return Bp(f)},Wt.prototype=Object.create(Ye.prototype),Wt.prototype.constructor=Wt,Wt.prototype.__class__=Wt,Wt.__cache__={},o.PeInteger=Wt,Wt.prototype.get_val=Wt.prototype.get_val=function(){var f=this.ptr;return jp(f)},Wt.prototype.set_val=Wt.prototype.set_val=function(f){var T=this.ptr;f&&typeof f=="object"&&(f=f.ptr),Hp(T,f)},Object.defineProperty(Wt.prototype,"val",{get:Wt.prototype.get_val,set:Wt.prototype.set_val}),Wt.prototype.__destroy__=Wt.prototype.__destroy__=function(){var f=this.ptr;Zp(f)},dr.prototype=Object.create(Ye.prototype),dr.prototype.constructor=dr,dr.prototype.__class__=dr,dr.__cache__={},o.PeLineType=dr,dr.prototype.geodetic_distance=dr.prototype.geodetic_distance=function(f,T,A,B,J,le,he,fe,Ee,Sr){f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),A&&typeof A=="object"&&(A=A.ptr),B&&typeof B=="object"&&(B=B.ptr),J&&typeof J=="object"&&(J=J.ptr),le&&typeof le=="object"&&(le=le.ptr),he&&typeof he=="object"&&(he=he.ptr),fe&&typeof fe=="object"&&(fe=fe.ptr),Ee&&typeof Ee=="object"&&(Ee=Ee.ptr),Sr&&typeof Sr=="object"&&(Sr=Sr.ptr),Yp(f,T,A,B,J,le,he,fe,Ee,Sr)},dr.prototype.geodetic_coordinate=dr.prototype.geodetic_coordinate=function(f,T,A,B,J,le,he,fe,Ee){f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),A&&typeof A=="object"&&(A=A.ptr),B&&typeof B=="object"&&(B=B.ptr),J&&typeof J=="object"&&(J=J.ptr),le&&typeof le=="object"&&(le=le.ptr),he&&typeof he=="object"&&(he=he.ptr),fe&&typeof fe=="object"&&(fe=fe.ptr),Ee&&typeof Ee=="object"&&(Ee=Ee.ptr),Jp(f,T,A,B,J,le,he,fe,Ee)},dr.prototype.geodesic_coordinate=dr.prototype.geodesic_coordinate=function(f,T,A,B,J,le,he,fe){f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),A&&typeof A=="object"&&(A=A.ptr),B&&typeof B=="object"&&(B=B.ptr),J&&typeof J=="object"&&(J=J.ptr),le&&typeof le=="object"&&(le=le.ptr),he&&typeof he=="object"&&(he=he.ptr),fe&&typeof fe=="object"&&(fe=fe.ptr),Xp(f,T,A,B,J,le,he,fe)},dr.prototype.great_elliptic_distance=dr.prototype.great_elliptic_distance=function(f,T,A,B,J,le,he,fe,Ee){f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),A&&typeof A=="object"&&(A=A.ptr),B&&typeof B=="object"&&(B=B.ptr),J&&typeof J=="object"&&(J=J.ptr),le&&typeof le=="object"&&(le=le.ptr),he&&typeof he=="object"&&(he=he.ptr),fe&&typeof fe=="object"&&(fe=fe.ptr),Ee&&typeof Ee=="object"&&(Ee=Ee.ptr),Qp(f,T,A,B,J,le,he,fe,Ee)},nn.prototype=Object.create(Ye.prototype),nn.prototype.constructor=nn,nn.prototype.__class__=nn,nn.__cache__={},o.PeMath=nn,nn.prototype.q=nn.prototype.q=function(f,T,A){return f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),A&&typeof A=="object"&&(A=A.ptr),Dc(f,T,A)},nn.prototype.q90=nn.prototype.q90=function(f,T){return f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),Kp(f,T)},Je.prototype=Object.create(Ye.prototype),Je.prototype.constructor=Je,Je.prototype.__class__=Je,Je.__cache__={},o.PeNotationMgrs=Je,Je.prototype.get_PE_MGRS_STYLE_NEW=Je.prototype.get_PE_MGRS_STYLE_NEW=function(){var f=this.ptr;return Oc(f)},Object.defineProperty(Je.prototype,"PE_MGRS_STYLE_NEW",{get:Je.prototype.get_PE_MGRS_STYLE_NEW}),Je.prototype.get_PE_MGRS_STYLE_OLD=Je.prototype.get_PE_MGRS_STYLE_OLD=function(){var f=this.ptr;return em(f)},Object.defineProperty(Je.prototype,"PE_MGRS_STYLE_OLD",{get:Je.prototype.get_PE_MGRS_STYLE_OLD}),Je.prototype.get_PE_MGRS_STYLE_AUTO=Je.prototype.get_PE_MGRS_STYLE_AUTO=function(){var f=this.ptr;return tm(f)},Object.defineProperty(Je.prototype,"PE_MGRS_STYLE_AUTO",{get:Je.prototype.get_PE_MGRS_STYLE_AUTO}),Je.prototype.get_PE_MGRS_180_ZONE_1_PLUS=Je.prototype.get_PE_MGRS_180_ZONE_1_PLUS=function(){var f=this.ptr;return rm(f)},Object.defineProperty(Je.prototype,"PE_MGRS_180_ZONE_1_PLUS",{get:Je.prototype.get_PE_MGRS_180_ZONE_1_PLUS}),Je.prototype.get_PE_MGRS_ADD_SPACES=Je.prototype.get_PE_MGRS_ADD_SPACES=function(){var f=this.ptr;return nm(f)},Object.defineProperty(Je.prototype,"PE_MGRS_ADD_SPACES",{get:Je.prototype.get_PE_MGRS_ADD_SPACES}),ft.prototype=Object.create(Ye.prototype),ft.prototype.constructor=ft,ft.prototype.__class__=ft,ft.__cache__={},o.PeNotationUtm=ft,ft.prototype.get_PE_UTM_OPTS_NONE=ft.prototype.get_PE_UTM_OPTS_NONE=function(){var f=this.ptr;return im(f)},Object.defineProperty(ft.prototype,"PE_UTM_OPTS_NONE",{get:ft.prototype.get_PE_UTM_OPTS_NONE}),ft.prototype.get_PE_UTM_OPTS_NS=ft.prototype.get_PE_UTM_OPTS_NS=function(){var f=this.ptr;return om(f)},Object.defineProperty(ft.prototype,"PE_UTM_OPTS_NS",{get:ft.prototype.get_PE_UTM_OPTS_NS}),ft.prototype.get_PE_UTM_OPTS_NS_STRICT=ft.prototype.get_PE_UTM_OPTS_NS_STRICT=function(){var f=this.ptr;return sm(f)},Object.defineProperty(ft.prototype,"PE_UTM_OPTS_NS_STRICT",{get:ft.prototype.get_PE_UTM_OPTS_NS_STRICT}),ft.prototype.get_PE_UTM_OPTS_ADD_SPACES=ft.prototype.get_PE_UTM_OPTS_ADD_SPACES=function(){var f=this.ptr;return am(f)},Object.defineProperty(ft.prototype,"PE_UTM_OPTS_ADD_SPACES",{get:ft.prototype.get_PE_UTM_OPTS_ADD_SPACES}),fr.prototype=Object.create(dt.prototype),fr.prototype.constructor=fr,fr.prototype.__class__=fr,fr.__cache__={},o.PeParameter=fr,fr.prototype.getValue=fr.prototype.getValue=function(){var f=this.ptr;return lm(f)},fr.prototype.getCode=fr.prototype.getCode=function(){var f=this.ptr;return cm(f)},fr.prototype.getName=fr.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(um(T,f))},fr.prototype.getType=fr.prototype.getType=function(){var f=this.ptr;return dm(f)},Se.prototype=Object.create(Ye.prototype),Se.prototype.constructor=Se,Se.prototype.__class__=Se,Se.__cache__={},o.PePCSInfo=Se,Se.prototype.getCentralMeridian=Se.prototype.getCentralMeridian=function(){var f=this.ptr;return fm(f)},Se.prototype.getDomainMinx=Se.prototype.getDomainMinx=function(){var f=this.ptr;return pm(f)},Se.prototype.getDomainMiny=Se.prototype.getDomainMiny=function(){var f=this.ptr;return mm(f)},Se.prototype.getDomainMaxx=Se.prototype.getDomainMaxx=function(){var f=this.ptr;return hm(f)},Se.prototype.getDomainMaxy=Se.prototype.getDomainMaxy=function(){var f=this.ptr;return gm(f)},Se.prototype.getNorthPoleLocation=Se.prototype.getNorthPoleLocation=function(){var f=this.ptr;return wm(f)},Se.prototype.getNorthPoleGeometry=Se.prototype.getNorthPoleGeometry=function(){var f=this.ptr;return ym(f)},Se.prototype.getSouthPoleLocation=Se.prototype.getSouthPoleLocation=function(){var f=this.ptr;return bm(f)},Se.prototype.getSouthPoleGeometry=Se.prototype.getSouthPoleGeometry=function(){var f=this.ptr;return _m(f)},Se.prototype.isDensificationNeeded=Se.prototype.isDensificationNeeded=function(){var f=this.ptr;return!!vm(f)},Se.prototype.isGcsHorizonMultiOverlap=Se.prototype.isGcsHorizonMultiOverlap=function(){var f=this.ptr;return!!Sm(f)},Se.prototype.isPannableRectangle=Se.prototype.isPannableRectangle=function(){var f=this.ptr;return!!xm(f)},Se.prototype.generate=Se.prototype.generate=function(f,T){return f&&typeof f=="object"&&(f=f.ptr),T&&typeof T=="object"&&(T=T.ptr),vt(Cm(f,T),Se)},Se.prototype.get_PE_PCSINFO_OPTION_NONE=Se.prototype.get_PE_PCSINFO_OPTION_NONE=function(){var f=this.ptr;return Tm(f)},Object.defineProperty(Se.prototype,"PE_PCSINFO_OPTION_NONE",{get:Se.prototype.get_PE_PCSINFO_OPTION_NONE}),Se.prototype.get_PE_PCSINFO_OPTION_DOMAIN=Se.prototype.get_PE_PCSINFO_OPTION_DOMAIN=function(){var f=this.ptr;return Em(f)},Object.defineProperty(Se.prototype,"PE_PCSINFO_OPTION_DOMAIN",{get:Se.prototype.get_PE_PCSINFO_OPTION_DOMAIN}),Se.prototype.get_PE_POLE_OUTSIDE_BOUNDARY=Se.prototype.get_PE_POLE_OUTSIDE_BOUNDARY=function(){var f=this.ptr;return Mm(f)},Object.defineProperty(Se.prototype,"PE_POLE_OUTSIDE_BOUNDARY",{get:Se.prototype.get_PE_POLE_OUTSIDE_BOUNDARY}),Se.prototype.get_PE_POLE_POINT=Se.prototype.get_PE_POLE_POINT=function(){var f=this.ptr;return Lm(f)},Object.defineProperty(Se.prototype,"PE_POLE_POINT",{get:Se.prototype.get_PE_POLE_POINT}),Xt.prototype=Object.create(dt.prototype),Xt.prototype.constructor=Xt,Xt.prototype.__class__=Xt,Xt.__cache__={},o.PePrimem=Xt,Xt.prototype.getLongitude=Xt.prototype.getLongitude=function(){var f=this.ptr;return Im(f)},Xt.prototype.getCode=Xt.prototype.getCode=function(){var f=this.ptr;return Pm(f)},Xt.prototype.getName=Xt.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Am(T,f))},Xt.prototype.getType=Xt.prototype.getType=function(){var f=this.ptr;return Nm(f)},ze.prototype=Object.create(Vt.prototype),ze.prototype.constructor=ze,ze.prototype.__class__=ze,ze.__cache__={},o.PeProjcs=ze,ze.prototype.getGeogcs=ze.prototype.getGeogcs=function(){var f=this.ptr;return vt(km(f),at)},ze.prototype.getProjection=ze.prototype.getProjection=function(){var f=this.ptr;return vt(Rm(f),dt)},ze.prototype.getParameters=ze.prototype.getParameters=function(){var f=this.ptr;return Dm(f)},ze.prototype.getUnit=ze.prototype.getUnit=function(){var f=this.ptr;return vt(Om(f),zt)},ze.prototype.loadConstants=ze.prototype.loadConstants=function(){var f=this.ptr;return!!$m(f)},ze.prototype.horizonGcsGenerate=ze.prototype.horizonGcsGenerate=function(){var f=this.ptr;return vt(Fm(f),Et)},ze.prototype.horizonPcsGenerate=ze.prototype.horizonPcsGenerate=function(){var f=this.ptr;return vt(Vm(f),Et)},ze.prototype.isEqual=ze.prototype.isEqual=function(f){var T=this.ptr;return f&&typeof f=="object"&&(f=f.ptr),!!Um(T,f)},ze.prototype.getCode=ze.prototype.getCode=function(){var f=this.ptr;return Wm(f)},ze.prototype.getName=ze.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(zm(T,f))},ze.prototype.getType=ze.prototype.getType=function(){var f=this.ptr;return Gm(f)},Nt.prototype=Object.create(dt.prototype),Nt.prototype.constructor=Nt,Nt.prototype.__class__=Nt,Nt.__cache__={},o.PeSpheroid=Nt,Nt.prototype.getAxis=Nt.prototype.getAxis=function(){var f=this.ptr;return Bm(f)},Nt.prototype.getFlattening=Nt.prototype.getFlattening=function(){var f=this.ptr;return qm(f)},Nt.prototype.getCode=Nt.prototype.getCode=function(){var f=this.ptr;return jm(f)},Nt.prototype.getName=Nt.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Hm(T,f))},Nt.prototype.getType=Nt.prototype.getType=function(){var f=this.ptr;return Zm(f)},zt.prototype=Object.create(dt.prototype),zt.prototype.constructor=zt,zt.prototype.__class__=zt,zt.__cache__={},o.PeUnit=zt,zt.prototype.getUnitFactor=zt.prototype.getUnitFactor=function(){var f=this.ptr;return Ym(f)},zt.prototype.getCode=zt.prototype.getCode=function(){var f=this.ptr;return Jm(f)},zt.prototype.getName=zt.prototype.getName=function(f){var T=this.ptr;return xe.prepare(),typeof f=="object"&&(f=rn(f)),qr(Xm(T,f))},zt.prototype.getType=zt.prototype.getType=function(){var f=this.ptr;return Qm(f)},Rn.prototype=Object.create(Ye.prototype),Rn.prototype.constructor=Rn,Rn.prototype.__class__=Rn,Rn.__cache__={},o.PeVersion=Rn,Rn.prototype.version_string=Rn.prototype.version_string=function(){var f=this.ptr;return qr(Km(f))},o.ensureCache=xe,o.ensureString=$c,o.ensureInt8=rn,o.ensureInt16=hy,o.ensureInt32=gy,o.ensureFloat32=wy,o.ensureFloat64=yy,s},FI.exports=VI;Cq=RI(UI.exports),Tq=Object.freeze(Object.defineProperty({__proto__:null,default:Cq},Symbol.toStringTag,{value:"Module"}))});function GI(){return!!P}function Eq(){return!!Q("esri-wasm")}function BI(){return HS||(HS=Promise.resolve().then(()=>(zI(),WI)).then(e=>e.p).then(({default:e})=>e({locateFile:t=>ql(`esri/geometry/support/${t}`)})).then(e=>{HI(e)}),HS)}function HI(e){function t(o,s,a){o[s]=a(o[s])}P=e,ut.init(),bw.init(),_w.init(),vw.init(),Sw.init(),qI=class extends P.PeDouble{constructor(o=0){super(o)}destroy(){P.destroy(this)}[Symbol.dispose](){this.destroy()}},jI=class extends P.PeGCSExtent{destroy(){P.destroy(this)}[Symbol.dispose](){this.destroy()}};let r=[P.PeDatum,P.PeGeogcs,P.PeGeogtran,P.PeObject,P.PeParameter,P.PePrimem,P.PeProjcs,P.PeSpheroid,P.PeUnit];for(let o of r)t(o.prototype,"getName",s=>function(){return s.call(this,new Array(ut.PE_NAME_MAX))});for(let o of[P.PeGeogtran,P.PeProjcs])t(o.prototype,"getParameters",s=>function(){let a=new Array(ut.PE_PARM_MAX),u=s.call(this);for(let d=0;d<a.length;d++){let p=P.getValue(u,"*");a[d]=p?P.wrapPointer(p,P.PeParameter):null,u+=Int32Array.BYTES_PER_ELEMENT}return a});t(P.PeHorizon.prototype,"getCoord",o=>function(s=!1){let a=this.getSize();if(!a)return null;let u=[];return hs(u,a,o.call(this),s),u}),t(P.PeGTlistExtendedEntry.prototype,"getEntries",o=>{let s=P._pe_getPeGTlistExtendedGTsSize();return function(){let a=null,u=o.call(this);if(!P.compare(u,P.NULL)){a=[u];let d=this.getSteps();if(d>1){let p=P.getPointer(u);for(let m=1;m<d;m++)a.push(P.wrapPointer(p+s*m,P.PeGTlistExtendedGTs))}}return a}});let n=P._pe_getPeHorizonSize(),i=o=>function(){let s=this._cache;if(s||(s=new Map,this._cache=s),s.has(o))return s.get(o);let a=null,u=o.call(this);if(!P.compare(u,P.NULL)){a=[u];let d=u.getNump();if(d>1){let p=P.getPointer(u);for(let m=1;m<d;m++)a.push(P.wrapPointer(p+n*m,P.PeHorizon))}}return s.set(o,a),a};t(P.PeProjcs.prototype,"horizonGcsGenerate",i),t(P.PeProjcs.prototype,"horizonPcsGenerate",i),P.PeObject.prototype.toString=function(o=ut.PE_STR_OPTS_NONE){P.ensureCache.prepare();let s=P.getPointer(this),a=P.ensureInt8(new Array(ut.PE_BUFFER_MAX));return P.UTF8ToString(P._pe_object_to_string_ext(s,o,a))}}function io(e){if(!e)return;let t=P.getClass(e);if(!t)return;let r=P.getCache(t);if(!r)return;let n=P.getPointer(e);n&&delete r[n]}function ww(e,t){let r=[],n=new Array(t);for(let i=0;i<e;i++)r.push(P.ensureInt8(n));return r}function Sa(e){return ArrayBuffer.isView(e)?e:Array.isArray(e[0])?e.flat():e}function hs(e,t,r,n=!1){if(n)for(let i=0;i<2*t;i++)e[i]=P.getValue(r+i*Float64Array.BYTES_PER_ELEMENT,"double");else{let i=e.length===0;for(let o=0;o<t;o++)i&&(e[o]=new Array(2)),e[o][0]=P.getValue(r,"double"),e[o][1]=P.getValue(r+Float64Array.BYTES_PER_ELEMENT,"double"),r+=2*Float64Array.BYTES_PER_ELEMENT}}var HS,P,ZS,ut,qI,yw,jI,bw,YS,JS,XS,QS,KS,_w,e4,vw,Sw,t4,Ihe,ZI=L(()=>{J0();Be();P=null;(function(e){function t(o,s,a){P.ensureCache.prepare();let u=Sa(a),d=a===u,p=P.ensureFloat64(u),m=P._pe_geog_to_proj(P.getPointer(o),s,p);return m&&hs(a,s,p,d),m}function r(o,s,a,u){switch(u){case ut.PE_TRANSFORM_P_TO_G:return n(o,s,a);case ut.PE_TRANSFORM_G_TO_P:return t(o,s,a)}return 0}function n(o,s,a){return i(o,s,a,0)}function i(o,s,a,u){P.ensureCache.prepare();let d=Sa(a),p=a===d,m=P.ensureFloat64(d),w=P._pe_proj_to_geog_center(P.getPointer(o),s,m,u);return w&&hs(a,s,m,p),w}e.geogToProj=t,e.projGeog=r,e.projToGeog=n,e.projToGeogCenter=i})(ZS||(ZS={})),function(e){function t(){e.PE_BUFFER_MAX=P.PeDefs.prototype.PE_BUFFER_MAX,e.PE_NAME_MAX=P.PeDefs.prototype.PE_NAME_MAX,e.PE_MGRS_MAX=P.PeDefs.prototype.PE_MGRS_MAX,e.PE_USNG_MAX=P.PeDefs.prototype.PE_USNG_MAX,e.PE_DD_MAX=P.PeDefs.prototype.PE_DD_MAX,e.PE_DDM_MAX=P.PeDefs.prototype.PE_DDM_MAX,e.PE_DMS_MAX=P.PeDefs.prototype.PE_DMS_MAX,e.PE_UTM_MAX=P.PeDefs.prototype.PE_UTM_MAX,e.PE_PARM_MAX=P.PeDefs.prototype.PE_PARM_MAX,e.PE_TYPE_NONE=P.PeDefs.prototype.PE_TYPE_NONE,e.PE_TYPE_GEOGCS=P.PeDefs.prototype.PE_TYPE_GEOGCS,e.PE_TYPE_PROJCS=P.PeDefs.prototype.PE_TYPE_PROJCS,e.PE_TYPE_GEOGTRAN=P.PeDefs.prototype.PE_TYPE_GEOGTRAN,e.PE_TYPE_COORDSYS=P.PeDefs.prototype.PE_TYPE_COORDSYS,e.PE_TYPE_UNIT=P.PeDefs.prototype.PE_TYPE_UNIT,e.PE_TYPE_LINUNIT=P.PeDefs.prototype.PE_TYPE_LINUNIT,e.PE_STR_OPTS_NONE=P.PeDefs.prototype.PE_STR_OPTS_NONE,e.PE_STR_AUTH_NONE=P.PeDefs.prototype.PE_STR_AUTH_NONE,e.PE_STR_AUTH_TOP=P.PeDefs.prototype.PE_STR_AUTH_TOP,e.PE_STR_NAME_CANON=P.PeDefs.prototype.PE_STR_NAME_CANON,e.PE_STR_FMT_WKT=P.PeDefs.prototype.PE_STR_FMT_WKT,e.PE_STR_FMT_WKT2=P.PeDefs.prototype.PE_STR_FMT_WKT2,e.PE_PARM_X0=P.PeDefs.prototype.PE_PARM_X0,e.PE_PARM_ND=P.PeDefs.prototype.PE_PARM_ND,e.PE_TRANSFORM_1_TO_2=P.PeDefs.prototype.PE_TRANSFORM_1_TO_2,e.PE_TRANSFORM_2_TO_1=P.PeDefs.prototype.PE_TRANSFORM_2_TO_1,e.PE_TRANSFORM_P_TO_G=P.PeDefs.prototype.PE_TRANSFORM_P_TO_G,e.PE_TRANSFORM_G_TO_P=P.PeDefs.prototype.PE_TRANSFORM_G_TO_P,e.PE_HORIZON_RECT=P.PeDefs.prototype.PE_HORIZON_RECT,e.PE_HORIZON_POLY=P.PeDefs.prototype.PE_HORIZON_POLY,e.PE_HORIZON_LINE=P.PeDefs.prototype.PE_HORIZON_LINE,e.PE_HORIZON_DELTA=P.PeDefs.prototype.PE_HORIZON_DELTA}e.init=t}(ut||(ut={}));qI=null;(function(e){let t={},r={},n=_=>{if(_){let S=_.getType();switch(S){case ut.PE_TYPE_GEOGCS:_=P.castObject(_,P.PeGeogcs);break;case ut.PE_TYPE_PROJCS:_=P.castObject(_,P.PeProjcs);break;case ut.PE_TYPE_GEOGTRAN:_=P.castObject(_,P.PeGeogtran);break;default:S&ut.PE_TYPE_UNIT&&(_=P.castObject(_,P.PeUnit))}}return _};function i(){P.PeFactory.prototype.initialize(null)}function o(_){return s(ut.PE_TYPE_COORDSYS,_)}function s(_,S){let C=null,M=t[_];if(M||(M={},t[_]=M),M.hasOwnProperty(String(S)))C=M[S];else{let k=P.PeFactory.prototype.factoryByType(_,S);P.compare(k,P.NULL)||(C=k,M[S]=C)}return C=n(C),C}function a(_,S){let C=null,M=r[_];if(M||(M={},r[_]=M),M.hasOwnProperty(S))C=M[S];else{let k=P.PeFactory.prototype.fromString(_,S);P.compare(k,P.NULL)||(C=k,M[S]=C)}return C=n(C),C}function u(_){return s(ut.PE_TYPE_GEOGCS,_)}function d(_){return s(ut.PE_TYPE_GEOGTRAN,_)}function p(_){return P.PeFactory.prototype.getCode(_)}function m(_){return s(ut.PE_TYPE_PROJCS,_)}function w(_){return s(ut.PE_TYPE_UNIT,_)}e.initialize=i,e.coordsys=o,e.factoryByType=s,e.fromString=a,e.geogcs=u,e.geogtran=d,e.getCode=p,e.projcs=m,e.unit=w})(yw||(yw={}));jI=null;(function(e){let t;function r(){e.PE_GTLIST_OPTS_COMMON=P.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,t=P._pe_getPeGTlistExtendedEntrySize()}function n(i,o,s,a,u,d){let p=null,m=new P.PeInteger(d);try{let w=P.PeGTlistExtended.prototype.getGTlist(i,o,s,a,u,m);if((d=m.val)&&(p=[w],d>1)){let _=P.getPointer(w);for(let S=1;S<d;S++)p.push(P.wrapPointer(_+t*S,P.PeGTlistExtendedEntry))}}finally{P.destroy(m)}return p}e.init=r,e.getGTlist=n})(bw||(bw={})),function(e){function t(r){if(r?.length){for(let n of r)io(n),n.getEntries().forEach(i=>{io(i);let o=i.getGeogtran();io(o),o.getParameters().forEach(io),[o.getGeogcs1(),o.getGeogcs2()].forEach(s=>{io(s);let a=s.getDatum();io(a),io(a.getSpheroid()),io(s.getPrimem()),io(s.getUnit())})});P.PeGTlistExtendedEntry.prototype.Delete(r[0])}}e.destroy=t}(YS||(YS={})),function(e){function t(r,n,i,o,s){P.ensureCache.prepare();let a=Sa(i),u=i===a,d=P.ensureFloat64(a),p=0;o&&(p=P.ensureFloat64(o));let m=P._pe_geog_to_geog(P.getPointer(r),n,d,p,s);return m&&hs(i,n,d,u),m}e.geogToGeog=t}(JS||(JS={})),function(e){function t(o,s,a,u,d,p,m,w){P.PeLineType.prototype.geodesic_coordinate(o,s,a,u,d,p,m,w)}function r(o,s,a,u,d,p,m,w,_){P.PeLineType.prototype.geodetic_coordinate(o,s,a,u,d,p,m,w,_)}function n(o,s,a,u,d,p,m,w,_,S){P.PeLineType.prototype.geodetic_distance(o,s,a,u,d,p,m,w,_,S)}function i(o,s,a,u,d,p,m,w,_){P.PeLineType.prototype.great_elliptic_distance(o,s,a,u,d,p,m,w,_)}e.geodesicCoordinate=t,e.geodeticCoordinate=r,e.geodeticDistance=n,e.greatEllipticDistance=i}(XS||(XS={})),function(e){function t(n,i,o){return P.PeMath.prototype.q(n,i,o)}function r(n,i){return P.PeMath.prototype.q90(n,i)}e.q=t,e.q90=r}(QS||(QS={})),function(e){let t=(d,p,m,w,_,S)=>{let C,M;switch(P.ensureCache.prepare(),d){case"dd":C=P._pe_geog_to_dd,M=ut.PE_DD_MAX;break;case"ddm":C=P._pe_geog_to_ddm,M=ut.PE_DDM_MAX;break;case"dms":C=P._pe_geog_to_dms,M=ut.PE_DMS_MAX}let k=0;p&&(k=P.getPointer(p));let I=Sa(w),N=P.ensureFloat64(I),V=ww(m,M),Y=C(k,m,N,_,P.ensureInt32(V));if(Y)for(let re=0;re<m;re++)S[re]=P.UTF8ToString(V[re]);return Y},r=(d,p,m,w,_)=>{let S;switch(P.ensureCache.prepare(),d){case"dd":S=P._pe_dd_to_geog;break;case"ddm":S=P._pe_ddm_to_geog;break;case"dms":S=P._pe_dms_to_geog}let C=0;p&&(C=P.getPointer(p));let M=w.map(V=>P.ensureString(V)),k=P.ensureInt32(M),I=P.ensureFloat64(new Array(2*m)),N=S(C,m,k,I);return N&&hs(_,m,I),N};function n(d,p,m,w,_){return t("dms",d,p,m,w,_)}function i(d,p,m,w){return r("dms",d,p,m,w)}function o(d,p,m,w,_){return t("ddm",d,p,m,w,_)}function s(d,p,m,w){return r("ddm",d,p,m,w)}function a(d,p,m,w,_){return t("dd",d,p,m,w,_)}function u(d,p,m,w){return r("dd",d,p,m,w)}e.geogToDms=n,e.dmsToGeog=i,e.geogToDdm=o,e.ddmToGeog=s,e.geogToDd=a,e.ddToGeog=u}(KS||(KS={})),function(e){function t(){e.PE_MGRS_STYLE_NEW=P.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,e.PE_MGRS_STYLE_OLD=P.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,e.PE_MGRS_STYLE_AUTO=P.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,e.PE_MGRS_180_ZONE_1_PLUS=P.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,e.PE_MGRS_ADD_SPACES=P.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES}function r(i,o,s,a,u,d,p){P.ensureCache.prepare();let m=0;i&&(m=P.getPointer(i));let w=Sa(s),_=P.ensureFloat64(w),S=ww(o,ut.PE_MGRS_MAX),C=P.ensureInt32(S),M=P._pe_geog_to_mgrs_extended(m,o,_,a,u,d,C);if(M)for(let k=0;k<o;k++)p[k]=P.UTF8ToString(S[k]);return M}function n(i,o,s,a,u){P.ensureCache.prepare();let d=0;i&&(d=P.getPointer(i));let p=s.map(S=>P.ensureString(S)),m=P.ensureInt32(p),w=P.ensureFloat64(new Array(2*o)),_=P._pe_mgrs_to_geog_extended(d,o,m,a,w);return _&&hs(u,o,w),_}e.init=t,e.geogToMgrsExtended=r,e.mgrsToGeogExtended=n}(_w||(_w={})),function(e){function t(n,i,o,s,a,u,d){P.ensureCache.prepare();let p=0;n&&(p=P.getPointer(n));let m=Sa(o),w=P.ensureFloat64(m),_=ww(i,ut.PE_MGRS_MAX),S=P.ensureInt32(_),C=P._pe_geog_to_usng(p,i,w,s,a,u,S);if(C)for(let M=0;M<i;M++)d[M]=P.UTF8ToString(_[M]);return C}function r(n,i,o,s){P.ensureCache.prepare();let a=0;n&&(a=P.getPointer(n));let u=o.map(w=>P.ensureString(w)),d=P.ensureInt32(u),p=P.ensureFloat64(new Array(2*i)),m=P._pe_usng_to_geog(a,i,d,p);return m&&hs(s,i,p),m}e.geogToUsng=t,e.usngToGeog=r}(e4||(e4={})),function(e){function t(){e.PE_UTM_OPTS_NONE=P.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,e.PE_UTM_OPTS_ADD_SPACES=P.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,e.PE_UTM_OPTS_NS=P.PeNotationUtm.prototype.PE_UTM_OPTS_NS}function r(i,o,s,a,u){P.ensureCache.prepare();let d=0;i&&(d=P.getPointer(i));let p=Sa(s),m=P.ensureFloat64(p),w=ww(o,ut.PE_UTM_MAX),_=P.ensureInt32(w),S=P._pe_geog_to_utm(d,o,m,a,_);if(S)for(let C=0;C<o;C++)u[C]=P.UTF8ToString(w[C]);return S}function n(i,o,s,a,u){P.ensureCache.prepare();let d=0;i&&(d=P.getPointer(i));let p=s.map(S=>P.ensureString(S)),m=P.ensureInt32(p),w=P.ensureFloat64(new Array(2*o)),_=P._pe_utm_to_geog(d,o,m,a,w);return _&&hs(u,o,w),_}e.init=t,e.geogToUtm=r,e.utmToGeog=n}(vw||(vw={})),function(e){let t=new Map;function r(){e.PE_PCSINFO_OPTION_NONE=P.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,e.PE_PCSINFO_OPTION_DOMAIN=P.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,e.PE_POLE_OUTSIDE_BOUNDARY=P.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,e.PE_POLE_POINT=P.PePCSInfo.prototype.PE_POLE_POINT}function n(i,o=e.PE_PCSINFO_OPTION_DOMAIN){let s=null,a=null;return t.has(i)&&(a=t.get(i),a[o]&&(s=a[o])),s||(s=P.PePCSInfo.prototype.generate(i,o),a||(a=[],t.set(i,a)),a[o]=s),s}e.init=r,e.generate=n}(Sw||(Sw={})),function(e){function t(){return P.PeVersion.prototype.version_string()}e.versionString=t}(t4||(t4={}));Ihe=Object.freeze(Object.defineProperty({__proto__:null,get PeCSTransformations(){return ZS},get PeDefs(){return ut},get PeDouble(){return qI},get PeFactory(){return yw},get PeGCSExtent(){return jI},get PeGTTransformations(){return JS},get PeGTlistExtended(){return bw},get PeGTlistExtendedEntry(){return YS},get PeLineType(){return XS},get PeMath(){return QS},get PeNotationDms(){return KS},get PeNotationMgrs(){return _w},get PeNotationUsng(){return e4},get PeNotationUtm(){return vw},get PePCSInfo(){return Sw},get PeVersion(){return t4},_init:HI,get _pe(){return P},isLoaded:GI,isSupported:Eq,load:BI},Symbol.toStringTag,{value:"Module"}))});var mc,YI=L(()=>{(function(e){e[e.CGCS2000=4490]="CGCS2000",e[e.GCSMARS2000=104971]="GCSMARS2000",e[e.GCSMARS2000_SPHERE=104905]="GCSMARS2000_SPHERE",e[e.GCSMOON2000=104903]="GCSMOON2000"})(mc||(mc={}))});var l,v,r4=L(()=>{v={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.1168,20.116756,5e4,15e4],units:["Meter","Foot","Foot_US","Foot_Clarke","Yard_Clarke","Link_Clarke","Yard_Sears","Foot_Sears","Chain_Sears","Chain_Benoit_1895_B","Yard_Indian","Yard_Indian_1937","Foot_Gold_Coast","Chain","Chain_Sears_1922_Truncated","50_Kilometers","150_Kilometers"],2066:5,2136:12,2155:2,2157:0,2158:0,2159:12,2160:12,2204:2,2219:0,2220:0,2254:2,2255:2,2256:1,2265:1,2266:1,2267:2,2268:2,2269:1,2270:1,2271:2,2272:2,2273:1,2294:0,2295:0,2314:3,2899:2,2900:2,2901:1,2909:1,2910:1,2911:2,2912:2,2913:1,2914:1,2992:1,2993:0,2994:1,3080:1,3089:2,3090:0,3091:2,3102:2,3141:0,3142:0,3167:14,3359:2,3360:0,3361:1,3362:0,3363:2,3364:0,3365:2,3366:3,3404:2,3405:0,3406:0,3407:3,3439:0,3440:0,3479:1,3480:0,3481:1,3482:0,3483:1,3484:0,3485:2,3486:0,3487:2,3488:0,3489:0,3490:2,3491:0,3492:2,3493:0,3494:2,3495:0,3496:2,3497:0,3498:2,3499:0,3500:2,3501:0,3502:2,3503:0,3504:2,3505:0,3506:2,3507:0,3508:2,3509:0,3510:2,3511:0,3512:2,3513:0,3514:0,3515:2,3516:0,3517:2,3518:0,3519:2,3520:0,3521:2,3522:0,3523:2,3524:0,3525:2,3526:0,3527:2,3528:0,3529:2,3530:0,3531:2,3532:0,3533:2,3534:0,3535:2,3536:0,3537:2,3538:0,3539:2,3540:0,3541:2,3542:0,3543:2,3544:0,3545:2,3546:0,3547:2,3548:0,3549:2,3550:0,3551:2,3552:0,3553:2,3582:2,3583:0,3584:2,3585:0,3586:2,3587:0,3588:1,3589:0,3590:1,3591:0,3592:0,3593:1,3598:2,3599:0,3600:2,3605:1,3606:0,3607:0,3608:2,3609:0,3610:2,3611:0,3612:2,3613:0,3614:2,3615:0,3616:2,3617:0,3618:2,3619:0,3620:2,3621:0,3622:2,3623:0,3624:2,3625:0,3626:2,3627:0,3628:2,3629:0,3630:2,3631:0,3632:2,3633:0,3634:1,3635:0,3636:1,3640:2,3641:0,3642:2,3643:0,3644:1,3645:0,3646:1,3647:0,3648:1,3649:0,3650:2,3651:0,3652:2,3653:0,3654:2,3655:0,3656:1,3657:0,3658:2,3659:0,3660:2,3661:0,3662:2,3663:0,3664:2,3668:2,3669:0,3670:2,3671:0,3672:2,3673:0,3674:2,3675:0,3676:1,3677:2,3678:0,3679:1,3680:2,3681:0,3682:1,3683:2,3684:0,3685:0,3686:2,3687:0,3688:2,3689:0,3690:2,3691:0,3692:2,3696:2,3697:0,3698:2,3699:0,3700:2,3793:0,3794:0,3812:0,3854:0,3857:0,3920:0,3978:0,3979:0,3991:2,3992:2,4026:0,4037:0,4038:0,4071:0,4082:0,4083:0,4087:0,4088:0,4217:2,4414:0,4415:0,4417:0,4434:0,4437:0,4438:2,4439:2,4462:0,4467:0,4471:0,4474:0,4559:0,4647:0,4822:0,4826:0,4839:0,5018:0,5041:0,5042:0,5048:0,5221:0,5223:0,5234:0,5235:0,5243:0,5247:0,5266:0,5316:0,5320:0,5321:0,5325:0,5337:0,5361:0,5362:0,5367:0,5382:0,5383:0,5396:0,5456:0,5457:0,5469:0,5472:4,5490:0,5513:0,5514:0,5523:0,5559:0,5588:1,5589:3,5596:0,5627:0,5629:0,5641:0,5643:0,5644:0,5646:2,5654:2,5655:2,5659:0,5700:0,5825:0,5836:0,5837:0,5839:0,5842:0,5844:0,5858:0,5879:0,5880:0,5887:0,5890:0,6128:1,6129:1,6141:1,6204:0,6210:0,6211:0,6307:0,6312:0,6316:0,6362:0,6391:1,6405:1,6406:0,6407:1,6408:0,6409:1,6410:0,6411:2,6412:0,6413:2,6414:0,6415:0,6416:2,6417:0,6418:2,6419:0,6420:2,6421:0,6422:2,6423:0,6424:2,6425:0,6426:2,6427:0,6428:2,6429:0,6430:2,6431:0,6432:2,6433:0,6434:2,6435:0,6436:2,6437:0,6438:2,6439:0,6440:0,6441:2,6442:0,6443:2,6444:0,6445:2,6446:0,6447:2,6448:0,6449:2,6450:0,6451:2,6452:0,6453:2,6454:0,6455:2,6456:0,6457:2,6458:0,6459:2,6460:0,6461:2,6462:0,6463:2,6464:0,6465:2,6466:0,6467:2,6468:0,6469:2,6470:0,6471:2,6472:0,6473:2,6474:0,6475:2,6476:0,6477:2,6478:0,6479:2,6484:2,6485:0,6486:2,6487:0,6488:2,6489:0,6490:2,6491:0,6492:2,6493:0,6494:1,6495:0,6496:1,6497:0,6498:0,6499:1,6500:0,6501:2,6502:0,6503:2,6504:0,6505:2,6506:0,6507:2,6508:0,6509:0,6510:2,6515:1,6516:0,6518:0,6519:2,6520:0,6521:2,6522:0,6523:2,6524:0,6525:2,6526:0,6527:2,6528:0,6529:2,6530:0,6531:2,6532:0,6533:2,6534:0,6535:2,6536:0,6537:2,6538:0,6539:2,6540:0,6541:2,6542:0,6543:2,6544:0,6545:1,6546:0,6547:1,6548:0,6549:2,6550:0,6551:2,6552:0,6553:2,6554:0,6555:2,6556:0,6557:1,6558:0,6559:1,6560:0,6561:1,6562:0,6563:2,6564:0,6565:2,6566:0,6567:0,6568:2,6569:0,6570:1,6571:0,6572:2,6573:0,6574:2,6575:0,6576:2,6577:0,6578:2,6582:2,6583:0,6584:2,6585:0,6586:2,6587:0,6588:2,6589:0,6590:2,6591:0,6592:0,6593:2,6594:0,6595:2,6596:0,6597:2,6598:0,6599:2,6600:0,6601:2,6602:0,6603:2,6605:2,6606:0,6607:2,6608:0,6609:2,6610:0,6611:0,6612:2,6613:0,6614:2,6615:0,6616:2,6617:0,6618:2,6633:2,6646:0,6703:0,6784:0,6785:1,6786:0,6787:1,6788:0,6789:1,6790:0,6791:1,6792:0,6793:1,6794:0,6795:1,6796:0,6797:1,6798:0,6799:1,6800:0,6801:1,6802:0,6803:1,6804:0,6805:1,6806:0,6807:1,6808:0,6809:1,6810:0,6811:1,6812:0,6813:1,6814:0,6815:1,6816:0,6817:1,6818:0,6819:1,6820:0,6821:1,6822:0,6823:1,6824:0,6825:1,6826:0,6827:1,6828:0,6829:1,6830:0,6831:1,6832:0,6833:1,6834:0,6835:1,6836:0,6837:1,6838:0,6839:1,6840:0,6841:1,6842:0,6843:1,6844:0,6845:1,6846:0,6847:1,6848:0,6849:1,6850:0,6851:1,6852:0,6853:1,6854:0,6855:1,6856:0,6857:1,6858:0,6859:1,6860:0,6861:1,6862:0,6863:1,6867:0,6868:1,6870:0,6875:0,6876:0,6879:0,6880:2,6884:0,6885:1,6886:0,6887:1,6915:0,6922:0,6923:2,6924:0,6925:2,6962:0,6984:0,6991:0,7128:2,7131:0,7132:2,7142:0,7257:0,7258:2,7259:0,7260:2,7261:0,7262:2,7263:0,7264:2,7265:0,7266:2,7267:0,7268:2,7269:0,7270:2,7271:0,7272:2,7273:0,7274:2,7275:0,7276:2,7277:0,7278:2,7279:0,7280:2,7281:0,7282:2,7283:0,7284:2,7285:0,7286:2,7287:0,7288:2,7289:0,7290:2,7291:0,7292:2,7293:0,7294:2,7295:0,7296:2,7297:0,7298:2,7299:0,7300:2,7301:0,7302:2,7303:0,7304:2,7305:0,7306:2,7307:0,7308:2,7309:0,7310:2,7311:0,7312:2,7313:0,7314:2,7315:0,7316:2,7317:0,7318:2,7319:0,7320:2,7321:0,7322:2,7323:0,7324:2,7325:0,7326:2,7327:0,7328:2,7329:0,7330:2,7331:0,7332:2,7333:0,7334:2,7335:0,7336:2,7337:0,7338:2,7339:0,7340:2,7341:0,7342:2,7343:0,7344:2,7345:0,7346:2,7347:0,7348:2,7349:0,7350:2,7351:0,7352:2,7353:0,7354:2,7355:0,7356:2,7357:0,7358:2,7359:0,7360:2,7361:0,7362:2,7363:0,7364:2,7365:0,7366:2,7367:0,7368:2,7369:0,7370:2,7877:0,7878:0,7882:0,7883:0,7887:0,7899:0,7991:0,7992:0,8035:2,8036:2,8058:0,8059:0,8082:0,8083:0,8088:0,8090:0,8091:2,8092:0,8093:2,8095:0,8096:2,8097:0,8098:2,8099:0,8100:2,8101:0,8102:2,8103:0,8104:2,8105:0,8106:2,8107:0,8108:2,8109:0,8110:2,8111:0,8112:2,8113:0,8114:2,8115:0,8116:2,8117:0,8118:2,8119:0,8120:2,8121:0,8122:2,8123:0,8124:2,8125:0,8126:2,8127:0,8128:2,8129:0,8130:2,8131:0,8132:2,8133:0,8134:2,8135:0,8136:2,8137:0,8138:2,8139:0,8140:2,8141:0,8142:2,8143:0,8144:2,8145:0,8146:2,8147:0,8148:2,8149:0,8150:2,8151:0,8152:2,8153:0,8154:2,8155:0,8156:2,8157:0,8158:2,8159:0,8160:2,8161:0,8162:2,8163:0,8164:2,8165:0,8166:2,8167:0,8168:2,8169:0,8170:2,8171:0,8172:2,8173:0,8177:2,8179:0,8180:2,8181:0,8182:2,8184:0,8185:2,8187:0,8189:2,8191:0,8193:2,8196:0,8197:2,8198:0,8200:2,8201:0,8202:2,8203:0,8204:2,8205:0,8206:2,8207:0,8208:2,8209:0,8210:2,8212:0,8213:2,8214:0,8216:2,8218:0,8220:2,8222:0,8224:2,8225:0,8226:2,8311:0,8312:1,8313:0,8314:1,8315:0,8316:1,8317:0,8318:1,8319:0,8320:1,8321:0,8322:1,8323:0,8324:1,8325:0,8326:1,8327:0,8328:1,8329:0,8330:1,8331:0,8332:1,8333:0,8334:1,8335:0,8336:1,8337:0,8338:1,8339:0,8340:1,8341:0,8342:1,8343:0,8344:1,8345:0,8346:1,8347:0,8348:1,8352:0,8353:0,8379:0,8380:2,8381:0,8382:2,8383:0,8384:2,8385:0,8387:2,8391:0,8395:0,8433:0,8441:0,8455:0,8456:0,8531:2,8682:0,8686:0,8687:0,8692:0,8693:0,8826:0,8903:0,8950:0,8951:0,9039:0,9040:0,9141:0,9149:0,9150:0,9191:0,9221:0,9222:0,9249:0,9250:0,9252:0,9254:0,9265:0,9284:0,9285:0,9300:0,9354:0,9367:0,9373:0,9377:0,9387:0,9391:0,9456:0,9473:0,9498:0,9674:0,9678:0,9680:0,9709:0,9712:0,9713:0,9716:0,9741:0,9748:2,9749:2,9761:0,9766:0,9793:0,9794:0,9869:0,9874:0,9875:0,9880:0,9895:0,9943:0,9945:0,9947:0,9967:0,9972:0,9977:0,10160:0,10183:0,10188:0,10194:0,10199:0,10207:0,10212:0,10217:0,10222:0,10227:0,10235:0,10240:0,10250:0,10254:0,10270:0,10275:0,10280:0,10306:0,10329:0,10471:0,10477:0,10481:2,10516:2,20002:0,20042:0,20050:1,20499:0,20538:0,20539:0,20790:0,20791:0,21291:0,21292:0,21500:0,21817:0,21818:0,22032:0,22033:0,22091:0,22092:0,22239:0,22240:0,22332:0,22337:0,22338:0,22391:0,22392:0,22639:0,22700:0,22739:0,22770:0,22780:0,22832:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,24047:0,24048:0,24100:3,24200:0,24305:0,24306:0,24382:10,24383:0,24500:0,24547:0,24548:0,24571:9,24600:0,25e3:0,25231:0,25884:0,25932:0,26237:0,26331:0,26332:0,26432:0,26591:0,26592:0,26632:0,26692:0,27120:0,27200:0,27291:6,27292:6,27429:0,27492:0,27493:0,27500:0,28232:0,28600:0,28991:0,28992:0,29100:0,29101:0,29220:0,29221:0,29333:0,29635:0,29636:0,29701:0,29738:0,29739:0,29849:0,29850:0,29871:8,29872:7,29873:0,29874:0,30200:5,30339:0,30340:0,30591:0,30592:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,31171:0,31370:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31900:0,31901:0,32061:0,32062:0,32098:0,32099:2,32100:0,32104:0,32161:0,32766:0,53048:0,53049:0,54090:0,54091:0,65061:2,65062:2,65161:0,65163:0,102041:2,102064:11,102068:15,102069:16,102118:2,102119:1,102120:2,102121:2,102217:2,102218:0,102219:2,102220:2,102378:1,102379:1,102380:0,102381:1,102589:2,102599:2,102600:2,102604:2,102647:0,102704:2,102705:2,102706:0,102731:0,102732:0,102759:1,102760:1,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102970:1,102974:2,102993:0,102994:0,102995:2,102996:2,103015:0,103016:2,103017:0,103018:2,103025:0,103026:0,103027:2,103028:2,103035:0,103036:0,103037:2,103038:2,103039:0,103040:0,103041:2,103042:2,103043:0,103044:0,103045:2,103046:2,103047:0,103048:0,103049:2,103050:2,103051:0,103052:2,103053:0,103054:2,103055:0,103056:2,103057:0,103058:0,103059:2,103060:2,103061:0,103062:0,103063:2,103064:2,103069:2,103070:0,103071:0,103072:2,103073:2,103086:0,103087:0,103088:2,103089:2,103094:1,103095:0,103096:2,103103:0,103104:2,103105:0,103106:2,103121:0,103122:2,103123:0,103124:0,103125:1,103126:1,103127:0,103128:0,103129:2,103130:2,103131:0,103132:0,103133:2,103134:2,103135:0,103136:0,103137:1,103138:1,103139:0,103140:2,103141:0,103142:2,103143:0,103144:2,103145:0,103146:1,103147:0,103148:0,103149:2,103150:2,103151:0,103152:2,103172:0,103173:2,103174:0,103175:0,103176:2,103177:2,103178:0,103179:0,103180:2,103181:2,103182:0,103183:0,103184:2,103185:2,103228:0,103229:0,103230:2,103231:2,103250:0,103251:2,103252:0,103253:2,103260:0,103261:0,103262:2,103263:2,103270:0,103271:0,103272:2,103273:2,103274:0,103275:0,103276:2,103277:2,103278:0,103279:0,103280:2,103281:2,103282:0,103283:0,103284:2,103285:2,103286:0,103287:2,103288:0,103289:2,103290:0,103291:2,103292:0,103293:0,103294:2,103295:2,103296:0,103297:0,103298:2,103299:2,103376:2,103377:0,103378:0,103379:2,103380:2,103393:0,103394:0,103395:2,103396:2,103472:0,103473:1,103474:0,103475:2,103482:0,103483:2,103484:0,103485:2,103500:0,103501:2,103502:0,103503:0,103504:1,103505:1,103506:0,103507:0,103508:2,103509:2,103510:0,103511:0,103512:2,103513:2,103514:0,103515:2,103516:0,103517:2,103518:0,103519:2,103520:0,103521:1,103522:0,103523:0,103524:2,103525:2,103526:0,103527:2,103561:2,103562:2,103563:0,103564:0,103565:2,103566:2,103567:0,103568:0,103569:2,103570:2,103584:0,103585:2,103586:0,103587:2,103588:1,103589:0,103590:2,103591:1,103592:0,103593:2,103594:1,103695:2,103897:1};for(l=2e3;l<=2045;l++)v[l]=0;for(l=2056;l<=2065;l++)v[l]=0;for(l=2067;l<=2135;l++)v[l]=0;for(l=2137;l<=2154;l++)v[l]=0;for(l=2161;l<=2170;l++)v[l]=0;for(l=2172;l<=2193;l++)v[l]=0;for(l=2195;l<=2198;l++)v[l]=0;for(l=2200;l<=2203;l++)v[l]=0;for(l=2205;l<=2217;l++)v[l]=0;for(l=2222;l<=2224;l++)v[l]=1;for(l=2225;l<=2250;l++)v[l]=2;for(l=2251;l<=2253;l++)v[l]=1;for(l=2257;l<=2264;l++)v[l]=2;for(l=2274;l<=2279;l++)v[l]=2;for(l=2280;l<=2282;l++)v[l]=1;for(l=2283;l<=2289;l++)v[l]=2;for(l=2290;l<=2292;l++)v[l]=0;for(l=2308;l<=2313;l++)v[l]=0;for(l=2315;l<=2491;l++)v[l]=0;for(l=2494;l<=2866;l++)v[l]=0;for(l=2867;l<=2869;l++)v[l]=1;for(l=2870;l<=2888;l++)v[l]=2;for(l=2891;l<=2895;l++)v[l]=2;for(l=2896;l<=2898;l++)v[l]=1;for(l=2902;l<=2908;l++)v[l]=2;for(l=2915;l<=2920;l++)v[l]=2;for(l=2921;l<=2923;l++)v[l]=1;for(l=2924;l<=2930;l++)v[l]=2;for(l=2931;l<=2962;l++)v[l]=0;for(l=2964;l<=2968;l++)v[l]=2;for(l=2969;l<=2973;l++)v[l]=0;for(l=2975;l<=2991;l++)v[l]=0;for(l=2995;l<=3051;l++)v[l]=0;for(l=3054;l<=3079;l++)v[l]=0;for(l=3081;l<=3088;l++)v[l]=0;for(l=3092;l<=3101;l++)v[l]=0;for(l=3106;l<=3138;l++)v[l]=0;for(l=3146;l<=3151;l++)v[l]=0;for(l=3153;l<=3166;l++)v[l]=0;for(l=3168;l<=3172;l++)v[l]=0;for(l=3174;l<=3203;l++)v[l]=0;for(l=3294;l<=3358;l++)v[l]=0;for(l=3367;l<=3403;l++)v[l]=0;for(l=3408;l<=3416;l++)v[l]=0;for(l=3417;l<=3438;l++)v[l]=2;for(l=3441;l<=3446;l++)v[l]=2;for(l=3447;l<=3450;l++)v[l]=0;for(l=3451;l<=3459;l++)v[l]=2;for(l=3460;l<=3478;l++)v[l]=0;for(l=3554;l<=3559;l++)v[l]=0;for(l=3560;l<=3570;l++)v[l]=2;for(l=3571;l<=3581;l++)v[l]=0;for(l=3594;l<=3597;l++)v[l]=0;for(l=3601;l<=3604;l++)v[l]=0;for(l=3637;l<=3639;l++)v[l]=0;for(l=3665;l<=3667;l++)v[l]=0;for(l=3693;l<=3695;l++)v[l]=0;for(l=3701;l<=3727;l++)v[l]=0;for(l=3728;l<=3739;l++)v[l]=2;for(l=3740;l<=3751;l++)v[l]=0;for(l=3753;l<=3760;l++)v[l]=2;for(l=3761;l<=3773;l++)v[l]=0;for(l=3775;l<=3777;l++)v[l]=0;for(l=3779;l<=3781;l++)v[l]=0;for(l=3783;l<=3785;l++)v[l]=0;for(l=3788;l<=3791;l++)v[l]=0;for(l=3797;l<=3802;l++)v[l]=0;for(l=3814;l<=3816;l++)v[l]=0;for(l=3825;l<=3829;l++)v[l]=0;for(l=3832;l<=3841;l++)v[l]=0;for(l=3844;l<=3852;l++)v[l]=0;for(l=3873;l<=3885;l++)v[l]=0;for(l=3890;l<=3893;l++)v[l]=0;for(l=3907;l<=3912;l++)v[l]=0;for(l=3942;l<=3950;l++)v[l]=0;for(l=3968;l<=3970;l++)v[l]=0;for(l=3973;l<=3976;l++)v[l]=0;for(l=3986;l<=3989;l++)v[l]=0;for(l=3994;l<=3997;l++)v[l]=0;for(l=4048;l<=4051;l++)v[l]=0;for(l=4056;l<=4063;l++)v[l]=0;for(l=4093;l<=4096;l++)v[l]=0;for(l=4390;l<=4398;l++)v[l]=0;for(l=4399;l<=4413;l++)v[l]=2;for(l=4418;l<=4433;l++)v[l]=2;for(l=4455;l<=4457;l++)v[l]=2;for(l=4484;l<=4489;l++)v[l]=0;for(l=4491;l<=4554;l++)v[l]=0;for(l=4568;l<=4589;l++)v[l]=0;for(l=4652;l<=4656;l++)v[l]=0;for(l=4766;l<=4800;l++)v[l]=0;for(l=5014;l<=5016;l++)v[l]=0;for(l=5069;l<=5072;l++)v[l]=0;for(l=5105;l<=5130;l++)v[l]=0;for(l=5167;l<=5188;l++)v[l]=0;for(l=5253;l<=5259;l++)v[l]=0;for(l=5269;l<=5275;l++)v[l]=0;for(l=5292;l<=5311;l++)v[l]=0;for(l=5329;l<=5331;l++)v[l]=0;for(l=5343;l<=5349;l++)v[l]=0;for(l=5355;l<=5357;l++)v[l]=0;for(l=5387;l<=5389;l++)v[l]=0;for(l=5459;l<=5463;l++)v[l]=0;for(l=5479;l<=5482;l++)v[l]=0;for(l=5518;l<=5520;l++)v[l]=0;for(l=5530;l<=5539;l++)v[l]=0;for(l=5550;l<=5552;l++)v[l]=0;for(l=5562;l<=5583;l++)v[l]=0;for(l=5623;l<=5625;l++)v[l]=2;for(l=5631;l<=5639;l++)v[l]=0;for(l=5649;l<=5653;l++)v[l]=0;for(l=5663;l<=5680;l++)v[l]=0;for(l=5682;l<=5685;l++)v[l]=0;for(l=5875;l<=5877;l++)v[l]=0;for(l=5896;l<=5899;l++)v[l]=0;for(l=5921;l<=5940;l++)v[l]=0;for(l=6050;l<=6125;l++)v[l]=0;for(l=6244;l<=6275;l++)v[l]=0;for(l=6328;l<=6348;l++)v[l]=0;for(l=6350;l<=6356;l++)v[l]=0;for(l=6366;l<=6372;l++)v[l]=0;for(l=6381;l<=6387;l++)v[l]=0;for(l=6393;l<=6404;l++)v[l]=0;for(l=6480;l<=6483;l++)v[l]=0;for(l=6511;l<=6514;l++)v[l]=0;for(l=6579;l<=6581;l++)v[l]=0;for(l=6619;l<=6624;l++)v[l]=0;for(l=6625;l<=6627;l++)v[l]=2;for(l=6628;l<=6632;l++)v[l]=0;for(l=6634;l<=6637;l++)v[l]=0;for(l=6669;l<=6692;l++)v[l]=0;for(l=6707;l<=6709;l++)v[l]=0;for(l=6720;l<=6723;l++)v[l]=0;for(l=6732;l<=6738;l++)v[l]=0;for(l=6931;l<=6933;l++)v[l]=0;for(l=6956;l<=6959;l++)v[l]=0;for(l=7005;l<=7007;l++)v[l]=0;for(l=7057;l<=7070;l++)v[l]=2;for(l=7074;l<=7082;l++)v[l]=0;for(l=7109;l<=7118;l++)v[l]=0;for(l=7119;l<=7127;l++)v[l]=1;for(l=7374;l<=7376;l++)v[l]=0;for(l=7528;l<=7586;l++)v[l]=0;for(l=7587;l<=7645;l++)v[l]=2;for(l=7692;l<=7696;l++)v[l]=0;for(l=7755;l<=7787;l++)v[l]=0;for(l=7791;l<=7795;l++)v[l]=0;for(l=7799;l<=7801;l++)v[l]=0;for(l=7803;l<=7805;l++)v[l]=0;for(l=7825;l<=7831;l++)v[l]=0;for(l=7845;l<=7859;l++)v[l]=0;for(l=8013;l<=8032;l++)v[l]=0;for(l=8065;l<=8068;l++)v[l]=1;for(l=8518;l<=8529;l++)v[l]=2;for(l=8533;l<=8536;l++)v[l]=2;for(l=8538;l<=8540;l++)v[l]=2;for(l=8677;l<=8679;l++)v[l]=0;for(l=8836;l<=8840;l++)v[l]=0;for(l=8857;l<=8859;l++)v[l]=0;for(l=8908;l<=8910;l++)v[l]=0;for(l=9154;l<=9159;l++)v[l]=0;for(l=9205;l<=9218;l++)v[l]=0;for(l=9271;l<=9273;l++)v[l]=0;for(l=9295;l<=9297;l++)v[l]=0;for(l=9356;l<=9360;l++)v[l]=0;for(l=9404;l<=9407;l++)v[l]=0;for(l=9476;l<=9482;l++)v[l]=0;for(l=9487;l<=9494;l++)v[l]=0;for(l=9697;l<=9699;l++)v[l]=0;for(l=9821;l<=9865;l++)v[l]=0;for(l=10285;l<=10291;l++)v[l]=0;for(l=10314;l<=10317;l++)v[l]=0;for(l=10448;l<=10465;l++)v[l]=0;for(l=10731;l<=10733;l++)v[l]=0;for(l=11114;l<=11118;l++)v[l]=0;for(l=20004;l<=20032;l++)v[l]=0;for(l=20047;l<=20049;l++)v[l]=0;for(l=20062;l<=20092;l++)v[l]=0;for(l=20135;l<=20138;l++)v[l]=0;for(l=20248;l<=20258;l++)v[l]=0;for(l=20348;l<=20358;l++)v[l]=0;for(l=20436;l<=20440;l++)v[l]=0;for(l=20822;l<=20824;l++)v[l]=0;for(l=20904;l<=20932;l++)v[l]=0;for(l=20934;l<=20936;l++)v[l]=0;for(l=21004;l<=21032;l++)v[l]=0;for(l=21035;l<=21037;l++)v[l]=0;for(l=21095;l<=21097;l++)v[l]=0;for(l=21148;l<=21150;l++)v[l]=0;for(l=21207;l<=21264;l++)v[l]=0;for(l=21307;l<=21364;l++)v[l]=0;for(l=21413;l<=21423;l++)v[l]=0;for(l=21453;l<=21463;l++)v[l]=0;for(l=21473;l<=21483;l++)v[l]=0;for(l=21780;l<=21782;l++)v[l]=0;for(l=21891;l<=21894;l++)v[l]=0;for(l=21896;l<=21899;l++)v[l]=0;for(l=22171;l<=22177;l++)v[l]=0;for(l=22181;l<=22187;l++)v[l]=0;for(l=22191;l<=22197;l++)v[l]=0;for(l=22207;l<=22222;l++)v[l]=0;for(l=22229;l<=22232;l++)v[l]=0;for(l=22234;l<=22236;l++)v[l]=0;for(l=22243;l<=22250;l++)v[l]=0;for(l=22262;l<=22265;l++)v[l]=0;for(l=22307;l<=22322;l++)v[l]=0;for(l=22348;l<=22357;l++)v[l]=0;for(l=22407;l<=22422;l++)v[l]=0;for(l=22462;l<=22465;l++)v[l]=0;for(l=22521;l<=22525;l++)v[l]=0;for(l=22607;l<=22622;l++)v[l]=0;for(l=22641;l<=22646;l++)v[l]=0;for(l=22648;l<=22657;l++)v[l]=0;for(l=22707;l<=22722;l++)v[l]=0;for(l=22762;l<=22765;l++)v[l]=0;for(l=22807;l<=22822;l++)v[l]=0;for(l=22991;l<=22994;l++)v[l]=0;for(l=23028;l<=23038;l++)v[l]=0;for(l=23301;l<=23333;l++)v[l]=2;for(l=23830;l<=23853;l++)v[l]=0;for(l=23866;l<=23872;l++)v[l]=0;for(l=23877;l<=23884;l++)v[l]=0;for(l=23886;l<=23894;l++)v[l]=0;for(l=23946;l<=23948;l++)v[l]=0;for(l=24311;l<=24313;l++)v[l]=0;for(l=24342;l<=24347;l++)v[l]=0;for(l=24370;l<=24374;l++)v[l]=10;for(l=24375;l<=24381;l++)v[l]=0;for(l=24718;l<=24721;l++)v[l]=0;for(l=24817;l<=24821;l++)v[l]=0;for(l=24877;l<=24882;l++)v[l]=0;for(l=24891;l<=24893;l++)v[l]=0;for(l=25391;l<=25395;l++)v[l]=0;for(l=25828;l<=25838;l++)v[l]=0;for(l=26191;l<=26195;l++)v[l]=0;for(l=26391;l<=26393;l++)v[l]=0;for(l=26701;l<=26722;l++)v[l]=0;for(l=26729;l<=26799;l++)v[l]=2;for(l=26801;l<=26803;l++)v[l]=2;for(l=26811;l<=26813;l++)v[l]=2;for(l=26847;l<=26870;l++)v[l]=2;for(l=26891;l<=26899;l++)v[l]=0;for(l=26901;l<=26923;l++)v[l]=0;for(l=26929;l<=26946;l++)v[l]=0;for(l=26948;l<=26998;l++)v[l]=0;for(l=27037;l<=27040;l++)v[l]=0;for(l=27205;l<=27232;l++)v[l]=0;for(l=27258;l<=27260;l++)v[l]=0;for(l=27391;l<=27398;l++)v[l]=0;for(l=27561;l<=27564;l++)v[l]=0;for(l=27571;l<=27574;l++)v[l]=0;for(l=27581;l<=27584;l++)v[l]=0;for(l=27591;l<=27594;l++)v[l]=0;for(l=27700;l<=27707;l++)v[l]=0;for(l=28191;l<=28193;l++)v[l]=0;for(l=28348;l<=28358;l++)v[l]=0;for(l=28402;l<=28432;l++)v[l]=0;for(l=28462;l<=28492;l++)v[l]=0;for(l=29118;l<=29122;l++)v[l]=0;for(l=29168;l<=29172;l++)v[l]=0;for(l=29177;l<=29185;l++)v[l]=0;for(l=29187;l<=29195;l++)v[l]=0;for(l=29900;l<=29903;l++)v[l]=0;for(l=30161;l<=30179;l++)v[l]=0;for(l=30491;l<=30494;l++)v[l]=0;for(l=30729;l<=30732;l++)v[l]=0;for(l=31251;l<=31259;l++)v[l]=0;for(l=31265;l<=31268;l++)v[l]=0;for(l=31275;l<=31279;l++)v[l]=0;for(l=31281;l<=31297;l++)v[l]=0;for(l=31461;l<=31469;l++)v[l]=0;for(l=31491;l<=31495;l++)v[l]=0;for(l=31917;l<=31922;l++)v[l]=0;for(l=31965;l<=32e3;l++)v[l]=0;for(l=32001;l<=32003;l++)v[l]=2;for(l=32005;l<=32031;l++)v[l]=2;for(l=32033;l<=32060;l++)v[l]=2;for(l=32064;l<=32067;l++)v[l]=2;for(l=32074;l<=32077;l++)v[l]=2;for(l=32081;l<=32086;l++)v[l]=0;for(l=32107;l<=32130;l++)v[l]=0;for(l=32133;l<=32159;l++)v[l]=0;for(l=32164;l<=32167;l++)v[l]=2;for(l=32180;l<=32199;l++)v[l]=0;for(l=32201;l<=32260;l++)v[l]=0;for(l=32301;l<=32360;l++)v[l]=0;for(l=32401;l<=32460;l++)v[l]=0;for(l=32501;l<=32560;l++)v[l]=0;for(l=32601;l<=32662;l++)v[l]=0;for(l=32664;l<=32667;l++)v[l]=2;for(l=32701;l<=32761;l++)v[l]=0;for(l=53001;l<=53004;l++)v[l]=0;for(l=53008;l<=53019;l++)v[l]=0;for(l=53021;l<=53032;l++)v[l]=0;for(l=53034;l<=53037;l++)v[l]=0;for(l=53042;l<=53046;l++)v[l]=0;for(l=53074;l<=53080;l++)v[l]=0;for(l=54001;l<=54004;l++)v[l]=0;for(l=54008;l<=54019;l++)v[l]=0;for(l=54021;l<=54032;l++)v[l]=0;for(l=54034;l<=54037;l++)v[l]=0;for(l=54042;l<=54046;l++)v[l]=0;for(l=54048;l<=54053;l++)v[l]=0;for(l=54074;l<=54080;l++)v[l]=0;for(l=54098;l<=54101;l++)v[l]=0;for(l=102001;l<=102040;l++)v[l]=0;for(l=102042;l<=102063;l++)v[l]=0;for(l=102065;l<=102067;l++)v[l]=0;for(l=102070;l<=102117;l++)v[l]=0;for(l=102122;l<=102216;l++)v[l]=0;for(l=102221;l<=102377;l++)v[l]=0;for(l=102382;l<=102388;l++)v[l]=0;for(l=102389;l<=102398;l++)v[l]=2;for(l=102399;l<=102444;l++)v[l]=0;for(l=102445;l<=102447;l++)v[l]=2;for(l=102448;l<=102458;l++)v[l]=0;for(l=102459;l<=102468;l++)v[l]=2;for(l=102469;l<=102499;l++)v[l]=0;for(l=102500;l<=102519;l++)v[l]=1;for(l=102520;l<=102524;l++)v[l]=0;for(l=102525;l<=102529;l++)v[l]=2;for(l=102530;l<=102588;l++)v[l]=0;for(l=102590;l<=102598;l++)v[l]=0;for(l=102601;l<=102603;l++)v[l]=0;for(l=102605;l<=102628;l++)v[l]=0;for(l=102629;l<=102646;l++)v[l]=2;for(l=102648;l<=102700;l++)v[l]=2;for(l=102701;l<=102703;l++)v[l]=0;for(l=102707;l<=102730;l++)v[l]=2;for(l=102733;l<=102758;l++)v[l]=2;for(l=102767;l<=102900;l++)v[l]=0;for(l=102901;l<=102933;l++)v[l]=2;for(l=102934;l<=102950;l++)v[l]=13;for(l=102951;l<=102963;l++)v[l]=0;for(l=102965;l<=102969;l++)v[l]=0;for(l=102971;l<=102973;l++)v[l]=0;for(l=102975;l<=102989;l++)v[l]=0;for(l=102990;l<=102992;l++)v[l]=1;for(l=102997;l<=103002;l++)v[l]=0;for(l=103003;l<=103008;l++)v[l]=2;for(l=103009;l<=103011;l++)v[l]=0;for(l=103012;l<=103014;l++)v[l]=2;for(l=103019;l<=103021;l++)v[l]=0;for(l=103022;l<=103024;l++)v[l]=2;for(l=103029;l<=103031;l++)v[l]=0;for(l=103032;l<=103034;l++)v[l]=2;for(l=103065;l<=103068;l++)v[l]=0;for(l=103074;l<=103076;l++)v[l]=0;for(l=103077;l<=103079;l++)v[l]=1;for(l=103080;l<=103082;l++)v[l]=0;for(l=103083;l<=103085;l++)v[l]=2;for(l=103090;l<=103093;l++)v[l]=0;for(l=103097;l<=103099;l++)v[l]=0;for(l=103100;l<=103102;l++)v[l]=2;for(l=103107;l<=103109;l++)v[l]=0;for(l=103110;l<=103112;l++)v[l]=2;for(l=103113;l<=103116;l++)v[l]=0;for(l=103117;l<=103120;l++)v[l]=2;for(l=103153;l<=103157;l++)v[l]=0;for(l=103158;l<=103162;l++)v[l]=2;for(l=103163;l<=103165;l++)v[l]=0;for(l=103166;l<=103168;l++)v[l]=1;for(l=103169;l<=103171;l++)v[l]=2;for(l=103186;l<=103188;l++)v[l]=0;for(l=103189;l<=103191;l++)v[l]=2;for(l=103192;l<=103195;l++)v[l]=0;for(l=103196;l<=103199;l++)v[l]=2;for(l=103200;l<=103224;l++)v[l]=0;for(l=103225;l<=103227;l++)v[l]=1;for(l=103232;l<=103237;l++)v[l]=0;for(l=103238;l<=103243;l++)v[l]=2;for(l=103244;l<=103246;l++)v[l]=0;for(l=103247;l<=103249;l++)v[l]=2;for(l=103254;l<=103256;l++)v[l]=0;for(l=103257;l<=103259;l++)v[l]=2;for(l=103264;l<=103266;l++)v[l]=0;for(l=103267;l<=103269;l++)v[l]=2;for(l=103300;l<=103375;l++)v[l]=0;for(l=103381;l<=103383;l++)v[l]=0;for(l=103384;l<=103386;l++)v[l]=1;for(l=103387;l<=103389;l++)v[l]=0;for(l=103390;l<=103392;l++)v[l]=2;for(l=103397;l<=103399;l++)v[l]=0;for(l=103400;l<=103471;l++)v[l]=2;for(l=103476;l<=103478;l++)v[l]=0;for(l=103479;l<=103481;l++)v[l]=2;for(l=103486;l<=103488;l++)v[l]=0;for(l=103489;l<=103491;l++)v[l]=2;for(l=103492;l<=103495;l++)v[l]=0;for(l=103496;l<=103499;l++)v[l]=2;for(l=103528;l<=103543;l++)v[l]=0;for(l=103544;l<=103548;l++)v[l]=2;for(l=103549;l<=103551;l++)v[l]=0;for(l=103552;l<=103554;l++)v[l]=1;for(l=103555;l<=103557;l++)v[l]=2;for(l=103558;l<=103560;l++)v[l]=0;for(l=103571;l<=103573;l++)v[l]=0;for(l=103574;l<=103576;l++)v[l]=2;for(l=103577;l<=103580;l++)v[l]=0;for(l=103581;l<=103583;l++)v[l]=2;for(l=103595;l<=103694;l++)v[l]=0;for(l=103696;l<=103699;l++)v[l]=0;for(l=103700;l<=103793;l++)v[l]=2;for(l=103794;l<=103890;l++)v[l]=0;for(l=103891;l<=103896;l++)v[l]=2;for(l=103900;l<=103971;l++)v[l]=2;for(l=103972;l<=103977;l++)v[l]=0;for(l=112e3;l<=112101;l++)v[l]=0});function gs(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let r=e.wkid,n=t.wkid;if(r!=null||n!=null){if(r===n||Ri(e)&&Ri(t))return!0;let s=e.latestWkid;if(s!=null&&n===s)return!0;let a=t.latestWkid;return a!=null&&r===a}let i,o;return e.wkt2&&t.wkt2?(i=e.wkt2,o=t.wkt2):e.wkt&&t.wkt&&(i=e.wkt,o=t.wkt),!(!i||!o)&&i.toUpperCase()===o.toUpperCase()}function xa(e){let t=e?.wkid;return t!=null&&t>=2e3&&XI[t]||null}function tf(e){if(!KI(e))return!1;let{wkid:t}=e;if(t)return v[t]==null;let r=e.wkt2||e.wkt;return!!r&&/^\s*(?:GEOGCS|GEOGCRS|GEOGRAPHICCRS)/i.test(r)}function hc(e){return e?.wkid===4326}function Ri(e){let t=e?.wkid;return t!=null&&t>=2e3&&JI.includes(t)}function s4(e){return e===mc.GCSMARS2000||e===mc.GCSMARS2000_SPHERE}function a4(e){return e===mc.GCSMOON2000}function QI(e){let t=e?.wkid;return t!=null&&t>=2e3&&Lq.includes(t)}function KI(e){if(e==null)return!1;let t=e.wkid;return t!=null&&t>=2e3||e.wkt2!=null||e.wkt!=null}var JI,Mq,Lq,i4,o4,n4,XI,l4,c4,eP,oo=L(()=>{Io();ZI();YI();r4();JI=[102100,102113,3857,3785,900913],Mq=[104905,104971],Lq=[4326,...JI,...Mq],i4=[-20037508342788905e-9,20037508342788905e-9],o4=[-20037508342787e-6,20037508342787e-6],n4={wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',valid:i4,origin:o4,dx:1e-5},XI={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:i4,origin:o4,dx:1e-5},102100:n4,3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:i4,origin:o4,dx:1e-5},3857:n4,4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104971:{wkTemplate:'GEOGCS["Mars_2000_(Sphere)",DATUM["Mars_2000_(Sphere)",SPHEROID["Mars_2000_(Sphere)",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104905:{wkTemplate:'GEOGCS["GCS_Mars_2000",DATUM["D_Mars_2000",SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.8944472236118]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},900913:n4};l4={wkid:4326,wkt:gi(XI[4326].wkTemplate,{Central_Meridian:"0.0"})},c4={wkid:102100,latestWkid:3857},eP={wkid:32662}});function u4(e){return{wkt:`GEOCCS["Spherical geocentric",
115
115
  DATUM["Not specified",
116
116
  SPHEROID["Sphere",${e.radius},0]],
117
117
  PRIMEM["Greenwich",0.0,
@@ -164,7 +164,7 @@ Types found: \${types}.`,IncorrectArgumentLength:"Expected ${formatMinMaxParams}
164
164
  `,S.RIGHT_PARENTHESES=")",S.SINGLE_QUOTE="'",S.WHITE_SPACE=" ",S))(h1||{});var n7=/\d+/u,Y2=["string","number","integer","number","smallint","float","real","date","time","timestamp","current-time","column-reference"];function mD(e,t){return Object.values(e).includes(t)?t:void 0}var hD=e=>{switch(e.operator){case"AND":case"OR":case"IS":case"ISNOT":case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":case"LIKE":case"NOT LIKE":case"<>":case"<":case">":case">=":case"<=":case"=":return"boolean";case"*":case"-":case"+":case"/":return"number";case"||":return"string"}},gD=e=>{switch(e.type){case"number":return"number";case"text":return"string";case"dateOnly":case"date":return"date";case"time":return"time";case"boolean":return"boolean";case"dictionary":case"array":case"geometry":case"feature":case"featureSet":case"featureSetCollection":case"knowledgeGraph":return console.error(`sql-expr validator experienced an unexpected variable type: ${e.type}`),"null"}},du=(e,t)=>{switch(e.type){case"interval":case"interval-period":case"interval-qualifier":case"when-clause":case"case-expression":case"parameter":case"expression-list":return e.type;case"unary-expression":return"boolean";case"binary-expression":return hD(e);case"null":case"boolean":case"string":case"timestamp":case"date":case"time":case"number":case"current-time":case"data-type":return e.type;case"column-reference":{let r=t.find(n=>n.name===e.column);if(r)return gD(r)}return e.type;case"function":switch(e.name.toLowerCase()){case"cast":{if(e.args?.value?.[1]?.type!=="data-type")throw Error("Invalid cast function");switch(e.args?.value?.[1]?.value?.type){case"integer":case"smallint":return"integer";case"real":case"float":return"float";case"date":case"timestamp":return"timestamp";case"time":return"time-only";case"varchar":return"string"}}case"position":case"extract":case"char_length":case"mod":return"integer";case"round":return"float";case"sign":return"integer";case"ceiling":case"floor":case"abs":return"float";case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"cosh":case"sinh":case"tanh":case"power":case"truncate":return"float";case"substring":case"trim":case"concat":case"lower":case"upper":return"string";case"current_date":case"current_time":case"current_timestamp":return"date";default:return"unknown_function"}}},fu=e=>{switch(e.toLowerCase()){case"integer":case"double":case"number":case"smallint":case"float":case"real":return!0;default:return!1}},J2=(e,t)=>{let r=mD(h1,t)===","?", ":" | ";return e.map(n=>`"${n.toLowerCase()}"`).sort().join(r)},Sn=e=>`"${e}"`,X2=e=>{switch(e.type){case"interval-qualifier":case"interval":return"INTERVAL";case"when-clause":return"WHEN_CLAUSE";case"case-expression":return"CASE_EXPRESSION";case"unary-expression":return"UNARY_EXPRESSION";case"expression-list":return"EXPRESSION_LIST";case"binary-expression":return"BINARY_EXPRESSION";case"current-time":return Sn(e.mode);case"interval-period":return Sn(e.period);case"null":return Sn("null");case"column-reference":return Sn(e.column);case"number":return e.value;case"function":return Sn(`${e.name}()`);case"data-type":return Sn(e.type);case"boolean":case"date":case"parameter":case"time":case"timestamp":case"string":return Sn(String(e.value))}},Or=(e,t,r,n)=>{if(n){let i=t,o={startColumn:i.start.column,endColumn:i.end.column,startLineNumber:i.start.line,endLineNumber:i.end.line};r.some(a=>a.message===e&&a.startColumn===o.startColumn&&a.startLineNumber===o.startLineNumber&&a.endColumn===o.endColumn&&a.endLineNumber===o.endLineNumber)||r.push({message:e,severity:H2.Error,...o})}else{let i=t;r.some(s=>s.message===e&&s.startColumn===i.startColumn&&s.startLineNumber===i.startLineNumber&&s.endColumn===i.endColumn&&s.endLineNumber===i.endLineNumber)||r.push({message:e,severity:H2.Error,...i})}},mi=(e,t,r,n)=>{let i=du(e,n),o=i.toUpperCase()===t;if(t==="NUMBER"&&(o=fu(i)),!o){let s=Zr("TypeNotAssignable",{providedType:Sn(i),expectedType:Sn(t.toLowerCase())});Or(s,e.location,r,!0)}};var xK=typeof window<"u"&&"$arcgis"in window&&typeof window.$arcgis=="object"&&"import"in window.$arcgis&&!("forceESM"in window.$arcgis);var g1=e=>e.variables?e.variables.find(r=>r.name==="$layer"&&r.type==="dictionary").properties??[]:[];Rw();t5();var tN={"[ \\t\\n\\r]":"WHITESPACE","[*/]":"MULTIPLICATION (*) OR DIVISION (/)","[+\\-]":"ADDITION (+) OR SUBTRACTION (-)","[<-=]":"LESS THAN (<) OR LESS THAN OR EQUAL TO (<=)","[A-Za-z0-9_.\\\\x80-\uFFFF]":"ALPHANUMERIC, UNDERSCORE, DOT, OR EXTENDED ASCII","[A-Za-z0-9_]":"ALPHANUMERIC OR UNDERSCORE"};function Uw(e){return!(e instanceof Error&&(!("location"in e)||!("format"in e)))}function nN(e){return/^Expected "\S+"/u.test(e.message)}function oY(e){return e.message.match(/Expected (?<expectedToken>.*) but/u)?.groups?.expectedToken?.split(", ").map((t,r,n)=>(r===n.length-1&&t.startsWith("or ")&&(t=t.slice(3)),t=t.replace(/^"|"$/gu,""),t in tN&&(t=tN[t]),t))}function iN(e){if(e.message.match(/but end of input found/u))return"Invalid syntax: unexpected end of SQL Expression.";let r=e.message.match(/but (?<unexpectedToken>.*) found/u)?.groups?.unexpectedToken,n=oY(e)?.map(i=>`\u2022 ${i}`).join(`
165
165
  `);return r?`Invalid syntax: unexpected token ${r}.${n?`
166
166
  Expected one of the following:
167
- ${n}`:""}`:"Invalid syntax."}function oN(e){if("expected"in e&&Array.isArray(e.expected)){let t=e,r=new Set;return t.expected.filter(i=>i.type==="literal").reduce((i,o)=>(r.has(o.text)||(r.add(o.text),e7.includes(o.text)?i.push({category:"keywords",text:o.text}):t7.includes(o.text)?i.push({category:"operators",text:o.text}):r7.includes(o.text)&&i.push({category:"functions",text:o.text})),i),[])}return[]}var r5=-2;function sN(e,t){if(!Object.values(cu).includes(t.type))return-1;switch(t.type){case"case-expression":return"else";case"when-clause":return e===t.operand?"operand":e===t.value?"value":-1;case"unary-expression":return"expr";case"binary-expression":return e===t.left?"left":e===t.right?"right":-1;case"function":return t.args.value.findIndex(r=>r===e);case"interval":return e===t.value?"value":e===t.qualifier?"qualifier":-1;case"interval-qualifier":return e===t.start?"start":e===t.end?"end":-1;case"expression-list":return"value";default:return-1}}var sY=["boolean","column-reference","current-time","data-type","date","expression-list","interval-period","interval-qualifier","null","number","parameter","string","time","timestamp"];function n5(e,t){let r=e;return sY.includes(r.type)&&t.length>1?(r=t.at(r5),t.pop(),n5(r,t)):r}var aY=["+","-","*","/","||"],lY=["cast","extract","substring"],Ww=class{constructor(t,r){this.callStack=[];this._fields=[];this.markers=[];this._sdkFunctions=t.flatMap(n=>n.items),this._fields=r.profile?g1(r.profile):[]}async validateModel(t){try{let{parseTree:r}=await ff(t,new xc);this.traverse(r)}catch(r){this._handleParserFailure(r,t)}}traverse(t){this.callStack.push(t),this._validateNode(t),this._traverseChildren(t),this.callStack.pop()}_validateNode(t){if(t)switch(t.type){case"interval":{let r=t.value.value;if(!n7.test(r)||t.value.type!=="string"){let n=Zr("ExpectedNumericalLiteral"),i=this._getRange(t.value);Or(n,i,this.markers);return}return}case"interval-period":return;case"interval-qualifier":return;case"case-expression":if(t.clauses.length===0){if(t.else){let i=Zr("InvalidElseClause"),o={startLineNumber:t.elseLocation?.start.line??t.else.location.start.line,endLineNumber:t.elseLocation?.end.line??t.else.location.end.line,startColumn:t.elseLocation?.start.column??t.else.location.start.column,endColumn:t.elseLocation?.end.column??t.else.location.end.column};Or(i,o,this.markers);return}let r=Zr("EmptyCaseExpression"),n={startLineNumber:t.location.start.line,endLineNumber:t.location.end.line,startColumn:t.location.start.column,endColumn:t.location.end.column};Or(r,n,this.markers);return}return;case"parameter":return;case"column-reference":{if(Object.values(h1).map(n=>n.toLowerCase()).includes(t.column.toLowerCase()))return;if(!this._fields.find(n=>n.name===t.column)){let n=Zr("UnknownField",{field:t.column});Or(n,t.location,this.markers,!0)}return}case"expression-list":{let r=t.value,n=new Set,i=this.callStack.at(r5);if(i?.type==="function"&&lY.includes(i?.name?.toLowerCase()))return;if(r.forEach(o=>{let s=du(o,this._fields);if(s!=="column-reference"&&s!=="time-only"){if(s==="unknown_function"){let a=Zr("FunctionNotSupported",{function:o.name});Or(a,o.location,this.markers,!0);return}fu(s)&&(s="number"),n.has(s)||n.add(s)}}),n.size>1){let o=Array.from(n),s=Zr("IncompatibleListDataType",{types:J2(o,",")});Or(s,t.location,this.markers,!0)}return}case"binary-expression":{let r=this.callStack.length===1,n=t.left,i=t.right,o=du(n,this._fields),s=du(i,this._fields);if(r&&!aY.includes(t.operator)){let a=`Cannot perform binary operation '${t.operator}' at root node.`;Or(a,t.location,this.markers,!0);return}switch(t.operator){case"AND":case"OR":mi(n,"BOOLEAN",this.markers,this._fields),mi(i,"BOOLEAN",this.markers,this._fields);break;case"IS":case"ISNOT":mi(i,"NULL",this.markers,this._fields);break;case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":mi(i,"EXPRESSION-LIST",this.markers,this._fields);break;case"LIKE":case"NOT LIKE":mi(i,"STRING",this.markers,this._fields);break;case"<>":case"<":case">":case">=":case"<=":case"=":{if(!Y2.includes(s)){let u=Zr("TypeNotAssignable",{providedType:Sn(s),expectedType:J2(Y2,",")});Or(u,i.location,this.markers,!0)}let a=fu(o)&&fu(s);if(o!==s&&!a){let u=Zr("MismatchedTypes",{leftValue:X2(n),providedType:o,rightValue:X2(i),expectedType:s});Or(u,t.location,this.markers,!0)}break}case"*":case"-":case"+":case"/":mi(n,"NUMBER",this.markers,this._fields),mi(i,"NUMBER",this.markers,this._fields);break;case"||":mi(n,"STRING",this.markers,this._fields),mi(i,"STRING",this.markers,this._fields);break;default:{let a=Zr("UnsupportedOperator",{operator:Sn(t.operator)});Or(a,t.location,this.markers,!0)}}return}case"function":{let r=this._getFunction(t.name);if(!r){let n=Zr("FunctionNotSupported",{function:t.name});Or(n,t.location,this.markers,!0);return}if(r.type==="function"){let{min:n,max:i}=r.parametersInfo,{args:{value:o}}=t,s=o.length;if(s<n||s>i){let a=Zr("IncorrectArgumentLength",{minParams:n,maxParams:i,numArgs:s});Or(a,t.location,this.markers)}}}return;case"null":case"boolean":case"string":case"timestamp":case"date":case"time":case"number":case"current-time":return;case"data-type":return;case"unary-expression":console.warn("Unexpected unary expression found.");return;case"when-clause":return}}_handleParserFailure(t,r){if(!Uw(t))throw t;if(r.trim()===""){this.markers=[];return}let n=t,i=n.message;nN(n)&&(i=iN(n));let o={startLineNumber:n.location.start.line,endLineNumber:n.location.end.line,startColumn:n.location.start.column,endColumn:n.location.end.column};Or(i,o,this.markers)}_getRange(t){return{startLineNumber:t.location.start.line,endLineNumber:t.location.end.line,startColumn:t.location.start.column,endColumn:t.location.end.column}}_getFunction(t){return this._sdkFunctions.find(r=>r.name.toLowerCase()===t.toLowerCase())}_traverseChildren(t){if(t)switch(t.type){case"case-expression":{let r=Kt[t.type];t.format==="simple"?r.forEach(n=>{let i=t[n];Array.isArray(i)?i.forEach(o=>{this.traverse(o)}):this.traverse(i)}):t.format==="searched"&&r.forEach(n=>{if(n==="operand")return;let i=t[n];Array.isArray(i)?i.forEach(o=>{this.traverse(o)}):this.traverse(i)})}break;case"when-clause":Kt[t.type].forEach(n=>{let i=t[n];this.traverse(i)});break;case"expression-list":Kt[t.type].forEach(n=>{let i=t[n];Array.isArray(i)?i.forEach(o=>{this.traverse(o)}):this.traverse(i)});break;case"unary-expression":Kt[t.type].forEach(n=>{let i=t[n];Array.isArray(i)&&this.traverse(i)});break;case"binary-expression":Kt[t.type].forEach(n=>{let i=t[n];this.traverse(i)});break;case"function":Kt[t.type].forEach(n=>{let i=t[n];this.traverse(i)});break;case"interval":Kt[t.type].forEach(n=>{let i=t[n];this.traverse(i)});break;case"interval-qualifier":Kt[t.type].forEach(n=>{let i=t[n];this.traverse(i)});break;default:break}}};Rw();t5();var Nn={identifiers:"a",profileVariables:"aa",constants:"ab",literals:"ab",functions:"ac",operators:"ad",snippets:"b",keywords:"c"};function cY(e){switch(e){case"functions":return Cr.Function;case"keywords":return Cr.Keyword;case"operators":return Cr.Operator}}var zw=class{constructor(t,r){this._fields=[];this._sdkFunctions=t,this._fields=r}async getCompletions(t,r,n){let i={range:t,modelContent:r,position:n,lowestNode:void 0,subTree:[],completionItems:[]},o=new xc;try{let{parseTree:s}=await ff(r,o);this.traverse(s,i),this._getCompletions(i)}catch(s){this.handleParserFailure(s,t,i)}return i.completionItems}traverse(t,r){let{position:n,subTree:i}=r;this._isPositionWithinNode(t,n)&&(i.push(t),r.lowestNode=t,this._traverseChildren(t,r))}_getCompletions(t){let{range:r,lowestNode:n,subTree:i}=t;if(!n)return[];let o=n5(n,i);if(!o)return[];let s=sN(n,o);switch(o.type){case"case-expression":o.else||t.completionItems.push({label:"ELSE",kind:Cr.Keyword,insertText:"ELSE",sortText:"a",range:r});break;case"column-reference":this._suggestFields(t),this._suggestFunctions(t),this._suggestExpressions(t);break;case"function":this._getCompletionsFromFunction(o,s,t);break;case"interval":if(s==="qualifier"){this._suggestDatePeriods(t);break}else if(s==="value")break;break;case"binary-expression":this._suggestFields(t),this._suggestFunctions(t);break;case"string":case"number":case"boolean":case"when-clause":case"date":case"time":case"timestamp":case"current-time":case"null":case"expression-list":case"interval-period":case"interval-qualifier":case"data-type":case"parameter":case"unary-expression":break}return t.completionItems}handleParserFailure(t,r,n){Uw(t)&&oN(t).forEach(o=>{n.completionItems.push({label:o.text,kind:cY(o.category),insertText:o.text,sortText:Nn[o.category],range:r})})}_getCompletionsFromFunction(t,r,n){let{range:i}=n;switch(t.name.toUpperCase()){case"CAST":r===0?this._suggestFields(n):r===1?this._suggestDataTypes(n):t.args.value.length&&r===-1?n.completionItems.push({label:"AS",kind:Cr.Keyword,insertText:"AS",sortText:Nn.keywords,range:i}):this._suggestFields(n);break;case"EXTRACT":r===0?this._suggestDatePeriods(n):r===1?(this._suggestFields(n),this._suggestDateLiterals(n)):t.args.value.length&&r===-1?n.completionItems.push({label:"FROM",kind:Cr.Keyword,insertText:"FROM",sortText:Nn.keywords,range:i}):this._suggestDatePeriods(n);break;case"TRIM":r===0?this._suggestTrimParts(n):r===1?this._suggestTrimParts(n):r===2?this._suggestFields(n):t.args.value.length&&r===-1?n.completionItems.push({label:"FROM",kind:Cr.Keyword,insertText:"FROM",sortText:Nn.keywords,range:i}):this._suggestTrimParts(n);break;case"COALESCE":this._suggestFields(n),this._suggestNull(n);break;case"POSITION":r===1&&this._suggestFields(n);break;case"ABS":case"ACOS":case"ASIN":case"ATAN":case"CEILING":case"COS":case"FLOOR":case"LOG":case"LOG10":case"POWER":case"ROUND":case"SIGN":case"SIN":case"TAN":case"CHAR_LENGTH":case"CONCAT":case"LOWER":case"UPPER":this._suggestFields(n);break;case"CURRENT_DATE":case"CURRENT_TIME":case"CURRENT_TIMESTAMP":break}}_isPositionWithinNode(t,r){if(!t)return!1;let{start:n,end:i}=t.location;return!(r.lineNumber<n.line||r.lineNumber>i.line||r.lineNumber===n.line&&r.column<n.column||r.lineNumber===i.line&&r.column>i.column)}_suggestFields(t){let{range:r}=t;this._fields.forEach(n=>{t.completionItems.push({label:n.name,kind:Cr.Field,insertText:n.name,documentation:n.completion?.documentation,detail:n.completion?.detail,sortText:Nn.profileVariables,range:r})})}_suggestFunctions(t){let{range:r}=t;this._sdkFunctions.functionDefinitions.forEach(n=>{let{overloads:i}=n;i.forEach(o=>{t.completionItems.push({label:o.completion.label,kind:Cr.Function,insertText:o.completion.insertText||o.completion.label,insertTextRules:Z2.InsertAsSnippet,documentation:o.completion.documentation,detail:o.completion.detail,sortText:Nn.functions,range:r})})})}_suggestDataTypes(t){let{range:r}=t;p1.forEach(n=>{t.completionItems.push({label:n,kind:Cr.Keyword,insertText:n,sortText:Nn.keywords,range:r})})}_suggestDatePeriods(t){let{range:r}=t;uu.forEach(n=>{t.completionItems.push({label:n,kind:Cr.Keyword,insertText:n,sortText:Nn.keywords,range:r})})}_suggestTrimParts(t){let{range:r}=t;m1.forEach(n=>{t.completionItems.push({label:n,kind:Cr.Keyword,insertText:n,sortText:Nn.keywords,range:r})})}_suggestDateLiterals(t){let{range:r}=t;K9.forEach(n=>{t.completionItems.push({label:n,kind:Cr.Reference,insertText:n,sortText:Nn.literals,range:r})})}_suggestExpressions(t){let{range:r}=t;t.completionItems.push({label:"CASE",kind:Cr.Keyword,insertText:"CASE\n WHEN ${1:condition_1_} THEN ${2:result_1_} \n ELSE ${3:result_2_}\nEND${0}",insertTextRules:Z2.InsertAsSnippet,sortText:Nn.keywords,range:r})}_suggestNull(t){let{range:r}=t;t.completionItems.push({label:"NULL",kind:Cr.Keyword,insertText:"NULL",sortText:Nn.keywords,range:r})}_traverseChildren(t,r){if(t)switch(t.type){case"case-expression":{let n=Kt[t.type];t.format==="simple"?n.forEach(i=>{let o=t[i];Array.isArray(o)?o.forEach(s=>{this.traverse(s,r)}):this.traverse(o,r)}):t.format==="searched"&&n.forEach(i=>{if(i==="operand")return;let o=t[i];Array.isArray(o)?o.forEach(s=>{this.traverse(s,r)}):this.traverse(o,r)})}break;case"when-clause":Kt[t.type].forEach(i=>{let o=t[i];this.traverse(o,r)});break;case"expression-list":Kt[t.type].forEach(i=>{t[i].forEach(s=>{this.traverse(s,r)})});break;case"unary-expression":Kt[t.type].forEach(i=>{let o=t[i];Array.isArray(o)&&this.traverse(o,r)});break;case"binary-expression":Kt[t.type].forEach(i=>{let o=t[i];this.traverse(o,r)});break;case"function":Kt[t.type].forEach(i=>{let o=t[i];this.traverse(o,r)});break;case"interval":Kt[t.type].forEach(i=>{let o=t[i];this.traverse(o,r)});break;case"interval-qualifier":Kt[t.type].forEach(i=>{let o=t[i];this.traverse(o,r)});break;default:break}}};var uY="${assetsPath}/api/sql-expression-api.t9n.${locale}.json";globalThis.onmessage=()=>{N2((e,t)=>new i5(e,t))};var i5=class{constructor(t,{languageId:r,languageOptions:n}){this._ctx=t;this._languageId=r,this._apiService=new X9({assetsPath:n?.assetsPath??"",languageId:r,apiPathTemplate:uY})}async doValidation(t,r){let n=this._getTextDocument(t);if(!n)return await Promise.resolve([]);let i=await this.getApiLibrary(r),o=new Ww(i,r);return await o.validateModel(n.getText()),await Promise.resolve(o.markers)}async doComplete(t,r,n,i){let o=this._getTextDocument(t);if(!o)return await Promise.resolve({suggestions:[]});let s=o.getText(),a=await this.getApiDatabase(i),u=i.profile?g1(i.profile):[],p=await new zw(a,u).getCompletions(r,s,n);return await Promise.resolve({suggestions:p})}async getApiLibrary(t){return await this._apiService.getApiLibrary(t)}async getApiDatabase(t){return await this._apiService.getApiDatabase(t)}_getTextDocument(t){let r=this._ctx.getMirrorModels();for(let n of r)if(n.uri.toString()===t)return a1.create(t,this._languageId,n.version,n.getValue());return null}};})();
167
+ ${n}`:""}`:"Invalid syntax."}function oN(e){if("expected"in e&&Array.isArray(e.expected)){let t=e,r=new Set;return t.expected.filter(i=>i.type==="literal").reduce((i,o)=>(r.has(o.text)||(r.add(o.text),e7.includes(o.text)?i.push({category:"keywords",text:o.text}):t7.includes(o.text)?i.push({category:"operators",text:o.text}):r7.includes(o.text)&&i.push({category:"functions",text:o.text})),i),[])}return[]}var r5=-2;function sN(e,t){if(!Object.values(cu).includes(t.type))return-1;switch(t.type){case"case-expression":return"else";case"when-clause":return e===t.operand?"operand":e===t.value?"value":-1;case"unary-expression":return"expr";case"binary-expression":return e===t.left?"left":e===t.right?"right":-1;case"function":return t.args.value.findIndex(r=>r===e);case"interval":return e===t.value?"value":e===t.qualifier?"qualifier":-1;case"interval-qualifier":return e===t.start?"start":e===t.end?"end":-1;case"expression-list":return"value";default:return-1}}var sY=["boolean","column-reference","current-time","data-type","date","expression-list","interval-period","interval-qualifier","null","number","parameter","string","time","timestamp"];function n5(e,t){let r=e;return sY.includes(r.type)&&t.length>1?(r=t.at(r5),t.pop(),n5(r,t)):r}var aY=["+","-","*","/","||"],lY=["cast","extract","substring","coalesce"],Ww=class{constructor(t,r){this.callStack=[];this._fields=[];this.markers=[];this._sdkFunctions=t.flatMap(n=>n.items),this._fields=r.profile?g1(r.profile):[]}async validateModel(t){try{let{parseTree:r}=await ff(t,new xc);this.traverse(r)}catch(r){this._handleParserFailure(r,t)}}traverse(t){this.callStack.push(t),this._validateNode(t),this._traverseChildren(t),this.callStack.pop()}_validateNode(t){if(t)switch(t.type){case"interval":{let r=t.value.value;if(!n7.test(r)||t.value.type!=="string"){let n=Zr("ExpectedNumericalLiteral"),i=this._getRange(t.value);Or(n,i,this.markers);return}return}case"interval-period":return;case"interval-qualifier":return;case"case-expression":if(t.clauses.length===0){if(t.else){let i=Zr("InvalidElseClause"),o={startLineNumber:t.elseLocation?.start.line??t.else.location.start.line,endLineNumber:t.elseLocation?.end.line??t.else.location.end.line,startColumn:t.elseLocation?.start.column??t.else.location.start.column,endColumn:t.elseLocation?.end.column??t.else.location.end.column};Or(i,o,this.markers);return}let r=Zr("EmptyCaseExpression"),n={startLineNumber:t.location.start.line,endLineNumber:t.location.end.line,startColumn:t.location.start.column,endColumn:t.location.end.column};Or(r,n,this.markers);return}return;case"parameter":return;case"column-reference":{if(Object.values(h1).map(n=>n.toLowerCase()).includes(t.column.toLowerCase()))return;if(!this._fields.find(n=>n.name===t.column)){let n=Zr("UnknownField",{field:t.column});Or(n,t.location,this.markers,!0)}return}case"expression-list":{let r=t.value,n=new Set,i=this.callStack.at(r5);if(i?.type==="function"&&lY.includes(i?.name?.toLowerCase()))return;if(r.forEach(o=>{let s=du(o,this._fields);if(s!=="column-reference"&&s!=="time-only"){if(s==="unknown_function"){let a=Zr("FunctionNotSupported",{function:o.name});Or(a,o.location,this.markers,!0);return}fu(s)&&(s="number"),n.has(s)||n.add(s)}}),n.size>1){let o=Array.from(n),s=Zr("IncompatibleListDataType",{types:J2(o,",")});Or(s,t.location,this.markers,!0)}return}case"binary-expression":{let r=this.callStack.length===1,n=t.left,i=t.right,o=du(n,this._fields),s=du(i,this._fields);if(r&&!aY.includes(t.operator)){let a=`Cannot perform binary operation '${t.operator}' at root node.`;Or(a,t.location,this.markers,!0);return}switch(t.operator){case"AND":case"OR":mi(n,"BOOLEAN",this.markers,this._fields),mi(i,"BOOLEAN",this.markers,this._fields);break;case"IS":case"ISNOT":mi(i,"NULL",this.markers,this._fields);break;case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":mi(i,"EXPRESSION-LIST",this.markers,this._fields);break;case"LIKE":case"NOT LIKE":mi(i,"STRING",this.markers,this._fields);break;case"<>":case"<":case">":case">=":case"<=":case"=":{if(!Y2.includes(s)){let u=Zr("TypeNotAssignable",{providedType:Sn(s),expectedType:J2(Y2,",")});Or(u,i.location,this.markers,!0)}let a=fu(o)&&fu(s);if(o!==s&&!a){let u=Zr("MismatchedTypes",{leftValue:X2(n),providedType:o,rightValue:X2(i),expectedType:s});Or(u,t.location,this.markers,!0)}break}case"*":case"-":case"+":case"/":mi(n,"NUMBER",this.markers,this._fields),mi(i,"NUMBER",this.markers,this._fields);break;case"||":mi(n,"STRING",this.markers,this._fields),mi(i,"STRING",this.markers,this._fields);break;default:{let a=Zr("UnsupportedOperator",{operator:Sn(t.operator)});Or(a,t.location,this.markers,!0)}}return}case"function":{let r=this._getFunction(t.name);if(!r){let n=Zr("FunctionNotSupported",{function:t.name});Or(n,t.location,this.markers,!0);return}if(r.type==="function"){let{min:n,max:i}=r.parametersInfo,{args:{value:o}}=t,s=o.length;if(s<n||s>i){let a=Zr("IncorrectArgumentLength",{minParams:n,maxParams:i,numArgs:s});Or(a,t.location,this.markers)}}}return;case"null":case"boolean":case"string":case"timestamp":case"date":case"time":case"number":case"current-time":return;case"data-type":return;case"unary-expression":console.warn("Unexpected unary expression found.");return;case"when-clause":return}}_handleParserFailure(t,r){if(!Uw(t))throw t;if(r.trim()===""){this.markers=[];return}let n=t,i=n.message;nN(n)&&(i=iN(n));let o={startLineNumber:n.location.start.line,endLineNumber:n.location.end.line,startColumn:n.location.start.column,endColumn:n.location.end.column};Or(i,o,this.markers)}_getRange(t){return{startLineNumber:t.location.start.line,endLineNumber:t.location.end.line,startColumn:t.location.start.column,endColumn:t.location.end.column}}_getFunction(t){return this._sdkFunctions.find(r=>r.name.toLowerCase()===t.toLowerCase())}_traverseChildren(t){if(t)switch(t.type){case"case-expression":{let r=Kt[t.type];t.format==="simple"?r.forEach(n=>{let i=t[n];Array.isArray(i)?i.forEach(o=>{this.traverse(o)}):this.traverse(i)}):t.format==="searched"&&r.forEach(n=>{if(n==="operand")return;let i=t[n];Array.isArray(i)?i.forEach(o=>{this.traverse(o)}):this.traverse(i)})}break;case"when-clause":Kt[t.type].forEach(n=>{let i=t[n];this.traverse(i)});break;case"expression-list":Kt[t.type].forEach(n=>{let i=t[n];Array.isArray(i)?i.forEach(o=>{this.traverse(o)}):this.traverse(i)});break;case"unary-expression":Kt[t.type].forEach(n=>{let i=t[n];Array.isArray(i)&&this.traverse(i)});break;case"binary-expression":Kt[t.type].forEach(n=>{let i=t[n];this.traverse(i)});break;case"function":Kt[t.type].forEach(n=>{let i=t[n];this.traverse(i)});break;case"interval":Kt[t.type].forEach(n=>{let i=t[n];this.traverse(i)});break;case"interval-qualifier":Kt[t.type].forEach(n=>{let i=t[n];this.traverse(i)});break;default:break}}};Rw();t5();var Nn={identifiers:"a",profileVariables:"aa",constants:"ab",literals:"ab",functions:"ac",operators:"ad",snippets:"b",keywords:"c"};function cY(e){switch(e){case"functions":return Cr.Function;case"keywords":return Cr.Keyword;case"operators":return Cr.Operator}}var zw=class{constructor(t,r){this._fields=[];this._sdkFunctions=t,this._fields=r}async getCompletions(t,r,n){let i={range:t,modelContent:r,position:n,lowestNode:void 0,subTree:[],completionItems:[]},o=new xc;try{let{parseTree:s}=await ff(r,o);this.traverse(s,i),this._getCompletions(i)}catch(s){this.handleParserFailure(s,t,i)}return i.completionItems}traverse(t,r){let{position:n,subTree:i}=r;this._isPositionWithinNode(t,n)&&(i.push(t),r.lowestNode=t,this._traverseChildren(t,r))}_getCompletions(t){let{range:r,lowestNode:n,subTree:i}=t;if(!n)return[];let o=n5(n,i);if(!o)return[];let s=sN(n,o);switch(o.type){case"case-expression":o.else||t.completionItems.push({label:"ELSE",kind:Cr.Keyword,insertText:"ELSE",sortText:"a",range:r});break;case"column-reference":this._suggestFields(t),this._suggestFunctions(t),this._suggestExpressions(t);break;case"function":this._getCompletionsFromFunction(o,s,t);break;case"interval":if(s==="qualifier"){this._suggestDatePeriods(t);break}else if(s==="value")break;break;case"binary-expression":this._suggestFields(t),this._suggestFunctions(t);break;case"string":case"number":case"boolean":case"when-clause":case"date":case"time":case"timestamp":case"current-time":case"null":case"expression-list":case"interval-period":case"interval-qualifier":case"data-type":case"parameter":case"unary-expression":break}return t.completionItems}handleParserFailure(t,r,n){Uw(t)&&oN(t).forEach(o=>{n.completionItems.push({label:o.text,kind:cY(o.category),insertText:o.text,sortText:Nn[o.category],range:r})})}_getCompletionsFromFunction(t,r,n){let{range:i}=n;switch(t.name.toUpperCase()){case"CAST":r===0?this._suggestFields(n):r===1?this._suggestDataTypes(n):t.args.value.length&&r===-1?n.completionItems.push({label:"AS",kind:Cr.Keyword,insertText:"AS",sortText:Nn.keywords,range:i}):this._suggestFields(n);break;case"EXTRACT":r===0?this._suggestDatePeriods(n):r===1?(this._suggestFields(n),this._suggestDateLiterals(n)):t.args.value.length&&r===-1?n.completionItems.push({label:"FROM",kind:Cr.Keyword,insertText:"FROM",sortText:Nn.keywords,range:i}):this._suggestDatePeriods(n);break;case"TRIM":r===0?this._suggestTrimParts(n):r===1?this._suggestTrimParts(n):r===2?this._suggestFields(n):t.args.value.length&&r===-1?n.completionItems.push({label:"FROM",kind:Cr.Keyword,insertText:"FROM",sortText:Nn.keywords,range:i}):this._suggestTrimParts(n);break;case"COALESCE":this._suggestFields(n),this._suggestNull(n);break;case"POSITION":r===1&&this._suggestFields(n);break;case"ABS":case"ACOS":case"ASIN":case"ATAN":case"CEILING":case"COS":case"FLOOR":case"LOG":case"LOG10":case"POWER":case"ROUND":case"SIGN":case"SIN":case"TAN":case"CHAR_LENGTH":case"CONCAT":case"LOWER":case"UPPER":this._suggestFields(n);break;case"CURRENT_DATE":case"CURRENT_TIME":case"CURRENT_TIMESTAMP":break}}_isPositionWithinNode(t,r){if(!t)return!1;let{start:n,end:i}=t.location;return!(r.lineNumber<n.line||r.lineNumber>i.line||r.lineNumber===n.line&&r.column<n.column||r.lineNumber===i.line&&r.column>i.column)}_suggestFields(t){let{range:r}=t;this._fields.forEach(n=>{t.completionItems.push({label:n.name,kind:Cr.Field,insertText:n.name,documentation:n.completion?.documentation,detail:n.completion?.detail,sortText:Nn.profileVariables,range:r})})}_suggestFunctions(t){let{range:r}=t;this._sdkFunctions.functionDefinitions.forEach(n=>{let{overloads:i}=n;i.forEach(o=>{t.completionItems.push({label:o.completion.label,kind:Cr.Function,insertText:o.completion.insertText||o.completion.label,insertTextRules:Z2.InsertAsSnippet,documentation:o.completion.documentation,detail:o.completion.detail,sortText:Nn.functions,range:r})})})}_suggestDataTypes(t){let{range:r}=t;p1.forEach(n=>{t.completionItems.push({label:n,kind:Cr.Keyword,insertText:n,sortText:Nn.keywords,range:r})})}_suggestDatePeriods(t){let{range:r}=t;uu.forEach(n=>{t.completionItems.push({label:n,kind:Cr.Keyword,insertText:n,sortText:Nn.keywords,range:r})})}_suggestTrimParts(t){let{range:r}=t;m1.forEach(n=>{t.completionItems.push({label:n,kind:Cr.Keyword,insertText:n,sortText:Nn.keywords,range:r})})}_suggestDateLiterals(t){let{range:r}=t;K9.forEach(n=>{t.completionItems.push({label:n,kind:Cr.Reference,insertText:n,sortText:Nn.literals,range:r})})}_suggestExpressions(t){let{range:r}=t;t.completionItems.push({label:"CASE",kind:Cr.Keyword,insertText:"CASE\n WHEN ${1:condition_1_} THEN ${2:result_1_} \n ELSE ${3:result_2_}\nEND${0}",insertTextRules:Z2.InsertAsSnippet,sortText:Nn.keywords,range:r})}_suggestNull(t){let{range:r}=t;t.completionItems.push({label:"NULL",kind:Cr.Keyword,insertText:"NULL",sortText:Nn.keywords,range:r})}_traverseChildren(t,r){if(t)switch(t.type){case"case-expression":{let n=Kt[t.type];t.format==="simple"?n.forEach(i=>{let o=t[i];Array.isArray(o)?o.forEach(s=>{this.traverse(s,r)}):this.traverse(o,r)}):t.format==="searched"&&n.forEach(i=>{if(i==="operand")return;let o=t[i];Array.isArray(o)?o.forEach(s=>{this.traverse(s,r)}):this.traverse(o,r)})}break;case"when-clause":Kt[t.type].forEach(i=>{let o=t[i];this.traverse(o,r)});break;case"expression-list":Kt[t.type].forEach(i=>{t[i].forEach(s=>{this.traverse(s,r)})});break;case"unary-expression":Kt[t.type].forEach(i=>{let o=t[i];Array.isArray(o)&&this.traverse(o,r)});break;case"binary-expression":Kt[t.type].forEach(i=>{let o=t[i];this.traverse(o,r)});break;case"function":Kt[t.type].forEach(i=>{let o=t[i];this.traverse(o,r)});break;case"interval":Kt[t.type].forEach(i=>{let o=t[i];this.traverse(o,r)});break;case"interval-qualifier":Kt[t.type].forEach(i=>{let o=t[i];this.traverse(o,r)});break;default:break}}};var uY="${assetsPath}/api/sql-expression-api.t9n.${locale}.json";globalThis.onmessage=()=>{N2((e,t)=>new i5(e,t))};var i5=class{constructor(t,{languageId:r,languageOptions:n}){this._ctx=t;this._languageId=r,this._apiService=new X9({assetsPath:n?.assetsPath??"",languageId:r,apiPathTemplate:uY})}async doValidation(t,r){let n=this._getTextDocument(t);if(!n)return await Promise.resolve([]);let i=await this.getApiLibrary(r),o=new Ww(i,r);return await o.validateModel(n.getText()),await Promise.resolve(o.markers)}async doComplete(t,r,n,i){let o=this._getTextDocument(t);if(!o)return await Promise.resolve({suggestions:[]});let s=o.getText(),a=await this.getApiDatabase(i),u=i.profile?g1(i.profile):[],p=await new zw(a,u).getCompletions(r,s,n);return await Promise.resolve({suggestions:p})}async getApiLibrary(t){return await this._apiService.getApiLibrary(t)}async getApiDatabase(t){return await this._apiService.getApiDatabase(t)}_getTextDocument(t){let r=this._ctx.getMirrorModels();for(let n of r)if(n.uri.toString()===t)return a1.create(t,this._languageId,n.version,n.getValue());return null}};})();
168
168
  /*! Bundled license information:
169
169
 
170
170
  @esri/arcgis-html-sanitizer/dist/esm/index.js: