dojo.js
978 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.6/esri/copyright.txt for details.
//>>built
(function(a,h){var n,e=function(){return"undefined"!==typeof u&&"function"!==typeof u?u:"undefined"!==typeof window?window:"undefined"!==typeof self?self:this}(),k=function(){},l=function(d){for(var m in d)return 0;return 1},q={}.toString,g=function(d){return"[object Function]"==q.call(d)},c=function(d){return"[object String]"==q.call(d)},b=function(d){return"[object Array]"==q.call(d)},f=function(d,m){if(d)for(var p=0;p<d.length;)m(d[p++])},r=function(d,m){for(var p in m)d[p]=m[p];return d},v=function(d,
m){return r(Error(d),{src:"dojoLoader",info:m})},x=1,w=function(){return"_"+x++},t=function(d,m,p){return qa(d,m,p,0,t)},u=e,p=u.document,d=p&&p.createElement("DiV"),m=t.has=function(m){return g(y[m])?y[m]=y[m](u,p,d):y[m]},y=m.cache=h.hasCache;g(a)&&(a=a(e));m.add=function(d,p,b,f){(void 0===y[d]||f)&&(y[d]=p);return b&&m(d)};m.add("host-webworker","undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope);m("host-webworker")&&(r(h.hasCache,{"host-browser":0,dom:0,"dojo-dom-ready-api":0,
"dojo-sniff":0,"dojo-inject-api":1,"host-webworker":1,"dojo-guarantee-console":0}),h.loaderPatch={injectUrl:function(d,m){try{importScripts(d),m()}catch(mb){console.info("failed to load resource ("+d+")"),console.error(mb)}}});for(var z in a.has)m.add(z,a.has[z],0,1);t.async=1;var A=m("csp-restrictions")?function(){}:new Function("return eval(arguments[0]);");t.eval=function(d,m){return A(d+"\r\n//# sourceURL\x3d"+m)};var C={},G=t.signal=function(d,m){d=C[d];f(d&&d.slice(0),function(d){d.apply(null,
b(m)?m:[m])})};z=t.on=function(d,m){var p=C[d]||(C[d]=[]);p.push(m);return{remove:function(){for(var d=0;d<p.length;d++)if(p[d]===m){p.splice(d,1);break}}}};var J=[],E={},K=[],R={},Z=t.map={},ba=[],F={},Y="",D={},S={},e={},L=0,M=function(d){var m,p,b,f;for(m in S)p=S[m],(b=m.match(/^url\:(.+)/))?D["url:"+Ya(b[1],d)]=p:"*now"==m?f=p:"*noref"!=m&&(b=Va(m,d,!0),D[b.mid]=D["url:"+b.url]=p);f&&f(wa(d));S={}},ca=function(d){return d.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(d){return"\\"+d})},N=function(d,
m){m.splice(0,m.length);for(var p in d)m.push([p,d[p],new RegExp("^"+ca(p)+"(/|$)"),p.length]);m.sort(function(d,m){return m[3]-d[3]});return m},U=function(d,m){f(d,function(d){m.push([c(d[0])?new RegExp("^"+ca(d[0])+"$"):d[0],d[1]])})},P=function(d){var m=d.name;m||(m=d,d={name:m});d=r({main:"main"},d);d.location=d.location?d.location:m;d.packageMap&&(Z[m]=d.packageMap);d.main.indexOf("./")||(d.main=d.main.substring(2));R[m]=d},ga=[],X=function(d,p,b){for(var a in d){"waitSeconds"==a&&(t.waitms=
1E3*(d[a]||0));"cacheBust"==a&&(Y=d[a]?c(d[a])?d[a]:(new Date).getTime()+"":"");if("baseUrl"==a||"combo"==a)t[a]=d[a];d[a]!==y&&(t.rawConfig[a]=d[a],"has"!=a&&m.add("config-"+a,d[a],0,p))}t.baseUrl||(t.baseUrl="./");/\/$/.test(t.baseUrl)||(t.baseUrl+="/");for(a in d.has)m.add(a,d.has[a],0,p);f(d.packages,P);for(var g in d.packagePaths)f(d.packagePaths[g],function(d){var m=g+"/"+d;c(d)&&(d={name:d});d.location=m;P(d)});N(r(Z,d.map),ba);f(ba,function(d){d[1]=N(d[1],[]);"*"==d[0]&&(ba.star=d)});N(r(E,
d.paths),K);U(d.aliases,J);if(p)ga.push({config:d.config});else for(a in d.config)p=Ga(a,b),p.config=r(p.config||{},d.config[a]);d.cache&&(M(),S=d.cache,d.cache["*noref"]&&M());G("config",[d,t.rawConfig])};if(m("dojo-cdn")){var T=p.getElementsByTagName("script");n=0;for(var V,da,ja,ka;n<T.length;)if(V=T[n++],(ja=V.getAttribute("src"))&&(ka=ja.match(/(((.*)\/)|^)dojo\.js(\W|$)/i))&&(da=ka[3]||"",h.baseUrl=h.baseUrl||da,L=V),ja=V.getAttribute("data-dojo-config")||V.getAttribute("djConfig"))e=t.eval("({ "+
ja+" })","data-dojo-config"),L=V}t.rawConfig={};X(h,1);m("dojo-cdn")&&((R.dojo.location=da)&&(da+="/"),R.dijit.location=da+"../dijit/",R.dojox.location=da+"../dojox/");X(a,1);X(e,1);var xa=function(d){B(function(){f(d.deps,I)})},qa=function(d,m,p,f,a){var g;if(c(d)){if((g=Ga(d,f,!0))&&g.executed)return g.result;throw v("undefinedModule",d);}b(d)||(X(d,0,f),d=m,m=p);if(b(d))if(d.length){p="require*"+w();for(var y,u=[],e=0;e<d.length;)y=d[e++],u.push(Ga(y,f));g=r(Ha("",p,0,""),{injected:2,deps:u,def:m||
k,require:f?f.require:t,gc:1});F[g.mid]=g;xa(g);var l=ma&&!0;B(function(){H(g,l)});g.executed||pa.push(g);ea()}else m&&m();return a},wa=function(d){if(!d)return t;var m=d.require;m||(m=function(p,b,f){return qa(p,b,f,d,m)},d.require=r(m,t),m.module=d,m.toUrl=function(m){return Ya(m,d)},m.toAbsMid=function(m){return Ea(m,d)});return m},pa=[],Ca=[],ta={},Ia=function(d){d.injected=1;ta[d.mid]=1;d.url&&(ta[d.url]=d.pack||1);vb()},ia=function(d){d.injected=2;delete ta[d.mid];d.url&&delete ta[d.url];l(ta)&&
Za()},La=t.idle=function(){return!Ca.length&&l(ta)&&!pa.length&&!ma},ua=function(d,m){if(m)for(var p=0;p<m.length;p++)if(m[p][2].test(d))return m[p];return 0},za=function(d){var m=[],p,b;for(d=d.replace(/\\/g,"/").split("/");d.length;)p=d.shift(),".."==p&&m.length&&".."!=b?(m.pop(),b=m[m.length-1]):"."!=p&&m.push(b=p);return m.join("/")},Ha=function(d,m,p,b){return{pid:d,mid:m,pack:p,url:b,executed:0,def:0}},hb=function(d,m,p,b,c,a,y,u,e){var r,l,t,k;k=/^\./.test(d);if(/(^\/)|(\:)|(\.js$)/.test(d)||
k&&!m)return Ha(0,d,0,d);d=za(k?m.mid+"/../"+d:d);if(/^\./.test(d))throw v("irrationalPath",d);m&&(t=ua(m.mid,a));(t=(t=t||a.star)&&ua(d,t[1]))&&(d=t[1]+d.substring(t[3]));m=(ka=d.match(/^([^\/]+)(\/(.+))?$/))?ka[1]:"";(r=p[m])?d=m+"/"+(l=ka[3]||r.main):m="";var w=0;f(u,function(m){var p=d.match(m[0]);p&&0<p.length&&(w=g(m[1])?d.replace(m[0],m[1]):m[1])});if(w)return hb(w,0,p,b,c,a,y,u,e);if(p=b[d])return e?Ha(p.pid,p.mid,p.pack,p.url):b[d];b=(t=ua(d,y))?t[1]+d.substring(t[3]):m?("/"===r.location.slice(-1)?
r.location.slice(0,-1):r.location)+"/"+l:d;/(^\/)|(\:)/.test(b)||(b=c+b);return Ha(m,d,r,za(b+".js"))},Va=function(d,m,p){return hb(d,m,R,F,t.baseUrl,p?[]:ba,p?[]:K,p?[]:J)},Ma=function(d,m,p){return d.normalize?d.normalize(m,function(d){return Ea(d,p)}):Ea(m,p)},Ka=0,Ga=function(d,m,p){var b,f;(b=d.match(/^(.+?)\!(.*)$/))?(f=Ga(b[1],m,p),5!==f.executed||f.load||Qa(f),f.load?(b=Ma(f,b[2],m),d=f.mid+"!"+(f.dynamic?++Ka+"!":"")+b):(b=b[2],d=f.mid+"!"+ ++Ka+"!waitingForPlugin"),d={plugin:f,mid:d,req:wa(m),
prid:b}):d=Va(d,m);return F[d.mid]||!p&&(F[d.mid]=d)},Ea=t.toAbsMid=function(d,m){return Va(d,m).mid},Ya=t.toUrl=function(d,m){m=Va(d+"/x",m);var p=m.url;return ha(0===m.pid?d:p.substring(0,p.length-5))},Ja={injected:2,executed:5,def:3,result:3};da=function(d){return F[d]=r({mid:d},Ja)};var Ra=da("require"),O=da("exports"),Fa=da("module"),va={},fa=0,Qa=function(d){var m=d.result;d.dynamic=m.dynamic;d.normalize=m.normalize;d.load=m.load;return d},Na=function(d){var m={};f(d.loadQ,function(p){var b=
Ma(d,p.prid,p.req.module),f=d.dynamic?p.mid.replace(/waitingForPlugin$/,b):d.mid+"!"+b,b=r(r({},p),{mid:f,prid:b,injected:0});F[f]&&F[f].injected||na(F[f]=b);m[p.mid]=F[f];ia(p);delete F[p.mid]});d.loadQ=0;var p=function(d){for(var p=d.deps||[],b=0;b<p.length;b++)(d=m[p[b].mid])&&(p[b]=d)},b;for(b in F)p(F[b]);f(pa,p)},la=function(d){t.trace("loader-finish-exec",[d.mid]);d.executed=5;d.defOrder=fa++;d.loadQ&&(Qa(d),Na(d));for(n=0;n<pa.length;)pa[n]===d?pa.splice(n,1):n++;/^require\*/.test(d.mid)&&
delete F[d.mid]},db=[],H=function(d,m){if(4===d.executed)return t.trace("loader-circular-dependency",[db.concat(d.mid).join("-\x3e")]),!d.def||m?va:d.cjs&&d.cjs.exports;if(!d.executed){if(!d.def)return va;var p=d.mid,b=d.deps||[],f,c=[],a=0;for(d.executed=4;f=b[a++];){f=f===Ra?wa(d):f===O?d.cjs.exports:f===Fa?d.cjs:H(f,m);if(f===va)return d.executed=0,t.trace("loader-exec-module",["abort",p]),va;c.push(f)}t.trace("loader-run-factory",[d.mid]);m=d.def;c=g(m)?m.apply(null,c):m;d.result=void 0===c&&
d.cjs?d.cjs.exports:c;la(d)}return d.result},ma=0,B=function(d){try{ma++,d()}catch(tb){throw tb;}finally{ma--}La()&&G("idle",[])},ea=function(){ma||B(function(){for(var d,m,p=0;p<pa.length;)d=fa,m=pa[p],H(m),d!=fa?p=0:p++})},ha="function"==typeof a.fixupUrl?a.fixupUrl:function(d){d+="";return d+(Y?(/\?/.test(d)?"\x26":"?")+Y:"")};void 0===m("dojo-loader-eval-hint-url")&&m.add("dojo-loader-eval-hint-url",1);var na=function(d){var m=d.plugin;5!==m.executed||m.load||Qa(m);var p=function(m){d.result=
m;ia(d);la(d);ea()};m.load?m.load(d.prid,d.req,p):m.loadQ?m.loadQ.push(d):(m.loadQ=[d],pa.unshift(m),I(m))},W=0,aa=function(d,p){m("config-stripStrict")&&(d=d.replace(/(["'])use strict\1/g,""));d===W?W.call(null):t.eval(d,m("dojo-loader-eval-hint-url")?p.url:p.mid)},I=function(d){var p=d.mid,b=d.url;if(!(d.executed||d.injected||ta[p]||d.url&&(d.pack&&ta[d.url]===d.pack||1==ta[d.url])))if(Ia(d),d.plugin)na(d);else{var f=function(){Oa(d);if(2!==d.injected){if(m("dojo-enforceDefine")){G("error",v("noDefine",
d));return}ia(d);r(d,Ja);t.trace("loader-define-nonmodule",[d.url])}ea()};(W=D[p]||D["url:"+d.url])?(t.trace("loader-inject",["cache",d.mid,b]),aa(W,d),f()):(t.trace("loader-inject",["script",d.mid,b]),t.injectUrl(ha(b),f,d))}},nb=function(d,m,p){t.trace("loader-define-module",[d.mid,m]);if(2===d.injected)return G("error",v("multipleDefine",d)),d;r(d,{deps:m,def:p,cjs:{id:d.mid,uri:d.url,exports:d.result={},setExports:function(m){d.cjs.exports=m},config:function(){return d.config}}});for(var b=0;m[b];b++)m[b]=
Ga(m[b],d);ia(d);g(p)||m.length||(d.result=p,la(d));return d},Oa=function(d,m){for(var p=[],b,c;Ca.length;)c=Ca.shift(),m&&(c[0]=m.shift()),b=c[0]&&Ga(c[0])||d,p.push([b,c[1],c[2]]);M(d);f(p,function(d){xa(nb.apply(null,d))})},Za=k,vb=k;m("dom");if(m("dom")){var Sa=function(d,m,p,b){d.addEventListener(m,b,!1);return function(){d.removeEventListener(m,b,!1)}},wb=Sa(window,"load","onload",function(){t.pageLoaded=1;try{"complete"!=p.readyState&&(p.readyState="complete")}catch(sb){}wb()}),T=p.getElementsByTagName("script");
for(n=0;!L;)/^dojo/.test((V=T[n++])&&V.type)||(L=V);t.injectUrl=function(d,m,b){b=b.node=p.createElement("script");var f=Sa(b,"load","onreadystatechange",function(d){d=d||window.event;var p=d.target||d.srcElement;if("load"===d.type||/complete|loaded/.test(p.readyState))f(),c(),m&&m()}),c=Sa(b,"error","onerror",function(m){f();c();G("error",v("scriptError",[d,m]))});b.type="text/javascript";b.charset="utf-8";b.src=d;L.parentNode.insertBefore(b,L);return b}}t.log=k;t.trace=k;V=function(d,m,p){var b=
arguments.length,f=["require","exports","module"],a=[0,d,m];1==b?a=[0,g(d)?f:[],d]:2==b&&c(d)?a=[d,g(m)?f:[],m]:3==b&&(a=[d,m,p]);t.trace("loader-define",a.slice(0,2));(b=a[0]&&Ga(a[0]))&&!ta[b.mid]?xa(nb(b,a[1],a[2])):Ca.push(a)};V.amd={vendor:"dojotoolkit.org"};r(r(t,h.loaderPatch),a.loaderPatch);z("error",function(d){try{if(console.error(d),d instanceof Error){for(var m in d)console.log(m+":",d[m]);console.log(".")}}catch(mb){}});r(t,{uid:w,cache:D,packs:R});u.define||(u.define=V,u.require=t,f(ga,
function(d){X(d)}),V=e.deps||a.deps||h.deps,a=e.callback||a.callback||h.callback,t.boot=V||a?[V||[],a]:0)})(function(a){return a.dojoConfig||a.djConfig||a.require||{}},{aliases:[[/^webgl-engine/,function(){return"esri/views/3d/webgl-engine"}],[/^engine/,function(){return"esri/views/3d/webgl-engine"}],[/^esri-hydra/,function(){return"esri"}]],async:1,baseUrl: (window.CONF_FRONT_SERVERURL || window.parent.CONF_FRONT_SERVERURL) + "/js/arcgis_js_api/dojo",hasCache:{"config-deferredInstrumentation":0,"config-selectorEngine":"lite","config-tlmSiblingOfDojo":1,
"dojo-built":1,"dojo-has-api":1,"dojo-loader":1,"dojo-undef-api":0,dom:1,"esri-featurelayer-webgl":0,"esri-promise-compatibility":0,"esri-promise-compatibility-deprecation-warnings":1,"host-browser":1},packages:[{location:".",name:"dojo"},{location:"../dijit",name:"dijit"},{location:"../dojox",name:"dojox"},{location:"../dgrid",main:"OnDemandGrid",name:"dgrid"},{location:"../dstore",main:"Store",name:"dstore"},{location:"../esri",name:"esri"},{location:"../moment",main:"moment",name:"moment"}]});
require({cache:{"dojo/domReady":function(){define(["./global","./has"],function(a,h){function n(b){c.push(b);g&&e()}function e(){if(!b){for(b=!0;c.length;)try{c.shift()(k)}catch(x){console.error(x,"in domReady callback",x.stack)}b=!1;n._onQEmpty()}}var k=document,l={loaded:1,complete:1},q="string"!=typeof k.readyState,g=!!l[k.readyState],c=[],b;n.load=function(b,f,c){n(c)};n._Q=c;n._onQEmpty=function(){};q&&(k.readyState="loading");if(!g){var f=[],r=function(b){b=b||a.event;g||"readystatechange"==
b.type&&!l[k.readyState]||(q&&(k.readyState="complete"),g=1,e())};h=function(b,f){b.addEventListener(f,r,!1);c.push(function(){b.removeEventListener(f,r,!1)})};h(k,"DOMContentLoaded");h(a,"load");"onreadystatechange"in k?h(k,"readystatechange"):q||f.push(function(){return l[k.readyState]});if(f.length){var v=function(){if(!g){for(var b=f.length;b--;)if(f[b]()){r("poller");return}setTimeout(v,30)}};v()}}return n})},"dojo/global":function(){define(function(){return"undefined"!==typeof global&&"function"!==
typeof global?global:"undefined"!==typeof window?window:"undefined"!==typeof self?self:this})},"dojo/has":function(){define(["./global","require","module"],function(a,h,n){var e=h.has||function(){};if(!e("dojo-has-api")){var k=(h="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location==location&&window.document==document)&&document,l=k&&k.createElement("DiV"),q=n.config&&n.config()||{},e=function(g){return"function"==typeof q[g]?q[g]=q[g](a,k,l):q[g]};
e.cache=q;e.add=function(a,c,b,f){("undefined"==typeof q[a]||f)&&(q[a]=c);return b&&e(a)};e.add("host-browser",h);e.add("dom",h)}e("host-browser")&&(e.add("touch","ontouchstart"in document||"onpointerdown"in document&&0<navigator.maxTouchPoints||window.navigator.msMaxTouchPoints),e.add("touch-events","ontouchstart"in document),e.add("device-width",screen.availWidth||innerWidth),n=document.createElement("form"),e.add("dom-attributes-specified-flag",0<n.attributes.length&&40>n.attributes.length));e.clearElement=
function(a){a.innerHTML="";return a};e.normalize=function(a,c){var b=a.match(/[\?:]|[^:\?]*/g),f=0,g=function(c){var a=b[f++];if(":"==a)return 0;if("?"==b[f++]){if(!c&&e(a))return g();g(!0);return g(c)}return a||0};return(a=g())&&c(a)};e.load=function(a,c,b){a?c([a],b):b()};return e})},"dojo/_base/browser":function(){require.has&&require.has.add("config-selectorEngine","acme");define("../ready ./kernel ./connect ./unload ./window ./event ./html ./NodeList ../query ./xhr ./fx".split(" "),function(a){return a})},
"dojo/ready":function(){define(["./_base/kernel","./has","require","./has!host-browser?./domReady","./_base/lang"],function(a,h,n,e,k){var l=0,q=[],g=0;h=function(){l=1;a._postLoad=a.config.afterOnLoad=!0;c()};var c=function(){if(!g){for(g=1;l&&(!e||0==e._Q.length)&&(n.idle?n.idle():1)&&q.length;){var b=q.shift();try{b()}catch(v){if(v.info=v.message,n.signal)n.signal("error",v);else throw v;}}g=0}};n.on&&n.on("idle",c);e&&(e._onQEmpty=c);var b=a.ready=a.addOnLoad=function(b,f,g){var e=k._toArray(arguments);
"number"!=typeof b?(g=f,f=b,b=1E3):e.shift();g=g?k.hitch.apply(a,e):function(){f()};g.priority=b;for(e=0;e<q.length&&b>=q[e].priority;e++);q.splice(e,0,g);c()},f=a.config.addOnLoad;if(f)b[k.isArray(f)?"apply":"call"](a,f);e?e(h):h();return b})},"dojo/_base/kernel":function(){define(["../global","../has","./config","require","module"],function(a,h,n,e,k){var l,q={},g={},c={config:n,global:a,dijit:q,dojox:g},q={dojo:["dojo",c],dijit:["dijit",q],dojox:["dojox",g]};k=e.map&&e.map[k.id.match(/[^\/]+/)[0]];
for(l in k)q[l]?q[l][0]=k[l]:q[l]=[k[l],{}];for(l in q)k=q[l],k[1]._scopeName=k[0],n.noGlobals||(a[k[0]]=k[1]);c.scopeMap=q;c.baseUrl=c.config.baseUrl=e.baseUrl;c.isAsync=e.async;c.locale=n.locale;a="$Rev: aaa6750 $".match(/[0-9a-f]{7,}/);c.version={major:1,minor:13,patch:0,flag:"",revision:a?a[0]:NaN,toString:function(){var b=c.version;return b.major+"."+b.minor+"."+b.patch+b.flag+" ("+b.revision+")"}};h("csp-restrictions")||Function("d","d.eval \x3d function(){return d.global.eval ? d.global.eval(arguments[0]) : eval(arguments[0]);}")(c);
c.exit=function(){};h("host-webworker");"undefined"!=typeof console||(console={});a="assert count debug dir dirxml error group groupEnd info profile profileEnd time timeEnd trace warn log".split(" ");var b;for(h=0;b=a[h++];)console[b]?console[b]=Function.prototype.bind.call(console[b],console):function(){var f=b+"";console[f]="log"in console?function(){var b=Array.prototype.slice.call(arguments);b.unshift(f+":");console.log(b.join(" "))}:function(){};console[f]._fake=!0}();c.deprecated=c.experimental=
function(){};c._hasResource={};return c})},"dojo/_base/config":function(){define(["../global","../has","require"],function(a,h,n){a={};n=n.rawConfig;for(var e in n)a[e]=n[e];!a.locale&&"undefined"!=typeof navigator&&(e=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language||navigator.userLanguage)&&(a.locale=e.toLowerCase());return a})},"dojo/_base/lang":function(){define(["./kernel","../has","../sniff"],function(a,h){var n=function(g,c,b){b||(b=g[0]&&a.scopeMap[g[0]]?
a.scopeMap[g.shift()][1]:a.global);try{for(var f=0;f<g.length;f++){var e=g[f];if(!(e in b))if(c)b[e]={};else return;b=b[e]}return b}catch(v){}},e=Object.prototype.toString,k=function(a,c,b){return(b||[]).concat(Array.prototype.slice.call(a,c||0))},l=/\{([^\}]+)\}/g,q={_extraNames:[],_mixin:function(a,c,b){var f,g,e={};for(f in c)g=c[f],f in a&&(a[f]===g||f in e&&e[f]===g)||(a[f]=b?b(g):g);return a},mixin:function(a,c){a||(a={});for(var b=1,f=arguments.length;b<f;b++)q._mixin(a,arguments[b]);return a},
setObject:function(a,c,b){var f=a.split(".");a=f.pop();return(b=n(f,!0,b))&&a?b[a]=c:void 0},getObject:function(a,c,b){return a?n(a.split("."),c,b):b},exists:function(a,c){return void 0!==q.getObject(a,!1,c)},isString:function(a){return"string"==typeof a||a instanceof String},isArray:Array.isArray||function(a){return"[object Array]"==e.call(a)},isFunction:function(a){return"[object Function]"===e.call(a)},isObject:function(a){return void 0!==a&&(null===a||"object"==typeof a||q.isArray(a)||q.isFunction(a))},
isArrayLike:function(a){return!!a&&!q.isString(a)&&!q.isFunction(a)&&!(a.tagName&&"form"==a.tagName.toLowerCase())&&(q.isArray(a)||isFinite(a.length))},isAlien:function(a){return a&&!q.isFunction(a)&&/\{\s*\[native code\]\s*\}/.test(String(a))},extend:function(a,c){for(var b=1,f=arguments.length;b<f;b++)q._mixin(a.prototype,arguments[b]);return a},_hitchArgs:function(g,c){var b=q._toArray(arguments,2),f=q.isString(c);return function(){var e=q._toArray(arguments),l=f?(g||a.global)[c]:c;return l&&l.apply(g||
this,b.concat(e))}},hitch:function(g,c){if(2<arguments.length)return q._hitchArgs.apply(a,arguments);c||(c=g,g=null);if(q.isString(c)){g=g||a.global;if(!g[c])throw['lang.hitch: scope["',c,'"] is null (scope\x3d"',g,'")'].join("");return function(){return g[c].apply(g,arguments||[])}}return g?function(){return c.apply(g,arguments||[])}:c},delegate:function(){function a(){}return function(c,b){a.prototype=c;c=new a;a.prototype=null;b&&q._mixin(c,b);return c}}(),_toArray:h("ie")?function(){function a(c,
b,f){f=f||[];for(b=b||0;b<c.length;b++)f.push(c[b]);return f}return function(c){return(c.item?a:k).apply(this,arguments)}}():k,partial:function(g){return q.hitch.apply(a,[null].concat(q._toArray(arguments)))},clone:function(a){if(!a||"object"!=typeof a||q.isFunction(a))return a;if(a.nodeType&&"cloneNode"in a)return a.cloneNode(!0);if(a instanceof Date)return new Date(a.getTime());if(a instanceof RegExp)return new RegExp(a);var c,b,f;if(q.isArray(a))for(c=[],b=0,f=a.length;b<f;++b)b in a&&(c[b]=q.clone(a[b]));
else c=a.constructor?new a.constructor:{};return q._mixin(c,a,q.clone)},trim:String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},replace:function(a,c,b){return a.replace(b||l,q.isFunction(c)?c:function(b,a){return q.getObject(a,!1,c)})}};q.mixin(a,q);return q})},"dojo/sniff":function(){define(["./has"],function(a){if(a("host-browser")){var h=navigator,n=h.userAgent,h=h.appVersion,e=parseFloat(h);a.add("webkit",void 0);a.add("chrome",void 0);
a.add("safari",(0<=h.indexOf("Safari")&&a("chrome"),void 0));if(n.match(/(iPhone|iPod|iPad)/)){var k=RegExp.$1.replace(/P/,"p"),l=n.match(/OS ([\d_]+)/)?RegExp.$1:"1",l=parseFloat(l.replace(/_/,".").replace(/_/g,""));a.add(k,l);a.add("ios",l)}a("webkit")||(0<=n.indexOf("Opera")&&a.add("opera",9.8<=e?parseFloat(n.split("Version/")[1])||e:e),n.indexOf("Gecko"),document.all&&!a("opera")&&(n=parseFloat(h.split("MSIE ")[1])||void 0,(h=document.documentMode)&&5!=h&&Math.floor(n)!=h&&(n=h),a.add("ie",n)))}return a})},
"dojo/_base/connect":function(){define("./kernel ../on ../topic ../aspect ./event ../mouse ./sniff ./lang ../keys".split(" "),function(a,h,n,e,k,l,q,g){function c(b,f,c,p,d){p=g.hitch(c,p);if(!b||!b.addEventListener&&!b.attachEvent)return e.after(b||a.global,f,p,!0);"string"==typeof f&&"on"==f.substring(0,2)&&(f=f.substring(2));b||(b=a.global);if(!d)switch(f){case "keypress":f=v;break;case "mouseenter":f=l.enter;break;case "mouseleave":f=l.leave}return h(b,f,p,d)}function b(b){b.keyChar=b.charCode?
String.fromCharCode(b.charCode):"";b.charOrCode=b.keyChar||b.keyCode}q.add("events-keypress-typed",function(){var b={charCode:0};try{b=document.createEvent("KeyboardEvent"),(b.initKeyboardEvent||b.initKeyEvent).call(b,"keypress",!0,!0,null,!1,!1,!1,!1,9,3)}catch(t){}return 0==b.charCode&&!q("opera")});var f={106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,229:113},r=function(f,c){c=g.mixin({},f,c);b(c);c.preventDefault=function(){f.preventDefault()};c.stopPropagation=
function(){f.stopPropagation()};return c},v;v=q("events-keypress-typed")?function(b,c){var a=h(b,"keydown",function(d){var m=d.keyCode,p=13!=m&&32!=m&&(27!=m||!q("ie"))&&(48>m||90<m)&&(96>m||111<m)&&(186>m||192<m)&&(219>m||222<m)&&229!=m;if(p||d.ctrlKey){p=p?0:m;if(d.ctrlKey){if(3==m||13==m)return c.call(d.currentTarget,d);p=95<p&&106>p?p-48:!d.shiftKey&&65<=p&&90>=p?p+32:f[p]||p}m=r(d,{type:"keypress",faux:!0,charCode:p});c.call(d.currentTarget,m);if(q("ie"))try{d.keyCode=m.keyCode}catch(z){}}}),
p=h(b,"keypress",function(d){var m=d.charCode;d=r(d,{charCode:32<=m?m:0,faux:!0});return c.call(this,d)});return{remove:function(){a.remove();p.remove()}}}:q("opera")?function(b,f){return h(b,"keypress",function(b){var p=b.which;3==p&&(p=99);p=32>p&&!b.shiftKey?0:p;b.ctrlKey&&!b.shiftKey&&65<=p&&90>=p&&(p+=32);return f.call(this,r(b,{charCode:p}))})}:function(f,c){return h(f,"keypress",function(f){b(f);return c.call(this,f)})};var x={_keypress:v,connect:function(b,f,a,p,d){var m=arguments,y=[],g=
0;y.push("string"==typeof m[0]?null:m[g++],m[g++]);var e=m[g+1];y.push("string"==typeof e||"function"==typeof e?m[g++]:null,m[g++]);for(e=m.length;g<e;g++)y.push(m[g]);return c.apply(this,y)},disconnect:function(b){b&&b.remove()},subscribe:function(b,f,c){return n.subscribe(b,g.hitch(f,c))},publish:function(b,f){return n.publish.apply(n,[b].concat(f))},connectPublisher:function(b,f,c){var p=function(){x.publish(b,arguments)};return c?x.connect(f,c,p):x.connect(f,p)},isCopyKey:function(b){return b.metaKey}};
x.unsubscribe=x.disconnect;g.mixin(a,x);return x})},"dojo/on":function(){define(["require","./_base/kernel","./sniff"],function(a,h,n){function e(b,c,a,e,p){if(e=c.match(/(.*):(.*)/))return c=e[2],e=e[1],q.selector(e,c).call(p,b,a);n("touch")&&g.test(c)&&(a=v(a));if(b.addEventListener){var d=c in f,m=d?f[c]:c;b.addEventListener(m,a,d);return{remove:function(){b.removeEventListener(m,a,d)}}}throw Error("Target must be an event emitter");}function k(){this.cancelable=!1;this.defaultPrevented=!0}function l(){this.bubbles=
!1}n("dom")&&n("touch");var q=function(b,f,c,a){return"function"!=typeof b.on||"function"==typeof f||b.nodeType?q.parse(b,f,c,e,a,this):b.on(f,c)};q.pausable=function(b,f,c,a){var p;b=q(b,f,function(){if(!p)return c.apply(this,arguments)},a);b.pause=function(){p=!0};b.resume=function(){p=!1};return b};q.once=function(b,f,c,a){var p=q(b,f,function(){p.remove();return c.apply(this,arguments)});return p};q.parse=function(b,f,c,a,p,d){var m;if(f.call)return f.call(d,b,c);f instanceof Array?m=f:-1<f.indexOf(",")&&
(m=f.split(/\s*,\s*/));if(m){var y=[];f=0;for(var g;g=m[f++];)y.push(q.parse(b,g,c,a,p,d));y.remove=function(){for(var d=0;d<y.length;d++)y[d].remove()};return y}return a(b,f,c,p,d)};var g=/^touch/;q.matches=function(b,f,c,a,p){p=p&&"function"==typeof p.matches?p:h.query;a=!1!==a;1!=b.nodeType&&(b=b.parentNode);for(;!p.matches(b,f,c);)if(b==c||!1===a||!(b=b.parentNode)||1!=b.nodeType)return!1;return b};q.selector=function(b,f,c){return function(a,p){function d(d){return q.matches(d,b,a,c,m)}var m=
"function"==typeof b?{matches:b}:this,y=f.bubble;return y?q(a,y(d),p):q(a,f,function(m){var b=d(m.target);if(b)return m.selectorTarget=b,p.call(b,m)})}};var c=[].slice,b=q.emit=function(b,f,a){var g=c.call(arguments,2),p="on"+f;if("parentNode"in b){var d=g[0]={},m;for(m in a)d[m]=a[m];d.preventDefault=k;d.stopPropagation=l;d.target=b;d.type=f;a=d}do b[p]&&b[p].apply(b,g);while(a&&a.bubbles&&(b=b.parentNode));return a&&a.cancelable&&a},f={};q.emit=function(f,c,a){if(f.dispatchEvent&&document.createEvent){var g=
(f.ownerDocument||document).createEvent("HTMLEvents");g.initEvent(c,!!a.bubbles,!!a.cancelable);for(var p in a)p in g||(g[p]=a[p]);return f.dispatchEvent(g)&&g}return b.apply(q,arguments)};if(n("touch"))var r=window.orientation,v=function(b){return function(f){var c=f.corrected;if(!c){var a=f.type;try{delete f.type}catch(m){}if(f.type){var c={},p;for(p in f)c[p]=f[p];c.preventDefault=function(){f.preventDefault()};c.stopPropagation=function(){f.stopPropagation()}}else c=f,c.type=a;f.corrected=c;if("resize"==
a){if(r==window.orientation)return null;r=window.orientation;c.type="orientationchange";return b.call(this,c)}"rotation"in c||(c.rotation=0,c.scale=1);if(window.TouchEvent&&f instanceof TouchEvent){var a=c.changedTouches[0],d;for(d in a)delete c[d],c[d]=a[d]}}return b.call(this,c)}};return q})},"dojo/topic":function(){define(["./Evented"],function(a){var h=new a;return{publish:function(a,e){return h.emit.apply(h,arguments)},subscribe:function(a,e){return h.on.apply(h,arguments)}}})},"dojo/Evented":function(){define(["./aspect",
"./on"],function(a,h){function n(){}var e=a.after;n.prototype={on:function(a,l){return h.parse(this,a,l,function(a,g){return e(a,"on"+g,l,!0)})},emit:function(a,e){var l=[this];l.push.apply(l,arguments);return h.emit.apply(h,l)}};return n})},"dojo/aspect":function(){define([],function(){function a(a,g,c,b){var f=a[g],e="around"==g,l;if(e){var k=c(function(){return f.advice(this,arguments)});l={remove:function(){k&&(k=a=c=null)},advice:function(b,c){return k?k.apply(b,c):f.advice(b,c)}}}else l={remove:function(){if(l.advice){var b=
l.previous,f=l.next;f||b?(b?b.next=f:a[g]=f,f&&(f.previous=b)):delete a[g];a=c=l.advice=null}},id:a.nextId++,advice:c,receiveArguments:b};if(f&&!e)if("after"==g){for(;f.next&&(f=f.next););f.next=l;l.previous=f}else"before"==g&&(a[g]=l,l.next=f,f.previous=l);else a[g]=l;return l}function h(e){return function(g,c,b,f){var l=g[c],k;l&&l.target==g||(g[c]=k=function(){for(var b=k.nextId,f=arguments,c=k.before;c;)c.advice&&(f=c.advice.apply(this,f)||f),c=c.next;if(k.around)var a=k.around.advice(this,f);
for(c=k.after;c&&c.id<b;){if(c.advice)if(c.receiveArguments)var p=c.advice.apply(this,f),a=p===n?a:p;else a=c.advice.call(this,a,f);c=c.next}return a},l&&(k.around={advice:function(b,f){return l.apply(b,f)}}),k.target=g,k.nextId=k.nextId||0);g=a(k||l,e,b,f);b=null;return g}}var n,e=h("after"),k=h("before"),l=h("around");return{before:k,around:l,after:e}})},"dojo/_base/event":function(){define(["./kernel","../on","../has","../dom-geometry"],function(a,h,n,e){if(h._fixEvent){var k=h._fixEvent;h._fixEvent=
function(a,q){(a=k(a,q))&&e.normalizeEvent(a);return a}}n={fix:function(a,e){return h._fixEvent?h._fixEvent(a,e):a},stop:function(a){a.preventDefault();a.stopPropagation()}};a.fixEvent=n.fix;a.stopEvent=n.stop;return n})},"dojo/dom-geometry":function(){define(["./sniff","./_base/window","./dom","./dom-style"],function(a,h,n,e){function k(b,f,c,a,g,e){e=e||"px";b=b.style;isNaN(f)||(b.left=f+e);isNaN(c)||(b.top=c+e);0<=a&&(b.width=a+e);0<=g&&(b.height=g+e)}function l(b){return"button"==b.tagName.toLowerCase()||
"input"==b.tagName.toLowerCase()&&"button"==(b.getAttribute("type")||"").toLowerCase()}function q(b){return"border-box"==g.boxModel||"table"==b.tagName.toLowerCase()||l(b)}var g={boxModel:"content-box"};a("ie")&&(g.boxModel="BackCompat"==document.compatMode?"border-box":"content-box");g.getPadExtents=function(b,f){b=n.byId(b);var c=f||e.getComputedStyle(b),a=e.toPixelValue;f=a(b,c.paddingLeft);var g=a(b,c.paddingTop),l=a(b,c.paddingRight);b=a(b,c.paddingBottom);return{l:f,t:g,r:l,b:b,w:f+l,h:g+b}};
g.getBorderExtents=function(b,f){b=n.byId(b);var c=e.toPixelValue,a=f||e.getComputedStyle(b);f="none"!=a.borderLeftStyle?c(b,a.borderLeftWidth):0;var g="none"!=a.borderTopStyle?c(b,a.borderTopWidth):0,l="none"!=a.borderRightStyle?c(b,a.borderRightWidth):0;b="none"!=a.borderBottomStyle?c(b,a.borderBottomWidth):0;return{l:f,t:g,r:l,b:b,w:f+l,h:g+b}};g.getPadBorderExtents=function(b,f){b=n.byId(b);var c=f||e.getComputedStyle(b);f=g.getPadExtents(b,c);b=g.getBorderExtents(b,c);return{l:f.l+b.l,t:f.t+
b.t,r:f.r+b.r,b:f.b+b.b,w:f.w+b.w,h:f.h+b.h}};g.getMarginExtents=function(b,f){b=n.byId(b);var c=f||e.getComputedStyle(b),a=e.toPixelValue;f=a(b,c.marginLeft);var g=a(b,c.marginTop),l=a(b,c.marginRight);b=a(b,c.marginBottom);return{l:f,t:g,r:l,b:b,w:f+l,h:g+b}};g.getMarginBox=function(b,f){b=n.byId(b);f=f||e.getComputedStyle(b);f=g.getMarginExtents(b,f);var c=b.offsetLeft-f.l,l=b.offsetTop-f.t,k=b.parentNode,w=e.toPixelValue;8==a("ie")&&k&&(k=e.getComputedStyle(k),c-="none"!=k.borderLeftStyle?w(b,
k.borderLeftWidth):0,l-="none"!=k.borderTopStyle?w(b,k.borderTopWidth):0);return{l:c,t:l,w:b.offsetWidth+f.w,h:b.offsetHeight+f.h}};g.getContentBox=function(b,f){b=n.byId(b);var c=f||e.getComputedStyle(b);f=b.clientWidth;var l,k=g.getPadExtents(b,c);l=g.getBorderExtents(b,c);var c=b.offsetLeft+k.l+l.l,w=b.offsetTop+k.t+l.t;f?l=b.clientHeight:(f=b.offsetWidth-l.w,l=b.offsetHeight-l.h);if(8==a("ie")){var t=b.parentNode,u=e.toPixelValue;t&&(t=e.getComputedStyle(t),c-="none"!=t.borderLeftStyle?u(b,t.borderLeftWidth):
0,w-="none"!=t.borderTopStyle?u(b,t.borderTopWidth):0)}return{l:c,t:w,w:f-k.w,h:l-k.h}};g.setContentSize=function(b,f,c){b=n.byId(b);var a=f.w;f=f.h;q(b)&&(c=g.getPadBorderExtents(b,c),0<=a&&(a+=c.w),0<=f&&(f+=c.h));k(b,NaN,NaN,a,f)};var c={l:0,t:0,w:0,h:0};g.setMarginBox=function(b,f,r){b=n.byId(b);var v=r||e.getComputedStyle(b);r=f.w;var x=f.h,w=q(b)?c:g.getPadBorderExtents(b,v),v=g.getMarginExtents(b,v);if(a("webkit")&&l(b)){var t=b.style;0<=r&&!t.width&&(t.width="4px");0<=x&&!t.height&&(t.height=
"4px")}0<=r&&(r=Math.max(r-w.w-v.w,0));0<=x&&(x=Math.max(x-w.h-v.h,0));k(b,f.l,f.t,r,x)};g.isBodyLtr=function(b){b=b||h.doc;return"ltr"==(h.body(b).dir||b.documentElement.dir||"ltr").toLowerCase()};g.docScroll=function(b){b=b||h.doc;var f=h.doc.parentWindow||h.doc.defaultView;return"pageXOffset"in f?{x:f.pageXOffset,y:f.pageYOffset}:(f=b.documentElement)&&{x:g.fixIeBiDiScrollLeft(f.scrollLeft||0,b),y:f.scrollTop||0}};g.getIeDocumentElementOffset=function(b){return{x:0,y:0}};g.fixIeBiDiScrollLeft=
function(b,f){f=f||h.doc;var c=a("ie");if(c&&!g.isBodyLtr(f)){f=f.documentElement;var e=h.global;6==c&&e.frameElement&&f.scrollHeight>f.clientHeight&&(b+=f.clientLeft);return 8>c?b+f.clientWidth-f.scrollWidth:-b}return b};g.position=function(b,f){b=n.byId(b);h.body(b.ownerDocument);var c=b.getBoundingClientRect(),c={x:c.left,y:c.top,w:c.right-c.left,h:c.bottom-c.top};9>a("ie")&&(c.x-=0,c.y-=0);f&&(b=g.docScroll(b.ownerDocument),c.x+=b.x,c.y+=b.y);return c};g.getMarginSize=function(b,c){b=n.byId(b);
c=g.getMarginExtents(b,c||e.getComputedStyle(b));b=b.getBoundingClientRect();return{w:b.right-b.left+c.w,h:b.bottom-b.top+c.h}};g.normalizeEvent=function(b){"layerX"in b||(b.layerX=b.offsetX,b.layerY=b.offsetY);if(!("pageX"in b)){var c=b.target,c=c&&c.ownerDocument||document,a=c.documentElement;b.pageX=b.clientX+g.fixIeBiDiScrollLeft(a.scrollLeft||0,c);b.pageY=b.clientY+(a.scrollTop||0)}};return g})},"dojo/_base/window":function(){define(["./kernel","./lang","../sniff"],function(a,h,n){var e={global:a.global,
doc:a.global.document||null,body:function(e){e=e||a.doc;return e.body||e.getElementsByTagName("body")[0]},setContext:function(k,l){a.global=e.global=k;a.doc=e.doc=l},withGlobal:function(k,l,q,g){var c=a.global;try{return a.global=e.global=k,e.withDoc.call(null,k.document,l,q,g)}finally{a.global=e.global=c}},withDoc:function(k,l,q,g){var c=e.doc,b=n("ie"),f,r,v;try{return a.doc=e.doc=k,a.isQuirks=0,n("ie")&&(v=k.parentWindow)&&v.navigator&&(f=parseFloat(v.navigator.appVersion.split("MSIE ")[1])||void 0,
(r=k.documentMode)&&5!=r&&Math.floor(f)!=r&&(f=r),a.isIE=n.add("ie",f,!0,!0)),q&&"string"==typeof l&&(l=q[l]),l.apply(q,g||[])}finally{a.doc=e.doc=c,a.isQuirks=0,a.isIE=n.add("ie",b,!0,!0)}}};h.mixin(a,e);return e})},"dojo/dom":function(){define(["./sniff","./_base/window","./_base/kernel"],function(a,h,n){if(7>=a("ie"))try{document.execCommand("BackgroundImageCache",!1,!0)}catch(l){}var e={};a("ie")?e.byId=function(a,e){if("string"!=typeof a)return a;var g=e||h.doc;e=a&&g.getElementById(a);if(!e||
e.attributes.id.value!=a&&e.id!=a){g=g.all[a];if(!g||g.nodeName)g=[g];for(var c=0;e=g[c++];)if(e.attributes&&e.attributes.id&&e.attributes.id.value==a||e.id==a)return e}else return e}:e.byId=function(a,e){return("string"==typeof a?(e||h.doc).getElementById(a):a)||null};n=n.global.document||null;a.add("dom-contains",!(!n||!n.contains));e.isDescendant=a("dom-contains")?function(a,k){return!(!(k=e.byId(k))||!k.contains(e.byId(a)))}:function(a,k){try{for(a=e.byId(a),k=e.byId(k);a;){if(a==k)return!0;a=
a.parentNode}}catch(g){}return!1};a.add("css-user-select",function(a,e,g){if(!g)return!1;a=g.style;e=["Khtml","O","Moz","Webkit"];g=e.length;var c="userSelect";do if("undefined"!==typeof a[c])return c;while(g--&&(c=e[g]+"UserSelect"));return!1});var k=a("css-user-select");e.setSelectable=k?function(a,q){e.byId(a).style[k]=q?"":"none"}:function(a,k){a=e.byId(a);var g=a.getElementsByTagName("*"),c=g.length;if(k)for(a.removeAttribute("unselectable");c--;)g[c].removeAttribute("unselectable");else for(a.setAttribute("unselectable",
"on");c--;)g[c].setAttribute("unselectable","on")};return e})},"dojo/dom-style":function(){define(["./sniff","./dom","./_base/window"],function(a,h,n){function e(b,c,a){c=c.toLowerCase();if("auto"==a){if("height"==c)return b.offsetHeight;if("width"==c)return b.offsetWidth}if("fontweight"==c)switch(a){case 700:return"bold";default:return"normal"}c in f||(f[c]=r.test(c));return f[c]?q(b,a):a}var k,l={};k=a("webkit")?function(b){var c;if(1==b.nodeType){var f=b.ownerDocument.defaultView;c=f.getComputedStyle(b,
null);!c&&b.style&&(b.style.display="",c=f.getComputedStyle(b,null))}return c||{}}:a("ie")&&9>a("ie")?function(b){return 1==b.nodeType&&b.currentStyle?b.currentStyle:{}}:function(b){if(1===b.nodeType){var c=b.ownerDocument.defaultView;return(c.opener?c:n.global.window).getComputedStyle(b,null)}return{}};l.getComputedStyle=k;var q;q=a("ie")?function(b,c){if(!c)return 0;if("medium"==c)return 4;if(c.slice&&"px"==c.slice(-2))return parseFloat(c);var f=b.style,a=b.runtimeStyle,p=f.left,d=a.left;a.left=
b.currentStyle.left;try{f.left=c,c=f.pixelLeft}catch(m){c=0}f.left=p;a.left=d;return c}:function(b,c){return parseFloat(c)||0};l.toPixelValue=q;var g=function(b,c){try{return b.filters.item("DXImageTransform.Microsoft.Alpha")}catch(t){return c?{}:null}},c=9>a("ie")||(a("ie"),0)?function(b){try{return g(b).Opacity/100}catch(w){return 1}}:function(b){return k(b).opacity},b=9>a("ie")||(a("ie"),0)?function(c,f){""===f&&(f=1);var a=100*f;1===f?(c.style.zoom="",g(c)&&(c.style.filter=c.style.filter.replace(/\s*progid:DXImageTransform.Microsoft.Alpha\([^\)]+?\)/i,
""))):(c.style.zoom=1,g(c)?g(c,1).Opacity=a:c.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity\x3d"+a+")",g(c,1).Enabled=!0);if("tr"==c.tagName.toLowerCase())for(c=c.firstChild;c;c=c.nextSibling)"td"==c.tagName.toLowerCase()&&b(c,f);return f}:function(b,c){return b.style.opacity=c},f={left:!0,top:!0},r=/margin|padding|width|height|max|min|offset/,v={cssFloat:1,styleFloat:1,"float":1};l.get=function(b,f){var a=h.byId(b),g=arguments.length;if(2==g&&"opacity"==f)return c(a);f=v[f]?"cssFloat"in
a.style?"cssFloat":"styleFloat":f;var p=l.getComputedStyle(a);return 1==g?p:e(a,f,p[f]||a.style[f])};l.set=function(c,f,a){var g=h.byId(c),p=arguments.length,d="opacity"==f;f=v[f]?"cssFloat"in g.style?"cssFloat":"styleFloat":f;if(3==p)return d?b(g,a):g.style[f]=a;for(var m in f)l.set(c,m,f[m]);return l.getComputedStyle(g)};return l})},"dojo/mouse":function(){define(["./_base/kernel","./on","./has","./dom","./_base/window"],function(a,h,n,e,k){function l(a,g){var c=function(b,c){return h(b,a,function(f){if(g)return g(f,
c);if(!e.isDescendant(f.relatedTarget,b))return c.call(this,f)})};c.bubble=function(b){return l(a,function(c,a){var f=b(c.target),g=c.relatedTarget;if(f&&f!=(g&&1==g.nodeType&&b(g)))return a.call(f,c)})};return c}n={LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(a,g){return a.button==g},isLeft:function(a){return 0==a.button},isMiddle:function(a){return 1==a.button},isRight:function(a){return 2==a.button}};a.mouseButtons=n;return{_eventHandler:l,enter:l("mouseover"),leave:l("mouseout"),wheel:"mousewheel",
isLeft:n.isLeft,isMiddle:n.isMiddle,isRight:n.isRight}})},"dojo/_base/sniff":function(){define(["./kernel","./lang","../sniff"],function(a,h,n){if(!n("host-browser"))return n;a._name="browser";h.mixin(a,{isBrowser:!0,isFF:1,isIE:n("ie"),isKhtml:0,isWebKit:n("webkit"),isMozilla:1,isMoz:1,isOpera:n("opera"),isSafari:n("safari"),isChrome:n("chrome"),isMac:1,isIos:n("ios"),isAndroid:0,isWii:0,isQuirks:0,isAir:0});return n})},"dojo/keys":function(){define(["./_base/kernel","./sniff"],function(a,h){return a.keys=
{BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:h("webkit")?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,
NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,UP_DPAD:175,DOWN_DPAD:176,LEFT_DPAD:177,RIGHT_DPAD:178,copyKey:h("safari")?91:224}})},"dojo/_base/unload":function(){define(["./kernel","./lang","../on"],function(a,h,n){var e=window,k={addOnWindowUnload:function(k,q){a.windowUnloaded||n(e,"unload",a.windowUnloaded=function(){});n(e,"unload",h.hitch(k,q))},addOnUnload:function(a,k){n(e,"beforeunload",
h.hitch(a,k))}};a.addOnWindowUnload=k.addOnWindowUnload;a.addOnUnload=k.addOnUnload;return k})},"dojo/_base/html":function(){define("./kernel ../dom ../dom-style ../dom-attr ../dom-prop ../dom-class ../dom-construct ../dom-geometry".split(" "),function(a,h,n,e,k,l,q,g){a.byId=h.byId;a.isDescendant=h.isDescendant;a.setSelectable=h.setSelectable;a.getAttr=e.get;a.setAttr=e.set;a.hasAttr=e.has;a.removeAttr=e.remove;a.getNodeProp=e.getNodeProp;a.attr=function(c,b,f){return 2==arguments.length?e["string"==
typeof b?"get":"set"](c,b):e.set(c,b,f)};a.hasClass=l.contains;a.addClass=l.add;a.removeClass=l.remove;a.toggleClass=l.toggle;a.replaceClass=l.replace;a._toDom=a.toDom=q.toDom;a.place=q.place;a.create=q.create;a.empty=function(c){q.empty(c)};a._destroyElement=a.destroy=function(c){q.destroy(c)};a._getPadExtents=a.getPadExtents=g.getPadExtents;a._getBorderExtents=a.getBorderExtents=g.getBorderExtents;a._getPadBorderExtents=a.getPadBorderExtents=g.getPadBorderExtents;a._getMarginExtents=a.getMarginExtents=
g.getMarginExtents;a._getMarginSize=a.getMarginSize=g.getMarginSize;a._getMarginBox=a.getMarginBox=g.getMarginBox;a.setMarginBox=g.setMarginBox;a._getContentBox=a.getContentBox=g.getContentBox;a.setContentSize=g.setContentSize;a._isBodyLtr=a.isBodyLtr=g.isBodyLtr;a._docScroll=a.docScroll=g.docScroll;a._getIeDocumentElementOffset=a.getIeDocumentElementOffset=g.getIeDocumentElementOffset;a._fixIeBiDiScrollLeft=a.fixIeBiDiScrollLeft=g.fixIeBiDiScrollLeft;a.position=g.position;a.marginBox=function(c,
b){return b?g.setMarginBox(c,b):g.getMarginBox(c)};a.contentBox=function(c,b){return b?g.setContentSize(c,b):g.getContentBox(c)};a.coords=function(c,b){a.deprecated("dojo.coords()","Use dojo.position() or dojo.marginBox().");c=h.byId(c);var f=n.getComputedStyle(c),f=g.getMarginBox(c,f);c=g.position(c,b);f.x=c.x;f.y=c.y;return f};a.getProp=k.get;a.setProp=k.set;a.prop=function(c,b,f){return 2==arguments.length?k["string"==typeof b?"get":"set"](c,b):k.set(c,b,f)};a.getStyle=n.get;a.setStyle=n.set;a.getComputedStyle=
n.getComputedStyle;a.__toPixelValue=a.toPixelValue=n.toPixelValue;a.style=function(c,b,f){switch(arguments.length){case 1:return n.get(c);case 2:return n["string"==typeof b?"get":"set"](c,b)}return n.set(c,b,f)};return a})},"dojo/dom-attr":function(){define("exports ./sniff ./_base/lang ./dom ./dom-style ./dom-prop".split(" "),function(a,h,n,e,k,l){function q(b,c){b=b.getAttributeNode&&b.getAttributeNode(c);return!!b&&b.specified}var g={innerHTML:1,textContent:1,className:1,htmlFor:h("ie"),value:1},
c={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"};a.has=function(b,f){var a=f.toLowerCase();return g[l.names[a]||f]||q(e.byId(b),c[a]||f)};a.get=function(b,f){b=e.byId(b);var a=f.toLowerCase(),k=l.names[a]||f,h=b[k];if(g[k]&&"undefined"!=typeof h)return h;if("textContent"==k)return l.get(b,k);if("href"!=k&&("boolean"==typeof h||n.isFunction(h)))return h;f=c[a]||f;return q(b,f)?b.getAttribute(f):null};a.set=function(b,f,r){b=e.byId(b);if(2==arguments.length){for(var v in f)a.set(b,
v,f[v]);return b}v=f.toLowerCase();var q=l.names[v]||f,w=g[q];if("style"==q&&"string"!=typeof r)return k.set(b,r),b;if(w||"boolean"==typeof r||n.isFunction(r))return l.set(b,f,r);b.setAttribute(c[v]||f,r);return b};a.remove=function(b,f){e.byId(b).removeAttribute(c[f.toLowerCase()]||f)};a.getNodeProp=function(b,f){b=e.byId(b);var a=f.toLowerCase(),g=l.names[a]||f;if(g in b&&"href"!=g)return b[g];f=c[a]||f;return q(b,f)?b.getAttribute(f):null}})},"dojo/dom-prop":function(){define("exports ./_base/kernel ./sniff ./_base/lang ./dom ./dom-style ./dom-construct ./_base/connect".split(" "),
function(a,h,n,e,k,l,q,g){var c={},b=1,f=h._scopeName+"attrid";a.names={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",textcontent:"textContent",valuetype:"valueType"};a.get=function(b,c){b=k.byId(b);var f=c.toLowerCase();return b[a.names[f]||c]};a.set=function(r,v,h){r=k.byId(r);if(2==arguments.length&&"string"!=typeof v){for(var w in v)a.set(r,w,v[w]);return r}w=v.toLowerCase();w=a.names[w]||v;if("style"==
w&&"string"!=typeof h)return l.set(r,h),r;if("innerHTML"==w)return n("ie")&&r.tagName.toLowerCase()in{col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1}?(q.empty(r),r.appendChild(q.toDom(h,r.ownerDocument))):r[w]=h,r;if(e.isFunction(h)){var t=r[f];t||(t=b++,r[f]=t);c[t]||(c[t]={});var u=c[t][w];if(u)g.disconnect(u);else try{delete r[w]}catch(p){}h?c[t][w]=g.connect(r,w,h):r[w]=null;return r}r[w]=h;return r}})},"dojo/dom-construct":function(){define("exports ./_base/kernel ./sniff ./_base/window ./dom ./dom-attr".split(" "),
function(a,h,n,e,k,l){function q(b,d){var m=d.parentNode;m&&m.insertBefore(b,d)}function g(b){if("innerHTML"in b)try{b.innerHTML="";return}catch(m){}for(var d;d=b.lastChild;)b.removeChild(d)}var c={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},b=/<\s*([\w\:]+)/,f={},r=0,v="__"+h._scopeName+"ToDomId",x;for(x in c)c.hasOwnProperty(x)&&
(h=c[x],h.pre="option"==x?'\x3cselect multiple\x3d"multiple"\x3e':"\x3c"+h.join("\x3e\x3c")+"\x3e",h.post="\x3c/"+h.reverse().join("\x3e\x3c/")+"\x3e");var w;8>=n("ie")&&(w=function(b){b.__dojo_html5_tested="yes";var d=t("div",{innerHTML:"\x3cnav\x3ea\x3c/nav\x3e",style:{visibility:"hidden"}},b.body);1!==d.childNodes.length&&"abbr article aside audio canvas details figcaption figure footer header hgroup mark meter nav output progress section summary time video".replace(/\b\w+\b/g,function(d){b.createElement(d)});
u(d)});a.toDom=function(p,d){d=d||e.doc;var m=d[v];m||(d[v]=m=++r+"",f[m]=d.createElement("div"));8>=n("ie")&&!d.__dojo_html5_tested&&d.body&&w(d);p+="";var a=p.match(b),g=a?a[1].toLowerCase():"",m=f[m];if(a&&c[g])for(a=c[g],m.innerHTML=a.pre+p+a.post,p=a.length;p;--p)m=m.firstChild;else m.innerHTML=p;if(1==m.childNodes.length)return m.removeChild(m.firstChild);for(p=d.createDocumentFragment();d=m.firstChild;)p.appendChild(d);return p};a.place=function(b,d,m){d=k.byId(d);"string"==typeof b&&(b=/^\s*</.test(b)?
a.toDom(b,d.ownerDocument):k.byId(b));if("number"==typeof m){var p=d.childNodes;!p.length||p.length<=m?d.appendChild(b):q(b,p[0>m?0:m])}else switch(m){case "before":q(b,d);break;case "after":m=b;(p=d.parentNode)&&(p.lastChild==d?p.appendChild(m):p.insertBefore(m,d.nextSibling));break;case "replace":d.parentNode.replaceChild(b,d);break;case "only":a.empty(d);d.appendChild(b);break;case "first":if(d.firstChild){q(b,d.firstChild);break}default:d.appendChild(b)}return b};var t=a.create=function(b,d,m,
c){var p=e.doc;m&&(m=k.byId(m),p=m.ownerDocument);"string"==typeof b&&(b=p.createElement(b));d&&l.set(b,d);m&&a.place(b,m,c);return b};a.empty=function(b){g(k.byId(b))};var u=a.destroy=function(b){if(b=k.byId(b)){var d=b;b=b.parentNode;d.firstChild&&g(d);b&&(n("ie")&&b.canHaveChildren&&"removeNode"in d?d.removeNode(!1):b.removeChild(d))}}})},"dojo/dom-class":function(){define(["./_base/lang","./_base/array","./dom"],function(a,h,n){function e(c){if("string"==typeof c||c instanceof String){if(c&&!l.test(c))return q[0]=
c,q;c=c.split(l);c.length&&!c[0]&&c.shift();c.length&&!c[c.length-1]&&c.pop();return c}return c?h.filter(c,function(b){return b}):[]}var k,l=/\s+/,q=[""],g={};return k={contains:function(c,b){return 0<=(" "+n.byId(c).className+" ").indexOf(" "+b+" ")},add:function(c,b){c=n.byId(c);b=e(b);var a=c.className,g,a=a?" "+a+" ":" ";g=a.length;for(var k=0,l=b.length,q;k<l;++k)(q=b[k])&&0>a.indexOf(" "+q+" ")&&(a+=q+" ");g<a.length&&(c.className=a.substr(1,a.length-2))},remove:function(c,b){c=n.byId(c);var f;
if(void 0!==b){b=e(b);f=" "+c.className+" ";for(var g=0,k=b.length;g<k;++g)f=f.replace(" "+b[g]+" "," ");f=a.trim(f)}else f="";c.className!=f&&(c.className=f)},replace:function(c,b,a){c=n.byId(c);g.className=c.className;k.remove(g,a);k.add(g,b);c.className!==g.className&&(c.className=g.className)},toggle:function(c,b,a){c=n.byId(c);if(void 0===a){b=e(b);for(var f=0,g=b.length,l;f<g;++f)l=b[f],k[k.contains(c,l)?"remove":"add"](c,l)}else k[a?"add":"remove"](c,b);return a}}})},"dojo/_base/array":function(){define(["./kernel",
"../has","./lang"],function(a,h,n){function e(b){return q[b]=new Function("item","index","array",b)}function k(b){var c=!b;return function(a,f,g){var k=0,l=a&&a.length||0,u;l&&"string"==typeof a&&(a=a.split(""));"string"==typeof f&&(f=q[f]||e(f));if(g)for(;k<l;++k){if(u=!f.call(g,a[k],k,a),b^u)return!u}else for(;k<l;++k)if(u=!f(a[k],k,a),b^u)return!u;return c}}function l(b){var a=1,e=0,k=0;b||(a=e=k=-1);return function(f,l,r,u){if(u&&0<a)return c.lastIndexOf(f,l,r);u=f&&f.length||0;var p=b?u+k:e;
r===g?r=b?e:u+k:0>r?(r=u+r,0>r&&(r=e)):r=r>=u?u+k:r;for(u&&"string"==typeof f&&(f=f.split(""));r!=p;r+=a)if(f[r]==l)return r;return-1}}var q={},g,c={every:k(!1),some:k(!0),indexOf:l(!0),lastIndexOf:l(!1),forEach:function(b,c,a){var f=0,g=b&&b.length||0;g&&"string"==typeof b&&(b=b.split(""));"string"==typeof c&&(c=q[c]||e(c));if(a)for(;f<g;++f)c.call(a,b[f],f,b);else for(;f<g;++f)c(b[f],f,b)},map:function(b,c,a,g){var f=0,k=b&&b.length||0;g=new (g||Array)(k);k&&"string"==typeof b&&(b=b.split(""));
"string"==typeof c&&(c=q[c]||e(c));if(a)for(;f<k;++f)g[f]=c.call(a,b[f],f,b);else for(;f<k;++f)g[f]=c(b[f],f,b);return g},filter:function(b,c,a){var f=0,g=b&&b.length||0,k=[],l;g&&"string"==typeof b&&(b=b.split(""));"string"==typeof c&&(c=q[c]||e(c));if(a)for(;f<g;++f)l=b[f],c.call(a,l,f,b)&&k.push(l);else for(;f<g;++f)l=b[f],c(l,f,b)&&k.push(l);return k},clearCache:function(){q={}}};n.mixin(a,c);return c})},"dojo/_base/NodeList":function(){define(["./kernel","../query","./array","./html","../NodeList-dom"],
function(a,h,n){h=h.NodeList;var e=h.prototype;e.connect=h._adaptAsForEach(function(){return a.connect.apply(this,arguments)});e.coords=h._adaptAsMap(a.coords);h.events="blur focus change click error keydown keypress keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup submit".split(" ");n.forEach(h.events,function(a){var k="on"+a;e[k]=function(a,g){return this.connect(k,a,g)}});return a.NodeList=h})},"dojo/query":function(){define("./_base/kernel ./has ./dom ./on ./_base/array ./_base/lang ./selector/_loader ./selector/_loader!default".split(" "),
function(a,h,n,e,k,l,q,g){function c(d,m){var b=function(b,p){if("string"==typeof p&&(p=n.byId(p),!p))return new m([]);b="string"==typeof b?d(b,p):b?b.end&&b.on?b:[b]:[];return b.end&&b.on?b:new m(b)};b.matches=d.match||function(d,m,p){return 0<b.filter([d],m,p).length};b.filter=d.filter||function(d,m,p){return b(m,p).filter(function(m){return-1<k.indexOf(d,m)})};if("function"!=typeof d){var p=d.search;d=function(d,m){return p(m||document,d)}}return b}var b=Array.prototype,f=b.slice,r=b.concat,v=
k.forEach,x=function(d,m,b){m=[0].concat(f.call(m,0));b=b||a.global;return function(p){m[0]=p;return d.apply(b,m)}},w=function(d){var m=this instanceof t&&1;"number"==typeof d&&(d=Array(d));var b=d&&"length"in d?d:arguments;if(m||!b.sort){for(var p=m?this:[],c=p.length=b.length,a=0;a<c;a++)p[a]=b[a];if(m)return p;b=p}l._mixin(b,u);b._NodeListCtor=function(d){return t(d)};return b},t=w,u=t.prototype=[];t._wrap=u._wrap=function(d,m,b){d=new (b||this._NodeListCtor||t)(d);return m?d._stash(m):d};t._adaptAsMap=
function(d,m){return function(){return this.map(x(d,arguments,m))}};t._adaptAsForEach=function(d,m){return function(){this.forEach(x(d,arguments,m));return this}};t._adaptAsFilter=function(d,m){return function(){return this.filter(x(d,arguments,m))}};t._adaptWithCondition=function(d,m,b){return function(){var p=arguments,c=x(d,p,b);if(m.call(b||a.global,p))return this.map(c);this.forEach(c);return this}};v(["slice","splice"],function(d){var m=b[d];u[d]=function(){return this._wrap(m.apply(this,arguments),
"slice"==d?this:null)}});v(["indexOf","lastIndexOf","every","some"],function(d){var m=k[d];u[d]=function(){return m.apply(a,[this].concat(f.call(arguments,0)))}});l.extend(w,{constructor:t,_NodeListCtor:t,toString:function(){return this.join(",")},_stash:function(d){this._parent=d;return this},on:function(d,m){var b=this.map(function(b){return e(b,d,m)});b.remove=function(){for(var d=0;d<b.length;d++)b[d].remove()};return b},end:function(){return this._parent?this._parent:new this._NodeListCtor(0)},
concat:function(d){var m=f.call(this,0),b=k.map(arguments,function(d){return f.call(d,0)});return this._wrap(r.apply(m,b),this)},map:function(d,m){return this._wrap(k.map(this,d,m),this)},forEach:function(d,m){v(this,d,m);return this},filter:function(d){var m=arguments,b=this,c=0;if("string"==typeof d){b=p._filterResult(this,m[0]);if(1==m.length)return b._stash(this);c=1}return this._wrap(k.filter(b,m[c],m[c+1]),this)},instantiate:function(d,m){var b=l.isFunction(d)?d:l.getObject(d);m=m||{};return this.forEach(function(d){new b(m,
d)})},at:function(){var d=new this._NodeListCtor(0);v(arguments,function(m){0>m&&(m=this.length+m);this[m]&&d.push(this[m])},this);return d._stash(this)}});var p=c(g,w);a.query=c(g,function(d){return w(d)});p.load=function(d,m,b){q.load(d,m,function(d){b(c(d,w))})};a._filterQueryResult=p._filterResult=function(d,m,b){return new w(p.filter(d,m,b))};a.NodeList=p.NodeList=w;return p})},"dojo/selector/_loader":function(){define(["../has","require"],function(a,h){"undefined"!==typeof document&&document.createElement("div");
var n;return{load:function(e,k,l,q){if(q&&q.isBuild)l();else{q=h;e="default"==e?a("config-selectorEngine")||"css3":e;e="css2"==e||"lite"==e?"./lite":"css2.1"==e?"./lite":"css3"==e?"./lite":"acme"==e?"./acme":(q=k)&&e;if("?"==e.charAt(e.length-1)){e=e.substring(0,e.length-1);var g=!0}if(g&&(a("dom-compliant-qsa")||n))return l(n);q([e],function(c){"./lite"!=e&&(n=c);l(c)})}}}})},"dojo/selector/lite":function(){define(["../has","../_base/kernel"],function(a,h){var n=document.createElement("div"),e=n.matches||
n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector,k=n.querySelectorAll,l=/([^\s,](?:"(?:\\.|[^"])+"|'(?:\\.|[^'])+'|[^,])*)/g,q=function(c,b){var f=b?b.ownerDocument||b:h.doc||document,e=(k?/^([\w]*)#([\w\-]+$)|^(\.)([\w\-\*]+$)|^(\w+$)/:/^([\w]*)#([\w\-]+)(?:\s+(.*))?$|(?:^|(>|.+\s+))([\w\-\*]+)(\S*$)/).exec(c);b=b||f;if(e){var l=(a("ie"),null!==b.parentNode&&9!==b.nodeType&&b.parentNode===f);if(e[2]&&l){var x=h.byId?h.byId(e[2],f):f.getElementById(e[2]);if(!x||
e[1]&&e[1]!=x.tagName.toLowerCase())return[];if(b!=f)for(c=x;c!=b;)if(c=c.parentNode,!c)return[];return e[3]?q(e[3],x):[x]}if(e[3]&&b.getElementsByClassName)return b.getElementsByClassName(e[4]);if(e[5])if(x=b.getElementsByTagName(e[5]),e[4]||e[6])c=(e[4]||"")+e[6];else return x}if(k)return 1===b.nodeType&&"object"!==b.nodeName.toLowerCase()?g(b,c,b.querySelectorAll):b.querySelectorAll(c);x||(x=b.getElementsByTagName("*"));e=[];f=0;for(l=x.length;f<l;f++){var w=x[f];1==w.nodeType&&(void 0)(w,c,b)&&
e.push(w)}return e},g=function(c,b,a){var f=c,g=c.getAttribute("id"),e=g||"__dojo__",k=c.parentNode,t=/^\s*[+~]/.test(b);if(t&&!k)return[];g?e=e.replace(/'/g,"\\$\x26"):c.setAttribute("id",e);t&&k&&(c=c.parentNode);b=b.match(l);for(k=0;k<b.length;k++)b[k]="[id\x3d'"+e+"'] "+b[k];b=b.join(",");try{return a.call(c,b)}finally{g||f.removeAttribute("id")}};q.match=e?function(c,b,a){return a&&9!=a.nodeType?g(a,b,function(b){return e.call(c,b)}):e.call(c,b)}:void 0;return q})},"dojo/NodeList-dom":function(){define("./_base/kernel ./query ./_base/array ./_base/lang ./dom-class ./dom-construct ./dom-geometry ./dom-attr ./dom-style".split(" "),
function(a,h,n,e,k,l,q,g,c){function b(b){return function(p,d,m){return 2==arguments.length?b["string"==typeof d?"get":"set"](p,d):b.set(p,d,m)}}var f=function(b){return 1==b.length&&"string"==typeof b[0]},r=function(b){var p=b.parentNode;p&&p.removeChild(b)},v=h.NodeList,x=v._adaptWithCondition,w=v._adaptAsForEach,t=v._adaptAsMap;e.extend(v,{_normalize:function(b,p){var d=!0===b.parse;if("string"==typeof b.template){var m=b.templateFunc||a.string&&a.string.substitute;b=m?m(b.template,b):b}m=typeof b;
"string"==m||"number"==m?(b=l.toDom(b,p&&p.ownerDocument),b=11==b.nodeType?e._toArray(b.childNodes):[b]):e.isArrayLike(b)?e.isArray(b)||(b=e._toArray(b)):b=[b];d&&(b._runParse=!0);return b},_cloneNode:function(b){return b.cloneNode(!0)},_place:function(b,p,d,m){if(1==p.nodeType||"only"!=d)for(var c,f=b.length,g=f-1;0<=g;g--){var e=m?this._cloneNode(b[g]):b[g];if(b._runParse&&a.parser&&a.parser.parse)for(c||(c=p.ownerDocument.createElement("div")),c.appendChild(e),a.parser.parse(c),e=c.firstChild;c.firstChild;)c.removeChild(c.firstChild);
g==f-1?l.place(e,p,d):p.parentNode.insertBefore(e,p);p=e}},position:t(q.position),attr:x(b(g),f),style:x(b(c),f),addClass:w(k.add),removeClass:w(k.remove),toggleClass:w(k.toggle),replaceClass:w(k.replace),empty:w(l.empty),removeAttr:w(g.remove),marginBox:t(q.getMarginBox),place:function(b,p){var d=h(b)[0];return this.forEach(function(m){l.place(m,d,p)})},orphan:function(b){return(b?h._filterResult(this,b):this).forEach(r)},adopt:function(b,p){return h(b).place(this[0],p)._stash(this)},query:function(b){if(!b)return this;
var p=new v;this.map(function(d){h(b,d).forEach(function(d){void 0!==d&&p.push(d)})});return p._stash(this)},filter:function(b){var p=arguments,d=this,m=0;if("string"==typeof b){d=h._filterResult(this,p[0]);if(1==p.length)return d._stash(this);m=1}return this._wrap(n.filter(d,p[m],p[m+1]),this)},addContent:function(b,p){b=this._normalize(b,this[0]);for(var d=0,m;m=this[d];d++)b.length?this._place(b,m,p,0<d):l.empty(m);return this}});return v})},"dojo/_base/xhr":function(){define("./kernel ./sniff require ../io-query ../dom ../dom-form ./Deferred ./config ./json ./lang ./array ../on ../aspect ../request/watch ../request/xhr ../request/util".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t){a._xhrObj=w._create;var u=a.config;a.objectToQuery=e.objectToQuery;a.queryToObject=e.queryToObject;a.fieldToObject=l.fieldToObject;a.formToObject=l.toObject;a.formToQuery=l.toQuery;a.formToJson=l.toJson;a._blockAsync=!1;var p=a._contentHandlers=a.contentHandlers={text:function(d){return d.responseText},json:function(d){return c.fromJson(d.responseText||null)},"json-comment-filtered":function(d){g.useCommentedJson||console.warn("Consider using the standard mimetype:application/json. json-commenting can introduce security issues. To decrease the chances of hijacking, use the standard the 'json' handler and prefix your json with: {}\x26\x26\nUse djConfig.useCommentedJson\x3dtrue to turn off this message.");
d=d.responseText;var m=d.indexOf("/*"),b=d.lastIndexOf("*/");if(-1==m||-1==b)throw Error("JSON was not comment filtered");return c.fromJson(d.substring(m+2,b))},javascript:function(d){return a.eval(d.responseText)},xml:function(d){var m=d.responseXML;m&&!m.querySelectorAll&&(m=(new DOMParser).parseFromString(d.responseText,"application/xml"));if(h("ie")&&(!m||!m.documentElement)){var b=function(d){return"MSXML"+d+".DOMDocument"},b=["Microsoft.XMLDOM",b(6),b(4),b(3),b(2)];f.some(b,function(b){try{var p=
new ActiveXObject(b);p.async=!1;p.loadXML(d.responseText);m=p}catch(K){return!1}return!0})}return m},"json-comment-optional":function(d){return d.responseText&&/^[^{\[]*\/\*/.test(d.responseText)?p["json-comment-filtered"](d):p.json(d)}};p.arraybuffer=p.blob=p.document=function(d,m){return d.response};a._ioSetArgs=function(d,m,p,c){var f={args:d,url:d.url},g=null;if(d.form){var g=k.byId(d.form),y=g.getAttributeNode("action");f.url=f.url||(y?y.value:a.doc?a.doc.URL:null);g=l.toObject(g)}y=[{}];g&&
y.push(g);d.content&&y.push(d.content);d.preventCache&&y.push({"dojo.preventCache":(new Date).valueOf()});f.query=e.objectToQuery(b.mixin.apply(null,y));f.handleAs=d.handleAs||"text";var r=new q(function(d){d.canceled=!0;m&&m(d);var b=d.ioArgs.error;b||(b=Error("request cancelled"),b.dojoType="cancel",d.ioArgs.error=b);return b});r.addCallback(p);var t=d.load;t&&b.isFunction(t)&&r.addCallback(function(m){return t.call(d,m,f)});var v=d.error;v&&b.isFunction(v)&&r.addErrback(function(m){return v.call(d,
m,f)});var w=d.handle;w&&b.isFunction(w)&&r.addBoth(function(m){return w.call(d,m,f)});r.addErrback(function(d){return c(d,r)});u.ioPublish&&a.publish&&!1!==f.args.ioPublish&&(r.addCallbacks(function(d){a.publish("/dojo/io/load",[r,d]);return d},function(d){a.publish("/dojo/io/error",[r,d]);return d}),r.addBoth(function(d){a.publish("/dojo/io/done",[r,d]);return d}));r.ioArgs=f;return r};var d=function(d){d=p[d.ioArgs.handleAs](d.ioArgs.xhr,d.ioArgs);return void 0===d?null:d},m=function(d,m){m.ioArgs.args.failOk||
console.error(d);return d},y=function(d){0>=z&&(z=0,u.ioPublish&&a.publish&&(!d||d&&!1!==d.ioArgs.args.ioPublish)&&a.publish("/dojo/io/stop"))},z=0;v.after(x,"_onAction",function(){--z});v.after(x,"_onInFlight",y);a._ioCancelAll=x.cancelAll;a._ioNotifyStart=function(d){u.ioPublish&&a.publish&&!1!==d.ioArgs.args.ioPublish&&(z||a.publish("/dojo/io/start"),z+=1,a.publish("/dojo/io/send",[d]))};a._ioWatch=function(d,m,p,c){d.ioArgs.options=d.ioArgs.args;b.mixin(d,{response:d.ioArgs,isValid:function(b){return m(d)},
isReady:function(m){return p(d)},handleResponse:function(m){return c(d)}});x(d);y(d)};a._ioAddQueryToUrl=function(d){d.query.length&&(d.url+=(-1==d.url.indexOf("?")?"?":"\x26")+d.query,d.query=null)};a.xhr=function(b,p,c){var f,g=a._ioSetArgs(p,function(d){f&&f.cancel()},d,m),y=g.ioArgs;"postData"in p?y.query=p.postData:"putData"in p?y.query=p.putData:"rawBody"in p?y.query=p.rawBody:(2<arguments.length&&!c||-1==="POST|PUT".indexOf(b.toUpperCase()))&&a._ioAddQueryToUrl(y);var e={method:b,handleAs:{arraybuffer:1,
blob:1,document:1}[p.handleAs]?p.handleAs:"text",responseType:p.responseType,timeout:p.timeout,withCredentials:p.withCredentials,ioArgs:y};"undefined"!==typeof p.headers&&(e.headers=p.headers);"undefined"!==typeof p.contentType&&(e.headers||(e.headers={}),e.headers["Content-Type"]=p.contentType);"undefined"!==typeof y.query&&(e.data=y.query);"undefined"!==typeof p.sync&&(e.sync=p.sync);a._ioNotifyStart(g);try{f=w(y.url,e,!0)}catch(Z){return g.cancel(),g}g.ioArgs.xhr=f.response.xhr;f.then(function(){g.resolve(g)}).otherwise(function(d){y.error=
d;d.response&&(d.status=d.response.status,d.responseText=d.response.text,d.xhr=d.response.xhr);g.reject(d)});return g};a.xhrGet=function(d){return a.xhr("GET",d)};a.rawXhrPost=a.xhrPost=function(d){return a.xhr("POST",d,!0)};a.rawXhrPut=a.xhrPut=function(d){return a.xhr("PUT",d,!0)};a.xhrDelete=function(d){return a.xhr("DELETE",d)};a._isDocumentOk=function(d){return t.checkStatus(d.status)};a._getText=function(d){var m;a.xhrGet({url:d,sync:!0,load:function(d){m=d}});return m};b.mixin(a.xhr,{_xhrObj:a._xhrObj,
fieldToObject:l.fieldToObject,formToObject:l.toObject,objectToQuery:e.objectToQuery,formToQuery:l.toQuery,formToJson:l.toJson,queryToObject:e.queryToObject,contentHandlers:p,_ioSetArgs:a._ioSetArgs,_ioCancelAll:a._ioCancelAll,_ioNotifyStart:a._ioNotifyStart,_ioWatch:a._ioWatch,_ioAddQueryToUrl:a._ioAddQueryToUrl,_isDocumentOk:a._isDocumentOk,_getText:a._getText,get:a.xhrGet,post:a.xhrPost,put:a.xhrPut,del:a.xhrDelete});return a.xhr})},"dojo/io-query":function(){define(["./_base/lang"],function(a){var h=
{};return{objectToQuery:function(n){var e=encodeURIComponent,k=[],l;for(l in n){var q=n[l];if(q!=h[l]){var g=e(l)+"\x3d";if(a.isArray(q))for(var c=0,b=q.length;c<b;++c)k.push(g+e(q[c]));else k.push(g+e(q))}}return k.join("\x26")},queryToObject:function(h){var e=decodeURIComponent;h=h.split("\x26");for(var k={},l,q,g=0,c=h.length;g<c;++g)if(q=h[g],q.length){var b=q.indexOf("\x3d");0>b?(l=e(q),q=""):(l=e(q.slice(0,b)),q=e(q.slice(b+1)));"string"==typeof k[l]&&(k[l]=[k[l]]);a.isArray(k[l])?k[l].push(q):
k[l]=q}return k}}})},"dojo/dom-form":function(){define(["./_base/lang","./dom","./io-query","./json"],function(a,h,n,e){var k={fieldToObject:function(a){var e=null;if(a=h.byId(a)){var g=a.name,c=(a.type||"").toLowerCase();if(g&&c&&!a.disabled)if("radio"==c||"checkbox"==c)a.checked&&(e=a.value);else if(a.multiple)for(e=[],a=[a.firstChild];a.length;)for(g=a.pop();g;g=g.nextSibling)if(1==g.nodeType&&"option"==g.tagName.toLowerCase())g.selected&&e.push(g.value);else{g.nextSibling&&a.push(g.nextSibling);
g.firstChild&&a.push(g.firstChild);break}else e=a.value}return e},toObject:function(e){var l={};e=h.byId(e).elements;for(var g=0,c=e.length;g<c;++g){var b=e[g],f=b.name,r=(b.type||"").toLowerCase();if(f&&r&&0>"file|submit|image|reset|button".indexOf(r)&&!b.disabled){var v=l,x=f,b=k.fieldToObject(b);if(null!==b){var w=v[x];"string"==typeof w?v[x]=[w,b]:a.isArray(w)?w.push(b):v[x]=b}"image"==r&&(l[f+".x"]=l[f+".y"]=l[f].x=l[f].y=0)}}return l},toQuery:function(a){return n.objectToQuery(k.toObject(a))},
toJson:function(a,q){return e.stringify(k.toObject(a),null,q?4:0)}};return k})},"dojo/json":function(){define(["./has"],function(a){return JSON})},"dojo/_base/Deferred":function(){define("./kernel ../Deferred ../promise/Promise ../errors/CancelError ../has ./lang ../when".split(" "),function(a,h,n,e,k,l,q){var g=function(){},c=Object.freeze||function(){},b=a.Deferred=function(a){function f(d){if(w)throw Error("This deferred has already been resolved");q=d;w=!0;v()}function v(){for(var d;!d&&m;){var b=
m;m=m.next;if(d=b.progress==g)w=!1;var c=p?b.error:b.resolved;k("config-useDeferredInstrumentation")&&p&&h.instrumentRejected&&h.instrumentRejected(q,!!c);if(c)try{var a=c(q);a&&"function"===typeof a.then?a.then(l.hitch(b.deferred,"resolve"),l.hitch(b.deferred,"reject"),l.hitch(b.deferred,"progress")):(c=d&&void 0===a,d&&!c&&(p=a instanceof Error),b.deferred[c&&p?"reject":"resolve"](c?q:a))}catch(E){b.deferred.reject(E)}else p?b.deferred.reject(q):b.deferred.resolve(q)}}var q,w,t,u,p,d,m,y=this.promise=
new n;this.isResolved=y.isResolved=function(){return 0==u};this.isRejected=y.isRejected=function(){return 1==u};this.isFulfilled=y.isFulfilled=function(){return 0<=u};this.isCanceled=y.isCanceled=function(){return t};this.resolve=this.callback=function(d){this.fired=u=0;this.results=[d,null];f(d)};this.reject=this.errback=function(d){p=!0;this.fired=u=1;k("config-useDeferredInstrumentation")&&h.instrumentRejected&&h.instrumentRejected(d,!!m);f(d);this.results=[null,d]};this.progress=function(d){for(var b=
m;b;){var p=b.progress;p&&p(d);b=b.next}};this.addCallbacks=function(d,m){this.then(d,m,g);return this};y.then=this.then=function(p,c,a){var f=a==g?this:new b(y.cancel);p={resolved:p,error:c,progress:a,deferred:f};m?d=d.next=p:m=d=p;w&&v();return f.promise};var z=this;y.cancel=this.cancel=function(){if(!w){var d=a&&a(z);w||(d instanceof Error||(d=new e(d)),d.log=!1,z.reject(d))}t=!0};c(y)};l.extend(b,{addCallback:function(b){return this.addCallbacks(l.hitch.apply(a,arguments))},addErrback:function(b){return this.addCallbacks(null,
l.hitch.apply(a,arguments))},addBoth:function(b){var c=l.hitch.apply(a,arguments);return this.addCallbacks(c,c)},fired:-1});b.when=a.when=q;return b})},"dojo/Deferred":function(){define(["./has","./_base/lang","./errors/CancelError","./promise/Promise","./has!config-deferredInstrumentation?./promise/instrumentation"],function(a,h,n,e,k){var l=Object.freeze||function(){},q=function(b,c,e,k,l){a("config-deferredInstrumentation")&&2===c&&f.instrumentRejected&&0===b.length&&f.instrumentRejected(e,!1,
k,l);for(l=0;l<b.length;l++)g(b[l],c,e,k)},g=function(g,e,k,l){var r=g[e],u=g.deferred;if(r)try{var p=r(k);if(0===e)"undefined"!==typeof p&&b(u,e,p);else{if(p&&"function"===typeof p.then){g.cancel=p.cancel;p.then(c(u,1),c(u,2),c(u,0));return}b(u,1,p)}}catch(d){b(u,2,d)}else b(u,e,k);a("config-deferredInstrumentation")&&2===e&&f.instrumentRejected&&f.instrumentRejected(k,!!r,l,u.promise)},c=function(c,a){return function(f){b(c,a,f)}},b=function(b,c,a){if(!b.isCanceled())switch(c){case 0:b.progress(a);
break;case 1:b.resolve(a);break;case 2:b.reject(a)}},f=function(b){var c=this.promise=new e,k=this,r,t,u,p=!1,d=[];a("config-deferredInstrumentation")&&Error.captureStackTrace&&(Error.captureStackTrace(k,f),Error.captureStackTrace(c,f));this.isResolved=c.isResolved=function(){return 1===r};this.isRejected=c.isRejected=function(){return 2===r};this.isFulfilled=c.isFulfilled=function(){return!!r};this.isCanceled=c.isCanceled=function(){return p};this.progress=function(m,b){if(r){if(!0===b)throw Error("This deferred has already been fulfilled.");
return c}q(d,0,m,null,k);return c};this.resolve=function(m,b){if(r){if(!0===b)throw Error("This deferred has already been fulfilled.");return c}q(d,r=1,t=m,null,k);d=null;return c};var m=this.reject=function(b,p){if(r){if(!0===p)throw Error("This deferred has already been fulfilled.");return c}a("config-deferredInstrumentation")&&Error.captureStackTrace&&Error.captureStackTrace(u={},m);q(d,r=2,t=b,u,k);d=null;return c};this.then=c.then=function(m,b,p){var a=[p,m,b];a.cancel=c.cancel;a.deferred=new f(function(d){return a.cancel&&
a.cancel(d)});r&&!d?g(a,r,t,u):d.push(a);return a.deferred.promise};this.cancel=c.cancel=function(d,c){if(!r){b&&(c=b(d),d="undefined"===typeof c?d:c);p=!0;if(!r)return"undefined"===typeof d&&(d=new n),m(d),d;if(2===r&&t===d)return d}else if(!0===c)throw Error("This deferred has already been fulfilled.");};l(c)};f.prototype.toString=function(){return"[object Deferred]"};k&&k(f);return f})},"dojo/errors/CancelError":function(){define(["./create"],function(a){return a("CancelError",null,null,{dojoType:"cancel",
log:!1})})},"dojo/errors/create":function(){define(["../_base/lang"],function(a){return function(h,n,e,k){e=e||Error;var l=function(a){if(e===Error){Error.captureStackTrace&&Error.captureStackTrace(this,l);var g=Error.call(this,a),c;for(c in g)g.hasOwnProperty(c)&&(this[c]=g[c]);this.message=a;this.stack=g.stack}else e.apply(this,arguments);n&&n.apply(this,arguments)};l.prototype=a.delegate(e.prototype,k);l.prototype.name=h;return l.prototype.constructor=l}})},"dojo/promise/Promise":function(){define(["../_base/lang"],
function(a){function h(){throw new TypeError("abstract");}return a.extend(function(){},{then:function(a,e,k){h()},cancel:function(a,e){h()},isResolved:function(){h()},isRejected:function(){h()},isFulfilled:function(){h()},isCanceled:function(){h()},always:function(a){return this.then(a,a)},"catch":function(a){return this.then(null,a)},otherwise:function(a){return this.then(null,a)},trace:function(){return this},traceRejected:function(){return this},toString:function(){return"[object Promise]"}})})},
"dojo/when":function(){define(["./Deferred","./promise/Promise"],function(a,h){return function(n,e,k,l){var q=n&&"function"===typeof n.then,g=q&&n instanceof h;if(!q)return 1<arguments.length?e?e(n):n:(new a).resolve(n);g||(q=new a(n.cancel),n.then(q.resolve,q.reject,q.progress),n=q.promise);return e||k||l?n.then(e,k,l):n}})},"dojo/_base/json":function(){define(["./kernel","../json"],function(a,h){a.fromJson=function(a){return eval("("+a+")")};a._escapeString=h.stringify;a.toJsonIndentStr="\t";a.toJson=
function(n,e){return h.stringify(n,function(a,e){return e&&(a=e.__json__||e.json,"function"==typeof a)?a.call(e):e},e&&a.toJsonIndentStr)};return a})},"dojo/request/watch":function(){define("./util ../errors/RequestTimeoutError ../errors/CancelError ../_base/array ../has!host-browser?../_base/window: ../has!host-browser?dom-addeventlistener?:../on:".split(" "),function(a,h,n,e,k,l){function q(){for(var a=+new Date,e=0,k;e<b.length&&(k=b[e]);e++){var l=k.response,q=l.options;k.isCanceled&&k.isCanceled()||
k.isValid&&!k.isValid(l)?(b.splice(e--,1),g._onAction&&g._onAction()):k.isReady&&k.isReady(l)?(b.splice(e--,1),k.handleResponse(l),g._onAction&&g._onAction()):k.startTime&&k.startTime+(q.timeout||0)<a&&(b.splice(e--,1),k.cancel(new h("Timeout exceeded",l)),g._onAction&&g._onAction())}g._onInFlight&&g._onInFlight(k);b.length||(clearInterval(c),c=null)}function g(a){a.response.options.timeout&&(a.startTime=+new Date);a.isFulfilled()||(b.push(a),c||(c=setInterval(q,50)),a.response.options.sync&&q())}
var c=null,b=[];g.cancelAll=function(){try{e.forEach(b,function(b){try{b.cancel(new n("All requests canceled."))}catch(r){}})}catch(f){}};k&&l&&k.doc.attachEvent&&l(k.global,"unload",function(){g.cancelAll()});return g})},"dojo/request/util":function(){define("exports ../errors/RequestError ../errors/CancelError ../Deferred ../io-query ../_base/array ../_base/lang ../promise/Promise ../has".split(" "),function(a,h,n,e,k,l,q,g,c){function b(b){return r(b)}function f(b){return void 0!==b.data?b.data:
b.text}a.deepCopy=function(b,c){for(var f in c){var g=b[f],e=c[f];g!==e&&(g&&"object"===typeof g&&e&&"object"===typeof e?e instanceof Date?b[f]=new Date(e):a.deepCopy(g,e):b[f]=e)}return b};a.deepCreate=function(b,c){c=c||{};var f=q.delegate(b),g,e;for(g in b)(e=b[g])&&"object"===typeof e&&(f[g]=a.deepCreate(e,c[g]));return a.deepCopy(f,c)};var r=Object.freeze||function(b){return b};a.deferred=function(c,k,l,t,u,p){var d=new e(function(m){k&&k(d,c);return m&&(m instanceof h||m instanceof n)?m:new n("Request canceled",
c)});d.response=c;d.isValid=l;d.isReady=t;d.handleResponse=u;l=d.then(b).otherwise(function(d){d.response=c;throw d;});a.notify&&l.then(q.hitch(a.notify,"emit","load"),q.hitch(a.notify,"emit","error"));t=l.then(f);u=new g;for(var m in t)t.hasOwnProperty(m)&&(u[m]=t[m]);u.response=l;r(u);p&&d.then(function(m){p.call(d,m)},function(m){p.call(d,c,m)});d.promise=u;d.then=u.then;return d};a.addCommonMethods=function(b,c){l.forEach(c||["GET","POST","PUT","DELETE"],function(c){b[("DELETE"===c?"DEL":c).toLowerCase()]=
function(a,f){f=q.delegate(f||{});f.method=c;return b(a,f)}})};a.parseArgs=function(b,c,a){var f=c.data,g=c.query;!f||a||"object"!==typeof f||f instanceof ArrayBuffer||f instanceof Blob||(c.data=k.objectToQuery(f));g?("object"===typeof g&&(g=k.objectToQuery(g)),c.preventCache&&(g+=(g?"\x26":"")+"request.preventCache\x3d"+ +new Date)):c.preventCache&&(g="request.preventCache\x3d"+ +new Date);b&&g&&(b+=(~b.indexOf("?")?"\x26":"?")+g);return{url:b,options:c,getHeader:function(b){return null}}};a.checkStatus=
function(b){b=b||0;return 200<=b&&300>b||304===b||1223===b||!b}})},"dojo/errors/RequestError":function(){define(["./create"],function(a){return a("RequestError",function(a,n){this.response=n})})},"dojo/errors/RequestTimeoutError":function(){define(["./create","./RequestError"],function(a,h){return a("RequestTimeoutError",null,h,{dojoType:"timeout"})})},"dojo/request/xhr":function(){define(["../errors/RequestError","./watch","./handlers","./util","../has"],function(a,h,n,e,k){function l(b,c){var p=
b.xhr;b.status=b.xhr.status;try{b.text=p.responseText}catch(m){}"xml"===b.options.handleAs&&(b.data=p.responseXML);if(!c)try{n(b)}catch(m){c=m}var d;if(c)this.reject(c);else{try{n(b)}catch(m){d=m}e.checkStatus(p.status)?d?this.reject(d):this.resolve(b):(c=d?new a("Unable to load "+b.url+" status: "+p.status+" and an error in handleAs: transformation of response",b):new a("Unable to load "+b.url+" status: "+p.status,b),this.reject(c))}}function q(b){return this.xhr.getResponseHeader(b)}function g(t,
u,p){var d=u&&u.data&&u.data instanceof FormData,m=e.parseArgs(t,e.deepCreate(w,u),d);t=m.url;u=m.options;var y=!u.data&&"POST"!==u.method&&"PUT"!==u.method;10>=k("ie")&&(t=t.split("#")[0]);var z,n=e.deferred(m,v,b,f,l,function(){z&&z()}),C=m.xhr=g._create();if(!C)return n.cancel(new a("XHR was not created")),p?n:n.promise;m.getHeader=q;r&&(z=r(C,n,m));var G="undefined"===typeof u.data?null:u.data,J=!u.sync,E=u.method;try{C.open(E,t,J,u.user||x,u.password||x);u.withCredentials&&(C.withCredentials=
u.withCredentials);u.handleAs in c&&(C.responseType=c[u.handleAs]);var K=u.headers;t=d||y?!1:"application/x-www-form-urlencoded";if(K)for(var R in K)"content-type"===R.toLowerCase()?t=K[R]:K[R]&&C.setRequestHeader(R,K[R]);t&&!1!==t&&C.setRequestHeader("Content-Type",t);K&&"X-Requested-With"in K||C.setRequestHeader("X-Requested-With","XMLHttpRequest");e.notify&&e.notify.emit("send",m,n.promise.cancel);C.send(G)}catch(Z){n.reject(Z)}h(n);C=null;return p?n:n.promise}k.add("dojo-force-activex-xhr",function(){return 0});
var c={blob:"blob",document:"document",arraybuffer:"arraybuffer"},b,f,r,v;b=function(b){return!this.isFulfilled()};v=function(b,c){c.xhr.abort()};r=function(b,c,p){function d(d){c.handleResponse(p)}function m(d){d=new a("Unable to load "+p.url+" status: "+d.target.status,p);c.handleResponse(p,d)}function f(d){d.lengthComputable?(p.loaded=d.loaded,p.total=d.total,c.progress(p)):3===p.xhr.readyState&&(p.loaded="loaded"in d?d.loaded:d.position,c.progress(p))}b.addEventListener("load",d,!1);b.addEventListener("error",
m,!1);b.addEventListener("progress",f,!1);return function(){b.removeEventListener("load",d,!1);b.removeEventListener("error",m,!1);b.removeEventListener("progress",f,!1);b=null}};var x,w={data:null,query:null,sync:!1,method:"GET"};g._create=function(){throw Error("XMLHTTP not available");};k("dojo-force-activex-xhr")||(g._create=function(){return new XMLHttpRequest});e.addCommonMethods(g);return g})},"dojo/request/handlers":function(){define(["../json","../_base/kernel","../_base/array","../has",
"../has!dom?../selector/_loader"],function(a,h,n,e){function k(a){var g=l[a.options.handleAs];a.data=g?g(a):a.data||a.text;return a}n=function(a){return a.xhr.response};var l={javascript:function(a){return h.eval(a.text||"")},json:function(e){return a.parse(e.text||null)},xml:void 0,blob:n,arraybuffer:n,document:n};k.register=function(a,g){l[a]=g};return k})},"dojo/_base/fx":function(){define("./kernel ./config ./lang ../Evented ./Color ../aspect ../sniff ../dom ../dom-style".split(" "),function(a,
h,n,e,k,l,q,g,c){var b=n.mixin,f={},r=f._Line=function(d,m){this.start=d;this.end=m};r.prototype.getValue=function(d){return(this.end-this.start)*d+this.start};var v=f.Animation=function(d){b(this,d);n.isArray(this.curve)&&(this.curve=new r(this.curve[0],this.curve[1]))};v.prototype=new e;n.extend(v,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){var d=this._percent,m=this.easing;return m?m(d):d},_fire:function(d,m){m=m||[];if(this[d])if(h.debugAtAllCosts)this[d].apply(this,
m);else try{this[d].apply(this,m)}catch(y){console.error("exception in animation handler for:",d),console.error(y)}return this},play:function(d,m){this._delayTimer&&this._clearTimer();if(m)this._stopTimer(),this._active=this._paused=!1,this._percent=0;else if(this._active&&!this._paused)return this;this._fire("beforeBegin",[this.node]);d=d||this.delay;m=n.hitch(this,"_play",m);if(0<d)return this._delayTimer=setTimeout(m,d),this;m();return this},_play:function(d){this._delayTimer&&this._clearTimer();
this._startTime=(new Date).valueOf();this._paused&&(this._startTime-=this.duration*this._percent);this._active=!0;this._paused=!1;d=this.curve.getValue(this._getStep());this._percent||(this._startRepeatCount||(this._startRepeatCount=this.repeat),this._fire("onBegin",[d]));this._fire("onPlay",[d]);this._cycle();return this},pause:function(){this._delayTimer&&this._clearTimer();this._stopTimer();if(!this._active)return this;this._paused=!0;this._fire("onPause",[this.curve.getValue(this._getStep())]);
return this},gotoPercent:function(d,m){this._stopTimer();this._active=this._paused=!0;this._percent=d;m&&this.play();return this},stop:function(d){this._delayTimer&&this._clearTimer();if(!this._timer)return this;this._stopTimer();d&&(this._percent=1);this._fire("onStop",[this.curve.getValue(this._getStep())]);this._active=this._paused=!1;return this},destroy:function(){this.stop()},status:function(){return this._active?this._paused?"paused":"playing":"stopped"},_cycle:function(){if(this._active){var d=
(new Date).valueOf(),d=0===this.duration?1:(d-this._startTime)/this.duration;1<=d&&(d=1);this._percent=d;this.easing&&(d=this.easing(d));this._fire("onAnimate",[this.curve.getValue(d)]);1>this._percent?this._startTimer():(this._active=!1,0<this.repeat?(this.repeat--,this.play(null,!0)):-1==this.repeat?this.play(null,!0):this._startRepeatCount&&(this.repeat=this._startRepeatCount,this._startRepeatCount=0),this._percent=0,this._fire("onEnd",[this.node]),!this.repeat&&this._stopTimer())}return this},
_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer}});var x=0,w=null,t={run:function(){}};n.extend(v,{_startTimer:function(){this._timer||(this._timer=l.after(t,"run",n.hitch(this,"_cycle"),!0),x++);w||(w=setInterval(n.hitch(t,"run"),this.rate))},_stopTimer:function(){this._timer&&(this._timer.remove(),this._timer=null,x--);0>=x&&(clearInterval(w),w=null,x=0)}});var u=q("ie")?function(d){var m=d.style;m.width.length||"auto"!=c.get(d,"width")||(m.width="auto")}:function(){};
f._fade=function(d){d.node=g.byId(d.node);var m=b({properties:{}},d);d=m.properties.opacity={};d.start="start"in m?m.start:function(){return+c.get(m.node,"opacity")||0};d.end=m.end;d=f.animateProperty(m);l.after(d,"beforeBegin",n.partial(u,m.node),!0);return d};f.fadeIn=function(d){return f._fade(b({end:1},d))};f.fadeOut=function(d){return f._fade(b({end:0},d))};f._defaultEasing=function(d){return.5+Math.sin((d+1.5)*Math.PI)/2};var p=function(d){this._properties=d;for(var m in d){var b=d[m];b.start instanceof
k&&(b.tempColor=new k)}};p.prototype.getValue=function(d){var m={},b;for(b in this._properties){var c=this._properties[b],p=c.start;p instanceof k?m[b]=k.blendColors(p,c.end,d,c.tempColor).toCss():n.isArray(p)||(m[b]=(c.end-p)*d+p+("opacity"!=b?c.units||"px":0))}return m};f.animateProperty=function(d){var m=d.node=g.byId(d.node);d.easing||(d.easing=a._defaultEasing);d=new v(d);l.after(d,"beforeBegin",n.hitch(d,function(){var d={},a;for(a in this.properties){var f=function(d,m){var b={height:d.offsetHeight,
width:d.offsetWidth}[m];if(void 0!==b)return b;b=c.get(d,m);return"opacity"==m?+b:e?b:parseFloat(b)};if("width"==a||"height"==a)this.node.display="block";var g=this.properties[a];n.isFunction(g)&&(g=g(m));g=d[a]=b({},n.isObject(g)?g:{end:g});n.isFunction(g.start)&&(g.start=g.start(m));n.isFunction(g.end)&&(g.end=g.end(m));var e=0<=a.toLowerCase().indexOf("color");"end"in g?"start"in g||(g.start=f(m,a)):g.end=f(m,a);e?(g.start=new k(g.start),g.end=new k(g.end)):g.start="opacity"==a?+g.start:parseFloat(g.start)}this.curve=
new p(d)}),!0);l.after(d,"onAnimate",n.hitch(c,"set",d.node),!0);return d};f.anim=function(d,m,b,c,a,p){return f.animateProperty({node:d,duration:b||v.prototype.duration,properties:m,easing:c,onEnd:a}).play(p||0)};b(a,f);a._Animation=v;return f})},"dojo/_base/Color":function(){define(["./kernel","./lang","./array","./config"],function(a,h,n,e){var k=a.Color=function(a){a&&this.setColor(a)};k.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,
0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:e.transparentColor||[0,0,0,0]};h.extend(k,{r:255,g:255,b:255,a:1,_set:function(a,e,g,c){this.r=a;this.g=e;this.b=g;this.a=c},setColor:function(a){h.isString(a)?k.fromString(a,this):h.isArray(a)?k.fromArray(a,this):(this._set(a.r,a.g,a.b,a.a),a instanceof k||this.sanitize());return this},sanitize:function(){return this},
toRgb:function(){return[this.r,this.g,this.b]},toRgba:function(){return[this.r,this.g,this.b,this.a]},toHex:function(){return"#"+n.map(["r","g","b"],function(a){a=this[a].toString(16);return 2>a.length?"0"+a:a},this).join("")},toCss:function(a){var e=this.r+", "+this.g+", "+this.b;return(a?"rgba("+e+", "+this.a:"rgb("+e)+")"},toString:function(){return this.toCss(!0)}});k.blendColors=a.blendColors=function(a,e,g,c){var b=c||new k;n.forEach(["r","g","b","a"],function(c){b[c]=a[c]+(e[c]-a[c])*g;"a"!=
c&&(b[c]=Math.round(b[c]))});return b.sanitize()};k.fromRgb=a.colorFromRgb=function(a,e){return(a=a.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/))&&k.fromArray(a[1].split(/\s*,\s*/),e)};k.fromHex=a.colorFromHex=function(a,e){var g=e||new k,c=4==a.length?4:8,b=(1<<c)-1;a=Number("0x"+a.substr(1));if(isNaN(a))return null;n.forEach(["b","g","r"],function(f){var e=a&b;a>>=c;g[f]=4==c?17*e:e});g.a=1;return g};k.fromArray=a.colorFromArray=function(a,e){e=e||new k;e._set(Number(a[0]),Number(a[1]),Number(a[2]),
Number(a[3]));isNaN(e.a)&&(e.a=1);return e.sanitize()};k.fromString=a.colorFromString=function(a,e){var g=k.named[a];return g&&k.fromArray(g,e)||k.fromRgb(a,e)||k.fromHex(a,e)};return k})},"esri/core/request/script":function(){define("require exports dojo/Deferred dojo/request/script dojo/text!./iframe.html ../sniff".split(" "),function(a,h,n,e,k,l){function q(){var b=document.createElement("iframe");b.name="esri_core_jsonp_iframe";b.style.display="none";b.setAttribute("sandbox","allow-scripts");
var c=a.toUrl("./iframe.html");"http:"===window.location.protocol&&0===c.indexOf("https:")&&(c=c.replace("https:","http:"));b.src=c;document.body.appendChild(b);return b}function g(){var b=new MessageChannel;b.port1.addEventListener("message",c);b.port1.start();return b}function c(b){var c=b.data;if("ready"===c){for(var c=0,d=w;c<d.length;c++)b=d[c],f(b,v);w=null}else if(b=t[c.id])delete t[c.id],c.isError?b.dfd.reject(Error(c.message)):b.dfd.resolve(c.response)}function b(b,c){b.addEventListener("load",
function(){b.contentWindow.postMessage("init","*",[c.port2])})}function f(b,c){t[b.message.id]=b;c.port1.postMessage(b.message)}Object.defineProperty(h,"__esModule",{value:!0});var r,v,x=0,w=[],t={};h.get=function(c,a){if(!l("esri-script-sandbox"))return e.get(c,a);var d=null;a&&(d={jsonp:a.jsonp,preventCache:a.preventCache,query:a.query,timeout:a.timeout});a=new n(function(){if(w){var d=w.indexOf(m);-1<d&&w.splice(d,1)}else m.message.id in t&&delete t[m.message.id]});var m={dfd:a,message:{id:"id"+
(++x+Math.random()),url:c,options:d}};r||(r=q(),v=g(),b(r,v));w?w.push(m):f(m,v);return a.promise}})},"dojo/request/script":function(){define("module ./watch ./util ../_base/kernel ../_base/array ../_base/lang ../on ../dom ../dom-construct ../has ../_base/window".split(" "),function(a,h,n,e,k,l,q,g,c,b,f){function r(d,m){d.canDelete&&u._remove(d.id,m.options.frameDoc,!0)}function v(d){z&&z.length&&(k.forEach(z,function(d){u._remove(d.id,d.frameDoc);d.frameDoc=null}),z=[]);return d.options.jsonp?!d.data:
!0}function x(d){return!!this.scriptLoaded}function w(d){return(d=d.options.checkString)&&eval("typeof("+d+') !\x3d\x3d "undefined"')}function t(d,m){if(this.canDelete){var b=this.response.options;z.push({id:this.id,frameDoc:b.ioArgs?b.ioArgs.frameDoc:b.frameDoc});b.ioArgs&&(b.ioArgs.frameDoc=null);b.frameDoc=null}m?this.reject(m):this.resolve(d)}function u(b,c,a){var f=n.parseArgs(b,n.deepCopy({},c));b=f.url;c=f.options;var g=n.deferred(f,r,v,c.jsonp?null:c.checkString?w:x,t);l.mixin(g,{id:p+d++,
canDelete:!1});c.jsonp&&((new RegExp("[?\x26]"+c.jsonp+"\x3d")).test(b)||(b+=(~b.indexOf("?")?"\x26":"?")+c.jsonp+"\x3d"+(c.frameDoc?"parent.":"")+p+"_callbacks."+g.id),g.canDelete=!0,y[g.id]=function(d){f.data=d;g.handleResponse(f)});n.notify&&n.notify.emit("send",f,g.promise.cancel);if(!c.canAttach||c.canAttach(g)){var e=u._attach(g.id,b,c.frameDoc,function(d){if(!(d instanceof Error)){var m=Error("Error loading "+(d.target?d.target.src:"script"));m.source=d;d=m}g.reject(d);u._remove(g.id,c.frameDoc,
!0)});if(!c.jsonp&&!c.checkString)var k=q(e,"readystatechange",function(d){if("load"===d.type||m.test(e.readyState))k.remove(),g.scriptLoaded=d})}h(g);return a?g:g.promise}var p=a.id.replace(/[\/\.\-]/g,"_"),d=0,m=/complete|loaded/,y=e.global[p+"_callbacks"]={},z=[];u.get=u;u._attach=function(d,m,b,c){b=b||f.doc;var a=b.createElement("script");if(c)q.once(a,"error",c);a.type="text/javascript";try{a.src=m}catch(K){c&&c(a)}a.id=d;a.async=!0;a.charset="utf-8";return b.getElementsByTagName("head")[0].appendChild(a)};
u._remove=function(d,m,b){c.destroy(g.byId(d,m));y[d]&&(b?y[d]=function(){delete y[d]}:delete y[d])};u._callbacksProperty=p+"_callbacks";return u})},"dojo/text":function(){define(["./_base/kernel","require","./has","./has!host-browser?./request"],function(a,h,n,e){var k;n("host-browser")?k=function(b,c,a){e(b,{sync:!!c,headers:{"X-Requested-With":null}}).then(a)}:h.getText?k=h.getText:console.error("dojo/text plugin failed to load because loader does not support getText");var l={},q=function(b){if(b){b=
b.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var c=b.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);c&&(b=c[1])}else b="";return b},g={},c={};a.cache=function(b,c,a){var f;"string"==typeof b?/\//.test(b)?(f=b,a=c):f=h.toUrl(b.replace(/\./g,"/")+(c?"/"+c:"")):(f=b+"",a=c);b=void 0!=a&&"string"!=typeof a?a.value:a;a=a&&a.sanitize;if("string"==typeof b)return l[f]=b,a?q(b):b;if(null===b)return delete l[f],null;f in l||k(f,!0,function(b){l[f]=b});return a?q(l[f]):l[f]};return{dynamic:!0,
normalize:function(b,c){b=b.split("!");var a=b[0];return(/^\./.test(a)?c(a):a)+(b[1]?"!"+b[1]:"")},load:function(b,a,e){b=b.split("!");var f=1<b.length,r=b[0],h=a.toUrl(b[0]);b="url:"+h;var t=g,u=function(d){e(f?q(d):d)};r in l?t=l[r]:a.cache&&b in a.cache?t=a.cache[b]:h in l&&(t=l[h]);if(t===g)if(c[h])c[h].push(u);else{var p=c[h]=[u];k(h,!a.async,function(d){l[r]=l[h]=d;for(var m=0;m<p.length;)p[m++](d);delete c[h]})}else u(t)}}})},"esri/core/sniff":function(){define(["dojo/_base/window","dojo/sniff",
"../kernel"],function(a,h,n){function e(){if(v)return v;v={available:!1,version:0,supportsHighPrecisionFragment:!1};var b=function(b,a){for(var d=["webgl","experimental-webgl","webkit-3d","moz-webgl"],m=null,c=0;c<d.length;++c){try{m=b.getContext(d[c],a)}catch(z){}if(m)break}return m},c;try{if(!f.WebGLRenderingContext)throw 0;c=document.createElement("canvas")}catch(u){return v}var a=b(c,{failIfMajorPerformanceCaveat:!0});!a&&(a=b(c))&&(v.majorPerformanceCaveat=!0);if(!a)return v;b=a.getParameter(a.VERSION);
if(!b)return v;if(b=b.match(/^WebGL\s+([\d.]*)/))v.version=parseFloat(b[1]),v.available=.94<=v.version,b=a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.HIGH_FLOAT),v.supportsHighPrecisionFragment=b&&0<b.precision,v.supportsVertexShaderSamplers=0<a.getParameter(a.MAX_VERTEX_TEXTURE_IMAGE_UNITS),v.supportsElementIndexUint=null!=a.getExtension("OES_element_index_uint");return v}var k=h("ie"),l=void 0===k&&!1,q=h("webkit"),g=h("opera"),c=h("chrome"),b=h("safari"),f=a.global;a=navigator.userAgent;var r;
(r=a.match(/(iPhone|iPad|CPU)\s+OS\s+(\d+\_\d+)/i))&&h.add("esri-iphone",parseFloat(r[2].replace("_",".")));(r=a.match(/Android\s+(\d+\.\d+)/i))&&h.add("esri-android",parseFloat(r[1]));(r=a.match(/Fennec\/(\d+\.\d+)/i))&&h.add("esri-fennec",parseFloat(r[1]));0<=a.indexOf("BlackBerry")&&0<=a.indexOf("WebKit")&&h.add("esri-blackberry",1);h.add("esri-touch",h("esri-iphone")||h("esri-android")||h("esri-blackberry")||6<=h("esri-fennec")||f.document&&f.document.createTouch?!0:!1);(r=a.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i))&&
h.add("esri-mobile",r);h.add("esri-pointer",navigator.pointerEnabled||navigator.msPointerEnabled);n._getDOMAccessor=function(b){return"Moz"+b.charAt(0).toUpperCase()+b.substr(1)};h.add("esri-phonegap",!!f.cordova);h.add("esri-cors",h("esri-phonegap")||"XMLHttpRequest"in f&&"withCredentials"in new XMLHttpRequest);h.add("esri-canvas-svg-support",function(){return!h("ie")});h.add("esri-wasm","WebAssembly"in f);if(h("host-webworker"))return h;h.add("esri-workers","Worker"in f);h.add("esri-script-sandbox",
function(){return"MessageChannel"in f&&"HTMLIFrameElement"in f&&"sandbox"in HTMLIFrameElement.prototype});h.add("esri-transforms",l||9<=k||!1||4<=c||3.1<=b||10.5<=g||3.2<=h("esri-iphone")||2.1<=h("esri-android"));h.add("esri-transitions",l||10<=k||!1||4<=c||3.1<=b||10.5<=g||3.2<=h("esri-iphone")||2.1<=h("esri-android"));h.add("esri-transforms3d",l||!1||12<=c||4<=b||3.2<=h("esri-iphone")||3<=h("esri-android"));h.add("esri-url-encodes-apostrophe",function(){var b=f.document.createElement("a");b.href=
"?'";return-1<b.href.indexOf("?%27")});3>h("esri-android")&&(h.add("esri-transforms",!1,!1,!0),h.add("esri-transitions",!1,!1,!0),h.add("esri-transforms3d",!1,!1,!0));n._css=function(a){var f=h("esri-transforms3d");void 0!==a&&null!==a?f=a:f&&(c||b&&!h("esri-iphone"))&&(f=!1);var g=f?"translate3d(":"translate(",e=f?c?",-1px)":",0px)":")",p=f?"scale3d(":"scale(",d=f?",1)":")",m=f?"rotate3d(0,0,1,":"rotate(",y=f?"matrix3d(":"matrix(",k=f?",0,0,":",",l=f?",0,0,0,0,1,0,":",",r=f?",0,1)":")";return{names:{transition:q&&
"-webkit-transition"||"MozTransition",transform:q&&"-webkit-transform"||"MozTransform",transformName:q&&"-webkit-transform"||"-moz-transform",origin:q&&"-webkit-transform-origin"||"MozTransformOrigin",endEvent:q&&"webkitTransitionEnd"||"transitionend"},translate:function(d,m){return g+d+"px,"+m+"px"+e},scale:function(m){return p+m+","+m+d},rotate:function(d){return m+d+"deg)"},matrix:function(d){return d.m?(d=d.m,y+d[0].toFixed(10)+","+d[1].toFixed(10)+k+d[2].toFixed(10)+","+d[3].toFixed(10)+l+d[4].toFixed(10)+
"px,"+d[5].toFixed(10)+"px"+r):y+d.xx.toFixed(10)+","+d.yx.toFixed(10)+k+d.xy.toFixed(10)+","+d.yy.toFixed(10)+l+d.dx.toFixed(10)+"px,"+d.dy.toFixed(10)+"px"+r},matrix3d:function(d){d=d.m;return"matrix3d("+d[0].toFixed(10)+","+d[1].toFixed(10)+",0,0,"+d[2].toFixed(10)+","+d[3].toFixed(10)+",0,0,0,0,1,0,"+d[4].toFixed(10)+","+d[5].toFixed(10)+",0,1)"},getScaleFromMatrix:function(d){if(!d)return 1;d=d.toLowerCase();var m=-1<d.indexOf("matrix3d")?"matrix3d(":"matrix(";return Number(d.substring(m.length,
d.indexOf(",")))}}};var v;h.add("esri-webgl",function(){return!!e().available});h.add("esri-webgl-high-precision-fragment",function(){return!!e().supportsHighPrecisionFragment});h.add("esri-webgl-vertex-shader-samplers",function(){return!!e().supportsVertexShaderSamplers});h.add("esri-webgl-element-index-uint",function(){return!!e().supportsElementIndexUint});h.add("esri-webgl-major-performance-caveat",function(){return!!e().majorPerformanceCaveat});return h})},"esri/kernel":function(){define(["require",
"./core/requireUtils","dojo/main","dojo/has"],function(a,h,n,e){(function(){var a=n.config,l=a.has&&void 0!==a.has["config-deferredInstrumentation"],q=a.has&&void 0!==a.has["config-useDeferredInstrumentation"];void 0!==a.useDeferredInstrumentation||l||q||(e.add("config-deferredInstrumentation",!1,!0,!0),e.add("config-useDeferredInstrumentation",!1,!0,!0))})();return{version:"4.6",workerMessages:{request:function(e){return h.when(a,"./request").then(function(a){var k=e.options||{};k.responseType="array-buffer";
return a(e.url,k)}).then(function(a){return{data:{data:a.data,ssl:a.ssl},buffers:[a.data]}})}}}})},"esri/core/requireUtils":function(){define(["require","exports","dojo/Deferred"],function(a,h,n){function e(a,l){if(Array.isArray(l)){var k=new n;a(l,function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];k.resolve(a)});return k.promise}return e(a,[l]).then(function(a){return a[0]})}Object.defineProperty(h,"__esModule",{value:!0});h.when=e;h.getAbsMid=function(a,e,h){return e.toAbsMid?
e.toAbsMid(a):h.id.replace(/\/[^\/]*$/ig,"/")+a}})},"dojo/main":function(){define("./_base/kernel ./has require ./sniff ./_base/lang ./_base/array ./_base/config ./ready ./_base/declare ./_base/connect ./_base/Deferred ./_base/json ./_base/Color require ./has!host-browser?./_base/browser require".split(" "),function(a,h,n,e,k,l,q,g){q.isDebug&&n(["./_firebug/firebug"]);return a})},"dojo/_base/declare":function(){define(["./kernel","../has","./lang"],function(a,h,n){function e(d,m){throw Error("declare"+
(m?" "+m:"")+": "+d);}function k(d,m){for(var b=[],a=[{cls:0,refs:[]}],c={},p=1,f=d.length,g=0,y,k,l,u,r;g<f;++g){(y=d[g])?"[object Function]"!=z.call(y)&&e("mixin #"+g+" is not a callable constructor.",m):e("mixin #"+g+" is unknown. Did you use dojo.require to pull it in?",m);k=y._meta?y._meta.bases:[y];l=0;for(y=k.length-1;0<=y;--y)u=k[y].prototype,u.hasOwnProperty("declaredClass")||(u.declaredClass="uniqName_"+C++),u=u.declaredClass,c.hasOwnProperty(u)||(c[u]={count:0,refs:[],cls:k[y]},++p),u=
c[u],l&&l!==u&&(u.refs.push(l),++l.count),l=u;++l.count;a[0].refs.push(l)}for(;a.length;){l=a.pop();b.push(l.cls);for(--p;r=l.refs,1==r.length;){l=r[0];if(!l||--l.count){l=0;break}b.push(l.cls);--p}if(l)for(g=0,f=r.length;g<f;++g)l=r[g],--l.count||a.push(l)}p&&e("can't build consistent linearization",m);y=d[0];b[0]=y?y._meta&&y===b[b.length-y._meta.bases.length]?y._meta.bases.length:1:0;return b}function l(d,m,b,a){var c,p,f,g,k,l,u=this._inherited=this._inherited||{};"string"===typeof d&&(c=d,d=
m,m=b,b=a);if("function"===typeof d)f=d,d=m,m=b;else try{f=d.callee}catch(M){if(M instanceof TypeError)e("strict mode inherited() requires the caller function to be passed before arguments",this.declaredClass);else throw M;}(c=c||f.nom)||e("can't deduce a name to call inherited()",this.declaredClass);b=a=0;g=this.constructor._meta;a=g.bases;l=u.p;if("constructor"!=c){if(u.c!==f&&(l=0,k=a[0],g=k._meta,g.hidden[c]!==f)){(p=g.chains)&&"string"==typeof p[c]&&e("calling chained method with inherited: "+
c,this.declaredClass);do if(g=k._meta,p=k.prototype,g&&(p[c]===f&&p.hasOwnProperty(c)||g.hidden[c]===f))break;while(k=a[++l]);l=k?l:-1}if(k=a[++l])if(p=k.prototype,k._meta&&p.hasOwnProperty(c))b=p[c];else{f=y[c];do if(p=k.prototype,(b=p[c])&&(k._meta?p.hasOwnProperty(c):b!==f))break;while(k=a[++l])}b=k&&b||y[c]}else{if(u.c!==f&&(l=0,(g=a[0]._meta)&&g.ctor!==f)){for((p=g.chains)&&"manual"===p.constructor||e("calling chained constructor with inherited",this.declaredClass);(k=a[++l])&&(!(g=k._meta)||
g.ctor!==f););l=k?l:-1}for(;(k=a[++l])&&!(b=(g=k._meta)?g.ctor:k););b=k&&b}u.c=b;u.p=l;if(b)return!0===m?b:b.apply(this,m||d)}function q(d,m,b){return"string"===typeof d?"function"===typeof m?this.__inherited(d,m,b,!0):this.__inherited(d,m,!0):"function"===typeof d?this.__inherited(d,m,!0):this.__inherited(d,!0)}function g(d,m,b,a){var c=this.getInherited(d,m,b);if(c)return c.apply(this,a||b||m||d)}function c(d){for(var m=this.constructor._meta.bases,b=0,a=m.length;b<a;++b)if(m[b]===d)return!0;return this instanceof
d}function b(d,m){for(var b in m)"constructor"!=b&&m.hasOwnProperty(b)&&(d[b]=m[b])}function f(m){d.safeMixin(this.prototype,m);return this}function r(m,b){m instanceof Array||"function"===typeof m||(b=m,m=void 0);b=b||{};m=m||[];return d([this].concat(m),b)}function v(d,m){return function(){var b=arguments,a=b,c=b[0],f,g;g=d.length;var e;if(!(this instanceof b.callee))return p(b);if(m&&(c&&c.preamble||this.preamble))for(e=Array(d.length),e[0]=b,f=0;;){(c=b[0])&&(c=c.preamble)&&(b=c.apply(this,b)||
b);c=d[f].prototype;(c=c.hasOwnProperty("preamble")&&c.preamble)&&(b=c.apply(this,b)||b);if(++f==g)break;e[f]=b}for(f=g-1;0<=f;--f)c=d[f],(c=(g=c._meta)?g.ctor:c)&&c.apply(this,e?e[f]:b);(c=this.postscript)&&c.apply(this,a)}}function x(d,m){return function(){var b=arguments,a=b,c=b[0];if(!(this instanceof b.callee))return p(b);m&&(c&&(c=c.preamble)&&(a=c.apply(this,a)||a),(c=this.preamble)&&c.apply(this,a));d&&d.apply(this,b);(c=this.postscript)&&c.apply(this,b)}}function w(d){return function(){var m=
arguments,b=0,a,c;if(!(this instanceof m.callee))return p(m);for(;a=d[b];++b)if(a=(c=a._meta)?c.ctor:a){a.apply(this,m);break}(a=this.postscript)&&a.apply(this,m)}}function t(d,m,b){return function(){var a,c,p=0,f=1;b&&(p=m.length-1,f=-1);for(;a=m[p];p+=f)c=a._meta,(a=(c?c.hidden:a.prototype)[d])&&a.apply(this,arguments)}}function u(d){A.prototype=d.prototype;d=new A;A.prototype=null;return d}function p(d){var m=d.callee,b=u(m);m.apply(b,d);return b}function d(a,p,g){"string"!=typeof a&&(g=p,p=a,
a="");g=g||{};var A,C,J,K,E,D,S,L=1,M=p;"[object Array]"==z.call(p)?(D=k(p,a),J=D[0],L=D.length-J,p=D[L]):(D=[0],p?"[object Function]"==z.call(p)?(J=p._meta,D=D.concat(J?J.bases:p)):e("base class is not a callable constructor.",a):null!==p&&e("unknown base class. Did you use dojo.require to pull it in?",a));if(p)for(C=L-1;;--C){A=u(p);if(!C)break;J=D[C];(J._meta?b:m)(A,J.prototype);K=h("csp-restrictions")?function(){}:new Function;K.superclass=p;K.prototype=A;p=A.constructor=K}else A={};d.safeMixin(A,
g);J=g.constructor;J!==y.constructor&&(J.nom="constructor",A.constructor=J);for(C=L-1;C;--C)(J=D[C]._meta)&&J.chains&&(S=m(S||{},J.chains));A["-chains-"]&&(S=m(S||{},A["-chains-"]));p&&p.prototype&&p.prototype["-chains-"]&&(S=m(S||{},p.prototype["-chains-"]));J=!S||!S.hasOwnProperty("constructor");D[0]=K=S&&"manual"===S.constructor?w(D):1==D.length?x(g.constructor,J):v(D,J);K._meta={bases:D,hidden:g,chains:S,parents:M,ctor:g.constructor};K.superclass=p&&p.prototype;K.extend=f;K.createSubclass=r;K.prototype=
A;A.constructor=K;A.getInherited=q;A.isInstanceOf=c;A.inherited=G;A.__inherited=l;a&&(A.declaredClass=a,n.setObject(a,K));if(S)for(E in S)A[E]&&"string"==typeof S[E]&&"constructor"!=E&&(J=A[E]=t(E,D,"after"===S[E]),J.nom=E);return K}var m=n.mixin,y=Object.prototype,z=y.toString,A,C=0;A=h("csp-restrictions")?function(){}:new Function;var G=a.config.isDebug?g:l;a.safeMixin=d.safeMixin=function(d,m){var b,a;for(b in m)a=m[b],a===y[b]&&b in y||"constructor"==b||("[object Function]"==z.call(a)&&(a.nom=
b),d[b]=a);return d};return a.declare=d})},"esri/Map":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/Accessor ./core/CollectionFlattener ./core/Evented ./core/Logger ./support/LayersMixin ./Basemap ./Ground ./support/basemapUtils ./support/groundUtils ./core/accessorSupport/decorators".split(" "),function(a,h,n,e,k,l,q,g,c,b,f,r,v,x){var w=g.getLogger("esri.Map");return function(a){function c(b){b=a.call(this)||this;b.basemap=null;b.ground=
new f;b._basemapCache=r.createCache();return b}n(c,a);Object.defineProperty(c.prototype,"allLayers",{get:function(){return new l({root:this,rootCollectionNames:["basemap.baseLayers","ground.layers","layers","basemap.referenceLayers"],getChildrenFunction:function(b){return b.layers}})},enumerable:!0,configurable:!0});c.prototype.castBasemap=function(b){return r.ensureType(b,this._basemapCache)};c.prototype.castGround=function(b){b=v.ensureType(b);return b?b:(w.error("Map.ground may not be set to null or undefined"),
this._get("ground"))};e([x.property({readOnly:!0})],c.prototype,"allLayers",null);e([x.property({type:b})],c.prototype,"basemap",void 0);e([x.cast("basemap")],c.prototype,"castBasemap",null);e([x.property({type:f})],c.prototype,"ground",void 0);e([x.cast("ground")],c.prototype,"castGround",null);return c=e([x.subclass("esri.Map")],c)}(x.declared(k,q,c))})},"esri/core/tsSupport/declareExtendsHelper":function(){define(["require","exports"],function(a,h){return function(a,e){a.__bases__=e.__bases__}})},
"esri/core/tsSupport/decorateHelper":function(){define([],function(){return function(a,h,n,e){var k=arguments.length,l=3>k?h:null===e?e=Object.getOwnPropertyDescriptor(h,n):e,q;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)l=Reflect.decorate(a,h,n,e);else for(var g=a.length-1;0<=g;g--)if(q=a[g])l=(3>k?q(l):3<k?q(h,n,l):q(h,n))||l;return 3<k&&l&&Object.defineProperty(h,n,l),l}})},"esri/core/Accessor":function(){define("./declare ./accessorSupport/Properties ./accessorSupport/get ./accessorSupport/introspection ./accessorSupport/set ./accessorSupport/watch".split(" "),
function(a,h,n,e,k,l){h=h.default;a.before(function(g,c){a.hasMixin(g,q)&&e.processPrototype(c)});a.after(function(g){a.hasMixin(g,q)&&(e.processClass(g),Object.defineProperties(g.prototype,{initialized:{get:function(){return this.__accessor__&&this.__accessor__.initialized||!1}},destroyed:{get:function(){return this.__accessor__&&this.__accessor__.destroyed||!1}}}))});var q=a(null,{declaredClass:"esri.core.Accessor","-chains-":{initialize:"after",destroy:"before"},constructor:function(){if(this.constructor===
q)throw Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");Object.defineProperty(this,"__accessor__",{value:new h(this)});if(0<arguments.length&&this.normalizeCtorArgs){for(var a=[],c=0;c<arguments.length;c++)a.push(arguments[c]);this.__accessor__.ctorArgs=this.normalizeCtorArgs.apply(this,a)}},__accessor__:null,postscript:function(a){var c=this.__accessor__;a=c.ctorArgs||a;var b;null!=this.getDefaults&&(b=this.getDefaults(a||{}),this.set(b));c.initialize();
a&&(this.set(a),c.ctorArgs=null);c.constructed();this.initialize()},initialize:function(){},destroy:function(){if(this.destroyed)try{throw Error("instance is already destroyed");}catch(g){console.warn(g.stack)}else l.removeTarget(this),this.__accessor__.destroy()},get:function(a){return n.get(this,a)},hasOwnProperty:function(a){return this.__accessor__?this.__accessor__.has(a):Object.prototype.hasOwnProperty.call(this,a)},keys:function(){return this.__accessor__?this.__accessor__.keys():[]},set:function(a,
c){k.set(this,a,c);return this},watch:function(a,c,b){return l.watch(this,a,c,b)},_clearOverride:function(a){return this.__accessor__.clearOverride(a)},_override:function(a,c){return this.__accessor__.override(a,c)},_isOverridden:function(a){return this.__accessor__.isOverridden(a)},notifyChange:function(a){this.__accessor__.propertyInvalidated(a)},_get:function(a){return this.__accessor__.internalGet(a)},_set:function(a,c){return this.__accessor__.internalSet(a,c)}});return q})},"esri/core/declare":function(){define(["require",
"exports","dojo/_base/declare"],function(a,h,n){function e(a,c){a&&!Array.isArray(a)&&"function"!==typeof a&&(c=a,a=null);a=a||[];c=c||{};return k([this].concat(a),c)}function k(a,c){a&&!Array.isArray(a)&&"function"!==typeof a&&(c=a,a=null);"function"===typeof a?a=[a]:a||(a=[]);c=c||{};var b,f;b=0;for(f=l.length;b<f;b++)l[b](a,c);a=n(a,c);a.createSubclass=e;b=0;for(f=q.length;b<f;b++)q[b](a);return a}var l=[],q=[];(function(a){a.hasMixin=function(a,b){a=Array.isArray(a)?a.reduce(function(b,a){return a._meta?
b.concat(a._meta.bases):b},[]):a._meta?a._meta.bases:a;if(!a)return!1;if("string"===typeof b)for(var c=a.length-1;0<=c;c--)if(a[c].prototype.declaredClass===b)return!0;return-1!==a.indexOf(b)};a.safeMixin=function(a,b){return n.safeMixin(a,b)};a.before=function(a){l.push(a)};a.after=function(a){q.push(a)}})(k||(k={}));return k})},"esri/core/accessorSupport/Properties":function(){define("require exports dojo/has ./Store ./PropertyOrigin ./extensions ../Logger".split(" "),function(a,h,n,e,k,l,q){Object.defineProperty(h,
"__esModule",{value:!0});q.getLogger("esri.core.accessorSupport.Properties");a=function(){function a(a){this.host=a;this._origin=k.OriginId.USER;this.ctorArgs=this.cursors=null;this.destroyed=!1;this.dirties={};this.lifecycle=0;this.overridden=null;this.store=new e.default;a=this.host.constructor.__accessorMetadata__;this.metadatas=a.properties;this.autoDestroy=a.autoDestroy}a.prototype.initialize=function(){this.lifecycle=1;l.instanceCreated(this.host,this.metadatas)};a.prototype.constructed=function(){this.lifecycle=
2};a.prototype.destroy=function(){this.destroyed=!0;var a=this.cursors;if(this.cursors)for(var b=0,f=Object.getOwnPropertyNames(a);b<f.length;b++){var g=f[b],e=a[g];if(e){for(;0<e.length;)e.pop().propertyDestroyed(this,g);a[g]=null}}if(this.autoDestroy)for(g in this.metadatas)(a=this.internalGet(g))&&a&&"function"===typeof a.destroy&&(a.destroy(),this.metadatas[g].nonNullable||this.internalSet(g,null))};Object.defineProperty(a.prototype,"initialized",{get:function(){return 0!==this.lifecycle},enumerable:!0,
configurable:!0});a.prototype.clearOverride=function(a){this.isOverridden(a)&&(this.overridden[a]=!1,this.propertyInvalidated(a))};a.prototype.get=function(a){var b=this.metadatas[a];if(this.store.has(a)&&!this.dirties[a])return this.store.get(a);var c=b.get;return c?(b=c.call(this.host),this.store.set(a,b,k.OriginId.COMPUTED),this.propertyCommitted(a),b):b.value};a.prototype.originOf=function(a){var b=this.store.originOf(a);return void 0===b&&(a=this.metadatas[a])&&a.hasOwnProperty("value")?"defaults":
k.idToName(b)};a.prototype.has=function(a){return this.metadatas[a]?this.store.has(a):!1};a.prototype.internalGet=function(a){if(this.metadatas[a]){var b=this.store;return b.has(a)?b.get(a):this.metadatas[a].value}};a.prototype.internalSet=function(a,b){this.metadatas[a]&&(this.propertyInvalidated(a),this.initialized?this.store.set(a,b,this._origin):this.store.set(a,b,k.OriginId.DEFAULTS),this.propertyCommitted(a))};a.prototype.isOverridden=function(a){return null!=this.overridden&&!0===this.overridden[a]};
a.prototype.keys=function(){return this.store.keys()};a.prototype.override=function(a,b){if(this.metadatas[a]){this.overridden||(this.overridden={});var c=this.metadatas[a];c.nonNullable&&null==b||((c=c.cast)&&(b=c.call(this.host,b)),this.overridden[a]=!0,this.internalSet(a,b))}};a.prototype.set=function(a,b){if(this.metadatas[a]){var c=this.metadatas[a];if(!c.nonNullable||null!=b){var g=c.set;(c=c.cast)&&(b=c.call(this.host,b));g?g.call(this.host,b):this.internalSet(a,b)}}};a.prototype.setDefaultOrigin=
function(a){this._origin=k.nameToId(a)};a.prototype.propertyInvalidated=function(a){var b=this.dirties,c=this.isOverridden(a),g=this.cursors&&this.cursors[a],e=this.metadatas[a].computes;if(g)for(var k=0;k<g.length;k++)g[k].propertyInvalidated(this,a);c||(b[a]=!0);if(e)for(a=0;a<e.length;a++)this.propertyInvalidated(e[a])};a.prototype.propertyCommitted=function(a){var b=this.cursors&&this.cursors[a];this.dirties[a]=!1;if(b)for(var c=0;c<b.length;c++)b[c].propertyCommitted(this,a)};a.prototype.addCursor=
function(a,b){this.cursors||(this.cursors={});var c=this.cursors[a];c||(this.cursors[a]=c=[]);c.push(b)};a.prototype.removeCursor=function(a,b){var c=this.cursors[a];this.cursors[a]&&(c.splice(c.indexOf(b),1),0===c.length&&(this.cursors[a]=null))};return a}();h.default=a})},"esri/core/accessorSupport/Store":function(){define(["require","exports","./PropertyOrigin"],function(a,h,n){Object.defineProperty(h,"__esModule",{value:!0});a=function(){function a(){this._values={}}a.prototype.get=function(a){return this._values[a]};
a.prototype.originOf=function(a){return n.OriginId.USER};a.prototype.keys=function(){return Object.keys(this._values)};a.prototype.set=function(a,e){this._values[a]=e};a.prototype.clear=function(a){delete this._values[a]};a.prototype.has=function(a){return a in this._values};return a}();h.default=a})},"esri/core/accessorSupport/PropertyOrigin":function(){define(["require","exports"],function(a,h){function n(a){switch(a){case "defaults":return k.DEFAULTS;case "service":return k.SERVICE;case "portal-item":return k.PORTAL_ITEM;
case "web-scene":return k.WEB_SCENE;case "web-map":return k.WEB_MAP;case "user":return k.USER}}function e(a){switch(a){case k.DEFAULTS:return"defaults";case k.SERVICE:return"service";case k.PORTAL_ITEM:return"portal-item";case k.WEB_SCENE:return"web-scene";case k.WEB_MAP:return"web-map";case k.USER:return"user"}}Object.defineProperty(h,"__esModule",{value:!0});var k;(function(a){a[a.DEFAULTS=0]="DEFAULTS";a[a.COMPUTED=1]="COMPUTED";a[a.SERVICE=2]="SERVICE";a[a.PORTAL_ITEM=3]="PORTAL_ITEM";a[a.WEB_SCENE=
4]="WEB_SCENE";a[a.WEB_MAP=5]="WEB_MAP";a[a.USER=6]="USER";a[a.NUM=7]="NUM"})(k=h.OriginId||(h.OriginId={}));h.nameToId=n;h.idToName=e;h.readableNameToId=function(a){return n(a)};h.idToReadableName=function(a){return e(a)};h.writableNameToId=function(a){return n(a)};h.idToWritableName=function(a){return e(a)}})},"esri/core/accessorSupport/extensions":function(){define(["require","exports","./extensions/aliasedProperty","./extensions/computedProperty","./extensions/serializableProperty"],function(a,
h,n,e,k){Object.defineProperty(h,"__esModule",{value:!0});var l=[n.default,e.default,k.default];h.processPrototypeMetadatas=function(a,g){for(var c=Object.getOwnPropertyNames(a),b=0;b<l.length;b++){var f=l[b];if(f.processPrototypePropertyMetadata)for(var e=0,k=c;e<k.length;e++){var h=k[e];f.processPrototypePropertyMetadata(h,a[h],a,g)}}};h.processClassMetadatas=function(a,g){for(var c=Object.getOwnPropertyNames(a),b=0;b<l.length;b++){var f=l[b];if(f.processClassPropertyMetadata)for(var e=0,k=c;e<
k.length;e++){var h=k[e];f.processClassPropertyMetadata(h,a[h],a,g)}}};h.instanceCreated=function(a,g){for(var c=Object.getOwnPropertyNames(g),b=0;b<l.length;b++){var f=l[b];f.instanceCreated&&f.instanceCreated(a,g,c)}}})},"esri/core/accessorSupport/extensions/aliasedProperty":function(){define("require exports dojo/has ../wire ../utils ../get ../set".split(" "),function(a,h,n,e,k,l,q){function g(a,b,f){var c=k.getProperties(a);return e.wire(a,f.aliasOf,function(){c.propertyInvalidated(b)})}Object.defineProperty(h,
"__esModule",{value:!0});h.AliasedPropertyExtension={processClassPropertyMetadata:function(a,b,f,g){var c=b.aliasOf;if(c&&(a=c.split(".")[0],null!=f[a]&&!b.set&&!b.get)){var e;b.get=function(){var b=l.default(this,c);if("function"===typeof b){e||(e=c.split(".").slice(0,-1).join("."));var a=l.default(this,e);a&&(b=b.bind(a))}return b};b.readOnly||(b.set=function(b){return q.default(this,c,b)})}},instanceCreated:function(a,b,f){for(var c=0;c<f.length;c++){var e=f[c],k=b[e];k.aliasOf&&g(a,e,k)}}};h.default=
h.AliasedPropertyExtension})},"esri/core/accessorSupport/wire":function(){define(["require","exports","./utils"],function(a,h,n){function e(b,a,e){a=n.splitPath(a);if(Array.isArray(a)){for(var f=[],l=0;l<a.length;l++)f.push((new k(a[l],e)).install(b));return new g(f)}b=(new k(a,e)).install(b);return new c(b)}Object.defineProperty(h,"__esModule",{value:!0});var k=function(){function b(b,a){this.path=b;this.callback=a;this.chain=null;this.path=b;-1<b.indexOf(".")&&(this.chain=n.pathToArray(b));this.callback=
a;return this}b.prototype.install=function(b){b=this.chain?new q(this,b):new l(this,b);return b};b.prototype.notify=function(b){this.callback(b,this.path)};return b}(),l=function(){function b(b,a){this.binding=b;this.target=a;n.getProperties(a).addCursor(this.binding.path,this)}b.prototype.destroy=function(){this.target&&(n.getProperties(this.target).removeCursor(this.binding.path,this),this.target=this.binding=null)};b.prototype.propertyDestroyed=function(b,a){n.getProperties(this.target).removeCursor(a,
this)};b.prototype.propertyInvalidated=function(b,a){this.binding&&this.binding.notify(this.target)};b.prototype.propertyCommitted=function(b,a){this.binding&&this.binding.notify(this.target)};return b}(),q=function(){function b(b,a){this.binding=b;this.target=a;this.stack=[];this.properties=n.getProperties(a);this.stack.push({properties:this.properties,propertyName:b.chain[0]});this.properties.addCursor(b.chain[0],this);this.moveForward();return this}b.prototype.destroy=function(){for(;;){var b=
this.stack.pop();if(null==b)break;b.properties.removeCursor(b.propertyName,this)}this.target=this.binding=null};b.prototype.propertyDestroyed=function(b,a){this.moveBackward(b,a)};b.prototype.propertyInvalidated=function(b,a){this.binding&&this.binding.notify(this.target)};b.prototype.propertyCommitted=function(b,a){this.binding&&(this.moveBackward(b,a),this.moveForward(),this.binding.notify(this.target))};b.prototype.moveBackward=function(b,a){for(var c=this.stack,f=c[c.length-1];f.properties!==
b&&f.propertyName!==a;)f.properties.removeCursor(f.propertyName,this),c.pop(),f=c[c.length-1]};b.prototype.moveForward=function(){var b=this.stack,a=b[b.length-1],a=a.properties.internalGet(a.propertyName);(a=n.getProperties(a))&&b.length<this.binding.chain.length&&(b=this.binding.chain[b.length],this.stack.push({properties:a,propertyName:b}),a.addCursor(b,this),this.moveForward())};return b}(),g=function(){function b(b){this.cursors=b}b.prototype.remove=function(){for(var b=this.cursors;0<b.length;)b.pop().destroy();
this.cursors=null};return b}(),c=function(){function b(b){this.cursor=b}b.prototype.remove=function(){this.cursor.destroy();this.cursor=null};return b}();h.create=function(b,a){b=n.splitPath(b);if(Array.isArray(b)){for(var f=[],e=0;e<b.length;e++)f.push(new k(b[e],a));return function(b){for(var a=[],c=0;c<f.length;c++)a[c]=f[c].install(b);return new g(a)}}var l=new k(b,a);return function(b){return new c(l.install(b))}};h.wire=e;h.default=e})},"esri/core/accessorSupport/utils":function(){define(["require",
"exports","../lang"],function(a,h,n){function e(a,c){return c?Object.keys(c).reduce(function(b,a){if("value"===a)return b[a]=c[a],b;if(void 0===b[a])return b[a]=n.clone(c[a]),b;var f=b[a],g=c[a];if(f===g)return b;if(Array.isArray(g)||Array.isArray(b))f=f?Array.isArray(f)?b[a]=f.concat():b[a]=[f]:b[a]=[],g&&(Array.isArray(g)||(g=[g]),g.forEach(function(b){-1===f.indexOf(b)&&f.push(b)}));else if(g&&"object"===typeof g)b[a]=e(f,g);else if(!b.hasOwnProperty(a)||c.hasOwnProperty(a))b[a]=g;return b},a||
{}):a}function k(a){return Array.isArray(a)?a:a.split(".")}function l(a){if(Array.isArray(a)||-1<a.indexOf(",")){a=Array.isArray(a)?a:a.split(",");for(var c=0;c<a.length;c++)a[c]=a[c].trim();return 1===a.length?a[0]:a}return a.trim()}function q(a){var c=!1;return function(){c||(c=!0,a())}}Object.defineProperty(h,"__esModule",{value:!0});h.getProperties=function(a){return a?a.__accessor__?a.__accessor__:a.propertyInvalidated?a:null:null};h.isPropertyDeclared=function(a,c){return a&&a.metadatas&&null!=
a.metadatas[c]};h.merge=e;h.pathToStringOrArray=function(a){return a?"string"===typeof a&&-1===a.indexOf(".")?a:k(a):a};h.pathToArray=k;h.splitPath=l;h.parse=function(a,c,b,f){c=l(c);if(Array.isArray(c)){var g=c.map(function(c){return f(a,c.trim(),b)});return{remove:q(function(){return g.forEach(function(a){return a.remove()})})}}return f(a,c.trim(),b)};h.once=q})},"esri/core/lang":function(){define("dojo/_base/array dojo/_base/kernel dojo/_base/lang dojo/date dojo/number dojo/date/locale dojo/i18n!../nls/common".split(" "),
function(a,h,n,e,k,l,q){function g(a){return void 0!==a&&null!==a}function c(a){return g(a)?a:""}function b(b,f,u){var p=u.match(/([^\(]+)(\([^\)]+\))?/i),d=n.trim(p[1]);u=f[b];var p=JSON.parse((p[2]?n.trim(p[2]):"{}").replace(/^\(/,"{").replace(/\)$/,"}").replace(/([{,])\s*([0-9a-zA-Z\_]+)\s*:/gi,'$1"$2":').replace(/\"\s*:\s*\'/gi,'":"').replace(/\'\s*(,|\})/gi,'"$1')),m=p.utcOffset;if(-1===a.indexOf(v,d))d=n.getObject(d),n.isFunction(d)&&(u=d(u,b,f,p));else if("number"===typeof u||"string"===typeof u&&
u&&!isNaN(Number(u)))switch(u=Number(u),d){case "NumberFormat":b=n.mixin({},p);f=parseFloat(b.places);if(isNaN(f)||0>f)b.places=Infinity;return k.format(u,b);case "DateString":u=new Date(u);if(p.local||p.systemLocale)return p.systemLocale?u.toLocaleDateString()+(p.hideTime?"":" "+u.toLocaleTimeString()):u.toDateString()+(p.hideTime?"":" "+u.toTimeString());u=u.toUTCString();p.hideTime&&(u=u.replace(/\s+\d\d\:\d\d\:\d\d\s+(utc|gmt)/i,""));return u;case "DateFormat":return u=new Date(u),g(m)&&(u=e.add(u,
"minute",u.getTimezoneOffset()-m)),l.format(u,p)}return c(u)}function f(a,b){var c;if(b)for(c in a)a.hasOwnProperty(c)&&(void 0===a[c]?delete a[c]:a[c]instanceof Object&&f(a[c],!0));else for(c in a)a.hasOwnProperty(c)&&void 0===a[c]&&delete a[c];return a}function r(a){if(!a||"object"!=typeof a||n.isFunction(a))return a;if("function"===typeof a.clone)a=a.clone();else if("function"===typeof a.map&&"function"===typeof a.forEach)a=a.map(r);else{var b={},c,p,d={};for(c in a){p=a[c];var m=!(c in d)||d[c]!==
p;if(!(c in b)||b[c]!==p&&m)b[c]=r?r(p):p}a=b}return a}var v=["NumberFormat","DateString","DateFormat"],x=/<\/?[^>]+>/g;return{equals:function(a,b){return a===b||"number"===typeof a&&isNaN(a)&&"number"===typeof b&&isNaN(b)||n.isFunction((a||{}).getTime)&&n.isFunction((b||{}).getTime)&&a.getTime()==b.getTime()||n.isFunction((a||{}).equals)&&a.equals(b)||n.isFunction((b||{}).equals)&&b.equals(a)||!1},valueOf:function(a,b){for(var c in a)if(a[c]==b)return c;return null},stripTags:function(a){if(a){var b=
typeof a;if("string"===b)a=a.replace(x,"");else if("object"===b)for(var c in a)(b=a[c])&&"string"===typeof b&&(b=b.replace(x,"")),a[c]=b}return a},substitute:function(f,e,k){var p,d,m;g(k)&&(n.isObject(k)?(p=k.first,d=k.dateFormat,m=k.numberFormat):p=k);if(e&&"{*}"!==e)return n.replace(e,n.hitch({obj:f},function(p,f){p=f.split(":");return 1<p.length?(f=p[0],p.shift(),b(f,this.obj,p.join(":"))):d&&-1!==a.indexOf(d.properties||"",f)?b(f,this.obj,d.formatter||"DateString"):m&&-1!==a.indexOf(m.properties||
"",f)?b(f,this.obj,m.formatter||"NumberFormat"):c(this.obj[f])}));e=[];var y;e.push('\x3ctable summary\x3d"'+q.fieldsSummary+'"\x3e\x3ctbody\x3e');for(y in f)if(k=f[y],d&&-1!==a.indexOf(d.properties||"",y)?k=b(y,f,d.formatter||"DateString"):m&&-1!==a.indexOf(m.properties||"",y)&&(k=b(y,f,m.formatter||"NumberFormat")),e.push("\x3ctr\x3e\x3cth\x3e"+y+"\x3c/th\x3e\x3ctd\x3e"+c(k)+"\x3c/td\x3e\x3c/tr\x3e"),p)break;e.push("\x3c/tbody\x3e\x3c/table\x3e");return e.join("")},filter:function(a,b,c){b=[n.isString(a)?
a.split(""):a,c||h.global,n.isString(b)?new Function("item","index","array",b):b];c={};var p;a=b[0];for(p in a)b[2].call(b[p],a[p],p,a)&&(c[p]=a[p]);return c},startsWith:function(a,b,c){c=c||0;return a.indexOf(b,c)===c},endsWith:function(a,b,c){if("number"!==typeof c||!isFinite(c)||Math.floor(c)!==c||c>a.length)c=a.length;c-=b.length;a=a.indexOf(b,c);return-1!==a&&a===c},isDefined:g,fixJson:f,clone:r}})},"dojo/date":function(){define(["./has","./_base/lang"],function(a,h){var n={getDaysInMonth:function(a){var e=
a.getMonth();return 1==e&&n.isLeapYear(a)?29:[31,28,31,30,31,30,31,31,30,31,30,31][e]},isLeapYear:function(a){a=a.getFullYear();return!(a%400)||!(a%4)&&!!(a%100)},getTimezoneName:function(a){var e=a.toString(),l="",h=e.indexOf("(");if(-1<h)l=e.substring(++h,e.indexOf(")"));else if(h=/([A-Z\/]+) \d{4}$/,e=e.match(h))l=e[1];else if(e=a.toLocaleString(),h=/ ([A-Z\/]+)$/,e=e.match(h))l=e[1];return"AM"==l||"PM"==l?"":l},compare:function(a,k,l){a=new Date(+a);k=new Date(+(k||new Date));"date"==l?(a.setHours(0,
0,0,0),k.setHours(0,0,0,0)):"time"==l&&(a.setFullYear(0,0,0),k.setFullYear(0,0,0));return a>k?1:a<k?-1:0},add:function(a,k,l){var e=new Date(+a),g=!1,c="Date";switch(k){case "day":break;case "weekday":var b;(k=l%5)?b=parseInt(l/5):(k=0<l?5:-5,b=0<l?(l-5)/5:(l+5)/5);var f=a.getDay(),r=0;6==f&&0<l?r=1:0==f&&0>l&&(r=-1);f+=k;if(0==f||6==f)r=0<l?2:-2;l=7*b+k+r;break;case "year":c="FullYear";g=!0;break;case "week":l*=7;break;case "quarter":l*=3;case "month":g=!0;c="Month";break;default:c="UTC"+k.charAt(0).toUpperCase()+
k.substring(1)+"s"}if(c)e["set"+c](e["get"+c]()+l);g&&e.getDate()<a.getDate()&&e.setDate(0);return e},difference:function(a,k,l){k=k||new Date;l=l||"day";var e=k.getFullYear()-a.getFullYear(),g=1;switch(l){case "quarter":a=a.getMonth();k=k.getMonth();g=Math.floor(k/3)+1+4*e-(Math.floor(a/3)+1);break;case "weekday":e=Math.round(n.difference(a,k,"day"));l=parseInt(n.difference(a,k,"week"));if(0==e%7)e=5*l;else{var g=0,c=a.getDay(),b=k.getDay();l=parseInt(e/7);k=e%7;a=new Date(a);a.setDate(a.getDate()+
7*l);a=a.getDay();if(0<e)switch(!0){case 6==c:g=-1;break;case 0==c:g=0;break;case 6==b:g=-1;break;case 0==b:g=-2;break;case 5<a+k:g=-2}else if(0>e)switch(!0){case 6==c:g=0;break;case 0==c:g=1;break;case 6==b:g=2;break;case 0==b:g=1;break;case 0>a+k:g=2}e=e+g-2*l}g=e;break;case "year":g=e;break;case "month":g=k.getMonth()-a.getMonth()+12*e;break;case "week":g=parseInt(n.difference(a,k,"day")/7);break;case "day":g/=24;case "hour":g/=60;case "minute":g/=60;case "second":g/=1E3;case "millisecond":g*=
k.getTime()-a.getTime()}return Math.round(g)}};h.mixin(h.getObject("dojo.date",!0),n);return n})},"dojo/number":function(){define(["./_base/lang","./i18n","./i18n!./cldr/nls/number","./string","./regexp"],function(a,h,n,e,k){var l={};a.setObject("dojo.number",l);l.format=function(g,c){c=a.mixin({},c||{});var b=h.normalizeLocale(c.locale),b=h.getLocalization("dojo.cldr","number",b);c.customs=b;b=c.pattern||b[(c.type||"decimal")+"Format"];return isNaN(g)||Infinity==Math.abs(g)?null:l._applyPattern(g,
b,c)};l._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;l._applyPattern=function(a,c,b){b=b||{};var f=b.customs.group,g=b.customs.decimal;c=c.split(";");var e=c[0];c=c[0>a?1:0]||"-"+e;if(-1!=c.indexOf("%"))a*=100;else if(-1!=c.indexOf("\u2030"))a*=1E3;else if(-1!=c.indexOf("\u00a4"))f=b.customs.currencyGroup||f,g=b.customs.currencyDecimal||g,c=c.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/,function(a,c,f,p){return(a=b[["symbol","currency","displayName"][f.length-1]]||b.currency||"")?c+a+p:""});else if(-1!=
c.indexOf("E"))throw Error("exponential notation not supported");var k=l._numberPatternRE,e=e.match(k);if(!e)throw Error("unable to find a number expression in pattern: "+c);!1===b.fractional&&(b.places=0);return c.replace(k,l._formatAbsolute(a,e[0],{decimal:g,group:f,places:b.places,round:b.round}))};l.round=function(a,c,b){b=10/(b||10);return(b*+a).toFixed(c)/b};if(0==(.9).toFixed()){var q=l.round;l.round=function(a,c,b){var f=Math.pow(10,-c||0),g=Math.abs(a);if(!a||g>=f)f=0;else if(g/=f,.5>g||
.95<=g)f=0;return q(a,c,b)+(0<a?f:-f)}}l._formatAbsolute=function(a,c,b){b=b||{};!0===b.places&&(b.places=0);Infinity===b.places&&(b.places=6);c=c.split(".");var f="string"==typeof b.places&&b.places.indexOf(","),g=b.places;f?g=b.places.substring(f+1):0<=g||(g=(c[1]||[]).length);0>b.round||(a=l.round(a,g,b.round));a=String(Math.abs(a)).split(".");var k=a[1]||"";c[1]||b.places?(f&&(b.places=b.places.substring(0,f)),f=void 0!==b.places?b.places:c[1]&&c[1].lastIndexOf("0")+1,f>k.length&&(a[1]=e.pad(k,
f,"0",!0)),g<k.length&&(a[1]=k.substr(0,g))):a[1]&&a.pop();g=c[0].replace(",","");f=g.indexOf("0");-1!=f&&(f=g.length-f,f>a[0].length&&(a[0]=e.pad(a[0],f)),-1==g.indexOf("#")&&(a[0]=a[0].substr(a[0].length-f)));var g=c[0].lastIndexOf(","),h,q;-1!=g&&(h=c[0].length-g-1,c=c[0].substr(0,g),g=c.lastIndexOf(","),-1!=g&&(q=c.length-g-1));c=[];for(g=a[0];g;)f=g.length-h,c.push(0<f?g.substr(f):g),g=0<f?g.slice(0,f):"",q&&(h=q,q=void 0);a[0]=c.reverse().join(b.group||",");return a.join(b.decimal||".")};l.regexp=
function(a){return l._parseInfo(a).regexp};l._parseInfo=function(a){a=a||{};var c=h.normalizeLocale(a.locale),c=h.getLocalization("dojo.cldr","number",c),b=a.pattern||c[(a.type||"decimal")+"Format"],f=c.group,g=c.decimal,e=1;if(-1!=b.indexOf("%"))e/=100;else if(-1!=b.indexOf("\u2030"))e/=1E3;else{var q=-1!=b.indexOf("\u00a4");q&&(f=c.currencyGroup||f,g=c.currencyDecimal||g)}c=b.split(";");1==c.length&&c.push("-"+c[0]);c=k.buildGroupRE(c,function(b){b="(?:"+k.escapeString(b,".")+")";return b.replace(l._numberPatternRE,
function(b){var c={signed:!1,separator:a.strict?f:[f,""],fractional:a.fractional,decimal:g,exponent:!1};b=b.split(".");var p=a.places;1==b.length&&1!=e&&(b[1]="###");1==b.length||0===p?c.fractional=!1:(void 0===p&&(p=a.pattern?b[1].lastIndexOf("0")+1:Infinity),p&&void 0==a.fractional&&(c.fractional=!0),!a.places&&p<b[1].length&&(p+=","+b[1].length),c.places=p);b=b[0].split(",");1<b.length&&(c.groupSize=b.pop().length,1<b.length&&(c.groupSize2=b.pop().length));return"("+l._realNumberRegexp(c)+")"})},
!0);q&&(c=c.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(b,c,f,p){b=k.escapeString(a[["symbol","currency","displayName"][f.length-1]]||a.currency||"");if(!b)return"";c=c?"[\\s\\xa0]":"";p=p?"[\\s\\xa0]":"";return a.strict?c+b+p:(c&&(c+="*"),p&&(p+="*"),"(?:"+c+b+p+")?")}));return{regexp:c.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:f,decimal:g,factor:e}};l.parse=function(a,c){c=l._parseInfo(c);a=(new RegExp("^"+c.regexp+"$")).exec(a);if(!a)return NaN;var b=a[1];if(!a[1]){if(!a[2])return NaN;
b=a[2];c.factor*=-1}b=b.replace(new RegExp("["+c.group+"\\s\\xa0]","g"),"").replace(c.decimal,".");return b*c.factor};l._realNumberRegexp=function(a){a=a||{};"places"in a||(a.places=Infinity);"string"!=typeof a.decimal&&(a.decimal=".");"fractional"in a&&!/^0/.test(a.places)||(a.fractional=[!0,!1]);"exponent"in a||(a.exponent=[!0,!1]);"eSigned"in a||(a.eSigned=[!0,!1]);var c=l._integerRegexp(a),b=k.buildGroupRE(a.fractional,function(b){var c="";b&&0!==a.places&&(c="\\"+a.decimal,c=Infinity==a.places?
"(?:"+c+"\\d+)?":c+("\\d{"+a.places+"}"));return c},!0),f=k.buildGroupRE(a.exponent,function(b){return b?"([eE]"+l._integerRegexp({signed:a.eSigned})+")":""}),c=c+b;b&&(c="(?:(?:"+c+")|(?:"+b+"))");return c+f};l._integerRegexp=function(a){a=a||{};"signed"in a||(a.signed=[!0,!1]);"separator"in a?"groupSize"in a||(a.groupSize=3):a.separator="";var c=k.buildGroupRE(a.signed,function(a){return a?"[-+]":""},!0),b=k.buildGroupRE(a.separator,function(b){if(!b)return"(?:\\d+)";b=k.escapeString(b);" "==b?
b="\\s":"\u00a0"==b&&(b="\\s\\xa0");var c=a.groupSize,f=a.groupSize2;return f?(b="(?:0|[1-9]\\d{0,"+(f-1)+"}(?:["+b+"]\\d{"+f+"})*["+b+"]\\d{"+c+"})",0<c-f?"(?:"+b+"|(?:0|[1-9]\\d{0,"+(c-1)+"}))":b):"(?:0|[1-9]\\d{0,"+(c-1)+"}(?:["+b+"]\\d{"+c+"})*)"},!0);return c+b};return l})},"dojo/i18n":function(){define("./_base/kernel require ./has ./_base/array ./_base/config ./_base/lang ./has!host-browser?./_base/xhr ./json module".split(" "),function(a,h,n,e,k,l,q,g,c){n.add("dojo-preload-i18n-Api",1);q=
a.i18n={};var b=/(^.*(^|\/)nls)(\/|$)([^\/]*)\/?([^\/]*)/,f=function(d,a,m,b){var c=[m+b];a=a.split("-");for(var p="",f=0;f<a.length;f++)if(p+=(p?"-":"")+a[f],!d||d[p])c.push(m+p+"/"+b),c.specificity=p;return c},r={},v=function(d,m,b){b=b?b.toLowerCase():a.locale;d=d.replace(/\./g,"/");m=m.replace(/\./g,"/");return/root/i.test(b)?d+"/nls/"+m:d+"/nls/"+b+"/"+m},x=a.getL10nName=function(d,a,m){return d=c.id+"!"+v(d,a,m)},w=function(d,a,m,b,c,p){d([a],function(g){var e=l.clone(g.root||g.ROOT),y=f(!g._v1x&&
g,c,m,b);d(y,function(){for(var d=1;d<y.length;d++)e=l.mixin(l.clone(e),arguments[d]);r[a+"/"+c]=e;e.$locale=y.specificity;p()})})},t=function(d){var a=k.extraLocale||[],a=l.isArray(a)?a:[a];a.push(d);return a},u=function(c,p,f){var k=b.exec(c),u=k[1]+"/",h=k[5]||k[4],q=u+h,v=(k=k[5]&&k[4])||a.locale||"",x=q+"/"+v,k=k?[v]:t(v),A=k.length,G=function(){--A||f(l.delegate(r[x]))},v=c.split("*"),C="preload"==v[1];if(n("dojo-preload-i18n-Api")){if(C&&(r[c]||(r[c]=1,y(v[2],g.parse(v[3]),1,p)),f(1)),(v=C)||
(d&&m.push([c,p,f]),v=d&&!r[x]),v)return}else if(C){f(1);return}e.forEach(k,function(d){var a=q+"/"+d;n("dojo-preload-i18n-Api")&&z(a);r[a]?G():w(p,q,u,h,d,G)})};n("dojo-preload-i18n-Api");var p=q.normalizeLocale=function(d){d=d?d.toLowerCase():a.locale;return"root"==d?"ROOT":d},d=0,m=[],y=q._preloadLocalizations=function(b,c,f,g){function y(d,a){g([d],a)}function k(d,a){for(d=d.split("-");d.length;){if(a(d.join("-")))return;d.pop()}a("ROOT")}function q(){for(--d;!d&&m.length;)u.apply(null,m.shift())}
function t(a){a=p(a);k(a,function(m){if(0<=e.indexOf(c,m)){var p=b.replace(/\./g,"/")+"_"+m;d++;y(p,function(b){for(var c in b){var p=b[c],f=c.match(/(.+)\/([^\/]+)$/),e;if(f&&(e=f[2],f=f[1]+"/",p._localized)){var y;if("ROOT"===m){var u=y=p._localized;delete p._localized;u.root=p;r[h.toAbsMid(c)]=u}else y=p._localized,r[h.toAbsMid(f+e+"/"+m)]=p;m!==a&&function(m,b,c,p){var f=[],e=[];k(a,function(d){p[d]&&(f.push(h.toAbsMid(m+d+"/"+b)),e.push(h.toAbsMid(m+b+"/"+d)))});f.length?(d++,g(f,function(){for(var d=
f.length-1;0<=d;d--)c=l.mixin(l.clone(c),arguments[d]),r[e[d]]=c;r[h.toAbsMid(m+b+"/"+a)]=l.clone(c);q()})):r[h.toAbsMid(m+b+"/"+a)]=c}(f,e,p,y)}}q()});return!0}return!1})}g=g||h;t();e.forEach(a.config.extraLocale,t)},z=function(){},z=function(d){for(var m,b=d.split("/"),c=a.global[b[0]],p=1;c&&p<b.length-1;c=c[b[p++]]);c&&((m=c[b[p]])||(m=c[b[p].replace(/-/g,"_")]),m&&(r[d]=m));return m};q.getLocalization=function(d,a,m){var b;d=v(d,a,m);u(d,h,function(d){b=d});return b};return l.mixin(q,{dynamic:!0,
normalize:function(d,a){return/^\./.test(d)?a(d):d},load:u,cache:r,getL10nName:x})})},"dojo/string":function(){define(["./_base/kernel","./_base/lang"],function(a,h){var n=/[&<>'"\/]/g,e={"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;","/":"\x26#x2F;"},k={};h.setObject("dojo.string",k);k.escape=function(a){return a?a.replace(n,function(a){return e[a]}):""};k.rep=function(a,e){if(0>=e||!a)return"";for(var g=[];;){e&1&&g.push(a);if(!(e>>=1))break;a+=a}return g.join("")};
k.pad=function(a,e,g,c){g||(g="0");a=String(a);e=k.rep(g,Math.ceil((e-a.length)/g.length));return c?a+e:e+a};k.substitute=function(e,k,g,c){c=c||a.global;g=g?h.hitch(c,g):function(a){return a};return e.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,function(a,f,e){if(""==f)return"$";a=h.getObject(f,!1,k);e&&(a=h.getObject(e,!1,c).call(c,a,f));e=g(a,f);if("undefined"===typeof e)throw Error('string.substitute could not find key "'+f+'" in template');return e.toString()})};k.trim=String.prototype.trim?
h.trim:function(a){a=a.replace(/^\s+/,"");for(var e=a.length-1;0<=e;e--)if(/\S/.test(a.charAt(e))){a=a.substring(0,e+1);break}return a};return k})},"dojo/regexp":function(){define(["./_base/kernel","./_base/lang"],function(a,h){var n={};h.setObject("dojo.regexp",n);n.escapeString=function(a,k){return a.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,function(a){return k&&-1!=k.indexOf(a)?a:"\\"+a})};n.buildGroupRE=function(a,k,l){if(!(a instanceof Array))return k(a);for(var e=[],g=0;g<a.length;g++)e.push(k(a[g]));
return n.group(e.join("|"),l)};n.group=function(a,k){return"("+(k?"?:":"")+a+")"};return n})},"dojo/date/locale":function(){define("../_base/lang ../_base/array ../date ../cldr/supplemental ../i18n ../regexp ../string ../i18n!../cldr/nls/gregorian module".split(" "),function(a,h,n,e,k,l,q,g,c){function b(a,b,d,m){return m.replace(/([a-z])\1*/ig,function(c){var p,f,g=c.charAt(0);c=c.length;var y=["abbr","wide","narrow"];switch(g){case "G":p=b[4>c?"eraAbbr":"eraNames"][0>a.getFullYear()?0:1];break;
case "y":p=a.getFullYear();switch(c){case 1:break;case 2:if(!d.fullYear){p=String(p);p=p.substr(p.length-2);break}default:f=!0}break;case "Q":case "q":p=Math.ceil((a.getMonth()+1)/3);f=!0;break;case "M":case "L":p=a.getMonth();3>c?(p+=1,f=!0):(g=["months","L"==g?"standAlone":"format",y[c-3]].join("-"),p=b[g][p]);break;case "w":p=v._getWeekOfYear(a,0);f=!0;break;case "d":p=a.getDate();f=!0;break;case "D":p=v._getDayOfYear(a);f=!0;break;case "e":case "c":if(p=a.getDay(),2>c){p=(p-e.getFirstDayOfWeek(d.locale)+
8)%7;break}case "E":p=a.getDay();3>c?(p+=1,f=!0):(g=["days","c"==g?"standAlone":"format",y[c-3]].join("-"),p=b[g][p]);break;case "a":g=12>a.getHours()?"am":"pm";p=d[g]||b["dayPeriods-format-wide-"+g];break;case "h":case "H":case "K":case "k":f=a.getHours();switch(g){case "h":p=f%12||12;break;case "H":p=f;break;case "K":p=f%12;break;case "k":p=f||24}f=!0;break;case "m":p=a.getMinutes();f=!0;break;case "s":p=a.getSeconds();f=!0;break;case "S":p=Math.round(a.getMilliseconds()*Math.pow(10,c-3));f=!0;
break;case "v":case "z":if(p=v._getZone(a,!0,d))break;c=4;case "Z":g=v._getZone(a,!1,d);g=[0>=g?"+":"-",q.pad(Math.floor(Math.abs(g)/60),2),q.pad(Math.abs(g)%60,2)];4==c&&(g.splice(0,0,"GMT"),g.splice(3,0,":"));p=g.join("");break;default:throw Error("dojo.date.locale.format: invalid pattern char: "+m);}f&&(p=q.pad(p,c));return p})}function f(a,b,d,m){var c=function(d){return d};b=b||c;d=d||c;m=m||c;var p=a.match(/(''|[^'])+/g),f="'"==a.charAt(0);h.forEach(p,function(a,m){a?(p[m]=(f?d:b)(a.replace(/''/g,
"'")),f=!f):p[m]=""});return m(p.join(""))}function r(a,b,d,m){m=l.escapeString(m);d.strict||(m=m.replace(" a"," ?a"));return m.replace(/([a-z])\1*/ig,function(m){var c;c=m.charAt(0);var p=m.length,f="",g="";d.strict?(1<p&&(f="0{"+(p-1)+"}"),2<p&&(g="0{"+(p-2)+"}")):(f="0?",g="0{0,2}");switch(c){case "y":c="\\d{2,4}";break;case "M":case "L":2<p?(c=b["months-"+("L"==c?"standAlone":"format")+"-"+x[p-3]].slice(0).join("|"),d.strict||(c=c.replace(/\./g,""),c="(?:"+c+")\\.?")):c="1[0-2]|"+f+"[1-9]";break;
case "D":c="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+f+"[1-9][0-9]|"+g+"[1-9]";break;case "d":c="3[01]|[12]\\d|"+f+"[1-9]";break;case "w":c="[1-4][0-9]|5[0-3]|"+f+"[1-9]";break;case "E":case "e":case "c":c=".+?";break;case "h":c="1[0-2]|"+f+"[1-9]";break;case "k":c="1[01]|"+f+"\\d";break;case "H":c="1\\d|2[0-3]|"+f+"\\d";break;case "K":c="1\\d|2[0-4]|"+f+"[1-9]";break;case "m":case "s":c="[0-5]\\d";break;case "S":c="\\d{"+p+"}";break;case "a":p=d.am||b["dayPeriods-format-wide-am"];f=d.pm||b["dayPeriods-format-wide-pm"];
c=p+"|"+f;d.strict||(p!=p.toLowerCase()&&(c+="|"+p.toLowerCase()),f!=f.toLowerCase()&&(c+="|"+f.toLowerCase()),-1!=c.indexOf(".")&&(c+="|"+c.replace(/\./g,"")));c=c.replace(/\./g,"\\.");break;default:c=".*"}a&&a.push(m);return"("+c+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var v={};a.setObject(c.id.replace(/\//g,"."),v);v._getZone=function(a,b,d){return b?n.getTimezoneName(a):a.getTimezoneOffset()};v.format=function(c,p){p=p||{};var d=k.normalizeLocale(p.locale),m=p.formatLength||"short",d=v._getGregorianBundle(d),
g=[];c=a.hitch(this,b,c,d,p);if("year"==p.selector)return f(d["dateFormatItem-yyyy"]||"yyyy",c);var e;"date"!=p.selector&&(e=p.timePattern||d["timeFormat-"+m])&&g.push(f(e,c));"time"!=p.selector&&(e=p.datePattern||d["dateFormat-"+m])&&g.push(f(e,c));return 1==g.length?g[0]:d["dateTimeFormat-"+m].replace(/\'/g,"").replace(/\{(\d+)\}/g,function(d,a){return g[a]})};v.regexp=function(a){return v._parseInfo(a).regexp};v._parseInfo=function(b){b=b||{};var c=k.normalizeLocale(b.locale),c=v._getGregorianBundle(c),
d=b.formatLength||"short",m=b.datePattern||c["dateFormat-"+d],g=b.timePattern||c["timeFormat-"+d],d="date"==b.selector?m:"time"==b.selector?g:c["dateTimeFormat-"+d].replace(/\{(\d+)\}/g,function(d,a){return[g,m][a]}),e=[];return{regexp:f(d,a.hitch(this,r,e,c,b)),tokens:e,bundle:c}};v.parse=function(a,b){var d=/[\u200E\u200F\u202A\u202E]/g,m=v._parseInfo(b),c=m.tokens,p=m.bundle;a=(new RegExp("^"+m.regexp.replace(d,"")+"$",m.strict?"":"i")).exec(a&&a.replace(d,""));if(!a)return null;var f=["abbr",
"wide","narrow"],g=[1970,0,1,0,0,0,0],e="";a=h.every(a,function(d,a){if(!a)return!0;var m=c[a-1];a=m.length;m=m.charAt(0);switch(m){case "y":if(2!=a&&b.strict)g[0]=d;else if(100>d)d=Number(d),m=""+(new Date).getFullYear(),a=100*m.substring(0,2),m=Math.min(Number(m.substring(2,4))+20,99),g[0]=d<m?a+d:a-100+d;else{if(b.strict)return!1;g[0]=d}break;case "M":case "L":if(2<a){if(a=p["months-"+("L"==m?"standAlone":"format")+"-"+f[a-3]].concat(),b.strict||(d=d.replace(".","").toLowerCase(),a=h.map(a,function(d){return d.replace(".",
"").toLowerCase()})),d=h.indexOf(a,d),-1==d)return!1}else d--;g[1]=d;break;case "E":case "e":case "c":a=p["days-"+("c"==m?"standAlone":"format")+"-"+f[a-3]].concat();b.strict||(d=d.toLowerCase(),a=h.map(a,function(d){return d.toLowerCase()}));d=h.indexOf(a,d);if(-1==d)return!1;break;case "D":g[1]=0;case "d":g[2]=d;break;case "a":a=b.am||p["dayPeriods-format-wide-am"];m=b.pm||p["dayPeriods-format-wide-pm"];if(!b.strict){var y=/\./g;d=d.replace(y,"").toLowerCase();a=a.replace(y,"").toLowerCase();m=
m.replace(y,"").toLowerCase()}if(b.strict&&d!=a&&d!=m)return!1;e=d==m?"p":d==a?"a":"";break;case "K":24==d&&(d=0);case "h":case "H":case "k":if(23<d)return!1;g[3]=d;break;case "m":g[4]=d;break;case "s":g[5]=d;break;case "S":g[6]=d}return!0});d=+g[3];"p"===e&&12>d?g[3]=d+12:"a"===e&&12==d&&(g[3]=0);d=new Date(g[0],g[1],g[2],g[3],g[4],g[5],g[6]);b.strict&&d.setFullYear(g[0]);var k=c.join(""),m=-1!=k.indexOf("d"),k=-1!=k.indexOf("M");if(!a||k&&d.getMonth()>g[1]||m&&d.getDate()>g[2])return null;if(k&&
d.getMonth()<g[1]||m&&d.getDate()<g[2])d=n.add(d,"hour",1);return d};var x=["abbr","wide","narrow"],w=[],t={};v.addCustomFormats=function(a,b){w.push({pkg:a,name:b});t={}};v._getGregorianBundle=function(b){if(t[b])return t[b];var c={};h.forEach(w,function(d){d=k.getLocalization(d.pkg,d.name,b);c=a.mixin(c,d)},this);return t[b]=c};v.addCustomFormats(c.id.replace(/\/date\/locale$/,".cldr"),"gregorian");v.getNames=function(a,b,d,m){var c;m=v._getGregorianBundle(m);a=[a,d,b];"standAlone"==d&&(d=a.join("-"),
c=m[d],1==c[0]&&(c=void 0));a[1]="format";return(c||m[a.join("-")]).concat()};v.isWeekend=function(a,b){b=e.getWeekend(b);a=(a||new Date).getDay();b.end<b.start&&(b.end+=7,a<b.start&&(a+=7));return a>=b.start&&a<=b.end};v._getDayOfYear=function(a){return n.difference(new Date(a.getFullYear(),0,1,a.getHours()),a)+1};v._getWeekOfYear=function(a,b){1==arguments.length&&(b=0);var d=(new Date(a.getFullYear(),0,1)).getDay(),m=(d-b+7)%7,m=Math.floor((v._getDayOfYear(a)+m-1)/7);d==b&&m++;return m};return v})},
"dojo/cldr/supplemental":function(){define(["../_base/lang","../i18n"],function(a,h){var n={};a.setObject("dojo.cldr.supplemental",n);n.getFirstDayOfWeek=function(a){a={bd:5,mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,iq:6,ir:6,jo:6,kw:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,sy:6,ye:6,ag:0,ar:0,as:0,au:0,br:0,bs:0,bt:0,bw:0,by:0,bz:0,ca:0,cn:0,co:0,dm:0,"do":0,et:0,gt:0,gu:0,hk:0,hn:0,id:0,ie:0,il:0,"in":0,jm:0,jp:0,ke:0,kh:0,kr:0,la:0,mh:0,mm:0,mo:0,mt:0,mx:0,mz:0,ni:0,np:0,nz:0,pa:0,pe:0,ph:0,pk:0,pr:0,py:0,sg:0,
sv:0,th:0,tn:0,tt:0,tw:0,um:0,us:0,ve:0,vi:0,ws:0,za:0,zw:0}[n._region(a)];return void 0===a?1:a};n._region=function(a){a=h.normalizeLocale(a);a=a.split("-");var e=a[1];e?4==e.length&&(e=a[2]):e={aa:"et",ab:"ge",af:"za",ak:"gh",am:"et",ar:"eg",as:"in",av:"ru",ay:"bo",az:"az",ba:"ru",be:"by",bg:"bg",bi:"vu",bm:"ml",bn:"bd",bo:"cn",br:"fr",bs:"ba",ca:"es",ce:"ru",ch:"gu",co:"fr",cr:"ca",cs:"cz",cv:"ru",cy:"gb",da:"dk",de:"de",dv:"mv",dz:"bt",ee:"gh",el:"gr",en:"us",es:"es",et:"ee",eu:"es",fa:"ir",ff:"sn",
fi:"fi",fj:"fj",fo:"fo",fr:"fr",fy:"nl",ga:"ie",gd:"gb",gl:"es",gn:"py",gu:"in",gv:"gb",ha:"ng",he:"il",hi:"in",ho:"pg",hr:"hr",ht:"ht",hu:"hu",hy:"am",ia:"fr",id:"id",ig:"ng",ii:"cn",ik:"us","in":"id",is:"is",it:"it",iu:"ca",iw:"il",ja:"jp",ji:"ua",jv:"id",jw:"id",ka:"ge",kg:"cd",ki:"ke",kj:"na",kk:"kz",kl:"gl",km:"kh",kn:"in",ko:"kr",ks:"in",ku:"tr",kv:"ru",kw:"gb",ky:"kg",la:"va",lb:"lu",lg:"ug",li:"nl",ln:"cd",lo:"la",lt:"lt",lu:"cd",lv:"lv",mg:"mg",mh:"mh",mi:"nz",mk:"mk",ml:"in",mn:"mn",mo:"ro",
mr:"in",ms:"my",mt:"mt",my:"mm",na:"nr",nb:"no",nd:"zw",ne:"np",ng:"na",nl:"nl",nn:"no",no:"no",nr:"za",nv:"us",ny:"mw",oc:"fr",om:"et",or:"in",os:"ge",pa:"in",pl:"pl",ps:"af",pt:"br",qu:"pe",rm:"ch",rn:"bi",ro:"ro",ru:"ru",rw:"rw",sa:"in",sd:"in",se:"no",sg:"cf",si:"lk",sk:"sk",sl:"si",sm:"ws",sn:"zw",so:"so",sq:"al",sr:"rs",ss:"za",st:"za",su:"id",sv:"se",sw:"tz",ta:"in",te:"in",tg:"tj",th:"th",ti:"et",tk:"tm",tl:"ph",tn:"za",to:"to",tr:"tr",ts:"za",tt:"ru",ty:"pf",ug:"cn",uk:"ua",ur:"pk",uz:"uz",
ve:"za",vi:"vn",wa:"be",wo:"sn",xh:"za",yi:"il",yo:"ng",za:"cn",zh:"cn",zu:"za",ace:"id",ady:"ru",agq:"cm",alt:"ru",amo:"ng",asa:"tz",ast:"es",awa:"in",bal:"pk",ban:"id",bas:"cm",bax:"cm",bbc:"id",bem:"zm",bez:"tz",bfq:"in",bft:"pk",bfy:"in",bhb:"in",bho:"in",bik:"ph",bin:"ng",bjj:"in",bku:"ph",bqv:"ci",bra:"in",brx:"in",bss:"cm",btv:"pk",bua:"ru",buc:"yt",bug:"id",bya:"id",byn:"er",cch:"ng",ccp:"in",ceb:"ph",cgg:"ug",chk:"fm",chm:"ru",chp:"ca",chr:"us",cja:"kh",cjm:"vn",ckb:"iq",crk:"ca",csb:"pl",
dar:"ru",dav:"ke",den:"ca",dgr:"ca",dje:"ne",doi:"in",dsb:"de",dua:"cm",dyo:"sn",dyu:"bf",ebu:"ke",efi:"ng",ewo:"cm",fan:"gq",fil:"ph",fon:"bj",fur:"it",gaa:"gh",gag:"md",gbm:"in",gcr:"gf",gez:"et",gil:"ki",gon:"in",gor:"id",grt:"in",gsw:"ch",guz:"ke",gwi:"ca",haw:"us",hil:"ph",hne:"in",hnn:"ph",hoc:"in",hoj:"in",ibb:"ng",ilo:"ph",inh:"ru",jgo:"cm",jmc:"tz",kaa:"uz",kab:"dz",kaj:"ng",kam:"ke",kbd:"ru",kcg:"ng",kde:"tz",kdt:"th",kea:"cv",ken:"cm",kfo:"ci",kfr:"in",kha:"in",khb:"cn",khq:"ml",kht:"in",
kkj:"cm",kln:"ke",kmb:"ao",koi:"ru",kok:"in",kos:"fm",kpe:"lr",krc:"ru",kri:"sl",krl:"ru",kru:"in",ksb:"tz",ksf:"cm",ksh:"de",kum:"ru",lag:"tz",lah:"pk",lbe:"ru",lcp:"cn",lep:"in",lez:"ru",lif:"np",lis:"cn",lki:"ir",lmn:"in",lol:"cd",lua:"cd",luo:"ke",luy:"ke",lwl:"th",mad:"id",mag:"in",mai:"in",mak:"id",man:"gn",mas:"ke",mdf:"ru",mdh:"ph",mdr:"id",men:"sl",mer:"ke",mfe:"mu",mgh:"mz",mgo:"cm",min:"id",mni:"in",mnk:"gm",mnw:"mm",mos:"bf",mua:"cm",mwr:"in",myv:"ru",nap:"it",naq:"na",nds:"de","new":"np",
niu:"nu",nmg:"cm",nnh:"cm",nod:"th",nso:"za",nus:"sd",nym:"tz",nyn:"ug",pag:"ph",pam:"ph",pap:"bq",pau:"pw",pon:"fm",prd:"ir",raj:"in",rcf:"re",rej:"id",rjs:"np",rkt:"in",rof:"tz",rwk:"tz",saf:"gh",sah:"ru",saq:"ke",sas:"id",sat:"in",saz:"in",sbp:"tz",scn:"it",sco:"gb",sdh:"ir",seh:"mz",ses:"ml",shi:"ma",shn:"mm",sid:"et",sma:"se",smj:"se",smn:"fi",sms:"fi",snk:"ml",srn:"sr",srr:"sn",ssy:"er",suk:"tz",sus:"gn",swb:"yt",swc:"cd",syl:"bd",syr:"sy",tbw:"ph",tcy:"in",tdd:"cn",tem:"sl",teo:"ug",tet:"tl",
tig:"er",tiv:"ng",tkl:"tk",tmh:"ne",tpi:"pg",trv:"tw",tsg:"ph",tts:"th",tum:"mw",tvl:"tv",twq:"ne",tyv:"ru",tzm:"ma",udm:"ru",uli:"fm",umb:"ao",unr:"in",unx:"in",vai:"lr",vun:"tz",wae:"ch",wal:"et",war:"ph",xog:"ug",xsr:"np",yao:"mz",yap:"fm",yav:"cm",zza:"tr"}[a[0]];return e};n.getWeekend=function(a){var e=n._region(a);a={"in":0,af:4,dz:4,ir:4,om:4,sa:4,ye:4,ae:5,bh:5,eg:5,il:5,iq:5,jo:5,kw:5,ly:5,ma:5,qa:5,sd:5,sy:5,tn:5}[e];e={af:5,dz:5,ir:5,om:5,sa:5,ye:5,ae:6,bh:5,eg:6,il:6,iq:6,jo:6,kw:6,ly:6,
ma:6,qa:6,sd:6,sy:6,tn:6}[e];void 0===a&&(a=6);void 0===e&&(e=0);return{start:a,end:e}};return n})},"esri/core/accessorSupport/get":function(){define(["require","exports","./utils"],function(a,h,n){function e(a,c,b){if(null!=b.getItemAt||Array.isArray(b)){var f=parseInt(a,10);if(!isNaN(f))return Array.isArray(b)?b[f]:b.getItemAt(f)}f=n.getProperties(b);return c?n.isPropertyDeclared(f,a)?f.get(a):b[a]:n.isPropertyDeclared(f,a)?f.internalGet(a):b[a]}function k(a,c,b,f){if(null==a)return a;if((a=e(c[f],
b,a))||!(f<c.length-1))return f===c.length-1?a:k(a,c,b,f+1)}function l(a,c,b,f){void 0===b&&(b=!1);void 0===f&&(f=0);return"string"===typeof c&&-1===c.indexOf(".")?e(c,b,a):k(a,n.pathToArray(c),b,f)}function q(a,c){return l(a,c,!0)}Object.defineProperty(h,"__esModule",{value:!0});h.valueOf=l;h.get=q;h.exists=function(a,c){return void 0!==l(c,a,!0)};h.default=q})},"esri/core/accessorSupport/set":function(){define(["require","exports","dojo/has","../Logger","./get"],function(a,h,n,e,k){function l(a,
g,c){if(a&&g)if("object"===typeof g){c=0;for(var b=Object.getOwnPropertyNames(g);c<b.length;c++){var f=b[c];l(a,f,g[f])}}else"_"!==g[0]&&(-1!==g.indexOf(".")?(g=g.split("."),f=g.splice(g.length-1,1)[0],l(k.default(a,g),f,c)):a[g]=c)}Object.defineProperty(h,"__esModule",{value:!0});e.getLogger("esri.core.accessorSupport.set");h.set=l;h.default=l})},"esri/core/Logger":function(){define(["require","exports","dojo/has"],function(a,h,n){var e={info:0,warn:1,error:2};a=function(){function a(e){void 0===
e&&(e={});this.module=e.module||"";this.writer=e.writer||null;this.level=e.level||null;null!=e.enabled&&(this.enabled=!!e.enabled);a._loggers[this.module]=this;e=this.module.lastIndexOf(".");-1!==e&&(this.parent=a.getLogger(this.module.slice(0,e)))}a.prototype.log=function(a){for(var e=[],g=1;g<arguments.length;g++)e[g-1]=arguments[g];this._isEnabled()&&this._matchLevel(a)&&(g=this._inheritedWriter())&&g.apply(void 0,[a,this.module].concat(e))};a.prototype.error=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=
arguments[e];this.log.apply(this,["error"].concat(a))};a.prototype.warn=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];this.log.apply(this,["warn"].concat(a))};a.prototype.info=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];this.log.apply(this,["info"].concat(a))};a.prototype.getLogger=function(e){return a.getLogger(this.module+"."+e)};a.getLogger=function(e){var k=a._loggers[e];k||(k=new a({module:e}));return k};a.prototype._parentWithMember=function(a,
e){for(var g=this;g&&null==g[a];)g=g.parent;return g?g[a]:e};a.prototype._inheritedWriter=function(){return this._parentWithMember("writer",this._consoleWriter)};a.prototype._consoleWriter=function(a,e){for(var g=[],c=2;c<arguments.length;c++)g[c-2]=arguments[c];console[a].apply(console,["["+e+"]"].concat(g))};a.prototype._matchLevel=function(a){return e[this._parentWithMember("level","error")]<=e[a]};a.prototype._isEnabled=function(){return this._parentWithMember("enabled",!0)};a._loggers={};return a}();
a.getLogger("esri").level="warn";return a})},"esri/core/accessorSupport/extensions/computedProperty":function(){define("require exports dojo/has ../../Logger ../utils ../wire".split(" "),function(a,h,n,e,k,l){Object.defineProperty(h,"__esModule",{value:!0});e.getLogger("esri.core.accessorSupport.extensions.computedProperty");h.ComputedPropertyExtension={processClassPropertyMetadata:function(a,g,c,b){g.dependsOn&&(c=void 0,c=g.dependsOn.slice())&&(g.wire=l.create(c,function(b){return k.getProperties(b).propertyInvalidated(a)}))},
instanceCreated:function(a,g,c){for(var b=0;b<c.length;b++){var f=g[c[b]];f.wire&&f.wire(a)}}};h.default=h.ComputedPropertyExtension})},"esri/core/accessorSupport/extensions/serializableProperty":function(){define("require exports ./serializableProperty/shorthands ./serializableProperty/originAliases ./serializableProperty/reader ./serializableProperty/writer".split(" "),function(a,h,n,e,k,l){function q(a,c,b){var f=a&&a.json;a&&a.json&&a.json.origins&&b&&(a=a.json.origins[b.origin])&&c in a&&(f=
a);return f}Object.defineProperty(h,"__esModule",{value:!0});h.originSpecificReadPropertyDefinition=function(a,c){return q(a,"read",c)};h.originSpecificWritePropertyDefinition=function(a,c){return q(a,"write",c)};h.SerializablePropertyExtension={processPrototypePropertyMetadata:function(a,c,b,f){if(n.process(c)){e.process(c);b=c.type;for(f=0;Array.isArray(b);)b=b[0],f++;if(c.json.origins)for(var g in c.json.origins){var h=c.json.origins[g];k.create(b,f,a,h);l.create(b,f,a,h)}k.create(b,f,a,c.json);
l.create(b,f,a,c.json)}}};h.default=h.SerializablePropertyExtension})},"esri/core/accessorSupport/extensions/serializableProperty/shorthands":function(){define(["require","exports"],function(a,h){function n(a){"boolean"===typeof a.read?a.read={enabled:a.read}:"function"===typeof a.read?a.read={enabled:!0,reader:a.read}:a.read&&"object"===typeof a.read&&void 0===a.read.enabled&&(a.read.enabled=!0)}function e(a){"boolean"===typeof a.write?a.write={enabled:a.write}:"function"===typeof a.write?a.write=
{enabled:!0,writer:a.write}:a.write&&"object"===typeof a.write&&void 0===a.write.enabled&&(a.write.enabled=!0)}Object.defineProperty(h,"__esModule",{value:!0});h.process=function(a){a.json||(a.json={});n(a.json);e(a.json);if(a.json.origins)for(var k in a.json.origins)n(a.json.origins[k]),e(a.json.origins[k]);return!0}})},"esri/core/accessorSupport/extensions/serializableProperty/originAliases":function(){define(["require","exports"],function(a,h){Object.defineProperty(h,"__esModule",{value:!0});h.process=
function(a){if(a.json&&a.json.origins){var e=a.json.origins,k={"web-document":["web-scene","web-map"]};a=function(a){if(e[a]){var g=e[a];k[a].forEach(function(a){e[a]=g});delete e[a]}};for(var l in k)a(l)}}})},"esri/core/accessorSupport/extensions/serializableProperty/reader":function(){define(["require","exports","dojo/_base/lang","./type"],function(a,h,n,e){function k(a,f,e,k){if(1<f)return g(a,f);if(1===f)return c(a);if(b(a)){var h=c(a.prototype.itemType.Type);return function(b,c,d){return(b=h(b,
c,d))?new a(b):b}}return l(a)}function l(a){return a.prototype.read?function(b,c,f){return null==b?b:(new a).read(b,f)}:a.fromJSON}function q(a,b,c,f){return 0!==f&&Array.isArray(b)?b.map(function(b){return q(a,b,c,f-1)}):a(b,null,c)}function g(a,b){a=l(a);var c=q.bind(null,a);return function(a,f,g){if(null==a)return a;a=c(a,g,b);f=b;for(g=a;0<f&&Array.isArray(g);)f--,g=g[0];if(void 0!==g)for(g=0;g<f;g++)a=[a];return a}}function c(a){var b=l(a);return function(a,c,f){return null==a?a:Array.isArray(a)?
a.map(function(a){return b(a,null,f)}):[b(a,null,f)]}}function b(a){return e.isCollection(a)?(a=a.prototype.itemType)&&a.Type&&"function"===typeof a.Type?f(a.Type):!1:!1}function f(a){return!!a&&(!!a.prototype.read||!!a.fromJSON||b(a))}Object.defineProperty(h,"__esModule",{value:!0});h.create=function(a,b,c,g){(!g.read||!g.read.reader&&!1!==g.read.enabled)&&f(a)&&n.setObject("read.reader",k(a,b,c,g),g)}})},"esri/core/accessorSupport/extensions/serializableProperty/type":function(){define(["require",
"exports"],function(a,h){Object.defineProperty(h,"__esModule",{value:!0});h.isCollection=function(a){return!!a&&!!a.prototype.declaredClass&&0===a.prototype.declaredClass.indexOf("esri.core.Collection")}})},"esri/core/accessorSupport/extensions/serializableProperty/writer":function(){define(["require","exports","dojo/_base/lang","./type"],function(a,h,n,e){function k(a,c,g,e){n.setObject(g,l(a,e),c)}function l(a,c){return a&&"function"===typeof a.write?a.write({},c):a&&"function"===typeof a.toJSON?
a.toJSON():"number"===typeof a?-Infinity===a?-Number.MAX_VALUE:Infinity===a?Number.MAX_VALUE:isNaN(a)?null:a:a}function q(a,c,g,e){null===a?a=null:a&&"function"===typeof a.map?(a=a.map(function(a){return l(a,e)}),"function"===typeof a.toArray&&(a=a.toArray())):a=[l(a,e)];n.setObject(g,a,c)}function g(a,c,e){return 0!==e&&Array.isArray(a)?a.map(function(a){return g(a,c,e-1)}):l(a,c)}function c(a){return function(b,c,e,k){if(null===b)b=null;else{b=g(b,k,a);k=a;for(var f=b;0<k&&Array.isArray(f);)k--,
f=f[0];if(void 0!==f)for(f=0;f<k;f++)b=[b]}n.setObject(e,b,c)}}Object.defineProperty(h,"__esModule",{value:!0});h.create=function(a,f,g,l){l.write&&!l.write.writer&&!1!==l.write.enabled&&(1===f||e.isCollection(a)?l.write.writer=q:l.write.writer=1<f?c(f):k)}})},"esri/core/accessorSupport/introspection":function(){define("require exports dojo/_base/lang ./utils ./metadata ./ensureType ./extensions ./decorators/cast".split(" "),function(a,h,n,e,k,l,q,g){Object.defineProperty(h,"__esModule",{value:!0});
var c=Object.prototype.hasOwnProperty,b=/^_([a-zA-Z0-9]+)(Getter|Setter|Reader|Writer|Caster)$/,f={Getter:"get",Setter:"set",Reader:"json.read.reader",Writer:"json.write.writer",Caster:"cast"},r=/^_(set|get)([a-zA-Z0-9]+)Attr$/;h.processPrototype=function(a){for(var g=a.declaredClass,h=a.properties||{},t=0,u=Object.getOwnPropertyNames(h);t<u.length;t++){var p=u[t],d=h[p],m=typeof d;null==d?k.setPropertyMetadata(a,p,{value:d}):Array.isArray(d)?k.setPropertyMetadata(a,p,{type:[d[0]],value:null}):"object"===
m?e.getProperties(d)||d instanceof Date?k.setPropertyMetadata(a,p,{type:d.constructor,value:d}):k.setPropertyMetadata(a,p,d):"boolean"===m?k.setPropertyMetadata(a,p,{type:Boolean,value:d}):"string"===m?k.setPropertyMetadata(a,p,{type:String,value:d}):"number"===m?k.setPropertyMetadata(a,p,{type:Number,value:d}):"function"===m&&k.setPropertyMetadata(a,p,{type:d,value:null})}t=0;for(u=Object.getOwnPropertyNames(a);t<u.length;t++){var m=u[t],d=a[m],h=p=void 0,y=b.exec(m);if(y)p=y[1],h=f[y[2]];else if(y=
r.exec(m))p=y[2][0].toLowerCase()+y[2].substr(1),h=y[1].toLowerCase();p&&h&&(p=k.getPropertyMetadata(a,p),n.setObject(h,d,p))}t=0;for(u=Object.getOwnPropertyNames(k.getPropertiesMetadata(a));t<u.length;t++)if(p=u[t],d=k.getPropertyMetadata(a,p),h=d.type,m=d.types,void 0===d.value&&c.call(a,p)&&(d.value=a[p]),!d.cast&&h){p=d;d=0;for(m=h;Array.isArray(m);)m=m[0],d++;h=1===d?l.ensureArray(m):1<d?l.ensureNArray(m,d):l.ensureType(h);p.cast=h}else!d.cast&&m&&(Array.isArray(m)?d.cast=l.ensureArrayTyped(l.ensureOneOfType(m[0])):
d.cast=l.ensureOneOfType(m));q.processPrototypeMetadatas(k.getPropertiesMetadata(a),g);return k.getPropertiesMetadata(a)};h.processClass=function(a){for(var b=a.prototype,c=b.declaredClass,f=a._meta.bases,l={},p=f.length-1;0<=p;p--)e.merge(l,k.getMetadata(f[p].prototype));var d=l.properties;q.processClassMetadatas(d,c);Object.defineProperty(a,"__accessorMetadata__",{value:{properties:d,autoDestroy:!!l.autoDestroy}});for(var m={},c=function(a){var b=d[a];m[a]={enumerable:!0,configurable:!0,get:function(){return this.__accessor__?
this.__accessor__.get(a):b.value},set:function(d){var m=this.__accessor__;if(!m)Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:d});else if(!Object.isFrozen(this)){if(m.initialized&&b.readOnly)throw new TypeError("[accessor] cannot assign to read-only property '"+a+"' of "+this.declaredClass);if(2===m.lifecycle&&b.constructOnly)throw new TypeError("[accessor] cannot assign to construct-only property '"+a+"' of "+this.declaredClass);m.set(a,d)}}}},f=0,p=Object.getOwnPropertyNames(d);f<
p.length;f++)c(p[f]);Object.defineProperties(a.prototype,m);if(l.parameters)for(a=0,c=Object.getOwnPropertyNames(l.parameters);a<c.length;a++)f=c[a],p=Object.getOwnPropertyDescriptor(b,f)||{value:b[f]},(p=g.autocastMethod(b,f,p))&&Object.defineProperty(b,f,p);return l}})},"esri/core/accessorSupport/metadata":function(){define(["require","exports"],function(a,h){function n(a){return null!=a.__accessorMetadata__}function e(a){return n(a)&&null!=k(a).properties}function k(a){a.__accessorMetadata__||
Object.defineProperty(a,"__accessorMetadata__",{value:{},enumerable:!0,configurable:!0,writable:!0});return a.__accessorMetadata__}function l(a){a=k(a);var c=a.properties;c||(c=a.properties={});return c}function q(a,c){var b=k(a);a=b.parameters;a||(a=b.parameters={});b=a[c];b||(b=[],a[c]=b);return b}Object.defineProperty(h,"__esModule",{value:!0});h.hasMetadata=n;h.hasPropertiesMetadata=e;h.hasPropertyMetadata=function(a,c){return e(a)&&null!=l(a)[c]};h.hasParametersMetadata=function(a,c){return n(a)&&
null!=k(a).parameters&&null!=k(a).parameters[c]};h.getMetadata=k;h.getPropertiesMetadata=l;h.getPropertyMetadata=function(a,c){a=l(a);var b=a[c];b||(b=a[c]={});return b};h.setPropertyMetadata=function(a,c,b){l(a)[c]=b};h.getParametersMetadata=q;h.getParameterMetadata=function(a,c,b){var f=q(a,c)[b];f||(q(a,c)[b]=f={index:b});return f}})},"esri/core/accessorSupport/ensureType":function(){define(["require","exports","../Logger"],function(a,h,n){function e(a,d){return d.isInstanceOf?d.isInstanceOf(a):
d instanceof a}function k(a){return null==a?a:new Date(a)}function l(a){return null==a?a:!!a}function q(a){return null==a?a:a.toString()}function g(a){return null==a?a:parseFloat(a)}function c(a){return a&&a.constructor&&void 0!==a.constructor._meta}function b(a,d){return null!=d&&a&&!e(a,d)}function f(a,d){b(a,d)&&(c(d)?u.error("Accessor#set","Assigning an instance of '"+(d.declaredClass||"unknown")+"' which is not a subclass of '"+(a&&a.prototype&&a.prototype.declaredClass||"unknown")+"'"):d=new a(d));
return d}function r(a){switch(a){case Number:return g;case Boolean:return l;case String:return q;case Date:return k;default:return f.bind(null,a)}}function v(a,d){var m=r(a);return 1===arguments.length?m:m(d)}function x(a,d){return 1===arguments.length?x.bind(null,a):d?Array.isArray(d)?d.map(a):[a(d)]:d}function w(a,d,m){return 0!==d&&Array.isArray(m)?m.map(function(m){return w(a,d-1,m)}):a(m)}function t(a,d,m){if(2===arguments.length)return t.bind(null,a,d);if(!m)return m;m=w(a,d,m);for(var b=d,
c=m;0<b&&Array.isArray(c);)b--,c=c[0];if(void 0!==c)for(c=0;c<b;c++)m=[m];return m}Object.defineProperty(h,"__esModule",{value:!0});var u=n.getLogger("esri.core.Accessor");h.isInstanceOf=e;h.ensureDate=k;h.ensureBoolean=l;h.ensureString=q;h.ensureNumber=g;h.isClassedType=c;h.requiresType=b;h.ensureClass=f;h.ensureType=v;h.ensureArrayTyped=x;h.ensureArray=function(a,d){return 1===arguments.length?x(v.bind(null,a)):x(v.bind(null,a),d)};h.ensureNArrayTyped=t;h.ensureNArray=function(a,d,m){return 2===
arguments.length?t(v.bind(null,a),d):t(v.bind(null,a),d,m)};h.ensureOneOfType=function(a){var d={},m=[],p=[],f;for(f in a.typeMap){var e=a.typeMap[f];d[f]=v(e);m.push(e&&e.prototype&&e.prototype.declaredClass||"unknown");p.push(f)}var g="string"===typeof a.key?function(d){return d[a.key]}:a.key;return function(f){if(a.base&&!b(a.base,f))return f;var e=g(f),y=d[e];if(!y)return u.error("Accessor#set","Invalid property value, value needs to be one of "+("'"+m.join("', '")+"'")+", or a plain object that can auto-cast (having .type \x3d "+
("'"+p.join("', '")+"'")+")"),null;if(!b(a.typeMap[e],f))return f;if("string"!==typeof a.key||c(f))return y(f);var e={},k;for(k in f)k!==a.key&&(e[k]=f[k]);return y(e)}};h.default=v})},"esri/core/accessorSupport/decorators/cast":function(){define(["require","exports","../metadata","../ensureType"],function(a,h,n,e){function k(a){var b="_meta"in a?e.ensureType(a):a;return function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];a.push(b);return"number"===typeof a[2]?q.apply(this,a):l.apply(this,
a)}}function l(a,c,e,g){n.getPropertyMetadata(a,c).cast=g}function q(a,c,e,g){n.getParameterMetadata(a,c,e).cast=g}function g(a){return function(b,c,e){n.getPropertyMetadata(b,a).cast=b[c]}}Object.defineProperty(h,"__esModule",{value:!0});var c=Object.prototype.toString;h.autocastMethod=function(a,c,e){if(n.hasParametersMetadata(a,c)){var b=n.getParametersMetadata(a,c).filter(function(a){return null!=a.cast});if(b.length){var f=e.value;e.value=function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=
arguments[c];for(c=0;c<b.length;c++){var e=b[c];a[e.index]=e.cast(a[e.index])}return f.apply(this,a)};return e}console.warn("Method "+a.declaredClass+"::"+c+" is decorated with @cast but no parameters are decorated")}};h.cast=function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];if(3!==a.length||"string"!==typeof a[1]){if(1===a.length&&"[object Function]"===c.call(a[0]))return k(a[0]);if(1===a.length&&"string"===typeof a[0])return g(a[0])}}})},"esri/core/accessorSupport/watch":function(){define("require exports ../Scheduler ../ObjectPool ../ArrayPool ../lang ./utils ./get ./wire".split(" "),
function(a,h,n,e,k,l,q,g,c){function b(a){p.has(a)?d.splice(d.indexOf(a),1):p.add(a);d.push(a);m||(m=n.schedule(r))}function f(d){if(!d.removed){var a=d.callback,m=d.path,b=d.oldValue,c=d.target,p=g.valueOf(c,d.propertyPath,!0);l.equals(b,p)||(d.oldValue=p,a.call(c,p,b,m,c))}}function r(){if(m){m=null;var a=d;d=u.acquire();p.clear();for(var b=u.acquire(),c=0;c<a.length;c++){var e=a[c];f(e);e.removed&&b.push(e)}for(c=0;c<d.length;c++)e=d[c],e.removed&&(b.push(e),p.delete(e),d.splice(c,1),--c);for(c=
0;c<b.length;c++)t.pool.release(b[c]);u.release(a);u.release(b);y.forEach(function(d){return d()})}}function v(d,a,m){var p=q.parse(d,a,m,function(d,a,m){var f=g.valueOf(d,a,!0),e,y=c.wire(d,a,function(d,a){d.__accessor__.destroyed?p.remove():(e||(e=t.pool.acquire(d,a,f,m),f=null),b(e))});return{remove:q.once(function(){y.remove();e&&(e.removed=!0,b(e),e=null);p=y=f=null})}});return p}function x(d,a,m){var b=q.parse(d,a,m,function(d,a,m){var p=g.valueOf(d,a,!0),f=!1;return c.wire(d,a,function(d,a){if(d.__accessor__.destroyed)b.remove();
else if(!f){f=!0;var c=g.valueOf(d,a,!0);l.equals(p,c)||m.call(d,c,p,a,d);p=g.valueOf(d,a,!0);f=!1}})});return b}function w(d,a,m,b){void 0===b&&(b=!1);return!d.__accessor__||d.__accessor__.destroyed?{remove:function(){}}:b?x(d,a,m):v(d,a,m)}Object.defineProperty(h,"__esModule",{value:!0});var t=function(){function d(d,a,m,b){this.target=d;this.path=a;this.oldValue=m;this.callback=b;this.removed=!1;this.propertyPath=q.pathToStringOrArray(a)}d.prototype.release=function(){this.target=this.path=this.propertyPath=
this.callback=this.oldValue=null;this.removed=!0};d.pool=new e(d,!0);return d}(),u=new k,p=new Set,d=u.acquire(),m;h.dispatchTarget=function(a){for(var m=u.copy(d),b=0;b<m.length;b++){var c=m[b];c.target===a&&(f(c),p.delete(c),d.splice(d.indexOf(c),1))}};h.removeTarget=function(a){for(var m=0;m<d.length;m++){var b=d[m];b.target===a&&(b.removed=!0)}};h.dispatch=r;var y=new Set;h.afterDispatch=function(d){y.add(d);return{remove:function(){y.delete(d)}}};h.watch=w;h.isValueInUse=function(a){return d.some(function(d){return d.oldValue===
a})};h.default=w})},"esri/core/Scheduler":function(){define(["./ArrayPool","./ObjectPool","./nextTick","./requestAnimationFrame","./now"],function(a,h,n,e,k){var l=["prepare","preRender","render","postRender","update"],q=new h(function(){this.isActive=!0;this.callback=null},!0,function(a){a.isActive=!1;a.callback=null}),g=function(){},c=function(){this.item.isActive=!1;f.release(this)},b={time:0,deltaTime:0,spendInFrame:0,spendInTask:0},f=new h(function(){this.remove=c;this.item=null},!0,function(a){a.remove=
g;a.item=null});h=function(){this._boundDispatch=this._dispatch.bind(this);this.willDispatch=!1;this._queue=a.acquire();this._frameTasks=a.acquire();this._phaseTasks={};this._previousFrameTime=-1;for(var b=0;b<l.length;b++)this._phaseTasks[l[b]]=a.acquire();this._boundAnimationFrame=this._animationFrame.bind(this);this.executing=!1;this._animationFrameRequestId=null};h.prototype={schedule:function(a){var b=q.acquire();b.callback=a;this._schedule(b);a=f.acquire();a.item=b;return a},_dispatch:function(){for(var a=
this._queue;a.length;){var b=a.shift();b.isActive&&(b.isActive=!1,b.callback())}this.willDispatch=!1},_schedule:function(a){this._queue.push(a);this.willDispatch||(this.willDispatch=!0,n(this._boundDispatch))},addFrameTask:function(a){var b={phases:a,paused:!1,pausedAt:0,epoch:-1,dt:0,ticks:-1,removed:!1};this._frameTasks.push(b);for(var c=0;c<l.length;c++){var f=l[c];a[f]&&this._phaseTasks[f].push(b)}this._animationFrameRequestId||(this._previousFrameTime=-1,this._requestAnimationFrame());return{isPaused:function(){return b.paused},
remove:function(){b.removed=!0},pause:function(){b.paused=!0;b.pausedAt=k()},resume:function(){b.paused=!1;-1!==b.epoch&&(b.epoch+=k()-b.pausedAt)}}},clearFrameTasks:function(){for(var a=0;a<this._frameTasks.length;a++)this._frameTasks[a].removed=!0},_purge:function(){for(var a=0;a<this._frameTasks.length;){var b=this._frameTasks[a];a++;if(b.removed){this._frameTasks.splice(a-1,1);for(var c=0;c<l.length;c++){var f=l[c];if(b.phases[f]){var f=this._phaseTasks[f],e=f.indexOf(b);-1!==e&&f.splice(e,1)}}}}},
_animationFrame:function(a){this._animationFrameRequestId=null;this.executing=!0;0<this._frameTasks.length&&this._requestAnimationFrame();a=k();0>this._previousFrameTime&&(this._previousFrameTime=a);var c=a-this._previousFrameTime;this._previousFrameTime=a;for(var f=0;f<this._frameTasks.length;f++){var e=this._frameTasks[f];-1!==e.epoch&&(e.dt=c)}for(f=0;f<l.length;f++)for(var c=l[f],g=this._phaseTasks[c],p=0;p<g.length;p++)e=g[p],e.paused||e.removed||(0===f&&e.ticks++,-1===e.epoch&&(e.epoch=a),b.time=
a,b.deltaTime=e.dt,b.spendInFrame=k()-a,b.spendInTask=a-e.epoch,e.phases[c].call(e,b));this._purge();this.executing=!1},_requestAnimationFrame:function(){this._animationFrameRequestId=e(this._boundAnimationFrame)}};var r=new h;h.schedule=function(a){return r.schedule(a)};h.addFrameTask=function(a){return r.addFrameTask(a)};h.clearFrameTasks=function(){return r.clearFrameTasks()};Object.defineProperty(h,"executing",{get:function(){return r.executing}});h.instance=r;return h})},"esri/core/ArrayPool":function(){define(["require",
"exports","./ObjectPool"],function(a,h,n){function e(a){a.length=0}var k=Array.prototype.splice;a=function(){function a(a,c){void 0===a&&(a=50);void 0===c&&(c=50);this._pool=new n(Array,!1,e,c,a)}a.prototype.acquire=function(){return this._pool.acquire()};a.prototype.copy=function(a){var c=this.acquire();a.unshift(0,0);k.apply(c,a);a.splice(0,2);return c};a.prototype.release=function(a){this._pool.release(a)};a.acquire=function(){return l.acquire()};a.copy=function(a){return l.copy(a)};a.release=
function(a){return l.release(a)};return a}();var l=new a(100);return a})},"esri/core/ObjectPool":function(){define(["require","exports"],function(a,h){var n=function(){return function(){}}();return function(){function a(a,e,h,g,c){void 0===g&&(g=1);void 0===c&&(c=0);this.classConstructor=a;this.acquireFunctionOrWithConstructor=e;this.releaseFunction=h;this.growthSize=g;!0===e?this.acquireFunction=this._constructorAcquireFunction:"function"===typeof e&&(this.acquireFunction=e);this._pool=Array(c);
this._set=new Set;this._initialSize=c;for(a=0;a<c;a++)this._pool[a]=new this.classConstructor;this.growthSize=Math.max(g,1)}a.prototype.acquire=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];e=this.classConstructor||n;if(0===this._pool.length)for(var h=this.growthSize,g=0;g<h;g++)this._pool[g]=new e;e=this._pool.shift();this.acquireFunction?this.acquireFunction.apply(this,[e].concat(a)):e&&e.acquire&&"function"===typeof e.acquire&&e.acquire.apply(e,a);this._set.delete(e);return e};
a.prototype.release=function(a){a&&!this._set.has(a)&&(this.releaseFunction?this.releaseFunction(a):a&&a.release&&"function"===typeof a.release&&a.release(),this._pool.push(a),this._set.add(a))};a.prototype.prune=function(){if(!(this._pool.length<=this._initialSize))for(var a;this._initialSize>this._pool.length;)a=this._pool.shift(),this._set.delete(a),a.dispose&&"function"===typeof a.dispose&&a.dispose()};a.prototype._constructorAcquireFunction=function(a){for(var e=[],k=1;k<arguments.length;k++)e[k-
1]=arguments[k];(g=this.classConstructor).call.apply(g,[a].concat(e));var g};return a}()})},"esri/core/nextTick":function(){define(["require","exports","./global"],function(a,h,n){function e(){if(n.postMessage&&!n.importScripts){var a=n.onmessage,e=!0;n.onmessage=function(){e=!1};n.postMessage("","*");n.onmessage=a;return e}return!1}var k=n.MutationObserver||n.WebKitMutationObserver;return function(){var a;if(n.process&&n.process.nextTick)a=function(a){n.process.nextTick(a)};else if(n.Promise)a=function(a){n.Promise.resolve().then(a)};
else if(k){var h=[],g=document.createElement("div");(new k(function(){for(;0<h.length;)h.shift()()})).observe(g,{attributes:!0});a=function(a){h.push(a);g.setAttribute("queueStatus","1")}}else if(e()){var c=[];n.addEventListener("message",function(a){if(a.source===n&&"esri-nexttick-message"===a.data)for(a.stopPropagation();c.length;)c.shift()()},!0);a=function(a){c.push(a);n.postMessage("esri-nexttick-message","*")}}else a=n.setImmediate?function(a){return n.setImmediate(a)}:function(a){return n.setTimeout(a,
0)};return a}()})},"esri/core/global":function(){define(["require","exports"],function(a,h){return function(){if("undefined"!==typeof global)return global;if("undefined"!==typeof window)return window;if("undefined"!==typeof self)return self}()})},"esri/core/requestAnimationFrame":function(){define(["require","exports","./global","dojo/sniff","./now"],function(a,h,n,e,k){e("ie");a=e("webkit");e("opera");var l=k();e=n.requestAnimationFrame;e||(e=n[(a&&"webkit"||"moz")+"RequestAnimationFrame"])||(e=
function(a){var e=k(),c=Math.max(0,16-(e-l)),b=n.setTimeout(function(){a(k())},c);l=e+c;return b});return e})},"esri/core/now":function(){define(["require","exports","./global"],function(a,h,n){return function(){var a=n.performance||{};if(a.now)return function(){return a.now()};if(a.webkitNow)return function(){return a.webkitNow()};if(a.mozNow)return function(){return a.mozNow()};if(a.msNow)return function(){return a.msNow()};if(a.oNow)return function(){return a.oNow()};var k;k=a.timing&&a.timing.navigationStart?
a.timing.navigationStart:Date.now();return function(){return Date.now()-k}}()})},"esri/core/CollectionFlattener":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./accessorSupport/decorators ./Collection ./HandleRegistry".split(" "),function(a,h,n,e,k,l,q){return function(a){function c(b){b=a.call(this)||this;b._handles=new q;b.root=null;b.refresh=b.refresh.bind(b);b.updateCollections=b.updateCollections.bind(b);return b}n(c,a);c.prototype.initialize=
function(){var a=this;this._handles.add(this.rootCollectionNames.map(function(b){return a.watch("root."+b,a.updateCollections,!0)}));this.updateCollections()};c.prototype.destroy=function(){this.root=null;this.refresh();this._handles.destroy();this._handles=null};c.prototype.updateCollections=function(){var a=this;this._collections=this.rootCollectionNames.map(function(b){return a.get("root."+b)}).filter(function(a){return null!=a});this.refresh()};c.prototype.refresh=function(){var a=this._handles;
a.remove("collections");this.removeAll();for(var c=this._collections.slice(),e=0,g=this._collections;e<g.length;e++)this._processCollection(c,this,g[e]);for(e=0;e<c.length;e++)a.add(c[e].on("after-changes",this.refresh),"collections")};c.prototype._createNewInstance=function(a){return new l(a)};c.prototype._processCollection=function(a,c,e){var b=this;e&&(a.push(e),e.forEach(function(f){f&&(c.push(f),b._processCollection(a,c,b.getChildrenFunction(f)))}))};e([k.property()],c.prototype,"rootCollectionNames",
void 0);e([k.property()],c.prototype,"root",void 0);e([k.property()],c.prototype,"getChildrenFunction",void 0);return c=e([k.subclass("esri.core.CollectionFlattener")],c)}(k.declared(l))})},"esri/core/accessorSupport/decorators":function(){define("require exports ./decorators/aliasOf ./decorators/autoDestroy ./decorators/cast ./decorators/declared ./decorators/property ./decorators/reader ./decorators/shared ./decorators/subclass ./decorators/writer".split(" "),function(a,h,n,e,k,l,q,g,c,b,f){function r(a){for(var b in a)h.hasOwnProperty(b)||
(h[b]=a[b])}Object.defineProperty(h,"__esModule",{value:!0});r(n);r(e);r(k);r(l);r(q);r(g);r(c);r(b);r(f)})},"esri/core/accessorSupport/decorators/aliasOf":function(){define(["require","exports","../metadata"],function(a,h,n){Object.defineProperty(h,"__esModule",{value:!0});h.aliasOf=function(a){return function(e,l){n.getPropertyMetadata(e,l).aliasOf=a}}})},"esri/core/accessorSupport/decorators/autoDestroy":function(){define(["require","exports","../metadata"],function(a,h,n){Object.defineProperty(h,
"__esModule",{value:!0});h.autoDestroy=function(){return function(a,k,l){n.getMetadata(a).autoDestroy=!0;return a[k]}}})},"esri/core/accessorSupport/decorators/declared":function(){define(["require","exports"],function(a,h){Object.defineProperty(h,"__esModule",{value:!0});h.declared=function(a){for(var e=[],k=1;k<arguments.length;k++)e[k-1]=arguments[k];k=function(){return this||{}};k.__bases__=[a].concat(e);return k}})},"esri/core/accessorSupport/decorators/property":function(){define("require exports dojo/has ../../Logger ../../lang ../metadata".split(" "),
function(a,h,n,e,k,l){Object.defineProperty(h,"__esModule",{value:!0});e.getLogger("esri.core.accessorSupport.decorators.property");h.property=function(a){void 0===a&&(a={});return function(e,c){var b=e.constructor.prototype;if(b!==Function.prototype){(e=Object.getOwnPropertyDescriptor(e,c))&&(e.get||e.set)?(a=k.clone(a),e.set&&(a.set=e.set),e.get&&(a.get=e.get)):e&&e.hasOwnProperty("value")&&(a=k.clone(a),a.value=e.value);c=l.getPropertyMetadata(b,c);for(var f in a)b=a[f],Array.isArray(b)?c[f]=(c[f]||
[]).concat(b):c[f]=b}}};h.propertyJSONMeta=function(a,e,c){a=l.getPropertyMetadata(a.constructor.prototype,c);a.json||(a.json={});a=a.json;void 0!==e&&(a.origins||(a.origins={}),a.origins[e]||(a.origins[e]={}),a=a.origins[e]);return a}})},"esri/core/accessorSupport/decorators/reader":function(){define(["require","exports","dojo/_base/lang","./property"],function(a,h,n,e){Object.defineProperty(h,"__esModule",{value:!0});h.reader=function(a,l,h){var g,c;void 0===l||Array.isArray(l)?(c=a,h=l,g=[void 0]):
(c=l,g=Array.isArray(a)?a:[a]);return function(a,f,k){var b=a.constructor.prototype;g.forEach(function(g){g=e.propertyJSONMeta(a,g,c);g.read&&"object"!==typeof g.read&&(g.read={});n.setObject("read.reader",b[f],g);h&&(g.read.source=(g.read.source||[]).concat(h))})}}})},"esri/core/accessorSupport/decorators/shared":function(){define(["require","exports"],function(a,h){Object.defineProperty(h,"__esModule",{value:!0});h.shared=function(a){return function(e,k){e[k]=a}}})},"esri/core/accessorSupport/decorators/subclass":function(){define(["require",
"exports","../../declare","../metadata"],function(a,h,n,e){function k(a,b){a.read&&("function"===typeof a.read?b.push(a.read):"object"===typeof a.read&&a.read.reader&&b.push(a.read.reader))}function l(a,b){a.write&&("function"===typeof a.write?b.push(a.write):"object"===typeof a.write&&a.write.writer&&b.push(a.write.writer))}function q(a){var b=[];a=e.getPropertiesMetadata(a.prototype);if(!a)return b;for(var c in a){var f=a[c];f.cast&&b.push(f.cast);f.copy&&b.push(f.copy);if(f=f.json)if(k(f,b),l(f,
b),f=f.origins)for(var g in f){var h=f[g];k(h,b);l(h,b)}}return b}function g(a){var c={values:{},descriptors:{}},f=["__bases__"],g=e.getPropertiesMetadata(a.prototype),k=q(a);Object.getOwnPropertyNames(a.prototype).filter(function(c){return-1!==f.indexOf(c)||g&&g.hasOwnProperty(c)||!b(Object.getOwnPropertyDescriptor(a.prototype,c))&&-1!==k.indexOf(a.prototype[c])?!1:!0}).forEach(function(f){var e=Object.getOwnPropertyDescriptor(a.prototype,f);b(e)?c.descriptors[f]=e:c.values[f]=a.prototype[f]});return c}
function c(a){var c=Object.getOwnPropertyNames(a),f=Object.getPrototypeOf(a.prototype).constructor,e=Object.getOwnPropertyNames(Function);e.push("__bases__");var g=Object.getOwnPropertyNames(f),k={values:{},descriptors:{}};c.filter(function(b){return-1!==e.indexOf(b)?!1:-1===g.indexOf(b)||f[b]!==a[b]?!0:!1}).forEach(function(c){var p=Object.getOwnPropertyDescriptor(a,c);b(p)?k.descriptors[c]=p:k.values[c]=a[c]});return k}function b(a){return a&&!(!a.get&&!a.set)}Object.defineProperty(h,"__esModule",
{value:!0});h.subclass=function(a){return function(b){var f=g(b),e=c(b);null!=a&&(f.values.declaredClass=a);b=n(b.__bases__,f.values);Object.defineProperties(b.prototype,f.descriptors);for(var k in e.values)b[k]=e.values[k];Object.defineProperties(b,e.descriptors);return b}}})},"esri/core/accessorSupport/decorators/writer":function(){define(["require","exports","dojo/_base/lang","./property"],function(a,h,n,e){Object.defineProperty(h,"__esModule",{value:!0});h.writer=function(a,l,h){var g,c;void 0===
l?(c=a,g=[void 0]):"string"!==typeof l?(c=a,g=[void 0],h=l):(c=l,g=Array.isArray(a)?a:[a]);return function(a,f,k){var b=a.constructor.prototype;g.forEach(function(g){g=e.propertyJSONMeta(a,g,c);g.write&&"object"!==typeof g.write&&(g.write={});h&&n.setObject("write.target",h,g);n.setObject("write.writer",b[f],g)})}}})},"esri/core/Collection":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper dojo/aspect ./accessorSupport/decorators ./accessorSupport/ensureType ./Accessor ./ArrayPool ./Evented ./ObjectPool ./Scheduler ./lang".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v){function x(a){return a?a.isInstanceOf&&a.isInstanceOf(G)?!0:!1:!1}function w(a){return a?x(a)?a.toArray():a.length?Array.prototype.slice.apply(a):[]:[]}function t(a){if(a&&a.length)return a[0]}function u(a,d,m,b){d&&d.forEach(function(d,c,p){a.push(d);u(a,m.call(b,d,c,p),m,b)})}a=function(){function a(){this.target=null;this.defaultPrevented=this.cancellable=!1}a.prototype.preventDefault=function(){this.cancellable&&(this.defaultPrevented=!0)};a.prototype.reset=
function(a){this.defaultPrevented=!1;this.item=a};return a}();var p=function(){},d=new f(a,!0,function(a){a.item=null;a.target=null}),m=new Set,y=new Set,z=new Set,A=new Map,C=0,G=function(a){function b(d){d=a.call(this,d)||this;d._boundDispatch=d._dispatchColChange.bind(d);d._chgListeners=[];d._notifications=null;d._timer=null;d.length=0;d._items=[];Object.defineProperty(d,"uid",{value:C++});return d}n(b,a);f=b;b.ofType=function(a){if(!a)return f;if(A.has(a))return A.get(a);var d;if("function"===
typeof a)d=a.prototype.declaredClass;else if(a.base)d=a.base.prototype.declaredClass;else for(var b in a.typeMap){var m=a.typeMap[b].prototype.declaredClass;d=d?d+(" | "+m):m}d=f.createSubclass({declaredClass:"esri.core.Collection\x3c"+d+"\x3e"});b={Type:a,ensureType:"function"===typeof a?q.ensureType(a):q.ensureOneOfType(a)};Object.defineProperty(d.prototype,"itemType",{value:b});A.set(a,d);return d};b.prototype.normalizeCtorArgs=function(a){return a?Array.isArray(a)||x(a)?{items:a}:a:{}};Object.defineProperty(b.prototype,
"items",{get:function(){return this._items},set:function(a){this._emitBeforeChanges()||(this._splice.apply(this,[0,this.length].concat(w(a))),this._emitAfterChanges())},enumerable:!0,configurable:!0});b.prototype.on=function(a,d){var b;Array.isArray(a)?b=a:-1<a.indexOf(",")&&(b=a.split(/\s*,\s*/));if(b){var m=[];for(a=0;a<b.length;a++)m.push(this.on(b[a],d));m.remove=function(){for(var a=0;a<m.length;a++)m[a].remove()};return m}if("change"===a){var c=this._chgListeners,f={removed:!1,callback:d};c.push(f);
this._notifications&&this._notifications.push({listeners:c.slice(),items:this._items.slice(),changes:[]});return{remove:function(){this.remove=p;f.removed=!0;c.splice(c.indexOf(f),1)}}}return k.after(this,"on"+a,d,!0)};b.prototype.hasEventListener=function(a){return"change"===a?0<this._chgListeners.length:this.inherited(arguments)};b.prototype.add=function(a,d){if(this._emitBeforeChanges())return this;d=this.getNextIndex(d);this._splice(d,0,a);this._emitAfterChanges();return this};b.prototype.addMany=
function(a,d){void 0===d&&(d=this._items.length);if(this._emitBeforeChanges())return this;d=this.getNextIndex(d);this._splice.apply(this,[d,0].concat(w(a)));this._emitAfterChanges();return this};b.prototype.removeAll=function(){if(!this.length||this._emitBeforeChanges())return[];var a=this._splice(0,this.length)||[];this._emitAfterChanges();return a};b.prototype.clone=function(){return this._createNewInstance({items:this._items.map(v.clone)})};b.prototype.concat=function(){for(var a=[],d=0;d<arguments.length;d++)a[d]=
arguments[d];a=a.map(w);return this._createNewInstance({items:(b=this._items).concat.apply(b,a)});var b};b.prototype.drain=function(a,d){if(this.length&&!this._emitBeforeChanges()){for(var b=this._splice(0,this.length),m=b.length,c=0;c<m;c++)a.call(d,b[c],c,b);this._emitAfterChanges()}};b.prototype.every=function(a,d){return this._items.every(a,d)};b.prototype.filter=function(a,d){var b;b=2===arguments.length?this._items.filter(a,d):this._items.filter(a);return this._createNewInstance({items:b})};
b.prototype.find=function(a,d){if("function"!==typeof a)throw new TypeError(a+" is not a function");for(var b=this._items,m=b.length,c=0;c<m;c++){var p=b[c];if(a.call(d,p,c,b))return p}};b.prototype.findIndex=function(a,d){if("function"!==typeof a)throw new TypeError(a+" is not a function");for(var b=this._items,m=b.length,c=0;c<m;c++)if(a.call(d,b[c],c,b))return c;return-1};b.prototype.flatten=function(a,d){var b=[];u(b,this,a,d);return new f(b)};b.prototype.forEach=function(a,d){for(var b=this._items,
m=b.length,c=0;c<m;c++)a.call(d,b[c],c,b)};b.prototype.getItemAt=function(a){return this._items[a]};b.prototype.getNextIndex=function(a){var d=this.length;a=null==a?d:a;0>a?a=0:a>d&&(a=d);return a};b.prototype.includes=function(a,d){void 0===d&&(d=0);return arguments.length?-1!==this._items.indexOf(a,d):!1};b.prototype.indexOf=function(a,d){void 0===d&&(d=0);return this._items.indexOf(a,d)};b.prototype.join=function(a){void 0===a&&(a=",");return this._items.join(a)};b.prototype.lastIndexOf=function(a,
d){void 0===d&&(d=this.length-1);return this._items.lastIndexOf(a,d)};b.prototype.map=function(a,d){a=this._items.map(a,d);return new f({items:a})};b.prototype.reorder=function(a,d){void 0===d&&(d=this.length-1);var b=this.indexOf(a);if(-1!==b){0>d?d=0:d>=this.length&&(d=this.length-1);if(b!==d){if(this._emitBeforeChanges())return a;this._splice(b,1);this._splice(d,0,a);this._emitAfterChanges()}return a}};b.prototype.pop=function(){if(this.length&&!this._emitBeforeChanges()){var a=t(this._splice(this.length-
1,1));this._emitAfterChanges();return a}};b.prototype.push=function(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];if(this._emitBeforeChanges())return this.length;this._splice.apply(this,[this.length,0].concat(a));this._emitAfterChanges();return this.length};b.prototype.reduce=function(a,d){var b=this._items;return 2===arguments.length?b.reduce(a,d):b.reduce(a)};b.prototype.reduceRight=function(a,d){var b=this._items;return 2===arguments.length?b.reduceRight(a,d):b.reduceRight(a)};b.prototype.remove=
function(a){return this.removeAt(this.indexOf(a))};b.prototype.removeAt=function(a){if(!(0>a||a>=this.length||this._emitBeforeChanges()))return a=t(this._splice(a,1)),this._emitAfterChanges(),a};b.prototype.removeMany=function(a){if(!a||!a.length||this._emitBeforeChanges())return[];a=x(a)?a.toArray():a;for(var d=this._items,b=[],m=a.length,c=0;c<m;c++){var p=d.indexOf(a[c]);if(-1<p){for(var f=c+1,e=p+1,g=Math.min(a.length-f,d.length-e),y=0;y<g&&a[f+y]===d[e+y];)y++;f=1+y;(p=this._splice(p,f))&&0<
p.length&&b.push.apply(b,p);c+=f-1}}this._emitAfterChanges();return b};b.prototype.reverse=function(){if(this._emitBeforeChanges())return this;var a=this._splice(0,this.length);a&&(a.reverse(),this._splice.apply(this,[0,0].concat(a)));this._emitAfterChanges();return this};b.prototype.shift=function(){if(this.length&&!this._emitBeforeChanges()){var a=t(this._splice(0,1));this._emitAfterChanges();return a}};b.prototype.slice=function(a,d){void 0===a&&(a=0);void 0===d&&(d=this.length);return this._createNewInstance({items:this._items.slice(a,
d)})};b.prototype.some=function(a,d){return this._items.some(a,d)};b.prototype.sort=function(a){if(!this.length||this._emitBeforeChanges())return this;var d=this._splice(0,this.length);arguments.length?d.sort(a):d.sort();this._splice.apply(this,[0,0].concat(d));return this};b.prototype.splice=function(a,d){for(var b=[],m=2;m<arguments.length;m++)b[m-2]=arguments[m];if(this._emitBeforeChanges())return[];b=this._splice.apply(this,[a,d].concat(b))||[];this._emitAfterChanges();return b};b.prototype.toArray=
function(){return this._items.slice()};b.prototype.toJSON=function(){return this.toArray()};b.prototype.toLocaleString=function(){return this._items.toLocaleString()};b.prototype.toString=function(){return this._items.toString()};b.prototype.unshift=function(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];if(this._emitBeforeChanges())return this.length;this._splice.apply(this,[0,0].concat(a));this._emitAfterChanges();return this.length};b.prototype._createNewInstance=function(a){return new this.constructor(a)};
b.prototype._splice=function(a,b){for(var m=this,c=[],p=2;p<arguments.length;p++)c[p-2]=arguments[p];var p=this._items,f=this.constructor.prototype.itemType,e,g,y;!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=r.schedule(this._boundDispatch));if(b){y=p.splice(a,b);if(this.hasEventListener("before-remove")){e=d.acquire();e.target=this;e.cancellable=
!0;for(var k=0,l=y.length;k<l;k++)g=y[k],e.reset(g),this.emit("before-remove",e),e.defaultPrevented&&(y.splice(k,1),p.splice(a,0,g),a+=1,--k,--l);d.release(e)}this.length=this._items.length;if(this.hasEventListener("after-remove")){e=d.acquire();e.target=this;e.cancellable=!1;l=y.length;for(k=0;k<l;k++)e.reset(y[k]),this.emit("after-remove",e);d.release(e)}this._notifyChangeEvent(null,y)}if(c&&c.length){if(f){e=[];for(g=0;g<c.length;g++)k=c[g],l=f.ensureType(k),null==l&&null!=k||e.push(l);c=e}if(this.hasEventListener("before-add")){var h=
d.acquire();h.target=this;h.cancellable=!0;c=c.filter(function(a){h.reset(a);m.emit("before-add",h);return!h.defaultPrevented});d.release(h)}p.splice.apply(p,[a,0].concat(c));this.length=this._items.length;if(this.hasEventListener("after-add")){e=d.acquire();e.target=this;e.cancellable=!1;p=0;for(f=c;p<f.length;p++)g=f[p],e.reset(g),this.emit("after-add",e);d.release(e)}this._notifyChangeEvent(c,null)}return y};b.prototype._emitBeforeChanges=function(){var a=!1;if(this.hasEventListener("before-changes")){var b=
d.acquire();b.target=this;b.cancellable=!0;this.emit("before-changes",b);a=b.defaultPrevented;d.release(b)}return a};b.prototype._emitAfterChanges=function(){if(this.hasEventListener("after-changes")){var a=d.acquire();a.target=this;a.cancellable=!1;this.emit("after-changes",a);d.release(a)}};b.prototype._notifyChangeEvent=function(a,d){this.hasEventListener("change")&&this._notifications[this._notifications.length-1].changes.push({added:a,removed:d})};b.prototype._dispatchColChange=function(){this._timer&&
(this._timer.remove(),this._timer=null);if(this._notifications){var a=this._notifications;this._notifications=null;for(var d=function(a){var d=a.changes;m.clear();y.clear();z.clear();for(var p=0;p<d.length;p++){var f=d[p],e=f.added,f=f.removed;if(e)if(0===z.size&&0===y.size)for(var g=0,k=e;g<k.length;g++)e=k[g],m.add(e);else for(g=0,k=e;g<k.length;g++)e=k[g],y.has(e)?(z.add(e),y.delete(e)):z.has(e)||m.add(e);if(f)if(0===z.size&&0===m.size)for(g=0;g<f.length;g++)e=f[g],y.add(e);else for(g=0;g<f.length;g++)e=
f[g],m.has(e)?m.delete(e):(z.delete(e),y.add(e))}var l=c.acquire();m.forEach(function(a){l.push(a)});var h=c.acquire();y.forEach(function(a){h.push(a)});var u=b._items,r=a.items,t=c.acquire();z.forEach(function(a){r.indexOf(a)!==u.indexOf(a)&&t.push(a)});if(a.listeners&&(l.length||h.length||t.length))for(d={target:b,added:l,removed:h,moved:t},p=a.listeners.length,e=0;e<p;e++)f=a.listeners[e],f.removed||f.callback.call(b,d);c.release(l);c.release(h);c.release(t)},b=this,p=0;p<a.length;p++)d(a[p]);
m.clear();y.clear();z.clear()}};b.isCollection=x;e([l.property()],b.prototype,"length",void 0);e([l.property()],b.prototype,"items",null);return b=f=e([l.subclass("esri.core.Collection")],b);var f}(l.declared(g,b));return G})},"esri/core/Evented":function(){define(["./declare","dojo/Evented"],function(a,h){return a(h,{declaredClass:"esri.core.Evented",hasEventListener:function(a){a="on"+a;return!(!this[a]||!this[a].after)},emit:function(a,e){if(this.hasEventListener(a))return e=e||{},e.target||(e.target=
this),this.inherited(arguments,[a,e])}})})},"esri/core/HandleRegistry":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./accessorSupport/decorators ./Accessor ./Collection".split(" "),function(a,h,n,e,k,l,q){return function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b._groups=new Map;return b}n(c,a);c.prototype.destroy=function(){this.removeAll()};Object.defineProperty(c.prototype,"size",{get:function(){var a=0;this._groups.forEach(function(b){a+=
b.length});return a},enumerable:!0,configurable:!0});c.prototype.add=function(a,c){if(!this._isHandle(a)&&!Array.isArray(a)&&!q.isCollection(a))return this;var b=this._getOrCreateGroup(c);Array.isArray(a)||q.isCollection(a)?a.forEach(function(a){return b.push(a)}):b.push(a);this.notifyChange("size");return this};c.prototype.has=function(a){return this._groups.has(this._ensureGroupKey(a))};c.prototype.remove=function(a){if(Array.isArray(a)||q.isCollection(a))return a.forEach(this.remove,this),this;
if(!this.has(a))return this;for(var b=this._getGroup(a),c=0;c<b.length;c++)b[c].remove();this._deleteGroup(a);this.notifyChange("size");return this};c.prototype.removeAll=function(){this._groups.forEach(function(a){for(var b=0;b<a.length;b++)a[b].remove()});this._groups.clear();this.notifyChange("size");return this};c.prototype._isHandle=function(a){return a&&!!a.remove};c.prototype._getOrCreateGroup=function(a){if(this.has(a))return this._getGroup(a);var b=[];this._groups.set(this._ensureGroupKey(a),
b);return b};c.prototype._getGroup=function(a){return this._groups.get(this._ensureGroupKey(a))};c.prototype._deleteGroup=function(a){return this._groups.delete(this._ensureGroupKey(a))};c.prototype._ensureGroupKey=function(a){return a||"_default_"};e([k.property({readOnly:!0})],c.prototype,"size",null);return c=e([k.subclass()],c)}(k.declared(l))})},"esri/support/LayersMixin":function(){define(["../core/Accessor","../core/Collection","../core/Logger"],function(a,h,n){var e=function(a,k,g){for(var c,
b=0,f=a.length;b<f;b++)if(c=a.getItemAt(b),c[k]===g||c.layers&&(c=e(c.layers,k,g)))return c},k=n.getLogger("esri.support.LayersMixin");return a.createSubclass({declaredClass:"esri.support.LayersMixin",destroy:function(){this._layersHandle.remove();this._layersHandle=null;this.layers.drain(this._lyrRemove,this)},properties:{layers:{type:h,get:function(){var a=this._get("layers");if(a)return a;a=new h;a.on("after-add",function(a){a=a.item;a.parent&&a.parent!==this&&a.parent.remove(a);a.parent=this;
this.layerAdded(a);"elevation"===a.type&&k.error("Layer '"+a.title+", id:"+a.id+"' of type '"+a.type+"' is not supported as an operational layer and will therefore be ignored.")}.bind(this));a.on("after-remove",function(a){a=a.item;a.parent=null;this.layerRemoved(a)}.bind(this));return a},set:function(a){var e=this._get("layers");e&&this.remove(e.toArray());this.addMany(a.toArray())}}},findLayerById:function(a){return e(this.layers,"id",a)},add:function(a,e){var g=this.layers;e=g.getNextIndex(e);
a.parent===this?this.reorder(a,e):g.add(a,e)},addMany:function(a,e){var g=this.layers;e=g.getNextIndex(e);a.slice().forEach(function(a){a.parent===this?this.reorder(a,e):(g.add(a,e),e+=1)},this)},remove:function(a){return this.layers.remove(a)},removeMany:function(a){return this.layers.removeMany(a)},removeAll:function(){return this.layers.removeAll()},reorder:function(a,e){return this.layers.reorder(a,e)},findLayerByUid:function(a){return e(this.layers,"uid",a)},layerAdded:function(a){},layerRemoved:function(a){}})})},
"esri/Basemap":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/accessorSupport/decorators dojo/_base/lang ./support/basemapDefinitions ./core/Collection ./core/collectionUtils ./core/Evented ./core/JSONSupport ./core/Loadable ./core/promiseUtils ./core/requireUtils ./core/urlUtils ./core/Logger ./portal/Portal ./portal/PortalItem ./layers/Layer".split(" "),function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t,u,p,d){var m=0,y=g.ofType(d),z=t.getLogger("esri.Basemap");
return function(d){function b(a){a=d.call(this)||this;a.id=null;a.portalItem=null;a.thumbnailUrl=null;a.title="Basemap";a.id=Date.now().toString(16)+"-basemap-"+m++;a.baseLayers=new g;a.referenceLayers=new g;var b=function(a){"elevation"===a.type&&z.error("Layer '"+a.title+", id:"+a.id+"' of type '"+a.type+"' is not supported as a basemap layer and will therefore be ignored.")};a.baseLayers.on("after-add",function(a){return b(a.item)});a.referenceLayers.on("after-add",function(a){return b(a.item)});
return a}n(b,d);f=b;b.prototype.initialize=function(){var a=this;this.when().catch(function(d){z.error("#load()","Failed to load basemap (title: '"+a.title+"', id: '"+a.id+"')",d)});this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)};b.prototype.normalizeCtorArgs=function(a){a&&"resourceInfo"in a&&(this._set("resourceInfo",a.resourceInfo),a=l.mixin({},a),delete a.resourceInfo);return a};Object.defineProperty(b.prototype,"baseLayers",{set:function(a){this._set("baseLayers",
c.referenceSetter(a,this._get("baseLayers"),y))},enumerable:!0,configurable:!0});b.prototype.writeBaseLayers=function(a,d,b,m){var c=[];a&&(m=l.mixin({},m,{layerContainerType:"basemap"}),this.baseLayers.forEach(function(a){if(a.write){var d={};a.write(d,m)&&c.push(d)}}),this.referenceLayers.forEach(function(a){if(a.write){var d={isReference:!0};a.write(d,m)&&c.push(d)}}));d[b]=c};Object.defineProperty(b.prototype,"referenceLayers",{set:function(a){this._set("referenceLayers",c.referenceSetter(a,this._get("referenceLayers"),
y))},enumerable:!0,configurable:!0});b.prototype.writeTitle=function(a,d){d.title=a||"Basemap"};b.prototype.load=function(){this.addResolvingPromise(this._loadFromSource());return this.when()};b.prototype.clone=function(){var a={id:this.id,title:this.title,portalItem:this.portalItem,resourceInfo:this.resourceInfo,baseLayers:this.baseLayers.slice(),referenceLayers:this.referenceLayers.slice()};this.loaded&&(a.loadStatus="loaded");return new f(a)};b.prototype.read=function(a,d){this.resourceInfo||this._set("resourceInfo",
{data:a,context:d});return this.inherited(arguments)};b.prototype.write=function(a,d){a=a||{};d&&d.origin||(d=l.mixin({origin:"web-map"},d));this.inherited(arguments,[a,d]);!this.loaded&&this.resourceInfo&&this.resourceInfo.data.baseMapLayers&&(a.baseMapLayers=this.resourceInfo.data.baseMapLayers.map(function(a){a=l.clone(a);a.url&&w.isProtocolRelative(a.url)&&(a.url="https:"+a.url);a.templateUrl&&w.isProtocolRelative(a.templateUrl)&&(a.templateUrl="https:"+a.templateUrl);return a}));return a};b.prototype._loadFromSource=
function(){var a=this.resourceInfo,d=this.portalItem;return a?this._loadLayersFromJSON(a.data,a.context?a.context.url:null):d?this._loadFromItem(d):v.resolve(null)};b.prototype._loadLayersFromJSON=function(d,b){var m=this,c=this.resourceInfo&&this.resourceInfo.context,p=this.portalItem&&this.portalItem.portal||c&&c.portal||null,f=c&&"web-scene"===c.origin?"web-scene":"web-map";return x.when(a,"./portal/support/layersCreator").then(function(a){var c=[];if(d.baseMapLayers&&Array.isArray(d.baseMapLayers)){var e=
{context:{origin:f,url:b,portal:p,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},g=a.populateOperationalLayers(m.baseLayers,d.baseMapLayers.filter(function(a){return!a.isReference}),e);c.push.apply(c,g);a=a.populateOperationalLayers(m.referenceLayers,d.baseMapLayers.filter(function(a){return a.isReference}),e);c.push.apply(c,a)}return v.eachAlways(c)}).then(function(){})};b.prototype._loadFromItem=function(a){var d=this;return a.load().then(function(a){return a.fetchData()}).then(function(b){var m=
w.urlToObject(a.itemUrl);d._set("resourceInfo",{data:b.baseMap,context:{origin:"web-map",portal:a.portal||u.getDefault(),url:m}});d.read(d.resourceInfo.data,d.resourceInfo.context);d.read({title:a.title,thumbnailUrl:a.thumbnailUrl},{origin:"portal-item",portal:a.portal||u.getDefault(),url:m});return d._loadLayersFromJSON(d.resourceInfo.data,m)})};b.fromId=function(a){return(a=q[a])?f.fromJSON(a):null};e([k.property({type:y,json:{write:{ignoreOrigin:!0,target:"baseMapLayers"}}}),k.cast(c.castForReferenceSetter)],
b.prototype,"baseLayers",null);e([k.writer("baseLayers")],b.prototype,"writeBaseLayers",null);e([k.property({type:String,json:{origins:{"web-scene":{write:!0}}}})],b.prototype,"id",void 0);e([k.property({type:p})],b.prototype,"portalItem",void 0);e([k.property({type:y}),k.cast(c.castForReferenceSetter)],b.prototype,"referenceLayers",null);e([k.property({readOnly:!0})],b.prototype,"resourceInfo",void 0);e([k.property()],b.prototype,"thumbnailUrl",void 0);e([k.property({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],
b.prototype,"title",void 0);e([k.writer("title")],b.prototype,"writeTitle",null);return b=f=e([k.subclass("esri.Basemap")],b);var f}(k.declared(f,b,r))})},"esri/support/basemapDefinitions":function(){define(["require","exports","dojo/i18n!../nls/basemaps"],function(a,h,n){return{streets:{id:"streets",title:n.streets,thumbnailUrl:a.toUrl("../images/basemap/streets.jpg"),baseMapLayers:[{id:"streets-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",layerType:"ArcGISTiledMapServiceLayer",
title:"World Street Map",showLegend:!1,visibility:!0,opacity:1}]},satellite:{id:"satellite",title:n.satellite,thumbnailUrl:a.toUrl("../images/basemap/satellite.jpg"),baseMapLayers:[{id:"satellite-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1}]},hybrid:{id:"hybrid",title:n.hybrid,thumbnailUrl:a.toUrl("../images/basemap/hybrid.jpg"),baseMapLayers:[{id:"hybrid-base-layer",
url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1},{id:"hybrid-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Boundaries and Places",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},terrain:{id:"terrain",title:n.terrain,thumbnailUrl:a.toUrl("../images/basemap/terrain.jpg"),
baseMapLayers:[{id:"terrain-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Terrain Base",showLegend:!1,visibility:!0,opacity:1},{id:"terrain-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Reference Overlay",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},topo:{id:"topo",
title:n.topo,thumbnailUrl:a.toUrl("../images/basemap/topo.jpg"),baseMapLayers:[{id:"topo-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Topo Map",showLegend:!1,visibility:!0,opacity:1}]},gray:{id:"gray",title:n.gray,thumbnailUrl:a.toUrl("../images/basemap/gray.jpg"),baseMapLayers:[{id:"gray-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",
title:"World Light Gray Base",showLegend:!1,visibility:!0,opacity:1},{id:"gray-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Light Gray Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},"dark-gray":{id:"dark-gray",title:n["dark-gray"],thumbnailUrl:a.toUrl("../images/basemap/dark-gray.jpg"),baseMapLayers:[{id:"dark-gray-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer",
layerType:"ArcGISTiledMapServiceLayer",title:"World Dark Gray Base",showLegend:!1,visibility:!0,opacity:1},{id:"dark-gray-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Dark Gray Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},oceans:{id:"oceans",title:n.oceans,thumbnailUrl:a.toUrl("../images/basemap/oceans.jpg"),baseMapLayers:[{id:"oceans-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer",
layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Base",showLegend:!1,visibility:!0,opacity:1},{id:"oceans-reference-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},"national-geographic":{id:"national-geographic",title:n["national-geographic"],thumbnailUrl:a.toUrl("../images/basemap/national-geographic.jpg"),baseMapLayers:[{id:"national-geographic-base-layer",
url:"//services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer",title:"NatGeo World Map",showLegend:!1,layerType:"ArcGISTiledMapServiceLayer",visibility:!0,opacity:1}]},osm:{id:"osm",title:n.osm,thumbnailUrl:a.toUrl("../images/basemap/osm.jpg"),baseMapLayers:[{id:"osm-base-layer",layerType:"OpenStreetMap",title:"Open Street Map",showLegend:!1,visibility:!0,opacity:1}]},"dark-gray-vector":{id:"dark-gray-vector",title:n["dark-gray"],thumbnailUrl:a.toUrl("../images/basemap/dark-gray.jpg"),
baseMapLayers:[{id:"dark-gray-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/c11ce4f7801740b2905eb03ddc963ac8/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Dark Gray",visibility:!0,opacity:1}]},"gray-vector":{id:"gray-vector",title:n.gray,thumbnailUrl:a.toUrl("../images/basemap/gray.jpg"),baseMapLayers:[{id:"gray-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/8a2cba3b0ebf4140b7c0dc5ee149549a/resources/styles/root.json",layerType:"VectorTileLayer",
title:"World Light Gray",visibility:!0,opacity:1}]},"streets-vector":{id:"streets-vector",title:n.streets,thumbnailUrl:a.toUrl("../images/basemap/streets.jpg"),baseMapLayers:[{id:"streets-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/de26a3cf4cc9451298ea173c4b324736/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets",visibility:!0,opacity:1}]},"topo-vector":{id:"topo-vector",title:n.topo,thumbnailUrl:a.toUrl("../images/basemap/topo.jpg"),baseMapLayers:[{id:"topo-vector-base-layer",
styleUrl:"//www.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Topo",visibility:!0,opacity:1}]},"streets-night-vector":{id:"streets-night-vector",title:n["streets-night-vector"],thumbnailUrl:a.toUrl("../images/basemap/streets-night.jpg"),baseMapLayers:[{id:"streets-night-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/86f556a2d1fd468181855a35e344567f/resources/styles/root.json",layerType:"VectorTileLayer",
title:"World Streets Night",visibility:!0,opacity:1}]},"streets-relief-vector":{id:"streets-relief-vector",title:n["streets-relief-vector"],thumbnailUrl:a.toUrl("../images/basemap/streets-relief.jpg"),baseMapLayers:[{id:"streets-relief-vector-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Streets Relief Base",showLegend:!1,visibility:!0,opacity:1},{id:"streets-relief-vector-reference-layer",
styleUrl:"//www.arcgis.com/sharing/rest/content/items/b266e6d17fc345b498345613930fbd76/resources/styles/root.json",title:"World Streets Relief Reference",layerType:"VectorTileLayer",showLegend:!1,visibility:!0,opacity:1}]},"streets-navigation-vector":{id:"streets-navigation-vector",title:n["streets-navigation-vector"],thumbnailUrl:a.toUrl("../images/basemap/streets-navigation.jpg"),baseMapLayers:[{id:"streets-navigation-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/63c47b7177f946b49902c24129b87252/resources/styles/root.json",
layerType:"VectorTileLayer",title:"World Streets Navigation",visibility:!0,opacity:1}]}}})},"esri/core/collectionUtils":function(){define(["require","exports","./Collection"],function(a,h,n){Object.defineProperty(h,"__esModule",{value:!0});h.referenceSetter=function(a,k,l){void 0===l&&(l=n);k||(k=new l);k.removeAll();a&&(Array.isArray(a)||a.isInstanceOf&&a.isInstanceOf(n))?k.addMany(a):k.add(a);return k};h.castForReferenceSetter=function(a){return a}})},"esri/core/JSONSupport":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./Accessor ./declare ./accessorSupport/read ./accessorSupport/write ./accessorSupport/decorators".split(" "),
function(a,h,n,e,k,l,q,g,c){function b(a,b){if(!a)return null;if(a.declaredClass)throw Error("JSON object is already hydrated");var c=new this;c.read(a,b);return c}var f=function(a){function f(){return null!==a&&a.apply(this,arguments)||this}n(f,a);f.prototype.read=function(a,b){q.default(this,a,b);return this};f.prototype.write=function(a,b){return g.default(this,a||{},b)};f.prototype.toJSON=function(a){return this.write(null,a)};f.fromJSON=function(a,c){return b.call(this,a,c)};return f=e([c.subclass("esri.core.JSONSupport")],
f)}(c.declared(k));f.prototype.toJSON.isDefaultToJSON=!0;l.after(function(a){l.hasMixin(a,f)&&(a.fromJSON=b.bind(a))});return f})},"esri/core/accessorSupport/read":function(){define("require exports dojo/_base/lang ./utils ./get ./extensions/serializableProperty".split(" "),function(a,h,n,e,k,l){function q(a,b,f){void 0===f&&(f=g);for(var c=e.getProperties(a),h=c.metadatas,q={},w=0,t=Object.getOwnPropertyNames(b);w<t.length;w++){var u=q,p=h,d=t[w],m=b,y=f,z=l.originSpecificReadPropertyDefinition(p[d],
y);z&&(!z.read||!1!==z.read.enabled&&!z.read.source)&&(u[d]=!0);for(var n=0,C=Object.getOwnPropertyNames(p);n<C.length;n++){var G=C[n],z=l.originSpecificReadPropertyDefinition(p[G],y),J;a:{J=d;var E=m;if(z&&z.read&&!1!==z.read.enabled&&z.read.source)if(z=z.read.source,"string"===typeof z){if(z===J||-1<z.indexOf(".")&&0===z.indexOf(J)&&k.exists(z,E)){J=!0;break a}}else for(var K=0;K<z.length;K++){var R=z[K];if(R===J||-1<R.indexOf(".")&&0===R.indexOf(J)&&k.exists(R,E)){J=!0;break a}}J=!1}J&&(u[G]=!0)}}c.setDefaultOrigin(f.origin);
w=0;for(q=Object.getOwnPropertyNames(q);w<q.length;w++)t=q[w],p=(u=l.originSpecificReadPropertyDefinition(h[t],f).read)&&u.source,d=void 0,d=p&&"string"===typeof p?k.valueOf(b,p):b[t],u&&u.reader&&(d=u.reader.call(a,d,b,f)),void 0!==d&&c.set(t,d);c.setDefaultOrigin("user")}Object.defineProperty(h,"__esModule",{value:!0});var g={origin:"service"};h.read=q;h.readLoadable=function(a,b,f,e){void 0===e&&(e=g);b=n.mixin({},e,{messages:[]});f(b);b.messages.forEach(function(b){"warning"!==b.type||a.loaded?
e&&e.messages.push(b):a.loadWarnings.push(b)})};h.default=q})},"esri/core/accessorSupport/write":function(){define("require exports ../Error ../Logger ./PropertyOrigin ./utils ./extensions/serializableProperty".split(" "),function(a,h,n,e,k,l,q){function g(a,c,e,g,l,h){if(!g||!g.write)return!1;var f=a.get(e);if(void 0===f)return!1;if(!l&&g.write.overridePolicy){var p=g.write.overridePolicy.call(a,f,e,h);void 0!==p&&(l=p)}l||(l=g.write);if(!l||!1===l.enabled)return!1;if(null===f){if(l.allowNull)return!0;
l.isRequired&&((a=new n("web-document-write:property-required","Missing value for required property '"+e+"' on '"+a.declaredClass+"'",{propertyName:e,target:a}),h)&&h.messages?h.messages.push(a):a&&!h&&b.error(a.name,a.message));return!1}return!l.ignoreOrigin&&h&&h.origin&&c.store.originOf(e)<k.nameToId(h.origin)?!1:!0}function c(a,b,c){if(a&&"function"===typeof a.toJSON&&(!a.toJSON.isDefaultToJSON||!a.write))return l.merge(b,a.toJSON());var f=l.getProperties(a),e=f.metadatas,h;for(h in e){var u=
q.originSpecificWritePropertyDefinition(e[h],c);if(g(a,f,h,u,null,c)){var p=a.get(h),d={};u.write.writer.call(a,p,d,"string"===typeof u.write.target?u.write.target:h,c);u=d;0<Object.keys(u).length&&(b=l.merge(b,u),c&&c.writtenProperties&&c.writtenProperties.push({target:a,propName:h,oldOrigin:k.idToReadableName(f.store.originOf(h)),newOrigin:c.origin}))}}return b}Object.defineProperty(h,"__esModule",{value:!0});var b=e.getLogger("esri.core.accessorSupport.write");h.willPropertyWrite=function(a,b,
c,e){var f=l.getProperties(a),k=q.originSpecificWritePropertyDefinition(f.metadatas[b],e);return k?g(a,f,b,k,c,e):!1};h.write=c;h.default=c})},"esri/core/Error":function(){define(["require","exports","./tsSupport/extendsHelper","./Message","./lang"],function(a,h,n,e,k){a=function(a){function e(g,c,b){var f=a.call(this,g,c,b)||this;return f instanceof e?f:new e(g,c,b)}n(e,a);e.prototype.toJSON=function(){return{name:this.name,message:this.message,details:k.clone(this.details),dojoType:this.dojoType}};
e.fromJSON=function(a){var c=new e(a.name,a.message,a.details);null!=a.dojoType&&(c.dojoType=a.dojoType);return c};return e}(e);a.prototype.type="error";return a})},"esri/core/tsSupport/extendsHelper":function(){define([],function(){return function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var e in n)n.hasOwnProperty(e)&&(a[e]=n[e])};return function(h,n){function e(){this.constructor=h}a(h,n);h.prototype=null===n?Object.create(n):
(e.prototype=n.prototype,new e)}}()})},"esri/core/Message":function(){define(["require","exports","dojo/string"],function(a,h,n){return function(){function a(e,l,h){this instanceof a&&(this.name=e,this.message=l&&n.substitute(l,h,function(a){return null==a?"":a})||"",this.details=h)}a.prototype.toString=function(){return"["+this.name+"]: "+this.message};return a}()})},"esri/core/Loadable":function(){define("./Promise ./Accessor ./Error ./Warning dojo/aspect dojo/_base/lang dojo/Deferred".split(" "),
function(a,h,n,e,k,l,q){return a.createSubclass([h],{declaredClass:"esri.core.Loadable","-chains-":l.mixin(h._meta.chains,{load:"after"}),constructor:function(){this._set("loadWarnings",[]);var a=new q;this.addResolvingPromise(a.promise);k.around(this,"load",function(c){return function(){"not-loaded"===this.loadStatus&&(this.loadStatus="loading",c.apply(this));a&&(a.resolve(),a=null);return this.when()}});this.when(function(a){this.loadStatus="loaded"}.bind(this),function(a){this.loadStatus="failed";
this.loadError=a}.bind(this))},properties:{loaded:{readOnly:!0,dependsOn:["loadStatus"],get:function(){return"loaded"===this.loadStatus}},loadError:null,loadStatus:"not-loaded",loadWarnings:{type:[e],readOnly:!0}},load:function(){},cancelLoad:function(){if(this.isFulfilled())return this;this.loadError=new n("load:cancelled","Cancelled");this._promiseProps.cancel(this.loadError);return this}})})},"esri/core/Promise":function(){define("dojo/_base/lang dojo/promise/all dojo/Deferred dojo/aspect dojo/has dojo/errors/create ./Scheduler ./Logger ./declare".split(" "),
function(a,h,n,e,k,l,q,g,c){function b(a,b){f.warn("DEPRECATED: "+a+"()"+(b?" -- use "+b+" instead":""))}k.add("esri-promise-compatibility",!1);k.add("esri-promise-compatibility-deprecation-warnings",!0);var f=g.getLogger("esri.core.Promise"),r=function(a){var b=a._promiseProps;if(!b.resolver.isFulfilled()){var c=b.resolvingPromises,d,m;b.allPromise&&b.allPromise.cancel();var f=new n;for(d=c.length-1;0<=d;d--)m=c[d],m.isCanceled&&m.isCanceled()?c.splice(d,1):m.then(null,null,b.resolver.progress);
m=null;(b.allPromise=h(c.concat([f.promise]))).then(function(){b.resolver.resolve(a);a=b=f=b.allPromise=b.resolvingPromises=null},function(d){b.allPromise=null;if(!d||"cancel"!==d.dojoType){var m=Array.prototype.slice.call(arguments,0);b.resolver.reject(m[0]);a=b=f=b.allPromise=b.resolvingPromises=null}});f&&q.schedule(function(){f&&f.resolve()})}},v=l("CancelError",null,function(a){this.target=a}),x=function(a){return a||new v(this.instance)},w=function(a){this.instance=a;this.canceler=x.bind(this);
this.resolver=new n;this.initialized=!1;this.resolvingPromises=[]};w.prototype={canceler:null,cancel:function(a){if(!this.resolver.isFulfilled()){this.allPromise.cancel();for(var b=this.resolvingPromises.concat(),c=b.length-1;0<=c;c--)b[c].cancel(a);this.resolver.cancel(a)}}};l={declaredClass:"esri.core.Promise",constructor:function(){Object.defineProperty(this,"_promiseProps",{value:new w(this),enumerable:!1,configurable:!1,writable:!0});var a=e.after(this,"postscript",function(b,c){a.remove();a=
null;r(this)},!0)},_promiseProps:null,always:function(a){k("esri-promise-compatibility-deprecation-warnings")&&b("always",".when(callback).catch(errBack)");return this.when(a,a)},isResolved:function(){return this._promiseProps.resolver.isResolved()},isRejected:function(){return this._promiseProps.resolver.isRejected()},isFulfilled:function(){return this._promiseProps.resolver.isFulfilled()},otherwise:function(a){k("esri-promise-compatibility-deprecation-warnings")&&b("otherwise",".when().catch(errback)");
return this.when(null,a)},catch:function(a){k("esri-promise-compatibility-deprecation-warnings")&&b("catch",".when().catch(errback)");return this.when(null,a)},when:function(a,b,c){var d=new n(this._promiseProps.canceler);a=d.then(a,b,c);this._promiseProps.resolver.then(d.resolve,d.reject,d.progress);return a},addResolvingPromise:function(a){a&&!this._promiseProps.resolver.isFulfilled()&&(a._promiseProps&&(a=a.when()),this._promiseProps.resolvingPromises.push(a),r(this))}};k("esri-promise-compatibility")||
(l=a.mixin(l,{then:function(a,c,p){k("esri-promise-compatibility-deprecation-warnings")&&b("then",".when(callback, errback)");return this.when(a,c,p)},cancel:function(){k("esri-promise-compatibility-deprecation-warnings")&&b("cancel")},isCanceled:function(){k("esri-promise-compatibility-deprecation-warnings")&&b("isCanceled");return!1},trace:function(){k("esri-promise-compatibility-deprecation-warnings")&&b("trace");return this},traceRejected:function(){k("esri-promise-compatibility-deprecation-warnings")&&
b("traceRejected");return this}}));return c(null,l)})},"dojo/promise/all":function(){define(["../_base/array","../Deferred","../when"],function(a,h,n){var e=a.some;return function(a){var k,q;a instanceof Array?q=a:a&&"object"===typeof a&&(k=a);var g,c=[];if(k){q=[];for(var b in k)Object.hasOwnProperty.call(k,b)&&(c.push(b),q.push(k[b]));g={}}else q&&(g=[]);if(!q||!q.length)return(new h).resolve(g);var f=new h;f.promise.always(function(){g=c=null});var r=q.length;e(q,function(a,b){k||c.push(b);n(a,
function(a){f.isFulfilled()||(g[c[b]]=a,0===--r&&f.resolve(g))},f.reject);return f.isFulfilled()});return f.promise}})},"esri/core/Warning":function(){define(["require","exports","./tsSupport/extendsHelper","./tsSupport/decorateHelper","./Message"],function(a,h,n,e,k){a=function(a){function e(g,c,b){var f=a.call(this,g,c,b)||this;return f instanceof e?f:new e(g,c,b)}n(e,a);return e}(k);a.prototype.type="warning";return a})},"esri/core/promiseUtils":function(){define("require exports dojo/Deferred dojo/promise/all dojo/when ./Error".split(" "),
function(a,h,n,e,k,l){function q(a){if(a){if("function"!==typeof a.forEach){var c=Object.keys(a),b=c.map(function(b){return a[b]});return q(b).then(function(a){var b={};c.forEach(function(c,f){return b[c]=a[f]});return b})}var f=new n,e=[],g=a.length;0===g&&f.resolve(e);a.forEach(function(a){var b={promise:a};e.push(b);a.then(function(a){b.value=a}).otherwise(function(a){b.error=a}).then(function(){--g;0===g&&f.resolve(e)})});return f.promise}}Object.defineProperty(h,"__esModule",{value:!0});h.all=
function(a){return e(a)};h.filter=function(a,c){var b=a.slice();return e(a.map(function(a,b){return c(a,b)})).then(function(a){return b.filter(function(b,c){return a[c]})})};h.eachAlways=q;h.create=function(a,c){var b=new n(c);a(function(a){void 0===a&&(a=null);return k(a).then(b.resolve)},b.reject);return b.promise};h.reject=function(a){var c=new n;c.reject(a);return c.promise};h.resolve=function(a){void 0===a&&(a=null);var c=new n;c.resolve(a);return c.promise};h.after=function(a,c){void 0===c&&
(c=null);var b=0,f=new n(function(){b&&(clearTimeout(b),b=0)}),b=setTimeout(function(){f.resolve(c)},a);return f.promise};h.timeout=function(a,c,b){var f=0,e=new n(a.cancel);a.then(function(a){e.isFulfilled()||(e.resolve(a),f&&(clearTimeout(f),f=0))});a.otherwise(function(a){e.isFulfilled()||(e.reject(a),f&&(clearTimeout(f),f=0))});f=setTimeout(function(){var a=b||new l("promiseUtils:timeout","The wrapped promise did not resolve within "+c+" ms");e.reject(a)},c);return e.promise};h.wrapCallback=function(a){var c=
!1,b=new n(function(){return c=!0});a(function(a){c||b.resolve(a)});return b.promise};h.isThenable=function(a){return a&&"function"===typeof a.then};h.when=function(a){return k(a)}})},"esri/core/urlUtils":function(){define("require exports dojo/_base/window dojo/_base/lang dojo/_base/url dojo/io-query ../config ./lang ./sniff ./Logger ./Error".split(" "),function(a,h,n,e,k,l,q,g,c,b,f){function r(a){var d={path:null,query:null},b=new k(a),m=a.indexOf("?");null===b.query?d.path=a:(d.path=a.substring(0,
m),d.query=l.queryToObject(b.query));b.fragment&&(d.hash=b.fragment,null===b.query&&(d.path=d.path.substring(0,d.path.length-(b.fragment.length+1))));return d}function v(a,b){void 0===a&&(a=!1);void 0===b&&(b=!0);var m,c=U.proxyUrl;if("string"===typeof a){if(m=F(a),a=t(a))c=a.proxyUrl}else m=!!a;if(!c)throw N.warn("esri/config: esriConfig.request.proxyUrl is not set. If making a request to a CORS-enabled\n server, please push the domain into esriConfig.request.corsEnabledServers."),new f("urlutils:proxy-not-set",
"esri/config: esriConfig.request.proxyUrl is not set. If making a request to a CORS-enabled\n server, please push the domain into esriConfig.request.corsEnabledServers.");var p;m&&b&&"https"===h.appUrl.scheme&&(b=D(c),d(b)&&(c=b,p=1));c=r(c);c._xo=p;return c}function x(a){var d=a.indexOf("?");-1!==d?(da.path=a.slice(0,d),da.query=a.slice(d+1)):(da.path=a,da.query=null);return da}function w(a){a=x(a).path;a&&"/"===a[a.length-1]||(a+="/");a=S(a,!0);return a=a.toLowerCase()}function t(a){var d=U.proxyRules;
a=w(a);for(var b=0;b<d.length;b++)if(0===a.indexOf(d[b].urlPrefix))return d[b]}function u(a){a=C(a);var d=a.indexOf("/sharing");return 0<d?a.substring(0,d):a.replace(/\/+$/,"")}function p(a,d,b){void 0===b&&(b=!1);a=ca(a);d=ca(d);return b||a.scheme===d.scheme?a.host.toLowerCase()===d.host.toLowerCase()&&a.port===d.port:!1}function d(a){return c("esri-phonegap")?!0:c("esri-cors")?null!=m(a):!1}function m(a,d){void 0===d&&(d=!1);"string"===typeof a&&(a=E(a)?ca(a):h.appUrl);for(var b=U.corsEnabledServers||
[],m=0;m<b.length;m++)for(var c=b[m],f=void 0,f="string"===typeof c?y(c):c.host?y(c.host):[],e=0;e<f.length;e++)if(p(a,f[e]))return d?m:c;return d?-1:null}function y(a){h.corsServersUrlCache[a]||(ba(a)||Z(a)?h.corsServersUrlCache[a]=[new k(z(a))]:h.corsServersUrlCache[a]=[new k("http://"+a),new k("https://"+a)]);return h.corsServersUrlCache[a]}function z(a,d,b){void 0===d&&(d=h.appBaseUrl);if(Z(a))return b&&b.preserveProtocolRelative?a:"http"===h.appUrl.scheme&&h.appUrl.authority===J(a).slice(2)?
"http:"+a:"https:"+a;if(ba(a))return a;b=G;if("/"===a[0]){var m=d.indexOf("//"),m=d.indexOf("/",m+2);d=-1===m?d:d.slice(0,m)}return b(d,a)}function A(a,d,b){void 0===d&&(d=h.appBaseUrl);if(!E(a))return a;var m=C(a),c=m.toLowerCase();d=C(d).toLowerCase().replace(/\/+$/,"");if((b=b?C(b).toLowerCase().replace(/\/+$/,""):null)&&0!==d.indexOf(b))return a;for(var p=function(a,d,b){b=a.indexOf(d,b);return-1===b?a.length:b},f=p(c,"/",c.indexOf("//")+2),e=-1;c.slice(0,f+1)===d.slice(0,f)+"/";){e=f+1;if(f===
c.length)break;f=p(c,"/",f+1)}if(-1===e||b&&e<b.length)return a;a=m.slice(e);m=d.slice(e-1).replace(/[^/]+/g,"").length;if(0<m)for(c=0;c<m;c++)a="../"+a;else a="./"+a;return a}function C(a){a=a.trim();a=z(a);a="http"===h.appUrl.scheme&&F(a)&&p(h.appBaseUrl,a,!0)&&!d(a)?Z(a)?"http:"+a:a.replace(X,"http:"):a;a=L(a);return a=a.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}function G(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];if(a&&a.length){d=[];if(E(a[0])){var b=a[0],m=b.indexOf("//");
d.push(b.slice(0,m+1));T.test(a[0])&&(d[0]+="/");a[0]=b.slice(m+2)}else"/"===a[0][0]&&d.push("");a=a.reduce(function(a,d){return d?a.concat(d.split("/")):a},[]);for(b=0;b<a.length;b++)m=a[b],".."===m&&0<d.length?d.pop():!m||"."===m&&0!==d.length||d.push(m);return d.join("/")}}function J(a){if(K(a)||R(a))return null;var d=a.indexOf("://");if(-1===d&&Z(a))d=2;else if(-1!==d)d+=3;else return null;d=a.indexOf("/",d);return-1===d?a:a.slice(0,d)}function E(a){return Z(a)||ba(a)}function K(a){return"blob:"===
a.slice(0,5)}function R(a){return"data:"===a.slice(0,5)}function Z(a){return a&&"/"===a[0]&&"/"===a[1]}function ba(a){return P.test(a)}function F(a){return X.test(a)||"https"===h.appUrl.scheme&&Z(a)}function Y(a){return ga.test(a)||"http"===h.appUrl.scheme&&Z(a)}function D(a){return Z(a)?"https:"+a:a.replace(ga,"https:")}function S(a,d){void 0===d&&(d=!1);if(Z(a))return a.slice(2);a=a.replace(P,"");d&&1<a.length&&"/"===a[0]&&"/"===a[1]&&(a=a.slice(2));return a}function L(a){var b=q.request.httpsDomains;
if(!Y(a))return a;var m=a.indexOf("/",7),c;c=-1===m?a:a.slice(0,m);c=c.toLowerCase().slice(7);if(!("http"!==h.appUrl.scheme||c!==h.appUrl.authority||V.test(a)&&d(a)))return a;if("https"===h.appUrl.scheme&&c===h.appUrl.authority||b&&b.some(function(a){return c===a||g.endsWith(c,"."+a)}))a=D(a);return a}function M(a,d,b){if(!(d&&b&&a&&E(a)))return a;var m=a.indexOf("//"),c=a.indexOf("/",m+2),p=a.indexOf(":",m+2),c=Math.min(0>c?a.length:c,0>p?a.length:p);if(a.slice(m+2,c).toLowerCase()!==d.toLowerCase())return a;
d=a.slice(0,m+2);a=a.slice(c);return""+d+b+a}function ca(a){if("string"===typeof a)return new k(z(a));a.scheme||(a.scheme=h.appUrl.scheme);return a}Object.defineProperty(h,"__esModule",{value:!0});a=n.global;var N=b.getLogger("esri.core.urlUtils"),U=q.request,P=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,ga=/^\s*http:/i,X=/^\s*https:/i,T=/^\s*file:/i,V=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i;h.appUrl=new k(a.location);h.corsServersUrlCache={};h.appBaseUrl=function(){var a=h.appUrl.path,a=a.substring(0,
a.lastIndexOf(a.split("/")[a.split("/").length-1]));return""+(h.appUrl.scheme+"://"+h.appUrl.host+(null!=h.appUrl.port?":"+h.appUrl.port:""))+a}();h.urlToObject=r;h.getProxyUrl=v;h.addProxy=function(a){var d=t(a),b,m;d?(m=x(d.proxyUrl),b=m.path,m=m.query?l.queryToObject(m.query):null):U.forceProxy&&(m=v(),b=m.path,m=m.query);b&&(d=r(a),a=b+"?"+d.path,(b=l.objectToQuery(e.mixin(m||{},d.query)))&&(a=a+"?"+b));return a};var da={path:"",query:""};h.addProxyRule=function(a){a={proxyUrl:a.proxyUrl,urlPrefix:w(a.urlPrefix)};
for(var d=U.proxyRules,b=a.urlPrefix,m=d.length,c=0;c<d.length;c++){var p=d[c].urlPrefix;if(0===b.indexOf(p)){if(b.length===p.length)return-1;m=c;break}0===p.indexOf(b)&&(m=c+1)}d.splice(m,0,a);return m};h.getProxyRule=t;h.hasSamePortal=function(a,d){a=u(a);d=u(d);return S(a)===S(d)};h.hasSameOrigin=p;h.canUseXhr=d;h.getCorsConfig=m;h.makeAbsolute=z;h.makeRelative=A;h.normalize=C;h.join=G;h.getOrigin=J;h.isAbsolute=E;h.isBlobProtocol=K;h.isDataProtocol=R;var ja=/^data:(.*?)(;base64)?,(.*)$/;h.dataComponents=
function(a){return(a=a.match(ja))?{mediaType:a[1],isBase64:!!a[2],data:a[3]}:null};h.makeData=function(a){return a.isBase64?"data:"+a.mediaType+";base64,"+a.data:"data:"+a.mediaType+","+a.data};h.isProtocolRelative=Z;h.hasProtocol=ba;h.toHTTPS=D;h.removeFile=function(a){var d=0;if(E(a)){var b=a.indexOf("//");-1!==b&&(d=b+2)}b=a.lastIndexOf("/");return b<d?a:a.slice(0,b+1)};h.removeTrailingSlash=function(a){return a.replace(/\/+$/,"")};h.changeDomain=M;h.read=function(a,d){var b=d&&d.url&&d.url.path;
a&&b&&(a=z(a,b,{preserveProtocolRelative:!0}));(d=d&&d.portal)&&!d.isPortal&&d.urlKey&&d.customBaseUrl?(b=d.urlKey+"."+d.customBaseUrl,d=p(h.appUrl,h.appUrl.scheme+"://"+b)?M(a,d.portalHostname,b):M(a,b,d.portalHostname)):d=a;return d};h.write=function(a,d){if(!a)return a;!E(a)&&d&&d.blockedRelativeUrls&&d.blockedRelativeUrls.push(a);var b=z(a);if(d){var m=d.verifyItemRelativeUrls&&d.verifyItemRelativeUrls.rootPath||d.url&&d.url.path;m&&(b=A(b,m,m),b!==a&&d.verifyItemRelativeUrls&&d.verifyItemRelativeUrls.writtenUrls.push(b))}a=
b;b=(d=d&&d.portal)&&!d.isPortal&&d.urlKey&&d.customBaseUrl?M(a,d.urlKey+"."+d.customBaseUrl,d.portalHostname):a;return b};h.writeOperationalLayerUrl=function(a,d){a&&Z(a)&&(a="https:"+a);d.url=a?C(a):a};h.isSVG=function(a){return ka.test(a)};h.removeQueryParameters=function(a,d){a=r(a);var b=Object.keys(a.query||{});0<b.length&&d&&d.warn("removeQueryParameters()","Url query parameters are not supported, the following parameters have been removed: "+b.join(", ")+".");return a.path};var ka=/(^data:image\/svg|\.svg$)/i})},
"dojo/_base/url":function(){define(["./kernel"],function(a){var h=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,n=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,e=function(){for(var a=arguments,l=[a[0]],q=1;q<a.length;q++)if(a[q]){var g=new e(a[q]+""),l=new e(l[0]+"");if(""==g.path&&!g.scheme&&!g.authority&&!g.query)null!=g.fragment&&(l.fragment=g.fragment),g=l;else if(!g.scheme&&(g.scheme=l.scheme,!g.authority&&(g.authority=l.authority,"/"!=g.path.charAt(0)))){for(var l=
(l.path.substring(0,l.path.lastIndexOf("/")+1)+g.path).split("/"),c=0;c<l.length;c++)"."==l[c]?c==l.length-1?l[c]="":(l.splice(c,1),c--):0<c&&(1!=c||""!=l[0])&&".."==l[c]&&".."!=l[c-1]&&(c==l.length-1?(l.splice(c,1),l[c-1]=""):(l.splice(c-1,2),c-=2));g.path=l.join("/")}l=[];g.scheme&&l.push(g.scheme,":");g.authority&&l.push("//",g.authority);l.push(g.path);g.query&&l.push("?",g.query);g.fragment&&l.push("#",g.fragment)}this.uri=l.join("");a=this.uri.match(h);this.scheme=a[2]||(a[1]?"":null);this.authority=
a[4]||(a[3]?"":null);this.path=a[5];this.query=a[7]||(a[6]?"":null);this.fragment=a[9]||(a[8]?"":null);null!=this.authority&&(a=this.authority.match(n),this.user=a[3]||null,this.password=a[4]||null,this.host=a[6]||a[7],this.port=a[9]||null)};e.prototype.toString=function(){return this.uri};return a._Url=e})},"esri/config":function(){define(["require","exports","dojo/_base/window"],function(a,h,n){return{screenDPI:96,geometryService:null,geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",
geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",portalUrl:"https://www.arcgis.com",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{corsDetection:!(n.global&&n.global.cordova),corsDetectionTimeout:15,corsEnabledServers:"basemaps.arcgis.com basemapsbeta.arcgis.com basemapsbetadev.arcgis.com basemapsdev.arcgis.com cdn.arcgis.com cdn-a.arcgis.com cdn-b.arcgis.com demographics1.arcgis.com demographics2.arcgis.com demographics3.arcgis.com demographics4.arcgis.com demographics5.arcgis.com demographics6.arcgis.com dev.arcgis.com devext.arcgis.com elevation3d.arcgis.com elevation3ddev.arcgis.com js.arcgis.com jsdev.arcgis.com jsqa.arcgis.com geocode.arcgis.com geocodedev.arcgis.com geocodeqa.arcgis.com geoenrich.arcgis.com geoenrichdev.arcgis.com geoenrichqa.arcgis.com localvtiles.arcgis.com qaext.arcgis.com server.arcgisonline.com services.arcgis.com services.arcgisonline.com services1.arcgis.com services2.arcgis.com services3.arcgis.com services4.arcgis.com services5.arcgis.com services6.arcgis.com services7.arcgis.com services8.arcgis.com services9.arcgis.com servicesdev.arcgis.com servicesdev1.arcgis.com servicesdev2.arcgis.com servicesdev3.arcgis.com servicesqa.arcgis.com servicesqa1.arcgis.com servicesqa2.arcgis.com servicesqa3.arcgis.com static.arcgis.com staticqa.arcgis.com staticdev.arcgis.com tiles.arcgis.com tiles1.arcgis.com tiles2.arcgis.com tiles3.arcgis.com tiles4.arcgis.com tilesdevext.arcgis.com tilesqa.arcgis.com utility.arcgis.com utility.arcgisonline.com www.arcgis.com".split(" "),
corsStatus:{},forceProxy:!1,maxUrlLength:2E3,maxWorkers:5,proxyRules:[],proxyUrl:null,timeout:6E4,useIdentity:!0,useCors:"with-credentials",httpsDomains:"arcgis.com arcgisonline.com esrikr.com premiumservices.blackbridge.com esripremium.accuweather.com gbm.digitalglobe.com firstlook.digitalglobe.com msi.digitalglobe.com".split(" ")},useSpatialIndex:!1}})},"esri/portal/Portal":function(){define("require exports ../core/tsSupport/assignHelper ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/accessorSupport/decorators ../core/Error ../config ../kernel ../request ../geometry/Extent ../core/global ../core/JSONSupport ../core/Loadable ./PortalQueryParams ./PortalQueryResult ./PortalUser ../core/promiseUtils ../core/requireUtils ../core/urlUtils dojo/promise/all dojo/_base/kernel dojo/_base/lang dojo/_base/url".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t,u,p,d,m,y,z,A,C,G){var J;return function(h){function w(a){a=h.call(this)||this;a.access=null;a.allSSL=!1;a.authMode="auto";a.authorizedCrossOriginDomains=null;a.basemapGalleryGroupQuery=null;a.bingKey=null;a.canListApps=!1;a.canListData=!1;a.canListPreProvisionedItems=!1;a.canProvisionDirectPurchase=!1;a.canSearchPublic=!1;a.canShareBingPublic=!1;a.canSharePublic=!1;a.canSignInArcGIS=!1;a.canSignInIDP=!1;a.colorSetsGroupQuery=null;a.commentsEnabled=!1;a.created=
null;a.culture=null;a.customBaseUrl=null;a.defaultBasemap=null;a.defaultExtent=null;a.defaultVectorBasemap=null;a.description=null;a.featuredGroups=null;a.featuredItemsGroupQuery=null;a.galleryTemplatesGroupQuery=null;a.livingAtlasGroupQuery=null;a.helperServices=null;a.homePageFeaturedContent=null;a.homePageFeaturedContentCount=null;a.httpPort=null;a.httpsPort=null;a.id=null;a.ipCntryCode=null;a.isPortal=!1;a.layerTemplatesGroupQuery=null;a.maxTokenExpirationMinutes=null;a.modified=null;a.name=null;
a.portalHostname=null;a.portalMode=null;a.portalProperties=null;a.region=null;a.rotatorPanels=null;a.showHomePageDescription=!1;a.supportsHostedServices=!1;a.symbolSetsGroupQuery=null;a.templatesGroupQuery=null;a.units=null;a.url=c.portalUrl;a.urlKey=null;a.user=null;a.useStandardizedQuery=!1;a.useVectorBasemaps=!1;a.vectorBasemapGalleryGroupQuery=null;return a}e(w,h);x=w;w.prototype.normalizeCtorArgs=function(a){return"string"===typeof a?{url:a}:a};w.prototype.destroy=function(){this._esriId_credentialCreateHandle&&
(this._esriId_credentialCreateHandle.remove(),this._esriId_credentialCreateHandle=null)};w.prototype.readAuthorizedCrossOriginDomains=function(a){if(a)for(var d=0;d<a.length;d++){var b=a[d],m=b;y.hasProtocol(m)||(m=y.appUrl.scheme+"://"+m);y.canUseXhr(m)||c.request.corsEnabledServers.push({host:b,withCredentials:!0})}return a};w.prototype.readDefaultBasemap=function(a){return a?(a=J.fromJSON(a),a.portalItem={portal:this},a):null};w.prototype.readDefaultVectorBasemap=function(a){return a?(a=J.fromJSON(a),
a.portalItem={portal:this},a):null};Object.defineProperty(w.prototype,"extraQuery",{get:function(){return this.id&&!this.canSearchPublic?" AND orgid:"+this.id:null},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"isOrganization",{get:function(){return!!this.access},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"restUrl",{get:function(){var a=this.url;if(a)var d=a.indexOf("/sharing"),a=0<d?a.substring(0,d):this.url.replace(/\/+$/,""),a=a+"/sharing/rest";return a},
enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"thumbnailUrl",{get:function(){var a=this.restUrl,d=this.thumbnail;return a&&d?this._normalizeSSL(a+"/portals/self/resources/"+d):null},enumerable:!0,configurable:!0});w.prototype.readUrlKey=function(a){return a?a.toLowerCase():a};w.prototype.readUser=function(a){var d=null;a&&(d=p.fromJSON(a),d.portal=this);return d};w.prototype.load=function(){var d=this,c=m.when(a,"../Basemap").then(function(a){J=a}).then(function(){return d._fetchSelf()}).then(function(a){if(b.id){var m=
b.id;d.credential=m.findCredential(d.restUrl);d.credential||d.authMode!==x.AUTH_MODE_AUTO||(d._esriId_credentialCreateHandle=m.on("credential-create",function(){m.findCredential(d.restUrl)&&d._signIn()}))}d.read(a)});this.addResolvingPromise(c);return this.when()};w.prototype.fetchBasemaps=function(a){var d=new t;d.query=a||(this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery);d.disableExtraQuery=!0;return this.queryGroups(d).then(function(a){d.num=100;d.query=
'type:"Web Map" -type:"Web Application"';return a.total?(a=a.results[0],d.sortField=a.sortField||"name",d.sortOrder=a.sortOrder||"desc",a.queryItems(d)):null}).then(function(a){return a&&a.total?a.results.filter(function(a){return"Web Map"===a.type}).map(function(a){return new J({portalItem:a})}):[]})};w.prototype.fetchFeaturedGroups=function(){var a=this.featuredGroups,b=new t;b.num=100;b.sortField="title";if(a&&a.length){for(var m=[],c=0;c<a.length;c++){var p=a[c];m.push('(title:"'+p.title+'" AND owner:'+
p.owner+")")}b.query=m.join(" OR ");return this.queryGroups(b).then(function(a){return a.results})}return d.resolve([])};w.getDefault=function(){x._default||(x._default=new x);return x._default};w.prototype.queryGroups=function(a){return this._queryPortal("/community/groups",a,"PortalGroup")};w.prototype.queryItems=function(a){return this._queryPortal("/search",a,"PortalItem")};w.prototype.queryUsers=function(a){a.sortField||(a.sortField="username");return this._queryPortal("/community/users",a,"PortalUser")};
w.prototype.toJSON=function(){throw new g("internal:not-yet-implemented","Portal.toJSON is not yet implemented");};w.prototype._fetchSelf=function(a){void 0===a&&(a=this.authMode);var d=this.restUrl+"/portals/self";a={authMode:a,query:{culture:A.locale}};"auto"===a.authMode&&(a.authMode="no-prompt");return this._request(d,a)};w.prototype._queryPortal=function(d,b,c){var p=this,f=function(a){return p._request(p.restUrl+d,b.toRequestOptions(p)).then(function(d){var m=b.clone();m.start=d.nextStart;return new u({nextQueryParams:m,
queryParams:b,total:d.total,results:x._resultsToTypedArray(a,{portal:p},d)})}).then(function(a){return z(a.results.map(function(d){return"function"===typeof d.when?d.when():a})).always(function(){return a})})};return c?m.when(a,"./"+c).then(function(a){return f(a)}):f()};w.prototype._signIn=function(){var a=this;if(this.authMode===x.AUTH_MODE_ANONYMOUS)return d.reject(new g("portal:invalid-auth-mode",'Current "authMode"\' is "'+this.authMode+'"'));if("failed"===this.loadStatus)return d.reject(this.loadError);
var m=function(b){return d.resolve().then(function(){if("not-loaded"===a.loadStatus)return b||(a.authMode="immediate"),a.load().then(function(){return null});if("loading"===a.loadStatus)return a.load().then(function(){if(a.credential)return null;a.credential=b;return a._fetchSelf("immediate")});if(a.user&&a.credential===b)return null;a.credential=b;return a._fetchSelf("immediate")}).then(function(d){d&&a.read(d)})};return b.id?b.id.getCredential(this.restUrl).then(function(a){return m(a)}):m(this.credential)};
w.prototype._normalizeSSL=function(a){var d=this.allSSL;d||("isSecureContext"in v?d=v.isSecureContext:v.location&&v.location.origin&&(d=0===v.location.origin.indexOf("https:")));if(this.isPortal){var b=new G(a);return-1<this.portalHostname.toLowerCase().indexOf(b.host.toLowerCase())&&b.port&&"80"!==b.port&&"443"!==b.port?d?"https://"+b.host+(this.httpsPort&&443!==this.httpsPort?":"+this.httpsPort:"")+b.path+"?"+b.query:"http://"+b.host+(this.httpPort&&80!==this.httpPort?":"+this.httpPort:"")+b.path+
"?"+b.query:d?a.replace("http:","https:"):a}return d?a.replace("http:","https:"):a};w.prototype._normalizeUrl=function(a){var d=this.credential&&this.credential.token;return this._normalizeSSL(d?a+(-1<a.indexOf("?")?"\x26":"?")+"token\x3d"+d:a)};w.prototype._requestToTypedArray=function(d,b,c){var p=this,f=function(a){return p._request(d,b).then(function(d){var b=x._resultsToTypedArray(a,{portal:p},d);return z(b.map(function(a){return"function"===typeof a.when?a.when():d})).always(function(){return b})})};
return c?m.when(a,"./"+c).then(function(a){return f(a)}):f()};w.prototype._request=function(a,d){var b=this.authMode===x.AUTH_MODE_ANONYMOUS?"anonymous":"auto",m=null,c="auto",p={f:"json"},e="json";d&&(d.authMode&&(b=d.authMode),d.body&&(m=d.body),d.method&&(c=d.method),d.query&&(p=n({},p,d.query)),d.responseType&&(e=d.responseType));d={authMode:b,body:m,callbackParamName:"callback",method:c,query:p,responseType:e,timeout:0};return f(this._normalizeSSL(a),d).then(function(a){return a.data})};w._resultsToTypedArray=
function(a,d,b){if(b){if(b=b.listings||b.notifications||b.userInvitations||b.tags||b.items||b.groups||b.comments||b.provisions||b.results||b.relatedItems||b,a||d)b=b.map(function(b){b=C.mixin(a?a.fromJSON(b):b,d);"function"===typeof b.load&&b.load();return b})}else b=[];return b};w.AUTH_MODE_ANONYMOUS="anonymous";w.AUTH_MODE_AUTO="auto";w.AUTH_MODE_IMMEDIATE="immediate";k([q.property()],w.prototype,"access",void 0);k([q.property()],w.prototype,"allSSL",void 0);k([q.property()],w.prototype,"authMode",
void 0);k([q.property()],w.prototype,"authorizedCrossOriginDomains",void 0);k([q.reader("authorizedCrossOriginDomains")],w.prototype,"readAuthorizedCrossOriginDomains",null);k([q.property()],w.prototype,"basemapGalleryGroupQuery",void 0);k([q.property()],w.prototype,"bingKey",void 0);k([q.property()],w.prototype,"canListApps",void 0);k([q.property()],w.prototype,"canListData",void 0);k([q.property()],w.prototype,"canListPreProvisionedItems",void 0);k([q.property()],w.prototype,"canProvisionDirectPurchase",
void 0);k([q.property()],w.prototype,"canSearchPublic",void 0);k([q.property()],w.prototype,"canShareBingPublic",void 0);k([q.property()],w.prototype,"canSharePublic",void 0);k([q.property()],w.prototype,"canSignInArcGIS",void 0);k([q.property()],w.prototype,"canSignInIDP",void 0);k([q.property()],w.prototype,"colorSetsGroupQuery",void 0);k([q.property()],w.prototype,"commentsEnabled",void 0);k([q.property({type:Date})],w.prototype,"created",void 0);k([q.property()],w.prototype,"credential",void 0);
k([q.property()],w.prototype,"culture",void 0);k([q.property()],w.prototype,"customBaseUrl",void 0);k([q.property()],w.prototype,"defaultBasemap",void 0);k([q.reader("defaultBasemap")],w.prototype,"readDefaultBasemap",null);k([q.property({type:r})],w.prototype,"defaultExtent",void 0);k([q.property()],w.prototype,"defaultVectorBasemap",void 0);k([q.reader("defaultVectorBasemap")],w.prototype,"readDefaultVectorBasemap",null);k([q.property()],w.prototype,"description",void 0);k([q.property({dependsOn:["id",
"canSearchPublic"],readOnly:!0})],w.prototype,"extraQuery",null);k([q.property()],w.prototype,"featuredGroups",void 0);k([q.property()],w.prototype,"featuredItemsGroupQuery",void 0);k([q.property()],w.prototype,"galleryTemplatesGroupQuery",void 0);k([q.property()],w.prototype,"livingAtlasGroupQuery",void 0);k([q.property()],w.prototype,"helpBase",void 0);k([q.property()],w.prototype,"helperServices",void 0);k([q.property()],w.prototype,"helpMap",void 0);k([q.property()],w.prototype,"homePageFeaturedContent",
void 0);k([q.property()],w.prototype,"homePageFeaturedContentCount",void 0);k([q.property()],w.prototype,"httpPort",void 0);k([q.property()],w.prototype,"httpsPort",void 0);k([q.property()],w.prototype,"id",void 0);k([q.property()],w.prototype,"ipCntryCode",void 0);k([q.property({dependsOn:["access"],readOnly:!0})],w.prototype,"isOrganization",null);k([q.property()],w.prototype,"isPortal",void 0);k([q.property()],w.prototype,"layerTemplatesGroupQuery",void 0);k([q.property()],w.prototype,"maxTokenExpirationMinutes",
void 0);k([q.property({type:Date})],w.prototype,"modified",void 0);k([q.property()],w.prototype,"name",void 0);k([q.property()],w.prototype,"portalHostname",void 0);k([q.property()],w.prototype,"portalMode",void 0);k([q.property()],w.prototype,"portalProperties",void 0);k([q.property()],w.prototype,"region",void 0);k([q.property({dependsOn:["url"],readOnly:!0})],w.prototype,"restUrl",null);k([q.property()],w.prototype,"rotatorPanels",void 0);k([q.property()],w.prototype,"showHomePageDescription",
void 0);k([q.property()],w.prototype,"staticImagesUrl",void 0);k([q.property()],w.prototype,"stylesGroupQuery",void 0);k([q.property()],w.prototype,"supportsHostedServices",void 0);k([q.property()],w.prototype,"symbolSetsGroupQuery",void 0);k([q.property()],w.prototype,"templatesGroupQuery",void 0);k([q.property()],w.prototype,"thumbnail",void 0);k([q.property({dependsOn:["restUrl","thumbnail"],readOnly:!0})],w.prototype,"thumbnailUrl",null);k([q.property()],w.prototype,"units",void 0);k([q.property()],
w.prototype,"url",void 0);k([q.property()],w.prototype,"urlKey",void 0);k([q.reader("urlKey")],w.prototype,"readUrlKey",null);k([q.property()],w.prototype,"user",void 0);k([q.reader("user")],w.prototype,"readUser",null);k([q.property()],w.prototype,"useStandardizedQuery",void 0);k([q.property()],w.prototype,"useVectorBasemaps",void 0);k([q.property()],w.prototype,"vectorBasemapGalleryGroupQuery",void 0);k([l(1,q.cast(t))],w.prototype,"_queryPortal",null);return w=x=k([q.subclass("esri.portal.Portal")],
w);var x}(q.declared(x,w))})},"esri/core/tsSupport/assignHelper":function(){define([],function(){return Object.assign||function(a){for(var h,n=1,e=arguments.length;n<e;n++){h=arguments[n];for(var k in h)Object.prototype.hasOwnProperty.call(h,k)&&(a[k]=h[k])}return a}})},"esri/core/tsSupport/paramHelper":function(){define([],function(){return function(a,h){return function(n,e){h(n,e,a)}}})},"esri/request":function(){define("require dojo/_base/config dojo/Deferred dojo/_base/lang dojo/_base/url dojo/request dojo/io-query ./config ./core/Error ./core/global ./core/sniff ./core/lang ./core/urlUtils ./core/deferredUtils ./core/promiseUtils ./core/requireUtils dojo/has!host-browser?./core/request/script dojo/has!host-webworker?./core/workers/request".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t,u,p){function d(a){var d=q.objectToQuery(a.content);d&&(a.url+=(-1===a.url.indexOf("?")?"?":"\x26")+d);if(2E3<a.url.length){if(!v.isDataProtocol(a.url))return w.reject(e.mixin(Error(),{message:"When using responseType 'image', URL length cannot exceed 2000 characters."}));if(3E6<a.url.length)return w.reject(e.mixin(Error(),{message:"When using responseType 'image', data URL length cannot exceed 3000000 characters."}))}var b=new Image;a.allowImageDataAccess&&
(b.crossOrigin=a.withCredentials?"use-credentials":"anonymous");var m=!1,c=new n(function(a){m=!0;b.onload=b.onerror=b.onabort=null;b.src=""}),d=function(a){b.onload=b.onerror=b.onabort=null;m||c.reject(Error("Unable to load the resource"))};b.onload=function(){b.onload=b.onerror=b.onabort=null;m||c.resolve(this)};b.onerror=d;b.onabort=d;b.alt="";b.src=a.url;return c.promise}function m(a){a=new k(a);return(a.host+(a.port?":"+a.port:"")).toLowerCase()}function y(){return S?S:S=t.when(a,"./identity/IdentityManager").then(function(a){D=
a})}function z(a,b){var m=!!a.useProxy,c=a.method||"auto",p=r.isDefined(a.crossOrigin)?a.crossOrigin:R.useCors;a=e.mixin({},a);a._ssl&&(a.url=a.url.replace(/^http:/i,"https:"));var g=a.content,y=a.url;a._token&&(a.content=a.content||{},a.content.token=a._token);var k=0,h;y&&(h=q.objectToQuery(g),k=h.length+y.length+1,f("esri-url-encodes-apostrophe")&&(k=h.replace(/'/g,"%27").length+y.length+1));a.timeout=r.isDefined(a.timeout)?a.timeout:R.timeout;a.handleAs=a.handleAs||"json";try{var t,w,z=p&&v.canUseXhr(a.urlObj)&&
!/https?:\/\/[^\/]+\/[^\/]+\/admin\/?(\/.*)?$/i.test(a.url),x=v.hasSameOrigin(a.urlObj,v.appUrl)||z,A="post"===c||!!a.body||k>R.maxUrlLength,G=!x&&-1!==a.handleAs.indexOf("json")&&a.callbackParamName&&!a.body,C=!!v.getProxyRule(a.url)||R.forceProxy||m||("image"!==a.handleAs||a.allowImageDataAccess)&&(!G||A)&&!x;C&&(v.isBlobProtocol(a.url)||v.isDataProtocol(a.url))&&(C=!1);if((f("host-browser")||f("host-webworker"))&&C)if(t=v.getProxyUrl(y,p),w=t.path,t._xo&&(z=!0),!A&&w.length+1+k>R.maxUrlLength&&
(A=!0),a.url=w+"?"+y,A)a.content=e.mixin(t.query||{},g);else{var J=q.objectToQuery(e.mixin(t.query||{},g));J&&(a.url+=(-1===y.indexOf("?")?"?":"\x26")+J);a.content=null}if(G&&!A&&!C&&f("host-browser"))return a=K?K(a):a,a.jsonp=a.callbackParamName,a.query=a.content,u.get(a.url,a);var E=a.headers;!f("host-browser")&&!f("host-webworker")||E&&E.hasOwnProperty("X-Requested-With")||(E=a.headers=E||{},E["X-Requested-With"]=null);if(f("host-browser")&&b){var F=a.content&&a.content.token;F&&(b.set?b.set("token",
F):b.append("token",F));a.contentType=!1}if(z&&!a.hasOwnProperty("withCredentials")&&"with-credentials"===R.useCors){var m=C?w:y,Z=v.getCorsConfig(m);if(Z&&Z.hasOwnProperty("withCredentials"))Z.withCredentials&&(a.withCredentials=!0);else if(D){var L=D.findServerInfo(m);L&&L.webTierAuth&&(a.withCredentials=!0)}}a=K?K(a):a;if("image"===a.handleAs)return d(a);if(A)return a.body?(a.data=b||a.body,a.query=a.content):a.data=a.content,delete a.body,delete a.content,!C&&f("safari")&&(a.url+=(-1===a.url.indexOf("?")?
"?":"\x26")+"_ts\x3d"+(new Date).getTime()+ba++),l.post(a.url,a);a.query=a.content;delete a.content;return l.get(a.url,a)}catch(La){return a=new n,a.reject(La),a.promise}}function A(a){var d=R.corsStatus;try{var b=m(a.url);if(R.corsDetection&&R.useCors&&f("esri-cors")&&a.url&&-1!==a.url.toLowerCase().indexOf("/rest/services")&&!v.hasSameOrigin(a.urlObj,v.appUrl)&&!v.canUseXhr(a.urlObj)){if(d[b])return d[b];var c=new n;d[b]=c.promise;var p=a.url.substring(0,a.url.toLowerCase().indexOf("/rest/")+6)+
"info";l.get(p,{query:{f:"json"},handleAs:"json",headers:{"X-Requested-With":null},timeout:1E3*R.corsDetectionTimeout}).then(function(d){d?(v.canUseXhr(a.url)||R.corsEnabledServers.push(b),c.resolve()):c.reject()},function(a){c.reject()});return c.promise}}catch(P){console.log("esri._detectCors: an unknown error occurred while detecting CORS support")}return Y}function C(a,d,b,p){function f(a){a._pendingDfd=z(b,l);var d=!!a._pendingDfd.response;(a._pendingDfd.response||a._pendingDfd).then(function(a){if(!d||
!a.data)return a;var b=a.getHeader("Content-Type");if(b&&(b=b.toLowerCase(),-1===b.indexOf("text/plain")&&-1===b.indexOf("application/json")))return a;b=a.data;if(b instanceof ArrayBuffer&&750>=b.byteLength)b=new Blob([b]);else if(!(b instanceof Blob&&750>=b.size))return a;var m=new n,c=new FileReader;c.readAsText(b);c.onloadend=function(){if(!c.error)try{var d=JSON.parse(c.result);d.error&&(Object.isExtensible(a)||(a=e.mixin({},a)),a._jsonData=d)}catch(ta){}m.resolve(a)};return m.promise}).then(function(b){var m=
d?b.data:b,c=d?b.getHeader.bind(b):F;if(m&&(b=d&&b._jsonData||m,b.error||"error"===b.status))throw m=e.mixin(Error(),b.error||b),m.getHeader=c,m;a.resolve({data:m,url:p.url,requestOptions:p.requestOptions,getHeader:c});a._pendingDfd=null}).otherwise(function(d){var c,f,e;d&&(c=d.code,f=d.subcode,e=(e=d.messageCode)&&e.toUpperCase());if(d&&403==c&&(4==f||d.message&&-1<d.message.toLowerCase().indexOf("ssl")&&-1===d.message.toLowerCase().indexOf("permission"))){if(!b._ssl){b._ssl=b._sslFromServer=!0;
C(a,!0,b,p);return}}else if(d&&415==d.status){if(c=b.url,f=R.corsStatus,e=v.getCorsConfig(c,!0),-1<e&&R.corsEnabledServers.splice(e,1),e=new n,e.reject({log:!!h.isDebug}),f[m(c)]=e.promise,!b._err415){b._err415=1;C(a,!0,b,p);return}}else if(y&&"no-prompt"!==b.authMode&&D._errorCodes&&-1!==D._errorCodes.indexOf(c)&&!D._isPublic(b.url)&&(403!=c||Z&&-1===Z.indexOf(e)&&(!r.isDefined(f)||2==f&&b._token))){G(a,b,p,J("request:server",d,p));return}a.reject(J("request:server",d,p));a._pendingDfd=null})}var g=
b.body,y=b.useIdentity,k,l=null,u=g instanceof FormData;if(u||g&&g.elements)l=u?g:new FormData(g);var t=!!(-1!==b.url.toLowerCase().indexOf("token\x3d")||b.content&&b.content.token||l&&l.get&&l.get("token")||g&&g.elements&&g.elements.token);d||(!y||t||b._token||D._isPublic(b.url)||(d=function(a){a&&(b._token=a.token,b._ssl=a.ssl)},"immediate"===b.authMode?k=D.getCredential(b.url).then(d):"no-prompt"===b.authMode?k=D.checkSignInStatus(b.url).then(d).otherwise(function(){}):d(D.findCredential(b.url))),
a.then(function(a){if((/\/sharing\/rest\/accounts\/self/i.test(b.url)||/\/sharing\/rest\/portals\/self/i.test(b.url))&&!t&&!b._token&&a.user&&a.user.username){var d=R.corsEnabledServers,c=v.getCorsConfig(b.url,!0),p={host:m(b.url),withCredentials:!0};if(-1===c)d.push(p);else{var f=d[c];"object"===typeof f?f.withCredentials=!0:d.splice(c,1,p)}}if(d=b._credential)if(c=(c=D.findServerInfo(d.server))&&c.owningSystemUrl)c=c.replace(/\/?$/,"/sharing"),(d=D.findCredential(c,d.userId))&&-1===D._getIdenticalSvcIdx(c,
d)&&d.resources.splice(0,0,c);return a}).always(function(a){delete b._credential;if(a){var d=!!b._ssl;a instanceof c?a.details.ssl=d:a.ssl=d}}));k?k.then(function(){f(a)}).otherwise(function(d){a.reject(d)}):f(a);return a.promise}function G(a,d,b,m){a._pendingDfd=D.getCredential(d.url,{error:m,token:d._token});a._pendingDfd.then(function(m){d._token=m.token;d._credential=m;d._ssl=d._sslFromServer||m.ssl;C(a,!0,d,b)}).otherwise(function(d){a.reject(d);a._pendingDfd=null})}function J(a,d,b){var m="Error",
p={url:b.url,requestOptions:b.requestOptions,getHeader:F};if(d instanceof c)return d.details?(d.details=r.clone(d.details),d.details.url=b.url,d.details.requestOptions=b.requestOptions):d.details=p,d;if(d){var f=d.response;b=f&&f.getHeader;var f=f&&f.status,e=d.message;b=d.getHeader||b;e&&(m=e);b&&(p.getHeader=b);p.httpStatus=(r.isDefined(d.httpCode)?d.httpCode:d.code)||f;p.subCode=d.subcode;p.messageCode=d.messageCode;p.messages="string"===typeof d.details?[d.details]:d.details}a=new c(a,m,p);d&&
"cancel"===d.dojoType&&(a.dojoType="cancel");return a}function E(a,d){if(p&&b.invokeStaticMessage)return p.execute(a,d);var m=e.mixin({},d),c={url:a,requestOptions:e.mixin({},d)};m.content=m.query;delete m.query;m.preventCache=!!m.cacheBust;delete m.cacheBust;m.handleAs=m.responseType;delete m.responseType;"array-buffer"===m.handleAs&&(m.handleAs="arraybuffer");if("image"===m.handleAs){if(f("host-webworker"))return w.reject(J("request:invalid-parameters",Error("responseType 'image' is not supported in Web Workers or Node environment"),
c));m.preventCache&&(m.content=m.content||{},m.content["request.preventCache"]=Date.now());m.method="auto"}else if(v.isDataProtocol(a))return w.reject(J("request:invalid-parameters",Error("Data URLs are not supported for responseType \x3d "+m.handleAs),c));var g=R.useIdentity;"anonymous"===m.authMode&&(g=!1);m.useIdentity=g;m.url=v.normalize(a);m.urlObj=new k(m.url);var l=x.makeDeferredCancellingPending();A(m).always(function(){if(g&&!D)return y()}).always(function(){C(l,!1,m,c)});return l.promise}
var K,R=g.request,Z=["COM_0056","COM_0057"],ba=0,F=function(){return null},Y=(new n).resolve(),D,S;E.setRequestPreCallback=function(a){K=a};return E})},"dojo/request":function(){define(["./request/default!"],function(a){return a})},"dojo/request/default":function(){define(["exports","require","../has"],function(a,h,n){var e=n("config-requestProvider"),k;if(n("host-browser")||n("host-webworker"))k="./xhr";e||(e=k);a.getPlatformDefaultId=function(){return k};a.load=function(a,q,g,c){h(["platform"==
a?k:e],function(a){g(a)})}})},"esri/core/deferredUtils":function(){define(["dojo/Deferred"],function(a){var h={makeDeferredCancellingPending:function(){var n={},e=h._dfdCanceller.bind(null,n),e=new a(e);return n.deferred=e},_dfdCanceller:function(a){a=a.deferred?a.deferred:a;a.canceled=!0;var e=a._pendingDfd;a.isResolved()||!e||e.isResolved()||e.cancel();a._pendingDfd=null},_fixDfd:function(a){var e=a.then;a.then=function(a,l,h){if(a){var g=a;a=function(a){return a&&a._argsArray?g.apply(null,a):g(a)}}return e.call(this,
a,l,h)};return a},_resDfd:function(a,e,k){var l=e.length;1===l?k?a.reject(e[0]):a.resolve(e[0]):1<l?(e._argsArray=!0,a.resolve(e)):a.resolve()}};return h})},"esri/geometry/Extent":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./Geometry ./Point ./SpatialReference ../core/lang ./support/spatialReferenceUtils ./support/webMercatorUtils ./support/coordsUtils".split(" "),function(a,h,n,e,k,l,q,g,c,b,f,r){function v(a,
b,c){return null==b?c:null==c?b:a(b,c)}a=function(a){function l(){for(var b=[],c=0;c<arguments.length;c++)b[c]=arguments[c];b=a.apply(this,b)||this;b.type="extent";b.xmin=0;b.ymin=0;b.mmin=void 0;b.zmin=void 0;b.xmax=0;b.ymax=0;b.mmax=void 0;b.zmax=void 0;return b}n(l,a);h=l;l.prototype.normalizeCtorArgs=function(a,b,d,m,c){return!a||"esri.SpatialReference"!==a.declaredClass&&null==a.wkid?"object"===typeof a?(a.spatialReference=null!=a.spatialReference?a.spatialReference:g.WGS84,a):{xmin:a,ymin:b,
xmax:d,ymax:m,spatialReference:null!=c?c:g.WGS84}:{spatialReference:a,xmin:0,ymin:0,xmax:0,ymax:0}};Object.defineProperty(l.prototype,"center",{get:function(){var a=new q({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});this.hasZ&&(a.z=.5*(this.zmin+this.zmax));this.hasM&&(a.m=.5*(this.mmin+this.mmax));return a},enumerable:!0,configurable:!0});Object.defineProperty(l.prototype,"extent",{get:function(){return this.clone()},enumerable:!0,configurable:!0});
Object.defineProperty(l.prototype,"hasM",{get:function(){return null!=this.mmin&&null!=this.mmax},enumerable:!0,configurable:!0});Object.defineProperty(l.prototype,"hasZ",{get:function(){return null!=this.zmin&&null!=this.zmax},enumerable:!0,configurable:!0});Object.defineProperty(l.prototype,"height",{get:function(){return Math.abs(this.ymax-this.ymin)},enumerable:!0,configurable:!0});Object.defineProperty(l.prototype,"width",{get:function(){return Math.abs(this.xmax-this.xmin)},enumerable:!0,configurable:!0});
l.prototype.centerAt=function(a){var b=this.center;return null!=a.z&&this.hasZ?this.offset(a.x-b.x,a.y-b.y,a.z-b.z):this.offset(a.x-b.x,a.y-b.y)};l.prototype.clone=function(){var a=new h;a.xmin=this.xmin;a.ymin=this.ymin;a.xmax=this.xmax;a.ymax=this.ymax;a.spatialReference=this.spatialReference;null!=this.zmin&&(a.zmin=this.zmin,a.zmax=this.zmax);null!=this.mmin&&(a.mmin=this.mmin,a.mmax=this.mmax);return a};l.prototype.contains=function(a){if(!a)return!1;if("point"===a.type){var b=this.spatialReference,
d=a.spatialReference,m=void 0,c=a.x,m=a.y;a=a.z;b&&d&&!b.equals(d)&&f.canProject(b,d)&&(m=b.isWebMercator?f.lngLatToXY(c,m):f.xyToLngLat(c,m,[0,0],0,!0),c=m[0],m=m[1]);if(c>=this.xmin&&c<=this.xmax&&m>=this.ymin&&m<=this.ymax)return null!=a&&this.hasZ?a>=this.zmin&&a<=this.zmax:!0}else if("extent"===a.type)return this._containsExtent(a);return!1};l.prototype.equals=function(a){if(!a)return!1;var b=this.spatialReference;if(!b.equals(a.spatialReference))if(f.canProject(a.spatialReference,b))a=f.project(a,
b);else return!1;return this.xmin===a.xmin&&this.ymin===a.ymin&&this.zmin===a.zmin&&this.mmin===a.mmin&&this.xmax===a.xmax&&this.ymax===a.ymax&&this.zmax===a.zmax&&this.mmax===a.mmax};l.prototype.expand=function(a){a=.5*(1-a);var b=this.width*a,d=this.height*a;this.xmin+=b;this.ymin+=d;this.xmax-=b;this.ymax-=d;this.hasZ&&(b=(this.zmax-this.zmin)*a,this.zmin+=b,this.zmax-=b);this.hasM&&(a*=this.mmax-this.mmin,this.mmin+=a,this.mmax-=a);return this};l.prototype.intersects=function(a){if(!a)return!1;
var b=this.spatialReference,d=a.spatialReference;b&&d&&!b.equals(d)&&f.canProject(b,d)&&(a=b.isWebMercator?f.geographicToWebMercator(a):f.webMercatorToGeographic(a,!0));switch(a.type){case "point":return this.contains(a);case "multipoint":return this._intersectsMultipoint(a);case "extent":return this._intersectsExtent(a);case "polygon":return this._intersectsPolygon(a);case "polyline":return this._intersectsPolyline(a)}};l.prototype.normalize=function(){var a=this._normalize(!1,!0);return Array.isArray(a)?
a:[a]};l.prototype.offset=function(a,b,d){this.xmin+=a;this.ymin+=b;this.xmax+=a;this.ymax+=b;null!=d&&(this.zmin+=d,this.zmax+=d);return this};l.prototype.shiftCentralMeridian=function(){return this._normalize(!0)};l.prototype.union=function(a){this.xmin=Math.min(this.xmin,a.xmin);this.ymin=Math.min(this.ymin,a.ymin);this.xmax=Math.max(this.xmax,a.xmax);this.ymax=Math.max(this.ymax,a.ymax);if(this.hasZ||a.hasZ)this.zmin=v(Math.min,this.zmin,a.zmin),this.zmax=v(Math.max,this.zmax,a.zmax);if(this.hasM||
a.hasM)this.mmin=v(Math.min,this.mmin,a.mmin),this.mmax=v(Math.max,this.mmax,a.mmax);return this};l.prototype.intersection=function(a){if(!this._intersectsExtent(a))return null;this.xmin=Math.max(this.xmin,a.xmin);this.ymin=Math.max(this.ymin,a.ymin);this.xmax=Math.min(this.xmax,a.xmax);this.ymax=Math.min(this.ymax,a.ymax);if(this.hasZ||a.hasZ)this.zmin=v(Math.max,this.zmin,a.zmin),this.zmax=v(Math.min,this.zmax,a.zmax);if(this.hasM||a.hasM)this.mmin=v(Math.max,this.mmin,a.mmin),this.mmax=v(Math.min,
this.mmax,a.mmax);return this};l.prototype.toJSON=function(a){return this.write(null,a)};l.prototype._containsExtent=function(a){var b=a.xmin,d=a.ymin,m=a.zmin,c=a.xmax,f=a.ymax,e=a.zmax;a=a.spatialReference;return null!=m&&this.hasZ?this.contains(new q(b,d,m,a))&&this.contains(new q(b,f,m,a))&&this.contains(new q(c,f,m,a))&&this.contains(new q(c,d,m,a))&&this.contains(new q(b,d,e,a))&&this.contains(new q(b,f,e,a))&&this.contains(new q(c,f,e,a))&&this.contains(new q(c,d,e,a)):this.contains(new q(b,
d,a))&&this.contains(new q(b,f,a))&&this.contains(new q(c,f,a))&&this.contains(new q(c,d,a))};l.prototype._intersectsMultipoint=function(a){for(var b=a.points.length,d=0;d<b;d++)if(this.contains(a.getPoint(d)))return!0;return!1};l.prototype._intersectsExtent=function(a){var b=this.hasZ&&a.hasZ,d;if(this.xmin<=a.xmin){if(d=a.xmin,this.xmax<d)return!1}else if(d=this.xmin,a.xmax<d)return!1;if(this.ymin<=a.ymin){if(d=a.ymin,this.ymax<d)return!1}else if(d=this.ymin,a.ymax<d)return!1;if(b&&a.hasZ)if(this.zmin<=
a.zmin){if(b=a.zmin,this.zmax<b)return!1}else if(b=this.zmin,a.zmax<b)return!1;return!0};l.prototype._intersectsPolygon=function(a){for(var b=[this.xmin,this.ymax],d=[this.xmax,this.ymax],m=[this.xmin,this.ymin],c=[this.xmax,this.ymin],f=[b,d,m,c],e=new q(0,0,this.spatialReference),g=f.length,k=0;k<g;k++)if(e.x=f[k][0],e.y=f[k][1],a.contains(e))return!0;e.set({x:0,y:0,spatialReference:a.spatialReference});a=a.rings;f=a.length;b=[[m,b],[b,d],[d,c],[c,m]];for(k=0;k<f;k++)if(d=a[k],m=d.length){c=d[0];
e.x=c[0];e.y=c[1];if(this.contains(e))return!0;for(g=1;g<m;g++){var l=d[g];e.x=l[0];e.y=l[1];if(this.contains(e)||this._intersectsLine([c,l],b))return!0;c=l}}return!1};l.prototype._intersectsPolyline=function(a){var b=[[[this.xmin,this.ymin],[this.xmin,this.ymax]],[[this.xmin,this.ymax],[this.xmax,this.ymax]],[[this.xmax,this.ymax],[this.xmax,this.ymin]],[[this.xmax,this.ymin],[this.xmin,this.ymin]]],d=a.paths,m=d.length;a=new q(0,0,a.spatialReference);for(var c=0;c<m;c++){var f=d[c],e=f.length;if(e){var g=
f[0];a.x=g[0];a.y=g[1];if(this.contains(a))return!0;for(var k=1;k<e;k++){var l=f[k];a.x=l[0];a.y=l[1];if(this.contains(a)||this._intersectsLine([g,l],b))return!0;g=l}}}return!1};l.prototype._intersectsLine=function(a,b){for(var d=0;d<b.length;d++)if(r._getLineIntersection2(a,b[d]))return!0;return!1};l.prototype._shiftCM=function(a){void 0===a&&(a=b.getInfo(this.spatialReference));if(!a||!this.spatialReference)return this;var p=this.spatialReference,d=this._getCM(a);if(d){var m=p.isWebMercator?f.webMercatorToGeographic(d):
d;this.xmin-=d.x;this.xmax-=d.x;p.isWebMercator||(m.x=this._normalizeX(m.x,a).x);this.spatialReference=new g(c.substitute({Central_Meridian:m.x},p.isWGS84?a.altTemplate:a.wkTemplate))}return this};l.prototype._getCM=function(a){var b=null,d=a.valid;a=d[0];var d=d[1],m=this.xmin,c=this.xmax;m>=a&&m<=d&&c>=a&&c<=d||(b=this.center);return b};l.prototype._normalize=function(a,c,d){var m=this.spatialReference;if(!m)return this;d=d||b.getInfo(m);if(!d)return this;var f=this._getParts(d).map(function(a){return a.extent});
if(2>f.length)return f[0]||this;if(2<f.length)return a?this._shiftCM(d):this.set({xmin:d.valid[0],xmax:d.valid[1]});if(a)return this._shiftCM(d);if(c)return f;var p=!0,e=!0;f.forEach(function(a){a.hasZ||(p=!1);a.hasM||(e=!1)});return{rings:f.map(function(a){var d=[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]];if(p)for(var b=(a.zmax-a.zmin)/2,m=0;m<d.length;m++)d[m].push(b);if(e)for(a=(a.mmax-a.mmin)/2,m=0;m<d.length;m++)d[m].push(a);return d}),hasZ:p,hasM:e,spatialReference:m}};
l.prototype._getParts=function(a){var c=this.cache._parts;if(!c){var c=[],d=this.ymin,m=this.ymax,f=this.spatialReference,e=this.width,g=this.xmin,k=this.xmax,l=void 0;a=a||b.getInfo(f);var r=a.valid,t=r[0],q=r[1],l=this._normalizeX(this.xmin,a),w=l.x,r=l.frameId,l=this._normalizeX(this.xmax,a),u=l.x;a=l.frameId;l=w===u&&0<e;if(e>2*q){e=new h(g<k?w:u,d,q,m,f);g=new h(t,d,g<k?u:w,m,f);k=new h(0,d,q,m,f);d=new h(t,d,0,m,f);m=[];f=[];e.contains(k)&&m.push(r);e.contains(d)&&f.push(r);g.contains(k)&&m.push(a);
g.contains(d)&&f.push(a);for(t=r+1;t<a;t++)m.push(t),f.push(t);c.push({extent:e,frameIds:[r]},{extent:g,frameIds:[a]},{extent:k,frameIds:m},{extent:d,frameIds:f})}else w>u||l?c.push({extent:new h(w,d,q,m,f),frameIds:[r]},{extent:new h(t,d,u,m,f),frameIds:[a]}):c.push({extent:new h(w,d,u,m,f),frameIds:[r]});this.cache._parts=c}a=this.hasZ;d=this.hasM;if(a||d)for(r={},a&&(r.zmin=this.zmin,r.zmax=this.zmax),d&&(r.mmin=this.mmin,r.mmax=this.mmax),a=0;a<c.length;a++)c[a].extent.set(r);return c};l.prototype._normalizeX=
function(a,b){var d=b.valid;b=d[0];var m=d[1],d=2*m,c=0;a>m?(b=Math.ceil(Math.abs(a-m)/d),a-=b*d,c=b):a<b&&(b=Math.ceil(Math.abs(a-b)/d),a+=b*d,c=-b);return{x:a,frameId:c}};e([k.property({dependsOn:"xmin ymin zmin mmin xmax ymax zmax mmax spatialReference".split(" ")})],l.prototype,"cache",void 0);e([k.property({readOnly:!0,dependsOn:["cache"]})],l.prototype,"center",null);e([k.property({readOnly:!0,dependsOn:["cache"]})],l.prototype,"extent",null);e([k.property({readOnly:!0,dependsOn:["mmin","mmax"],
json:{write:{enabled:!1,overridePolicy:null}}})],l.prototype,"hasM",null);e([k.property({readOnly:!0,dependsOn:["zmin","zmax"],json:{write:{enabled:!1,overridePolicy:null}}})],l.prototype,"hasZ",null);e([k.property({readOnly:!0,dependsOn:["ymin","ymax"]})],l.prototype,"height",null);e([k.property({readOnly:!0,dependsOn:["xmin","xmax"]})],l.prototype,"width",null);e([k.property({type:Number,json:{write:!0}})],l.prototype,"xmin",void 0);e([k.property({type:Number,json:{write:!0}})],l.prototype,"ymin",
void 0);e([k.property({type:Number,json:{write:{overridePolicy:function(){return{enabled:this.hasM}}}}})],l.prototype,"mmin",void 0);e([k.property({type:Number,json:{write:{overridePolicy:function(){return{enabled:this.hasZ}}}}})],l.prototype,"zmin",void 0);e([k.property({type:Number,json:{write:!0}})],l.prototype,"xmax",void 0);e([k.property({type:Number,json:{write:!0}})],l.prototype,"ymax",void 0);e([k.property({type:Number,json:{write:{overridePolicy:function(){return{enabled:this.hasM}}}}})],
l.prototype,"mmax",void 0);e([k.property({type:Number,json:{write:{overridePolicy:function(){return{enabled:this.hasZ}}}}})],l.prototype,"zmax",void 0);return l=h=e([k.subclass("esri.geometry.Extent")],l);var h}(k.declared(l));a.prototype.toJSON.isDefaultToJSON=!0;return a})},"esri/geometry/Geometry":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/JSONSupport ./SpatialReference".split(" "),function(a,
h,n,e,k,l,q){return function(a){function c(){var b=a.call(this)||this;b.type=null;b.extent=null;b.hasM=!1;b.hasZ=!1;b.spatialReference=q.WGS84;return b}n(c,a);Object.defineProperty(c.prototype,"cache",{get:function(){return{}},enumerable:!0,configurable:!0});c.prototype.clone=function(){console.warn(".clone() is not implemented for "+this.declaredClass);return null};c.prototype.clearCache=function(){this.notifyChange("cache")};c.prototype.getCacheValue=function(a){return this.cache[a]};c.prototype.setCacheValue=
function(a,c){this.cache[a]=c};e([k.property()],c.prototype,"type",void 0);e([k.property({readOnly:!0,dependsOn:["spatialReference"]})],c.prototype,"cache",null);e([k.property({readOnly:!0,dependsOn:["spatialReference"]})],c.prototype,"extent",void 0);e([k.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,"hasM",void 0);e([k.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,"hasZ",void 0);e([k.property({type:q,
json:{write:!0}})],c.prototype,"spatialReference",void 0);return c=e([k.subclass("esri.geometry.Geometry")],c)}(k.declared(l))})},"esri/geometry/SpatialReference":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/JSONSupport ./support/spatialReferenceUtils".split(" "),function(a,h,n,e,k,l,q){a=function(a){function b(b){b=a.call(this)||this;b.latestWkid=null;b.wkid=null;b.wkt=null;return b}n(b,a);l=
b;b.fromJSON=function(a){if(!a)return null;if(a.wkid){if(102100===a.wkid)return l.WebMercator;if(4326===a.wkid)return l.WGS84}var b=new l;b.read(a);return b};b.prototype.normalizeCtorArgs=function(a){return a&&"object"===typeof a?a:(b={},b["string"===typeof a?"wkt":"wkid"]=a,b);var b};Object.defineProperty(b.prototype,"isWGS84",{get:function(){return 4326===this.wkid},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"isWebMercator",{get:function(){return-1!==g.indexOf(this.wkid)},
enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"isGeographic",{get:function(){return q.isGeographic(this)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"isWrappable",{get:function(){return-1!==c.indexOf(this.wkid)},enumerable:!0,configurable:!0});b.prototype.writeWkt=function(a,b){this.wkid||(b.wkt=a)};b.prototype.clone=function(){if(this===l.WGS84)return l.WGS84;if(this===l.WebMercator)return l.WebMercator;var a=new l;null!=this.wkid?(a.wkid=this.wkid,null!=
this.latestWkid&&(a.latestWkid=this.latestWkid),null!=this.vcsWkid&&(a.vcsWkid=this.vcsWkid),null!=this.latestVcsWkid&&(a.latestVcsWkid=this.latestVcsWkid)):null!=this.wkt&&(a.wkt=this.wkt);return a};b.prototype.equals=function(a){if(a){if(this===a)return!0;if(null!=this.wkid||null!=a.wkid)return this.wkid===a.wkid||this.isWebMercator&&a.isWebMercator||null!=a.latestWkid&&this.wkid===a.latestWkid||null!=this.latestWkid&&a.wkid===this.latestWkid;if(this.wkt&&a.wkt)return this.wkt.toUpperCase()===a.wkt.toUpperCase()}return!1};
b.prototype.toJSON=function(a){return this.write(null,a)};b.GCS_NAD_1927=null;b.WGS84=null;b.WebMercator=null;e([k.property({dependsOn:["wkid"],readOnly:!0})],b.prototype,"isWGS84",null);e([k.property({dependsOn:["wkid"],readOnly:!0})],b.prototype,"isWebMercator",null);e([k.property({dependsOn:["wkid","wkt"],readOnly:!0})],b.prototype,"isGeographic",null);e([k.property({dependsOn:["wkid"],readOnly:!0})],b.prototype,"isWrappable",null);e([k.property({type:Number,json:{write:!0}})],b.prototype,"latestWkid",
void 0);e([k.property({type:Number,json:{write:!0,origins:{"web-scene":{write:{overridePolicy:function(){return{isRequired:null===this.wkt?!0:!1}}}}}}})],b.prototype,"wkid",void 0);e([k.property({type:String,json:{origins:{"web-scene":{write:{overridePolicy:function(){return{isRequired:null===this.wkid?!0:!1}}}}}}})],b.prototype,"wkt",void 0);e([k.writer("wkt")],b.prototype,"writeWkt",null);e([k.property({type:Number,json:{write:!0}})],b.prototype,"vcsWkid",void 0);e([k.property({type:Number,json:{write:!0}})],
b.prototype,"latestVcsWkid",void 0);return b=l=e([k.subclass("esri.SpatialReference")],b);var l}(k.declared(l));a.prototype.toJSON.isDefaultToJSON=!0;a.GCS_NAD_1927=new a({wkid:4267,wkt:'GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]'});a.WGS84=new a(4326);a.WebMercator=new a({wkid:102100,latestWkid:3857});Object.freeze&&(Object.freeze(a.GCS_NAD_1927),Object.freeze(a.WGS84),Object.freeze(a.WebMercator));
var g=[102113,102100,3857,3785],c=[102113,102100,3857,3785,4326];return a})},"esri/geometry/support/spatialReferenceUtils":function(){define(["require","exports","./WKIDUnitConversion"],function(a,h,n){Object.defineProperty(h,"__esModule",{value:!0});h.isGeographic=function(a){return a.wkid?null==n[a.wkid]:a.wkt?!!/^\s*GEOGCS/i.test(a.wkt):!1};h.getInfo=function(a){return a.wkid?e[a.wkid]:null};a=[-2.0037508342788905E7,2.0037508342788905E7];h=[-2.0037508342787E7,2.0037508342787E7];var e={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',
valid:a,origin:h,dx:1E-5},102100:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',valid:a,origin:h,
dx:1E-5},3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:a,origin:h,dx:1E-5},3857:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',
valid:a,origin:h,dx:1E-5},4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',
valid:[-180,180],origin:[-180,180],dx:1E-5}}})},"esri/geometry/support/WKIDUnitConversion":function(){define([],function(){var a,h={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.116756,5E4,15E4],units:"Meter Foot Foot_US Foot_Clarke Yard_Clarke Link_Clarke Yard_Sears Foot_Sears Chain_Sears Chain_Benoit_1895_B Yard_Indian Yard_Indian_1937 Foot_Gold_Coast Chain_Sears_1922_Truncated 50_Kilometers 150_Kilometers".split(" "),
2066:5,2136:12,2155:2,2157:0,2158:0,2159:12,2160:12,2204:2,2219:0,2220:0,2254:2,2255:2,2256:1,2265:1,2266:1,2267:2,2268:2,2269:1,2270:1,2271:2,2272:2,2273:1,2294:0,2295:0,2314:3,2899:2,2900:2,2901:1,2909:1,2910:1,2911:2,2912:2,2913:1,2914:1,2992:1,2993:0,2994:1,3080:1,3089:2,3090:0,3091:2,3102:2,3141:0,3142:0,3167:13,3359:2,3360:0,3361:1,3362:0,3363:2,3364:0,3365:2,3366:3,3404:2,3405:0,3406:0,3407:3,3439:0,3440:0,3479:1,3480:0,3481:1,3482:0,3483:1,3484:0,3485:2,3486:0,3487:2,3488:0,3489:0,3490:2,
3491:0,3492:2,3493:0,3494:2,3495:0,3496:2,3497:0,3498:2,3499:0,3500:2,3501:0,3502:2,3503:0,3504:2,3505:0,3506:2,3507:0,3508:2,3509:0,3510:2,3511:0,3512:2,3513:0,3514:0,3515:2,3516:0,3517:2,3518:0,3519:2,3520:0,3521:2,3522:0,3523:2,3524:0,3525:2,3526:0,3527:2,3528:0,3529:2,3530:0,3531:2,3532:0,3533:2,3534:0,3535:2,3536:0,3537:2,3538:0,3539:2,3540:0,3541:2,3542:0,3543:2,3544:0,3545:2,3546:0,3547:2,3548:0,3549:2,3550:0,3551:2,3552:0,3553:2,3582:2,3583:0,3584:2,3585:0,3586:2,3587:0,3588:1,3589:0,3590:1,
3591:0,3592:0,3593:1,3598:2,3599:0,3600:2,3605:1,3606:0,3607:0,3608:2,3609:0,3610:2,3611:0,3612:2,3613:0,3614:2,3615:0,3616:2,3617:0,3618:2,3619:0,3620:2,3621:0,3622:2,3623:0,3624:2,3625:0,3626:2,3627:0,3628:2,3629:0,3630:2,3631:0,3632:2,3633:0,3634:1,3635:0,3636:1,3640:2,3641:0,3642:2,3643:0,3644:1,3645:0,3646:1,3647:0,3648:1,3649:0,3650:2,3651:0,3652:2,3653:0,3654:2,3655:0,3656:1,3657:0,3658:2,3659:0,3660:2,3661:0,3662:2,3663:0,3664:2,3668:2,3669:0,3670:2,3671:0,3672:2,3673:0,3674:2,3675:0,3676:1,
3677:2,3678:0,3679:1,3680:2,3681:0,3682:1,3683:2,3684:0,3685:0,3686:2,3687:0,3688:2,3689:0,3690:2,3691:0,3692:2,3696:2,3697:0,3698:2,3699:0,3700:2,3793:0,3794:0,3812:0,3854:0,3857:0,3920:0,3978:0,3979:0,3991:2,3992:2,4026:0,4037:0,4038:0,4071:0,4082:0,4083:0,4087:0,4088:0,4217:2,4414:0,4415:0,4417:0,4434:0,4437:0,4438:2,4439:2,4462:0,4467:0,4471:0,4474:0,4559:0,4647:0,4822:0,4826:0,4839:0,5018:0,5048:0,5167:0,5168:0,5221:0,5223:0,5234:0,5235:0,5243:0,5247:0,5266:0,5316:0,5320:0,5321:0,5325:0,5337:0,
5361:0,5362:0,5367:0,5382:0,5383:0,5396:0,5456:0,5457:0,5469:0,5472:4,5490:0,5513:0,5514:0,5523:0,5559:0,5588:1,5589:3,5596:0,5627:0,5629:0,5641:0,5643:0,5644:0,5646:2,5654:2,5655:2,5659:0,5700:0,5825:0,5836:0,5837:0,5839:0,5842:0,5844:0,5858:0,5879:0,5880:0,5887:0,5890:0,6128:1,6129:1,6141:1,6204:0,6210:0,6211:0,6307:0,6312:0,6316:0,6362:0,6391:1,6405:1,6406:0,6407:1,6408:0,6409:1,6410:0,6411:2,6412:0,6413:2,6414:0,6415:0,6416:2,6417:0,6418:2,6419:0,6420:2,6421:0,6422:2,6423:0,6424:2,6425:0,6426:2,
6427:0,6428:2,6429:0,6430:2,6431:0,6432:2,6433:0,6434:2,6435:0,6436:2,6437:0,6438:2,6439:0,6440:0,6441:2,6442:0,6443:2,6444:0,6445:2,6446:0,6447:2,6448:0,6449:2,6450:0,6451:2,6452:0,6453:2,6454:0,6455:2,6456:0,6457:2,6458:0,6459:2,6460:0,6461:2,6462:0,6463:2,6464:0,6465:2,6466:0,6467:2,6468:0,6469:2,6470:0,6471:2,6472:0,6473:2,6474:0,6475:2,6476:0,6477:2,6478:0,6479:2,6484:2,6485:0,6486:2,6487:0,6488:2,6489:0,6490:2,6491:0,6492:2,6493:0,6494:1,6495:0,6496:1,6497:0,6498:0,6499:1,6500:0,6501:2,6502:0,
6503:2,6504:0,6505:2,6506:0,6507:2,6508:0,6509:0,6510:2,6515:1,6516:0,6518:0,6519:2,6520:0,6521:2,6522:0,6523:2,6524:0,6525:2,6526:0,6527:2,6528:0,6529:2,6530:0,6531:2,6532:0,6533:2,6534:0,6535:2,6536:0,6537:2,6538:0,6539:2,6540:0,6541:2,6542:0,6543:2,6544:0,6545:1,6546:0,6547:1,6548:0,6549:2,6550:0,6551:2,6552:0,6553:2,6554:0,6555:2,6556:0,6557:1,6558:0,6559:1,6560:0,6561:1,6562:0,6563:2,6564:0,6565:2,6566:0,6567:0,6568:2,6569:0,6570:1,6571:0,6572:2,6573:0,6574:2,6575:0,6576:2,6577:0,6578:2,6582:2,
6583:0,6584:2,6585:0,6586:2,6587:0,6588:2,6589:0,6590:2,6591:0,6592:0,6593:2,6594:0,6595:2,6596:0,6597:2,6598:0,6599:2,6600:0,6601:2,6602:0,6603:2,6605:2,6606:0,6607:2,6608:0,6609:2,6610:0,6611:0,6612:2,6613:0,6614:2,6615:0,6616:2,6617:0,6618:2,6633:2,6646:0,6703:0,6784:0,6785:1,6786:0,6787:1,6788:0,6789:1,6790:0,6791:1,6792:0,6793:1,6794:0,6795:1,6796:0,6797:1,6798:0,6799:1,6800:0,6801:1,6802:0,6803:1,6804:0,6805:1,6806:0,6807:1,6808:0,6809:1,6810:0,6811:1,6812:0,6813:1,6814:0,6815:1,6816:0,6817:1,
6818:0,6819:1,6820:0,6821:1,6822:0,6823:1,6824:0,6825:1,6826:0,6827:1,6828:0,6829:1,6830:0,6831:1,6832:0,6833:1,6834:0,6835:1,6836:0,6837:1,6838:0,6839:1,6840:0,6841:1,6842:0,6843:1,6844:0,6845:1,6846:0,6847:1,6848:0,6849:1,6850:0,6851:1,6852:0,6853:1,6854:0,6855:1,6856:0,6857:1,6858:0,6859:1,6860:0,6861:1,6862:0,6863:1,6867:0,6868:1,6870:0,6875:0,6876:0,6879:0,6880:2,6884:0,6885:1,6886:0,6887:1,6915:0,6922:0,6923:2,6924:0,6925:2,6962:0,6984:0,6991:0,7128:2,7131:0,7132:2,7142:0,7257:0,7258:2,7259:0,
7260:2,7261:0,7262:2,7263:0,7264:2,7265:0,7266:2,7267:0,7268:2,7269:0,7270:2,7271:0,7272:2,7273:0,7274:2,7275:0,7276:2,7277:0,7278:2,7279:0,7280:2,7281:0,7282:2,7283:0,7284:2,7285:0,7286:2,7287:0,7288:2,7289:0,7290:2,7291:0,7292:2,7293:0,7294:2,7295:0,7296:2,7297:0,7298:2,7299:0,7300:2,7301:0,7302:2,7303:0,7304:2,7305:0,7306:2,7307:0,7308:2,7309:0,7310:2,7311:0,7312:2,7313:0,7314:2,7315:0,7316:2,7317:0,7318:2,7319:0,7320:2,7321:0,7322:2,7323:0,7324:2,7325:0,7326:2,7327:0,7328:2,7329:0,7330:2,7331:0,
7332:2,7333:0,7334:2,7335:0,7336:2,7337:0,7338:2,7339:0,7340:2,7341:0,7342:2,7343:0,7344:2,7345:0,7346:2,7347:0,7348:2,7349:0,7350:2,7351:0,7352:2,7353:0,7354:2,7355:0,7356:2,7357:0,7358:2,7359:0,7360:2,7361:0,7362:2,7363:0,7364:2,7365:0,7366:2,7367:0,7368:2,7369:0,7370:2,7877:0,7878:0,7882:0,7883:0,7887:0,7899:0,7991:0,7992:0,8058:0,8059:0,8311:0,8312:1,8313:0,8314:1,8315:0,8316:1,8317:0,8318:1,8319:0,8320:1,8321:0,8322:1,8323:0,8324:1,8325:0,8326:1,8327:0,8328:1,8329:0,8330:1,8331:0,8332:1,8333:0,
8334:1,8335:0,8336:1,8337:0,8338:1,8339:0,8340:1,8341:0,8342:1,8343:0,8344:1,8345:0,8346:1,8347:0,8348:1,20499:0,20538:0,20539:0,20790:0,20791:0,21291:0,21292:0,21500:0,21817:0,21818:0,22032:0,22033:0,22091:0,22092:0,22332:0,22391:0,22392:0,22700:0,22770:0,22780:0,22832:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,24047:0,24048:0,24100:3,24200:0,24305:0,24306:0,24382:10,24383:0,24500:0,24547:0,24548:0,24571:9,24600:0,25E3:0,25231:0,25884:0,25932:0,26237:0,26331:0,26332:0,26432:0,26591:0,26592:0,
26632:0,26692:0,27120:0,27200:0,27291:6,27292:6,27429:0,27492:0,27493:0,27500:0,27700:0,28232:0,28600:0,28991:0,28992:0,29100:0,29101:0,29220:0,29221:0,29333:0,29635:0,29636:0,29701:0,29738:0,29739:0,29849:0,29850:0,29871:8,29872:7,29873:0,30200:5,30339:0,30340:0,30591:0,30592:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,31171:0,31370:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31900:0,31901:0,32061:0,32062:0,32098:0,32099:2,32100:0,32104:0,32161:0,32766:0,53034:0,53048:0,53049:0,
54034:0,65061:2,65062:2,65161:0,65163:0,102041:2,102064:11,102068:14,102069:15,102118:2,102119:1,102120:2,102121:2,102217:2,102218:0,102219:2,102220:2,102378:1,102379:1,102380:0,102381:1,102589:2,102599:2,102600:2,102604:2,102647:0,102704:2,102705:2,102706:0,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102962:0,102963:0,102970:1,102974:2,102993:0,102994:0,102995:2,102996:2,103015:0,103016:2,103017:0,103018:2,103025:0,103026:0,103027:2,103028:2,103035:0,103036:0,103037:2,103038:2,103039:0,
103040:0,103041:2,103042:2,103043:0,103044:0,103045:2,103046:2,103047:0,103048:0,103049:2,103050:2,103051:0,103052:2,103053:0,103054:2,103055:0,103056:2,103057:0,103058:0,103059:2,103060:2,103061:0,103062:0,103063:2,103064:2,103069:2,103070:0,103071:0,103072:2,103073:2,103086:0,103087:0,103088:2,103089:2,103094:1,103095:0,103096:2,103103:0,103104:2,103105:0,103106:2,103121:0,103122:2,103123:0,103124:0,103125:1,103126:1,103127:0,103128:0,103129:2,103130:2,103131:0,103132:0,103133:2,103134:2,103135:0,
103136:0,103137:1,103138:1,103139:0,103140:2,103141:0,103142:2,103143:0,103144:2,103145:0,103146:1,103147:0,103148:0,103149:2,103150:2,103151:0,103152:2,103172:0,103173:2,103174:0,103175:0,103176:2,103177:2,103178:0,103179:0,103180:2,103181:2,103182:0,103183:0,103184:2,103185:2,103228:0,103229:0,103230:2,103231:2,103250:0,103251:2,103252:0,103253:2,103260:0,103261:0,103262:2,103263:2,103270:0,103271:0,103272:2,103273:2,103274:0,103275:0,103276:2,103277:2,103278:0,103279:0,103280:2,103281:2,103282:0,
103283:0,103284:2,103285:2,103286:0,103287:2,103288:0,103289:2,103290:0,103291:2,103292:0,103293:0,103294:2,103295:2,103296:0,103297:0,103298:2,103299:2,103376:2,103377:0,103378:0,103379:2,103380:2,103393:0,103394:0,103395:2,103396:2,103472:0,103473:1,103474:0,103475:2,103482:0,103483:2,103484:0,103485:2,103500:0,103501:2,103502:0,103503:0,103504:1,103505:1,103506:0,103507:0,103508:2,103509:2,103510:0,103511:0,103512:2,103513:2,103514:0,103515:2,103516:0,103517:2,103518:0,103519:2,103520:0,103521:1,
103522:0,103523:0,103524:2,103525:2,103526:0,103527:2,103561:2,103562:2,103563:0,103564:0,103565:2,103566:2,103567:0,103568:0,103569:2,103570:2,103584:0,103585:2,103695:2};for(a=2E3;2045>=a;a++)h[a]=0;for(a=2056;2065>=a;a++)h[a]=0;for(a=2067;2135>=a;a++)h[a]=0;for(a=2137;2154>=a;a++)h[a]=0;for(a=2161;2170>=a;a++)h[a]=0;for(a=2172;2193>=a;a++)h[a]=0;for(a=2195;2198>=a;a++)h[a]=0;for(a=2200;2203>=a;a++)h[a]=0;for(a=2205;2217>=a;a++)h[a]=0;for(a=2222;2224>=a;a++)h[a]=1;for(a=2225;2250>=a;a++)h[a]=2;
for(a=2251;2253>=a;a++)h[a]=1;for(a=2257;2264>=a;a++)h[a]=2;for(a=2274;2279>=a;a++)h[a]=2;for(a=2280;2282>=a;a++)h[a]=1;for(a=2283;2289>=a;a++)h[a]=2;for(a=2290;2292>=a;a++)h[a]=0;for(a=2308;2313>=a;a++)h[a]=0;for(a=2315;2491>=a;a++)h[a]=0;for(a=2494;2866>=a;a++)h[a]=0;for(a=2867;2869>=a;a++)h[a]=1;for(a=2870;2888>=a;a++)h[a]=2;for(a=2891;2895>=a;a++)h[a]=2;for(a=2896;2898>=a;a++)h[a]=1;for(a=2902;2908>=a;a++)h[a]=2;for(a=2915;2920>=a;a++)h[a]=2;for(a=2921;2923>=a;a++)h[a]=1;for(a=2924;2930>=a;a++)h[a]=
2;for(a=2931;2962>=a;a++)h[a]=0;for(a=2964;2968>=a;a++)h[a]=2;for(a=2969;2973>=a;a++)h[a]=0;for(a=2975;2991>=a;a++)h[a]=0;for(a=2995;3051>=a;a++)h[a]=0;for(a=3054;3079>=a;a++)h[a]=0;for(a=3081;3088>=a;a++)h[a]=0;for(a=3092;3101>=a;a++)h[a]=0;for(a=3106;3138>=a;a++)h[a]=0;for(a=3146;3151>=a;a++)h[a]=0;for(a=3153;3166>=a;a++)h[a]=0;for(a=3168;3172>=a;a++)h[a]=0;for(a=3174;3203>=a;a++)h[a]=0;for(a=3294;3358>=a;a++)h[a]=0;for(a=3367;3403>=a;a++)h[a]=0;for(a=3408;3416>=a;a++)h[a]=0;for(a=3417;3438>=a;a++)h[a]=
2;for(a=3441;3446>=a;a++)h[a]=2;for(a=3447;3450>=a;a++)h[a]=0;for(a=3451;3459>=a;a++)h[a]=2;for(a=3460;3478>=a;a++)h[a]=0;for(a=3554;3559>=a;a++)h[a]=0;for(a=3560;3570>=a;a++)h[a]=2;for(a=3571;3581>=a;a++)h[a]=0;for(a=3594;3597>=a;a++)h[a]=0;for(a=3601;3604>=a;a++)h[a]=0;for(a=3637;3639>=a;a++)h[a]=0;for(a=3665;3667>=a;a++)h[a]=0;for(a=3693;3695>=a;a++)h[a]=0;for(a=3701;3727>=a;a++)h[a]=0;for(a=3728;3739>=a;a++)h[a]=2;for(a=3740;3751>=a;a++)h[a]=0;for(a=3753;3760>=a;a++)h[a]=2;for(a=3761;3773>=a;a++)h[a]=
0;for(a=3775;3777>=a;a++)h[a]=0;for(a=3779;3781>=a;a++)h[a]=0;for(a=3783;3785>=a;a++)h[a]=0;for(a=3788;3791>=a;a++)h[a]=0;for(a=3797;3802>=a;a++)h[a]=0;for(a=3814;3816>=a;a++)h[a]=0;for(a=3825;3829>=a;a++)h[a]=0;for(a=3832;3841>=a;a++)h[a]=0;for(a=3844;3852>=a;a++)h[a]=0;for(a=3873;3885>=a;a++)h[a]=0;for(a=3890;3893>=a;a++)h[a]=0;for(a=3907;3912>=a;a++)h[a]=0;for(a=3942;3950>=a;a++)h[a]=0;for(a=3968;3970>=a;a++)h[a]=0;for(a=3973;3976>=a;a++)h[a]=0;for(a=3986;3989>=a;a++)h[a]=0;for(a=3994;3997>=a;a++)h[a]=
0;for(a=4048;4051>=a;a++)h[a]=0;for(a=4056;4063>=a;a++)h[a]=0;for(a=4093;4096>=a;a++)h[a]=0;for(a=4390;4398>=a;a++)h[a]=0;for(a=4399;4413>=a;a++)h[a]=2;for(a=4418;4433>=a;a++)h[a]=2;for(a=4455;4457>=a;a++)h[a]=2;for(a=4484;4489>=a;a++)h[a]=0;for(a=4491;4554>=a;a++)h[a]=0;for(a=4568;4589>=a;a++)h[a]=0;for(a=4652;4656>=a;a++)h[a]=0;for(a=4766;4800>=a;a++)h[a]=0;for(a=5014;5016>=a;a++)h[a]=0;for(a=5069;5072>=a;a++)h[a]=0;for(a=5105;5130>=a;a++)h[a]=0;for(a=5173;5188>=a;a++)h[a]=0;for(a=5253;5259>=a;a++)h[a]=
0;for(a=5269;5275>=a;a++)h[a]=0;for(a=5292;5311>=a;a++)h[a]=0;for(a=5329;5331>=a;a++)h[a]=0;for(a=5343;5349>=a;a++)h[a]=0;for(a=5355;5357>=a;a++)h[a]=0;for(a=5387;5389>=a;a++)h[a]=0;for(a=5459;5463>=a;a++)h[a]=0;for(a=5479;5482>=a;a++)h[a]=0;for(a=5518;5520>=a;a++)h[a]=0;for(a=5530;5539>=a;a++)h[a]=0;for(a=5550;5552>=a;a++)h[a]=0;for(a=5562;5583>=a;a++)h[a]=0;for(a=5623;5625>=a;a++)h[a]=2;for(a=5631;5639>=a;a++)h[a]=0;for(a=5649;5653>=a;a++)h[a]=0;for(a=5663;5680>=a;a++)h[a]=0;for(a=5682;5685>=a;a++)h[a]=
0;for(a=5875;5877>=a;a++)h[a]=0;for(a=5921;5940>=a;a++)h[a]=0;for(a=6050;6125>=a;a++)h[a]=0;for(a=6244;6275>=a;a++)h[a]=0;for(a=6328;6348>=a;a++)h[a]=0;for(a=6350;6356>=a;a++)h[a]=0;for(a=6366;6372>=a;a++)h[a]=0;for(a=6381;6387>=a;a++)h[a]=0;for(a=6393;6404>=a;a++)h[a]=0;for(a=6480;6483>=a;a++)h[a]=0;for(a=6511;6514>=a;a++)h[a]=0;for(a=6579;6581>=a;a++)h[a]=0;for(a=6619;6624>=a;a++)h[a]=0;for(a=6625;6627>=a;a++)h[a]=2;for(a=6628;6632>=a;a++)h[a]=0;for(a=6634;6637>=a;a++)h[a]=0;for(a=6669;6692>=a;a++)h[a]=
0;for(a=6707;6709>=a;a++)h[a]=0;for(a=6720;6723>=a;a++)h[a]=0;for(a=6732;6738>=a;a++)h[a]=0;for(a=6931;6933>=a;a++)h[a]=0;for(a=6956;6959>=a;a++)h[a]=0;for(a=7005;7007>=a;a++)h[a]=0;for(a=7057;7070>=a;a++)h[a]=2;for(a=7074;7082>=a;a++)h[a]=0;for(a=7109;7118>=a;a++)h[a]=0;for(a=7119;7127>=a;a++)h[a]=1;for(a=7374;7376>=a;a++)h[a]=0;for(a=7528;7586>=a;a++)h[a]=0;for(a=7587;7645>=a;a++)h[a]=2;for(a=7755;7787>=a;a++)h[a]=0;for(a=7791;7795>=a;a++)h[a]=0;for(a=7799;7801>=a;a++)h[a]=0;for(a=7803;7805>=a;a++)h[a]=
0;for(a=7825;7831>=a;a++)h[a]=0;for(a=7845;7859>=a;a++)h[a]=0;for(a=8013;8032>=a;a++)h[a]=0;for(a=20002;20032>=a;a++)h[a]=0;for(a=20062;20092>=a;a++)h[a]=0;for(a=20135;20138>=a;a++)h[a]=0;for(a=20248;20258>=a;a++)h[a]=0;for(a=20348;20358>=a;a++)h[a]=0;for(a=20436;20440>=a;a++)h[a]=0;for(a=20822;20824>=a;a++)h[a]=0;for(a=20934;20936>=a;a++)h[a]=0;for(a=21035;21037>=a;a++)h[a]=0;for(a=21095;21097>=a;a++)h[a]=0;for(a=21148;21150>=a;a++)h[a]=0;for(a=21413;21423>=a;a++)h[a]=0;for(a=21473;21483>=a;a++)h[a]=
0;for(a=21780;21782>=a;a++)h[a]=0;for(a=21891;21894>=a;a++)h[a]=0;for(a=21896;21899>=a;a++)h[a]=0;for(a=22171;22177>=a;a++)h[a]=0;for(a=22181;22187>=a;a++)h[a]=0;for(a=22191;22197>=a;a++)h[a]=0;for(a=22234;22236>=a;a++)h[a]=0;for(a=22521;22525>=a;a++)h[a]=0;for(a=22991;22994>=a;a++)h[a]=0;for(a=23028;23038>=a;a++)h[a]=0;for(a=23830;23853>=a;a++)h[a]=0;for(a=23866;23872>=a;a++)h[a]=0;for(a=23877;23884>=a;a++)h[a]=0;for(a=23886;23894>=a;a++)h[a]=0;for(a=23946;23948>=a;a++)h[a]=0;for(a=24311;24313>=
a;a++)h[a]=0;for(a=24342;24347>=a;a++)h[a]=0;for(a=24370;24374>=a;a++)h[a]=10;for(a=24375;24381>=a;a++)h[a]=0;for(a=24718;24721>=a;a++)h[a]=0;for(a=24817;24821>=a;a++)h[a]=0;for(a=24877;24882>=a;a++)h[a]=0;for(a=24891;24893>=a;a++)h[a]=0;for(a=25391;25395>=a;a++)h[a]=0;for(a=25828;25838>=a;a++)h[a]=0;for(a=26191;26195>=a;a++)h[a]=0;for(a=26391;26393>=a;a++)h[a]=0;for(a=26701;26722>=a;a++)h[a]=0;for(a=26729;26799>=a;a++)h[a]=2;for(a=26801;26803>=a;a++)h[a]=2;for(a=26811;26813>=a;a++)h[a]=2;for(a=26847;26870>=
a;a++)h[a]=2;for(a=26891;26899>=a;a++)h[a]=0;for(a=26901;26923>=a;a++)h[a]=0;for(a=26929;26946>=a;a++)h[a]=0;for(a=26948;26998>=a;a++)h[a]=0;for(a=27037;27040>=a;a++)h[a]=0;for(a=27205;27232>=a;a++)h[a]=0;for(a=27258;27260>=a;a++)h[a]=0;for(a=27391;27398>=a;a++)h[a]=0;for(a=27561;27564>=a;a++)h[a]=0;for(a=27571;27574>=a;a++)h[a]=0;for(a=27581;27584>=a;a++)h[a]=0;for(a=27591;27594>=a;a++)h[a]=0;for(a=28191;28193>=a;a++)h[a]=0;for(a=28348;28358>=a;a++)h[a]=0;for(a=28402;28432>=a;a++)h[a]=0;for(a=28462;28492>=
a;a++)h[a]=0;for(a=29118;29122>=a;a++)h[a]=0;for(a=29168;29172>=a;a++)h[a]=0;for(a=29177;29185>=a;a++)h[a]=0;for(a=29187;29195>=a;a++)h[a]=0;for(a=29900;29903>=a;a++)h[a]=0;for(a=30161;30179>=a;a++)h[a]=0;for(a=30491;30494>=a;a++)h[a]=0;for(a=30729;30732>=a;a++)h[a]=0;for(a=31251;31259>=a;a++)h[a]=0;for(a=31265;31268>=a;a++)h[a]=0;for(a=31275;31279>=a;a++)h[a]=0;for(a=31281;31297>=a;a++)h[a]=0;for(a=31461;31469>=a;a++)h[a]=0;for(a=31491;31495>=a;a++)h[a]=0;for(a=31917;31922>=a;a++)h[a]=0;for(a=31965;32E3>=
a;a++)h[a]=0;for(a=32001;32003>=a;a++)h[a]=2;for(a=32005;32031>=a;a++)h[a]=2;for(a=32033;32060>=a;a++)h[a]=2;for(a=32064;32067>=a;a++)h[a]=2;for(a=32074;32077>=a;a++)h[a]=2;for(a=32081;32086>=a;a++)h[a]=0;for(a=32107;32130>=a;a++)h[a]=0;for(a=32133;32158>=a;a++)h[a]=0;for(a=32164;32167>=a;a++)h[a]=2;for(a=32180;32199>=a;a++)h[a]=0;for(a=32201;32260>=a;a++)h[a]=0;for(a=32301;32360>=a;a++)h[a]=0;for(a=32601;32662>=a;a++)h[a]=0;for(a=32664;32667>=a;a++)h[a]=2;for(a=32701;32761>=a;a++)h[a]=0;for(a=53001;53004>=
a;a++)h[a]=0;for(a=53008;53019>=a;a++)h[a]=0;for(a=53021;53032>=a;a++)h[a]=0;for(a=53042;53046>=a;a++)h[a]=0;for(a=53074;53080>=a;a++)h[a]=0;for(a=54001;54004>=a;a++)h[a]=0;for(a=54008;54019>=a;a++)h[a]=0;for(a=54021;54032>=a;a++)h[a]=0;for(a=54042;54046>=a;a++)h[a]=0;for(a=54048;54053>=a;a++)h[a]=0;for(a=54074;54080>=a;a++)h[a]=0;for(a=102001;102040>=a;a++)h[a]=0;for(a=102042;102063>=a;a++)h[a]=0;for(a=102065;102067>=a;a++)h[a]=0;for(a=102070;102117>=a;a++)h[a]=0;for(a=102122;102216>=a;a++)h[a]=
0;for(a=102221;102377>=a;a++)h[a]=0;for(a=102382;102388>=a;a++)h[a]=0;for(a=102389;102398>=a;a++)h[a]=2;for(a=102399;102444>=a;a++)h[a]=0;for(a=102445;102447>=a;a++)h[a]=2;for(a=102448;102458>=a;a++)h[a]=0;for(a=102459;102468>=a;a++)h[a]=2;for(a=102469;102496>=a;a++)h[a]=0;for(a=102500;102519>=a;a++)h[a]=1;for(a=102520;102524>=a;a++)h[a]=0;for(a=102525;102529>=a;a++)h[a]=2;for(a=102530;102568>=a;a++)h[a]=0;for(a=102570;102588>=a;a++)h[a]=0;for(a=102590;102598>=a;a++)h[a]=0;for(a=102601;102603>=a;a++)h[a]=
0;for(a=102605;102628>=a;a++)h[a]=0;for(a=102629;102646>=a;a++)h[a]=2;for(a=102648;102700>=a;a++)h[a]=2;for(a=102701;102703>=a;a++)h[a]=0;for(a=102707;102730>=a;a++)h[a]=2;for(a=102733;102758>=a;a++)h[a]=2;for(a=102767;102900>=a;a++)h[a]=0;for(a=102965;102969>=a;a++)h[a]=0;for(a=102971;102973>=a;a++)h[a]=0;for(a=102975;102989>=a;a++)h[a]=0;for(a=102990;102992>=a;a++)h[a]=1;for(a=102997;103002>=a;a++)h[a]=0;for(a=103003;103008>=a;a++)h[a]=2;for(a=103009;103011>=a;a++)h[a]=0;for(a=103012;103014>=a;a++)h[a]=
2;for(a=103019;103021>=a;a++)h[a]=0;for(a=103022;103024>=a;a++)h[a]=2;for(a=103029;103031>=a;a++)h[a]=0;for(a=103032;103034>=a;a++)h[a]=2;for(a=103065;103068>=a;a++)h[a]=0;for(a=103074;103076>=a;a++)h[a]=0;for(a=103077;103079>=a;a++)h[a]=1;for(a=103080;103082>=a;a++)h[a]=0;for(a=103083;103085>=a;a++)h[a]=2;for(a=103090;103093>=a;a++)h[a]=0;for(a=103097;103099>=a;a++)h[a]=0;for(a=103100;103102>=a;a++)h[a]=2;for(a=103107;103109>=a;a++)h[a]=0;for(a=103110;103112>=a;a++)h[a]=2;for(a=103113;103116>=a;a++)h[a]=
0;for(a=103117;103120>=a;a++)h[a]=2;for(a=103153;103157>=a;a++)h[a]=0;for(a=103158;103162>=a;a++)h[a]=2;for(a=103163;103165>=a;a++)h[a]=0;for(a=103166;103168>=a;a++)h[a]=1;for(a=103169;103171>=a;a++)h[a]=2;for(a=103186;103188>=a;a++)h[a]=0;for(a=103189;103191>=a;a++)h[a]=2;for(a=103192;103195>=a;a++)h[a]=0;for(a=103196;103199>=a;a++)h[a]=2;for(a=103200;103224>=a;a++)h[a]=0;for(a=103225;103227>=a;a++)h[a]=1;for(a=103232;103237>=a;a++)h[a]=0;for(a=103238;103243>=a;a++)h[a]=2;for(a=103244;103246>=a;a++)h[a]=
0;for(a=103247;103249>=a;a++)h[a]=2;for(a=103254;103256>=a;a++)h[a]=0;for(a=103257;103259>=a;a++)h[a]=2;for(a=103264;103266>=a;a++)h[a]=0;for(a=103267;103269>=a;a++)h[a]=2;for(a=103300;103375>=a;a++)h[a]=0;for(a=103381;103383>=a;a++)h[a]=0;for(a=103384;103386>=a;a++)h[a]=1;for(a=103387;103389>=a;a++)h[a]=0;for(a=103390;103392>=a;a++)h[a]=2;for(a=103397;103399>=a;a++)h[a]=0;for(a=103400;103471>=a;a++)h[a]=2;for(a=103476;103478>=a;a++)h[a]=0;for(a=103479;103481>=a;a++)h[a]=2;for(a=103486;103488>=a;a++)h[a]=
0;for(a=103489;103491>=a;a++)h[a]=2;for(a=103492;103495>=a;a++)h[a]=0;for(a=103496;103499>=a;a++)h[a]=2;for(a=103528;103543>=a;a++)h[a]=0;for(a=103544;103548>=a;a++)h[a]=2;for(a=103549;103551>=a;a++)h[a]=0;for(a=103552;103554>=a;a++)h[a]=1;for(a=103555;103557>=a;a++)h[a]=2;for(a=103558;103560>=a;a++)h[a]=0;for(a=103571;103573>=a;a++)h[a]=0;for(a=103574;103576>=a;a++)h[a]=2;for(a=103577;103580>=a;a++)h[a]=0;for(a=103581;103583>=a;a++)h[a]=2;for(a=103600;103694>=a;a++)h[a]=0;for(a=103700;103793>=a;a++)h[a]=
2;for(a=103794;103871>=a;a++)h[a]=0;for(a=103900;103971>=a;a++)h[a]=2;return h})},"esri/geometry/Point":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./Geometry ./SpatialReference ./support/spatialReferenceUtils ./support/webMercatorUtils".split(" "),function(a,h,n,e,k,l,q,g,c){function b(a){return a&&("esri.SpatialReference"===a.declaredClass||null!=a.wkid)}var f=[0,0];a=function(a){function l(b,c,f,p,
d){b=a.call(this)||this;b.x=0;b.y=0;b.z=void 0;b.m=void 0;b.type="point";return b}n(l,a);h=l;l.copy=function(a,b){b.x=a.x;b.y=a.y;b.z=a.z;b.m=a.m;b.spatialReference=Object.isFrozen(a.spatialReference)?a.spatialReference:a.spatialReference.clone()};l.distance=function(a,b){var c=a.x-b.x,f=a.y-b.y;a=a.hasZ&&b.hasZ?a.z-b.z:0;return Math.sqrt(c*c+f*f+a*a)};l.prototype.normalizeCtorArgs=function(a,e,g,p,d){var m;Array.isArray(a)?(m=a,d=e,a=m[0],e=m[1],g=m[2],p=m[3]):a&&"object"===typeof a?(m=a,a=null!=
m.x?m.x:m.longitude,e=null!=m.y?m.y:m.latitude,g=null!=m.z?m.z:m.altitude,p=m.m,(d=m.spatialReference)&&"esri.SpatialReference"!==d.declaredClass&&(d=new q(d)),!m.declaredClass&&d&&d.isWebMercator&&null!=m.longitude&&null!=m.latitude&&(e=c.lngLatToXY(m.longitude,m.latitude,f),a=e[0],e=e[1])):b(g)?(d=g,g=null):b(p)&&(d=p,p=null);a={x:a,y:e};null!=d&&(a.spatialReference=d);null!=g&&(a.z=g);null!=p&&(a.m=p);return a};Object.defineProperty(l.prototype,"hasM",{get:function(){return void 0!==this.m},set:function(a){var b=
this._get("hasM");a!==b&&(this._set("m",a?0:void 0),this._set("hasM",a))},enumerable:!0,configurable:!0});Object.defineProperty(l.prototype,"hasZ",{get:function(){return void 0!==this.z},set:function(a){var b=this._get("hasZ");a!==b&&(this._set("z",a?0:void 0),this._set("hasZ",a))},enumerable:!0,configurable:!0});Object.defineProperty(l.prototype,"latitude",{get:function(){var a=this._get("spatialReference");if(a){if(a.isWebMercator)return c.xyToLngLat(this.x,this.y,f)[1];if(a.isWGS84)return this._get("y")}return null},
set:function(a){var b=this._get("spatialReference");b&&(b.isWebMercator?this._set("y",c.lngLatToXY(this.x,a,f)[1]):b.isWGS84&&this._set("y",a),this._set("latitude",a))},enumerable:!0,configurable:!0});Object.defineProperty(l.prototype,"longitude",{get:function(){var a=this._get("spatialReference");if(a){if(a.isWebMercator)return c.xyToLngLat(this._get("x"),this._get("y"),f)[0];if(a.isWGS84)return this._get("x")}return null},set:function(a){var b=this._get("spatialReference");b&&(b.isWebMercator?this._set("x",
c.lngLatToXY(a,this._get("y"),f)[0]):b.isWGS84&&this._set("x",a),this._set("longitude",a))},enumerable:!0,configurable:!0});l.prototype.clone=function(){var a=new h;a.x=this.x;a.y=this.y;a.z=this.z;a.m=this.m;a.spatialReference=this.spatialReference;return a};l.prototype.copy=function(a){h.copy(a,this);return this};l.prototype.equals=function(a){if(!a)return!1;var b=this.x,f=this.y,p=this.z,d=this.m,m=this.spatialReference,e=a.z,g=a.m,k=a.x,l=a.y;a=a.spatialReference;if(!m.equals(a))if(m.isWebMercator&&
a.isWGS84)l=c.lngLatToXY(k,l),k=l[0],l=l[1],a=m;else if(m.isWGS84&&a.isWebMercator)l=c.xyToLngLat(k,l),k=l[0],l=l[1],a=m;else return!1;return b===k&&f===l&&p===e&&d===g&&m.wkid===a.wkid};l.prototype.offset=function(a,b,c){this.x+=a;this.y+=b;null!=c&&this.hasZ&&(this.z+=c);return this};l.prototype.normalize=function(){if(!this.spatialReference)return this;var a=g.getInfo(this.spatialReference);if(!a)return this;var b=this.x,c=a.valid,a=c[0],f=c[1],c=2*f;b>f?(a=Math.ceil(Math.abs(b-f)/c),b-=a*c):b<
a&&(a=Math.ceil(Math.abs(b-a)/c),b+=a*c);this._set("x",b);return this};l.prototype.distance=function(a){return h.distance(this,a)};l.prototype.toArray=function(){var a=this.hasZ,b=this.hasM;return a&&b?[this.x,this.y,this.z,this.m]:a?[this.x,this.y,this.z]:b?[this.x,this.y,this.m]:[this.x,this.y]};l.prototype.toJSON=function(a){return this.write(null,a)};e([k.property({dependsOn:["x","y","z","m","spatialReference"]})],l.prototype,"cache",void 0);e([k.property({type:Boolean,dependsOn:["m"],json:{write:{enabled:!1,
overridePolicy:null}}})],l.prototype,"hasM",null);e([k.property({type:Boolean,dependsOn:["z"],json:{write:{enabled:!1,overridePolicy:null}}})],l.prototype,"hasZ",null);e([k.property({type:Number,dependsOn:["y"]})],l.prototype,"latitude",null);e([k.property({type:Number,dependsOn:["x"]})],l.prototype,"longitude",null);e([k.property({type:Number,json:{write:{isRequired:!0}}})],l.prototype,"x",void 0);e([k.property({type:Number,json:{write:!0}})],l.prototype,"y",void 0);e([k.property({type:Number,json:{write:{overridePolicy:function(){return{enabled:this.hasZ}}}}})],
l.prototype,"z",void 0);e([k.property({type:Number,json:{write:{overridePolicy:function(){return{enabled:this.hasM}}}}})],l.prototype,"m",void 0);return l=h=e([k.subclass("esri.geometry.Point")],l);var h}(k.declared(l));a.prototype.toJSON.isDefaultToJSON=!0;return a})},"esri/geometry/support/webMercatorUtils":function(){define(["require","exports","../SpatialReference"],function(a,h,n){function e(a,b,f,e,k){if("point"===a.type)b=b(a.x,a.y,g,0,e),k.x=b[0],k.y=b[1];else if("extent"===a.type)d=b(a.xmin,
a.ymin,g,0,e),k.xmin=d[0],k.ymin=d[1],b=b(a.xmax,a.ymax,g,0,e),k.xmax=b[0],k.ymax=b[1];else if("polyline"===a.type||"polygon"===a.type){var c=(d="polyline"===a.type)?a.paths:a.rings,l=[],h=void 0;for(a=0;a<c.length;a++){var r=c[a],h=[];l.push(h);for(var p=0;p<r.length;p++)h.push(b(r[p][0],r[p][1],[0,0],0,e)),2<r[p].length&&h[p].push(r[p][2]),3<r[p].length&&h[p].push(r[p][3])}d?k.paths=l:k.rings=l}else if("multipoint"===a.type){d=a.points;c=[];for(a=0;a<d.length;a++)c[a]=b(d[a][0],d[a][1],[0,0],0,
e),2<d[a].length&&c[a].push(d[a][2]),3<d[a].length&&c[a].push(d[a][3]);k.points=c}k.spatialReference=f;return k;var d}function k(a,b){a=a&&(null!=a.wkid||null!=a.wkt?a:a.spatialReference);b=b&&(null!=b.wkid||null!=b.wkt?b:b.spatialReference);return a&&b?b.equals(a)?!0:b.isWebMercator&&a.isWGS84||a.isWebMercator&&b.isWGS84:!1}function l(a,b,f,e){void 0===f&&(f=[0,0]);void 0===e&&(e=0);89.99999<b?b=89.99999:-89.99999>b&&(b=-89.99999);b*=.017453292519943;f[e]=111319.49079327169*a;f[e+1]=3189068.5*Math.log((1+
Math.sin(b))/(1-Math.sin(b)));return f}function q(a,b,f,e,g){void 0===f&&(f=[0,0]);void 0===e&&(e=0);void 0===g&&(g=!1);a=a/6378137*57.29577951308232;f[e]=g?a:a-360*Math.floor((a+180)/360);f[e+1]=57.29577951308232*(1.5707963267948966-2*Math.atan(Math.exp(-1*b/6378137)));return f}Object.defineProperty(h,"__esModule",{value:!0});var g=[0,0];h.canProject=k;h.project=function(a,b){var c=a&&a.spatialReference;b=b&&(null!=b.wkid||null!=b.wkt?b:b.spatialReference);return k(c,b)?c.equals(b)?a.clone():b.isWebMercator?
e(a,l,n.WebMercator,!1,a.clone()):b.isWGS84?e(a,q,n.WGS84,!1,a.clone()):null:null};h.lngLatToXY=l;h.xyToLngLat=q;h.geographicToWebMercator=function(a,b,f){void 0===b&&(b=!1);void 0===f&&(f=a.clone());return e(a,l,n.WebMercator,b,f)};h.webMercatorToGeographic=function(a,b,f){void 0===b&&(b=!1);void 0===f&&(f=a.clone());return e(a,q,n.WGS84,b,f)}})},"esri/geometry/support/coordsUtils":function(){define(["require","exports"],function(a,h){function n(a,c){var b=c[0]-a[0],f=c[1]-a[1];return 2<a.length&&
2<c.length?(a=a[2]-c[2],Math.sqrt(b*b+f*f+a*a)):Math.sqrt(b*b+f*f)}function e(a,c,e){var b=a[0]+e*(c[0]-a[0]),f=a[1]+e*(c[1]-a[1]);return 2<a.length&&2<c.length?[b,f,a[2]+e*(c[2]-a[2])]:[b,f]}function k(a,c){return e(a,c,.5)}function l(a,c,e){var b=e[0];e=e[1];for(var f=0,g=0,k=c.length;g<k;g++){f++;f===k&&(f=0);var l=c[g],p=l[0],l=l[1],d=c[f],m=d[0],d=d[1];(l<e&&d>=e||d<e&&l>=e)&&p+(e-l)/(d-l)*(m-p)<b&&(a=!a)}return a}function q(a,c,e,g){for(var b=0,f=0,k=0,l=0,p=0,d=0,m=c.length-1;d<m;d++){var y=
c[d],h=y[0],q=y[1],r=y[2],n=c[d+1],v=n[0],E=n[1],K=n[2],R=h*E-v*q,l=l+R,b=b+(h+v)*R,f=f+(q+E)*R;e&&2<y.length&&2<n.length&&(R=h*K-v*r,k+=(r+K)*R,p+=R);h<g[0]&&(g[0]=h);h>g[1]&&(g[1]=h);q<g[2]&&(g[2]=q);q>g[3]&&(g[3]=q);e&&(r<g[4]&&(g[4]=r),r>g[5]&&(g[5]=r))}0<l&&(l*=-1);0<p&&(p*=-1);l?(a[0]=b,a[1]=f,a[2]=.5*l,e?(a[3]=k,a[4]=.5*p):a.length=3):a.length=0;return a}function g(a,c){for(var b=c?[0,0,0]:[0,0],f=c?[0,0,0]:[0,0],e=0,g=0,l=0,h=0,p=0,d=a.length;p<d-1;p++){var m=a[p],y=a[p+1];m&&y&&(b[0]=m[0],
b[1]=m[1],f[0]=y[0],f[1]=y[1],c&&2<m.length&&2<y.length&&(b[2]=m[2],f[2]=y[2]),length=n(b,f))&&(e+=length,m=k(m,y),g+=length*m[0],l+=length*m[1],c&&2<m.length&&(h+=length*m[2]))}return 0<e?c?[g/e,l/e,h/e]:[g/e,l/e]:a.length?a[0]:null}function c(a,c){var b=a[0],f=b[0],b=b[1],e=a[1];a=e[0];var e=e[1],g=c[0],k=g[0],l=g[1],p=c[1];c=p[0]-k;var k=f-k,g=a-f,p=p[1]-l,l=b-l,d=e-b,m=p*g-c*d;if(0===m)return null;c=(c*l-p*k)/m;k=(g*l-d*k)/m;return 0<=c&&1>=c&&0<=k&&1>=k?[f+c*(a-f),b+c*(e-b)]:null}Object.defineProperty(h,
"__esModule",{value:!0});h.geometryToCoordinates=function(a){if(!a)return null;if(Array.isArray(a))return a;var b=a.hasZ,c=a.hasM;if("point"===a.type)return c&&b?[a.x,a.y,a.z,a.m]:b?[a.x,a.y,a.z]:c?[a.x,a.y,a.m]:[a.x,a.y];if("polygon"===a.type)return a.rings.slice(0);if("polyline"===a.type)return a.paths.slice(0);if("multipoint"===a.type)return a.points.slice(0);if("extent"===a.type){a=a.clone().normalize();if(!a)return null;var e=!1,g=!1;a.forEach(function(a){a.hasZ&&(e=!0);a.hasM&&(g=!0)});return a.map(function(a){var b=
[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]];if(e&&a.hasZ)for(var c=.5*(a.zmax-a.zmin),f=0;f<b.length;f++)b[f].push(c);if(g&&a.hasM)for(a=.5*(a.mmax-a.mmin),f=0;f<b.length;f++)b[f].push(a);return b})}return null};h.getLength=n;h.getMidpoint=k;h.contains=function(a,c){if(!a)return!1;if(!Array.isArray(a[0][0]))return l(!1,a,c);for(var b=!1,f=0,e=a.length;f<e;f++)b=l(b,a[f],c);return b};h.getPathLength=function(a){for(var b=a.length,c=0,e=0;e<b-1;++e)c+=n(a[e],a[e+
1]);return c};h.getPointOnPath=function(a,c){if(0>=c)return a[0];for(var b=a.length,f=0,g=0;g<b-1;++g){var k=n(a[g],a[g+1]);if(c-f<k)return e(a[g],a[g+1],(c-f)/k);f+=k}return a[b-1]};h.isClockwise=function(a,c,e){for(var b=a.length,f=0,g=0,k=0,l=0;l<b;l++){var p=a[l],d=a[(l+1)%b],m=2,f=f+(p[0]*d[1]-d[0]*p[1]);2<p.length&&2<d.length&&e&&(g+=p[0]*d[2]-d[0]*p[2],m=3);p.length>m&&d.length>m&&c&&(k+=p[0]*d[m]-d[0]*p[m])}return 0>=f&&0>=g&&0>=k};h.isSelfIntersecting=function(a){for(var b=0;b<a.length;b++){for(var e=
a[b],g=0;g<e.length-1;g++)for(var k=[[e[g][0],e[g][1]],[e[g+1][0],e[g+1][1]]],l=b+1;l<a.length;l++)for(var h=0;h<a[l].length-1;h++){var q=[[a[l][h][0],a[l][h][1]],[a[l][h+1][0],a[l][h+1][1]]],p=c(k,q);if(p&&!(p[0]===k[0][0]&&p[1]===k[0][1]||p[0]===q[0][0]&&p[1]===q[0][1]||p[0]===k[1][0]&&p[1]===k[1][1]||p[0]===q[1][0]&&p[1]===q[1][1]))return!0}h=e.length;if(!(4>=h))for(g=0;g<h-3;g++){var d=h-1;0===g&&(d=h-2);k=[[e[g][0],e[g][1]],[e[g+1][0],e[g+1][1]]];for(l=g+2;l<d;l++)if(q=[[e[l][0],e[l][1]],[e[l+
1][0],e[l+1][1]]],(p=c(k,q))&&!(p[0]===k[0][0]&&p[1]===k[0][1]||p[0]===q[0][0]&&p[1]===q[0][1]||p[0]===k[1][0]&&p[1]===k[1][1]||p[0]===q[1][0]&&p[1]===q[1][1]))return!0}}return!1};h.ringsCentroid=function(a,c,e){var b=[],f;a.length=0;for(var k=e?[Infinity,-Infinity,Infinity,-Infinity,Infinity,-Infinity]:[Infinity,-Infinity,Infinity,-Infinity],l=0,h=c.length;l<h;l++)f=q([],c[l],e,k),f.length&&b.push(f);b.sort(function(a,d){var b=a[2]-d[2];0===b&&e&&(b=a[4]-d[4]);return b});b.length&&(f=6*b[0][2],a[0]=
b[0][0]/f,a[1]=b[0][1]/f,e&&(f=6*b[0][4],a[2]=0!==f?b[0][3]/f:0),a[0]<k[0]||a[0]>k[1]||a[1]<k[2]||a[1]>k[3]||e&&(a[2]<k[4]||a[2]>k[5]))&&(a.length=0);!a.length&&(c=c[0]&&c[0].length?g(c[0],e):null)&&(a[0]=c[0],a[1]=c[1],e&&2<c.length&&(a[2]=c[2]));return a};h._getLineIntersection2=c})},"esri/portal/PortalQueryParams":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor ../core/kebabDictionary ../geometry/Extent ../geometry/support/webMercatorUtils ../geometry/SpatialReference dojo/_base/lang".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f){var r=q({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});return function(a){function l(b){b=a.call(this)||this;b.disableExtraQuery=!1;b.extent=null;b.num=10;b.query=null;b.sortField=null;b.start=1;return b}n(l,a);h=l;Object.defineProperty(l.prototype,"sortOrder",{get:function(){return this._get("sortOrder")||"asc"},set:function(a){"asc"!==a&&"desc"!==a||this._set("sortOrder",a)},enumerable:!0,configurable:!0});l.prototype.clone=
function(){return new h({disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})};l.prototype.toRequestOptions=function(a,e){var p;if(this.extent){var d=c.project(this.extent,b.WGS84);d&&(p=d.xmin+","+d.ymin+","+d.xmax+","+d.ymax)}d=this.query;!this.disableExtraQuery&&a.extraQuery&&(d="("+d+")"+a.extraQuery);a={bbox:p,q:d,num:this.num,sortField:null,sortOrder:null,start:this.start};
this.sortField&&(a.sortField=r.toJSON(this.sortField),a.sortOrder=this.sortOrder);return{query:f.mixin(e,a)}};e([k.property()],l.prototype,"disableExtraQuery",void 0);e([k.property({type:g})],l.prototype,"extent",void 0);e([k.property()],l.prototype,"num",void 0);e([k.property()],l.prototype,"query",void 0);e([k.property()],l.prototype,"sortField",void 0);e([k.property()],l.prototype,"sortOrder",null);e([k.property()],l.prototype,"start",void 0);return l=h=e([k.subclass("esri.portal.PortalQueryParams")],
l);var h}(k.declared(l))})},"esri/core/kebabDictionary":function(){define(["require","exports"],function(a,h){return function(a,e){void 0===e&&(e={});var k=e.ignoreUnknown||!1,l={},h;for(h in a)l[a[h]]=h;var g=function(a){return l.hasOwnProperty(a)?l[a]:k?void 0:a},c=function(b){return a.hasOwnProperty(b)?a[b]:k?void 0:b};return{toJSON:g,fromJSON:c,read:function(a){return c(a)},write:function(a,c,e){a=g(a);void 0!==a&&(c[e]=a)}}}})},"esri/portal/PortalQueryResult":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor".split(" "),
function(a,h,n,e,k,l){return function(a){function g(c){c=a.call(this)||this;c.nextQueryParams=null;c.queryParams=null;c.results=null;c.total=null;return c}n(g,a);e([k.property()],g.prototype,"nextQueryParams",void 0);e([k.property()],g.prototype,"queryParams",void 0);e([k.property()],g.prototype,"results",void 0);e([k.property()],g.prototype,"total",void 0);return g=e([k.subclass("esri.portal.PortalQueryResult")],g)}(k.declared(l))})},"esri/portal/PortalUser":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Error ../core/JSONSupport ./PortalFolder ./PortalGroup ../core/promiseUtils ../core/requireUtils dojo/promise/all".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r){return function(h){function q(){var a=h.call(this)||this;a.access=null;a.created=null;a.culture=null;a.description=null;a.email=null;a.fullName=null;a.modified=null;a.orgId=null;a.portal=null;a.preferredView=null;a.privileges=null;a.region=null;a.role=null;a.roleId=null;a.units=null;a.username=null;a.userType=null;return a}n(q,h);Object.defineProperty(q.prototype,"thumbnailUrl",{get:function(){var a=this.url,b=this.thumbnail;return a&&b?this.portal._normalizeUrl(a+
"/info/"+b+"?f\x3djson"):null},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"userContentUrl",{get:function(){var a=this.get("portal.restUrl");return a?a+"/content/users/"+this.username:null},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"url",{get:function(){var a=this.get("portal.restUrl");return a?a+"/community/users/"+this.username:null},enumerable:!0,configurable:!0});q.prototype.addItem=function(a){var b=this,c=a&&a.item,f=a&&a.data;a=a&&a.folder;var d=
{method:"post"};c&&(d.query=c._getPostQuery(),null!=f&&("string"===typeof f?d.query.text=f:"object"===typeof f&&(d.query.text=JSON.stringify(f))));f=this.userContentUrl;a&&(f+="/"+a.id);return this.portal._request(f+"/addItem",d).then(function(a){c.id=a.id;c.portal=b.portal;return c.loaded?c._reload():c.load()})};q.prototype.deleteItem=function(a){var b=this.userContentUrl;a.ownerFolder&&(b+="/"+a.ownerFolder);return this.portal._request(b+("/items/"+a.id+"/delete"),{method:"post"}).then(function(){a.id=
null;a.portal=null})};q.prototype.fetchFolders=function(){var a=this;return this.portal._request(this.userContentUrl,{query:{num:1}}).then(function(b){return b&&b.folders?b.folders.map(function(b){b=g.fromJSON(b);b.portal=a.portal;return b}):[]})};q.prototype.fetchGroups=function(){var a=this;return this.portal._request(this.url).then(function(b){return b&&b.groups?b.groups.map(function(b){b=c.fromJSON(b);b.portal=a.portal;return b}):[]})};q.prototype.fetchItems=function(b){var c=this;b||(b={});var e=
this.userContentUrl;b.folder&&(e+="/"+b.folder.id);var p;return f.when(a,"./PortalItem").then(function(a){p=a;return c.portal._request(e,{query:{folders:!1,num:b.num||10,start:b.start||1}})}).then(function(a){var d;return a&&a.items?(d=a.items.map(function(a){a=p.fromJSON(a);a.portal=c.portal;return a}),r(d.map(function(a){return a.load()})).always(function(){return{items:d,nextStart:a.nextStart,total:a.total}})):{items:[],nextStart:-1,total:0}})};q.prototype.getThumbnailUrl=function(a){var b=this.thumbnailUrl;
b&&a&&(b+="\x26w\x3d"+a);return b};q.prototype.queryFavorites=function(a){return this.favGroupId?(this._favGroup||(this._favGroup=new c({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(a)):b.reject(new l("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))};q.prototype.toJSON=function(){throw new l("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented");};e([k.property()],q.prototype,"access",void 0);e([k.property({type:Date})],
q.prototype,"created",void 0);e([k.property()],q.prototype,"culture",void 0);e([k.property()],q.prototype,"description",void 0);e([k.property()],q.prototype,"email",void 0);e([k.property()],q.prototype,"favGroupId",void 0);e([k.property()],q.prototype,"fullName",void 0);e([k.property({type:Date})],q.prototype,"modified",void 0);e([k.property()],q.prototype,"orgId",void 0);e([k.property()],q.prototype,"portal",void 0);e([k.property()],q.prototype,"preferredView",void 0);e([k.property()],q.prototype,
"privileges",void 0);e([k.property()],q.prototype,"region",void 0);e([k.property()],q.prototype,"role",void 0);e([k.property()],q.prototype,"roleId",void 0);e([k.property()],q.prototype,"thumbnail",void 0);e([k.property({dependsOn:["url","thumbnail","portal.credential.token"],readOnly:!0})],q.prototype,"thumbnailUrl",null);e([k.property()],q.prototype,"units",void 0);e([k.property({dependsOn:["portal.restUrl"],readOnly:!0})],q.prototype,"userContentUrl",null);e([k.property({dependsOn:["portal.restUrl"],
readOnly:!0})],q.prototype,"url",null);e([k.property()],q.prototype,"username",void 0);e([k.property()],q.prototype,"userType",void 0);return q=e([k.subclass("esri.portal.PortalUser")],q)}(k.declared(q))})},"esri/portal/PortalFolder":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Error ../core/JSONSupport".split(" "),function(a,h,n,e,k,l,q){return function(a){function c(b){b=a.call(this)||this;b.created=
null;b.id=null;b.portal=null;b.title=null;b.username=null;return b}n(c,a);Object.defineProperty(c.prototype,"url",{get:function(){var a=this.get("portal.restUrl");return a?a+"/content/users/"+this.username+"/"+this.id:null},enumerable:!0,configurable:!0});c.prototype.toJSON=function(){throw new l("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented");};e([k.property({type:Date})],c.prototype,"created",void 0);e([k.property()],c.prototype,"id",void 0);e([k.property()],c.prototype,
"portal",void 0);e([k.property()],c.prototype,"title",void 0);e([k.property({dependsOn:["portal.restUrl"],readOnly:!0})],c.prototype,"url",null);e([k.property()],c.prototype,"username",void 0);return c=e([k.subclass("esri.portal.PortalFolder")],c)}(k.declared(q))})},"esri/portal/PortalGroup":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/accessorSupport/decorators ../core/Error ../core/JSONSupport ./PortalQueryParams".split(" "),
function(a,h,n,e,k,l,q,g,c){return function(a){function b(b){b=a.call(this)||this;b.access=null;b.created=null;b.description=null;b.id=null;b.isInvitationOnly=!1;b.modified=null;b.owner=null;b.portal=null;b.snippet=null;b.sortField=null;b.sortOrder=null;b.tags=null;b.title=null;return b}n(b,a);Object.defineProperty(b.prototype,"thumbnailUrl",{get:function(){var a=this.url,b=this.thumbnail;return a&&b?this.portal._normalizeUrl(a+"/info/"+b+"?f\x3djson"):null},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,
"url",{get:function(){var a=this.get("portal.restUrl");return a?a+"/community/groups/"+this.id:null},enumerable:!0,configurable:!0});b.prototype.fetchMembers=function(){return this.portal._request(this.url+"/users")};b.prototype.getThumbnailUrl=function(a){var b=this.thumbnailUrl;b&&a&&(b+="\x26w\x3d"+a);return b};b.prototype.toJSON=function(){throw new q("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented");};b.prototype.queryItems=function(a){a=a?a.clone():new c;a.query="group:"+
this.id+(a.query?" "+a.query:"");return this.portal.queryItems(a)};e([l.property()],b.prototype,"access",void 0);e([l.property({type:Date})],b.prototype,"created",void 0);e([l.property()],b.prototype,"description",void 0);e([l.property()],b.prototype,"id",void 0);e([l.property()],b.prototype,"isInvitationOnly",void 0);e([l.property({type:Date})],b.prototype,"modified",void 0);e([l.property()],b.prototype,"owner",void 0);e([l.property()],b.prototype,"portal",void 0);e([l.property()],b.prototype,"snippet",
void 0);e([l.property()],b.prototype,"sortField",void 0);e([l.property()],b.prototype,"sortOrder",void 0);e([l.property()],b.prototype,"tags",void 0);e([l.property()],b.prototype,"thumbnail",void 0);e([l.property({dependsOn:["url","thumbnail","portal.credential.token"],readOnly:!0})],b.prototype,"thumbnailUrl",null);e([l.property()],b.prototype,"title",void 0);e([l.property({dependsOn:["portal.restUrl"],readOnly:!0})],b.prototype,"url",null);e([k(0,l.cast(c))],b.prototype,"queryItems",null);return b=
e([l.subclass("esri.portal.PortalGroup")],b)}(l.declared(g))})},"esri/portal/PortalItem":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Error ../core/lang ../geometry/Extent ../core/JSONSupport ../core/Loadable ./Portal ./PortalRating ../core/promiseUtils ../core/urlUtils".split(" "),function(a,h,n,e,k,l,q,g,c,b,f,r,v,x){return function(b){function c(a){a=b.call(this)||this;a.access=null;a.accessInformation=
null;a.appProxies=null;a.avgRating=null;a.created=null;a.culture=null;a.description=null;a.extent=null;a.id=null;a.itemControl=null;a.licenseInfo=null;a.modified=null;a.name=null;a.numComments=null;a.numRatings=null;a.numViews=null;a.owner=null;a.portal=null;a.size=null;a.snippet=null;a.tags=null;a.title=null;a.type=null;a.typeKeywords=null;a.url=null;return a}n(c,b);h=c;Object.defineProperty(c.prototype,"displayName",{get:function(){var a=this.type,d=this.typeKeywords||[],b=a;"Feature Service"===
a||"Feature Collection"===a?b=-1<d.indexOf("Table")?"Table":-1<d.indexOf("Route Layer")?"Route Layer":-1<d.indexOf("Markup")?"Markup":"Feature Layer":"Image Service"===a?b=-1<d.indexOf("Elevation 3D Layer")?"Elevation Layer":"Imagery Layer":"Scene Service"===a?b="Scene Layer":"Scene Package"===a?b="Scene Layer Package":"Stream Service"===a?b="Feature Layer":"Geoprocessing Service"===a&&this.portal&&this.portal.isPortal?b=-1<d.indexOf("Web Tool")?"Tool":"Geoprocessing Service":"Geocoding Service"===
a?b="Locator":"Microsoft Powerpoint"===a?b="Microsoft PowerPoint":"GeoJson"===a?b="GeoJSON":"Globe Service"===a?b="Globe Layer":"Vector Tile Service"===a?b="Tile Layer":"netCDF"===a?b="NetCDF":"Map Service"===a?b=-1===d.indexOf("Spatiotemporal")&&(-1<d.indexOf("Hosted Service")||-1<d.indexOf("Tiled"))?"Tile Layer":"Map Image Layer":a&&-1<a.toLowerCase().indexOf("add in")?b=a.replace(/(add in)/ig,"Add-In"):"datastore catalog service"===a&&(b="Big Data File Share");return b},enumerable:!0,configurable:!0});
c.prototype.readExtent=function(a){return a&&a.length?new g(a[0][0],a[0][1],a[1][0],a[1][1]):null};Object.defineProperty(c.prototype,"iconUrl",{get:function(){var b=this.type&&this.type.toLowerCase()||"",d=this.typeKeywords||[],m=!1,c=!1,f=!1,e=!1;0<b.indexOf("service")||"feature collection"===b||"kml"===b||"wms"===b||"wmts"===b||"wfs"===b?(m=-1<d.indexOf("Hosted Service"),"feature service"===b||"feature collection"===b||"kml"===b||"wfs"===b?(c=-1<d.indexOf("Table"),f=-1<d.indexOf("Route Layer"),
e=-1<d.indexOf("Markup"),b=c?"table":f?"routelayer":e?"markup":m?"featureshosted":"features"):b="map service"===b||"wms"===b||"wmts"===b?m||-1<d.indexOf("Tiled")||"wmts"===b?"maptiles":"mapimages":"scene service"===b?-1<d.indexOf("Line")?"sceneweblayerline":-1<d.indexOf("3DObject")?"sceneweblayermultipatch":-1<d.indexOf("Point")?"sceneweblayerpoint":-1<d.indexOf("IntegratedMesh")?"sceneweblayermesh":-1<d.indexOf("PointCloud")?"sceneweblayerpointcloud":-1<d.indexOf("Polygon")?"sceneweblayerpolygon":
"sceneweblayer":"image service"===b?-1<d.indexOf("Elevation 3D Layer")?"elevationlayer":"imagery":"stream service"===b?"streamlayer":"vector tile service"===b?"vectortile":"datastore catalog service"===b?"datastorecollection":"geocoding service"===b?"geocodeservice":"geoprocessing service"===b?-1<d.indexOf("Web Tool")&&this.portal&&this.portal.isPortal?"tool":"layers":"layers"):b="web map"===b||"cityengine web scene"===b?"maps":"web scene"===b?-1<d.indexOf("ViewingMode-Local")?"webscenelocal":"websceneglobal":
"web mapping application"===b||"mobile application"===b||"application"===b||"operation view"===b||"desktop application"===b?"apps":"map document"===b||"map package"===b||"published map"===b||"scene document"===b||"globe document"===b||"basemap package"===b||"mobile basemap package"===b||"mobile map package"===b||"project package"===b||"project template"===b||"pro map"===b||"layout"===b||"layer"===b&&-1<d.indexOf("ArcGIS Pro")||"explorer map"===b&&d.indexOf("Explorer Document")?"mapsgray":"service definition"===
b||"csv"===b||"shapefile"===b||"cad drawing"===b||"geojson"===b||"360 vr experience"===b||"netCDF"===b?"datafiles":"explorer add in"===b||"desktop add in"===b||"windows viewer add in"===b||"windows viewer configuration"===b?"appsgray":"arcgis pro add in"===b||"arcgis pro configuration"===b?"addindesktop":"rule package"===b||"file geodatabase"===b||"csv collection"===b||"kml collection"===b||"windows mobile package"===b||"map template"===b||"desktop application template"===b||"arcpad package"===b||
"code sample"===b||"form"===b||"document link"===b||"vector tile package"===b||"operations dashboard add in"===b||"rules package"===b||"image"===b||"workflow manager package"===b||"explorer map"===b&&-1<d.indexOf("Explorer Mapping Application")||-1<d.indexOf("Document")?"datafilesgray":"network analysis service"===b||"geoprocessing service"===b||"geodata service"===b||"geometry service"===b||"geoprocessing package"===b||"locator package"===b||"geoprocessing sample"===b||"workflow manager service"===
b?"toolsgray":"layer"===b||"layer package"===b||"explorer layer"===b?"layersgray":"scene package"===b?"scenepackage":"tile package"===b?"tilepackage":"task file"===b?"taskfile":"report template"===b?"report-template":"statistical data collection"===b?"statisticaldatacollection":"insights workbook"===b?"workbook":"insights model"===b?"insightsmodel":"insights page"===b?"insightspage":"hub initiative"===b?"hubinitiative":"hubpage"===b?"hubpage":"hub site application"===b?"hubsite":"relational database connection"===
b?"relationaldatabaseconnection":"big data file share"===b?"datastorecollection":"image collection"===b?"imagecollection":"style"===b?"style":"desktop style"===b?"desktopstyle":"dashboard"===b?"dashboard":"raster function template"===b?"rasterprocessingtemplate":"maps";return b?a.toUrl("../images/portal/"+b+"16.png"):null},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"isLayer",{get:function(){return-1<"Map Service;Feature Service;Feature Collection;Scene Service;Image Service;Stream Service;Vector Tile Service;WMTS;WMS".split(";").indexOf(this.type)},
enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"itemUrl",{get:function(){var a=this.get("portal.restUrl");return a?a+"/content/items/"+this.id:null},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"thumbnailUrl",{get:function(){var a=this.itemUrl,d=this.thumbnail;return a&&d?this.portal._normalizeUrl(a+"/info/"+d+"?f\x3djson"):null},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"userItemUrl",{get:function(){var a=this.get("portal.restUrl");
if(!a)return null;var d=this.owner||this.get("portal.user.username");return d?a+"/content/users/"+(this.ownerFolder?d+"/"+this.ownerFolder:d)+"/items/"+this.id:null},enumerable:!0,configurable:!0});c.prototype.load=function(){var a=this;this.portal||(this.portal=f.getDefault());var d=this.portal.load().then(function(){return a.resourceInfo?a.resourceInfo:a.id&&a.itemUrl?a.portal._request(a.itemUrl):{}}).then(function(d){a.resourceInfo=d;a.read(d)});this.addResolvingPromise(d);return this.when()};
c.prototype.addRating=function(a){var d={method:"post",query:{}};a instanceof r&&(a=a.rating);isNaN(a)||"number"!==typeof a||(d.query.rating=a);return this.portal._request(this.itemUrl+"/addRating",d).then(function(){return new r({rating:a,created:new Date})})};c.prototype.deleteRating=function(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then(function(){})};c.prototype.fetchData=function(a){void 0===a&&(a="json");return this.portal._request(this.itemUrl+"/data",{responseType:a})};
c.prototype.fetchRating=function(){return this.portal._request(this.itemUrl+"/rating").then(function(a){return null!=a.rating?(a.created=new Date(a.created),new r(a)):null})};c.prototype.fetchRelatedItems=function(a){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",{query:a},"PortalItem")};c.prototype.getThumbnailUrl=function(a){var d=this.thumbnailUrl;d&&a&&(d+="\x26w\x3d"+a);return d};c.prototype.update=function(a){var d=this;return this.id?this.load().then(function(){return d.portal._signIn()}).then(function(){var b=
a&&a.data,c={method:"post"};c.query=d._getPostQuery();for(var f in c.query)null===c.query[f]&&(c.query[f]="");c.query.clearEmptyFields=!0;null!=b&&("string"===typeof b?c.query.text=b:"object"===typeof b&&(c.query.text=JSON.stringify(b)));return d.portal._request(d.userItemUrl+"/update",c).then(function(){return d._reload()})}):v.reject(new l("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))};c.prototype.updateThumbnail=function(a){var d=this;return this.id?this.load().then(function(){return d.portal._signIn()}).then(function(){var b=
a.thumbnail,c={method:"post"};if("string"===typeof b)x.isDataProtocol(b)?c.query={data:b}:c.query={url:x.makeAbsolute(b)};else{var f=new FormData;f.append("file",b);c.body=f}return d.portal._request(d.userItemUrl+"/updateThumbnail",c).then(function(){return d._reload()})}):v.reject(new l("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))};c.prototype.toJSON=function(){var a=this.extent,a={created:this.created&&this.created.getTime(),description:this.description,extent:a&&
[[a.xmin,a.ymin],[a.xmax,a.ymax]],id:this.id,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};return q.fixJson(a)};c.fromJSON=function(a){if(!a)return null;if(a.declaredClass)throw Error("JSON object is already hydrated");return new h({resourceInfo:a})};c.prototype._reload=function(){var a=this;return this.portal._request(this.itemUrl,
{query:{_ts:(new Date).getTime()}}).then(function(d){a.resourceInfo=d;a.read(d);return a})};c.prototype._getPostQuery=function(){var a=this.toJSON(),d;for(d in a)"tags"===d&&null!==a[d]&&(a[d]=a[d].join(", ")),"typeKeywords"===d&&null!==a[d]&&(a[d]=a[d].join(", "));return a};e([k.property()],c.prototype,"access",void 0);e([k.property()],c.prototype,"accessInformation",void 0);e([k.property()],c.prototype,"appProxies",void 0);e([k.property()],c.prototype,"avgRating",void 0);e([k.property({type:Date})],
c.prototype,"created",void 0);e([k.property()],c.prototype,"culture",void 0);e([k.property()],c.prototype,"description",void 0);e([k.property({dependsOn:["type","typeKeywords"],readOnly:!0})],c.prototype,"displayName",null);e([k.property({type:g})],c.prototype,"extent",void 0);e([k.reader("extent")],c.prototype,"readExtent",null);e([k.property({dependsOn:["type","typeKeywords"],readOnly:!0})],c.prototype,"iconUrl",null);e([k.property()],c.prototype,"id",void 0);e([k.property({dependsOn:["type"],readOnly:!0})],
c.prototype,"isLayer",null);e([k.property()],c.prototype,"itemControl",void 0);e([k.property({dependsOn:["portal.restUrl","id"],readOnly:!0})],c.prototype,"itemUrl",null);e([k.property()],c.prototype,"licenseInfo",void 0);e([k.property({type:Date})],c.prototype,"modified",void 0);e([k.property()],c.prototype,"name",void 0);e([k.property()],c.prototype,"numComments",void 0);e([k.property()],c.prototype,"numRatings",void 0);e([k.property()],c.prototype,"numViews",void 0);e([k.property()],c.prototype,
"owner",void 0);e([k.property()],c.prototype,"ownerFolder",void 0);e([k.property({type:f})],c.prototype,"portal",void 0);e([k.property()],c.prototype,"resourceInfo",void 0);e([k.property()],c.prototype,"size",void 0);e([k.property()],c.prototype,"snippet",void 0);e([k.property()],c.prototype,"tags",void 0);e([k.property()],c.prototype,"thumbnail",void 0);e([k.property({dependsOn:["itemUrl","thumbnail","portal.credential.token"],readOnly:!0})],c.prototype,"thumbnailUrl",null);e([k.property()],c.prototype,
"title",void 0);e([k.property()],c.prototype,"type",void 0);e([k.property()],c.prototype,"typeKeywords",void 0);e([k.property()],c.prototype,"url",void 0);e([k.property({dependsOn:["portal.restUrl","portal.user.username","owner","ownerFolder","id"],readOnly:!0})],c.prototype,"userItemUrl",null);return c=h=e([k.subclass("esri.portal.PortalItem")],c);var h}(k.declared(c,b))})},"esri/portal/PortalRating":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor".split(" "),
function(a,h,n,e,k,l){return function(a){function g(c){c=a.call(this)||this;c.created=null;c.rating=null;return c}n(g,a);e([k.property()],g.prototype,"created",void 0);e([k.property()],g.prototype,"rating",void 0);return g=e([k.subclass("esri.portal.PortalRating")],g)}(k.declared(l))})},"esri/layers/Layer":function(){define("require dojo/Deferred ../core/Accessor ../core/Error ../core/Evented ../core/Identifiable ../core/Loadable ../core/urlUtils ../core/requireUtils ../core/promiseUtils ../core/Logger ../config ../kernel ../request ../geometry/SpatialReference ../geometry/Extent".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t){var u=0,p=f.getLogger("esri.layers.Layer");n=n.createSubclass([k,l,q],{declaredClass:"esri.layers.Layer",properties:{attributionDataUrl:null,credential:{value:null,readOnly:!0,dependsOn:["loaded","parsedUrl"],get:function(){var a=this.loaded&&this.parsedUrl&&v.id&&v.id.findCredential(this.parsedUrl.path)||null;a&&a.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));return a}},fullExtent:new t(-180,-90,180,90,w.WGS84),hasAttributionData:{readOnly:!0,dependsOn:["attributionDataUrl"],
get:function(){return null!=this.attributionDataUrl}},id:{get:function(){return Date.now().toString(16)+"-layer-"+u++}},legendEnabled:!0,listMode:"show",opacity:{value:1,type:Number,cast:function(a){return 0>a?0:1<a?1:a}},parsedUrl:{readOnly:!0,dependsOn:["url"],get:function(){var a=this._get("url");return a?g.urlToObject(a):null}},popupEnabled:!0,attributionVisible:!0,spatialReference:w.WGS84,title:null,token:{dependsOn:["credential.token"],get:function(){var a=this.get("parsedUrl.query.token"),
b=this.get("credential.token");return a||b||null},set:function(a){a?this._override("token",a):this._clearOverride("token")}},type:{type:String,readOnly:!0,value:null,json:{read:!1}},url:{value:null},visible:!0},initialize:function(){this.when().catch(function(a){f.getLogger(this.declaredClass).error("#load()","Failed to load layer (title: '"+this.title+"', id: '"+this.id+"')",a)}.bind(this))},createLayerView:function(d){var m=this.viewModulePaths[d.type];return m?c.when(a,m).then(function(a){a.default&&
(a=a.default);return new a({layer:this,view:d})}.bind(this)):b.reject(new e("layerview:module-unavailable","No LayerView module available for layer '${layer.declaredClass}' and view type: '${view.type}'",{view:d,layer:this}))},destroyLayerView:function(a){a.destroy()},fetchAttributionData:function(){var a=this.attributionDataUrl;this.hasAttributionData&&a?a=x(a,{query:{f:"json"},responseType:"json"}).then(function(a){return a.data}):(a=new h,a.reject(new e("layer:no-attribution-data","Layer does not have attribution data")),
a=a.promise);return a},refresh:function(){this.emit("refresh")}});n.fromArcGISServerUrl=function(d){"string"===typeof d&&(d={url:d});var b=c.when(a,"./support/arcgisLayers").then(function(a){return a.fromUrl(d)});b.otherwise(function(a){p.error("#fromArcGISServerUrl({ url: '"+d.url+"'})","Failed to create layer from arcgis server url",a)});return b};n.fromPortalItem=function(d){!d||d.portalItem||"object"!==typeof d||d.declaredClass&&"esri.portal.PortalItem"!==d.declaredClass||(d={portalItem:d});var b=
c.when(a,"../portal/support/portalLayers").then(function(a){return a.fromItem(d)});b.otherwise(function(a){var b=d&&d.portalItem;p.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+(b&&b.portal&&b.portal.url||r.portalUrl)+"', id: '"+(b&&b.id||"unset")+"')",a)});return b};return n})},"esri/core/Identifiable":function(){define(["./declare"],function(a){var h=0;return a(null,{constructor:function(){Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+
"-object-"+h++})}})})},"esri/Ground":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/accessorSupport/decorators dojo/_base/lang ./core/JSONSupport ./core/Loadable ./core/Collection ./core/collectionUtils ./core/Logger ./core/requireUtils ./core/promiseUtils ./core/Error ./layers/Layer ./layers/support/types".split(" "),function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t){var u=c.ofType(w),p=f.getLogger("esri.Ground");return function(d){function m(a){a=
d.call(this)||this;a.layers=new u;a.layers.on("after-add",function(a){a=a.item;t.isOfType(a,["elevation","base-elevation"])||p.error("Layer '"+a.title+", id:"+a.id+"' of type '"+a.type+"' is not supported as a ground layer and will therefore be ignored. Only layers of type 'elevation' are supported.")});return a}n(m,d);c=m;m.prototype.initialize=function(){this.when().catch(function(a){p.error("#load()","Failed to load ground",a)});this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)};
m.prototype.normalizeCtorArgs=function(a){a&&"resourceInfo"in a&&(this._set("resourceInfo",a.resourceInfo),a=l.mixin({},a),delete a.resourceInfo);return a};Object.defineProperty(m.prototype,"layers",{set:function(a){this._set("layers",b.referenceSetter(a,this._get("layers"),u))},enumerable:!0,configurable:!0});m.prototype.writeLayers=function(a,d,b,m){var c=[];a&&(m=l.mixin({},m,{layerContainerType:"ground"}),a.forEach(function(a){if(a.write){var d={};a.write(d,m)&&c.push(d)}else m&&m.messages&&m.messages.push(new x("layer:unsupported",
"Layers ("+a.title+", "+a.id+") of type '"+a.declaredClass+"' cannot be persisted in the ground",{layer:a}))}));d.layers=c};m.prototype.load=function(){this.addResolvingPromise(this._loadFromSource());return this.when()};m.prototype.queryElevation=function(d,b){var m=this;return r.when(a,"./layers/support/ElevationQuery").then(function(a){a=new a.ElevationQuery;var c=m.layers.filter(function(a){return"elevation"===a.type}).toArray();return a.queryAll(c,d,b)})};m.prototype.clone=function(){var a={resourceInfo:this.resourceInfo,
layers:this.layers.slice()};this.loaded&&(a.loadStatus="loaded");return new c(a)};m.prototype.read=function(a,d){this.resourceInfo||this._set("resourceInfo",{data:a,context:d});return this.inherited(arguments)};m.prototype._loadFromSource=function(){var a=this.resourceInfo;return a?this._loadLayersFromJSON(a.data,a.context):v.resolve(null)};m.prototype._loadLayersFromJSON=function(d,b){var m=this,c=b&&b.origin||"web-scene",f=b&&b.portal||null,e=b&&b.url||null;return r.when(a,"./portal/support/layersCreator").then(function(a){var b=
[];d.layers&&Array.isArray(d.layers)&&b.push.apply(b,a.populateOperationalLayers(m.layers,d.layers,{context:{origin:c,url:e,portal:f,layerContainerType:"ground"},defaultLayerType:"ArcGISTiledElevationServiceLayer"}));return v.eachAlways(b)}).then(function(){})};e([k.property({type:u,json:{read:!1}}),k.cast(b.castForReferenceSetter)],m.prototype,"layers",null);e([k.writer("layers")],m.prototype,"writeLayers",null);e([k.property({readOnly:!0})],m.prototype,"resourceInfo",void 0);return m=c=e([k.subclass("esri.Ground")],
m);var c}(k.declared(q,g))})},"esri/layers/support/types":function(){define(["require","exports"],function(a,h){Object.defineProperty(h,"__esModule",{value:!0});h.isOfType=function(a,e){a=a.constructor._meta;if(!a||!a.bases)return!1;a=a.bases;var k=Array.isArray(e);return a.some(function(a){a=a.__accessorMetadata__;if(!a)return!1;a=a.properties;if(!a||!a.type||!a.type.value)return!1;a=a.type.value;return k?-1!==e.indexOf(a):a===e})}})},"esri/support/basemapUtils":function(){define("require exports ./basemapDefinitions ../core/accessorSupport/ensureType ../core/Collection ../core/urlUtils ../core/Logger ../Basemap".split(" "),
function(a,h,n,e,k,l,q,g){function c(a,b){var m;if("string"===typeof a){if(!(a in n))return b=Object.keys(n).map(function(a){return'"'+a+'"'}).join(", "),d.warn("Unable to find basemap definition for: "+a+". Try one of these: "+b),null;b&&(m=b[a]);m||(m=g.fromId(a),b&&(b[a]=m))}else m=e.default(g,a);return m}function b(a,d){return a.map(function(a){return d.find(function(d){var b=v(a);d=v(d);return b.type===d.type&&b.url===d.url})||a})}function f(a){return a?!a.loaded&&a.resourceInfo?x(a.resourceInfo.data):
{baseLayers:r(a.baseLayers),referenceLayers:r(a.referenceLayers)}:null}function r(a){return(k.isCollection(a)?a.toArray():a).map(v)}function v(a){return{type:a.type,url:p(a.urlTemplate||a.url||a.styleUrl)}}function x(a){return a?{baseLayers:w(a.baseMapLayers.filter(function(a){return!a.isReference})),referenceLayers:w(a.baseMapLayers.filter(function(a){return a.isReference}))}:null}function w(a){return a.map(function(a){var d;switch(a.layerType){case "VectorTileLayer":d="vector-tile";break;case "ArcGISTiledMapServiceLayer":d=
"tile";break;default:d="unknown"}return{type:d,url:p(a.templateUrl||a.urlTemplate||a.styleUrl||a.url)}})}function t(a,d,b){return null!=a!==(null!=d)?"not-equal":a?u(a.baseLayers,d.baseLayers)?u(a.referenceLayers,d.referenceLayers)?"equal":b.mustMatchReferences?"not-equal":"base-layers-equal":"not-equal":"equal"}function u(a,d){return a.length!==d.length?!1:!a.some(function(a){return!d.some(function(d){return a.type===d.type&&a.url===d.url})})}function p(a){return a?l.normalize(a).replace(/^\s*https?:/i,
"").toLowerCase():""}Object.defineProperty(h,"__esModule",{value:!0});var d=q.getLogger("esri.support.basemapUtils");h.createCache=function(){return{}};h.ensureType=c;h.clonePreservingTiledLayers=function(a,d){void 0===d&&(d=null);a=c(a);if(!a)return null;var m=new g({id:a.id,title:a.title,baseLayers:a.baseLayers.slice(),referenceLayers:a.referenceLayers.slice()});d&&(m.baseLayers=b(m.baseLayers,d.baseLayers),m.referenceLayers=b(m.referenceLayers,d.referenceLayers));m.load();m.portalItem=a.portalItem;
return m};h.getWellKnownBasemapId=function(a){var d=null;a=f(a);for(var b in n){var m=x(n[b]),m=t(a,m,{mustMatchReferences:!1});if("equal"===m){d=b;break}else"base-layers-equal"===m&&(d=b)}return d};h.contentEquals=function(a,d){if(a===d)return!0;a=f(a);d=f(d);return"equal"===t(a,d,{mustMatchReferences:!0})}})},"esri/support/groundUtils":function(){define("require exports ../core/accessorSupport/ensureType ../core/Logger ../Ground ../layers/ElevationLayer".split(" "),function(a,h,n,e,k,l){Object.defineProperty(h,
"__esModule",{value:!0});var q=e.getLogger("esri.support.groundUtils");h.groundElevationLayers={"world-elevation":{id:"worldElevation",url:"//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"}};h.ensureType=function(a){var c;"string"===typeof a?a in h.groundElevationLayers?(a=h.groundElevationLayers[a],a=new l({id:a.id,url:a.url}),c=new k({layers:[a]})):q.warn("Unable to find ground definition for: "+a+'. Try "world-elevation"'):c=n.default(k,a);return c}})},"esri/layers/ElevationLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators dojo/_base/lang dojo/_base/kernel ../request ../core/Error ../core/promiseUtils ../core/requireUtils ../core/urlUtils ../geometry/HeightModelInfo ./TiledLayer ./mixins/ArcGISMapService ./mixins/ArcGISCachedService ./mixins/OperationalLayer ./mixins/PortalLayer ./support/rasterFormats/LercCodec".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t,u,p,d){return function(m){function p(a){a=m.call(this)||this;a.heightModelInfo=null;a.type="elevation";a.url=null;a.opacity=1;a.operationalLayerType="ArcGISTiledElevationServiceLayer";return a}n(p,m);p.prototype.normalizeCtorArgs=function(a,d){return"string"===typeof a?l.mixin({},{url:a},d):a};Object.defineProperty(p.prototype,"minScale",{get:function(){},set:function(a){q.deprecated(this.declaredClass+".minScale support has been removed.","","4.5")},enumerable:!0,
configurable:!0});Object.defineProperty(p.prototype,"maxScale",{get:function(){},set:function(a){q.deprecated(this.declaredClass+".maxScale support has been removed.","","4.5")},enumerable:!0,configurable:!0});p.prototype.load=function(){var a=this;this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:function(a){for(var d=0;d<a.typeKeywords.length;d++)if("elevation 3d layer"===a.typeKeywords[d].toLowerCase())return!0;throw new c("portal:invalid-layer-item-type",
"Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"});}}).always(function(){return a._fetchImageService()}));return this.when()};p.prototype.fetchTile=function(a,b,m,c){var f=this;void 0===c&&(c=0);return this.load().then(function(){return f._fetchTileAvailability(a,b,m)}).then(function(){var d=f.getTileUrl(a,b,m);return g(d,{responseType:"array-buffer",failOk:!0})}).then(function(a){a=d.decode(a.data,{noDataValue:c,
returnFileInfo:!0});return{values:a.pixelData,width:a.width,height:a.height,maxZError:a.fileInfo.maxZError,noDataValue:a.noDataValue}})};p.prototype.queryElevation=function(d,b){var m=this;return f.when(a,"./support/ElevationQuery").then(function(a){return(new a.ElevationQuery).query(m,d,b)})};p.prototype._fetchTileAvailability=function(a,d,m){return this.tilemapCache?this.tilemapCache.fetchAvailability(a,d,m):b.resolve("unknown")};p.prototype._fetchImageService=function(){var a=this;return b.resolve().then(function(){if(a.resourceInfo)return a.resourceInfo;
var d={query:l.mixin({f:"json"},a.parsedUrl.query),responseType:"json",callbackParamName:"callback"};return g(a.parsedUrl.path,d)}).then(function(d){d.ssl&&(a.url=a.url.replace(/^http:/i,"https:"));a.read(d.data,{origin:"service",url:a.parsedUrl})})};e([k.shared({"3d":"../views/3d/layers/ElevationLayerView3D"})],p.prototype,"viewModulePaths",void 0);e([k.property({readOnly:!0,type:v})],p.prototype,"heightModelInfo",void 0);e([k.property({json:{read:!1,write:!1}})],p.prototype,"minScale",null);e([k.property({json:{read:!1,
write:!1}})],p.prototype,"maxScale",null);e([k.property()],p.prototype,"resourceInfo",void 0);e([k.property({json:{read:!1},value:"elevation",readOnly:!0})],p.prototype,"type",void 0);e([k.property({json:{origins:{"web-scene":{write:{isRequired:!0,writer:r.writeOperationalLayerUrl}}}}})],p.prototype,"url",void 0);e([k.property({json:{read:!1,write:!1}})],p.prototype,"opacity",void 0);e([k.property()],p.prototype,"operationalLayerType",void 0);return p=e([k.subclass("esri.layers.ElevationLayer")],
p)}(k.declared(x,w,t,u,p))})},"esri/geometry/HeightModelInfo":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/_base/lang ../core/JSONSupport ../core/kebabDictionary ../core/Warning ../core/accessorSupport/decorators ./support/scaleUtils".split(" "),function(a,h,n,e,k,l,q,g,c,b){function f(a,b){return new g("height-unit:unsupported","Height unit of value '"+a+"' is not supported",b)}function r(a,b){return new g("height-model:unsupported",
"Height model of value '"+a+"' is not supported",b)}var v=q({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"},{ignoreUnknown:!0}),x=q({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards",
"gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"},{ignoreUnknown:!0});return function(a){function g(b){b=a.call(this)||this;b.heightModel="gravity-related-height";b.heightUnit="meters";b.vertCRS=null;return b}n(g,a);l=g;g.prototype.writeHeightModel=function(a,d,b){return v.write(a,d,b)};g.prototype.readHeightModel=function(a,d,b){if(d=v.read(a))return d;b&&b.messages&&b.messages.push(r(a,
{context:b}));return null};g.prototype.readHeightUnit=function(a,d,b){if(d=x.read(a))return d;b&&b.messages&&b.messages.push(f(a,{context:b}));return null};g.prototype.readHeightUnitService=function(a,d,m){if(d=b.unitFromRESTJSON(a)||x.read(a))return d;m&&m.messages&&m.messages.push(f(a,{context:m}));return null};g.prototype.readVertCRS=function(a,d){return d.vertCRS||d.ellipsoid||d.geoid};g.prototype.clone=function(){return new l({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})};
g.prototype.equals=function(a){return a?this===a?!0:this.heightModel===a.heightModel&&this.heightUnit===a.heightUnit&&this.vertCRS===a.vertCRS:!1};g.deriveUnitFromSR=function(a,d){d=b.getVerticalUnitStringForSR(d);return new l({heightModel:a.heightModel,heightUnit:d,vertCRS:a.vertCRS})};g.prototype.write=function(a,d){d=k.mixin({},{origin:"web-scene"},d);return this.inherited(arguments,[a,d])};g.fromJSON=function(a){if(!a)return null;var d=new l;d.read(a,{origin:"web-scene"});return d};e([c.property({type:String,
constructOnly:!0})],g.prototype,"heightModel",void 0);e([c.writer("web-scene","heightModel")],g.prototype,"writeHeightModel",null);e([c.reader(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null);e([c.property({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:x.write}}}})],g.prototype,"heightUnit",void 0);e([c.reader("web-scene","heightUnit")],g.prototype,"readHeightUnit",null);e([c.reader("service","heightUnit")],g.prototype,"readHeightUnitService",null);e([c.property({type:String,
constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0);e([c.reader("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null);return g=l=e([c.subclass("esri.HeightModelInfo")],g);var l}(c.declared(l))})},"esri/geometry/support/scaleUtils":function(){define(["require","exports","../../config","../../core/kebabDictionary","./WKIDUnitConversion"],function(a,h,n,e,k){function l(a){return x.fromJSON(a.toLowerCase())||null}function q(a){return g(a)||
f}function g(a){var b,c,f;a&&("object"===typeof a?(b=a.wkid,c=a.wkt):"number"===typeof a?b=a:"string"===typeof a&&(c=a));b?f=v.values[v[b]]:c&&-1!==c.search(/^PROJCS/i)&&(a=r.exec(c))&&a[1]&&(f=parseFloat(a[1].split(",")[1]));return f}function c(a){var b,c,f;a&&("object"===typeof a?(b=a.wkid,c=a.wkt):"number"===typeof a?b=a:"string"===typeof a&&(c=a));b?f=v.units[v[b]]:c&&-1!==c.search(/^PROJCS/i)&&(a=r.exec(c))&&a[1]&&(f=(a=/[\\"\\']{1}([^\\"\\']+)/.exec(a[1]))&&a[1]);return f?l(f):null}function b(a,
b){b=q(b);return a/(39.37*b*n.screenDPI)}Object.defineProperty(h,"__esModule",{value:!0});var f=20015077/180,r=/UNIT\[([^\]]+)\]\]$/i,v=k,x=e({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains",
"50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"},{ignoreUnknown:!0});h.unitFromRESTJSON=l;h.unitToRESTJSON=function(a){return x.toJSON(a)||null};h.getMetersPerVerticalUnitForSR=function(a){a=q(a);return 1E5<a?1:a};h.getVerticalUnitStringForSR=function(a){return 1E5<q(a)?"meters":c(a)};h.getMetersPerUnitForSR=q;h.getMetersPerUnit=g;h.getUnitString=c;h.getScale=function(a,b){b=b||a.extent;a=a.width;var c=g(b&&b.spatialReference);return b&&a?b.width/a*(c||f)*39.37*n.screenDPI:0};h.getResolutionForScale=
b;h.getExtentForScale=function(a,c){var f=a.extent;a=a.width;c=b(c,f.spatialReference);return f.clone().expand(c*a/f.width)}})},"esri/layers/TiledLayer":function(){define(["../request","./Layer","./support/TileInfo"],function(a,h,n){return h.createSubclass({properties:{attributionDataUrl:null,tileInfo:n},viewModulePaths:{"2d":"../views/2d/layers/TiledLayerView2D","3d":"../views/3d/layers/TileLayerView3D"},getTileUrl:function(a,k,l){},fetchTile:function(e,k,l,h){e=this.getTileUrl(e,k,l);k={responseType:"image",
allowImageDataAccess:h&&h.allowImageDataAccess||!1};h&&h.timestamp&&(k.query={_ts:h.timestamp});return"string"===typeof e?a(e,k).then(function(a){return a.data}):e.then(function(e){return a(e,{responseType:"image"})}).then(function(a){return a.data})}})})},"esri/layers/support/TileInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/_base/lang ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators ../../geometry/SpatialReference ../../geometry/Point ../../geometry/support/spatialReferenceUtils ../../geometry/support/webMercatorUtils ../../geometry/support/scaleUtils ./LOD".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x){var w=q({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc"});return function(a){function l(d){d=a.call(this)||this;d.dpi=96;d.format=null;d.origin=null;d.minScale=0;d.maxScale=0;d.size=null;d.spatialReference=null;return d}n(l,a);p=l;l.create=function(a){void 0===a&&(a={size:256,spatialReference:c.WebMercator});var d=a.scales,
e=a.size||256;a=a.spatialReference||c.WebMercator;var g=f.getInfo(a),g=g?new b(g.origin[0],g.origin[1],a):new b(0,0,a),k=1/(39.37*v.getMetersPerUnitForSR(a)*96),l=[];if(d)for(var h=0;h<d.length;h++){var q=d[h],r=q*k;l.push({level:h,scale:q,resolution:r})}else for(d=256/e*5.91657527591555E8,l.push({level:0,scale:d,resolution:d*k}),h=1;24>h;h++)q=d/2,r=q*k,l.push({level:h,scale:q,resolution:r}),d=q;return new p({dpi:96,lods:l,origin:g,size:e,spatialReference:a})};Object.defineProperty(l.prototype,"isWrappable",
{get:function(){var a=this.spatialReference,b=this.origin;if(a&&b){var c=f.getInfo(a);return a.isWrappable&&Math.abs(c.origin[0]-b.x)<=c.dx}return!1},enumerable:!0,configurable:!0});l.prototype.readOrigin=function(a,m){return b.fromJSON(k.mixin({spatialReference:m.spatialReference},a))};Object.defineProperty(l.prototype,"lods",{set:function(a){var d=this,b=0,c=0,f=[];this._levelToLOD={};a&&(b=-Infinity,c=Infinity,a.forEach(function(a){f.push(a.scale);b=a.scale>b?a.scale:b;c=a.scale<c?a.scale:c;d._levelToLOD[a.level]=
a}));this._set("scales",f);this._set("minScale",b);this._set("maxScale",c);this._set("lods",a);this._initializeUpsampleLevels()},enumerable:!0,configurable:!0});l.prototype.readSize=function(a,b){return[b.cols,b.rows]};l.prototype.writeSize=function(a,b){b.cols=a[0];b.rows=a[0]};l.prototype.zoomToScale=function(a){var d=this.scales;if(0>=a)return d[0];if(a>=d.length)return d[d.length-1];var b=Math.round(a);return d[b]+(b-a)*(d[Math.round(a-.5)]-d[b])};l.prototype.scaleToZoom=function(a){for(var d=
this.scales,b=d.length-1,c=0;c<b;c++){var f=d[c],e=d[c+1];if(f<=a)break;if(e===a)return c+1;if(f>a&&e<a)return c+1-(a-e)/(f-e)}return c};l.prototype.snapScale=function(a,b){void 0===b&&(b=.95);a=this.scaleToZoom(a);return a%Math.floor(a)>=b?this.zoomToScale(Math.ceil(a)):this.zoomToScale(Math.floor(a))};l.prototype.tileAt=function(a,b,c,f){var d=this.lodAt(a);if(!d)return null;f||(f={id:null,level:0,row:0,col:0,extent:[0,0,0,0]});var m;if("number"===typeof b)m=b,b=c;else{if(b.spatialReference.equals(this.spatialReference))m=
b.x,b=b.y;else{f=r.project(b,this.spatialReference);if(!f)return null;m=f.x;b=f.y}f=c}c=d.resolution*this.size[0];d=d.resolution*this.size[1];f.level=a;f.row=Math.floor((this.origin.y-b)/d+.001);f.col=Math.floor((m-this.origin.x)/c+.001);this.updateTileInfo(f);return f};l.prototype.updateTileInfo=function(a){var d=this.lodAt(a.level),b=d.resolution*this.size[0],d=d.resolution*this.size[1];a.id=a.level+"/"+a.row+"/"+a.col;a.extent||(a.extent=[0,0,0,0]);a.extent[0]=this.origin.x+a.col*b;a.extent[1]=
this.origin.y-(a.row+1)*d;a.extent[2]=a.extent[0]+b;a.extent[3]=a.extent[1]+d};l.prototype.upsampleTile=function(a){var d=this._upsampleLevels[a.level];if(!d||-1===d.parentLevel)return!1;a.level=d.parentLevel;a.row=Math.floor(a.row/d.factor+.001);a.col=Math.floor(a.col/d.factor+.001);this.updateTileInfo(a);return!0};l.prototype.lodAt=function(a){return this._levelToLOD&&this._levelToLOD[a]||null};l.prototype.clone=function(){return p.fromJSON(this.write({}))};l.prototype._initializeUpsampleLevels=
function(){var a=this.lods;this._upsampleLevels=[];for(var b=null,c=0;c<a.length;c++){var f=a[c];this._upsampleLevels[f.level]={parentLevel:b?b.level:-1,factor:b?b.resolution/f.resolution:0};b=f}};e([g.property({type:Number,json:{write:!0}})],l.prototype,"compressionQuality",void 0);e([g.property({type:Number,json:{write:!0}})],l.prototype,"dpi",void 0);e([g.property({type:String,json:{read:w.read,write:w.write}})],l.prototype,"format",void 0);e([g.property({readOnly:!0,dependsOn:["spatialReference",
"origin"]})],l.prototype,"isWrappable",null);e([g.property({type:b,json:{write:!0}})],l.prototype,"origin",void 0);e([g.reader("origin")],l.prototype,"readOrigin",null);e([g.property({type:[x],value:null,json:{write:!0}})],l.prototype,"lods",null);e([g.property({readOnly:!0})],l.prototype,"minScale",void 0);e([g.property({readOnly:!0})],l.prototype,"maxScale",void 0);e([g.property({readOnly:!0})],l.prototype,"scales",void 0);e([g.property({cast:function(a){return Array.isArray(a)?a:"number"===typeof a?
[a,a]:[256,256]}})],l.prototype,"size",void 0);e([g.reader("size",["rows","cols"])],l.prototype,"readSize",null);e([g.writer("size",{cols:{type:Number},rows:{type:Number}})],l.prototype,"writeSize",null);e([g.property({type:c,json:{write:!0}})],l.prototype,"spatialReference",void 0);return l=p=e([g.subclass("esri.layers.support.TileInfo")],l);var p}(g.declared(l))})},"esri/layers/support/LOD":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport".split(" "),
function(a,h,n,e,k,l){return function(a){function g(b){b=a.call(this,b)||this;b.level=0;b.levelValue=null;b.resolution=0;b.scale=0;return b}n(g,a);c=g;g.prototype.clone=function(){return new c({level:this.level,levelValue:this.levelValue,resolution:this.resolution,scale:this.scale})};e([k.property({type:Number,json:{write:!0}})],g.prototype,"level",void 0);e([k.property({type:String,json:{write:!0}})],g.prototype,"levelValue",void 0);e([k.property({type:Number,json:{write:!0}})],g.prototype,"resolution",
void 0);e([k.property({type:Number,json:{write:!0}})],g.prototype,"scale",void 0);return g=c=e([k.subclass("esri.layers.support.LOD")],g);var c}(k.declared(l))})},"esri/layers/mixins/ArcGISMapService":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./ArcGISService ../../geometry/Extent ../../geometry/SpatialReference".split(" "),function(a,h,n,e,k,l,q,g){return function(a){function b(){var b=null!==
a&&a.apply(this,arguments)||this;b.copyright=null;b.fullExtent=null;b.legendEnabled=!0;b.spatialReference=null;b.version=null;return b}n(b,a);b.prototype.readCapabilities=function(a,b){return a&&a.split(",").map(function(a){return a.trim()})};b.prototype.readCopyright=function(a,b){return b.copyrightText};b.prototype.readPopupEnabled=function(a,b){return!b.disablePopup};b.prototype.readVersion=function(a,b){(a=b.currentVersion)||(a=b.hasOwnProperty("capabilities")||b.hasOwnProperty("tables")?10:b.hasOwnProperty("supportedImageFormatTypes")?
9.31:9.3);return a};e([k.property()],b.prototype,"capabilities",void 0);e([k.reader("service","capabilities")],b.prototype,"readCapabilities",null);e([k.property()],b.prototype,"copyright",void 0);e([k.reader("copyright",["copyrightText"])],b.prototype,"readCopyright",null);e([k.property({type:q})],b.prototype,"fullExtent",void 0);e([k.property({json:{origins:{service:{read:!1},"portal-item":{read:!1}}}})],b.prototype,"id",void 0);e([k.property({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},
read:{source:"showLegend"},write:{target:"showLegend"}}})],b.prototype,"legendEnabled",void 0);e([k.reader("popupEnabled",["disablePopup"])],b.prototype,"readPopupEnabled",null);e([k.property({type:g})],b.prototype,"spatialReference",void 0);e([k.property()],b.prototype,"version",void 0);e([k.reader("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],b.prototype,"readVersion",null);return b=e([k.subclass("esri.layers.mixins.ArcGISMapService")],b)}(k.declared(l))})},
"esri/layers/mixins/ArcGISService":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/MultiOriginJSONSupport ../../core/Logger ../support/arcgisLayerUrl".split(" "),function(a,h,n,e,k,l,q,g){var c=q.getLogger("esri.layers.mixins.ArcGISService");return function(a){function b(){return null!==a&&a.apply(this,arguments)||this}n(b,a);Object.defineProperty(b.prototype,"title",{get:function(){if(this._get("title")&&
"defaults"!==this.originOf("title"))return this._get("title");if(this.url){var a=g.parse(this.url);if(a&&a.title)return a.title}return this._get("title")||""},set:function(a){this._set("title",a)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"url",{set:function(a){this._set("url",g.sanitizeUrl(a,c))},enumerable:!0,configurable:!0});e([k.property({dependsOn:["url"]})],b.prototype,"title",null);e([k.property({type:String})],b.prototype,"url",null);return b=e([k.subclass("esri.layers.mixins.ArcGISService")],
b)}(k.declared(l))})},"esri/core/MultiOriginJSONSupport":function(){define("require exports ./tsSupport/declareExtendsHelper ./tsSupport/decorateHelper ./accessorSupport/decorators ./Accessor ./accessorSupport/read ./accessorSupport/write ./accessorSupport/utils ./accessorSupport/MultiOriginStore ./accessorSupport/PropertyOrigin".split(" "),function(a,h,n,e,k,l,q,g,c,b,f){function r(a){return c.getProperties(a).store}return function(a){function l(){var e=a.call(this)||this,g=c.getProperties(e),k=
g.metadatas,p=g.store,d=new b.default;g.store=d;p.keys().forEach(function(a){d.set(a,p.get(a),f.OriginId.DEFAULTS)});Object.keys(k).forEach(function(a){g.internalGet(a)&&d.set(a,g.internalGet(a),f.OriginId.DEFAULTS)});return e}n(l,a);l.prototype.clear=function(a,b){void 0===b&&(b="user");return r(this).clear(a,f.nameToId(b))};l.prototype.read=function(a,b){q.default(this,a,b);return this};l.prototype.write=function(a,b){a=a||{};g.default(this,a,b);return a};l.prototype.getAtOrigin=function(a,b){var c=
r(this),e=f.nameToId(b);if("string"===typeof a)return c.get(a,e);var d={};a.forEach(function(a){d[a]=c.get(a,e)});return d};l.prototype.originOf=function(a){var b=r(this);if("string"===typeof a)return f.idToName(b.originOf(a));a.forEach(function(a){f.idToName(b.originOf(a))})};l.prototype.revert=function(a,b){var e=r(this),p=f.nameToId(b),d=c.getProperties(this);("string"===typeof a?"*"===a?Object.keys(e.getAll(p)):[a]:a).forEach(function(a){d.propertyInvalidated(a);e.revert(a,p);d.propertyCommitted(a)})};
l.prototype.removeOrigin=function(a){var b=r(this);a=f.nameToId(a);var c=b.getAll(a),e;for(e in c)b.originOf(e)===a&&b.set(e,c[e],f.OriginId.USER)};l.prototype.updateOrigin=function(a,b){var c=r(this);b=f.nameToId(b);var e=this.get(a);c.clear(a);c.set(a,e,b)};return l=e([k.subclass("esri.core.MultiOriginJSONSupport")],l)}(k.declared(l))})},"esri/core/accessorSupport/MultiOriginStore":function(){define(["require","exports","./PropertyOrigin"],function(a,h,n){Object.defineProperty(h,"__esModule",{value:!0});
a=function(){function a(){this._propertyOriginMap={};this._originStores=Array(n.OriginId.NUM);this._values={}}a.prototype.get=function(a,e){return(e=void 0===e?this._values:this._originStores[e])?e[a]:void 0};a.prototype.keys=function(){return Object.keys(this._values)};a.prototype.set=function(a,e,h){void 0===h&&(h=n.OriginId.USER);var g=this._originStores[h];g||(g={},this._originStores[h]=g);g[a]=e;return!(a in this._values)||this._propertyOriginMap[a]<=h?(g=this._values[a],this._values[a]=e,this._propertyOriginMap[a]=
h,g!==e):!1};a.prototype.clear=function(a,e){void 0===e&&(e=n.OriginId.USER);var k=this._originStores[e];if(k){var g=k[a];delete k[a];if(a in this._values&&this._propertyOriginMap[a]===e)for(delete this._values[a],--e;0<=e;e--)if((k=this._originStores[e])&&a in k){this._values[a]=k[a];this._propertyOriginMap[a]=e;break}return g}};a.prototype.has=function(a,e){return(e=void 0===e?this._values:this._originStores[e])?a in e:!1};a.prototype.revert=function(a,e){for(;0<e&&!this.has(a,e);)--e;var k=this._originStores[e],
k=k&&k[a],g=this._values[a];this._values[a]=k;this._propertyOriginMap[a]=e;return g!==k};a.prototype.originOf=function(a,e){return this._propertyOriginMap[a]||n.OriginId.DEFAULTS};a.prototype.getAll=function(a){return this._originStores[a]};return a}();h.default=a})},"esri/layers/support/arcgisLayerUrl":function(){define(["require","exports","../../core/urlUtils"],function(a,h,n){function e(a){var e=n.urlToObject(a).path.match(h.match);if(!e)return null;a=e[1];var g=e[2],c=e[3],e=e[4],b=g.indexOf("/");
return{title:k(-1!==b?g.slice(b+1):g),serverType:c,sublayer:null!=e&&""!==e?parseInt(e,10):null,url:{path:a}}}function k(a){a=a.replace(/\s*[/_]+\s*/g," ");return a[0].toUpperCase()+a.slice(1)}Object.defineProperty(h,"__esModule",{value:!0});h.serverTypes="MapServer ImageServer FeatureServer SceneServer StreamServer VectorTileServer".split(" ");h.match=new RegExp("^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/("+h.serverTypes.join("|")+"))(?:\\/(?:layers\\/)?(\\d+))?","i");h.test=function(a){return!!h.match.test(a)};
h.parse=e;h.cleanTitle=k;h.titleFromUrlAndName=function(a,h){var g=[];a&&(a=e(a))&&a.title&&g.push(a.title);h&&(h=k(h),g.push(h));if(2===g.length){if(-1!==g[0].toLowerCase().indexOf(g[1].toLowerCase()))return g[0];if(-1!==g[1].toLowerCase().indexOf(g[0].toLowerCase()))return g[1]}return g.join(" - ")};h.isHostedAgolService=function(a){if(!a)return!1;a=a.toLowerCase();var e=-1!==a.indexOf(".arcgis.com/");a=-1!==a.indexOf("//services")||-1!==a.indexOf("//tiles")||-1!==a.indexOf("//features");return e&&
a};h.isHostedSecuredProxyService=function(a,e){return e&&a&&-1!==a.toLowerCase().indexOf(e.toLowerCase())};h.sanitizeUrl=function(a,e){return a?n.removeTrailingSlash(n.removeQueryParameters(a,e)):a};h.sanitizeUrlWithLayerId=function(a,k,g){if(!k)return{url:k};k=n.removeQueryParameters(k,g);g=n.urlToObject(k);g=e(g.path);var c;g&&null!=g.sublayer&&(null==a.layerId&&(c=g.sublayer),k=g.url.path);return{url:n.removeTrailingSlash(k),layerId:c}};h.writeUrlWithLayerId=function(a,e,g,c){var b=null;c?b=g:
c=g;n.writeOperationalLayerUrl(e,c);c.url&&null!=a.layerId&&(c.url=n.join(c.url,b,a.layerId.toString()))}})},"esri/layers/mixins/ArcGISCachedService":function(){define(["dojo/_base/lang","dojo/io-query","./ArcGISService","../support/TileInfo","../support/TilemapCache"],function(a,h,n,e,k){return n.createSubclass([],{declaredClass:"esri.layers.mixins.ArcGISCachedService",properties:{minScale:{json:{origins:{service:{read:!1}}}},maxScale:{json:{origins:{service:{read:!1}}}},resampling:!0,supportsBlankTile:{value:!1,
readOnly:!0,dependsOn:["version"],get:function(){return 10.2<=this.version}},tileInfo:{value:null,type:e,json:{read:function(a,k){var g=k.minScale?k.minScale:Infinity,c=k.maxScale?k.maxScale:-Infinity;return a?(a.lods=a.lods.filter(function(a){return a.scale<=g&&a.scale>=c}),e.fromJSON(a)):null}}},tilemapCache:{value:null,json:{read:{source:["capabilities"],reader:function(a,e){return e.capabilities&&-1<e.capabilities.indexOf("Tilemap")?new k({layer:this}):null}}}},refreshTimestamp:null,version:{}},
refresh:function(){this.refreshTimestamp=Date.now();this.inherited(arguments)},getTileUrl:function(e,k,g){var c=a.mixin({},this.parsedUrl.query,{token:this.token,blankTile:!this.tilemapCache&&this.resampling&&this.supportsBlankTile?!1:null,_ts:this.refreshTimestamp});e=this.parsedUrl.path+"/tile/"+e+"/"+k+"/"+g;c=h.objectToQuery(c);return e+(c?"?"+c:"")}})})},"esri/layers/support/TilemapCache":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/_base/lang dojo/io-query ../../request ../../core/Accessor ../../core/LRUMap ../../core/promiseUtils ../../core/watchUtils ../../core/Error ../../core/HandleRegistry ../../core/Logger ../../core/accessorSupport/decorators ./Tilemap".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t){var u=x.getLogger("esri.layers.support.TilemapCache");return function(a){function d(d){d=a.call(this)||this;d._handles=new v;d._pendingTilemapRequests={};d._availableLevels={};d.levels=5;d.cacheByteSize=2097152;d.request=q;return d}n(d,a);d.prototype.initialize=function(){var a=this;this._tilemapCache=new c(this.cacheByteSize,{sizeOfFunction:function(a){return a.byteSize}});this._handles.add([this.watch(["layer.parsedUrl","layer.tileServers"],function(){return a._initializeTilemapDefinition()}),
f.init(this,"layer.tileInfo.lods",function(d){return a._initializeAvailableLevels(d)},!0)]);this._initializeTilemapDefinition()};d.prototype.destroy=function(){this._handles&&(this._handles.destroy(),this._handles=null)};d.prototype.castLevels=function(a){return 2>=a?(u.error("Minimum levels for Tilemap is 3, but got ",a),3):a};Object.defineProperty(d.prototype,"size",{get:function(){return 1<<this.levels},enumerable:!0,configurable:!0});d.prototype.getTilemap=function(a,d,b){return this._tilemapFromCache(a,
d,b,this._tmpTilemapDefinition)};d.prototype.fetchTilemap=function(a,d,c,f){var m=this;if(!this._availableLevels[a])return b.reject(new r("tilemap-cache:level-unavailable","Level "+a+" is unavailable in the service"));var e=this._tmpTilemapDefinition;if(a=this._tilemapFromCache(a,d,c,e))return b.resolve(a);var p=t.tilemapDefinitionId(e);a=this._pendingTilemapRequests[p];a||(a=t.Tilemap.fromDefinition(e,f).then(function(a){m._tilemapCache.set(p,a);delete m._pendingTilemapRequests[p];return a}).otherwise(function(a){delete m._pendingTilemapRequests[p];
return b.reject(a)}),this._pendingTilemapRequests[p]=a);return a};d.prototype.getAvailability=function(a,d,b){return this._availableLevels[a]?(a=this.getTilemap(a,d,b))?a.getAvailability(d,b):"unknown":"unavailable"};d.prototype.getAvailabilityUpsample=function(a,d,b,c){c.level=a;c.row=d;c.col=b;a=this.layer.tileInfo;for(a.updateTileInfo(c);;)if(d=this.getAvailability(c.level,c.row,c.col),"unavailable"===d){if(!a.upsampleTile(c))return"unavailable"}else return d};d.prototype.fetchAvailability=function(a,
d,c,f){return this._availableLevels[a]?this.fetchTilemap(a,d,c,f).always(function(m){return m instanceof t.Tilemap?(m=m.getAvailability(d,c),"unavailable"===m?b.reject(new r("tile-map:tile-unavailable","Tile is not available",{level:a,row:d,col:c})):m):"unknown"}):b.reject(new r("tilemap-cache:level-unavailable","Level "+a+" is unavailable in the service"))};d.prototype.fetchAvailabilityUpsample=function(a,d,c,f,e){var m=this;f.level=a;f.row=d;f.col=c;var p=this.layer.tileInfo;p.updateTileInfo(f);
return this.fetchAvailability(a,d,c,e).otherwise(function(a){return p.upsampleTile(f)?m.fetchAvailabilityUpsample(f.level,f.row,f.col,f):b.reject(a)})};d.prototype._initializeTilemapDefinition=function(){if(this.layer.parsedUrl){var a=this.layer.parsedUrl,d=a.query;d&&d.token||!this.layer.token||(d=k.mixin(d,{token:this.layer.token}));this._tilemapCache.clear();this._tmpTilemapDefinition={service:{url:a.path,query:d?l.objectToQuery(d):null,tileServers:this.layer.tileServers,request:this.request},
width:this.size,height:this.size,level:0,row:0,col:0}}};d.prototype._tilemapFromCache=function(a,d,b,c){a=this._getTilemapDefinition(a,d,b,c);a=t.tilemapDefinitionId(a);return this._tilemapCache.get(a)};d.prototype._getTilemapDefinition=function(a,d,b,c){c.level=a;c.row=d-d%this.size;c.col=b-b%this.size;return c};d.prototype._initializeAvailableLevels=function(a){var d=this;this._availableLevels={};a&&a.forEach(function(a){return d._availableLevels[a.level]=!0})};e([w.property({constructOnly:!0,type:Number})],
d.prototype,"levels",void 0);e([w.cast("levels")],d.prototype,"castLevels",null);e([w.property({readOnly:!0,dependsOn:["levels"],type:Number})],d.prototype,"size",null);e([w.property({constructOnly:!0,type:Number})],d.prototype,"cacheByteSize",void 0);e([w.property({constructOnly:!0})],d.prototype,"layer",void 0);e([w.property({constructOnly:!0})],d.prototype,"request",void 0);return d=e([w.subclass("esri.layers.support.TilemapCache")],d)}(w.declared(g))})},"esri/core/LRUMap":function(){define(["require",
"exports"],function(a,h){return function(){function a(a,k){void 0===a&&(a=0);this.sizeOfFunction=function(){return 1};this._sizeOf=0;this._cache=new Map;this._queue=[];if(0>=a)throw Error("LRU cache size must be bigger than zero!");this._maxSize=a;k&&(k.disposeFunction&&(this.disposeFunction=k.disposeFunction),k.sizeOfFunction&&(this.sizeOfFunction=k.sizeOfFunction))}Object.defineProperty(a.prototype,"length",{get:function(){return this._cache.size},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,
"size",{get:function(){return this._sizeOf},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"keys",{get:function(){return this._queue.slice()},enumerable:!0,configurable:!0});a.prototype.clear=function(){var a=this;this._queue.length=0;this.disposeFunction&&this._cache.forEach(function(e,l){a.disposeFunction(l,e)});this._cache.clear();this._sizeOf=0};a.prototype.delete=function(a){var e=this._cache.get(a);return this._cache.delete(a)?(this._sizeOf-=this.sizeOfFunction(e),this.disposeFunction&&
this.disposeFunction(a,e),this._queue.splice(this._queue.indexOf(a),1),!0):!1};a.prototype.forEach=function(a,k){this._cache.forEach(a,k)};a.prototype.get=function(a){var e=this._cache.get(a);if(void 0!==e)return this._queue.splice(this._queue.indexOf(a),1),this._queue.unshift(a),e};a.prototype.has=function(a){return this._cache.has(a)};a.prototype.set=function(a,k){var e=this.get(a);void 0!==e?this._sizeOf-=this.sizeOfFunction(e):this._queue.unshift(a);this._sizeOf+=this.sizeOfFunction(k);this._cache.set(a,
k);this._collect();return this};a.prototype._collect=function(){for(;this._queue.length&&this._sizeOf>this._maxSize;){var a=this._queue.pop(),k=this._cache.get(a);this._cache.delete(a)&&(this._sizeOf-=this.sizeOfFunction(k),this.disposeFunction&&this.disposeFunction(a,k))}};return a}()})},"esri/core/watchUtils":function(){define(["require","exports","dojo/Deferred","dojo/promise/Promise"],function(a,h,n,e){function k(a,b){Array.isArray(a)?a.forEach(b):b(a)}function l(a,b,c,f,d){d=a.watch(b,function(d,
b,e,p){f&&!f(d)||c.call(a,d,b,e,p)},d);k(b,function(d){var b=a.get(d);f&&f(b)&&c.call(a,b,b,d,a)});return d}function q(a,b,c,f,d){function m(){g&&(g.remove(),g=null)}var p=!1,g,k=new n(m),h=new e;h.cancel=k.cancel;h.isCanceled=k.isCanceled;h.isFulfilled=k.isFulfilled;h.isRejected=k.isRejected;h.isResolved=k.isResolved;h.then=k.then;h.remove=m;Object.freeze(h);g=l(a,b,function(d,b,f,e){p=!0;m();c&&c.call(a,d,b,f,e);k.resolve({value:d,oldValue:b,propertyName:f,target:e})},f,d);p&&g.remove();return h}
function g(a){return!!a}function c(a){return!a}function b(a){return!0===a}function f(a){return!1===a}function r(a){return void 0!==a}function v(a){return void 0===a}function x(a,b,c,f){var d=Array.isArray(b)?b:-1<b.indexOf(",")?b.split(","):[b];b=a.watch(b,c,f);d.forEach(function(d){d=d.trim();var b=a.get(d);c.call(a,b,b,d,a)});return b}Object.defineProperty(h,"__esModule",{value:!0});h.init=x;h.watch=function(a,b,c,f){return a.watch(b,c,f)};h.once=function(a,b,c,f){return q(a,b,c,null,f)};h.when=
function(a,b,c,f){return l(a,b,c,g,f)};h.whenOnce=function(a,b,c,f){return q(a,b,c,g,f)};h.whenNot=function(a,b,f,e){return l(a,b,f,c,e)};h.whenNotOnce=function(a,b,f,e){return q(a,b,f,c,e)};h.whenTrue=function(a,c,f,e){return l(a,c,f,b,e)};h.whenTrueOnce=function(a,c,f,e){return q(a,c,f,b,e)};h.whenFalse=function(a,b,c,e){return l(a,b,c,f,e)};h.whenFalseOnce=function(a,b,c,e){return q(a,b,c,f,e)};h.whenDefined=function(a,b,c,f){return l(a,b,c,r,f)};h.whenDefinedOnce=function(a,b,c,f){return q(a,
b,c,r,f)};h.whenUndefined=function(a,b,c,f){return l(a,b,c,v,f)};h.whenUndefinedOnce=function(a,b,c,f){return q(a,b,c,v,f)};h.pausable=function(a,b,c,f){var d=!1,m=a.watch(b,function(b,m,f,e){d||c.call(a,b,m,f,e)},f);return{remove:function(){m.remove()},pause:function(){d=!0},resume:function(){d=!1}}};h.on=function(a,b,c,f,d,m,e){function p(d){var b=g[d];b&&(m&&m(b.target,d,a,c),b.handle.remove(),delete g[d])}var g={},k=x(a,b,function(b,m,e){p(e);b&&"function"===typeof b.on&&(g[e]={handle:b.on(c,
f),target:b},d&&d(b,e,a,c))},e);return{remove:function(){k.remove();for(var a in g)p(a)}}}})},"esri/layers/support/Tilemap":function(){define("require exports dojo/_base/lang ../../request ../../core/lang ../../core/Error".split(" "),function(a,h,n,e,k,l){function q(a){var c=a.service.tileServers,c=(c&&c.length?c[a.row%c.length]:a.service.url)+"/tilemap/"+a.level+"/"+a.row+"/"+a.col+"/"+a.width+"/"+a.height;(a=a.service.query)&&(c=c+"?"+a);return c}Object.defineProperty(h,"__esModule",{value:!0});
a=function(){function a(){this.location={left:0,top:0,width:0,height:0};this.byteSize=40}a.prototype.getAvailability=function(a,b){if(this._isAllAvailable)return"available";if(this._isAllUnvailable)return"unavailable";a=(a-this.location.top)*this.location.width+(b-this.location.left);b=a>>3;var c=this._tileAvailabilityBitSet;return 0>b||b>c.length?"unknown":c[b]&1<<a%8?"available":"unavailable"};a.prototype._updateFromData=function(a){for(var b=!0,c=!0,e=new Uint8Array(Math.ceil(this.location.width*
this.location.height/8)),g=0,k=0;k<a.length;k++){var l=k%8;a[k]?(c=!1,e[g]|=1<<l):b=!1;7===l&&++g}this._isAllUnvailable=c;this._isAllAvailable=b;this._isAllAvailable||this._isAllUnvailable||(this._tileAvailabilityBitSet=e,this.byteSize+=e.length)};a.fromDefinition=function(c,b){var f=c.service.request||e,g=c.row,k=c.col,h=c.width,w=c.height,t={callbackParamName:"callback"};b=b?n.mixin(t,b):t;return f(q(c),b).then(function(b){var c=b.data;if(c.location&&(c.location.top!==g||c.location.left!==k||c.location.width!==
h||c.location.height!==w))throw new l("tilemap:location-mismatch","Tilemap response for different location than requested",{response:c,definition:{top:g,left:k,width:h,height:w}});return a.fromJSON(b.data)})};a.fromJSON=function(c){a.validateJSON(c);var b=new a;b.location=Object.freeze(k.clone(c.location));b._updateFromData(c.data);return Object.freeze(b)};a.validateJSON=function(a){if(!a||!a.location)throw new l("tilemap:missing-location","Location missing from tilemap response");if(!a.valid)throw new l("tilemap:invalid",
"Tilemap response was marked as invalid");if(!a.data)throw new l("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(a.data))throw new l("tilemap:data-mismatch","Data must be an array of numbers");if(a.data.length!==a.location.width*a.location.height)throw new l("tilemap:data-mismatch","Number of data items does not match width/height of tilemap");};return a}();h.Tilemap=a;h.tilemapDefinitionId=function(a){return a.level+"/"+a.row+"/"+a.col+"/"+a.width+"/"+a.height};h.tilemapDefinitionUrl=
q;h.default=a})},"esri/layers/mixins/OperationalLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/MultiOriginJSONSupport ../../core/Error ../../core/urlUtils ../../core/accessorSupport/write ../../core/accessorSupport/read".split(" "),function(a,h,n,e,k,l,q,g,c,b,f){a=function(a){function l(){var b=null!==a&&a.apply(this,arguments)||this;b.title="Layer";return b}
n(l,a);h=l;l.prototype.writeListMode=function(a,c,f,d){d&&"ground"===d.layerContainerType?c[f]=a:a&&b.willPropertyWrite(this,f,{},d)&&(c[f]=a)};l.prototype.writeTitle=function(a,b){b.title=a||"Layer"};l.prototype.writeOperationalLayerType=function(a,b){a&&(b.layerType=a)};l.prototype.readOpacity=function(a,b,c){if(void 0!==b.opacity&&(!c||"web-map"===c.origin||"web-scene"===c.origin))return b.opacity;if((!c||"service"===c.origin)&&b.drawingInfo&&void 0!==b.drawingInfo.transparency)return 1-b.drawingInfo.transparency/
100;if(b.layerDefinition&&b.layerDefinition.drawingInfo&&void 0!==b.layerDefinition.drawingInfo.transparency)return 1-b.layerDefinition.drawingInfo.transparency/100};l.prototype.readVisible=function(a,b){return!!b.visibility};l.prototype.read=function(a,b){var c=this,d=arguments;b&&(b.layer=this);f.readLoadable(this,a,function(b){return c.inherited(d,[a,b])},b);return this};l.prototype.write=function(a,b){if(b&&b.origin){var c=b.origin+"/"+(b.layerContainerType||"operational-layers"),d=h.supportedTypes[c],
d=d&&d[this.operationalLayerType];if("write"!==d&&"readwrite"!==d)return b.messages&&b.messages.push(new g("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' are not supported in the context of '"+c+"'",{layer:this})),null;if(!this.url&&!r[this.operationalLayerType])return b.messages&&b.messages.push(new g("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' require a url to a service to be written to a '"+b.origin+"'",
{layer:this})),null}return this.inherited(arguments,[a,b])};e([k.property({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}}}}})],l.prototype,"id",void 0);e([k.property({type:String,json:{write:{ignoreOrigin:!0}}})],l.prototype,"listMode",void 0);e([k.writer("listMode")],l.prototype,"writeListMode",null);e([k.property({type:String,json:{write:{ignoreOrigin:!0,allowNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}}}}})],l.prototype,
"title",void 0);e([k.writer("title")],l.prototype,"writeTitle",null);e([k.property({type:String,json:{write:{ignoreOrigin:!0,writer:c.writeOperationalLayerUrl}}})],l.prototype,"url",void 0);e([k.property({type:String,json:{write:{target:"layerType",ignoreOrigin:!0}}})],l.prototype,"operationalLayerType",void 0);e([k.writer("operationalLayerType")],l.prototype,"writeOperationalLayerType",null);e([k.property({type:Number,json:{write:{ignoreOrigin:!0}}})],l.prototype,"opacity",void 0);e([k.reader("opacity",
["opacity","layerDefinition.drawingInfo.transparency","drawingInfo.transparency"])],l.prototype,"readOpacity",null);e([k.property({type:Boolean,json:{write:{target:"visibility",ignoreOrigin:!0}}})],l.prototype,"visible",void 0);e([k.reader("visible",["visibility"])],l.prototype,"readVisible",null);return l=h=e([k.subclass("esri.layers.mixins.OperationalLayer")],l);var h}(k.declared(l,q));var r={GroupLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,ArcGISFeatureLayer:!0,CSV:!0,VectorTileLayer:!0,KML:!0};
(function(a){a.typeModuleMap={ArcGISFeatureLayer:"../FeatureLayer",ArcGISImageServiceLayer:"../ImageryLayer",ArcGISImageServiceVectorLayer:null,ArcGISMapServiceLayer:"../MapImageLayer",ArcGISSceneServiceLayer:"../SceneLayer",ArcGISStreamLayer:"../StreamLayer",ArcGISTiledElevationServiceLayer:"../ElevationLayer",ArcGISTiledImageServiceLayer:"../TileLayer",ArcGISTiledMapServiceLayer:"../TileLayer",bingLayer:null,CSV:"../CSVLayer",GeoRSS:"../GeoRSSLayer",GroupLayer:"../GroupLayer",IntegratedMeshLayer:"../IntegratedMeshLayer",
KML:"../KMLLayer",OpenStreetMap:"../OpenStreetMapLayer",PointCloudLayer:"../PointCloudLayer",VectorTileLayer:"../VectorTileLayer",WebTiledLayer:"../WebTileLayer",WMS:"../WMSLayer"};a.supportedTypes={"web-scene/operational-layers":{ArcGISFeatureLayer:"readwrite",ArcGISImageServiceLayer:"readwrite",ArcGISMapServiceLayer:"readwrite",ArcGISSceneServiceLayer:"readwrite",ArcGISTiledElevationServiceLayer:"read",ArcGISTiledImageServiceLayer:"readwrite",ArcGISTiledMapServiceLayer:"readwrite",GroupLayer:"readwrite",
IntegratedMeshLayer:"readwrite",PointCloudLayer:"readwrite",WebTiledLayer:"readwrite",CSV:"readwrite",VectorTileLayer:"readwrite",WMS:"readwrite"},"web-scene/basemap":{ArcGISTiledImageServiceLayer:"readwrite",ArcGISTiledMapServiceLayer:"readwrite",WebTiledLayer:"readwrite",OpenStreetMap:"readwrite",VectorTileLayer:"readwrite",ArcGISImageServiceLayer:"readwrite",WMS:"readwrite",ArcGISMapServiceLayer:"readwrite"},"web-scene/ground":{ArcGISTiledElevationServiceLayer:"readwrite"},"web-map/operational-layers":{ArcGISImageServiceLayer:"readwrite",
ArcGISImageServiceVectorLayer:"readwrite",ArcGISMapServiceLayer:"readwrite",ArcGISStreamLayer:"readwrite",ArcGISTiledImageServiceLayer:"readwrite",ArcGISTiledMapServiceLayer:"readwrite",ArcGISFeatureLayer:"readwrite",CSV:"readwrite",GeoRSS:"readwrite",KML:"readwrite",VectorTileLayer:"readwrite",WMS:"readwrite",WebTiledLayer:"readwrite"},"web-map/basemap":{ArcGISImageServiceLayer:"readwrite",ArcGISImageServiceVectorLayer:"readwrite",ArcGISMapServiceLayer:"readwrite",ArcGISTiledImageServiceLayer:"readwrite",
ArcGISTiledMapServiceLayer:"readwrite",OpenStreetMap:"readwrite",VectorTileLayer:"readwrite",WMS:"readwrite",WebTiledLayer:"readwrite",bingLayer:"readwrite"}}})(a||(a={}));return a})},"esri/layers/mixins/PortalLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/Error ../../core/Logger ../../core/requireUtils ../../core/promiseUtils ../../core/urlUtils ../../portal/PortalItem ../../portal/Portal".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v){var x=g.getLogger("esri.layers.mixins.PortalLayer");return function(g){function l(){return null!==g&&g.apply(this,arguments)||this}n(l,g);Object.defineProperty(l.prototype,"portalItem",{set:function(a){a!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",a))},enumerable:!0,configurable:!0});l.prototype.writePortalItem=function(a,b,d){a&&a.id&&(b.itemId=a.id)};l.prototype.loadFromPortal=function(f){var e=this;return this.portalItem&&
this.portalItem.id?c.when(a,"../../portal/support/layersLoader").then(function(a){return a.load({instance:e,supportedTypes:f.supportedTypes,validateItem:f.validateItem,supportsData:f.supportsData}).otherwise(function(a){x.warn("Failed to load layer ("+e.title+", "+e.id+") portal item ("+e.portalItem.id+")\n "+a);throw a;})}):b.resolve()};l.prototype.read=function(a,b){b&&(b.layer=this);return this.inherited(arguments)};l.prototype.write=function(a,b){var d=b&&b.portal,c=this.portalItem&&this.portalItem.id&&
(this.portalItem.portal||v.getDefault());return d&&c&&!f.hasSamePortal(c.restUrl,d.restUrl)?(b.messages&&b.messages.push(new q("layer:cross-portal","The layer '"+this.title+" ("+this.id+")' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer",{layer:this})),null):this.inherited(arguments)};e([k.property({type:r})],l.prototype,
"portalItem",null);e([k.writer("portalItem",{itemId:{type:String}})],l.prototype,"writePortalItem",null);return l=e([k.subclass("esri.layers.mixins.PortalLayer")],l)}(k.declared(l))})},"esri/layers/support/rasterFormats/LercCodec":function(){define([],function(){var a={defaultNoDataValue:-3.4027999387901484E38,decode:function(n,e){var k;e=e||{};var l=e.inputOffset||0,q=e.encodedMaskData||null===e.encodedMaskData,g={},c=new Uint8Array(n,l,10);g.fileIdentifierString=String.fromCharCode.apply(null,c);
if("CntZImage"!=g.fileIdentifierString.trim())throw"Unexpected file identifier string: "+g.fileIdentifierString;l+=10;c=new DataView(n,l,24);g.fileVersion=c.getInt32(0,!0);g.imageType=c.getInt32(4,!0);g.height=c.getUint32(8,!0);g.width=c.getUint32(12,!0);g.maxZError=c.getFloat64(16,!0);l+=24;if(!q)if(c=new DataView(n,l,16),g.mask={},g.mask.numBlocksY=c.getUint32(0,!0),g.mask.numBlocksX=c.getUint32(4,!0),g.mask.numBytes=c.getUint32(8,!0),g.mask.maxValue=c.getFloat32(12,!0),l+=16,0<g.mask.numBytes){var q=
new Uint8Array(Math.ceil(g.width*g.height/8)),c=new DataView(n,l,g.mask.numBytes),b=c.getInt16(0,!0),f=2,r=0;do{if(0<b)for(;b--;)q[r++]=c.getUint8(f++);else for(var v=c.getUint8(f++),b=-b;b--;)q[r++]=v;b=c.getInt16(f,!0);f+=2}while(f<g.mask.numBytes);if(-32768!==b||r<q.length)throw"Unexpected end of mask RLE encoding";g.mask.bitset=q;l+=g.mask.numBytes}else 0===(g.mask.numBytes|g.mask.numBlocksY|g.mask.maxValue)&&(q=new Uint8Array(Math.ceil(g.width*g.height/8)),g.mask.bitset=q);c=new DataView(n,l,
16);g.pixels={};g.pixels.numBlocksY=c.getUint32(0,!0);g.pixels.numBlocksX=c.getUint32(4,!0);g.pixels.numBytes=c.getUint32(8,!0);g.pixels.maxValue=c.getFloat32(12,!0);l+=16;q=g.pixels.numBlocksX;c=g.pixels.numBlocksY;q+=0<g.width%q?1:0;b=c+(0<g.height%c?1:0);g.pixels.blocks=Array(q*b);f=1E9;for(v=r=0;v<b;v++)for(var x=0;x<q;x++){var w=0,c=new DataView(n,l,Math.min(10,n.byteLength-l)),t={};g.pixels.blocks[r++]=t;var u=c.getUint8(0);w++;t.encoding=u&63;if(3<t.encoding)throw"Invalid block encoding ("+
t.encoding+")";if(2===t.encoding)l++,f=Math.min(f,0);else{if(0!==u&&2!==u){u>>=6;t.offsetType=u;if(2===u)t.offset=c.getInt8(1),w++;else if(1===u)t.offset=c.getInt16(1,!0),w+=2;else if(0===u)t.offset=c.getFloat32(1,!0),w+=4;else throw"Invalid block offset type";f=Math.min(t.offset,f);if(1===t.encoding)if(u=c.getUint8(w),w++,t.bitsPerPixel=u&63,u>>=6,t.numValidPixelsType=u,2===u)t.numValidPixels=c.getUint8(w),w++;else if(1===u)t.numValidPixels=c.getUint16(w,!0),w+=2;else if(0===u)t.numValidPixels=c.getUint32(w,
!0),w+=4;else throw"Invalid valid pixel count type";}l+=w;if(3!=t.encoding)if(0===t.encoding){c=(g.pixels.numBytes-1)/4;if(c!==Math.floor(c))throw"uncompressed block has invalid length";w=new ArrayBuffer(4*c);u=new Uint8Array(w);u.set(new Uint8Array(n,l,4*c));w=new Float32Array(w);for(u=0;u<w.length;u++)f=Math.min(f,w[u]);t.rawData=w;l+=4*c}else 1===t.encoding&&(c=Math.ceil(t.numValidPixels*t.bitsPerPixel/8),w=new ArrayBuffer(4*Math.ceil(c/4)),u=new Uint8Array(w),u.set(new Uint8Array(n,l,c)),t.stuffedData=
new Uint32Array(w),l+=c)}}g.pixels.minValue=f;g.eofOffset=l;n=null!=e.noDataValue?e.noDataValue:a.defaultNoDataValue;var q=e.encodedMaskData,t=e.returnMask,c=0,b=g.pixels.numBlocksX,f=g.pixels.numBlocksY,r=Math.floor(g.width/b),v=Math.floor(g.height/f),x=2*g.maxZError,q=q||(g.mask?g.mask.bitset:null),p,l=new (e.pixelType||Float32Array)(g.width*g.height);t&&q&&(p=new Uint8Array(g.width*g.height));for(var t=new Float32Array(r*v),d,m,w=0;w<=f;w++)if(u=w!==f?v:g.height%f,0!==u)for(var y=0;y<=b;y++){var z=
y!==b?r:g.width%b;if(0!==z){var A=w*g.width*v+y*r,C=g.width-z,G=g.pixels.blocks[c],J,E;if(2>G.encoding){if(0===G.encoding)J=G.rawData;else{J=G.stuffedData;E=G.bitsPerPixel;d=G.numValidPixels;m=G.offset;var K=x,R=t,Z=g.pixels.maxValue,ba=(1<<E)-1,F=0,Y=void 0,D=0,S=void 0,L=void 0,M=Math.ceil((Z-m)/K);J[J.length-1]<<=8*(4*J.length-Math.ceil(E*d/8));for(Y=0;Y<d;Y++)0===D&&(L=J[F++],D=32),D>=E?(S=L>>>D-E&ba,D-=E):(D=E-D,S=(L&ba)<<D&ba,L=J[F++],D=32-D,S+=L>>>D),R[Y]=S<M?m+S*K:Z;J=t}E=0}else k=2===G.encoding?
0:G.offset;var ca;if(q)for(m=0;m<u;m++){A&7&&(ca=q[A>>3],ca<<=A&7);for(d=0;d<z;d++)A&7||(ca=q[A>>3]),ca&128?(p&&(p[A]=1),l[A++]=2>G.encoding?J[E++]:k):(p&&(p[A]=0),l[A++]=n),ca<<=1;A+=C}else if(2>G.encoding)for(m=0;m<u;m++){for(d=0;d<z;d++)l[A++]=J[E++];A+=C}else for(m=0;m<u;m++){for(d=0;d<z;d++)l[A++]=k;A+=C}if(1===G.encoding&&E!==G.numValidPixels)throw"Block and Mask do not match";c++}}k=p;p={width:g.width,height:g.height,pixelData:l,minValue:g.pixels.minValue,maxValue:g.pixels.maxValue,noDataValue:n};
k&&(p.maskData=k);e.returnEncodedMask&&g.mask&&(p.encodedMaskData=g.mask.bitset?g.mask.bitset:null);if(e.returnFileInfo&&(p.fileInfo=h(g),e.computeUsedBitDepths)){e=p.fileInfo;k=g.pixels.numBlocksX*g.pixels.numBlocksY;ca={};for(J=0;J<k;J++)E=g.pixels.blocks[J],0===E.encoding?ca.float32=!0:1===E.encoding?ca[E.bitsPerPixel]=!0:ca[0]=!0;g=Object.keys(ca);e.bitDepths=g}return p}},h=function(a){return{fileIdentifierString:a.fileIdentifierString,fileVersion:a.fileVersion,imageType:a.imageType,height:a.height,
width:a.width,maxZError:a.maxZError,eofOffset:a.eofOffset,mask:a.mask?{numBlocksX:a.mask.numBlocksX,numBlocksY:a.mask.numBlocksY,numBytes:a.mask.numBytes,maxValue:a.mask.maxValue}:null,pixels:{numBlocksX:a.pixels.numBlocksX,numBlocksY:a.pixels.numBlocksY,numBytes:a.pixels.numBytes,maxValue:a.pixels.maxValue,minValue:a.pixels.minValue,noDataValue:this.noDataValue}}};return a})},"esri/Viewpoint":function(){define(["./core/JSONSupport","./Camera","./geometry/support/typeUtils","./geometry/support/jsonUtils"],
function(a,h,n,e){var k=a.createSubclass({declaredClass:"esri.Viewpoint",properties:{rotation:{type:Number,value:0,cast:function(a){a%=360;0>a&&(a+=360);return a},json:{write:!0}},scale:{type:Number,value:0,json:{write:!0}},targetGeometry:{value:null,types:n.types,json:{read:function(a){return e.fromJSON(a)},write:!0}},camera:{value:null,type:h,json:{write:!0}}},clone:function(){return new k({rotation:this.rotation,scale:this.scale,targetGeometry:this.targetGeometry?this.targetGeometry.clone():null,
camera:this.camera?this.camera.clone():null})}});return k})},"esri/Camera":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/JSONSupport ./geometry/Point ./views/3d/support/mathUtils ./core/accessorSupport/decorators".split(" "),function(a,h,n,e,k,l,q,g){return function(a){function b(b,c,f,e){b=a.call(this)||this;b.position=null;b.heading=0;b.tilt=0;b.fov=55;return b}n(b,a);c=b;b.prototype.getDefaults=function(a){if(!a.position)return{position:new l([0,
0,0])}};b.prototype.normalizeCtorArgs=function(a,b,c,f){a&&"object"===typeof a&&("x"in a||Array.isArray(a))&&(a={position:a},null!=b&&(a.heading=b),null!=c&&(a.tilt=c),null!=f&&(a.fov=f));return a};b.prototype.equals=function(a){return a?this.tilt===a.tilt&&this.heading===a.heading&&this.fov===a.fov&&this.position.equals(a.position):!1};b.prototype.clone=function(){return new c({position:this.position.clone(),heading:this.heading,tilt:this.tilt,fov:this.fov})};e([g.property({type:l,json:{write:{isRequired:!0}}})],
b.prototype,"position",void 0);e([g.property({type:Number,json:{write:{isRequired:!0}}}),g.cast(q.cyclicalDeg.normalize)],b.prototype,"heading",void 0);e([g.property({type:Number,json:{write:{isRequired:!0}}}),g.cast(function(a){return q.clamp(a,-180,180)})],b.prototype,"tilt",void 0);e([g.property({json:{read:!1,write:!1}})],b.prototype,"fov",void 0);return b=c=e([g.subclass("esri.Camera")],b);var c}(g.declared(k))})},"esri/views/3d/support/mathUtils":function(){define(["require","exports","../lib/glMatrix"],
function(a,h,n){function e(a){return Math.acos(1<a?1:-1>a?-1:a)}function k(a,b,c){return a<b?b:a>c?c:a}function l(a){for(var b in a){var c=a[b];c instanceof Function&&(a[b]=c.bind(a))}return a}Object.defineProperty(h,"__esModule",{value:!0});h.deg2rad=function(a){return a*Math.PI/180};h.rad2deg=function(a){return 180*a/Math.PI};h.asin=function(a){return Math.asin(1<a?1:-1>a?-1:a)};h.acos=e;h.sign=Math.sign||function(a){return+(0<a)-+(0>a)||+a};h.log2=Math.log2||function(a){return Math.log(a)/Math.LN2};
h.fovx2fovy=function(a,b,c){return 2*Math.atan(c*Math.tan(.5*a)/b)};h.fovy2fovx=function(a,b,c){return 2*Math.atan(b*Math.tan(.5*a)/c)};h.lerp=function(a,b,c){return a+(b-a)*c};h.bilerp=function(a,b,c,e,g,k){a+=(b-a)*g;return a+(c+(e-c)*g-a)*k};h.slerp=function(a,b,c,e){void 0===e&&(e=a);var f=n.vec3d.length(a),k=n.vec3d.length(b),l=n.vec3d.dot(a,b)/f/k;.999999999999>l?(n.vec3d.cross(a,b,q),n.mat4d.identity(g),n.mat4d.rotate(g,c*Math.acos(l),q),n.mat4d.multiplyVec3(g,a,e),n.vec3d.scale(e,((1-c)*f+
c*k)/f)):n.vec3d.lerp(a,b,c,e);return e};h.slerpOrLerp=function(a,b,c,e,k){var f=n.vec3d.length(a),l=n.vec3d.length(b);n.vec3d.cross(a,b,q);n.vec3d.length(q)/f/l>k?(b=Math.acos(n.vec3d.dot(a,b)/f/l),n.mat4d.identity(g),n.mat4d.rotate(g,c*b,q),n.mat4d.multiplyVec3(g,a,e),n.vec3d.scale(e,((1-c)*f+c*l)/f)):n.vec3d.lerp(a,b,c,e);return e};h.angle=function(a,g,k){a=n.vec3d.normalize(a,c);g=n.vec3d.normalize(g,b);var f=e(n.vec3d.dot(a,g));return k&&(a=n.vec3d.cross(a,g,q),0>n.vec3d.dot(a,k))?-f:f};h.clamp=
k;h.isFinite=Number.isFinite||function(a){return"number"===typeof a&&window.isFinite(a)};h.isNaN=Number.isNaN||function(a){return a!==a};h.makePiecewiseLinearFunction=function(a){var b=a.length;return function(c){var f=0;if(c<=a[0][0])return a[0][1];if(c>=a[b-1][0])return a[b-1][1];for(;c>a[f][0];)f++;var e=a[f][0];c=(e-c)/(e-a[f-1][0]);return c*a[f-1][1]+(1-c)*a[f][1]}};h.vectorEquals=function(a,b){if(null==a||null==b)return a!==b;if(a.length!==b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!==
b[c])return!1;return!0};h.floatEqualRelative=function(a,b,c){void 0===c&&(c=1E-6);if(h.isNaN(a)||h.isNaN(b))return!1;if(a===b)return!0;var f=Math.abs(a-b),e=Math.abs(a),g=Math.abs(b);if(0===a||0===b||1E-12>e&&1E-12>g){if(f>.01*c)return!1}else if(f/(e+g)>c)return!1;return!0};h.floatEqualAbsolute=function(a,b,c){void 0===c&&(c=1E-6);return h.isNaN(a)||h.isNaN(b)?!1:(a>b?a-b:b-a)<=c};a=function(){function a(a,b){this.min=a;this.max=b;this.range=b-a}a.prototype.ndiff=function(a,b){void 0===b&&(b=0);return Math.ceil((a-
b)/this.range)*this.range+b};a.prototype._normalize=function(a,b,c,f){void 0===f&&(f=0);c-=f;c<a?c+=this.ndiff(a-c):c>b&&(c-=this.ndiff(c-b));return c+f};a.prototype.normalize=function(a,b){return this._normalize(this.min,this.max,a,b)};a.prototype.clamp=function(a,b){void 0===b&&(b=0);return k(a-b,this.min,this.max)+b};a.prototype.monotonic=function(a,b,c){return a<b?b:b+this.ndiff(a-b,c)};a.prototype.minimalMonotonic=function(a,b,c){return this._normalize(a,a+this.range,b,c)};a.prototype.center=
function(a,b,c){b=this.monotonic(a,b,c);return this.normalize((a+b)/2,c)};a.prototype.diff=function(a,b,c){return this.monotonic(a,b,c)-a};a.prototype.contains=function(a,b,c){b=this.minimalMonotonic(a,b);c=this.minimalMonotonic(a,c);return c>a&&c<b};return a}();h.Cyclical=a;h.cyclical2PI=l(new a(0,2*Math.PI));h.cyclicalPI=l(new a(-Math.PI,Math.PI));h.cyclicalDeg=l(new a(0,360));var q=n.vec3d.create(),g=n.mat4d.create(),c=n.vec3d.create(),b=n.vec3d.create()})},"esri/views/3d/lib/glMatrix":function(){define([],
function(){var a={};(function(a,n){n(a,!0);n(a,!1)})(a,function(a,n){var e={};(function(){if("undefined"!=typeof Float32Array){var a=new Float32Array(1),b=new Int32Array(a.buffer);e.invsqrt=function(d){a[0]=d;b[0]=1597463007-(b[0]>>1);var c=a[0];return c*(1.5-.5*d*c*c)}}else e.invsqrt=function(a){return 1/Math.sqrt(a)}})();var k=Array;"undefined"!=typeof Float32Array&&(k=n?Float32Array:Array);var l={create:function(a){var d=new k(3);a?(d[0]=a[0],d[1]=a[1],d[2]=a[2]):d[0]=d[1]=d[2]=0;return d},createFrom:function(a,
b,c){var d=new k(3);d[0]=a;d[1]=b;d[2]=c;return d},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];return b},set3:function(a,b,c,f){f[0]=a;f[1]=b;f[2]=c;return f},add:function(a,b,c){if(!c||a===c)return a[0]+=b[0],a[1]+=b[1],a[2]+=b[2],a;c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];return c},subtract:function(a,b,c){if(!c||a===c)return a[0]-=b[0],a[1]-=b[1],a[2]-=b[2],a;c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];return c},multiply:function(a,b,c){if(!c||a===c)return a[0]*=b[0],a[1]*=b[1],a[2]*=
b[2],a;c[0]=a[0]*b[0];c[1]=a[1]*b[1];c[2]=a[2]*b[2];return c},max:function(a,b,c){c[0]=Math.max(a[0],b[0]);c[1]=Math.max(a[1],b[1]);c[2]=Math.max(a[2],b[2]);return c},min:function(a,b,c){c[0]=Math.min(a[0],b[0]);c[1]=Math.min(a[1],b[1]);c[2]=Math.min(a[2],b[2]);return c},negate:function(a,b){b||(b=a);b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];return b},scale:function(a,b,c){if(!c||a===c)return a[0]*=b,a[1]*=b,a[2]*=b,a;c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;return c},normalize:function(a,b){b||(b=a);var d=a[0],
c=a[1];a=a[2];var m=Math.sqrt(d*d+c*c+a*a);if(!m)return b[0]=0,b[1]=0,b[2]=0,b;if(1===m)return b[0]=d,b[1]=c,b[2]=a,b;m=1/m;b[0]=d*m;b[1]=c*m;b[2]=a*m;return b},cross:function(a,b,c){c||(c=a);var d=a[0],m=a[1];a=a[2];var f=b[0],e=b[1];b=b[2];c[0]=m*b-a*e;c[1]=a*f-d*b;c[2]=d*e-m*f;return c},length:function(a){var b=a[0],d=a[1];a=a[2];return Math.sqrt(b*b+d*d+a*a)},length2:function(a){var b=a[0],d=a[1];a=a[2];return b*b+d*d+a*a},dot:function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]},direction:function(a,
b,c){c||(c=a);var d=a[0]-b[0],m=a[1]-b[1];a=a[2]-b[2];b=Math.sqrt(d*d+m*m+a*a);if(!b)return c[0]=0,c[1]=0,c[2]=0,c;b=1/b;c[0]=d*b;c[1]=m*b;c[2]=a*b;return c},lerp:function(a,b,c,f){f||(f=a);f[0]=a[0]+c*(b[0]-a[0]);f[1]=a[1]+c*(b[1]-a[1]);f[2]=a[2]+c*(b[2]-a[2]);return f},dist:function(a,b){var d=b[0]-a[0],c=b[1]-a[1];a=b[2]-a[2];return Math.sqrt(d*d+c*c+a*a)},dist2:function(a,b){var d=b[0]-a[0],c=b[1]-a[1];a=b[2]-a[2];return d*d+c*c+a*a}},h=null,g=new k(4);l.unproject=function(a,b,c,f,e){e||(e=a);
h||(h=w.create());var d=h;g[0]=2*(a[0]-f[0])/f[2]-1;g[1]=2*(a[1]-f[1])/f[3]-1;g[2]=2*a[2]-1;g[3]=1;w.multiply(c,b,d);if(!w.inverse(d))return null;w.multiplyVec4(d,g);if(0===g[3])return null;e[0]=g[0]/g[3];e[1]=g[1]/g[3];e[2]=g[2]/g[3];return e};var c=l.createFrom(1,0,0),b=l.createFrom(0,1,0),f=l.createFrom(0,0,1);l.rotationTo=function(a,m,e){e||(e=t.create());var d=l.dot(a,m),p=l.create();if(1<=d)t.set(u,e);else if(-.999999>d)l.cross(c,a,p),1E-6>p.length&&l.cross(b,a,p),1E-6>p.length&&l.cross(f,a,
p),l.normalize(p),t.fromAxisAngle(p,Math.PI,e);else{var d=Math.sqrt(2*(1+d)),g=1/d;l.cross(a,m,p);e[0]=p[0]*g;e[1]=p[1]*g;e[2]=p[2]*g;e[3]=.5*d;t.normalize(e)}1<e[3]?e[3]=1:-1>e[3]&&(e[3]=-1);return e};var r=l.create(),v=l.create();l.project=function(a,b,c,f){f||(f=a);l.direction(b,c,r);l.subtract(a,b,v);a=l.dot(r,v);l.scale(r,a,f);l.add(f,b,f)};l.str=function(a){return"["+a[0]+", "+a[1]+", "+a[2]+"]"};var x={create:function(a){var b=new k(9);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b[4]=a[4],b[5]=
a[5],b[6]=a[6],b[7]=a[7],b[8]=a[8]):b[0]=b[1]=b[2]=b[3]=b[4]=b[5]=b[6]=b[7]=b[8]=0;return b},createFrom:function(a,b,c,f,e,p,g,l,h){var d=new k(9);d[0]=a;d[1]=b;d[2]=c;d[3]=f;d[4]=e;d[5]=p;d[6]=g;d[7]=l;d[8]=h;return d},determinant:function(a){var b=a[3],d=a[4],c=a[5],f=a[6],e=a[7],p=a[8];return a[0]*(p*d-c*e)+a[1]*(-p*b+c*f)+a[2]*(e*b-d*f)},inverse:function(a,b){var d=a[0],c=a[1],m=a[2],f=a[3],e=a[4],p=a[5],g=a[6],k=a[7];a=a[8];var l=a*e-p*k,h=-a*f+p*g,q=k*f-e*g,n=d*l+c*h+m*q;if(!n)return null;n=
1/n;b||(b=x.create());b[0]=l*n;b[1]=(-a*c+m*k)*n;b[2]=(p*c-m*e)*n;b[3]=h*n;b[4]=(a*d-m*g)*n;b[5]=(-p*d+m*f)*n;b[6]=q*n;b[7]=(-k*d+c*g)*n;b[8]=(e*d-c*f)*n;return b},multiply:function(a,b,c){c||(c=a);var d=a[0],m=a[1],f=a[2],e=a[3],p=a[4],g=a[5],k=a[6],l=a[7];a=a[8];var h=b[0],y=b[1],q=b[2],n=b[3],r=b[4],t=b[5],u=b[6],v=b[7];b=b[8];c[0]=h*d+y*e+q*k;c[1]=h*m+y*p+q*l;c[2]=h*f+y*g+q*a;c[3]=n*d+r*e+t*k;c[4]=n*m+r*p+t*l;c[5]=n*f+r*g+t*a;c[6]=u*d+v*e+b*k;c[7]=u*m+v*p+b*l;c[8]=u*f+v*g+b*a;return c},add:function(a,
b,c){c||(c=a);c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];c[3]=a[3]+b[3];c[4]=a[4]+b[4];c[5]=a[5]+b[5];c[6]=a[6]+b[6];c[7]=a[7]+b[7];c[8]=a[8]+b[8];return c},subtract:function(a,b,c){c||(c=a);c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];c[3]=a[3]-b[3];c[4]=a[4]-b[4];c[5]=a[5]-b[5];c[6]=a[6]-b[6];c[7]=a[7]-b[7];c[8]=a[8]-b[8];return c},multiplyVec2:function(a,b,c){c||(c=b);var d=b[0];b=b[1];c[0]=d*a[0]+b*a[3]+a[6];c[1]=d*a[1]+b*a[4]+a[7];return c},multiplyVec3:function(a,b,c){c||(c=b);var d=b[0],
m=b[1];b=b[2];c[0]=d*a[0]+m*a[3]+b*a[6];c[1]=d*a[1]+m*a[4]+b*a[7];c[2]=d*a[2]+m*a[5]+b*a[8];return c},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];return b},identity:function(a){a||(a=x.create());a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=1;a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a},transpose:function(a,b){if(!b||a===b){b=a[1];var d=a[2],c=a[5];a[1]=a[3];a[2]=a[6];a[3]=b;a[5]=a[7];a[6]=d;a[7]=c;return a}b[0]=a[0];b[1]=a[3];b[2]=a[6];b[3]=a[1];b[4]=a[4];
b[5]=a[7];b[6]=a[2];b[7]=a[5];b[8]=a[8];return b},toMat4:function(a,b){b||(b=w.create());b[15]=1;b[14]=0;b[13]=0;b[12]=0;b[11]=0;b[10]=a[8];b[9]=a[7];b[8]=a[6];b[7]=0;b[6]=a[5];b[5]=a[4];b[4]=a[3];b[3]=0;b[2]=a[2];b[1]=a[1];b[0]=a[0];return b},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+"]"}},w={create:function(a){var b=new k(16);4===arguments.length?(b[0]=arguments[0],b[1]=arguments[1],b[2]=arguments[2],b[3]=arguments[3],b[4]=arguments[4],
b[5]=arguments[5],b[6]=arguments[6],b[7]=arguments[7],b[8]=arguments[8],b[9]=arguments[9],b[10]=arguments[10],b[11]=arguments[11],b[12]=arguments[12],b[13]=arguments[13],b[14]=arguments[14],b[15]=arguments[15]):a&&(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b[4]=a[4],b[5]=a[5],b[6]=a[6],b[7]=a[7],b[8]=a[8],b[9]=a[9],b[10]=a[10],b[11]=a[11],b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]);return b},createFrom:function(a,b,c,f,e,p,g,l,h,q,n,r,t,u,v,x){var d=new k(16);d[0]=a;d[1]=b;d[2]=c;d[3]=f;d[4]=e;
d[5]=p;d[6]=g;d[7]=l;d[8]=h;d[9]=q;d[10]=n;d[11]=r;d[12]=t;d[13]=u;d[14]=v;d[15]=x;return d},createFromMatrixRowMajor:function(a){var b=new k(16);b[0]=a[0];b[4]=a[1];b[8]=a[2];b[12]=a[3];b[1]=a[4];b[5]=a[5];b[9]=a[6];b[13]=a[7];b[2]=a[8];b[6]=a[9];b[10]=a[10];b[14]=a[11];b[3]=a[12];b[7]=a[13];b[11]=a[14];b[15]=a[15];return b},createFromMatrix:function(a){var b=new k(16);b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=
a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return b},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return b},setRowMajor:function(a,b){b[0]=a[0];b[4]=a[1];b[8]=a[2];b[12]=a[3];b[1]=a[4];b[5]=a[5];b[9]=a[6];b[13]=a[7];b[2]=a[8];b[6]=a[9];b[10]=a[10];b[14]=a[11];b[3]=a[12];b[7]=a[13];b[11]=a[14];b[15]=a[15];return b},identity:function(a){a||(a=w.create());a[0]=
1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a},transpose:function(a,b){if(!b||a===b){b=a[1];var d=a[2],c=a[3],m=a[6],f=a[7],e=a[11];a[1]=a[4];a[2]=a[8];a[3]=a[12];a[4]=b;a[6]=a[9];a[7]=a[13];a[8]=d;a[9]=m;a[11]=a[14];a[12]=c;a[13]=f;a[14]=e;return a}b[0]=a[0];b[1]=a[4];b[2]=a[8];b[3]=a[12];b[4]=a[1];b[5]=a[5];b[6]=a[9];b[7]=a[13];b[8]=a[2];b[9]=a[6];b[10]=a[10];b[11]=a[14];b[12]=a[3];b[13]=a[7];b[14]=a[11];b[15]=a[15];return b},
determinant:function(a){var b=a[0],d=a[1],c=a[2],f=a[3],e=a[4],p=a[5],g=a[6],k=a[7],l=a[8],h=a[9],q=a[10],n=a[11],r=a[12],t=a[13],u=a[14];a=a[15];return r*h*g*f-l*t*g*f-r*p*q*f+e*t*q*f+l*p*u*f-e*h*u*f-r*h*c*k+l*t*c*k+r*d*q*k-b*t*q*k-l*d*u*k+b*h*u*k+r*p*c*n-e*t*c*n-r*d*g*n+b*t*g*n+e*d*u*n-b*p*u*n-l*p*c*a+e*h*c*a+l*d*g*a-b*h*g*a-e*d*q*a+b*p*q*a},inverse:function(a,b){b||(b=a);var d=a[0],c=a[1],m=a[2],f=a[3],e=a[4],p=a[5],g=a[6],k=a[7],l=a[8],h=a[9],q=a[10],n=a[11],r=a[12],t=a[13],u=a[14];a=a[15];var v=
d*p-c*e,x=d*g-m*e,w=d*k-f*e,N=c*g-m*p,U=c*k-f*p,P=m*k-f*g,ga=l*t-h*r,X=l*u-q*r,T=l*a-n*r,V=h*u-q*t,da=h*a-n*t,ja=q*a-n*u,ka=v*ja-x*da+w*V+N*T-U*X+P*ga;if(!ka)return null;ka=1/ka;b[0]=(p*ja-g*da+k*V)*ka;b[1]=(-c*ja+m*da-f*V)*ka;b[2]=(t*P-u*U+a*N)*ka;b[3]=(-h*P+q*U-n*N)*ka;b[4]=(-e*ja+g*T-k*X)*ka;b[5]=(d*ja-m*T+f*X)*ka;b[6]=(-r*P+u*w-a*x)*ka;b[7]=(l*P-q*w+n*x)*ka;b[8]=(e*da-p*T+k*ga)*ka;b[9]=(-d*da+c*T-f*ga)*ka;b[10]=(r*U-t*w+a*v)*ka;b[11]=(-l*U+h*w-n*v)*ka;b[12]=(-e*V+p*X-g*ga)*ka;b[13]=(d*V-c*X+m*
ga)*ka;b[14]=(-r*N+t*x-u*v)*ka;b[15]=(l*N-h*x+q*v)*ka;return b},toRotationMat:function(a,b){b||(b=w.create());b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b},toMat3:function(a,b){b||(b=x.create());b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[4];b[4]=a[5];b[5]=a[6];b[6]=a[8];b[7]=a[9];b[8]=a[10];return b},toInverseMat3:function(a,b){var d=a[0],c=a[1],m=a[2],f=a[4],e=a[5],p=a[6],g=a[8],k=a[9];
a=a[10];var l=a*e-p*k,h=-a*f+p*g,q=k*f-e*g,n=d*l+c*h+m*q;if(!n)return null;n=1/n;b||(b=x.create());b[0]=l*n;b[1]=(-a*c+m*k)*n;b[2]=(p*c-m*e)*n;b[3]=h*n;b[4]=(a*d-m*g)*n;b[5]=(-p*d+m*f)*n;b[6]=q*n;b[7]=(-k*d+c*g)*n;b[8]=(e*d-c*f)*n;return b},multiply:function(a,b,c){c||(c=a);var d=a[0],m=a[1],f=a[2],e=a[3],p=a[4],g=a[5],k=a[6],l=a[7],h=a[8],y=a[9],q=a[10],n=a[11],r=a[12],t=a[13],u=a[14];a=a[15];var v=b[0],x=b[1],w=b[2],U=b[3],P=b[4],ga=b[5],X=b[6],T=b[7],V=b[8],da=b[9],ja=b[10],ka=b[11],xa=b[12],qa=
b[13],wa=b[14];b=b[15];c[0]=v*d+x*p+w*h+U*r;c[1]=v*m+x*g+w*y+U*t;c[2]=v*f+x*k+w*q+U*u;c[3]=v*e+x*l+w*n+U*a;c[4]=P*d+ga*p+X*h+T*r;c[5]=P*m+ga*g+X*y+T*t;c[6]=P*f+ga*k+X*q+T*u;c[7]=P*e+ga*l+X*n+T*a;c[8]=V*d+da*p+ja*h+ka*r;c[9]=V*m+da*g+ja*y+ka*t;c[10]=V*f+da*k+ja*q+ka*u;c[11]=V*e+da*l+ja*n+ka*a;c[12]=xa*d+qa*p+wa*h+b*r;c[13]=xa*m+qa*g+wa*y+b*t;c[14]=xa*f+qa*k+wa*q+b*u;c[15]=xa*e+qa*l+wa*n+b*a;return c},multiplyVec3:function(a,b,c){c||(c=b);var d=b[0],m=b[1];b=b[2];c[0]=a[0]*d+a[4]*m+a[8]*b+a[12];c[1]=
a[1]*d+a[5]*m+a[9]*b+a[13];c[2]=a[2]*d+a[6]*m+a[10]*b+a[14];return c},multiplyVec4:function(a,b,c){c||(c=b);var d=b[0],m=b[1],f=b[2];b=b[3];c[0]=a[0]*d+a[4]*m+a[8]*f+a[12]*b;c[1]=a[1]*d+a[5]*m+a[9]*f+a[13]*b;c[2]=a[2]*d+a[6]*m+a[10]*f+a[14]*b;c[3]=a[3]*d+a[7]*m+a[11]*f+a[15]*b;return c},translate:function(a,b,c){var d=b[0],m=b[1];b=b[2];var f,e,p,g,k,l,h,y,q,n,r,t;if(!c||a===c)return a[12]=a[0]*d+a[4]*m+a[8]*b+a[12],a[13]=a[1]*d+a[5]*m+a[9]*b+a[13],a[14]=a[2]*d+a[6]*m+a[10]*b+a[14],a[15]=a[3]*d+a[7]*
m+a[11]*b+a[15],a;f=a[0];e=a[1];p=a[2];g=a[3];k=a[4];l=a[5];h=a[6];y=a[7];q=a[8];n=a[9];r=a[10];t=a[11];c[0]=f;c[1]=e;c[2]=p;c[3]=g;c[4]=k;c[5]=l;c[6]=h;c[7]=y;c[8]=q;c[9]=n;c[10]=r;c[11]=t;c[12]=f*d+k*m+q*b+a[12];c[13]=e*d+l*m+n*b+a[13];c[14]=p*d+h*m+r*b+a[14];c[15]=g*d+y*m+t*b+a[15];return c},scale:function(a,b,c){var d=b[0],m=b[1];b=b[2];if(!c||a===c)return a[0]*=d,a[1]*=d,a[2]*=d,a[3]*=d,a[4]*=m,a[5]*=m,a[6]*=m,a[7]*=m,a[8]*=b,a[9]*=b,a[10]*=b,a[11]*=b,a;c[0]=a[0]*d;c[1]=a[1]*d;c[2]=a[2]*d;c[3]=
a[3]*d;c[4]=a[4]*m;c[5]=a[5]*m;c[6]=a[6]*m;c[7]=a[7]*m;c[8]=a[8]*b;c[9]=a[9]*b;c[10]=a[10]*b;c[11]=a[11]*b;c[12]=a[12];c[13]=a[13];c[14]=a[14];c[15]=a[15];return c},maxScale:function(a){return Math.max(Math.max(Math.sqrt(a[0]*a[0]+a[4]*a[4]+a[8]*a[8]),Math.sqrt(a[1]*a[1]+a[5]*a[5]+a[9]*a[9])),Math.sqrt(a[2]*a[2]+a[6]*a[6]+a[10]*a[10]))},rotate:function(a,b,c,f){var d=c[0],m=c[1];c=c[2];var e=Math.sqrt(d*d+m*m+c*c),p,g,k,l,h,y,q,n,r,t,u,v,x,w,z,P,ga,X,T,V;if(!e)return null;1!==e&&(e=1/e,d*=e,m*=e,
c*=e);p=Math.sin(b);g=Math.cos(b);k=1-g;b=a[0];e=a[1];l=a[2];h=a[3];y=a[4];q=a[5];n=a[6];r=a[7];t=a[8];u=a[9];v=a[10];x=a[11];w=d*d*k+g;z=m*d*k+c*p;P=c*d*k-m*p;ga=d*m*k-c*p;X=m*m*k+g;T=c*m*k+d*p;V=d*c*k+m*p;d=m*c*k-d*p;m=c*c*k+g;f?a!==f&&(f[12]=a[12],f[13]=a[13],f[14]=a[14],f[15]=a[15]):f=a;f[0]=b*w+y*z+t*P;f[1]=e*w+q*z+u*P;f[2]=l*w+n*z+v*P;f[3]=h*w+r*z+x*P;f[4]=b*ga+y*X+t*T;f[5]=e*ga+q*X+u*T;f[6]=l*ga+n*X+v*T;f[7]=h*ga+r*X+x*T;f[8]=b*V+y*d+t*m;f[9]=e*V+q*d+u*m;f[10]=l*V+n*d+v*m;f[11]=h*V+r*d+x*m;
return f},rotateX:function(a,b,c){var d=Math.sin(b);b=Math.cos(b);var m=a[4],f=a[5],e=a[6],p=a[7],g=a[8],k=a[9],l=a[10],h=a[11];c?a!==c&&(c[0]=a[0],c[1]=a[1],c[2]=a[2],c[3]=a[3],c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15]):c=a;c[4]=m*b+g*d;c[5]=f*b+k*d;c[6]=e*b+l*d;c[7]=p*b+h*d;c[8]=m*-d+g*b;c[9]=f*-d+k*b;c[10]=e*-d+l*b;c[11]=p*-d+h*b;return c},rotateY:function(a,b,c){var d=Math.sin(b);b=Math.cos(b);var m=a[0],f=a[1],e=a[2],p=a[3],g=a[8],k=a[9],l=a[10],h=a[11];c?a!==c&&(c[4]=a[4],c[5]=a[5],c[6]=
a[6],c[7]=a[7],c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15]):c=a;c[0]=m*b+g*-d;c[1]=f*b+k*-d;c[2]=e*b+l*-d;c[3]=p*b+h*-d;c[8]=m*d+g*b;c[9]=f*d+k*b;c[10]=e*d+l*b;c[11]=p*d+h*b;return c},rotateZ:function(a,b,c){var d=Math.sin(b);b=Math.cos(b);var m=a[0],f=a[1],e=a[2],p=a[3],g=a[4],k=a[5],l=a[6],h=a[7];c?a!==c&&(c[8]=a[8],c[9]=a[9],c[10]=a[10],c[11]=a[11],c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15]):c=a;c[0]=m*b+g*d;c[1]=f*b+k*d;c[2]=e*b+l*d;c[3]=p*b+h*d;c[4]=m*-d+g*b;c[5]=f*-d+k*b;c[6]=e*-d+
l*b;c[7]=p*-d+h*b;return c},frustum:function(a,b,c,f,e,p,g){g||(g=w.create());var d=b-a,m=f-c,k=p-e;g[0]=2*e/d;g[1]=0;g[2]=0;g[3]=0;g[4]=0;g[5]=2*e/m;g[6]=0;g[7]=0;g[8]=(b+a)/d;g[9]=(f+c)/m;g[10]=-(p+e)/k;g[11]=-1;g[12]=0;g[13]=0;g[14]=-(p*e*2)/k;g[15]=0;return g},perspective:function(a,b,c,f,e){a=c*Math.tan(a*Math.PI/360);b*=a;return w.frustum(-b,b,-a,a,c,f,e)},ortho:function(a,b,c,f,e,p,g){g||(g=w.create());var d=b-a,m=f-c,k=p-e;g[0]=2/d;g[1]=0;g[2]=0;g[3]=0;g[4]=0;g[5]=2/m;g[6]=0;g[7]=0;g[8]=0;
g[9]=0;g[10]=-2/k;g[11]=0;g[12]=-(a+b)/d;g[13]=-(f+c)/m;g[14]=-(p+e)/k;g[15]=1;return g},lookAt:function(a,b,c,f){f||(f=w.create());var d,m,e,p,g,k,l,h,y=a[0],q=a[1];a=a[2];e=c[0];p=c[1];m=c[2];l=b[0];c=b[1];d=b[2];if(y===l&&q===c&&a===d)return w.identity(f);b=y-l;c=q-c;l=a-d;h=1/Math.sqrt(b*b+c*c+l*l);b*=h;c*=h;l*=h;d=p*l-m*c;m=m*b-e*l;e=e*c-p*b;(h=Math.sqrt(d*d+m*m+e*e))?(h=1/h,d*=h,m*=h,e*=h):e=m=d=0;p=c*e-l*m;g=l*d-b*e;k=b*m-c*d;(h=Math.sqrt(p*p+g*g+k*k))?(h=1/h,p*=h,g*=h,k*=h):k=g=p=0;f[0]=d;
f[1]=p;f[2]=b;f[3]=0;f[4]=m;f[5]=g;f[6]=c;f[7]=0;f[8]=e;f[9]=k;f[10]=l;f[11]=0;f[12]=-(d*y+m*q+e*a);f[13]=-(p*y+g*q+k*a);f[14]=-(b*y+c*q+l*a);f[15]=1;return f},fromRotationTranslation:function(a,b,c){c||(c=w.create());var d=a[0],m=a[1],f=a[2],e=a[3],p=d+d,g=m+m,k=f+f;a=d*p;var l=d*g,d=d*k,h=m*g,m=m*k,f=f*k,p=e*p,g=e*g,e=e*k;c[0]=1-(h+f);c[1]=l+e;c[2]=d-g;c[3]=0;c[4]=l-e;c[5]=1-(a+f);c[6]=m+p;c[7]=0;c[8]=d+g;c[9]=m-p;c[10]=1-(a+h);c[11]=0;c[12]=b[0];c[13]=b[1];c[14]=b[2];c[15]=1;return c},str:function(a){return"["+
a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+", "+a[9]+", "+a[10]+", "+a[11]+", "+a[12]+", "+a[13]+", "+a[14]+", "+a[15]+"]"}},t={create:function(a){var b=new k(4);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3]):b[0]=b[1]=b[2]=b[3]=0;return b},createFrom:function(a,b,c,f){var d=new k(4);d[0]=a;d[1]=b;d[2]=c;d[3]=f;return d},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b},identity:function(a){a||(a=t.create());a[0]=0;a[1]=0;a[2]=0;a[3]=1;return a}},
u=t.identity();t.calculateW=function(a,b){var c=a[0],d=a[1],m=a[2];if(!b||a===b)return a[3]=-Math.sqrt(Math.abs(1-c*c-d*d-m*m)),a;b[0]=c;b[1]=d;b[2]=m;b[3]=-Math.sqrt(Math.abs(1-c*c-d*d-m*m));return b};t.dot=function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]};t.inverse=function(a,b){var c=a[0],d=a[1],m=a[2],f=a[3],c=(c=c*c+d*d+m*m+f*f)?1/c:0;if(!b||a===b)return a[0]*=-c,a[1]*=-c,a[2]*=-c,a[3]*=c,a;b[0]=-a[0]*c;b[1]=-a[1]*c;b[2]=-a[2]*c;b[3]=a[3]*c;return b};t.conjugate=function(a,b){if(!b||
a===b)return a[0]*=-1,a[1]*=-1,a[2]*=-1,a;b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];b[3]=a[3];return b};t.length=function(a){var b=a[0],c=a[1],d=a[2];a=a[3];return Math.sqrt(b*b+c*c+d*d+a*a)};t.normalize=function(a,b){b||(b=a);var c=a[0],d=a[1],m=a[2];a=a[3];var f=Math.sqrt(c*c+d*d+m*m+a*a);if(0===f)return b[0]=0,b[1]=0,b[2]=0,b[3]=0,b;f=1/f;b[0]=c*f;b[1]=d*f;b[2]=m*f;b[3]=a*f;return b};t.add=function(a,b,c){if(!c||a===c)return a[0]+=b[0],a[1]+=b[1],a[2]+=b[2],a[3]+=b[3],a;c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=
a[2]+b[2];c[3]=a[3]+b[3];return c};t.multiply=function(a,b,c){c||(c=a);var d=a[0],m=a[1],f=a[2];a=a[3];var e=b[0],p=b[1],g=b[2];b=b[3];c[0]=d*b+a*e+m*g-f*p;c[1]=m*b+a*p+f*e-d*g;c[2]=f*b+a*g+d*p-m*e;c[3]=a*b-d*e-m*p-f*g;return c};t.multiplyVec3=function(a,b,c){c||(c=b);var d=b[0],m=b[1],f=b[2];b=a[0];var e=a[1],p=a[2];a=a[3];var g=a*d+e*f-p*m,k=a*m+p*d-b*f,l=a*f+b*m-e*d,d=-b*d-e*m-p*f;c[0]=g*a+d*-b+k*-p-l*-e;c[1]=k*a+d*-e+l*-b-g*-p;c[2]=l*a+d*-p+g*-e-k*-b;return c};t.scale=function(a,b,c){if(!c||a===
c)return a[0]*=b,a[1]*=b,a[2]*=b,a[3]*=b,a;c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;c[3]=a[3]*b;return c};t.toMat3=function(a,b){b||(b=x.create());var c=a[0],d=a[1],m=a[2],f=a[3],e=c+c,p=d+d,g=m+m;a=c*e;var k=c*p,c=c*g,l=d*p,d=d*g,m=m*g,e=f*e,p=f*p,f=f*g;b[0]=1-(l+m);b[1]=k+f;b[2]=c-p;b[3]=k-f;b[4]=1-(a+m);b[5]=d+e;b[6]=c+p;b[7]=d-e;b[8]=1-(a+l);return b};t.toMat4=function(a,b){b||(b=w.create());var c=a[0],d=a[1],m=a[2],f=a[3],e=c+c,p=d+d,g=m+m;a=c*e;var k=c*p,c=c*g,l=d*p,d=d*g,m=m*g,e=f*e,p=f*p,f=f*g;
b[0]=1-(l+m);b[1]=k+f;b[2]=c-p;b[3]=0;b[4]=k-f;b[5]=1-(a+m);b[6]=d+e;b[7]=0;b[8]=c+p;b[9]=d-e;b[10]=1-(a+l);b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b};t.slerp=function(a,b,c,f){f||(f=a);var d=a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3],m,e;if(1<=Math.abs(d))return f!==a&&(f[0]=a[0],f[1]=a[1],f[2]=a[2],f[3]=a[3]),f;m=Math.acos(d);e=Math.sqrt(1-d*d);if(.001>Math.abs(e))return f[0]=.5*a[0]+.5*b[0],f[1]=.5*a[1]+.5*b[1],f[2]=.5*a[2]+.5*b[2],f[3]=.5*a[3]+.5*b[3],f;d=Math.sin((1-c)*m)/e;c=Math.sin(c*
m)/e;f[0]=a[0]*d+b[0]*c;f[1]=a[1]*d+b[1]*c;f[2]=a[2]*d+b[2]*c;f[3]=a[3]*d+b[3]*c;return f};t.fromRotationMatrix=function(a,b){b||(b=t.create());var c=a[0]+a[4]+a[8],d;if(0<c)d=Math.sqrt(c+1),b[3]=.5*d,d=.5/d,b[0]=(a[7]-a[5])*d,b[1]=(a[2]-a[6])*d,b[2]=(a[3]-a[1])*d;else{d=t.fromRotationMatrix.s_iNext=t.fromRotationMatrix.s_iNext||[1,2,0];c=0;a[4]>a[0]&&(c=1);a[8]>a[3*c+c]&&(c=2);var f=d[c],m=d[f];d=Math.sqrt(a[3*c+c]-a[3*f+f]-a[3*m+m]+1);b[c]=.5*d;d=.5/d;b[3]=(a[3*m+f]-a[3*f+m])*d;b[f]=(a[3*f+c]+a[3*
c+f])*d;b[m]=(a[3*m+c]+a[3*c+m])*d}return b};x.toQuat4=t.fromRotationMatrix;(function(){var a=x.create();t.fromAxes=function(b,c,d,f){a[0]=c[0];a[3]=c[1];a[6]=c[2];a[1]=d[0];a[4]=d[1];a[7]=d[2];a[2]=b[0];a[5]=b[1];a[8]=b[2];return t.fromRotationMatrix(a,f)}})();t.identity=function(a){a||(a=t.create());a[0]=0;a[1]=0;a[2]=0;a[3]=1;return a};t.fromAngleAxis=function(a,b,c){c||(c=t.create());a*=.5;var d=Math.sin(a);c[3]=Math.cos(a);c[0]=d*b[0];c[1]=d*b[1];c[2]=d*b[2];return c};t.toAngleAxis=function(a,
b){b||(b=a);var c=a[0]*a[0]+a[1]*a[1]+a[2]*a[2];0<c?(b[3]=2*Math.acos(a[3]),c=e.invsqrt(c),b[0]=a[0]*c,b[1]=a[1]*c,b[2]=a[2]*c):(b[3]=0,b[0]=1,b[1]=0,b[2]=0);return b};t.str=function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"};var p={create:function(a){var b=new k(4);a?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3]):b[0]=b[1]=b[2]=b[3]=0;return b},createFrom:function(a,b,c,f){var d=new k(4);d[0]=a;d[1]=b;d[2]=c;d[3]=f;return d},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b},
identity:function(a){a||(a=p.create());a[0]=1;a[1]=0;a[2]=0;a[3]=1;return a},transpose:function(a,b){if(!b||a===b)return b=a[1],a[1]=a[2],a[2]=b,a;b[0]=a[0];b[1]=a[2];b[2]=a[1];b[3]=a[3];return b},determinant:function(a){return a[0]*a[3]-a[2]*a[1]},inverse:function(a,b){b||(b=a);var c=a[0],d=a[1],f=a[2];a=a[3];var e=c*a-f*d;if(!e)return null;e=1/e;b[0]=a*e;b[1]=-d*e;b[2]=-f*e;b[3]=c*e;return b},multiply:function(a,b,c){c||(c=a);var d=a[0],f=a[1],e=a[2];a=a[3];c[0]=d*b[0]+f*b[2];c[1]=d*b[1]+f*b[3];
c[2]=e*b[0]+a*b[2];c[3]=e*b[1]+a*b[3];return c},rotate:function(a,b,c){c||(c=a);var d=a[0],f=a[1],e=a[2];a=a[3];var m=Math.sin(b);b=Math.cos(b);c[0]=d*b+f*m;c[1]=d*-m+f*b;c[2]=e*b+a*m;c[3]=e*-m+a*b;return c},multiplyVec2:function(a,b,c){c||(c=b);var d=b[0];b=b[1];c[0]=d*a[0]+b*a[1];c[1]=d*a[2]+b*a[3];return c},scale:function(a,b,c){c||(c=a);var d=a[1],f=a[2],e=a[3],m=b[0];b=b[1];c[0]=a[0]*m;c[1]=d*b;c[2]=f*m;c[3]=e*b;return c},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"}};n=n?
"":"d";a["glMath"+n]=e;a["vec2"+n]={create:function(a){var b=new k(2);a?(b[0]=a[0],b[1]=a[1]):(b[0]=0,b[1]=0);return b},createFrom:function(a,b){var c=new k(2);c[0]=a;c[1]=b;return c},add:function(a,b,c){c||(c=b);c[0]=a[0]+b[0];c[1]=a[1]+b[1];return c},subtract:function(a,b,c){c||(c=b);c[0]=a[0]-b[0];c[1]=a[1]-b[1];return c},multiply:function(a,b,c){c||(c=b);c[0]=a[0]*b[0];c[1]=a[1]*b[1];return c},divide:function(a,b,c){c||(c=b);c[0]=a[0]/b[0];c[1]=a[1]/b[1];return c},scale:function(a,b,c){c||(c=
a);c[0]=a[0]*b;c[1]=a[1]*b;return c},dist:function(a,b){var c=b[0]-a[0];a=b[1]-a[1];return Math.sqrt(c*c+a*a)},dist2:function(a,b){var c=b[0]-a[0];a=b[1]-a[1];return c*c+a*a},set:function(a,b){b[0]=a[0];b[1]=a[1];return b},set2:function(a,b,c){c[0]=a;c[1]=b;return c},negate:function(a,b){b||(b=a);b[0]=-a[0];b[1]=-a[1];return b},normalize:function(a,b){b||(b=a);var c=a[0]*a[0]+a[1]*a[1];0<c?(c=Math.sqrt(c),b[0]=a[0]/c,b[1]=a[1]/c):b[0]=b[1]=0;return b},cross:function(a,b,c){a=a[0]*b[1]-a[1]*b[0];if(!c)return a;
c[0]=c[1]=0;c[2]=a;return c},length:function(a){var b=a[0];a=a[1];return Math.sqrt(b*b+a*a)},dot:function(a,b){return a[0]*b[0]+a[1]*b[1]},direction:function(a,b,c){c||(c=a);var d=a[0]-b[0];a=a[1]-b[1];b=d*d+a*a;if(!b)return c[0]=0,c[1]=0,c[2]=0,c;b=1/Math.sqrt(b);c[0]=d*b;c[1]=a*b;return c},lerp:function(a,b,c,f){f||(f=a);f[0]=a[0]+c*(b[0]-a[0]);f[1]=a[1]+c*(b[1]-a[1]);return f},str:function(a){return"["+a[0]+", "+a[1]+"]"}};a["vec3"+n]=l;a["vec4"+n]={create:function(a){var b=new k(4);a?(b[0]=a[0],
b[1]=a[1],b[2]=a[2],b[3]=a[3]):(b[0]=0,b[1]=0,b[2]=0,b[3]=0);return b},createFrom:function(a,b,c,f){var d=new k(4);d[0]=a;d[1]=b;d[2]=c;d[3]=f;return d},add:function(a,b,c){c||(c=b);c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];c[3]=a[3]+b[3];return c},subtract:function(a,b,c){c||(c=b);c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];c[3]=a[3]-b[3];return c},multiply:function(a,b,c){c||(c=b);c[0]=a[0]*b[0];c[1]=a[1]*b[1];c[2]=a[2]*b[2];c[3]=a[3]*b[3];return c},divide:function(a,b,c){c||(c=b);c[0]=a[0]/
b[0];c[1]=a[1]/b[1];c[2]=a[2]/b[2];c[3]=a[3]/b[3];return c},scale:function(a,b,c){c||(c=a);c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;c[3]=a[3]*b;return c},dot:function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b},set4:function(a,b,c,f,e){e[0]=a;e[1]=b;e[2]=c;e[3]=f;return e},negate:function(a,b){b||(b=a);b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];b[3]=-a[3];return b},lerp:function(a,b,c,f){f||(f=a);f[0]=a[0]+c*(b[0]-a[0]);f[1]=a[1]+c*(b[1]-
a[1]);f[2]=a[2]+c*(b[2]-a[2]);f[3]=a[3]+c*(b[3]-a[3]);return f},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"}};a["mat2"+n]=p;a["mat3"+n]=x;a["mat4"+n]=w;a["quat4"+n]=t});return a})},"esri/geometry/support/typeUtils":function(){define("require exports ../../core/accessorSupport/ensureType ../Geometry ../Extent ../Multipoint ../Point ../Polyline ../Polygon".split(" "),function(a,h,n,e,k,l,q,g,c){Object.defineProperty(h,"__esModule",{value:!0});h.types={base:e,key:"type",typeMap:{extent:k,
multipoint:l,point:q,polyline:g,polygon:c}};h.ensureType=n.ensureOneOfType(h.types)})},"esri/geometry/Multipoint":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./Geometry ./Extent ./Point ../core/lang ./support/zmUtils".split(" "),function(a,h,n,e,k,l,q,g,c,b){function f(a){return function(b,c){return null==b?c:null==c?b:a(b,c)}}a=function(a){function l(){for(var b=[],c=0;c<arguments.length;c++)b[c]=arguments[c];
b=a.apply(this,b)||this;b.points=[];b.type="multipoint";return b}n(l,a);h=l;l.prototype.normalizeCtorArgs=function(a,b){if(!a&&!b)return null;var c={};Array.isArray(a)?(c.points=a,c.spatialReference=b):!a||"esri.SpatialReference"!==a.declaredClass&&null==a.wkid?(a.points&&(c.points=a.points),a.spatialReference&&(c.spatialReference=a.spatialReference),a.hasZ&&(c.hasZ=a.hasZ),a.hasM&&(c.hasM=a.hasM)):c.spatialReference=a;if(a=c.points&&c.points[0])void 0===c.hasZ&&void 0===c.hasM?(c.hasZ=2<a.length,
c.hasM=!1):void 0===c.hasZ?c.hasZ=3<a.length:void 0===c.hasM&&(c.hasM=3<a.length);return c};Object.defineProperty(l.prototype,"extent",{get:function(){var a=this.points;if(!a.length)return null;for(var b=new q,c=this.hasZ,e=this.hasM,d=c?3:2,m=a[0],g=f(Math.min),k=f(Math.max),l=m[0],h=m[1],n=m[0],m=m[1],r,x,v,R,Z=0,ba=a.length;Z<ba;Z++){var F=a[Z],Y=F[0],D=F[1],l=g(l,Y),h=g(h,D),n=k(n,Y),m=k(m,D);c&&2<F.length&&(Y=F[2],r=g(r,Y),v=k(v,Y));e&&F.length>d&&(F=F[d],x=g(x,F),R=k(R,F))}b.xmin=l;b.ymin=h;
b.xmax=n;b.ymax=m;b.spatialReference=this.spatialReference;c?(b.zmin=r,b.zmax=v):(b.zmin=null,b.zmax=null);e?(b.mmin=x,b.mmax=R):(b.mmin=null,b.mmax=null);return b},enumerable:!0,configurable:!0});l.prototype.writePoints=function(a,b,f,e){b.points=c.clone(this.points)};l.prototype.addPoint=function(a){this.clearCache();b.updateSupportFromPoint(this,a);Array.isArray(a)?this.points.push(a):this.points.push(a.toArray());return this};l.prototype.clone=function(){var a={points:c.clone(this.points),spatialReference:this.spatialReference};
this.hasZ&&(a.hasZ=!0);this.hasM&&(a.hasM=!0);return new h(a)};l.prototype.getPoint=function(a){if(!this._validateInputs(a))return null;a=this.points[a];var b={x:a[0],y:a[1],spatialReference:this.spatialReference},c=2;this.hasZ&&(b.z=a[2],c=3);this.hasM&&(b.m=a[c]);return new g(b)};l.prototype.removePoint=function(a){if(!this._validateInputs(a))return null;this.clearCache();return new g(this.points.splice(a,1)[0],this.spatialReference)};l.prototype.setPoint=function(a,c){if(!this._validateInputs(a))return this;
this.clearCache();b.updateSupportFromPoint(c);this.points[a]=c.toArray();return this};l.prototype.toJSON=function(a){return this.write(null,a)};l.prototype._validateInputs=function(a){return null!=a&&0<=a&&a<this.points.length};e([k.property({dependsOn:["points","hasZ","hasM","spatialReference"]})],l.prototype,"cache",void 0);e([k.property({dependsOn:["cache"]})],l.prototype,"extent",null);e([k.property({type:[[Number]],json:{write:{isRequired:!0}}})],l.prototype,"points",void 0);e([k.writer("points")],
l.prototype,"writePoints",null);return l=h=e([k.subclass("esri.geometry.Multipoint")],l);var h}(k.declared(l));a.prototype.toJSON.isDefaultToJSON=!0;return a})},"esri/geometry/support/zmUtils":function(){define(["require","exports"],function(a,h){Object.defineProperty(h,"__esModule",{value:!0});h.updateSupportFromPoint=function(a,e,k){void 0===k&&(k=!1);var l=a.hasM,h=a.hasZ;Array.isArray(e)?4!==e.length||l||h?3===e.length&&k&&!l?(h=!0,l=!1):3===e.length&&l&&h&&(h=l=!1):h=l=!0:(h=!h&&e.hasZ&&(!l||
e.hasM),l=!l&&e.hasM&&(!h||e.hasZ));a.hasZ=h;a.hasM=l}})},"esri/geometry/Polyline":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/lang ./Geometry ./Extent ./Point ./SpatialReference ./support/zmUtils".split(" "),function(a,h,n,e,k,l,q,g,c,b,f){function r(a){return function(b,c){return null==b?c:null==c?b:a(b,c)}}var v=r(Math.min),x=r(Math.max);a=function(a){function h(){for(var b=[],c=0;c<arguments.length;c++)b[c]=
arguments[c];b=a.apply(this,b)||this;b.paths=[];b.type="polyline";return b}n(h,a);q=h;h.prototype.normalizeCtorArgs=function(a,c){var d=null,f,e,p=null;a&&!Array.isArray(a)?(d=a.paths?a.paths:null,c||(a.spatialReference?c=a.spatialReference:a.paths||(c=a)),f=a.hasZ,e=a.hasM):d=a;d=d||[];c=c||b.WGS84;d.length&&d[0]&&null!=d[0][0]&&"number"===typeof d[0][0]&&(d=[d]);if(p=d[0]&&d[0][0])void 0===f&&void 0===e?(f=2<p.length,e=!1):void 0===f?f=!e&&3<p.length:void 0===e&&(e=!f&&3<p.length);return{paths:d,
spatialReference:c,hasZ:f,hasM:e}};Object.defineProperty(h.prototype,"extent",{get:function(){var a=this.hasZ,b=this.hasM,c=this.spatialReference,f=this.paths,e=a?3:2;if(!f.length||!f[0].length)return null;for(var k=f[0][0],l=k[0],k=k[1],h=f[0][0],q=h[0],h=h[1],n=void 0,r=void 0,u=void 0,t=void 0,w=[],F=0;F<f.length;F++){for(var Y=f[F],D=Y[0],S=D[0],D=D[1],L=Y[0],M=L[0],L=L[1],ca=void 0,N=void 0,U=void 0,P=void 0,ga=0;ga<Y.length;ga++){var X=Y[ga],T=X[0],V=X[1],l=v(l,T),k=v(k,V),q=x(q,T),h=x(h,V),
S=v(S,T),D=v(D,V),M=x(M,T),L=x(L,V);a&&2<X.length&&(T=X[2],n=v(n,T),r=x(r,T),ca=v(ca,T),N=x(N,T));b&&X.length>e&&(P=X[e],u=v(n,P),t=x(r,P),U=v(ca,P),P=x(N,P))}w.push(new g({xmin:S,ymin:D,zmin:ca,mmin:U,xmax:M,ymax:L,zmax:N,mmax:P,spatialReference:c}))}f=new g;f.xmin=l;f.ymin=k;f.xmax=q;f.ymax=h;f.spatialReference=c;a&&(f.zmin=n,f.zmax=r);b&&(f.mmin=u,f.mmax=t);f.cache._partwise=1<w.length?w:null;return f},enumerable:!0,configurable:!0});h.prototype.writePaths=function(a,b,c,f){b.paths=l.clone(this.paths)};
h.prototype.addPath=function(a){if(a){this.clearCache();var b=this.paths,c=b.length;if(Array.isArray(a[0]))b[c]=a.concat();else{for(var f=[],e=0,g=a.length;e<g;e++)f[e]=a[e].toArray();b[c]=f}return this}};h.prototype.clone=function(){var a=new q;a.spatialReference=this.spatialReference;a.paths=l.clone(this.paths);a.hasZ=this.hasZ;a.hasM=this.hasM;return a};h.prototype.getPoint=function(a,b){if(!this._validateInputs(a,b))return null;a=this.paths[a][b];b=this.hasZ;var d=this.hasM;return b&&!d?new c(a[0],
a[1],a[2],void 0,this.spatialReference):d&&!b?new c(a[0],a[1],void 0,a[2],this.spatialReference):b&&d?new c(a[0],a[1],a[2],a[3],this.spatialReference):new c(a[0],a[1],this.spatialReference)};h.prototype.insertPoint=function(a,b,c){if(!this._validateInputs(a,b,!0))return this;this.clearCache();f.updateSupportFromPoint(this,c);Array.isArray(c)||(c=c.toArray());this.paths[a].splice(b,0,c);return this};h.prototype.removePath=function(a){if(!this._validateInputs(a,null))return null;this.clearCache();a=
this.paths.splice(a,1)[0];var b=this.spatialReference;return a.map(function(a){return new c(a,b)})};h.prototype.removePoint=function(a,b){if(!this._validateInputs(a,b))return null;this.clearCache();return new c(this.paths[a].splice(b,1)[0],this.spatialReference)};h.prototype.setPoint=function(a,b,c){if(!this._validateInputs(a,b))return this;this.clearCache();f.updateSupportFromPoint(this,c);Array.isArray(c)||(c=c.toArray());this.paths[a][b]=c;return this};h.prototype._validateInputs=function(a,b,
c){void 0===c&&(c=!1);if(null==a||null==b||0>a||a>=this.paths.length)return!1;a=this.paths[a];return c&&0>b||b>a.length||0>b||b>=a.length?!1:!0};h.prototype.toJSON=function(a){return this.write(null,a)};e([k.property({dependsOn:["hasM","hasZ","paths"]})],h.prototype,"cache",void 0);e([k.property({dependsOn:["cache"],readOnly:!0})],h.prototype,"extent",null);e([k.property({type:[[[Number]]],json:{write:{isRequired:!0}}})],h.prototype,"paths",void 0);e([k.writer("paths")],h.prototype,"writePaths",null);
return h=q=e([k.subclass("esri.geometry.Polyline")],h);var q}(k.declared(q));a.prototype.toJSON.isDefaultToJSON=!0;return a})},"esri/geometry/Polygon":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/lang ./Geometry ./Extent ./Point ./SpatialReference ./support/webMercatorUtils ./support/zmUtils ./support/coordsUtils".split(" "),function(a,h,n,e,k,l,q,g,c,b,f,r,v){function x(a){return function(b,c){return null==
b?c:null==c?b:a(b,c)}}var w=x(Math.min),t=x(Math.max);a=function(a){function p(){for(var b=[],c=0;c<arguments.length;c++)b[c]=arguments[c];b=a.apply(this,b)||this;b.rings=[];b.type="polygon";return b}n(p,a);d=p;p.createEllipse=function(a){var b=a.center.x,c=a.center.y,f=a.center.z,e=a.center.m,m=a.center.hasZ,g=a.center.hasM,p=a.longAxis,k=a.shortAxis,l=a.numberOfPoints;a=a.view;for(var h=[],q=2*Math.PI/l,n=m?3:2,r=0;r<l;r++){var t=a.toMap(p*Math.cos(r*q)+b,k*Math.sin(r*q)+c),t=[t.x,t.y];m&&(t[2]=
f);g&&(t[n]=e);h.push(t)}h.push(h[0]);return new d({rings:[h],spatialReference:a.spatialReference})};p.createCircle=function(a){return d.createEllipse({center:a.center,longAxis:a.r,shortAxis:a.r,numberOfPoints:a.numberOfPoints,view:a.view})};p.fromExtent=function(a){var b=a.clone().normalize();a=a.spatialReference;var c=!1,f=!1;b.map(function(a){a.hasZ&&(c=!0);a.hasM&&(f=!0)});b={rings:b.map(function(a){var b=[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]];if(c&&
a.hasZ)for(var d=(a.zmax-a.zmin)/2,e=0;e<b.length;e++)b[e].push(d);if(f&&a.hasM)for(a=(a.mmax-a.mmin)/2,e=0;e<b.length;e++)b[e].push(a);return b}),spatialReference:a};c&&(b.hasZ=!0);f&&(b.hasM=!0);return new d(b)};p.prototype.normalizeCtorArgs=function(a,c){var d=null,f,e,m=null;a&&!Array.isArray(a)?(d=a.rings?a.rings:null,c||(a.spatialReference?c=a.spatialReference:a.rings||(c=a)),f=a.hasZ,e=a.hasM):d=a;d=d||[];c=c||b.WGS84;d.length&&d[0]&&null!=d[0][0]&&"number"===typeof d[0][0]&&(d=[d]);if(m=d[0]&&
d[0][0])void 0===f&&void 0===e?(f=2<m.length,e=!1):void 0===f?f=!e&&3<m.length:void 0===e&&(e=!f&&3<m.length);return{rings:d,spatialReference:c,hasZ:f,hasM:e}};Object.defineProperty(p.prototype,"centroid",{get:function(){var a=v.ringsCentroid([],this.rings,this.hasZ);if(isNaN(a[0])||isNaN(a[1])||this.hasZ&&isNaN(a[2]))return null;var b=new c;b.x=a[0];b.y=a[1];b.spatialReference=this.spatialReference;this.hasZ&&(b.z=a[2]);return b},enumerable:!0,configurable:!0});Object.defineProperty(p.prototype,
"extent",{get:function(){var a=this.hasZ,b=this.hasM,c=this.spatialReference,d=this.rings,f=a?3:2;if(!d.length||!d[0].length)return null;for(var e=d[0][0],p=e[0],e=e[1],k=d[0][0],l=k[0],k=k[1],h=void 0,q=void 0,n=void 0,r=void 0,u=[],x=0;x<d.length;x++){for(var v=d[x],L=v[0],M=L[0],L=L[1],ca=v[0],N=ca[0],ca=ca[1],U=void 0,P=void 0,ga=void 0,X=void 0,T=0;T<v.length;T++){var V=v[T],da=V[0],ja=V[1],p=w(p,da),e=w(e,ja),l=t(l,da),k=t(k,ja),M=w(M,da),L=w(L,ja),N=t(N,da),ca=t(ca,ja);a&&2<V.length&&(da=V[2],
h=w(h,da),q=t(q,da),U=w(U,da),P=t(P,da));b&&V.length>f&&(X=V[f],n=w(h,X),r=t(q,X),ga=w(U,X),X=t(P,X))}u.push(new g({xmin:M,ymin:L,zmin:U,mmin:ga,xmax:N,ymax:ca,zmax:P,mmax:X,spatialReference:c}))}d=new g;d.xmin=p;d.ymin=e;d.xmax=l;d.ymax=k;d.spatialReference=c;a&&(d.zmin=h,d.zmax=q);b&&(d.mmin=n,d.mmax=r);d.cache._partwise=1<u.length?u:null;return d},enumerable:!0,configurable:!0});Object.defineProperty(p.prototype,"isSelfIntersecting",{get:function(){return v.isSelfIntersecting(this.rings)},enumerable:!0,
configurable:!0});p.prototype.writePaths=function(a,b,c,d){b.rings=l.clone(this.rings)};p.prototype.addRing=function(a){if(a){this.clearCache();var b=this.rings,c=b.length;if(Array.isArray(a[0]))b[c]=a.concat();else{for(var d=[],f=0,e=a.length;f<e;f++)d[f]=a[f].toArray();b[c]=d}return this}};p.prototype.clone=function(){var a=new d;a.spatialReference=this.spatialReference;a.rings=l.clone(this.rings);a.hasZ=this.hasZ;a.hasM=this.hasM;return a};p.prototype.contains=function(a){if(!a)return!1;f.canProject(a,
this.spatialReference)&&(a=f.project(a,this.spatialReference));return v.contains(this.rings,v.geometryToCoordinates(a))};p.prototype.isClockwise=function(a){var b=this;a=Array.isArray(a[0])?a:a.map(function(a){return b.hasZ?b.hasM?[a.x,a.y,a.z,a.m]:[a.x,a.y,a.z]:[a.x,a.y]});return v.isClockwise(a,this.hasM,this.hasZ)};p.prototype.getPoint=function(a,b){if(!this._validateInputs(a,b))return null;a=this.rings[a][b];b=this.hasZ;var d=this.hasM;return b&&!d?new c(a[0],a[1],a[2],void 0,this.spatialReference):
d&&!b?new c(a[0],a[1],void 0,a[2],this.spatialReference):b&&d?new c(a[0],a[1],a[2],a[3],this.spatialReference):new c(a[0],a[1],this.spatialReference)};p.prototype.insertPoint=function(a,b,c){if(!this._validateInputs(a,b,!0))return this;this.clearCache();r.updateSupportFromPoint(this,c);Array.isArray(c)||(c=c.toArray());this.rings[a].splice(b,0,c);return this};p.prototype.removePoint=function(a,b){if(!this._validateInputs(a,b))return null;this.clearCache();return new c(this.rings[a].splice(b,1)[0],
this.spatialReference)};p.prototype.removeRing=function(a){if(!this._validateInputs(a,null))return null;this.clearCache();a=this.rings.splice(a,1)[0];var b=this.spatialReference;return a.map(function(a){return new c(a,b)})};p.prototype.setPoint=function(a,b,c){if(!this._validateInputs(a,b))return this;this.clearCache();r.updateSupportFromPoint(this,c);Array.isArray(c)||(c=c.toArray());this.rings[a][b]=c;return this};p.prototype._validateInputs=function(a,b,c){void 0===c&&(c=!1);if(null==a||null==
b||0>a||a>=this.rings.length)return!1;a=this.rings[a];return c&&0>b||b>a.length||0>b||b>=a.length?!1:!0};p.prototype.toJSON=function(a){return this.write(null,a)};e([k.property({dependsOn:["hasM","hasZ","rings"]})],p.prototype,"cache",void 0);e([k.property({readOnly:!0,dependsOn:["cache"]})],p.prototype,"centroid",null);e([k.property({dependsOn:["cache"],readOnly:!0})],p.prototype,"extent",null);e([k.property({dependsOn:["cache"],readOnly:!0})],p.prototype,"isSelfIntersecting",null);e([k.property({type:[[[Number]]],
json:{write:{isRequired:!0}}})],p.prototype,"rings",void 0);e([k.writer("rings")],p.prototype,"writePaths",null);return p=d=e([k.subclass("esri.geometry.Polygon")],p);var d}(k.declared(q));a.prototype.toJSON.isDefaultToJSON=!0;return a})},"esri/geometry/support/jsonUtils":function(){define("require exports ../Extent ../Multipoint ../Point ../Polygon ../Polyline".split(" "),function(a,h,n,e,k,l,q){function g(a){if(a){if(void 0!==a.x&&void 0!==a.y)return k.fromJSON(a);if(void 0!==a.paths)return q.fromJSON(a);
if(void 0!==a.rings)return l.fromJSON(a);if(void 0!==a.points)return e.fromJSON(a);if(void 0!==a.xmin&&void 0!==a.ymin&&void 0!==a.xmax&&void 0!==a.ymax)return n.fromJSON(a)}return null}Object.defineProperty(h,"__esModule",{value:!0});h.fromJson=function(a){try{throw Error("fromJson is deprecated, use fromJSON instead");}catch(f){console.warn(f.stack)}return g(a)};h.fromJSON=g;h.getJsonType=function(a){return a instanceof k?"esriGeometryPoint":a instanceof q?"esriGeometryPolyline":a instanceof l?
"esriGeometryPolygon":a instanceof n?"esriGeometryEnvelope":a instanceof e?"esriGeometryMultipoint":null};var c={esriGeometryPoint:k,esriGeometryPolyline:q,esriGeometryPolygon:l,esriGeometryEnvelope:n,esriGeometryMultipoint:e};h.getGeometryType=function(a){return a&&c[a]||null}})},"esri/layers/graphics/controllers/AutoController2D":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ../../../core/requireUtils ../../../Graphic ../../../core/Accessor ../../../core/Collection ../../../core/Error ../../../core/Promise ../../../tasks/QueryTask ../../../tasks/support/StatisticDefinition".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v){var x;(function(a){a[a.Snapshot=0]="Snapshot";a[a.OnDemand=1]="OnDemand"})(x||(x={}));return function(f){function g(){var a=null!==f&&f.apply(this,arguments)||this;a.controllerModulePaths=(b={},b[x.Snapshot]="./SnapshotController",b[x.OnDemand]="./OnDemandController2D",b);a.maxPointCountForAuto=4E3;a.maxRecordCountForAuto=2E3;a.maxVertexCountForAuto=25E4;return a;var b}n(g,f);g.prototype.initialize=function(){var a=this,b=this.layer.when(function(){a._verifyCapabilities()}).then(function(){return a._figureOutMode().then(function(b){return a._createController(b)})}).then(function(b){return a._set("activeController",
b)});this.addResolvingPromise(b)};g.prototype.destroy=function(){this.activeController&&(this.activeController.destroy(),this._set("activeController",null))};Object.defineProperty(g.prototype,"countThresholdForAuto",{get:function(){var a=this.layer.geometryType,b;"polyline"===a||"polygon"===a||"multipoint"===a?b=this.maxRecordCountForAuto:"point"===a&&(b=this.maxPointCountForAuto);return b},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"updating",{get:function(){return!1===this.isFulfilled()||
!0===this.get("activeController.updating")},enumerable:!0,configurable:!0});g.prototype._figureOutMode=function(){return this._isStatisticsSupported()?this._checkByStatistics():this._checkByCount()};g.prototype._isStatisticsSupported=function(){return/(https?:)?\/\/services.*\.arcgis\.com/i.test(this.layer.source.parsedUrl.path)};g.prototype._checkByStatistics=function(){var a=this,b=this.layer,c=b.source.parsedUrl.path,b=b.createQuery();b.outStatistics=[new v({statisticType:"exceedslimit",maxPointCount:this.maxPointCountForAuto,
maxRecordCount:this.maxRecordCountForAuto,maxVertexCount:this.maxVertexCountForAuto,outStatisticFieldName:"exceedslimit"})];return(new r({url:c+"/query"})).execute(b).then(function(b){b=b&&b.features&&b.features[0];if(0===(b&&b.attributes&&b.attributes.exceedslimit)){b=a.layer;var c=b.maxRecordCount;if(b.get("capabilities.query.supportsPagination")||c>=a.countThresholdForAuto)return x.Snapshot}return x.OnDemand})};g.prototype._checkByCount=function(){var a=this,b=this.layer;return b.queryFeatureCount().then(function(c){return c<=
a.countThresholdForAuto&&c<=b.maxRecordCount?x.Snapshot:x.OnDemand})};g.prototype._createController=function(b){var c=this;return l.when(a,this.controllerModulePaths[b]).then(function(a){return new a({layer:c.layer,layerView:c.layerView,graphics:c.graphics})}).otherwise(function(a){throw Error("Module path not found for controller type: "+(b===x.Snapshot?"snapshot":"on demand"));})};g.prototype._verifyCapabilities=function(){if(!this.layer.get("capabilities.operations.supportsQuery"))throw new b("graphicscontroller:query-capability-required",
"Service requires query capabilities to be used as a feature layer",{layer:this.layer});};e([k.property()],g.prototype,"activeController",void 0);e([k.property({dependsOn:["layer.geometryType"]})],g.prototype,"countThresholdForAuto",null);e([k.property()],g.prototype,"controllerModulePaths",void 0);e([k.property({type:c.ofType(q)})],g.prototype,"graphics",void 0);e([k.property()],g.prototype,"layer",void 0);e([k.property()],g.prototype,"layerView",void 0);e([k.property({dependsOn:["activeController.updating"]})],
g.prototype,"updating",null);e([k.aliasOf("activeController.update")],g.prototype,"update",void 0);return g=e([k.subclass("esri.layers.graphics.controllers.AutoController2D")],g)}(k.declared(g,f))})},"esri/Graphic":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/accessorSupport/decorators dojo/_base/lang ./core/lang ./core/JSONSupport ./PopupTemplate ./symbols/support/typeUtils ./symbols/support/jsonUtils ./geometry ./geometry/support/typeUtils".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v){var x=0;return function(a){function g(b,c,f,e){b=a.call(this,b,c,f,e)||this;b.layer=null;Object.defineProperty(b,"uid",{value:x++});return b}n(g,a);h=g;g.prototype.normalizeCtorArgs=function(a,b,c,f){return a&&!a.declaredClass?a:{geometry:a,symbol:b,attributes:c,popupTemplate:f}};Object.defineProperty(g.prototype,"attributes",{set:function(a){var b=this._get("attributes");b!==a&&(this._set("attributes",a),this._notifyLayer("attributes",b,a))},enumerable:!0,configurable:!0});
Object.defineProperty(g.prototype,"geometry",{set:function(a){var b=this._get("geometry");b!==a&&(this._set("geometry",a),this._notifyLayer("geometry",b,a))},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"popupTemplate",{get:function(){return this.get("layer.popupTemplate")||null},set:function(a){void 0===a?this._clearOverride("popupTemplate"):this._override("popupTemplate",a)},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"symbol",{set:function(a){var b=this._get("symbol");
b!==a&&(this._set("symbol",a),this._notifyLayer("symbol",b,a))},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"visible",{set:function(a){var b=this._get("visible");b!==a&&(this._set("visible",a),this._notifyLayer("visible",b,a))},enumerable:!0,configurable:!0});g.prototype.getAttribute=function(a){return this.attributes&&this.attributes[a]};g.prototype.setAttribute=function(a,b){if(this.attributes){var c=this.getAttribute(a);this.attributes[a]=b;this._notifyLayer("attributes",
c,b,a)}else this.attributes=(c={},c[a]=b,c),this._notifyLayer("attributes",void 0,b,a)};g.prototype.toJSON=function(){return{geometry:this.geometry&&this.geometry.toJSON(),symbol:this.symbol&&this.symbol.toJSON(),attributes:l.mixin({},this.attributes),popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}};g.prototype.clone=function(){return new h({attributes:q.clone(this.attributes),geometry:this.geometry&&this.geometry.clone()||null,popupTemplate:this.popupTemplate&&this.popupTemplate.clone(),
symbol:this.symbol&&this.symbol.clone()||null,visible:this.visible})};g.prototype._notifyLayer=function(a,b,c,f){this.layer&&(a={graphic:this,property:a,oldValue:b,newValue:c},f&&(a.attributeName=f),this.layer.graphicChanged(a))};e([k.property({value:null})],g.prototype,"attributes",null);e([k.property({value:null,types:v.types,json:{read:r.fromJSON}})],g.prototype,"geometry",null);e([k.property()],g.prototype,"layer",void 0);e([k.property({dependsOn:["layer.popupTemplate"],type:c})],g.prototype,
"popupTemplate",null);e([k.property({value:null,types:b.types,json:{read:f.read}})],g.prototype,"symbol",null);e([k.property({value:!0,set:function(a){}})],g.prototype,"visible",null);return g=h=e([k.subclass("esri.Graphic")],g);var h}(k.declared(g))})},"esri/PopupTemplate":function(){define("require exports ./core/tsSupport/assignHelper ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/accessorSupport/decorators ./core/date ./core/Collection ./core/kebabDictionary ./core/JSONSupport ./core/lang ./support/Action ./support/arcadeUtils ./layers/support/fieldUtils".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x){var w=c({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),t=c({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"});return function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.actions=null;b.content="";b.expressionInfos=null;b.fieldInfos=null;b.layerOptions=null;b.overwriteActions=!1;b.title="";b.relatedRecordsInfo=null;return b}e(b,a);c=b;b.prototype.readContent=function(a,b){var c=this,
d=b.description,f=b.mediaInfos;a=b.showAttachments;if((b=b.popupElements)&&b.length)return b.map(function(a){"text"!==a.type||a.text?"media"===a.type&&(a.mediaInfos||f)&&(a.mediaInfos||(a.mediaInfos=f),a.mediaInfos=c._readMediaInfos(a.mediaInfos)):a.text=d;return a});b=[];d?b.push({type:"text",text:d}):b.push({type:"fields"});f&&f.length&&b.push({type:"media",mediaInfos:this._readMediaInfos(f)});a&&b.push({type:"attachments",displayType:"list"});return b.length?b:d};b.prototype.writeContent=function(a,
b){var c=this;b.showAttachments=!1;"string"===typeof a?b.description=a:Array.isArray(a)&&(b.popupElements=f.clone(a),b.popupElements.forEach(function(a){"attachments"!==a.type||b.showAttachments?"media"!==a.type||b.mediaInfos?"text"!==a.type||b.description?"fields"!==a.type||b.fieldInfos||(a.fieldInfos&&(b.fieldInfos=c._writeFieldInfos(f.clone(a.fieldInfos))),delete a.fieldInfos):(a.text&&(b.description=a.text),delete a.text):(a.mediaInfos&&(b.mediaInfos=f.clone(a.mediaInfos),b.mediaInfos.forEach(function(a){a.type=
t.toJSON(a.type)})),delete a.mediaInfos):b.showAttachments=!0;return a}))};b.prototype.writeExpressionInfos=function(a,b){b.expressionInfos=a||null};b.prototype.readFieldInfos=function(a){if(a)return a.forEach(function(a){var b=a.format&&a.format.dateFormat,c=a.stringFieldOption;b&&(a.format.dateFormat=q.fromJSON(b));c&&(a.stringFieldOption=w.fromJSON(c))}),a};b.prototype.writeFieldInfos=function(a,b){b.fieldInfos=a?this._writeFieldInfos(f.clone(a)):a};b.prototype.writeLayerOptions=function(a,b){b.layerOptions=
a||null};b.prototype.writeTitle=function(a,b){b.title=a||""};b.prototype.writeRelatedRecordsInfo=function(a,b){b.relatedRecordsInfo=a||null};Object.defineProperty(b.prototype,"requiredFields",{get:function(){return this.collectRequiredFields()},enumerable:!0,configurable:!0});b.prototype.clone=function(){var a=this.actions,a=a?f.clone(a.toArray()):[];return new c({actions:a,content:Array.isArray(this.content)?f.clone(this.content):this.content,fieldInfos:this.fieldInfos?f.clone(this.fieldInfos):null,
layerOptions:this.layerOptions?f.clone(this.layerOptions):null,overwriteActions:this.overwriteActions,relatedRecordsInfo:this.relatedRecordsInfo?f.clone(this.relatedRecordsInfo):null,title:this.title})};b.prototype.collectRequiredFields=function(){return this._getActionsFields(this.actions).concat(this._getTitleFields(this.title),this._getContentFields(this.content),this._getExpressionInfoFields(this.expressionInfos)).filter(function(a,b,c){return b===c.indexOf(a)})};b.prototype._getContentElementFields=
function(a){var b=this;if(!a||"attachments"===a.type)return[];if("fields"===a.type)return this._getFieldInfoFields(a.fieldInfos||this.fieldInfos);if("media"===a.type)return(a.mediaInfos||[]).reduce(function(a,c){return a.concat(b._getMediaInfoFields(c))},[]);if("text"===a.type)return x.extractFieldNames(a.text)};b.prototype._getMediaInfoFields=function(a){var b=a.caption,c=a.value||{},d=c.fields,f=void 0===d?[]:d,d=c.normalizeField,e=c.tooltipField,g=c.sourceURL,c=c.linkURL;a=x.extractFieldNames(a.title).concat(x.extractFieldNames(b),
x.extractFieldNames(g),x.extractFieldNames(c),f);d&&a.push(d);e&&a.push(e);return a};b.prototype._getContentFields=function(a){var b=this;return"string"===typeof a?x.extractFieldNames(a):Array.isArray(a)?a.reduce(function(a,c){return a.concat(b._getContentElementFields(c))},[]):[]};b.prototype._getExpressionInfoFields=function(a){return a?a.reduce(function(a,b){return a.concat(v.extractFieldNames(b.expression))},[]):[]};b.prototype._getFieldInfoFields=function(a){return a?a.filter(function(a){return"undefined"===
typeof a.visible?!0:!!a.visible}).map(function(a){return a.fieldName}).filter(function(a){return-1===a.indexOf("relationships/")&&-1===a.indexOf("expression/")}):[]};b.prototype._getActionsFields=function(a){var b=this;return a?a.toArray().reduce(function(a,c){return a.concat(b._getActionFields(c))},[]):[]};b.prototype._getActionFields=function(a){return x.extractFieldNames(a.title).concat(x.extractFieldNames(a.className),x.extractFieldNames(a.image))};b.prototype._getTitleFields=function(a){return"string"===
typeof a?x.extractFieldNames(a):[]};b.prototype._readMediaInfos=function(a){a.forEach(function(a){a.type=t.fromJSON(a.type)});return a};b.prototype._writeFieldInfos=function(a){a.forEach(function(a){var b=a.format&&a.format.dateFormat,c=a.stringFieldOption;b&&(a.format.dateFormat=q.toJSON(b));c&&(a.stringFieldOption=w.toJSON(c));a.format||delete a.format});return a};k([l.property({type:g.ofType(r)})],b.prototype,"actions",void 0);k([l.property()],b.prototype,"content",void 0);k([l.reader("content",
["description","popupElements","mediaInfos","showAttachments"])],b.prototype,"readContent",null);k([l.writer("content")],b.prototype,"writeContent",null);k([l.property()],b.prototype,"expressionInfos",void 0);k([l.writer("expressionInfos")],b.prototype,"writeExpressionInfos",null);k([l.property()],b.prototype,"fieldInfos",void 0);k([l.reader("fieldInfos")],b.prototype,"readFieldInfos",null);k([l.writer("fieldInfos")],b.prototype,"writeFieldInfos",null);k([l.property()],b.prototype,"layerOptions",
void 0);k([l.writer("layerOptions")],b.prototype,"writeLayerOptions",null);k([l.property()],b.prototype,"overwriteActions",void 0);k([l.property()],b.prototype,"title",void 0);k([l.writer("title")],b.prototype,"writeTitle",null);k([l.property()],b.prototype,"relatedRecordsInfo",void 0);k([l.writer("relatedRecordsInfo")],b.prototype,"writeRelatedRecordsInfo",null);k([l.property({dependsOn:["actions","title","content","fieldInfos","expressionInfos"],readOnly:!0})],b.prototype,"requiredFields",null);
return b=c=k([l.subclass("esri.PopupTemplate")],b);var c}(l.declared(b))})},"esri/core/date":function(){define(["require","exports","./kebabDictionary"],function(a,h,n){Object.defineProperty(h,"__esModule",{value:!0});var e={"short-date":"(datePattern: 'M/d/y', selector: 'date')","short-date-le":"(datePattern: 'd/M/y', selector: 'date')","long-month-day-year":"(datePattern: 'MMMM d, y', selector: 'date')","day-short-month-year":"(datePattern: 'd MMM y', selector: 'date')","long-date":"(datePattern: 'EEEE, MMMM d, y', selector: 'date')",
"short-date-short-time":"(datePattern: 'M/d/y', timePattern: 'h:mm a', selector: 'date and time')","short-date-le-short-time":"(datePattern: 'd/M/y', timePattern: 'h:mm a', selector: 'date and time')","short-date-short-time-24":"(datePattern: 'M/d/y', timePattern: 'H:mm', selector: 'date and time')","short-date-le-short-time-24":"(datePattern: 'd/M/y', timePattern: 'H:mm', selector: 'date and time')","short-date-long-time":"(datePattern: 'M/d/y', timePattern: 'h:mm:ss a', selector: 'date and time')",
"short-date-le-long-time":"(datePattern: 'd/M/y', timePattern: 'h:mm:ss a', selector: 'date and time')","short-date-long-time-24":"(datePattern: 'M/d/y', timePattern: 'H:mm:ss', selector: 'date and time')","short-date-le-long-time-24":"(datePattern: 'd/M/y', timePattern: 'H:mm:ss', selector: 'date and time')","long-month-year":"(datePattern: 'MMMM y', selector: 'date')","short-month-year":"(datePattern: 'MMM y', selector: 'date')",year:"(datePattern: 'y', selector: 'date')"};a=n({shortDate:"short-date",
shortDateLE:"short-date-le",longDate:"long-date",dayShortMonthYear:"day-short-month-year",longMonthDayYear:"long-month-day-year",shortDateLongTime:"short-date-long-time",shortDateLELongTime:"short-date-le-long-time",shortDateShortTime:"short-date-short-time",shortDateLEShortTime:"short-date-le-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLongTime24:"short-date-long-time-24",shortDateLELongTime24:"short-date-le-long-time-24",
longMonthYear:"long-month-year",shortMonthYear:"short-month-year"});h.toJSON=a.toJSON;h.fromJSON=a.fromJSON;h.getFormat=function(a){return e[a]}})},"esri/support/Action":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/Identifiable ../core/accessorSupport/decorators".split(" "),function(a,h,n,e,k,l,q){return function(a){function c(b){b=a.call(this)||this;b.className="";b.temporary=!1;b.image="";b.id="";b.title="";b.visible=
!0;return b}n(c,a);b=c;c.prototype.clone=function(){return new b({className:this.className,image:this.image,id:this.id,title:this.title,visible:this.visible})};e([q.property()],c.prototype,"className",void 0);e([q.property()],c.prototype,"temporary",void 0);e([q.property()],c.prototype,"image",void 0);e([q.property()],c.prototype,"id",void 0);e([q.property()],c.prototype,"title",void 0);e([q.property()],c.prototype,"visible",void 0);return c=b=e([q.subclass("esri.support.Action")],c);var b}(q.declared(k,
l))})},"esri/support/arcadeUtils":function(){define(["require","exports","dojo/_base/lang","../arcade/arcade","../arcade/Dictionary"],function(a,h,n,e,k){function l(a){var b;try{b=a?e.parseScript(a):null}catch(f){b=null}return b}Object.defineProperty(h,"__esModule",{value:!0});var q=/^\$feature\./i,g={vars:{$feature:"any",$view:"any"},spatialReference:null};h.createSyntaxTree=l;h.createFunction=function(a,b){b=b||n.clone(g);a="string"===typeof a?l(a):a;var c;try{c=a?e.compileScript(a,b):null}catch(r){c=
null}return c};h.createExecContext=function(a,b){return{vars:{$feature:e.constructFeature(a),$view:b&&b.view},spatialReference:b&&b.sr}};h.createFeature=function(a){return e.constructFeature(a)};h.updateExecContext=function(a,b){a.vars.$feature=b};h.evalSyntaxTree=function(a,b){var c;try{c=e.executeScript(a,b,b.spatialReference)}catch(r){c=null}return c};h.executeFunction=function(a,b){var c;try{c=a?a(b,b.spatialReference):null}catch(r){c=null}return c};h.extractFieldNames=function(a){if(!a)return[];
a="string"===typeof a?l(a):a;var b=[];e.extractFieldLiterals(a).forEach(function(a){q.test(a)&&(a=a.replace(q,""),b.push(a))});b.sort();return b.filter(function(a,c){return 0===c||b[c-1]!==a})};h.dependsOnView=function(a){return e.referencesMember(a,"$view")};h.getViewInfo=function(a){if(a&&a.viewingMode&&null!=a.scale&&a.spatialReference)return{view:new k({viewingMode:a.viewingMode,scale:a.scale}),sr:a.spatialReference}}})},"esri/arcade/arcade":function(){define("require exports ./arcadeRuntime ./parser ./Feature ./arcadeCompiler dojo/has dojo/Deferred".split(" "),
function(a,h,n,e,k,l,q,g){Object.defineProperty(h,"__esModule",{value:!0});var c="disjoint intersects touches crosses within contains overlaps equals relate intersection union difference symmetricdifference clip cut area areageodetic length lengthgeodetic distance densify densifygeodetic generalize buffer buffergeodetic offset rotate issimple simplify multiparttosinglepart".split(" ");h.compileScript=function(a,c){return q("csp-restrictions")?function(b,c){return n.executeScript(a,b,c)}:l.compileScript(a,
c)};h.extend=function(a){n.extend(a);l.extend(a)};h.constructFeature=function(a){return k.fromFeature(a)};h.parseScript=function(a){return e.parseScript(a)};h.validateScript=function(a,c){return e.validateScript(a,c,"simple")};h.scriptCheck=function(a,c,g){return e.scriptCheck(a,c,g,"full")};h.parseAndExecuteScript=function(a,c,g){return n.executeScript(e.parseScript(a),c,g)};h.executeScript=function(a,c,e){return n.executeScript(a,c,e)};h.referencesMember=function(a,c){return n.referencesMember(a,
c)};h.referencesFunction=function(a,c){return n.referencesFunction(a,c)};h.extractFieldLiterals=function(a,c){void 0===c&&(c=!1);return e.extractFieldLiterals(a,c)};h.scriptUsesGeometryEngine=function(a){a=n.findFunctionCalls(a);for(var b=0;b<a.length;b++)if(-1<c.indexOf(a[b]))return!0;return!1};h.enableGeometrySupport=function(){var b=new g;a(["esri/geometry/geometryEngine","./functions/geomsync"],function(a,c){c.setGeometryEngine(a);b.resolve(!0)},function(a){b.reject(a)});return b.promise}})},
"esri/arcade/arcadeRuntime":function(){define("require exports ../geometry/Polygon ../geometry/Polyline ../geometry/Point ../geometry/Extent ../geometry/Multipoint ../geometry/SpatialReference ./languageUtils ./treeAnalysis ./Dictionary ./Feature ./FunctionWrapper ./functions/date ./functions/string ./functions/maths ./functions/geometry ./functions/geomsync ./functions/stats ./ImmutablePathArray ./ImmutablePointArray ../geometry/Geometry".split(" "),function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t,u,p,d,
m,y,z){function A(a,b){for(var c=[],d=0;d<b.arguments.length;d++)c.push(G(a,b.arguments[d]));return c}function C(a,b,c){try{return c(a,b,A(a,b))}catch(qa){throw qa;}}function G(a,d){try{switch(d.type){case "EmptyStatement":return c.voidOperation;case "VariableDeclarator":var e=null===d.init?null:G(a,d.init);e===c.voidOperation&&(e=null);var g=d.id.name.toLowerCase();null!==a.localScope?a.localScope[g]={value:e,valueset:!0,node:d.init}:a.globalScope[g]={value:e,valueset:!0,node:d.init};return c.voidOperation;
case "VariableDeclaration":for(var m=0;m<d.declarations.length;m++)G(a,d.declarations[m]);return c.voidOperation;case "BlockStatement":var p;a:{for(var k=c.voidOperation,m=0;m<d.body.length;m++)if(k=G(a,d.body[m]),k instanceof c.ReturnResult||k===c.breakResult||k===c.continueResult){p=k;break a}p=k}return p;case "FunctionDeclaration":var l=d.id.name.toLowerCase();a.globalScope[l]={valueset:!0,node:null,value:new v(d,a)};return c.voidOperation;case "ReturnStatement":var h;if(null===d.argument)h=new c.ReturnResult(c.voidOperation);
else{var q=G(a,d.argument);h=new c.ReturnResult(q)}return h;case "IfStatement":var n;if("AssignmentExpression"===d.test.type||"UpdateExpression"===d.test.type)throw Error(b.nodeErrorMessage(d.test,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));var x=G(a,d.test);if(!0===x)n=G(a,d.consequent);else if(!1===x)n=null!==d.alternate?G(a,d.alternate):c.voidOperation;else throw Error(b.nodeErrorMessage(d,"RUNTIME","CANNOT_USE_NONBOOLEAN_IN_CONDITION"));return n;case "ExpressionStatement":var y;if("AssignmentExpression"===
d.expression.type||"UpdateExpression"===d.expression.type)y=G(a,d.expression);else{var u=G(a,d.expression);y=u===c.voidOperation?c.voidOperation:new c.ImplicitResult(u)}return y;case "AssignmentExpression":var t;var w=G(a,d.right),m=null,z="";if("MemberExpression"===d.left.type){m=G(a,d.left.object);z=!0===d.left.computed?G(a,d.left.property):d.left.property.name;if(c.isArray(m))if(c.isNumber(z)){0>z&&(z=m.length+z);if(0>z||z>m.length)throw Error("Assignment outside of array bounds");if(z===m.length&&
"\x3d"!==d.operator)throw Error("Invalid Parameter");m[z]=E(w,d.operator,m[z],d)}else throw Error("Invalid Parameter");else if(m instanceof f){if(!1===c.isString(z))throw Error("Dictionary accessor must be a string");if(!0===m.hasField(z))m.setField(z,E(w,d.operator,m.field(z),d));else{if("\x3d"!==d.operator)throw Error("Invalid Parameter");m.setField(z,E(w,d.operator,null,d))}}else if(m instanceof r){if(!1===c.isString(z))throw Error("Feature accessor must be a string");if(!0===m.hasField(z))m.setField(z,
E(w,d.operator,m.field(z),d));else{if("\x3d"!==d.operator)throw Error("Invalid Parameter");m.setField(z,E(w,d.operator,null,d))}}else{if(c.isImmutableArray(m))throw Error("Array is Immutable");throw Error("Invalid Parameter");}t=c.voidOperation}else if(m=d.left.name.toLowerCase(),null!==a.localScope&&void 0!==a.localScope[m])a.localScope[m]={value:E(w,d.operator,a.localScope[m].value,d),valueset:!0,node:d.right},t=c.voidOperation;else if(void 0!==a.globalScope[m])a.globalScope[m]={value:E(w,d.operator,
a.globalScope[m].value,d),valueset:!0,node:d.right},t=c.voidOperation;else throw Error("Variable not recognised");return t;case "UpdateExpression":var A;var C,m=null,z="";if("MemberExpression"===d.argument.type){m=G(a,d.argument.object);z=!0===d.argument.computed?G(a,d.argument.property):d.argument.property.name;if(c.isArray(m))if(c.isNumber(z)){0>z&&(z=m.length+z);if(0>z||z>=m.length)throw Error("Assignment outside of array bounds");C=c.toNumber(m[z]);m[z]="++"===d.operator?C+1:C-1}else throw Error("Invalid Parameter");
else if(m instanceof f){if(!1===c.isString(z))throw Error("Dictionary accessor must be a string");if(!0===m.hasField(z))C=c.toNumber(m.field(z)),m.setField(z,"++"===d.operator?C+1:C-1);else throw Error("Invalid Parameter");}else if(m instanceof r){if(!1===c.isString(z))throw Error("Feature accessor must be a string");if(!0===m.hasField(z))C=c.toNumber(m.field(z)),m.setField(z,"++"===d.operator?C+1:C-1);else throw Error("Invalid Parameter");}else{if(c.isImmutableArray(m))throw Error("Array is Immutable");
throw Error("Invalid Parameter");}A=!1===d.prefix?C:"++"===d.operator?C+1:C-1}else if(m=d.argument.name.toLowerCase(),null!==a.localScope&&void 0!==a.localScope[m])C=c.toNumber(a.localScope[m].value),a.localScope[m]={value:"++"===d.operator?C+1:C-1,valueset:!0,node:d},A=!1===d.prefix?C:"++"===d.operator?C+1:C-1;else if(void 0!==a.globalScope[m])C=c.toNumber(a.globalScope[m].value),a.globalScope[m]={value:"++"===d.operator?C+1:C-1,valueset:!0,node:d},A=!1===d.prefix?C:"++"===d.operator?C+1:C-1;else throw Error("Variable not recognised");
return A;case "BreakStatement":return c.breakResult;case "ContinueStatement":return c.continueResult;case "ForStatement":null!==d.init&&G(a,d.init);z={testResult:!0,lastAction:c.voidOperation};do b:{t=a;w=d;A=z;if(null!==w.test){A.testResult=G(t,w.test);if(!1===A.testResult)break b;if(!0!==A.testResult)throw Error(b.nodeErrorMessage(w,"RUNTIME","CANNOT_USE_NONBOOLEAN_IN_CONDITION"));}A.lastAction=G(t,w.body);A.lastAction===c.breakResult?A.testResult=!1:A.lastAction instanceof c.ReturnResult?A.testResult=
!1:null!==w.update&&G(t,w.update)}while(!0===z.testResult);m=z.lastAction instanceof c.ReturnResult?z.lastAction:c.voidOperation;return m;case "ForInStatement":return J(a,d);case "Identifier":return Y(a,d);case "MemberExpression":return R(a,d);case "Literal":return d.value;case "ThisExpression":throw Error(b.nodeErrorMessage(d,"RUNTIME","NOTSUPPORTED"));case "CallExpression":return D(a,d);case "UnaryExpression":return Z(a,d);case "BinaryExpression":return ba(a,d);case "LogicalExpression":return F(a,
d);case "ConditionalExpression":throw Error(b.nodeErrorMessage(d,"RUNTIME","NOTSUPPORTED"));case "ArrayExpression":try{for(m=[],z=0;z<d.elements.length;z++){var V=G(a,d.elements[z]);if(c.isFunctionParameter(V))throw Error(b.nodeErrorMessage(d,"RUNTIME","FUNCTIONCONTEXTILLEGAL"));V===c.voidOperation?m.push(null):m.push(V)}}catch(Ra){throw Ra;}return m;case "ObjectExpression":m={};for(z=0;z<d.properties.length;z++){var T=G(a,d.properties[z]);if(c.isFunctionParameter(T.value))throw Error("Illegal Argument");
if(!1===c.isString(T.key))throw Error("Illegal Argument");m[T.key.toString()]=T.value===c.voidOperation?null:T.value}var ja=new f(m);ja.immutable=!1;return ja;case "Property":return{key:"Identifier"===d.key.type?d.key.name:G(a,d.key),value:G(a,d.value)};case "Array":throw Error(b.nodeErrorMessage(d,"RUNTIME","NOTSUPPORTED"));default:throw Error(b.nodeErrorMessage(d,"RUNTIME","UNREOGNISED"));}}catch(Ra){throw Ra;}}function J(a,d){var e=G(a,d.right);"VariableDeclaration"===d.left.type&&G(a,d.left);
var g=null,m="VariableDeclaration"===d.left.type?d.left.declarations[0].id.name:d.left.name;null!==a.localScope&&void 0!==a.localScope[m]&&(g=a.localScope[m]);null===g&&void 0!==a.globalScope[m]&&(g=a.globalScope[m]);if(null===g)throw Error(b.nodeErrorMessage(d,"RUNTIME","VARIABLENOTDECLARED"));if(c.isArray(e)||c.isString(e)){for(var e=e.length,p=0;p<e&&(g.value=p,m=G(a,d.body),m!==c.breakResult);p++)if(m instanceof c.ReturnResult)return m;return c.voidOperation}if(c.isImmutableArray(e)){for(p=0;p<
e.length()&&(g.value=p,m=G(a,d.body),m!==c.breakResult);p++)if(m instanceof c.ReturnResult)return m;return c.voidOperation}if(e instanceof f||e instanceof r)for(e=e.keys(),p=0;p<e.length&&(g.value=e[p],m=G(a,d.body),m!==c.breakResult);p++){if(m instanceof c.ReturnResult)return m}else return c.voidOperation}function E(a,d,f,e){switch(d){case "\x3d":return a===c.voidOperation?null:a;case "/\x3d":return c.toNumber(f)/c.toNumber(a);case "*\x3d":return c.toNumber(f)*c.toNumber(a);case "-\x3d":return c.toNumber(f)-
c.toNumber(a);case "+\x3d":return c.isString(f)||c.isString(a)?c.toString(f)+c.toString(a):c.toNumber(f)+c.toNumber(a);case "%\x3d":return c.toNumber(f)%c.toNumber(a);default:throw Error(b.nodeErrorMessage(e,"RUNTIME","OPERATORNOTRECOGNISED"));}}function K(a,d,e,g){d=d.toLowerCase();switch(d){case "hasz":return a=a.hasZ,void 0===a?!1:a;case "hasm":return a=a.hasM,void 0===a?!1:a;case "spatialreference":return d=a.spatialReference._arcadeCacheId,void 0===d&&(e=!0,Object.freeze&&Object.isFrozen(a.spatialReference)&&
(e=!1),e&&(X++,d=a.spatialReference._arcadeCacheId=X)),a=new f({wkt:a.spatialReference.wkt,wkid:a.spatialReference.wkid}),void 0!==d&&(a._arcadeCacheId="SPREF"+d.toString()),a}switch(a.type){case "extent":switch(d){case "xmin":case "xmax":case "ymin":case "ymax":case "zmin":case "zmax":case "mmin":case "mmax":return a=a[d],void 0!==a?a:null;case "type":return"Extent"}break;case "polygon":switch(d){case "rings":return d=c.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===
d&&(X++,d=X,c.isVersion4?a.cache._arcadeCacheId=d:a.setCacheValue("_arcadeCacheId",d)),a=new m(a.rings,a.spatialReference,!0===a.hasZ,!0===a.hasM,d);case "type":return"Polygon"}break;case "point":switch(d){case "x":case "y":case "z":case "m":return void 0!==a[d]?a[d]:null;case "type":return"Point"}break;case "polyline":switch(d){case "paths":return d=c.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===d&&(X++,d=X,c.isVersion4?a.cache._arcadeCacheId=d:a.setCacheValue("_arcadeCacheId",
d)),a=new m(a.paths,a.spatialReference,!0===a.hasZ,!0===a.hasM,d);case "type":return"Polyline"}break;case "multipoint":switch(d){case "points":return d=c.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===d&&(X++,d=X,c.isVersion4?a.cache._arcadeCacheId=d:a.setCacheValue("_arcadeCacheId",d)),a=new y(a.points,a.spatialReference,!0===a.hasZ,!0===a.hasM,d,1);case "type":return"Multipoint"}}throw Error(b.nodeErrorMessage(g,"RUNTIME","PROPERTYNOTFOUND"));}function R(a,d){try{var e=
G(a,d.object);if(null===e)throw Error(b.nodeErrorMessage(d,"RUNTIME","NOTFOUND"));if(!1===d.computed){if(e instanceof f||e instanceof r)return e.field(d.property.name);if(e instanceof z)return K(e,d.property.name,a,d);throw Error(b.nodeErrorMessage(d,"RUNTIME","INVALIDTYPE"));}var g=G(a,d.property);if(e instanceof f||e instanceof r){if(c.isString(g))return e.field(g)}else if(e instanceof z){if(c.isString(g))return K(e,g,a,d)}else if(c.isArray(e)){if(c.isNumber(g)&&isFinite(g)&&Math.floor(g)===g){0>
g&&(g=e.length+g);if(g>=e.length||0>g)throw Error(b.nodeErrorMessage(d,"RUNTIME","OUTOFBOUNDS"));return e[g]}}else if(c.isString(e)){if(c.isNumber(g)&&isFinite(g)&&Math.floor(g)===g){0>g&&(g=e.length+g);if(g>=e.length||0>g)throw Error(b.nodeErrorMessage(d,"RUNTIME","OUTOFBOUNDS"));return e[g]}}else if(c.isImmutableArray(e)&&c.isNumber(g)&&isFinite(g)&&Math.floor(g)===g){0>g&&(g=e.length()+g);if(g>=e.length()||0>g)throw Error(b.nodeErrorMessage(d,"RUNTIME","OUTOFBOUNDS"));return e.get(g)}throw Error(b.nodeErrorMessage(d,
"RUNTIME","INVALIDTYPE"));}catch(wa){throw wa;}}function Z(a,d){try{var f=G(a,d.argument);if(c.isBoolean(f)){if("!"===d.operator)return!f;if("-"===d.operator)return-1*c.toNumber(f);if("+"===d.operator)return 1*c.toNumber(f);throw Error(b.nodeErrorMessage(d,"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}if("-"===d.operator)return-1*c.toNumber(f);if("+"===d.operator)return 1*c.toNumber(f);throw Error(b.nodeErrorMessage(d,"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}catch(qa){throw qa;}}function ba(a,d){try{var f=
[G(a,d.left),G(a,d.right)],e=f[0],g=f[1];switch(d.operator){case "\x3d\x3d":return c.equalityTest(e,g);case "\x3d":return c.equalityTest(e,g);case "!\x3d":return!c.equalityTest(e,g);case "\x3c":return c.greaterThanLessThan(e,g,d.operator);case "\x3e":return c.greaterThanLessThan(e,g,d.operator);case "\x3c\x3d":return c.greaterThanLessThan(e,g,d.operator);case "\x3e\x3d":return c.greaterThanLessThan(e,g,d.operator);case "+":return c.isString(e)||c.isString(g)?c.toString(e)+c.toString(g):c.toNumber(e)+
c.toNumber(g);case "-":return c.toNumber(e)-c.toNumber(g);case "*":return c.toNumber(e)*c.toNumber(g);case "/":return c.toNumber(e)/c.toNumber(g);case "%":return c.toNumber(e)%c.toNumber(g);default:throw Error(b.nodeErrorMessage(d,"RUNTIME","OPERATORNOTRECOGNISED"));}}catch(pa){throw pa;}}function F(a,d){try{if("AssignmentExpression"===d.left.type||"UpdateExpression"===d.left.type)throw Error(b.nodeErrorMessage(d.left,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));if("AssignmentExpression"===d.right.type||
"UpdateExpression"===d.right.type)throw Error(b.nodeErrorMessage(d.right,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));var f=G(a,d.left);if(c.isBoolean(f))switch(d.operator){case "||":if(!0===f)return f;var e=G(a,d.right);if(c.isBoolean(e))return e;throw Error(b.nodeErrorMessage(d,"RUNTIME","ONLYORORAND"));case "\x26\x26":if(!1===f)return f;e=G(a,d.right);if(c.isBoolean(e))return e;throw Error(b.nodeErrorMessage(d,"RUNTIME","ONLYORORAND"));default:throw Error(b.nodeErrorMessage(d,"RUNTIME","ONLYORORAND"));
}else throw Error(b.nodeErrorMessage(d,"RUNTIME","ONLYBOOLEAN"));}catch(wa){throw wa;}}function Y(a,c){var d;try{var f=c.name.toLowerCase();if(null!==a.localScope&&void 0!==a.localScope[f])return d=a.localScope[f],!0!==d.valueset&&(d.value=G(a,d.node),d.valueset=!0),d.value;if(void 0!==a.globalScope[f])return d=a.globalScope[f],!0!==d.valueset&&(d.value=G(a,d.node),d.valueset=!0),d.value;throw Error(b.nodeErrorMessage(c,"RUNTIME","VARIABLENOTFOUND"));}catch(wa){throw wa;}}function D(a,d){try{if("Identifier"!==
d.callee.type)throw Error(b.nodeErrorMessage(d,"RUNTIME","ONLYNODESSUPPORTED"));if(null!==a.localScope&&void 0!==a.localScope[d.callee.name.toLowerCase()]){var f=a.localScope[d.callee.name.toLowerCase()];if(f.value instanceof c.NativeFunction)return f.value.fn(a,d);if(f.value instanceof v)return U(a,d,f.value.definition);throw Error(b.nodeErrorMessage(d,"RUNTIME","NOTAFUNCTION"));}if(void 0!==a.globalScope[d.callee.name.toLowerCase()]){f=a.globalScope[d.callee.name.toLowerCase()];if(f.value instanceof
c.NativeFunction)return f.value.fn(a,d);if(f.value instanceof v)return U(a,d,f.value.definition);throw Error(b.nodeErrorMessage(d,"RUNTIME","NOTAFUNCTION"));}throw Error(b.nodeErrorMessage(d,"RUNTIME","NOTFOUND"));}catch(qa){throw qa;}}function S(a){return null==a?"":c.isArray(a)||c.isImmutableArray(a)?"Array":c.isDate(a)?"Date":c.isString(a)?"String":c.isBoolean(a)?"Boolean":c.isNumber(a)?"Number":a instanceof f?"Dictionary":a instanceof r?"Feature":a instanceof k?"Point":a instanceof n?"Polygon":
a instanceof e?"Polyline":a instanceof q?"Multipoint":a instanceof l?"Extent":c.isFunctionParameter(a)?"Function":a===c.voidOperation?"":"number"===typeof a&&isNaN(a)?"Number":"Unrecognised Type"}function L(a,b,d,f){try{var e=G(a,b.arguments[d]);if(c.equalityTest(e,f))return G(a,b.arguments[d+1]);var g=b.arguments.length-d;return 1===g?G(a,b.arguments[d]):2===g?null:3===g?G(a,b.arguments[d+2]):L(a,b,d+2,f)}catch(Ca){throw Ca;}}function M(a,b,d,f){try{if(!0===f)return G(a,b.arguments[d+1]);if(3===
b.arguments.length-d)return G(a,b.arguments[d+2]);var e=G(a,b.arguments[d+2]);if(!1===c.isBoolean(e))throw Error("WHEN needs boolean test conditions");return M(a,b,d+2,e)}catch(pa){throw pa;}}function ca(a,b){var c=a.length,d=Math.floor(c/2);if(0===c)return[];if(1===c)return[a[0]];var f=ca(a.slice(0,d),b);a=ca(a.slice(d,c),b);for(c=[];0<f.length||0<a.length;)0<f.length&&0<a.length?(d=b(f[0],a[0]),isNaN(d)&&(d=0),0>=d?(c.push(f[0]),f=f.slice(1)):(c.push(a[0]),a=a.slice(1))):0<f.length?(c.push(f[0]),
f=f.slice(1)):0<a.length&&(c.push(a[0]),a=a.slice(1));return c}function N(a,b,d){try{var f=a.body;if(d.length!==a.params.length)throw Error("Invalid Parameter calls to function.");for(var e=0;e<d.length;e++)b.localScope[a.params[e].name.toLowerCase()]={value:d[e],valueset:!0,node:null};var g=G(b,f);if(g instanceof c.ReturnResult)return g.value;if(g===c.breakResult)throw Error("Cannot Break from a Function");if(g===c.continueResult)throw Error("Cannot Continue from a Function");return g instanceof
c.ImplicitResult?g.value:g}catch(Ca){throw Ca;}}function U(a,b,c){return C(a,b,function(b,d,f){b={spatialReference:a.spatialReference,applicationCache:void 0===a.applicationCache?null:a.applicationCache,globalScope:a.globalScope,depthCounter:a.depthCounter+1,console:a.console,localScope:{}};if(64<b.depthCounter)throw Error("Exceeded maximum function depth");return N(c,b,f)})}function P(a){return function(){var b={applicationCache:void 0===a.context.applicationCache?null:a.context.applicationCache,
spatialReference:a.context.spatialReference,console:a.context.console,localScope:{},depthCounter:a.context.depthCounter+1,globalScope:a.context.globalScope};if(64<b.depthCounter)throw Error("Exceeded maximum function depth");return N(a.definition,b,arguments)}}function ga(a){console.log(a)}Object.defineProperty(h,"__esModule",{value:!0});var X=0,T={};x.registerFunctions(T,C);w.registerFunctions(T,C);t.registerFunctions(T,C);u.registerFunctions(T,C);d.registerFunctions(T,C);p.registerFunctions(T,C);
T["typeof"]=function(a,b){return C(a,b,function(a,b,d){c.pcCheck(d,1,1);a=S(d[0]);if("Unrecognised Type"===a)throw Error("Unrecognised Type");return a})};T.iif=function(a,b){try{c.pcCheck(null===b.arguments?[]:b.arguments,3,3);var d=G(a,b.arguments[0]);if(!1===c.isBoolean(d))throw Error("IF Function must have a boolean test condition");return!0===d?G(a,b.arguments[1]):G(a,b.arguments[2])}catch(qa){throw qa;}};T.decode=function(a,b){try{if(2>b.arguments.length)throw Error("Missing Parameters");if(2===
b.arguments.length)return G(a,b.arguments[1]);if(0===(b.arguments.length-1)%2)throw Error("Must have a default value result.");var c=G(a,b.arguments[0]);return L(a,b,1,c)}catch(qa){throw qa;}};T.when=function(a,b){try{if(3>b.arguments.length)throw Error("Missing Parameters");if(0===b.arguments.length%2)throw Error("Must have a default value result.");var d=G(a,b.arguments[0]);if(!1===c.isBoolean(d))throw Error("WHEN needs boolean test conditions");return M(a,b,0,d)}catch(qa){throw qa;}};T.top=function(a,
b){return C(a,b,function(a,b,d){c.pcCheck(d,2,2);if(c.isArray(d[0]))return c.toNumber(d[1])>=d[0].length?d[0].slice(0):d[0].slice(0,c.toNumber(d[1]));if(c.isImmutableArray(d[0]))return c.toNumber(d[1])>=d[0].length()?d[0].slice(0):d[0].slice(0,c.toNumber(d[1]));throw Error("Top cannot accept this parameter type");})};T.first=function(a,b){return C(a,b,function(a,b,d){c.pcCheck(d,1,1);return c.isArray(d[0])?0===d[0].length?null:d[0][0]:c.isImmutableArray(d[0])?0===d[0].length()?null:d[0].get(0):null})};
T.sort=function(a,b){return C(a,b,function(a,b,d){c.pcCheck(d,1,2);a=d[0];c.isImmutableArray(a)&&(a=a.toArray());if(!1===c.isArray(a))throw Error("Illegal Argument");if(1<d.length){if(!1===c.isFunctionParameter(d[1]))throw Error("Illegal Argument");var f=P(d[1]);a=ca(a,function(a,b){return f(a,b)})}else{if(0===a.length)return[];d={};for(b=0;b<a.length;b++){var e=S(a[b]);""!==e&&(d[e]=!0)}if(!0===d.Array||!0===d.Dictionary||!0===d.Feature||!0===d.Point||!0===d.Polygon||!0===d.Polyline||!0===d.Multipoint||
!0===d.Extent||!0===d.Function)return a.slice(0);b=0;var e="",g;for(g in d)b++,e=g;a=1<b||"String"===e?ca(a,function(a,b){if(null===a||void 0===a||a===c.voidOperation)return null===b||void 0===b||b===c.voidOperation?0:1;if(null===b||void 0===b||b===c.voidOperation)return-1;a=c.toString(a);b=c.toString(b);return a<b?-1:a===b?0:1}):"Number"===e?ca(a,function(a,b){return a-b}):"Boolean"===e?ca(a,function(a,b){return a===b?0:b?-1:1}):"Date"===e?ca(a,function(a,b){return b-a}):a.slice(0)}return a})};for(var V in T)T[V]=
{value:new c.NativeFunction(T[V]),valueset:!0,node:null};var da=function(){};da.prototype=T;da.prototype.infinity={value:Number.POSITIVE_INFINITY,valueset:!0,node:null};da.prototype.pi={value:Math.PI,valueset:!0,node:null};h.functionHelper={fixSpatialReference:c.fixSpatialReference,parseArguments:A,standardFunction:C};h.extend=function(a){for(var d={mode:"sync",compiled:!1,functions:{},signatures:[],standardFunction:C,evaluateIdentifier:Y,arcadeCustomFunctionHandler:P},f=0;f<a.length;f++)a[f].registerFunctions(d);
for(var e in d.functions)T[e]={value:new c.NativeFunction(d.functions[e]),valueset:!0,node:null},da.prototype[e]=T[e];for(f=0;f<d.signatures.length;f++)b.addFunctionDeclaration(d.signatures[f],"f")};h.executeScript=function(a,b,d){d||(d=new g(102100));var e=b.vars,m=b.customfunctions,p=new da;e||(e={});m||(m={});var k=new f({newline:"\n",tab:"\t",singlequote:"'",doublequote:'"',forwardslash:"/",backwardslash:"\\"});k.immutable=!1;p.textformatting={value:k,valueset:!0,node:null};for(var l in m)p[l]=
{value:new c.NativeFunction(m[l]),"native":!0,valueset:!0,node:null};for(l in e)p[l]=e[l]&&"esri.Graphic"===e[l].declaredClass?{value:new r(e[l]),valueset:!0,node:null}:{value:e[l],valueset:!0,node:null};a=G({spatialReference:d,globalScope:p,localScope:null,console:b.console?b.console:ga,depthCounter:1,applicationCache:void 0===b.applicationCache?null:b.applicationCache},a.body[0].body);a instanceof c.ReturnResult&&(a=a.value);a instanceof c.ImplicitResult&&(a=a.value);a===c.voidOperation&&(a=null);
if(a===c.breakResult)throw Error("Cannot return BREAK");if(a===c.continueResult)throw Error("Cannot return CONTINUE");if(a instanceof v)throw Error("Cannot return FUNCTION");if(a instanceof c.NativeFunction)throw Error("Cannot return FUNCTION");return a};h.extractFieldLiterals=function(a,c){void 0===c&&(c=!1);return b.findFieldLiterals(a,c)};h.validateScript=function(a,c){return b.validateScript(a,c,"simple")};h.referencesMember=function(a,c){return b.referencesMember(a,c)};h.referencesFunction=function(a,
c){return b.referencesFunction(a,c)};h.findFunctionCalls=function(a){return b.findFunctionCalls(a,!1)}})},"esri/arcade/languageUtils":function(){define("require exports ../geometry/Geometry ../moment dojo/number ./ImmutableArray ../kernel ./ImmutablePointArray ./ImmutablePathArray dojo/_base/array ../geometry/Point ../geometry/Polyline ../geometry/Polygon ../geometry/Extent ../geometry/Multipoint ./FunctionWrapper".split(" "),function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t){function u(a,b,c){if(""===b||
null===b||void 0===b||b===c||b===c)return a;do a=a.replace(b,c);while(-1!==a.indexOf(b));return a}function p(a){return a instanceof L||a instanceof t||a instanceof M}function d(a){return"string"===typeof a||a instanceof String}function m(a){return"boolean"===typeof a}function y(a){return"number"===typeof a}function z(a){return a instanceof Array}function A(a){return a instanceof Date}function C(a,b){if(!1===isNaN(a)){if(void 0===b||null===b||""===b)return a.toString();b=u(b,"\u2030","");b=u(b,"\u00a4",
"");return k.format(a,{pattern:b})}return a.toString()}function G(a,b){a=e(a);return void 0===b||null===b||""===b?a.format():a.format(J(b))}function J(a){return a.replace(/(LTS)|L|l/g,function(a){return"["+a+"]"})}function E(a,b,c){switch(c){case "\x3e":return a>b;case "\x3c":return a<b;case "\x3e\x3d":return a>=b;case "\x3c\x3d":return a<=b}return!1}function K(a,b){if(a===b||null===a&&b===h.voidOperation||null===b&&a===h.voidOperation)return!0;if(A(a)&&A(b))return a.getTime()===b.getTime();if(a instanceof
c||a instanceof g)return a.equalityTest(b);if(a instanceof f&&b instanceof f){var d=void 0,e=void 0;h.isVersion4?(d=a.cache._arcadeCacheId,e=b.cache._arcadeCacheId):(d=a.getCacheValue("_arcadeCacheId"),e=b.getCacheValue("_arcadeCacheId"));if(void 0!==d&&null!==d)return d===e}return void 0!==a&&void 0!==b&&null!==a&&null!==b&&"object"===typeof a&&"object"===typeof b&&(a._arcadeCacheId===b._arcadeCacheId&&void 0!==a._arcadeCacheId&&null!==a._arcadeCacheId||a._underlyingGraphic===b._underlyingGraphic&&
void 0!==a._underlyingGraphic&&null!==a._underlyingGraphic)?!0:!1}function R(a,b){if(d(a))return a;if(null===a)return"";if(y(a))return C(a,b);if(m(a))return a.toString();if(A(a))return G(a,b);if(a instanceof n)return JSON.stringify(a.toJSON());if(z(a)){b=[];for(var c=0;c<a.length;c++)b[c]=ba(a[c]);return"["+b.join(",")+"]"}if(a instanceof l){b=[];for(c=0;c<a.length();c++)b[c]=ba(a.get(c));return"["+b.join(",")+"]"}return null!==a&&"object"===typeof a&&void 0!==a.castToText?a.castToText():p(a)?"object, Function":
""}function Z(a,b){if(d(a))return a;if(null===a)return"";if(y(a))return C(a,b);if(m(a))return a.toString();if(A(a))return G(a,b);if(a instanceof n)return a instanceof x?'{"xmin":'+a.xmin.toString()+',"ymin":'+a.ymin.toString()+","+(a.hasZ?'"zmin":'+a.zmin.toString()+",":"")+(a.hasM?'"mmin":'+a.mmin.toString()+",":"")+'"xmax":'+a.xmax.toString()+',"ymax":'+a.ymax.toString()+","+(a.hasZ?'"zmax":'+a.zmax.toString()+",":"")+(a.hasM?'"mmax":'+a.mmax.toString()+",":"")+'"spatialReference":'+D(a.spatialReference)+
"}":D(a.toJSON(),function(a,b){return a.key===b.key?0:"spatialReference"===a.key?1:"spatialReference"===b.key||a.key<b.key?-1:a.key>b.key?1:0});if(z(a)){b=[];for(var c=0;c<a.length;c++)b[c]=ba(a[c]);return"["+b.join(",")+"]"}if(a instanceof l){b=[];for(c=0;c<a.length();c++)b[c]=ba(a.get(c));return"["+b.join(",")+"]"}return null!==a&&"object"===typeof a&&void 0!==a.castToText?a.castToText():p(a)?"object, Function":""}function ba(a){if(null!==a){if(m(a)||y(a)||d(a))return JSON.stringify(a);if(a instanceof
n||a instanceof l||a instanceof Array)return Z(a);if(a instanceof Date)return JSON.stringify(G(a,""));if(null!==a&&"object"===typeof a&&void 0!==a.castToText)return a.castToText()}return"null"}function F(a,b){return y(a)?a:null===a||""===a?0:A(a)?NaN:m(a)?a?1:0:z(a)||""===a||void 0===a?NaN:void 0!==b&&d(a)?(b=u(b,"\u2030",""),b=u(b,"\u00a4",""),k.parse(a,{pattern:b})):a===h.voidOperation?0:Number(a)}function Y(a,c){var d;b.some(c.fields,function(b){b.name===a&&(d=b.domain);return!!d});return d}function D(a,
b){b||(b={});"function"===typeof b&&(b={cmp:b});var c="boolean"===typeof b.cycles?b.cycles:!1,d=b.cmp&&function(a){return function(b){return function(c,d){return a({key:c,value:b[c]},{key:d,value:b[d]})}}}(b.cmp),f=[];return function T(a){a&&a.toJSON&&"function"===typeof a.toJSON&&(a=a.toJSON());if(void 0!==a){if("number"===typeof a)return isFinite(a)?""+a:"null";if("object"!==typeof a)return JSON.stringify(a);var b,e;if(Array.isArray(a)){e="[";for(b=0;b<a.length;b++)b&&(e+=","),e+=T(a[b])||"null";
return e+"]"}if(null===a)return"null";if(-1!==f.indexOf(a)){if(c)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON");}var g=f.push(a)-1,m=Object.keys(a).sort(d&&d(a));e="";for(b=0;b<m.length;b++){var p=m[b],k=T(a[p]);k&&(e&&(e+=","),e+=JSON.stringify(p)+":"+k)}f.splice(g,1);return"{"+e+"}"}}(a)}Object.defineProperty(h,"__esModule",{value:!0});a=function(){return function(a){this.value=a}}();var S=function(){return function(a){this.value=a}}(),L=function(){return function(a){this.fn=
a}}(),M=function(){return function(a){this.fn=a}}();h.NativeFunction=L;h.ImplicitResult=S;h.ReturnResult=a;h.SizzleFunction=M;h.isVersion4=0===q.version.indexOf("4.");h.voidOperation={type:"VOID"};h.breakResult={type:"BREAK"};h.continueResult={type:"CONTINUE"};h.multiReplace=u;h.isFunctionParameter=p;h.isSimpleType=function(a){return d(a)||y(a)||A(a)||m(a)||null===a||a===h.voidOperation||"number"===typeof a?!0:!1};h.defaultUndefined=function(a,b){return void 0===a?b:a};h.isString=d;h.isBoolean=m;
h.isNumber=y;h.isArray=z;h.isFeatureCursor=function(a){return a&&void 0!==a.isFeatureCursor};h.isImmutableArray=function(a){return a instanceof l};h.isDate=A;h.pcCheck=function(a,b,c){if(a.length<b||a.length>c)throw Error("Function called with wrong number of Parameters");};h.generateUUID=function(){var a=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(b){var c=(a+16*Math.random())%16|0;a=Math.floor(a/16);return("x"===b?c:c&3|8).toString(16)})};h.formatNumber=
C;h.formatDate=G;h.standardiseDateFormat=J;h.greaterThanLessThan=function(a,b,c){if(null===a){if(null===b||b===h.voidOperation)return E(null,null,c);if(y(b))return E(0,b,c);if(d(b)||m(b))return E(0,F(b),c);if(A(b))return E(0,b.getTime(),c)}if(a===h.voidOperation){if(null===b||b===h.voidOperation)return E(null,null,c);if(y(b))return E(0,b,c);if(d(b)||m(b))return E(0,F(b),c);if(A(b))return E(0,b.getTime(),c)}else if(y(a)){if(y(b))return E(a,b,c);if(m(b))return E(a,F(b),c);if(null===b||b===h.voidOperation)return E(a,
0,c);if(d(b))return E(a,F(b),c);if(A(b))return E(a,b.getTime(),c)}else if(d(a)){if(d(b))return E(R(a),R(b),c);if(A(b))return E(F(a),b.getTime(),c);if(y(b))return E(F(a),b,c);if(null===b||b===h.voidOperation)return E(F(a),0,c);if(m(b))return E(F(a),F(b),c)}else if(A(a)){if(A(b))return E(a,b,c);if(null===b||b===h.voidOperation)return E(a.getTime(),0,c);if(y(b))return E(a.getTime(),b,c);if(m(b)||d(b))return E(a.getTime(),F(b),c)}else if(m(a)){if(m(b))return E(a,b,c);if(y(b))return E(F(a),F(b),c);if(A(b))return E(F(a),
b.getTime(),c);if(null===b||b===h.voidOperation)return E(F(a),0,c);if(d(b))return E(F(a),F(b),c)}return!K(a,b)||"\x3c\x3d"!==c&&"\x3e\x3d"!==c?!1:!0};h.equalityTest=K;h.toString=R;h.toNumberArray=function(a){var b=[];if(!1===z(a))return null;if(a instanceof l){for(var c=0;c<a.length();c++)b[c]=F(a.get(c));return b}for(c=0;c<a.length;c++)b[c]=F(a[c]);return b};h.toStringExplicit=Z;h.toNumber=F;h.toDate=function(a,b){return A(a)?a:d(a)&&(a=e(a,[void 0===b||null===b||""===b?e.ISO_8601:b]),a.isValid())?
a.toDate():null};h.toDateM=function(a,b){return A(a)?e(a):d(a)&&(a=e(a,[void 0===b||null===b||""===b?e.ISO_8601:b]),a.isValid())?a:null};h.toBoolean=function(a){if(m(a))return a;if(d(a)){if(a=a.toLowerCase(),"true"===a)return!0}else if(y(a))return 0===a||isNaN(a)?!1:!0;return!1};h.fixSpatialReference=function(a,b){if(null===a||void 0===a)return null;if(null===a.spatialReference||void 0===a.spatialReference)a.spatialReference=b;return a};h.fixNullGeometry=function(a){return null===a?null:a instanceof
f?"NaN"===a.x||null===a.x||isNaN(a.x)?null:a:a instanceof v?0===a.rings.length?null:a:a instanceof r?0===a.paths.length?null:a:a instanceof w?0===a.points.length?null:a:a instanceof x?"NaN"===a.xmin||null===a.xmin||isNaN(a.xmin)?null:a:null};h.getDomainValue=function(a,b){if(!a||!a.domain)return null;var c=null;b="string"===a.field.type||"esriFieldTypeString"===a.field.type?R(b):F(b);for(var d=0;d<a.domain.codedValues.length;d++){var f=a.domain.codedValues[d];f.code===b&&(c=f)}return null===c?null:
c.name};h.getDomainCode=function(a,b){if(!a||!a.domain)return null;var c=null;b=R(b);for(var d=0;d<a.domain.codedValues.length;d++){var f=a.domain.codedValues[d];f.name===b&&(c=f)}return null===c?null:c.code};h.getDomain=function(a,c,d,f){void 0===d&&(d=null);if(!c||!c.fields)return null;for(var e=null,g=0;g<c.fields.length;g++){var m=c.fields[g];m.name.toLowerCase()===a.toString().toLowerCase()&&(e=m)}if(null===e)return null;var p,k;f||(f=d&&c.typeIdField&&d._field(c.typeIdField));null!=f&&b.some(c.types,
function(a){return a.id===f?((p=a.domains&&a.domains[e.name])&&"inherited"===p.type&&(p=Y(e.name,c),k=!0),!0):!1});k||p||(p=Y(a,c));return{field:e,domain:p}};h.stableStringify=D})},"esri/moment":function(){define(["require","exports","./plugins/moment!"],function(a,h,n){return n})},"esri/plugins/moment":function(){define(["require","exports","dojo/_base/kernel","moment/moment"],function(a,h,n,e){Object.defineProperty(h,"__esModule",{value:!0});var k={ar:1,"ar-dz":1,"ar-kw":1,"ar-ly":1,"ar-ma":1,"ar-sa":1,
"ar-tn":1,bs:1,cs:1,da:1,de:1,"de-at":1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,"en-ie":1,"en-nz":1,es:1,"es-do":1,"es-us":1,et:1,fi:1,fr:1,"fr-ca":1,"fr-ch":1,he:1,hi:1,hr:1,id:1,it:1,ja:1,ko:1,lt:1,lv:1,nb:1,nl:1,"nl-be":1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,sl:1,sr:1,"sr-cyrl":1,sv:1,th:1,tr:1,vi:1,"zh-cn":1,"zh-hk":1,"zh-tw":1};h.load=function(a,h,g){a=n.locale;var c=a in k;if(!c){var b=a.split("-");1<b.length&&b[0]in k&&(a=b[0],c=!0)}c?h(["moment/locale/"+a],function(){g(e)}):g(e)}})},"moment/moment":function(){(function(a,
h){"object"===typeof exports&&"undefined"!==typeof module?module.exports=h():"function"===typeof define&&define.amd?define(h):a.moment=h()})(this,function(){function a(){return Vb.apply(null,arguments)}function h(a){return a instanceof Array||"[object Array]"===Object.prototype.toString.call(a)}function n(a){return null!=a&&"[object Object]"===Object.prototype.toString.call(a)}function e(a){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(a).length;for(var b in a)if(a.hasOwnProperty(b))return!1;
return!0}function k(a){return void 0===a}function l(a){return"number"===typeof a||"[object Number]"===Object.prototype.toString.call(a)}function q(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function g(a,b){var c=[],d;for(d=0;d<a.length;++d)c.push(b(a[d],d));return c}function c(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function b(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);c(b,"toString")&&(a.toString=b.toString);c(b,"valueOf")&&(a.valueOf=b.valueOf);return a}
function f(a,b,c,d){return db(a,b,c,d,!0).utc()}function r(a){null==a._pf&&(a._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1});return a._pf}function v(a){if(null==a._isValid){var b=r(a),c=Wb.call(b.parsedDateParts,function(a){return null!=a}),c=!isNaN(a._d.getTime())&&0>b.overflow&&!b.empty&&!b.invalidMonth&&!b.invalidWeekday&&!b.weekdayMismatch&&
!b.nullInput&&!b.invalidFormat&&!b.userInvalidated&&(!b.meridiem||b.meridiem&&c);a._strict&&(c=c&&0===b.charsLeftOver&&0===b.unusedTokens.length&&void 0===b.bigHour);if(null!=Object.isFrozen&&Object.isFrozen(a))return c;a._isValid=c}return a._isValid}function x(a){var c=f(NaN);null!=a?b(r(c),a):r(c).userInvalidated=!0;return c}function w(a,b){var c,d,f;k(b._isAMomentObject)||(a._isAMomentObject=b._isAMomentObject);k(b._i)||(a._i=b._i);k(b._f)||(a._f=b._f);k(b._l)||(a._l=b._l);k(b._strict)||(a._strict=
b._strict);k(b._tzm)||(a._tzm=b._tzm);k(b._isUTC)||(a._isUTC=b._isUTC);k(b._offset)||(a._offset=b._offset);k(b._pf)||(a._pf=r(b));k(b._locale)||(a._locale=b._locale);if(0<Hb.length)for(c=0;c<Hb.length;c++)d=Hb[c],f=b[d],k(f)||(a[d]=f);return a}function t(b){w(this,b);this._d=new Date(null!=b._d?b._d.getTime():NaN);this.isValid()||(this._d=new Date(NaN));!1===Ib&&(Ib=!0,a.updateOffset(this),Ib=!1)}function u(a){return a instanceof t||null!=a&&null!=a._isAMomentObject}function p(a){return 0>a?Math.ceil(a)||
0:Math.floor(a)}function d(a){a=+a;var b=0;0!==a&&isFinite(a)&&(b=p(a));return b}function m(a,b,c){var f=Math.min(a.length,b.length),e=Math.abs(a.length-b.length),g=0,m;for(m=0;m<f;m++)(c&&a[m]!==b[m]||!c&&d(a[m])!==d(b[m]))&&g++;return g+e}function y(b){!1===a.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function z(c,d){var f=!0;return b(function(){null!=a.deprecationHandler&&a.deprecationHandler(null,c);if(f){for(var b=[],e,g=0;g<
arguments.length;g++){e="";if("object"===typeof arguments[g]){e+="\n["+g+"] ";for(var m in arguments[0])e+=m+": "+arguments[0][m]+", ";e=e.slice(0,-2)}else e=arguments[g];b.push(e)}y(c+"\nArguments: "+Array.prototype.slice.call(b).join("")+"\n"+Error().stack);f=!1}return d.apply(this,arguments)},d)}function A(b,c){null!=a.deprecationHandler&&a.deprecationHandler(b,c);Xb[b]||(y(c),Xb[b]=!0)}function C(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function G(a,
d){var f=b({},a),e;for(e in d)c(d,e)&&(n(a[e])&&n(d[e])?(f[e]={},b(f[e],a[e]),b(f[e],d[e])):null!=d[e]?f[e]=d[e]:delete f[e]);for(e in a)c(a,e)&&!c(d,e)&&n(a[e])&&(f[e]=b({},f[e]));return f}function J(a){null!=a&&this.set(a)}function E(a,b){var c=a.toLowerCase();ob[c]=ob[c+"s"]=ob[b]=a}function K(a){return"string"===typeof a?ob[a]||ob[a.toLowerCase()]:void 0}function R(a){var b={},d,e;for(e in a)c(a,e)&&(d=K(e))&&(b[d]=a[e]);return b}function Z(a){var b=[],c;for(c in a)b.push({unit:c,priority:Da[c]});
b.sort(function(a,b){return a.priority-b.priority});return b}function ba(a,b,c){var d=""+Math.abs(a);return(0<=a?c?"+":"":"-")+Math.pow(10,Math.max(0,b-d.length)).toString().substr(1)+d}function F(a,b,c,d){var e=d;"string"===typeof d&&(e=function(){return this[d]()});a&&(lb[a]=e);b&&(lb[b[0]]=function(){return ba(e.apply(this,arguments),b[1],b[2])});c&&(lb[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function Y(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):
a.replace(/\\/g,"")}function D(a){var b=a.match(Yb),c,d;c=0;for(d=b.length;c<d;c++)b[c]=lb[b[c]]?lb[b[c]]:Y(b[c]);return function(c){var e="",f;for(f=0;f<d;f++)e+=C(b[f])?b[f].call(c,a):b[f];return e}}function S(a,b){if(!a.isValid())return a.localeData().invalidDate();b=L(b,a.localeData());Jb[b]=Jb[b]||D(b);return Jb[b](a)}function L(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(xb.lastIndex=0;0<=d&&xb.test(a);)a=a.replace(xb,c),xb.lastIndex=0,--d;return a}function M(a,b,c){Kb[a]=C(b)?
b:function(a,d){return a&&c?c:b}}function ca(a,b){return c(Kb,a)?Kb[a](b._strict,b._locale):new RegExp(N(a))}function N(a){return U(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function U(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$\x26")}function P(a,b){var c,e=b;"string"===typeof a&&(a=[a]);l(b)&&(e=function(a,c){c[b]=d(a)});for(c=0;c<a.length;c++)Lb[a[c]]=e}function ga(a,b){P(a,function(a,c,d,e){d._w=d._w||{};b(a,d._w,d,e)})}function X(a){return 0===
a%4&&0!==a%100||0===a%400}function T(b,c){return function(d){return null!=d?(da(this,b,d),a.updateOffset(this,c),this):V(this,b)}}function V(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function da(a,b,c){if(a.isValid()&&!isNaN(c))if("FullYear"===b&&X(a.year())&&1===a.month()&&29===a.date())a._d["set"+(a._isUTC?"UTC":"")+b](c,a.month(),ja(c,a.month()));else a._d["set"+(a._isUTC?"UTC":"")+b](c)}function ja(a,b){if(isNaN(a)||isNaN(b))return NaN;var c=(b%12+12)%12;return 1===c?X(a+
(b-c)/12)?29:28:31-c%7%2}function ka(a,b){var c;if(!a.isValid())return a;if("string"===typeof b)if(/^\d+$/.test(b))b=d(b);else if(b=a.localeData().monthsParse(b),!l(b))return a;c=Math.min(a.date(),ja(a.year(),b));a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c);return a}function xa(b){return null!=b?(ka(this,b),a.updateOffset(this,!0),this):V(this,"Month")}function qa(){function a(a,b){return b.length-a.length}var b=[],c=[],d=[],e,g;for(e=0;12>e;e++)g=f([2E3,e]),b.push(this.monthsShort(g,"")),c.push(this.months(g,
"")),d.push(this.months(g,"")),d.push(this.monthsShort(g,""));b.sort(a);c.sort(a);d.sort(a);for(e=0;12>e;e++)b[e]=U(b[e]),c[e]=U(c[e]);for(e=0;24>e;e++)d[e]=U(d[e]);this._monthsShortRegex=this._monthsRegex=new RegExp("^("+d.join("|")+")","i");this._monthsStrictRegex=new RegExp("^("+c.join("|")+")","i");this._monthsShortStrictRegex=new RegExp("^("+b.join("|")+")","i")}function wa(a,b,c,d,e,f,g){b=new Date(a,b,c,d,e,f,g);100>a&&0<=a&&isFinite(b.getFullYear())&&b.setFullYear(a);return b}function pa(a){var b=
new Date(Date.UTC.apply(null,arguments));100>a&&0<=a&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a);return b}function Ca(a,b,c){c=7+b-c;return-((7+pa(a,0,c).getUTCDay()-b)%7)+c-1}function ta(a,b,c,d,e){c=(7+c-d)%7;d=Ca(a,d,e);d=1+7*(b-1)+c+d;0>=d?(b=a-1,a=(X(b)?366:365)+d):d>(X(a)?366:365)?(b=a+1,a=d-(X(a)?366:365)):(b=a,a=d);return{year:b,dayOfYear:a}}function Ia(a,b,c){var d=Ca(a.year(),b,c),d=Math.floor((a.dayOfYear()-d-1)/7)+1;1>d?(a=a.year()-1,b=d+ia(a,b,c)):d>ia(a.year(),b,c)?(b=d-ia(a.year(),
b,c),a=a.year()+1):(a=a.year(),b=d);return{week:b,year:a}}function ia(a,b,c){var d=Ca(a,b,c);b=Ca(a+1,b,c);return((X(a)?366:365)-d+b)/7}function La(a,b,c){var d,e;a=a.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],d=0;7>d;++d)e=f([2E3,1]).day(d),this._minWeekdaysParse[d]=this.weekdaysMin(e,"").toLocaleLowerCase(),this._shortWeekdaysParse[d]=this.weekdaysShort(e,"").toLocaleLowerCase(),this._weekdaysParse[d]=this.weekdays(e,
"").toLocaleLowerCase();if(c)b="dddd"===b?ya.call(this._weekdaysParse,a):"ddd"===b?ya.call(this._shortWeekdaysParse,a):ya.call(this._minWeekdaysParse,a);else if("dddd"===b){b=ya.call(this._weekdaysParse,a);if(-1!==b)return b;b=ya.call(this._shortWeekdaysParse,a);if(-1!==b)return b;b=ya.call(this._minWeekdaysParse,a)}else if("ddd"===b){b=ya.call(this._shortWeekdaysParse,a);if(-1!==b)return b;b=ya.call(this._weekdaysParse,a);if(-1!==b)return b;b=ya.call(this._minWeekdaysParse,a)}else{b=ya.call(this._minWeekdaysParse,
a);if(-1!==b)return b;b=ya.call(this._weekdaysParse,a);if(-1!==b)return b;b=ya.call(this._shortWeekdaysParse,a)}return-1!==b?b:null}function ua(){function a(a,b){return b.length-a.length}var b=[],c=[],d=[],e=[],g,m,p,k;for(g=0;7>g;g++)m=f([2E3,1]).day(g),p=this.weekdaysMin(m,""),k=this.weekdaysShort(m,""),m=this.weekdays(m,""),b.push(p),c.push(k),d.push(m),e.push(p),e.push(k),e.push(m);b.sort(a);c.sort(a);d.sort(a);e.sort(a);for(g=0;7>g;g++)c[g]=U(c[g]),d[g]=U(d[g]),e[g]=U(e[g]);this._weekdaysMinRegex=
this._weekdaysShortRegex=this._weekdaysRegex=new RegExp("^("+e.join("|")+")","i");this._weekdaysStrictRegex=new RegExp("^("+d.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+c.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+b.join("|")+")","i")}function za(){return this.hours()%12||12}function Ha(a,b){F(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function hb(a,b){return b._meridiemParse}function Va(a){return a?a.toLowerCase().replace("_",
"-"):a}function Ma(a){var b=null;if(!Aa[a]&&"undefined"!==typeof module&&module&&module.exports)try{b=yb._abbr,require("./locale/"+a),Ka(b)}catch(Wc){}return Aa[a]}function Ka(a,b){a&&(a=k(b)?Ea(a):Ga(a,b))&&(yb=a);return yb._abbr}function Ga(a,b){if(null!==b){var c=Zb;b.abbr=a;if(null!=Aa[a])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),
c=Aa[a]._config;else if(null!=b.parentLocale)if(null!=Aa[b.parentLocale])c=Aa[b.parentLocale]._config;else return pb[b.parentLocale]||(pb[b.parentLocale]=[]),pb[b.parentLocale].push({name:a,config:b}),null;Aa[a]=new J(G(c,b));pb[a]&&pb[a].forEach(function(a){Ga(a.name,a.config)});Ka(a);return Aa[a]}delete Aa[a];return null}function Ea(a){var b;a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr);if(!a)return yb;if(!h(a)){if(b=Ma(a))return b;a=[a]}a:{b=0;for(var c,d,e,f;b<a.length;){f=Va(a[b]).split("-");
c=f.length;for(d=(d=Va(a[b+1]))?d.split("-"):null;0<c;){if(e=Ma(f.slice(0,c).join("-"))){a=e;break a}if(d&&d.length>=c&&m(f,d,!0)>=c-1)break;c--}b++}a=null}return a}function Ya(a){var b;(b=a._a)&&-2===r(a).overflow&&(b=0>b[$a]||11<b[$a]?$a:1>b[Wa]||b[Wa]>ja(b[Ta],b[$a])?Wa:0>b[Ba]||24<b[Ba]||24===b[Ba]&&(0!==b[Ua]||0!==b[ab]||0!==b[ib])?Ba:0>b[Ua]||59<b[Ua]?Ua:0>b[ab]||59<b[ab]?ab:0>b[ib]||999<b[ib]?ib:-1,r(a)._overflowDayOfYear&&(b<Ta||b>Wa)&&(b=Wa),r(a)._overflowWeeks&&-1===b&&(b=mc),r(a)._overflowWeekday&&
-1===b&&(b=nc),r(a).overflow=b);return a}function Ja(a,b,c){return null!=a?a:null!=b?b:c}function Ra(b){var c,d=[],e;if(!b._d){e=new Date(a.now());e=b._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()];if(b._w&&null==b._a[Wa]&&null==b._a[$a]){var f,g,m,p,k,l;f=b._w;if(null!=f.GG||null!=f.W||null!=f.E){if(k=1,l=4,g=Ja(f.GG,b._a[Ta],Ia(H(),1,4).year),m=Ja(f.W,1),p=Ja(f.E,1),1>p||7<p)c=!0}else if(k=b._locale._week.dow,l=b._locale._week.doy,m=Ia(H(),
k,l),g=Ja(f.gg,b._a[Ta],m.year),m=Ja(f.w,m.week),null!=f.d){if(p=f.d,0>p||6<p)c=!0}else if(null!=f.e){if(p=f.e+k,0>f.e||6<f.e)c=!0}else p=k;1>m||m>ia(g,k,l)?r(b)._overflowWeeks=!0:null!=c?r(b)._overflowWeekday=!0:(c=ta(g,m,p,k,l),b._a[Ta]=c.year,b._dayOfYear=c.dayOfYear)}if(null!=b._dayOfYear){c=Ja(b._a[Ta],e[Ta]);if(b._dayOfYear>(X(c)?366:365)||0===b._dayOfYear)r(b)._overflowDayOfYear=!0;c=pa(c,0,b._dayOfYear);b._a[$a]=c.getUTCMonth();b._a[Wa]=c.getUTCDate()}for(c=0;3>c&&null==b._a[c];++c)b._a[c]=
d[c]=e[c];for(;7>c;c++)b._a[c]=d[c]=null==b._a[c]?2===c?1:0:b._a[c];24===b._a[Ba]&&0===b._a[Ua]&&0===b._a[ab]&&0===b._a[ib]&&(b._nextDay=!0,b._a[Ba]=0);b._d=(b._useUTC?pa:wa).apply(null,d);null!=b._tzm&&b._d.setUTCMinutes(b._d.getUTCMinutes()-b._tzm);b._nextDay&&(b._a[Ba]=24);b._w&&"undefined"!==typeof b._w.d&&b._w.d!==b._d.getDay()&&(r(b).weekdayMismatch=!0)}}function O(a){var b,c;b=a._i;var d=oc.exec(b)||pc.exec(b),e,f,g,m;if(d){r(a).iso=!0;b=0;for(c=zb.length;b<c;b++)if(zb[b][1].exec(d[1])){f=
zb[b][0];e=!1!==zb[b][2];break}if(null==f)a._isValid=!1;else{if(d[3]){b=0;for(c=Mb.length;b<c;b++)if(Mb[b][1].exec(d[3])){g=(d[2]||" ")+Mb[b][0];break}if(null==g){a._isValid=!1;return}}if(e||null==g){if(d[4])if(qc.exec(d[4]))m="Z";else{a._isValid=!1;return}a._f=f+(g||"")+(m||"");fa(a)}else a._isValid=!1}}else a._isValid=!1}function Fa(a){var b=rc.exec(a._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim());if(b){var c=b[3],d=b[2],e=b[5],f=b[6],g=b[7],m=parseInt(b[4],10),c=[49>=m?2E3+
m:999>=m?1900+m:m,$b.indexOf(c),parseInt(d,10),parseInt(e,10),parseInt(f,10)];g&&c.push(parseInt(g,10));a:{if(g=b[1])if(g=ac.indexOf(g),d=(new Date(c[0],c[1],c[2])).getDay(),g!==d){r(a).weekdayMismatch=!0;g=a._isValid=!1;break a}g=!0}g&&(a._a=c,(g=b[8])?b=sc[g]:b[9]?b=0:(b=parseInt(b[10],10),g=b%100,b=(b-g)/100*60+g),a._tzm=b,a._d=pa.apply(null,a._a),a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),r(a).rfc2822=!0)}else a._isValid=!1}function va(b){var c=tc.exec(b._i);null!==c?b._d=new Date(+c[1]):
(O(b),!1===b._isValid&&(delete b._isValid,Fa(b),!1===b._isValid&&(delete b._isValid,a.createFromInputFallback(b))))}function fa(b){if(b._f===a.ISO_8601)O(b);else if(b._f===a.RFC_2822)Fa(b);else{b._a=[];r(b).empty=!0;var d=""+b._i,e,f,g,m,p,k=d.length,l=0;g=L(b._f,b._locale).match(Yb)||[];for(e=0;e<g.length;e++){m=g[e];if(f=(d.match(ca(m,b))||[])[0])p=d.substr(0,d.indexOf(f)),0<p.length&&r(b).unusedInput.push(p),d=d.slice(d.indexOf(f)+f.length),l+=f.length;if(lb[m]){if(f?r(b).empty=!1:r(b).unusedTokens.push(m),
p=b,null!=f&&c(Lb,m))Lb[m](f,p._a,p,m)}else b._strict&&!f&&r(b).unusedTokens.push(m)}r(b).charsLeftOver=k-l;0<d.length&&r(b).unusedInput.push(d);12>=b._a[Ba]&&!0===r(b).bigHour&&0<b._a[Ba]&&(r(b).bigHour=void 0);r(b).parsedDateParts=b._a.slice(0);r(b).meridiem=b._meridiem;d=b._a;e=Ba;k=b._locale;g=b._a[Ba];l=b._meridiem;null!=l&&(null!=k.meridiemHour?g=k.meridiemHour(g,l):null!=k.isPM&&((k=k.isPM(l))&&12>g&&(g+=12),k||12!==g||(g=0)));d[e]=g;Ra(b);Ya(b)}}function Qa(a){if(!a._d){var b=R(a._i);a._a=
g([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)});Ra(a)}}function Na(a){var c=a._i,d=a._f;a._locale=a._locale||Ea(a._l);if(null===c||void 0===d&&""===c)return x({nullInput:!0});"string"===typeof c&&(a._i=c=a._locale.preparse(c));if(u(c))return new t(Ya(c));if(q(c))a._d=c;else if(h(d)){var e,f,g;if(0===a._f.length)r(a).invalidFormat=!0,a._d=new Date(NaN);else{for(c=0;c<a._f.length;c++)if(d=0,e=w({},a),null!=a._useUTC&&(e._useUTC=a._useUTC),
e._f=a._f[c],fa(e),v(e)&&(d+=r(e).charsLeftOver,d+=10*r(e).unusedTokens.length,r(e).score=d,null==g||d<g))g=d,f=e;b(a,f||e)}}else d?fa(a):la(a);v(a)||(a._d=null);return a}function la(b){var c=b._i;k(c)?b._d=new Date(a.now()):q(c)?b._d=new Date(c.valueOf()):"string"===typeof c?va(b):h(c)?(b._a=g(c.slice(0),function(a){return parseInt(a,10)}),Ra(b)):n(c)?Qa(b):l(c)?b._d=new Date(c):a.createFromInputFallback(b)}function db(a,b,c,d,f){var g={};if(!0===c||!1===c)d=c,c=void 0;if(n(a)&&e(a)||h(a)&&0===a.length)a=
void 0;g._isAMomentObject=!0;g._useUTC=g._isUTC=f;g._l=c;g._i=a;g._f=b;g._strict=d;a=new t(Ya(Na(g)));a._nextDay&&(a.add(1,"d"),a._nextDay=void 0);return a}function H(a,b,c,d){return db(a,b,c,d,!1)}function ma(a,b){var c,d;1===b.length&&h(b[0])&&(b=b[0]);if(!b.length)return H();c=b[0];for(d=1;d<b.length;++d)if(!b[d].isValid()||b[d][a](c))c=b[d];return c}function B(a){for(var b in a)if(-1===ya.call(qb,b)||null!=a[b]&&isNaN(a[b]))return!1;b=!1;for(var c=0;c<qb.length;++c)if(a[qb[c]]){if(b)return!1;
parseFloat(a[qb[c]])!==d(a[qb[c]])&&(b=!0)}return!0}function ea(a){a=R(a);var b=a.year||0,c=a.quarter||0,d=a.month||0,e=a.week||0,f=a.day||0,g=a.hour||0,m=a.minute||0,p=a.second||0,k=a.millisecond||0;this._isValid=B(a);this._milliseconds=+k+1E3*p+6E4*m+36E5*g;this._days=+f+7*e;this._months=+d+3*c+12*b;this._data={};this._locale=Ea();this._bubble()}function ha(a){return a instanceof ea}function na(a){return 0>a?-1*Math.round(-1*a):Math.round(a)}function W(a,b){F(a,0,0,function(){var a=this.utcOffset(),
c="+";0>a&&(a=-a,c="-");return c+ba(~~(a/60),2)+b+ba(~~a%60,2)})}function aa(a,b){a=(b||"").match(a);if(null===a)return null;a=((a[a.length-1]||[])+"").match(uc)||["-",0,0];b=+(60*a[1])+d(a[2]);return 0===b?0:"+"===a[0]?b:-b}function I(b,c){return c._isUTC?(c=c.clone(),b=(u(b)||q(b)?b.valueOf():H(b).valueOf())-c.valueOf(),c._d.setTime(c._d.valueOf()+b),a.updateOffset(c,!1),c):H(b).local()}function nb(){return this.isValid()?this._isUTC&&0===this._offset:!1}function Oa(a,b){var e=a,f=null;ha(a)?e=
{ms:a._milliseconds,d:a._days,M:a._months}:l(a)?(e={},b?e[b]=a:e.milliseconds=a):(f=vc.exec(a))?(e="-"===f[1]?-1:1,e={y:0,d:d(f[Wa])*e,h:d(f[Ba])*e,m:d(f[Ua])*e,s:d(f[ab])*e,ms:d(na(1E3*f[ib]))*e}):(f=wc.exec(a))?(e="-"===f[1]?-1:1,e={y:Za(f[2],e),M:Za(f[3],e),w:Za(f[4],e),d:Za(f[5],e),h:Za(f[6],e),m:Za(f[7],e),s:Za(f[8],e)}):null==e?e={}:"object"===typeof e&&("from"in e||"to"in e)&&(f=H(e.from),e=H(e.to),f.isValid()&&e.isValid()?(e=I(e,f),f.isBefore(e)?e=vb(f,e):(e=vb(e,f),e.milliseconds=-e.milliseconds,
e.months=-e.months),f=e):f={milliseconds:0,months:0},e={},e.ms=f.milliseconds,e.M=f.months);e=new ea(e);ha(a)&&c(a,"_locale")&&(e._locale=a._locale);return e}function Za(a,b){a=a&&parseFloat(a.replace(",","."));return(isNaN(a)?0:a)*b}function vb(a,b){var c={milliseconds:0,months:0};c.months=b.month()-a.month()+12*(b.year()-a.year());a.clone().add(c.months,"M").isAfter(b)&&--c.months;c.milliseconds=+b-+a.clone().add(c.months,"M");return c}function Sa(a,b){return function(c,d){var e;null===d||isNaN(+d)||
(A(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),e=c,c=d,d=e);c=Oa("string"===typeof c?+c:c,d);wb(this,c,a);return this}}function wb(b,c,d,e){var f=c._milliseconds,g=na(c._days);c=na(c._months);b.isValid()&&(e=null==e?!0:e,c&&ka(b,V(b,"Month")+c*d),g&&da(b,"Date",V(b,"Date")+g*d),f&&b._d.setTime(b._d.valueOf()+f*d),e&&a.updateOffset(b,g||c))}function sb(a,b){var c=12*(b.year()-
a.year())+(b.month()-a.month()),d=a.clone().add(c,"months");0>b-d?(a=a.clone().add(c-1,"months"),b=(b-d)/(d-a)):(a=a.clone().add(c+1,"months"),b=(b-d)/(a-d));return-(c+b)||0}function tb(a){if(void 0===a)return this._locale._abbr;a=Ea(a);null!=a&&(this._locale=a);return this}function mb(){return this._locale}function jb(a,b){F(0,[a,a.length],0,b)}function Qb(a,b,c,d,e){var f;if(null==a)return Ia(this,d,e).year;f=ia(a,d,e);b>f&&(b=f);a=ta(a,b,c,d,e);a=pa(a.year,0,a.dayOfYear);this.year(a.getUTCFullYear());
this.month(a.getUTCMonth());this.date(a.getUTCDate());return this}function kc(a,b){b[ib]=d(1E3*("0."+a))}function Rb(a){return a}function ub(a,b,c,d){var e=Ea();b=f().set(d,b);return e[c](b,a)}function Sb(a,b,c){l(a)&&(b=a,a=void 0);a=a||"";if(null!=b)return ub(a,b,c,"month");var d=[];for(b=0;12>b;b++)d[b]=ub(a,b,c,"month");return d}function Gb(a,b,c,d){"boolean"!==typeof a&&(c=b=a,a=!1);l(b)&&(c=b,b=void 0);b=b||"";var e=Ea();a=a?e._week.dow:0;if(null!=c)return ub(b,(c+a)%7,d,"day");e=[];for(c=0;7>
c;c++)e[c]=ub(b,(c+a)%7,d,"day");return e}function Tb(a,b,c,d){b=Oa(b,c);a._milliseconds+=d*b._milliseconds;a._days+=d*b._days;a._months+=d*b._months;return a._bubble()}function Ub(a){return 0>a?Math.floor(a):Math.ceil(a)}function cb(a){return function(){return this.as(a)}}function gb(a){return function(){return this.isValid()?this._data[a]:NaN}}function lc(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function kb(a){return(0<a)-(0>a)||+a}function Ab(){if(!this.isValid())return this.localeData().invalidDate();
var a=Nb(this._milliseconds)/1E3,b=Nb(this._days),c=Nb(this._months),d,e;d=p(a/60);e=p(d/60);a%=60;d%=60;var f=p(c/12),c=c%12,a=a?a.toFixed(3).replace(/\.?0+$/,""):"",g=this.asSeconds();if(!g)return"P0D";var m=0>g?"-":"",k=kb(this._months)!==kb(g)?"-":"",l=kb(this._days)!==kb(g)?"-":"",g=kb(this._milliseconds)!==kb(g)?"-":"";return m+"P"+(f?k+f+"Y":"")+(c?k+c+"M":"")+(b?l+b+"D":"")+(e||d||a?"T":"")+(e?g+e+"H":"")+(d?g+d+"M":"")+(a?g+a+"S":"")}var Vb,Wb;Wb=Array.prototype.some?Array.prototype.some:
function(a){for(var b=Object(this),c=b.length>>>0,d=0;d<c;d++)if(d in b&&a.call(this,b[d],d,b))return!0;return!1};var Hb=a.momentProperties=[],Ib=!1,Xb={};a.suppressDeprecationWarnings=!1;a.deprecationHandler=null;var bc;bc=Object.keys?Object.keys:function(a){var b,d=[];for(b in a)c(a,b)&&d.push(b);return d};var ob={},Da={},Yb=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
xb=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Jb={},lb={},cc=/\d/,Pa=/\d\d/,dc=/\d{3}/,Ob=/\d{4}/,Bb=/[+-]?\d{6}/,sa=/\d\d?/,ec=/\d\d\d\d?/,fc=/\d\d\d\d\d\d?/,Cb=/\d{1,3}/,Pb=/\d{1,4}/,Db=/[+-]?\d{1,6}/,xc=/\d+/,Eb=/[+-]?\d+/,yc=/Z|[+-]\d\d:?\d\d/gi,Fb=/Z|[+-]\d\d(?::?\d\d)?/gi,rb=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Kb={},Lb={},Ta=0,$a=1,Wa=2,Ba=3,Ua=4,ab=5,ib=6,mc=7,nc=8;F("Y",0,0,function(){var a=this.year();return 9999>=
a?""+a:"+"+a});F(0,["YY",2],0,function(){return this.year()%100});F(0,["YYYY",4],0,"year");F(0,["YYYYY",5],0,"year");F(0,["YYYYYY",6,!0],0,"year");E("year","y");Da.year=1;M("Y",Eb);M("YY",sa,Pa);M("YYYY",Pb,Ob);M("YYYYY",Db,Bb);M("YYYYYY",Db,Bb);P(["YYYYY","YYYYYY"],Ta);P("YYYY",function(b,c){c[Ta]=2===b.length?a.parseTwoDigitYear(b):d(b)});P("YY",function(b,c){c[Ta]=a.parseTwoDigitYear(b)});P("Y",function(a,b){b[Ta]=parseInt(a,10)});a.parseTwoDigitYear=function(a){return d(a)+(68<d(a)?1900:2E3)};
var gc=T("FullYear",!0),ya;ya=Array.prototype.indexOf?Array.prototype.indexOf:function(a){var b;for(b=0;b<this.length;++b)if(this[b]===a)return b;return-1};F("M",["MM",2],"Mo",function(){return this.month()+1});F("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)});F("MMMM",0,0,function(a){return this.localeData().months(this,a)});E("month","M");Da.month=8;M("M",sa);M("MM",sa,Pa);M("MMM",function(a,b){return b.monthsShortRegex(a)});M("MMMM",function(a,b){return b.monthsRegex(a)});
P(["M","MM"],function(a,b){b[$a]=d(a)-1});P(["MMM","MMMM"],function(a,b,c,d){d=c._locale.monthsParse(a,d,c._strict);null!=d?b[$a]=d:r(c).invalidMonth=a});var hc=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,$b="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");F("w",["ww",2],"wo","week");F("W",["WW",2],"Wo","isoWeek");E("week","w");E("isoWeek","W");Da.week=5;Da.isoWeek=5;M("w",sa);M("ww",sa,Pa);M("W",sa);M("WW",sa,Pa);ga(["w","ww","W","WW"],function(a,b,c,e){b[e.substr(0,1)]=d(a)});F("d",0,"do","day");
F("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)});F("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)});F("dddd",0,0,function(a){return this.localeData().weekdays(this,a)});F("e",0,0,"weekday");F("E",0,0,"isoWeekday");E("day","d");E("weekday","e");E("isoWeekday","E");Da.day=11;Da.weekday=11;Da.isoWeekday=11;M("d",sa);M("e",sa);M("E",sa);M("dd",function(a,b){return b.weekdaysMinRegex(a)});M("ddd",function(a,b){return b.weekdaysShortRegex(a)});M("dddd",function(a,
b){return b.weekdaysRegex(a)});ga(["dd","ddd","dddd"],function(a,b,c,d){d=c._locale.weekdaysParse(a,d,c._strict);null!=d?b.d=d:r(c).invalidWeekday=a});ga(["d","e","E"],function(a,b,c,e){b[e]=d(a)});var ac="Sun Mon Tue Wed Thu Fri Sat".split(" ");F("H",["HH",2],0,"hour");F("h",["hh",2],0,za);F("k",["kk",2],0,function(){return this.hours()||24});F("hmm",0,0,function(){return""+za.apply(this)+ba(this.minutes(),2)});F("hmmss",0,0,function(){return""+za.apply(this)+ba(this.minutes(),2)+ba(this.seconds(),
2)});F("Hmm",0,0,function(){return""+this.hours()+ba(this.minutes(),2)});F("Hmmss",0,0,function(){return""+this.hours()+ba(this.minutes(),2)+ba(this.seconds(),2)});Ha("a",!0);Ha("A",!1);E("hour","h");Da.hour=13;M("a",hb);M("A",hb);M("H",sa);M("h",sa);M("k",sa);M("HH",sa,Pa);M("hh",sa,Pa);M("kk",sa,Pa);M("hmm",ec);M("hmmss",fc);M("Hmm",ec);M("Hmmss",fc);P(["H","HH"],Ba);P(["k","kk"],function(a,b,c){a=d(a);b[Ba]=24===a?0:a});P(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a);c._meridiem=a});P(["h",
"hh"],function(a,b,c){b[Ba]=d(a);r(c).bigHour=!0});P("hmm",function(a,b,c){var e=a.length-2;b[Ba]=d(a.substr(0,e));b[Ua]=d(a.substr(e));r(c).bigHour=!0});P("hmmss",function(a,b,c){var e=a.length-4,f=a.length-2;b[Ba]=d(a.substr(0,e));b[Ua]=d(a.substr(e,2));b[ab]=d(a.substr(f));r(c).bigHour=!0});P("Hmm",function(a,b,c){c=a.length-2;b[Ba]=d(a.substr(0,c));b[Ua]=d(a.substr(c))});P("Hmmss",function(a,b,c){c=a.length-4;var e=a.length-2;b[Ba]=d(a.substr(0,c));b[Ua]=d(a.substr(c,2));b[ab]=d(a.substr(e))});
var zc=T("Hours",!0),Zb={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",
hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:"January February March April May June July August September October November December".split(" "),monthsShort:$b,week:{dow:0,doy:6},weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),weekdaysMin:"Su Mo Tu We Th Fr Sa".split(" "),weekdaysShort:ac,meridiemParse:/[ap]\.?m?\.?/i},Aa={},pb={},yb,oc=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
pc=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,qc=/Z|[+-]\d\d(?::?\d\d)?/,zb=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Mb=
[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],tc=/^\/?Date\((\-?\d+)/i,rc=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,sc={UT:0,GMT:0,EDT:-240,
EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};a.createFromInputFallback=z("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))});a.ISO_8601=function(){};
a.RFC_2822=function(){};var Ac=z("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=H.apply(null,arguments);return this.isValid()&&a.isValid()?a<this?this:a:x()}),Bc=z("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var a=H.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:x()}),qb="year quarter month week day hour minute second millisecond".split(" ");
W("Z",":");W("ZZ","");M("Z",Fb);M("ZZ",Fb);P(["Z","ZZ"],function(a,b,c){c._useUTC=!0;c._tzm=aa(Fb,a)});var uc=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var vc=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,wc=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Oa.fn=ea.prototype;Oa.invalid=function(){return Oa(NaN)};var Cc=Sa(1,"add"),Dc=Sa(-1,"subtract");a.defaultFormat=
"YYYY-MM-DDTHH:mm:ssZ";a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ic=z("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});F(0,["gg",2],0,function(){return this.weekYear()%100});F(0,["GG",2],0,function(){return this.isoWeekYear()%100});jb("gggg","weekYear");jb("ggggg","weekYear");jb("GGGG","isoWeekYear");jb("GGGGG","isoWeekYear");E("weekYear",
"gg");E("isoWeekYear","GG");Da.weekYear=1;Da.isoWeekYear=1;M("G",Eb);M("g",Eb);M("GG",sa,Pa);M("gg",sa,Pa);M("GGGG",Pb,Ob);M("gggg",Pb,Ob);M("GGGGG",Db,Bb);M("ggggg",Db,Bb);ga(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,e){b[e.substr(0,2)]=d(a)});ga(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)});F("Q",0,"Qo","quarter");E("quarter","Q");Da.quarter=7;M("Q",cc);P("Q",function(a,b){b[$a]=3*(d(a)-1)});F("D",["DD",2],"Do","date");E("date","D");Da.date=9;M("D",sa);M("DD",sa,Pa);M("Do",function(a,
b){return a?b._dayOfMonthOrdinalParse||b._ordinalParse:b._dayOfMonthOrdinalParseLenient});P(["D","DD"],Wa);P("Do",function(a,b){b[Wa]=d(a.match(sa)[0],10)});var jc=T("Date",!0);F("DDD",["DDDD",3],"DDDo","dayOfYear");E("dayOfYear","DDD");Da.dayOfYear=4;M("DDD",Cb);M("DDDD",dc);P(["DDD","DDDD"],function(a,b,c){c._dayOfYear=d(a)});F("m",["mm",2],0,"minute");E("minute","m");Da.minute=14;M("m",sa);M("mm",sa,Pa);P(["m","mm"],Ua);var Ec=T("Minutes",!1);F("s",["ss",2],0,"second");E("second","s");Da.second=
15;M("s",sa);M("ss",sa,Pa);P(["s","ss"],ab);var Fc=T("Seconds",!1);F("S",0,0,function(){return~~(this.millisecond()/100)});F(0,["SS",2],0,function(){return~~(this.millisecond()/10)});F(0,["SSS",3],0,"millisecond");F(0,["SSSS",4],0,function(){return 10*this.millisecond()});F(0,["SSSSS",5],0,function(){return 100*this.millisecond()});F(0,["SSSSSS",6],0,function(){return 1E3*this.millisecond()});F(0,["SSSSSSS",7],0,function(){return 1E4*this.millisecond()});F(0,["SSSSSSSS",8],0,function(){return 1E5*
this.millisecond()});F(0,["SSSSSSSSS",9],0,function(){return 1E6*this.millisecond()});E("millisecond","ms");Da.millisecond=16;M("S",Cb,cc);M("SS",Cb,Pa);M("SSS",Cb,dc);var eb;for(eb="SSSS";9>=eb.length;eb+="S")M(eb,xc);for(eb="S";9>=eb.length;eb+="S")P(eb,kc);var Gc=T("Milliseconds",!1);F("z",0,0,"zoneAbbr");F("zz",0,0,"zoneName");var Q=t.prototype;Q.add=Cc;Q.calendar=function(b,c){b=b||H();var d=I(b,this).startOf("day"),d=a.calendarFormat(this,d)||"sameElse";c=c&&(C(c[d])?c[d].call(this,b):c[d]);
return this.format(c||this.localeData().calendar(d,this,H(b)))};Q.clone=function(){return new t(this)};Q.diff=function(a,b,c){var d;if(!this.isValid())return NaN;a=I(a,this);if(!a.isValid())return NaN;d=6E4*(a.utcOffset()-this.utcOffset());b=K(b);switch(b){case "year":b=sb(this,a)/12;break;case "month":b=sb(this,a);break;case "quarter":b=sb(this,a)/3;break;case "second":b=(this-a)/1E3;break;case "minute":b=(this-a)/6E4;break;case "hour":b=(this-a)/36E5;break;case "day":b=(this-a-d)/864E5;break;case "week":b=
(this-a-d)/6048E5;break;default:b=this-a}return c?b:p(b)};Q.endOf=function(a){a=K(a);if(void 0===a||"millisecond"===a)return this;"date"===a&&(a="day");return this.startOf(a).add(1,"isoWeek"===a?"week":a).subtract(1,"ms")};Q.format=function(b){b||(b=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);b=S(this,b);return this.localeData().postformat(b)};Q.from=function(a,b){return this.isValid()&&(u(a)&&a.isValid()||H(a).isValid())?Oa({to:this,from:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()};
Q.fromNow=function(a){return this.from(H(),a)};Q.to=function(a,b){return this.isValid()&&(u(a)&&a.isValid()||H(a).isValid())?Oa({from:this,to:a}).locale(this.locale()).humanize(!b):this.localeData().invalidDate()};Q.toNow=function(a){return this.to(H(),a)};Q.get=function(a){a=K(a);return C(this[a])?this[a]():this};Q.invalidAt=function(){return r(this).overflow};Q.isAfter=function(a,b){a=u(a)?a:H(a);if(!this.isValid()||!a.isValid())return!1;b=K(k(b)?"millisecond":b);return"millisecond"===b?this.valueOf()>
a.valueOf():a.valueOf()<this.clone().startOf(b).valueOf()};Q.isBefore=function(a,b){a=u(a)?a:H(a);if(!this.isValid()||!a.isValid())return!1;b=K(k(b)?"millisecond":b);return"millisecond"===b?this.valueOf()<a.valueOf():this.clone().endOf(b).valueOf()<a.valueOf()};Q.isBetween=function(a,b,c,d){d=d||"()";return("("===d[0]?this.isAfter(a,c):!this.isBefore(a,c))&&(")"===d[1]?this.isBefore(b,c):!this.isAfter(b,c))};Q.isSame=function(a,b){a=u(a)?a:H(a);if(!this.isValid()||!a.isValid())return!1;b=K(b||"millisecond");
if("millisecond"===b)return this.valueOf()===a.valueOf();a=a.valueOf();return this.clone().startOf(b).valueOf()<=a&&a<=this.clone().endOf(b).valueOf()};Q.isSameOrAfter=function(a,b){return this.isSame(a,b)||this.isAfter(a,b)};Q.isSameOrBefore=function(a,b){return this.isSame(a,b)||this.isBefore(a,b)};Q.isValid=function(){return v(this)};Q.lang=ic;Q.locale=tb;Q.localeData=mb;Q.max=Bc;Q.min=Ac;Q.parsingFlags=function(){return b({},r(this))};Q.set=function(a,b){if("object"===typeof a){a=R(a);b=Z(a);
for(var c=0;c<b.length;c++)this[b[c].unit](a[b[c].unit])}else if(a=K(a),C(this[a]))return this[a](b);return this};Q.startOf=function(a){a=K(a);switch(a){case "year":this.month(0);case "quarter":case "month":this.date(1);case "week":case "isoWeek":case "day":case "date":this.hours(0);case "hour":this.minutes(0);case "minute":this.seconds(0);case "second":this.milliseconds(0)}"week"===a&&this.weekday(0);"isoWeek"===a&&this.isoWeekday(1);"quarter"===a&&this.month(3*Math.floor(this.month()/3));return this};
Q.subtract=Dc;Q.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]};Q.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}};Q.toDate=function(){return new Date(this.valueOf())};Q.toISOString=function(){if(!this.isValid())return null;var a=this.clone().utc();return 0>a.year()||9999<a.year()?S(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):
C(Date.prototype.toISOString)?this.toDate().toISOString():S(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")};Q.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var a="moment",b="";this.isLocal()||(a=0===this.utcOffset()?"moment.utc":"moment.parseZone",b="Z");var a="["+a+'("]',c=0<=this.year()&&9999>=this.year()?"YYYY":"YYYYYY";return this.format(a+c+"-MM-DD[T]HH:mm:ss.SSS"+(b+'[")]'))};Q.toJSON=function(){return this.isValid()?this.toISOString():null};Q.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")};
Q.unix=function(){return Math.floor(this.valueOf()/1E3)};Q.valueOf=function(){return this._d.valueOf()-6E4*(this._offset||0)};Q.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}};Q.year=gc;Q.isLeapYear=function(){return X(this.year())};Q.weekYear=function(a){return Qb.call(this,a,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)};Q.isoWeekYear=function(a){return Qb.call(this,a,this.isoWeek(),this.isoWeekday(),
1,4)};Q.quarter=Q.quarters=function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)};Q.month=xa;Q.daysInMonth=function(){return ja(this.year(),this.month())};Q.week=Q.weeks=function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")};Q.isoWeek=Q.isoWeeks=function(a){var b=Ia(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")};Q.weeksInYear=function(){var a=this.localeData()._week;return ia(this.year(),a.dow,a.doy)};Q.isoWeeksInYear=function(){return ia(this.year(),
1,4)};Q.date=jc;Q.day=Q.days=function(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();if(null!=a){var c=this.localeData();"string"===typeof a&&(isNaN(a)?(a=c.weekdaysParse(a),a="number"===typeof a?a:null):a=parseInt(a,10));return this.add(a-b,"d")}return b};Q.weekday=function(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")};Q.isoWeekday=function(a){if(!this.isValid())return null!=
a?this:NaN;if(null!=a){var b=this.localeData();a="string"===typeof a?b.weekdaysParse(a)%7||7:isNaN(a)?null:a;return this.day(this.day()%7?a:a-7)}return this.day()||7};Q.dayOfYear=function(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864E5)+1;return null==a?b:this.add(a-b,"d")};Q.hour=Q.hours=zc;Q.minute=Q.minutes=Ec;Q.second=Q.seconds=Fc;Q.millisecond=Q.milliseconds=Gc;Q.utcOffset=function(b,c,d){var e=this._offset||0,f;if(!this.isValid())return null!=b?this:NaN;
if(null!=b){if("string"===typeof b){if(b=aa(Fb,b),null===b)return this}else 16>Math.abs(b)&&!d&&(b*=60);!this._isUTC&&c&&(f=15*-Math.round(this._d.getTimezoneOffset()/15));this._offset=b;this._isUTC=!0;null!=f&&this.add(f,"m");e!==b&&(!c||this._changeInProgress?wb(this,Oa(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null));return this}return this._isUTC?e:15*-Math.round(this._d.getTimezoneOffset()/15)};Q.utc=function(a){return this.utcOffset(0,
a)};Q.local=function(a){this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(15*-Math.round(this._d.getTimezoneOffset()/15),"m"));return this};Q.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var a=aa(yc,this._i);null!=a?this.utcOffset(a):this.utcOffset(0,!0)}return this};Q.hasAlignedHourOffset=function(a){if(!this.isValid())return!1;a=a?H(a).utcOffset():0;return 0===(this.utcOffset()-a)%60};Q.isDST=function(){return this.utcOffset()>
this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()};Q.isLocal=function(){return this.isValid()?!this._isUTC:!1};Q.isUtcOffset=function(){return this.isValid()?this._isUTC:!1};Q.isUtc=nb;Q.isUTC=nb;Q.zoneAbbr=function(){return this._isUTC?"UTC":""};Q.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""};Q.dates=z("dates accessor is deprecated. Use date instead.",jc);Q.months=z("months accessor is deprecated. Use month instead",xa);Q.years=z("years accessor is deprecated. Use year instead",
gc);Q.zone=z("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(a,b){return null!=a?("string"!==typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()});Q.isDSTShifted=z("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!k(this._isDSTShifted))return this._isDSTShifted;var a={};w(a,this);a=Na(a);if(a._a){var b=a._isUTC?f(a._a):H(a._a);this._isDSTShifted=this.isValid()&&
0<m(a._a,b.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var ra=J.prototype;ra.calendar=function(a,b,c){a=this._calendar[a]||this._calendar.sameElse;return C(a)?a.call(b,c):a};ra.longDateFormat=function(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];if(b||!c)return b;this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)});return this._longDateFormat[a]};ra.invalidDate=function(){return this._invalidDate};ra.ordinal=function(a){return this._ordinal.replace("%d",
a)};ra.preparse=Rb;ra.postformat=Rb;ra.relativeTime=function(a,b,c,d){var e=this._relativeTime[c];return C(e)?e(a,b,c,d):e.replace(/%d/i,a)};ra.pastFuture=function(a,b){a=this._relativeTime[0<a?"future":"past"];return C(a)?a(b):a.replace(/%s/i,b)};ra.set=function(a){var b,c;for(c in a)b=a[c],C(b)?this[c]=b:this["_"+c]=b;this._config=a;this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)};ra.months=function(a,b){return a?
h(this._months)?this._months[a.month()]:this._months[(this._months.isFormat||hc).test(b)?"format":"standalone"][a.month()]:h(this._months)?this._months:this._months.standalone};ra.monthsShort=function(a,b){return a?h(this._monthsShort)?this._monthsShort[a.month()]:this._monthsShort[hc.test(b)?"format":"standalone"][a.month()]:h(this._monthsShort)?this._monthsShort:this._monthsShort.standalone};ra.monthsParse=function(a,b,c){var d,e;if(this._monthsParseExact){a:{a=a.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=
[],this._longMonthsParse=[],this._shortMonthsParse=[],d=0;12>d;++d)e=f([2E3,d]),this._shortMonthsParse[d]=this.monthsShort(e,"").toLocaleLowerCase(),this._longMonthsParse[d]=this.months(e,"").toLocaleLowerCase();if(c)b="MMM"===b?ya.call(this._shortMonthsParse,a):ya.call(this._longMonthsParse,a);else if("MMM"===b){b=ya.call(this._shortMonthsParse,a);if(-1!==b)break a;b=ya.call(this._longMonthsParse,a)}else{b=ya.call(this._longMonthsParse,a);if(-1!==b)break a;b=ya.call(this._shortMonthsParse,a)}b=-1!==
b?b:null}return b}this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]);for(d=0;12>d;d++)if(e=f([2E3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(e="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(e.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a)||
c&&"MMM"===b&&this._shortMonthsParse[d].test(a)||!c&&this._monthsParse[d].test(a))return d};ra.monthsRegex=function(a){if(this._monthsParseExact)return c(this,"_monthsRegex")||qa.call(this),a?this._monthsStrictRegex:this._monthsRegex;c(this,"_monthsRegex")||(this._monthsRegex=rb);return this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex};ra.monthsShortRegex=function(a){if(this._monthsParseExact)return c(this,"_monthsRegex")||qa.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex;
c(this,"_monthsShortRegex")||(this._monthsShortRegex=rb);return this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex};ra.week=function(a){return Ia(a,this._week.dow,this._week.doy).week};ra.firstDayOfYear=function(){return this._week.doy};ra.firstDayOfWeek=function(){return this._week.dow};ra.weekdays=function(a,b){return a?h(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]:h(this._weekdays)?this._weekdays:
this._weekdays.standalone};ra.weekdaysMin=function(a){return a?this._weekdaysMin[a.day()]:this._weekdaysMin};ra.weekdaysShort=function(a){return a?this._weekdaysShort[a.day()]:this._weekdaysShort};ra.weekdaysParse=function(a,b,c){var d,e;if(this._weekdaysParseExact)return La.call(this,a,b,c);this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]);for(d=0;7>d;d++)if(e=f([2E3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=
new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(e="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(e.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a)||c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a)||
c&&"dd"===b&&this._minWeekdaysParse[d].test(a)||!c&&this._weekdaysParse[d].test(a))return d};ra.weekdaysRegex=function(a){if(this._weekdaysParseExact)return c(this,"_weekdaysRegex")||ua.call(this),a?this._weekdaysStrictRegex:this._weekdaysRegex;c(this,"_weekdaysRegex")||(this._weekdaysRegex=rb);return this._weekdaysStrictRegex&&a?this._weekdaysStrictRegex:this._weekdaysRegex};ra.weekdaysShortRegex=function(a){if(this._weekdaysParseExact)return c(this,"_weekdaysRegex")||ua.call(this),a?this._weekdaysShortStrictRegex:
this._weekdaysShortRegex;c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=rb);return this._weekdaysShortStrictRegex&&a?this._weekdaysShortStrictRegex:this._weekdaysShortRegex};ra.weekdaysMinRegex=function(a){if(this._weekdaysParseExact)return c(this,"_weekdaysRegex")||ua.call(this),a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex;c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=rb);return this._weekdaysMinStrictRegex&&a?this._weekdaysMinStrictRegex:this._weekdaysMinRegex};ra.isPM=
function(a){return"p"===(a+"").toLowerCase().charAt(0)};ra.meridiem=function(a,b,c){return 11<a?c?"pm":"PM":c?"am":"AM"};Ka("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,b=1===d(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+b}});a.lang=z("moment.lang is deprecated. Use moment.locale instead.",Ka);a.langData=z("moment.langData is deprecated. Use moment.localeData instead.",Ea);var bb=Math.abs,Hc=cb("ms"),Ic=cb("s"),Jc=cb("m"),Kc=cb("h"),Lc=cb("d"),
Mc=cb("w"),Nc=cb("M"),Oc=cb("y"),Pc=gb("milliseconds"),Qc=gb("seconds"),Rc=gb("minutes"),Sc=gb("hours"),Tc=gb("days"),Uc=gb("months"),Vc=gb("years"),fb=Math.round,Xa={ss:44,s:45,m:45,h:22,d:26,M:11},Nb=Math.abs,oa=ea.prototype;oa.isValid=function(){return this._isValid};oa.abs=function(){var a=this._data;this._milliseconds=bb(this._milliseconds);this._days=bb(this._days);this._months=bb(this._months);a.milliseconds=bb(a.milliseconds);a.seconds=bb(a.seconds);a.minutes=bb(a.minutes);a.hours=bb(a.hours);
a.months=bb(a.months);a.years=bb(a.years);return this};oa.add=function(a,b){return Tb(this,a,b,1)};oa.subtract=function(a,b){return Tb(this,a,b,-1)};oa.as=function(a){if(!this.isValid())return NaN;var b,c=this._milliseconds;a=K(a);if("month"===a||"year"===a)return b=this._days+c/864E5,b=this._months+4800*b/146097,"month"===a?b:b/12;b=this._days+Math.round(146097*this._months/4800);switch(a){case "week":return b/7+c/6048E5;case "day":return b+c/864E5;case "hour":return 24*b+c/36E5;case "minute":return 1440*
b+c/6E4;case "second":return 86400*b+c/1E3;case "millisecond":return Math.floor(864E5*b)+c;default:throw Error("Unknown unit "+a);}};oa.asMilliseconds=Hc;oa.asSeconds=Ic;oa.asMinutes=Jc;oa.asHours=Kc;oa.asDays=Lc;oa.asWeeks=Mc;oa.asMonths=Nc;oa.asYears=Oc;oa.valueOf=function(){return this.isValid()?this._milliseconds+864E5*this._days+this._months%12*2592E6+31536E6*d(this._months/12):NaN};oa._bubble=function(){var a=this._milliseconds,b=this._days,c=this._months,d=this._data;0<=a&&0<=b&&0<=c||0>=a&&
0>=b&&0>=c||(a+=864E5*Ub(146097*c/4800+b),c=b=0);d.milliseconds=a%1E3;a=p(a/1E3);d.seconds=a%60;a=p(a/60);d.minutes=a%60;a=p(a/60);d.hours=a%24;b+=p(a/24);a=p(4800*b/146097);c+=a;b-=Ub(146097*a/4800);a=p(c/12);d.days=b;d.months=c%12;d.years=a;return this};oa.clone=function(){return Oa(this)};oa.get=function(a){a=K(a);return this.isValid()?this[a+"s"]():NaN};oa.milliseconds=Pc;oa.seconds=Qc;oa.minutes=Rc;oa.hours=Sc;oa.days=Tc;oa.weeks=function(){return p(this.days()/7)};oa.months=Uc;oa.years=Vc;oa.humanize=
function(a){if(!this.isValid())return this.localeData().invalidDate();var b=this.localeData(),c;c=!a;var d=Oa(this).abs(),e=fb(d.as("s")),f=fb(d.as("m")),g=fb(d.as("h")),m=fb(d.as("d")),p=fb(d.as("M")),d=fb(d.as("y")),e=e<=Xa.ss&&["s",e]||e<Xa.s&&["ss",e]||1>=f&&["m"]||f<Xa.m&&["mm",f]||1>=g&&["h"]||g<Xa.h&&["hh",g]||1>=m&&["d"]||m<Xa.d&&["dd",m]||1>=p&&["M"]||p<Xa.M&&["MM",p]||1>=d&&["y"]||["yy",d];e[2]=c;e[3]=0<+this;e[4]=b;c=lc.apply(null,e);a&&(c=b.pastFuture(+this,c));return b.postformat(c)};
oa.toISOString=Ab;oa.toString=Ab;oa.toJSON=Ab;oa.locale=tb;oa.localeData=mb;oa.toIsoString=z("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ab);oa.lang=ic;F("X",0,0,"unix");F("x",0,0,"valueOf");M("x",Eb);M("X",/[+-]?\d+(\.\d{1,3})?/);P("X",function(a,b,c){c._d=new Date(1E3*parseFloat(a,10))});P("x",function(a,b,c){c._d=new Date(d(a))});a.version="2.19.2";Vb=H;a.fn=Q;a.min=function(){var a=[].slice.call(arguments,0);return ma("isBefore",a)};a.max=function(){var a=
[].slice.call(arguments,0);return ma("isAfter",a)};a.now=function(){return Date.now?Date.now():+new Date};a.utc=f;a.unix=function(a){return H(1E3*a)};a.months=function(a,b){return Sb(a,b,"months")};a.isDate=q;a.locale=Ka;a.invalid=x;a.duration=Oa;a.isMoment=u;a.weekdays=function(a,b,c){return Gb(a,b,c,"weekdays")};a.parseZone=function(){return H.apply(null,arguments).parseZone()};a.localeData=Ea;a.isDuration=ha;a.monthsShort=function(a,b){return Sb(a,b,"monthsShort")};a.weekdaysMin=function(a,b,c){return Gb(a,
b,c,"weekdaysMin")};a.defineLocale=Ga;a.updateLocale=function(a,b){if(null!=b){var c,d=Zb;c=Ma(a);null!=c&&(d=c._config);b=G(d,b);b=new J(b);b.parentLocale=Aa[a];Aa[a]=b;Ka(a)}else null!=Aa[a]&&(null!=Aa[a].parentLocale?Aa[a]=Aa[a].parentLocale:null!=Aa[a]&&delete Aa[a]);return Aa[a]};a.locales=function(){return bc(Aa)};a.weekdaysShort=function(a,b,c){return Gb(a,b,c,"weekdaysShort")};a.normalizeUnits=K;a.relativeTimeRounding=function(a){return void 0===a?fb:"function"===typeof a?(fb=a,!0):!1};a.relativeTimeThreshold=
function(a,b){if(void 0===Xa[a])return!1;if(void 0===b)return Xa[a];Xa[a]=b;"s"===a&&(Xa.ss=b-1);return!0};a.calendarFormat=function(a,b){a=a.diff(b,"days",!0);return-6>a?"sameElse":-1>a?"lastWeek":0>a?"lastDay":1>a?"sameDay":2>a?"nextDay":7>a?"nextWeek":"sameElse"};a.prototype=Q;return a})},"esri/arcade/ImmutableArray":function(){define(["require","exports"],function(a,h){return function(){function a(a){void 0===a&&(a=[]);this._elements=a}a.prototype.length=function(){return this._elements.length};
a.prototype.get=function(a){return this._elements[a]};a.prototype.toArray=function(){for(var a=[],k=0;k<this.length();k++)a.push(this.get(k));return a};return a}()})},"esri/arcade/ImmutablePointArray":function(){define("require exports ../core/tsSupport/extendsHelper ./ImmutableArray ../geometry/Point ../kernel".split(" "),function(a,h,n,e,k,l){var q=0===l.version.indexOf("4.");return function(a){function c(b,c,e,g,k,l){b=a.call(this,b)||this;b._lazyPt=[];b._hasZ=!1;b._hasM=!1;b._spRef=c;b._hasZ=
e;b._hasM=g;b._cacheId=k;b._partId=l;return b}n(c,a);c.prototype.get=function(a){if(void 0===this._lazyPt[a]){var b=this._elements[a];if(void 0===b)return;var c=this._hasZ,e=this._hasM,g=null,g=c&&!e?new k(b[0],b[1],b[2],void 0,this._spRef):e&&c?new k(b[0],b[1],void 0,b[2],this._spRef):c&&e?new k(b[0],b[1],b[2],b[3],this._spRef):new k(b[0],b[1],this._spRef);q?g.cache._arcadeCacheId=this._cacheId.toString()+"-"+this._partId.toString()+"-"+a.toString():g.setCacheValue("_arcadeCacheId",this._cacheId.toString()+
"-"+this._partId.toString()+"-"+a.toString());this._lazyPt[a]=g}return this._lazyPt[a]};c.prototype.equalityTest=function(a){return a===this?!0:null===a||!1===a instanceof c?!1:a.getUniqueHash()===this.getUniqueHash()};c.prototype.getUniqueHash=function(){return this._cacheId.toString()+"-"+this._partId.toString()};return c}(e)})},"esri/arcade/ImmutablePathArray":function(){define(["require","exports","../core/tsSupport/extendsHelper","./ImmutableArray","./ImmutablePointArray"],function(a,h,n,e,k){return function(a){function e(e,
c,b,f,k){e=a.call(this,e)||this;e._lazyPath=[];e._hasZ=!1;e._hasM=!1;e._hasZ=b;e._hasM=f;e._spRef=c;e._cacheId=k;return e}n(e,a);e.prototype.get=function(a){if(void 0===this._lazyPath[a]){var c=this._elements[a];if(void 0===c)return;this._lazyPath[a]=new k(c,this._spRef,this._hasZ,this._hasM,this._cacheId,a)}return this._lazyPath[a]};e.prototype.equalityTest=function(a){return a===this?!0:null===a||!1===a instanceof e?!1:a.getUniqueHash()===this.getUniqueHash()};e.prototype.getUniqueHash=function(){return this._cacheId.toString()};
return e}(e)})},"esri/arcade/FunctionWrapper":function(){define(["require","exports"],function(a,h){return function(){return function(a,e){this.context=this.definition=null;this.definition=a;this.context=e}}()})},"esri/arcade/treeAnalysis":function(){define(["require","exports"],function(a,h){function n(a,b,c,e){return"0"!==a.min&&c.length<Number(a.min)||"*"!==a.max&&c.length>Number(a.max)?-2:1}function e(a,b,c){if(null!==c.localScope&&void 0!==c.localScope[a.toLowerCase()]){var d=c.localScope[a.toLowerCase()];
if("FormulaFunction"===d.type||"any"===d.type)return void 0===d.signature&&(d.signature={min:"0",max:"*"}),n(d.signature,a,b,c)}return void 0!==c.globalScope[a.toLowerCase()]&&(d=c.globalScope[a.toLowerCase()],"FormulaFunction"===d.type||"any"===d.type)?(void 0===d.signature&&(d.signature={min:"0",max:"*"}),n(d.signature,a,b,c)):-1}function k(a,b){void 0===b&&(b=!0);var c=v(a,"SYNTAX","UNREOGNISED");try{switch(a.type){case "VariableDeclarator":return null!==a.init&&"FunctionExpression"===a.init.type?
v(a,"SYNTAX","FUNCTIONVARIABLEDECLARATOR"):"Identifier"!==a.id.type?v(a,"SYNTAX","VARIABLEMUSTHAVEIDENTIFIER"):null!==a.init?k(a.init,!1):"";case "VariableDeclaration":for(var d=0;d<a.declarations.length;d++)if(c=k(a.declarations[d],b),""!==c)return c;return"";case "ForInStatement":c=k(a.left,b);if(""!==c)break;if("VariableDeclaration"===a.left.type){if(1<a.left.declarations.length)return v(a,"SYNTAX","ONLY1VAR");if(null!==a.left.declarations[0].init)return v(a,"SYNTAX","CANNOTDECLAREVAL")}else if("Identifier"!==
a.left.type)return v(a,"SYNTAX","LEFTNOTVAR");c=k(a.right,b);if(""!==c)break;c=k(a.body,b);if(""!==c)break;return"";case "ForStatement":if(null!==a.test&&(c=k(a.test,b),""!==c))break;if(null!==a.init&&(c=k(a.init,b),""!==c))break;if(null!==a.update&&(c=k(a.update,b),""!==c))break;if(null!==a.body&&(c=k(a.body,b),""!==c))break;return"";case "ContinueStatement":return"";case "EmptyStatement":return"";case "BreakStatement":return"";case "IfStatement":c=k(a.test,b);if(""!==c)break;if(null!==a.consequent&&
(c=k(a.consequent,!1),""!==c))break;if(null!==a.alternate&&(c=k(a.alternate,!1),""!==c))break;return"";case "BlockStatement":for(var e=[],d=0;d<a.body.length;d++)"EmptyStatement"!==a.body[d].type&&e.push(a.body[d]);a.body=e;for(d=0;d<a.body.length;d++)if(c=k(a.body[d],b),""!==c)return c;return"";case "FunctionDeclaration":return!1===b?v(a,"SYNTAX","GLOBALFUNCTIONSONLY"):"Identifier"!==a.id.type?v(a,"SYNTAX","FUNCTIONMUSTHAVEIDENTIFIER"):k(a.body,!1);case "ReturnStatement":return null!==a.argument?
k(a.argument,b):"";case "UpdateExpression":return"Identifier"!==a.argument.type&&"MemberExpression"!==a.argument.type?v(a,"SYNTAX","ASSIGNMENTTOVARSONLY"):k(a.argument,b);case "AssignmentExpression":if("Identifier"!==a.left.type&&"MemberExpression"!==a.left.type)return v(a,"SYNTAX","ASSIGNMENTTOVARSONLY");c=k(a.left,b);if(""!==c)break;switch(a.operator){case "\x3d":case "/\x3d":case "*\x3d":case "%\x3d":case "+\x3d":case "-\x3d":break;default:return v(a,"SYNTAX","OPERATORNOTRECOGNISED")}return k(a.right,
!1);case "ExpressionStatement":return k(a.expression,!1);case "Identifier":c="";break;case "MemberExpression":c=k(a.object,b);if(""!==c)break;return!0===a.computed?k(a.property,b):"";case "Literal":return"";case "ThisExpression":return v(a,"SYNTAX","NOTSUPPORTED");case "CallExpression":if("Identifier"!==a.callee.type)return v(a,"SYNTAX","ONLYNODESSUPPORTED");c="";for(d=0;d<a.arguments.length;d++)if(c=k(a.arguments[d],b),""!==c)return c;return"";case "UnaryExpression":c=k(a.argument,b);break;case "BinaryExpression":c=
k(a.left,b);if(""!==c)break;c=k(a.right,b);if(""!==c)break;switch(a.operator){case "\x3d\x3d":case "!\x3d":case "\x3c":case "\x3c\x3d":case "\x3e":case "\x3e\x3d":case "+":case "-":case "*":case "/":case "%":break;default:return v(a,"SYNTAX","OPERATORNOTRECOGNISED")}return"";case "LogicalExpression":c=k(a.left,b);if(""!==c)break;c=k(a.right);if(""!==c)break;switch(a.operator){case "\x26\x26":case "||":break;default:return v(a,"SYNTAX","OPERATORNOTRECOGNISED")}return"";case "ConditionalExpression":return v(a,
"SYNTAX","NOTSUPPORTED");case "ArrayExpression":c="";for(d=0;d<a.elements.length&&(c=k(a.elements[d],b),""===c);d++);break;case "Array":return v(a,"SYNTAX","NOTSUPPORTED");case "ObjectExpression":c="";for(d=0;d<a.properties.length&&(c="",null!==a.properties[d].key&&("Literal"!==a.properties[d].key.type&&"Identifier"!==a.properties[d].key.type&&(c=v(a,"SYNTAX","OBJECTPROPERTYMUSTBESTRING")),"Literal"===a.properties[d].key.type&&(e=a.properties[d].key.value,"string"===typeof e||e instanceof String||
(c=v(a,"SYNTAX","OBJECTPROPERTYMUSTBESTRING")))),""===c&&(c=k(a.properties[d],b)),""===c);d++);break;case "Property":if("Literal"!==a.key.type&&"Identifier"!==a.key.type)return v(a,"SYNTAX","ONLYLITERAL");if("Identifier"!==a.key.type&&(c=k(a.key,b),""!==c))break;c=k(a.value,b)}return c}catch(A){throw A;}}function l(a,c){var d=v(a,"SYNTAX","UNREOGNISED"),g=null,k="";try{switch(a.type){case "VariableDeclarator":if(null!==a.init&&"FunctionExpression"===a.init.type)return v(a,"SYNTAX","FUNCTIONVARIABLEDECLARATOR");
a.id.name.toLowerCase();var p=null===a.init?"":l(a.init,c);if(""!==p)return p;null===c.localScope?c.globalScope[a.id.name.toLowerCase()]={type:"any"}:c.localScope[a.id.name.toLowerCase()]={type:"any"};return"";case "FunctionDeclaration":g=b(a.id.name.toLowerCase(),a,c);k=f(a,c);if(""!==k)return k;if(null!==c.localScope)return v(a,"SYNTAX","GLOBALFUNCTIONSONLY");g.isnative=!1;c.globalScope[a.id.name.toLowerCase()]={type:"FormulaFunction",signature:[g]};return"";case "VariableDeclaration":for(var d=
"",h=0;h<a.declarations.length&&(d=l(a.declarations[h],c),""===d);h++);break;case "IfStatement":d=l(a.test,c);if(""!==d)break;if("AssignmentExpression"===a.test.type||"UpdateExpression"===a.test.type)return v(a.test,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION");if(null!==a.consequent&&(d=l(a.consequent,c),""!==d))break;if(null!==a.alternate&&(d=l(a.alternate,c),""!==d))break;return"";case "EmptyStatement":return"";case "BlockStatement":for(h=0;h<a.body.length;h++)if(d=l(a.body[h],c),""!==d)return d;
return"";case "ReturnStatement":return null!==a.argument?l(a.argument,c):"";case "ForInStatement":if("VariableDeclaration"===a.left.type){if(1<a.left.declarations.length)return v(a,"SYNTAX","ONLY1VAR");if(null!==a.left.declarations[0].init)return v(a,"SYNTAX","CANNOTDECLAREVAL")}else if("Identifier"!==a.left.type)return v(a,"SYNTAX","LEFTNOTVAR");d=l(a.left,c);if(""!==d)break;d=l(a.right,c);if(""!==d)break;d=l(a.body,c);if(""!==d)break;return"";case "ForStatement":if(null!==a.init&&(d=l(a.init,c),
""!==d))break;if(null!==a.test&&(d=l(a.test,c),""!==d))break;if(null!==a.body&&(d=l(a.body,c),""!==d))break;if(null!==a.update&&(d=l(a.update,c),""!==d))break;return"";case "BreakStatement":return"";case "ContinueStatement":return"";case "UpdateExpression":if("Identifier"!==a.argument.type&&"MemberExpression"!==a.argument.type)return v(a,"SYNTAX","ASSIGNMENTTOVARSONLY");var q=!1;if("MemberExpression"===a.argument.type)return l(a.argument,c);null!==c.localScope&&void 0!==c.localScope[a.argument.name.toLowerCase()]&&
(q=!0);void 0!==c.globalScope[a.argument.name.toLowerCase()]&&(q=!0);return!1===q?"Identifier "+a.argument.name+" has not been declared.":"";case "AssignmentExpression":if("Identifier"!==a.left.type&&"MemberExpression"!==a.left.type)return v(a,"SYNTAX","ASSIGNMENTTOVARSONLY");var n=l(a.right,c);if(""!==n)return n;q=!1;if("MemberExpression"===a.left.type)return n=l(a.left,c),""!==n?n:"";null!==c.localScope&&void 0!==c.localScope[a.left.name.toLowerCase()]&&(q=!0);void 0!==c.globalScope[a.left.name.toLowerCase()]&&
(q=!0);return!1===q?"Identifier "+a.left.name+" has not been declared.":"";case "ExpressionStatement":return l(a.expression,c);case "Identifier":var r=a.name.toLowerCase();if(null!==c.localScope&&void 0!==c.localScope[r])return"";d=void 0!==c.globalScope[r]?"":v(a,"SYNTAX","VARIABLENOTFOUND");break;case "MemberExpression":d=l(a.object,c);if(""!==d)break;return!0===a.computed?l(a.property,c):"";case "Literal":return"";case "ThisExpression":d=v(a,"SYNTAX","NOTSUPPORTED");break;case "CallExpression":if("Identifier"!==
a.callee.type)return v(a,"SYNTAX","ONLYNODESSUPPORTED");d="";for(h=0;h<a.arguments.length;h++)if(d=l(a.arguments[h],c),""!==d)return d;var x=e(a.callee.name,a.arguments,c);-1===x&&(d=v(a,"SYNTAX","NOTFOUND"));-2===x&&(d=v(a,"SYNTAX","WRONGSIGNATURE"));break;case "UnaryExpression":d=l(a.argument,c);break;case "BinaryExpression":d=l(a.left,c);if(""!==d)break;d=l(a.right,c);if(""!==d)break;return"";case "LogicalExpression":d=l(a.left,c);if(""!==d)break;if("AssignmentExpression"===a.left.type||"UpdateExpression"===
a.left.type)return v(a.left,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION");d=l(a.right,c);if(""!==d)break;return"AssignmentExpression"===a.right.type||"UpdateExpression"===a.right.type?v(a.right,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION"):"";case "ConditionalExpression":return v(a,"SYNTAX","NOTSUPPORTED");case "ArrayExpression":d="";for(h=0;h<a.elements.length&&(d=l(a.elements[h],c),""===d);h++);break;case "ObjectExpression":d="";for(h=0;h<a.properties.length;h++){d="";if(null!==a.properties[h].key&&
("Literal"!==a.properties[h].key.type&&"Identifier"!==a.properties[h].key.type&&(d=v(a,"SYNTAX","OBJECTPROPERTYMUSTBESTRING")),"Literal"===a.properties[h].key.type)){var u=a.properties[h].key.value;"string"===typeof u||u instanceof String||(d=v(a,"SYNTAX","OBJECTPROPERTYMUSTBESTRING"))}""===d&&(d=l(a.properties[h],c));if(""!==d)break}break;case "Property":if("Literal"!==a.key.type&&"Identifier"!==a.key.type)return v(a,"SYNTAX","ONLYLITERAL");if("Identifier"!==a.key.type&&(d=l(a.key,c),""!==d))break;
d=l(a.value,c);break;case "Array":return v(a,"SYNTAX","NOTSUPPORTED")}return d}catch(Z){throw Z;}}function q(a,b){var c=!1;try{switch(a.type){case "VariableDeclarator":return null!==a.init?q(a.init,b):c;case "FunctionDeclaration":return q(a.body,b);case "VariableDeclaration":for(var d=0;d<a.declarations.length;d++)if(q(a.declarations[d],b))return!0;return c;case "IfStatement":return q(a.test,b)||null!==a.consequent&&q(a.consequent,b)||null!==a.alternate&&q(a.alternate,b)?!0:c;case "EmptyStatement":return c;
case "BlockStatement":for(d=0;d<a.body.length;d++)if(q(a.body[d],b))return!0;return c;case "ReturnStatement":return null!==a.argument?q(a.argument,b):c;case "UpdateExpression":return q(a.argument,b);case "AssignmentExpression":return(c=q(a.right,b))?c:q(a.left,b);case "ExpressionStatement":return q(a.expression,b);case "ForInStatement":return(c=q(a.left,b))||(c=q(a.right,b))?c:c=q(a.body,b);case "ForStatement":if(null!==a.init&&(c=q(a.init,b))||null!==a.test&&(c=q(a.test,b))||null!==a.body&&(c=q(a.body,
b)))return c;null!==a.update&&(c=q(a.update,b));return c;case "BreakStatement":return c;case "ContinueStatement":return c;case "Compound":return c;case "Identifier":return b.toLowerCase()===a.name.toLowerCase();case "MemberExpression":if(c=q(a.object,b))return c;!0===a.computed&&(c=q(a.property,b));return c;case "Literal":return c;case "ThisExpression":return c;case "CallExpression":for(d=0;d<a.arguments.length;d++)q(a.arguments[d],b)&&(c=!0);return c;case "ArrayExpression":for(d=0;d<a.elements.length;d++)q(a.elements[d],
b)&&(c=!0);return c;case "UnaryExpression":return q(a.argument,b);case "BinaryExpression":return(c=q(a.left,b))?c:c=q(a.right,b);case "LogicalExpression":return(c=q(a.left,b))?c:c=q(a.right,b);case "ObjectExpression":for(d=0;d<a.properties.length;d++)q(a.properties[d],b)&&(c=!0);return c;case "Property":return c=q(a.value,b);case "ConditionalExpression":return c;case "Array":return c;default:return c}}catch(z){throw z;}}function g(a,b){var c=!1;try{switch(a.type){case "VariableDeclarator":return null!==
a.init?g(a.init,b):c;case "FunctionDeclaration":return g(a.body,b);case "VariableDeclaration":for(var d=0;d<a.declarations.length;d++)if(g(a.declarations[d],b))return!0;return c;case "IfStatement":return g(a.test,b)||null!==a.consequent&&g(a.consequent,b)||null!==a.alternate&&g(a.alternate,b)?!0:c;case "EmptyStatement":return c;case "BlockStatement":for(d=0;d<a.body.length;d++)if(g(a.body[d],b))return!0;return c;case "ReturnStatement":return null!==a.argument?g(a.argument,b):c;case "UpdateExpression":return g(a.argument,
b);case "AssignmentExpression":return g(a.left,b)?!0:g(a.right,b);case "ExpressionStatement":return g(a.expression,b);case "ForInStatement":return(c=g(a.left,b))||(c=g(a.right,b))?c:c=g(a.body,b);case "ForStatement":if(null!==a.init&&(c=g(a.init,b))||null!==a.test&&(c=g(a.test,b))||null!==a.body&&(c=g(a.body,b)))return c;null!==a.update&&(c=g(a.update,b));return c;case "BreakStatement":return c;case "ContinueStatement":return c;case "Compound":return c;case "Identifier":return c;case "MemberExpression":if(c=
g(a.object,b))return c;!0===a.computed&&(c=g(a.property,b));return c;case "Literal":return c;case "ThisExpression":return c;case "CallExpression":if(a.callee.name.toLowerCase()===b.toLowerCase())return!0;for(d=0;d<a.arguments.length;d++)g(a.arguments[d],b)&&(c=!0);return c;case "ArrayExpression":for(d=0;d<a.elements.length;d++)g(a.elements[d],b)&&(c=!0);return c;case "UnaryExpression":return g(a.argument,b);case "BinaryExpression":return(c=g(a.left,b))?c:c=g(a.right,b);case "LogicalExpression":return(c=
g(a.left,b))?c:c=g(a.right,b);case "ConditionalExpression":return c;case "ObjectExpression":for(d=0;d<a.properties.length;d++)g(a.properties[d],b)&&(c=!0);return c;case "Property":return c=g(a.value,b);case "Array":return c;default:return c}}catch(z){throw z;}}function c(a,b){var d=[],e;try{switch(a.type){case "VariableDeclarator":return null!==a.init?c(a.init,b):d;case "FunctionDeclaration":return c(a.body,b);case "VariableDeclaration":for(var f=0;f<a.declarations.length;f++)e=c(a.declarations[f],
b),d=d.concat(e);return d;case "ForInStatement":return e=c(a.left,b),d=d.concat(e),e=c(a.right,b),d=d.concat(e),e=c(a.body,b),d=d.concat(e);case "ForStatement":return null!==a.init&&(e=c(a.init,b),d=d.concat(e)),null!==a.test&&(e=c(a.test,b),d=d.concat(e)),null!==a.body&&(e=c(a.body,b),d=d.concat(e)),null!==a.update&&(e=c(a.update,b),d=d.concat(e)),d;case "IfStatement":return e=c(a.test,b),d=d.concat(e),null!==a.consequent&&(e=c(a.consequent,b),d=d.concat(e)),null!==a.alternate&&(e=c(a.alternate,
b),d=d.concat(e)),d;case "EmptyStatement":return d;case "BlockStatement":for(f=0;f<a.body.length;f++)e=c(a.body[f],b),d=d.concat(e);return d;case "ReturnStatement":return null!==a.argument?c(a.argument,b):d;case "UpdateExpression":return c(a.argument,b);case "AssignmentExpression":return d=c(a.left,b),d=d.concat(c(a.right,b));case "ExpressionStatement":return c(a.expression,b);case "BreakStatement":return d;case "ContinueStatement":return d;case "Compound":return d;case "Identifier":return d;case "MemberExpression":if("Identifier"!==
a.object.type)return d;if(!1===a.computed)d.push(a.object.name.toLowerCase()+"."+a.property.name.toLowerCase());else try{"Literal"===a.property.type&&"string"===typeof a.property.value&&d.push(a.object.name.toLowerCase()+"."+a.property.value.toString().toLowerCase())}catch(A){}return d;case "Literal":return d;case "ThisExpression":return d;case "CallExpression":for(f=0;f<a.arguments.length;f++)e=c(a.arguments[f],b),d=d.concat(e);return d;case "ArrayExpression":for(f=0;f<a.elements.length;f++)e=c(a.elements[f],
b),d=d.concat(e);return d;case "UnaryExpression":return c(a.argument,b);case "ObjectExpression":for(f=0;f<a.properties.length;f++)e=c(a.properties[f],b),d=d.concat(e);return d;case "Property":return c(a.value,b);case "BinaryExpression":return e=c(a.left,b),d=d.concat(e),e=c(a.right,b),d=d.concat(e);case "LogicalExpression":return e=c(a.left,b),d=d.concat(e),e=c(a.right,b),d=d.concat(e);case "ConditionalExpression":return d;case "Array":return d;default:return d}}catch(A){throw A;}}function b(a,b,
c){c=[];if(void 0!==b.params&&null!==b.params)for(var d=0;d<b.params.length;d++)c.push("any");return{name:a,"return":"any",params:c}}function f(a,b){b={globalScope:b.globalScope,localScope:{}};for(var c=0;c<a.params.length;c++)b.localScope[a.params[c].name.toLowerCase()]={type:"any"};return l(a.body,b)}function r(a,b,c,e){var d={};if(void 0===a||null===a)a={};if(void 0===c||null===c)c={};d.infinity={type:"any"};d.textformatting={type:"any"};d.pi={type:"any"};for(var f in b)if("simple"!==e||"simple"===
e&&"a"===b[f].av)d[f]={type:"FormulaFunction",signature:{min:b[f].min,max:b[f].max}},"simple"!==e&&(void 0!==b[f].fmin&&(d[f].signature.min=b[f].fmin),void 0!==b[f].fmax&&(d[f].signature.max=b[f].fmax));for(b=0;b<c.length;b++)f=c[b],d[f.name]={type:"FormulaFunction",signature:f};for(f in a)d[f]=a[f],d[f].type="any";return d}function v(a,b,c){var d="";switch(b){case "SYNTAX":d="Syntax Error: ";break;case "RUNTIME":d="Runtime Error: ";break;default:d="Syntax Error: "}try{switch(a.type){case "IfStatement":switch(c){case "CANNOT_USE_ASSIGNMENT_IN_CONDITION":d+=
" Assignments not be made in logical tests";break;case "CANNOT_USE_NONBOOLEAN_IN_CONDITION":d+=" Non Boolean used as Condition"}break;case "UpdateExpression":case "AssignmentExpression":switch(c){case "CANNOT_USE_ASSIGNMENT_IN_CONDITION":d+=" Assignments not be made in logical tests";break;case "ASSIGNMENTTOVARSONLY":d+=" Assignments can only be made to identifiers"}break;case "ExpressionStatement":d+=" Assignments can only be made to identifiers";break;case "FunctionDeclaration":switch(c){case "GLOBALFUNCTIONSONLY":d+=
" Functions cannot be declared as variables";break;case "FUNCTIONMUSTHAVEIDENTIFIER":d+=" Function Definition must have an identifier"}break;case "VariableDeclaration":d+=" Only 1 variable can be declared at a time";break;case "VariableDeclarator":switch(c){case "FUNCTIONVARIABLEDECLARATOR":d+=" Functions cannot be declared as variables";break;case "VARIABLEMUSTHAVEIDENTIFIER":d+=" Variable Definition must have an identifier"}break;case "Identifier":d+=" Identifier Not Found. ";d+=a.name;break;case "ObjectExpression":switch(c){case "OBJECTPROPERTYMUSTBESTRING":d+=
" Property name must be a string"}break;case "ForStatement":switch(c){case "CANNOT_USE_NONBOOLEAN_IN_CONDITION":d+=" Non Boolean used as Condition"}break;case "ForInStatement":switch(c){case "ONLY1VAR":d+=" Can only declare 1 var for use with IN";break;case "CANNOTDECLAREVAL":d+=" Can only declare value for use with IN";break;case "LEFTNOVAR":d+="Must provide a variable to iterate with.";break;case "VARIABLENOTDECLARED":d+="Variable must be declared before it is used..";break;case "CANNOTITERATETHISTYPE":d+=
"This type cannot be used in an IN loop"}break;case "MemberExpression":switch(c){case "PROPERTYNOTFOUND":d+="Cannot find member property. ";d+=!1===a.computed?a.property.name:"";break;case "OUTOFBOUNDS":d+="Out of Bounds. ";d+=!1===a.computed?a.property.name:"";break;case "NOTFOUND":d+="Cannot call member method on null. ";d+=!1===a.computed?a.property.name:"";break;case "INVALIDTYPE":d+="Cannot call member property on object of this type. ",d+=!1===a.computed?a.property.name:""}break;case "Property":switch(c){case "ONLYLITERAL":d+=
"Property names must be literals or identifiers"}break;case "Literal":break;case "ThisExpression":d+="THIS construct is not supported.";case "CallExpression":switch(c){case "WRONGSIGNATURE":d+="Function signature does not match: ";d+=a.callee.name;break;case "ONLYNODESUPPORTED":d+="Functions must be declared.";d+=a.callee.name;break;case "NOTAFUNCTION":d+="Not a Function: ";d+=a.callee.name;break;case "NOTFOUND":d+="Function Not Found: "+a.callee.name}break;case "UnaryExpression":switch(c){case "NOTSUPPORTEDUNARYOPERATOR":d+=
"Operator "+a.operator+" not allowed in this context. Only ! can be used with boolean, and - with a number";break;case "NOTSUPPORTEDTYPE":d+="Unary operator "+a.operator+" cannot be used with this argument."}case "BinaryExpression":switch(c){case "OPERATORNOTRECOGNISED":d+="Binary Operator not recognised "+a.operator}break;case "LogicalExpression":switch(c){case "ONLYBOOLEAN":d+="Operator "+a.operator+" cannot be used. Only || or \x26\x26 are allowed values";break;case "ONLYORORAND":d+="Logical Expression "+
a.operator+" being applied to parameters that are not boolean."}break;case "ConditionalExpression":d+="Conditional statements not supported.";break;case "ArrayExpression":switch(c){case "FUNCTIONCONTEXTILLEGAL":d+=" Cannot Put Function inside Array."}break;case "Array":d+="Expression contains unrecognised array structure.";break;default:d+="Expression contains unrecognised code structures."}}catch(z){throw z;}return d}function x(a,b,c){return{line:a.loc.start.line,character:a.loc.start.column,reason:v(a,
b,c)}}function w(a,b,c,e,f){void 0===f&&(f=!0);b={globalScope:b.globalScope,localScope:{}};for(f=0;f<a.params.length;f++)b.localScope[a.params[f].name.toLowerCase()]={type:"any"};t(a.body,b,c,e,!1)}function t(a,c,f,g,k){void 0===k&&(k=!0);if(null===a)throw Error("Unnexpexted Expression Syntax");var d=null;try{switch(a.type){case "VariableDeclarator":if(null!==a.init&&"FunctionExpression"===a.init.type){g.push(x(a,"SYNTAX","FUNCTIONVARIABLEDECLARATOR"));break}"Identifier"!==a.id.type?g.push(x(a,"SYNTAX",
"VARIABLEMUSTHAVEIDENTIFIER")):(a.id.name.toLowerCase(),null===c.localScope?c.globalScope[a.id.name.toLowerCase()]={type:"any"}:c.localScope[a.id.name.toLowerCase()]={type:"any"});null===a.init?"":t(a.init,c,f,g,k);break;case "FunctionDeclaration":!1===k&&g.push(x(a,"SYNTAX","GLOBALFUNCTIONSONLY"));"Identifier"!==a.id.type&&g.push(x(a,"SYNTAX","FUNCTIONMUSTHAVEIDENTIFIER"));d=b("",a,c);w(a,c,f,g,k);null!==c.localScope&&g.push(x(a,"SYNTAX","GLOBALFUNCTIONSONLY"));d.isnative=!1;"Identifier"===a.id.type&&
(c.globalScope[a.id.name.toLowerCase()]={type:"FormulaFunction",signature:[d]});break;case "VariableDeclaration":for(var m=0;m<a.declarations.length;m++)t(a.declarations[m],c,f,g,k);break;case "IfStatement":null!==a.test&&(t(a.test,c,f,g,k),"AssignmentExpression"!==a.test.type&&"UpdateExpression"!==a.test.type||g.push(x(a.test,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION")));null!==a.consequent&&t(a.consequent,c,f,g,k);null!==a.alternate&&t(a.alternate,c,f,g,k);break;case "EmptyStatement":break;case "BlockStatement":if(null!==
a.body)for(m=0;m<a.body.length;m++)t(a.body[m],c,f,g,k);break;case "ReturnStatement":null!==a.argument&&t(a.argument,c,f,g,k);break;case "ForInStatement":"VariableDeclaration"===a.left.type?(1<a.left.declarations.length&&g.push(x(a,"SYNTAX","ONLY1VAR")),null!==a.left.declarations[0].init&&g.push(x(a,"SYNTAX","CANNOTDECLAREVAL"))):"Identifier"!==a.left.type&&g.push(x(a,"SYNTAX","LEFTNOTVAR"));t(a.left,c,f,g,k);t(a.right,c,f,g,k);t(a.body,c,f,g,k);break;case "ForStatement":null!==a.init&&t(a.init,c,
f,g,k);null!==a.test&&t(a.test,c,f,g,k);null!==a.body&&t(a.body,c,f,g,k);null!==a.update&&t(a.update,c,f,g,k);break;case "BreakStatement":break;case "ContinueStatement":break;case "UpdateExpression":"Identifier"!==a.argument.type&&"MemberExpression"!==a.argument.type?g.push(x(a,"SYNTAX","ASSIGNMENTTOVARSONLY")):("Identifier"===a.argument.type&&(d=!1,!1===f&&(null!==c.localScope&&void 0!==c.localScope[a.argument.name.toLowerCase()]&&(d=!0),void 0!==c.globalScope[a.argument.name.toLowerCase()]&&(d=
!0),!1===d&&g.push({line:null===a?0:a.loc.start.line,character:null===a?0:a.loc.start.column,reason:"Identifier "+a.argument.name+" has not been declared."}))),"MemberExpression"===a.argument.type&&t(a.argument,c,f,g,k));break;case "AssignmentExpression":"Identifier"!==a.left.type&&"MemberExpression"!==a.left.type&&g.push(x(a,"SYNTAX","ASSIGNMENTTOVARSONLY"));switch(a.operator){case "\x3d":case "/\x3d":case "*\x3d":case "%\x3d":case "+\x3d":case "-\x3d":break;default:g.push(x(a,"SYNTAX","OPERATORNOTRECOGNISED"))}t(a.right,
c,f,g,k);d=!1;"Identifier"===a.left.type&&(null!==c.localScope&&void 0!==c.localScope[a.left.name.toLowerCase()]&&(d=!0),void 0!==c.globalScope[a.left.name.toLowerCase()]&&(d=!0),!1===f&&!1===d&&g.push({line:null===a?0:a.loc.start.line,character:null===a?0:a.loc.start.column,reason:"Identifier "+a.argument.name+" has not been declared."}));"MemberExpression"===a.left.type&&t(a.left,c,f,g,k);break;case "ExpressionStatement":t(a.expression,c,f,g,k);break;case "Identifier":var l=a.name.toLowerCase();
if(null!==c.localScope&&void 0!==c.localScope[l])break;void 0===c.globalScope[l]&&!1===f&&g.push(x(a,"SYNTAX","VARIABLENOTFOUND"));break;case "MemberExpression":t(a.object,c,f,g,k);!0===a.computed&&t(a.property,c,f,g,k);break;case "Literal":return"";case "ThisExpression":g.push(x(a,"SYNTAX","NOTSUPPORTED"));break;case "CallExpression":"Identifier"!==a.callee.type&&g.push(x(a,"SYNTAX","ONLYNODESSUPPORTED"));for(m=0;m<a.arguments.length;m++)t(a.arguments[m],c,f,g,k);var h=e(a.callee.name,a.arguments,
c);!1===f&&-1===h&&g.push(x(a,"SYNTAX","NOTFOUND"));-2===h&&g.push(x(a,"SYNTAX","WRONGSIGNATURE"));break;case "UnaryExpression":t(a.argument,c,f,g,k);break;case "BinaryExpression":t(a.left,c,f,g,k);t(a.right,c,f,g,k);switch(a.operator){case "\x3d\x3d":case "!\x3d":case "\x3c":case "\x3c\x3d":case "\x3e":case "\x3e\x3d":case "+":case "-":case "*":case "/":case "%":break;default:g.push(x(a,"SYNTAX","OPERATORNOTRECOGNISED"))}break;case "LogicalExpression":switch(a.operator){case "\x26\x26":case "||":break;
default:g.push(x(a,"SYNTAX","OPERATORNOTRECOGNISED"))}t(a.left,c,f,g,k);"AssignmentExpression"!==a.left.type&&"UpdateExpression"!==a.left.type||g.push(x(a,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));t(a.right,c,f,g,k);"AssignmentExpression"!==a.right.type&&"UpdateExpression"!==a.right.type||g.push(x(a,"SYNTAX","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));break;case "ConditionalExpression":g.push(x(a,"SYNTAX","NOTSUPPORTED"));break;case "ArrayExpression":for(m=0;m<a.elements.length;m++)t(a.elements[m],
c,f,g,k);break;case "Array":g.push(x(a,"SYNTAX","NOTSUPPORTED"));case "ObjectExpression":for(m=0;m<a.properties.length;m++)t(a.properties[m],c,f,g,k);break;case "Property":"Literal"!==a.key.type&&"Identifier"!==a.key.type&&g.push(x(a,"SYNTAX","ONLYLITERAL"));"Literal"===a.key.type&&t(a.key,c,f,g,k);t(a.value,c,f,g,k);break;default:g.push(x(a,"SYNTAX","UNRECOGNISED"))}}catch(E){g.push({line:null===a?0:a.loc.start.line,character:null===a?0:a.loc.start.column,reason:"Unnexpected Syntax"})}}function u(a,
b){var c=[],d;try{switch(a.type){case "VariableDeclarator":return null!==a.init?u(a.init,b):c;case "FunctionDeclaration":return u(a.body,b);case "VariableDeclaration":for(var e=0;e<a.declarations.length;e++)d=u(a.declarations[e],b),c=c.concat(d);return c;case "ForInStatement":return d=u(a.left,b),c=c.concat(d),d=u(a.right,b),c=c.concat(d),d=u(a.body,b),c=c.concat(d);case "ForStatement":return null!==a.init&&(d=u(a.init,b),c=c.concat(d)),null!==a.test&&(d=u(a.test,b),c=c.concat(d)),null!==a.body&&
(d=u(a.body,b),c=c.concat(d)),null!==a.update&&(d=u(a.update,b),c=c.concat(d)),c;case "IfStatement":return d=u(a.test,b),c=c.concat(d),null!==a.consequent&&(d=u(a.consequent,b),c=c.concat(d)),null!==a.alternate&&(d=u(a.alternate,b),c=c.concat(d)),c;case "EmptyStatement":return c;case "BlockStatement":for(e=0;e<a.body.length;e++)d=u(a.body[e],b),c=c.concat(d);return c;case "ReturnStatement":return null!==a.argument?u(a.argument,b):c;case "UpdateExpression":return u(a.argument,b);case "AssignmentExpression":return c=
u(a.left,b),c=c.concat(u(a.right,b));case "ExpressionStatement":return u(a.expression,b);case "BreakStatement":return c;case "ContinueStatement":return c;case "Compound":return c;case "Identifier":return c;case "MemberExpression":return c;case "Literal":return c;case "ThisExpression":return c;case "CallExpression":for(e=0;e<a.arguments.length;e++)d=u(a.arguments[e],b),c=c.concat(d);c.push(a.callee.name.toLowerCase());return c;case "ArrayExpression":for(e=0;e<a.elements.length;e++)d=u(a.elements[e],
b),c=c.concat(d);return c;case "UnaryExpression":return u(a.argument,b);case "ObjectExpression":for(e=0;e<a.properties.length;e++)d=u(a.properties[e],b),c=c.concat(d);return c;case "Property":return u(a.value,b);case "BinaryExpression":return d=u(a.left,b),c=c.concat(d),d=u(a.right,b),c=c.concat(d);case "LogicalExpression":return d=u(a.left,b),c=c.concat(d),d=u(a.right,b),c=c.concat(d);case "ConditionalExpression":return c;case "Array":return c;default:return c}}catch(A){throw A;}}Object.defineProperty(h,
"__esModule",{value:!0});h.functionDecls={concatenate:{min:"0",max:"*",av:"a"},split:{min:"2",max:"4",av:"a"},guid:{min:"0",max:"1",av:"a"},today:{min:"0",max:"0",av:"a"},now:{min:"0",max:"0",av:"a"},timestamp:{min:"0",max:"0",av:"a"},day:{min:"1",max:"1",av:"a"},month:{min:"1",max:"1",av:"a"},year:{min:"1",max:"1",av:"a"},hour:{min:"1",max:"1",av:"a"},second:{min:"1",max:"1",av:"a"},millisecond:{min:"1",max:"1",av:"a"},minute:{min:"1",max:"1",av:"a"},weekday:{min:"1",max:"1",av:"a"},toutc:{min:"1",
max:"1",av:"a"},tolocal:{min:"1",max:"1",av:"a"},date:{min:"0",max:"7",av:"a"},datediff:{min:"2",max:"3",av:"a"},dateadd:{min:"2",max:"3",av:"a"},trim:{min:"1",max:"1",av:"a"},text:{min:"1",max:"2",av:"a"},left:{min:"2",max:"2",av:"a"},right:{min:"2",max:"2",av:"a"},mid:{min:"2",max:"3",av:"a"},upper:{min:"1",max:"1",av:"a"},proper:{min:"1",max:"2",av:"a"},lower:{min:"1",max:"1",av:"a"},find:{min:"2",max:"3",av:"a"},iif:{min:"3",max:"3",av:"a"},decode:{min:"2",max:"*",av:"a"},when:{min:"2",max:"*",
av:"a"},defaultvalue:{min:"2",max:"2",av:"a"},isempty:{min:"1",max:"1",av:"a"},domaincode:{min:"3",max:"4",av:"a"},domainname:{min:"2",max:"4",av:"a"},polygon:{min:"1",max:"1",av:"a"},point:{min:"1",max:"1",av:"a"},polyline:{min:"1",max:"1",av:"a"},extent:{min:"1",max:"1",av:"a"},multipoint:{min:"1",max:"1",av:"a"},geometry:{min:"1",max:"1",av:"a"},count:{min:"0",max:"*",av:"a"},number:{min:"1",max:"2",av:"a"},acos:{min:"1",max:"1",av:"a"},asin:{min:"1",max:"1",av:"a"},atan:{min:"1",max:"1",av:"a"},
atan2:{min:"2",max:"2",av:"a"},ceil:{min:"1",max:"2",av:"a"},floor:{min:"1",max:"2",av:"a"},round:{min:"1",max:"2",av:"a"},cos:{min:"1",max:"1",av:"a"},exp:{min:"1",max:"1",av:"a"},log:{min:"1",max:"1",av:"a"},min:{min:"0",max:"*",av:"a"},constrain:{min:"3",max:"3",av:"a"},console:{min:"0",max:"*",av:"a"},max:{min:"0",max:"*",av:"a"},pow:{min:"2",max:"2",av:"a"},random:{min:"0",max:"0",av:"a"},sqrt:{min:"1",max:"1",av:"a"},sin:{min:"1",max:"1",av:"a"},tan:{min:"1",max:"1",av:"a"},abs:{min:"1",max:"1",
av:"a"},isnan:{min:"1",max:"1",av:"a"},stdev:{min:"0",max:"*",av:"a"},average:{min:"0",max:"*",av:"a"},mean:{min:"0",max:"*",av:"a"},sum:{min:"0",max:"*",av:"a"},variance:{min:"0",max:"*",av:"a"},distinct:{min:"0",max:"*",av:"a"},first:{min:"1",max:"1",av:"a"},top:{min:"2",max:"2",av:"a"},"boolean":{min:"1",max:"1",av:"a"},dictionary:{min:"0",max:"*",av:"a"},"typeof":{min:"1",max:"1",av:"a"},reverse:{min:"1",max:"1",av:"a"},replace:{min:"3",max:"4",av:"a"},sort:{min:"1",max:"2",av:"a"},feature:{min:"1",
max:"*",av:"a"},haskey:{min:"2",max:"2",av:"a"},indexof:{min:"2",max:"2",av:"a"},disjoint:{min:"2",max:"2",av:"a"},intersects:{min:"2",max:"2",av:"a"},touches:{min:"2",max:"2",av:"a"},crosses:{min:"2",max:"2",av:"a"},within:{min:"2",max:"2",av:"a"},contains:{min:"2",max:"2",av:"a"},overlaps:{min:"2",max:"2",av:"a"},equals:{min:"2",max:"2",av:"a"},relate:{min:"3",max:"3",av:"a"},intersection:{min:"2",max:"2",av:"a"},union:{min:"1",max:"2",av:"a"},difference:{min:"2",max:"2",av:"a"},symmetricdifference:{min:"2",
max:"2",av:"a"},clip:{min:"2",max:"2",av:"a"},cut:{min:"2",max:"2",av:"a"},area:{min:"1",max:"2",av:"a"},areageodetic:{min:"1",max:"2",av:"a"},length:{min:"1",max:"2",av:"a"},lengthgeodetic:{min:"1",max:"2",av:"a"},distance:{min:"2",max:"3",av:"a"},densify:{min:"2",max:"3",av:"a"},densifygeodetic:{min:"2",max:"3",av:"a"},generalize:{min:"2",max:"4",av:"a"},buffer:{min:"2",max:"3",av:"a"},buffergeodetic:{min:"2",max:"3",av:"a"},offset:{min:"2",max:"6",av:"a"},rotate:{min:"2",max:"3",av:"a"},issimple:{min:"1",
max:"1",av:"a"},simplify:{min:"1",max:"1",av:"a"},centroid:{min:"1",max:"1",av:"a"},multiparttosinglepart:{min:"1",max:"1",av:"a"},setgeometry:{min:"2",max:"2",av:"a"}};h.addFunctionDeclaration=function(a,b){var c=h.functionDecls[a.name.toLowerCase()];void 0===c?h.functionDecls[a.name.toLowerCase()]={min:a.min,max:a.max,av:b}:"a"===c.av&&"f"===b?(void 0!==c.fmin&&delete c.fmin,void 0!==c.fmax&&delete c.fmax,c.fmin=a.min,c.fmax=a.max):"f"===c.av&&"a"===b?(void 0===c.fmin&&(c.fmin=c.min),void 0===c.fmax&&
(c.fmax=c.max),c.min=a.min,c.max=a.max,c.av="a"):"f"===b?(c.fmin=a.min,c.fmax=a.max):"a"===b&&(c.min=a.min,c.max=a.max)};h.checkFunctionSignature=n;h.findFunction=e;h.validateLanguageNode=k;h.testValidityOfExpression=l;h.referencesMemberImpl=q;h.referencesMember=function(a,b){return!0===q(a.body[0].body,b.toLowerCase())?!0:!1};h.referencesFunctionImpl=g;h.referencesFunction=function(a,b){return!0===g(a.body[0].body,b)?!0:!1};h.findFieldLiteralsImpl=c;h.findFieldLiterals=function(a,b){return c(a.body[0].body,
b)};h.extractFunctionDeclaration=b;h.validateFunction=f;h.constructGlobalScope=r;h.validateScript=function(a,b,c){void 0===c&&(c="full");b={globalScope:r(b.vars,h.functionDecls,b.customFunctions,c),localScope:null};return l(a.body[0].body,b)};h.validateLanguage=function(a){return"BlockStatement"!==a.body[0].body.type?"Invalid formula content.":k(a.body[0].body)};h.nodeErrorMessage=v;h.makeError=x;h.extractAllIssuesInFunction=w;h.extractAllIssues=t;h.checkScript=function(a,b,c,e){void 0===e&&(e="full");
var d=[];if("BlockStatement"!==a.body[0].body.type)return[{line:0,character:0,reason:"Invalid Body"}];if(null===b||void 0===b)b={vars:{},customFunctions:[]};b={globalScope:r(b.vars,h.functionDecls,b.customFunctions,e),localScope:null};try{t(a.body[0].body,b,c,d)}catch(A){}return d};h.findFunctionCallsImpl=u;h.findFunctionCalls=function(a,b){return u(a.body[0].body,b)}})},"esri/arcade/Dictionary":function(){define(["require","exports","./languageUtils","../geometry/Geometry","./ImmutableArray"],function(a,
h,n,e,k){return function(){function a(e){this.attributes=null;this.plain=!1;this.immutable=!0;this.attributes=e instanceof a?e.attributes:void 0===e?{}:null===e?{}:e}a.prototype.field=function(a){var e=a.toLowerCase();a=this.attributes[a];if(void 0!==a)return a;for(var c in this.attributes)if(c.toLowerCase()===e)return this.attributes[c];throw Error("Field not Found");};a.prototype.setField=function(a,e){if(this.immutable)throw Error("Dictionary is Immutable");var c=a.toLowerCase();if(void 0===this.attributes[a])for(var b in this.attributes)if(b.toLowerCase()===
c){this.attributes[b]=e;return}this.attributes[a]=e};a.prototype.hasField=function(a){var e=a.toLowerCase();if(void 0!==this.attributes[a])return!0;for(var c in this.attributes)if(c.toLowerCase()===e)return!0;return!1};a.prototype.keys=function(){var a=[],e;for(e in this.attributes)a.push(e);return a=a.sort()};a.prototype.castToText=function(){var a="",g;for(g in this.attributes){""!==a&&(a+=",");var c=this.attributes[g];null==c?a+=JSON.stringify(g)+":null":n.isBoolean(c)||n.isNumber(c)||n.isString(c)?
a+=JSON.stringify(g)+":"+JSON.stringify(c):c instanceof e?a+=JSON.stringify(g)+":"+n.toStringExplicit(c):c instanceof k?a+=JSON.stringify(g)+":"+n.toStringExplicit(c):c instanceof Array?a+=JSON.stringify(g)+":"+n.toStringExplicit(c):c instanceof Date?a+=JSON.stringify(g)+":"+JSON.stringify(c):null!==c&&"object"===typeof c&&void 0!==c.castToText&&(a+=JSON.stringify(g)+":"+c.castToText())}return"{"+a+"}"};return a}()})},"esri/arcade/Feature":function(){define("require exports dojo/_base/lang ../geometry/Geometry ../geometry/support/jsonUtils ./Dictionary ./languageUtils ./ImmutableArray ../geometry/Point".split(" "),
function(a,h,n,e,k,l,q,g,c){return function(){function a(b,c,g){this._layer=this.attributes=this.geometry=null;this.immutable=this._datesfixed=!0;b instanceof a?(this.attributes=b.attributes,this.geometry=b.geometry,b._layer&&(this._layer=b._layer)):b&&"esri.Graphic"===b.declaredClass?(this.geometry=b.geometry,this.attributes=void 0===b.attributes?{}:null===b.attributes?{}:b.attributes,b._sourceLayer?(this._layer=b._sourceLayer,this._datesfixed=!1):b._layer?(this._layer=b._layer,this._datesfixed=
!1):b.layer&&(this._layer=b.layer,this._datesfixed=!1)):b instanceof l?(this.attributes=b.field("attributes"),null!==this.attributes&&(this.attributes=this.attributes instanceof l?this.attributes.attributes:null),this.geometry=b.field("geometry"),null!==this.geometry&&(this.geometry instanceof l?this.geometry=a.parseGeometryFromDictionary(this.geometry):this.geometry instanceof e||(this.geometry=null))):(c instanceof e||null===c?(this.geometry=c,this.attributes=void 0===b?{}:null===b?{}:b):"string"===
typeof b?(b=JSON.parse(b),null!==b.geometry&&void 0!==b.geometry&&(this.geometry=k.fromJSON(b.geometry)),this.attributes=void 0===b.attributes?{}:null===b.attributes?{}:b.attributes):(void 0===b?this.attributes={}:null===b&&(this.attributes={}),this.geometry=null),void 0!==g&&(this._layer=g))}a.prototype.castToText=function(){var a="",b;for(b in this.attributes){""!==a&&(a+=",");var c=this.attributes[b];null==c?a+=JSON.stringify(b)+":null":q.isBoolean(c)||q.isNumber(c)||q.isString(c)?a+=JSON.stringify(b)+
":"+JSON.stringify(c):c instanceof e?a+=JSON.stringify(b)+":"+q.toStringExplicit(c):c instanceof g?a+=JSON.stringify(b)+":"+q.toStringExplicit(c):c instanceof Array?a+=JSON.stringify(b)+":"+q.toStringExplicit(c):c instanceof Date?a+=JSON.stringify(b)+":"+JSON.stringify(c):null!==c&&"object"===typeof c&&void 0!==c.castToText&&(a+=JSON.stringify(b)+":"+c.castToText())}return'{"geometry":'+(null===this.geometry?"null":q.toStringExplicit(this.geometry))+',"attributes":{'+a+"}}"};a.prototype._fixDates=
function(){for(var a=[],b=0;b<this._layer.fields.length;b++){var c=this._layer.fields[b];"date"!==c.type&&"esriFieldTypeDate"!==c.type||a.push(c.name)}0<a.length&&this._fixDateFields(a);this._datesfixed=!0};a.prototype._fixDateFields=function(a){this.attributes=n.mixin({},this.attributes);for(var b=0;b<a.length;b++){var c=this.attributes[a[b]];if(null!==c)if(void 0===c)for(var e in this.attributes){if(e.toLowerCase()===a[b]){c=this.attributes[e];null===c||c instanceof Date||(this.attributes[e]=new Date(c));
break}}else c instanceof Date||(this.attributes[a[b]]=new Date(c))}};a.prototype.field=function(a){!1===this._datesfixed&&this._fixDates();var b=a.toLowerCase();a=this.attributes[a];if(void 0!==a)return a;for(var c in this.attributes)if(c.toLowerCase()===b)return this.attributes[c];if(this._hasFieldDefinition(b))return null;throw Error("Field not Found");};a.prototype._hasFieldDefinition=function(a){if(null===this._layer)return!1;for(var b=0;b<this._layer.fields.length;b++)if(this._layer.fields[b].name.toLowerCase()===
a)return!0;return!1};a.prototype._field=function(a){!1===this._datesfixed&&this._fixDates();var b=a.toLowerCase();a=this.attributes[a];if(void 0!==a)return a;for(var c in this.attributes)if(c.toLowerCase()===b)return this.attributes[c];return null};a.prototype.setField=function(a,b){if(this.immutable)throw Error("Feature is Immutable");if(!1===q.isSimpleType(b))throw Error("Illegal Value Assignment to Feature");var c=a.toLowerCase();if(void 0===this.attributes[a])for(var e in this.attributes)if(e.toLowerCase()===
c){this.attributes[e]=b;return}this.attributes[a]=b};a.prototype.hasField=function(a){var b=a.toLowerCase();if(void 0!==this.attributes[a])return!0;for(var c in this.attributes)if(c.toLowerCase()===b)return!0;return this._hasFieldDefinition(b)?!0:!1};a.prototype.keys=function(){var a=[],b={},c;for(c in this.attributes)a.push(c),b[c.toLowerCase()]=1;if(null!==this._layer)for(c=0;c<this._layer.fields.length;c++){var e=this._layer.fields[c];1!==b[e.name.toLowerCase()]&&a.push(e.name)}return a=a.sort()};
a.fromFeature=function(b){return new a(b)};a.parseGeometryFromDictionary=function(b){b=a.convertDictionaryToJson(b,!0);void 0!==b.spatialreference&&(b.spatialReference=b.spatialreference,delete b.spatialreference);void 0!==b.rings&&(b.rings=this.fixPathArrays(b.rings,!0===b.hasZ,!0===b.hasM));void 0!==b.paths&&(b.paths=this.fixPathArrays(b.paths,!0===b.hasZ,!0===b.hasM));void 0!==b.points&&(b.points=this.fixPointArrays(b.points,!0===b.hasZ,!0===b.hasM));return k.fromJSON(b)};a.fixPathArrays=function(a,
b,c){var e=[];if(a instanceof Array)for(var f=0;f<a.length;f++)e.push(this.fixPointArrays(a[f],b,c));else if(a instanceof g)for(f=0;f<a.length();f++)e.push(this.fixPointArrays(a.get(f),b,c));return e};a.fixPointArrays=function(a,b,e){var f=[];if(a instanceof Array)for(var k=0;k<a.length;k++){var l=a[k];l instanceof c?b&&e?f.push([l.x,l.y,l.z,l.m]):b?f.push([l.x,l.y,l.z]):e?f.push([l.x,l.y,l.m]):f.push([l.x,l.y]):f.push(l)}else if(a instanceof g)for(k=0;k<a.length();k++)l=a.get(k),l instanceof c?b&&
e?f.push([l.x,l.y,l.z,l.m]):b?f.push([l.x,l.y,l.z]):e?f.push([l.x,l.y,l.m]):f.push([l.x,l.y]):f.push(l);return f};a.convertDictionaryToJson=function(b,c){void 0===c&&(c=!1);var e={},f;for(f in b.attributes){var g=b.attributes[f];g instanceof l&&(g=a.convertDictionaryToJson(g));c?e[f.toLowerCase()]=g:e[f]=g}return e};a.parseAttributesFromDictionary=function(a){var b={},c;for(c in a.attributes){var e=a.attributes[c];if(q.isSimpleType(e))b[c]=e;else throw Error("Illegal Argument");}return b};a.fromJson=
function(b){var c=null;null!==b.geometry&&void 0!==b.geometry&&(c=k.fromJSON(b.geometry));var e={};if(null!==b.attributes&&void 0!==b.attributes)for(var f in b.attributes){var g=b.attributes[f];if(q.isString(g)||q.isNumber(g)||q.isBoolean(g)||q.isDate(g))e[f]=g;else throw Error("Illegal Argument");}return new a(e,c)};a.prototype.domainValueLookup=function(a,b,c){if(null===this._layer||!this._layer.fields)return null;c=q.getDomain(a,this._layer,this,c);if(void 0===b)try{b=this.field(a)}catch(x){return null}return q.getDomainValue(c,
b)};a.prototype.domainCodeLookup=function(a,b,c){if(null===this._layer||!this._layer.fields)return null;a=q.getDomain(a,this._layer,this,c);return q.getDomainCode(a,b)};return a}()})},"esri/arcade/functions/date":function(){define(["require","exports","../../moment","../languageUtils"],function(a,h,n,e){function k(a){return null===a?a:isNaN(a.getTime())?null:a}Object.defineProperty(h,"__esModule",{value:!0});h.registerFunctions=function(a,h){a.today=function(a,c){return h(a,c,function(a,c,g){e.pcCheck(g,
0,0);a=new Date;a.setHours(0,0,0,0);return a})};a.now=function(a,c){return h(a,c,function(a,c,g){e.pcCheck(g,0,0);return new Date})};a.timestamp=function(a,c){return h(a,c,function(a,c,g){e.pcCheck(g,0,0);a=new Date;return a=new Date(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds())})};a.toutc=function(a,c){return h(a,c,function(a,c,g){e.pcCheck(g,1,1);a=e.toDate(g[0]);return null===a?null:new Date(a.getUTCFullYear(),a.getUTCMonth(),
a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds())})};a.tolocal=function(a,c){return h(a,c,function(a,c,g){e.pcCheck(g,1,1);a=e.toDate(g[0]);return null===a?null:n.utc([a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()]).toDate()})};a.day=function(a,c){return h(a,c,function(a,c,g){e.pcCheck(g,1,1);a=e.toDate(g[0]);return null===a?NaN:a.getDate()})};a.month=function(a,c){return h(a,c,function(a,c,g){e.pcCheck(g,
1,1);a=e.toDate(g[0]);return null===a?NaN:a.getMonth()})};a.year=function(a,c){return h(a,c,function(a,c,g){e.pcCheck(g,1,1);a=e.toDate(g[0]);return null===a?NaN:a.getFullYear()})};a.hour=function(a,c){return h(a,c,function(a,c,g){e.pcCheck(g,1,1);a=e.toDate(g[0]);return null===a?NaN:a.getHours()})};a.second=function(a,c){return h(a,c,function(a,c,g){e.pcCheck(g,1,1);a=e.toDate(g[0]);return null===a?NaN:a.getSeconds()})};a.millisecond=function(a,c){return h(a,c,function(a,c,g){e.pcCheck(g,1,1);a=
e.toDate(g[0]);return null===a?NaN:a.getMilliseconds()})};a.minute=function(a,c){return h(a,c,function(a,c,g){e.pcCheck(g,1,1);a=e.toDate(g[0]);return null===a?NaN:a.getMinutes()})};a.weekday=function(a,c){return h(a,c,function(a,c,g){e.pcCheck(g,1,1);a=e.toDate(g[0]);return null===a?NaN:a.getDay()})};a.date=function(a,c){return h(a,c,function(a,c,g){e.pcCheck(g,0,7);if(3===g.length)return k(new Date(e.toNumber(g[0]),e.toNumber(g[1]),e.toNumber(g[2]),0,0,0,0));if(4===g.length)return k(new Date(e.toNumber(g[0]),
e.toNumber(g[1]),e.toNumber(g[2]),e.toNumber(g[3]),0,0,0));if(5===g.length)return k(new Date(e.toNumber(g[0]),e.toNumber(g[1]),e.toNumber(g[2]),e.toNumber(g[3]),e.toNumber(g[4]),0,0));if(6===g.length)return k(new Date(e.toNumber(g[0]),e.toNumber(g[1]),e.toNumber(g[2]),e.toNumber(g[3]),e.toNumber(g[4]),e.toNumber(g[5]),0));if(7===g.length)return k(new Date(e.toNumber(g[0]),e.toNumber(g[1]),e.toNumber(g[2]),e.toNumber(g[3]),e.toNumber(g[4]),e.toNumber(g[5]),e.toNumber(g[6])));if(2===g.length){a=e.toString(g[1]);
if(""===a)return null;a=e.standardiseDateFormat(a);g=n(e.toString(g[0]),a,!0);return!0===g.isValid()?g.toDate():null}if(1===g.length){if(e.isString(g[0])&&""===g[0].replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))return null;a=e.toNumber(g[0]);return!1===isNaN(a)?k(new Date(a)):e.toDate(g[0])}if(0===g.length)return new Date})};a.datediff=function(a,c){return h(a,c,function(a,c,g){e.pcCheck(g,2,3);a=e.toDateM(g[0]);c=e.toDateM(g[1]);if(null===a||null===c)return NaN;switch(e.toString(g[2]).toLowerCase()){case "days":case "day":case "d":return a.diff(c,
"days",!0);case "months":case "month":return a.diff(c,"months",!0);case "minutes":case "minute":case "m":return"M"===g[2]?a.diff(c,"months",!0):a.diff(c,"minutes",!0);case "seconds":case "second":case "s":return a.diff(c,"seconds",!0);case "milliseconds":case "millisecond":case "ms":return a.diff(c);case "hours":case "hour":case "h":return a.diff(c,"hours",!0);case "years":case "year":case "y":return a.diff(c,"years",!0);default:return a.diff(c)}})};a.dateadd=function(a,c){return h(a,c,function(a,
c,g){e.pcCheck(g,2,3);a=e.toDateM(g[0]);if(null===a)return null;c="milliseconds";switch(e.toString(g[2]).toLowerCase()){case "days":case "day":case "d":c="days";break;case "months":case "month":c="months";break;case "minutes":case "minute":case "m":c="M"===g[2]?"months":"minutes";break;case "seconds":case "second":case "s":c="seconds";break;case "milliseconds":case "millisecond":case "ms":c="milliseconds";break;case "hours":case "hour":case "h":c="hours";break;case "years":case "year":case "y":c=
"years"}a.add(e.toNumber(g[1]),c);return a.toDate()})}}})},"esri/arcade/functions/string":function(){define(["require","exports","../languageUtils","../Feature"],function(a,h,n,e){Object.defineProperty(h,"__esModule",{value:!0});h.registerFunctions=function(a,l){a.trim=function(a,e){return l(a,e,function(a,b,e){n.pcCheck(e,1,1);return n.toString(e[0]).trim()})};a.upper=function(a,e){return l(a,e,function(a,b,e){n.pcCheck(e,1,1);return n.toString(e[0]).toUpperCase()})};a.proper=function(a,e){return l(a,
e,function(a,b,e){n.pcCheck(e,1,2);a=1;2===e.length&&"firstword"===n.toString(e[1]).toLowerCase()&&(a=2);b=/\s/;e=n.toString(e[0]);for(var c="",f=!0,g=0;g<e.length;g++){var k=e[g];b.test(k)?1===a&&(f=!0):k.toUpperCase()!==k.toLowerCase()&&(f?(k=k.toUpperCase(),f=!1):k=k.toLowerCase());c+=k}return c})};a.lower=function(a,e){return l(a,e,function(a,b,e){n.pcCheck(e,1,1);return n.toString(e[0]).toLowerCase()})};a.guid=function(a,e){return l(a,e,function(a,b,e){n.pcCheck(e,0,1);if(0<e.length)switch(n.toString(e[0]).toLowerCase()){case "digits":return n.generateUUID().replace("-",
"").replace("-","").replace("-","").replace("-","");case "digits-hyphen":return n.generateUUID();case "digits-hyphen-parentheses":return"("+n.generateUUID()+")"}return"{"+n.generateUUID()+"}"})};a.console=function(a,e){return l(a,e,function(c,b,e){0!==e.length&&(1===e.length?a.console(n.toString(e[0])):a.console(n.toString(e)));return n.voidOperation})};a.mid=function(a,e){return l(a,e,function(a,b,e){n.pcCheck(e,2,3);a=n.toNumber(e[1]);if(isNaN(a))return"";0>a&&(a=0);if(2===e.length)return n.toString(e[0]).substr(a);
b=n.toNumber(e[2]);if(isNaN(b))return"";0>b&&(b=0);return n.toString(e[0]).substr(a,b)})};a.find=function(a,e){return l(a,e,function(a,b,e){n.pcCheck(e,2,3);a=0;if(2<e.length){a=n.toNumber(n.defaultUndefined(e[2],0));if(isNaN(a))return-1;0>a&&(a=0)}return n.toString(e[1]).indexOf(n.toString(e[0]),a)})};a.left=function(a,e){return l(a,e,function(a,b,e){n.pcCheck(e,2,2);a=n.toNumber(e[1]);if(isNaN(a))return"";0>a&&(a=0);return n.toString(e[0]).substr(0,a)})};a.right=function(a,e){return l(a,e,function(a,
b,e){n.pcCheck(e,2,2);a=n.toNumber(e[1]);if(isNaN(a))return"";0>a&&(a=0);return n.toString(e[0]).substr(-1*a,a)})};a.split=function(a,e){return l(a,e,function(a,b,e){n.pcCheck(e,2,4);a=n.toNumber(n.defaultUndefined(e[2],-1));b=n.toBoolean(n.defaultUndefined(e[3],!1));-1===a||null===a||!0===b?e=n.toString(e[0]).split(n.toString(e[1])):(isNaN(a)&&(a=-1),-1>a&&(a=-1),e=n.toString(e[0]).split(n.toString(e[1]),a));if(!1===b)return e;b=[];for(var c=0;c<e.length&&!(-1!==a&&b.length>=a);c++)""!==e[c]&&void 0!==
e[c]&&b.push(e[c]);return b})};a.text=function(a,e){return l(a,e,function(a,b,e){n.pcCheck(e,1,2);return n.toStringExplicit(e[0],e[1])})};a.concatenate=function(a,e){return l(a,e,function(a,b,e){a=[];if(1>e.length)return"";if(n.isArray(e[0])){b=n.defaultUndefined(e[2],"");for(var c=0;c<e[0].length;c++)a[c]=n.toStringExplicit(e[0][c],b);return 1<e.length?a.join(e[1]):a.join("")}if(n.isImmutableArray(e[0])){b=n.defaultUndefined(e[2],"");for(c=0;c<e[0].length();c++)a[c]=n.toStringExplicit(e[0].get(c),
b);return 1<e.length?a.join(e[1]):a.join("")}for(c=0;c<e.length;c++)a[c]=n.toStringExplicit(e[c]);return a.join("")})};a.reverse=function(a,e){return l(a,e,function(a,b,e){n.pcCheck(e,1,1);if(n.isArray(e[0]))return a=e[0].slice(0),a.reverse(),a;if(n.isImmutableArray(e[0]))return a=e[0].toArray().slice(0),a.reverse(),a;throw Error("Invalid Parameter");})};a.replace=function(a,e){return l(a,e,function(a,b,e){n.pcCheck(e,3,4);a=n.toString(e[0]);b=n.toString(e[1]);var c=n.toString(e[2]);return(4===e.length?
n.toBoolean(e[3]):1)?n.multiReplace(a,b,c):a.replace(b,c)})};a.domainname=function(a,g){return l(a,g,function(a,b,f){n.pcCheck(f,2,4);if(f[0]instanceof e)return f[0].domainValueLookup(n.toString(f[1]),f[2],void 0===f[3]?void 0:n.toNumber(f[3]));throw Error("Invalid Parameter");})};a.domaincode=function(a,g){return l(a,g,function(a,b,f){n.pcCheck(f,3,4);if(f[0]instanceof e)return f[0].domainCodeLookup(n.toString(f[1]),f[2],void 0===f[3]?void 0:n.toNumber(f[3]));throw Error("Invalid Parameter");})}}})},
"esri/arcade/functions/maths":function(){define(["require","exports","../languageUtils","dojo/number"],function(a,h,n,e){function k(a,e,g){if("undefined"===typeof g||0===+g)return Math[a](e);e=+e;g=+g;if(isNaN(e)||"number"!==typeof g||0!==g%1)return NaN;e=e.toString().split("e");e=Math[a](+(e[0]+"e"+(e[1]?+e[1]-g:-g)));e=e.toString().split("e");return+(e[0]+"e"+(e[1]?+e[1]+g:g))}Object.defineProperty(h,"__esModule",{value:!0});h.registerFunctions=function(a,h){function g(a,b,e){a=n.toNumber(a);return isNaN(a)?
a:isNaN(b)||isNaN(e)||b>e?NaN:a<b?b:a>e?e:a}a.number=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,1,2);a=c[0];return n.isNumber(a)?a:null===a?0:n.isDate(a)||n.isBoolean(a)?Number(a):n.isArray(a)?NaN:""===a||void 0===a?Number(a):n.isString(a)?void 0!==c[1]?(c=n.multiReplace(c[1],"\u2030",""),c=n.multiReplace(c,"\u00a4",""),e.parse(a,{pattern:c})):Number(a.trim()):Number(a)})};a.abs=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,1,1);return Math.abs(n.toNumber(c[0]))})};a.acos=function(a,
b){return h(a,b,function(a,b,c){n.pcCheck(c,1,1);return Math.acos(n.toNumber(c[0]))})};a.asin=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,1,1);return Math.asin(n.toNumber(c[0]))})};a.atan=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,1,1);return Math.atan(n.toNumber(c[0]))})};a.atan2=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,2,2);return Math.atan2(n.toNumber(c[0]),n.toNumber(c[1]))})};a.ceil=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,1,2);return 2===c.length?
(a=n.toNumber(c[1]),isNaN(a)&&(a=0),k("ceil",n.toNumber(c[0]),-1*a)):Math.ceil(n.toNumber(c[0]))})};a.round=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,1,2);return 2===c.length?(a=n.toNumber(c[1]),isNaN(a)&&(a=0),k("round",n.toNumber(c[0]),-1*a)):Math.round(n.toNumber(c[0]))})};a.floor=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,1,2);return 2===c.length?(a=n.toNumber(c[1]),isNaN(a)&&(a=0),k("floor",n.toNumber(c[0]),-1*a)):Math.floor(n.toNumber(c[0]))})};a.cos=function(a,b){return h(a,
b,function(a,b,c){n.pcCheck(c,1,1);return Math.cos(n.toNumber(c[0]))})};a.isnan=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,1,1);return"number"===typeof c[0]&&isNaN(c[0])})};a.exp=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,1,1);return Math.exp(n.toNumber(c[0]))})};a.log=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,1,1);return Math.log(n.toNumber(c[0]))})};a.pow=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,2,2);return Math.pow(n.toNumber(c[0]),n.toNumber(c[1]))})};
a.random=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,0,0);return Math.random()})};a.sin=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,1,1);return Math.sin(n.toNumber(c[0]))})};a.sqrt=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,1,1);return Math.sqrt(n.toNumber(c[0]))})};a.tan=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,1,1);return Math.tan(n.toNumber(c[0]))})};a.defaultvalue=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,2,2);return null===c[0]||""===
c[0]||void 0===c[0]?c[1]:c[0]})};a.isempty=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,1,1);return null===c[0]||""===c[0]||void 0===c[0]?!0:!1})};a["boolean"]=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,1,1);return n.toBoolean(c[0])})};a.constrain=function(a,b){return h(a,b,function(a,b,c){n.pcCheck(c,3,3);a=n.toNumber(c[1]);b=n.toNumber(c[2]);if(n.isArray(c[0])){var e=[],f=0;for(c=c[0];f<c.length;f++)e.push(g(c[f],a,b));return e}if(n.isImmutableArray(c[0])){e=[];for(f=0;f<c[0].length();f++)e.push(g(c[0].get(f),
a,b));return e}return g(c[0],a,b)})}}})},"esri/arcade/functions/geometry":function(){define("require exports ../../geometry/Geometry ../../geometry/Polygon ../../geometry/Polyline ../../geometry/Point ../../geometry/Extent ../../geometry/Multipoint ../../geometry/support/jsonUtils ../languageUtils ../Dictionary ../Feature".split(" "),function(a,h,n,e,k,l,q,g,c,b,f,r){Object.defineProperty(h,"__esModule",{value:!0});h.registerFunctions=function(a,h){a.polygon=function(a,g){return h(a,g,function(g,
k,d){b.pcCheck(d,1,1);g=null;if(d[0]instanceof f){if(g=b.fixSpatialReference(r.parseGeometryFromDictionary(d[0]),a.spatialReference),!1===g instanceof e)throw Error("Illegal Parameter");}else g=d[0]instanceof e?c.fromJSON(d[0].toJSON()):b.fixSpatialReference(new e(JSON.parse(d[0])),a.spatialReference);if(null!==g&&!1===g.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");return b.fixNullGeometry(g)})};
a.polyline=function(a,e){return h(a,e,function(e,g,d){b.pcCheck(d,1,1);e=null;if(d[0]instanceof f){if(e=b.fixSpatialReference(r.parseGeometryFromDictionary(d[0]),a.spatialReference),!1===e instanceof k)throw Error("Illegal Parameter");}else e=d[0]instanceof k?c.fromJSON(d[0].toJSON()):b.fixSpatialReference(new k(JSON.parse(d[0])),a.spatialReference);if(null!==e&&!1===e.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
return b.fixNullGeometry(e)})};a.point=function(a,e){return h(a,e,function(e,g,d){b.pcCheck(d,1,1);e=null;if(d[0]instanceof f){if(e=b.fixSpatialReference(r.parseGeometryFromDictionary(d[0]),a.spatialReference),!1===e instanceof l)throw Error("Illegal Parameter");}else e=d[0]instanceof l?c.fromJSON(d[0].toJSON()):b.fixSpatialReference(new l(JSON.parse(d[0])),a.spatialReference);if(null!==e&&!1===e.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
return b.fixNullGeometry(e)})};a.multipoint=function(a,e){return h(a,e,function(e,k,d){b.pcCheck(d,1,1);e=null;if(d[0]instanceof f){if(e=b.fixSpatialReference(r.parseGeometryFromDictionary(d[0]),a.spatialReference),!1===e instanceof g)throw Error("Illegal Parameter");}else e=d[0]instanceof g?c.fromJSON(d[0].toJSON()):b.fixSpatialReference(new g(JSON.parse(d[0])),a.spatialReference);if(null!==e&&!1===e.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");
return b.fixNullGeometry(e)})};a.extent=function(a,n){return h(a,n,function(h,p,d){b.pcCheck(d,1,1);h=null;d[0]instanceof f?h=b.fixSpatialReference(r.parseGeometryFromDictionary(d[0]),a.spatialReference):d[0]instanceof l?(h={xmin:d[0].x,ymin:d[0].y,xmax:d[0].x,ymax:d[0].y,spatialReference:d[0].spatialReference.toJSON()},d[0].hasZ?(h.zmin=d[0].z,h.zmax=d[0].z):d[0].hasM&&(h.mmin=d[0].m,h.mmax=d[0].m),h=c.fromJSON(h)):h=d[0]instanceof e?c.fromJSON(d[0].extent.toJSON()):d[0]instanceof k?c.fromJSON(d[0].extent.toJSON()):
d[0]instanceof g?c.fromJSON(d[0].extent.toJSON()):d[0]instanceof q?c.fromJSON(d[0].toJSON()):b.fixSpatialReference(new q(JSON.parse(d[0])),a.spatialReference);if(null!==h&&!1===h.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");return b.fixNullGeometry(h)})};a.geometry=function(a,e){return h(a,e,function(e,g,d){b.pcCheck(d,1,1);e=null;e=d[0]instanceof r?b.fixSpatialReference(d[0].geometry,a.spatialReference):
d[0]instanceof f?b.fixSpatialReference(r.parseGeometryFromDictionary(d[0]),a.spatialReference):b.fixSpatialReference(c.fromJSON(JSON.parse(d[0])),a.spatialReference);if(null!==e&&!1===e.spatialReference.equals(a.spatialReference))throw Error("Cannot create Geometry in this SpatialReference. Engine is using a different spatial reference.");return b.fixNullGeometry(e)})};a.setgeometry=function(a,c){return h(a,c,function(a,c,d){b.pcCheck(d,2,2);if(d[0]instanceof r){if(!0===d[0].immutable)throw Error("Feature is Immutable");
if(d[1]instanceof n||null===d[1])d[0].geometry=d[1];else throw Error("Illegal Argument");}else throw Error("Illegal Argument");return b.voidOperation})};a.feature=function(a,c){return h(a,c,function(c,e,d){if(0===d.length)throw Error("Missing Parameters");c=null;if(1===d.length)if(b.isString(d[0]))c=r.fromJson(JSON.parse(d[0]));else if(d[0]instanceof r)c=new r(d[0]);else if(d[0]instanceof n)c=new r(null,d[0]);else if(d[0]instanceof f)c=d[0].hasField("geometry")?d[0].field("geometry"):null,e=d[0].hasField("attributes")?
d[0].field("attributes"):null,null!==c&&c instanceof f&&(c=r.parseGeometryFromDictionary(c)),null!==e&&(e=r.parseAttributesFromDictionary(e)),c=new r(e,c);else throw Error("Illegal Argument");else{if(2===d.length){e=c=null;if(null!==d[0])if(d[0]instanceof n)c=d[0];else if(c instanceof f)c=r.parseGeometryFromDictionary(d[0]);else throw Error("Illegal Argument");if(null!==d[1])if(d[1]instanceof f)e=r.parseAttributesFromDictionary(d[1]);else throw Error("Illegal Argument");}else{c=null;e={};if(null!==
d[0])if(d[0]instanceof n)c=d[0];else if(c instanceof f)c=r.parseGeometryFromDictionary(d[0]);else throw Error("Illegal Argument");for(var g=1;g<d.length;g+=2){var k=b.toString(d[g]),h=d[g+1];if(null===h||void 0===h||b.isString(h)||isNaN(h)||b.isDate(h)||b.isNumber(h)||b.isBoolean(h)){if(b.isFunctionParameter(h)||!1===b.isSimpleType(h))throw Error("Illegal Argument");e[k]=h===b.voidOperation?null:h}else throw Error("Illegal Argument");}}c=new r(e,c)}c.geometry=b.fixSpatialReference(c.geometry,a.spatialReference);
c.immutable=!1;return c})};a.dictionary=function(a,c){return h(a,c,function(a,c,d){if(0===d.length)throw Error("Missing Parameters");if(0!==d.length%2)throw Error("Missing Parameters");a={};for(c=0;c<d.length;c+=2){var e=b.toString(d[c]),g=d[c+1];if(null===g||void 0===g||b.isString(g)||isNaN(g)||b.isDate(g)||b.isNumber(g)||b.isBoolean(g)||b.isArray(g)||b.isImmutableArray(g)){if(b.isFunctionParameter(g))throw Error("Illegal Argument");a[e]=g===b.voidOperation?null:g}else throw Error("Illegal Argument");
}d=new f(a);d.immutable=!1;return d})};a.haskey=function(a,c){return h(a,c,function(a,c,d){b.pcCheck(d,2,2);a=b.toString(d[1]);if(d[0]instanceof r||d[0]instanceof f)return d[0].hasField(a);throw Error("Illegal Argument");})};a.indexof=function(a,c){return h(a,c,function(a,c,d){b.pcCheck(d,2,2);a=d[1];if(b.isArray(d[0])){for(c=0;c<d[0].length;c++)if(b.equalityTest(a,d[0][c]))return c;return-1}if(b.isImmutableArray(d[0])){var e=d[0].length();for(c=0;c<e;c++)if(b.equalityTest(a,d[0].get(c)))return c;
return-1}throw Error("Illegal Argument");})}}})},"esri/arcade/functions/geomsync":function(){define("require exports ../../geometry/Geometry ../../geometry/Polygon ../../geometry/Polyline ../../geometry/Point ../../geometry/Extent ../../geometry/Multipoint ../../geometry/support/jsonUtils ./centroid ../languageUtils ../kernel ../../kernel".split(" "),function(a,h,n,e,k,l,q,g,c,b,f,r,v){function x(a){return u?a.clone():c.fromJSON(a.toJSON())}function w(a){return 0===v.version.indexOf("4.")?e.fromExtent(a):
new e({spatialReference:a.spatialReference,rings:[[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]]]})}Object.defineProperty(h,"__esModule",{value:!0});var t=null,u=0===v.version.indexOf("4.");h.setGeometryEngine=function(a){t=a};h.registerFunctions=function(a,d){function m(a){f.pcCheck(a,2,2);if(!(a[0]instanceof n&&a[1]instanceof n||a[0]instanceof n&&null===a[1]||a[1]instanceof n&&null===a[0]||null===a[0]&&null===a[1]))throw Error("Illegal Argument");}a.disjoint=function(a,
b){return d(a,b,function(a,b,c){m(c);return null===c[0]||null===c[1]?!0:t.disjoint(c[0],c[1])})};a.intersects=function(a,b){return d(a,b,function(a,b,c){m(c);return null===c[0]||null===c[1]?!1:t.intersects(c[0],c[1])})};a.touches=function(a,b){return d(a,b,function(a,b,c){m(c);return null===c[0]||null===c[1]?!1:t.touches(c[0],c[1])})};a.crosses=function(a,b){return d(a,b,function(a,b,c){m(c);return null===c[0]||null===c[1]?!1:t.crosses(c[0],c[1])})};a.within=function(a,b){return d(a,b,function(a,
b,c){m(c);return null===c[0]||null===c[1]?!1:t.within(c[0],c[1])})};a.contains=function(a,b){return d(a,b,function(a,b,c){m(c);return null===c[0]||null===c[1]?!1:t.contains(c[0],c[1])})};a.overlaps=function(a,b){return d(a,b,function(a,b,c){m(c);return null===c[0]||null===c[1]?!1:t.overlaps(c[0],c[1])})};a.equals=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,2,2);return c[0]===c[1]?!0:c[0]instanceof n&&c[1]instanceof n?t.equals(c[0],c[1]):f.isDate(c[0])&&f.isDate(c[1])?c[0].getTime()===c[1].getTime():
!1})};a.relate=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,3,3);if(c[0]instanceof n&&c[1]instanceof n)return t.relate(c[0],c[1],f.toString(c[2]));if(c[0]instanceof n&&null===c[1]||c[1]instanceof n&&null===c[0]||null===c[0]&&null===c[1])return!1;throw Error("Illegal Argument");})};a.intersection=function(a,b){return d(a,b,function(a,b,c){m(c);return null===c[0]||null===c[1]?null:t.intersect(c[0],c[1])})};a.union=function(a,b){return d(a,b,function(b,c,d){b=[];if(0===d.length)throw Error("Function called with wrong number of Parameters");
if(1===d.length)if(f.isArray(d[0]))for(c=0;c<d[0].length;c++){if(null!==d[0][c])if(d[0][c]instanceof n)b.push(d[0][c]);else throw Error("Illegal Argument");}else if(f.isImmutableArray(d[0]))for(d=d[0].toArray(),c=0;c<d.length;c++){if(null!==d[c])if(d[c]instanceof n)b.push(d[c]);else throw Error("Illegal Argument");}else{if(d[0]instanceof n)return f.fixSpatialReference(x(d[0]),a.spatialReference);if(null===d[0])return null;throw Error("Illegal Argument");}else for(c=0;c<d.length;c++)if(null!==d[c])if(d[c]instanceof
n)b.push(d[c]);else throw Error("Illegal Argument");return 0===b.length?null:t.union(b)})};a.difference=function(a,b){return d(a,b,function(a,b,c){m(c);return null!==c[0]&&null===c[1]?x(c[0]):null===c[0]?null:t.difference(c[0],c[1])})};a.symmetricdifference=function(a,b){return d(a,b,function(a,b,c){m(c);return null===c[0]&&null===c[1]?null:null===c[0]?x(c[1]):null===c[1]?x(c[0]):t.symmetricDifference(c[0],c[1])})};a.clip=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,2,2);if(!(c[1]instanceof
q)&&null!==c[1])throw Error("Illegal Argument");if(null===c[0])return null;if(!(c[0]instanceof n))throw Error("Illegal Argument");return null===c[1]?null:t.clip(c[0],c[1])})};a.cut=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,2,2);if(!(c[1]instanceof k)&&null!==c[1])throw Error("Illegal Argument");if(null===c[0])return[];if(!(c[0]instanceof n))throw Error("Illegal Argument");return null===c[1]?[x(c[0])]:t.cut(c[0],c[1])})};a.area=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,1,
2);if(null===c[0])return 0;if(!(c[0]instanceof n))throw Error("Illegal Argument");return t.planarArea(c[0],r.convertSquareUnitsToCode(f.defaultUndefined(c[1],-1)))})};a.areageodetic=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,1,2);if(null===c[0])return 0;if(!(c[0]instanceof n))throw Error("Illegal Argument");return t.geodesicArea(c[0],r.convertSquareUnitsToCode(f.defaultUndefined(c[1],-1)))})};a.length=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,1,2);if(null===c[0])return 0;
if(!(c[0]instanceof n))throw Error("Illegal Argument");return t.planarLength(c[0],r.convertLinearUnitsToCode(f.defaultUndefined(c[1],-1)))})};a.lengthgeodetic=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,1,2);if(null===c[0])return 0;if(!(c[0]instanceof n))throw Error("Illegal Argument");return t.geodesicLength(c[0],r.convertLinearUnitsToCode(f.defaultUndefined(c[1],-1)))})};a.distance=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,2,3);if(!(c[0]instanceof n))throw Error("Illegal Argument");
if(!(c[1]instanceof n))throw Error("Illegal Argument");return t.distance(c[0],c[1],r.convertLinearUnitsToCode(f.defaultUndefined(c[2],-1)))})};a.densify=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,2,3);if(null===c[0])return null;if(!(c[0]instanceof n))throw Error("Illegal Argument");a=f.toNumber(c[1]);if(isNaN(a))throw Error("Illegal Argument");if(0>=a)throw Error("Illegal Argument");return c[0]instanceof e||c[0]instanceof k?t.densify(c[0],a,r.convertLinearUnitsToCode(f.defaultUndefined(c[2],
-1))):c[0]instanceof q?t.densify(w(c[0]),a,r.convertLinearUnitsToCode(f.defaultUndefined(c[2],-1))):c[0]})};a.densifygeodetic=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,2,3);if(null===c[0])return null;if(!(c[0]instanceof n))throw Error("Illegal Argument");a=f.toNumber(c[1]);if(isNaN(a))throw Error("Illegal Argument");if(0>=a)throw Error("Illegal Argument");return c[0]instanceof e||c[0]instanceof k?t.geodesicDensify(c[0],a,r.convertLinearUnitsToCode(f.defaultUndefined(c[2],-1))):c[0]instanceof
q?t.geodesicDensify(w(c[0]),a,r.convertLinearUnitsToCode(f.defaultUndefined(c[2],-1))):c[0]})};a.generalize=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,2,4);if(null===c[0])return null;if(!(c[0]instanceof n))throw Error("Illegal Argument");a=f.toNumber(c[1]);if(isNaN(a))throw Error("Illegal Argument");return t.generalize(c[0],a,f.toBoolean(f.defaultUndefined(c[2],!0)),r.convertLinearUnitsToCode(f.defaultUndefined(c[3],-1)))})};a.buffer=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,
2,3);if(null===c[0])return null;if(!(c[0]instanceof n))throw Error("Illegal Argument");a=f.toNumber(c[1]);if(isNaN(a))throw Error("Illegal Argument");return 0===a?x(c[0]):t.buffer(c[0],a,r.convertLinearUnitsToCode(f.defaultUndefined(c[2],-1)))})};a.buffergeodetic=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,2,3);if(null===c[0])return null;if(!(c[0]instanceof n))throw Error("Illegal Argument");a=f.toNumber(c[1]);if(isNaN(a))throw Error("Illegal Argument");return 0===a?x(c[0]):t.geodesicBuffer(c[0],
a,r.convertLinearUnitsToCode(f.defaultUndefined(c[2],-1)))})};a.offset=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,2,6);if(null===c[0])return null;if(!(c[0]instanceof e||c[0]instanceof k))throw Error("Illegal Argument");a=f.toNumber(c[1]);if(isNaN(a))throw Error("Illegal Argument");b=f.toNumber(f.defaultUndefined(c[4],10));if(isNaN(b))throw Error("Illegal Argument");var d=f.toNumber(f.defaultUndefined(c[5],0));if(isNaN(d))throw Error("Illegal Argument");return t.offset(c[0],a,r.convertLinearUnitsToCode(f.defaultUndefined(c[2],
-1)),f.toString(f.defaultUndefined(c[3],"round")).toLowerCase(),b,d)})};a.rotate=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,2,3);a=c[0];if(null===a)return null;if(!(a instanceof n))throw Error("Illegal Argument");a instanceof q&&(a=e.fromExtent(a));b=f.toNumber(c[1]);if(isNaN(b))throw Error("Illegal Argument");c=f.defaultUndefined(c[2],null);if(null===c)return t.rotate(a,b);if(c instanceof l)return t.rotate(a,b,c);throw Error("Illegal Argument");})};a.centroid=function(a,c){return d(a,
c,function(c,d,m){f.pcCheck(m,1,1);if(null===m[0])return null;if(!(m[0]instanceof n))throw Error("Illegal Argument");return m[0]instanceof l?f.fixSpatialReference(x(m[0]),a.spatialReference):m[0]instanceof e?u?m[0].centroid:m[0].getCentroid():m[0]instanceof k?b.centroidPolyline(m[0]):m[0]instanceof g?b.centroidMultiPoint(m[0]):m[0]instanceof q?u?m[0].center:m[0].getExtent().getCenter():null})};a.multiparttosinglepart=function(a,b){return d(a,b,function(b,d,m){f.pcCheck(m,1,1);d=[];if(null===m[0])return null;
if(!(m[0]instanceof n))throw Error("Illegal Argument");if(m[0]instanceof l||m[0]instanceof q)return[f.fixSpatialReference(x(m[0]),a.spatialReference)];b=t.simplify(m[0]);if(b instanceof e){d=[];var h=[];for(m=0;m<b.rings.length;m++)if(b.isClockwise(b.rings[m])){var p=c.fromJSON({rings:[b.rings[m]],hasZ:b.hasZ,hasM:b.hasM,spatialReference:u?b.spatialReference.toJSON():b.spatialReference.toJson()});d.push(p)}else h.push({ring:b.rings[m],pt:b.getPoint(m,0)});for(b=0;b<h.length;b++)for(m=0;m<d.length;m++)if(d[m].contains(h[b].pt)){d[m].addRing(h[b].ring);
break}return d}if(b instanceof k){d=[];for(m=0;m<b.paths.length;m++)h=c.fromJSON({paths:[b.paths[m]],hasZ:b.hasZ,hasM:b.hasM,spatialReference:u?b.spatialReference.toJSON():b.spatialReference.toJson()}),d.push(h);return d}if(m[0]instanceof g){b=f.fixSpatialReference(x(m[0]),a.spatialReference);for(m=0;m<b.points.length;m++)d.push(b.getPoint(m));return d}return null})};a.issimple=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,1,1);if(null===c[0])return!0;if(c[0]instanceof n)return t.isSimple(c[0]);
throw Error("Illegal Argument");})};a.simplify=function(a,b){return d(a,b,function(a,b,c){f.pcCheck(c,1,1);if(null===c[0])return null;if(c[0]instanceof n)return t.simplify(c[0]);throw Error("Illegal Argument");})}}})},"esri/arcade/functions/centroid":function(){define(["require","exports","../../geometry/Point","../../kernel"],function(a,h,n,e){function k(a,c,b){var e={x:0,y:0};c&&(e.z=0);b&&(e.m=0);for(var g=0,k=a[0],h=0;h<a.length;h++){var q=a[h],n;a:if(q.length!==k.length)n=!1;else{for(n=0;n<q.length;n++)if(q[n]!==
k[n]){n=!1;break a}n=!0}if(!1===n){n=l(k,q,c);var u=q,p=c,d=b,m={x:(k[0]+u[0])/2,y:(k[1]+u[1])/2};p&&(m.z=(k[2]+u[2])/2);p&&d?m.m=(k[3]+u[3])/2:d&&(m.m=(k[2]+u[2])/2);k=m;k.x*=n;k.y*=n;e.x+=k.x;e.y+=k.y;c&&(k.z*=n,e.z+=k.z);b&&(k.m*=n,e.m+=k.m);g+=n;k=q}}0<g?(e.x/=g,e.y/=g,c&&(e.z/=g),b&&(e.m/=g)):(e.x=a[0][0],e.y=a[0][1],c&&(e.z=a[0][2]),b&&c?e.m=a[0][3]:b&&(e.m=a[0][2]));return e}function l(a,c,b){var e=c[0]-a[0];a=c[1]-a[1];return b?(c=c[2]-c[2],Math.sqrt(e*e+a*a+c*c)):Math.sqrt(e*e+a*a)}Object.defineProperty(h,
"__esModule",{value:!0});var q=0===e.version.indexOf("4.");h.centroidPolyline=function(a){for(var c={x:0,y:0,spatialReference:q?a.spatialReference.toJSON():a.spatialReference.toJson()},b={x:0,y:0,spatialReference:q?a.spatialReference.toJSON():a.spatialReference.toJson()},e=0,g=0,h=0;h<a.paths.length;h++)if(0!==a.paths[h].length){var x;x=a.paths[h];var w=!0===a.hasZ;if(1>=x.length)x=0;else{for(var t=0,u=1;u<x.length;u++)t+=l(x[u-1],x[u],w);x=t}0===x?(w=k(a.paths[h],!0===a.hasZ,!0===a.hasM),c.x+=w.x,
c.y+=w.y,!0===a.hasZ&&(c.z+=w.z),!0===a.hasM&&(c.m+=w.m),++e):(w=k(a.paths[h],!0===a.hasZ,!0===a.hasM),b.x+=w.x*x,b.y+=w.y*x,!0===a.hasZ&&(b.z+=w.z*x),!0===a.hasM&&(b.m+=w.m*x),g+=x)}return 0<g?(b.x/=g,b.y/=g,!0===a.hasZ&&(b.z/=g),!0===a.hasM&&(b.m/=g),new n(b)):0<e?(c.x/=e,c.y/=e,!0===a.hasZ&&(b.z/=e),!0===a.hasM&&(c.m/=e),new n(c)):null};h.centroidMultiPoint=function(a){if(0===a.points.length)return null;for(var c=0,b=0,e=0,g=0,k=0;k<a.points.length;k++){var h=a.getPoint(k);!0===h.hasZ&&(e+=h.z);
!0===h.hasM&&(g+=h.m);c+=h.x;b+=h.y;g+=h.m}c={x:c/a.points.length,y:b/a.points.length,spatialReference:null};c.spatialReference=q?a.spatialReference.toJSON():a.spatialReference.toJson();!0===a.hasZ&&(c.z=e/a.points.length);!0===a.hasM&&(c.m=g/a.points.length);return new n(c)}})},"esri/arcade/kernel":function(){define(["require","exports","../geometry/Extent"],function(a,h,n){Object.defineProperty(h,"__esModule",{value:!0});h.errback=function(a){return function(e){a.reject(e)}};h.callback=function(a,
k){return function(){try{a.apply(null,arguments)}catch(l){k.reject(l)}}};h.convertSquareUnitsToCode=function(a){if(void 0===a)return null;if("number"===typeof a)return a;switch(a.toLowerCase()){case "meters":case "meter":case "m":case "squaremeters":case "squaremeter":case "square-meter":case "square_meters":return 109404;case "miles":case "mile":case "squaremile":case "squaremiles":case "square-miles":case "square-mile":return 109413;case "kilometers":case "kilometer":case "squarekilometers":case "squarekilometer":case "square-kilometers":case "square-kilometer":case "km":return 109414;
case "acres":case "acre":case "ac":return 109402;case "hectares":case "hectare":case "ha":return 109401;case "yard":case "yd":case "yards":case "square-yards":case "square-yard":case "squareyards":case "squareyard":return 109442;case "feet":case "ft":case "foot":case "square-feet":case "square-foot":case "squarefeet":case "squarefoot":return 109405}return null};h.shapeExtent=function(a){if(null===a)return null;switch(a.type){case "polygon":case "multipoint":case "polyline":return a.extent;case "point":return new n({xmin:a.x,
ymin:a.y,xmax:a.x,ymax:a.y,spatialReference:a.spatialReference});case "extent":return a}return null};h.convertLinearUnitsToCode=function(a){if(void 0===a)return null;if("number"===typeof a||"number"===typeof a)return a;switch(a.toLowerCase()){case "meters":case "meter":case "m":case "squaremeters":case "squaremeter":case "square-meter":case "square-meters":return 9001;case "miles":case "mile":case "squaremile":case "squaremiles":case "square-miles":case "square-mile":return 9035;case "kilometers":case "kilometer":case "squarekilometers":case "squarekilometer":case "square-kilometers":case "square-kilometer":case "km":return 9036;
case "yard":case "yd":case "yards":case "square-yards":case "square-yard":case "squareyards":case "squareyard":return 9096;case "feet":case "ft":case "foot":case "square-feet":case "square-foot":case "squarefeet":case "squarefoot":return 9002}return null};h.sameGeomType=function(a,k){return a===k||"point"===a&&"esriGeometryPoint"===k||"polyline"===a&&"esriGeometryPolyline"===k||"polygon"===a&&"esriGeometryPolygon"===k||"extent"===a&&"esriGeometryEnvelope"===k||"multipoint"===a&&"esriGeometryMultipoint"===
k||"point"===k&&"esriGeometryPoint"===a||"polyline"===k&&"esriGeometryPolyline"===a||"polygon"===k&&"esriGeometryPolygon"===a||"extent"===k&&"esriGeometryEnvelope"===a||"multipoint"===k&&"esriGeometryMultipoint"===a?!0:!1}})},"esri/arcade/functions/stats":function(){define(["require","exports","../languageUtils","./fieldStats"],function(a,h,n,e){function k(a,k,g,c){if(1===c.length){if(n.isArray(c[0]))return e.calculateStat(a,c[0],-1);if(n.isImmutableArray(c[0]))return e.calculateStat(a,c[0].toArray(),
-1)}return e.calculateStat(a,c,-1)}Object.defineProperty(h,"__esModule",{value:!0});h.registerFunctions=function(a,e){a.stdev=function(a,c){return e(a,c,function(a,c,e){return k("stdev",a,c,e)})};a.variance=function(a,c){return e(a,c,function(a,c,e){return k("variance",a,c,e)})};a.average=function(a,c){return e(a,c,function(a,c,e){return k("mean",a,c,e)})};a.mean=function(a,c){return e(a,c,function(a,c,e){return k("mean",a,c,e)})};a.sum=function(a,c){return e(a,c,function(a,c,e){return k("sum",a,
c,e)})};a.min=function(a,c){return e(a,c,function(a,c,e){return k("min",a,c,e)})};a.max=function(a,c){return e(a,c,function(a,c,e){return k("max",a,c,e)})};a.distinct=function(a,c){return e(a,c,function(a,c,e){return k("distinct",a,c,e)})};a.count=function(a,c){return e(a,c,function(a,c,e){n.pcCheck(e,1,1);if(n.isArray(e[0])||n.isString(e[0]))return e[0].length;if(n.isImmutableArray(e[0]))return e[0].length();throw Error("Invalid Parameters for Count");})}}})},"esri/arcade/functions/fieldStats":function(){define(["require",
"exports","../languageUtils"],function(a,h,n){function e(a){for(var e=0,g=0;g<a.length;g++)e+=a[g];return e/a.length}function k(a){for(var k=e(a),g=0,c=0;c<a.length;c++)g+=Math.pow(k-a[c],2);return g/a.length}Object.defineProperty(h,"__esModule",{value:!0});h.decodeStatType=function(a){switch(a.toLowerCase()){case "distinct":return"distinct";case "avg":case "mean":return"avg";case "min":return"min";case "sum":return"sum";case "max":return"max";case "stdev":case "stddev":return"stddev";case "var":case "variance":return"var";
case "count":return"count"}return""};h.calculateStat=function(a,h,g){void 0===g&&(g=1E3);switch(a.toLowerCase()){case "distinct":a:{a=g;g=[];for(var c={},b=[],f=0;f<h.length;f++){if(void 0!==h[f]&&null!==h[f]&&h[f]!==n.voidOperation){var l=h[f];if(n.isNumber(l)||n.isString(l))void 0===c[l]&&(g.push(l),c[l]=1);else{for(var q=!1,x=0;x<b.length;x++)!0===n.equalityTest(b[x],l)&&(q=!0);!1===q&&(b.push(l),g.push(l))}}if(g.length>=a&&-1!==a){h=g;break a}}h=g}return h;case "avg":case "mean":return e(n.toNumberArray(h));
case "min":return Math.min.apply(Math,n.toNumberArray(h));case "sum":h=n.toNumberArray(h);for(g=a=0;g<h.length;g++)a+=h[g];return a;case "max":return Math.max.apply(Math,n.toNumberArray(h));case "stdev":case "stddev":return Math.sqrt(k(n.toNumberArray(h)));case "var":case "variance":return k(n.toNumberArray(h));case "count":return h.length}return 0}})},"esri/arcade/parser":function(){define(["require","exports","./treeAnalysis","./lib/esprima"],function(a,h,n,e){Object.defineProperty(h,"__esModule",
{value:!0});h.parseScript=function(a){a=e.parse("function _() { "+a+"\n}");if(null===a.body||void 0===a.body)throw Error("No formula provided.");if(0===a.body.length)throw Error("No formula provided.");if(0===a.body.length)throw Error("No formula provided.");if("BlockStatement"!==a.body[0].body.type)throw Error("Invalid formula content.");var k=n.validateLanguage(a);if(""!==k)throw Error(k);return a};h.scriptCheck=function(a,h,q,g){var c=[];try{var b=e.parse("function _() { "+a+"\n}",{tolerant:!0,
loc:!0}),f=b.errors;if(0<f.length)for(var k=0;k<f.length;k++)c.push({line:f[k].lineNumber,character:f[k].column,reason:f[k].description});var l=n.checkScript(b,h,q,g);for(h=0;h<l.length;h++)c.push(l[h])}catch(x){try{"Unexpected token }"===x.description?(x.index=("function _() { "+a+"\n}").length-1,c.push({line:x.lineNumber,character:x.column,reason:"Unexpected end of script"})):c.push({line:x.lineNumber,character:x.column,reason:x.description})}catch(w){}}return c};h.extractFieldLiterals=function(a,
e){void 0===e&&(e=!1);return n.findFieldLiterals(a,e)};h.validateScript=function(a,e,h){void 0===h&&(h="full");return n.validateScript(a,e,h)};h.referencesMember=function(a,e){return n.referencesMember(a,e)};h.referencesFunction=function(a,e){return n.referencesFunction(a,e)}})},"esri/arcade/lib/esprima":function(){(function(a,h){"function"===typeof define&&define.amd?define(["exports"],h):"undefined"!==typeof exports?h(exports):h(a.esprima={})})(this,function(a){function h(a,b){if(!a)throw Error("ASSERT: "+
b);}function n(a){return 48<=a&&57>=a}function e(a){return 0<="0123456789abcdefABCDEF".indexOf(a)}function k(a){return 0<="01234567".indexOf(a)}function l(a){return 10===a||13===a||8232===a||8233===a}function q(a){return 36===a||95===a||65<=a&&90>=a||97<=a&&122>=a||92===a||128<=a&&db.NonAsciiIdentifierStart.test(String.fromCharCode(a))}function g(a){return 36===a||95===a||65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a||92===a||128<=a&&db.NonAsciiIdentifierPart.test(String.fromCharCode(a))}function c(a){a=
a.toLowerCase();switch(a.length){case 2:return"if"===a||"in"===a;case 3:return"var"===a||"for"===a;case 4:return"else"===a;case 5:return"break"===a;case 6:return"return"===a;case 8:return"function"===a.toLowerCase()||"continue"===a;default:return!1}}function b(a,b,c,d,e){h("number"===typeof c,"Comment must have valid position");aa.lastCommentStart>=c||(aa.lastCommentStart=c,a={type:a,value:b},I.range&&(a.range=[c,d]),I.loc&&(a.loc=e),I.comments.push(a),I.attachComment&&(I.leadingComments.push(a),
I.trailingComments.push(a)))}function f(a){var c,d,e;c=B-a;for(d={start:{line:ea,column:B-ha-a}};B<na;)if(e=H.charCodeAt(B),++B,l(e)){I.comments&&(a=H.slice(c+a,B-1),d.end={line:ea,column:B-ha-1},b("Line",a,c,B-1,d));13===e&&10===H.charCodeAt(B)&&++B;++ea;ha=B;return}I.comments&&(a=H.slice(c+a,B),d.end={line:ea,column:B-ha},b("Line",a,c,B,d))}function r(){var a,c;for(c=0===B;B<na;)if(a=H.charCodeAt(B),32===a||9===a||11===a||12===a||160===a||5760<=a&&0<=[5760,6158,8192,8193,8194,8195,8196,8197,8198,
8199,8200,8201,8202,8239,8287,12288,65279].indexOf(a))++B;else if(l(a))++B,13===a&&10===H.charCodeAt(B)&&++B,++ea,ha=B,c=!0;else if(47===a)if(a=H.charCodeAt(B+1),47===a)++B,++B,f(2),c=!0;else if(42===a){++B;++B;a:{var d=a=void 0,e=void 0,e=void 0;I.comments&&(a=B-2,d={start:{line:ea,column:B-ha-2}});for(;B<na;)if(e=H.charCodeAt(B),l(e))13===e&&10===H.charCodeAt(B+1)&&++B,++ea,++B,ha=B,B>=na&&D();else{if(42===e&&47===H.charCodeAt(B+1)){++B;++B;I.comments&&(e=H.slice(a+2,B-2),d.end={line:ea,column:B-
ha},b("Block",e,a,B,d));break a}++B}D()}}else break;else if(c&&45===a)if(45===H.charCodeAt(B+1)&&62===H.charCodeAt(B+2))B+=3,f(3);else break;else if(60===a)if("!--"===H.slice(B+1,B+4))++B,++B,++B,++B,f(4);else break;else break}function v(a){var b,c,d=0;b="u"===a?4:2;for(a=0;a<b;++a)if(B<na&&e(H[B]))c=H[B++],d=16*d+"0123456789abcdef".indexOf(c.toLowerCase());else return"";return String.fromCharCode(d)}function x(){var a,b;a=H.charCodeAt(B++);b=String.fromCharCode(a);92===a&&(117!==H.charCodeAt(B)&&
D(),++B,(a=v("u"))&&"\\"!==a&&q(a.charCodeAt(0))||D(),b=a);for(;B<na;){a=H.charCodeAt(B);if(!g(a))break;++B;b+=String.fromCharCode(a);92===a&&(b=b.substr(0,b.length-1),117!==H.charCodeAt(B)&&D(),++B,(a=v("u"))&&"\\"!==a&&g(a.charCodeAt(0))||D(),b+=a)}return b}function w(){var a=B,b=H.charCodeAt(B),c,d=H[B];switch(b){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++B,I.tokenize&&(40===b?I.openParenToken=I.tokens.length:123===b&&(I.openCurlyToken=
I.tokens.length)),{type:O.Punctuator,value:String.fromCharCode(b),lineNumber:ea,lineStart:ha,start:a,end:B};default:if(c=H.charCodeAt(B+1),61===c)switch(b){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return B+=2,{type:O.Punctuator,value:String.fromCharCode(b)+String.fromCharCode(c),lineNumber:ea,lineStart:ha,start:a,end:B};case 33:case 61:return B+=2,61===H.charCodeAt(B)&&++B,{type:O.Punctuator,value:H.slice(a,B),lineNumber:ea,lineStart:ha,start:a,end:B}}}b=H.substr(B,
4);if("\x3e\x3e\x3e\x3d"===b)return B+=4,{type:O.Punctuator,value:b,lineNumber:ea,lineStart:ha,start:a,end:B};b=b.substr(0,3);if("\x3e\x3e\x3e"===b||"\x3c\x3c\x3d"===b||"\x3e\x3e\x3d"===b)return B+=3,{type:O.Punctuator,value:b,lineNumber:ea,lineStart:ha,start:a,end:B};b=b.substr(0,2);if(d===b[1]&&0<="+-\x3c\x3e\x26|".indexOf(d)||"\x3d\x3e"===b)return B+=2,{type:O.Punctuator,value:b,lineNumber:ea,lineStart:ha,start:a,end:B};if(0<="\x3c\x3e\x3d!+-*%\x26|^/".indexOf(d))return++B,{type:O.Punctuator,value:d,
lineNumber:ea,lineStart:ha,start:a,end:B};D()}function t(){var a,b,c;c=H[B];h(n(c.charCodeAt(0))||"."===c,"Numeric literal must start with a decimal digit or a decimal point");b=B;a="";if("."!==c){a=H[B++];c=H[B];if("0"===a){if("x"===c||"X"===c){++B;for(a="";B<na&&e(H[B]);)a+=H[B++];0===a.length&&D();q(H.charCodeAt(B))&&D();return{type:O.NumericLiteral,value:parseInt("0x"+a,16),lineNumber:ea,lineStart:ha,start:b,end:B}}if("b"===c||"B"===c){++B;for(c="";B<na;){a=H[B];if("0"!==a&&"1"!==a)break;c+=H[B++]}0===
c.length&&D();B<na&&(a=H.charCodeAt(B),(q(a)||n(a))&&D());return{type:O.NumericLiteral,value:parseInt(c,2),lineNumber:ea,lineStart:ha,start:b,end:B}}if("o"===c||"O"===c||k(c)){k(c)?(c=!0,a="0"+H[B++]):(c=!1,++B,a="");for(;B<na&&k(H[B]);)a+=H[B++];c||0!==a.length||D();(q(H.charCodeAt(B))||n(H.charCodeAt(B)))&&D();return{type:O.NumericLiteral,value:parseInt(a,8),octal:c,lineNumber:ea,lineStart:ha,start:b,end:B}}c&&n(c.charCodeAt(0))&&D()}for(;n(H.charCodeAt(B));)a+=H[B++];c=H[B]}if("."===c){for(a+=
H[B++];n(H.charCodeAt(B));)a+=H[B++];c=H[B]}if("e"===c||"E"===c){a+=H[B++];c=H[B];if("+"===c||"-"===c)a+=H[B++];if(n(H.charCodeAt(B)))for(;n(H.charCodeAt(B));)a+=H[B++];else D()}q(H.charCodeAt(B))&&D();return{type:O.NumericLiteral,value:parseFloat(a),lineNumber:ea,lineStart:ha,start:b,end:B}}function u(){W=null;r();ba("Regular Expression language structures not supported")}function p(){r();u()}function d(){var a;a=I.tokens[I.tokens.length-1];if(!a)return p();if("Punctuator"===a.type){if("]"===a.value)return w();
if(")"===a.value)return a=I.tokens[I.openParenToken-1],!a||"Keyword"!==a.type||"if"!==a.value.toLowerCase()&&"while"!==a.value.toLowerCase()&&"for"!==a.value.toLowerCase()&&"with"!==a.value.toLowerCase()?w():p();if("}"===a.value){if(I.tokens[I.openCurlyToken-3]&&"Keyword"===I.tokens[I.openCurlyToken-3].type){if(a=I.tokens[I.openCurlyToken-4],!a)return w()}else if(I.tokens[I.openCurlyToken-4]&&"Keyword"===I.tokens[I.openCurlyToken-4].type){if(a=I.tokens[I.openCurlyToken-5],!a)return p()}else return w();
if(0<=va.indexOf(a.value))return w()}return p()}return"Keyword"===a.type&&"this"!==a.value?p():w()}function m(){var a;r();if(B>=na)return{type:O.EOF,lineNumber:ea,lineStart:ha,start:B,end:B};a=H.charCodeAt(B);if(q(a)){var b;a=B;if(92===H.charCodeAt(B))b=x();else a:{var f;for(b=B++;B<na;){f=H.charCodeAt(B);if(92===f){B=b;b=x();break a}if(g(f))++B;else break}b=H.slice(b,B)}return{type:1===b.length?O.Identifier:c(b)?O.Keyword:"null"===b.toLowerCase()?O.NullLiteral:"true"===b.toLowerCase()||"false"===
b.toLowerCase()?O.BooleanLiteral:O.Identifier,value:b,lineNumber:ea,lineStart:ha,start:a,end:B}}if(40===a||41===a||59===a)return w();if(39===a||34===a){var m="",p,u,y;f=!1;var z,A;z=ea;A=ha;a=H[B];h("'"===a||'"'===a,"String literal must starts with a quote");b=B;for(++B;B<na;)if(p=H[B++],p===a){a="";break}else if("\\"===p)if((p=H[B++])&&l(p.charCodeAt(0)))++ea,"\r"===p&&"\n"===H[B]&&++B,ha=B;else switch(p){case "u":case "x":if("{"===H[B]){++B;u=p=void 0;p=H[B];u=0;for("}"===p&&D();B<na;){p=H[B++];
if(!e(p))break;u=16*u+"0123456789abcdef".indexOf(p.toLowerCase())}(1114111<u||"}"!==p)&&D();p=65535>=u?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320);m+=p}else y=B,(u=v(p))?m+=u:(B=y,m+=p);break;case "n":m+="\n";break;case "r":m+="\r";break;case "t":m+="\t";break;case "b":m+="\b";break;case "f":m+="\f";break;case "v":m+="\x0B";break;default:k(p)?(u="01234567".indexOf(p),0!==u&&(f=!0),B<na&&k(H[B])&&(f=!0,u=8*u+"01234567".indexOf(H[B++]),0<="0123".indexOf(p)&&
B<na&&k(H[B])&&(u=8*u+"01234567".indexOf(H[B++]))),m+=String.fromCharCode(u)):m+=p}else if(l(p.charCodeAt(0)))break;else m+=p;""!==a&&D();return{type:O.StringLiteral,value:m,octal:f,startLineNumber:z,startLineStart:A,lineNumber:ea,lineStart:ha,start:b,end:B}}return 46===a?n(H.charCodeAt(B+1))?t():w():n(a)?t():I.tokenize&&47===a?d():w()}function y(){var a,b,c;r();a={start:{line:ea,column:B-ha}};b=m();a.end={line:ea,column:B-ha};b.type!==O.EOF&&(c=H.slice(b.start,b.end),a={type:Fa[b.type],value:c,range:[b.start,
b.end],loc:a},b.regex&&(a.regex={pattern:b.regex.pattern,flags:b.regex.flags}),I.tokens.push(a));return b}function z(){var a;a=W;B=a.end;ea=a.lineNumber;ha=a.lineStart;W="undefined"!==typeof I.tokens?y():m();B=a.end;ea=a.lineNumber;ha=a.lineStart;return a}function A(){var a,b,c;a=B;b=ea;c=ha;W="undefined"!==typeof I.tokens?y():m();B=a;ea=b;ha=c}function C(){this.line=ea;this.column=B-ha}function G(){this.start=new C;this.end=null}function J(a){this.start=a.type===O.StringLiteral?{line:a.startLineNumber,
column:a.start-a.startLineStart}:{line:a.lineNumber,column:a.start-a.lineStart};this.end=null}function E(){B=W.start;W.type===O.StringLiteral?(ea=W.startLineNumber,ha=W.startLineStart):(ea=W.lineNumber,ha=W.lineStart);I.range&&(this.range=[B,0]);I.loc&&(this.loc=new G)}function K(a){I.range&&(this.range=[a.start,0]);I.loc&&(this.loc=new J(a))}function R(){var a,b,c,d;a=B;b=ea;c=ha;r();d=ea!==b;B=a;ea=b;ha=c;return d}function Z(a,b,c){var d=Error("Line "+a+": "+c);d.index=b;d.lineNumber=a;d.column=
b-ha+1;d.description=c;return d}function ba(a){var b,c;b=Array.prototype.slice.call(arguments,1);c=a.replace(/%(\d)/g,function(a,c){h(c<b.length,"Message reference must be in range");return b[c]});throw Z(ea,B,c);}function F(a){var b,c;b=Array.prototype.slice.call(arguments,1);c=a.replace(/%(\d)/g,function(a,c){h(c<b.length,"Message reference must be in range");return b[c]});c=Z(ea,B,c);if(I.errors)I.errors.push(c);else throw c;}function Y(a,b){var c=la.UnexpectedToken;a&&(c=b?b:a.type===O.EOF?la.UnexpectedEOS:
a.type===O.Identifier?la.UnexpectedIdentifier:a.type===O.NumericLiteral?la.UnexpectedNumber:a.type===O.StringLiteral?la.UnexpectedString:la.UnexpectedToken);c=c.replace("%0",a?a.value:"ILLEGAL");return a&&"number"===typeof a.lineNumber?Z(a.lineNumber,a.start,c):Z(ea,B,c)}function D(a,b){throw Y(a,b);}function S(a,b){a=Y(a,b);if(I.errors)I.errors.push(a);else throw a;}function L(a){var b=z();b.type===O.Punctuator&&b.value===a||D(b)}function M(){var a;I.errors?(a=W,a.type===O.Punctuator&&","===a.value?
z():a.type===O.Punctuator&&";"===a.value?(z(),S(a)):S(a,la.UnexpectedToken)):L(",")}function ca(a){var b=z();b.type===O.Keyword&&b.value.toLowerCase()===a.toLowerCase()||D(b)}function N(a){return W.type===O.Punctuator&&W.value===a}function U(a){return W.type===O.Keyword&&W.value.toLowerCase()===a.toLowerCase()}function P(){var a;59===H.charCodeAt(B)||N(";")?z():(a=ea,r(),ea===a&&(W.type===O.EOF||N("}")||D(W)))}function ga(a){return a.type===fa.Identifier||a.type===fa.MemberExpression}function X(a,
b){var c,d=new E;b=ma;c=Ka();ma=b;return d.finishFunctionExpression(null,a,[],c)}function T(){var a,b;a=ma;ma=!0;b=Ea();b=X(b.params);ma=a;return b}function V(){var a,b=new E;a=z();return a.type===O.StringLiteral||a.type===O.NumericLiteral?(ma&&a.octal&&S(a,la.StrictOctalLiteral),b.finishLiteral(a)):b.finishIdentifier(a.value)}function da(){var a,b,c,d=new E;a=W;if(a.type===O.Identifier)return b=V(),"get"!==a.value||N(":")||N("(")?"set"!==a.value||N(":")||N("(")?N(":")?(z(),a=ua(),d.finishProperty("init",
b,a,!1,!1)):N("(")?(a=T(),d.finishProperty("init",b,a,!0,!1)):d.finishProperty("init",b,b,!1,!0):(b=V(),L("("),a=W,a.type!==O.Identifier?(L(")"),S(a),a=X([])):(c=[Ha()],L(")"),a=X(c,a)),d.finishProperty("set",b,a,!1,!1)):(b=V(),L("("),L(")"),a=X([]),d.finishProperty("get",b,a,!1,!1));if(a.type===O.EOF||a.type===O.Punctuator)D(a);else{b=V();if(N(":"))return z(),a=ua(),d.finishProperty("init",b,a,!1,!1);if(N("("))return a=T(),d.finishProperty("init",b,a,!0,!1);D(z())}}function ja(a){var b=[],c,d,e=
{},f=String,g=new E;for(!0!==a&&L("{");!N("}");)a=da(),c=a.key.type===fa.Identifier?a.key.name:f(a.key.value),d="init"===a.kind?Na.Data:"get"===a.kind?Na.Get:Na.Set,c="$"+c,Object.prototype.hasOwnProperty.call(e,c)?(e[c]===Na.Data?ma&&d===Na.Data?F(la.StrictDuplicateProperty):d!==Na.Data&&F(la.AccessorDataProperty):d===Na.Data?F(la.AccessorDataProperty):e[c]&d&&F(la.AccessorGetSet),e[c]|=d):e[c]=d,b.push(a),N("}")||M();L("}");return g.finishObjectExpression(b)}function ka(){var a,b,c,d;if(N("("))return L("("),
N(")")?(z(),b=Qa.ArrowParameterPlaceHolder):(++aa.parenthesisCount,b=za(),L(")")),b;if(N("[")){b=[];var e=new E;for(L("[");!N("]");)N(",")?(z(),b.push(null)):(b.push(ua()),N("]")||L(","));z();return e.finishArrayExpression(b)}if(N("{"))return ja();a=W.type;d=new E;if(a===O.Identifier)c=d.finishIdentifier(z().value);else if(a===O.StringLiteral||a===O.NumericLiteral)ma&&W.octal&&S(W,la.StrictOctalLiteral),c=d.finishLiteral(z());else if(a===O.Keyword){if(U("function")){d=null;var f;c=[];var g=[],k,m=
new E;ca("function");N("(")||(d=Ha());f=Ea(b);c=f.params;g=f.defaults;a=f.stricted;b=f.firstRestricted;f.message&&(e=f.message);k=ma;f=Ka();ma&&b&&D(b,e);ma&&a&&S(a,e);ma=k;return m.finishFunctionExpression(d,c,g,f)}U("this")?(z(),c=d.finishThisExpression()):D(z())}else a===O.BooleanLiteral?(b=z(),b.value="true"===b.value.toLowerCase(),c=d.finishLiteral(b)):a===O.NullLiteral?(b=z(),b.value=null,c=d.finishLiteral(b)):N("/")||N("/\x3d")?(c="undefined"!==typeof I.tokens?d.finishLiteral(p()):d.finishLiteral(u()),
A()):D(z());return c}function xa(){var a=[];L("(");if(!N(")"))for(;B<na;){a.push(ua());if(N(")"))break;M()}L(")");return a}function qa(){L(".");var a,b=new E;a=z();a.type===O.Identifier||a.type===O.Keyword||a.type===O.BooleanLiteral||a.type===O.NullLiteral||D(a);return b.finishIdentifier(a.value)}function wa(){var a;L("[");a=za();L("]");return a}function pa(){var a,b,c=new E;ca("new");var d;h(aa.allowIn,"callee of new expression always allow in keyword.");d=W;for(a=U("new")?pa():ka();;)if(N("["))b=
wa(),a=(new K(d)).finishMemberExpression("[",a,b);else if(N("."))b=qa(),a=(new K(d)).finishMemberExpression(".",a,b);else break;b=N("(")?xa():[];return c.finishNewExpression(a,b)}function Ca(){var a,b,c=W,d,e=aa.allowIn;b=W;aa.allowIn=!0;for(a=U("new")?pa():ka();;)if(N("."))d=qa(),a=(new K(b)).finishMemberExpression(".",a,d);else if(N("("))d=xa(),a=(new K(b)).finishCallExpression(a,d);else if(N("["))d=wa(),a=(new K(b)).finishMemberExpression("[",a,d);else break;aa.allowIn=e;W.type!==O.Punctuator||
!N("++")&&!N("--")||R()||(ga(a)||F(la.InvalidLHSInAssignment),b=z(),a=(new K(c)).finishPostfixExpression(b.value,a));return a}function ta(){var a,b,c;W.type!==O.Punctuator&&W.type!==O.Keyword?b=Ca():N("++")||N("--")?(c=W,a=z(),b=ta(),ga(b)||F(la.InvalidLHSInAssignment),b=(new K(c)).finishUnaryExpression(a.value,b)):N("+")||N("-")||N("~")||N("!")?(c=W,a=z(),b=ta(),b=(new K(c)).finishUnaryExpression(a.value,b)):U("delete")||U("void")||U("typeof")?(c=W,a=z(),b=ta(),b=(new K(c)).finishUnaryExpression(a.value,
b),ma&&"delete"===b.operator&&b.argument.type===fa.Identifier&&F(la.StrictDelete)):b=Ca();return b}function Ia(a,b){var c=0;if(a.type!==O.Punctuator&&a.type!==O.Keyword)return 0;switch(a.value){case "||":c=1;break;case "\x26\x26":c=2;break;case "|":c=3;break;case "^":c=4;break;case "\x26":c=5;break;case "\x3d\x3d":case "!\x3d":case "\x3d\x3d\x3d":case "!\x3d\x3d":c=6;break;case "\x3c":case "\x3e":case "\x3c\x3d":case "\x3e\x3d":case "instanceof":c=7;break;case "in":c=b?7:0;break;case "\x3c\x3c":case "\x3e\x3e":case "\x3e\x3e\x3e":c=
8;break;case "+":case "-":c=9;break;case "*":case "/":case "%":c=11}return c}function ia(){var a,b,c,d,e,f;a=W;b=ta();if(b===Qa.ArrowParameterPlaceHolder)return b;c=W;d=Ia(c,aa.allowIn);if(0===d)return b;c.prec=d;z();a=[a,W];f=ta();for(e=[b,c,f];0<(d=Ia(W,aa.allowIn));){for(;2<e.length&&d<=e[e.length-2].prec;)f=e.pop(),c=e.pop().value,b=e.pop(),a.pop(),b=(new K(a[a.length-1])).finishBinaryExpression(c,b,f),e.push(b);c=z();c.prec=d;e.push(c);a.push(W);b=ta();e.push(b)}d=e.length-1;b=e[d];for(a.pop();1<
d;)b=(new K(a.pop())).finishBinaryExpression(e[d-1].value,e[d-2],b),d-=2;return b}function La(a){var b,c,d,e,f,g,k;e=[];f=[];g=0;k={paramSet:{}};b=0;for(c=a.length;b<c;b+=1)if(d=a[b],d.type===fa.Identifier)e.push(d),f.push(null),Ga(k,d,d.name);else if(d.type===fa.AssignmentExpression)e.push(d.left),f.push(d.right),++g,Ga(k,d.left,d.left.name);else return null;k.message===la.StrictParamDupe&&(a=ma?k.stricted:k.firstRestricted,D(a,k.message));0===g&&(f=[]);return{params:e,defaults:f,rest:null,stricted:k.stricted,
firstRestricted:k.firstRestricted,message:k.message}}function ua(){var a,b,c,d,e;a=aa.parenthesisCount;b=e=W;var f,g;g=W;c=ia();c!==Qa.ArrowParameterPlaceHolder&&N("?")&&(z(),f=aa.allowIn,aa.allowIn=!0,b=ua(),aa.allowIn=f,L(":"),f=ua(),c=(new K(g)).finishConditionalExpression(c,b,f));if(c===Qa.ArrowParameterPlaceHolder||N("\x3d\x3e"))if(aa.parenthesisCount===a||aa.parenthesisCount===a+1)if(c.type===fa.Identifier?d=La([c]):c.type===fa.AssignmentExpression?d=La([c]):c.type===fa.SequenceExpression?d=
La(c.expressions):c===Qa.ArrowParameterPlaceHolder&&(d=La([])),d)return a=d,e=new K(e),L("\x3d\x3e"),d=ma,c=N("{")?Ka():ua(),ma&&a.firstRestricted&&D(a.firstRestricted,a.message),ma&&a.stricted&&S(a.stricted,a.message),ma=d,e.finishArrowFunctionExpression(a.params,a.defaults,c,c.type!==fa.BlockStatement);W.type!==O.Punctuator?a=!1:(a=W.value,a="\x3d"===a||"*\x3d"===a||"/\x3d"===a||"%\x3d"===a||"+\x3d"===a||"-\x3d"===a||"\x3c\x3c\x3d"===a||"\x3e\x3e\x3d"===a||"\x3e\x3e\x3e\x3d"===a||"\x26\x3d"===a||
"^\x3d"===a||"|\x3d"===a);a&&(ga(c)||F(la.InvalidLHSInAssignment),b=z(),a=ua(),c=(new K(e)).finishAssignmentExpression(b.value,c,a));return c}function za(){var a,b=W;a=ua();if(N(",")){for(a=[a];B<na&&N(",");)z(),a.push(ua());a=(new K(b)).finishSequenceExpression(a)}return a}function Ha(){var a,b=new E;a=z();a.type!==O.Identifier&&D(a);return b.finishIdentifier(a.value)}function hb(a){var b=null,c,d=new E;c=Ha();"const"===a?(L("\x3d"),b=ua()):N("\x3d")&&(z(),b=ua());return d.finishVariableDeclarator(c,
b)}function Va(a){var b=[];do{b.push(hb(a));if(!N(","))break;z()}while(B<na);return b}function Ma(a){var b=W.type,c,d;b===O.EOF&&D(W);if(b===O.Punctuator&&"{"===W.value){if(a){L("{");var e=W;a=B;c=ea;d=ha;z();b=N(":");W=e;B=a;ea=c;ha=d;if((W.type===O.Identifier||W.type===O.StringLiteral)&&b)return ja(!0);a=new E;for(c=[];B<na&&!N("}");){d=Ja();if("undefined"===typeof d)break;c.push(d)}L("}");return a.finishBlockStatement(c)}return ja()}a=new E;if(b===O.Punctuator)switch(W.value){case ";":return a=
new E,L(";"),a.finishEmptyStatement();case "(":return c=za(),P(),a.finishExpressionStatement(c)}else if(b===O.Keyword)switch(W.value.toLowerCase()){case "break":return c=null,ca("break"),59===H.charCodeAt(B)?(z(),aa.inIteration||aa.inSwitch||ba(la.IllegalBreak),a=a.finishBreakStatement(null)):R()?(aa.inIteration||aa.inSwitch||ba(la.IllegalBreak),a=a.finishBreakStatement(null)):(W.type===O.Identifier&&(c=Ha(),d="$"+c.name,Object.prototype.hasOwnProperty.call(aa.labelSet,d)||ba(la.UnknownLabel,c.name)),
P(),null!==c||aa.inIteration||aa.inSwitch||ba(la.IllegalBreak),a=a.finishBreakStatement(c)),a;case "continue":return c=null,ca("continue"),59===H.charCodeAt(B)?(z(),aa.inIteration||ba(la.IllegalContinue),a=a.finishContinueStatement(null)):R()?(aa.inIteration||ba(la.IllegalContinue),a=a.finishContinueStatement(null)):(W.type===O.Identifier&&(c=Ha(),d="$"+c.name,Object.prototype.hasOwnProperty.call(aa.labelSet,d)||ba(la.UnknownLabel,c.name)),P(),null!==c||aa.inIteration||ba(la.IllegalContinue),a=a.finishContinueStatement(c)),
a;case "for":var f,g,k;g=aa.allowIn;f=b=e=null;ca("for");L("(");if(N(";"))z();else{if(U("var")){aa.allowIn=!1;var m=new E;f=z();k=Va();f=m.finishVariableDeclaration(k,f.value);aa.allowIn=g;1===f.declarations.length&&U("in")&&(z(),c=f,d=za(),f=null)}else aa.allowIn=!1,f=za(),aa.allowIn=g,U("in")&&(ga(f)||F(la.InvalidLHSInForIn),z(),c=f,d=za(),f=null);"undefined"===typeof c&&L(";")}"undefined"===typeof c&&(N(";")||(b=za()),L(";"),N(")")||(e=za()));L(")");k=aa.inIteration;aa.inIteration=!0;g=Ma(!0);
aa.inIteration=k;return"undefined"===typeof c?a.finishForStatement(f,b,e,g):a.finishForInStatement(c,d,g);case "function":return Ya(a);case "if":return ca("if"),L("("),c=za(),L(")"),d=Ma(!0),U("else")?(z(),b=Ma(!0)):b=null,a.finishIfStatement(c,d,b);case "return":return c=null,ca("return"),aa.inFunctionBody||F(la.IllegalReturn),32===H.charCodeAt(B)&&q(H.charCodeAt(B+1))?(c=za(),P(),a=a.finishReturnStatement(c)):R()?a=a.finishReturnStatement(null):(N(";")||N("}")||W.type===O.EOF||(c=za()),P(),a=a.finishReturnStatement(c)),
a;case "var":return ca("var"),c=Va(),P(),a.finishVariableDeclaration(c,"var")}c=za();if(c.type===fa.Identifier&&N(":"))return z(),b="$"+c.name,Object.prototype.hasOwnProperty.call(aa.labelSet,b)&&ba(la.Redeclaration,"Label",c.name),aa.labelSet[b]=!0,d=Ma(!1),delete aa.labelSet[b],a.finishLabeledStatement(c,d);P();return a.finishExpressionStatement(c)}function Ka(){var a,b=[],c,d,e,f,g,k=new E;for(L("{");B<na&&W.type===O.StringLiteral;){c=W;a=Ja();b.push(a);if(a.expression.type!==fa.Literal)break;
a=H.slice(c.start+1,c.end-1);"use strict"===a?(ma=!0,d&&S(d,la.StrictOctalLiteral)):!d&&c.octal&&(d=c)}c=aa.labelSet;d=aa.inIteration;e=aa.inSwitch;f=aa.inFunctionBody;g=aa.parenthesizedCount;aa.labelSet={};aa.inIteration=!1;aa.inSwitch=!1;aa.inFunctionBody=!0;for(aa.parenthesizedCount=0;B<na&&!N("}");){a=Ja();if("undefined"===typeof a)break;b.push(a)}L("}");aa.labelSet=c;aa.inIteration=d;aa.inSwitch=e;aa.inFunctionBody=f;aa.parenthesizedCount=g;return k.finishBlockStatement(b)}function Ga(a,b,c){c=
"$"+c;ma?Object.prototype.hasOwnProperty.call(a.paramSet,c)&&(a.stricted=b,a.message=la.StrictParamDupe):!a.firstRestricted&&Object.prototype.hasOwnProperty.call(a.paramSet,c)&&(a.firstRestricted=b,a.message=la.StrictParamDupe);a.paramSet[c]=!0}function Ea(a){a={params:[],defaultCount:0,defaults:[],firstRestricted:a};L("(");if(!N(")"))for(a.paramSet={};B<na;){var b=a,c=void 0,d=void 0,e=void 0,c=W,d=Ha();Ga(b,c,c.value);N("\x3d")&&(z(),e=ua(),++b.defaultCount);b.params.push(d);b.defaults.push(e);
if(N(")"))break;L(",")}L(")");0===a.defaultCount&&(a.defaults=[]);return{params:a.params,defaults:a.defaults,stricted:a.stricted,firstRestricted:a.firstRestricted,message:a.message}}function Ya(){var a,b=[],c=[],d,e,f,g,k,m=new E;ca("function");a=Ha();d=Ea(f);b=d.params;c=d.defaults;e=d.stricted;f=d.firstRestricted;d.message&&(g=d.message);k=ma;d=Ka();ma&&f&&D(f,g);ma&&e&&S(e,g);ma=k;return m.finishFunctionDeclaration(a,b,c,d)}function Ja(){if(W.type===O.Keyword)return"function"===W.value.toLowerCase()?
Ya():Ma(!1);if(W.type!==O.EOF)return Ma(!1)}function Ra(){var a,b,c,d=[];for(a=0;a<I.tokens.length;++a)b=I.tokens[a],c={type:b.type,value:b.value},b.regex&&(c.regex={pattern:b.regex.pattern,flags:b.regex.flags}),I.range&&(c.range=b.range),I.loc&&(c.loc=b.loc),d.push(c);I.tokens=d}var O,Fa,va,fa,Qa,Na,la,db,H,ma,B,ea,ha,na,W,aa,I;O={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9};Fa={};Fa[O.BooleanLiteral]="Boolean";Fa[O.EOF]=
"\x3cend\x3e";Fa[O.Identifier]="Identifier";Fa[O.Keyword]="Keyword";Fa[O.NullLiteral]="Null";Fa[O.NumericLiteral]="Numeric";Fa[O.Punctuator]="Punctuator";Fa[O.StringLiteral]="String";Fa[O.RegularExpression]="RegularExpression";va="( { [ in typeof instanceof new return case delete throw void \x3d +\x3d -\x3d *\x3d /\x3d %\x3d \x3c\x3c\x3d \x3e\x3e\x3d \x3e\x3e\x3e\x3d \x26\x3d |\x3d ^\x3d , + - * / % ++ -- \x3c\x3c \x3e\x3e \x3e\x3e\x3e \x26 | ^ ! ~ \x26\x26 || ? : \x3d\x3d\x3d \x3d\x3d \x3e\x3d \x3c\x3d \x3c \x3e !\x3d !\x3d\x3d".split(" ");
fa={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",
FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator"};Qa={ArrowParameterPlaceHolder:{type:"ArrowParameterPlaceHolder"}};
Na={Data:1,Get:2,Set:4};la={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",
MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",
StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",
AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"};db={NonAsciiIdentifierStart:/[\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b2\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua7ad\ua7b0\ua7b1\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab5f\uab64\uab65\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]/,
NonAsciiIdentifierPart:/[\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0-\u08b2\u08e4-\u0963\u0966-\u096f\u0971-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d01-\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191e\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1ab0-\u1abd\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1cf8\u1cf9\u1d00-\u1df5\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua69d\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua7ad\ua7b0\ua7b1\ua7f7-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\ua9e0-\ua9fe\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab5f\uab64\uab65\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe2d\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]/};
K.prototype=E.prototype={processComment:function(){var a,b,c,d=I.bottomRightStack,e,f,g=d[d.length-1];if(!(this.type===fa.Program&&0<this.body.length)){if(0<I.trailingComments.length){c=[];for(e=I.trailingComments.length-1;0<=e;--e)f=I.trailingComments[e],f.range[0]>=this.range[1]&&(c.unshift(f),I.trailingComments.splice(e,1));I.trailingComments=[]}else g&&g.trailingComments&&g.trailingComments[0].range[0]>=this.range[1]&&(c=g.trailingComments,delete g.trailingComments);if(g)for(;g&&g.range[0]>=this.range[0];)a=
g,g=d.pop();if(a)a.leadingComments&&a.leadingComments[a.leadingComments.length-1].range[1]<=this.range[0]&&(this.leadingComments=a.leadingComments,a.leadingComments=void 0);else if(0<I.leadingComments.length)for(b=[],e=I.leadingComments.length-1;0<=e;--e)f=I.leadingComments[e],f.range[1]<=this.range[0]&&(b.unshift(f),I.leadingComments.splice(e,1));b&&0<b.length&&(this.leadingComments=b);c&&0<c.length&&(this.trailingComments=c);d.push(this)}},finish:function(){I.range&&(this.range[1]=B);I.loc&&(this.loc.end=
new C,I.source&&(this.loc.source=I.source));I.attachComment&&this.processComment()},finishArrayExpression:function(a){this.type=fa.ArrayExpression;this.elements=a;this.finish();return this},finishAssignmentExpression:function(a,b,c){this.type=fa.AssignmentExpression;this.operator=a;this.left=b;this.right=c;this.finish();return this},finishBinaryExpression:function(a,b,c){this.type="||"===a||"\x26\x26"===a?fa.LogicalExpression:fa.BinaryExpression;this.operator=a;this.left=b;this.right=c;this.finish();
return this},finishBlockStatement:function(a){this.type=fa.BlockStatement;this.body=a;this.finish();return this},finishBreakStatement:function(a){this.type=fa.BreakStatement;this.label=a;this.finish();return this},finishCallExpression:function(a,b){this.type=fa.CallExpression;this.callee=a;this.arguments=b;this.finish();return this},finishConditionalExpression:function(a,b,c){this.type=fa.ConditionalExpression;this.test=a;this.consequent=b;this.alternate=c;this.finish();return this},finishContinueStatement:function(a){this.type=
fa.ContinueStatement;this.label=a;this.finish();return this},finishEmptyStatement:function(){this.type=fa.EmptyStatement;this.finish();return this},finishExpressionStatement:function(a){this.type=fa.ExpressionStatement;this.expression=a;this.finish();return this},finishForStatement:function(a,b,c,d){this.type=fa.ForStatement;this.init=a;this.test=b;this.update=c;this.body=d;this.finish();return this},finishForInStatement:function(a,b,c){this.type=fa.ForInStatement;this.left=a;this.right=b;this.body=
c;this.each=!1;this.finish();return this},finishFunctionDeclaration:function(a,b,c,d){this.type=fa.FunctionDeclaration;this.id=a;this.params=b;this.defaults=c;this.body=d;this.rest=null;this.expression=this.generator=!1;this.finish();return this},finishFunctionExpression:function(a,b,c,d){this.type=fa.FunctionExpression;this.id=a;this.params=b;this.defaults=c;this.body=d;this.rest=null;this.expression=this.generator=!1;this.finish();return this},finishIdentifier:function(a){this.type=fa.Identifier;
this.name=a;this.finish();return this},finishIfStatement:function(a,b,c){this.type=fa.IfStatement;this.test=a;this.consequent=b;this.alternate=c;this.finish();return this},finishLiteral:function(a){this.type=fa.Literal;this.value=a.value;this.raw=H.slice(a.start,a.end);a.regex&&(this.regex=a.regex);this.finish();return this},finishMemberExpression:function(a,b,c){this.type=fa.MemberExpression;this.computed="["===a;this.object=b;this.property=c;this.finish();return this},finishObjectExpression:function(a){this.type=
fa.ObjectExpression;this.properties=a;this.finish();return this},finishPostfixExpression:function(a,b){this.type=fa.UpdateExpression;this.operator=a;this.argument=b;this.prefix=!1;this.finish();return this},finishProgram:function(a){this.type=fa.Program;this.body=a;this.finish();return this},finishProperty:function(a,b,c,d,e){this.type=fa.Property;this.key=b;this.value=c;this.kind=a;this.method=d;this.shorthand=e;this.finish();return this},finishReturnStatement:function(a){this.type=fa.ReturnStatement;
this.argument=a;this.finish();return this},finishUnaryExpression:function(a,b){this.type="++"===a||"--"===a?fa.UpdateExpression:fa.UnaryExpression;this.operator=a;this.argument=b;this.prefix=!0;this.finish();return this},finishVariableDeclaration:function(a,b){this.type=fa.VariableDeclaration;this.declarations=a;this.kind=b;this.finish();return this},finishVariableDeclarator:function(a,b){this.type=fa.VariableDeclarator;this.id=a;this.init=b;this.finish();return this}};a.version="2.0.0-dev";a.tokenize=
function(a,b){var c,d;c=String;"string"===typeof a||a instanceof String||(a=c(a));H=a;B=0;ea=0<H.length?1:0;ha=0;na=H.length;W=null;aa={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1};I={};b=b||{};b.tokens=!0;I.tokens=[];I.tokenize=!0;I.openParenToken=-1;I.openCurlyToken=-1;I.range="boolean"===typeof b.range&&b.range;I.loc="boolean"===typeof b.loc&&b.loc;"boolean"===typeof b.comment&&b.comment&&(I.comments=[]);"boolean"===typeof b.tolerant&&b.tolerant&&(I.errors=
[]);try{A();if(W.type===O.EOF)return I.tokens;for(z();W.type!==O.EOF;)try{z()}catch(Sa){if(I.errors){I.errors.push(Sa);break}else throw Sa;}Ra();d=I.tokens;"undefined"!==typeof I.comments&&(d.comments=I.comments);"undefined"!==typeof I.errors&&(d.errors=I.errors)}catch(Sa){throw Sa;}finally{I={}}return d};a.parse=function(a,b){var c,d;d=String;"string"===typeof a||a instanceof String||(a=d(a));H=a;B=0;ea=0<H.length?1:0;ha=0;na=H.length;W=null;aa={allowIn:!0,labelSet:{},parenthesisCount:0,inFunctionBody:!1,
inIteration:!1,inSwitch:!1,lastCommentStart:-1};I={};"undefined"!==typeof b&&(I.range="boolean"===typeof b.range&&b.range,I.loc="boolean"===typeof b.loc&&b.loc,I.attachComment="boolean"===typeof b.attachComment&&b.attachComment,I.loc&&null!==b.source&&void 0!==b.source&&(I.source=d(b.source)),"boolean"===typeof b.tokens&&b.tokens&&(I.tokens=[]),"boolean"===typeof b.comment&&b.comment&&(I.comments=[]),"boolean"===typeof b.tolerant&&b.tolerant&&(I.errors=[]),I.attachComment&&(I.range=!0,I.comments=
[],I.bottomRightStack=[],I.trailingComments=[],I.leadingComments=[]));try{var e;r();A();e=new E;ma=!1;var f;a=[];for(var g,k,m;B<na;){g=W;if(g.type!==O.StringLiteral)break;f=Ja();a.push(f);if(f.expression.type!==fa.Literal)break;k=H.slice(g.start+1,g.end-1);"use strict"===k?(ma=!0,m&&S(m,la.StrictOctalLiteral)):!m&&g.octal&&(m=g)}for(;B<na;){f=Ja();if("undefined"===typeof f)break;a.push(f)}c=e.finishProgram(a);"undefined"!==typeof I.comments&&(c.comments=I.comments);"undefined"!==typeof I.tokens&&
(Ra(),c.tokens=I.tokens);"undefined"!==typeof I.errors&&(c.errors=I.errors)}catch(jb){throw jb;}finally{I={}}return c};a.Syntax=function(){var a,b={};"function"===typeof Object.create&&(b=Object.create(null));for(a in fa)fa.hasOwnProperty(a)&&(b[a]=fa[a]);"function"===typeof Object.freeze&&Object.freeze(b);return b}()})},"esri/arcade/arcadeCompiler":function(){define("require exports ../geometry/Polygon ../geometry/Polyline ../geometry/Point ../geometry/Extent ../geometry/Multipoint ../geometry/SpatialReference ./languageUtils ./treeAnalysis ./Dictionary ./Feature ./functions/date ./functions/string ./functions/maths ./functions/geometry ./functions/geomsync ./functions/stats ./ImmutablePathArray ./ImmutablePointArray ../geometry/Geometry".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t,u,p,d,m,y){function z(a,b,c){try{return c(a,null,b)}catch(ja){throw ja;}}function A(a,c){try{switch(c.type){case "EmptyStatement":return"lc.voidOperation";case "VariableDeclarator":return K(a,c);case "VariableDeclaration":for(var d=[],e=0;e<c.declarations.length;e++)d.push(A(a,c.declarations[e]));return d.join("\n")+" \n lastStatement\x3d lc.voidOperation; \n";case "BlockStatement":return E(a,c);case "FunctionDeclaration":var e=c.id.name.toLowerCase(),f={applicationCache:void 0===
a.applicationCache?null:a.applicationCache,spatialReference:a.spatialReference,console:a.console,symbols:a.symbols,localScope:{_SymbolsMap:{}},depthCounter:a.depthCounter+1,globalScope:a.globalScope};if(64<f.depthCounter)throw Error("Exceeded maximum function depth");for(var g="new lc.SizzleFunction( lang.functionDepthchecker(function() { var lastStatement \x3d lc.voidOperation; var lscope \x3d [];\n ",k=0;k<c.params.length;k++){var m=c.params[k].name.toLowerCase(),h=S(m,a);f.localScope._SymbolsMap[m]=
h;g+="lscope['"+h+"']\x3darguments["+k.toString()+"];\n"}g+=E(f,c.body)+"\n return lastStatement; }, runtimeCtx))";g+="\n lastStatement \x3d lc.voidOperation; \n";void 0!==a.globalScope[e]?d="gscope['"+e+"']\x3d"+g:void 0!==a.globalScope._SymbolsMap[e]?d="gscope['"+a.globalScope._SymbolsMap[e]+"']\x3d"+g:(h=S(e,a),a.globalScope._SymbolsMap[e]=h,d="gscope['"+h+"']\x3d"+g);return d;case "ReturnStatement":var l;l=null===c.argument?"return lc.voidOperation;":"return "+A(a,c.argument)+";";return l;case "IfStatement":if("AssignmentExpression"===
c.test.type||"UpdateExpression"===c.test.type)throw Error(b.nodeErrorMessage(c.test,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));var p=A(a,c.test),n=L(a),q="var "+n+" \x3d "+p+";\n if ("+n+" \x3d\x3d\x3d true) {\n"+J(a,c.consequent)+"\n }\n",q=null!==c.alternate?q+("else if ("+n+"\x3d\x3d\x3dfalse) { \n"+J(a,c.alternate)+"}\n"):q+("else if ("+n+"\x3d\x3d\x3dfalse) { \n lastStatement \x3d lc.voidOperation;\n }\n");return q+="else { lang.error({type: '"+c.type+"'},'RUNTIME','CANNOT_USE_NONBOOLEAN_IN_CONDITION'); \n}\n";
case "ExpressionStatement":var r;r="AssignmentExpression"===c.expression.type?"lastStatement \x3d lc.voidOperation; "+A(a,c.expression)+" \n ":"lastStatement \x3d "+A(a,c.expression)+";";return r;case "AssignmentExpression":return G(a,c);case "UpdateExpression":return C(a,c);case "BreakStatement":return"break;";case "ContinueStatement":return"continue;";case "ForStatement":d="lastStatement \x3d lc.voidOperation; \n";null!==c.init&&(d+=A(a,c.init));var x=L(a),u=L(a),d=d+("var "+x+" \x3d true;")+"\n do { ";
null!==c.update&&(d+=" if ("+x+"\x3d\x3d\x3dfalse) {\n "+A(a,c.update)+" \n}\n "+x+"\x3dfalse; \n");null!==c.test&&(d+="var "+u+" \x3d "+A(a,c.test)+";",d+="if ("+u+"\x3d\x3d\x3dfalse) { break; } else if ("+u+"!\x3d\x3dtrue) { lang.error({type: '"+c.type+"'},'RUNTIME','CANNOT_USE_NONBOOLEAN_IN_CONDITION'); }\n");d+=A(a,c.body);null!==c.update&&(d+="\n "+A(a,c.update));return d+("\n"+x+" \x3d true; \n} while(true); lastStatement \x3d lc.voidOperation;");case "ForInStatement":var t=L(a),w=L(a),
v=L(a),y="var "+t+" \x3d "+A(a,c.right)+";\n";"VariableDeclaration"===c.left.type&&(y+=A(a,c.left));var z="VariableDeclaration"===c.left.type?c.left.declarations[0].id.name:c.left.name,z=z.toLowerCase(),d="";null!==a.localScope&&(void 0!==a.localScope[z]?d="lscope['"+z+"']":void 0!==a.localScope._SymbolsMap[z]&&(d="lscope['"+a.localScope._SymbolsMap[z]+"']"));""===d&&(void 0!==a.globalScope[z]?d="gscope['"+z+"']":void 0!==a.globalScope._SymbolsMap[z]&&(d="gscope['"+a.globalScope._SymbolsMap[z]+"']"));
y=y+("if ("+t+"\x3d\x3d\x3dnull) { lastStatement \x3d lc.voidOperation; }\n ")+("else if (lc.isArray("+t+") || lc.isString("+t+")) {")+("var "+w+"\x3d"+t+".length; \n")+("for(var "+v+"\x3d0; "+v+"\x3c"+w+"; "+v+"++) {\n");y+=d+"\x3d"+v+";\n";y+=A(a,c.body);y+="\n}\n";y+=" lastStatement \x3d lc.voidOperation; \n";y+=" \n}\n";y+="else if (lc.isImmutableArray("+t+")) {";y=y+("var "+w+"\x3d"+t+".length(); \n")+("for(var "+v+"\x3d0; "+v+"\x3c"+w+"; "+v+"++) {\n");y+=d+"\x3d"+v+";\n";y+=A(a,c.body);y+=
"\n}\n";y+=" lastStatement \x3d lc.voidOperation; \n";y+=" \n}\n";y+="else if (( "+t+" instanceof lang.Dictionary) || ( "+t+" instanceof lang.Feature)) {";y=y+("var "+w+"\x3d"+t+".keys(); \n")+("for(var "+v+"\x3d0; "+v+"\x3c"+w+".length; "+v+"++) {\n");y+=d+"\x3d"+w+"["+v+"];\n";y+=A(a,c.body);y+="\n}\n";y+=" lastStatement \x3d lc.voidOperation; \n";y+=" \n}\n";return y+"else { lastStatement \x3d lc.voidOperation; } \n";case "Identifier":return Z(a,c);case "MemberExpression":var T;try{d=void 0,d=
!0===c.computed?A(a,c.property):"'"+c.property.name+"'",T="lang.member("+A(a,c.object)+","+d+")"}catch(va){throw va;}return T;case "Literal":return null===c.value||void 0===c.value?"null":JSON.stringify(c.value);case "ThisExpression":throw Error(b.nodeErrorMessage(c,"RUNTIME","NOTSUPPORTED"));case "CallExpression":try{if("Identifier"!==c.callee.type)throw Error(b.nodeErrorMessage(c,"RUNTIME","ONLYNODESSUPPORTED"));var V=c.callee.name.toLowerCase(),d="";null!==a.localScope&&(void 0!==a.localScope[V]?
d="lscope['"+V+"']":void 0!==a.localScope._SymbolsMap[V]&&(d="lscope['"+a.localScope._SymbolsMap[V]+"']"));""===d&&(void 0!==a.globalScope[V]?d="gscope['"+V+"']":void 0!==a.globalScope._SymbolsMap[V]&&(d="gscope['"+a.globalScope._SymbolsMap[V]+"']"));if(""!==d)for(e="[",f=0;f<c.arguments.length;f++)0<f&&(e+=", "),e+=A(a,c.arguments[f]);else throw Error(b.nodeErrorMessage(c,"RUNTIME","NOTFOUND"));}catch(va){throw va;}return"lang.callfunc("+d+","+(e+"]")+",runtimeCtx)";case "UnaryExpression":var R;
try{R="lang.unary("+A(a,c.argument)+",'"+c.operator+"')"}catch(va){throw va;}return R;case "BinaryExpression":var ba;try{ba="lang.binary("+A(a,c.left)+","+A(a,c.right)+",'"+c.operator+"')"}catch(va){throw va;}return ba;case "LogicalExpression":var F;try{if("AssignmentExpression"===c.left.type||"UpdateExpression"===c.left.type)throw Error(b.nodeErrorMessage(c.left,"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));if("AssignmentExpression"===c.right.type||"UpdateExpression"===c.right.type)throw Error(b.nodeErrorMessage(c.right,
"RUNTIME","CANNOT_USE_ASSIGNMENT_IN_CONDITION"));if("\x26\x26"===c.operator||"||"===c.operator)F="(lang.logicalCheck("+A(a,c.left)+") "+c.operator+" lang.logicalCheck("+A(a,c.right)+"))";else throw Error(b.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));}catch(va){throw va;}return F;case "ConditionalExpression":throw Error(b.nodeErrorMessage(c,"RUNTIME","NOTSUPPORTED"));case "ArrayExpression":try{d=[];for(e=0;e<c.elements.length;e++)"Literal"===c.elements[e].type?d.push(A(a,c.elements[e])):
d.push("lang.aCheck("+A(a,c.elements[e])+",'ArrayExpression')");g="["+d.join(",")+"]"}catch(va){throw va;}return g;case "ObjectExpression":d="lang.dictionary([";for(e=0;e<c.properties.length;e++){var k=c.properties[e],D="Identifier"===k.key.type?"'"+k.key.name+"'":A(a,k.key),Y=A(a,k.value);0<e&&(d+=",");d+="lang.strCheck("+D+",'ObjectExpression'),lang.aCheck("+Y+", 'ObjectExpression')"}return d+"])";case "Property":throw Error("Should not get here");case "Array":throw Error(b.nodeErrorMessage(c,"RUNTIME",
"NOTSUPPORTED"));default:throw Error(b.nodeErrorMessage(c,"RUNTIME","UNREOGNISED"));}}catch(va){throw va;}}function C(a,b){var c=null,d="";if("MemberExpression"===b.argument.type)return c=A(a,b.argument.object),d=!0===b.argument.computed?A(a,b.argument.property):"'"+b.argument.property.name+"'","lang.memberupdate("+c+","+d+",'"+b.operator+"',"+b.prefix+")";c=b.argument.name.toLowerCase();if(null!==a.localScope){if(void 0!==a.localScope[c])return"lang.update(lscope, '"+c+"','"+b.operator+"',"+b.prefix+
")";if(void 0!==a.localScope._SymbolsMap[c])return"lang.update(lscope, '"+a.localScope._SymbolsMap[c]+"','"+b.operator+"',"+b.prefix+")"}if(void 0!==a.globalScope[c])return"lang.update(gscope, '"+c+"','"+b.operator+"',"+b.prefix+")";if(void 0!==a.globalScope._SymbolsMap[c])return"lang.update(gscope, '"+a.globalScope._SymbolsMap[c]+"','"+b.operator+"',"+b.prefix+")";throw Error("Variable not recognised");}function G(a,b){var c=A(a,b.right),d=null,e="";if("MemberExpression"===b.left.type)return d=A(a,
b.left.object),e=!0===b.left.computed?A(a,b.left.property):"'"+b.left.property.name+"'","lang.assignmember("+d+","+e+",'"+b.operator+"',"+c+");";d=b.left.name.toLowerCase();if(null!==a.localScope){if(void 0!==a.localScope[d])return"lscope['"+d+"']\x3dlang.assign("+c+",'"+b.operator+"', lscope['"+d+"']); ";if(void 0!==a.localScope._SymbolsMap[d])return"lscope['"+a.localScope._SymbolsMap[d]+"']\x3dlang.assign("+c+",'"+b.operator+"', lscope['"+a.localScope._SymbolsMap[d]+"']); "}if(void 0!==a.globalScope[d])return"gscope['"+
d+"']\x3dlang.assign("+c+",'"+b.operator+"', gscope['"+d+"']); ";if(void 0!==a.globalScope._SymbolsMap[d])return"gscope['"+a.globalScope._SymbolsMap[d]+"']\x3dlang.assign("+c+",'"+b.operator+"', gscope['"+a.globalScope._SymbolsMap[d]+"']); ";throw Error("Variable not recognised");}function J(a,b){return"BlockStatement"===b.type?A(a,b):"ReturnStatement"===b.type?A(a,b):"BreakStatement"===b.type?A(a,b):"ContinueStatement"===b.type?A(a,b):"UpdateExpression"===b.type?"lastStatement \x3d "+A(a,b)+";":
"ExpressionStatement"===b.type?A(a,b):"ObjectExpression"===b.type?"lastStatement \x3d "+A(a,b)+";":A(a,b)}function E(a,b){for(var c="",d=0;d<b.body.length;d++)c="ReturnStatement"===b.body[d].type?c+(A(a,b.body[d])+" \n"):"BreakStatement"===b.body[d].type?c+(A(a,b.body[d])+" \n"):"ContinueStatement"===b.body[d].type?c+(A(a,b.body[d])+" \n"):"UpdateExpression"===b.body[d].type?c+("lastStatement \x3d "+A(a,b.body[d])+"; \n"):"ObjectExpression"===b.body[d].type?c+("lastStatement \x3d "+A(a,b.body[d])+
"; \n"):c+(A(a,b.body[d])+" \n");return c}function K(a,b){var d=null===b.init?null:A(a,b.init);d===c.voidOperation&&(d=null);b=b.id.name.toLowerCase();if(null!==a.localScope){if(void 0!==a.localScope[b])return"lscope['"+b+"']\x3d"+d+";";if(void 0!==a.localScope._SymbolsMap[b])return"lscope['"+a.localScope._SymbolsMap[b]+"']\x3d"+d+";";var e=S(b,a);a.localScope._SymbolsMap[b]=e;return"lscope['"+e+"']\x3d"+d+";"}if(void 0!==a.globalScope[b])return"gscope['"+b+"']\x3d"+d+";";if(void 0!==a.globalScope._SymbolsMap[b])return"gscope['"+
a.globalScope._SymbolsMap[b]+"']\x3d"+d+";";e=S(b,a);a.globalScope._SymbolsMap[b]=e;return"gscope['"+e+"']\x3d"+d+";"}function R(a,e,g){e=e.toLowerCase();switch(e){case "hasz":return a=a.hasZ,void 0===a?!1:a;case "hasm":return a=a.hasM,void 0===a?!1:a;case "spatialreference":return e=a.spatialReference._arcadeCacheId,void 0===e&&(g=!0,Object.freeze&&Object.isFrozen(a.spatialReference)&&(g=!1),g&&(N++,e=a.spatialReference._arcadeCacheId=N)),a=new f({wkt:a.spatialReference.wkt,wkid:a.spatialReference.wkid}),
void 0!==e&&(a._arcadeCacheId="SPREF"+e.toString()),a}switch(a.type){case "extent":switch(e){case "xmin":case "xmax":case "ymin":case "ymax":case "zmin":case "zmax":case "mmin":case "mmax":return a=a[e],void 0!==a?a:null;case "type":return"Extent"}break;case "polygon":switch(e){case "rings":return e=c.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===e&&(N++,e=N,c.isVersion4?a.cache._arcadeCacheId=e:a.setCacheValue("_arcadeCacheId",e)),a=new d(a.rings,a.spatialReference,
!0===a.hasZ,!0===a.hasM,e);case "type":return"Polygon"}break;case "point":switch(e){case "x":case "y":case "z":case "m":return void 0!==a[e]?a[e]:null;case "type":return"Point"}break;case "polyline":switch(e){case "paths":return e=c.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===e&&(N++,e=N,c.isVersion4?a.cache._arcadeCacheId=e:a.setCacheValue("_arcadeCacheId",e)),a=new d(a.paths,a.spatialReference,!0===a.hasZ,!0===a.hasM,e);case "type":return"Polyline"}break;case "multipoint":switch(e){case "points":return e=
c.isVersion4?a.cache._arcadeCacheId:a.getCacheValue("_arcadeCacheId"),void 0===e&&(N++,e=N,c.isVersion4?a.cache._arcadeCacheId=e:a.setCacheValue("_arcadeCacheId",e)),a=new m(a.points,a.spatialReference,!0===a.hasZ,!0===a.hasM,e,1);case "type":return"Multipoint"}}throw Error(b.nodeErrorMessage(g,"RUNTIME","PROPERTYNOTFOUND"));}function Z(a,c){try{var d=c.name.toLowerCase();if(null!==a.localScope){if(void 0!==a.localScope[d])return"lscope['"+d+"']";if(void 0!==a.localScope._SymbolsMap[d])return"lscope['"+
a.localScope._SymbolsMap[d]+"']"}if(void 0!==a.globalScope[d])return"gscope['"+d+"']";if(void 0!==a.globalScope._SymbolsMap[d])return"gscope['"+a.globalScope._SymbolsMap[d]+"']";throw Error(b.nodeErrorMessage(c,"RUNTIME","VARIABLENOTFOUND"));}catch(ja){throw ja;}}function ba(a){return null===a?"":c.isArray(a)||c.isImmutableArray(a)?"Array":c.isDate(a)?"Date":c.isString(a)?"String":c.isBoolean(a)?"Boolean":c.isNumber(a)?"Number":a instanceof f?"Dictionary":a instanceof r?"Feature":a instanceof k?"Point":
a instanceof n?"Polygon":a instanceof e?"Polyline":a instanceof q?"Multipoint":a instanceof l?"Extent":c.isFunctionParameter(a)?"Function":a===c.voidOperation?"":"number"===typeof a&&isNaN(a)?"Number":"Unrecognised Type"}function F(a,b,d,e){try{if(c.equalityTest(b[d],e))return b[d+1];var f=b.length-d;return 1===f?b[d]:2===f?null:3===f?b[d+2]:F(a,b,d+2,e)}catch(xa){throw xa;}}function Y(a,b,d,e){try{if(!0===e)return b[d+1];if(3===b.length-d)return b[d+2];var f=b[d+2];if(!1===c.isBoolean(f))throw Error("WHEN needs boolean test conditions");
return Y(a,b,d+2,f)}catch(xa){throw xa;}}function D(a,b){var c=a.length,d=Math.floor(c/2);if(0===c)return[];if(1===c)return[a[0]];var e=D(a.slice(0,d),b);a=D(a.slice(d,c),b);for(c=[];0<e.length||0<a.length;)0<e.length&&0<a.length?(d=b(e[0],a[0]),isNaN(d)&&(d=0),0>=d?(c.push(e[0]),e=e.slice(1)):(c.push(a[0]),a=a.slice(1))):0<e.length?(c.push(e[0]),e=e.slice(1)):0<a.length&&(c.push(a[0]),a=a.slice(1));return c}function S(a,b){b.symbols.symbolCounter++;return"_T"+b.symbols.symbolCounter.toString()}function L(a){a.symbols.symbolCounter++;
return"_Tvar"+a.symbols.symbolCounter.toString()}function M(a,b,c){var d={};a||(a={});c||(c={});d._SymbolsMap={};d.textformatting=1;d.infinity=1;d.pi=1;for(var e in b)d[e]=1;for(e in c)d[e]=1;for(e in a)d[e]=1;return d}function ca(a){console.log(a)}Object.defineProperty(h,"__esModule",{value:!0});var N=0,U={};v.registerFunctions(U,z);x.registerFunctions(U,z);w.registerFunctions(U,z);t.registerFunctions(U,z);p.registerFunctions(U,z);u.registerFunctions(U,z);U["typeof"]=function(a,b){return z(a,b,function(a,
b,d){c.pcCheck(d,1,1);a=ba(d[0]);if("Unrecognised Type"===a)throw Error("Unrecognised Type");return a})};U.iif=function(a,b){try{return z(a,b,function(a,b,d){c.pcCheck(d,3,3);if(!1===c.isBoolean(d[0]))throw Error("IF Function must have a boolean test condition");return d[0]?d[1]:d[2]})}catch(da){throw da;}};U.decode=function(a,b){try{return z(a,b,function(b,c,d){if(2>d.length)throw Error("Missing Parameters");if(2===d.length)return d[1];if(0===(d.length-1)%2)throw Error("Must have a default value result.");
return F(a,d,1,d[0])})}catch(da){throw da;}};U.when=function(a,b){try{return z(a,b,function(b,d,e){if(3>e.length)throw Error("Missing Parameters");if(0===e.length%2)throw Error("Must have a default value result.");b=e[0];if(!1===c.isBoolean(b))throw Error("WHEN needs boolean test conditions");return Y(a,e,0,b)})}catch(da){throw da;}};U.top=function(a,b){return z(a,b,function(a,b,d){c.pcCheck(d,2,2);if(c.isArray(d[0]))return c.toNumber(d[1])>=d[0].length?d[0].slice(0):d[0].slice(0,c.toNumber(d[1]));
if(c.isImmutableArray(d[0]))return c.toNumber(d[1])>=d[0].length()?d[0].slice(0):d[0].slice(0,c.toNumber(d[1]));throw Error("Top cannot accept this parameter type");})};U.first=function(a,b){return z(a,b,function(a,b,d){c.pcCheck(d,1,1);return c.isArray(d[0])?0===d[0].length?null:d[0][0]:c.isImmutableArray(d[0])?0===d[0].length()?null:d[0].get(0):null})};U.sort=function(a,b){return z(a,b,function(a,b,d){c.pcCheck(d,1,2);b=d[0];c.isImmutableArray(b)&&(b=b.toArray());if(!1===c.isArray(b))throw Error("Illegal Argument");
if(1<d.length){if(!1===c.isFunctionParameter(d[1]))throw Error("Illegal Argument");b=D(b,function(b,c){return X.callfunc(d[1],[b,c],a)})}else{if(0===b.length)return[];for(var e={},f=0;f<b.length;f++){var g=ba(b[f]);""!==g&&(e[g]=!0)}if(!0===e.Array||!0===e.Dictionary||!0===e.Feature||!0===e.Point||!0===e.Polygon||!0===e.Polyline||!0===e.Multipoint||!0===e.Extent||!0===e.Function)return b.slice(0);var f=0,g="",k;for(k in e)f++,g=k;b=1<f||"String"===g?D(b,function(a,b){if(null===a||void 0===a||a===
c.voidOperation)return null===b||void 0===b||b===c.voidOperation?0:1;if(null===b||void 0===b||b===c.voidOperation)return-1;a=c.toString(a);b=c.toString(b);return a<b?-1:a===b?0:1}):"Number"===g?D(b,function(a,b){return a-b}):"Boolean"===g?D(b,function(a,b){return a===b?0:b?-1:1}):"Date"===g?D(b,function(a,b){return b-a}):b.slice(0)}return b})};for(var P in U)U[P]=new c.NativeFunction(U[P]);var ga=function(){};ga.prototype=U;h.functionHelper={fixSpatialReference:c.fixSpatialReference,parseArguments:function(a,
b){for(var c=[],d=0;d<b.arguments.length;d++)c.push(A(a,b.arguments[d]));return c},standardFunction:z};h.extend=function(a){for(var d={mode:"sync",compiled:!0,functions:{},signatures:[],standardFunction:z},e=0;e<a.length;e++)a[e].registerFunctions(d);for(var f in d.functions)U[f]=new c.NativeFunction(d.functions[f]),ga.prototype[f]=U[f];for(e=0;e<d.signatures.length;e++)b.addFunctionDeclaration(d.signatures[e],"f")};h.executeScript=function(a,b,c){return a(b,c)};h.extractFieldLiterals=function(a,
c){void 0===c&&(c=!1);return b.findFieldLiterals(a,c)};h.validateScript=function(a,c){return b.validateScript(a,c,"simple")};h.referencesMember=function(a,c){return b.referencesMember(a,c)};h.referencesFunction=function(a,c){return b.referencesFunction(a,c)};var X={error:function(a,c,d){throw Error(b.nodeErrorMessage(a,c,d));},functionDepthchecker:function(a,b){return function(){b.depthCounte++;if(64<b.depthCounter)throw Error("Exceeded maximum function depth");var c=a.apply(this,arguments);b.depthCounte--;
return c}},aCheck:function(a,d){if(c.isFunctionParameter(a))throw Error(b.nodeErrorMessage({type:d},"RUNTIME","FUNCTIONCONTEXTILLEGAL"));return a===c.voidOperation?null:a},Dictionary:f,Feature:r,dictionary:function(a){for(var b={},d=0;d<a.length;d+=2){if(c.isFunctionParameter(a[d+1]))throw Error("Illegal Argument");if(!1===c.isString(a[d]))throw Error("Illegal Argument");b[a[d].toString()]=a[d+1]===c.voidOperation?null:a[d+1]}a=new f(b);a.immutable=!1;return a},strCheck:function(a,b){if(!1===c.isString(a))throw Error("Illegal Argument");
return a},unary:function(a,d){if(c.isBoolean(a)){if("!"===d)return!a;if("-"===d)return-1*c.toNumber(a);if("+"===d)return 1*c.toNumber(a);throw Error(b.nodeErrorMessage({type:"UnaryExpression"},"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));}if("-"===d)return-1*c.toNumber(a);if("+"===d)return 1*c.toNumber(a);throw Error(b.nodeErrorMessage({type:"UnaryExpression"},"RUNTIME","NOTSUPPORTEDUNARYOPERATOR"));},logicalCheck:function(a){if(!1===c.isBoolean(a))throw Error(b.nodeErrorMessage("LogicalExpression","RUNTIME",
"ONLYORORAND"));return a},logical:function(a,d,e){if(c.isBoolean(a)&&c.isBoolean(d))switch(e){case "||":return a||d;case "\x26\x26":return a&&d;default:throw Error(b.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));}else throw Error(b.nodeErrorMessage("LogicalExpression","RUNTIME","ONLYORORAND"));},binary:function(a,d,e){switch(e){case "\x3d\x3d":return c.equalityTest(a,d);case "\x3d":return c.equalityTest(a,d);case "!\x3d":return!c.equalityTest(a,d);case "\x3c":return c.greaterThanLessThan(a,
d,e);case "\x3e":return c.greaterThanLessThan(a,d,e);case "\x3c\x3d":return c.greaterThanLessThan(a,d,e);case "\x3e\x3d":return c.greaterThanLessThan(a,d,e);case "+":return c.isString(a)||c.isString(d)?c.toString(a)+c.toString(d):c.toNumber(a)+c.toNumber(d);case "-":return c.toNumber(a)-c.toNumber(d);case "*":return c.toNumber(a)*c.toNumber(d);case "/":return c.toNumber(a)/c.toNumber(d);case "%":return c.toNumber(a)%c.toNumber(d);default:throw Error(b.nodeErrorMessage({type:"BinaryExpression"},"RUNTIME",
"OPERATORNOTRECOGNISED"));}},assign:function(a,d,e){switch(d){case "\x3d":return a===c.voidOperation?null:a;case "/\x3d":return c.toNumber(e)/c.toNumber(a);case "*\x3d":return c.toNumber(e)*c.toNumber(a);case "-\x3d":return c.toNumber(e)-c.toNumber(a);case "+\x3d":return c.isString(e)||c.isString(a)?c.toString(e)+c.toString(a):c.toNumber(e)+c.toNumber(a);case "%\x3d":return c.toNumber(e)%c.toNumber(a);default:throw Error(b.nodeErrorMessage("AssignmentExpression","RUNTIME","OPERATORNOTRECOGNISED"));
}},update:function(a,b,d,e){var f=c.toNumber(a[b]);a[b]="++"===d?f+1:f-1;return!1===e?f:"++"===d?f+1:f-1},memberupdate:function(a,b,d,e){var g;if(c.isArray(a))if(c.isNumber(b)){0>b&&(b=a.length+b);if(0>b||b>=a.length)throw Error("Assignment outside of array bounds");g=c.toNumber(a[b]);a[b]="++"===d?g+1:g-1}else throw Error("Invalid Parameter");else if(a instanceof f){if(!1===c.isString(b))throw Error("Dictionary accessor must be a string");if(!0===a.hasField(b))g=c.toNumber(a.field(b)),a.setField(b,
"++"===d?g+1:g-1);else throw Error("Invalid Parameter");}else if(a instanceof r){if(!1===c.isString(b))throw Error("Feature accessor must be a string");if(!0===a.hasField(b))g=c.toNumber(a.field(b)),a.setField(b,"++"===d?g+1:g-1);else throw Error("Invalid Parameter");}else{if(c.isImmutableArray(a))throw Error("Array is Immutable");throw Error("Invalid Parameter");}return!1===e?g:"++"===d?g+1:g-1},assignmember:function(a,b,d,e){if(c.isArray(a))if(c.isNumber(b)){0>b&&(b=a.length+b);if(0>b||b>a.length)throw Error("Assignment outside of array bounds");
if(b===a.length&&"\x3d"!==d)throw Error("Invalid Parameter");a[b]=this.assign(e,d,a[b])}else throw Error("Invalid Parameter");else if(a instanceof f){if(!1===c.isString(b))throw Error("Dictionary accessor must be a string");if(!0===a.hasField(b))a.setField(b,this.assign(e,d,a.field(b)));else{if("\x3d"!==d)throw Error("Invalid Parameter");a.setField(b,this.assign(e,d,null))}}else if(a instanceof r){if(!1===c.isString(b))throw Error("Feature accessor must be a string");if(!0===a.hasField(b))a.setField(b,
this.assign(e,d,a.field(b)));else{if("\x3d"!==d)throw Error("Invalid Parameter");a.setField(b,this.assign(e,d,null))}}else{if(c.isImmutableArray(a))throw Error("Array is Immutable");throw Error("Invalid Parameter");}},member:function(a,d){if(null===a)throw Error(b.nodeErrorMessage("MemberExpression","RUNTIME","NOTFOUND"));if(a instanceof f||a instanceof r){if(c.isString(d))return a.field(d)}else if(a instanceof y){if(c.isString(d))return R(a,d,"MemberExpression")}else if(c.isArray(a)){if(c.isNumber(d)&&
isFinite(d)&&Math.floor(d)===d){0>d&&(d=a.length+d);if(d>=a.length||0>d)throw Error(b.nodeErrorMessage("MemberExpression","RUNTIME","OUTOFBOUNDS"));return a[d]}}else if(c.isString(a)){if(c.isNumber(d)&&isFinite(d)&&Math.floor(d)===d){0>d&&(d=a.length+d);if(d>=a.length||0>d)throw Error(b.nodeErrorMessage("MemberExpression","RUNTIME","OUTOFBOUNDS"));return a[d]}}else if(c.isImmutableArray(a)&&c.isNumber(d)&&isFinite(d)&&Math.floor(d)===d){0>d&&(d=a.length()+d);if(d>=a.length()||0>d)throw Error(b.nodeErrorMessage("MemberExpression",
"RUNTIME","OUTOFBOUNDS"));return a.get(d)}throw Error(b.nodeErrorMessage("MemberExpression","RUNTIME","INVALIDTYPE"));},callfunc:function(a,b,d){return a instanceof c.NativeFunction?a.fn(d,b):a instanceof c.SizzleFunction?a.fn.apply(this,b):a.apply(this,b)}};h.compileScript=function(a,b){void 0===b&&(b=null);null===b&&(b={vars:{},customfunctions:{}});b={globalScope:M(b.vars,U,b.customfunctions),localScope:null,console:ca,symbols:{symbolCounter:0}};a=A(b,a.body[0].body);""===a&&(a="lc.voidOperation;");
b={lc:c,lang:X,postProcess:function(a){a instanceof c.ReturnResult&&(a=a.value);a instanceof c.ImplicitResult&&(a=a.value);a===c.voidOperation&&(a=null);if(a===c.breakResult)throw Error("Cannot return BREAK");if(a===c.continueResult)throw Error("Cannot return CONTINUE");if(c.isFunctionParameter(a))throw Error("Cannot return FUNCTION");return a},prepare:function(a,b){b||(b=new g({wkid:102100}));var c=a.vars,d=a.customfunctions,e=new ga;c||(c={});d||(d={});var k=new f({newline:"\n",tab:"\t",singlequote:"'",
doublequote:'"',forwardslash:"/",backwardslash:"\\"});k.immutable=!1;e._SymbolsMap={textformatting:1,infinity:1,pi:1};e.textformatting=k;e.infinity=Number.POSITIVE_INFINITY;e.pi=Math.PI;for(var m in d)e[m]=d[m],e._SymbolsMap[m]=1;for(m in c)e._SymbolsMap[m]=1,e[m]=c[m]&&"esri.Graphic"===c[m].declaredClass?new r(c[m]):c[m];return{spatialReference:b,globalScope:e,localScope:null,console:a.console?a.console:ca,symbols:{symbolCounter:0},depthCounter:1,applicationCache:void 0===a.applicationCache?null:
a.applicationCache}}};return(new Function("context","spatialReference","var runtimeCtx\x3dthis.prepare(context, spatialReference);\n var lc \x3d this.lc; var lang \x3d this.lang; var gscope\x3druntimeCtx.globalScope; \n function mainBody() {\n var lastStatement\x3dlc.voidOperation;\n "+a+"\n return lastStatement; } \n return this.postProcess(mainBody());")).bind(b)}})},"esri/layers/support/fieldUtils":function(){define(["require","exports","dojo/_base/lang"],function(a,h,n){function e(a,e,g){if(a)for(var c=
0;c<a.length;c++){var b=a[c],f=n.getObject(b,!1,e);(f=f&&"function"!==typeof f&&k(f,g))&&n.setObject(b,f.name,e)}}function k(a,e){if(null!=e){a=a.toLowerCase();for(var g=0;g<e.length;g++){var c=e[g];if(c&&c.name.toLowerCase()===a)return c}}return null}Object.defineProperty(h,"__esModule",{value:!0});h.extractFieldNames=function(a){if(!a||"string"!==typeof a)return[];a=a.match(/{[^}]*}/g);if(!a)return[];var e=/\{(\w+):.+\}/;return(a=a.filter(function(a){return!(0===a.indexOf("{relationships/")||0===
a.indexOf("{expression/"))}).map(function(a){return a.replace(e,"{$1}")}))?a.map(function(a){return a.slice(1,-1)}):[]};h.fixRendererFields=function(a,k){if(null!=a&&null!=k){var g=0;for(a=Array.isArray(a)?a:[a];g<a.length;g++){var c=a[g];e(h.rendererFields,c,k);if(c.visualVariables)for(var b=0,c=c.visualVariables;b<c.length;b++)e(h.visualVariableFields,c[b],k)}}};h.getField=k;h.rendererFields="field field2 field3 normalizationField rotationInfo.field proportionalSymbolInfo.field proportionalSymbolInfo.normalizationField colorInfo.field colorInfo.normalizationField".split(" ");
h.visualVariableFields=["field","normalizationField"];h.numericTypes=["integer","small-integer","single","double"];h.isNumericField=function(a,e){return a?-1<h.numericTypes.indexOf(a.type)&&a.name!==e.objectIdField:!1};h.isStringField=function(a,e){return a?"string"===a.type&&a.name!==e.objectIdField:!1};h.isDateField=function(a){return a?"date"===a.type:!1}})},"esri/symbols/support/typeUtils":function(){define("require exports ../../core/accessorSupport/ensureType ../Symbol ../PictureFillSymbol ../PictureMarkerSymbol ../SimpleFillSymbol ../SimpleLineSymbol ../SimpleMarkerSymbol ../TextSymbol ../WebStyleSymbol ../LabelSymbol3D ../LineSymbol3D ../MeshSymbol3D ../PointSymbol3D ../PolygonSymbol3D".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t){Object.defineProperty(h,"__esModule",{value:!0});h.types={base:e,key:"type",typeMap:{"simple-fill":q,"picture-fill":k,"picture-marker":l,"simple-line":g,"simple-marker":c,text:b,"label-3d":r,"line-3d":v,"mesh-3d":x,"point-3d":w,"polygon-3d":t,"web-style":f}};h.types3D={base:e,key:"type",typeMap:{"label-3d":r,"line-3d":v,"mesh-3d":x,"point-3d":w,"polygon-3d":t,"web-style":f}};h.ensureType=n.ensureOneOfType(h.types)})},"esri/symbols/Symbol":function(){define(["../core/lang",
"../core/kebabDictionary","../core/JSONSupport","../Color"],function(a,h,n,e){var k=h({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d"}),l=0;return n.createSubclass({declaredClass:"esri.symbols.Symbol",constructor:function(){this.id="sym"+l++},properties:{type:{type:String,
value:null,json:{read:k.fromJSON,write:{ignoreOrigin:!0,writer:function(a,e){e.type=k.toJSON(this.type)}}}},color:{type:e,value:new e([0,0,0,1]),json:{read:function(e){return e&&a.isDefined(e[0])?[e[0],e[1],e[2],e[3]/255]:e},write:!0}}}})})},"esri/Color":function(){define(["./core/declare","dojo/colors"],function(a,h){function n(a){return Math.max(0,Math.min(Math.round(a),255))}var e=a([h],{declaredClass:"esri.Color",toJSON:function(){return[n(this.r),n(this.g),n(this.b),1<this.a?this.a:n(255*this.a)]},
clone:function(){return new e(this.toRgba())}});e.toJSON=function(a){return a&&[n(a.r),n(a.g),n(a.b),1<a.a?a.a:n(255*a.a)]};e.fromJSON=function(a){return a&&new e([a[0],a[1],a[2],a[3]/255])};e.toUnitRGB=function(a){return[a.r/255,a.g/255,a.b/255]};e.toUnitRGBA=function(a){return[a.r/255,a.g/255,a.b/255,null!=a.a?a.a:1]};var k="named blendColors fromRgb fromHex fromArray fromString".split(" ");for(a=0;a<k.length;a++)e[k[a]]=h[k[a]];e.named.rebeccapurple=[102,51,153];return e})},"dojo/colors":function(){define(["./_base/kernel",
"./_base/lang","./_base/Color","./_base/array"],function(a,h,n,e){var k={};h.setObject("dojo.colors",k);var l=function(a,c,b){0>b&&++b;1<b&&--b;var e=6*b;return 1>e?a+(c-a)*e:1>2*b?c:2>3*b?a+(c-a)*(2/3-b)*6:a};a.colorFromRgb=n.fromRgb=function(a,c){var b=a.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(b){a=b[2].split(/\s*,\s*/);var f=a.length,b=b[1];if("rgb"==b&&3==f||"rgba"==b&&4==f)return b=a[0],"%"==b.charAt(b.length-1)?(b=e.map(a,function(a){return 2.56*parseFloat(a)}),4==f&&(b[3]=
a[3]),n.fromArray(b,c)):n.fromArray(a,c);if("hsl"==b&&3==f||"hsla"==b&&4==f){var b=(parseFloat(a[0])%360+360)%360/360,g=parseFloat(a[1])/100,k=parseFloat(a[2])/100,g=.5>=k?k*(g+1):k+g-k*g,k=2*k-g,b=[256*l(k,g,b+1/3),256*l(k,g,b),256*l(k,g,b-1/3),1];4==f&&(b[3]=a[3]);return n.fromArray(b,c)}}return null};var q=function(a,c,b){a=Number(a);return isNaN(a)?b:a<c?c:a>b?b:a};n.prototype.sanitize=function(){this.r=Math.round(q(this.r,0,255));this.g=Math.round(q(this.g,0,255));this.b=Math.round(q(this.b,
0,255));this.a=q(this.a,0,1);return this};k.makeGrey=n.makeGrey=function(a,c){return n.fromArray([a,a,a,c])};h.mixin(n.named,{aliceblue:[240,248,255],antiquewhite:[250,235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,
20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,
191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,
205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,
0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,
238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],
tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]});return n})},"esri/symbols/PictureFillSymbol":function(){define("../core/declare dojo/_base/lang ../core/lang ../core/screenUtils ./FillSymbol ./support/urlUtils".split(" "),function(a,h,n,e,k,l){var q={xscale:1,yscale:1,xoffset:0,yoffset:0,width:12,height:12},g=a(k,{declaredClass:"esri.symbols.PictureFillSymbol",properties:{type:"picture-fill",
url:l.urlPropertyDefinition,xscale:{value:1,json:{write:!0}},yscale:{value:1,json:{write:!0}},width:{value:12,cast:e.toPt,json:{write:!0}},height:{value:12,cast:e.toPt,json:{write:!0}},xoffset:{value:0,cast:e.toPt,json:{write:!0}},yoffset:{value:0,cast:e.toPt,json:{write:!0}},source:l.sourcePropertyDefinition},getDefaults:function(){return h.mixin(this.inherited(arguments),q)},normalizeCtorArgs:function(a,b,f,g){if(a&&"string"!==typeof a&&null==a.imageData)return a;var c={};a&&(c.url=a);b&&(c.outline=
b);null!=f&&(c.width=e.toPt(f));null!=g&&(c.height=e.toPt(g));return c},clone:function(){var a=new g({color:n.clone(this.color),height:this.height,outline:this.outline&&this.outline.clone(),url:this.url,width:this.width,xoffset:this.xoffset,xscale:this.xscale,yoffset:this.yoffset,yscale:this.yscale});a._set("source",n.clone(this.source));return a}});g.defaultProps=q;return g})},"esri/core/screenUtils":function(){define(["require","exports"],function(a,h){function n(a){return a?72*a/h.DPI:0}Object.defineProperty(h,
"__esModule",{value:!0});var e=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;h.DPI=96;h.pt2px=function(a){return a?a/72*h.DPI:0};h.px2pt=n;h.toPt=function(a){if("string"===typeof a){if(e.test(a)){var k=a.match(e),h=Number(k[1]),k=k[3]&&k[3].toLowerCase();a="-"===a.charAt(0);h="px"===k?n(h):h;return a?-h:h}console.warn("screenUtils.toPt: input not recognized!");return null}return a}})},"esri/symbols/FillSymbol":function(){define(["dojo/_base/lang","./Symbol","./SimpleLineSymbol"],function(a,h,n){return h.createSubclass({declaredClass:"esri.symbols.FillSymbol",
properties:{outline:{type:n,json:{write:!0}},type:null},read:function k(h,n){return this.getInherited(k,arguments).call(this,a.mixin({outline:null},h),n)}})})},"esri/symbols/SimpleLineSymbol":function(){define(["../core/declare","dojo/_base/lang","../core/lang","../core/screenUtils","./LineSymbol"],function(a,h,n,e,k){var l={STYLE_SOLID:"solid",STYLE_DASH:"dash",STYLE_DOT:"dot",STYLE_DASHDOT:"dash-dot",STYLE_DASHDOTDOT:"long-dash-dot-dot",STYLE_NULL:"none",STYLE_SHORTDASH:"short-dash",STYLE_SHORTDOT:"short-dot",
STYLE_SHORTDASHDOT:"short-dash-dot",STYLE_SHORTDASHDOTDOT:"short-dash-dot-dot",STYLE_LONGDASH:"long-dash",STYLE_LONGDASHDOT:"long-dash-dot",CAP_BUTT:"butt",CAP_ROUND:"round",CAP_SQUARE:"square",JOIN_MITER:"miter",JOIN_ROUND:"round",JOIN_BEVEL:"bevel"},q={color:[0,0,0,1],style:l.STYLE_SOLID,width:.75,cap:l.CAP_BUTT,join:l.JOIN_MITER,miterLimit:7.5},g=a(k,{declaredClass:"esri.symbols.SimpleLineSymbol",properties:{type:"simple-line",style:{value:l.STYLE_SOLID,json:{read:function(a,b){return n.valueOf(this._jsonStyles,
a)||void 0},write:function(a,b){b.style=this._jsonStyles[a]}}},cap:{value:l.CAP_BUTT,json:{read:!1,write:!1}},join:{value:l.JOIN_MITER,json:{read:!1,write:!1}},miterLimit:{value:7.5,cast:e.toPt,json:{read:!1,write:!1}}},_jsonStyles:{solid:"esriSLSSolid",dash:"esriSLSDash",dot:"esriSLSDot","dash-dot":"esriSLSDashDot","long-dash-dot-dot":"esriSLSDashDotDot",none:"esriSLSNull","inside-frame":"esriSLSInsideFrame","short-dash":"esriSLSShortDash","short-dot":"esriSLSShortDot","short-dash-dot":"esriSLSShortDashDot",
"short-dash-dot-dot":"esriSLSShortDashDotDot","long-dash":"esriSLSLongDash","long-dash-dot":"esriSLSLongDashDot"},getDefaults:function(){return h.mixin(this.inherited(arguments),q)},normalizeCtorArgs:function(a,b,f,g,k,h){if(a&&"string"!==typeof a)return a;var c={};null!=a&&(c.style=a);null!=b&&(c.color=b);null!=f&&(c.width=e.toPt(f));null!=g&&(c.cap=g);null!=k&&(c.join=k);null!=h&&(c.miterLimit=e.toPt(h));return c},clone:function(){return new g({color:n.clone(this.color),style:this.style,width:this.width,
cap:this.cap,join:this.join,miterLimit:this.miterLimit})}});h.mixin(g,l);g.defaultProps=q;return g})},"esri/symbols/LineSymbol":function(){define(["../core/declare","../core/screenUtils","./Symbol"],function(a,h,n){return a(n,{declaredClass:"esri.symbols.LineSymbol",properties:{color:{},type:"simple-line",width:{value:.75,cast:h.toPt,json:{write:!0}}}})})},"esri/symbols/support/urlUtils":function(){define(["require","exports","../../core/urlUtils"],function(a,h,n){function e(a,c,b){return c.imageData?
n.makeData({mediaType:c.contentType||"image/png",isBase64:!0,data:c.imageData}):k(c.url,b)}function k(a,c){return!c||"service"!==c.origin&&"portal-item"!==c.origin||!c.layer||"feature"!==c.layer.type&&"stream"!==c.layer.type||n.isAbsolute(a)||!c.layer.parsedUrl?n.read(a,c):n.join(c.layer.parsedUrl.path,"images",a)}function l(a,c,b,e){n.isDataProtocol(a)?(a=n.dataComponents(a),c.contentType=a.mediaType,c.imageData=a.data,b&&b.imageData===c.imageData&&b.url&&(c.url=q(b.url,e))):c.url=q(a,e)}function q(a,
c){return n.write(a,c)}Object.defineProperty(h,"__esModule",{value:!0});h.readImageDataOrUrl=e;h.read=k;h.writeImageDataAndUrl=l;h.write=q;h.urlPropertyDefinition={json:{read:{source:["imageData","url"],reader:e},write:{writer:function(a,c,b,e){l(a,c,this.source,e)}}}};h.sourcePropertyDefinition={readOnly:!0,json:{read:{source:["imageData","url"],reader:function(a,c,b){a={};c.imageData&&(a.imageData=c.imageData);c.contentType&&(a.contentType=c.contentType);c.url&&(a.url=k(c.url,b));return a}}}}})},
"esri/symbols/PictureMarkerSymbol":function(){define("../core/declare dojo/_base/lang ../core/lang ../core/screenUtils ./MarkerSymbol ./support/urlUtils".split(" "),function(a,h,n,e,k,l){var q={width:12,height:12,angle:0,xoffset:0,yoffset:0},g=a(k,{declaredClass:"esri.symbols.PictureMarkerSymbol",properties:{color:{json:{write:!1}},type:"picture-marker",url:l.urlPropertyDefinition,source:l.sourcePropertyDefinition,height:{json:{read:{source:["height","size"],reader:function(a,b){return b.size||a}},
write:!0},cast:e.toPt},width:{json:{read:{source:["width","size"],reader:function(a,b){return b.size||a}},write:!0},cast:e.toPt},size:{json:{write:!1}}},getDefaults:function(){return h.mixin(this.inherited(arguments),q)},normalizeCtorArgs:function(a,b,f){if(a&&"string"!==typeof a&&null==a.imageData)return a;var c={};a&&(c.url=a);null!=b&&(c.width=e.toPt(b));null!=f&&(c.height=e.toPt(f));return c},clone:function(){var a=new g({angle:this.angle,height:this.height,url:this.url,width:this.width,xoffset:this.xoffset,
yoffset:this.yoffset});a._set("source",n.clone(this.source));return a}});g.defaultProps=q;return g})},"esri/symbols/MarkerSymbol":function(){define(["../core/declare","../core/screenUtils","./Symbol"],function(a,h,n){return a(n,{declaredClass:"esri.symbols.MarkerSymbol",properties:{angle:{value:0,json:{read:function(a){return a&&-1*a},write:function(a,k){k.angle=a&&-1*a}}},type:{},xoffset:{value:0,cast:h.toPt,json:{write:!0}},yoffset:{value:0,cast:h.toPt,json:{write:!0}},size:{value:9,cast:function(a){return"auto"===
a?a:h.toPt(a)},json:{write:!0}}}})})},"esri/symbols/SimpleFillSymbol":function(){define(["../core/declare","dojo/_base/lang","../core/lang","./FillSymbol","./SimpleLineSymbol"],function(a,h,n,e,k){var l={style:"solid",outline:new k,color:[0,0,0,.25]},q=a(e,{declaredClass:"esri.symbols.SimpleFillSymbol",properties:{color:{},type:"simple-fill",style:{value:"solid",type:String,json:{read:function(a){return n.valueOf(this._styles,a)||void 0},write:function(a,c){c.style=this._styles[a]}}}},_styles:{solid:"esriSFSSolid",
none:"esriSFSNull",horizontal:"esriSFSHorizontal",vertical:"esriSFSVertical","forward-diagonal":"esriSFSForwardDiagonal","backward-diagonal":"esriSFSBackwardDiagonal",cross:"esriSFSCross","diagonal-cross":"esriSFSDiagonalCross"},getDefaults:function(){return h.mixin(this.inherited(arguments),l)},normalizeCtorArgs:function(a,c,b){if(a&&"string"!==typeof a)return a;var e={};a&&(e.style=a);c&&(e.outline=c);b&&(e.color=b);return e},clone:function(){return new q({color:n.clone(this.color),outline:this.outline&&
this.outline.clone(),style:this.style})}});h.mixin(q,{STYLE_SOLID:"solid",STYLE_NULL:"none",STYLE_HORIZONTAL:"horizontal",STYLE_VERTICAL:"vertical",STYLE_FORWARD_DIAGONAL:"forward-diagonal",STYLE_BACKWARD_DIAGONAL:"backward-diagonal",STYLE_CROSS:"cross",STYLE_DIAGONAL_CROSS:"diagonal-cross"});q.defaultProps=l;return q})},"esri/symbols/SimpleMarkerSymbol":function(){define("../core/declare dojo/_base/lang ../core/lang ../core/screenUtils ./MarkerSymbol ./SimpleLineSymbol".split(" "),function(a,h,n,
e,k,l){var q={style:"circle",color:[255,255,255,.25],outline:new l,size:12,angle:0,xoffset:0,yoffset:0},g=a(k,{declaredClass:"esri.symbols.SimpleMarkerSymbol",properties:{color:{json:{write:function(a,b){a&&"x"!==this.style&&"cross"!==this.style&&(b.color=a.toJSON())}}},type:"simple-marker",size:{value:12},style:{type:String,value:"circle",json:{read:function(a){return n.valueOf(this._styles,a)},write:function(a,b){b.style=this._styles[a]}}},path:{type:String,value:null,set:function(a){this.style=
"path";this._set("path",a)},json:{write:!0}},outline:{type:l,json:{write:!0}}},_styles:{circle:"esriSMSCircle",square:"esriSMSSquare",cross:"esriSMSCross",x:"esriSMSX",diamond:"esriSMSDiamond",path:"esriSMSPath"},getDefaults:function(){return h.mixin(this.inherited(arguments),q)},normalizeCtorArgs:function(a,b,f,g){if(a&&"string"!==typeof a)return a;var c={};a&&(c.style=a);null!=b&&(c.size=e.toPt(b));f&&(c.outline=f);g&&(c.color=g);return c},clone:function(){return new g({angle:this.angle,color:n.clone(this.color),
outline:this.outline&&this.outline.clone(),size:this.size,style:this.style,xoffset:this.xoffset,yoffset:this.yoffset})},read:function b(a,e){return this.getInherited(b,arguments).call(this,h.mixin({outline:null},a),e)}});h.mixin(g,{STYLE_CIRCLE:"circle",STYLE_SQUARE:"square",STYLE_CROSS:"cross",STYLE_X:"x",STYLE_DIAMOND:"diamond",STYLE_PATH:"path",STYLE_TARGET:"target"});g.defaultProps=q;return g})},"esri/symbols/TextSymbol":function(){define("../core/declare dojo/_base/lang ../core/lang ../core/screenUtils ../Color ./Symbol ./Font".split(" "),
function(a,h,n,e,k,l,q){var g={text:"",rotated:!1,kerning:!0,color:[0,0,0,1],font:{},angle:0,xoffset:0,yoffset:0,horizontalAlignment:"center"},c=a(l,{declaredClass:"esri.symbols.TextSymbol",properties:{backgroundColor:{type:k,json:{write:!0}},borderLineColor:{type:k,json:{write:!0}},borderLineSize:{type:Number,json:{write:!0}},color:{},font:{type:q,json:{write:!0}},horizontalAlignment:{value:"center",json:{write:!0}},kerning:{value:!0,json:{write:!0}},haloColor:{type:k,json:{write:!0}},haloSize:{type:Number,
cast:e.toPt,json:{write:!0}},rightToLeft:{json:{write:!0}},rotated:{value:!1,json:{write:!0}},text:{type:String,json:{write:!0}},type:"text",verticalAlignment:{type:String,json:{write:!0}},xoffset:{value:0,type:Number,cast:e.toPt,json:{write:!0}},yoffset:{value:0,type:Number,cast:e.toPt,json:{write:!0}},angle:{type:Number,value:0,json:{read:function(a){return a&&-1*a},write:function(a,c){c.angle=a&&-1*a}}},width:{json:{write:!0}}},getDefaults:function(){return h.mixin(this.inherited(arguments),g)},
normalizeCtorArgs:function(a,c,e){if(a&&"string"!==typeof a)return a;var b={};a&&(b.text=a);c&&(b.font=c);e&&(b.color=e);return b},clone:function(){return new c({angle:this.angle,backgroundColor:n.clone(this.backgroundColor),borderLineColor:n.clone(this.borderLineColor),borderLineSize:this.borderLineSize,color:n.clone(this.color),font:this.font&&this.font.clone(),haloColor:n.clone(this.haloColor),haloSize:this.haloSize,horizontalAlignment:this.horizontalAlignment,kerning:this.kerning,rightToLeft:this.rightToLeft,
rotated:this.rotated,text:this.text,verticalAlignment:this.verticalAlignment,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset})}});h.mixin(c,{ALIGN_START:"start",ALIGN_MIDDLE:"middle",ALIGN_END:"end",DECORATION_NONE:"none",DECORATION_UNDERLINE:"underline",DECORATION_OVERLINE:"overline",DECORATION_LINETHROUGH:"line-through"});c.defaultProps=g;return c})},"esri/symbols/Font":function(){define(["dojo/_base/lang","../core/JSONSupport","../core/lang","../core/screenUtils"],function(a,h,n,e){var k=
{style:"normal",weight:"normal",size:9,family:"serif",decoration:"none"},l=h.createSubclass({declaredClass:"esri.symbols.Font",properties:{decoration:{},family:{},size:{cast:e.toPt},style:{},weight:{}},getDefaults:function(){return k},normalizeCtorArgs:function(a,g,c,b){if(a&&"string"!==typeof a)return a;var f={};null!=a&&(f.size=e.toPt(a));null!=g&&(f.style=g);null!=c&&(f.weight=c);b&&(f.family=b);return f},toJSON:function(){return n.fixJson({size:this.size,style:this.style,decoration:this.decoration,
weight:this.weight,family:this.family})},clone:function(){return new l({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}});l.defaultProps=k;a.mixin(l,{STYLE_NORMAL:"normal",STYLE_ITALIC:"italic",STYLE_OBLIQUE:"oblique",WEIGHT_NORMAL:"normal",WEIGHT_BOLD:"bold",WEIGHT_BOLDER:"bolder",WEIGHT_LIGHTER:"lighter"});return l})},"esri/symbols/WebStyleSymbol":function(){define("require exports ../core/tsSupport/extendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/urlUtils ../core/Logger ../core/requireUtils ./Symbol ../portal/Portal ./support/Thumbnail".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f){var r=q.getLogger("esri.symbols.WebStyleSymbol");return function(c){function h(a){a=c.call(this,a)||this;a.styleName=null;a.portal=null;a.styleUrl=null;a.thumbnail=null;a.name=null;a.type="web-style";return a}n(h,c);q=h;h.prototype._readStyleUrl=function(a,b,c){return l.read(a,c)};h.prototype._writeStyleUrl=function(a,b,c,d){b.styleUrl=l.write(a,d);l.isAbsolute(b.styleUrl)&&(b.styleUrl=l.normalize(b.styleUrl))};h.prototype._writeType=function(a,b,c,d){b.type="styleSymbolReference"};
h.prototype.read=function(a,b){this.portal=b?b.portal:void 0;this.inherited(arguments,[a,b]);return this};h.prototype.clone=function(){return new q({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})};h.prototype.fetchSymbol=function(){var b=this;return g.when(a,"./support/styleUtils").then(function(a){a=a.resolveWebStyleSymbol(b,{portal:b.portal});a.otherwise(function(a){r.error("#fetchSymbol()","Failed to create symbol from style",a)});return a})};e([k.property({json:{write:!1}})],
h.prototype,"color",void 0);e([k.property({type:String,json:{write:!0}})],h.prototype,"styleName",void 0);e([k.property({type:b,json:{write:!1}})],h.prototype,"portal",void 0);e([k.property({type:String,json:{write:!0}})],h.prototype,"styleUrl",void 0);e([k.reader("styleUrl")],h.prototype,"_readStyleUrl",null);e([k.writer("styleUrl")],h.prototype,"_writeStyleUrl",null);e([k.property({type:f.default,json:{read:!1}})],h.prototype,"thumbnail",void 0);e([k.property({type:String,json:{write:!0}})],h.prototype,
"name",void 0);e([k.property({type:String,readOnly:!0,json:{read:!1}})],h.prototype,"type",void 0);e([k.writer("type")],h.prototype,"_writeType",null);return h=q=e([k.subclass("esri.symbols.WebStyleSymbol")],h);var q}(k.declared(c))})},"esri/symbols/support/Thumbnail":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor".split(" "),function(a,h,n,e,k,l){Object.defineProperty(h,"__esModule",
{value:!0});a=function(a){function g(){return null!==a&&a.apply(this,arguments)||this}n(g,a);c=g;g.prototype.clone=function(){return new c({url:this.url})};e([k.property({type:String})],g.prototype,"url",void 0);return g=c=e([k.subclass("esri.symbols.support.Thumbnail")],g);var c}(k.declared(l));h.Thumbnail=a;h.default=a})},"esri/symbols/LabelSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/Collection ./Symbol3D ./TextSymbol3DLayer ./support/Symbol3DVerticalOffset ./callouts/calloutUtils ../core/accessorSupport/decorators".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f){var r=l.ofType({base:null,key:"type",typeMap:{text:g}});return function(a){function g(b){b=a.call(this)||this;b.verticalOffset=null;b.callout=null;b.symbolLayers=new r;b.type="label-3d";return b}n(g,a);h=g;g.prototype.supportsCallout=function(){return!0};g.prototype.hasVisibleCallout=function(){return b.hasVisibleCallout(this)};g.prototype.hasVisibleVerticalOffset=function(){return b.hasVisibleVerticalOffset(this)};g.prototype.clone=function(){return new h({styleOrigin:k.clone(this.styleOrigin),
symbolLayers:k.clone(this.symbolLayers),thumbnail:k.clone(this.thumbnail),callout:k.clone(this.callout),verticalOffset:k.clone(this.verticalOffset)})};e([f.property({type:c.default,json:{write:!0}})],g.prototype,"verticalOffset",void 0);e([f.property(b.calloutProperty)],g.prototype,"callout",void 0);e([f.property({type:r})],g.prototype,"symbolLayers",void 0);e([f.property()],g.prototype,"type",void 0);return g=h=e([f.subclass("esri.symbols.LabelSymbol3D")],g);var h}(f.declared(q))})},"esri/symbols/Symbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Collection ../core/Logger ../core/collectionUtils ../core/Warning ../core/urlUtils ../core/accessorSupport/metadata ./Symbol ./Symbol3DLayer ./IconSymbol3DLayer ./ObjectSymbol3DLayer ./LineSymbol3DLayer ./PathSymbol3DLayer ./FillSymbol3DLayer ./ExtrudeSymbol3DLayer ./TextSymbol3DLayer ./support/Thumbnail ./support/StyleOrigin ../portal/Portal ../core/accessorSupport/decorators".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t,u,p,d,m,y,z,A){var C={icon:v,object:x,line:w,path:t,fill:u,extrude:p,text:d},G=k.ofType({base:r,key:"type",typeMap:C}),J=l.getLogger("esri.symbols.Symbol3D");return function(a){function d(c){c=a.call(this)||this;c.styleOrigin=null;c.thumbnail=null;c.type=null;var d=b.getMetadata(c).properties.symbolLayers.type;c._set("symbolLayers",new d);return c}n(d,a);Object.defineProperty(d.prototype,"color",{get:function(){return null},set:function(a){J.error("Symbol3D does not support colors on the symbol level. Colors may be set on individual symbol layer materials instead.")},
enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"symbolLayers",{set:function(a){q.referenceSetter(a,this._get("symbolLayers"))},enumerable:!0,configurable:!0});d.prototype.readSymbolLayers=function(a,b,c){b=[];for(var d=0;d<a.length;d++){var e=a[d],f=r.typeJSONDictionary.read(e.type),k=C[f];k?(e=new k,e.read(a[d],c),b.push(e)):(J.warn("Unknown symbol layer type: "+f),c&&c.messages&&c.messages.push(new g("symbol-layer:unsupported","Symbol layers of type '"+(f||"unknown")+"' are not supported",
{definition:e,context:c})))}return b};d.prototype.readStyleOrigin=function(a,b,d){if(a.styleUrl&&a.name)return b=c.read(a.styleUrl,d),new y({styleUrl:b,name:a.name});if(a.styleName&&a.name)return new y({portal:d&&d.portal||z.getDefault(),styleName:a.styleName,name:a.name});d&&d.messages&&d.messages.push(new g("symbol3d:incomplete-style-origin","Style origin requires either a 'styleUrl' or 'styleName' and a 'name' property",{context:d,definition:a}))};d.prototype.writeStyleOrigin=function(a,b,d,e){a.styleUrl&&
a.name?(d=c.write(a.styleUrl,e),c.isAbsolute(d)&&(d=c.normalize(d)),b.styleOrigin={styleUrl:d,name:a.name}):a.styleName&&a.name&&(a.portal&&e&&e.portal&&!c.hasSamePortal(a.portal.restUrl,e.portal.restUrl)?e&&e.messages&&e.messages.push(new g("symbol:cross-portal","The symbol style origin cannot be persisted because it refers to an item on a different portal than the one being saved to.",{symbol:this})):b.styleOrigin={styleName:a.styleName,name:a.name})};d.prototype.normalizeCtorArgs=function(a){return a instanceof
r||a&&C[a.type]?{symbolLayers:[a]}:Array.isArray(a)?{symbolLayers:a}:a};e([A.property({json:{read:!1,write:!1}})],d.prototype,"color",null);e([A.property({type:G,nonNullable:!0,json:{write:!0}}),A.cast(q.castForReferenceSetter)],d.prototype,"symbolLayers",null);e([A.reader("symbolLayers")],d.prototype,"readSymbolLayers",null);e([A.property({type:y})],d.prototype,"styleOrigin",void 0);e([A.reader("styleOrigin")],d.prototype,"readStyleOrigin",null);e([A.writer("styleOrigin",{"styleOrigin.styleUrl":{type:String},
"styleOrigin.styleName":{type:String},"styleOrigin.name":{type:String}})],d.prototype,"writeStyleOrigin",null);e([A.property({type:m.default,json:{read:!1}})],d.prototype,"thumbnail",void 0);e([A.property({type:String,readOnly:!0,json:{read:!1}})],d.prototype,"type",void 0);return d=e([A.subclass("esri.symbols.Symbol3D")],d)}(A.declared(f))})},"esri/symbols/Symbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/JSONSupport ../core/kebabDictionary ./support/Symbol3DMaterial ./support/ElevationInfo ../core/accessorSupport/decorators".split(" "),
function(a,h,n,e,k,l,q,g,c){var b=l({Icon:"icon",Object:"object",Line:"line",Path:"path",Fill:"fill",Extrude:"extrude",Text:"text"});a=function(a){function f(b){b=a.call(this)||this;b.enabled=!0;b.material=null;b.type=null;return b}n(f,a);f.prototype.writeEnabled=function(a,b,c){a||(b[c]=a)};e([c.property({type:Boolean,json:{read:{source:"enable"},write:{target:"enable"}}})],f.prototype,"enabled",void 0);e([c.writer("enabled")],f.prototype,"writeEnabled",null);e([c.property({type:g,json:{read:!1,
write:!1}})],f.prototype,"elevationInfo",void 0);e([c.property({type:q.default,json:{write:!0}})],f.prototype,"material",void 0);e([c.property({type:String,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:b.write}}})],f.prototype,"type",void 0);return f=e([c.subclass("esri.symbols.Symbol3DLayer")],f)}(c.declared(k));(a||(a={})).typeJSONDictionary=b;return a})},"esri/symbols/support/Symbol3DMaterial":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ./materialUtils ../../core/accessorSupport/decorators".split(" "),
function(a,h,n,e,k,l,q){Object.defineProperty(h,"__esModule",{value:!0});a=function(a){function c(){return null!==a&&a.apply(this,arguments)||this}n(c,a);b=c;c.prototype.clone=function(){return new b({color:this.color?this.color.clone():null})};e([q.property(l.colorAndTransparencyProperty)],c.prototype,"color",void 0);return c=b=e([q.subclass("esri.symbols.support.Symbol3DMaterial")],c);var b}(q.declared(k));h.Symbol3DMaterial=a;h.default=a})},"esri/symbols/support/materialUtils":function(){define(["require",
"exports","../../Color","../../core/screenUtils"],function(a,h,n,e){function k(a){return Math.max(0,Math.min(Math.round(100*(1-a)),100))}function l(a){return Math.max(0,Math.min(1-a/100,1))}function q(a,b){a=null!=b.transparency?l(b.transparency):1;if((b=b.color)&&Array.isArray(b))return new n([b[0]||0,b[1]||0,b[2]||0,a])}function g(a,b){b.color=a.toJSON().slice(0,3);a=k(a.a);0!==a&&(b.transparency=a)}Object.defineProperty(h,"__esModule",{value:!0});h.opacityToTransparency=k;h.transparencyToOpacity=
l;h.readColorAndTransparency=q;h.writeColorAndTransparency=g;h.colorAndTransparencyProperty={type:n,json:{type:[Number],read:{source:["color","transparency"],reader:q},write:{target:{color:{type:[Number]},transparency:{type:Number}},writer:g}}};h.screenSizeProperty={type:Number,cast:e.toPt,json:{write:!0}}})},"esri/symbols/support/ElevationInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport ../../core/kebabDictionary ../../support/arcadeUtils".split(" "),
function(a,h,n,e,k,l,q,g){var c=q({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),b=q({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"}),f=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}n(b,a);c=b;Object.defineProperty(b.prototype,"requiredFields",{get:function(){return g.extractFieldNames(this.expression)},enumerable:!0,configurable:!0});
b.prototype.clone=function(){return new c({expression:this.expression})};e([k.property({type:String,json:{write:!0}})],b.prototype,"expression",void 0);e([k.property({readOnly:!0,dependsOn:["expression"]})],b.prototype,"requiredFields",null);return b=c=e([k.subclass("esri.layers.support.FeatureExpressionInfo")],b);var c}(k.declared(l));return function(a){function g(){return null!==a&&a.apply(this,arguments)||this}n(g,a);h=g;g.prototype.readFeatureExpressionInfo=function(a,b){if(null!=a)return a;if(b.featureExpression&&
0===b.featureExpression.value)return{expression:"0"}};g.prototype.writeFeatureExpressionInfo=function(a,b,c,e){b[c]=a.write(null,e);"0"===a.expression&&(b.featureExpression={value:0})};Object.defineProperty(g.prototype,"mode",{get:function(){var a=this._get("mode");return a?a:null!=this.offset||this.featureExpressionInfo?"relative-to-ground":"on-the-ground"},set:function(a){this._set("mode",a)},enumerable:!0,configurable:!0});g.prototype.write=function(a,b){return this.offset||this.mode||this.featureExpressionInfo||
this.unit?this.inherited(arguments):null};g.prototype.clone=function(){return new h({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})};e([k.property({type:f,json:{write:!0}})],g.prototype,"featureExpressionInfo",void 0);e([k.reader("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],g.prototype,"readFeatureExpressionInfo",null);e([k.writer("featureExpressionInfo")],g.prototype,"writeFeatureExpressionInfo",
null);e([k.property({type:String,dependsOn:["offset","featureExpressionInfo"],json:{read:c.read,write:{writer:c.write,isRequired:!0}}})],g.prototype,"mode",null);e([k.property({type:Number,json:{write:!0}})],g.prototype,"offset",void 0);e([k.property({type:String,json:{read:b.read,write:b.write}})],g.prototype,"unit",void 0);return g=h=e([k.subclass("esri.layers.support.ElevationInfo")],g);var h}(k.declared(l))})},"esri/symbols/IconSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/kebabDictionary ../core/urlUtils ../core/accessorSupport/decorators ./Symbol3DLayer ./support/Symbol3DOutline ./support/Symbol3DResource ./support/materialUtils".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f){var r=k({center:"center",left:"left",right:"right",top:"top",bottom:"bottom",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right"},{ignoreUnknown:!0}),v=function(a){function b(){return null!==a&&a.apply(this,arguments)||this}n(b,a);c=b;b.prototype.readHref=function(a,b,c){return a?l.read(a,c):b.dataURI};b.prototype.writeHref=function(a,b,c,e){a&&(l.isDataProtocol(a)?b.dataURI=a:(b.href=l.write(a,e),l.isAbsolute(b.href)&&(b.href=
l.normalize(b.href))))};b.prototype.clone=function(){return new c({href:this.href,primitive:this.primitive})};e([q.property({json:{write:!0,read:{source:["href","dataURI"]}}})],b.prototype,"href",void 0);e([q.reader("href")],b.prototype,"readHref",null);e([q.writer("href")],b.prototype,"writeHref",null);return b=c=e([q.subclass("esri.symbols.support.IconSymbol3DLayerResource")],b);var c}(q.declared(b.default));return function(a){function b(b){b=a.call(this)||this;b.material=null;b.resource=null;b.type=
"icon";b.size=12;b.anchor=void 0;b.outline=void 0;return b}n(b,a);g=b;b.prototype.clone=function(){return new g({anchor:this.anchor,enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),outline:this.outline&&this.outline.clone(),resource:this.resource&&this.resource.clone(),size:this.size})};e([q.property()],b.prototype,"material",void 0);e([q.property({type:v,json:{write:!0}})],b.prototype,"resource",void 0);e([q.property()],
b.prototype,"type",void 0);e([q.property(f.screenSizeProperty)],b.prototype,"size",void 0);e([q.property({type:String,json:{read:r.read,write:r.write}})],b.prototype,"anchor",void 0);e([q.property({type:c.default,json:{write:!0}})],b.prototype,"outline",void 0);return b=g=e([q.subclass("esri.symbols.IconSymbol3DLayer")],b);var g}(q.declared(g))})},"esri/symbols/support/Symbol3DOutline":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../Color ./materialUtils ../../core/accessorSupport/decorators".split(" "),
function(a,h,n,e,k,l,q,g){Object.defineProperty(h,"__esModule",{value:!0});a=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.color=new l([0,0,0,1]);b.size=1;return b}n(b,a);c=b;b.prototype.clone=function(){return new c({color:this.color?this.color.clone():null,size:this.size})};e([g.property(q.colorAndTransparencyProperty)],b.prototype,"color",void 0);e([g.property(q.screenSizeProperty)],b.prototype,"size",void 0);return b=c=e([g.subclass("esri.symbols.support.Symbol3DOutline")],
b);var c}(g.declared(k));h.Symbol3DOutline=a;h.default=a})},"esri/symbols/support/Symbol3DResource":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/urlUtils ../../core/JSONSupport ../../core/kebabDictionary ../../core/accessorSupport/decorators".split(" "),function(a,h,n,e,k,l,q,g){Object.defineProperty(h,"__esModule",{value:!0});var c=q({invertedCone:"inverted-cone"});a=function(a){function b(){return null!==a&&a.apply(this,
arguments)||this}n(b,a);h=b;b.prototype.readHref=function(a,b,c){return k.read(a,c)};b.prototype.writeHref=function(a,b,c,e){a&&(b.href=k.write(a,e),k.isAbsolute(b.href)&&(b.href=k.normalize(b.href)))};b.prototype.readPrimitive=function(a){return c.fromJSON(a)};b.prototype.writePrimitive=function(a,b){b.primitive=c.toJSON(a)};b.prototype.clone=function(){return new h({href:this.href,primitive:this.primitive})};e([g.property({type:String,json:{write:!0}})],b.prototype,"href",void 0);e([g.reader("href")],
b.prototype,"readHref",null);e([g.writer("href")],b.prototype,"writeHref",null);e([g.property({type:String,json:{write:!0}})],b.prototype,"primitive",void 0);e([g.reader("primitive")],b.prototype,"readPrimitive",null);e([g.writer("primitive")],b.prototype,"writePrimitive",null);return b=h=e([g.subclass("esri.symbols.support.Symbol3DResource")],b);var h}(g.declared(l));h.Symbol3DResource=a;h.default=a})},"esri/symbols/ObjectSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/kebabDictionary ./Symbol3DLayer ./support/Symbol3DMaterial ./support/Symbol3DResource ../core/accessorSupport/decorators".split(" "),
function(a,h,n,e,k,l,q,g,c){var b=k({center:"center",top:"top",bottom:"bottom",origin:"origin"},{ignoreUnknown:!0});return function(a){function f(b){b=a.call(this)||this;b.material=null;b.resource=null;b.type="object";b.width=void 0;b.height=void 0;b.depth=void 0;b.anchor=void 0;b.heading=void 0;b.tilt=void 0;b.roll=void 0;return b}n(f,a);k=f;f.prototype.clone=function(){return new k({heading:this.heading,tilt:this.tilt,roll:this.roll,anchor:this.anchor,depth:this.depth,enabled:this.enabled,elevationInfo:this.elevationInfo&&
this.elevationInfo.clone(),height:this.height,material:this.material&&this.material.clone(),resource:this.resource&&this.resource.clone(),width:this.width})};Object.defineProperty(f.prototype,"isPrimitive",{get:function(){return!this.resource||"string"!==typeof this.resource.href},enumerable:!0,configurable:!0});e([c.property({type:q.default})],f.prototype,"material",void 0);e([c.property({type:g.default,json:{write:!0}})],f.prototype,"resource",void 0);e([c.property()],f.prototype,"type",void 0);
e([c.property({type:Number,json:{write:!0}})],f.prototype,"width",void 0);e([c.property({type:Number,json:{write:!0}})],f.prototype,"height",void 0);e([c.property({type:Number,json:{write:!0}})],f.prototype,"depth",void 0);e([c.property({type:String,json:{read:b.read,write:b.write}})],f.prototype,"anchor",void 0);e([c.property({type:Number,json:{write:!0}})],f.prototype,"heading",void 0);e([c.property({type:Number,json:{write:!0}})],f.prototype,"tilt",void 0);e([c.property({type:Number,json:{write:!0}})],
f.prototype,"roll",void 0);e([c.property({readOnly:!0,dependsOn:["resource","resource.href"]})],f.prototype,"isPrimitive",null);return f=k=e([c.subclass("esri.symbols.ObjectSymbol3DLayer")],f);var k}(c.declared(l))})},"esri/symbols/LineSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./Symbol3DLayer ./support/materialUtils ../core/accessorSupport/decorators".split(" "),function(a,h,n,e,k,l,q){return function(a){function c(b){b=
a.call(this)||this;b.material=null;b.type="line";b.size=1;return b}n(c,a);b=c;c.prototype.clone=function(){return new b({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),size:this.size})};e([q.property()],c.prototype,"material",void 0);e([q.property()],c.prototype,"type",void 0);e([q.property(l.screenSizeProperty)],c.prototype,"size",void 0);return c=b=e([q.subclass("esri.symbols.LineSymbol3DLayer")],c);var b}(q.declared(k))})},
"esri/symbols/PathSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./Symbol3DLayer ../core/accessorSupport/decorators".split(" "),function(a,h,n,e,k,l){return function(a){function g(b){b=a.call(this)||this;b.material=null;b.type="path";b.size=void 0;return b}n(g,a);c=g;g.prototype.readSize=function(a,c){return a||c.width||0};g.prototype.clone=function(){return new c({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),
material:this.material&&this.material.clone(),size:this.size})};e([l.property()],g.prototype,"material",void 0);e([l.property()],g.prototype,"type",void 0);e([l.property({type:Number,json:{write:!0}})],g.prototype,"size",void 0);e([l.reader("size",["size","width"])],g.prototype,"readSize",null);return g=c=e([l.subclass("esri.symbols.PathSymbol3DLayer")],g);var c}(l.declared(k))})},"esri/symbols/FillSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./Symbol3DLayer ./support/Symbol3DOutline ./support/Symbol3DFillMaterial ../core/accessorSupport/decorators".split(" "),
function(a,h,n,e,k,l,q,g){return function(a){function b(b){b=a.call(this)||this;b.type="fill";b.material=null;b.outline=null;return b}n(b,a);c=b;b.prototype.clone=function(){return new c({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),outline:this.outline&&this.outline.clone()})};e([g.property()],b.prototype,"type",void 0);e([g.property({type:q.default})],b.prototype,"material",void 0);e([g.property({type:l.default,json:{write:!0}})],
b.prototype,"outline",void 0);return b=c=e([g.subclass("esri.symbols.FillSymbol3DLayer")],b);var c}(g.declared(k))})},"esri/symbols/support/Symbol3DFillMaterial":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ./Symbol3DMaterial ../../core/accessorSupport/decorators".split(" "),function(a,h,n,e,k,l){Object.defineProperty(h,"__esModule",{value:!0});a=function(a){function g(){return null!==a&&a.apply(this,arguments)||this}n(g,a);c=g;g.prototype.clone=
function(){return new c({color:this.color?this.color.clone():null,colorMixMode:this.colorMixMode})};e([l.property({type:String,json:{read:!0,write:!0}})],g.prototype,"colorMixMode",void 0);return g=c=e([l.subclass("esri.symbols.support.Symbol3DFillMaterial")],g);var c}(l.declared(k.default));h.Symbol3DFillMaterial=a;h.default=a})},"esri/symbols/ExtrudeSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./Symbol3DLayer ../core/accessorSupport/decorators".split(" "),
function(a,h,n,e,k,l){return function(a){function g(b){b=a.call(this)||this;b.type="extrude";b.size=void 0;b.material=null;return b}n(g,a);c=g;g.prototype.clone=function(){return new c({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),material:this.material&&this.material.clone(),size:this.size})};e([l.property()],g.prototype,"type",void 0);e([l.property({type:Number,json:{write:!0}})],g.prototype,"size",void 0);e([l.property()],g.prototype,"material",void 0);return g=
c=e([l.subclass("esri.symbols.ExtrudeSymbol3DLayer")],g);var c}(l.declared(k))})},"esri/symbols/TextSymbol3DLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ./Symbol3DLayer ./support/Symbol3DHalo ./support/materialUtils ../core/accessorSupport/decorators".split(" "),function(a,h,n,e,k,l,q,g,c){return function(a){function b(b){b=a.call(this)||this;b.font=null;b.halo=null;b.material=null;b.size=void 0;b.text=void 0;b.type=
"text";return b}n(b,a);h=b;b.prototype.writeFont=function(a,b){a&&(b.font=k.clone(a))};b.prototype.clone=function(){return new h({enabled:this.enabled,elevationInfo:this.elevationInfo&&this.elevationInfo.clone(),font:this.font&&k.clone(this.font),halo:this.halo&&k.clone(this.halo),material:this.material&&this.material.clone(),size:this.size,text:this.text})};e([c.property()],b.prototype,"font",void 0);e([c.writer("font",{"font.family":{type:String},"font.weight":{type:String},"font.style":{type:String}})],
b.prototype,"writeFont",null);e([c.property({type:q.default,json:{write:!0}})],b.prototype,"halo",void 0);e([c.property()],b.prototype,"material",void 0);e([c.property(g.screenSizeProperty)],b.prototype,"size",void 0);e([c.property({type:String,json:{write:!0}})],b.prototype,"text",void 0);e([c.property()],b.prototype,"type",void 0);return b=h=e([c.subclass("esri.symbols.TextSymbol3DLayer")],b);var h}(c.declared(l))})},"esri/symbols/support/Symbol3DHalo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/JSONSupport ../../core/lang ./materialUtils ../../core/accessorSupport/decorators".split(" "),
function(a,h,n,e,k,l,q,g,c){Object.defineProperty(h,"__esModule",{value:!0});a=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.color=new k([0,0,0,1]);b.size=0;return b}n(b,a);h=b;b.prototype.clone=function(){return new h({color:q.clone(this.color),size:this.size})};e([c.property(g.colorAndTransparencyProperty)],b.prototype,"color",void 0);e([c.property(g.screenSizeProperty)],b.prototype,"size",void 0);return b=h=e([c.subclass("esri.symbols.support.Symbol3DHalo")],b);var h}(c.declared(l));
h.Symbol3DHalo=a;h.default=a})},"esri/symbols/support/StyleOrigin":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../portal/Portal".split(" "),function(a,h,n,e,k,l,q){return function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b.portal=null;return b}n(c,a);b=c;c.prototype.clone=function(){return new b({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,
portal:this.portal})};e([k.property({type:String})],c.prototype,"name",void 0);e([k.property({type:String})],c.prototype,"styleUrl",void 0);e([k.property({type:String})],c.prototype,"styleName",void 0);e([k.property({type:q})],c.prototype,"portal",void 0);return c=b=e([k.subclass("esri.symbols.support.StyleOrigin")],c);var b}(k.declared(l))})},"esri/symbols/support/Symbol3DVerticalOffset":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/JSONSupport ../../core/accessorSupport/decorators ./materialUtils".split(" "),
function(a,h,n,e,k,l,q){Object.defineProperty(h,"__esModule",{value:!0});a=function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b.screenLength=0;b.minWorldLength=0;return b}n(c,a);b=c;c.prototype.writeMinWorldLength=function(a,b,c){a&&(b[c]=a)};c.prototype.clone=function(){return new b({screenLength:this.screenLength,minWorldLength:this.minWorldLength,maxWorldLength:this.maxWorldLength})};e([l.property(q.screenSizeProperty)],c.prototype,"screenLength",void 0);e([l.property({type:Number,
json:{write:!0}})],c.prototype,"minWorldLength",void 0);e([l.writer("minWorldLength")],c.prototype,"writeMinWorldLength",null);e([l.property({type:Number,json:{write:!0}})],c.prototype,"maxWorldLength",void 0);return c=b=e([l.subclass("esri.symbols.support.Symbol3DVerticalOffset")],c);var b}(l.declared(k));h.Symbol3DVerticalOffset=a;h.default=a})},"esri/symbols/callouts/calloutUtils":function(){define(["require","exports","./Callout3D","./LineCallout3D"],function(a,h,n,e){function k(a){if(!a)return!1;
a=a.verticalOffset;return!a||0>=a.screenLength||0>=a.maxWorldLength?!1:!0}function l(a,g,c){if(!a)return a;switch(a.type){case "line":return g=new e,g.read(a,c),g}}Object.defineProperty(h,"__esModule",{value:!0});h.hasVisibleVerticalOffset=k;h.hasVisibleCallout=function(a){if(!a||!a.supportsCallout||!a.supportsCallout())return!1;var e=a.callout;return e&&e.visible?k(a)?!0:!1:!1};h.isCalloutSupport=function(a){return"point-3d"===a.type||"label-3d"===a.type};h.read=l;h.calloutProperty={types:{key:"type",
base:n,typeMap:{line:e}},json:{read:l,write:!0}}})},"esri/symbols/callouts/Callout3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/_base/lang ../../core/JSONSupport ../../core/accessorSupport/decorators".split(" "),function(a,h,n,e,k,l,q){return function(a){function c(b){b=a.call(this)||this;b.visible=!0;return b}n(c,a);c.prototype.normalizeCtorArgs=function(a){a&&a.type&&(a=k.mixin({},a),delete a.type);return a};c.prototype.clone=
function(){};e([q.property({type:String,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],c.prototype,"type",void 0);e([q.property({readOnly:!0})],c.prototype,"visible",void 0);return c=e([q.subclass("esri.symbols.callouts.Callout3D")],c)}(q.declared(l))})},"esri/symbols/callouts/LineCallout3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/lang ../../core/screenUtils ../../core/accessorSupport/decorators ./Callout3D ../support/materialUtils ./LineCallout3DBorder".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f){return function(a){function c(b){b=a.call(this)||this;b.type="line";b.color=new k([0,0,0,1]);b.size=q.px2pt(1);b.border=null;return b}n(c,a);h=c;Object.defineProperty(c.prototype,"visible",{get:function(){return 0<this.size&&0<this.color.a},enumerable:!0,configurable:!0});c.prototype.clone=function(){return new h({color:l.clone(this.color),size:this.size,border:l.clone(this.border)})};e([g.property({type:String})],c.prototype,"type",void 0);e([g.property(b.colorAndTransparencyProperty)],
c.prototype,"color",void 0);e([g.property(b.screenSizeProperty)],c.prototype,"size",void 0);e([g.property({type:f.default,json:{write:!0}})],c.prototype,"border",void 0);e([g.property({dependsOn:["size","color"],readOnly:!0})],c.prototype,"visible",null);return c=h=e([g.subclass("esri.symbols.callouts.LineCallout3D")],c);var h}(g.declared(c))})},"esri/symbols/callouts/LineCallout3DBorder":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../Color ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators ../support/materialUtils".split(" "),
function(a,h,n,e,k,l,q,g,c){Object.defineProperty(h,"__esModule",{value:!0});a=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.color=new k("white");return b}n(b,a);h=b;b.prototype.clone=function(){return new h({color:q.clone(this.color)})};e([g.property(c.colorAndTransparencyProperty)],b.prototype,"color",void 0);return b=h=e([g.subclass("esri.symbols.support.LineCallout3DBorder")],b);var h}(g.declared(l));h.LineCallout3DBorder=a;h.default=a})},"esri/symbols/LineSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/Collection ./Symbol3D ./LineSymbol3DLayer ./PathSymbol3DLayer ./TextSymbol3DLayer ../core/accessorSupport/decorators".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f){var r=l.ofType({base:null,key:"type",typeMap:{line:g,text:b,path:c}});return function(a){function b(b){b=a.call(this)||this;b.symbolLayers=new r;b.type="line-3d";return b}n(b,a);c=b;b.prototype.clone=function(){return new c({styleOrigin:k.clone(this.styleOrigin),symbolLayers:k.clone(this.symbolLayers),thumbnail:k.clone(this.thumbnail)})};e([f.property({type:r})],b.prototype,"symbolLayers",void 0);e([f.property()],b.prototype,"type",void 0);return b=c=e([f.subclass("esri.symbols.LineSymbol3D")],
b);var c}(f.declared(q))})},"esri/symbols/MeshSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/Collection ./Symbol3D ./FillSymbol3DLayer ../core/accessorSupport/decorators".split(" "),function(a,h,n,e,k,l,q,g,c){var b=l.ofType({base:null,key:"type",typeMap:{fill:g}});return function(a){function f(c){c=a.call(this)||this;c.symbolLayers=new b;c.type="mesh-3d";return c}n(f,a);g=f;f.prototype.clone=function(){return new g({styleOrigin:k.clone(this.styleOrigin),
symbolLayers:k.clone(this.symbolLayers),thumbnail:k.clone(this.thumbnail)})};e([c.property({type:b})],f.prototype,"symbolLayers",void 0);e([c.property()],f.prototype,"type",void 0);return f=g=e([c.subclass("esri.symbols.MeshSymbol3D")],f);var g}(c.declared(q))})},"esri/symbols/PointSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/Collection ./Symbol3D ./IconSymbol3DLayer ./ObjectSymbol3DLayer ./TextSymbol3DLayer ./support/Symbol3DVerticalOffset ./callouts/calloutUtils ../core/accessorSupport/decorators".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v){var x=l.ofType({base:null,key:"type",typeMap:{icon:g,object:c,text:b}});return function(a){function b(b){b=a.call(this)||this;b.verticalOffset=null;b.callout=null;b.symbolLayers=new x;b.type="point-3d";return b}n(b,a);c=b;b.prototype.supportsCallout=function(){if(1!==(this.symbolLayers?this.symbolLayers.length:0))return!1;switch(this.symbolLayers.getItemAt(0).type){case "icon":case "text":case "object":return!0}return!1};b.prototype.hasVisibleCallout=function(){return r.hasVisibleCallout(this)};
b.prototype.hasVisibleVerticalOffset=function(){return r.hasVisibleVerticalOffset(this)};b.prototype.clone=function(){return new c({verticalOffset:k.clone(this.verticalOffset),callout:k.clone(this.callout),styleOrigin:k.clone(this.styleOrigin),symbolLayers:k.clone(this.symbolLayers),thumbnail:k.clone(this.thumbnail)})};e([v.property({type:f.default,json:{write:!0}})],b.prototype,"verticalOffset",void 0);e([v.property(r.calloutProperty)],b.prototype,"callout",void 0);e([v.property({type:x})],b.prototype,
"symbolLayers",void 0);e([v.property()],b.prototype,"type",void 0);return b=c=e([v.subclass("esri.symbols.PointSymbol3D")],b);var c}(v.declared(q))})},"esri/symbols/PolygonSymbol3D":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/lang ../core/Collection ./Symbol3D ./ExtrudeSymbol3DLayer ./FillSymbol3DLayer ./IconSymbol3DLayer ./LineSymbol3DLayer ./ObjectSymbol3DLayer ./TextSymbol3DLayer ../core/accessorSupport/decorators".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x){var w=l.ofType({base:null,key:"type",typeMap:{extrude:g,fill:c,icon:b,line:f,object:r,text:v}});return function(a){function b(b){b=a.call(this)||this;b.type="polygon-3d";return b}n(b,a);c=b;b.prototype.clone=function(){return new c({styleOrigin:k.clone(this.styleOrigin),symbolLayers:k.clone(this.symbolLayers),thumbnail:k.clone(this.thumbnail)})};b.fromJSON=function(a){var b=new c;b.read(a);if(2===b.symbolLayers.length&&"fill"===b.symbolLayers.getItemAt(0).type&&
"line"===b.symbolLayers.getItemAt(1).type){var d=b.symbolLayers.getItemAt(0),e=b.symbolLayers.getItemAt(1);!e.enabled||a.symbolLayers&&a.symbolLayers[1]&&!1===a.symbolLayers[1].enable||(d.outline={size:e.size,color:e.material.color});b.symbolLayers.removeAt(1)}return b};e([x.property({type:w})],b.prototype,"symbolLayers",void 0);e([x.property()],b.prototype,"type",void 0);return b=c=e([x.subclass("esri.symbols.PolygonSymbol3D")],b);var c}(x.declared(q))})},"esri/symbols/support/jsonUtils":function(){define("require exports ../../core/Error ../../core/Warning ../Symbol3D ../SimpleLineSymbol ../SimpleMarkerSymbol ../PictureMarkerSymbol ../PictureFillSymbol ../SimpleFillSymbol ../TextSymbol ../PointSymbol3D ../LineSymbol3D ../PolygonSymbol3D ../MeshSymbol3D ../LabelSymbol3D ../WebStyleSymbol ../callouts/LineCallout3D ./symbolConversion".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t,u,p,d){function m(a,b,c){if(!a)return null;if(!c||"web-scene"!==c.origin||a.isInstanceOf(k)||a.isInstanceOf(u))return a.write(b,c);var e=d.to3D(a);if(e.symbol)return e.symbol.write(b,c);c.messages&&c.messages.push(new n("symbol:unsupported","Symbols of type '"+a.declaredClass+"' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView",{symbol:a,context:c,error:e.error}));return null}Object.defineProperty(h,"__esModule",
{value:!0});var y={esriSMS:q,esriPMS:g,esriTS:f,esriSLS:l,esriSFS:b,esriPFS:c,PointSymbol3D:r,LineSymbol3D:v,PolygonSymbol3D:x,MeshSymbol3D:w,LabelSymbol3D:t,styleSymbolReference:u};h.read=function(a,b,c){if(b=a?y[a.type]||null:null)return b=new b,b.read(a,c),b;c&&c.messages&&a&&c.messages.push(new e("symbol:unsupported","Symbols of type '"+(a.type||"unknown")+"' are not supported",{definition:a,context:c}));return null};h.writeTarget=function(a,b,c,d){(a=m(a,{},d))&&(b[c]=a)};h.write=m;h.fromJSON=
function(a,b){var c=a?y[a.type]||null:null;return c?c.fromJSON(a,b):null};h.readCallout3D=function(a,b){if(!a||!a.type)return null;var c=null;switch(a.type){case "line":c=new p}c&&c.read(a,b);return c}})},"esri/symbols/support/symbolConversion":function(){define("require exports dojo/_base/lang ../../core/lang ../../core/Error ../Font ../SimpleLineSymbol ../SimpleMarkerSymbol ../PictureMarkerSymbol ../SimpleFillSymbol ../TextSymbol ../WebStyleSymbol ../Symbol3D ../LineSymbol3D ../PointSymbol3D ../PolygonSymbol3D ../LabelSymbol3D ../LineSymbol3DLayer ../IconSymbol3DLayer ../FillSymbol3DLayer ../TextSymbol3DLayer ../../Color".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t,u,p,d,m,y,z){function A(a){var b=a.color?a.color.clone():new z([255,255,255]),e,f,g;a instanceof c?(a.color&&0===a.color.r&&0===a.color.g&&0===a.color.b&&(b=new z([255,255,255])),e={href:a.url},f=a.width<=a.height?a.height:a.width):(e=a.style,e in C?e=C[e]:(console.log(e+' cannot be mapped to Icon symbol. Fallback to "circle"'),e="circle"),e={primitive:e},f=a.size,a.outline&&a.outline.color&&0<a.outline.width&&(g={size:a.outline.width,color:a.outline.color.clone()}));
return new w(new d({size:f,resource:e,material:{color:b},outline:g}))}Object.defineProperty(h,"__esModule",{value:!0});var C={};C[g.STYLE_CIRCLE]="circle";C[g.STYLE_CROSS]="cross";C[g.STYLE_DIAMOND]="kite";C[g.STYLE_SQUARE]="square";C[g.STYLE_X]="x";h.to3D=function(a,d,h,z){void 0===d&&(d=!1);void 0===h&&(h=!1);void 0===z&&(z=!0);if(!a)return{symbol:null};if(a instanceof v||a instanceof r)z=a.clone();else if(a instanceof q)z=new x(new p({size:a.width||1,material:{color:a.color?a.color.clone():[255,
255,255]}}));else if(a instanceof g)z=A(a);else if(a instanceof c)z=A(a);else if(a instanceof b)z=new m({material:{color:a.color?a.color.clone():[255,255,255]}}),a.outline&&a.outline.color&&(z.outline={size:a.outline.width||0,color:a.outline.color}),z=new t(z);else if(a instanceof f){var C=n.clone(l.defaultProps);a.font&&n.mixin(C,a.font);var J;J=a.haloColor;var G=a.haloSize;J=J&&0<G?{color:e.clone(J),size:G}:null;z=new (z?u:w)(new y({size:C.size,font:{family:C.family,weight:C.weight,style:C.style},
halo:J,material:{color:a.color.clone()},text:a.text}))}else return{error:new k("symbol-conversion:unsupported-2d-symbol","2D symbol of type '"+(a.type||a.declaredClass)+"' is unsupported in 3D",{symbol:a})};d&&(z.id=a.id);if(h&&z.isInstanceOf(v))for(a=0;a<z.symbolLayers.length;++a)z.symbolLayers.getItemAt(a)._ignoreDrivers=!0;return{symbol:z}}})},"esri/geometry":function(){define("require exports ./geometry/Extent ./geometry/Multipoint ./geometry/Point ./geometry/Polygon ./geometry/Polyline ./geometry/SpatialReference ./geometry/ScreenPoint ./geometry/Geometry ./geometry/support/jsonUtils".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f){Object.defineProperty(h,"__esModule",{value:!0});h.Extent=n;h.Multipoint=e;h.Point=k;h.Polygon=l;h.Polyline=q;h.SpatialReference=g;h.ScreenPoint=c;h.BaseGeometry=b;h.isGeometry=function(a){return a instanceof h.BaseGeometry};h.fromJSON=f.fromJSON})},"esri/geometry/ScreenPoint":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/Accessor ../core/accessorSupport/decorators".split(" "),function(a,h,n,e,k,l){return function(a){function g(){for(var b=
[],c=0;c<arguments.length;c++)b[c]=arguments[c];b=a.apply(this,b)||this;b.x=0;b.y=0;b.z=void 0;return b}n(g,a);c=g;g.prototype.normalizeCtorArgs=function(a,c){return"number"===typeof a?{x:a,y:c}:Array.isArray(a)?{x:a[0],y:a[1]}:a};g.prototype.clone=function(){return new c({x:this.x,y:this.y,z:this.z})};g.prototype.toArray=function(){return null==this.z?[this.x,this.y]:[this.x,this.y,this.z]};e([l.property({type:Number})],g.prototype,"x",void 0);e([l.property({type:Number})],g.prototype,"y",void 0);
e([l.property({type:Number})],g.prototype,"z",void 0);return g=c=e([l.subclass("esri.geometry.ScreenPoint")],g);var c}(l.declared(k))})},"esri/tasks/QueryTask":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/accessorSupport/decorators dojo/_base/lang ../request ./Task ./support/FeatureSet ./support/Query ../geometry ../geometry/support/jsonUtils ../geometry/support/normalizeUtils".split(" "),function(a,
h,n,e,k,l,q,g,c,b,f,r,v,x){return function(a){function c(b){b=a.call(this,b)||this;b.gdbVersion=null;b.source=null;return b}n(c,a);h=c;c.queryToQueryStringParameters=function(a){var b=a.geometry;a=a.toJSON();b&&(a.geometry=JSON.stringify(b),a.geometryType=v.getJsonType(b),a.inSR=b.spatialReference.wkid||JSON.stringify(b.spatialReference));a.groupByFieldsForStatistics&&(a.groupByFieldsForStatistics=a.groupByFieldsForStatistics.join(","));a.objectIds&&(a.objectIds=a.objectIds.join(","));a.orderByFields&&
(a.orderByFields=a.orderByFields.join(","));a.outFields&&(a.outFields=a.outFields.join(","));a.outSR?a.outSR=a.outSR.wkid||JSON.stringify(a.outSR):b&&(a.returnGeometry||a.returnCentroid)&&(a.outSR=a.inSR);a.returnGeometry&&delete a.returnGeometry;a.outStatistics&&(a.outStatistics=JSON.stringify(a.outStatistics));a.pixelSize&&(a.pixelSize=JSON.stringify(a.pixelSize));a.quantizationParameters&&(a.quantizationParameters=JSON.stringify(a.quantizationParameters));a.timeExtent&&(b=a.timeExtent,a.time=[null!=
b.startTime?b.startTime:"null",null!=b.endTime?b.endTime:"null"],delete a.timeExtent);return a};c.prototype.execute=function(a,b){var c=this;return this.rawExecute(a,b).then(function(a){return c._handleExecuteResponse(a)})};c.prototype.rawExecute=function(a,b){var c=this;return x.normalizeCentralMeridian(a.geometry?[a.geometry]:[]).then(function(d){d=c._encode(q.mixin({},c.parsedUrl.query,{f:"json"},c._normalizeQuery(a,d&&d[0])));if(c.source){var e={source:c.source.toJSON()};d.layer=JSON.stringify(e)}c.gdbVersion&&
(d.gdbVersion=c.gdbVersion);d={query:d,callbackParamName:"callback"};if(c.requestOptions||b)d=q.mixin({},c.requestOptions,b,d);return g(c.parsedUrl.path+"/query",d)})};c.prototype.executeRelationshipQuery=function(a,b){a=this._encode(q.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);a={query:a,callbackParamName:"callback"};if(this.requestOptions||b)a=q.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/queryRelatedRecords",a).then(this._handleExecuteRelationshipQueryResponse)};
c.prototype.executeForIds=function(a,b){var c=this;return x.normalizeCentralMeridian(a.geometry?[a.geometry]:[]).then(function(d){d=c._encode(q.mixin({},c.parsedUrl.query,{f:"json",returnIdsOnly:!0},c._normalizeQuery(a,d&&d[0])));if(c.source){var e={source:c.source.toJSON()};d.layer=JSON.stringify(e)}c.gdbVersion&&(d.gdbVersion=c.gdbVersion);d={query:d,callbackParamName:"callback"};if(c.requestOptions||b)d=q.mixin({},c.requestOptions,b,d);return g(c.parsedUrl.path+"/query",d)}).then(this._handleExecuteForIdsResponse)};
c.prototype.executeForCount=function(a,b){var c=this;return x.normalizeCentralMeridian(a.geometry?[a.geometry]:[]).then(function(d){d=c._encode(q.mixin({},c.parsedUrl.query,{f:"json",returnIdsOnly:!0,returnCountOnly:!0},c._normalizeQuery(a,d&&d[0])));if(c.source){var e={source:c.source.toJSON()};d.layer=JSON.stringify(e)}c.gdbVersion&&(d.gdbVersion=c.gdbVersion);d={query:d,callbackParamName:"callback"};if(c.requestOptions||b)d=q.mixin({},c.requestOptions,b,d);return g(c.parsedUrl.path+"/query",d)}).then(this._handleExecuteForCountResponse)};
c.prototype.executeForExtent=function(a,b){var c=this;return x.normalizeCentralMeridian(a.geometry?[a.geometry]:[]).then(function(d){d=c._encode(q.mixin({},c.parsedUrl.query,{f:"json",returnExtentOnly:!0,returnCountOnly:!0},c._normalizeQuery(a,d&&d[0])));if(c.source){var e={source:c.source.toJSON()};d.layer=JSON.stringify(e)}c.gdbVersion&&(d.gdbVersion=c.gdbVersion);d={query:d,callbackParamName:"callback"};if(c.requestOptions||b)d=q.mixin({},c.requestOptions,b,d);return g(c.parsedUrl.path+"/query",
d)}).then(this._handleExecuteForExtentResponse)};c.prototype._handleExecuteResponse=function(a){return b.fromJSON(a.data)};c.prototype._handleExecuteRelationshipQueryResponse=function(a){a=a.data;var c=a.geometryType,e=a.spatialReference,f={};a.relatedRecordGroups.forEach(function(a){var d=b.fromJSON({geometryType:c,spatialReference:e,features:a.relatedRecords});if(null!=a.objectId)f[a.objectId]=d;else for(var g in a)a.hasOwnProperty(g)&&"relatedRecords"!==g&&(f[a[g]]=d)});return f};c.prototype._handleExecuteForIdsResponse=
function(a){return a.data.objectIds};c.prototype._handleExecuteForCountResponse=function(a){a=a.data;var b=a.features,c=a.objectIds;if(c)a=c.length;else{if(b)throw Error("Unable to perform query. Please check your parameters.");a=a.count}return a};c.prototype._handleExecuteForExtentResponse=function(a){a=a.data;if(a.hasOwnProperty("extent"))a.extent=r.Extent.fromJSON(a.extent);else{if(a.features)throw Error("Layer does not support extent calculation.");if(a.hasOwnProperty("count"))throw Error("Layer does not support extent calculation.");
}return a};c.prototype._normalizeQuery=function(a,b){b&&(a=a.clone(),a.geometry=b);return h.queryToQueryStringParameters(a)};e([l.property()],c.prototype,"gdbVersion",void 0);e([l.property()],c.prototype,"source",void 0);e([k(0,l.cast(f))],c.prototype,"execute",null);e([k(0,l.cast(f))],c.prototype,"rawExecute",null);e([k(0,l.cast(f))],c.prototype,"executeForIds",null);e([k(0,l.cast(f))],c.prototype,"executeForCount",null);e([k(0,l.cast(f))],c.prototype,"executeForExtent",null);return c=h=e([l.subclass("esri.tasks.QueryTask")],
c);var h}(l.declared(c))})},"esri/tasks/Task":function(){define(["dojo/_base/lang","../core/Accessor","../core/urlUtils"],function(a,h,n){return h.createSubclass({declaredClass:"esri.tasks.Task",normalizeCtorArgs:function(e,k){if("string"!==typeof e)return e;var h={};e&&(h.url=e);k&&a.mixin(h,k);return h},properties:{normalization:{value:!0},parsedUrl:{value:null,readOnly:!0,dependsOn:["url"],get:function(){return this._parseUrl(this.url)}},requestOptions:{value:null},url:{value:null,type:String}},
_parseUrl:function(a){return a?n.urlToObject(a):null},_useSSL:function(){var a=this.parsedUrl,k=/^http:/i;this.url&&this.set("url",this.url.replace(k,"https:"));a&&a.path&&(a.path=a.path.replace(k,"https:"))},_encode:function(e,k,h){var l,g,c={},b,f;for(b in e)if("declaredClass"!==b&&(l=e[b],g=typeof l,null!==l&&void 0!==l&&"function"!==g))if(a.isArray(l))for(c[b]=[],f=l.length,g=0;g<f;g++)c[b][g]=this._encode(l[g]);else"object"===g?l.toJSON&&(g=l.toJSON(h&&h[b]),"esri.tasks.support.FeatureSet"===
l.declaredClass&&g.spatialReference&&(g.sr=g.spatialReference,delete g.spatialReference),c[b]=k?g:JSON.stringify(g)):c[b]=l;return c}})})},"esri/tasks/support/FeatureSet":function(){define("../../core/kebabDictionary ../../core/JSONSupport ../../core/lang ../../Graphic ../../layers/support/Field ../../geometry/SpatialReference ../../geometry/support/graphicsUtils ../../geometry/support/jsonUtils dojo/_base/lang".split(" "),function(a,h,n,e,k,l,q,g,c){a=a({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",
esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent"});return h.createSubclass({declaredClass:"esri.tasks.support.FeatureSet",getDefaults:function(){return c.mixin(this.inherited(arguments),{features:[]})},properties:{displayFieldName:null,exceededTransferLimit:null,features:{value:null,json:{read:function(a,c){var b=l.fromJSON(c.spatialReference);a=a.map(function(a){var c=e.fromJSON(a);a=a.geometry&&a.geometry.spatialReference;c.geometry&&!a&&(c.geometry.spatialReference=
b);return c});c.transform&&this._hydrate(c.transform,c.geometryType,a);return a}}},fields:{value:null,type:[k]},geometryType:{value:null,json:{read:a.fromJSON}},spatialReference:{type:l}},toJSON:function(a){var b={hasZ:this.hasZ,hasM:this.hasM};this.displayFieldName&&(b.displayFieldName=this.displayFieldName);this.fields&&(b.fields=this.fields.map(function(a){return a.toJSON()}));this.spatialReference?b.spatialReference=this.spatialReference.toJSON():this.features[0]&&this.features[0].geometry&&(b.spatialReference=
this.features[0].geometry.spatialReference.toJSON());this.features[0]&&(this.features[0].geometry&&(b.geometryType=g.getJsonType(this.features[0].geometry)),b.features=q._encodeGraphics(this.features,a));b.exceededTransferLimit=this.exceededTransferLimit;b.transform=this.transform;return n.fixJson(b)},quantize:function(a){var b=a.translate[0],c=a.translate[1],e=a.scale[0],g=a.scale[1],k=this.features,h=function(a,b,c){var d,e,f,g,k,h,m=[];d=0;for(e=a.length;d<e;d++)if(f=a[d],0<d){if(h=b(f[0]),f=c(f[1]),
h!==g||f!==k)m.push([h-g,f-k]),g=h,k=f}else g=b(f[0]),k=c(f[1]),m.push([g,k]);return 0<m.length?m:null},l=function(a,b,c){if("point"===a)return function(a){a.x=b(a.x);a.y=c(a.y);return a};if("polyline"===a||"polygon"===a)return function(a){var d,e,f,g,k;f=a.rings||a.paths;k=[];d=0;for(e=f.length;d<e;d++)g=f[d],(g=h(g,b,c))&&k.push(g);return 0<k.length?(a.rings?a.rings=k:a.paths=k,a):null};if("multipoint"===a)return function(a){var d;d=h(a.points,b,c);return 0<d.length?(a.points=d,a):null};if("extent"===
a)return function(a){return a}}(this.geometryType,function(a){return Math.round((a-b)/e)},function(a){return Math.round((c-a)/g)}),p,d;p=0;for(d=k.length;p<d;p++)l(k[p].geometry)||(k.splice(p,1),p--,d--);this.transform=a;return this},_hydrate:function(a,c,e){if(a){var b=a.translate[0],f=a.translate[1],g=a.scale[0],k=a.scale[1],h=function(a,b,c){if("esriGeometryPoint"===a)return function(a){a.x=b(a.x);a.y=c(a.y)};if("esriGeometryPolyline"===a||"esriGeometryPolygon"===a)return function(a){a=a.rings||
a.paths;var d,e,f,g,k,h,m,l;d=0;for(e=a.length;d<e;d++)for(k=a[d],f=0,g=k.length;f<g;f++)h=k[f],0<f?(m+=h[0],l+=h[1]):(m=h[0],l=h[1]),h[0]=b(m),h[1]=c(l)};if("esriGeometryEnvelope"===a)return function(a){a.xmin=b(a.xmin);a.ymin=c(a.ymin);a.xmax=b(a.xmax);a.ymax=c(a.ymax)};if("esriGeometryMultipoint"===a)return function(a){a=a.points;var d,e,f,g,k;d=0;for(e=a.length;d<e;d++)f=a[d],0<d?(g+=f[0],k+=f[1]):(g=f[0],k=f[1]),f[0]=b(g),f[1]=c(k)}}(c,function(a){return a*g+b},function(a){return f-a*k});a=0;
for(c=e.length;a<c;a++)e[a].geometry&&h(e[a].geometry)}}})})},"esri/layers/support/Field":function(){define("require exports ../../core/tsSupport/extendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport ../../core/kebabDictionary ./domains".split(" "),function(a,h,n,e,k,l,q,g){var c=q({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",
esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"});return function(a){function b(b){b=a.call(this)||this;b.alias=null;b.domain=null;b.editable=!1;b.length=-1;b.name=null;b.nullable=!0;b.type=null;return b}n(b,a);h=b;b.prototype.readDomain=function(a){var b=a&&a.type;return"range"===b?g.RangeDomain.fromJSON(a):"codedValue"===b?g.CodedValueDomain.fromJSON(a):
null};b.prototype.clone=function(){return new h({alias:this.alias,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type})};e([k.property({type:String,json:{write:!0}})],b.prototype,"alias",void 0);e([k.property({types:g.types,json:{write:!0}})],b.prototype,"domain",void 0);e([k.reader("domain")],b.prototype,"readDomain",null);e([k.property({type:Boolean,json:{write:!0}})],b.prototype,"editable",void 0);e([k.property({type:Number,
json:{write:!0}})],b.prototype,"length",void 0);e([k.property({type:String,json:{write:!0}})],b.prototype,"name",void 0);e([k.property({type:Boolean,json:{write:!0}})],b.prototype,"nullable",void 0);e([k.property({type:String,json:{read:c.read,write:c.write}})],b.prototype,"type",void 0);return b=h=e([k.subclass("esri.layers.support.Field")],b);var h}(k.declared(l))})},"esri/layers/support/domains":function(){define("require exports ./Domain ./RangeDomain ./CodedValueDomain ./InheritedDomain".split(" "),
function(a,h,n,e,k,l){Object.defineProperty(h,"__esModule",{value:!0});h.DomainBase=n;h.RangeDomain=e;h.CodedValueDomain=k;h.InheritedDomain=l;h.types={key:"type",base:h.DomainBase,typeMap:{range:h.RangeDomain,"coded-value":h.CodedValueDomain}}})},"esri/layers/support/Domain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport ../../core/kebabDictionary".split(" "),function(a,
h,n,e,k,l,q){var g=q({inherited:"inherited",codedValue:"coded-value",range:"range"});return function(a){function b(b){b=a.call(this,b)||this;b.name=null;b.type=null;return b}n(b,a);e([k.property({json:{write:!0}})],b.prototype,"name",void 0);e([k.property({json:{read:g.read,write:g.write}})],b.prototype,"type",void 0);return b=e([k.subclass("esri.layers.support.Domain")],b)}(k.declared(l))})},"esri/layers/support/RangeDomain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Domain".split(" "),
function(a,h,n,e,k,l){return function(a){function g(b){b=a.call(this,b)||this;b.maxValue=null;b.minValue=null;b.type="range";return b}n(g,a);c=g;g.prototype.clone=function(){return new c({maxValue:this.maxValue,minValue:this.minValue,name:this.name})};e([k.property({json:{read:{source:"range",reader:function(a,c){return c.range&&c.range[1]}},write:{target:"range",writer:function(a,c,e){c[e]=[this.minValue,a]}}}})],g.prototype,"maxValue",void 0);e([k.property({json:{read:{source:"range",reader:function(a,
c){return c.range&&c.range[0]}},write:{target:"range",writer:function(a,c,e){c[e]=[a,this.maxValue]}}}})],g.prototype,"minValue",void 0);e([k.property()],g.prototype,"type",void 0);return g=c=e([k.subclass("esri.layers.support.RangeDomain")],g);var c}(k.declared(l))})},"esri/layers/support/CodedValueDomain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Domain ../../core/lang".split(" "),function(a,
h,n,e,k,l,q){return function(a){function c(b){b=a.call(this,b)||this;b.codedValues=null;b.type="coded-value";return b}n(c,a);b=c;c.prototype.writeCodedValues=function(a,b){var c=null;a&&(c=a.map(function(a){return q.fixJson(q.clone(a))}));b.codedValues=c};c.prototype.getName=function(a){var b=null;if(this.codedValues){var c=String(a);this.codedValues.some(function(a){String(a.code)===c&&(b=a.name);return!!b})}return b};c.prototype.clone=function(){return new b({codedValues:q.clone(this.codedValues),
name:this.name})};e([k.property({json:{write:!0}})],c.prototype,"codedValues",void 0);e([k.writer("codedValues")],c.prototype,"writeCodedValues",null);e([k.property()],c.prototype,"type",void 0);return c=b=e([k.subclass("esri.layers.support.CodedValueDomain")],c);var b}(k.declared(l))})},"esri/layers/support/InheritedDomain":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Domain".split(" "),function(a,
h,n,e,k,l){return function(a){function g(b){b=a.call(this,b)||this;b.type="inherited";return b}n(g,a);c=g;g.prototype.clone=function(){return new c};e([k.property()],g.prototype,"type",void 0);return g=c=e([k.subclass("esri.layers.support.InheritedDomain")],g);var c}(k.declared(l))})},"esri/geometry/support/graphicsUtils":function(){define(["require","exports","dojo/_base/array","../Extent","../../core/Collection"],function(a,h,n,e,k){Object.defineProperty(h,"__esModule",{value:!0});h.graphicsExtent=
function(a){if(!a||!a.length)return null;var h=k.isCollection(a)?a.getItemAt(0).geometry:a[0].geometry,g=h.extent,c=h;null===g&&(g=new e(c.x,c.y,c.x,c.y,h.spatialReference));for(var b=1;b<a.length;b++){var c=h=k.isCollection(a)?a.getItemAt(b).geometry:a[b].geometry,f=h.extent;null===f&&(f=new e(c.x,c.y,c.x,c.y,h.spatialReference));g=g.clone().union(f)}return 0>g.width&&0>g.height?null:g};h.getGeometries=function(a){return n.map(a,function(a){return a.geometry})};h._encodeGraphics=function(a,e){var g=
[];n.forEach(a,function(a,b){a=a.toJSON();var c={};if(a.geometry){var k=e&&e[b];c.geometry=k&&k.toJSON()||a.geometry}a.attributes&&(c.attributes=a.attributes);g[b]=c});return g}})},"esri/tasks/support/Query":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../TimeExtent ../../core/accessorSupport/decorators ../../core/JSONSupport ../../core/lang ../../core/kebabDictionary ../../geometry/SpatialReference ../../geometry/support/typeUtils ../../geometry/support/jsonUtils ../../symbols/support/typeUtils ../../symbols/support/jsonUtils ./QuantizationParameters ./StatisticDefinition".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t){var u=c({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),p=c({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",
esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});return function(a){function c(b){b=a.call(this,b)||this;b.distance=void 0;b.geometry=null;b.geometryPrecision=void 0;b.groupByFieldsForStatistics=null;b.maxAllowableOffset=void 0;b.multipatchOption=null;b.num=void 0;b.objectIds=null;b.orderByFields=null;b.outFields=null;b.outSpatialReference=null;b.outStatistics=null;b.pixelSize=null;b.quantizationParameters=null;b.relationParameter=null;b.resultType=null;b.returnDistinctValues=
!1;b.returnGeometry=!1;b.returnCentroid=!1;b.returnExceededLimitFeatures=!0;b.returnJSON=!1;b.returnM=!1;b.returnZ=!1;b.spatialRelationship="intersects";b.start=void 0;b.sqlFormat=null;b.text=null;b.timeExtent=null;b.units="meters";b.where=null;return b}n(c,a);d=c;c.prototype.writeStart=function(a,b,c){b.resultOffset=this.start;b.resultRecordCount=this.num||10;b.where="1\x3d1"};c.prototype.writeWhere=function(a,b,c){b.where=a||"1\x3d1"};c.prototype.clone=function(){return new d(g.clone({distance:this.distance,
geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,maxAllowableOffset:this.maxAllowableOffset,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,relationParameter:this.relationParameter,resultType:this.resultType,
returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnJSON:this.returnJSON,returnM:this.returnM,returnZ:this.returnZ,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.text,text:this.text,timeExtent:this.timeExtent,units:this.units,where:this.where}))};e([l.property({type:Number,json:{write:!0}})],c.prototype,"distance",void 0);e([l.property({types:f.types,
json:{read:r.fromJSON,write:!0}})],c.prototype,"geometry",void 0);e([l.property({type:Number,json:{write:!0}})],c.prototype,"geometryPrecision",void 0);e([l.property({type:[String],json:{write:!0}})],c.prototype,"groupByFieldsForStatistics",void 0);e([l.property({type:Number,json:{write:!0}})],c.prototype,"maxAllowableOffset",void 0);e([l.property({type:String,json:{write:!0}})],c.prototype,"multipatchOption",void 0);e([l.property({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,
"num",void 0);e([l.property({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0);e([l.property({type:[String],json:{write:!0}})],c.prototype,"orderByFields",void 0);e([l.property({type:[String],json:{write:!0}})],c.prototype,"outFields",void 0);e([l.property({type:b,json:{read:{source:"outSR"},write:{target:"outSR"}}})],c.prototype,"outSpatialReference",void 0);e([l.property({type:[t],json:{write:!0}})],c.prototype,"outStatistics",void 0);e([l.property({types:v.types,json:{read:x.read,
write:!0}})],c.prototype,"pixelSize",void 0);e([l.property({type:w,json:{write:!0}})],c.prototype,"quantizationParameters",void 0);e([l.property({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy:function(a){return{enabled:"relation"===this.spatialRelationship}}}}})],c.prototype,"relationParameter",void 0);e([l.property({type:String,json:{write:!0}})],c.prototype,"resultType",void 0);e([l.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],
c.prototype,"returnDistinctValues",void 0);e([l.property({type:Boolean,json:{write:!0}})],c.prototype,"returnGeometry",void 0);e([l.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,"returnCentroid",void 0);e([l.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:!a}}}}})],c.prototype,"returnExceededLimitFeatures",void 0);e([l.property({type:Boolean,json:{read:!1,write:!1}})],c.prototype,"returnJSON",void 0);e([l.property({type:Boolean,
json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,"returnM",void 0);e([l.property({type:Boolean,json:{write:{overridePolicy:function(a){return{enabled:a}}}}})],c.prototype,"returnZ",void 0);e([l.property({type:String,json:{read:{source:"spatialRel",reader:u.read},write:{target:"spatialRel",writer:u.write}}})],c.prototype,"spatialRelationship",void 0);e([l.property({type:Number})],c.prototype,"start",void 0);e([l.writer("start"),l.writer("num")],c.prototype,"writeStart",null);
e([l.property({type:String,json:{write:!0}})],c.prototype,"sqlFormat",void 0);e([l.property({type:String,json:{write:!0}})],c.prototype,"text",void 0);e([l.property({type:k,json:{write:!0}})],c.prototype,"timeExtent",void 0);e([l.property({type:String,json:{read:p.read,write:{writer:p.write,overridePolicy:function(a){return{enabled:0<this.distance}}}}})],c.prototype,"units",void 0);e([l.property({type:String,json:{write:{overridePolicy:function(a){return{enabled:null!=a||0<this.start}}}}})],c.prototype,
"where",void 0);e([l.writer("where")],c.prototype,"writeWhere",null);return c=d=e([l.subclass("esri.tasks.support.Query")],c);var d}(l.declared(q))})},"esri/TimeExtent":function(){define("require exports ./core/tsSupport/declareExtendsHelper ./core/tsSupport/decorateHelper ./core/accessorSupport/decorators ./core/JSONSupport".split(" "),function(a,h,n,e,k,l){var q={milliseconds:{getter:"getUTCMilliseconds",setter:"setUTCMilliseconds",multiplier:1},seconds:{getter:"getUTCSeconds",setter:"setUTCSeconds",
multiplier:1},minutes:{getter:"getUTCMinutes",setter:"setUTCMinutes",multiplier:1},hours:{getter:"getUTCHours",setter:"setUTCHours",multiplier:1},days:{getter:"getUTCDate",setter:"setUTCDate",multiplier:1},weeks:{getter:"getUTCDate",setter:"setUTCDate",multiplier:7},months:{getter:"getUTCMonth",setter:"setUTCMonth",multiplier:1},years:{getter:"getUTCFullYear",setter:"setUTCFullYear",multiplier:1},decades:{getter:"getUTCFullYear",setter:"setUTCFullYear",multiplier:10},centuries:{getter:"getUTCFullYear",
setter:"setUTCFullYear",multiplier:100}};return function(a){function c(b,c){b=a.call(this)||this;b.endTime=null;b.startTime=null;return b}n(c,a);b=c;c.prototype.normalizeCtorArgs=function(a,b){return!a||a instanceof Date?{startTime:a,endTime:b}:a};c.prototype.readEndTime=function(a,b){return null!=b.endTime?new Date(b.endTime):null};c.prototype.writeEndTime=function(a,b,c){b.endTime=a?a.getTime():null};c.prototype.readStartTime=function(a,b){return null!=b.startTime?new Date(b.startTime):null};c.prototype.writeStartTime=
function(a,b,c){b.startTime=a?a.getTime():null};c.prototype.clone=function(){return new b({endTime:this.endTime,startTime:this.startTime})};c.prototype.intersection=function(a){if(!a)return null;var c=this.startTime?this.startTime.getTime():-Infinity,e=this.endTime?this.endTime.getTime():Infinity,f=a.startTime?a.startTime.getTime():-Infinity;a=a.endTime?a.endTime.getTime():Infinity;var g,k;f>=c&&f<=e?g=f:c>=f&&c<=a&&(g=c);e>=f&&e<=a?k=e:a>=c&&a<=e&&(k=a);if(isNaN(g)||isNaN(k))return null;c=new b;
c.startTime=-Infinity===g?null:new Date(g);c.endTime=Infinity===k?null:new Date(k);return c};c.prototype.offset=function(a,c){var e=new b,f=this.startTime,g=this.endTime;f&&(e.startTime=this._offsetDate(f,a,c));g&&(e.endTime=this._offsetDate(g,a,c));return e};c.prototype._offsetDate=function(a,b,c){a=new Date(a.getTime());b&&c&&(c=q[c],a[c.setter](a[c.getter]()+b*c.multiplier));return a};e([k.property({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"endTime",void 0);e([k.reader("endTime")],
c.prototype,"readEndTime",null);e([k.writer("endTime")],c.prototype,"writeEndTime",null);e([k.property({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"startTime",void 0);e([k.reader("startTime")],c.prototype,"readStartTime",null);e([k.writer("startTime")],c.prototype,"writeStartTime",null);return c=b=e([k.subclass("esri.TimeExtent")],c);var b}(k.declared(l))})},"esri/tasks/support/QuantizationParameters":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport ../../core/kebabDictionary ../../core/lang ../../geometry/Extent".split(" "),
function(a,h,n,e,k,l,q,g,c){var b=q({upperLeft:"upper-left",lowerLeft:"lower-left"});return function(a){function f(){var b=null!==a&&a.apply(this,arguments)||this;b.extent=null;b.mode="view";b.originPosition="upper-left";return b}n(f,a);h=f;f.prototype.clone=function(){return new h(g.clone({extent:this.extent,mode:this.mode,originPosition:this.originPosition,tolerance:this.tolerance}))};e([k.property({type:c,json:{write:!0}})],f.prototype,"extent",void 0);e([k.property({type:String,json:{write:!0}})],
f.prototype,"mode",void 0);e([k.property({type:String,json:{read:b.read,write:b.write}})],f.prototype,"originPosition",void 0);e([k.property({type:Number,json:{write:!0}})],f.prototype,"tolerance",void 0);return f=h=e([k.subclass("esri.tasks.support.QuantizationParameters")],f);var h}(k.declared(l))})},"esri/tasks/support/StatisticDefinition":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport".split(" "),
function(a,h,n,e,k,l){return function(a){function g(b){b=a.call(this)||this;b.maxPointCount=void 0;b.maxRecordCount=void 0;b.maxVertexCount=void 0;b.onStatisticField=null;b.outStatisticFieldName=null;b.statisticType=null;return b}n(g,a);c=g;g.prototype.clone=function(){return new c({maxPointCount:this.maxPointCount,maxRecordCount:this.maxRecordCount,maxVertexCount:this.maxVertexCount,onStatisticField:this.onStatisticField,outStatisticFieldName:this.outStatisticFieldName,statisticType:this.statisticType})};
e([k.property({type:Number,json:{write:!0}})],g.prototype,"maxPointCount",void 0);e([k.property({type:Number,json:{write:!0}})],g.prototype,"maxRecordCount",void 0);e([k.property({type:Number,json:{write:!0}})],g.prototype,"maxVertexCount",void 0);e([k.property({type:String,json:{write:!0}})],g.prototype,"onStatisticField",void 0);e([k.property({type:String,json:{write:!0}})],g.prototype,"outStatisticFieldName",void 0);e([k.property({type:String,json:{write:!0}})],g.prototype,"statisticType",void 0);
return g=c=e([k.subclass("esri.tasks.support.StatisticDefinition")],g);var c}(k.declared(l))})},"esri/geometry/support/normalizeUtils":function(){define("require exports ../../core/Error ../../core/Logger ../../core/promiseUtils ../../config ../../tasks/GeometryService ../Polygon ../Polyline ../SpatialReference ./webMercatorUtils ./spatialReferenceUtils".split(" "),function(a,h,n,e,k,l,q,g,c,b,f,r){function v(a){return"polygon"===a.type?a.rings:a.paths}function x(a,b){return Math.ceil((a-b)/(2*b))}
function w(a,b){for(var c=v(a),d=0;d<c.length;d++)for(var e=c[d],f=0;f<e.length;f++){var g=a.getPoint(d,f);a.setPoint(d,f,g.clone().offset(b,0))}return a}function t(a){for(var b=[],c=0,d=0,e=0;e<a.length;e++){for(var f=a[e],g=null,k=0;k<f.length;k++)g=f[k],b.push(g),0===k?d=c=g[0]:(c=Math.min(c,g[0]),d=Math.max(d,g[0]));g&&b.push([(c+d)/2,0])}return b}function u(a,b){if(!(a instanceof c||a instanceof g))throw y.error("straightLineDensify: the input geometry is neither polyline nor polygon"),new n("straightLineDensify: the input geometry is neither polyline nor polygon");
for(var d=[],e=0,f=v(a);e<f.length;e++){var k=f[e],h=[];d.push(h);h.push([k[0][0],k[0][1]]);for(var m=0;m<k.length-1;m++){var l=k[m][0],p=k[m][1],q=k[m+1][0],u=k[m+1][1],t=Math.sqrt((q-l)*(q-l)+(u-p)*(u-p)),x=(u-p)/t,r=(q-l)/t,w=t/b;if(1<w){for(var z=1;z<=w-1;z++){var A=z*b;h.push([r*A+l,x*A+p])}t=(t+Math.floor(w-1)*b)/2;h.push([r*t+l,x*t+p])}h.push([q,u])}}return"polygon"===a.type?new g({rings:d,spatialReference:a.spatialReference}):new c({paths:d,spatialReference:a.spatialReference})}function p(a,
b,c){b&&(a=u(a,1E6),a=f.webMercatorToGeographic(a,!0));c&&(a=w(a,c));return a}function d(a,b,c){if(Array.isArray(a)){var d=a[0];if(d>b){var e=x(d,b);a[0]=d+-2*e*b}else d<c&&(e=x(d,c),a[0]=d+-2*e*c)}else d=a.x,d>b?(e=x(d,b),a=a.clone().offset(-2*e*b,0)):d<c&&(e=x(d,c),a=a.clone().offset(-2*e*c,0));return a}function m(a,b){var c=-1;b.cutIndexes.forEach(function(d,e){var f=b.geometries[e];v(f).forEach(function(a,b){a.some(function(c){if(!(180>c[0])){for(var d=c=0;d<a.length;d++){var e=a[d][0];c=e>c?
e:c}c=Number(c.toFixed(9));c=-360*x(c,180);for(d=0;d<a.length;d++)e=f.getPoint(b,d),f.setPoint(b,d,e.clone().offset(c,0))}return!0})});if(d===c)if("polygon"===a[0].type){e=0;for(var g=v(f);e<g.length;e++)a[d]=a[d].addRing(g[e])}else{if("polyline"===a[0].type)for(e=0,g=v(f);e<g.length;e++)a[d]=a[d].addPath(g[e])}else c=d,a[d]=f});return a}Object.defineProperty(h,"__esModule",{value:!0});var y=e.getLogger("esri.geometry.support.normalizeUtils");h.straightLineDensify=u;var z;h.normalizeCentralMeridian=
function(a,e){e||(z||(z=new q({url:l.geometryServiceUrl})),e=z);for(var h,n,u,t,v,y,A,C,Y=0,D=[],S=a.map(function(a){if(!a)return a;h||(h=a.spatialReference,n=r.getInfo(h),t=(u=h.isWebMercator)?2.0037508342788905E7:180,v=u?-2.0037508342788905E7:-180,y=u?102100:4326,A=new c({paths:[[[t,v],[t,t]]],spatialReference:new b({wkid:y})}),C=new c({paths:[[[v,v],[v,t]]],spatialReference:new b({wkid:y})}));if(!n)return a;if("point"===a.type)return d(a.clone(),t,v);if("multipoint"===a.type){var e=a.clone();e.points=
e.points.map(function(a){return d(a,t,v)});return e}if("extent"===a.type)return e=a.clone(),e=e._normalize(!1,!1,n),e.rings?new g(e):e;if(a.extent){var e=a.extent,f=2*x(e.xmin,v)*t;a=0===f?a.clone():w(a.clone(),f);e.offset(f,0);return e.intersects(A)&&e.xmax!==t?(Y=e.xmax>Y?e.xmax:Y,a=p(a,u),D.push(a),"cut"):e.intersects(C)&&e.xmin!==v?(Y=2*e.xmax*t>Y?2*e.xmax*t:Y,a=p(a,u,360),D.push(a),"cut"):a}return a.clone()}),L=x(Y,t),M=-90,ca=L,N=new c;0<L;){var U=-180+360*L;N.addPath([[U,M],[U,-1*M]]);M*=-1;
L--}return 0<D.length&&0<ca?e.cut(D,N).then(function(a){return m(D,a)}).then(function(b){var c=[],d=S.map(function(d,e){if("cut"!==d)return d;d=b.shift();e=a[e];return"polygon"===e.type&&e.rings&&1<e.rings.length&&d.rings.length>=e.rings.length?(c.push(d),"simplify"):u?f.geographicToWebMercator(d):d});return c.length?e.simplify(c).then(function(a){return d.map(function(b){return"simplify"!==b?b:u?f.geographicToWebMercator(a.shift()):a.shift()})}):S}):k.resolve(S.map(function(a){if("cut"!==a)return a;
a=D.shift();return!0===u?f.geographicToWebMercator(a):a}))};h.getDenormalizedExtent=function(a){if(!a)return null;var b=a.extent;if(!b)return null;var c=a.spatialReference&&r.getInfo(a.spatialReference);if(!c)return b;var c=c.valid,d=c[0],c=c[1],e=b.width,f=b.xmin,g=b.xmax,g=[g,f],f=g[0],g=g[1];if("extent"===a.type||0===e||e<=c||e>2*c||f<d||g>c)return b;var k;switch(a.type){case "polygon":if(1<a.rings.length)k=t(a.rings);else return b;break;case "polyline":if(1<a.paths.length)k=t(a.paths);else return b;
break;case "multipoint":k=a.points}a=b.clone();for(d=0;d<k.length;d++){var h=k[d][0];0>h?(h+=c,g=Math.max(h,g)):(h-=c,f=Math.min(h,f))}a.xmin=f;a.xmax=g;return a.width<e?(a.xmin-=c,a.xmax-=c,a):b}})},"esri/tasks/GeometryService":function(){define("../core/kebabDictionary ../core/accessorSupport/ensureType ../geometry/Extent ../geometry/Multipoint ../geometry/Polyline ../geometry/Polygon ../geometry/support/jsonUtils ../request ./Task ./support/ProjectParameters dojo/_base/lang".split(" "),function(a,
h,n,e,k,l,q,g,c,b,f){var r=a({MGRS:"mgrs",USNG:"usng",UTM:"utm",GeoRef:"geo-ref",GARS:"gars",DMS:"dms",DDM:"ddm",DD:"dd"}),v=h.ensureType(b);a=c.createSubclass({declaredClass:"esri.tasks.GeometryService",areasAndLengths:function(a,b){a={query:f.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),callbackParamName:"callback"};if(this.requestOptions||b)a=f.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/areasAndLengths",a).then(function(a){return a.data})},autoComplete:function(a,
b,c){var e=a[0].spatialReference;a={query:f.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(e.toJSON()),polygons:JSON.stringify(this._encodeGeometries(a).geometries),polylines:JSON.stringify(this._encodeGeometries(b).geometries)}),callbackParamName:"callback"};if(this.requestOptions||c)a=f.mixin({},this.requestOptions,c,a);return g(this.parsedUrl.path+"/autoComplete",a).then(function(a){return(a.data.geometries||[]).map(function(a){return new l({spatialReference:e,rings:a.rings})})})},buffer:function(a,
b){var c=f.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),e=a.outSpatialReference||a.geometries[0].spatialReference;a={query:c,callbackParamName:"callback"};if(this.requestOptions||b)a=f.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/buffer",a).then(function(a){return(a.data.geometries||[]).map(function(a){return new l({spatialReference:e,rings:a.rings})})})},cut:function(a,b,c){var e=a[0].spatialReference,k=a.map(function(a){return a.toJSON()});a={query:f.mixin({},this.parsedUrl.query,
{f:"json",sr:JSON.stringify(e.toJSON()),target:JSON.stringify({geometryType:q.getJsonType(a[0]),geometries:k}),cutter:JSON.stringify(b.toJSON())}),callbackParamName:"callback"};if(this.requestOptions||c)a=f.mixin({},this.requestOptions,c,a);return g(this.parsedUrl.path+"/cut",a).then(function(a){a=a.data;return{cutIndexes:a.cutIndexes,geometries:(a.geometries||[]).map(function(a){return q.fromJSON(a).set("spatialReference",e)})}})},convexHull:function(a,b){var c=a[0].spatialReference;a={query:f.mixin({},
this.parsedUrl.query,{f:"json",sr:JSON.stringify(c.toJSON()),geometries:JSON.stringify(this._encodeGeometries(a))}),callbackParamName:"callback"};if(this.requestOptions||b)a=f.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/convexHull",a).then(function(a){return q.fromJSON(a.data.geometry).set("spatialReference",c)})},densify:function(a,b){var c=f.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),e=a.geometries[0].spatialReference;a={query:c,callbackParamName:"callback"};if(this.requestOptions||
b)a=f.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/densify",a).then(function(a){return(a.data.geometries||[]).map(function(a){return q.fromJSON(a).set("spatialReference",e)})})},difference:function(a,b,c){var e=a[0].spatialReference;a={query:f.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(e.toJSON()),geometries:JSON.stringify(this._encodeGeometries(a)),geometry:JSON.stringify({geometryType:q.getJsonType(b),geometry:b.toJSON()})}),callbackParamName:"callback"};if(this.requestOptions||
c)a=f.mixin({},this.requestOptions,c,a);return g(this.parsedUrl.path+"/difference",a).then(function(a){return(a.data.geometries||[]).map(function(a){return q.fromJSON(a).set("spatialReference",e)})})},distance:function(a,b){a={query:f.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),callbackParamName:"callback"};if(this.requestOptions||b)a=f.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/distance",a).then(this._handleDistanceResponse)},fromGeoCoordinateString:function(a,b){var c=
{};f.isObject(a.sr)?c.sr=a.sr.wkid||JSON.stringify(a.sr.toJSON()):c.sr=a.sr;c.strings=JSON.stringify(a.strings);c.conversionType=r.toJSON(a.conversionType||"mgrs");c.conversionMode=a.conversionMode;a={query:f.mixin({},this.parsedUrl.query,{f:"json"},c),callbackParamName:"callback"};if(this.requestOptions||b)a=f.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/fromGeoCoordinateString",a).then(this._handleFromGeoCoordinateResponse)},generalize:function(a,b){var c=f.mixin({},this.parsedUrl.query,
{f:"json"},a.toJSON()),e=a.geometries[0].spatialReference;a={query:c,callbackParamName:"callback"};if(this.requestOptions||b)a=f.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/generalize",a).then(function(a){return(a.data.geometries||[]).map(function(a){return q.fromJSON(a).set("spatialReference",e)})})},intersect:function(a,b,c){var e=a[0].spatialReference;a={query:f.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(e.toJSON()),geometries:JSON.stringify(this._encodeGeometries(a)),
geometry:JSON.stringify({geometryType:q.getJsonType(b),geometry:b.toJSON()})}),callbackParamName:"callback"};if(this.requestOptions||c)a=f.mixin({},this.requestOptions,c,a);return g(this.parsedUrl.path+"/intersect",a).then(function(a){return(a.data.geometries||[]).map(function(a){return q.fromJSON(a).set("spatialReference",e)})})},lengths:function(a,b){a={query:f.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),callbackParamName:"callback"};if(this.requestOptions||b)a=f.mixin({},this.requestOptions,
b,a);return g(this.parsedUrl.path+"/lengths",a).then(function(a){return a.data})},labelPoints:function(a,b){var c=a.map(function(a){return a.toJSON()}),e=a[0].spatialReference;a={query:f.mixin({},this.parsedUrl.query,{f:"json",sr:e.wkid?e.wkid:JSON.stringify(e.toJSON()),polygons:JSON.stringify(c)}),callbackParamName:"callback"};if(this.requestOptions||b)a=f.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/labelPoints",a).then(function(a){return(a.data.labelPoints||[]).map(function(a){return q.fromJSON(a).set("spatialReference",
e)})})},offset:function(a,b){var c=f.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),e=a.geometries[0].spatialReference;a={query:c,callbackParamName:"callback"};if(this.requestOptions||b)a=f.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/offset",a).then(function(a){return(a.data.geometries||[]).map(function(a){return q.fromJSON(a).set("spatialReference",e)})})},project:function(a,b){a=v(a);var c=f.mixin({},a.toJSON(),this.parsedUrl.query,{f:"json"}),e=a.outSpatialReference,
k=q.getJsonType(a.geometries[0]),d=this._decodeGeometries;a={query:c,callbackParamName:"callback"};if(this.requestOptions||b)a=f.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/project",a).then(function(a){return d(a.data,k,e)})},relation:function(a,b){a={query:f.mixin({},this.parsedUrl.query,{f:"json"},a.toJSON()),callbackParamName:"callback"};if(this.requestOptions||b)a=f.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/relation",a).then(this._handleRelationResponse)},
reshape:function(a,b,c){var e=a.spatialReference;a={query:f.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(e.toJSON()),target:JSON.stringify({geometryType:q.getJsonType(a),geometry:a.toJSON()}),reshaper:JSON.stringify(b.toJSON())}),callbackParamName:"callback"};if(this.requestOptions||c)a=f.mixin({},this.requestOptions,c,a);return g(this.parsedUrl.path+"/reshape",a).then(function(a){return q.fromJSON(a.data.geometry).set("spatialReference",e)})},simplify:function(a,b){var c=a[0].spatialReference,
e=f.mixin({},this.parsedUrl.query,{f:"json",sr:c.wkid?c.wkid:JSON.stringify(c.toJSON()),geometries:JSON.stringify(this._encodeGeometries(a))}),k=q.getJsonType(a[0]),d=this._decodeGeometries;a={query:e,callbackParamName:"callback"};if(this.requestOptions||b)a=f.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/simplify",a).then(function(a){return d(a.data,k,c)})},toGeoCoordinateString:function(a,b){var c={};f.isObject(a.sr)?c.sr=a.sr.wkid||JSON.stringify(a.sr.toJSON()):c.sr=a.sr;c.coordinates=
JSON.stringify(a.coordinates);c.conversionType=r.toJSON(a.conversionType||"mgrs");c.conversionMode=a.conversionMode;c.numOfDigits=a.numOfDigits;c.rounding=a.rounding;c.addSpaces=a.addSpaces;a={query:f.mixin({},this.parsedUrl.query,{f:"json"},c),callbackParamName:"callback"};if(this.requestOptions||b)a=f.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/toGeoCoordinateString",a).then(this._handleToGeoCoordinateResponse)},trimExtend:function(a,b){var c=f.mixin({},this.parsedUrl.query,
{f:"json"},a.toJSON()),e=a.sr;a={query:c,callbackParamName:"callback"};if(this.requestOptions||b)a=f.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/trimExtend",a).then(function(a){return(a.data.geometries||[]).map(function(a){return new k({spatialReference:e,paths:a.paths})})})},union:function(a,b){var c=a[0].spatialReference;a={query:f.mixin({},this.parsedUrl.query,{f:"json",sr:JSON.stringify(c.toJSON()),geometries:JSON.stringify(this._encodeGeometries(a))}),callbackParamName:"callback"};
if(this.requestOptions||b)a=f.mixin({},this.requestOptions,b,a);return g(this.parsedUrl.path+"/union",a).then(function(a){return q.fromJSON(a.data.geometry).set("spatialReference",c)})},_handleRelationResponse:function(a){return a.data.relations},_handleDistanceResponse:function(a){return(a=a.data)&&a.distance},_handleToGeoCoordinateResponse:function(a){return a.data.strings},_handleFromGeoCoordinateResponse:function(a){return a.data.coordinates},_encodeGeometries:function(a){var b=[],c,e=a.length;
for(c=0;c<e;c++)b.push(a[c].toJSON());return{geometryType:q.getJsonType(a[0]),geometries:b}},_decodeGeometries:function(a,b,c){var e=q.getGeometryType(b);a=a.geometries;var g=[],d={spatialReference:c.toJSON()},k=f.mixin;a.forEach(function(a,b){g[b]=new e(k(a,d))});return g},_toProjectGeometry:function(a){var b=a.spatialReference.toJSON();return a instanceof n?new l({rings:[[[a.xmin,a.ymin],[a.xmin,a.ymax],[a.xmax,a.ymax],[a.xmax,a.ymin],[a.xmin,a.ymin]]],spatialReference:b}):new k({paths:[[].concat(a.points)],
spatialReference:b})},_fromProjectedGeometry:function(a,b,c){return"extent"===b?(a=a.rings[0],new n(a[0][0],a[0][1],a[2][0],a[2][1],c)):new e({points:a.paths[0],spatialReference:c.toJSON()})}});f.mixin(a,{UNIT_METER:9001,UNIT_GERMAN_METER:9031,UNIT_FOOT:9002,UNIT_SURVEY_FOOT:9003,UNIT_CLARKE_FOOT:9005,UNIT_FATHOM:9014,UNIT_NAUTICAL_MILE:9030,UNIT_SURVEY_CHAIN:9033,UNIT_SURVEY_LINK:9034,UNIT_SURVEY_MILE:9035,UNIT_KILOMETER:9036,UNIT_CLARKE_YARD:9037,UNIT_CLARKE_CHAIN:9038,UNIT_CLARKE_LINK:9039,UNIT_SEARS_YARD:9040,
UNIT_SEARS_FOOT:9041,UNIT_SEARS_CHAIN:9042,UNIT_SEARS_LINK:9043,UNIT_BENOIT_1895A_YARD:9050,UNIT_BENOIT_1895A_FOOT:9051,UNIT_BENOIT_1895A_CHAIN:9052,UNIT_BENOIT_1895A_LINK:9053,UNIT_BENOIT_1895B_YARD:9060,UNIT_BENOIT_1895B_FOOT:9061,UNIT_BENOIT_1895B_CHAIN:9062,UNIT_BENOIT_1895B_LINK:9063,UNIT_INDIAN_FOOT:9080,UNIT_INDIAN_1937_FOOT:9081,UNIT_INDIAN_1962_FOOT:9082,UNIT_INDIAN_1975_FOOT:9083,UNIT_INDIAN_YARD:9084,UNIT_INDIAN_1937_YARD:9085,UNIT_INDIAN_1962_YARD:9086,UNIT_INDIAN_1975_YARD:9087,UNIT_FOOT_1865:9070,
UNIT_RADIAN:9101,UNIT_DEGREE:9102,UNIT_ARCMINUTE:9103,UNIT_ARCSECOND:9104,UNIT_GRAD:9105,UNIT_GON:9106,UNIT_MICRORADIAN:9109,UNIT_ARCMINUTE_CENTESIMAL:9112,UNIT_ARCSECOND_CENTESIMAL:9113,UNIT_MIL6400:9114,UNIT_BRITISH_1936_FOOT:9095,UNIT_GOLDCOAST_FOOT:9094,UNIT_INTERNATIONAL_CHAIN:109003,UNIT_INTERNATIONAL_LINK:109004,UNIT_INTERNATIONAL_YARD:109001,UNIT_STATUTE_MILE:9093,UNIT_SURVEY_YARD:109002,UNIT_50KILOMETER_LENGTH:109030,UNIT_150KILOMETER_LENGTH:109031,UNIT_DECIMETER:109005,UNIT_CENTIMETER:109006,
UNIT_MILLIMETER:109007,UNIT_INTERNATIONAL_INCH:109008,UNIT_US_SURVEY_INCH:109009,UNIT_INTERNATIONAL_ROD:109010,UNIT_US_SURVEY_ROD:109011,UNIT_US_NAUTICAL_MILE:109012,UNIT_UK_NAUTICAL_MILE:109013,UNIT_SQUARE_INCHES:"esriSquareInches",UNIT_SQUARE_FEET:"esriSquareFeet",UNIT_SQUARE_YARDS:"esriSquareYards",UNIT_ACRES:"esriAcres",UNIT_SQUARE_MILES:"esriSquareMiles",UNIT_SQUARE_MILLIMETERS:"esriSquareMillimeters",UNIT_SQUARE_CENTIMETERS:"esriSquareCentimeters",UNIT_SQUARE_DECIMETERS:"esriSquareDecimeters",
UNIT_SQUARE_METERS:"esriSquareMeters",UNIT_ARES:"esriAres",UNIT_HECTARES:"esriHectares",UNIT_SQUARE_KILOMETERS:"esriSquareKilometers"});return a})},"esri/tasks/support/ProjectParameters":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/lang ../../geometry/support/jsonUtils ../../core/JSONSupport ../../core/Logger".split(" "),function(a,h,n,e,k,l,q,g,c){var b=c.getLogger("esri.tasks.support.ProjectParameters");
return function(a){function c(b){b=a.call(this)||this;b.geometries=null;b.outSpatialReference=null;b.transformation=null;b.transformForward=null;return b}n(c,a);Object.defineProperty(c.prototype,"outSR",{get:function(){b.warn("ProjectParameters.outSR is deprecated. Use outSpatialReference instead.");return this.outSpatialReference},set:function(a){b.warn("ProjectParameters.outSR is deprecated. Use outSpatialReference instead.");this.outSpatialReference=a},enumerable:!0,configurable:!0});c.prototype.toJSON=
function(){var a=this.geometries.map(function(a){return a.toJSON()}),b=this.geometries[0],c={};c.outSR=this.outSpatialReference.wkid||JSON.stringify(this.outSpatialReference.toJSON());c.inSR=b.spatialReference.wkid||JSON.stringify(b.spatialReference.toJSON());c.geometries=JSON.stringify({geometryType:q.getJsonType(b),geometries:a});this.transformation&&(c.transformation=this.transformation.wkid||JSON.stringify(this.transformation));l.isDefined(this.transformForward)&&(c.transformForward=this.transformForward);
return c};e([k.property()],c.prototype,"geometries",void 0);e([k.property({json:{read:{source:"outSR"}}})],c.prototype,"outSpatialReference",void 0);e([k.property({json:{read:!1}})],c.prototype,"outSR",null);e([k.property()],c.prototype,"transformation",void 0);e([k.property()],c.prototype,"transformForward",void 0);return c=e([k.subclass("esri.tasks.support.ProjectParameters")],c)}(k.declared(g))})},"esri/layers/graphics/controllers/OnDemandController2D":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ../../../core/Accessor ../../../core/Error ../../../core/Evented ../../../core/HandleRegistry ../../../core/Logger ../../../core/Promise ../../../core/promiseUtils ../../../geometry/Extent ./support/TileSet ../../../views/2d/tiling/TileQueue ../../../views/2d/tiling/TileStrategy ../../../views/2d/tiling/TileInfoView ../../../views/2d/tiling/TileKey ../../support/GraphicsManager ../../support/TileInfo".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t,u,p,d,m){var y=b.getLogger("esri.views.2d.layers.MapImageLayerView2D"),z=function(){function a(){this.key=new p(0,0,0,0)}a.prototype.dispose=function(){};return a}();return function(a){function b(b){var e=a.call(this)||this;e._handles=new c;e._pendingQueries=new Map;e._tileRequests=new Map;e.layer=b.layer;e.layerView=b.layerView;e.graphics=b.graphics;e._tileInfo=m.create({spatialReference:e.layerView.view.spatialReference,size:512});e._tileInfoView=new u(e._tileInfo);
e._tileQueue=new w({tileInfoView:e._tileInfoView,process:function(a){return e._fetchTile(a)}});e._tileSet=new x({layer:e.layer,tileInfo:e._tileInfo});e._graphicsManager=new d({graphics:e.graphics,objectIdField:e.layer.objectIdField});e._tileStrategy=new t({cachePolicy:"purge",acquireTile:function(a){return e._acquireTile(a)},releaseTile:function(a){return e._releaseTile(a)},tileInfoView:e._tileInfoView});e._handles.add([e.layer.watch("definitionExpression",function(){return e.refresh()}),e.layer.on("edits",
function(a){return e._editsHandler(a)})],"layer");return e}n(b,a);b.prototype.destroy=function(){var a=this;this._pendingQueries.forEach(function(a){a.isFulfilled()||a.cancel()});this._tileStrategy.tiles.forEach(function(b){return a._releaseTile(b)});this._handles.destroy();this._graphicsManager.destroy();this._tileStrategy.destroy();this._tileQueue.clear();this._tileRequests.clear()};Object.defineProperty(b.prototype,"graphics",{set:function(a){var b=this,c=this._get("graphics");c!==a&&(this._handles.remove("graphics"),
c&&c.forEach(function(a){return a.layer=null}),a&&(a.forEach(function(a){return a.layer=b.layer}),this._handles.add([a.on("after-add",function(a){return a.item.layer=b.layer}),a.on("after-remove",function(a){return a.item.layer=null})],"graphics")),this._set("graphics",a))},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"updating",{get:function(){return 0<this._tileQueue.length||this.get("_graphicsManager.updating")},enumerable:!0,configurable:!0});b.prototype.update=function(a){var b=
this;this._tileQueue.pause();this._tileQueue.state=a.state;this._tileStrategy.update(a);this._graphicsManager.removeAll();this._tileStrategy.tiles.forEach(function(a){a.featureSet&&b._graphicsManager.add(a.featureSet.features,a.intentId)});this._tileQueue.resume();this.notifyChange("updating")};b.prototype.refresh=function(){var a=this;this._tileQueue.reset();this._tileStrategy.tiles.forEach(function(b){var c=a._graphicsManager.createIntentToAdd();a.notifyChange("updating");var d=a._tileSet.fetch(b.key).then(function(d){a._graphicsManager.remove(b.featureSet.features);
b.intentId=c;b.featureSet=d;a._graphicsManager.add(b.featureSet.features,b.intentId);return b});d.always(function(){a._graphicsManager.removeIntent(c);a.notifyChange("updating")});return d});this.notifyChange("updating")};b.prototype._acquireTile=function(a){var b=this,c=new z;c.key.set(a);a=this._tileQueue.push(c.key).then(function(a){c.attached=!0;c.featureSet=a.featureSet;c.intentId=a.intentId;b._graphicsManager.removeIntent(c.intentId);b.layerView.requestUpdate()});this._tileRequests.set(c,a);
this.notifyChange("updating");return c};b.prototype._releaseTile=function(a){if(this._tileRequests.has(a)){var b=this._tileRequests.get(a);b.isFulfilled()||b.cancel();this._tileRequests.delete(a);this.layerView.requestUpdate()}};b.prototype._fetchTile=function(a){var b=this,c=this._graphicsManager.createIntentToAdd();a=this._tileSet.fetch(a).then(function(a){return{featureSet:a,intentId:c}});a.otherwise(function(a){b._graphicsManager.removeIntent(c);if(a&&"cancel"===a.dojoType)return r.reject(a);
a=new q("ondemandcontroller2d:tile-request-failed","Failed to query for features",{error:a});y.error(a);return r.reject(a)});return a};b.prototype._editsHandler=function(a){var b=this,c=function(a){return a.objectId},d=a.deletedFeatures.map(c);this._graphicsManager.delete(d);a=a.addedFeatures.concat(a.updatedFeatures).map(c);if(a.length){c=this.layer.createQuery();c.objectIds=a;c.outSpatialReference=this._tileInfo.spatialReference;var e=this._graphicsManager.createIntentToAdd(a);a=this.layer.queryFeatures(c);
this._pendingQueries.set(e,a);this.notifyChange("updating");a.then(function(a){return b._refetchHandler(a,e)}).always(function(){b._graphicsManager.removeIntent(e);b._pendingQueries.delete(e);b.notifyChange("updating")})}};b.prototype._refetchHandler=function(a,b){var c=this,d=a.features;if(d){var e=this._tileInfo.spatialReference;a=function(a){var b=a.key.extent,f=new v({xmin:b[0],ymin:b[1],xmax:b[2],ymax:b[3],spatialReference:e});d.forEach(function(b){b.geometry&&f.intersects(b.geometry)&&c._addFeatureToTile(b,
a)})};for(var f=0,g=this._tileStrategy.tiles;f<g.length;f++)a(g[f]);this._graphicsManager.add(d,b)}};b.prototype._addFeatureToTile=function(a,b){var c=b.featureSet.features||[],d=this.layer.objectIdField,e=a.attributes&&a.attributes[d],f;c.some(function(a){(a.attributes&&a.attributes[d])===e&&(f=a);return!!f});f?(f.geometry=a.geometry,f.attributes=a.attributes):c.push(a);b.featureSet.features=c};e([k.property()],b.prototype,"graphics",null);e([k.property()],b.prototype,"layer",void 0);e([k.property()],
b.prototype,"layerView",void 0);e([k.property()],b.prototype,"updating",null);return b=e([k.subclass("esri.layers.graphics.controllers.OnDemandController2D")],b)}(k.declared(l,f,g))})},"esri/layers/graphics/controllers/support/TileSet":function(){define(["require","exports","../../../../geometry/Extent","../../../../tasks/support/QuantizationParameters"],function(a,h,n,e){return function(){function a(a){this.layer=a.layer;this.tileInfo=a.tileInfo}a.prototype.fetch=function(a){return this._queryTile(a)};
a.prototype._queryTile=function(a){return this.layer.queryFeatures(this._createQuery(a))};a.prototype._createQuery=function(a){this.tileInfo.updateTileInfo(a);var e=this.tileInfo.spatialReference,g=a.extent,c=g[0],b=g[1],f=g[2],g=g[3],k=this.layer.createQuery();k.geometry=new n({xmin:c,ymin:b,xmax:f,ymax:g,spatialReference:e});k.outSpatialReference=e;this._setResolutionParams(k,a);return k};a.prototype._setResolutionParams=function(a,k){var g=this.layer,c=g.geometryType;if("polyline"===c||"polygon"===
c)k=this.tileInfo.lodAt(k.level).resolution,"polyline"===c&&(a.maxAllowableOffset=k),g.get("capabilities.query.supportsQuantization")&&(a.quantizationParameters=new e({mode:"view",originPosition:"upper-left",tolerance:k,extent:g.fullExtent}))};return a}()})},"esri/views/2d/tiling/TileQueue":function(){define(["require","exports","../../../core/QueueProcessor"],function(a,h,n){function e(a,c){a.length=0;c.forEach(function(b){return a.push(b)});return a}var k=new Set,l=[],q=new Map;return function(){function a(a){var b=
this;this.tileInfoView=a.tileInfoView;this._queue=new n({concurrency:a.concurrency||6,process:a.process,peeker:function(a){return b._peek(a)}})}Object.defineProperty(a.prototype,"length",{get:function(){return this._queue.length},enumerable:!0,configurable:!0});a.prototype.clear=function(){this._queue.clear()};a.prototype.find=function(a,b){return this._queue.find(a)};a.prototype.has=function(a){return this._queue.has(a)};a.prototype.pause=function(){return this._queue.pause()};a.prototype.push=function(a){return this._queue.push(a)};
a.prototype.reset=function(){return this._queue.reset()};a.prototype.resume=function(){return this._queue.resume()};a.prototype._peek=function(a){var b=this;if(!this.state)return a[0];var c=this.tileInfoView,g=Number.NEGATIVE_INFINITY,h=Number.POSITIVE_INFINITY;a.forEach(function(a){var c=b.tileInfoView.getTileScale(a);q.has(c)||(q.set(c,[]),g=Math.max(c,g),h=Math.min(c,h));q.get(c).push(a);k.add(c)});var n=this.state.scale;q.has(n)||(e(l,k),l.sort(),n=l.reduce(function(a,b,c,e){return Math.abs(b-
n)<Math.abs(a-n)?b:a},l[0]));n=Math.min(n,g);n=Math.max(n,h);a=q.get(n);var w=c.getClosestInfoForScale(n),t=w.getColumnForX(this.state.center[0]),u=w.getRowForY(this.state.center[1]);a.sort(function(a,b){var c=w.denormalizeCol(a.col,a.world),d=w.denormalizeCol(b.col,b.world);return Math.sqrt((t-c)*(t-c)+(u-a.row)*(u-a.row))-Math.sqrt((t-d)*(t-d)+(u-b.row)*(u-b.row))});k.clear();q.clear();return a[0]};return a}()})},"esri/core/QueueProcessor":function(){define(["require","exports","dojo/Deferred",
"./Queue"],function(a,h,n,e){var k={};return function(){function a(a){this._apiPromises=new Map;this._resolvingPromises=new Map;this._isPaused=!1;this.concurrency=1;a.concurrency&&(this.concurrency=a.concurrency);this._queue=new e(a.peeker?{peeker:a.peeker}:void 0);this.process=a.process}Object.defineProperty(a.prototype,"length",{get:function(){return this._resolvingPromises.size+this._queue.length},enumerable:!0,configurable:!0});a.prototype.clear=function(){this._queue.clear();var a=[];this._resolvingPromises.forEach(function(e){return a.push(e)});
this._resolvingPromises.clear();a.forEach(function(a){return a.cancel()});a.length=0;this._apiPromises.forEach(function(e){return a.push(e)});this._apiPromises.clear();a.forEach(function(a){return a.cancel()})};a.prototype.find=function(a,e){var c=this,b=void 0;this._apiPromises.forEach(function(f,g){a.call(e,g)&&(b=c._apiPromises.get(g).promise)});return b};a.prototype.has=function(a){return this._apiPromises.has(a)};a.prototype.pause=function(){this._isPaused=!0};a.prototype.push=function(a){var e=
this;if(this._apiPromises.has(a))return this._apiPromises.get(a).promise;var c=new n(function(b){e._resolvingPromises.has(a)?e._resolvingPromises.get(a).cancel(b):(e._remove(a),e._scheduleNext())});this._add(a,c);this._scheduleNext();return c.promise};a.prototype.reset=function(){var a=[];this._resolvingPromises.forEach(function(e){return a.push(e)});this._resolvingPromises.clear();a.forEach(function(a){return a.cancel(k)})};a.prototype.resume=function(){this._isPaused=!1;this._scheduleNext()};a.prototype._scheduleNext=
function(){this._isPaused||this._next()};a.prototype._next=function(){this._resolvingPromises.size!==this.concurrency&&this._process(this._queue.pop())};a.prototype._process=function(a){var e=this;if(null!=a){var c=this._apiPromises.get(a),b=this.process(a);b&&"function"===typeof b.then?(this._resolvingPromises.set(a,b),b.then(function(b){c.resolve(b);e._remove(a);e._scheduleNext()},function(b){b===k?e._process(a):(c.reject(b),e._remove(a),e._scheduleNext())})):(c.resolve(b),this._remove(a));this._scheduleNext()}};
a.prototype._add=function(a,e){this._apiPromises.set(a,e);this._queue.push(a)};a.prototype._remove=function(a){this._queue.remove(a);this._apiPromises.delete(a);this._resolvingPromises.delete(a)};return a}()})},"esri/core/Queue":function(){define(["require","exports"],function(a,h){return function(){function a(a){this._items=[];this._itemSet=new Set;this._peeker=function(a){return a[0]};this._length=0;a&&a.peeker&&(this._peeker=a.peeker)}Object.defineProperty(a.prototype,"length",{get:function(){return this._length},
enumerable:!0,configurable:!0});a.prototype.clear=function(){this._itemSet.clear();this._length=this._items.length=0};a.prototype.peek=function(){if(0!==this._length)return this._peeker(this._items)};a.prototype.push=function(a){this.contains(a)||this._add(a)};a.prototype.contains=function(a){return 0<this._length&&this._itemSet.has(a)};a.prototype.pop=function(){if(0!==this._length){var a=this.peek();this._remove(a);return a}};a.prototype.remove=function(a){this.contains(a)&&this._remove(a)};a.prototype._add=
function(a){this._items.push(a);this._itemSet.add(a);this._length++};a.prototype._remove=function(a){this._itemSet.delete(a);this._items.splice(this._items.indexOf(a),1);this._length--};return a}()})},"esri/views/2d/tiling/TileStrategy":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","./TileKey"],function(a,h,n,e){var k=new e(0,0,0,0),l=new Map,q=[],g=[];return function(){function a(a){this._previousResolution=Number.POSITIVE_INFINITY;this.cachePolicy="keep";this.tileIndex=
new Map;this.tiles=[];this.acquireTile=a.acquireTile;this.releaseTile=a.releaseTile;this.tileInfoView=a.tileInfoView;a.cachePolicy&&(this.cachePolicy=a.cachePolicy)}a.prototype.destroy=function(){this.tileIndex.clear()};a.prototype.update=function(a){var b=this,c=this.tileIndex,e=this.tileInfoView.getTileCoverage(a.state);if(e){var h=e.spans,n=e.lodInfo,t=n.level,u=a.state.resolution,p=!a.stationary&&u>this._previousResolution;this._previousResolution=u;c.forEach(function(a){return a.visible=!0});
this.tiles.length=0;l.clear();var d=0,m=0;if(0<h.length)for(var y=0;y<h.length;y++){a=h[y];for(var z=a.row,A=a.colTo,C=a.colFrom;C<=A;C++)d++,a=k.set(t,z,n.normalizeCol(C),n.getWorldForColumn(C)).id,c.has(a)?(u=c.get(a),u.attached?(l.set(a,u),m++):u.attached||p||this._addParentTile(a,l)):(u=this.acquireTile(k),this.tileIndex.set(a,u),p||this._addParentTile(a,l))}var G=m===d;g.length=0;q.length=0;c.forEach(function(a,c){k.set(c);if(!l.has(c)){var d=b.tileInfoView.intersects(e,k);!d||!p&&G?"purge"===
b.cachePolicy?q.push(c):(k.level>t||!d)&&q.push(c):a.attached?g.push(c):p&&q.push(c)}});for(h=0;h<g.length;h++)a=g[h],(u=c.get(a))&&u.attached&&l.set(a,u);for(h=0;h<q.length;h++)a=q[h],u=c.get(a),this.releaseTile(u),c["delete"](a);l.forEach(function(a){return b.tiles.push(a)});c.forEach(function(a){l.has(a.key.id)||(a.visible=!1)});g.length=0;q.length=0;l.clear()}};a.prototype.clear=function(){var a=this,c=this.tileIndex;c.forEach(function(b){a.releaseTile(b)});c.clear()};a.prototype._addParentTile=
function(a,c){for(var b=null;;){a=this.tileInfoView.getTileParentId(a);if(!a)break;if(this.tileIndex.has(a)&&(b=this.tileIndex.get(a))&&b.attached){c.has(b.key.id)||c.set(b.key.id,b);break}}};return a}()})},"esri/views/2d/tiling/TileKey":function(){define(["require","exports","../../../core/ObjectPool"],function(a,h,n){return function(){function a(a,e,h,g){"string"===typeof a?(a=a.split("/"),e=a[1],h=a[2],g=a[3],this.level=+a[0],this.row=+e,this.col=+h,this.world=+g||0):a&&"object"===typeof a?(this.level=
a.level||0,this.row=a.row||0,this.col=a.col||0,this.world=a.world||0):(this.level=+a||0,this.row=+e||0,this.col=+h||0,this.world=+g||0)}a.from=function(e,h,n,g){return a.pool.acquire(e,h,n,g)};a.getId=function(a,e,h,g){return"object"===typeof a?a.level+"/"+a.row+"/"+a.col+"/"+a.world:a+"/"+e+"/"+h+"/"+g};Object.defineProperty(a.prototype,"id",{get:function(){return a.getId(this)},enumerable:!0,configurable:!0});a.prototype.equals=function(a){return this.level===a.level&&this.row===a.row&&this.col===
a.col&&this.world===a.world};a.prototype.release=function(){this.world=this.col=this.row=this.level=0};a.prototype.set=function(a,e,h,g){var c=typeof a;"object"===c?(this.level=a.level||0,this.row=a.row||0,this.col=a.col||0,this.world=a.world||0):"string"===c?(a=a.split("/"),e=a[1],h=a[2],g=a[3],this.level=parseFloat(a[0]),this.row=parseFloat(e),this.col=parseFloat(h),this.world=parseFloat(g)):(this.level=a,this.row=e,this.col=h,this.world=g);return this};a.prototype.toString=function(){return this.level+
"/"+this.row+"/"+this.col+"/"+this.world};a.pool=new n(a,!0,null,25,50);return a}()})},"esri/views/2d/tiling/TileInfoView":function(){define("require exports ./LODInfo ./TileKey ./TileSpan ./TileCoverage".split(" "),function(a,h,n,e,k,l){var q=function(){function a(a,c,e,g,k,h,l,n){this.x=a;this.ymin=c;this.ymax=e;this.invM=g;this.leftAdjust=k;this.rightAdjust=h;this.leftBound=l;this.rightBound=n}a.create=function(b,c){b[1]>c[1]&&(l=[c,b],b=l[0],c=l[1]);l=b[0];b=b[1];var e=c[0];c=c[1];var f=e-l,g=
c-b,g=0!==g?f/g:0,k=(Math.ceil(b)-b)*g,h=(Math.floor(b)-b)*g;return new a(l,Math.floor(b),Math.ceil(c),g,0>f?k:h,0>f?h:k,0>f?e:l,0>f?l:e);var l};a.prototype.incrRow=function(){this.x+=this.invM};a.prototype.getLeftCol=function(){return Math.max(this.x+this.leftAdjust,this.leftBound)};a.prototype.getRightCol=function(){return Math.min(this.x+this.rightAdjust,this.rightBound)};return a}(),g=[[0,0],[0,0],[0,0],[0,0]];return function(){function a(a,c){var b=this;this.tileInfo=a;this.fullExtent=c;this.scales=
[];this._lodInfos=null;this._infoByScale={};this._infoByLevel={};var e=a.lods.slice();e.sort(function(a,b){return b.scale-a.scale});var f=this._lodInfos=e.map(function(b){return n.create(a,b,c)});e.forEach(function(a,c){b._infoByLevel[a.level]=f[c];b._infoByScale[a.scale]=f[c];b.scales[c]=a.scale},this);this._wrap=a.isWrappable}a.prototype.getTileBounds=function(a,c){var b=this._infoByLevel[c.level];return b?b.getTileBounds(a,c):a};a.prototype.getTileCoords=function(a,c){var b=this._infoByLevel[c.level];
return b?b.getTileCoords(a,c):a};a.prototype.getTileCoverage=function(a){var b=this.getClosestInfoForScale(a.scale),c=l.pool.acquire(b),e=this._wrap,h;h=Infinity;var n=-Infinity,t,u,p=c.spans;g[0][0]=g[0][1]=g[1][1]=g[3][0]=0;g[1][0]=g[2][0]=a.size[0];g[2][1]=g[3][1]=a.size[1];for(var d=0;d<g.length;d++){var m=g[d];a.toMap(m,m);m[0]=b.getColumnForX(m[0]);m[1]=b.getRowForY(m[1])}a=[];m=3;for(d=0;4>d;d++){if(g[d][1]!==g[m][1]){var y=q.create(g[d],g[m]);h=Math.min(y.ymin,h);n=Math.max(y.ymax,n);void 0===
a[y.ymin]&&(a[y.ymin]=[]);a[y.ymin].push(y)}m=d}if(null==h||null==n||100<n-h)return null;for(m=[];h<n;){null!=a[h]&&(m=m.concat(a[h]));t=Infinity;u=-Infinity;for(d=m.length-1;0<=d;d--)y=m[d],t=Math.min(t,y.getLeftCol()),u=Math.max(u,y.getRightCol());t=Math.floor(t);u=Math.floor(u);if(h>=b.first[1]&&h<=b.last[1])if(e)if(b.size[0]<b.worldSize[0])for(y=Math.floor(u/b.worldSize[0]),d=Math.floor(t/b.worldSize[0]);d<=y;d++)p.push(new k(h,Math.max(b.getFirstColumnForWorld(d),t),Math.min(b.getLastColumnForWorld(d),
u)));else p.push(new k(h,t,u));else t>b.last[0]||u<b.first[0]||(t=Math.max(t,b.first[0]),u=Math.min(u,b.last[0]),p.push(new k(h,t,u)));h+=1;for(d=m.length-1;0<=d;d--)y=m[d],y.ymax>=h?y.incrRow():m.splice(d,1)}return c};a.prototype.getTileIdAtParent=function(a,c){c=e.pool.acquire(c);var b=this._infoByLevel[c.level];if(a.resolution<b.resolution)throw Error("Cannot calculate parent tile. destination LOD's resolution "+a.resolution+" is not a parent resolution of "+b.resolution);return a.resolution===
b.resolution?c.id:e.getId(a.level,Math.floor(c.row*b.resolution/a.resolution+.01),Math.floor(c.col*b.resolution/a.resolution+.01),c.world)};a.prototype.getTileParentId=function(a){a=e.pool.acquire(a);var b=this._lodInfos.indexOf(this._infoByLevel[a.level])-1;if(0>b)return e.pool.release(a),null;b=this.getTileIdAtParent(this._lodInfos[b],a);e.pool.release(a);return b};a.prototype.getTileResolution=function(a){return(a=this._infoByLevel[a.level])?a.resolution:-1};a.prototype.getTileScale=function(a){return(a=
this._infoByLevel[a.level])?a.scale:-1};a.prototype.intersects=function(a,c){var b=e.pool.acquire(c);c=this._infoByLevel[b.level];var f=a.lodInfo;if(f.resolution>c.resolution){var g=e.pool.acquire(this.getTileIdAtParent(f,b)),k=f.denormalizeCol(g.col,g.world);c=a.spans.some(function(a){return a.row===g.row&&a.colFrom<=k&&a.colTo>=k});e.pool.release(b);e.pool.release(g);return c}if(f.resolution<c.resolution){var h=a.spans.reduce(function(a,b){a[0]=Math.min(a[0],b.row);a[1]=Math.max(a[1],b.row);a[2]=
Math.min(a[2],b.colFrom);a[3]=Math.max(a[3],b.colTo);return a},[Infinity,-Infinity,Infinity,-Infinity]);a=h[0];var l=h[1],p=h[2],h=h[3],d=c.denormalizeCol(b.col,b.world),m=f.getColumnForX(c.getXForColumn(d)),n=f.getRowForY(c.getYForRow(b.row)),d=f.getColumnForX(c.getXForColumn(d+1))-1;c=f.getRowForY(c.getYForRow(b.row+1))-1;e.pool.release(b);return!(m>h||d<p||n>l||c<a)}var q=f.denormalizeCol(b.col,b.world);c=a.spans.some(function(a){return a.row===b.row&&a.colFrom<=q&&a.colTo>=q});e.pool.release(b);
return c};a.prototype.getClosestInfoForScale=function(a){var b=this.scales;this._infoByScale[a]||(a=b.reduce(function(b,c,e,f){return Math.abs(c-a)<Math.abs(b-a)?c:b},b[0]));return this._infoByScale[a]};return a}()})},"esri/views/2d/tiling/LODInfo":function(){define(["require","exports","./TileKey","../../../geometry/support/spatialReferenceUtils"],function(a,h,n,e){function k(a,e,g){a[0]=e;a[1]=g;return a}return function(){function a(a,e,c,b,f,k,h,l,n,t,u,p){this.level=a;this.resolution=e;this.scale=
c;this.origin=b;this.first=f;this.last=k;this.size=h;this.norm=l;this.worldStart=n;this.worldEnd=t;this.worldSize=u;this.wrap=p}a.create=function(h,g,c){var b=e.getInfo(h.spatialReference),f=[h.origin.x,h.origin.y],l=[h.size[0]*g.resolution,h.size[1]*g.resolution],n=[-Infinity,-Infinity],q=[Infinity,Infinity],w=[Infinity,Infinity];c&&(k(n,Math.max(0,Math.floor((c.xmin-f[0])/l[0])),Math.max(0,Math.floor((f[1]-c.ymax)/l[1]))),k(q,Math.max(0,Math.floor((c.xmax-f[0])/l[0])),Math.max(0,Math.floor((f[1]-
c.ymin)/l[1]))),k(w,q[0]-n[0]+1,q[1]-n[1]+1));var t;h.isWrappable?(h=[Math.ceil(Math.round(2*b.origin[1]/g.resolution)/h.size[0]),w[1]],b=[Math.floor((b.origin[0]-f[0])/l[0]),n[1]],c=[h[0]+b[0]-1,q[1]],t=!0):(b=n,c=q,h=w,t=!1);return new a(g.level,g.resolution,g.scale,f,n,q,w,l,b,c,h,t)};a.prototype.normalizeCol=function(a){if(!this.wrap)return a;var e=this.worldSize[0];return 0>a?e-1-Math.abs((a+1)%e):a%e};a.prototype.denormalizeCol=function(a,e){return this.wrap?this.worldSize[0]*e+a:a};a.prototype.getWorldForColumn=
function(a){return this.wrap?Math.floor(a/this.worldSize[0]):0};a.prototype.getFirstColumnForWorld=function(a){return a*this.worldSize[0]+this.first[0]};a.prototype.getLastColumnForWorld=function(a){return a*this.worldSize[0]+this.first[0]+this.size[0]-1};a.prototype.getColumnForX=function(a){return(a-this.origin[0])/this.norm[0]};a.prototype.getXForColumn=function(a){return this.origin[0]+a*this.norm[0]};a.prototype.getRowForY=function(a){return(this.origin[1]-a)/this.norm[1]};a.prototype.getYForRow=
function(a){return this.origin[1]-a*this.norm[1]};a.prototype.getTileBounds=function(a,e){e=n.pool.acquire(e);var c=this.denormalizeCol(e.col,e.world),b=e.row,f=this.getXForColumn(c),g=this.getYForRow(b+1),c=this.getXForColumn(c+1),b=this.getYForRow(b);a[0]=f;a[1]=g;a[2]=c;a[3]=b;n.pool.release(e);return a};a.prototype.getTileCoords=function(a,e){e=n.pool.acquire(e);k(a,this.getXForColumn(this.denormalizeCol(e.col,e.world)),this.getYForRow(e.row));n.pool.release(e);return a};return a}()})},"esri/views/2d/tiling/TileSpan":function(){define(["require",
"exports","../../../core/ObjectPool"],function(a,h,n){return function(){function a(a,e,h){this.row=a;this.colFrom=e;this.colTo=h}a.pool=new n(a,!0);return a}()})},"esri/views/2d/tiling/TileCoverage":function(){define(["require","exports","../../../core/ObjectPool","../../../core/ArrayPool","./TileSpan"],function(a,h,n,e,k){return function(){function a(a){this.lodInfo=a;this.spans=e.acquire()}a.prototype.release=function(){for(var a=0,g=this.spans;a<g.length;a++)k.pool.release(g[a]);e.release(this.spans)};
a.prototype.forEach=function(a,e){var c=this.spans,b=this.lodInfo,f=b.level;if(0!==c.length)for(var g=0;g<c.length;g++)for(var k=c[g],h=k.row,l=k.colTo,k=k.colFrom;k<=l;k++)a.call(e,f,h,b.normalizeCol(k),b.getWorldForColumn(k))};a.pool=new n(a,!0);return a}()})},"esri/layers/support/GraphicsManager":function(){define(["../../core/Accessor"],function(a){var h=0;return a.createSubclass({constructor:function(){this._deletedGraphicsIndex=new Set;this._intentsIndex=new Map},destroy:function(){this.removeAll();
this._intentsIndex=this._deletedGraphicsIndex=null},properties:{graphics:null,indexById:{value:null,dependsOn:["graphics","objectIdField"],get:function(){return this._createIndexById(this.graphics&&this.graphics.toArray(),this.objectIdField)}},numGraphics:{value:0,dependsOn:["indexById"],get:function(){return this.indexById?this.indexById.size:0}},objectIdField:null,updating:{value:!1,dependsOn:["_intentsIndex"],get:function(){return!!(this._intentsIndex&&0<this._intentsIndex.size)}},_intentsIndex:{value:null}},
_oldIndex:null,_deletedGraphicsIndex:null,beginPagedUpdate:function(){this._oldIndex=this.indexById;this.indexById=null;this.notifyChange("numGraphics")},addPage:function(a,e){this.add(a,e)},revertPagedUpdate:function(){var a=this._removeLeftOnly(this.indexById,this._oldIndex);this.indexById=this._oldIndex;this._oldIndex=null;this.graphics.removeMany(a);this.notifyChange("numGraphics")},endPagedUpdate:function(){var a=this._removeLeftOnly(this._oldIndex,this.indexById);this._oldIndex=null;this.graphics.removeMany(a);
this.notifyChange("numGraphics")},findGraphic:function(a){return(a=this.indexById&&this.indexById.get(a))&&a.graphic},removeAll:function(){this.indexById=this._oldIndex=null;this.graphics.removeAll();this.notifyChange("numGraphics")},add:function(a,e){a&&a.length&&(this.indexById=this.indexById||new Map,a=this._updateAndExtractNew(a,this.indexById,this._oldIndex,e),this.graphics.removeMany(a.toRemove),this.graphics.addMany(a.toAdd),this.notifyChange("numGraphics"))},remove:function(a){this._remove(a,
!1)},delete:function(a){this._remove(a,!0)},isDeleted:function(a){return this._deletedGraphicsIndex.has(a)},createIntentToAdd:function(a){a&&this._intentsIndex.forEach(function(e,h){a.forEach(function(a){e.ignoredIds.add(a)})},this);var e=h++;this._intentsIndex.set(e,{ignoredIds:new Set});this.notifyChange("updating");return e},findIntent:function(a){return this._intentsIndex.get(a)},removeIntent:function(a){this._intentsIndex.delete(a);this.notifyChange("updating")},_createIndexById:function(a,e){var k;
if(a&&a.length&&e){var h,n,g;k=new Map;for(h=0;n=a[h];h++)g=n.attributes&&n.attributes[e],null!=g&&k.set(g,{graphic:n,refCount:1})}return k},_updateAndExtractNew:function(a,e,k,h){var l=[],g=[],c=a?a.length:0,b=this.objectIdField,f=this.findIntent(h);for(h=0;h<c;h++){var n=a[h],v=n.attributes&&n.attributes[b];if(null!=v){var x=k&&k.get(v);(x=e.get(v)||x)?f&&f.ignoredIds.has(v)||(e.set(v,{graphic:n,refCount:x.refCount+1}),g.push(x.graphic),l.push(n)):this.isDeleted(v)||(e.set(v,{graphic:n,refCount:1}),
l.push(n))}else l.push(n)}return{toRemove:g,toAdd:l}},_remove:function(a,e){a=a||[];a="object"===typeof a[0]?a.map(function(a){return a.attributes&&a.attributes[this.objectIdField]}.bind(this)):a;var k=this._extractGraphics(a,this._oldIndex),h=this._extractGraphics(a,this.indexById);a.forEach(function(a){e&&this._deletedGraphicsIndex.add(a);this._removeFromIndex(a,this._oldIndex,e);this._removeFromIndex(a,this.indexById,e)}.bind(this));this.graphics.removeMany(k.concat(h));this.notifyChange("numGraphics")},
_removeFromIndex:function(a,e,k){if(e&&e.has(a))if(k)e.delete(a);else{k=e.get(a);var h=k.refCount-1;0===h?e.delete(a):k.refCount=h}},_removeLeftOnly:function(a,e){var k=[];a&&a.forEach(function(h,n){var g=h.graphic;!g||e&&e.has(n)||(--h.refCount,0===h.refCount&&a.delete(n),k.push(g))});return k},_extractGraphics:function(a,e){return a&&e?a.map(function(a){return(a=e.get(a))&&a.graphic}):[]}})})},"esri/layers/graphics/controllers/SnapshotController":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/tsSupport/assignHelper ../../../core/accessorSupport/decorators ../../../core/Accessor ../../../core/Error ../../../core/Evented ../../../core/Logger ../../../core/HandleRegistry ../../../core/Promise ../../../core/promiseUtils ../../support/GraphicsManager ../../../geometry/support/scaleUtils".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w){var t=b.getLogger("esri.layers.graphics.controllers.SnapshotController");return function(a){function b(){var b=a.call(this)||this;b._cancelErrorMsg="SnapshotController: query cancelled";b._featureResolution={value:.25,scale:945};b._gManager=null;b._handles=new f;b._maxFeatures={point:16E3,multipoint:8E3,polyline:4E3,polygon:4E3,multipatch:4E3};b._source=null;b._started=!1;b._pendingQueries=new Map;b.extent=null;b.hasAllFeatures=!1;b.hasFeatures=!1;b.layer=null;
b.layerView=null;b.maxPageSize=null;b.pageSize=null;b.paginationEnabled=!1;return b}n(b,a);b.prototype.initialize=function(){var a=this,b=this.layer.when(function(){return a._verifyCapabilities()}).then(function(){return a._init()});this.addResolvingPromise(b)};b.prototype.destroy=function(){this.cancelQuery();this._gManager&&(this._gManager.destroy(),this._gManager=null);this._handles.destroy();this._pendingQueries=this._handles=null};Object.defineProperty(b.prototype,"updating",{get:function(){return!!(this._pendingQueries&&
0<this._pendingQueries.size)},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"graphics",{set:function(a){this._get("graphics")!==a&&(this._handles.remove("graphics"),a&&(this._collectionChanged({added:a.toArray()}),this._handles.add(a.on("change",this._collectionChanged.bind(this)),"graphics")),this._set("graphics",a))},enumerable:!0,configurable:!0});b.prototype.cancelQuery=function(){var a=this;this._pendingQueries&&(this._pendingQueries.forEach(function(b,c){b.isFulfilled()||
b.cancel(Error(a._cancelErrorMsg))}),this._pendingQueries.clear(),this.notifyChange("updating"))};b.prototype.refresh=function(){this.isResolved()&&this._started&&this._queryFeatures()};b.prototype.startup=function(){this._started||(this._started=!0,this._resolutionParams=this._getResolutionParams(),this._queryFeatures())};b.prototype.update=function(){this.startup()};b.prototype._init=function(){var a=this.layer;this.paginationEnabled=!!a.get("capabilities.query.supportsPagination");this._source=
a.source;this.pageSize=null==this.maxPageSize?a.maxRecordCount:Math.min(a.maxRecordCount,this.maxPageSize);this._gManager=new x({graphics:this.graphics,objectIdField:a.objectIdField});this._setupStateWatchers()};b.prototype._getResolutionParams=function(){var a=this.layer,b=a.get("capabilities.query.supportsQuantization"),c;if("polyline"===a.geometryType||"polygon"===a.geometryType){var e=w.getMetersPerUnit(this.layerView.view.spatialReference);null!=e&&(c=this._featureResolution.scale,e=this._featureResolution.value/
e,c=a.maxScale?a.maxScale:a.minScale?Math.min(c,a.minScale):Math.min(c,w.getScale(this.layerView.view,a.fullExtent)),c*=e/this._featureResolution.scale)}return c?{maxAllowableOffset:b?null:c,quantizationParameters:b?{mode:"view",originPosition:"upperLeft",tolerance:c,extent:a.fullExtent}:null}:null};b.prototype._setupStateWatchers=function(){this._handles.add([this.watch("extent",this.refresh.bind(this)),this.layer.watch("definitionExpression",this.refresh.bind(this)),this.layer.on("edits",this._editsHandler.bind(this))])};
b.prototype._createQueryParams=function(){var a=this.layerView,b=this.layer.createQuery();b.outSpatialReference=a.view.spatialReference;b.geometry=this.extent;b.set(this._resolutionParams);this.paginationEnabled&&(b.start=0,b.num=this.pageSize);return b};b.prototype._queryFeatures=function(){this.cancelQuery();this.hasAllFeatures=this.hasFeatures=!1;this._gManager.beginPagedUpdate();this.emit("query-start");this._executeQuery(this._createQueryParams())};b.prototype._executeQuery=function(a){var b=
this,c=this._source.queryFeatures(a),d=this._gManager.createIntentToAdd();this._querySetup(d,c);c.then(this._processFeatureSet.bind(this,a,d)).catch(function(a){return b._queryError(d,a)}).always(function(){return b._queryTeardown(d)})};b.prototype._processFeatureSet=function(a,b,c){var d=c.exceededTransferLimit,e=c.features,f=this._maxFeatures[this.layer.geometryType]||0,g=e?e.length:0,k=this._gManager.numGraphics+g,h=k>=f;h&&(t.warn('Feature limit exceeded on layer "',this.layer.title,'". Not all features are shown.'),
(f=k-f)&&e.splice(g-f,f));a=d&&this.paginationEnabled&&!h?this._queryNextPage(a):!1;e&&this._gManager.addPage(e,b);this.hasFeatures=!0;a||(this._gManager.endPagedUpdate(),this.hasAllFeatures=!d,this.emit("query-end",{success:!0}));return c};b.prototype._queryNextPage=function(a){a.start+=this.pageSize;this._executeQuery(a);return!0};b.prototype._queryError=function(a,b){b&&"cancel"===b.dojoType&&!this.hasFeatures?this._gManager.revertPagedUpdate():this._gManager.endPagedUpdate();this.emit("query-end",
{success:!1});if(b&&"cancel"===b.dojoType)return v.reject(b);a=new g("snapshotcontroller:tile-request-failed","Failed to query for features",{error:b});t.error(a);return v.reject(a)};b.prototype._querySetup=function(a,b){this._pendingQueries.set(a,b);this.notifyChange("updating")};b.prototype._queryTeardown=function(a){this._gManager.removeIntent(a);this._pendingQueries.delete(a);this.notifyChange("updating")};b.prototype._processRefetch=function(a,b){(b=b.features)&&this._gManager.add(b,a)};b.prototype._refetchError=
function(a,b){};b.prototype._verifyCapabilities=function(){if(!this.layer.get("capabilities.operations.supportsQuery"))throw new g("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:this.layer});};b.prototype._collectionChanged=function(a){var b=a.added;if(b)for(var c=0;c<b.length;c++)b[c].layer=this.layer;if(b=a.removed)for(c=0;c<b.length;c++)b[c].layer=null};b.prototype._editsHandler=function(a){var b=function(a){return a.objectId},
c=a.deletedFeatures.map(b);this._gManager.delete(c);a=a.addedFeatures.concat(a.updatedFeatures).map(b);a.length&&(b=this._createQueryParams(),b.objectIds=a,b=this._source.queryFeatures(b),a=this._gManager.createIntentToAdd(a),this._querySetup(a,b),b.then(this._processRefetch.bind(this,a)).otherwise(this._refetchError.bind(this,a)).always(this._queryTeardown.bind(this,a)))};e([l.property()],b.prototype,"_pendingQueries",void 0);e([l.property({dependsOn:["_pendingQueries"]})],b.prototype,"updating",
null);e([l.property()],b.prototype,"graphics",null);e([l.property()],b.prototype,"extent",void 0);e([l.property()],b.prototype,"hasAllFeatures",void 0);e([l.property()],b.prototype,"hasFeatures",void 0);e([l.property()],b.prototype,"layer",void 0);e([l.property()],b.prototype,"layerView",void 0);e([l.property()],b.prototype,"maxPageSize",void 0);e([l.property()],b.prototype,"pageSize",void 0);e([l.property()],b.prototype,"paginationEnabled",void 0);return b=e([l.subclass("esri.layers.graphics.controllers.SnapshotController")],
b)}(l.declared(q,r,c))})},"esri/layers/graphics/sources/FeatureLayerSource":function(){define("dojo/_base/lang ../../../core/Accessor ../../../core/Promise ../../../core/urlUtils ../../../core/Error ../../../request ../../../tasks/QueryTask".split(" "),function(a,h,n,e,k,l,q){return h.createSubclass([n],{getDefaults:function(e){var c=this.inherited(arguments),b=e.layer;b&&(c=a.mixin(c,{url:b.url,layerId:b.layerId,gdbVersion:b.gdbVersion}));return c},initialize:function(){this.addResolvingPromise(this._fetchService())},
properties:{layer:{},layerId:{},gdbVersion:{dependsOn:["layer.gdbVersion"],get:function(){return this.layer.gdbVersion}},parsedUrl:{dependsOn:["url","layerId"],get:function(){var a=this.url?e.urlToObject(this.url):null;null!=this.layerId&&null!=a&&(a.path=e.join(a.path,this.layerId.toString()));return a}},queryTask:{dependsOn:["parsedUrl","gdbVersion"],get:function(){return new q({url:this.parsedUrl.path,gdbVersion:this.gdbVersion})}},url:{}},applyEdits:function(a){var c=a.addFeatures.map(this._serializeFeature.bind(this)),
b=a.updateFeatures.map(this._serializeFeature.bind(this));a=this._getFeatureIds(a.deleteFeatures);c={f:"json",adds:c.length?JSON.stringify(c):null,updates:b.length?JSON.stringify(b):null,deletes:a.length?a.join(","):null};return l(this.parsedUrl.path+"/applyEdits",{query:c,method:"post",responseType:"json",callbackParamName:"callback"}).then(this._createEditsResult.bind(this))},queryFeatures:function(a){return this.queryTask.execute(a)},queryObjectIds:function(a){return this.queryTask.executeForIds(a)},
queryFeatureCount:function(a){return this.queryTask.executeForCount(a)},queryExtent:function(a){return this.queryTask.executeForExtent(a)},_updateUrl:function(a){a&&(this.url=this.url.replace(/^http:/i,"https:"))},_fetchService:function(){return null==this.layerId?l(this.url,{query:{f:"json"},responseType:"json",callbackParamName:"callback"}).then(function(a){this._updateUrl(a.ssl);(a=a.data)&&a.layers&&a.layers[0]&&(this.layerId=a.layers[0].id);return this._fetchServiceLayer()}.bind(this)):this._fetchServiceLayer()},
_fetchServiceLayer:function(){return l(this.parsedUrl.path,{query:a.mixin({f:"json"},this.parsedUrl.query),responseType:"json",callbackParamName:"callback"}).then(function(a){this._updateUrl(a.ssl);this.layerDefinition=a.data}.bind(this))},_serializeFeature:function(a){var c=a.geometry;a=a.attributes;return{geometry:c&&c.toJSON(),attributes:a}},_getFeatureIds:function(a){var c=this.layer.objectIdField,b=a[0],e=!(!b||null==b.objectId),g=!(!b||!b.attributes);return a.map(function(a){var b=null;e?b=
a.objectId:g&&(b=a.attributes&&a.attributes[c]);return b},this)},_createEditsResult:function(a){var c={};a=a.data;c.addFeatureResults=a.addResults?a.addResults.map(this._createFeatureEditResult.bind(this)):[];c.updateFeatureResults=a.updateResults?a.updateResults.map(this._createFeatureEditResult.bind(this)):[];c.deleteFeatureResults=a.deleteResults?a.deleteResults.map(this._createFeatureEditResult.bind(this)):[];return c},_createFeatureEditResult:function(a){var c=a.success?null:a.error||{};return{objectId:a.objectId,
globalId:a.globalId,error:c?new k("feature-layer-source:edit-failure",c.description,{code:c.code}):null}}})})},"esri/layers/graphics/sources/MemorySource":function(){define("../../../core/Collection ../../../core/Promise ../../../core/promiseUtils ../../../core/Error ../../../tasks/support/FeatureSet ../../../Graphic ../QueryEngine".split(" "),function(a,h,n,e,k,l,q){return a.ofType(l).createSubclass([h],{properties:{layer:{value:null},_queryEngine:{value:null,dependsOn:["layer.loaded"],get:function(){return this.get("layer.loaded")?
new q({features:this,objectIdField:this.layer.objectIdField}):null}}},queryFeatures:function(a){return this._queryEngine?this._queryEngine.queryFeatures(a).then(function(a){var b=new k;b.features=a;return b}):this._rejectQuery("Not ready to execute query")},queryObjectIds:function(a){return this._queryEngine?this._queryEngine.queryObjectIds(a):this._rejectQuery("Not ready to execute query")},queryFeatureCount:function(a){return this._queryEngine?this._queryEngine.queryFeatureCount(a):this._rejectQuery("Not ready to execute query")},
queryExtent:function(a){return this._queryEngine?this._queryEngine.queryExtent(a):this._rejectQuery("Not ready to execute query")},_rejectQuery:function(a){return n.reject(new e("MemorySource",a))}})})},"esri/layers/graphics/QueryEngine":function(){define("require exports ../../core/tsSupport/extendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/Error ../../core/promiseUtils ../../geometry/support/graphicsUtils".split(" "),function(a,
h,n,e,k,l,q,g,c){return function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.features=null;b.objectIdField=null;return b}n(b,a);b.prototype.queryFeatures=function(a){if(this.features)if(a)if(this._isSupportedQuery(a)){var b=this._createFilters(a);a=b.length?this._executeQuery(a,b):this._rejectQuery("Invalid query")}else a=this._rejectQuery("Unsupported query");else a=this._returnAllFeatures();else a=this._rejectQuery("Engine not initialized");return a};b.prototype.queryObjectIds=
function(a){return this.objectIdField?this.queryFeatures(a).then(this._getObjectIds.bind(this)):this._rejectQuery("Unsupported query")};b.prototype.queryFeatureCount=function(a){return this.queryFeatures(a).then(function(a){return a.length})};b.prototype.queryExtent=function(a){var b=this;return this.queryFeatures(a).then(function(a){return{count:a.length,extent:b._getExtent(a)}})};b.prototype._returnAllFeatures=function(){return g.resolve(this.features.toArray())};b.prototype._executeQuery=function(a,
b){var c=this,e=this.features.filter(function(e){return b.every(function(b){return b.call(c,e,a)})});return g.resolve(e.toArray())};b.prototype._isSupportedQuery=function(a){var b=!0;if(null!=a.distance||null!=a.geometryPrecision||a.groupByFieldsForStatistics&&a.groupByFieldsForStatistics.length||null!=a.maxAllowableOffset||a.multipatchOption||null!=a.num||a.orderByFields&&a.orderByFields.length||a.outFields&&a.outFields.length||a.outSpatialReference||a.outStatistics&&a.outStatistics.length||a.pixelSize||
a.quantizationParameters||a.relationParameter||a.returnDistinctValues||null!=a.start||a.text||a.timeExtent||a.where||a.objectIds&&a.objectIds.length&&!this.objectIdField)b=!1;return b};b.prototype._createFilters=function(a){var b=[];a.objectIds&&a.objectIds.length&&b.push(this._createObjectIdFilter());a.geometry&&"extent"===a.geometry.type&&"intersects"===a.spatialRelationship&&b.push(this._createExtentFilter());return b};b.prototype._createExtentFilter=function(){return function(a,b){a=a.geometry;
b=b.geometry;return a&&b.intersects(a)}};b.prototype._createObjectIdFilter=function(){var a=this;return function(b,c){b=b.attributes;return-1<c.objectIds.indexOf(b&&b[a.objectIdField])}};b.prototype._rejectQuery=function(a){return g.reject(new q(this.declaredClass,a))};b.prototype._getObjectIds=function(a){var b=this.objectIdField,c=[];a.forEach(function(a){a=(a=a.attributes)&&a[b];null!=a&&c.push(a)});return c};b.prototype._getExtent=function(a){return a.length?c.graphicsExtent(a):null};e([k.property()],
b.prototype,"features",void 0);e([k.property()],b.prototype,"objectIdField",void 0);return b=e([k.subclass("esri.layers.graphics.QueryEngine")],b)}(k.declared(l))})},"esri/layers/TileLayer":function(){define("dojo/_base/lang dojo/io-query ../request ../core/urlUtils ../core/promiseUtils ../geometry/SpatialReference ./TiledLayer ./mixins/ArcGISMapService ./mixins/ArcGISCachedService ./mixins/OperationalLayer ./mixins/PortalLayer ./mixins/RefreshableLayer ./mixins/ScaleRangeLayer ./support/arcgisLayers ./support/arcgisLayerUrl".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w){return q.createSubclass([g,c,v,b,f,r],{declaredClass:"esri.layers.TileLayer",_mapsWithAttribution:"Canvas/World_Dark_Gray_Base Canvas/World_Dark_Gray_Reference Canvas/World_Light_Gray_Base Canvas/World_Light_Gray_Reference Elevation/World_Hillshade Ocean/World_Ocean_Base Ocean/World_Ocean_Reference Ocean_Basemap Reference/World_Boundaries_and_Places Reference/World_Boundaries_and_Places_Alternate Reference/World_Transportation World_Imagery World_Street_Map World_Topo_Map".split(" "),
_TILE_FORMATS:{PNG:"png",PNG8:"png",PNG24:"png",PNG32:"png",JPG:"jpg",JPEG:"jpg",GIF:"gif"},_attributionServices:["services.arcgisonline.com/arcgis/rest/services","servicesdev.arcgisonline.com/arcgis/rest/services","servicesqa.arcgisonline.com/arcgis/rest/services"],normalizeCtorArgs:function(b,c){return"string"===typeof b?a.mixin({},{url:b},c):b},load:function(){this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service","Map Service"]}).always(this._fetchService.bind(this)));return this.when()},
properties:{operationalLayerType:{get:function(){if(this.capabilities)return-1!==this.capabilities.indexOf("Map")?"ArcGISTiledMapServiceLayer":"ArcGISTiledImageServiceLayer";var a=this.url||this.portalItem&&this.portalItem.url;return a&&/\/ImageServer(\/|\/?$)/i.test(a)?"ArcGISTiledImageServiceLayer":"ArcGISTiledMapServiceLayer"}},attributionDataUrl:{dependsOn:["parsedUrl"],get:function(){return this._getDefaultAttribution(this._getMapName(this.parsedUrl.path.toLowerCase()))}},popupTemplates:null,
tileServers:{dependsOn:["parsedUrl"],value:null,cast:function(a){return Array.isArray(a)?a.map(function(a){return e.urlToObject(a).path}):null},get:function(){return this._getDefaultTileServers(this.parsedUrl.path)}},url:{json:{origins:{"web-scene":{write:{isRequired:!0,writer:e.writeOperationalLayerUrl}}}}},type:{value:"tile",json:{read:!1}},spatialReference:{json:{read:{source:["spatialReference","tileInfo"],reader:function(a,b){return(a=a||b.tileInfo&&b.tileInfo.spatialReference)&&l.fromJSON(a)}}}}},
getTileUrl:function(a,b,c){var d=this.tileServers,e=this.parsedUrl.query?h.objectToQuery(this.parsedUrl.query):"";this.token&&(e=e+(e?"\x26":"")+"token\x3d"+encodeURIComponent(this.token));this.resampling&&!this.tilemapCache&&this.supportsBlankTile&&(e=e+(e?"\x26":"")+"blankTile\x3dfalse");this.refreshTimestamp&&(e=e+(e?"\x26":"")+"_ts\x3d"+this.refreshTimestamp);return(d&&d.length?d[b%d.length]:this.parsedUrl.path)+"/tile/"+a+"/"+b+"/"+c+(e?"?"+e:"")},_fetchService:function(){return k.resolve().then(function(){return this.resourceInfo||
n(this.parsedUrl.path,{query:a.mixin({f:"json"},this.parsedUrl.query),responseType:"json",callbackParamName:"callback"})}.bind(this)).then(function(a){a.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));this.read(a.data,{origin:"service",url:this.parsedUrl});if(10.1===this.version&&!w.isHostedAgolService(this.url))return x.fetchServerVersion(this.url).then(function(a){this.read({currentVersion:a})}.bind(this)).otherwise(function(){})}.bind(this))},_getMapName:function(a){return(a=a.match(/^(?:https?:)?\/\/(server|services)\.arcgisonline\.com\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/mapserver/i))&&
a[2]},_getDefaultAttribution:function(a){if(a){var b;a=a.toLowerCase();for(var c=0,d=this._mapsWithAttribution.length;c<d;c++)if(b=this._mapsWithAttribution[c],-1<b.toLowerCase().indexOf(a))return e.makeAbsolute("//static.arcgis.com/attribution/"+b)}},_getDefaultTileServers:function(a){var b=-1!==a.search(/^(?:https?:)?\/\/server\.arcgisonline\.com/i),c=-1!==a.search(/^(?:https?:)?\/\/services\.arcgisonline\.com/i);return b||c?[a,a.replace(b?/server\.arcgisonline/i:/services\.arcgisonline/i,b?"services.arcgisonline":
"server.arcgisonline")]:[]}})})},"esri/layers/mixins/RefreshableLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor".split(" "),function(a,h,n,e,k,l){return function(a){function g(){var c=null!==a&&a.apply(this,arguments)||this;c.refreshInterval=0;return c}n(g,a);g.prototype.refresh=function(){this.emit("refresh")};e([k.property({type:Number,cast:function(a){return.1<=a?a:
0>=a?0:.1},json:{read:{source:"refreshInterval"},write:{target:"refreshInterval"},origins:{"web-scene":{read:!1,write:!1}}}})],g.prototype,"refreshInterval",void 0);return g=e([k.subclass("esri.layers.mixins.RefreshableLayer")],g)}(k.declared(l))})},"esri/layers/mixins/ScaleRangeLayer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/accessorSupport/write".split(" "),
function(a,h,n,e,k,l,q){return function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b.minScale=0;b.maxScale=0;return b}n(c,a);e([k.property({type:Number,json:{write:{overridePolicy:function(a,c,e){if(q.willPropertyWrite(this,"maxScale",{},e))return{ignoreOrigin:!0}}}}})],c.prototype,"minScale",void 0);e([k.property({type:Number,json:{write:{overridePolicy:function(a,c,e){if(q.willPropertyWrite(this,"minScale",{},e))return{ignoreOrigin:!0}}}}})],c.prototype,"maxScale",void 0);return c=
e([k.subclass("esri.layers.mixins.ScaleRangeLayer")],c)}(k.declared(l))})},"esri/layers/support/arcgisLayers":function(){define("require exports dojo/_base/lang dojo/when ./arcgisLayerUrl ../../core/promiseUtils ../../core/requireUtils ../../request ../../core/Error ./arcgisLayerUrl".split(" "),function(a,h,n,e,k,l,q,g,c,b){function f(a,b){return a.sublayerIds.map(function(c){return new a.Constructor(n.mixin({},b,{layerId:c,sublayerTitleMode:"service-name"}))})}function r(f){var g=b.parse(f);if(!g)return l.reject(new c("arcgis-layers:url-mismatch",
"The url '${url}' is not a valid arcgis resource",{url:f}));var d=g.serverType,k=g.sublayer,h={FeatureServer:"FeatureLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer"};switch(d){case "MapServer":d=null!=k?"FeatureLayer":x(f).then(function(a){return a?"TileLayer":"MapImageLayer"});break;case "ImageServer":d=t(f).then(function(a){var b=a.tileInfo&&a.tileInfo.format;return a.tileInfo?b&&"LERC"===b.toUpperCase()&&a.cacheType&&"elevation"===a.cacheType.toLowerCase()?"ElevationLayer":
"TileLayer":"ImageryLayer"});break;case "SceneServer":d=t(g.url.path).then(function(a){var b={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer"};return a&&Array.isArray(a.layers)&&0<a.layers.length&&(a=a.layers[0].layerType,null!=b[a])?b[a]:"SceneLayer"});break;default:d=h[d]}var n={FeatureLayer:!0,SceneLayer:!0},u={parsedUrl:g,Constructor:null,sublayerIds:null},r;return e(d).then(function(a){r=a;if(n[a]&&null==k)return v(f).then(function(a){1!==
a.length&&(u.sublayerIds=a)})}).then(function(){return q.when(a,"../"+r)}).then(function(a){u.Constructor=a;return u})}function v(a){return t(a).then(function(a){return a&&Array.isArray(a.layers)?a.layers.map(function(a){return a.id}).reverse():[]})}function x(a){return t(a).then(function(a){return a.tileInfo})}function w(a,b){a=a.Constructor.prototype.declaredClass;return"esri.layers.FeatureLayer"===a||"esri.layers.StreamLayer"===a?n.mixin({returnZ:!0,outFields:["*"]},b):b}function t(a){return g(a,
{responseType:"json",callbackParamName:"callback",query:{f:"json"}}).then(function(a){return a.data})}Object.defineProperty(h,"__esModule",{value:!0});h.fromUrl=function(b){return r(b.url).then(function(c){var d=w(c,n.mixin({},b.properties,{url:b.url}));return c.sublayerIds?q.when(a,"../GroupLayer").then(function(a){var b=new a({title:c.parsedUrl.title});f(c,d).forEach(function(a){return b.add(a)});return l.resolve(b)}):l.resolve(new c.Constructor(d))})};h.fetchServerVersion=function(a){if(!k.test(a))return l.reject();
a=a.replace(/(.*\/rest)\/.*/i,"$1")+"/info";return g(a,{query:{f:"json"},responseType:"json",callbackParamName:"callback"}).then(function(a){return a.data&&a.data.currentVersion?a.data.currentVersion:l.reject()})}})},"esri/layers/FeatureLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/accessorSupport/decorators dojo/_base/lang ../Graphic ../PopupTemplate ../request ../core/MultiOriginJSONSupport ../core/Collection ../core/Error ../core/HandleRegistry ../core/Logger ../core/kebabDictionary ../core/lang ../core/promiseUtils ../core/requireUtils ../core/urlUtils ../geometry/Extent ../geometry/HeightModelInfo ../geometry/SpatialReference ../geometry/support/normalizeUtils ../symbols/SimpleMarkerSymbol ../symbols/SimpleLineSymbol ../symbols/SimpleFillSymbol ../symbols/support/jsonUtils ../symbols/support/ElevationInfo ../renderers/SimpleRenderer ../renderers/UniqueValueRenderer ../renderers/support/jsonUtils ../renderers/support/styleUtils ../renderers/support/typeUtils ../tasks/support/FeatureSet ../tasks/support/Query ./Layer ./mixins/OperationalLayer ./mixins/PortalLayer ./mixins/ScaleRangeLayer ./mixins/RefreshableLayer ./mixins/ArcGISService ./graphics/sources/MemorySource ./support/Field ./support/fieldUtils ./support/FeatureProcessing ./support/FeatureTemplate ./support/FeatureType ./support/FeatureReduction ./support/LabelClass ./support/labelingInfo ./support/arcgisLayerUrl ./support/commonProperties".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t,u,p,d,m,y,z,A,C,G,J,E,K,R,Z,ba,F,Y,D,S,L,M,ca,N,U,P,ga,X,T,V,da,ja,ka,xa,qa,wa,pa,Ca){function ta(a){return a&&null!=a.applyEdits}function Ia(a){return a&&a.isInstanceOf&&a.isInstanceOf(X)}function ia(a,b,c){return!(a&&a.hasOwnProperty(b)?!a[b]:!c)}var La=t({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"}),ua=w.getLogger("esri.layers.FeatureLayer");
return function(f){function h(a){a=f.call(this)||this;a.viewModulePaths={"2d":"../views/2d/layers/FeatureLayerView2D","3d":"../views/3d/layers/FeatureLayerView3D"};a._handles=new x;a.featureReduction=null;a.copyright=null;a.displayField=null;a.definitionExpression=null;a.editFieldsInfo=null;a.elevationInfo=null;a.fields=null;a.fullExtent=null;a.gdbVersion=null;a.geometryType=null;a.hasM=!1;a.hasZ=!1;a.heightModelInfo=null;a.isTable=!1;a.labelsVisible=!1;a.labelingInfo=null;a.layerId=void 0;a.legendEnabled=
!0;a.maxRecordCount=void 0;a.minScale=0;a.maxScale=0;a.objectIdField=null;a.operationalLayerType="ArcGISFeatureLayer";a.popupEnabled=!0;a.popupTemplate=null;a.relationships=null;a.returnM=!1;a.returnZ=!1;a.screenSizePerspectiveEnabled=!0;a.serviceDefinitionExpression=null;a.spatialReference=A.WGS84;a.templates=null;a.timeInfo=null;a.title=null;a.sublayerTitleMode="item-title";a.trackIdField=null;a.type="feature";a.typeIdField=null;a.types=null;a.userIsAdmin=!1;a.version=void 0;a.visible=!0;return a}
n(h,f);h.prototype.normalizeCtorArgs=function(a,b){return"string"===typeof a?q.mixin({},{url:a},b):a};h.prototype.load=function(){var a=this,b=this.source&&(Array.isArray(this.source)||Ia(this.source));if(this.portalItem&&b)this.addResolvingPromise(p.resolve());else return b=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]}).always(function(){if(a.url&&null==a.layerId&&/FeatureServer\/*$/i.test(a.url))return a._fetchFirstLayerId().then(function(b){null!=b&&(a.layerId=b)})}).then(function(){if(!a.url&&
!a._hasMemorySource())throw new v("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return a.createGraphicsSource().then(a._initLayerProperties.bind(a))}),this.addResolvingPromise(b),this.when()};Object.defineProperty(h.prototype,"allRenderers",{get:function(){return this._getAllRenderers(this.renderer)},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"capabilities",{get:function(){var a=this._get("capabilities");return a||!this.loaded||
this.hasService?a:{data:{supportsAttachment:!1,supportsM:!1,supportsZ:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!0,supportsDelete:!0,supportsEditing:!0,supportsQuery:!0,supportsUpdate:!0},query:{supportsStatistics:!1,supportsCentroid:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!0,supportsGeometryProperties:!1,supportsOrderBy:!1,supportsPagination:!1,supportsQuantization:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,
supportsQueryByOthers:!1},queryRelated:{supportsPagination:!1,supportsCount:!1,supportsOrderBy:!1},editing:{supportsGeometryUpdate:!0,supportsGlobalId:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}},enumerable:!0,configurable:!0});h.prototype.readCapabilities=function(a,b){b=b.layerDefinition||b;return{data:this._readDataCapabilities(b),operations:this._readOperationsCapabilities(b.capabilities||
a,b),query:this._readQueryCapabilities(b),queryRelated:this._readQueryRelatedCapabilities(b),editing:this._readEditingCapabilities(b)}};Object.defineProperty(h.prototype,"hasAttachments",{get:function(){return this.hasService&&this._get("hasAttachments")||!1},enumerable:!0,configurable:!0});h.prototype.readIsTable=function(a,b){b=b&&b.layerDefinition||b;return"Table"===b.type};Object.defineProperty(h.prototype,"hasService",{get:function(){return!this._hasMemorySource()},enumerable:!0,configurable:!0});
h.prototype.readMinScale=function(a,b){return b.effectiveMinScale||a||0};h.prototype.readMaxScale=function(a,b){return b.effectiveMaxScale||a||0};h.prototype.readObjectIdFieldFromService=function(a,b){b=b.layerDefinition||b;if(b.objectIdField)return b.objectIdField;if(b.fields)for(a=0,b=b.fields;a<b.length;a++){var c=b[a];if("esriFieldTypeOID"===c.type)return c.name}};Object.defineProperty(h.prototype,"outFields",{get:function(){var a=this,b=this._userOutFields,c=this.requiredFields,b=b&&b.slice(0),
c=c&&c.slice(0);b?-1===b.indexOf("*")&&c.forEach(function(a){-1===b.indexOf(a)&&b.push(a)}):b=c;this.loaded&&(b=b.filter(function(b){return"*"===b||!!a.getField(b,a.fields)},this),b=b.map(function(b){return"*"===b?b:a.getField(b,a.fields).name},this),b=b.filter(function(a,b,c){return c.indexOf(a)===b}));return b},set:function(a){var b=this,c=this.requiredFields&&this.requiredFields.slice(0);a?-1===a.indexOf("*")&&c.forEach(function(b){-1===a.indexOf(b)&&a.push(b)}):a=c;this.loaded&&(a=a.filter(function(a){return"*"===
a||!!b.getField(a,b.fields)},this),a=a.map(function(a){return"*"===a?a:b.getField(a,b.fields).name},this));this._userOutFields=a},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"parsedUrl",{get:function(){var a=this.url?m.urlToObject(this.url):null;null!=this.layerId&&null!=a&&(a.path=m.join(a.path,this.layerId.toString()));return a},enumerable:!0,configurable:!0});h.prototype.readPopupEnabled=function(a,b){return!b.disablePopup};h.prototype.writePopupEnabled=function(a,b,c){b[c]=
!a};Object.defineProperty(h.prototype,"renderer",{set:function(a){var b=this._getAllRenderers(a);V.fixRendererFields(b,this.fields);this._set("renderer",a)},enumerable:!0,configurable:!0});h.prototype.readRenderer=function(a,b,c){b=b.layerDefinition||b;var d=b.drawingInfo&&b.drawingInfo.renderer||void 0,e,f;if(d)(e=F.read(d,b,c)||void 0)||ua.error("Failed to create renderer",{rendererDefinition:b.drawingInfo.renderer,layer:this,context:c});else if(b.defaultSymbol)K.read(b.defaultSymbol,b,c),b.types&&
b.types.length?(e=new ba({defaultSymbol:f,field:b.typeIdField}),b.types.forEach(function(a){d.addUniqueValueInfo(a.id,K.read(a.symbol,a,c))})):e=new Z({symbol:f});else if("Table"!==b.type){switch(b.geometryType){case "esriGeometryPoint":case "esriGeometryMultipoint":f=new G;break;case "esriGeometryPolyline":f=new J;break;case "esriGeometryPolygon":f=new E}e=f&&new Z({symbol:f})}return e};Object.defineProperty(h.prototype,"requiredFields",{get:function(){var a=this.timeInfo,b=[],c=[],a=[this.objectIdField,
this.typeIdField,this.editFieldsInfo&&this.editFieldsInfo.creatorField,a&&a.startTimeField,a&&a.endTimeField,this.trackIdField];this.allRenderers.forEach(function(a){b=b.concat(a.requiredFields)});this.labelingInfo&&this.labelingInfo.length&&this.labelingInfo.forEach(function(a){c=c.concat(a.requiredFields)});var a=a.concat(b),a=a.concat(c),d=this.elevationInfo&&this.elevationInfo.featureExpressionInfo;d&&(a=a.concat(d.requiredFields));this.popupTemplate&&(a=a.concat(this.popupTemplate.requiredFields));
return a.filter(function(a,b,c){return!!a&&c.indexOf(a)===b&&"function"!==typeof a})},enumerable:!0,configurable:!0});Object.defineProperty(h.prototype,"source",{set:function(a){var b=this._get("source");b!==a&&(Ia(b)&&this._resetMemorySource(b),Ia(a)&&this._initMemorySource(a),this._set("source",a))},enumerable:!0,configurable:!0});h.prototype.castSource=function(a){return a?Array.isArray(a)||a&&a.isInstanceOf&&a.isInstanceOf(r)?new X({layer:this,items:a}):a:null};h.prototype.readSource=function(a,
b){a=S.fromJSON(b.featureSet);return new X({layer:this,items:a&&a.features||[]})};h.prototype.readTemplates=function(a,b){var c=b.editFieldsInfo;b=c&&c.creatorField;c=c&&c.editorField;a=a&&a.map(function(a){return ja.fromJSON(a)});this._fixTemplates(a,b);this._fixTemplates(a,c);return a};h.prototype.readTitle=function(a,b){a=b.layerDefinition&&b.layerDefinition.name||b.name;b=b.title||b.layerDefinition&&b.layerDefinition.title;if(a){b=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?
pa.titleFromUrlAndName(this.url,a):a;if(a=a||this.url&&pa.parse(this.url).title)return"item-title-and-service-name"===this.sublayerTitleMode&&b&&(a=b+" - "+a),pa.cleanTitle(a)}else if("item-title"===this.sublayerTitleMode&&b)return b};h.prototype.readTitleFromWebMap=function(a,b){return(a=b.layerDefinition&&b.layerDefinition.name)?a:b.title};h.prototype.readTypeIdField=function(a,b){b=b.layerDefinition||b;if(a=b.typeIdField)if(b=this.getField(a,b.fields))a=b.name;return a};h.prototype.readTypes=function(a,
b){var c=this;b=b.layerDefinition||b;a=b.types;var d=(b=b.editFieldsInfo)&&b.creatorField,e=b&&b.editorField;return a&&a.map(function(a){a=ka.fromJSON(a);c._fixTemplates(a.templates,d);c._fixTemplates(a.templates,e);return a})};Object.defineProperty(h.prototype,"url",{set:function(a){a=pa.sanitizeUrlWithLayerId(this,a,ua);this._set("url",a.url);null!=a.layerId&&this._set("layerId",a.layerId)},enumerable:!0,configurable:!0});h.prototype.writeUrl=function(a,b,c,d){pa.writeUrlWithLayerId(this,a,b)};
h.prototype.readVersion=function(a,b){b=b.layerDefinition||b;return b.currentVersion?b.currentVersion:b.hasOwnProperty("capabilities")||b.hasOwnProperty("drawingInfo")||b.hasOwnProperty("hasAttachments")||b.hasOwnProperty("htmlPopupType")||b.hasOwnProperty("relationships")||b.hasOwnProperty("timeInfo")||b.hasOwnProperty("typeIdField")||b.hasOwnProperty("types")?10:9.3};h.prototype.readVisible=function(a,b){if(b.layerDefinition&&null!=b.layerDefinition.defaultVisibility)return!!b.layerDefinition.defaultVisibility;
if(null!=b.visibility)return!!b.visibility};h.prototype.applyEdits=function(a){var b=this;return this.load().then(function(){return ta(b.source)?b._processApplyEditsParams(a):p.reject(new v("FeatureLayer","Layer source does not support applyEdits capability"))}).then(function(a){if(ta(b.source))return b.source.applyEdits(a).then(function(a){var c=function(a){return a.filter(function(a){return!a.error}).map(u.clone)},c={addedFeatures:c(a.addFeatureResults),updatedFeatures:c(a.updateFeatureResults),
deletedFeatures:c(a.deleteFeatureResults)};(c.addedFeatures.length||c.updatedFeatures.length||c.deletedFeatures.length)&&b.emit("edits",c);return a})})};h.prototype.createGraphicsSource=function(){var b=this;return this._hasMemorySource()?(this.emit("graphics-source-create",{graphicsSource:this.source}),this.source.when()):d.when(a,"./graphics/sources/FeatureLayerSource").then(function(a){return new a({layer:b})}).then(function(a){return a.when()}).then(function(a){b.emit("graphics-source-create",
{graphicsSource:a});return a})};h.prototype.createGraphicsController=function(b){var c=this,e=b.layerView,f=r.ofType(g),h=this.source,k=Ia(h),m=q.mixin(b.options||{},{layer:this,layerView:e,graphics:k?h:new f});return d.when(a,k?"./graphics/controllers/MemoryController":"2d"===e.view.type?"./graphics/controllers/AutoController2D":"./graphics/controllers/SnapshotController").then(function(a){return new a(m)}).then(function(a){c.emit("graphics-controller-create",{graphicsController:a});return a.when()})};
h.prototype.createQuery=function(){var a=new L,b=this.get("capabilities.data");a.returnGeometry=!0;a.returnZ=b&&b.supportsZ&&this.returnZ||null;a.returnM=b&&b.supportsM&&this.returnM||null;a.outFields=this.outFields;a.where=this.definitionExpression||"1\x3d1";a.multipatchOption="multipatch"===this.geometryType?"xyFootprint":null;return a};h.prototype.getFieldDomain=function(a,b){var c=this,d,e=!1;b=(b=b&&b.feature)&&b.attributes;var f=this.typeIdField&&b&&b[this.typeIdField];null!=f&&this.types&&
(e=this.types.some(function(b){return b.id==f?((d=b.domains&&b.domains[a])&&"inherited"===d.type&&(d=c._getLayerDomain(a)),!0):!1}));e||d||(d=this._getLayerDomain(a));return d};h.prototype.getField=function(a,b){var c=this.processing?this.fields.concat(this.processing.fields):this.fields;return V.getField(a,b||c)};h.prototype.graphicChanged=function(a){this.emit("graphic-update",a)};h.prototype.queryFeatures=function(a){var b=this;return this.load().then(function(){if(!b.source.queryFeatures)return p.reject(new v("FeatureLayer",
"Layer source does not support queryFeatures capability"))}).then(function(){return b.source.queryFeatures(a||b.createQuery())}).then(function(a){if(a&&a.features){var c=b.popupTemplate;a.features.forEach(function(a){a.popupTemplate=c;a.layer=b})}return a})};h.prototype.queryObjectIds=function(a){var b=this;return this.load().then(function(){return b.source.queryObjectIds?b.source.queryObjectIds(a||b.createQuery()):p.reject(new v("FeatureLayer","Layer source does not support queryObjectIds capability"))})};
h.prototype.queryFeatureCount=function(a){var b=this;return this.load().then(function(){return b.source.queryFeatureCount?b.source.queryFeatureCount(a||b.createQuery()):p.reject(new v("FeatureLayer","Layer source does not support queryFeatureCount capability"))})};h.prototype.queryExtent=function(a){var b=this;return this.load().then(function(){return b.source.queryExtent?b.source.queryExtent(a||b.createQuery()):p.reject(new v("FeatureLayer","Layer source does not support queryExtent capability"))})};
h.prototype.read=function(a,b){switch(b&&b.origin){case "web-scene":this.inherited(arguments,[{returnZ:!0},b])}var c=a.featureCollection;if(c){var d=c.layers;d&&1===d.length&&(this.inherited(arguments,[d[0],b]),null!=c.showLegend&&this.inherited(arguments,[{showLegend:c.showLegend},b]))}this.inherited(arguments,[a,b]);return this};h.prototype.write=function(a,b){if(b&&"web-scene"===b.origin&&b.messages){if(!this.url)return b.messages.push(new v("layer:unsupported","Layers ("+this.title+", "+this.id+
") of type '"+this.declaredClass+"' require a url to a service to be written to web scenes",{layer:this})),null;if(this.isTable)return b.messages.push(new v("layer:unsupported","Layers ("+this.title+", "+this.id+") of type '"+this.declaredClass+"' using a Table source cannot written to web scenes",{layer:this})),null}return this.inherited(arguments)};h.prototype._getLayerDomain=function(a){if(!this.fields)return null;var b=null;this.fields.some(function(c){c.name===a&&(b=c.domain);return!!b});return b};
h.prototype._fetchFirstLayerId=function(){return b(this.url,{query:{f:"json"},callbackParamName:"callback",responseType:"json"}).then(function(a){if((a=a.data)&&Array.isArray(a.layers)&&0<a.layers.length)return a.layers[0].id})};h.prototype._initLayerProperties=function(a){var b=this;this.source||(this.source=a);a.url&&(this.url=a.url);a.layerDefinition&&this.read(a.layerDefinition,{origin:"service",url:this.parsedUrl});this._verifySource();this._verifyFields();this._addSymbolUrlTokens();V.fixRendererFields(this._getAllRenderers(this.renderer),
this.fields);this.watch("token",function(){b._addSymbolUrlTokens()});return Y.loadStyleRenderer(this,{origin:"service"})};h.prototype._findUrlBasedSymbols=function(){var a=this.renderer;if(!a)return[];var b=[];a.symbol&&b.push(a.symbol);a.defaultSymbol&&b.push(a.defaultSymbol);(a=a.classBreakInfos||a.uniqueValueInfos)&&a.forEach(function(a){a.symbol&&b.push(a.symbol)});return b.filter(function(a){return!!a.url})};h.prototype._addSymbolUrlTokens=function(){var a=this.token;!this._hasMemorySource()&&
a&&this._findUrlBasedSymbols().forEach(function(b){var c=b.url;if(c&&-1!==c.search(/https?\:/i)&&!/[?&]token=/.test(c)){var d=-1===c.indexOf("?")?"?":"\x26";b.url=c+d+"token\x3d"+a}})};h.prototype._getAllRenderers=function(a){if(!a)return[];var b=[];[a,a.trackRenderer,a.observationRenderer,a.latestObservationRenderer].forEach(function(a){a&&(b.push(a),a.rendererInfos&&a.rendererInfos.forEach(function(a){a.renderer&&b.push(a.renderer)}))});return b};h.prototype._verifyFields=function(){var a=this.parsedUrl&&
this.parsedUrl.path||"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+a+")");this.isTable||this._hasMemorySource()||-1!==a.search(/\/FeatureServer\//i)||this.fields&&this.fields.some(function(a){return"geometry"===a.type})||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+a+")")};h.prototype._fixTemplates=function(a,b){a&&
a.forEach(function(a){(a=a.prototype&&a.prototype.attributes)&&b&&delete a[b]})};h.prototype._verifySource=function(){var a=this;if(this._hasMemorySource()){if(this.url)throw new v("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url");var b=["geometryType","fields","objectIdField"];if(!b.every(function(b){return null!=a[b]}))throw new v("feature-layer:missing-property","FeatureLayer created as feature collection requires properties: "+b.join(),
{requiredProperties:b});}else{if(this.isTable)throw new v("feature-layer:source-type-not-supported","The table feature service type is not yet supported",{sourceType:"Table"});if(!this.url)throw new v("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source");}};h.prototype._initMemorySource=function(a){var b=this;a.forEach(function(a){a.layer=b});this._handles.add([a.on("after-add",function(a){a.item.layer=b}),a.on("after-remove",function(a){a.item.layer=
null})],"fl-source")};h.prototype._resetMemorySource=function(a){a.forEach(function(a){a.layer=null});this._handles.remove("fl-source")};h.prototype._hasMemorySource=function(){return!(this.url||!this.source)};h.prototype._readDataCapabilities=function(a){return{supportsAttachment:ia(a,"hasAttachments",!1),supportsM:ia(a,"hasM",!1),supportsZ:ia(a,"hasZ",!1)}};h.prototype._readOperationsCapabilities=function(a,b){a=a?a.toLowerCase().split(",").map(function(a){return a.trim()}):[];var c=-1!==a.indexOf("editing"),
d=c&&-1!==a.indexOf("create"),e=c&&-1!==a.indexOf("delete"),f=c&&-1!==a.indexOf("update");!c||d||e||f||(d=e=f=!0);return{supportsCalculate:ia(b,"supportsCalculate",!1),supportsTruncate:ia(b,"supportsTruncate",!1),supportsValidateSql:ia(b,"supportsValidateSql",!1),supportsAdd:d,supportsDelete:e,supportsEditing:c,supportsQuery:-1!==a.indexOf("query"),supportsUpdate:f}};h.prototype._readQueryCapabilities=function(a){var b=a.advancedQueryCapabilities,c=a.ownershipBasedAccessControlForFeatures;return{supportsStatistics:ia(b,
"supportsStatistics",a.supportsStatistics),supportsCentroid:ia(b,"supportsReturningGeometryCentroid",!1),supportsDistance:ia(b,"supportsQueryWithDistance",!1),supportsDistinct:ia(b,"supportsDistinct",a.supportsAdvancedQueries),supportsExtent:ia(b,"supportsReturningQueryExtent",!1),supportsGeometryProperties:ia(b,"supportsReturningGeometryProperties",!1),supportsOrderBy:ia(b,"supportsOrderBy",a.supportsAdvancedQueries),supportsPagination:ia(b,"supportsPagination",!1),supportsQuantization:ia(a,"supportsCoordinatesQuantization",
!1),supportsResultType:ia(b,"supportsQueryWithResultType",!1),supportsSqlExpression:ia(b,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:ia(a,"useStandardizedQueries",!1),supportsQueryByOthers:ia(c,"allowOthersToQuery",!0)}};h.prototype._readQueryRelatedCapabilities=function(a){a=a.advancedQueryCapabilities;var b=ia(a,"supportsAdvancedQueryRelated",!1);return{supportsPagination:ia(a,"supportsQueryRelatedPagination",!1),supportsCount:b,supportsOrderBy:b}};h.prototype._readEditingCapabilities=
function(a){var b=a.ownershipBasedAccessControlForFeatures;return{supportsGeometryUpdate:ia(a,"allowGeometryUpdates",!0),supportsGlobalId:ia(a,"supportsApplyEditsWithGlobalIds",!1),supportsRollbackOnFailure:ia(a,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:ia(a,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:ia(a,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:ia(b,"allowAnonymousToDelete",!0),supportsDeleteByOthers:ia(b,"allowOthersToDelete",!0),supportsUpdateByAnonymous:ia(b,
"allowAnonymousToUpdate",!0),supportsUpdateByOthers:ia(b,"allowOthersToUpdate",!0)}};h.prototype._processApplyEditsParams=function(a){if(!a)return p.reject(new v("feature-layer:missing-parameters","'addFeatures', 'updateFeatures' or 'deleteFeatures' parameter is required"));a=q.mixin({},a);a.addFeatures=a.addFeatures||[];a.updateFeatures=a.updateFeatures||[];a.deleteFeatures=a.deleteFeatures||[];if(a.addFeatures.length||a.updateFeatures.length||a.deleteFeatures.length){var b=function(a){var b=new g;
b.geometry=a.geometry;b.attributes=a.attributes;return b};a.addFeatures=a.addFeatures.map(b);a.updateFeatures=a.updateFeatures.map(b);return this._normalizeGeometries(a)}return p.reject(new v("feature-layer:missing-parameters","'addFeatures', 'updateFeatures' or 'deleteFeatures' parameter is required"))};h.prototype._normalizeGeometries=function(a){var b=a.addFeatures,c=a.updateFeatures,d=b.concat(c).map(function(a){return a.geometry});return C.normalizeCentralMeridian(d).then(function(d){var e=b.length,
f=c.length;d.slice(0,e).forEach(function(b,c){a.addFeatures[c].geometry=b});d.slice(e,e+f).forEach(function(b,c){a.updateFeatures[c].geometry=b});return a})};e([l.property({types:{key:"type",base:xa.FeatureReduction,typeMap:{selection:xa.FeatureReductionSelection}},json:{origins:{"web-scene":{read:{source:"layerDefinition.featureReduction"},write:{target:"layerDefinition.featureReduction"}}}}})],h.prototype,"featureReduction",void 0);e([l.property({readOnly:!0,dependsOn:["loaded","renderer","fields"]})],
h.prototype,"allRenderers",null);e([l.property({readOnly:!0,dependsOn:["loaded"]})],h.prototype,"capabilities",null);e([l.reader("capabilities","layerDefinition.capabilities layerDefinition.advancedQueryCapabilities layerDefinition.supportsStatistics layerDefinition.supportsAdvancedQueries layerDefinition.hasAttachments layerDefinition.hasM layerDefinition.hasZ layerDefinition.supportsCalculate layerDefinition.supportsTruncate layerDefinition.supportsValidateSql layerDefinition.supportsCoordinatesQuantization layerDefinition.useStandardizedQueries layerDefinition.ownershipBasedAccessControlForFeatures layerDefinition.allowGeometryUpdates layerDefinition.supportsApplyEditsWithGlobalIds layerDefinition.supportsRollbackOnFailureParameter layerDefinition.allowUpdateWithoutMValues layerDefinition.supportsAttachmentsByUploadId".split(" ")),
l.reader("service","capabilities","advancedQueryCapabilities supportsStatistics supportsAdvancedQueries hasAttachments hasM hasZ supportsCalculate supportsTruncate supportsValidateSql supportsCoordinatesQuantization useStandardizedQueries ownershipBasedAccessControlForFeatures allowGeometryUpdates supportsApplyEditsWithGlobalIds supportsRollbackOnFailureParameter allowUpdateWithoutMValues supportsAttachmentsByUploadId capabilities".split(" "))],h.prototype,"readCapabilities",null);e([l.property({type:String,
json:{read:{source:"layerDefinition.copyrightText"},origins:{service:{read:{source:"copyrightText"}}}}})],h.prototype,"copyright",void 0);e([l.property({type:String,json:{read:{source:"layerDefinition.displayField"},origins:{service:{read:{source:"displayField"}}}}})],h.prototype,"displayField",void 0);e([l.property({type:String,json:{origins:{service:{read:!1,write:!1}},read:{source:"layerDefinition.definitionExpression"},write:{target:"layerDefinition.definitionExpression"}}})],h.prototype,"definitionExpression",
void 0);e([l.property({readOnly:!0,json:{read:K.read}})],h.prototype,"defaultSymbol",void 0);e([l.property({readOnly:!0})],h.prototype,"editFieldsInfo",void 0);e([l.property({type:R,json:{origins:{service:{read:{source:"elevationInfo"},write:{target:"elevationInfo",enabled:!1}}},read:{source:"layerDefinition.elevationInfo"},write:{target:"layerDefinition.elevationInfo"}}})],h.prototype,"elevationInfo",void 0);e([l.property({type:[T],json:{origins:{service:{read:!0}},read:{source:"layerDefinition.fields"}}})],
h.prototype,"fields",void 0);e([l.property({type:y,json:{origins:{service:{read:{source:"extent"}}},read:{source:"layerDefinition.extent"}}})],h.prototype,"fullExtent",void 0);e([l.property()],h.prototype,"gdbVersion",void 0);e([l.property({json:{origins:{service:{read:La.read}},read:{source:"layerDefinition.geometryType",reader:La.read}}})],h.prototype,"geometryType",void 0);e([l.property({readOnly:!0,dependsOn:["loaded"],json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasAttachments"}}})],
h.prototype,"hasAttachments",null);e([l.property({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasM"}}})],h.prototype,"hasM",void 0);e([l.property({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasZ"}}})],h.prototype,"hasZ",void 0);e([l.property({readOnly:!0,type:z})],h.prototype,"heightModelInfo",void 0);e([l.property({json:{origins:{service:{read:!1},"portal-item":{read:!1}}}})],h.prototype,"id",void 0);e([l.property({readOnly:!0})],
h.prototype,"isTable",void 0);e([l.reader("service","isTable",["type"]),l.reader("isTable",["layerDefinition.type"])],h.prototype,"readIsTable",null);e([l.property({dependsOn:["loaded","url","source"],readOnly:!0})],h.prototype,"hasService",null);e([l.property({type:Boolean,json:{read:{source:"showLabels"},write:{target:"showLabels"}}})],h.prototype,"labelsVisible",void 0);e([l.property({type:[qa],json:{origins:{service:{read:{source:"drawingInfo.labelingInfo",reader:wa.reader},write:{target:"drawingInfo.labelingInfo",
enabled:!1}}},read:{source:"layerDefinition.drawingInfo.labelingInfo",reader:wa.reader},write:{target:"layerDefinition.drawingInfo.labelingInfo"}}})],h.prototype,"labelingInfo",void 0);e([l.property({type:Number,json:{origins:{service:{read:{source:"id"}}},read:!1}})],h.prototype,"layerId",void 0);e([l.property({type:Boolean,json:{read:{source:"showLegend"},write:{target:"showLegend"}}})],h.prototype,"legendEnabled",void 0);e([l.property({type:Number,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.maxRecordCount"}}})],
h.prototype,"maxRecordCount",void 0);e([l.property({type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}})],h.prototype,"minScale",void 0);e([l.reader("service","minScale",["minScale","effectiveMinScale"])],h.prototype,"readMinScale",null);e([l.property({type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.maxScale"},write:{target:"layerDefinition.maxScale"}}})],h.prototype,"maxScale",
void 0);e([l.reader("service","maxScale",["maxScale","effectiveMaxScale"])],h.prototype,"readMaxScale",null);e([l.property({type:String})],h.prototype,"objectIdField",void 0);e([l.reader("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"]),l.reader("service","objectIdField",["objectIdField","fields"])],h.prototype,"readObjectIdFieldFromService",null);e([l.property()],h.prototype,"operationalLayerType",void 0);e([l.property({dependsOn:["requiredFields"]})],h.prototype,"outFields",
null);e([l.property({readOnly:!0,dependsOn:["layerId"]})],h.prototype,"parsedUrl",null);e([l.property({type:Boolean,json:{write:{target:"disablePopup"}}})],h.prototype,"popupEnabled",void 0);e([l.reader("popupEnabled",["disablePopup"])],h.prototype,"readPopupEnabled",null);e([l.writer("popupEnabled")],h.prototype,"writePopupEnabled",null);e([l.property({type:c,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],h.prototype,"popupTemplate",void 0);e([l.property({type:da})],h.prototype,"processing",
void 0);e([l.property({readOnly:!0})],h.prototype,"relationships",void 0);e([l.property({types:D.types,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}}},write:{target:"layerDefinition.drawingInfo.renderer"}}})],h.prototype,"renderer",null);e([l.reader("service","renderer",["drawingInfo.renderer","defaultSymbol","type"]),l.reader("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol","layerDefinition.type"])],h.prototype,"readRenderer",null);e([l.property({readOnly:!0,
dependsOn:["allRenderers","labelingInfo","elevationInfo.featureExpressionInfo","popupTemplate.requiredFields"]})],h.prototype,"requiredFields",null);e([l.property({type:Boolean})],h.prototype,"returnM",void 0);e([l.property({type:Boolean})],h.prototype,"returnZ",void 0);e([l.property(Ca.screenSizePerspectiveEnabled)],h.prototype,"screenSizePerspectiveEnabled",void 0);e([l.property()],h.prototype,"source",null);e([l.cast("source")],h.prototype,"castSource",null);e([l.reader("portal-item","source",
["featureSet"]),l.reader("web-map","source",["featureSet"])],h.prototype,"readSource",null);e([l.property({readOnly:!0,json:{origins:{service:{read:{source:"definitionExpression"}}}}})],h.prototype,"serviceDefinitionExpression",void 0);e([l.property({type:A,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:{source:"layerDefinition.extent.spatialReference"}}})],h.prototype,"spatialReference",void 0);e([l.property({type:[ja]})],h.prototype,"templates",void 0);e([l.reader("templates",
["editFieldsInfo","creatorField","editorField","templates"])],h.prototype,"readTemplates",null);e([l.property()],h.prototype,"timeInfo",void 0);e([l.property()],h.prototype,"title",void 0);e([l.reader("service","title",["name"]),l.reader("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],h.prototype,"readTitle",null);e([l.reader("web-map","title",["layerDefinition.name","title"])],h.prototype,"readTitleFromWebMap",null);e([l.property({type:String})],h.prototype,"sublayerTitleMode",
void 0);e([l.property({type:String,readOnly:!0,json:{read:{source:"timeInfo.trackIdField"}}})],h.prototype,"trackIdField",void 0);e([l.property({json:{read:!1}})],h.prototype,"type",void 0);e([l.property({type:String,readOnly:!0})],h.prototype,"typeIdField",void 0);e([l.reader("service","typeIdField"),l.reader("typeIdField",["layerDefinition.typeIdField"])],h.prototype,"readTypeIdField",null);e([l.property({type:[ka]})],h.prototype,"types",void 0);e([l.reader("service","types",["types"]),l.reader("types",
["layerDefinition.types"])],h.prototype,"readTypes",null);e([l.property({type:String})],h.prototype,"url",null);e([l.writer("url")],h.prototype,"writeUrl",null);e([l.property({readOnly:!0})],h.prototype,"userIsAdmin",void 0);e([l.property({json:{origins:{"portal-item":{read:!1}}}})],h.prototype,"version",void 0);e([l.reader("service","version","currentVersion capabilities drawingInfo hasAttachments htmlPopupType relationships timeInfo typeIdField types".split(" ")),l.reader("version","layerDefinition.currentVersion layerDefinition.capabilities layerDefinition.drawingInfo layerDefinition.hasAttachments layerDefinition.htmlPopupType layerDefinition.typeIdField layerDefinition.types".split(" "))],
h.prototype,"readVersion",null);e([l.property({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],h.prototype,"visible",void 0);e([l.reader("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],h.prototype,"readVisible",null);e([k(0,l.cast(L))],h.prototype,"queryFeatures",null);e([k(0,l.cast(L))],h.prototype,"queryObjectIds",null);e([k(0,l.cast(L))],h.prototype,"queryFeatureCount",null);e([k(0,l.cast(L))],h.prototype,"queryExtent",
null);return h=e([l.subclass("esri.layers.FeatureLayer")],h)}(l.declared(M,ca,N,U,P,ga,f))})},"esri/renderers/SimpleRenderer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/lang ../symbols/support/jsonUtils ../symbols/support/typeUtils ./Renderer".split(" "),function(a,h,n,e,k,l,q,g,c){return function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.description=null;b.label=null;b.symbol=
null;b.type="simple";return b}n(b,a);c=b;b.prototype.writeSymbolWebScene=function(a,b,c,e){q.writeTarget(a,b,c,e)};b.prototype.writeSymbol=function(a,b,c,e){q.writeTarget(a,b,c,e)};b.prototype.readSymbol=function(a,b,c){return q.read(a,b,c)};b.prototype.getSymbol=function(a,b){return this.symbol};b.prototype.getSymbols=function(){return this.symbol?[this.symbol]:[]};b.prototype.clone=function(){return new c({description:this.description,label:this.label,symbol:this.symbol&&this.symbol.clone(),visualVariables:l.clone(this.visualVariables),
authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})};e([k.property({type:String,json:{write:!0}})],b.prototype,"description",void 0);e([k.property({type:String,json:{write:!0}})],b.prototype,"label",void 0);e([k.property({types:g.types})],b.prototype,"symbol",void 0);e([k.writer("web-scene","symbol",{symbol:{types:g.types3D}})],b.prototype,"writeSymbolWebScene",null);e([k.writer("symbol")],b.prototype,"writeSymbol",null);e([k.reader("symbol")],b.prototype,"readSymbol",null);return b=c=
e([k.subclass("esri.renderers.SimpleRenderer")],b);var c}(k.declared(c))})},"esri/renderers/Renderer":function(){define("../core/declare ../core/Accessor ../core/JSONSupport ../core/kebabDictionary ../core/screenUtils ../core/lang ../core/Error ../support/arcadeUtils dojo/_base/lang ../Color ./support/utils ./support/AuthoringInfo".split(" "),function(a,h,n,e,k,l,q,g,c,b,f,r){var v=e({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),x=e({widthAndDepth:"width-and-depth"}),
w=e({unknown:"unknown",inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers","decimal-degree":"decimal-degrees"});e({classedSize:"classed-size",classedColor:"classed-color",univariateColorSize:"univariate-color-size"});e({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",
esriClassifyStandardDeviation:"standard-deviation"});e({percentTotal:"percent-of-total"});var t=Math.PI;return a([h,n],{declaredClass:"esri.renderers.Renderer",properties:{authoringInfo:{type:r,value:null,json:{write:!0}},requiredFields:{dependsOn:["visualVariables"],get:function(){var a=Object.create(null);this.collectRequiredFields(a);return Object.keys(a)}},type:{type:String,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}},visualVariables:{json:{read:{source:["visualVariables","rotationType",
"rotationExpression"],reader:function(a,b){return this._readVariables(a,b)}},write:function(a,b,c,e){var d=[];a.forEach(function(a,b){"size"===a.type?d.push(this._writeSizeInfo(a,e,b)):"color"===a.type?d.push(this._writeColorInfo(a,e,b)):"opacity"===a.type?d.push(this._writeOpacityInfo(a,e,b)):"rotation"===a.type&&d.push(this._writeRotationInfo(a,e,b))},this);b.visualVariables=d}}}},constructor:function(){this._cache={}},_rotationRE:/^\[([^\]]+)\]$/i,_viewScaleRE:/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i,
_visualVariablesSetter:function(a){var b=this._cache;this.visualVariables&&this.visualVariables.forEach(function(a,c){b.hasOwnProperty(c)&&(b[c]=null)},this);a&&a.some(function(a){return!!a.target})&&a.sort(function(a,b){return a.target===b.target?0:a.target?1:-1});a&&a.forEach(function(a,c){"color"===a.type?b[c]=this._processColorInfo(a):"opacity"===a.type?b[c]=this._processOpacityInfo(a):"size"===a.type?b[c]=this._processSizeInfo(a):"rotation"===a.type&&(b[c]=this._processRotationInfo(a))},this);
this._set("visualVariables",a)},getSymbol:function(a,b){},getVisualVariableValues:function(a,b){var d=this.visualVariables,e;d&&(e=d.map(function(d){var e,f=d.type,g=f+"Info";b=c.mixin({},b);b[g]=d;switch(f){case "size":e=this.getSize(a,b);break;case "color":e=this.getColor(a,b);break;case "opacity":e=this.getOpacity(a,b);break;case "rotation":e=this.getRotationAngle(a,b)}return{variable:d,value:e}},this).filter(function(a){return null!=a.value},this));return e},hasVisualVariables:function(a,b){return a?
!!this.getVisualVariablesForType(a,b):!!(this.getVisualVariablesForType("size",b)||this.getVisualVariablesForType("color",b)||this.getVisualVariablesForType("opacity",b)||this.getVisualVariablesForType("rotation",b))},getVisualVariablesForType:function(a,b){var c=this.visualVariables,e;c&&(e=c.filter(function(c){return c.type===a&&("string"===typeof b?c.target===b:!1===b?!c.target:!0)}))&&0===e.length&&(e=void 0);return e},getSize:function(a,b){var c=this._getVarInfo(b&&b.sizeInfo,"size"),e=c.variable,
c=this._cache[c.cacheKey],f=null;if(e)var g=e.minSize,f=e.maxSize,g="object"===typeof g&&g?this._getSize(a,g,c&&c.minSize,b):g,f="object"===typeof f&&f?this._getSize(a,f,c&&c.maxSize,b):f,f=this._getSize(a,e,c&&c.root,b,[g,f]);return f},getSizeRangeAtScale:function(a,b){var c;a=this._getVarInfo(a,"size");var e=this._cache[a.cacheKey],f={scale:b};if((a=a.variable)&&b){b=a.minSize;var g=a.maxSize;a="object"===typeof b&&b?this._getSize({},b,e&&e.minSize,f):b;e="object"===typeof g&&g?this._getSize({},
g,e&&e.maxSize,f):g;if(null!=a||null!=e)a>e&&(c=e,e=a,a=c),c={minSize:a,maxSize:e}}return c},getColor:function(a,b){var c=this._getVarInfo(b&&b.colorInfo,"color");return this._getColorComponent(a,c.variable,this._cache[c.cacheKey],b)},getOpacity:function(a,b){var c=this._getVarInfo(b&&b.opacityInfo,"opacity");return this._getColorComponent(a,c.variable,this._cache[c.cacheKey],b,!0)},getRotationAngle:function(a,b){var d=this._getVarInfo(b&&b.rotationInfo,"rotation"),e=d.variable,f=this._cache[d.cacheKey],
h=e.axis||"heading",d="heading"===h&&"arithmetic"===e.rotationType?90:0,h="heading"===h&&"arithmetic"===e.rotationType?-1:1,e=e.field,f=f&&f.compiledFunc,k=a.attributes,l=0;if(e||f)f?l=g.executeFunction(f,g.createExecContext(a,g.getViewInfo(b))):c.isFunction(e)?l=e.apply(this,arguments):k&&(l=k[e]||0),l="number"!==typeof l||isNaN(l)?null:d+h*l;return l},collectRequiredFields:function(a){var b=[];this.visualVariables&&(b=b.concat(this.visualVariables));b.forEach(function(b){b&&(b.field&&(a[b.field]=
!0),b.normalizationField&&(a[b.normalizationField]=!0),b.valueExpression&&g.extractFieldNames(b.valueExpression).forEach(function(b){a[b]=!0}))})},_getVarInfo:function(a,b){var c;a&&a.type===b&&this.visualVariables?(c=this.visualVariables.indexOf(a),a=this.visualVariables[c]):this.visualVariables&&(a=(a=this.getVisualVariablesForType(b))&&a[0],c=this.visualVariables.indexOf(a));return{variable:a,cacheKey:c}},_readSizeInfo:function(a){a.axis&&(a.axis=x.fromJSON(a.axis));a.valueUnit&&(a.valueUnit=w.fromJSON(a.valueUnit));
return a},_readColorInfo:function(a){a&&(a.colors&&a.colors.forEach(function(e,d){c.isArray(e)?a.colors[d]=b.fromJSON(e):a.colors[d]=new b(e)}),a.stops&&a.stops.forEach(function(e,d){e.color&&c.isArray(e.color)?a.stops[d].color=b.fromJSON(e.color):e.color&&(a.stops[d].color=new b(e.color))}));return a},_readOpacityInfo:function(a){var b;a&&(b=c.mixin({},a),b.transparencyValues&&(b.opacityValues=b.transparencyValues.map(function(a){return 1-a/100}),delete b.transparencyValues),b.stops&&(b.stops=b.stops.map(function(a){a=
c.mixin({},a);a.opacity=1-a.transparency/100;delete a.transparency;return a})));return b},_readVariables:function(a,b){a&&(a=a.map(function(a){a=l.clone(a);a.type=v.fromJSON(a.type);"size"===a.type?a=this._readSizeInfo(a):"color"===a.type?a=this._readColorInfo(a):"opacity"===a.type&&(a=this._readOpacityInfo(a));return a},this));var c=b.rotationType;if(b=b.rotationExpression)c={type:"rotation",rotationType:c},(b=b.match(this._rotationRE))&&b[1]&&(c.field=b[1],a||(a=[]),a.push(c));return a},_createCache:function(a){var b=
a&&a.valueExpression,c=g.createSyntaxTree(b),c=g.createFunction(c),e=!(!a||!a.expression)||this._viewScaleRE.test(b);return{ipData:this._interpolateData(a),hasExpr:!!b,compiledFunc:c,isScaleDriven:e}},_processColorInfo:function(a){a&&(a.colors&&a.colors.forEach(function(c,d){c instanceof b||(a.colors[d]=new b(c))}),a.stops&&a.stops.forEach(function(c,d){!c.color||c.color instanceof b||(a.stops[d].color=new b(c.color))}),this._sortStops(a.stops));return this._createCache(a)},_processOpacityInfo:function(a){this._sortStops(a&&
a.stops);return this._createCache(a)},_processSizeInfo:function(a){a.stops&&Array.isArray(a.stops)?a.stops=this._processSizeInfoStops(a.stops):(a.minSize=a.minSize&&this._processSizeInfoSize(a.minSize),a.maxSize=a.maxSize&&this._processSizeInfoSize(a.maxSize));return{root:this._createCache(a),minSize:this._createCache(a.minSize),maxSize:this._createCache(a.maxSize)}},_processSizeInfoSize:function(a){"object"===typeof a?a.stops=this._processSizeInfoStops(a.stops):a=k.toPt(a);return a},_processSizeInfoStops:function(a){a&&
Array.isArray(a)&&(a.forEach(function(a){a.size=k.toPt(a.size)}),this._sortStops(a));return a},_sortStops:function(a){a&&Array.isArray(a)&&a.sort(function(a,b){return a.value-b.value})},_processRotationInfo:function(a){return this._createCache(a)},_getSize:function(a,b,d,e,h){var k=a.attributes,m=b.field,l=b.stops,p=0,n=d&&d.hasExpr,q=d&&d.compiledFunc,u=d&&d.ipData,r=d&&d.isScaleDriven,w="number"===typeof a,x=w?a:null;if(m||r||n){var v=e&&e.scale,y=h?h[0]:b.minSize,D=h?h[1]:b.maxSize,S=b.minDataValue,
L=b.maxDataValue,M=b.valueUnit||"unknown",ca=b.valueRepresentation,p=b.scaleBy,N=b.normalizationField,U=k?parseFloat(k[N]):void 0,P=e&&e.shape;r?x=null==v?this._getAverageValue(b):v:"number"!==typeof x&&(n?x=g.executeFunction(q,g.createExecContext(a,g.getViewInfo(e))):c.isFunction(m)?x=m.apply(this,arguments):k&&(x=k[m]));if(null==x||N&&!w&&(isNaN(U)||0===U))return null;isNaN(U)||w||(x/=U);if(l)D=this._lookupData(x,u),x=D[0],y=D[1],x===y?p=l[x].size:(x=l[x].size,l=l[y].size,p=x+(l-x)*D[2]);else if(null!=
y&&null!=D&&null!=S&&null!=L)x<=S?p=y:x>=L?p=D:(l=(x-S)/(L-S),"area"===p&&P?(y=(x="circle"===P)?t*Math.pow(y/2,2):y*y,l=y+l*((x?t*Math.pow(D/2,2):D*D)-y),p=x?2*Math.sqrt(l/t):Math.sqrt(l)):p=y+l*(D-y));else if("unknown"===M)null!=y&&null!=S?(y&&S?(l=x/S,p="circle"===P?2*Math.sqrt(l*Math.pow(y/2,2)):"square"===P||"diamond"===P||"image"===P?Math.sqrt(l*Math.pow(y,2)):l*y):p=x+(y||S),p=p<y?y:p,null!=D&&p>D&&(p=D)):p=x;else{l=(e&&e.resolution?e.resolution:1)*f.meterIn[M];if("area"===ca)p=Math.sqrt(x/
t)/l,p*=2;else if(p=x/l,"radius"===ca||"distance"===ca)p*=2;null!=y&&p<y&&(p=y);null!=D&&p>D&&(p=D)}}else b&&(p=l&&l[0]&&l[0].size,null==p&&(p=b.minSize));return p=isNaN(p)?0:p},_getAverageValue:function(a){var b=a.stops,c;b?(c=b[0].value,a=b[b.length-1].value):(c=a.minDataValue||0,a=a.maxDataValue||0);return(c+a)/2},_getColorComponent:function(a,b,d,e,f,h){var k=a.attributes,m=b&&b.field,l="number"===typeof a,p=l?a:null,n=d&&d.hasExpr,q=d&&d.compiledFunc,t=d&&d.ipData,u;if(m||n){var r=b.normalizationField,
w=k?parseFloat(k[r]):void 0;"number"!==typeof p&&(n?p=g.executeFunction(q,g.createExecContext(a,g.getViewInfo(e))):c.isFunction(m)?p=m.apply(this,arguments):k&&(p=k[m]));null==p||r&&!l&&(isNaN(w)||0===w)||(isNaN(w)||l||(p/=w),u=f?this._getOpacity(p,b,t):this._getColor(p,b,t))}else b&&(k=b.stops,f?(u=k&&k[0]&&k[0].opacity,null==u&&(u=b.opacityValues&&b.opacityValues[0])):u=k&&k[0]&&k[0].color||b.colors&&b.colors[0]);h&&(h.data=p,h.value=u);return h||u},_interpolateData:function(a){var b;if(a)if(a.colors||
a.opacityValues){var c=(a.colors||a.opacityValues).length,e=a.minDataValue,f=(a.maxDataValue-e)/(c-1);b=[];for(a=0;a<c;a++)b[a]=e+a*f}else a.stops&&(b=a.stops.map(function(a){return a.value}));return b},_getOpacity:function(a,b,c){a=this._lookupData(a,c);var d;b=b||this.opacityInfo;a&&(c=a[0],d=a[1],c===d?d=this._getOpacValue(b,c):(c=this._getOpacValue(b,c),b=this._getOpacValue(b,d),d=c+(b-c)*a[2]));return d},_getOpacValue:function(a,b){return a.opacityValues?a.opacityValues[b]:a.stops[b].opacity},
_getColor:function(a,c,d){a=this._lookupData(a,d);var e;c=c||this.colorInfo;a&&(e=a[0],d=a[1],e=e===d?this._getColorObj(c,e):b.blendColors(this._getColorObj(c,e),this._getColorObj(c,d),a[2]),e=new b(e));return e},_getColorObj:function(a,b){return a.colors?a.colors[b]:a.stops[b].color},_lookupData:function(a,b){var c;if(b){var e=0,f=b.length-1;b.some(function(b,c){if(a<b)return f=c,!0;e=c;return!1});c=[e,f,(a-b[e])/(b[f]-b[e])]}return c},_processForContext:function(a,b,c){if(b&&"web-scene"===b.origin){var d=
null!=a.expression,e=null!=a.valueExpressionTitle&&"rotation"===a.type;b.messages&&(d&&b.messages.push(new q("property:unsupported",a.type+"VisualVariable.expression is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:c+".expression",context:b})),e&&b.messages.push(new q("property:unsupported",a.type+"VisualVariable.valueExpressionTitle is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:c+
".valueExpressionTitle",context:b})));d&&delete a.expression;e&&delete a.valueExpressionTitle}else"size"===a.type&&this._convertExpressionToArcade(a)},_writeRotationInfo:function(a,b,d){a&&(a=c.mixin({},a),this._processForContext(a,b,"visualVariables["+d+"]"),a.type=v.toJSON(a.type),a=l.fixJson(a,!0));return a},_convertExpressionToArcade:function(a){a&&a.expression&&(a.valueExpression="$view.scale")},_writeSizeInfo:function(a,b,d){if(a){a=c.mixin({},a);this._processForContext(a,b,"string"===typeof d?
d:"visualVariables["+d+"]");var e=a.minSize,f=a.maxSize;e&&(a.minSize="number"===typeof e?e:this._writeSizeInfo(e,b,"visualVariables["+d+"].minSize"));f&&(a.maxSize="number"===typeof f?f:this._writeSizeInfo(f,b,"visualVariables["+d+"].maxSize"));b=a.legendOptions;d=a.axis;a.type=v.toJSON(a.type);d&&(a.axis=x.toJSON(d));b&&(a.legendOptions=c.mixin({},b),b=b.customValues)&&(a.legendOptions.customValues=b.slice(0));a.stops&&(a.stops=a.stops.map(function(a){a=c.mixin({},a);null===a.label&&delete a.label;
return a}));a=l.fixJson(a,!0)}return a},_writeColorInfo:function(a,e,d){a&&(a=c.mixin({},a),this._processForContext(a,e,"visualVariables["+d+"]"),a.type=v.toJSON(a.type),a.colors&&(a.colors=a.colors.map(function(a){return b.toJSON(a)})),a.stops&&(a.stops=a.stops.map(function(a){a=c.mixin({},a);a.color&&(a.color=b.toJSON(a.color));null===a.label&&delete a.label;return a})),a.legendOptions&&(a.legendOptions=c.mixin({},a.legendOptions)),a=l.fixJson(a,!0));return a},_writeOpacityInfo:function(a,b,d){var e;
a&&(e=c.mixin({},a),this._processForContext(e,b,"visualVariables["+d+"]"),e.type=v.toJSON(e.type),e.opacityValues&&(e.transparencyValues=e.opacityValues.map(function(a){return Math.max(0,Math.min(Math.round(100*(1-a)),100))}),delete e.opacityValues),e.stops&&(e.stops=e.stops.map(function(a){a=c.mixin({},a);a.transparency=Math.max(0,Math.min(Math.round(100*(1-a.opacity)),100));delete a.opacity;null===a.label&&delete a.label;return a})),e.legendOptions&&(e.legendOptions=c.mixin({},e.legendOptions)),
e=l.fixJson(e,!0));return e}})})},"esri/renderers/support/utils":function(){define("dojo/_base/lang dojo/_base/array dojo/date/locale ../../Color ../../core/numberUtils dojo/i18n!dojo/cldr/nls/gregorian".split(" "),function(a,h,n,e,k,l){function q(a){return a&&h.map(a,function(a){return new e(a)})}function g(a,c,e){var f="";0===c?f=b.lt+" ":c===e&&(f=b.gt+" ");return f+a}var c={},b={lte:"\x3c\x3d",gte:"\x3e\x3d",lt:"\x3c",gt:"\x3e",pct:"%",ld:"\u2013"},f={millisecond:0,second:1,minute:2,hour:3,day:4,
month:5,year:6},r={millisecond:{dateOptions:{formatLength:"long"},timeOptions:{formatLength:"medium"}},second:{dateOptions:{formatLength:"long"},timeOptions:{formatLength:"medium"}},minute:{dateOptions:{formatLength:"long"},timeOptions:{formatLength:"short"}},hour:{dateOptions:{formatLength:"long"},timeOptions:{formatLength:"short"}},day:{selector:"date",dateOptions:{formatLength:"long"}},month:{selector:"date",dateOptions:{formatLength:"long"}},year:{selector:"date",dateOptions:{selector:"year"}}},
v={formatLength:"short",fullYear:!0},x={formatLength:"short"};a.mixin(c,{meterIn:{inches:1/.0254,feet:1/.3048,"us-feet":3.28084,yards:1/.9144,miles:1/1609.344,"nautical-miles":1/1852,millimeters:1E3,centimeters:100,decimeters:10,meters:1,kilometers:.001,"decimal-degrees":180/20015077},timelineDateFormatOptions:{selector:"date",dateOptions:{formatLength:"short",fullYear:!0}},formatDate:function(b,c){var e=[];null==b||b instanceof Date||(b=new Date(b));c=c||{};c=a.mixin({},c);var f=c.selector?c.selector.toLowerCase():
null,d=!f||-1<f.indexOf("time"),f=!f||-1<f.indexOf("date");d&&(c.timeOptions=c.timeOptions||x,c.timeOptions&&(c.timeOptions=a.mixin({},c.timeOptions),c.timeOptions.selector=c.timeOptions.selector||"time",e.push(c.timeOptions)));f&&(c.dateOptions=c.dateOptions||v,c.dateOptions&&(c.dateOptions=a.mixin({},c.dateOptions),c.dateOptions.selector=c.dateOptions.selector||"date",e.push(c.dateOptions)));e&&e.length?(e=h.map(e,function(a){return n.format(b,a)}),c=1==e.length?e[0]:l["dateTimeFormat-medium"].replace(/\'/g,
"").replace(/\{(\d+)\}/g,function(a,b){return e[b]})):c=n.format(b);return c},createColorStops:function(a){var b=a.values,e=a.colors,f=a.labelIndexes,d=a.isDate,m=a.dateFormatOptions;a=[];return a=h.map(b,function(a,l){var n=null;if(!f||-1<h.indexOf(f,l)){var p;(p=d?c.formatDate(a,m):k.format(a))&&(n=g(p,l,b.length-1))}return{value:a,color:e[l],label:n}})},updateColorStops:function(a){var b=a.stops,e=a.changes,f=a.isDate,d=a.dateFormatOptions,m=[],l,n=h.map(b,function(a){return a.value});h.forEach(e,
function(a){m.push(a.index);n[a.index]=a.value});l=k.round(n,{indexes:m});h.forEach(b,function(a,e){a.value=n[e];if(null!=a.label){var h,m=null;(h=f?c.formatDate(l[e],d):k.format(l[e]))&&(m=g(h,e,b.length-1));a.label=m}})},createClassBreakLabel:function(a){var c=a.minValue,e=a.maxValue,f=a.isFirstBreak?"":b.gt+" ";a="percent-of-total"===a.normalizationType?b.pct:"";c=null==c?"":k.format(c);e=null==e?"":k.format(e);return f+c+a+" "+b.ld+" "+e+a},setLabelsForClassBreaks:function(a){var b=a.classBreakInfos,
e=a.classificationMethod,f=a.normalizationType,d=[];b&&b.length&&("standard-deviation"===e?console.log("setLabelsForClassBreaks: cannot set labels for class breaks generated using 'standard-deviation' method."):a.round?(d.push(b[0].minValue),h.forEach(b,function(a){d.push(a.maxValue)}),d=k.round(d),h.forEach(b,function(a,b){a.label=c.createClassBreakLabel({minValue:0===b?d[0]:d[b],maxValue:d[b+1],isFirstBreak:0===b,normalizationType:f})})):h.forEach(b,function(a,b){a.label=c.createClassBreakLabel({minValue:a.minValue,
maxValue:a.maxValue,isFirstBreak:0===b,normalizationType:f})}))},updateClassBreak:function(a){var b=a.classBreaks,e=a.normalizationType,f=a.change,d=f.index,f=f.value,g=-1,h=-1,k=b.length;"standard-deviation"===a.classificationMethod?console.log("updateClassBreak: cannot update labels for class breaks generated using 'standard-deviation' method."):(0===d?g=d:d===k?h=d-1:(h=d-1,g=d),-1<g&&g<k&&(a=b[g],a.minValue=f,a.label=c.createClassBreakLabel({minValue:a.minValue,maxValue:a.maxValue,isFirstBreak:0===
g,normalizationType:e})),-1<h&&h<k&&(a=b[h],a.maxValue=f,a.label=c.createClassBreakLabel({minValue:a.minValue,maxValue:a.maxValue,isFirstBreak:0===h,normalizationType:e})))},calculateDateFormatInterval:function(a){var b,c,e=a.length,d,g,k,l,n,q,r=Infinity,x;a=h.map(a,function(a){return new Date(a)});for(b=0;b<e-1;b++){d=a[b];k=[];n=Infinity;q="";for(c=b+1;c<e;c++)g=a[c],g=d.getFullYear()!==g.getFullYear()&&"year"||d.getMonth()!==g.getMonth()&&"month"||d.getDate()!==g.getDate()&&"day"||d.getHours()!==
g.getHours()&&"hour"||d.getMinutes()!==g.getMinutes()&&"minute"||d.getSeconds()!==g.getSeconds()&&"second"||"millisecond",l=f[g],l<n&&(n=l,q=g),k.push(g);n<r&&(r=n,x=q)}return x},createUniqueValueLabel:function(a){var b=a.value,e=a.fieldInfo,f=a.domain;a=a.dateFormatInterval;var d=String(b);(f=f&&f.codedValues?f.getName(b):null)?d=f:"number"===typeof b&&(d=e&&"date"===e.type?c.formatDate(b,a&&r[a]):k.format(b));return d},cloneColorVariable:function(b){var c;b&&(c=a.mixin({},b),c.colors=q(c.colors),
c.stops=c.stops&&h.map(c.stops,function(b){b=a.mixin({},b);b.color&&(b.color=new e(b.color));return b}),c.legendOptions&&(c.legendOptions=a.mixin({},c.legendOptions)));return c},cloneOpacityVariable:function(b){var c;if(b){c=a.mixin({},b);if(b=c.opacityValues)c.opacityValues=b.slice(0);if(b=c.stops)c.stops=h.map(b,function(b){return a.mixin({},b)});if(b=c.legendOptions)c.legendOptions=a.mixin({},b)}return c},cloneSizeVariable:function(b){var e;b&&(e=a.mixin({},b),e.stops&&(e.stops=h.map(e.stops,function(b){return a.mixin({},
b)})),(b=e.minSize)&&"object"===typeof b&&(e.minSize=c.cloneSizeVariable(b)),(b=e.maxSize)&&"object"===typeof b&&(e.maxSize=c.cloneSizeVariable(b)),b=e.legendOptions)&&(e.legendOptions=a.mixin({},b),b=b.customValues)&&(e.legendOptions.customValues=b.slice(0));return e}});return c})},"esri/core/numberUtils":function(){define(["dojo/number","dojo/i18n!dojo/cldr/nls/number"],function(a,h){function n(a,c){return a-c}var e=/^-?(\d+)(\.(\d+))?$/i,k=new RegExp("\\"+h.decimal+"0+$","g"),l=/(\d)0*$/g,q={numDigits:function(a){var c=
String(a),b=c.match(e);a={integer:0,fractional:0};b&&b[1]?(a.integer=b[1].split("").length,a.fractional=b[3]?b[3].split("").length:0):-1<c.toLowerCase().indexOf("e")&&(b=c.split("e"),c=b[0],b=b[1],c&&b&&(c=Number(c),b=Number(b),(a=0<b)||(b=Math.abs(b)),c=q.numDigits(c),a?(c.integer+=b,c.fractional=b>c.fractional?0:c.fractional-b):(c.fractional+=b,c.integer=b>c.integer?1:c.integer-b),a=c));return a},percentChange:function(a,c,b,e){var f={previous:null,next:null},g;null!=b&&(g=a-b,f.previous=Math.floor(Math.abs(100*
(c-b-g)/g)));null!=e&&(g=e-a,f.next=Math.floor(Math.abs(100*(e-c-g)/g)));return f},round:function(a,c){a=a.slice(0);var b,e,g,h,k,l,t,u,p=c&&null!=c.tolerance?c.tolerance:2,d=c&&c.indexes,m=c&&null!=c.strictBounds?c.strictBounds:!1;if(d)d.sort(n);else for(d=[],k=0;k<a.length;k++)d.push(k);for(k=0;k<d.length;k++)if(u=d[k],c=a[u],b=0===u?null:a[u-1],e=u===a.length-1?null:a[u+1],g=q.numDigits(c),g=g.fractional){l=0;for(t=!1;l<=g&&!t;){h=c;t=l;var y=void 0,z=void 0,y=Number(h.toFixed(t));y<h?z=y+1/Math.pow(10,
t):(z=y,y-=1/Math.pow(10,t));y=Number(y.toFixed(t));z=Number(z.toFixed(t));h=[y,z];h=m&&0===k?h[1]:h[0];t=p;var y=q.percentChange(c,h,b,e),A=z=void 0,z=void 0,z=null==y.previous||y.previous<=t,A=null==y.next||y.next<=t;t=z=z&&A||y.previous+y.next<=2*t;l++}t&&(a[u]=h)}return a},format:function(e,c){c=c||{places:20,round:-1};(e=a.format(e,c))&&(e=e.replace(l,"$1").replace(k,""));return e}};return q})},"esri/renderers/support/AuthoringInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport ../../core/kebabDictionary ./AuthoringInfoVisualVariable".split(" "),
function(a,h,n,e,k,l,q,g){var c=q({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation"}),b=q({classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size"});return function(a){function f(b){b=a.call(this)||this;b.lengthUnit=null;b.visualVariables=null;return b}n(f,a);h=f;Object.defineProperty(f.prototype,"classificationMethod",
{get:function(){if("class-breaks-size"===this.type||"class-breaks-color"===this.type){var a=this._get("classificationMethod");return a?a:"manual"}return null},set:function(a){this._set("classificationMethod",a)},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"fields",{get:function(){return"predominance"===this.type?this._get("fields"):null},set:function(a){this._set("fields",a)},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"standardDeviationInterval",{get:function(){return"standard-deviation"===
this.classificationMethod?this._get("standardDeviationInterval"):null},set:function(a){this._set("standardDeviationInterval",a)},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"type",{get:function(){return this._get("type")},set:function(a){var b=a;"classed-size"===a?b="class-breaks-size":"classed-color"===a&&(b="class-breaks-color");this._set("type",b)},enumerable:!0,configurable:!0});f.prototype.clone=function(){return new h({classificationMethod:this.classificationMethod,fields:this.fields&&
this.fields.slice(0),lengthUnit:this.lengthUnit,standardDeviationInterval:this.standardDeviationInterval,type:this.type,visualVariables:this.visualVariables&&this.visualVariables.map(function(a){return a.clone()})})};e([k.property({type:String,value:null,dependsOn:["type"],json:{read:c.read,write:c.write}})],f.prototype,"classificationMethod",null);e([k.property({type:[String],value:null,dependsOn:["type"],json:{write:!0}})],f.prototype,"fields",null);e([k.property({type:String,json:{read:!1,write:!1,
origins:{"web-scene":{read:!0,write:!0}}}})],f.prototype,"lengthUnit",void 0);e([k.property({type:Number,value:null,dependsOn:["classificationMethod"],json:{write:!0}})],f.prototype,"standardDeviationInterval",null);e([k.property({type:String,value:null,json:{read:b.read,write:b.write}})],f.prototype,"type",null);e([k.property({type:[g],json:{write:!0}})],f.prototype,"visualVariables",void 0);return f=h=e([k.subclass("esri.renderers.support.AuthoringInfo")],f);var h}(k.declared(l))})},"esri/renderers/support/AuthoringInfoVisualVariable":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/accessorSupport/decorators/cast ../../core/JSONSupport ../../core/kebabDictionary".split(" "),
function(a,h,n,e,k,l,q,g){var c=g({percentTotal:"percent-of-total"}),b=g({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity"});return function(a){function f(b){b=a.call(this)||this;b.endTime=null;b.field=null;b.maxSliderValue=null;b.minSliderValue=null;b.startTime=null;b.type=null;b.units=null;return b}n(f,a);g=f;f.prototype.castEndTime=function(a){return"string"===typeof a||"number"===typeof a?a:null};f.prototype.castStartTime=function(a){return"string"===typeof a||"number"===typeof a?
a:null};Object.defineProperty(f.prototype,"style",{get:function(){return"color"===this.type?this._get("style"):null},set:function(a){this._set("style",a)},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,"theme",{get:function(){return"color"===this.type?this._get("theme")||"high-to-low":null},set:function(a){this._set("theme",a)},enumerable:!0,configurable:!0});f.prototype.clone=function(){return new g({endTime:this.endTime,field:this.field,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,
startTime:this.startTime,style:this.style,theme:this.theme,type:this.type,units:this.units})};e([k.property({json:{write:!0}})],f.prototype,"endTime",void 0);e([l.cast("endTime")],f.prototype,"castEndTime",null);e([k.property({type:String,json:{write:!0}})],f.prototype,"field",void 0);e([k.property({type:Number,json:{write:!0}})],f.prototype,"maxSliderValue",void 0);e([k.property({type:Number,json:{write:!0}})],f.prototype,"minSliderValue",void 0);e([k.property({json:{write:!0}})],f.prototype,"startTime",
void 0);e([l.cast("startTime")],f.prototype,"castStartTime",null);e([k.property({type:String,value:null,dependsOn:["type"],json:{read:c.read,write:c.write}})],f.prototype,"style",null);e([k.property({type:String,value:null,dependsOn:["type"],json:{write:!0}})],f.prototype,"theme",null);e([k.property({type:String,json:{read:b.read,write:b.write}})],f.prototype,"type",void 0);e([k.property({type:String,json:{write:!0}})],f.prototype,"units",void 0);return f=g=e([k.subclass("esri.renderers.support.AuthoringInfoVisualVariable")],
f);var g}(k.declared(q))})},"esri/renderers/UniqueValueRenderer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/paramHelper ../core/accessorSupport/decorators ../core/lang ../core/urlUtils ../core/Logger ../core/arrayUtils ../core/Error ../core/accessorSupport/ensureType ../portal/Portal ../support/arcadeUtils ../symbols/WebStyleSymbol ../symbols/support/jsonUtils ../symbols/support/styleUtils ../symbols/support/typeUtils ./Renderer ./support/LegendOptions ./support/UniqueValueInfo ./support/diffUtils".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t,u,p,d,m,y,z){var A=c.getLogger("esri.renderers.UniqueValueRenderer"),C=r.ensureType(y.default);return function(a){function c(c){c=a.call(this)||this;c._valueInfoMap={};c._isDefaultSymbolDerived=!1;c.type="unique-value";c.field=null;c.field2=null;c.field3=null;c.valueExpression=null;c.valueExpressionTitle=null;c.legendOptions=null;c.defaultLabel=null;c.fieldDelimiter=null;c.portal=null;c.styleOrigin=null;c.diff={uniqueValueInfos:function(a,c){if(a||c){if(!a||
!c)return{type:"complete",oldValue:a,newValue:c};for(var d=!1,e={type:"collection",added:[],removed:[],changed:[],unchanged:[]},f=function(f){var g=b.find(a,function(a){return a.value===c[f].value});g?z.diff(g,c[f])?e.changed.push({type:"complete",oldValue:g,newValue:c[f]}):e.unchanged.push({oldValue:g,newValue:c[f]}):e.added.push(c[f]);d=!0},g=0;g<c.length;g++)f(g);f=function(f){b.find(c,function(b){return b.value===a[f].value})||(e.removed.push(a[f]),d=!0)};for(g=0;g<a.length;g++)f(g);return d?
e:void 0}}};c._set("uniqueValueInfos",[]);return c}n(c,a);d=c;c.prototype.writeType=function(a,b,c,d){b.type="uniqueValue"};c.prototype.castField=function(a){return null==a?a:"function"===typeof a?a:r.ensureString(a)};c.prototype.writeField=function(a,b,c,d){"string"===typeof a?b[c]=a:d&&d.messages?d.messages.push(new f("property:unsupported","UniqueValueRenderer.field set to a function cannot be written to JSON")):A.error(".field: cannot write field to JSON since it's not a string value")};Object.defineProperty(c.prototype,
"compiledFunc",{get:function(){return x.createFunction(this.valueExpression)},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"defaultSymbol",{set:function(a){this._isDefaultSymbolDerived=!1;this._set("defaultSymbol",a)},enumerable:!0,configurable:!0});c.prototype.readDefaultSymbol=function(a,b,c){return t.read(a,b,c)};c.prototype.writeDefaultSymbolWebScene=function(a,b,c,d){this._isDefaultSymbolDerived||t.writeTarget(a,b,c,d)};c.prototype.writeDefaultSymbol=function(a,b,c,d){this._isDefaultSymbolDerived||
t.writeTarget(a,b,c,d)};c.prototype.readPortal=function(a,b,c){return c.portal||v.getDefault()};c.prototype.readStyleOrigin=function(a,b,c){if(b.styleName)return Object.freeze({styleName:b.styleName});if(b.styleUrl)return a=g.read(b.styleUrl,c),Object.freeze({styleUrl:a})};c.prototype.writeStyleOrigin=function(a,b,c,d){a.styleName?b.styleName=a.styleName:a.styleUrl&&(b.styleUrl=g.write(a.styleUrl,d),g.isAbsolute(b.styleUrl)&&(b.styleUrl=g.normalize(b.styleUrl)))};Object.defineProperty(c.prototype,
"uniqueValueInfos",{set:function(a){this.styleOrigin?A.error("#uniqueValueInfos\x3d","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",a),this._updateValueInfoMap())},enumerable:!0,configurable:!0});c.prototype.addUniqueValueInfo=function(a,b){this.styleOrigin?A.error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(a="object"===typeof a?C(a):new y.default({value:a,symbol:b}),
this.uniqueValueInfos.push(a),this._valueInfoMap[a.value]=a)};c.prototype.removeUniqueValueInfo=function(a){if(this.styleOrigin)A.error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");else for(var b=0;b<this.uniqueValueInfos.length;b++)if(this.uniqueValueInfos[b].value===a+""){delete this._valueInfoMap[a];this.uniqueValueInfos.splice(b,1);break}};c.prototype.getUniqueValueInfo=function(a,b){var c=this.field,d=a.attributes,e;this.valueExpression?
e=x.executeFunction(this.compiledFunc,x.createExecContext(a,x.getViewInfo(b))):"function"!==typeof c&&this.field2?(a=this.field2,b=this.field3,e=[],c&&e.push(d[c]),a&&e.push(d[a]),b&&e.push(d[b]),e=e.join(this.fieldDelimiter||"")):"function"===typeof c?e=c(a):c&&(e=d[c]);return this._valueInfoMap[e+""]};c.prototype.getSymbol=function(a,b){return(a=this.getUniqueValueInfo(a,b))&&a.symbol||this.defaultSymbol};c.prototype.getSymbols=function(){for(var a=[],b=0,c=this.uniqueValueInfos;b<c.length;b++){var d=
c[b];d.symbol&&a.push(d.symbol)}this.defaultSymbol&&a.push(this.defaultSymbol);return a};c.prototype.clone=function(){var a=new d({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:q.clone(this.defaultSymbol),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:q.clone(this.visualVariables),legendOptions:q.clone(this.legendOptions),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()});
this._isDefaultSymbolDerived&&(a._isDefaultSymbolDerived=!0);a._set("portal",this.portal);var b=q.clone(this.uniqueValueInfos);this.styleOrigin&&(a._set("styleOrigin",Object.freeze(q.clone(this.styleOrigin))),Object.freeze(b));a._set("uniqueValueInfos",b);a._updateValueInfoMap();return a};c.prototype.collectRequiredFields=function(a){this.inherited(arguments);[this.field,this.field2,this.field3].forEach(function(b){b&&"string"===typeof b&&(a[b]=!0)});this.valueExpression&&x.extractFieldNames(this.valueExpression).forEach(function(b){a[b]=
!0})};c.prototype.populateFromStyle=function(){var a=this;return u.fetchStyle(this.styleOrigin,{portal:this.portal}).then(function(b){var c=[];a._valueInfoMap={};b&&b.data&&Array.isArray(b.data.items)&&b.data.items.forEach(function(d){var e=new w({styleUrl:b.styleUrl,styleName:b.styleName,portal:a.portal,name:d.name});a.defaultSymbol||d.name!==b.data.defaultItem||(a.defaultSymbol=e,a._isDefaultSymbolDerived=!0);e=new y.default({value:d.name,symbol:e});c.push(e);a._valueInfoMap[d.name]=e});a._set("uniqueValueInfos",
Object.freeze(c));!a.defaultSymbol&&a.uniqueValueInfos.length&&(a.defaultSymbol=a.uniqueValueInfos[0].symbol,a._isDefaultSymbolDerived=!0);return a})};c.prototype._updateValueInfoMap=function(){var a=this;this._valueInfoMap={};this.uniqueValueInfos.forEach(function(b){return a._valueInfoMap[b.value+""]=b})};c.fromPortalStyle=function(a,b){var c=new d(b&&b.properties);c._set("styleOrigin",Object.freeze({styleName:a}));c._set("portal",b&&b.portal||v.getDefault());b=c.populateFromStyle();b.otherwise(function(b){A.error("#fromPortalStyle('"+
a+"'[, ...])","Failed to create unique value renderer from style name",b)});return b};c.fromStyleUrl=function(a,b){b=new d(b&&b.properties);b._set("styleOrigin",Object.freeze({styleUrl:a}));b=b.populateFromStyle();b.otherwise(function(b){A.error("#fromStyleUrl('"+a+"'[, ...])","Failed to create unique value renderer from style URL",b)});return b};e([l.property()],c.prototype,"type",void 0);e([l.writer("type")],c.prototype,"writeType",null);e([l.property({json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],
c.prototype,"field",void 0);e([l.cast("field")],c.prototype,"castField",null);e([l.writer("field")],c.prototype,"writeField",null);e([l.property({type:String,json:{write:!0}})],c.prototype,"field2",void 0);e([l.property({type:String,json:{write:!0}})],c.prototype,"field3",void 0);e([l.property({type:String,json:{write:!0}})],c.prototype,"valueExpression",void 0);e([l.property({type:String,json:{write:!0}})],c.prototype,"valueExpressionTitle",void 0);e([l.property({dependsOn:["valueExpression"]})],
c.prototype,"compiledFunc",null);e([l.property({type:m.default,json:{write:!0}})],c.prototype,"legendOptions",void 0);e([l.property({type:String,json:{write:!0}})],c.prototype,"defaultLabel",void 0);e([l.property({types:p.types})],c.prototype,"defaultSymbol",null);e([l.reader("defaultSymbol")],c.prototype,"readDefaultSymbol",null);e([l.writer("web-scene","defaultSymbol",{defaultSymbol:{types:p.types3D}})],c.prototype,"writeDefaultSymbolWebScene",null);e([l.writer("defaultSymbol")],c.prototype,"writeDefaultSymbol",
null);e([l.property({type:String,json:{write:!0}})],c.prototype,"fieldDelimiter",void 0);e([l.property({type:v,readOnly:!0})],c.prototype,"portal",void 0);e([l.reader("portal",["styleName"])],c.prototype,"readPortal",null);e([l.property({readOnly:!0})],c.prototype,"styleOrigin",void 0);e([l.reader("styleOrigin",["styleName","styleUrl"])],c.prototype,"readStyleOrigin",null);e([l.writer("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],c.prototype,"writeStyleOrigin",null);e([l.property({type:[y.default],
json:{write:{overridePolicy:function(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],c.prototype,"uniqueValueInfos",null);e([l.property({dependsOn:["field","field2","field3","valueExpression"],readOnly:!0})],c.prototype,"requiredFields",void 0);e([k(1,l.cast(p.ensureType))],c.prototype,"addUniqueValueInfo",null);return c=d=e([l.subclass("esri.renderers.UniqueValueRenderer")],c);var d}(l.declared(d))})},"esri/core/arrayUtils":function(){define([],function(){function a(a,h){return-1===a.indexOf(h)}
function h(a,h,l){return!a.some(h.bind(null,l))}var n={findIndex:function(a,h,l){for(var e=a.length,g,c=0;c<e;c++)if(g=a[c],h.call(l,g,c,a))return c;return-1},find:function(a,h,l){for(var e=a.length,g,c=0;c<e;c++)if(g=a[c],h.call(l,g,c,a))return g},equals:function(a,h,l){if(!a&&!h)return!0;if(!a||!h||a.length!=h.length)return!1;if(l)for(var e=0;e<a.length;e++){if(!l(a[e],h[e]))return!1}else for(l=0;l<a.length;l++)if(a[l]!==h[l])return!1;return!0},difference:function(e,k,l){var n;l?(n=k.filter(h.bind(null,
e,l)),e=e.filter(h.bind(null,k,l))):(n=k.filter(a.bind(null,e)),e=e.filter(a.bind(null,k)));return{added:n,removed:e}},intersect:function(a,h,l){return a&&h?l?a.filter(function(a){return-1<n.findIndex(h,function(e){return l(a,e)})}):a.filter(function(a){return-1<h.indexOf(a)}):[]},range:function(a,h){null==h&&(h=a,a=0);for(var e=Array(h-a),k=a;k<h;k++)e[k-a]=k;return e},constant:function(a,h){for(var e=Array(a),k=0;k<a;k++)e[k]=h;return e},binaryIndexOf:function(a,h,l){for(var e=a.length,g=0,c=e-
1;g<c;){var b=g+Math.floor((c-g)/2);h>a[b]?g=b+1:c=b}c=a[g];return l?h>=a[e-1]?-1:c===h?g:g-1:c===h?g:-1}};return n})},"esri/symbols/support/styleUtils":function(){define("require exports ../Symbol3D ./jsonUtils ./Thumbnail ./StyleOrigin ../../core/urlUtils ../../core/promiseUtils ../../core/Error ../../request ../../portal/Portal ../../portal/PortalQueryParams".split(" "),function(a,h,n,e,k,l,q,g,c,b,f,r){function v(a,b){return p(a).then(function(b){return{data:b.data,baseUrl:q.removeFile(a),styleUrl:a}})}
function x(a,b){b=b.portal||f.getDefault();var c,e=b.url+" - "+(b.user&&b.user.username)+" - "+a;d[e]||(d[e]=w(a,b).then(function(a){c=a;return a.fetchData()}).then(function(b){return{data:b,baseUrl:c.itemUrl,styleName:a}}));return d[e]}function w(a,b){return b.load().then(function(){var c=new r({disableExtraQuery:!0,query:"owner:"+m+" AND type:"+y+' AND typekeywords:"'+a+'"'});return b.queryItems(c)}).then(function(b){b=b.results;var d=null,e=a.toLowerCase();if(b&&Array.isArray(b))for(var f=0;f<
b.length;f++){var g=b[f];if(g.typeKeywords.some(function(a){return a.toLowerCase()===e})&&g.type===y&&g.owner===m){d=g;break}}if(d)return d.load();throw new c("symbolstyleutils:style-not-found","The style '"+a+"' could not be found",{styleName:a});})}function t(a,b){return a.styleUrl?v(a.styleUrl,b):a.styleName?x(a.styleName,b):g.reject(new c("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function u(a,b,d){for(var f=a.data,h={portal:d.portal,
url:q.urlToObject(a.baseUrl),origin:"portal-item"},m=function(c){if(c.name!==b)return"continue";var f=q.read(c.webRef,h),g={portal:d.portal,url:q.urlToObject(q.removeFile(f)),origin:"portal-item"};return{value:p(f).then(function(f){if((f=e.fromJSON(f.data,g))&&f.isInstanceOf(n)){if(c.thumbnail)if(c.thumbnail.href){var m=q.read(c.thumbnail.href,h);f.thumbnail=new k.default({url:m})}else c.thumbnail.imageData&&(f.thumbnail=new k.default({url:"data:image/png;base64,"+c.thumbnail.imageData}));a.styleUrl?
f.styleOrigin=new l({portal:d.portal,styleUrl:a.styleUrl,name:b}):a.styleName&&(f.styleOrigin=new l({portal:d.portal,styleName:a.styleName,name:b}))}return f})}},t=0,f=f.items;t<f.length;t++){var r=m(f[t]);if("object"===typeof r)return r.value}return g.reject(new c("symbolstyleutils:symbol-name-not-found","The symbol name '"+b+"' could not be found",{symbolName:b}))}function p(a){return b(q.normalize(a),{responseType:"json",query:{f:"json"}})}Object.defineProperty(h,"__esModule",{value:!0});var d=
{};h.fetchStyle=t;h.resolveWebStyleSymbol=function(a,b){return a.name?t(a,b).then(function(c){return u(c,a.name,b)}):g.reject(new c("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference"))};h.fetchSymbolFromStyle=u;h.styleNameFromItem=function(a){var b=0;for(a=a.typeKeywords;b<a.length;b++){var c=a[b];if(/^Esri.*Style$/.test(c)&&"Esri Style"!==c)return c}};var m="esri_en",y="Style"})},"esri/renderers/support/LegendOptions":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport".split(" "),
function(a,h,n,e,k,l){Object.defineProperty(h,"__esModule",{value:!0});a=function(a){function g(){var b=null!==a&&a.apply(this,arguments)||this;b.title=null;return b}n(g,a);c=g;g.prototype.clone=function(){return new c({title:this.title})};e([k.property({type:String,json:{write:!0}})],g.prototype,"title",void 0);return g=c=e([k.subclass("esri.renderers.support.LegendOptions")],g);var c}(k.declared(l));h.LegendOptions=a;h.default=a})},"esri/renderers/support/UniqueValueInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport ../../symbols/support/typeUtils ../../symbols/support/jsonUtils".split(" "),
function(a,h,n,e,k,l,q,g){Object.defineProperty(h,"__esModule",{value:!0});a=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.description=null;b.label=null;b.symbol=null;b.value=null;return b}n(b,a);c=b;b.prototype.clone=function(){return new c({value:this.value,description:this.description,label:this.label,symbol:this.symbol?this.symbol.clone():null})};e([k.property({type:String,json:{write:!0}})],b.prototype,"description",void 0);e([k.property({type:String,json:{write:!0}})],
b.prototype,"label",void 0);e([k.property({types:q.types,json:{origins:{"web-scene":{read:g.read,write:{target:{symbol:{types:q.types3D}},writer:g.writeTarget}}},read:g.read,write:g.writeTarget}})],b.prototype,"symbol",void 0);e([k.property({type:String,json:{write:!0}})],b.prototype,"value",void 0);return b=c=e([k.subclass("esri.renderers.support.UniqueValueInfo")],b);var c}(k.declared(l));h.UniqueValueInfo=a;h.default=a})},"esri/renderers/support/diffUtils":function(){define("require exports dojo/_base/lang ../../core/Accessor ../../core/Collection ../../core/accessorSupport/utils".split(" "),
function(a,h,n,e,k,l){function q(a){return a instanceof k?Object.keys(a.items):a instanceof e?l.getProperties(a).keys():a?Object.keys(a):[]}function g(a,b){return a instanceof k?a.items[b]:a[b]}function c(a,b){return Array.isArray(a)&&Array.isArray(b)?a.length!==b.length:!1}function b(a){return a?a.declaredClass:null}function f(a,e){var h=a.diff;if(h&&n.isFunction(h))return h(a,e);var k=q(a),l=q(e);if(0!==k.length||0!==l.length){if(!k.length||!l.length||c(a,e))return{type:"complete",oldValue:a,newValue:e};
var p=l.filter(function(a){return-1===k.indexOf(a)}),d=k.filter(function(a){return-1===l.indexOf(a)}),p=k.filter(function(b){return-1<l.indexOf(b)&&g(a,b)!==g(e,b)}).concat(p,d).sort();if((d=b(a))&&-1<r.indexOf(d)&&p.length)return{type:"complete",oldValue:a,newValue:e};var m,x;for(x in p){var d=p[x],v=g(a,d),A=g(e,d),C=void 0;n.isFunction(v)||n.isFunction(A)||v===A||null==v&&null==A||!(C=h&&h[d]&&n.isFunction(h[d])?h[d](v,A):"object"===typeof v&&"object"===typeof A&&b(v)===b(A)?f(v,A):{type:"complete",
oldValue:v,newValue:A})||(m=m||{type:"partial",diff:{}},m.diff[d]=C)}return m}}Object.defineProperty(h,"__esModule",{value:!0});var r=["esri.Color","esri.portal.Portal"];h.diff=function(a,c){if(!n.isFunction(a)&&!n.isFunction(c)&&(a||c))return!a||!c||"object"===typeof a&&"object"===typeof a&&b(a)!==b(c)?{type:"complete",oldValue:a,newValue:c}:f(a,c)}})},"esri/renderers/support/jsonUtils":function(){define(["../../core/Warning","../SimpleRenderer","../UniqueValueRenderer","../ClassBreaksRenderer"],
function(a,h,n,e){var k={simple:h,uniqueValue:n,classBreaks:e},l={fromJson:function(a){try{throw Error("fromJson is deprecated, use fromJSON instead");}catch(g){console.warn(g.stack)}return l.fromJSON(a)},read:function(e,g,c){if(e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type)return c&&c.messages&&c.messages.push(new a("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:c})),null;if(g=e?k[e.type]||null:null)return g=
new g,g.read(e,c),g;c&&c.messages&&e&&c.messages.push(new a("renderer:unsupported","Renderers of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:c}));return null},fromJSON:function(a){var e=a?k[a.type]||null:null;return e?e.fromJSON(a):null}};return l})},"esri/renderers/ClassBreaksRenderer":function(){define("../core/declare ../core/lang ../core/kebabDictionary ../core/Error ../core/Logger ../core/accessorSupport/ensureType dojo/_base/lang ../support/arcadeUtils ../symbols/Symbol ../symbols/PolygonSymbol3D ../symbols/support/jsonUtils ../symbols/support/typeUtils ./Renderer ./support/LegendOptions ./support/ClassBreakInfo".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w){var t=k.getLogger("esri.renderers.ClassBreaksRenderer");x=x.LegendOptions;w=w.ClassBreakInfo;var u=n({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"}),p=n({esriClassifyNaturalBreaks:"natural-breaks",esriClassifyEqualInterval:"equal-interval",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyGeometricalInterval:"geometrical-interval"}),d=l.ensureType(w),m=a(v,
{declaredClass:"esri.renderers.ClassBreaksRenderer",properties:{backgroundFillSymbol:{types:{base:c,key:"type",typeMap:{"simple-fill":r.types.typeMap["simple-fill"],"picture-fill":r.types.typeMap["picture-fill"],"polygon-3d":r.types.typeMap["polygon-3d"]}},value:null,json:{origins:{"web-scene":{read:f.read,write:{target:{backgroundFillSymbol:{type:b}},writer:f.writeTarget}}},read:f.read,write:f.writeTarget}},classBreakInfos:{type:[w],json:{read:function(a,b,c){if(Array.isArray(a)){var d=b.minValue;
return a.map(function(a){var b=new w;b.read(a,c);null==b.minValue&&(b.minValue=d);null==b.maxValue&&(b.maxValue=b.minValue);d=b.maxValue;return b})}},write:function(a,b,c,d){a=a.map(function(a){return a.write({},d)});this._areClassBreaksConsecutive()&&a.forEach(function(a){delete a.classMinValue});b[c]=a}}},minValue:{type:Number,readOnly:!0,dependsOn:["classBreakInfos"],get:function(){return this.classBreakInfos[0]&&this.classBreakInfos[0].minValue||0},json:{read:!1,write:{overridePolicy:function(){return 0!==
this.classBreakInfos.length&&this._areClassBreaksConsecutive()?{enabled:!0}:{enabled:!1}}}}},classificationMethod:{type:String,value:null,json:{read:p.fromJSON,write:function(a,b){if(a=p.toJSON(a))b.classificationMethod=a}}},defaultLabel:{type:String,value:null,json:{write:!0}},defaultSymbol:{types:r.types,value:null,json:{origins:{"web-scene":{read:f.read,write:{target:{defaultSymbol:{types:r.types3D}},writer:f.writeTarget}}},read:f.read,write:f.writeTarget}},valueExpression:{type:String,value:null,
json:{write:!0}},valueExpressionTitle:{type:String,value:null,json:{write:!0}},compiledFunc:{dependsOn:["valueExpression"],get:function(){return g.createFunction(this.valueExpression)}},legendOptions:{type:x,value:null,json:{write:!0}},field:{value:null,cast:function(a){return null==a?a:"function"===typeof a?a:l.ensureString(a)},json:{type:String,write:function(a,b,c,d){"string"===typeof a?b[c]=a:d&&d.messages?d.messages.push(new e("property:unsupported","ClassBreaksRenderer.field set to a function cannot be written to JSON")):
t.error(".field: cannot write field to JSON since it's not a string value")}}},isMaxInclusive:!0,normalizationField:{type:String,value:null,json:{write:!0}},normalizationTotal:{type:Number,value:null,json:{write:!0}},normalizationType:{type:String,value:null,dependsOn:["normalizationField","normalizationTotal"],get:function(){var a=this._get("normalizationType"),b=!!this.normalizationField,c=null!=this.normalizationTotal;if(b||c)a=b&&"field"||c&&"percent-of-total",b&&c&&console.warn("warning: both normalizationField and normalizationTotal are set!");
else if("field"===a||"percent-of-total"===a)a=null;return a},json:{read:u.fromJSON,write:function(a,b){if(a=u.toJSON(a))b.normalizationType=a}}},requiredFields:{dependsOn:["field","normalizationField","valueExpression"]},type:{value:"class-breaks",json:{write:function(a,b){b.type="classBreaks"}}}},constructor:function(){this.classBreakInfos=[]},addClassBreakInfo:function(a,b,c){a="number"===typeof a?new w({minValue:a,maxValue:b,symbol:c}):d(h.clone(a));this.classBreakInfos.push(a);1===this.classBreakInfos.length&&
this.notifyChange("minValue")},removeClassBreakInfo:function(a,b){var c,d,e=this.classBreakInfos.length;for(d=0;d<e;d++)if(c=[this.classBreakInfos[d].minValue,this.classBreakInfos[d].maxValue],c[0]==a&&c[1]==b){this.classBreakInfos.splice(d,1);break}},getBreakIndex:function(a,b){var c=this.field,d=a.attributes,e=this.classBreakInfos.length,f=this.isMaxInclusive;if(this.valueExpression)a=g.executeFunction(this.compiledFunc,g.createExecContext(a,g.getViewInfo(b)));else if(q.isFunction(c))a=c(a);else if(a=
parseFloat(d[c]),b=this.normalizationType)if(c=parseFloat(this.normalizationTotal),d=parseFloat(d[this.normalizationField]),"log"===b)a=Math.log(a)*Math.LOG10E;else if("percent-of-total"===b&&!isNaN(c))a=a/c*100;else if("field"===b&&!isNaN(d)){if(isNaN(a)||isNaN(d))return-1;a/=d}if(null!=a&&!isNaN(a)&&"number"===typeof a)for(d=0;d<e;d++)if(b=[this.classBreakInfos[d].minValue,this.classBreakInfos[d].maxValue],b[0]<=a&&(f?a<=b[1]:a<b[1]))return d;return-1},getClassBreakInfo:function(a,b){a=this.getBreakIndex(a,
b);return-1!==a?this.classBreakInfos[a]:null},getSymbol:function(a,b){a=this.getBreakIndex(a,b);return-1<a?this.classBreakInfos[a].symbol:this.defaultSymbol},getSymbols:function(){var a=[];this.classBreakInfos.forEach(function(b){b.symbol&&a.push(b.symbol)});this.defaultSymbol&&a.push(this.defaultSymbol);return a},clone:function(){return new m({field:this.field,backgroundFillSymbol:this.backgroundFillSymbol&&this.backgroundFillSymbol.clone(),classificationMethod:this.classificationMethod,defaultLabel:this.defaultLabel,
defaultSymbol:this.defaultSymbol&&this.defaultSymbol.clone(),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,classBreakInfos:h.clone(this.classBreakInfos),isMaxInclusive:this.isMaxInclusive,normalizationField:this.normalizationField,normalizationTotal:this.normalizationTotal,normalizationType:this.normalizationType,visualVariables:h.clone(this.visualVariables),legendOptions:h.clone(this.legendOptions),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})},
collectRequiredFields:function(a){this.inherited(arguments);[this.field,this.normalizationField].forEach(function(b){b&&(a[b]=!0)});this.valueExpression&&g.extractFieldNames(this.valueExpression).forEach(function(b){a[b]=!0})},_areClassBreaksConsecutive:function(){for(var a=this.classBreakInfos,b=1;b<a.length;b++)if(a[b-1].maxValue!==a[b].minValue)return!1;return!0}});return m})},"esri/renderers/support/ClassBreakInfo":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport ../../symbols/support/typeUtils ../../symbols/support/jsonUtils".split(" "),
function(a,h,n,e,k,l,q,g){Object.defineProperty(h,"__esModule",{value:!0});a=function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.description=null;b.label=null;b.minValue=null;b.maxValue=0;b.symbol=null;return b}n(b,a);c=b;b.prototype.clone=function(){return new c({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,symbol:this.symbol?this.symbol.clone():null})};e([k.property({type:String,json:{write:!0}})],b.prototype,"description",void 0);
e([k.property({type:String,json:{write:!0}})],b.prototype,"label",void 0);e([k.property({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],b.prototype,"minValue",void 0);e([k.property({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],b.prototype,"maxValue",void 0);e([k.property({types:q.types,json:{origins:{"web-scene":{read:g.read,write:{target:{symbol:{types:q.types3D}},writer:g.writeTarget}}},read:g.read,write:g.writeTarget}})],
b.prototype,"symbol",void 0);return b=c=e([k.subclass("esri.renderers.support.ClassBreakInfo")],b);var c}(k.declared(l));h.ClassBreakInfo=a;h.default=a})},"esri/renderers/support/styleUtils":function(){define(["require","exports","../../core/promiseUtils","../../core/Warning"],function(a,h,n,e){Object.defineProperty(h,"__esModule",{value:!0});h.loadStyleRenderer=function(a,h){var k=a&&a.getAtOrigin&&a.getAtOrigin("renderer",h.origin);return k&&"unique-value"===k.type&&k.styleOrigin?k.populateFromStyle().otherwise(function(g){h&&
h.messages&&h.messages.push(new e("renderer:style-reference","Failed to create unique value renderer from style reference: "+g.message,{error:g,context:h}));a.clear("renderer",h.origin)}).then(function(){return null}):n.resolve(null)}})},"esri/renderers/support/typeUtils":function(){define("require exports ../Renderer ../SimpleRenderer ../UniqueValueRenderer ../ClassBreaksRenderer".split(" "),function(a,h,n,e,k,l){Object.defineProperty(h,"__esModule",{value:!0});h.types={key:"type",base:n,typeMap:{simple:e,
"unique-value":k,"class-breaks":l}}})},"esri/layers/support/FeatureProcessing":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/lang ../../layers/support/Field".split(" "),function(a,h,n,e,k,l,q,g){return function(a){function b(){return null!==a&&a.apply(this,arguments)||this}n(b,a);c=b;b.fromWorker=function(a){if(!a)return null;var b=new c;b.fields=a.fields&&a.fields.map(function(a){return g.fromJSON(a)});
b.options=a.options;b.process=new (Function.bind.apply(Function,[void 0].concat(a.process.args,[a.process.body])));return b};b.prototype.clone=function(){return new c(q.clone({fields:this.fields,options:this.options,process:this.process}))};b.prototype.toWorker=function(){var a=this.process.toString();return{fields:this.fields,options:this.options,process:{body:a.substring(a.indexOf("{")+1,a.lastIndexOf("}")),args:a.slice(a.indexOf("(")+1,a.indexOf(")")).match(/([^\s,]+)/g)}}};e([k.property({type:[g]})],
b.prototype,"fields",void 0);e([k.property()],b.prototype,"options",void 0);e([k.property()],b.prototype,"process",void 0);return b=c=e([k.subclass("esri.layers.support.FeatureProcessing")],b);var c}(k.declared(l))})},"esri/layers/support/FeatureTemplate":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport ../../core/kebabDictionary ../../core/lang".split(" "),function(a,h,n,e,
k,l,q,g){var c=q({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",
esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});return function(a){function b(b){b=a.call(this,b)||this;b.name=null;b.description=null;b.drawingTool=null;b.prototype=null;b.thumbnail=null;return b}n(b,a);b.prototype.writeDrawingTool=function(a,b){b.drawingTool=c.toJSON(a)};b.prototype.writePrototype=function(a,b){b.prototype=g.fixJson(g.clone(a),!0)};b.prototype.writeThumbnail=function(a,b){b.thumbnail=g.fixJson(g.clone(a))};e([k.property({json:{write:!0}})],b.prototype,
"name",void 0);e([k.property({json:{write:!0}})],b.prototype,"description",void 0);e([k.property({json:{read:c.fromJSON,write:!0}})],b.prototype,"drawingTool",void 0);e([k.writer("drawingTool")],b.prototype,"writeDrawingTool",null);e([k.property({json:{write:!0}})],b.prototype,"prototype",void 0);e([k.writer("prototype")],b.prototype,"writePrototype",null);e([k.property({json:{write:!0}})],b.prototype,"thumbnail",void 0);e([k.writer("thumbnail")],b.prototype,"writeThumbnail",null);return b=e([k.subclass("esri.layers.support.FeatureTemplate")],
b)}(k.declared(l))})},"esri/layers/support/FeatureType":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport ./domains ./FeatureTemplate ../../core/lang".split(" "),function(a,h,n,e,k,l,q,g,c){return function(a){function b(b){b=a.call(this,b)||this;b.id=null;b.name=null;b.domains=null;b.templates=null;return b}n(b,a);b.prototype.readDomains=function(a){var b={},c;for(c in a)if(a.hasOwnProperty(c)){var e=
a[c];switch(e.type){case "range":b[c]=q.RangeDomain.fromJSON(e);break;case "codedValue":b[c]=q.CodedValueDomain.fromJSON(e);break;case "inherited":b[c]=q.InheritedDomain.fromJSON(e)}}return b};b.prototype.writeDomains=function(a,b){var e={},f;for(f in a)a.hasOwnProperty(f)&&(e[f]=a[f]&&a[f].toJSON());c.fixJson(e);b.domains=e};b.prototype.readTemplates=function(a){return a&&a.map(function(a){return new g(a)})};b.prototype.writeTemplates=function(a,b){b.templates=a&&a.map(function(a){return a.toJSON()})};
e([k.property({json:{write:!0}})],b.prototype,"id",void 0);e([k.property({json:{write:!0}})],b.prototype,"name",void 0);e([k.property({json:{write:!0}})],b.prototype,"domains",void 0);e([k.reader("domains")],b.prototype,"readDomains",null);e([k.writer("domains")],b.prototype,"writeDomains",null);e([k.property({json:{write:!0}})],b.prototype,"templates",void 0);e([k.reader("templates")],b.prototype,"readTemplates",null);e([k.writer("templates")],b.prototype,"writeTemplates",null);return b=e([k.subclass("esri.layers.support.FeatureType")],
b)}(k.declared(l))})},"esri/layers/support/FeatureReduction":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/JSONSupport".split(" "),function(a,h,n,e,k,l){Object.defineProperty(h,"__esModule",{value:!0});a=function(a){function g(){var c=null!==a&&a.apply(this,arguments)||this;c.type=null;return c}n(g,a);e([k.property({type:String,readOnly:!0,json:{read:!1,write:!0}})],g.prototype,"type",
void 0);return g=e([k.subclass("esri.layers.support.FeatureReduction")],g)}(k.declared(l));h.FeatureReduction=a;a=function(a){function g(){var c=null!==a&&a.apply(this,arguments)||this;c.type="selection";return c}n(g,a);e([k.property()],g.prototype,"type",void 0);return g=e([k.subclass("esri.layers.support.FeatureReductionSelection")],g)}(k.declared(a));h.FeatureReductionSelection=a})},"esri/layers/support/LabelClass":function(){define("../../core/date ../../core/JSONSupport ../../core/lang ../../core/kebabDictionary dojo/_base/lang dojo/number ./types ../../support/arcadeUtils ../../symbols/support/jsonUtils ../../symbols/support/typeUtils".split(" "),
function(a,h,n,e,k,l,q,g,c,b){function f(a){a=(a=g.createSyntaxTree(a))&&a.body&&a.body[0]&&a.body[0].body&&a.body[0].body.body;if(!a||1!==a.length)return null;a="ExpressionStatement"===a[0].type&&a[0].expression;if(!a||"MemberExpression"!==a.type)return null;var b=a.object;if(!b||"Identifier"!==b.type||"$feature"!==b.name)return null;a=a.property;if(!a)return null;switch(a.type){case "Literal":return a.value;case "Identifier":return a.name}return null}function r(a){return a?"service"===a.origin?
!1:!a.layer||!q.isOfType(a.layer,"map-image"):!0}var v=/__begin__/ig,x=/__end__/ig,w=/^__begin__/i,t=/__end__$/i,u=e({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",
esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",
esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"}),p=h.createSubclass({declaredClass:"esri.layers.support.LabelClass",properties:{name:{type:String,value:null,json:{write:!0}},labelExpression:{type:String,value:null,json:{read:function(a,b,
c,d){b=b.labelExpressionInfo;if(!b||!b.value&&!b.expression)return a},write:{allowNull:!0,writer:function(a,b,c,d){this.labelExpressionInfo&&r(d)&&(null!=this.labelExpressionInfo.value?a=this._templateStringToSql(this.labelExpressionInfo.value):null!=this.labelExpressionInfo.expression&&(d=f(this.labelExpressionInfo.expression))&&(a="["+d+"]"));null!=a&&(b[c]=a)}}}},labelExpressionInfo:{value:null,json:{read:function(a,b,c,d){a&&a.value&&(a=k.mixin(k.clone(a),{expression:this._convertTemplatedStringToArcade(a.value)}),
delete a.value);return a},write:{target:{"labelExpressionInfo.expression":{type:String}},overridePolicy:function(a,b,c){return r(c)?{allowNull:!0}:{enabled:!1}},writer:function(a,b,c,d){if(null==a&&null!=this.labelExpression&&r(d))a={expression:this.getLabelExpressionArcade()};else if(a)a=n.fixJson(k.clone(a));else return;null!=a.value&&(a.expression=this._convertTemplatedStringToArcade(a.value));a.expression&&(delete a.value,b[c]=a)}}}},labelPlacement:{type:String,value:null,json:{read:function(a,
b){return u.fromJSON(a)},write:function(a,b){if(a=u.toJSON(a))b.labelPlacement=a}}},maxScale:{type:Number,value:0,json:{write:function(a,b){if(a||this.minScale)b.maxScale=a}}},minScale:{type:Number,value:0,json:{write:function(a,b){if(a||this.maxScale)b.minScale=a}}},requiredFields:{readOnly:!0,dependsOn:["labelExpression","labelExpressionInfo","where"],get:function(){var a=Object.create(null);this._collectRequiredFields(a);return Object.keys(a)}},symbol:{value:null,types:b.types,json:{origins:{"web-scene":{read:c.read,
write:{target:{symbol:{types:b.types3D}},writer:c.writeTarget}}},read:c.read,write:c.writeTarget}},useCodedValues:{type:Boolean,value:null,json:{write:!0}},where:{type:String,value:null,json:{write:!0}}},getLabelExpression:function(){var a={expression:"",type:"none"};this.labelExpressionInfo?this.labelExpressionInfo.value?(a.expression=this.labelExpressionInfo.value,a.type="conventional"):this.labelExpressionInfo.expression&&(a.expression=this.labelExpressionInfo.expression,a.type="arcade"):null!=
this.labelExpression&&(a.expression=this._sqlToTemplateString(this.labelExpression),a.type="conventional");return a},getLabelExpressionArcade:function(){var a=this.getLabelExpression();if(!a)return null;switch(a.type){case "conventional":return this._convertTemplatedStringToArcade(a.expression);case "arcade":return a.expression}return null},getOptions:function(){var a={},b=this.labelExpressionInfo;if(b){var c=b.expression;c&&!b.value&&(a.hasArcadeExpression=!0,a.compiledArcadeFunc=g.createFunction(c))}return a},
getLabelExpressionSingleField:function(){var a=this.getLabelExpression();if(!a)return null;switch(a.type){case "conventional":return(a=a.expression.match(d))&&a[1].trim()||null;case "arcade":return f(a.expression)}return null},clone:function(){return new p({labelExpression:this.labelExpression,labelExpressionInfo:k.clone(this.labelExpressionInfo),labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,symbol:this.symbol.clone(),where:this.where,useCodedValues:this.useCodedValues})},
_collectRequiredFields:function(a){this._collectLabelExpressionRequiredFields(this.getLabelExpression(),a);this._collectWhereRequiredFields(this.where,a)},_sqlToTemplateString:function(a){return a.replace(/\[/g,"{").replace(/\]/g,"}")},_templateStringToSql:function(a){return a.replace(/\{/g,"[").replace(/\}/g,"]")},_collectWhereRequiredFields:function(a,b){null!=a&&(a=a.split(" "),3===a.length&&(b[a[0]]=!0),7===a.length&&(b[a[0]]=!0,b[a[4]]=!0))},_collectLabelExpressionRequiredFields:function(a,b){"arcade"===
a.type?g.extractFieldNames(a.expression).forEach(function(a){b[a]=!0}):(a=a.expression.match(/{[^}]*}/g))&&a.forEach(function(a){b[a.slice(1,-1)]=!0})},_convertTemplatedStringToArcade:function(a){a?(a=k.replace(a,function(a,b){return'__begin__$feature["'+b+'"]__end__'}),a=w.test(a)?a.replace(w,""):'"'+a,a=t.test(a)?a.replace(t,""):a+'"',a=a.replace(v,'" + ').replace(x,' + "')):a='""';return a}});p.evaluateWhere=function(a,b){var c=function(a,b,c){switch(b){case "\x3d":return a==c?!0:!1;case "\x3c\x3e":return a!=
c?!0:!1;case "\x3e":return a>c?!0:!1;case "\x3e\x3d":return a>=c?!0:!1;case "\x3c":return a<c?!0:!1;case "\x3c\x3d":return a<=c?!0:!1}return!1};try{if(null==a)return!0;var d=a.split(" ");if(3===d.length)return c(b[d[0]],d[1],d[2]);if(7===d.length){var e=c(b[d[0]],d[1],d[2]),f=d[3],g=c(b[d[4]],d[5],d[6]);switch(f){case "AND":return e&&g;case "OR":return e||g}}return!1}catch(E){console.log("Error.: can't parse \x3d "+a)}};p.buildLabelText=function(a,b,c,d){var e="";if(d&&d.hasArcadeExpression)d.compiledArcadeFunc&&
(a=g.createExecContext(b),a=g.executeFunction(d.compiledArcadeFunc,a),null!=a&&(e=a.toString()));else var f=b&&b.attributes||{},e=a.replace(/{[^}]*}/g,function(a){return p.formatField(a.slice(1,-1),a,f,c,d)});return e};p.formatField=function(b,c,d,e,f){var g=b.toLowerCase();for(b=0;b<e.length;b++)if(e[b].name.toLowerCase()===g){c=d[e[b].name];var h=e[b].domain;if(h&&k.isObject(h)){if("codedValue"==h.type)for(d=0;d<h.codedValues.length;d++)h.codedValues[d].code==c&&(c=h.codedValues[d].name);else"range"==
h.type&&h.minValue<=c&&c<=h.maxValue&&(c=h.name);break}h=e[b].type;"date"==h?(h=a.fromJSON(f&&f.dateFormat||"shortDate"),(h="DateFormat"+a.getFormat(h))&&(c=n.substitute({myKey:c},"{myKey:"+h+"}"))):("integer"==h||"small-integer"==h||"long"==h||"double"==h)&&f&&f.numberFormat&&f.numberFormat.digitSeparator&&f.numberFormat.places&&(c=l.format(c,{places:f.numberFormat.places}))}return null==c?"":c};var d=/^\s*\{([^}]+)\}\s*$/i;return p})},"esri/layers/support/labelingInfo":function(){define(["require",
"exports","./LabelClass"],function(a,h,n){Object.defineProperty(h,"__esModule",{value:!0});var e=/\[([^\[\]]+)\]/ig;h.reader=function(a,h,q){var g=this;return a?a.map(function(a){var b=new n;b.read(a,q);if(b.labelExpression){var c=h.fields||h.layerDefinition&&h.layerDefinition.fields||g.fields;b.labelExpression=b.labelExpression.replace(e,function(a,b){a:if(c){a=b.toLowerCase();for(var e=0;e<c.length;e++){var f=c[e].name;if(f.toLowerCase()===a){b=f;break a}}}return"["+b+"]"})}return b}):null}})},
"esri/layers/support/commonProperties":function(){define(["require","exports","../../core/accessorSupport/write","../../core/accessorSupport/utils","../../core/accessorSupport/PropertyOrigin"],function(a,h,n,e,k){Object.defineProperty(h,"__esModule",{value:!0});h.screenSizePerspectiveEnabled={type:Boolean,value:!0,json:{origins:{"web-scene":{read:{source:["id","url","layerType"],reader:function(a,h){if(null==h.screenSizePerspective&&"defaults"===this.originOf("screenSizePerspectiveEnabled"))e.getProperties(this).store.set("screenSizePerspectiveEnabled",
!1,k.OriginId.DEFAULTS);else return h.screenSizePerspective}},write:{ignoreOrigin:!0,target:"screenSizePerspective",writer:function(a,e,g,c){"defaults"===this.originOf("screenSizePerspectiveEnabled")&&a?e[g]=a:n.willPropertyWrite(this,"screenSizePerspectiveEnabled",{},c)&&(e[g]=a)}}}}}}})},"esri/plugins/popupManager":function(){define(["../views/PopupManager"],function(a){return{add:function(h,n){h.popupManager||(h.popupManager=new a(n),h.popupManager.view=h)},remove:function(a){var h=a.popupManager;
h&&(h.destroy(),a.popupManager=null)}}})},"esri/views/PopupManager":function(){define("require ../core/promiseUtils dojo/_base/array dojo/on dojo/Deferred dojo/promise/all ../layers/support/layerUtils ../geometry/support/scaleUtils ../geometry/Extent ../tasks/support/Query ../layers/GroupLayer ../core/Accessor".split(" "),function(a,h,n,e,k,l,q,g,c,b,f,r){var v;return r.createSubclass({declaredClass:"esri.views.PopupManager",properties:{map:{dependsOn:["view.map"],readOnly:!0}},constructor:function(){this._featureLayersCache=
{}},destroy:function(){this._featureLayersCache={};this.view=null},_clickHandle:null,_featureLayersCache:null,enabled:!1,_enabledSetter:function(a){this._clickHandle&&(a?this._clickHandle.resume():this._clickHandle.pause());this._set("enabled",a)},_mapGetter:function(){return this.get("view.map")||null},view:null,_viewSetter:function(a){this._clickHandle&&(this._clickHandle.remove(),this._clickHandle=null);a&&(this._clickHandle=e.pausable(a,"click",this._clickHandler.bind(this)),this.enabled||this._clickHandle.pause());
this._set("view",a)},getMapLayer:function(a){var b;if(a&&(b=a.findLayerById())&&(a=b.id,this._featureLayersCache[a])){var c=a.lastIndexOf("_");-1<c&&(a=a.substring(0,c),b=this.map.findLayerById(a))}return b},_closePopup:function(){var a=this.get("view.popup");a&&(a.clear(),a.close())},_showPopup:function(a,e,l){function q(a){return m.allLayerViews.find(function(b){return b.layer===a})}function p(a){if(null==a)return!1;var b=q(a);return null==b?!1:a.loaded&&!b.suspended&&(a.popupEnabled&&a.popupTemplate||
"graphics"===a.type||"geo-rss"===a.type||"map-notes"===a.type||"kml"===a.type||b.getPopupData)}function d(a){return(a=q(a))&&a.hasDraped}var m=this.view;a=m.popup;var t=this,r=[],w="3d"===m.type;n.forEach(this.map.layers.toArray(),function(a){a.isInstanceOf(f)?n.forEach(a.layers.toArray(),function(a){!p(a)||w&&!d(a)||r.push(a)}):!p(a)||w&&!d(a)||r.push(a)});0<m.graphics.length&&r.push(m.graphics);(l&&m.graphics.includes(l)?l.popupTemplate:!l||p(l.layer))||(l=null);if(r.length||l){var x=[],v=!!l,J=
t._calculateClickTolerance(r);if(e){var E=1;"2d"===m.type&&(E=m.state.resolution);var K=m.basemapTerrain;K&&K.overlayManager&&(E=K.overlayManager.overlayPixelSizeInMapUnits(e));J*=E;K&&!K.spatialReference.equals(m.spatialReference)&&(J*=g.getMetersPerUnitForSR(K.spatialReference)/g.getMetersPerUnitForSR(m.spatialReference));var K=e.clone().offset(-J,-J),J=e.clone().offset(J,J),R=new c(Math.min(K.x,J.x),Math.min(K.y,J.y),Math.max(K.x,J.x),Math.max(K.y,J.y),m.spatialReference),K=function(a){var c;if("imagery"===
a.type){c=new b;c.geometry=e;var d=q(a),f={rasterAttributeTableFieldPrefix:"Raster.",returnDomainValues:!0};f.layerView=d;c=a.queryVisibleRasters(c,f).then(function(a){v=v||0<a.length;return a})}else if("csv"===a.type||"scene"===a.type||!t._featureLayersCache[a.id]&&"function"!==typeof a.queryFeatures){if("map-image"===a.type||"wms"===a.type)return d=q(a),d.getPopupData(R);var f=[],g;"esri.core.Collection\x3cesri.Graphic\x3e"===a.declaredClass?(d=a,g=!0):"graphics"===a.type?(d=a.graphics,g=!0):(d=
(d=q(a))&&d.loadedGraphics,g=!1);d&&(f=d.filter(function(a){return a&&(!g||a.popupTemplate)&&a.visible&&R.intersects(a.geometry)}).toArray());0<f.length&&(v=!0,c="scene"===a.type?t._fetchSceneAttributes(a,f):h.resolve(f))}else d=a.createQuery(),d.geometry=R,c=a.queryFeatures(d).then(function(b){b=b.features;if(l&&l.layer===a&&a.objectIdField){var c=a.objectIdField,d=l.attributes[c];b=b.filter(function(a){return a.attributes[c]!==d})}if(!l&&"function"===typeof q(a).getGraphics3DGraphics){var e=[],
f=q(a).getGraphics3DGraphics(),g;for(g in f)e.push(f[g].graphic.attributes[a.objectIdField]);b=b.filter(function(b){return-1!==e.indexOf(b.attributes[a.objectIdField])})}v=v||0<b.length;return b});return c};if(w&&!l||!w)var x=r.map(K).filter(function(a){return!!a}),Z=function(a){return a.reduce(function(a,b){return a.concat(b.items?Z(b.items):b)},[])},x=Z(x);l&&(l.layer&&"scene"===l.layer.type?x.unshift(this._fetchSceneAttributes(l.layer,[l])):l.popupTemplate&&(K=new k,x.unshift(K.resolve([l]))));
n.some(x,function(a){return!a.isFulfilled()})||v?x.length&&a.open({promises:x,location:e}):t._closePopup()}else t._closePopup()}else t._closePopup()},_fetchSceneAttributes:function(a,b){return this.view.whenLayerView(a).then(function(c){var e=this._getOutFields(a.popupTemplate),f=b.map(function(a){return c.whenGraphicAttributes(a,e).otherwise(function(){return a})});return h.eachAlways(f)}.bind(this)).then(function(a){return a.map(function(a){return a.value})})},_getSubLayerFeatureLayers:function(b,
c){var f=c||new k,g=[];c=b.length;var h=Math.floor(this.view.extent.width/this.view.width),d=this.view.scale,m=!1,r=this,w=0;a:for(;w<c;w++){var x=b[w],C=x.dynamicLayerInfos||x.layerInfos;if(C){var G=null;x._params&&(x._params.layers||x._params.dynamicLayers)&&(G=x.visibleLayers);for(var G=q._getVisibleLayers(C,G),J=q._getLayersForScale(d,C),E=C.length,K=0;K<E;K++){var R=C[K],Z=R.id,ba=x.popupTemplates[Z];if(!R.subLayerIds&&ba&&ba.popupTemplate&&-1<n.indexOf(G,Z)&&-1<n.indexOf(J,Z)){if(!v){m=!0;break a}var F=
x.id+"_"+Z,Y=this._featureLayersCache[F];Y&&Y.loadError||(Y||((Y=ba.layerUrl)||(Y=R.source?this._getLayerUrl(x.url,"/dynamicLayer"):this._getLayerUrl(x.url,Z)),Y=new v(Y,{id:F,drawMode:!1,mode:v.MODE_SELECTION,outFields:this._getOutFields(ba.popupTemplate),resourceInfo:ba.resourceInfo,source:R.source}),this._featureLayersCache[F]=Y),Y.setDefinitionExpression(x.layerDefinitions&&x.layerDefinitions[Z]),Y.setGDBVersion(x.gdbVersion),Y.popupTemplate=ba.popupTemplate,Y.setMaxAllowableOffset(h),Y.setUseMapTime(!!x.useMapTime),
x.layerDrawingOptions&&x.layerDrawingOptions[Z]&&x.layerDrawingOptions[Z].renderer&&Y.setRenderer(x.layerDrawingOptions[Z].renderer),g.push(Y))}}}}if(m){var D=new k;a(["../layers/FeatureLayer"],function(a){v=a;D.resolve()});D.then(function(){r._getSubLayerFeatureLayers(b,f)})}else{var S=[];n.forEach(g,function(a){if(!a.loaded){var b=new k;e.once(a,"load, error",function(){b.resolve()});S.push(b.promise)}});S.length?l(S).then(function(){g=n.filter(g,function(a){return!a.loadError&&a.isVisibleAtScale(d)});
f.resolve(g)}):(g=n.filter(g,function(a){return a.isVisibleAtScale(d)}),f.resolve(g))}return f.promise},_getLayerUrl:function(a,b){var c=a.indexOf("?");return-1===c?a+"/"+b:a.substring(0,c)+"/"+b+a.substring(c)},_getOutFields:function(a){var b=["*"];if("esri.PopupTemplate"===a.declaredClass){var c=null==a.content||Array.isArray(a.content)&&a.content.every(function(a){return"attachments"===a.type||"fields"===a.type&&null==a.fieldInfos||"text"===a.type&&-1===a.text.indexOf("{")});a.fieldInfos&&!a.expressionInfos&&
c&&(b=[],n.forEach(a.fieldInfos,function(a){var c=a.fieldName&&a.fieldName.toLowerCase();c&&"shape"!==c&&0!==c.indexOf("relationships/")&&b.push(a.fieldName)}))}return b},_calculateClickTolerance:function(a){var b=6;n.forEach(a,function(a){if(a=a.renderer)"simple"===a.type?((a=a.symbol)&&a.xoffset&&(b=Math.max(b,Math.abs(a.xoffset))),a&&a.yoffset&&(b=Math.max(b,Math.abs(a.yoffset)))):"unique-value"!==a.type&&"class-breaks"!==a.type||n.forEach(a.uniqueValueInfos||a.classBreakInfos,function(a){(a=a.symbol)&&
a.xoffset&&(b=Math.max(b,Math.abs(a.xoffset)));a&&a.yoffset&&(b=Math.max(b,Math.abs(a.yoffset)))})});return b},_clickHandler:function(a){function b(a){return c.allLayerViews.find(function(b){return b.layer===a})}var c=this.view,e=a.screenPoint,g=this;if(0===a.button&&c.popup&&c.ready){var d="3d"===c.type,h=c.map.allLayers.some(function(a){if(a.isInstanceOf(f))return!1;var c;null==a?c=!1:(c=b(a),c=null==c?!1:a.loaded&&!c.suspended&&(a.popupEnabled&&a.popupTemplate||"graphics"===a.type||c.getPopupData));
c&&!(c=!d)&&(c=(a=b(a))&&a.hasDraped);return c?!0:!1});null!=e?this.view.hitTest(e.x,e.y).then(function(b){h||0<b.results.length?0<b.results.length?(b=b.results[0],g._showPopup(a,b.mapPoint,b.graphic)):g._showPopup(a,a.mapPoint,null):g._closePopup()}):g._showPopup(a,a.mapPoint)}}})})},"esri/layers/support/layerUtils":function(){define(["dojo/_base/array"],function(a){return{_serializeLayerDefinitions:function(h){var n=[],e=!1,k=/[:;]/;if(h&&(a.forEach(h,function(a,g){a&&(n.push([g,a]),!e&&k.test(a)&&
(e=!0))}),0<n.length)){var l;e?(l={},a.forEach(n,function(a){l[a[0]]=a[1]}),l=JSON.stringify(l)):(l=[],a.forEach(n,function(a){l.push(a[0]+":"+a[1])}),l=l.join(";"));return l}return null},_serializeTimeOptions:function(h,n){if(h){var e=[];a.forEach(h,function(h,l){h&&(h=h.toJSON(),n&&-1!==a.indexOf(n,l)&&(h.useTime=!1),e.push('"'+l+'":'+JSON.stringify(h)))});if(e.length)return"{"+e.join(",")+"}"}},_getVisibleLayers:function(h,n){var e=[],k,l;if(!h)return e;if(n)for(e=n.concat(),l=0;l<h.length;l++)n=
h[l],k=a.indexOf(h,n.id),n.subLayerIds&&-1<k&&(e.splice(k,1),e=e.concat(n.subLayerIds));else e=this._getDefaultVisibleLayers(h);return e},_getDefaultVisibleLayers:function(h){var n=[],e;if(!h)return n;for(e=0;e<h.length;e++)0<=h[e].parentLayerId&&-1===a.indexOf(n,h[e].parentLayerId)&&a.some(h,function(a){return a.id===h[e].parentLayerId})||h[e].defaultVisibility&&n.push(h[e].id);return n},_getLayersForScale:function(h,n){var e=[];if(0<h&&n){var k;for(k=0;k<n.length;k++)if(!(0<=n[k].parentLayerId&&
-1===a.indexOf(e,n[k].parentLayerId)&&a.some(n,function(a){return a.id===n[k].parentLayerId}))&&0<=n[k].id){var l=!0,q=n[k].maxScale,g=n[k].minScale;if(0<q||0<g)0<q&&0<g?l=q<=h&&h<=g:0<q?l=q<=h:0<g&&(l=h<=g);l&&e.push(n[k].id)}}return e}}})},"esri/layers/GroupLayer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./Layer ../core/MultiOriginJSONSupport ./mixins/PortalLayer ./mixins/OperationalLayer ../support/LayersMixin ../core/accessorSupport/utils ../core/accessorSupport/decorators".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f){return function(a){function c(b){b=a.call(this)||this;b._visibilityHandles={};b.fullExtent=void 0;b.operationalLayerType="GroupLayer";b.spatialReference=void 0;b.type="group";b._visibilityWatcher=b._visibilityWatcher.bind(b);return b}n(c,a);c.prototype.initialize=function(){this._enforceVisibility(this.visibilityMode,this.visible);this.watch("visible",this._visibleWatcher.bind(this),!0)};c.prototype._writeLayers=function(a,b,c,e){var f=[];if(!a)return f;a.forEach(function(a){a.write&&
(a=a.write(null,e))&&a.layerType&&f.push(a)});b.layers=f};Object.defineProperty(c.prototype,"visibilityMode",{set:function(a){var b=this._get("visibilityMode")!==a;this._set("visibilityMode",a);b&&this._enforceVisibility(a,this.visible)},enumerable:!0,configurable:!0});c.prototype.load=function(){this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]}));return this.when()};c.prototype.layerAdded=function(a,b){a.visible&&"exclusive"===
this.visibilityMode?this._turnOffOtherLayers(a):"inherited"===this.visibilityMode&&(a.visible=this.visible);this._visibilityHandles[a.uid]=a.watch("visible",this._visibilityWatcher,!0)};c.prototype.layerRemoved=function(a,b){if(b=this._visibilityHandles[a.uid])b.remove(),delete this._visibilityHandles[a.uid];this._enforceVisibility(this.visibilityMode,this.visible)};c.prototype._turnOffOtherLayers=function(a){this.layers.forEach(function(b){b!==a&&(b.visible=!1)})};c.prototype._enforceVisibility=
function(a,c){if(b.getProperties(this).initialized){var e=this.layers,f=e.find(function(a){return a.visible});switch(a){case "exclusive":e.length&&!f&&(f=e.getItemAt(0),f.visible=!0);this._turnOffOtherLayers(f);break;case "inherited":e.forEach(function(a){a.visible=c})}}};c.prototype._visibleWatcher=function(a){"inherited"===this.visibilityMode&&this.layers.forEach(function(b){b.visible=a})};c.prototype._visibilityWatcher=function(a,b,c,e){switch(this.visibilityMode){case "exclusive":a?this._turnOffOtherLayers(e):
this._isAnyLayerVisible()||(e.visible=!0);break;case "inherited":e.visible=this.visible}};c.prototype._isAnyLayerVisible=function(){return this.layers.some(function(a){return a.visible})};e([f.shared({"2d":"../views/layers/GroupLayerView","3d":"../views/layers/GroupLayerView"})],c.prototype,"viewModulePaths",void 0);e([f.property()],c.prototype,"fullExtent",void 0);e([f.property({json:{read:!1,write:{ignoreOrigin:!0}}})],c.prototype,"layers",void 0);e([f.writer("layers")],c.prototype,"_writeLayers",
null);e([f.property()],c.prototype,"operationalLayerType",void 0);e([f.property({json:{write:!1}})],c.prototype,"portalItem",void 0);e([f.property()],c.prototype,"spatialReference",void 0);e([f.property({json:{read:!1},readOnly:!0,value:"group"})],c.prototype,"type",void 0);e([f.property({json:{read:!1,write:!1}})],c.prototype,"url",void 0);e([f.property({type:String,value:"independent",json:{write:!0}})],c.prototype,"visibilityMode",null);return c=e([f.subclass("esri.layers.GroupLayer")],c)}(f.declared(k,
c,l,g,q))})},"esri/portal/support/layersCreator":function(){define("require exports dojo/has ../../core/promiseUtils ../../core/requireUtils ../PortalItem ./portalLayers ../../layers/Layer ../../renderers/support/styleUtils ./mapNotesUtils".split(" "),function(a,h,n,e,k,l,q,g,c,b){function f(b,d,f){var g,h;return k.when(a,"../../layers/"+d).then(function(a){var d={};b.itemId&&(d.portalItem={id:b.itemId,portal:f.context.portal});h=g=new a(d);h.read(b,f.context);return c.loadStyleRenderer(h,f.context).then(function(){return e.resolve(g)})})}
function r(a,b){return v(a,b).then(function(c){return f(a,c,b)})}function v(a,c){var d=c.context,f=x(d),g=a.layerType||a.type;!g&&c&&c.defaultLayerType&&(g=c.defaultLayerType);c=f[g]||"UnknownLayer";if("Feature Collection"===a.type){if(a.itemId)return(new l({id:a.itemId,portal:d&&d.portal})).load().then(q.selectLayerClassPath).then(function(a){return a.className})}else"ArcGISFeatureLayer"===g&&b.isMapNotesLayer(a)&&(c="MapNotesLayer");a.wmtsInfo&&(c="WMTSLayer");return e.resolve(c)}function x(a){switch(a.origin){case "web-scene":switch(a.layerContainerType){case "basemap":a=
d;break;case "ground":a=p;break;default:a=u}break;default:switch(a.layerContainerType){case "basemap":a=y;break;default:a=m}}return a}function w(a,b,c){return b&&b.filter?c.then(function(a){var c=b.filter(a);return void 0===c?e.resolve(a):c instanceof g?e.resolve(c):c}):c}function t(a,b,c){if(!b)return[];for(var d=[],f=[],g=0;g<b.length;g++){var h=b[g],k=r(h,c);d.push(k);f.push(null);if("GroupLayer"===h.layerType&&h.layers&&Array.isArray(h.layers)&&0<h.layers.length){h=h.layers.map(function(a){return r(a,
c)});d.push.apply(d,h);for(var l=0;l<h.length;l++)f.push(k)}}var m={};return d.map(function(b,d){var g=function(a,b){m[b.id]=d;var c=a.findIndex(function(a){if(!a.id)return!1;a=m[a.id];return void 0===a?!1:d<a});0>c&&(c=void 0);a.add(b,c)};return w(a,c,b).then(function(b){if(null===f[d])g(a,b);else return f[d].then(function(a){g(a.layers,b);return e.resolve(b)});return e.resolve(b)})})}Object.defineProperty(h,"__esModule",{value:!0});var u={ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",
ArcGISMapServiceLayer:"MapImageLayer",PointCloudLayer:"PointCloudLayer",ArcGISSceneServiceLayer:"SceneLayer",IntegratedMeshLayer:"IntegratedMeshLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"TileLayer",ArcGISTiledMapServiceLayer:"TileLayer",GroupLayer:"GroupLayer",WebTiledLayer:"WebTileLayer",CSV:"CSVLayer",VectorTileLayer:"VectorTileLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"},p={ArcGISTiledElevationServiceLayer:"ElevationLayer",DefaultTileLayer:"ElevationLayer"},
d={ArcGISTiledMapServiceLayer:"TileLayer",ArcGISTiledImageServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",WebTiledLayer:"WebTileLayer",VectorTileLayer:"VectorTileLayer",ArcGISImageServiceLayer:"UnsupportedLayer",WMS:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",DefaultTileLayer:"TileLayer"},m={ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",
ArcGISTiledImageServiceLayer:"TileLayer",ArcGISTiledMapServiceLayer:"TileLayer",VectorTileLayer:"VectorTileLayer",WebTiledLayer:"WebTileLayer",CSV:"CSVLayer",GeoRSS:"GeoRSSLayer",KML:"KMLLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"},y={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"TileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",
WebTiledLayer:"WebTileLayer",bingLayer:"UnsupportedLayer",WMS:"WMSLayer",DefaultTileLayer:"TileLayer"};h.createLayer=r;h.processLayer=w;h.populateLayers=t;h.populateOperationalLayers=function(a,b,c){return t(a,b,c)}})},"esri/portal/support/portalLayers":function(){define("require exports dojo/_base/lang ../PortalItem ../../core/promiseUtils ../../core/requireUtils ../../request ../../core/Collection ../../core/Error ./mapNotesUtils".split(" "),function(a,h,n,e,k,l,q,g,c,b){function f(a){switch(a.type){case "Map Service":return v(a);
case "Feature Service":return x(a);case "Feature Collection":return t(a);case "Scene Service":return w(a);case "Image Service":return u(a);case "Stream Service":return{className:"StreamLayer"};case "Vector Tile Service":return{className:"VectorTileLayer"};case "KML":return{className:"KMLLayer"};case "WMTS":return{className:"WMTSLayer"};case "WMS":return{className:"WMSLayer"};default:return k.reject(new c("portal:unknown-item-type","Unknown item type '${type}'",{type:a.type}))}}function r(b){return l.when(a,
"../../layers/"+b.className).then(function(a){return{constructor:a,properties:b.properties}})}function v(a){return p(a).then(function(a){return a?{className:"TileLayer"}:{className:"MapImageLayer"}})}function x(a){return d(a).then(function(a){if("object"===typeof a){var b={returnZ:!0,outFields:["*"]};null!=a.id&&(b.layerId=a.id);return{className:"FeatureLayer",properties:b}}return{className:"GroupLayer"}})}function w(a){return d(a).then(function(b){if("object"===typeof b){var c={},d=void 0;null!=
b.id?(c.layerId=b.id,d=a.url+"/layers/"+b.id):d=a.url;if(Array.isArray(a.typeKeywords)&&0<a.typeKeywords.length){b={IntegratedMesh:"IntegratedMeshLayer","3DObject":"SceneLayer",Point:"SceneLayer",PointCloud:"PointCloudLayer"};for(var e=0,f=Object.keys(b);e<f.length;e++){var g=f[e];if(-1!==a.typeKeywords.indexOf(g))return{className:b[g]}}}return m(d).then(function(a){var b="SceneLayer";null!=a&&"IntegratedMesh"===a.layerType?b="IntegratedMeshLayer":null!=a&&"PointCloud"===a.layerType&&(b="PointCloudLayer");
return{className:b,properties:c}})}return{className:"GroupLayer"}})}function t(a){return a.load().then(function(){return a.fetchData()}).then(function(a){if(a&&Array.isArray(a.layers)){if(b.isMapNotesLayer(a))return{className:"MapNotesLayer"};if(1===a.layers.length)return{className:"FeatureLayer"}}return{className:"GroupLayer"}})}function u(a){return p(a).then(function(b){var c=new g(a.typeKeywords);return b?c.find(function(a){return"elevation 3d layer"===a.toLowerCase()})?{className:"ElevationLayer"}:
{className:"TileLayer"}:{className:"ImageryLayer"}})}function p(a){return m(a.url).then(function(a){return a.tileInfo})}function d(a){return!a.url||a.url.match(/\/\d+$/)?k.resolve({}):a.load().then(function(){return a.fetchData()}).then(function(b){return b&&Array.isArray(b.layers)?1===b.layers.length?{id:b.layers[0].id}:!1:m(a.url).then(function(a){return a&&Array.isArray(a.layers)?1===a.layers.length?{id:a.layers[0].id}:!1:{}})})}function m(a){return q(a,{responseType:"json",callbackParamName:"callback",
query:{f:"json"}}).then(function(a){return a.data})}Object.defineProperty(h,"__esModule",{value:!0});h.fromItem=function(a){!a.portalItem||a.portalItem instanceof e||a.portalItem.constructor&&a.portalItem.constructor._meta||(a=n.mixin({},a,{portalItem:new e(a.portalItem)}));return a.portalItem.load().then(f).then(r).then(function(b){var c=n.mixin({portalItem:a.portalItem},b.properties);b=b.constructor;"esri.layers.FeatureLayer"===b.declaredClass&&(c.returnZ=!0,c.outFields=["*"]);return k.resolve(new b(c))})};
h.selectLayerClassPath=f})},"esri/portal/support/mapNotesUtils":function(){define(["require","exports"],function(a,h){Object.defineProperty(h,"__esModule",{value:!0});h.isMapNotesLayer=function(a){var e=["TITLE","DESCRIPTION","IMAGE_URL","IMAGE_LINK_URL"];if((a=a.layers||a.featureCollection&&a.featureCollection.layers)&&Array.isArray(a))return a=a[0],a.layerDefinition.fields&&a.layerDefinition.fields.forEach(function(a){a=e.indexOf(a.name);-1<a&&e.splice(a,1)}),e.length?!1:!0}})},"esri/views/layers/LayerView":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/Evented ../../core/HandleRegistry ../../core/Identifiable ../../core/Logger ../../core/Promise ../../core/promiseUtils".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r){return function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b.handles=new g;b.layer=null;b.parent=null;b.view=null;return b}n(c,a);c.prototype.initialize=function(){var a=this;this.addResolvingPromise(this.layer);this.when().catch(function(c){if("layerview:create-error"!==c.name){var e=a.layer&&a.layer.id||"no id",f=a.layer&&a.layer.title||"no title";b.getLogger(a.declaredClass).error("#resolve()","Failed to resolve layer view (layer title: '"+f+
"', id: '"+e+"')",c);return r.reject(c)}})};c.prototype.destroy=function(){this.layer=this.view=this.parent=null};Object.defineProperty(c.prototype,"suspended",{get:function(){return!this.canResume()},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"updating",{get:function(){return!this.suspended&&this.isUpdating()},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"visible",{get:function(){return!0===this.get("layer.visible")},set:function(a){void 0===a?this._clearOverride("visible"):
this._override("visible",a)},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"fullOpacity",{get:function(){var a=this.get("layer.opacity"),a=null!=a?a:1,b=this.get("parent.fullOpacity");return a*(null!=b?b:1)},enumerable:!0,configurable:!0});c.prototype.canResume=function(){return!this.get("parent.suspended")&&this.get("view.ready")&&this.get("layer.loaded")&&this.visible||!1};c.prototype.isUpdating=function(){return!1};e([k.property()],c.prototype,"layer",void 0);e([k.property()],
c.prototype,"parent",void 0);e([k.property({readOnly:!0,dependsOn:["view","visible","layer.loaded","parent.suspended"]})],c.prototype,"suspended",null);e([k.property({type:Boolean,dependsOn:["suspended"],readOnly:!0})],c.prototype,"updating",null);e([k.property()],c.prototype,"view",void 0);e([k.property({dependsOn:["layer.visible"]})],c.prototype,"visible",null);e([k.property({dependsOn:["layer.opacity","parent.fullOpacity"]})],c.prototype,"fullOpacity",null);return c=e([k.subclass("esri.views.layers.LayerView")],
c)}(k.declared(l,q,c,f))})},"esri/views/View":function(){define("dojo/_base/lang ../Graphic ../core/Accessor ../core/Collection ../core/CollectionFlattener ../core/Evented ../core/HandleRegistry ../core/Promise ../core/watchUtils ../core/promiseUtils ../core/Scheduler ../geometry/Extent ../geometry/HeightModelInfo ../geometry/SpatialReference ./LayerViewManager ./RefreshManager ./BasemapView ./GroundView ./support/DefaultsFromMap".split(" "),function(a,h,n,e,k,l,q,g,c,b,f,r,v,x,w,t,u,p,d){return n.createSubclass([g,
l],{declaredClass:"esri.views.View",properties:{allLayerViews:{readOnly:!0},basemapView:{},animation:{},resizing:{},interacting:{},graphics:{type:e.ofType(h)},groundView:{},defaultsFromMap:d,heightModelInfo:{readOnly:!0,type:v,dependsOn:["map.heightModelInfo","defaultsFromMap.heightModelInfo"]},initialExtent:{readOnly:!0,type:r,dependsOn:["defaultsFromMap.extent"]},initialExtentRequired:{},layerViews:{type:e},map:{},ready:{readOnly:!0,dependsOn:"map spatialReference width height initialExtentRequired initialExtent defaultsFromMap.isSpatialReferenceDone map.loaded".split(" ")},
size:{readOnly:!0,dependsOn:["width","height"],get:function(){return[this.width,this.height]}},spatialReference:{type:x,dependsOn:["defaultsFromMap.spatialReference","defaultsFromMap.vcsWkid","defaultsFromMap.latestVcsWkid"]},stationary:{dependsOn:["animation","interacting","resizing"]},type:{},updating:{},padding:{},width:{},height:{},cursor:{}},constructor:function(a){this._viewHandles=new q;this._viewHandles.add(this.watch("ready",function(a,b){this._currentSpatialReference=a?this.spatialReference:
null;this.notifyChange("spatialReference");!a&&b&&this.layerViewManager.empty()}.bind(this)));this.allLayerViews=new k({root:this,rootCollectionNames:["basemapView.baseLayerViews","groundView.layerViews","layerViews","basemapView.referenceLayerViews"],getChildrenFunction:function(a){return a.layerViews}});this.defaultsFromMap=new d({view:this})},getDefaults:function(){return a.mixin(this.inherited(arguments),{layerViews:[],graphics:[],padding:{left:0,top:0,right:0,bottom:0}})},initialize:function(){var a=
this.validate().then(function(){this._isValid=!0;this.notifyChange("ready");var a=function(){return c.whenOnce(this,"ready").then(function(){return b.after(0)}.bind(this)).then(function(){if(!this.ready)return a()}.bind(this))}.bind(this);return a()}.bind(this));this.addResolvingPromise(a);this.basemapView=new u({view:this});this.groundView=new p({view:this});this.layerViewManager=new w({view:this});this.refreshManager=new t({view:this});this._resetInitialViewPropertiesFromContent()},destroy:function(){this.destroyed||
(this.basemapView.destroy(),this.groundView.destroy(),this.destroyLayerViews(),this.refreshManager.destroy(),this.defaultsFromMap.destroy(),this.defaultsFromMap=null,this._viewHandles.destroy(),this.map=null)},destroyLayerViews:function(){this.layerViewManager.destroy()},_viewHandles:null,_isValid:!1,_readyCycleForced:!1,_userSpatialReference:null,_currentSpatialReference:null,animation:null,basemapView:null,groundView:null,graphics:null,_graphicsSetter:function(a){this._graphicsView&&(this._graphicsView.graphics=
a);this._set("graphics",a)},heightModelInfo:null,_heightModelInfoGetter:function(){return this.getDefaultHeightModelInfo()},interacting:!1,layerViews:null,map:null,_mapSetter:function(a){var b=this._get("map");a!==b&&(a&&a.load&&a.load(),this._forceReadyCycle(),this._resetInitialViewPropertiesFromContent(),this._set("map",a))},padding:null,_readyGetter:function(){return!!(this._isValid&&!this._readyCycleForced&&this.map&&0!==this.width&&0!==this.height&&this.spatialReference&&(!this.map.load||this.map.loaded)&&
(this._currentSpatialReference||!this.initialExtentRequired||this.initialExtent||this.defaultsFromMap&&this.defaultsFromMap.isSpatialReferenceDone)&&this.defaultsFromMap&&this.defaultsFromMap.isTileInfoDone&&this.isSpatialReferenceSupported(this.spatialReference))},spatialReference:null,_spatialReferenceGetter:function(){var a=this._userSpatialReference||this._currentSpatialReference||this.getDefaultSpatialReference()||null;a&&this.isHeightModelInfoRequired&&this.defaultsFromMap&&(a=a.clone(),a.vcsWkid=
this.defaultsFromMap.vcsWkid,a.latestVcsWkid=this.defaultsFromMap.latestVcsWkid);return a},_spatialReferenceSetter:function(a){this._userSpatialReference=a;this._set("spatialReference",a)},stationary:!0,_stationaryGetter:function(){return!this.animation&&!this.interacting&&!this.resizing},type:null,updating:!1,initialExtentRequired:!0,initialExtent:null,_initialExtentGetter:function(){return this.defaultsFromMap&&this.defaultsFromMap.extent},cursor:"default",whenLayerView:function(a){return this.layerViewManager.whenLayerView(a)},
getDefaultSpatialReference:function(){return this.get("defaultsFromMap.spatialReference")},getDefaultHeightModelInfo:function(){return this.get("map.supportsHeightModelInfo")&&this.get("map.heightModelInfo")||this.get("defaultsFromMap.heightModelInfo")||null},validate:function(){return b.resolve()},isSpatialReferenceSupported:function(){return!0},isTileInfoRequired:function(){return!1},_resetInitialViewPropertiesFromContent:function(){if(this.defaultsFromMap){var a=this.defaultsFromMap.start.bind(this.defaultsFromMap);
this.defaultsFromMap.reset();this._currentSpatialReference=null;this.notifyChange("spatialReference");this._viewHandles.remove("defaultsFromMap");this._viewHandles.add([c.watch(this,"spatialReference",a),c.watch(this,"initialExtentRequired",a),f.schedule(a)],"defaultsFromMap")}},_forceReadyCycle:function(){this.ready&&(this._readyCycleForced=!0,c.whenFalseOnce(this,"ready",function(){this._readyCycleForced=!1;this.notifyChange("ready")}.bind(this)),this.notifyChange("ready"))}})})},"esri/views/LayerViewManager":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor ../core/Error ../core/HandleRegistry ../core/Scheduler ../core/promiseUtils ../core/watchUtils ./LayerViewFactory".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r){return function(a){function h(){var b=a.call(this)||this;b._promisesMap=new Map;b._layerViewsMap=new Map;b._handles=new g;b.factory=new r;b.ready=!1;b.layersToLayerViews=function(){var a=new Map;a.set("view.map.basemap.baseLayers","view.basemapView.baseLayerViews");a.set("view.map.ground.layers","view.groundView.layerViews");a.set("view.map.layers","view.layerViews");a.set("view.map.basemap.referenceLayers","view.basemapView.referenceLayerViews");return a}();b._doWork=
b._doWork.bind(b);b.refresh=b.refresh.bind(b);b._handles.add(f.init(b,"view.ready",function(a){return b.ready=a}));b._handles.add(b.watch(["view.map.basemap","view.map.ground","view.map.layers","ready"],b.refresh),"watcher");return b}n(h,a);h.prototype.destroy=function(){this._handles&&(this.empty(),this.view=null,this.factory.destroy(),this.factory=null,this._handles.destroy(),this._map=this._layerViewsMap=this._promisesMap=this._handles=null)};h.prototype.empty=function(){this._layerViewsMap.forEach(this._disposeLayerView,
this);this._promisesMap.forEach(function(a){return a.cancel()});this._layerViewsMap.clear();this._promisesMap.clear();this._refreshCollections()};h.prototype.refresh=function(){var a=this._handles;a.remove("refresh");a.add(c.schedule(this._doWork),"refresh")};h.prototype.whenLayerView=function(a){this.refresh();this._doWork();return this._promisesMap.has(a)?this._promisesMap.get(a):b.reject(new q("view:no-layerview-for-layer","No layerview has been found for the layer",{layer:a}))};h.prototype._doWork=
function(){var a=this,b=this._handles,c=this.get("view.map");this._map!==c&&(this.empty(),this._map=c);if(b.has("refresh")){b.remove("refresh");b.remove("collection-change");this.factory.paused=!this.ready;var e=this._map&&this._map.allLayers;e&&(e.forEach(this._createLayerView,this),this._refreshCollections(),this._promisesMap.forEach(function(b,c){e.includes(c)||a._disposeLayerView(a._layerViewsMap.get(c),c)}),b.add(e.on("change",this.refresh),"collection-change"))}};h.prototype._refreshCollections=
function(){var a=this;this.layersToLayerViews.forEach(function(b,c){a._populateLayerViewsOwners(a.get(c),a.get(b),a.view)})};h.prototype._populateLayerViewsOwners=function(a,b,c){var e=this;if(a&&b){var d=0;a.forEach(function(a){var f=e._layerViewsMap.get(a);f&&(f.layer=a,f.parent=c,b.getItemAt(d)!==f&&b.splice(d,0,f),a.layers&&e._populateLayerViewsOwners(a.layers,f.layerViews,f),d+=1)});d<b.length&&b.splice(d,b.length)}else b&&b.removeAll()};h.prototype._createLayerView=function(a){var b=this,c=
this.view,e=this.factory,d=this._layerViewsMap,f=this._promisesMap;d.has(a)?a.load():f.has(a)||(e=e.create(c,a).then(function(e){if(!b._map||!b._map.allLayers.some(function(b){return a===b}))throw new q("view:no-layerview-for-layer","The layer has been removed from the map",{layer:a});d.set(a,e);b._refreshCollections();a.emit("layerview-create",{view:c,layerView:e});c.emit("layerview-create",{layer:a,layerView:e});return e.when()}),f.set(a,e),e.always(this.refresh))};h.prototype._disposeLayerView=
function(a,b){if(this._promisesMap.has(b)&&(this._promisesMap.get(b).cancel(),this._promisesMap.delete(b),a)){b=a.layer;var c=a.view;this.factory.dispose(a);a.layer=a.parent=a.view=null;this._layerViewsMap.delete(b);b.emit("layerview-destroy",{view:c,layerView:a});c.emit("layerview-destroy",{layer:b,layerView:a})}};e([k.property()],h.prototype,"ready",void 0);e([k.property()],h.prototype,"view",void 0);return h=e([k.subclass("esri.views.LayerViewManager")],h)}(k.declared(l))})},"esri/views/LayerViewFactory":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators dojo/Deferred dojo/when ../core/Accessor ../core/Collection ../core/Error ../core/watchUtils".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f){return function(a){function g(){var b=null!==a&&a.apply(this,arguments)||this;b.creationRequests=new c;b.paused=!0;return b}n(g,a);g.prototype.initialize=function(){var a=this;f.whenFalse(this,"paused",function(){a.creationRequests.toArray().forEach(a._processRequest,a)},!0)};g.prototype.destroy=function(){this.creationRequests.drain(function(a){return a.deferred.cancel(void 0)})};Object.defineProperty(g.prototype,"working",{get:function(){return 0<this.creationRequests.length},
enumerable:!0,configurable:!0});g.prototype.create=function(a,c){var e=this.getLayerViewPromise(c);if(e)return e;var f=this.creationRequests,g={deferred:new l(function(){var a=new b("cancelled:layerview-create","layerview creation cancelled",{layer:c});f.remove(g);g.creationPromise&&g.creationPromise.cancel(a);return a}),view:a,layer:c,started:!1,creationPromise:null};f.push(g);this.paused||this._processRequest(g);return g.deferred.promise};g.prototype.dispose=function(a){a.layer.destroyLayerView(a)};
g.prototype.getLayerViewPromise=function(a){var b=this.creationRequests&&this.creationRequests.find(function(b){return b.layer===a});return b&&b.deferred.promise};g.prototype._processRequest=function(a){var c=this;if(!a.started){a.started=!0;var e=a.deferred,f=a.layer,g=a.view;f.load().then(function(b){if(!e.isCanceled())return a.creationPromise=b.createLayerView(g),a.creationPromise}).then(function(b){return e.isCanceled()?b:a.creationPromise=q(b.when())}).catch(function(a){e.isCanceled()||e.reject(new b("layerview:create-error",
"layerview creation failed",{layer:f,error:a}))}).then(function(b){c.creationRequests&&c.creationRequests.remove(a);e.isFulfilled()?b&&c.dispose(b):e.resolve(b);return b})}};e([k.property()],g.prototype,"creationRequests",void 0);e([k.property()],g.prototype,"paused",void 0);e([k.property()],g.prototype,"view",void 0);e([k.property({dependsOn:["paused","creationRequests.length"],readOnly:!0})],g.prototype,"working",null);return g=e([k.subclass("esri.views.LayerViewFactory")],g)}(k.declared(g))})},
"esri/views/RefreshManager":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor ../core/HandleRegistry".split(" "),function(a,h,n,e,k,l,q){return function(a){function c(){var b=null!==a&&a.apply(this,arguments)||this;b._handles=new q;b._currentTick=0;return b}n(c,a);c.prototype.initialize=function(){var a=this;this.view.allLayerViews.on("after-changes",function(){a.notifyChange("tickInterval");
a._handles.remove("layerViewsUpdating");a._handles.add(a._getLayerViewHandles(),"layerViewsUpdating")});this.watch("tickInterval",function(){return a._restartTicking()});this.watch("view.ready",function(){return a._restartTicking()});this._restartTicking()};c.prototype.destroy=function(){this._handles&&(this._handles.destroy(),this._handles=null,this._intervalID&&clearInterval(this._intervalID),this._currentTick=0)};Object.defineProperty(c.prototype,"tickInterval",{get:function(){var a=this.view.allLayerViews.filter(function(a){return!!a.refresh});
return this._getCommonInterval(a)},enumerable:!0,configurable:!0});c.prototype._restartTicking=function(){var a=this;this._currentTick=0;this._intervalID&&clearInterval(this._intervalID);this.get("view.ready")&&(this._intervalID=setInterval(function(){var b=Date.now();a._currentTick+=a.tickInterval;a.view.allLayerViews.forEach(function(c){if(c.refresh){var e=Math.round(6E4*c.refreshInterval),f=0===a._currentTick%e,g=6E3>b-c.refreshTimestamp;e&&f&&!g&&c.refresh(b)}})},this.tickInterval))};c.prototype._getLayerViewHandles=
function(){var a=this,c=[];this.view.allLayerViews.forEach(function(b){if(b.refresh){var e=b.watch("refreshInterval",function(){return a.notifyChange("tickInterval")});c.push(e);b.layer&&(e=b.layer.on("refresh",function(){var a=Date.now();6E3>a-b.refreshTimestamp||b.refresh(a)}),c.push(e))}});return c};c.prototype._getCommonInterval=function(a){var b=function(a,c){return isNaN(a)||isNaN(c)?0:0>=c?a:b(c,a%c)};return a.toArray().reduce(function(a,c){return b(Math.round(6E4*c.refreshInterval),a)},0)};
e([k.property()],c.prototype,"view",void 0);e([k.property({readOnly:!0})],c.prototype,"tickInterval",null);return c=e([k.subclass("esri.views.RefreshManager")],c)}(k.declared(l))})},"esri/views/BasemapView":function(){define(["../core/Accessor","../core/Collection","../core/watchUtils"],function(a,h,n){return a.createSubclass({declaredClass:"esri.views.BasemapView",properties:{view:{},baseLayerViews:{type:h},referenceLayerViews:{type:h}},constructor:function(){this._loadingHdl=n.init(this,"view.map.basemap",
this._loadBasemap)},getDefaults:function(){return{baseLayerViews:[],referenceLayerViews:[]}},destroy:function(){this.view=null;this._loadingHdl&&(this._loadingHdl.remove(),this._loadingHdl=null)},_suspendedGetter:function(){return this.view?this.view.suspended:!0},_loadBasemap:function(a){a&&a.load()}})})},"esri/views/GroundView":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor ../core/Collection ../core/watchUtils ../core/HandleRegistry".split(" "),
function(a,h,n,e,k,l,q,g,c){return function(a){function b(){var b=null!==a&&a.apply(this,arguments)||this;b.handles=new c;b.layerViews=new q;return b}n(b,a);b.prototype.initialize=function(){this.handles.add(g.when(this,"view.map.ground",function(a){return a.load()}))};b.prototype.destroy=function(){this.view=null;this.handles&&(this.handles.destroy(),this.handles=null)};Object.defineProperty(b.prototype,"suspended",{get:function(){return!this.view||this.view.suspended},enumerable:!0,configurable:!0});
e([k.property()],b.prototype,"view",void 0);e([k.property({type:q})],b.prototype,"layerViews",void 0);e([k.property()],b.prototype,"suspended",null);return b=e([k.subclass("esri.views.GroundView")],b)}(k.declared(l))})},"esri/views/support/DefaultsFromMap":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/arrayUtils ../../core/watchUtils ../../core/Accessor ../../core/HandleRegistry ../../portal/support/geometryServiceUtils ../../geometry/support/webMercatorUtils ../../geometry/support/heightModelInfoUtils".split(" "),
function(a,h,n,e,k,l,q,g,c,b,f,r){return function(a){function g(){var b=null!==a&&a.apply(this,arguments)||this;b._handles=new c;b._waitTask=null;b._isStarted=!1;b._spatialReferenceCandidates=null;b._extentCandidates=null;b.isSpatialReferenceDone=!1;b.isTileInfoDone=!1;b.isHeightModelInfoSearching=!1;b.spatialReference=null;b.extent=null;b.heightModelInfo=null;b.vcsWkid=null;b.latestVcsWkid=null;b.mapCollectionPaths=h.DefaultMapCollectionPaths.slice();b.tileInfo=null;return b}n(g,a);h=g;g.prototype.initialize=
function(){var a=this;this.watch("mapCollectionPaths",function(){a._isStarted&&(a.reset(),a.start())})};g.prototype.destroy=function(){this._set("view",null);this._handles&&(this._handles.destroy(),this._handles=null,this._isStarted=!1);this._cancelLoading()};g.prototype.reset=function(){this._handles.removeAll();this._isStarted=!1;this._set("isSpatialReferenceDone",!1);this._set("isTileInfoDone",!1);this._set("isHeightModelInfoSearching",!1);this._set("spatialReference",null);this._set("extent",
null);this._set("heightModelInfo",null);this._set("vcsWkid",null);this._set("latestVcsWkid",null);this._set("tileInfo",null);this._extentCandidates=this._spatialReferenceCandidates=null};g.prototype.start=function(){this._handles.removeAll();this._isStarted=!0;for(var a=this._updateLayerChange.bind(this),b=0,c=this.mapCollectionPaths;b<c.length;b++)this._handles.add(q.on(this.view,"map."+c[b],"change",a,a,a,!0))};g.prototype._ownerNameFromCollectionName=function(a){var b=a.lastIndexOf(".");return-1===
b?"view":"view."+a.slice(0,b)};g.prototype._ensureLoadedOwnersFromCollectionName=function(a){a=this._ownerNameFromCollectionName(a).split(".");for(var b,c=0;c<a.length;c++){b=this.get(a.slice(0,c+1).join("."));if(!b)break;if(b.load&&!b.isFulfilled())return{owner:null,loading:b.load()}}return{owner:b}};g.prototype._cancelLoading=function(){this._waitTask=null;this._extentProjectTask&&(this._extentProjectTask.cancel(),this._extentProjectTask=null)};g.prototype._updateWhen=function(a){var b=this,c=!0,
d=!1,e=a.always(function(){c?d=!0:e===b._waitTask&&b._update()}),c=!1;d||(this._waitTask=e);return d};g.prototype._updateLayerChange=function(){this.isSpatialReferenceDone&&!this.spatialReference&&this._set("isSpatialReferenceDone",!1);this._update()};g.prototype._update=function(){var a=this;this._cancelLoading();if(this.view){if(!this.isSpatialReferenceDone&&0!==this._processMapCollections(function(b){return a._processSpatialReferenceSource(b)})){var b=null,c=this._spatialReferenceCandidates;!c||
1>c.length?b=this.defaultSpatialReference:(this.defaultSpatialReference&&1<c.length&&-1<l.findIndex(c,function(b){return b.equals(a.defaultSpatialReference)})&&(c=[this.defaultSpatialReference]),b=c[0]);this._set("spatialReference",b);this._set("isSpatialReferenceDone",!0);b&&(this._processMapCollections(function(c){return a._findExtent(c,b)}),this.extent||this._projectExtentCandidate())}null==this.heightModelInfo&&this.view.isHeightModelInfoRequired&&(c=this._processMapCollections(function(b){return a._processHeightModelInfoSource(b)},
function(a){return r.mayHaveHeightModelInfo(a)}),this._set("isHeightModelInfoSearching",0===c));null==this.tileInfo&&(c=!1,this.view.isTileInfoRequired()&&(c=this._deriveTileInfo()),c||this._set("isTileInfoDone",!0))}};g.prototype._processMapCollections=function(a,b){for(var c=0,d=this.mapCollectionPaths;c<d.length;c++){var e="map."+d[c],f=this._ensureLoadedOwnersFromCollectionName(e);if(f.loading&&!this._updateWhen(f.loading))return 0;f=f.owner;if(!(!f||f.isRejected&&f.isRejected())&&(e=this.view.get(e))&&
(e=this._processMapCollection(e,a,b),2!==e))return e}return 2};g.prototype._processMapCollection=function(a,b,c){for(var d=0;d<a.length;d++){var e=a.getItemAt(d),f=null!=c&&!c(e);if(!f&&e.load&&!e.isFulfilled()&&!this._updateWhen(e.load()))return 0;if(!f&&(!e.load||e.isResolved())){if(b(e))return 1;if(e.layers&&(e=this._processMapCollection(e.layers,b),2!==e))return e}}return 2};g.prototype._processSpatialReferenceSource=function(a){a=this._getSupportedSpatialReferences(a);if(0===a.length)return!1;
this._spatialReferenceCandidates?(a=l.intersect(a,this._spatialReferenceCandidates,function(a,b){return a.equals(b)}),0<a.length&&(this._spatialReferenceCandidates=a)):this._spatialReferenceCandidates=a;return 1===this._spatialReferenceCandidates.length};g.prototype._findExtent=function(a,b){var c=a.fullExtents||(a.fullExtent?[a.fullExtent]:[]),d=l.find(c,function(a){return a.spatialReference.equals(b)});if(d)return this._set("extent",d),!0;0<this._getSupportedSpatialReferences(a).length&&(c=c.map(function(b){return{extent:b,
layer:a}}),this._extentCandidates=(this._extentCandidates||[]).concat(c));return!1};g.prototype._projectExtentCandidate=function(){var a=this;if(this._extentCandidates&&this._extentCandidates.length){var c=this.spatialReference,e=l.find(this._extentCandidates,function(a){return f.canProject(a.extent.spatialReference,c)});e?this._set("extent",f.project(e.extent,c)):(e=this._extentCandidates[0],this._extentProjectTask=b.projectGeometry(e.extent,c,e.layer.portalItem).then(function(b){a._set("extent",
b)}))}};g.prototype._getSupportedSpatialReferences=function(a){var b=this;return(a.supportedSpatialReferences||(a.spatialReference?[a.spatialReference]:[])).filter(function(c){return b.view.isSpatialReferenceSupported(c,a)})};g.prototype._processHeightModelInfoSource=function(a){var b=r.deriveHeightModelInfoFromLayer(a);return b?(this._set("heightModelInfo",b),this._set("isHeightModelInfoSearching",!1),a.spatialReference&&(this._set("vcsWkid",a.spatialReference.vcsWkid),this._set("latestVcsWkid",
a.spatialReference.latestVcsWkid)),!0):!1};g.prototype._deriveTileInfo=function(){if(!this.isSpatialReferenceDone)return!0;var a=this.get("view.map");if(!a)return!0;var b=a.basemap,c=b&&b.get("baseLayers.0"),a=a.get("layers.0"),d=!1,e=null;b&&"failed"!==b.loadStatus?b.loaded?c&&"failed"!==c.loadStatus?c.loaded?e=c.tileInfo:(this._updateWhen(c.load()),d=!0):a&&"failed"!==a.loadStatus?a.loaded?e=a.tileInfo:(this._updateWhen(a.load()),d=!0):d=!0:(this._updateWhen(b.load()),d=!0):a&&"failed"!==a.loadStatus&&
(a.loaded?e=a.tileInfo:(this._updateWhen(a.load()),d=!0));e&&!e.spatialReference.equals(this.spatialReference)&&(e=null);d||this._set("tileInfo",e);return d};g.DefaultMapCollectionPaths=["basemap.baseLayers","layers","ground.layers","basemap.referenceLayers"];e([k.property({readOnly:!0})],g.prototype,"isSpatialReferenceDone",void 0);e([k.property({readOnly:!0})],g.prototype,"isTileInfoDone",void 0);e([k.property({readOnly:!0})],g.prototype,"isHeightModelInfoSearching",void 0);e([k.property({constructOnly:!0})],
g.prototype,"view",void 0);e([k.property({readOnly:!0})],g.prototype,"spatialReference",void 0);e([k.property({readOnly:!0})],g.prototype,"extent",void 0);e([k.property({readOnly:!0})],g.prototype,"heightModelInfo",void 0);e([k.property({readOnly:!0})],g.prototype,"vcsWkid",void 0);e([k.property({readOnly:!0})],g.prototype,"latestVcsWkid",void 0);e([k.property()],g.prototype,"mapCollectionPaths",void 0);e([k.property()],g.prototype,"defaultSpatialReference",void 0);e([k.property({readOnly:!0})],g.prototype,
"tileInfo",void 0);return g=h=e([k.subclass("esri.views.support.DefaultsFromMap")],g);var h}(k.declared(g))})},"esri/portal/support/geometryServiceUtils":function(){define("require exports ../Portal ../PortalItem ../../config ../../tasks/GeometryService ../../tasks/support/ProjectParameters ../../core/promiseUtils ../../core/Error".split(" "),function(a,h,n,e,k,l,q,g,c){function b(a){void 0===a&&(a=null);if(k.geometryServiceUrl)return g.resolve(new l({url:k.geometryServiceUrl}));if(!a)return g.reject(new c("internal:geometry-service-url-not-configured"));
var b;a.isInstanceOf(e)?b=a.portal||n.getDefault():a.isInstanceOf(n)&&(b=a);return b.load().then(function(a){if(a.helperServices&&a.helperServices.geometry&&a.helperServices.geometry.url)return g.resolve(new l({url:a.helperServices.geometry.url}));throw new c("internal:geometry-service-url-not-configured");})}Object.defineProperty(h,"__esModule",{value:!0});h.create=b;h.projectGeometry=function(a,c,e){void 0===e&&(e=null);return b(e).then(function(b){var e=new q;e.geometries=[a];e.outSpatialReference=
c;return b.project(e)}).then(function(a){return a&&Array.isArray(a)&&1===a.length?a[0]:g.reject()})}})},"esri/geometry/support/heightModelInfoUtils":function(){define(["require","exports","../../core/Error","../../layers/support/arcgisLayerUrl","../HeightModelInfo"],function(a,h,n,e,k){function l(a,b,c){if(q(a)&&q(b)){if(null==a||null==b)return 0;if(c||a.heightUnit===b.heightUnit){if(a.heightModel!==b.heightModel)return 2;switch(a.heightModel){case "gravity-related-height":return 0;case "ellipsoidal":return a.vertCRS===
b.vertCRS?0:3;default:return 4}}else return 1}else return 4}function q(a){return null==a||null!=a.heightModel&&null!=a.heightUnit}function g(a){var f=a.url&&e.parse(a.url);return null==(a.spatialReference&&a.spatialReference.vcsWkid)&&f&&"ImageServer"===f.serverType||!a.heightModelInfo?("hasZ"in a?!0===a.hasZ:c(a))?k.deriveUnitFromSR(b,a.spatialReference):null:a.heightModelInfo}function c(a){switch(a.type){case "elevation":case "integrated-mesh":case "point-cloud":case "scene":return!0;default:return!1}}
Object.defineProperty(h,"__esModule",{value:!0});h.validateWebSceneError=function(a,b){if(!a)return null;if(!q(a))return new n("webscene:unsupported-height-model-info","The vertical coordinate system of the scene is not supported",{heightModelInfo:a});var c=a.heightUnit;a=k.deriveUnitFromSR(a,b).heightUnit;return c!==a?new n("webscene:incompatible-height-unit","The vertical units of the scene ("+c+") must match the horizontal units of the scene ("+a+")",{verticalUnit:c,horizontalUnit:a}):null};h.rejectLayerError=
function(a,b,e){var f=g(a),h=l(f,b,e),q=null;if(f){var r=k.deriveUnitFromSR(f,a.spatialReference).heightUnit;e||r===f.heightUnit||(q=new n("layerview:unmatched-height-unit","The vertical units of the layer must match the horizontal units ("+r+")",{horizontalUnit:r}))}if(null==a.heightModelInfo&&null==a.spatialReference&&("hasZ"in a?!0===a.hasZ:c(a))||4===h||q)return new n("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:f,error:q});
q=null;switch(h){case 1:a=f.heightUnit||"unknown";e=b.heightUnit||"unknown";q=new n("layerview:incompatible-height-unit","The vertical units of the layer ("+a+") must match the vertical units of the scene ("+e+")",{layerUnit:a,sceneUnit:e});break;case 2:a=f.heightModel||"unknown";e=b.heightModel||"unknown";q=new n("layerview:incompatible-height-model","The height model of the layer ("+a+") must match the height model of the scene ("+e+")",{layerHeightModel:a,sceneHeightModel:e});break;case 3:a=f.vertCRS||
"unknown",e=b.vertCRS||"unknown",q=new n("layerview:incompatible-vertical-datum","The vertical datum of the layer ("+a+") must match the vertical datum of the scene ("+e+")",{layerDatum:a,sceneDatum:e})}return q?new n("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:f,sceneHeightModelInfo:b,error:q}):null};h.deriveHeightModelInfoFromLayer=g;h.mayHaveHeightModelInfo=function(a){return null!=a.layers||c(a)||
void 0!==a.hasZ||void 0!==a.heightModelInfo};var b=new k({heightModel:"gravity-related-height"})})},"esri/views/ViewAnimation":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators dojo/Deferred ../core/Accessor ../core/Promise ../core/Scheduler ../core/Error ../core/promiseUtils".split(" "),function(a,h,n,e,k,l,q,g,c,b,f){a=function(a){function g(b){b=a.call(this)||this;b.state="running";b.target=null;return b}
n(g,a);g.prototype.initialize=function(){this._dfd=new l;this.addResolvingPromise(this._dfd.promise)};Object.defineProperty(g.prototype,"done",{get:function(){return"finished"===this.state||"stopped"===this.state},enumerable:!0,configurable:!0});g.prototype.stop=function(){"stopped"!==this.state&&"finished"!==this.state&&(this._set("state","stopped"),c.schedule(this._dfd.reject.bind(this._dfd,new b("ViewAnimation stopped"))))};g.prototype.finish=function(){"stopped"!==this.state&&"finished"!==this.state&&
(this._set("state","finished"),c.schedule(this._dfd.resolve))};g.prototype.update=function(a,b){b||(b=f.isThenable(a)?"waiting-for-target":"running");this._set("target",a);this._set("state",b)};e([k.property({readOnly:!0,dependsOn:["state"]})],g.prototype,"done",null);e([k.property({readOnly:!0,type:String})],g.prototype,"state",void 0);e([k.property()],g.prototype,"target",void 0);return g=e([k.subclass("esri.views.ViewAnimation")],g)}(k.declared(q,g));(a||(a={})).State={RUNNING:"running",STOPPED:"stopped",
FINISHED:"finished",WAITING_FOR_TARGET:"waiting-for-target"};return a})},"url:esri/core/request/iframe.html":'\x3c!DOCTYPE html\x3e\r\n\x3chtml\x3e\r\n\x3chead\x3e\r\n \x3cmeta http-equiv\x3d"Content-Security-Policy" content\x3d"default-src \'none\'; script-src * \'unsafe-inline\'"\x3e\r\n\r\n \x3cscript\x3e\r\n var dojoConfig \x3d {\r\n async: true,\r\n baseUrl: "../../../dojo/",\r\n has: {\r\n "csp-restrictions": true,\r\n "dojo-preload-i18n-Api": false\r\n }\r\n };\r\n \x3c/script\x3e\r\n \x3c!--\r\n This src is relative to this page and assumes dojo is a sibling to esri.\r\n It is updated when this file is set as the iframe\'s `srcdoc` value.\r\n --\x3e\r\n \x3cscript src\x3d"../../../dojo/dojo.js"\x3e\x3c/script\x3e\r\n\r\n \x3cscript\x3e\r\n function windowMessageHandler(event) {\r\n window.removeEventListener("message", windowMessageHandler);\r\n\r\n var port \x3d event.ports[0];\r\n\r\n require([\r\n "dojo/request/script"\r\n ], function(script) {\r\n port.postMessage("ready");\r\n\r\n port.addEventListener("message", function(event) {\r\n var data \x3d event.data;\r\n script.get(data.url, data.options)\r\n .then(function(response) {\r\n port.postMessage({\r\n id: data.id,\r\n response: response\r\n });\r\n })\r\n .otherwise(function(error) {\r\n port.postMessage({\r\n id: data.id,\r\n isError: true,\r\n message: error.message\r\n });\r\n });\r\n });\r\n port.start();\r\n });\r\n }\r\n\r\n window.addEventListener("message", windowMessageHandler);\r\n \x3c/script\x3e\r\n\x3c/head\x3e\r\n\x3cbody\x3e\r\n\x3c/body\x3e\r\n\x3c/html\x3e\r\n',
"*now":function(a){a(['dojo/i18n!*preload*dojo/nls/dojo*["ar","ca","cs","da","de","el","en-gb","en-us","es-es","fi-fi","fr-fr","he-il","hu","it-it","ja-jp","ko-kr","nl-nl","nb","pl","pt-br","pt-pt","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]'])},"*noref":1}});require.boot&&require.apply(null,require.boot);