chunk-NS7TRIN4.js 98 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636
  1. import {
  2. g,
  3. t as t3
  4. } from "./chunk-WGHU7NSM.js";
  5. import {
  6. e as e2
  7. } from "./chunk-KD6NQDSX.js";
  8. import {
  9. l as l2
  10. } from "./chunk-AXIWHIDY.js";
  11. import {
  12. J as J2
  13. } from "./chunk-PLCWBBQ4.js";
  14. import {
  15. M,
  16. P as P3,
  17. Z as Z2,
  18. d,
  19. p as p3
  20. } from "./chunk-C3UFAVPF.js";
  21. import {
  22. Ae,
  23. Ce,
  24. DateTime,
  25. E,
  26. F2 as F,
  27. Fe,
  28. G,
  29. H,
  30. I,
  31. Ie,
  32. J,
  33. K,
  34. L,
  35. O,
  36. P,
  37. P2,
  38. R,
  39. Re,
  40. Se,
  41. U,
  42. V,
  43. W,
  44. X,
  45. Y,
  46. Z,
  47. _,
  48. ae,
  49. e,
  50. h as h2,
  51. i2 as i,
  52. ie,
  53. k as k2,
  54. le,
  55. pe,
  56. re,
  57. se,
  58. t,
  59. t2,
  60. te,
  61. ue,
  62. v2 as v3,
  63. w as w3,
  64. z
  65. } from "./chunk-FT2BCPUP.js";
  66. import {
  67. p as p2
  68. } from "./chunk-5JZ72JAQ.js";
  69. import {
  70. l
  71. } from "./chunk-5UVJ64RB.js";
  72. import {
  73. v as v2
  74. } from "./chunk-RMDDCMKS.js";
  75. import {
  76. h,
  77. m2 as m,
  78. u,
  79. v2 as v
  80. } from "./chunk-VCH45Q2I.js";
  81. import {
  82. p,
  83. w,
  84. w2
  85. } from "./chunk-6T6G6LCQ.js";
  86. import {
  87. k2 as k
  88. } from "./chunk-PQFTYGF5.js";
  89. import {
  90. C
  91. } from "./chunk-V6P2MAQQ.js";
  92. import {
  93. c
  94. } from "./chunk-YXWMMD76.js";
  95. // node_modules/@arcgis/core/arcade/treeAnalysis.js
  96. var e3 = { all: { min: 2, max: 2 }, none: { min: 2, max: 2 }, any: { min: 2, max: 2 }, reduce: { min: 2, max: 3 }, map: { min: 2, max: 2 }, filter: { min: 2, max: 2 }, fromcodepoint: { min: 1, max: -1 }, fromcharcode: { min: 1, max: -1 }, tocodepoint: { min: 1, max: 2 }, tocharcode: { min: 1, max: 2 }, concatenate: { min: 0, max: -1 }, expects: { min: 1, max: -1 }, getfeatureset: { min: 1, max: 2 }, week: { min: 1, max: 2 }, fromjson: { min: 1, max: 1 }, length3d: { min: 1, max: 2 }, tohex: { min: 1, max: 1 }, hash: { min: 1, max: 1 }, isoweek: { min: 1, max: 1 }, isoweekday: { min: 1, max: 1 }, hasvalue: { min: 2, max: 2 }, isomonth: { min: 1, max: 1 }, isoyear: { min: 1, max: 1 }, resize: { min: 2, max: 3 }, slice: { min: 0, max: -1 }, splice: { min: 0, max: -1 }, push: { min: 2, max: 2 }, pop: { min: 1, max: 1 }, includes: { min: 2, max: 2 }, array: { min: 1, max: 2 }, front: { min: 1, max: 1 }, back: { min: 1, max: 1 }, insert: { min: 3, max: 3 }, erase: { min: 2, max: 2 }, split: { min: 2, max: 4 }, guid: { min: 0, max: 1 }, standardizeguid: { min: 2, max: 2 }, today: { min: 0, max: 0 }, angle: { min: 2, max: 3 }, bearing: { min: 2, max: 3 }, urlencode: { min: 1, max: 1 }, now: { min: 0, max: 0 }, timestamp: { min: 0, max: 0 }, day: { min: 1, max: 1 }, month: { min: 1, max: 1 }, year: { min: 1, max: 1 }, hour: { min: 1, max: 1 }, second: { min: 1, max: 1 }, millisecond: { min: 1, max: 1 }, minute: { min: 1, max: 1 }, weekday: { min: 1, max: 1 }, toutc: { min: 1, max: 1 }, tolocal: { min: 1, max: 1 }, date: { min: 0, max: 7 }, datediff: { min: 2, max: 3 }, dateadd: { min: 2, max: 3 }, trim: { min: 1, max: 1 }, text: { min: 1, max: 2 }, left: { min: 2, max: 2 }, right: { min: 2, max: 2 }, mid: { min: 2, max: 3 }, upper: { min: 1, max: 1 }, proper: { min: 1, max: 2 }, lower: { min: 1, max: 1 }, find: { min: 2, max: 3 }, iif: { min: 3, max: 3 }, decode: { min: 2, max: -1 }, when: { min: 2, max: -1 }, defaultvalue: { min: 2, max: 2 }, isempty: { min: 1, max: 1 }, domaincode: { min: 2, max: 4 }, domainname: { min: 2, max: 4 }, polygon: { min: 1, max: 1 }, point: { min: 1, max: 1 }, polyline: { min: 1, max: 1 }, extent: { min: 1, max: 1 }, multipoint: { min: 1, max: 1 }, ringisclockwise: { min: 1, max: 1 }, geometry: { min: 1, max: 1 }, count: { min: 0, max: -1 }, number: { min: 1, max: 2 }, acos: { min: 1, max: 1 }, asin: { min: 1, max: 1 }, atan: { min: 1, max: 1 }, atan2: { min: 2, max: 2 }, ceil: { min: 1, max: 2 }, floor: { min: 1, max: 2 }, round: { min: 1, max: 2 }, cos: { min: 1, max: 1 }, exp: { min: 1, max: 1 }, log: { min: 1, max: 1 }, min: { min: 0, max: -1 }, constrain: { min: 3, max: 3 }, console: { min: 0, max: -1 }, max: { min: 0, max: -1 }, pow: { min: 2, max: 2 }, random: { min: 0, max: 0 }, sqrt: { min: 1, max: 1 }, sin: { min: 1, max: 1 }, tan: { min: 1, max: 1 }, abs: { min: 1, max: 1 }, isnan: { min: 1, max: 1 }, stdev: { min: 0, max: -1 }, average: { min: 0, max: -1 }, mean: { min: 0, max: -1 }, sum: { min: 0, max: -1 }, variance: { min: 0, max: -1 }, distinct: { min: 0, max: -1 }, first: { min: 1, max: 1 }, top: { min: 2, max: 2 }, boolean: { min: 1, max: 1 }, dictionary: { min: 0, max: -1 }, typeof: { min: 1, max: 1 }, reverse: { min: 1, max: 1 }, replace: { min: 3, max: 4 }, sort: { min: 1, max: 2 }, feature: { min: 1, max: -1 }, haskey: { min: 2, max: 2 }, indexof: { min: 2, max: 2 }, disjoint: { min: 2, max: 2 }, intersects: { min: 2, max: 2 }, touches: { min: 2, max: 2 }, crosses: { min: 2, max: 2 }, within: { min: 2, max: 2 }, contains: { min: 2, max: 2 }, overlaps: { min: 2, max: 2 }, equals: { min: 2, max: 2 }, relate: { min: 3, max: 3 }, intersection: { min: 2, max: 2 }, union: { min: 1, max: 2 }, difference: { min: 2, max: 2 }, symmetricdifference: { min: 2, max: 2 }, clip: { min: 2, max: 2 }, cut: { min: 2, max: 2 }, area: { min: 1, max: 2 }, areageodetic: { min: 1, max: 2 }, length: { min: 1, max: 2 }, lengthgeodetic: { min: 1, max: 2 }, distancegeodetic: { min: 2, max: 3 }, distance: { min: 2, max: 3 }, densify: { min: 2, max: 3 }, densifygeodetic: { min: 2, max: 3 }, generalize: { min: 2, max: 4 }, buffer: { min: 2, max: 3 }, buffergeodetic: { min: 2, max: 3 }, offset: { min: 2, max: 6 }, rotate: { min: 2, max: 3 }, issimple: { min: 1, max: 1 }, simplify: { min: 1, max: 1 }, convexhull: { min: 1, max: 1 }, centroid: { min: 1, max: 1 }, isselfintersecting: { min: 1, max: 1 }, multiparttosinglepart: { min: 1, max: 1 }, setgeometry: { min: 2, max: 2 }, portal: { min: 1, max: 1 }, getuser: { min: 0, max: 2 }, subtypes: { min: 1, max: 1 }, subtypecode: { min: 1, max: 1 }, subtypename: { min: 1, max: 1 }, domain: { min: 2, max: 3 }, convertdirection: { min: 3, max: 3 }, schema: { min: 1, max: 1 } };
  97. var n = { functionDefinitions: /* @__PURE__ */ new Map(), constantDefinitions: /* @__PURE__ */ new Map() };
  98. var a = { functionDefinitions: /* @__PURE__ */ new Map(), constantDefinitions: /* @__PURE__ */ new Map() };
  99. for (const b2 of ["pi", "infinity"])
  100. a.constantDefinitions.set(b2, { type: "constant" }), n.constantDefinitions.set(b2, { type: "constant" });
  101. a.constantDefinitions.set("textformatting", { type: "namespace", key: "textformatting", members: [{ key: "backwardslash", type: "constant" }, { key: "doublequote", type: "constant" }, { key: "forwardslash", type: "constant" }, { key: "tab", type: "constant" }, { key: "singlequote", type: "constant" }, { key: "newline", type: "constant" }] }), n.constantDefinitions.set("textformatting", { type: "namespace", key: "textformatting", members: [{ key: "backwardslash", type: "constant" }, { key: "tab", type: "constant" }, { key: "singlequote", type: "constant" }, { key: "doublequote", type: "constant" }, { key: "forwardslash", type: "constant" }, { key: "newline", type: "constant" }] });
  102. for (const b2 in e3) {
  103. const t6 = e3[b2];
  104. a.functionDefinitions.set(b2, { overloads: [{ type: "function", parametersInfo: { min: t6.min, max: t6.max } }] }), n.functionDefinitions.set(b2, { overloads: [{ type: "function", parametersInfo: { min: t6.min, max: t6.max } }] });
  105. }
  106. var t4 = ["featureset", "getuser", "featuresetbyid", "featuresetbyname", "featuresetbyassociation", "featuresetbyrelationshipname", "featuresetbyurl", "getfeatureset", "attachments", "featuresetbyportalitem"];
  107. var i2 = ["disjoint", "intersects", "touches", "crosses", "within", "contains", "overlaps", "equals", "relate", "intersection", "union", "difference", "symmetricdifference", "clip", "cut", "area", "areageodetic", "length", "length3d", "lengthgeodetic", "distance", "distancegeodetic", "densify", "densifygeodetic", "generalize", "buffer", "buffergeodetic", "offset", "rotate", "issimple", "convexhull", "simplify", "multiparttosinglepart"];
  108. function m2(e5) {
  109. return "string" == typeof e5 || e5 instanceof String;
  110. }
  111. function o(e5, t6) {
  112. var _a;
  113. const i4 = "sync" === t6 ? n : a;
  114. i4.functionDefinitions.has(e5.name.toLowerCase()) ? (_a = i4.functionDefinitions.get(e5.name.toLowerCase())) == null ? void 0 : _a.overloads.push({ type: "function", parametersInfo: { min: e5.min, max: e5.max } }) : i4.functionDefinitions.set(e5.name.toLowerCase(), { overloads: [{ type: "function", parametersInfo: { min: e5.min, max: e5.max } }] });
  115. }
  116. function s(e5, n3) {
  117. if (e5)
  118. for (const a3 of e5)
  119. r(a3, n3);
  120. }
  121. function r(e5, n3) {
  122. if (e5 && false !== n3(e5))
  123. switch (e5.type) {
  124. case "ImportDeclaration":
  125. s(e5.specifiers, n3), r(e5.source, n3);
  126. break;
  127. case "ExportNamedDeclaration":
  128. r(e5.declaration, n3);
  129. break;
  130. case "ArrayExpression":
  131. s(e5.elements, n3);
  132. break;
  133. case "AssignmentExpression":
  134. case "BinaryExpression":
  135. case "LogicalExpression":
  136. r(e5.left, n3), r(e5.right, n3);
  137. break;
  138. case "BlockStatement":
  139. case "Program":
  140. s(e5.body, n3);
  141. break;
  142. case "BreakStatement":
  143. case "ContinueStatement":
  144. case "EmptyStatement":
  145. case "Identifier":
  146. case "Literal":
  147. break;
  148. case "CallExpression":
  149. r(e5.callee, n3), s(e5.arguments, n3);
  150. break;
  151. case "ExpressionStatement":
  152. r(e5.expression, n3);
  153. break;
  154. case "ForInStatement":
  155. r(e5.left, n3), r(e5.right, n3), r(e5.body, n3);
  156. break;
  157. case "ForStatement":
  158. r(e5.init, n3), r(e5.test, n3), r(e5.update, n3), r(e5.body, n3);
  159. break;
  160. case "WhileStatement":
  161. r(e5.test, n3), r(e5.body, n3);
  162. break;
  163. case "FunctionDeclaration":
  164. r(e5.id, n3), s(e5.params, n3), r(e5.body, n3);
  165. break;
  166. case "IfStatement":
  167. r(e5.test, n3), r(e5.consequent, n3), r(e5.alternate, n3);
  168. break;
  169. case "MemberExpression":
  170. r(e5.object, n3), r(e5.property, n3);
  171. break;
  172. case "ObjectExpression":
  173. s(e5.properties, n3);
  174. break;
  175. case "Property":
  176. r(e5.key, n3), r(e5.value, n3);
  177. break;
  178. case "ReturnStatement":
  179. case "UnaryExpression":
  180. case "UpdateExpression":
  181. r(e5.argument, n3);
  182. break;
  183. case "VariableDeclaration":
  184. s(e5.declarations, n3);
  185. break;
  186. case "VariableDeclarator":
  187. r(e5.id, n3), r(e5.init, n3);
  188. break;
  189. case "TemplateLiteral":
  190. s(e5.expressions, n3), s(e5.quasis, n3);
  191. }
  192. }
  193. function c2(e5, n3) {
  194. let a3 = false;
  195. const t6 = n3.toLowerCase();
  196. return r(e5, (e6) => !a3 && ("Identifier" === e6.type && e6.name && e6.name.toLowerCase() === t6 && (a3 = true), true)), a3;
  197. }
  198. function x(e5) {
  199. const n3 = [];
  200. return r(e5, (e6) => ("ImportDeclaration" === e6.type && e6.source && e6.source.value && n3.push({ libname: e6.specifiers[0].local.name.toLowerCase(), source: e6.source.value }), true)), n3;
  201. }
  202. function p4(e5, n3) {
  203. let a3 = false;
  204. const t6 = n3.toLowerCase();
  205. return r(e5, (e6) => !a3 && ("CallExpression" !== e6.type || "Identifier" !== e6.callee.type || !e6.callee.name || e6.callee.name.toLowerCase() !== t6 || (a3 = true, false))), a3;
  206. }
  207. function l3(e5) {
  208. const n3 = [];
  209. return r(e5, (e6) => {
  210. var _a;
  211. return "MemberExpression" !== e6.type || "Identifier" !== e6.object.type || (false === e6.computed && e6.object && e6.object.name && e6.property && "Identifier" === e6.property.type && e6.property.name ? n3.push(e6.object.name.toLowerCase() + "." + e6.property.name.toLowerCase()) : e6.object && e6.object.name && e6.property && "Literal" === e6.property.type && "string" == typeof e6.property.value && n3.push(e6.object.name.toLowerCase() + "." + ((_a = e6.property.value) == null ? void 0 : _a.toString().toLowerCase())), false);
  212. }), n3;
  213. }
  214. function u2(e5) {
  215. const n3 = [];
  216. return r(e5, (e6) => {
  217. var _a;
  218. if ("CallExpression" === e6.type) {
  219. if ("Identifier" === e6.callee.type && "expects" === e6.callee.name.toLowerCase()) {
  220. let a3 = "";
  221. for (let t6 = 0; t6 < (e6.arguments || []).length; t6++)
  222. 0 === t6 ? "Identifier" === e6.arguments[t6].type && (a3 = e6.arguments[t6].name.toLowerCase()) : a3 && "Literal" === e6.arguments[t6].type && m2(e6.arguments[t6].value) && n3.push(a3 + "." + e6.arguments[t6].value.toLowerCase());
  223. return false;
  224. }
  225. if ("Identifier" === e6.callee.type && ["domainname", "domaincode", "domain", "haskey"].includes(e6.callee.name.toLowerCase()) && e6.arguments.length >= 2) {
  226. let a3 = "";
  227. return "Identifier" === e6.arguments[0].type && (a3 = e6.arguments[0].name.toLowerCase()), a3 && "Literal" === e6.arguments[1].type && m2(e6.arguments[1].value) && n3.push(a3 + "." + e6.arguments[1].value.toLowerCase()), false;
  228. }
  229. }
  230. return "MemberExpression" !== e6.type || "Identifier" !== e6.object.type || (false === e6.computed && e6.object && e6.object.name && e6.property && "Identifier" === e6.property.type && e6.property.name ? n3.push(e6.object.name.toLowerCase() + "." + e6.property.name.toLowerCase()) : e6.object && e6.object.name && e6.property && "Literal" === e6.property.type && "string" == typeof e6.property.value && n3.push(e6.object.name.toLowerCase() + "." + ((_a = e6.property.value) == null ? void 0 : _a.toString().toLowerCase())), false);
  231. }), n3;
  232. }
  233. function y(e5) {
  234. const n3 = [];
  235. return r(e5, (e6) => ("CallExpression" === e6.type && "Identifier" === e6.callee.type && n3.push(e6.callee.name.toLowerCase()), true)), n3;
  236. }
  237. function d2(e5, n3 = []) {
  238. let a3 = null;
  239. if (void 0 === e5.usesFeatureSet) {
  240. null === a3 && (a3 = y(e5)), e5.usesFeatureSet = false;
  241. for (let n4 = 0; n4 < a3.length; n4++)
  242. t4.includes(a3[n4]) && (e5.usesFeatureSet = true, e5.isAsync = true);
  243. if (false === e5.usesFeatureSet && n3 && n3.length > 0) {
  244. for (const a4 of n3)
  245. if (c2(e5, a4)) {
  246. e5.usesFeatureSet = true, e5.isAsync = true;
  247. break;
  248. }
  249. }
  250. }
  251. if (void 0 === e5.usesModules) {
  252. e5.usesModules = false;
  253. x(e5).length > 0 && (e5.usesModules = true);
  254. }
  255. if (void 0 === e5.usesGeometry) {
  256. e5.usesGeometry = false, null === a3 && (a3 = y(e5));
  257. for (let n4 = 0; n4 < a3.length; n4++)
  258. i2.includes(a3[n4]) && (e5.usesGeometry = true);
  259. }
  260. }
  261. // node_modules/@arcgis/core/chunks/array.js
  262. function F2(F4) {
  263. function m6(e5, o2, i4) {
  264. if (e5 instanceof t2)
  265. return e5.toArray();
  266. if (Y(e5))
  267. return e5;
  268. throw new t(o2, e.InvalidParameter, i4);
  269. }
  270. function p6(n3, t6) {
  271. const r3 = n3.length, e5 = Math.floor(r3 / 2);
  272. return 0 === r3 ? [] : 1 === r3 ? [n3[0]] : y4(p6(n3.slice(0, e5), t6), p6(n3.slice(e5, r3), t6), t6);
  273. }
  274. function y4(n3, t6, r3) {
  275. const e5 = [];
  276. for (; n3.length > 0 || t6.length > 0; )
  277. if (n3.length > 0 && t6.length > 0) {
  278. let o2 = r3(n3[0], t6[0]);
  279. isNaN(o2) && (o2 = 0), o2 <= 0 ? (e5.push(n3[0]), n3 = n3.slice(1)) : (e5.push(t6[0]), t6 = t6.slice(1));
  280. } else
  281. n3.length > 0 ? (e5.push(n3[0]), n3 = n3.slice(1)) : t6.length > 0 && (e5.push(t6[0]), t6 = t6.slice(1));
  282. return e5;
  283. }
  284. async function v5(n3, t6) {
  285. const r3 = n3.length, e5 = Math.floor(r3 / 2);
  286. if (0 === r3)
  287. return [];
  288. if (1 === r3)
  289. return [n3[0]];
  290. const o2 = [await v5(n3.slice(0, e5), t6), await v5(n3.slice(e5, r3), t6)];
  291. return P5(o2[0], o2[1], t6, []);
  292. }
  293. async function P5(n3, t6, r3, e5) {
  294. const o2 = e5;
  295. if (!(n3.length > 0 || t6.length > 0))
  296. return e5;
  297. if (n3.length > 0 && t6.length > 0) {
  298. let i4 = await r3(n3[0], t6[0]);
  299. return isNaN(i4) && (i4 = 1), i4 <= 0 ? (o2.push(n3[0]), n3 = n3.slice(1)) : (o2.push(t6[0]), t6 = t6.slice(1)), P5(n3, t6, r3, e5);
  300. }
  301. return n3.length > 0 ? (o2.push(n3[0]), P5(n3 = n3.slice(1), t6, r3, e5)) : t6.length > 0 ? (o2.push(t6[0]), P5(n3, t6 = t6.slice(1), r3, e5)) : void 0;
  302. }
  303. function I3(r3, o2, i4, u3) {
  304. V(i4, 1, 2, r3, o2);
  305. let l6 = i4[0];
  306. if (E(l6) && (l6 = l6.toArray()), false === Y(l6))
  307. throw new t(r3, e.InvalidParameter, o2);
  308. if (i4.length > 1) {
  309. if (false === F(i4[1]))
  310. throw new t(r3, e.InvalidParameter, o2);
  311. let e5 = l6;
  312. const a3 = i4[1].createFunction(r3);
  313. return u3 ? v5(e5, a3) : (e5 = p6(e5, (n3, t6) => a3(n3, t6)), e5);
  314. }
  315. let f2 = l6;
  316. if (0 === f2.length)
  317. return [];
  318. const g3 = {};
  319. for (let n3 = 0; n3 < f2.length; n3++) {
  320. const t6 = O(f2[n3]);
  321. "" !== t6 && (g3[t6] = true);
  322. }
  323. if (true === g3.Array || true === g3.Dictionary || true === g3.Feature || true === g3.Point || true === g3.Polygon || true === g3.Polyline || true === g3.Multipoint || true === g3.Extent || true === g3.Function)
  324. return f2.slice(0);
  325. let F5 = 0, m7 = "";
  326. for (const n3 in g3)
  327. F5++, m7 = n3;
  328. return f2 = F5 > 1 || "String" === m7 ? p6(f2, (n3, t6) => {
  329. if (null == n3 || n3 === k2)
  330. return null == t6 || t6 === k2 ? 0 : 1;
  331. if (null == t6 || t6 === k2)
  332. return -1;
  333. const r4 = K(n3), e5 = K(t6);
  334. return r4 < e5 ? -1 : r4 === e5 ? 0 : 1;
  335. }) : "Number" === m7 ? p6(f2, (n3, t6) => n3 - t6) : "Boolean" === m7 ? p6(f2, (n3, t6) => n3 === t6 ? 0 : t6 ? -1 : 1) : "Date" === m7 ? p6(f2, (n3, t6) => t6 - n3) : f2.slice(0), f2;
  336. }
  337. F4.functions.array = function(r3, a3) {
  338. return F4.standardFunction(r3, a3, (c3, s4, l6) => {
  339. V(l6, 1, 2, r3, a3);
  340. const f2 = re(l6[0]);
  341. if (isNaN(f2) || false === L(f2))
  342. throw new t(r3, e.InvalidParameter, a3);
  343. const d5 = v3(l6[1], null), h5 = new Array(f2);
  344. return h5.fill(d5), h5;
  345. });
  346. }, F4.functions.front = function(r3, o2) {
  347. return F4.standardFunction(r3, o2, (i4, u3, s4) => {
  348. if (V(s4, 1, 1, r3, o2), E(s4[0])) {
  349. if (s4[0].length() <= 0)
  350. throw new t(r3, e.OutOfBounds, o2);
  351. return s4[0].get(0);
  352. }
  353. if (Y(s4[0])) {
  354. if (s4[0].length <= 0)
  355. throw new t(r3, e.OutOfBounds, o2);
  356. return s4[0][0];
  357. }
  358. throw new t(r3, e.InvalidParameter, o2);
  359. });
  360. }, F4.functions.back = function(r3, o2) {
  361. return F4.standardFunction(r3, o2, (i4, u3, s4) => {
  362. if (V(s4, 1, 1, r3, o2), E(s4[0])) {
  363. if (s4[0].length() <= 0)
  364. throw new t(r3, e.OutOfBounds, o2);
  365. return s4[0].get(s4[0].length() - 1);
  366. }
  367. if (Y(s4[0])) {
  368. if (s4[0].length <= 0)
  369. throw new t(r3, e.OutOfBounds, o2);
  370. return s4[0][s4[0].length - 1];
  371. }
  372. throw new t(r3, e.InvalidParameter, o2);
  373. });
  374. }, F4.functions.push = function(r3, o2) {
  375. return F4.standardFunction(r3, o2, (i4, u3, a3) => {
  376. if (V(a3, 1, 2, r3, o2), Y(a3[0]))
  377. return a3[0][a3[0].length] = a3[1], a3[0].length;
  378. throw new t(r3, e.InvalidParameter, o2);
  379. });
  380. }, F4.functions.pop = function(r3, o2) {
  381. return F4.standardFunction(r3, o2, (i4, u3, a3) => {
  382. if (V(a3, 1, 1, r3, o2), Y(a3[0])) {
  383. if (a3[0].length <= 0)
  384. throw new t(r3, e.OutOfBounds, o2);
  385. const e5 = a3[0][a3[0].length - 1];
  386. return a3[0].length = a3[0].length - 1, e5;
  387. }
  388. throw new t(r3, e.InvalidParameter, o2);
  389. });
  390. }, F4.functions.erase = function(r3, u3) {
  391. return F4.standardFunction(r3, u3, (a3, l6, f2) => {
  392. if (V(f2, 2, 2, r3, u3), Y(f2[0])) {
  393. let e5 = re(f2[1]);
  394. if (isNaN(e5) || false === L(e5))
  395. throw new t(r3, e.InvalidParameter, u3);
  396. const a4 = f2[0];
  397. if (a4.length <= 0)
  398. throw new t(r3, e.OutOfBounds, u3);
  399. if (e5 < 0 && (e5 = a4.length + e5), e5 < 0)
  400. throw new t(r3, e.OutOfBounds, u3);
  401. if (e5 >= a4.length)
  402. throw new t(r3, e.OutOfBounds, u3);
  403. return a4.splice(e5, 1), k2;
  404. }
  405. throw new t(r3, e.InvalidParameter, u3);
  406. });
  407. }, F4.functions.insert = function(r3, u3) {
  408. return F4.standardFunction(r3, u3, (a3, l6, f2) => {
  409. if (V(f2, 3, 3, r3, u3), Y(f2[0])) {
  410. const e5 = re(f2[1]);
  411. if (isNaN(e5) || false === L(e5))
  412. throw new t(r3, e.InvalidParameter, u3);
  413. const a4 = f2[2], c3 = f2[0];
  414. if (e5 > c3.length)
  415. throw new t(r3, e.OutOfBounds, u3);
  416. if (e5 < 0 && e5 < -1 * c3.length)
  417. throw new t(r3, e.OutOfBounds, u3);
  418. return e5 === c3.length ? (c3[e5] = a4, k2) : (c3.splice(e5, 0, a4), k2);
  419. }
  420. throw new t(r3, e.InvalidParameter, u3);
  421. });
  422. }, F4.functions.resize = function(r3, a3) {
  423. return F4.standardFunction(r3, a3, (l6, f2, d5) => {
  424. if (V(d5, 2, 3, r3, a3), Y(d5[0])) {
  425. const e5 = re(d5[1]);
  426. if (isNaN(e5) || false === L(e5))
  427. throw new t(r3, e.InvalidParameter, a3);
  428. if (e5 < 0)
  429. throw new t(r3, e.InvalidParameter, a3);
  430. const c3 = v3(d5[2], null), l7 = d5[0];
  431. if (l7.length >= e5)
  432. return l7.length = e5, k2;
  433. const f3 = l7.length;
  434. l7.length = e5;
  435. for (let n3 = f3; n3 < l7.length; n3++)
  436. l7[n3] = c3;
  437. return k2;
  438. }
  439. throw new t(r3, e.InvalidParameter, a3);
  440. });
  441. }, F4.functions.includes = function(r3, o2) {
  442. return F4.standardFunction(r3, o2, (i4, u3, s4) => {
  443. if (V(s4, 2, 2, r3, o2), Y(s4[0])) {
  444. const n3 = s4[1];
  445. return s4[0].findIndex((t6) => X(t6, n3)) > -1;
  446. }
  447. if (E(s4[0])) {
  448. const n3 = s4[1];
  449. return s4[0].toArray().findIndex((t6) => X(t6, n3)) > -1;
  450. }
  451. throw new t(r3, e.InvalidParameter, o2);
  452. });
  453. }, F4.functions.slice = function(r3, s4) {
  454. return F4.standardFunction(r3, s4, (l6, f2, d5) => {
  455. if (V(d5, 1, 3, r3, s4), Y(d5[0])) {
  456. const e5 = re(v3(d5[1], 0)), a3 = re(v3(d5[2], d5[0].length));
  457. if (isNaN(e5) || false === L(e5))
  458. throw new t(r3, e.InvalidParameter, s4);
  459. if (isNaN(a3) || false === L(a3))
  460. throw new t(r3, e.InvalidParameter, s4);
  461. return d5[0].slice(e5, a3);
  462. }
  463. if (E(d5[0])) {
  464. const e5 = d5[0], a3 = re(v3(d5[1], 0)), c3 = re(v3(d5[2], e5.length()));
  465. if (isNaN(a3) || false === L(a3))
  466. throw new t(r3, e.InvalidParameter, s4);
  467. if (isNaN(c3) || false === L(c3))
  468. throw new t(r3, e.InvalidParameter, s4);
  469. return e5.toArray().slice(a3, c3);
  470. }
  471. throw new t(r3, e.InvalidParameter, s4);
  472. });
  473. }, F4.functions.splice = function(n3, t6) {
  474. return F4.standardFunction(n3, t6, (n4, t7, r3) => {
  475. const e5 = [];
  476. for (let o2 = 0; o2 < r3.length; o2++)
  477. Y(r3[o2]) ? e5.push(...r3[o2]) : E(r3[o2]) ? e5.push(...r3[o2].toArray()) : e5.push(r3[o2]);
  478. return e5;
  479. });
  480. }, F4.functions.top = function(r3, i4) {
  481. return F4.standardFunction(r3, i4, (u3, s4, l6) => {
  482. if (V(l6, 2, 2, r3, i4), Y(l6[0]))
  483. return re(l6[1]) >= l6[0].length ? l6[0].slice(0) : l6[0].slice(0, re(l6[1]));
  484. if (E(l6[0]))
  485. return re(l6[1]) >= l6[0].length() ? l6[0].slice(0) : l6[0].slice(0, re(l6[1]));
  486. throw new t(r3, e.InvalidParameter, i4);
  487. });
  488. }, F4.functions.first = function(n3, t6) {
  489. return F4.standardFunction(n3, t6, (r3, o2, i4) => (V(i4, 1, 1, n3, t6), Y(i4[0]) ? 0 === i4[0].length ? null : i4[0][0] : E(i4[0]) ? 0 === i4[0].length() ? null : i4[0].get(0) : null));
  490. }, "sync" === F4.mode && (F4.functions.sort = function(n3, t6) {
  491. return F4.standardFunction(n3, t6, (r3, e5, o2) => I3(n3, t6, o2, false));
  492. }, F4.functions.any = function(n3, t6) {
  493. return F4.standardFunction(n3, t6, (r3, o2, i4) => {
  494. V(i4, 2, 2, n3, t6);
  495. const u3 = i4[1].createFunction(n3), a3 = m6(i4[0], n3, t6);
  496. for (const n4 of a3) {
  497. const t7 = u3(n4);
  498. if (_(t7) && true === t7)
  499. return true;
  500. }
  501. return false;
  502. });
  503. }, F4.functions.all = function(n3, t6) {
  504. return F4.standardFunction(n3, t6, (r3, o2, i4) => {
  505. V(i4, 2, 2, n3, t6);
  506. const u3 = i4[1].createFunction(n3), a3 = m6(i4[0], n3, t6);
  507. for (const n4 of a3) {
  508. if (true !== u3(n4))
  509. return false;
  510. }
  511. return true;
  512. });
  513. }, F4.functions.none = function(n3, t6) {
  514. return F4.standardFunction(n3, t6, (r3, o2, i4) => {
  515. V(i4, 2, 2, n3, t6);
  516. const u3 = i4[1].createFunction(n3), a3 = m6(i4[0], n3, t6);
  517. for (const n4 of a3) {
  518. if (true === u3(n4))
  519. return false;
  520. }
  521. return true;
  522. });
  523. }, F4.functions.reduce = function(n3, t6) {
  524. return F4.standardFunction(n3, t6, (r3, o2, i4) => {
  525. V(i4, 2, 3, n3, t6);
  526. const u3 = i4[1].createFunction(n3), a3 = m6(i4[0], n3, t6);
  527. return 2 === i4.length ? 0 === a3.length ? null : a3.reduce((n4, t7) => {
  528. const r4 = u3(n4, t7);
  529. return n4 = void 0 !== r4 && r4 !== k2 ? r4 : null;
  530. }) : a3.reduce((n4, t7) => {
  531. const r4 = u3(n4, t7);
  532. return n4 = void 0 !== r4 && r4 !== k2 ? r4 : null;
  533. }, i4[2]);
  534. });
  535. }, F4.functions.map = function(n3, t6) {
  536. return F4.standardFunction(n3, t6, (r3, o2, i4) => {
  537. V(i4, 2, 2, n3, t6);
  538. const u3 = i4[1].createFunction(n3), a3 = m6(i4[0], n3, t6), c3 = [];
  539. for (const n4 of a3) {
  540. const t7 = u3(n4);
  541. void 0 !== t7 && t7 !== k2 ? c3.push(t7) : c3.push(null);
  542. }
  543. return c3;
  544. });
  545. }, F4.functions.filter = function(n3, t6) {
  546. return F4.standardFunction(n3, t6, (r3, o2, i4) => {
  547. V(i4, 2, 2, n3, t6);
  548. const u3 = i4[1].createFunction(n3), a3 = m6(i4[0], n3, t6), c3 = [];
  549. for (const n4 of a3) {
  550. true === u3(n4) && c3.push(n4);
  551. }
  552. return c3;
  553. });
  554. }), "async" === F4.mode && (F4.functions.sort = function(n3, t6) {
  555. return F4.standardFunctionAsync(n3, t6, (r3, e5, o2) => I3(n3, t6, o2, true));
  556. }, F4.functions.any = function(n3, t6) {
  557. return F4.standardFunctionAsync(n3, t6, async (r3, o2, i4) => {
  558. V(i4, 2, 2, n3, t6);
  559. const u3 = i4[1].createFunction(n3), a3 = m6(i4[0], n3, t6);
  560. for (const n4 of a3) {
  561. const t7 = await u3(n4);
  562. let r4 = null;
  563. if (r4 = C(r4) ? await t7 : t7, _(r4) && true === r4)
  564. return true;
  565. }
  566. return false;
  567. });
  568. }, F4.functions.all = function(n3, t6) {
  569. return F4.standardFunctionAsync(n3, t6, async (r3, o2, i4) => {
  570. V(i4, 2, 2, n3, t6);
  571. const u3 = i4[1].createFunction(n3), a3 = m6(i4[0], n3, t6);
  572. for (const n4 of a3) {
  573. const t7 = await u3(n4);
  574. let r4 = null;
  575. if (r4 = C(r4) ? await t7 : t7, true !== r4)
  576. return false;
  577. }
  578. return true;
  579. });
  580. }, F4.functions.none = function(n3, t6) {
  581. return F4.standardFunctionAsync(n3, t6, async (r3, o2, i4) => {
  582. V(i4, 2, 2, n3, t6);
  583. const u3 = i4[1].createFunction(n3), a3 = m6(i4[0], n3, t6);
  584. for (const n4 of a3) {
  585. const t7 = await u3(n4);
  586. let r4 = null;
  587. if (r4 = C(r4) ? await t7 : t7, true === r4)
  588. return false;
  589. }
  590. return true;
  591. });
  592. }, F4.functions.filter = function(n3, t6) {
  593. return F4.standardFunctionAsync(n3, t6, async (r3, o2, i4) => {
  594. V(i4, 2, 2, n3, t6);
  595. const u3 = i4[1].createFunction(n3), a3 = m6(i4[0], n3, t6), c3 = [];
  596. for (const n4 of a3) {
  597. const t7 = await u3(n4);
  598. let r4 = null;
  599. r4 = C(r4) ? await t7 : t7, true === r4 && c3.push(n4);
  600. }
  601. return c3;
  602. });
  603. }, F4.functions.reduce = function(n3, t6) {
  604. return F4.standardFunctionAsync(n3, t6, (r3, o2, i4) => {
  605. V(i4, 2, 3, n3, t6);
  606. const a3 = i4[1].createFunction(n3), c3 = m6(i4[0], n3, t6);
  607. let l6 = null;
  608. if (i4.length > 2) {
  609. const n4 = v3(i4[2], null);
  610. l6 = c3.reduce(async (n5, t7) => {
  611. let r4 = await n5;
  612. return void 0 !== r4 && r4 !== k2 || (r4 = null), a3(r4, t7);
  613. }, Promise.resolve(n4));
  614. } else {
  615. if (0 === c3.length)
  616. return null;
  617. l6 = c3.reduce(async (n4, t7, r4) => {
  618. if (r4 <= 1)
  619. return a3(n4, t7);
  620. let e5 = await n4;
  621. return void 0 !== e5 && e5 !== k2 || (e5 = null), a3(e5, t7);
  622. });
  623. }
  624. return l6.then((n4) => void 0 !== n4 && n4 !== k2 ? n4 : null);
  625. });
  626. }, F4.functions.map = function(n3, t6) {
  627. return F4.standardFunctionAsync(n3, t6, async (r3, o2, i4) => {
  628. V(i4, 2, 2, n3, t6);
  629. const u3 = i4[1].createFunction(n3), a3 = m6(i4[0], n3, t6), c3 = [];
  630. for (const n4 of a3) {
  631. const t7 = await u3(n4);
  632. let r4 = null;
  633. r4 = C(r4) ? await t7 : t7, void 0 !== r4 && r4 !== k2 ? c3.push(r4) : c3.push(null);
  634. }
  635. return c3;
  636. });
  637. });
  638. }
  639. var m3 = Object.freeze(Object.defineProperty({ __proto__: null, registerFunctions: F2 }, Symbol.toStringTag, { value: "Module" }));
  640. // node_modules/@arcgis/core/arcade/functions/date.js
  641. function m4(e5) {
  642. const t6 = new Date(e5.getTime()), n3 = t6.getFullYear(), r3 = new Date(0);
  643. r3.setFullYear(n3 + 1, 0, 4), r3.setHours(0, 0, 0, 0);
  644. const s4 = d3(r3), u3 = new Date(0);
  645. u3.setFullYear(n3, 0, 4), u3.setHours(0, 0, 0, 0);
  646. const o2 = d3(u3);
  647. return t6.getTime() >= s4.getTime() ? n3 + 1 : t6.getTime() >= o2.getTime() ? n3 : n3 - 1;
  648. }
  649. function d3(e5) {
  650. const t6 = 1, n3 = new Date(e5.getTime()), r3 = n3.getDay(), s4 = (r3 < t6 ? 7 : 0) + r3 - t6;
  651. return n3.setDate(n3.getDate() - s4), n3.setHours(0, 0, 0, 0), n3;
  652. }
  653. function h3(e5) {
  654. const t6 = m4(e5), n3 = new Date(0);
  655. n3.setFullYear(t6, 0, 4), n3.setHours(0, 0, 0, 0);
  656. return d3(n3);
  657. }
  658. function N(e5, t6, n3) {
  659. return e5 + (D(n3) ? y2 : w4)[t6];
  660. }
  661. function D(e5) {
  662. return e5 % 4 == 0 && (e5 % 100 != 0 || e5 % 400 == 0);
  663. }
  664. var w4 = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];
  665. var y2 = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
  666. function T(e5) {
  667. return null === e5 ? e5 : isNaN(e5.getTime()) ? null : e5;
  668. }
  669. function M2(D4, w6) {
  670. D4.today = function(t6, n3) {
  671. return w6(t6, n3, (r3, s4, u3) => {
  672. V(u3, 0, 0, t6, n3);
  673. const o2 = new Date();
  674. return o2.setHours(0, 0, 0, 0), o2;
  675. });
  676. }, D4.now = function(t6, n3) {
  677. return w6(t6, n3, (r3, s4, u3) => {
  678. V(u3, 0, 0, t6, n3);
  679. return new Date();
  680. });
  681. }, D4.timestamp = function(t6, n3) {
  682. return w6(t6, n3, (r3, s4, u3) => {
  683. V(u3, 0, 0, t6, n3);
  684. let o2 = new Date();
  685. return o2 = new Date(o2.getUTCFullYear(), o2.getUTCMonth(), o2.getUTCDate(), o2.getUTCHours(), o2.getUTCMinutes(), o2.getUTCSeconds(), o2.getUTCMilliseconds()), o2;
  686. });
  687. }, D4.toutc = function(n3, r3) {
  688. return w6(n3, r3, (s4, u3, o2) => {
  689. V(o2, 1, 1, n3, r3);
  690. const a3 = ae(o2[0]);
  691. return null === a3 ? null : new Date(a3.getUTCFullYear(), a3.getUTCMonth(), a3.getUTCDate(), a3.getUTCHours(), a3.getUTCMinutes(), a3.getUTCSeconds(), a3.getUTCMilliseconds());
  692. });
  693. }, D4.tolocal = function(n3, r3) {
  694. return w6(n3, r3, (s4, u3, o2) => {
  695. V(o2, 1, 1, n3, r3);
  696. const a3 = ae(o2[0]);
  697. return null === a3 ? null : DateTime.utc(a3.getFullYear(), a3.getMonth() + 1, a3.getDate(), a3.getHours(), a3.getMinutes(), a3.getSeconds(), a3.getMilliseconds()).toJSDate();
  698. });
  699. }, D4.day = function(n3, r3) {
  700. return w6(n3, r3, (s4, u3, o2) => {
  701. V(o2, 1, 1, n3, r3);
  702. const a3 = ae(o2[0]);
  703. return null === a3 ? NaN : a3.getDate();
  704. });
  705. }, D4.month = function(n3, r3) {
  706. return w6(n3, r3, (s4, u3, o2) => {
  707. V(o2, 1, 1, n3, r3);
  708. const a3 = ae(o2[0]);
  709. return null === a3 ? NaN : a3.getMonth();
  710. });
  711. }, D4.year = function(n3, r3) {
  712. return w6(n3, r3, (s4, u3, o2) => {
  713. V(o2, 1, 1, n3, r3);
  714. const a3 = ae(o2[0]);
  715. return null === a3 ? NaN : a3.getFullYear();
  716. });
  717. }, D4.hour = function(n3, r3) {
  718. return w6(n3, r3, (s4, u3, o2) => {
  719. V(o2, 1, 1, n3, r3);
  720. const a3 = ae(o2[0]);
  721. return null === a3 ? NaN : a3.getHours();
  722. });
  723. }, D4.second = function(n3, r3) {
  724. return w6(n3, r3, (s4, u3, o2) => {
  725. V(o2, 1, 1, n3, r3);
  726. const a3 = ae(o2[0]);
  727. return null === a3 ? NaN : a3.getSeconds();
  728. });
  729. }, D4.millisecond = function(n3, r3) {
  730. return w6(n3, r3, (s4, u3, o2) => {
  731. V(o2, 1, 1, n3, r3);
  732. const a3 = ae(o2[0]);
  733. return null === a3 ? NaN : a3.getMilliseconds();
  734. });
  735. }, D4.minute = function(n3, r3) {
  736. return w6(n3, r3, (s4, u3, o2) => {
  737. V(o2, 1, 1, n3, r3);
  738. const a3 = ae(o2[0]);
  739. return null === a3 ? NaN : a3.getMinutes();
  740. });
  741. }, D4.week = function(s4, u3) {
  742. return w6(s4, u3, (o2, a3, c3) => {
  743. V(c3, 1, 2, s4, u3);
  744. const f2 = ae(c3[0]);
  745. if (null === f2)
  746. return NaN;
  747. const g3 = re(v3(c3[1], 0));
  748. if (g3 < 0 || g3 > 6)
  749. throw new t(s4, e.InvalidParameter, u3);
  750. const m6 = f2.getDate(), d5 = f2.getMonth(), h5 = f2.getFullYear(), D5 = f2.getDay(), w7 = N(m6, d5, h5) - 1, y4 = Math.floor(w7 / 7);
  751. return D5 - g3 + (D5 - g3 < 0 ? 7 : 0) < w7 - 7 * y4 ? y4 + 1 : y4;
  752. });
  753. }, D4.weekday = function(n3, r3) {
  754. return w6(n3, r3, (s4, u3, o2) => {
  755. V(o2, 1, 1, n3, r3);
  756. const a3 = ae(o2[0]);
  757. return null === a3 ? NaN : a3.getDay();
  758. });
  759. }, D4.isoweekday = function(n3, r3) {
  760. return w6(n3, r3, (s4, u3, o2) => {
  761. V(o2, 1, 1, n3, r3);
  762. const a3 = ae(o2[0]);
  763. if (null === a3)
  764. return NaN;
  765. let c3 = a3.getDay();
  766. return 0 === c3 && (c3 = 7), c3;
  767. });
  768. }, D4.isomonth = function(n3, r3) {
  769. return w6(n3, r3, (s4, u3, o2) => {
  770. V(o2, 1, 1, n3, r3);
  771. const a3 = ae(o2[0]);
  772. return null === a3 ? NaN : a3.getMonth() + 1;
  773. });
  774. }, D4.isoweek = function(n3, r3) {
  775. return w6(n3, r3, (s4, u3, o2) => {
  776. V(o2, 1, 1, n3, r3);
  777. const a3 = ae(o2[0]);
  778. if (null === a3)
  779. return NaN;
  780. const c3 = d3(a3).getTime() - h3(a3).getTime();
  781. return Math.round(c3 / 6048e5) + 1;
  782. });
  783. }, D4.isoyear = function(n3, r3) {
  784. return w6(n3, r3, (s4, u3, o2) => {
  785. V(o2, 1, 1, n3, r3);
  786. const a3 = ae(o2[0]);
  787. return null === a3 ? NaN : m4(a3);
  788. });
  789. }, D4.date = function(r3, a3) {
  790. return w6(r3, a3, (c3, l6, i4) => {
  791. if (V(i4, 0, 7, r3, a3), 3 === i4.length)
  792. return T(new Date(re(i4[0]), re(i4[1]), re(i4[2]), 0, 0, 0, 0));
  793. if (4 === i4.length)
  794. return T(new Date(re(i4[0]), re(i4[1]), re(i4[2]), re(i4[3]), 0, 0, 0));
  795. if (5 === i4.length)
  796. return T(new Date(re(i4[0]), re(i4[1]), re(i4[2]), re(i4[3]), re(i4[4]), 0, 0));
  797. if (6 === i4.length)
  798. return T(new Date(re(i4[0]), re(i4[1]), re(i4[2]), re(i4[3]), re(i4[4]), re(i4[5]), 0));
  799. if (7 === i4.length)
  800. return T(new Date(re(i4[0]), re(i4[1]), re(i4[2]), re(i4[3]), re(i4[4]), re(i4[5]), re(i4[6])));
  801. if (2 === i4.length) {
  802. let e5, t6 = K(i4[1]);
  803. return "" === t6 ? null : (t6 = W(t6), e5 = "X" === t6 ? DateTime.fromSeconds(re(i4[0])) : "x" === t6 ? DateTime.fromMillis(re(i4[0])) : DateTime.fromFormat(K(i4[0]), t6, { locale: l(), numberingSystem: "latn" }), e5.isValid ? e5.toJSDate() : null);
  804. }
  805. if (1 === i4.length) {
  806. if (w3(i4[0])) {
  807. if ("" === i4[0].replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""))
  808. return null;
  809. if (true === /^[0-9][0-9][0-9][0-9]$/.test(i4[0]))
  810. return ae(i4[0] + "-01-01");
  811. }
  812. const e5 = re(i4[0]);
  813. if (false === isNaN(e5))
  814. return T(new Date(e5));
  815. return ae(i4[0]);
  816. }
  817. return 0 === i4.length ? new Date() : void 0;
  818. });
  819. }, D4.datediff = function(t6, n3) {
  820. return w6(t6, n3, (r3, u3, o2) => {
  821. V(o2, 2, 3, t6, n3);
  822. const c3 = ie(o2[0]), l6 = ie(o2[1]);
  823. if (null === c3 || null === l6)
  824. return NaN;
  825. switch (K(o2[2]).toLowerCase()) {
  826. case "days":
  827. case "day":
  828. case "d":
  829. return c3.diff(l6, "days").days;
  830. case "months":
  831. case "month":
  832. return c3.diff(l6, "months").months;
  833. case "minutes":
  834. case "minute":
  835. case "m":
  836. return "M" === o2[2] ? c3.diff(l6, "months").months : c3.diff(l6, "minutes").minutes;
  837. case "seconds":
  838. case "second":
  839. case "s":
  840. return c3.diff(l6, "seconds").seconds;
  841. case "milliseconds":
  842. case "millisecond":
  843. case "ms":
  844. default:
  845. return c3.diff(l6).milliseconds;
  846. case "hours":
  847. case "hour":
  848. case "h":
  849. return c3.diff(l6, "hours").hours;
  850. case "years":
  851. case "year":
  852. case "y":
  853. return c3.diff(l6, "years").years;
  854. }
  855. });
  856. }, D4.dateadd = function(t6, r3) {
  857. return w6(t6, r3, (u3, o2, l6) => {
  858. V(l6, 2, 3, t6, r3);
  859. const i4 = ie(l6[0]);
  860. if (null === i4)
  861. return null;
  862. let f2 = re(l6[1]);
  863. if (isNaN(f2))
  864. return i4.toJSDate();
  865. let g3 = "milliseconds";
  866. switch (K(l6[2]).toLowerCase()) {
  867. case "days":
  868. case "day":
  869. case "d":
  870. g3 = "days", f2 = H(f2);
  871. break;
  872. case "months":
  873. case "month":
  874. g3 = "months", f2 = H(f2);
  875. break;
  876. case "minutes":
  877. case "minute":
  878. case "m":
  879. g3 = "M" === l6[2] ? "months" : "minutes";
  880. break;
  881. case "seconds":
  882. case "second":
  883. case "s":
  884. g3 = "seconds";
  885. break;
  886. case "milliseconds":
  887. case "millisecond":
  888. case "ms":
  889. g3 = "milliseconds";
  890. break;
  891. case "hours":
  892. case "hour":
  893. case "h":
  894. g3 = "hours";
  895. break;
  896. case "years":
  897. case "year":
  898. case "y":
  899. g3 = "years";
  900. }
  901. return i4.plus({ [g3]: f2 }).toJSDate();
  902. });
  903. };
  904. }
  905. // node_modules/@arcgis/core/arcade/functions/geometry.js
  906. function M3(e5) {
  907. return e5 && "esri.arcade.Feature" === e5.arcadeDeclaredClass;
  908. }
  909. function C2(D4, C4) {
  910. D4.ringisclockwise = function(e5, n3) {
  911. return C4(e5, n3, (o2, s4, l6) => {
  912. V(l6, 1, 1, e5, n3);
  913. let c3 = [], f2 = false, u3 = false;
  914. if (null === l6[0])
  915. return false;
  916. if (Y(l6[0])) {
  917. for (const t6 of l6[0]) {
  918. if (!(t6 instanceof w))
  919. throw new t(e5, e.InvalidParameter, n3);
  920. c3.push(t6.hasZ ? t6.hasM ? [t6.x, t6.y, t6.z, t6.m] : [t6.x, t6.y, t6.z] : [t6.x, t6.y]);
  921. }
  922. c3.length > 0 && (f2 = l6[0][0].hasZ, u3 = l6[0][0].hasM);
  923. } else if (l6[0] instanceof i)
  924. c3 = l6[0]._elements, c3.length > 0 && (f2 = l6[0]._hasZ, u3 = l6[0]._hasM);
  925. else {
  926. if (!E(l6[0]))
  927. throw new t(e5, e.InvalidParameter, n3);
  928. for (const t6 of l6[0].toArray()) {
  929. if (!(t6 instanceof w))
  930. throw new t(e5, e.InvalidParameter, n3);
  931. c3.push(t6.hasZ ? t6.hasM ? [t6.x, t6.y, t6.z, t6.m] : [t6.x, t6.y, t6.z] : [t6.x, t6.y]);
  932. }
  933. c3.length > 0 && (f2 = l6[0].get(0).hasZ, u3 = l6[0].get(0).hasM);
  934. }
  935. return !(c3.length < 3) && h(c3, u3, f2);
  936. });
  937. }, D4.polygon = function(t6, a3) {
  938. return C4(t6, a3, (i4, l6, c3) => {
  939. V(c3, 1, 1, t6, a3);
  940. let f2 = null;
  941. if (c3[0] instanceof J2) {
  942. if (f2 = se(g.parseGeometryFromDictionary(c3[0]), t6.spatialReference), f2 instanceof v == false)
  943. throw new t(t6, e.InvalidParameter, a3);
  944. } else
  945. f2 = c3[0] instanceof v ? v2(c3[0].toJSON()) : se(new v(JSON.parse(c3[0])), t6.spatialReference);
  946. if (null !== f2 && false === f2.spatialReference.equals(t6.spatialReference))
  947. throw new t(t6, e.WrongSpatialReference, a3);
  948. return ue(f2);
  949. });
  950. }, D4.polyline = function(t6, a3) {
  951. return C4(t6, a3, (i4, l6, c3) => {
  952. V(c3, 1, 1, t6, a3);
  953. let f2 = null;
  954. if (c3[0] instanceof J2) {
  955. if (f2 = se(g.parseGeometryFromDictionary(c3[0]), t6.spatialReference), f2 instanceof m == false)
  956. throw new t(t6, e.InvalidParameter, a3);
  957. } else
  958. f2 = c3[0] instanceof m ? v2(c3[0].toJSON()) : se(new m(JSON.parse(c3[0])), t6.spatialReference);
  959. if (null !== f2 && false === f2.spatialReference.equals(t6.spatialReference))
  960. throw new t(t6, e.WrongSpatialReference, a3);
  961. return ue(f2);
  962. });
  963. }, D4.point = function(t6, a3) {
  964. return C4(t6, a3, (i4, l6, c3) => {
  965. V(c3, 1, 1, t6, a3);
  966. let f2 = null;
  967. if (c3[0] instanceof J2) {
  968. if (f2 = se(g.parseGeometryFromDictionary(c3[0]), t6.spatialReference), f2 instanceof w == false)
  969. throw new t(t6, e.InvalidParameter, a3);
  970. } else
  971. f2 = c3[0] instanceof w ? v2(c3[0].toJSON()) : se(new w(JSON.parse(c3[0])), t6.spatialReference);
  972. if (null !== f2 && false === f2.spatialReference.equals(t6.spatialReference))
  973. throw new t(t6, e.WrongSpatialReference, a3);
  974. return ue(f2);
  975. });
  976. }, D4.multipoint = function(t6, a3) {
  977. return C4(t6, a3, (i4, l6, c3) => {
  978. V(c3, 1, 1, t6, a3);
  979. let f2 = null;
  980. if (c3[0] instanceof J2) {
  981. if (f2 = se(g.parseGeometryFromDictionary(c3[0]), t6.spatialReference), f2 instanceof u == false)
  982. throw new t(t6, e.InvalidParameter, a3);
  983. } else
  984. f2 = c3[0] instanceof u ? v2(c3[0].toJSON()) : se(new u(JSON.parse(c3[0])), t6.spatialReference);
  985. if (null !== f2 && false === f2.spatialReference.equals(t6.spatialReference))
  986. throw new t(t6, e.WrongSpatialReference, a3);
  987. return ue(f2);
  988. });
  989. }, D4.extent = function(t6, a3) {
  990. return C4(t6, a3, (i4, c3, f2) => {
  991. var _a;
  992. f2 = pe(f2), V(f2, 1, 1, t6, a3);
  993. let u3 = null;
  994. if (f2[0] instanceof J2)
  995. u3 = se(g.parseGeometryFromDictionary(f2[0]), t6.spatialReference);
  996. else if (f2[0] instanceof w) {
  997. const e5 = { xmin: f2[0].x, ymin: f2[0].y, xmax: f2[0].x, ymax: f2[0].y, spatialReference: f2[0].spatialReference.toJSON() }, n3 = f2[0];
  998. n3.hasZ ? (e5.zmin = n3.z, e5.zmax = n3.z) : n3.hasM && (e5.mmin = n3.m, e5.mmax = n3.m), u3 = v2(e5);
  999. } else
  1000. u3 = f2[0] instanceof v || f2[0] instanceof m || f2[0] instanceof u ? v2((_a = f2[0].extent) == null ? void 0 : _a.toJSON()) : f2[0] instanceof w2 ? v2(f2[0].toJSON()) : se(new w2(JSON.parse(f2[0])), t6.spatialReference);
  1001. if (null !== u3 && false === u3.spatialReference.equals(t6.spatialReference))
  1002. throw new t(t6, e.WrongSpatialReference, a3);
  1003. return ue(u3);
  1004. });
  1005. }, D4.geometry = function(t6, a3) {
  1006. return C4(t6, a3, (i4, l6, c3) => {
  1007. V(c3, 1, 1, t6, a3);
  1008. let f2 = null;
  1009. if (null === c3[0])
  1010. return null;
  1011. if (f2 = M3(c3[0]) ? se(c3[0].geometry(), t6.spatialReference) : c3[0] instanceof J2 ? se(g.parseGeometryFromDictionary(c3[0]), t6.spatialReference) : se(v2(JSON.parse(c3[0])), t6.spatialReference), null !== f2 && false === f2.spatialReference.equals(t6.spatialReference))
  1012. throw new t(t6, e.WrongSpatialReference, a3);
  1013. return ue(f2);
  1014. });
  1015. }, D4.setgeometry = function(e5, n3) {
  1016. return C4(e5, n3, (t6, a3, i4) => {
  1017. if (V(i4, 2, 2, e5, n3), !M3(i4[0]))
  1018. throw new t(e5, e.InvalidParameter, n3);
  1019. if (true === i4[0].immutable)
  1020. throw new t(e5, e.Immutable, n3);
  1021. if (!(i4[1] instanceof p || null === i4[1]))
  1022. throw new t(e5, e.InvalidParameter, n3);
  1023. return i4[0]._geometry = i4[1], k2;
  1024. });
  1025. }, D4.feature = function(t6, r3) {
  1026. return C4(t6, r3, (a3, i4, s4) => {
  1027. if (0 === s4.length)
  1028. throw new t(t6, e.WrongNumberOfParameters, r3);
  1029. let l6 = null;
  1030. if (1 === s4.length)
  1031. if (w3(s4[0]))
  1032. l6 = g.fromJson(JSON.parse(s4[0]));
  1033. else if (M3(s4[0]))
  1034. l6 = g.createFromArcadeFeature(s4[0]);
  1035. else if (s4[0] instanceof p)
  1036. l6 = g.createFromGraphicLikeObject(s4[0], null, null);
  1037. else {
  1038. if (!(s4[0] instanceof J2))
  1039. throw new t(t6, e.InvalidParameter, r3);
  1040. {
  1041. let t7 = s4[0].hasField("geometry") ? s4[0].field("geometry") : null, r4 = s4[0].hasField("attributes") ? s4[0].field("attributes") : null;
  1042. null !== t7 && t7 instanceof J2 && (t7 = g.parseGeometryFromDictionary(t7)), null !== r4 && (r4 = g.parseAttributesFromDictionary(r4)), l6 = g.createFromGraphicLikeObject(t7, r4, null);
  1043. }
  1044. }
  1045. else if (2 === s4.length) {
  1046. let a4 = null, i5 = null;
  1047. if (null !== s4[0])
  1048. if (s4[0] instanceof p)
  1049. a4 = s4[0];
  1050. else {
  1051. if (!(a4 instanceof J2))
  1052. throw new t(t6, e.InvalidParameter, r3);
  1053. a4 = g.parseGeometryFromDictionary(s4[0]);
  1054. }
  1055. if (null !== s4[1]) {
  1056. if (!(s4[1] instanceof J2))
  1057. throw new t(t6, e.InvalidParameter, r3);
  1058. i5 = g.parseAttributesFromDictionary(s4[1]);
  1059. }
  1060. l6 = g.createFromGraphicLikeObject(a4, i5, null);
  1061. } else {
  1062. let a4 = null;
  1063. const i5 = {};
  1064. if (null !== s4[0])
  1065. if (s4[0] instanceof p)
  1066. a4 = s4[0];
  1067. else {
  1068. if (!(a4 instanceof J2))
  1069. throw new t(t6, e.InvalidParameter, r3);
  1070. a4 = g.parseGeometryFromDictionary(s4[0]);
  1071. }
  1072. for (let e5 = 1; e5 < s4.length; e5 += 2) {
  1073. const n3 = K(s4[e5]), a5 = s4[e5 + 1];
  1074. if (!(null == a5 || w3(a5) || isNaN(a5) || z(a5) || Z(a5) || _(a5)))
  1075. throw new t(t6, e.InvalidParameter, r3);
  1076. if (F(a5) || false === I(a5))
  1077. throw new t(t6, e.InvalidParameter, r3);
  1078. i5[n3] = a5 === k2 ? null : a5;
  1079. }
  1080. l6 = g.createFromGraphicLikeObject(a4, i5, null);
  1081. }
  1082. return l6._geometry = se(l6.geometry(), t6.spatialReference), l6.immutable = false, l6;
  1083. });
  1084. }, D4.dictionary = function(n3, t6) {
  1085. return C4(n3, t6, (r3, o2, s4) => {
  1086. if (0 === s4.length) {
  1087. const n4 = new J2();
  1088. return n4.immutable = false, n4;
  1089. }
  1090. if (1 === s4.length && w3(s4[0]))
  1091. try {
  1092. const n4 = JSON.parse(s4[0]), t7 = J2.convertObjectToArcadeDictionary(n4, false);
  1093. return t7.immutable = false, t7;
  1094. } catch (y4) {
  1095. throw new t(n3, e.InvalidParameter, t6);
  1096. }
  1097. if (s4.length % 2 != 0)
  1098. throw new t(n3, e.WrongNumberOfParameters, t6);
  1099. const l6 = {};
  1100. for (let e5 = 0; e5 < s4.length; e5 += 2) {
  1101. const r4 = K(s4[e5]), o3 = s4[e5 + 1];
  1102. if (!(null == o3 || w3(o3) || isNaN(o3) || z(o3) || Z(o3) || _(o3) || Y(o3) || E(o3)))
  1103. throw new t(n3, e.InvalidParameter, t6);
  1104. if (F(o3))
  1105. throw new t(n3, e.InvalidParameter, t6);
  1106. l6[r4] = o3 === k2 ? null : o3;
  1107. }
  1108. const d5 = new J2(l6);
  1109. return d5.immutable = false, d5;
  1110. });
  1111. }, D4.haskey = function(n3, t6) {
  1112. return C4(n3, t6, (a3, i4, o2) => {
  1113. V(o2, 2, 2, n3, t6);
  1114. const s4 = K(o2[1]);
  1115. if (M3(o2[0]))
  1116. return o2[0].hasField(s4);
  1117. if (o2[0] instanceof J2)
  1118. return o2[0].hasField(s4);
  1119. if (o2[0] instanceof p) {
  1120. const e5 = W2(o2[0], s4, null, null, 2);
  1121. return !e5 || "notfound" !== e5.keystate;
  1122. }
  1123. throw new t(n3, e.InvalidParameter, t6);
  1124. });
  1125. }, D4.hasvalue = function(n3, t6) {
  1126. return C4(n3, t6, (a3, i4, o2) => {
  1127. if (V(o2, 2, 2, n3, t6), null === o2[0] || null === o2[1])
  1128. return false;
  1129. const s4 = K(o2[1]);
  1130. if (J(o2[0]))
  1131. return !!o2[0].hasField(s4) && null !== o2[0].field(s4);
  1132. if (o2[0] instanceof J2)
  1133. return !!o2[0].hasField(s4) && null !== o2[0].field(s4);
  1134. if (o2[0] instanceof p) {
  1135. return null !== W2(o2[0], s4, null, null, 0);
  1136. }
  1137. return false;
  1138. });
  1139. }, D4.indexof = function(e5, n3) {
  1140. return C4(e5, n3, (t6, o2, s4) => {
  1141. V(s4, 2, 2, e5, n3);
  1142. const l6 = s4[1];
  1143. if (Y(s4[0])) {
  1144. for (let e6 = 0; e6 < s4[0].length; e6++)
  1145. if (X(l6, s4[0][e6]))
  1146. return e6;
  1147. return -1;
  1148. }
  1149. if (E(s4[0])) {
  1150. const e6 = s4[0].length();
  1151. for (let n4 = 0; n4 < e6; n4++)
  1152. if (X(l6, s4[0].get(n4)))
  1153. return n4;
  1154. return -1;
  1155. }
  1156. throw new t(e5, e.InvalidParameter, n3);
  1157. });
  1158. }, D4.angle = function(e5, n3) {
  1159. return C4(e5, n3, (t6, a3, i4) => {
  1160. if (i4 = pe(i4), V(i4, 2, 3, e5, n3), !(i4[0] instanceof w))
  1161. throw new t(e5, e.InvalidParameter, n3);
  1162. if (!(i4[1] instanceof w))
  1163. throw new t(e5, e.InvalidParameter, n3);
  1164. if (i4.length > 2 && !(i4[2] instanceof w))
  1165. throw new t(e5, e.InvalidParameter, n3);
  1166. return 2 === i4.length ? p3(i4[0], i4[1]) : P3(i4[0], i4[1], i4[2]);
  1167. });
  1168. }, D4.bearing = function(e5, n3) {
  1169. return C4(e5, n3, (t6, a3, i4) => {
  1170. if (i4 = pe(i4), V(i4, 2, 3, e5, n3), !(i4[0] instanceof w))
  1171. throw new t(e5, e.InvalidParameter, n3);
  1172. if (!(i4[1] instanceof w))
  1173. throw new t(e5, e.InvalidParameter, n3);
  1174. if (i4.length > 2 && !(i4[2] instanceof w))
  1175. throw new t(e5, e.InvalidParameter, n3);
  1176. return 2 === i4.length ? M(i4[0], i4[1]) : d(i4[0], i4[1], i4[2]);
  1177. });
  1178. }, D4.isselfintersecting = function(e5, n3) {
  1179. return C4(e5, n3, (t6, o2, s4) => {
  1180. s4 = pe(s4), V(s4, 1, 1, e5, n3);
  1181. let c3 = s4[0];
  1182. if (c3 instanceof v)
  1183. return c3.isSelfIntersecting;
  1184. if (c3 instanceof m)
  1185. return c3 = c3.paths, Z2(c3);
  1186. if (c3 instanceof u) {
  1187. const e6 = c3.points;
  1188. for (let n4 = 0; n4 < e6.length; n4++)
  1189. for (let t7 = 0; t7 < e6.length; t7++)
  1190. if (t7 !== n4) {
  1191. let r3 = true;
  1192. for (let a3 = 0; a3 < e6[n4].length; a3++)
  1193. if (e6[n4][a3] !== e6[t7][a3]) {
  1194. r3 = false;
  1195. break;
  1196. }
  1197. if (true === r3)
  1198. return true;
  1199. }
  1200. }
  1201. return !(!Y(c3) && !E(c3)) && (c3 = Se(c3, e5.spatialReference), null !== c3 && (c3 = c3.paths), Z2(c3));
  1202. });
  1203. };
  1204. }
  1205. var Z3 = 0;
  1206. function W2(n3, r3, a3, i4, o2 = 1) {
  1207. let s4;
  1208. switch (r3 = r3.toLowerCase()) {
  1209. case "hasz": {
  1210. const e5 = n3.hasZ;
  1211. return void 0 !== e5 && e5;
  1212. }
  1213. case "hasm": {
  1214. const e5 = n3.hasM;
  1215. return void 0 !== e5 && e5;
  1216. }
  1217. case "spatialreference": {
  1218. let t6 = n3.spatialReference._arcadeCacheId;
  1219. if (void 0 === t6) {
  1220. let e5 = true;
  1221. Object.freeze && Object.isFrozen(n3.spatialReference) && (e5 = false), e5 && (Z3++, n3.spatialReference._arcadeCacheId = Z3, t6 = Z3);
  1222. }
  1223. const r4 = new J2({ wkt: n3.spatialReference.wkt, wkid: n3.spatialReference.wkid });
  1224. return void 0 !== t6 && (r4._arcadeCacheId = "SPREF" + t6.toString()), r4;
  1225. }
  1226. }
  1227. switch (n3.type) {
  1228. case "extent":
  1229. switch (r3) {
  1230. case "xmin":
  1231. case "xmax":
  1232. case "ymin":
  1233. case "ymax":
  1234. case "zmin":
  1235. case "zmax":
  1236. case "mmin":
  1237. case "mmax": {
  1238. const e5 = n3[r3];
  1239. return void 0 !== e5 ? e5 : null;
  1240. }
  1241. case "type":
  1242. return "Extent";
  1243. }
  1244. break;
  1245. case "polygon":
  1246. switch (r3) {
  1247. case "rings":
  1248. s4 = n3.cache._arcadeCacheId, void 0 === s4 && (Z3++, s4 = Z3, n3.cache._arcadeCacheId = s4);
  1249. return new h2(n3.rings, n3.spatialReference, true === n3.hasZ, true === n3.hasM, s4);
  1250. case "type":
  1251. return "Polygon";
  1252. }
  1253. break;
  1254. case "point":
  1255. switch (r3) {
  1256. case "x":
  1257. case "y":
  1258. case "z":
  1259. case "m":
  1260. return void 0 !== n3[r3] ? n3[r3] : null;
  1261. case "type":
  1262. return "Point";
  1263. }
  1264. break;
  1265. case "polyline":
  1266. switch (r3) {
  1267. case "paths":
  1268. s4 = n3.cache._arcadeCacheId, void 0 === s4 && (Z3++, s4 = Z3, n3.cache._arcadeCacheId = s4);
  1269. return new h2(n3.paths, n3.spatialReference, true === n3.hasZ, true === n3.hasM, s4);
  1270. case "type":
  1271. return "Polyline";
  1272. }
  1273. break;
  1274. case "multipoint":
  1275. switch (r3) {
  1276. case "points":
  1277. s4 = n3.cache._arcadeCacheId, void 0 === s4 && (Z3++, s4 = Z3, n3.cache._arcadeCacheId = s4);
  1278. return new i(n3.points, n3.spatialReference, true === n3.hasZ, true === n3.hasM, s4, 1);
  1279. case "type":
  1280. return "Multipoint";
  1281. }
  1282. }
  1283. if (1 === o2)
  1284. throw new t(a3, e.InvalidIdentifier, i4);
  1285. return 2 === o2 ? { keystate: "notfound" } : null;
  1286. }
  1287. // node_modules/@arcgis/core/arcade/functions/maths.js
  1288. function l4(n3, t6, r3) {
  1289. return void 0 === r3 || 0 == +r3 ? Math[n3](t6) : (t6 = +t6, r3 = +r3, isNaN(t6) || "number" != typeof r3 || r3 % 1 != 0 ? NaN : (t6 = t6.toString().split("e"), +((t6 = (t6 = Math[n3](+(t6[0] + "e" + (t6[1] ? +t6[1] - r3 : -r3)))).toString().split("e"))[0] + "e" + (t6[1] ? +t6[1] + r3 : r3))));
  1290. }
  1291. function N2(N4, h5) {
  1292. function m6(n3, t6, r3) {
  1293. const u3 = re(n3);
  1294. return isNaN(u3) ? u3 : isNaN(t6) || isNaN(r3) || t6 > r3 ? NaN : u3 < t6 ? t6 : u3 > r3 ? r3 : u3;
  1295. }
  1296. N4.number = function(a3, f2) {
  1297. return h5(a3, f2, (s4, l6, N5) => {
  1298. V(N5, 1, 2, a3, f2);
  1299. const h6 = N5[0];
  1300. if (Z(h6))
  1301. return h6;
  1302. if (null === h6)
  1303. return 0;
  1304. if (z(h6))
  1305. return Number(h6);
  1306. if (_(h6))
  1307. return Number(h6);
  1308. if (Y(h6))
  1309. return NaN;
  1310. if ("" === h6)
  1311. return Number(h6);
  1312. if (void 0 === h6)
  1313. return Number(h6);
  1314. if (w3(h6)) {
  1315. if (void 0 !== N5[1]) {
  1316. let n3 = R(N5[1], "\u2030", "");
  1317. return n3 = R(n3, "\xA4", ""), p2(h6, { pattern: n3 });
  1318. }
  1319. return Number(h6.trim());
  1320. }
  1321. return Number(h6);
  1322. });
  1323. }, N4.abs = function(t6, r3) {
  1324. return h5(t6, r3, (u3, e5, o2) => (V(o2, 1, 1, t6, r3), Math.abs(re(o2[0]))));
  1325. }, N4.acos = function(t6, r3) {
  1326. return h5(t6, r3, (u3, e5, o2) => (V(o2, 1, 1, t6, r3), Math.acos(re(o2[0]))));
  1327. }, N4.asin = function(t6, r3) {
  1328. return h5(t6, r3, (u3, e5, o2) => (V(o2, 1, 1, t6, r3), Math.asin(re(o2[0]))));
  1329. }, N4.atan = function(t6, r3) {
  1330. return h5(t6, r3, (u3, e5, o2) => (V(o2, 1, 1, t6, r3), Math.atan(re(o2[0]))));
  1331. }, N4.atan2 = function(t6, r3) {
  1332. return h5(t6, r3, (u3, e5, o2) => (V(o2, 2, 2, t6, r3), Math.atan2(re(o2[0]), re(o2[1]))));
  1333. }, N4.ceil = function(t6, r3) {
  1334. return h5(t6, r3, (u3, e5, o2) => {
  1335. if (V(o2, 1, 2, t6, r3), 2 === o2.length) {
  1336. let n3 = re(o2[1]);
  1337. return isNaN(n3) && (n3 = 0), l4("ceil", re(o2[0]), -1 * n3);
  1338. }
  1339. return Math.ceil(re(o2[0]));
  1340. });
  1341. }, N4.round = function(t6, r3) {
  1342. return h5(t6, r3, (u3, e5, o2) => {
  1343. if (V(o2, 1, 2, t6, r3), 2 === o2.length) {
  1344. let n3 = re(o2[1]);
  1345. return isNaN(n3) && (n3 = 0), l4("round", re(o2[0]), -1 * n3);
  1346. }
  1347. return Math.round(re(o2[0]));
  1348. });
  1349. }, N4.floor = function(t6, r3) {
  1350. return h5(t6, r3, (u3, e5, o2) => {
  1351. if (V(o2, 1, 2, t6, r3), 2 === o2.length) {
  1352. let n3 = re(o2[1]);
  1353. return isNaN(n3) && (n3 = 0), l4("floor", re(o2[0]), -1 * n3);
  1354. }
  1355. return Math.floor(re(o2[0]));
  1356. });
  1357. }, N4.cos = function(t6, r3) {
  1358. return h5(t6, r3, (u3, e5, o2) => (V(o2, 1, 1, t6, r3), Math.cos(re(o2[0]))));
  1359. }, N4.isnan = function(t6, r3) {
  1360. return h5(t6, r3, (u3, e5, o2) => (V(o2, 1, 1, t6, r3), "number" == typeof o2[0] && isNaN(o2[0])));
  1361. }, N4.exp = function(t6, r3) {
  1362. return h5(t6, r3, (u3, e5, o2) => (V(o2, 1, 1, t6, r3), Math.exp(re(o2[0]))));
  1363. }, N4.log = function(t6, r3) {
  1364. return h5(t6, r3, (u3, e5, o2) => (V(o2, 1, 1, t6, r3), Math.log(re(o2[0]))));
  1365. }, N4.pow = function(t6, r3) {
  1366. return h5(t6, r3, (u3, e5, o2) => (V(o2, 2, 2, t6, r3), re(o2[0]) ** re(o2[1])));
  1367. }, N4.random = function(t6, r3) {
  1368. return h5(t6, r3, (u3, e5, o2) => (V(o2, 0, 0, t6, r3), Math.random()));
  1369. }, N4.sin = function(t6, r3) {
  1370. return h5(t6, r3, (u3, e5, o2) => (V(o2, 1, 1, t6, r3), Math.sin(re(o2[0]))));
  1371. }, N4.sqrt = function(t6, r3) {
  1372. return h5(t6, r3, (u3, e5, o2) => (V(o2, 1, 1, t6, r3), Math.sqrt(re(o2[0]))));
  1373. }, N4.tan = function(t6, r3) {
  1374. return h5(t6, r3, (u3, e5, o2) => (V(o2, 1, 1, t6, r3), Math.tan(re(o2[0]))));
  1375. }, N4.defaultvalue = function(t6, r3) {
  1376. return h5(t6, r3, (u3, e5, o2) => (V(o2, 2, 2, t6, r3), null === o2[0] || "" === o2[0] || void 0 === o2[0] ? o2[1] : o2[0]));
  1377. }, N4.isempty = function(t6, r3) {
  1378. return h5(t6, r3, (u3, e5, o2) => (V(o2, 1, 1, t6, r3), null === o2[0] || ("" === o2[0] || void 0 === o2[0])));
  1379. }, N4.boolean = function(t6, r3) {
  1380. return h5(t6, r3, (u3, e5, o2) => {
  1381. V(o2, 1, 1, t6, r3);
  1382. const i4 = o2[0];
  1383. return le(i4);
  1384. });
  1385. }, N4.constrain = function(t6, r3) {
  1386. return h5(t6, r3, (u3, o2, i4) => {
  1387. V(i4, 3, 3, t6, r3);
  1388. const f2 = re(i4[1]), c3 = re(i4[2]);
  1389. if (Y(i4[0])) {
  1390. const n3 = [];
  1391. for (const t7 of i4[0])
  1392. n3.push(m6(t7, f2, c3));
  1393. return n3;
  1394. }
  1395. if (E(i4[0])) {
  1396. const n3 = [];
  1397. for (let t7 = 0; t7 < i4[0].length(); t7++)
  1398. n3.push(m6(i4[0].get(t7), f2, c3));
  1399. return n3;
  1400. }
  1401. return m6(i4[0], f2, c3);
  1402. });
  1403. };
  1404. }
  1405. // node_modules/@arcgis/core/arcade/functions/stats.js
  1406. function a2(n3, r3, t6, i4) {
  1407. if (1 === i4.length) {
  1408. if (Y(i4[0]))
  1409. return l2(n3, i4[0], -1);
  1410. if (E(i4[0]))
  1411. return l2(n3, i4[0].toArray(), -1);
  1412. }
  1413. return l2(n3, i4, -1);
  1414. }
  1415. function f(o2, f2) {
  1416. o2.stdev = function(n3, r3) {
  1417. return f2(n3, r3, (n4, r4, t6) => a2("stdev", n4, r4, t6));
  1418. }, o2.variance = function(n3, r3) {
  1419. return f2(n3, r3, (n4, r4, t6) => a2("variance", n4, r4, t6));
  1420. }, o2.average = function(n3, r3) {
  1421. return f2(n3, r3, (n4, r4, t6) => a2("mean", n4, r4, t6));
  1422. }, o2.mean = function(n3, r3) {
  1423. return f2(n3, r3, (n4, r4, t6) => a2("mean", n4, r4, t6));
  1424. }, o2.sum = function(n3, r3) {
  1425. return f2(n3, r3, (n4, r4, t6) => a2("sum", n4, r4, t6));
  1426. }, o2.min = function(n3, r3) {
  1427. return f2(n3, r3, (n4, r4, t6) => a2("min", n4, r4, t6));
  1428. }, o2.max = function(n3, r3) {
  1429. return f2(n3, r3, (n4, r4, t6) => a2("max", n4, r4, t6));
  1430. }, o2.distinct = function(n3, r3) {
  1431. return f2(n3, r3, (n4, r4, t6) => a2("distinct", n4, r4, t6));
  1432. }, o2.count = function(o3, a3) {
  1433. return f2(o3, a3, (f3, c3, m6) => {
  1434. if (V(m6, 1, 1, o3, a3), Y(m6[0]) || w3(m6[0]))
  1435. return m6[0].length;
  1436. if (E(m6[0]))
  1437. return m6[0].length();
  1438. throw new t(o3, e.InvalidParameter, a3);
  1439. });
  1440. };
  1441. }
  1442. // node_modules/@arcgis/core/arcade/functions/convertdirection.js
  1443. var l5 = (e5) => (n3, t6, r3) => (r3 = r3 || 14, +e5(n3, t6).toFixed(r3));
  1444. var d4 = (e5, n3) => e5 + n3;
  1445. var m5 = (e5, n3) => e5 * n3;
  1446. var g2 = (e5, n3) => e5 / n3;
  1447. var _2 = (e5, n3, t6) => l5(d4)(e5, n3, t6);
  1448. var w5 = (e5, n3, t6) => l5(m5)(e5, n3, t6);
  1449. var A = (e5, n3, t6) => l5(g2)(e5, n3, t6);
  1450. var D2 = 360;
  1451. var p5 = 400;
  1452. var E2 = 2 * Math.PI;
  1453. var T2 = 3600;
  1454. var S = 3240;
  1455. var R2 = 60;
  1456. var M4 = 60;
  1457. var F3 = 180 * T2 / Math.PI;
  1458. var v4 = D2 * R2 * M4;
  1459. var L2 = 90 * T2;
  1460. var U2 = 180 * T2;
  1461. var N3 = 270 * T2;
  1462. var x2 = String.fromCharCode(7501);
  1463. var z2 = "\xB0";
  1464. function O2(e5) {
  1465. if (false === w3(e5))
  1466. throw new t(null, e.InvalidParameter, null);
  1467. return e5;
  1468. }
  1469. function G2(e5, n3) {
  1470. const t6 = 10 ** n3;
  1471. return Math.round(e5 * t6) / t6;
  1472. }
  1473. function I2(e5, n3) {
  1474. return e5 % n3;
  1475. }
  1476. function b(e5) {
  1477. const n3 = parseFloat(e5.toString().replace(Math.trunc(e5).toString(), "0")) * Math.sign(e5);
  1478. if (e5 < 0) {
  1479. return { fraction: n3, integer: Math.ceil(e5) };
  1480. }
  1481. return { fraction: n3, integer: Math.floor(e5) };
  1482. }
  1483. var H2;
  1484. var y3;
  1485. var q;
  1486. var k3;
  1487. function C3(e5, n3) {
  1488. switch (e5) {
  1489. case H2.north:
  1490. return "SHORT" === n3 ? "N" : "North";
  1491. case H2.east:
  1492. return "SHORT" === n3 ? "E" : "East";
  1493. case H2.south:
  1494. return "SHORT" === n3 ? "S" : "South";
  1495. case H2.west:
  1496. return "SHORT" === n3 ? "W" : "West";
  1497. }
  1498. }
  1499. function P4(e5, n3, t6) {
  1500. for (; e5.length < t6; )
  1501. e5 = n3 + e5;
  1502. return e5;
  1503. }
  1504. function Q(e5, n3) {
  1505. return e5 - Math.floor(e5 / n3) * n3;
  1506. }
  1507. function j(e5) {
  1508. switch (e5) {
  1509. case y3.truncated_degrees:
  1510. case y3.decimal_degrees:
  1511. return D2;
  1512. case y3.radians:
  1513. return E2;
  1514. case y3.gradians:
  1515. return p5;
  1516. case y3.seconds:
  1517. return v4;
  1518. case y3.fractional_degree_minutes:
  1519. return R2;
  1520. case y3.fractional_minute_seconds:
  1521. return M4;
  1522. default:
  1523. throw new t(null, e.LogicError, null, { reason: "unsupported evaluations" });
  1524. }
  1525. }
  1526. function W3(e5) {
  1527. switch (e5.toUpperCase().trim()) {
  1528. case "NORTH":
  1529. case "NORTHAZIMUTH":
  1530. case "NORTH AZIMUTH":
  1531. return q.north_azimuth;
  1532. case "POLAR":
  1533. return q.polar;
  1534. case "QUADRANT":
  1535. return q.quadrant;
  1536. case "SOUTH":
  1537. case "SOUTHAZIMUTH":
  1538. case "SOUTH AZIMUTH":
  1539. return q.south_azimuth;
  1540. }
  1541. throw new t(null, e.LogicError, null, { reason: "unsupported directionType" });
  1542. }
  1543. function Z4(e5) {
  1544. switch (e5.toUpperCase().trim()) {
  1545. case "D":
  1546. case "DD":
  1547. case "DECIMALDEGREE":
  1548. case "DECIMAL DEGREE":
  1549. case "DEGREE":
  1550. case "DECIMALDEGREES":
  1551. case "DECIMAL DEGREES":
  1552. case "DEGREES":
  1553. return y3.decimal_degrees;
  1554. case "DMS":
  1555. case "DEGREESMINUTESSECONDS":
  1556. case "DEGREES MINUTES SECONDS":
  1557. return y3.degrees_minutes_seconds;
  1558. case "R":
  1559. case "RAD":
  1560. case "RADS":
  1561. case "RADIAN":
  1562. case "RADIANS":
  1563. return y3.radians;
  1564. case "G":
  1565. case "GON":
  1566. case "GONS":
  1567. case "GRAD":
  1568. case "GRADS":
  1569. case "GRADIAN":
  1570. case "GRADIANS":
  1571. return y3.gradians;
  1572. }
  1573. throw new t(null, e.LogicError, null, { reason: "unsupported units" });
  1574. }
  1575. !function(e5) {
  1576. e5[e5.north = 0] = "north", e5[e5.east = 1] = "east", e5[e5.south = 2] = "south", e5[e5.west = 3] = "west";
  1577. }(H2 || (H2 = {})), function(e5) {
  1578. e5[e5.decimal_degrees = 1] = "decimal_degrees", e5[e5.seconds = 2] = "seconds", e5[e5.degrees_minutes_seconds = 3] = "degrees_minutes_seconds", e5[e5.radians = 4] = "radians", e5[e5.gradians = 5] = "gradians", e5[e5.truncated_degrees = 6] = "truncated_degrees", e5[e5.fractional_degree_minutes = 7] = "fractional_degree_minutes", e5[e5.fractional_minute_seconds = 8] = "fractional_minute_seconds";
  1579. }(y3 || (y3 = {})), function(e5) {
  1580. e5[e5.north_azimuth = 1] = "north_azimuth", e5[e5.polar = 2] = "polar", e5[e5.quadrant = 3] = "quadrant", e5[e5.south_azimuth = 4] = "south_azimuth";
  1581. }(q || (q = {})), function(e5) {
  1582. e5[e5.meridian = 0] = "meridian", e5[e5.direction = 1] = "direction";
  1583. }(k3 || (k3 = {}));
  1584. var B = class {
  1585. constructor(e5, n3, t6) {
  1586. this.m_degrees = e5, this.m_minutes = n3, this.m_seconds = t6;
  1587. }
  1588. getField(e5) {
  1589. switch (e5) {
  1590. case y3.decimal_degrees:
  1591. case y3.truncated_degrees:
  1592. return this.m_degrees;
  1593. case y3.fractional_degree_minutes:
  1594. return this.m_minutes;
  1595. case y3.seconds:
  1596. case y3.fractional_minute_seconds:
  1597. return this.m_seconds;
  1598. default:
  1599. throw new t(null, e.LogicError, null, { reason: "unexpected evaluation" });
  1600. }
  1601. }
  1602. static secondsToDMS(e5) {
  1603. const n3 = b(e5).fraction;
  1604. let t6 = b(e5).integer;
  1605. const r3 = Math.floor(t6 / T2);
  1606. t6 -= r3 * T2;
  1607. const s4 = Math.floor(t6 / M4);
  1608. return t6 -= s4 * M4, new B(r3, s4, t6 + n3);
  1609. }
  1610. static numberToDms(e5) {
  1611. const n3 = b(e5).fraction, t6 = b(e5).integer, r3 = w5(b(100 * n3).fraction, 100), s4 = b(100 * n3).integer;
  1612. return new B(t6, s4, r3);
  1613. }
  1614. format(e5, n3) {
  1615. let t6 = G2(this.m_seconds, n3), r3 = this.m_minutes, s4 = this.m_degrees;
  1616. if (e5 === y3.seconds || e5 === y3.fractional_minute_seconds)
  1617. M4 <= t6 && (t6 -= M4, ++r3), R2 <= r3 && (r3 = 0, ++s4), D2 <= s4 && (s4 = 0);
  1618. else if (e5 === y3.fractional_degree_minutes)
  1619. t6 = 0, r3 = 30 <= this.m_seconds ? this.m_minutes + 1 : this.m_minutes, s4 = this.m_degrees, R2 <= r3 && (r3 = 0, ++s4), D2 <= s4 && (s4 = 0);
  1620. else if (e5 === y3.decimal_degrees || e5 === y3.truncated_degrees) {
  1621. const e6 = A(this.m_seconds, T2), n4 = A(this.m_minutes, R2);
  1622. s4 = Math.round(this.m_degrees + n4 + e6), r3 = 0, t6 = 0;
  1623. }
  1624. return new B(s4, r3, t6);
  1625. }
  1626. static dmsToSeconds(e5, n3, t6) {
  1627. return e5 * T2 + n3 * M4 + t6;
  1628. }
  1629. };
  1630. var V2 = class {
  1631. constructor(e5, n3, t6) {
  1632. this.meridian = e5, this.angle = n3, this.direction = t6;
  1633. }
  1634. fetchAzimuth(e5) {
  1635. return e5 === k3.meridian ? this.meridian : this.direction;
  1636. }
  1637. };
  1638. var X2 = class {
  1639. constructor(e5) {
  1640. this._angle = e5;
  1641. }
  1642. static createFromAngleAndDirection(e5, n3) {
  1643. return new X2(new K2(X2._convertDirectionFormat(e5.extractAngularUnits(y3.seconds), n3, q.north_azimuth)));
  1644. }
  1645. getAngle(e5) {
  1646. const n3 = this._angle.extractAngularUnits(y3.seconds);
  1647. switch (e5) {
  1648. case q.north_azimuth:
  1649. case q.south_azimuth:
  1650. case q.polar:
  1651. return new K2(X2._convertDirectionFormat(n3, q.north_azimuth, e5));
  1652. case q.quadrant: {
  1653. const e6 = X2.secondsNorthAzimuthToQuadrant(n3);
  1654. return new K2(e6.angle);
  1655. }
  1656. }
  1657. }
  1658. getMeridian(e5) {
  1659. const n3 = this._angle.extractAngularUnits(y3.seconds);
  1660. switch (e5) {
  1661. case q.north_azimuth:
  1662. return H2.north;
  1663. case q.south_azimuth:
  1664. return H2.south;
  1665. case q.polar:
  1666. return H2.east;
  1667. case q.quadrant:
  1668. return X2.secondsNorthAzimuthToQuadrant(n3).meridian;
  1669. }
  1670. }
  1671. getDirection(e5) {
  1672. const n3 = this._angle.extractAngularUnits(y3.seconds);
  1673. switch (e5) {
  1674. case q.north_azimuth:
  1675. return H2.east;
  1676. case q.south_azimuth:
  1677. return H2.west;
  1678. case q.polar:
  1679. return H2.north;
  1680. case q.quadrant:
  1681. return X2.secondsNorthAzimuthToQuadrant(n3).direction;
  1682. }
  1683. }
  1684. static secondsNorthAzimuthToQuadrant(e5) {
  1685. const n3 = e5 <= L2 || e5 >= N3 ? H2.north : H2.south, t6 = n3 === H2.north ? Math.min(v4 - e5, e5) : Math.abs(e5 - U2), r3 = e5 > U2 ? H2.west : H2.east;
  1686. return new V2(n3, t6, r3);
  1687. }
  1688. static createFromAngleMeridianAndDirection(e5, n3, t6) {
  1689. return new X2(new K2(X2.secondsQuadrantToNorthAzimuth(e5.extractAngularUnits(y3.seconds), n3, t6)));
  1690. }
  1691. static secondsQuadrantToNorthAzimuth(e5, n3, t6) {
  1692. return n3 === H2.north ? t6 === H2.east ? e5 : v4 - e5 : t6 === H2.east ? U2 - e5 : U2 + e5;
  1693. }
  1694. static _convertDirectionFormat(e5, r3, s4) {
  1695. let a3 = 0;
  1696. switch (r3) {
  1697. case q.north_azimuth:
  1698. a3 = e5;
  1699. break;
  1700. case q.polar:
  1701. a3 = L2 - e5;
  1702. break;
  1703. case q.quadrant:
  1704. throw new t(null, e.LogicError, null, { reason: "unexpected evaluation" });
  1705. case q.south_azimuth:
  1706. a3 = e5 + U2;
  1707. }
  1708. let i4 = 0;
  1709. switch (s4) {
  1710. case q.north_azimuth:
  1711. i4 = a3;
  1712. break;
  1713. case q.polar:
  1714. i4 = L2 - a3;
  1715. break;
  1716. case q.quadrant:
  1717. throw new t(null, e.LogicError, null, { reason: "unexpected evaluation" });
  1718. case q.south_azimuth:
  1719. i4 = a3 - U2;
  1720. }
  1721. return i4 = I2(i4, v4), i4 < 0 ? v4 + i4 : i4;
  1722. }
  1723. };
  1724. function J3(e5, r3, s4) {
  1725. let a3 = null;
  1726. switch (r3) {
  1727. case y3.decimal_degrees:
  1728. a3 = w5(e5, T2);
  1729. break;
  1730. case y3.seconds:
  1731. a3 = e5;
  1732. break;
  1733. case y3.gradians:
  1734. a3 = w5(e5, S);
  1735. break;
  1736. case y3.radians:
  1737. a3 = w5(e5, F3);
  1738. break;
  1739. default:
  1740. throw new t(null, e.LogicError, null, { reason: "unexpected evaluation" });
  1741. }
  1742. switch (s4) {
  1743. case y3.decimal_degrees:
  1744. return A(a3, T2);
  1745. case y3.seconds:
  1746. return a3;
  1747. case y3.gradians:
  1748. return A(a3, S);
  1749. case y3.radians:
  1750. return a3 / F3;
  1751. default:
  1752. throw new t(null, e.LogicError, null, { reason: "unexpected evaluation" });
  1753. }
  1754. }
  1755. var K2 = class {
  1756. constructor(e5) {
  1757. this._seconds = e5;
  1758. }
  1759. static createFromAngleAndUnits(e5, n3) {
  1760. return new K2(J3(e5, n3, y3.seconds));
  1761. }
  1762. extractAngularUnits(e5) {
  1763. return J3(this._seconds, y3.seconds, Y2(e5));
  1764. }
  1765. static createFromDegreesMinutesSeconds(e5, n3, t6) {
  1766. return new K2(_2(_2(w5(e5, T2), w5(n3, M4)), t6));
  1767. }
  1768. };
  1769. function Y2(e5) {
  1770. switch (c(e5), e5) {
  1771. case y3.decimal_degrees:
  1772. case y3.truncated_degrees:
  1773. case y3.degrees_minutes_seconds:
  1774. return y3.decimal_degrees;
  1775. case y3.gradians:
  1776. return y3.gradians;
  1777. case y3.fractional_degree_minutes:
  1778. return y3.fractional_degree_minutes;
  1779. case y3.radians:
  1780. return y3.radians;
  1781. case y3.seconds:
  1782. case y3.fractional_minute_seconds:
  1783. return y3.seconds;
  1784. }
  1785. }
  1786. var $ = class {
  1787. constructor(e5, n3, t6, r3) {
  1788. this.view = e5, this.angle = n3, this.merdian = t6, this.direction = r3, this._dms = null, this._formattedDms = null;
  1789. }
  1790. static createFromStringAndBearing(e5, n3, t6) {
  1791. return new $(e5, n3.getAngle(t6), n3.getMeridian(t6), n3.getDirection(t6));
  1792. }
  1793. fetchAngle() {
  1794. return this.angle;
  1795. }
  1796. fetchMeridian() {
  1797. return this.merdian;
  1798. }
  1799. fetchDirection() {
  1800. return this.direction;
  1801. }
  1802. fetchView() {
  1803. return this.view;
  1804. }
  1805. fetchDms() {
  1806. return null === this._dms && this._calculateDms(), this._dms;
  1807. }
  1808. fetchFormattedDms() {
  1809. return null === this._formattedDms && this._calculateDms(), this._formattedDms;
  1810. }
  1811. _calculateDms() {
  1812. let e5 = null, n3 = y3.truncated_degrees, t6 = 0;
  1813. for (let r3 = 0; r3 < this.view.length; r3++) {
  1814. const s4 = this.view[r3];
  1815. switch (s4) {
  1816. case "m":
  1817. e5 = de(this.view, r3, s4), n3 = n3 === y3.truncated_degrees ? y3.fractional_degree_minutes : n3, r3 = e5.newpos;
  1818. continue;
  1819. case "s":
  1820. e5 = de(this.view, r3, s4), n3 = y3.fractional_minute_seconds, t6 = t6 < e5.rounding ? e5.rounding : t6, r3 = e5.newpos;
  1821. continue;
  1822. default:
  1823. continue;
  1824. }
  1825. }
  1826. this._dms = B.secondsToDMS(this.angle.extractAngularUnits(y3.seconds)), this._formattedDms = B.secondsToDMS(this.angle.extractAngularUnits(y3.seconds)).format(n3, t6);
  1827. }
  1828. };
  1829. function ee(e5, r3, s4, a3, i4) {
  1830. let o2 = null;
  1831. switch (r3) {
  1832. case y3.decimal_degrees:
  1833. case y3.radians:
  1834. case y3.gradians:
  1835. return o2 = Q(G2(e5.extractAngularUnits(r3), a3), j(r3)), P4(o2.toFixed(a3), "0", s4 + a3 + (a3 > 0 ? 1 : 0));
  1836. case y3.truncated_degrees:
  1837. case y3.fractional_degree_minutes:
  1838. return o2 = Q(i4.fetchFormattedDms().getField(r3), j(r3)), P4(o2.toFixed(a3), "0", s4 + a3 + (a3 > 0 ? 1 : 0));
  1839. case y3.fractional_minute_seconds:
  1840. return o2 = Q(G2(i4.fetchDms().getField(r3), a3), j(r3)), P4(o2.toFixed(a3), "0", s4 + a3 + (a3 > 0 ? 1 : 0));
  1841. default:
  1842. throw new t(null, e.LogicError, null, { reason: "unexpected evaluation" });
  1843. }
  1844. }
  1845. function ne(e5, r3, s4) {
  1846. if (s4 === q.quadrant)
  1847. throw new t(null, e.LogicError, null, { reason: "conversion error" });
  1848. if (r3 === y3.degrees_minutes_seconds) {
  1849. const n3 = B.numberToDms(e5);
  1850. return X2.createFromAngleAndDirection(K2.createFromDegreesMinutesSeconds(n3.m_degrees, n3.m_minutes, n3.m_seconds), s4);
  1851. }
  1852. return X2.createFromAngleAndDirection(K2.createFromAngleAndUnits(e5, Y2(r3)), s4);
  1853. }
  1854. function te2(e5) {
  1855. switch (re(e5)) {
  1856. case 1:
  1857. return { first: H2.north, second: H2.east };
  1858. case 2:
  1859. return { first: H2.south, second: H2.east };
  1860. case 3:
  1861. return { first: H2.south, second: H2.west };
  1862. case 4:
  1863. return { first: H2.north, second: H2.west };
  1864. }
  1865. return null;
  1866. }
  1867. function re2(e5) {
  1868. switch (e5.toUpperCase().trim()) {
  1869. case "N":
  1870. case "NORTH":
  1871. return H2.north;
  1872. case "E":
  1873. case "EAST":
  1874. return H2.east;
  1875. case "S":
  1876. case "SOUTH":
  1877. return H2.south;
  1878. case "W":
  1879. case "WEST":
  1880. return H2.west;
  1881. }
  1882. return null;
  1883. }
  1884. function se2(e5) {
  1885. const r3 = parseFloat(e5);
  1886. if (Z(r3)) {
  1887. if (isNaN(r3))
  1888. throw new t(null, e.LogicError, null, { reason: "invalid conversion" });
  1889. return r3;
  1890. }
  1891. throw new t(null, e.LogicError, null, { reason: "invalid conversion" });
  1892. }
  1893. function ae2(e5, s4, a3) {
  1894. const i4 = a3 === q.quadrant;
  1895. let o2 = null, c3 = null, u3 = 0, l6 = 0, d5 = 0;
  1896. if (i4) {
  1897. if (e5.length < 2)
  1898. throw new t(null, e.LogicError, null, { reason: "conversion error" });
  1899. d5 = 1;
  1900. const s5 = te2(K(e5[e5.length - 1]));
  1901. if (s5 ? (o2 = s5.first, c3 = s5.second) : (u3 = 1, o2 = re2(K(e5[0])), c3 = re2(K(e5[e5.length - 1]))), null === o2 || null === c3)
  1902. throw new t(null, e.LogicError, null, { reason: "invalid conversion" });
  1903. }
  1904. switch (s4) {
  1905. case y3.decimal_degrees:
  1906. case y3.radians:
  1907. case y3.gradians:
  1908. if (0 === e5.length)
  1909. throw new t(null, e.LogicError, null, { reason: "invalid conversion" });
  1910. return i4 ? X2.createFromAngleMeridianAndDirection(K2.createFromAngleAndUnits(se2(e5[u3]), Y2(s4)), o2, c3) : X2.createFromAngleAndDirection(K2.createFromAngleAndUnits(se2(e5[u3]), Y2(s4)), a3);
  1911. case y3.degrees_minutes_seconds:
  1912. if (l6 = e5.length - d5 - u3, 3 === l6) {
  1913. const n3 = K2.createFromDegreesMinutesSeconds(se2(e5[u3]), se2(e5[u3 + 1]), se2(e5[u3 + 2]));
  1914. return i4 ? X2.createFromAngleMeridianAndDirection(n3, o2, c3) : X2.createFromAngleAndDirection(n3, a3);
  1915. }
  1916. if (1 === l6) {
  1917. const n3 = se2(e5[u3]), t6 = B.numberToDms(n3), r3 = K2.createFromDegreesMinutesSeconds(t6.m_degrees, t6.m_minutes, t6.m_seconds);
  1918. return i4 ? X2.createFromAngleMeridianAndDirection(r3, o2, c3) : X2.createFromAngleAndDirection(r3, a3);
  1919. }
  1920. }
  1921. throw new t(null, e.LogicError, null, { reason: "invalid conversion" });
  1922. }
  1923. function ie2(e5) {
  1924. const n3 = [" ", "-", "/", "'", '"', "\\", "^", z2, x2, " ", "\r", "\n", "*"];
  1925. let t6 = "";
  1926. for (let r3 = 0; r3 < e5.length; r3++) {
  1927. const s4 = e5.charAt(r3);
  1928. n3.includes(s4) ? t6 += "RRSPLITRRSPLITRR" : t6 += s4;
  1929. }
  1930. return t6.split("RRSPLITRRSPLITRR").filter((e6) => "" !== e6);
  1931. }
  1932. function oe(e5, r3, u3) {
  1933. if (Z(e5))
  1934. return ne(re(e5), r3, u3);
  1935. if (w3(e5))
  1936. return ae2(ie2(e5), r3, u3);
  1937. if (Y(e5))
  1938. return ae2(e5, r3, u3);
  1939. if (E(e5))
  1940. return ae2(e5.toArray(), r3, u3);
  1941. throw new t(null, e.LogicError, null, { reason: "conversion error" });
  1942. }
  1943. function ce(e5, r3, s4) {
  1944. const a3 = Y2(s4);
  1945. if (a3 && s4 !== y3.degrees_minutes_seconds) {
  1946. return e5.getAngle(r3).extractAngularUnits(a3);
  1947. }
  1948. throw new t(null, e.LogicError, null, { reason: "conversion error" });
  1949. }
  1950. function ue2(e5, n3, t6) {
  1951. const r3 = e5.getAngle(n3);
  1952. if (n3 === q.quadrant && t6 === y3.degrees_minutes_seconds) {
  1953. const t7 = B.secondsToDMS(r3.extractAngularUnits(y3.seconds));
  1954. return [C3(e5.getMeridian(n3), "SHORT"), t7.m_degrees, t7.m_minutes, t7.m_seconds, C3(e5.getDirection(n3), "SHORT")];
  1955. }
  1956. if (t6 === y3.degrees_minutes_seconds) {
  1957. const e6 = B.secondsToDMS(r3.extractAngularUnits(y3.seconds));
  1958. return [e6.m_degrees, e6.m_minutes, e6.m_seconds];
  1959. }
  1960. return n3 === q.quadrant ? [C3(e5.getMeridian(n3), "SHORT"), r3.extractAngularUnits(t6), C3(e5.getDirection(n3), "SHORT")] : [r3.extractAngularUnits(t6)];
  1961. }
  1962. function le2(e5, r3) {
  1963. let s4 = "";
  1964. switch (e5) {
  1965. case y3.decimal_degrees:
  1966. s4 = r3 === q.quadrant ? "DD.DD" + z2 : "DDD.DD" + z2;
  1967. break;
  1968. case y3.degrees_minutes_seconds:
  1969. s4 = r3 === q.quadrant ? "dd" + z2 + ` mm' ss"` : "ddd" + z2 + ` mm' ss.ss"`;
  1970. break;
  1971. case y3.radians:
  1972. s4 = "R.RR";
  1973. break;
  1974. case y3.gradians:
  1975. s4 = "GGG.GG" + x2;
  1976. break;
  1977. default:
  1978. throw new t(null, e.LogicError, null, { reason: "conversion error" });
  1979. }
  1980. return r3 === q.quadrant && (s4 = "p " + s4 + " b"), s4;
  1981. }
  1982. function de(e5, n3, t6) {
  1983. const r3 = { padding: 0, rounding: 0, newpos: n3 };
  1984. let s4 = false;
  1985. for (; n3 < e5.length; ) {
  1986. const a3 = e5[n3];
  1987. if (a3 === t6)
  1988. s4 ? r3.rounding++ : r3.padding++, n3++;
  1989. else {
  1990. if ("." !== a3)
  1991. break;
  1992. s4 = true, n3++;
  1993. }
  1994. }
  1995. return r3.newpos = n3 - 1, r3;
  1996. }
  1997. function he(e5, n3, t6) {
  1998. const r3 = { escaped: "", newpos: n3 };
  1999. for (n3++; n3 < e5.length; ) {
  2000. const t7 = e5[n3];
  2001. if (n3++, "]" === t7)
  2002. break;
  2003. r3.escaped += t7;
  2004. }
  2005. return r3.newpos = n3 - 1, r3;
  2006. }
  2007. function me(e5, n3, t6) {
  2008. let r3 = "", s4 = null, a3 = null;
  2009. const i4 = $.createFromStringAndBearing(n3, e5, t6), o2 = { D: y3.decimal_degrees, d: y3.truncated_degrees, m: y3.fractional_degree_minutes, s: y3.fractional_minute_seconds, R: y3.radians, G: y3.gradians };
  2010. for (let c3 = 0; c3 < n3.length; c3++) {
  2011. const u3 = n3[c3];
  2012. switch (u3) {
  2013. case "[":
  2014. s4 = he(n3, c3), r3 += s4.escaped, c3 = s4.newpos;
  2015. continue;
  2016. case "D":
  2017. case "d":
  2018. case "m":
  2019. case "s":
  2020. case "R":
  2021. case "G":
  2022. s4 = de(n3, c3, u3), a3 = e5.getAngle(t6), r3 += ee(a3, o2[u3], s4.padding, s4.rounding, i4), c3 = s4.newpos;
  2023. continue;
  2024. case "P":
  2025. case "p":
  2026. r3 += C3(i4.fetchMeridian(), "p" === u3 ? "SHORT" : "LONG");
  2027. continue;
  2028. case "B":
  2029. case "b":
  2030. r3 += C3(i4.fetchDirection(), "b" === u3 ? "SHORT" : "LONG");
  2031. continue;
  2032. default:
  2033. r3 += u3;
  2034. }
  2035. }
  2036. return r3;
  2037. }
  2038. function ge(s4, a3, i4) {
  2039. if (!(a3 instanceof J2))
  2040. throw new t(null, e.InvalidParameter, null);
  2041. if (false === a3.hasField("directionType"))
  2042. throw new t(null, e.LogicError, null, { reason: "missing directionType" });
  2043. if (false === a3.hasField("angleType"))
  2044. throw new t(null, e.LogicError, null, { reason: "missing angleType" });
  2045. const o2 = W3(O2(a3.field("directiontype"))), c3 = oe(s4, Z4(O2(a3.field("angletype"))), o2);
  2046. if (!(i4 instanceof J2))
  2047. throw new t(null, e.InvalidParameter, null);
  2048. if (false === i4.hasField("directionType"))
  2049. throw new t(null, e.LogicError, null, { reason: "missing directionType" });
  2050. if (false === i4.hasField("outputType"))
  2051. throw new t(null, e.LogicError, null, { reason: "missing angleType" });
  2052. const u3 = W3(O2(i4.field("directiontype"))), l6 = i4.hasField("angleType") ? Z4(O2(i4.field("angletype"))) : null, d5 = O2(i4.field("outputType")).toUpperCase().trim();
  2053. if (!u3 || !d5)
  2054. throw new t(null, e.LogicError, null, { reason: "conversion error" });
  2055. if (!(l6 || "TEXT" === d5 && i4.hasField("format")))
  2056. throw new t(null, e.LogicError, null, { reason: "invalid unit" });
  2057. switch (d5) {
  2058. case "VALUE":
  2059. return u3 === q.quadrant || l6 === y3.degrees_minutes_seconds ? ue2(c3, u3, l6) : ce(c3, u3, l6);
  2060. case "TEXT": {
  2061. let e5 = "";
  2062. return i4.hasField("format") && (e5 = K(i4.field("format"))), null !== e5 && "" !== e5 || (e5 = le2(l6, u3)), me(c3, e5, u3);
  2063. }
  2064. default:
  2065. throw new t(null, e.InvalidParameter, null);
  2066. }
  2067. }
  2068. // node_modules/@arcgis/core/arcade/functions/hash.js
  2069. var t5 = 2654435761;
  2070. var s2 = 2246822519;
  2071. var n2 = 3266489917;
  2072. var e4 = 668265263;
  2073. var r2 = 374761393;
  2074. function h4(t6) {
  2075. const s4 = [];
  2076. for (let n3 = 0, e5 = t6.length; n3 < e5; n3++) {
  2077. let e6 = t6.charCodeAt(n3);
  2078. e6 < 128 ? s4.push(e6) : e6 < 2048 ? s4.push(192 | e6 >> 6, 128 | 63 & e6) : e6 < 55296 || e6 >= 57344 ? s4.push(224 | e6 >> 12, 128 | e6 >> 6 & 63, 128 | 63 & e6) : (n3++, e6 = 65536 + ((1023 & e6) << 10 | 1023 & t6.charCodeAt(n3)), s4.push(240 | e6 >> 18, 128 | e6 >> 12 & 63, 128 | e6 >> 6 & 63, 128 | 63 & e6));
  2079. }
  2080. return new Uint8Array(s4);
  2081. }
  2082. var i3 = class {
  2083. constructor(t6) {
  2084. this._seed = t6, this._totallen = 0, this._bufs = [], this.init();
  2085. }
  2086. init() {
  2087. return this._bufs = [], this._totallen = 0, this;
  2088. }
  2089. updateFloatArray(t6) {
  2090. const s4 = [];
  2091. for (const n3 of t6)
  2092. isNaN(n3) ? s4.push("NaN") : n3 === 1 / 0 ? s4.push("Infinity") : n3 === -1 / 0 ? s4.push("-Infinity") : 0 === n3 ? s4.push("0") : s4.push(n3.toString(16));
  2093. this.update(h4(s4.join("")));
  2094. }
  2095. updateIntArray(t6) {
  2096. const s4 = Int32Array.from(t6);
  2097. this.update(new Uint8Array(s4.buffer));
  2098. }
  2099. updateUint8Array(t6) {
  2100. this.update(Uint8Array.from(t6));
  2101. }
  2102. updateWithString(t6) {
  2103. return this.update(h4(t6));
  2104. }
  2105. update(t6) {
  2106. return this._bufs.push(t6), this._totallen += t6.length, this;
  2107. }
  2108. digest() {
  2109. const t6 = new Uint8Array(this._totallen);
  2110. let s4 = 0;
  2111. for (const n3 of this._bufs)
  2112. t6.set(n3, s4), s4 += n3.length;
  2113. return this.init(), this._xxHash32(t6, this._seed);
  2114. }
  2115. _xxHash32(h5, i4 = 0) {
  2116. const o2 = h5;
  2117. let u3 = i4 + r2 & 4294967295, a3 = 0;
  2118. if (o2.length >= 16) {
  2119. const n3 = [i4 + t5 + s2 & 4294967295, i4 + s2 & 4294967295, i4 + 0 & 4294967295, i4 - t5 & 4294967295], e5 = h5, r3 = e5.length - 16;
  2120. let o3 = 0;
  2121. for (a3 = 0; (4294967280 & a3) <= r3; a3 += 4) {
  2122. const r4 = a3, h6 = e5[r4 + 0] + (e5[r4 + 1] << 8), i5 = e5[r4 + 2] + (e5[r4 + 3] << 8), u4 = h6 * s2 + (i5 * s2 << 16);
  2123. let l7 = n3[o3] + u4 & 4294967295;
  2124. l7 = l7 << 13 | l7 >>> 19;
  2125. const f2 = 65535 & l7, p6 = l7 >>> 16;
  2126. n3[o3] = f2 * t5 + (p6 * t5 << 16) & 4294967295, o3 = o3 + 1 & 3;
  2127. }
  2128. u3 = (n3[0] << 1 | n3[0] >>> 31) + (n3[1] << 7 | n3[1] >>> 25) + (n3[2] << 12 | n3[2] >>> 20) + (n3[3] << 18 | n3[3] >>> 14) & 4294967295;
  2129. }
  2130. u3 = u3 + h5.length & 4294967295;
  2131. const l6 = h5.length - 4;
  2132. for (; a3 <= l6; a3 += 4) {
  2133. const t6 = a3, s4 = o2[t6 + 0] + (o2[t6 + 1] << 8), r3 = o2[t6 + 2] + (o2[t6 + 3] << 8);
  2134. u3 = u3 + (s4 * n2 + (r3 * n2 << 16)) & 4294967295, u3 = u3 << 17 | u3 >>> 15, u3 = (65535 & u3) * e4 + ((u3 >>> 16) * e4 << 16) & 4294967295;
  2135. }
  2136. for (; a3 < o2.length; ++a3) {
  2137. u3 += o2[a3] * r2, u3 = u3 << 11 | u3 >>> 21, u3 = (65535 & u3) * t5 + ((u3 >>> 16) * t5 << 16) & 4294967295;
  2138. }
  2139. return u3 ^= u3 >>> 15, u3 = ((65535 & u3) * s2 & 4294967295) + ((u3 >>> 16) * s2 << 16), u3 ^= u3 >>> 13, u3 = ((65535 & u3) * n2 & 4294967295) + ((u3 >>> 16) * n2 << 16), u3 ^= u3 >>> 16, u3 < 0 ? u3 + 4294967296 : u3;
  2140. }
  2141. };
  2142. // node_modules/@arcgis/core/arcade/functions/string.js
  2143. function D3(t6, e5) {
  2144. if (!t6 || !e5)
  2145. return t6 === e5;
  2146. if (t6.x === e5.x && t6.y === e5.y) {
  2147. if (t6.hasZ) {
  2148. if (t6.z !== e5.z)
  2149. return false;
  2150. } else if (e5.hasZ)
  2151. return false;
  2152. if (t6.hasM) {
  2153. if (t6.m !== e5.m)
  2154. return false;
  2155. } else if (e5.hasM)
  2156. return false;
  2157. return true;
  2158. }
  2159. return false;
  2160. }
  2161. function W4(o2, i4, u3) {
  2162. if (null !== o2)
  2163. if (Y(o2)) {
  2164. if (i4.updateUint8Array([61]), u3.map.has(o2)) {
  2165. const t6 = u3.map.get(o2);
  2166. i4.updateIntArray([61237541 ^ t6]);
  2167. } else {
  2168. u3.map.set(o2, u3.currentLength++);
  2169. for (const t6 of o2)
  2170. W4(t6, i4, u3);
  2171. u3.map.delete(o2), u3.currentLength--;
  2172. }
  2173. i4.updateUint8Array([199]);
  2174. } else if (E(o2)) {
  2175. if (i4.updateUint8Array([61]), u3.map.has(o2)) {
  2176. const t6 = u3.map.get(o2);
  2177. i4.updateIntArray([61237541 ^ t6]);
  2178. } else {
  2179. u3.map.set(o2, u3.currentLength++);
  2180. for (const t6 of o2.toArray())
  2181. W4(t6, i4, u3);
  2182. u3.map.delete(o2), u3.currentLength--;
  2183. }
  2184. i4.updateUint8Array([199]);
  2185. } else {
  2186. if (z(o2))
  2187. return i4.updateIntArray([o2.getTime()]), void i4.updateUint8Array([241]);
  2188. if (w3(o2))
  2189. return i4.updateIntArray([o2.length]), i4.updateWithString(o2), void i4.updateUint8Array([41]);
  2190. if (_(o2))
  2191. i4.updateUint8Array([true === o2 ? 1 : 0, 113]);
  2192. else {
  2193. if (Z(o2))
  2194. return i4.updateFloatArray([o2]), void i4.updateUint8Array([173]);
  2195. if (o2 instanceof e2)
  2196. throw new t(u3.context, e.UnsupportedHashType, u3.node);
  2197. if (o2 instanceof t3)
  2198. throw new t(u3.context, e.UnsupportedHashType, u3.node);
  2199. if (!(o2 instanceof J2)) {
  2200. if (J(o2))
  2201. throw new t(u3.context, e.UnsupportedHashType, u3.node);
  2202. if (o2 instanceof w)
  2203. return i4.updateIntArray([3833836621]), i4.updateIntArray([0]), i4.updateFloatArray([o2.x]), i4.updateIntArray([1]), i4.updateFloatArray([o2.y]), o2.hasZ && (i4.updateIntArray([2]), i4.updateFloatArray([o2.z])), o2.hasM && (i4.updateIntArray([3]), i4.updateFloatArray([o2.m])), i4.updateIntArray([3765347959]), void W4(o2.spatialReference.wkid, i4, u3);
  2204. if (o2 instanceof v) {
  2205. i4.updateIntArray([1266616829]);
  2206. for (let t6 = 0; t6 < o2.rings.length; t6++) {
  2207. const e5 = o2.rings[t6], r3 = [];
  2208. let n3 = null, a3 = null;
  2209. for (let i5 = 0; i5 < e5.length; i5++) {
  2210. const u4 = o2.getPoint(t6, i5);
  2211. if (0 === i5)
  2212. n3 = u4;
  2213. else if (D3(a3, u4))
  2214. continue;
  2215. a3 = u4, i5 === e5.length - 1 && D3(n3, u4) || r3.push(u4);
  2216. }
  2217. i4.updateIntArray([1397116793, r3.length]);
  2218. for (let t7 = 0; t7 < r3.length; t7++) {
  2219. const e6 = r3[t7];
  2220. i4.updateIntArray([3962308117, t7]), W4(e6, i4, u3), i4.updateIntArray([2716288009]);
  2221. }
  2222. i4.updateIntArray([2278822459]);
  2223. }
  2224. return i4.updateIntArray([3878477243]), void W4(o2.spatialReference.wkid, i4, u3);
  2225. }
  2226. if (o2 instanceof m) {
  2227. i4.updateIntArray([4106883559]);
  2228. for (let t6 = 0; t6 < o2.paths.length; t6++) {
  2229. const e5 = o2.paths[t6];
  2230. i4.updateIntArray([1397116793, e5.length]);
  2231. for (let r3 = 0; r3 < e5.length; r3++)
  2232. i4.updateIntArray([3962308117, r3]), W4(o2.getPoint(t6, r3), i4, u3), i4.updateIntArray([2716288009]);
  2233. i4.updateIntArray([2278822459]);
  2234. }
  2235. return i4.updateIntArray([2568784753]), void W4(o2.spatialReference.wkid, i4, u3);
  2236. }
  2237. if (o2 instanceof u) {
  2238. i4.updateIntArray([588535921, o2.points.length]);
  2239. for (let t6 = 0; t6 < o2.points.length; t6++) {
  2240. const e5 = o2.getPoint(t6);
  2241. i4.updateIntArray([t6]), W4(e5, i4, u3);
  2242. }
  2243. return i4.updateIntArray([1700171621]), void W4(o2.spatialReference.wkid, i4, u3);
  2244. }
  2245. if (o2 instanceof w2)
  2246. return i4.updateIntArray([3483648373]), i4.updateIntArray([0]), i4.updateFloatArray([o2.xmax]), i4.updateIntArray([1]), i4.updateFloatArray([o2.xmin]), i4.updateIntArray([2]), i4.updateFloatArray([o2.ymax]), i4.updateIntArray([3]), i4.updateFloatArray([o2.ymin]), o2.hasZ && (i4.updateIntArray([4]), i4.updateFloatArray([o2.zmax]), i4.updateIntArray([5]), i4.updateFloatArray([o2.zmin])), o2.hasM && (i4.updateIntArray([6]), i4.updateFloatArray([o2.mmax]), i4.updateIntArray([7]), i4.updateFloatArray([o2.mmin])), i4.updateIntArray([3622027469]), void W4(o2.spatialReference.wkid, i4, u3);
  2247. if (o2 instanceof k)
  2248. return i4.updateIntArray([14]), void 0 !== o2.wkid && null !== o2.wkid && i4.updateIntArray([o2.wkid]), void (o2.wkt && i4.updateWithString(o2.wkt));
  2249. if (F(o2))
  2250. throw new t(u3.context, e.UnsupportedHashType, u3.node);
  2251. if (P2(o2))
  2252. throw new t(u3.context, e.UnsupportedHashType, u3.node);
  2253. if (G(o2))
  2254. throw new t(u3.context, e.UnsupportedHashType, u3.node);
  2255. if (o2 === k2)
  2256. throw new t(u3.context, e.UnsupportedHashType, u3.node);
  2257. throw new t(u3.context, e.UnsupportedHashType, u3.node);
  2258. }
  2259. if (i4.updateUint8Array([223]), u3.map.has(o2)) {
  2260. const t6 = u3.map.get(o2);
  2261. i4.updateIntArray([61237541 ^ t6]);
  2262. } else {
  2263. u3.map.set(o2, u3.currentLength++);
  2264. for (const t6 of o2.keys()) {
  2265. i4.updateIntArray([t6.length]), i4.updateWithString(t6), i4.updateUint8Array([251]);
  2266. W4(o2.field(t6), i4, u3), i4.updateUint8Array([239]);
  2267. }
  2268. u3.map.delete(o2), u3.currentLength--;
  2269. }
  2270. i4.updateUint8Array([73]);
  2271. }
  2272. }
  2273. else
  2274. i4.updateUint8Array([0, 139]);
  2275. }
  2276. function B2(e5, b2) {
  2277. e5.portal = function(e6, r3) {
  2278. return b2(e6, r3, (n3, a3, u3) => (V(u3, 1, 1, e6, r3), new t3(K(u3[0]))));
  2279. }, e5.typeof = function(t6, e6) {
  2280. return b2(t6, e6, (r3, i4, s4) => {
  2281. V(s4, 1, 1, t6, e6);
  2282. const p6 = O(s4[0]);
  2283. if ("Unrecognised Type" === p6)
  2284. throw new t(t6, e.UnrecognisedType, e6);
  2285. return p6;
  2286. });
  2287. }, e5.trim = function(t6, e6) {
  2288. return b2(t6, e6, (r3, n3, a3) => (V(a3, 1, 1, t6, e6), K(a3[0]).trim()));
  2289. }, e5.tohex = function(t6, e6) {
  2290. return b2(t6, e6, (r3, n3, a3) => {
  2291. V(a3, 1, 1, t6, e6);
  2292. const i4 = re(a3[0]);
  2293. return isNaN(i4) ? i4 : i4.toString(16);
  2294. });
  2295. }, e5.upper = function(t6, e6) {
  2296. return b2(t6, e6, (r3, n3, a3) => (V(a3, 1, 1, t6, e6), K(a3[0]).toUpperCase()));
  2297. }, e5.proper = function(t6, e6) {
  2298. return b2(t6, e6, (r3, n3, a3) => {
  2299. V(a3, 1, 2, t6, e6);
  2300. let u3 = 1;
  2301. 2 === a3.length && "firstword" === K(a3[1]).toLowerCase() && (u3 = 2);
  2302. const s4 = /\s/, p6 = K(a3[0]);
  2303. let d5 = "", c3 = true;
  2304. for (let t7 = 0; t7 < p6.length; t7++) {
  2305. let e7 = p6[t7];
  2306. if (s4.test(e7))
  2307. 1 === u3 && (c3 = true);
  2308. else {
  2309. e7.toUpperCase() !== e7.toLowerCase() && (c3 ? (e7 = e7.toUpperCase(), c3 = false) : e7 = e7.toLowerCase());
  2310. }
  2311. d5 += e7;
  2312. }
  2313. return d5;
  2314. });
  2315. }, e5.lower = function(t6, e6) {
  2316. return b2(t6, e6, (r3, n3, a3) => (V(a3, 1, 1, t6, e6), K(a3[0]).toLowerCase()));
  2317. }, e5.guid = function(t6, e6) {
  2318. return b2(t6, e6, (r3, n3, a3) => {
  2319. if (V(a3, 0, 1, t6, e6), a3.length > 0)
  2320. switch (K(a3[0]).toLowerCase()) {
  2321. case "digits":
  2322. return U().replace("-", "").replace("-", "").replace("-", "").replace("-", "");
  2323. case "digits-hyphen":
  2324. return U();
  2325. case "digits-hyphen-braces":
  2326. return "{" + U() + "}";
  2327. case "digits-hyphen-parentheses":
  2328. return "(" + U() + ")";
  2329. }
  2330. return "{" + U() + "}";
  2331. });
  2332. }, e5.standardizeguid = function(t6, e6) {
  2333. return b2(t6, e6, (r3, n3, a3) => {
  2334. V(a3, 2, 2, t6, e6);
  2335. let u3 = K(a3[0]);
  2336. if ("" === u3 || null === u3)
  2337. return "";
  2338. const s4 = /^(\{|\()?(?<partA>[0-9a-z]{8})(\-?)(?<partB>[0-9a-z]{4})(\-?)(?<partC>[0-9a-z]{4})(\-?)(?<partD>[0-9a-z]{4})(\-?)(?<partE>[0-9a-z]{12})(\}|\))?$/gim.exec(u3);
  2339. if (!s4)
  2340. return "";
  2341. const p6 = s4.groups;
  2342. switch (u3 = p6.partA + "-" + p6.partB + "-" + p6.partC + "-" + p6.partD + "-" + p6.partE, K(a3[1]).toLowerCase()) {
  2343. case "digits":
  2344. return u3.replace("-", "").replace("-", "").replace("-", "").replace("-", "");
  2345. case "digits-hyphen":
  2346. return u3;
  2347. case "digits-hyphen-braces":
  2348. return "{" + u3 + "}";
  2349. case "digits-hyphen-parentheses":
  2350. return "(" + u3 + ")";
  2351. }
  2352. return "{" + u3 + "}";
  2353. });
  2354. }, e5.console = function(t6, e6) {
  2355. return b2(t6, e6, (e7, r3, n3) => (0 === n3.length || (1 === n3.length ? t6.console(K(n3[0])) : t6.console(K(n3))), k2));
  2356. }, e5.mid = function(t6, e6) {
  2357. return b2(t6, e6, (r3, n3, a3) => {
  2358. V(a3, 2, 3, t6, e6);
  2359. let u3 = re(a3[1]);
  2360. if (isNaN(u3))
  2361. return "";
  2362. if (u3 < 0 && (u3 = 0), 2 === a3.length)
  2363. return K(a3[0]).substr(u3);
  2364. let p6 = re(a3[2]);
  2365. return isNaN(p6) ? "" : (p6 < 0 && (p6 = 0), K(a3[0]).substr(u3, p6));
  2366. });
  2367. }, e5.find = function(t6, e6) {
  2368. return b2(t6, e6, (r3, n3, a3) => {
  2369. V(a3, 2, 3, t6, e6);
  2370. let u3 = 0;
  2371. if (a3.length > 2) {
  2372. if (u3 = re(v3(a3[2], 0)), isNaN(u3))
  2373. return -1;
  2374. u3 < 0 && (u3 = 0);
  2375. }
  2376. return K(a3[1]).indexOf(K(a3[0]), u3);
  2377. });
  2378. }, e5.left = function(t6, e6) {
  2379. return b2(t6, e6, (r3, n3, a3) => {
  2380. V(a3, 2, 2, t6, e6);
  2381. let u3 = re(a3[1]);
  2382. return isNaN(u3) ? "" : (u3 < 0 && (u3 = 0), K(a3[0]).substr(0, u3));
  2383. });
  2384. }, e5.right = function(t6, e6) {
  2385. return b2(t6, e6, (r3, n3, a3) => {
  2386. V(a3, 2, 2, t6, e6);
  2387. let u3 = re(a3[1]);
  2388. return isNaN(u3) ? "" : (u3 < 0 && (u3 = 0), K(a3[0]).substr(-1 * u3, u3));
  2389. });
  2390. }, e5.split = function(t6, e6) {
  2391. return b2(t6, e6, (r3, n3, a3) => {
  2392. let u3;
  2393. V(a3, 2, 4, t6, e6);
  2394. let p6 = re(v3(a3[2], -1));
  2395. const d5 = le(v3(a3[3], false));
  2396. if (-1 === p6 || null === p6 || true === d5 ? u3 = K(a3[0]).split(K(a3[1])) : (isNaN(p6) && (p6 = -1), p6 < -1 && (p6 = -1), u3 = K(a3[0]).split(K(a3[1]), p6)), false === d5)
  2397. return u3;
  2398. const f2 = [];
  2399. for (let t7 = 0; t7 < u3.length && !(-1 !== p6 && f2.length >= p6); t7++)
  2400. "" !== u3[t7] && void 0 !== u3[t7] && f2.push(u3[t7]);
  2401. return f2;
  2402. });
  2403. }, e5.text = function(t6, e6) {
  2404. return b2(t6, e6, (r3, n3, a3) => (V(a3, 1, 2, t6, e6), te(a3[0], a3[1])));
  2405. }, e5.concatenate = function(t6, e6) {
  2406. return b2(t6, e6, (t7, e7, r3) => {
  2407. const n3 = [];
  2408. if (r3.length < 1)
  2409. return "";
  2410. if (Y(r3[0])) {
  2411. const t8 = v3(r3[2], "");
  2412. for (let e8 = 0; e8 < r3[0].length; e8++)
  2413. n3[e8] = te(r3[0][e8], t8);
  2414. return r3.length > 1 ? n3.join(r3[1]) : n3.join("");
  2415. }
  2416. if (E(r3[0])) {
  2417. const t8 = v3(r3[2], "");
  2418. for (let e8 = 0; e8 < r3[0].length(); e8++)
  2419. n3[e8] = te(r3[0].get(e8), t8);
  2420. return r3.length > 1 ? n3.join(r3[1]) : n3.join("");
  2421. }
  2422. for (let a3 = 0; a3 < r3.length; a3++)
  2423. n3[a3] = te(r3[a3]);
  2424. return n3.join("");
  2425. });
  2426. }, e5.reverse = function(t6, e6) {
  2427. return b2(t6, e6, (r3, i4, u3) => {
  2428. if (V(u3, 1, 1, t6, e6), Y(u3[0])) {
  2429. const t7 = u3[0].slice(0);
  2430. return t7.reverse(), t7;
  2431. }
  2432. if (E(u3[0])) {
  2433. const t7 = u3[0].toArray().slice(0);
  2434. return t7.reverse(), t7;
  2435. }
  2436. throw new t(t6, e.InvalidParameter, e6);
  2437. });
  2438. }, e5.replace = function(t6, e6) {
  2439. return b2(t6, e6, (r3, n3, a3) => {
  2440. V(a3, 3, 4, t6, e6);
  2441. const u3 = K(a3[0]), s4 = K(a3[1]), p6 = K(a3[2]);
  2442. return 4 !== a3.length || le(a3[3]) ? R(u3, s4, p6) : u3.replace(s4, p6);
  2443. });
  2444. }, e5.schema = function(t6, e6) {
  2445. return b2(t6, e6, (o2, i4, u3) => {
  2446. if (J(u3[0])) {
  2447. const t7 = Ie(u3[0]);
  2448. return t7 ? J2.convertObjectToArcadeDictionary(t7) : null;
  2449. }
  2450. throw new t(t6, e.InvalidParameter, e6);
  2451. });
  2452. }, e5.subtypes = function(t6, e6) {
  2453. return b2(t6, e6, (i4, u3, s4) => {
  2454. if (V(s4, 1, 1, t6, e6), J(s4[0])) {
  2455. const t7 = Re(s4[0]);
  2456. return t7 ? J2.convertObjectToArcadeDictionary(t7) : null;
  2457. }
  2458. throw new t(t6, e.InvalidParameter, e6);
  2459. });
  2460. }, e5.subtypecode = function(t6, e6) {
  2461. return b2(t6, e6, (r3, i4, u3) => {
  2462. if (V(u3, 1, 1, t6, e6), J(u3[0])) {
  2463. const t7 = Re(u3[0]);
  2464. if (!t7)
  2465. return null;
  2466. if (t7.subtypeField && u3[0].hasField(t7.subtypeField)) {
  2467. const e7 = u3[0].field(t7.subtypeField);
  2468. for (const r4 of t7.subtypes)
  2469. if (r4.code === e7)
  2470. return r4.code;
  2471. return null;
  2472. }
  2473. return null;
  2474. }
  2475. throw new t(t6, e.InvalidParameter, e6);
  2476. });
  2477. }, e5.subtypename = function(t6, e6) {
  2478. return b2(t6, e6, (r3, i4, u3) => {
  2479. if (V(u3, 1, 1, t6, e6), J(u3[0])) {
  2480. const t7 = Re(u3[0]);
  2481. if (!t7)
  2482. return "";
  2483. if (t7.subtypeField && u3[0].hasField(t7.subtypeField)) {
  2484. const e7 = u3[0].field(t7.subtypeField);
  2485. for (const r4 of t7.subtypes)
  2486. if (r4.code === e7)
  2487. return r4.name;
  2488. return "";
  2489. }
  2490. return "";
  2491. }
  2492. throw new t(t6, e.InvalidParameter, e6);
  2493. });
  2494. }, e5.gdbversion = function(t6, e6) {
  2495. return b2(t6, e6, (r3, i4, u3) => {
  2496. if (V(u3, 1, 1, t6, e6), J(u3[0]))
  2497. return u3[0].gdbVersion();
  2498. throw new t(t6, e.InvalidParameter, e6);
  2499. });
  2500. }, e5.domain = function(t6, e6) {
  2501. return b2(t6, e6, (u3, p6, d5) => {
  2502. if (V(d5, 2, 3, t6, e6), J(d5[0])) {
  2503. const t7 = Ae(d5[0], K(d5[1]), void 0 === d5[2] ? void 0 : re(d5[2]));
  2504. return t7 && t7.domain ? "coded-value" === t7.domain.type || "codedValue" === t7.domain.type ? J2.convertObjectToArcadeDictionary({ type: "codedValue", name: t7.domain.name, dataType: P[t7.field.type], codedValues: t7.domain.codedValues.map((t8) => ({ name: t8.name, code: t8.code })) }) : J2.convertObjectToArcadeDictionary({ type: "range", name: t7.domain.name, dataType: P[t7.field.type], min: t7.domain.min, max: t7.domain.max }) : null;
  2505. }
  2506. throw new t(t6, e.InvalidParameter, e6);
  2507. });
  2508. }, e5.domainname = function(t6, e6) {
  2509. return b2(t6, e6, (r3, u3, p6) => {
  2510. if (V(p6, 2, 4, t6, e6), J(p6[0]))
  2511. return Fe(p6[0], K(p6[1]), p6[2], void 0 === p6[3] ? void 0 : re(p6[3]));
  2512. throw new t(t6, e.InvalidParameter, e6);
  2513. });
  2514. }, e5.domaincode = function(t6, e6) {
  2515. return b2(t6, e6, (r3, u3, p6) => {
  2516. if (V(p6, 2, 4, t6, e6), J(p6[0]))
  2517. return Ce(p6[0], K(p6[1]), p6[2], void 0 === p6[3] ? void 0 : re(p6[3]));
  2518. throw new t(t6, e.InvalidParameter, e6);
  2519. });
  2520. }, e5.urlencode = function(t6, e6) {
  2521. return b2(t6, e6, (n3, a3, u3) => {
  2522. if (V(u3, 1, 1, t6, e6), null === u3[0])
  2523. return "";
  2524. if (u3[0] instanceof J2) {
  2525. let t7 = "";
  2526. for (const e7 of u3[0].keys()) {
  2527. const r3 = u3[0].field(e7);
  2528. "" !== t7 && (t7 += "&"), t7 += null === r3 ? encodeURIComponent(e7) + "=" : encodeURIComponent(e7) + "=" + encodeURIComponent(r3);
  2529. }
  2530. return t7;
  2531. }
  2532. return encodeURIComponent(K(u3[0]));
  2533. });
  2534. }, e5.hash = function(t6, e6) {
  2535. return b2(t6, e6, (r3, n3, a3) => {
  2536. V(a3, 1, 1, t6, e6);
  2537. const i4 = new i3(0);
  2538. return W4(a3[0], i4, { context: t6, node: e6, map: /* @__PURE__ */ new Map(), currentLength: 0 }), i4.digest();
  2539. });
  2540. }, e5.convertdirection = function(t6, e6) {
  2541. return b2(t6, e6, (r3, n3, a3) => (V(a3, 3, 3, t6, e6), ge(a3[0], a3[1], a3[2])));
  2542. }, e5.fromjson = function(t6, e6) {
  2543. return b2(t6, e6, (u3, s4, p6) => {
  2544. if (V(p6, 1, 1, t6, e6), false === w3(p6[0]))
  2545. throw new t(t6, e.InvalidParameter, e6);
  2546. return J2.convertJsonToArcade(JSON.parse(K(p6[0])));
  2547. });
  2548. }, e5.expects = function(t6, e6) {
  2549. return b2(t6, e6, (r3, o2, i4) => {
  2550. if (i4.length < 1)
  2551. throw new t(t6, e.WrongNumberOfParameters, e6);
  2552. return k2;
  2553. });
  2554. }, e5.tocharcode = function(t6, e6) {
  2555. return b2(t6, e6, (r3, u3, p6) => {
  2556. V(p6, 1, 2, t6, e6);
  2557. const d5 = re(v3(p6[1], 0)), l6 = K(p6[0]);
  2558. if (0 === l6.length && 1 === p6.length)
  2559. return null;
  2560. if (l6.length <= d5 || d5 < 0)
  2561. throw new t(t6, e.OutOfBounds, e6);
  2562. return l6.charCodeAt(d5);
  2563. });
  2564. }, e5.tocodepoint = function(t6, e6) {
  2565. return b2(t6, e6, (r3, u3, p6) => {
  2566. V(p6, 1, 2, t6, e6);
  2567. const d5 = re(v3(p6[1], 0)), l6 = K(p6[0]);
  2568. if (0 === l6.length && 1 === p6.length)
  2569. return null;
  2570. if (l6.length <= d5 || d5 < 0)
  2571. throw new t(t6, e.OutOfBounds, e6);
  2572. return l6.codePointAt(d5);
  2573. });
  2574. }, e5.fromcharcode = function(t6, e6) {
  2575. return b2(t6, e6, (r3, o2, i4) => {
  2576. if (i4.length < 1)
  2577. throw new t(t6, e.WrongNumberOfParameters, e6);
  2578. const u3 = i4.map((t7) => Math.trunc(re(t7))).filter((t7) => t7 >= 0 && t7 <= 65535);
  2579. return 0 === u3.length ? null : String.fromCharCode.apply(null, u3);
  2580. });
  2581. }, e5.fromcodepoint = function(t6, e6) {
  2582. return b2(t6, e6, (r3, o2, i4) => {
  2583. if (i4.length < 1)
  2584. throw new t(t6, e.WrongNumberOfParameters, e6);
  2585. let u3;
  2586. try {
  2587. u3 = i4.map((t7) => Math.trunc(re(t7))).filter((t7) => t7 <= 1114111 && t7 >>> 0 === t7);
  2588. } catch (p6) {
  2589. return null;
  2590. }
  2591. return 0 === u3.length ? null : String.fromCodePoint.apply(null, u3);
  2592. });
  2593. };
  2594. }
  2595. // node_modules/@arcgis/core/arcade/ArcadeModuleLoader.js
  2596. var s3 = class {
  2597. constructor(s4, t6) {
  2598. this._moduleSingletons = s4, this._syntaxModules = t6;
  2599. }
  2600. loadLibrary(s4) {
  2601. if (null == this._syntaxModules)
  2602. return null;
  2603. const t6 = this._syntaxModules[s4.toLowerCase()];
  2604. return t6 ? { syntax: t6.script, uri: t6.uri } : null;
  2605. }
  2606. };
  2607. export {
  2608. o,
  2609. c2 as c,
  2610. x,
  2611. p4 as p,
  2612. l3 as l,
  2613. u2 as u,
  2614. y,
  2615. d2 as d,
  2616. m3 as m,
  2617. M2 as M,
  2618. C2 as C,
  2619. W2 as W,
  2620. N2 as N,
  2621. f,
  2622. B2 as B,
  2623. s3 as s
  2624. };
  2625. //# sourceMappingURL=chunk-NS7TRIN4.js.map