MapView.js
1.09 MB
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
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.6/esri/copyright.txt for details.
//>>built
require({cache:{"esri/core/workers":function(){define(["require","exports","./workers/workers"],function(A,t,g){Object.defineProperty(t,"__esModule",{value:!0});for(var a in g)t.hasOwnProperty(a)||(t[a]=g[a])})},"esri/core/workers/workers":function(){define("require exports dojo/promise/all dojo/has ../promiseUtils ./Connection ./DedicatedConnection ./JobProxy".split(" "),function(A,t,g,a,d,f,m,l){function p(){if(z)return z;for(var d=[],a=function(a){var f=l.create(I,a).then(function(d){return D[a]=
d});d.push(f)},f=0;f<w;f++)a(f);return z=g(d).then(function(){return!0})}function r(){if(M)return M;for(var d=[],a=function(a){var f=w+a;a=l.create(I,f).then(function(a){return D[f]=a});d.push(a)},f=0;f<B;f++)a(f);return M=g(d).then(function(){return!0})}function q(a,d,f){var l=d.id;if(f)return D[d.workerId].openConnection(a,l);d=[];for(f=0;f<D.length;f++)d.push(D[f].openConnection(a,l));return g(d)}function v(a){var d=H++;a=new t.Connection(a,d);I.set(d,a);return a}function x(a){var d=H++,f=w+E++;
E%=B;a=new t.DedicatedConnection(a,d,f);I.set(d,a);return a}Object.defineProperty(t,"__esModule",{value:!0});t.Connection=f;t.DedicatedConnection=m;A=(navigator||{}).hardwareConcurrency||2;var w=a("esri-workers-debug")?1:Math.max(1,Math.ceil(A/2)),B=a("esri-workers-debug")?1:Math.max(1,Math.floor(A/2)),E=0,D=[],F=0,H=0,I=new Map;t.initialize=function(){p();r()};t.open=function(a,f,g){void 0===g&&(g=!1);return(g?r():p()).then(function(l){var m;m=g?x(a):v(a);return q(f,m,g).then(function(){return m}).otherwise(function(a){return d.reject(a)})})};
t.terminate=function(){for(var a=0;a<D.length;a++)D[a]&&D[a].terminate();D.length=0;I.clear()};t.closeConnection=function(a){if(a){if(I.has(a.id))I["delete"](a.id);if(a instanceof t.DedicatedConnection)D[a.workerId].closeConnection(a.id);else for(var d=0;d<w;d++)D[d]&&D[d].closeConnection(a.id)}};t.invoke=function(a,d,f,g,l){var m=null;g&&(m=g.id);null===m&&(D.some(function(a,d){return d<w&&!a.hasOutgoingJobs()?(m=a.index,!0):!1})||(m=F=(F+1)%w));a=D[m].invoke(a,d,f,l);g&&(g.id=m);return a};t.broadcast=
function(a,d,f,g){for(var l=[],m=0;m<w;m++)l.push(D[m].invoke(a,d,f,g));return l};var z,M})},"esri/core/workers/Connection":function(){define(["require","exports","./workers"],function(A,t,g){return function(){function a(a,f){this.client=a;this.id=f}a.prototype.invoke=function(a,f,m,l){return g.invoke(a,f,m,l,this.id)};a.prototype.broadcast=function(a,f,m){return g.broadcast(a,f,m,this.id)};a.prototype.close=function(){g.closeConnection(this)};return a}()})},"esri/core/workers/DedicatedConnection":function(){define(["require",
"exports","./workers"],function(A,t,g){return function(){function a(a,f,g){this.client=a;this.id=f;this._targetWorker={id:g}}Object.defineProperty(a.prototype,"workerId",{get:function(){return this._targetWorker.id},enumerable:!0,configurable:!0});a.prototype.invoke=function(a,f,m){return g.invoke(a,f,m,this._targetWorker,this.id)};a.prototype.close=function(){g.closeConnection(this)};return a}()})},"esri/core/workers/JobProxy":function(){define("require exports dojo/_base/kernel dojo/_base/lang dojo/Deferred ../../kernel ../../config ../../request ../Logger ../Error ../sniff ../urlUtils ./WorkerFallbackImpl".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x){function w(){if(!q("esri-workers"))return B(new x);if(!I){var a=void 0;try{a=new Worker(D)}catch(K){E.warn("Failed to create Worker. Fallback to execute module in main thread",event),a=new x}return B(a)}z||(z=l(D,{responseType:"text"}));return z.then(function(a){return new Worker(URL.createObjectURL(new Blob([a.data],{type:"text/javascript"})))}).otherwise(function(a){E.warn("Failed to create Worker. Fallback to execute module in main thread",a);return new x}).then(function(a){return B(a)})}
function B(f){function l(d){if(d&&d.data&&d.data.type)if(d=d.data.type,"\x3cworker-loaded\x3e"===d){d=f;var v;null!=m["default"]?(v=a.mixin({},m),delete v["default"],v=JSON.parse(JSON.stringify(v))):v=JSON.parse(JSON.stringify(m));var r={async:!0,baseUrl:H,locale:g.locale,has:{},paths:{}};a.mixin(r,m.workers.loaderConfig);r.has=a.mixin({"esri-cors":1,"dojo-test-sniff":0,"config-deferredInstrumentation":0,"host-webworker":1,"events-keypress-typed":0},r.has);r.paths=a.mixin({esri:"../esri",dojo:"../dojo",
dojox:"../dojox",dstore:"../dstore",moment:"../moment"},r.paths);d.postMessage({type:"\x3cconfigure\x3e",configure:{esriConfig:v,dojoConfig:r,loaderUrl:F}})}else"\x3cworker-configured\x3e"===d&&(f.removeEventListener("message",l),f.removeEventListener("error",p),q.resolve(f))}function p(a){a.preventDefault();f.removeEventListener("message",l);f.removeEventListener("error",p);E.warn("Failed to create Worker. Fallback to execute module in main thread",a);f=new x;f.addEventListener("message",l);f.addEventListener("error",
p)}var q=new d;f.addEventListener("message",l);f.addEventListener("error",p);return q.promise}var E=p.getLogger("esri.core.workers.JobProxy"),D=v.normalize(A.toUrl("./worker.js")),F=v.makeAbsolute(A.toUrl("dojo/dojo.js")),H=v.makeAbsolute("../",F)+"/",I=!v.hasSameOrigin(D,location.href),z=null;return function(){function a(a,d,f){this.connections=a;this.index=d;this.worker=f;this.msgCount=0;this.outgoingJobs=new Map;this.incomingJobs=new Map;this.incomingStaticJobs=new Map;this.worker.addEventListener("message",
this.message.bind(this));this.worker.addEventListener("error",function(a){a.preventDefault();E.error(a)})}a.create=function(d,f){return w().then(function(g){return new a(d,f,g)})};a.prototype.terminate=function(){this.worker.terminate()};a.prototype.openConnection=function(a,d){return this.invoke("\x3copen-connection\x3e",{path:a},void 0,d)};a.prototype.closeConnection=function(a){this.invoke("\x3cclose-connection\x3e",void 0,void 0,a)};a.prototype.hasOutgoingJobs=function(){return 0<this.outgoingJobs.size};
a.prototype.invoke=function(a,f,g,l){var m=this,p=++this.msgCount,q=new d(function(a){m.worker.postMessage({type:"\x3ccancel\x3e",id:p,connection:l,data:{reason:a}});if(m.outgoingJobs.has(p))m.outgoingJobs["delete"](p)});this.outgoingJobs.set(p,q);this.worker.postMessage({type:a,id:p,connection:l,data:f},g);return q.promise};a.prototype.message=function(a){var d=this;if(a&&a.data){var g=a.data.type;if(g){var l=a.data,m=a.data.id;if("\x3cresponse\x3e"===g&&m){if(a=this.outgoingJobs.get(m))this.outgoingJobs["delete"](m),
l.error?a.reject(r.fromJSON(JSON.parse(l.error))):a.resolve(l.data)}else if("\x3ccancel\x3e"===g&&m)(a=this.incomingJobs.get(m))&&a.cancel(l.data.reason),l.staticMsg&&(a=this.incomingStaticJobs.get(m))&&a.cancel(l.data.reason);else if("\x3cstatic-message\x3e"===g){var p=l.staticMsg;(a=f.workerMessages[p])&&"function"===typeof a?(l=a.call(this,l.data),this.incomingStaticJobs.set(m,l),l.then(function(a){d.worker.postMessage({type:"\x3cstatic-message\x3e",staticMsg:p,id:m,data:a.data},a.buffers)}).otherwise(function(a){a||
(a={message:"Error encountered at method"+p});a.dojoType&&"cancel"===a.dojoType||d.worker.postMessage({type:"\x3cstatic-message\x3e",staticMsg:p,id:m,error:JSON.stringify(a)})}).always(function(){d.incomingStaticJobs["delete"](m)})):this.worker.postMessage({type:"\x3cstatic-message\x3e",staticMsg:p,id:m,error:p+" message type is not available on the kernel!"})}else{var q=l.connection;if(a=this.connections.get(q))if(a=a.client){var v=a[g];"function"===typeof v&&(l=v.call(a,l.data),this.incomingJobs.set(m,
l),l.then(function(a){d.worker.postMessage({type:"\x3cresponse\x3e",id:m,connection:q,error:a.error&&JSON.stringify(a.error),data:a.data},a.buffers)}).otherwise(function(a){a||(a={message:"Error encountered at method"+g});a.dojoType&&"cancel"===a.dojoType||d.worker.postMessage({type:"\x3cresponse\x3e",id:m,connection:q,error:JSON.stringify(a)})}).always(function(){d.incomingJobs["delete"](m)}))}}}}};return a}()})},"esri/core/workers/WorkerFallbackImpl":function(){define(["require","exports","../global"],
function(A,t,g){var a=function(){return function(){var a=this,d=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach(function(f){a[f]=function(){for(var a=[],g=0;g<arguments.length;g++)a[g]=arguments[g];return d[f].apply(d,a)}})}}(),d=g.MutationObserver||g.WebKitMutationObserver,f=function(){var a;if(g.process&&g.process.nextTick)a=function(a){g.process.nextTick(a)};else if(g.Promise)a=function(a){g.Promise.resolve().then(a)};else if(d){var f=[],p=document.createElement("div");
(new d(function(){for(;0<f.length;)f.shift()()})).observe(p,{attributes:!0});a=function(a){f.push(a);p.setAttribute("queueStatus","1")}}return a}();return function(){function d(){this._dispatcher=new a;this._connections={};this._outgoingStaticMessages={};this._isInitialized=!1;this._workerPostMessage({type:"\x3cworker-loaded\x3e"})}d.prototype.terminate=function(){this._connections={}};Object.defineProperty(d.prototype,"onmessage",{get:function(){return this._onmessageHandler},set:function(a){this._onmessageHandler&&
this.removeEventListener("message",this._onmessageHandler);(this._onmessageHandler=a)&&this.addEventListener("message",a)},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"onerror",{get:function(){return this._onerrorHandler},set:function(a){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler);(this._onerrorHandler=a)&&this.addEventListener("error",a)},enumerable:!0,configurable:!0});d.prototype.postMessage=function(a,d){var g=this;f(function(){g._workerMessageHandler(new MessageEvent("message",
{data:a}))})};d.prototype.dispatchEvent=function(a){return this._dispatcher.dispatchEvent(a)};d.prototype.addEventListener=function(a,d,f){this._dispatcher.addEventListener(a,d,f)};d.prototype.removeEventListener=function(a,d,f){this._dispatcher.removeEventListener(a,d,f)};d.prototype._workerPostMessage=function(a,d){var g=this;f(function(){g.dispatchEvent(new MessageEvent("message",{data:a}))})};d.prototype._workerMessageHandler=function(a){var d=this,f=a.data;if(f){var g=f.connection,l=f.type;if("\x3cconfigure\x3e"===
l)this._isInitialized||this._workerPostMessage({type:"\x3cworker-configured\x3e"});else if("\x3copen-connection\x3e"===l){a=f.data.path;var m=f.id;this._connections[g]?this._workerPostMessage({type:"\x3cresponse\x3e",id:m,connection:g}):A(["./WorkerConnection",a],function(a,f){d._connections[g]=new a(f,{postMessage:function(a,f){return d._workerPostMessage(a,f)}},g);d._workerPostMessage({type:"\x3cresponse\x3e",id:m,data:{connection:g},error:void 0})})}else"\x3cclose-connection\x3e"===l?this._connections[g]&&
delete this._connections[g]:"\x3cstatic-message\x3e"===l?(a=f.id,this._outgoingStaticMessages[a]&&(l=this._outgoingStaticMessages[a],delete this._outgoingStaticMessages[a],f.error?l.reject(f.error):l.resolve(f.data))):l&&(f=this._connections[g])&&f.proxy.message(a)}};return d}()})},"esri/views/MapViewBase":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/_base/lang ../core/accessorSupport/decorators ../core/HandleRegistry ../core/Logger ../core/promiseUtils ../core/Error ../Viewpoint ../geometry ../geometry/support/webMercatorUtils ./View ./ViewAnimation ./2d/FrameTask ./2d/PaddedViewState ./2d/MapViewConstraints ./2d/AnimationManager ./2d/viewpointUtils".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x,w,B,E,D,F,H,I){var z=l.getLogger("esri.views.MapView");return function(l){function w(a){var d=l.call(this,a)||this;d._frameTask=new E(d);d._mapViewBaseHandles=new m;d._setup=!1;d.fullOpacity=1;d.interacting=!1;d.initialExtent=null;d.resizeAlign="center";d.type="2d";d.constraints=new F;d.padding={top:0,right:0,bottom:0,left:0};var f=function(){this._set("updating",this.layerViewManager.factory.working||this.allLayerViews.some(function(a){return!0===a.updating}))}.bind(d),
g=d._mapViewBaseHandles;g.add([d.watch("viewpoint",function(a){return d._flipStationary()},!0),d.on("resize",function(a){return d._resizeHandler(a)}),d.watch("animationManager.animation",function(a){d.animation=a}),d.allLayerViews.on("change",function(){f();g.remove("layerViewsUpdating");g.add(d.allLayerViews.map(function(a){return a.watch("updating",f)}).toArray(),"layerViewsUpdating")})]);d.watch("ready",function(a){a?d._startup():d._tearDown()});return d}g(w,l);w.prototype.destroy=function(){this.destroyed||
(this._set("ready",!1),this._mapViewBaseHandles.removeAll(),this.layerViewManager.empty(),this._frameTask.destroy(),this._tearDown(),this._gotoTask=this._mapViewBaseHandles=this._frameTask=null)};Object.defineProperty(w.prototype,"animation",{set:function(a){var d=this,f=this._get("animation");a!==f&&(f&&f.stop(),!a||a.isFulfilled()?this._set("animation",null):(this._set("animation",a),f=function(){a===d._get("animation")&&(d._set("animation",null),d._frameTask.requestFrame())},a.when(f,f,function(a){d.state&&
(d.state.viewpoint=a)})))},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"center",{get:function(){if(!this._setup)return this._get("center");var a=this.content.center;return new v.Point({x:a[0],y:a[1],spatialReference:this.content.spatialReference})},set:function(a){if(null!=a)if(this._normalizeInput(a))if(this._setup){var d=this.viewpoint;I.centerAt(d,d,a);this.viewpoint=d}else this._set("center",a),this.notifyChange("initialExtentRequired");else z.error("#center","incompatible spatialReference "+
JSON.stringify(a.spatialReference)+" with view's spatialReference "+JSON.stringify(this.spatialReference))},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"constraints",{set:function(a){var d=this,f=this._get("constraints");f&&(this._mapViewBaseHandles.remove("constraints"),f.destroy());this._set("constraints",a);a&&(this._setup&&(a.view=this,this.state.viewpoint=a.fit(this.content.viewpoint)),this._mapViewBaseHandles.add(a.on("update",function(){d._setup&&d.state&&(d.state.viewpoint=
a.fit(d.content.viewpoint))}),"constraints"))},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"extent",{get:function(){return this._setup?this.content.extent.clone():this._get("extent")},set:function(a){if(null!=a){var d=this._normalizeInput(a);d?d.width&&d.height?this._setup?(a=this.viewpoint,I.setExtent(a,a,d,this.size,{constraints:this.constraints}),this.viewpoint=a):(this._set("extent",d),this._set("center",null),this._set("viewpoint",null),this._set("scale",0),this._set("zoom",
-1),this.notifyChange("initialExtentRequired")):z.error("#extent","invalid extent size"):z.error("#center","incompatible spatialReference "+JSON.stringify(a.spatialReference)+" with view's spatialReference "+JSON.stringify(this.spatialReference))}},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"initialExtentRequired",{get:function(){var a=this.extent,d=this.center,f=this.scale,g=this.viewpoint,l=this.zoom;return this.get("map.initialViewProperties.viewpoint")||a||d&&(0!==f||-1!==
l)||g?!1:!0},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"padding",{get:function(){return this._setup?this.state.padding:this._get("padding")},set:function(a){this._setup?(this.state.padding=a,this._set("padding",this.state.padding)):this._set("padding",a)},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"rotation",{get:function(){return this._setup?this.content.rotation:this._get("rotation")},set:function(a){if(!isNaN(a))if(this._setup){var d=this.viewpoint;
I.rotateTo(d,d,a);this.viewpoint=d}else this._set("rotation",a)},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"scale",{get:function(){return this._setup?this.content.scale:this._get("scale")},set:function(a){if(a&&!isNaN(a))if(this._setup){var d=this.viewpoint;I.scaleTo(d,d,a);this.viewpoint=d}else{this._set("scale",a);this._set("zoom",-1);if(a=this._get("extent"))this._set("extent",null),this._set("center",a.center);this.notifyChange("initialExtentRequired")}},enumerable:!0,
configurable:!0});Object.defineProperty(w.prototype,"stationary",{get:function(){return!this.animation&&!this.interacting&&!this._get("resizing")&&!this._stationaryTimer},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"viewpoint",{get:function(){if(!this._setup)return this._get("viewpoint");var a=this.content;return a&&a.viewpoint.clone()},set:function(a){if(null!=a){var d=this._normalizeInput(a);d?this._setup?(a=I.create(),I.copy(a,d),this.constraints.constrain(a,this.content.viewpoint),
this.state.viewpoint=a,this._frameTask.requestFrame(),this._set("viewpoint",a)):(this._set("viewpoint",d),this._set("extent",null),this._set("center",null),this._set("zoom",-1),this._set("scale",0),this.notifyChange("initialExtentRequired")):!a.scale||isNaN(a.scale)?z.error("#viewpoint","invalid scale value of "+a.scale):a.targetGeometry?z.error("#viewpoint","incompatible spatialReference "+JSON.stringify(a.targetGeometry.spatialReference)+" with view's spatialReference "+JSON.stringify(this.spatialReference)):
z.error("#viewpoint","geometry not defined")}},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"zoom",{get:function(){return this._setup?this.constraints.scaleToZoom(this.scale):this._get("zoom")},set:function(a){if(null!=a){if(!this._setup){this.notifyChange("initialExtentRequired");this._set("zoom",a);this._set("scale",0);var d=this._get("extent");d&&(this._set("extent",null),this._set("center",d.center))}this.constraints.effectiveLODs&&(d=this.viewpoint,I.scaleTo(d,d,this.constraints.zoomToScale(a)),
this.viewpoint=d,this._set("zoom",this.constraints.scaleToZoom(this.scale)))}},enumerable:!0,configurable:!0});w.prototype.goTo=function(a,f){this.animation&&(this.animation=null);if(this._setup)return f=d.mixin({animate:!0},f),a=I.createAsync(a,this),this._gotoTask={},f.animate?this._gotoAnimated(a,f):this._gotoImmediate(a,f);z.error("#goTo()","MapView cannot be used before it is ready")};w.prototype.hitTest=function(a,d){return p.reject("Should be implemented by subclasses")};w.prototype.toMap=
function(a,d,f){if(!this._setup)return null;a&&null!=a.x&&(f=d,d=a.y,a=a.x);var g=[0,0];this.state.toMap(g,[a,d]);f=f||new v.Point;f.x=g[0];f.y=g[1];f.spatialReference=this.spatialReference;return f};w.prototype.isTileInfoRequired=function(){return!0};w.prototype.toScreen=function(a,d,f,g){if(!this._setup)return null;a&&null!=a.x&&(g=d,a=this._normalizeInput(a),d=a.y,a=a.x);g=f||g||new v.ScreenPoint;a=[a,d];this.state.toScreen(a,a);g.x=a[0];g.y=a[1];return g};w.prototype.pixelSizeAt=function(a,d){if(!this._setup)return NaN;
a&&null!=a.x&&(d=a.y,a=a.x);return this.content.pixelSizeAt([a,d])};w.prototype.requestLayerViewUpdate=function(a){this._setup&&this._frameTask.requestLayerViewUpdate(a)};w.prototype.getDefaultSpatialReference=function(){return this.get("map.initialViewProperties.spatialReference")||this.get("defaultsFromMap.spatialReference")||null};w.prototype.isSpatialReferenceSupported=function(a,d){if(d||this._get("ready"))return!0;d=this._normalizeInput(this._get("center"),a);var f=this._normalizeInput(this._get("extent"),
a),g=this._normalizeInput(this._get("viewpoint"),a),l=this._userSpatialReference,m=null,p=null;(g=g&&g.targetGeometry)&&("extent"===g.type?m=g:"point"===g.type&&(p=g));g=this._normalizeInput(this.get("map.initialViewProperties.viewpoint.targetGeometry.extent"),a);a=this._normalizeInput(this.initialExtent,a);a=f||m||g||a;return d||p||a&&a.center?!0:(l&&z.error("The view could not be initialized with the spatialReference "+l.wkid+".","Try specifying an extent or a center and scale"),!1)};w.prototype._createOrReplaceAnimation=
function(a){if(!this.animation||this.animation.done)this.animation=new B;this.animation.update(a);return this.animation};w.prototype._cancellableGoTo=function(a,d,f){var g=this,l=f.then(function(){a===g._gotoTask&&(g.animation=null)}).otherwise(function(f){a===g._gotoTask&&(g.animation=null,d.done||d.stop());throw f;}),m=p.create(function(a){return a(l)},function(){a!==g._gotoTask||d.done||d.stop()});d.catch(function(){a===g._gotoTask&&m.cancel()});return m};w.prototype._gotoImmediate=function(a,
d){var f=this,g=this._gotoTask,l=this._createOrReplaceAnimation(a);a=a.then(function(a){if(g!==f._gotoTask)throw new r("view:goto-interrupted","Goto was interrupted");f.viewpoint=l.target=a;l.finish()});return this._cancellableGoTo(g,l,a)};w.prototype._gotoAnimated=function(a,d){var f=this,g=this._gotoTask,l=this._createOrReplaceAnimation(a);a=a.then(function(a){if(g!==f._gotoTask)throw new r("view:goto-interrupted","Goto was interrupted");l.update(a);f.animationManager.animate(l,f.viewpoint,d);return l.when().then(function(){})});
return this._cancellableGoTo(g,l,a)};w.prototype._resizeHandler=function(a){var d=this.state;if(d){var f=this.content.viewpoint,g=this.content.size.concat();d.size=[a.width,a.height];I.resize(f,f,g,this.content.size,this.resizeAlign);f=this.constraints.constrain(f,null);this.state.viewpoint=f}};w.prototype._startup=function(){if(!this._setup){var a=this.constraints,d=this._get("zoom"),f=this._get("scale"),g=this._normalizeInput(this._get("center")),l=this._normalizeInput(this._get("extent")),m=this._get("rotation"),
p=this._normalizeInput(this._get("viewpoint"));a.view=this;a.effectiveLODs?-1!==d&&(f=a.zoomToScale(d)):d=-1;var v=null,r=null,x=0,d=p&&p.rotation,h=p&&p.targetGeometry;h&&("extent"===h.type?v=h:"point"===h.type&&(r=h,x=p.scale));p=this._normalizeInput(this.get("map.initialViewProperties.viewpoint.targetGeometry.extent"));h=this._normalizeInput(this.initialExtent);l=l||v||p||h;g=g||r||l&&l.center;f=f||x||l&&I.extentToScale(l,this.size);m=new q({targetGeometry:g,scale:f,rotation:m||d||0});a.fit(m);
this._set("animationManager",new H);this._set("state",new D({padding:this._get("padding"),size:this.size,viewpoint:m}));this._set("content",this.state.content);this._setup=!0}};w.prototype._tearDown=function(){if(this._setup){this._setup=!1;this._stationaryTimer&&(clearTimeout(this._stationaryTimer),this._stationaryTimer=null,this.notifyChange("stationary"));var a=this._get("content"),d=a.center,f=a.spatialReference,d=new v.Point({x:d[0],y:d[1],spatialReference:f});this._set("viewpoint",null);this._set("extent",
null);this._set("center",d);this._set("zoom",-1);this._set("rotation",a.rotation);this._set("scale",a.scale);this._set("spatialReference",f);this.constraints.view=null;this.animationManager.destroy();this._set("animationManager",null);this._set("state",null);this._set("content",null);this.animation=null}};w.prototype._flipStationary=function(){var a=this;this._stationaryTimer&&clearTimeout(this._stationaryTimer);this._stationaryTimer=setTimeout(function(){a._stationaryTimer=null;a.notifyChange("stationary")},
160);this.notifyChange("stationary")};w.prototype._normalizeInput=function(a,d){void 0===d&&(d=this.spatialReference);var f=a&&a.targetGeometry||a;return d?f?d.equals(f.spatialReference)?a:x.canProject(f,d)?a&&"esri.Viewpoint"===a.declaredClass?(a.targetGeometry=x.project(f,d),a):x.project(f,d):null:null:a};a([f.property()],w.prototype,"animation",null);a([f.property({readOnly:!0})],w.prototype,"animationManager",void 0);a([f.property({value:null,type:v.Point,dependsOn:["content.center"]})],w.prototype,
"center",null);a([f.property({type:F})],w.prototype,"constraints",null);a([f.property({readOnly:!0})],w.prototype,"content",void 0);a([f.property({value:null,type:v.Extent,dependsOn:["content.extent"]})],w.prototype,"extent",null);a([f.property()],w.prototype,"fullOpacity",void 0);a([f.property({readOnly:!0})],w.prototype,"interacting",void 0);a([f.property({type:v.Extent})],w.prototype,"initialExtent",void 0);a([f.property({dependsOn:["map.initialViewProperties.viewpoint"]})],w.prototype,"initialExtentRequired",
null);a([f.property({value:{top:0,right:0,bottom:0,left:0},cast:function(a){return d.mixin({top:0,right:0,bottom:0,left:0},a)}})],w.prototype,"padding",null);a([f.property()],w.prototype,"resizeAlign",void 0);a([f.property({value:0,type:Number,dependsOn:["content.rotation"]})],w.prototype,"rotation",null);a([f.property({value:0,type:Number,dependsOn:["content.scale"]})],w.prototype,"scale",null);a([f.property({type:v.SpatialReference,dependsOn:["map.initialViewProperties.spatialReference","defaultsFromMap.isSpatialReferenceDone"]})],
w.prototype,"spatialReference",void 0);a([f.property({readOnly:!0})],w.prototype,"state",void 0);a([f.property()],w.prototype,"stationary",null);a([f.property({readOnly:!0})],w.prototype,"type",void 0);a([f.property({value:null,type:q,dependsOn:["content.viewpoint"]})],w.prototype,"viewpoint",null);a([f.property({value:-1,dependsOn:["content.scale"]})],w.prototype,"zoom",null);return w=a([f.subclass("esri.views.MapViewBase")],w)}(f.declared(w))})},"esri/views/2d/FrameTask":function(){define(["require",
"exports","../../core/Scheduler","./FrameBudget"],function(A,t,g,a){return function(){function d(d){var f=this;this.view=d;this._frameTaskHandle=null;this._budget=new a(6);this.budget=6;this.updateEnabled=this.stationary=!0;this.prepare=function(){f._updateParameters.state=f.view.state;f._updateParameters.stationary=f.view.stationary;f._updateParameters.devicePixelRatio=window.devicePixelRatio;f._budget.reset(f.budget)};this.update=function(){if(f.updateEnabled){for(var a=f._budget,d=f.view,g=d.allLayerViews.toArray().filter(function(a){return a.isFulfilled()&&
null==a.layerViews}),m=g.length,v=d.state,x=0;x<g.length;x++)if(d=g[x],d.attached){var w=f._layerViewsState[d.uid];if(null==w||!f.stationary&&!d.moving)d.moving=!0,d.moveStart();w!==v.id&&d.viewChange();f.stationary&&d.moving&&(d.moving=!1,d.moveEnd());f._layerViewsState[d.uid]=v.id}v=f._layerViewsTrash;for(x=0;x<v.length;x++)d=v[x],f._detachLayerView(d);for(x=v.length=0;x<m;x++)d=g[x],d.isFulfilled()&&!d.attached&&f._attachLayerView(d);g=f._layerViewsToUpdate;m=g.slice();d=f._updateParameters;for(f._layerViewsToUpdate.length=
0;!a.done&&0<m.length;)m.shift().processUpdate(d);0<m.length&&g.unshift.apply(g,m);0===g.length&&0===v.length&&f._frameTaskHandle.pause()}};d.watch("ready",function(a){a?f.start():f.stop()})}d.prototype.destroy=function(){this.stop()};d.prototype.start=function(){var a=this;this._updateParameters={budget:this._budget,state:this.view.state,devicePixelRatio:window.devicePixelRatio,stationary:!0};this._layerViewsTrash=[];this._layerViewsToUpdate=[];this._layerViewsState={};this._allLayerViewsChangeHandle=
this.view.allLayerViews.on("change",function(d){Array.prototype.push.apply(a._layerViewsTrash,d.removed);a.requestFrame()});this._stationaryHandle=this.view.watch("stationary",function(d){a.stationary=d;a.requestFrame()});this._frameTaskHandle=g.addFrameTask(this)};d.prototype.stop=function(){var a=this;this._frameTaskHandle&&(this.view.allLayerViews.forEach(function(d){return a._detachLayerView(d)}),this._stationaryHandle.remove(),this._allLayerViewsChangeHandle.remove(),this._frameTaskHandle.remove(),
this._updateParameters=this._stationaryHandle=this._allLayerViewsChangeHandle=this._frameTaskHandle=this._layerViewsTrash=this._layerViewsToUpdate=this._layerViewsState=null,this.stationary=!0)};d.prototype.requestLayerViewUpdate=function(a){this._layerViewsToUpdate.push(a);this.requestFrame()};d.prototype.requestFrame=function(){this._frameTaskHandle&&this._frameTaskHandle.isPaused()&&this._frameTaskHandle.resume()};d.prototype._attachLayerView=function(a){a.attached||(a.attached=!0,a.moving=!1,
a.attach())};d.prototype._detachLayerView=function(a){a.attached&&(a.detach(),a.attached=!1,a.moving=!1)};return d}()})},"esri/views/2d/FrameBudget":function(){define(["require","exports","../../core/now"],function(A,t,g){return function(){function a(a){void 0===a&&(a=Number.MAX_VALUE);this._budget=this._begin=0;this.enabled=!0;this.reset(a)}a.now=function(){return g()};Object.defineProperty(a.prototype,"done",{get:function(){return this.enabled&&this.elapsed>=this._budget},enumerable:!0,configurable:!0});
Object.defineProperty(a.prototype,"elapsed",{get:function(){return g()-this._begin},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"remaining",{get:function(){return Math.max(this._budget-this.elapsed,0)},enumerable:!0,configurable:!0});a.prototype.reset=function(a){void 0===a&&(a=Number.MAX_VALUE);this._begin=g();this._budget=this.enabled?a:Number.MAX_VALUE};return a}()})},"esri/views/2d/PaddedViewState":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./viewpointUtils ./ViewState ./libs/gl-matrix/vec2 ./libs/gl-matrix/mat2d ./libs/gl-matrix/common ../../core/Accessor".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q){var v=function(f){function l(){var a=null!==f&&f.apply(this,arguments)||this;a.left=0;a.top=0;a.right=0;a.bottom=0;return a}g(l,f);a([d.property()],l.prototype,"left",void 0);a([d.property()],l.prototype,"top",void 0);a([d.property()],l.prototype,"right",void 0);a([d.property()],l.prototype,"bottom",void 0);return l=a([d.subclass("esri.views.2d.PaddedViewState.Padding")],l)}(d.declared(q));return function(q){function x(){for(var a=[],d=0;d<arguments.length;d++)a[d]=
arguments[d];a=q.apply(this,a)||this;a.content=new m;a.padding=new v;a.size=l.fromValues(0,0);return a}g(x,q);Object.defineProperty(x.prototype,"clipRect",{get:function(){var a=this.worldScreenWidth;if(!a)return null;var d=r.toRadian(this.rotation),f=this.width*Math.abs(Math.cos(d))+this.height*Math.abs(Math.sin(d));if(a>f)return null;var g=l.clone(this.screenCenter),m=p.fromTranslation(p.create(),g);p.rotate(m,m,d);l.negate(g,g);p.translate(m,m,g);l.transformMat2d(g,this.paddedScreenCenter,m);return{top:-Math.round(f),
left:Math.round(g[0]-.5*a),right:Math.round(g[0]+.5*a),bottom:+Math.round(f)}},enumerable:!0,configurable:!0});Object.defineProperty(x.prototype,"padding",{set:function(a){this._set("padding",a||new v);this._updateContent()},enumerable:!0,configurable:!0});Object.defineProperty(x.prototype,"size",{set:function(a){this._set("size",a);this._updateContent()},enumerable:!0,configurable:!0});Object.defineProperty(x.prototype,"paddedScreenCenter",{get:function(){var a=this.content.size,d=this.padding,a=
l.scale(l.create(),a,.5);a[0]+=d.left;a[1]+=d.top;return a},enumerable:!0,configurable:!0});Object.defineProperty(x.prototype,"viewpoint",{set:function(a){var d=a.clone();this.content.viewpoint=a;f.addPadding(d,a,this._get("size"),this._get("padding"));this._set("viewpoint",f.addPadding(d.clone(),a,this._get("size"),this._get("padding")))},enumerable:!0,configurable:!0});x.prototype._updateContent=function(){var a=l.create(),d=this._get("size"),f=this._get("padding");if(d&&f){var g=this.content;l.set(a,
f.left+f.right,f.top+f.bottom);l.subtract(a,d,a);g.size=a;if(a=g.viewpoint)this.viewpoint=a}};a([d.shared({transform:{dependsOn:["padding"]}})],x.prototype,"properties",void 0);a([d.property({dependsOn:["worldScreenWidth","rotation","paddedScreenCenter","screenCenter"],readOnly:!0})],x.prototype,"clipRect",null);a([d.property()],x.prototype,"content",void 0);a([d.property({type:v})],x.prototype,"padding",null);a([d.property()],x.prototype,"size",null);a([d.property({dependsOn:["size","padding"],readOnly:!0})],
x.prototype,"paddedScreenCenter",null);a([d.property()],x.prototype,"viewpoint",null);return x=a([d.subclass("esri.views.2d.PaddedViewState")],x)}(d.declared(m))})},"esri/views/2d/viewpointUtils":function(){define("require exports ./libs/gl-matrix/common ./libs/gl-matrix/mat2d ./libs/gl-matrix/vec2 ../../Viewpoint ../../core/promiseUtils ../../core/Error ../../geometry/SpatialReference ../../geometry/Geometry ../../geometry/Point ../../geometry/Extent ../../geometry/support/webMercatorUtils ../../geometry/support/scaleUtils ../../geometry/support/spatialReferenceUtils ../../geometry/support/webMercatorUtils".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x,w,B,E){function D(a,h,f,y){return y&&f&&!y.equals(f)&&x.canProject(y,f)&&y.isWebMercator?(y.isWebMercator?(f=h[1],89.99999<f?f=89.99999:-89.99999>f&&(f=-89.99999),f=Math.sin(g.toRadian(f)),a=d.set(a,6378137*g.toRadian(h[0]),3189068.5*Math.log((1+f)/(1-f)))):(f=g.toDegree(h[0]/6378137),a=d.set(a,f-360*Math.floor((f+180)/360),g.toDegree(.5*Math.PI-2*Math.atan(Math.exp(-1*h[1]/6378137))))),a):d.copy(a,h)}function F(a){return a.wkid?a:a.spatialReference||p.WGS84}function H(a,
h){return h.type?d.set(a,h.x,h.y):d.copy(a,h)}function I(a,h){return Math.max(a.width/h[0],a.height/h[1])*T(a.spatialReference)}function z(a,h,d){var y;if(!a)return null;if(Array.isArray(a)&&2===a.length&&"number"===typeof a[0]&&"number"===typeof a[1])return new q(a);if(a.reduce)return a.reduce(function(c,b){return z(b,h,c)},d);a instanceof r?y=a:a.geometry&&(y=a.geometry);if(!y)return null;a="point"===y.type?new v({xmin:y.x,ymin:y.y,xmax:y.x,ymax:y.y,spatialReference:y.spatialReference}):y.extent;
if(!a)return null;y=x.canProject(a,h);if(!a.spatialReference.equals(h)&&y)a=x.project(a,h);else if(!y)return null;return d=d?d.union(a):a.clone()}function M(a,h){if(!a)return new f({targetGeometry:new q,scale:0,rotation:0});var g=h.spatialReference,y=h.size,c=h.viewpoint,b=h.constraints,e=null;"esri.Viewpoint"===a.declaredClass?e=a:a.viewpoint?e=a.viewpoint:a.target&&"esri.Viewpoint"===a.target.declaredClass&&(e=a.target);var k=null;if(e&&e.targetGeometry)k=e.targetGeometry;else if(a instanceof v)k=
a;else if(a||a&&(a.hasOwnProperty("center")||a.hasOwnProperty("extent")||a.hasOwnProperty("target")))k=z(a.center,g)||z(a.extent,g)||z(a.target,g)||z(a,g);!k&&c&&c.targetGeometry?k=c.targetGeometry:!k&&h.extent&&(k=h.extent);var n=F(k);g||(g=F(h.spatialReference||h.extent||k));if(!E.canProject(k,g)&&n&&!n.equals(g))return null;var u=H(d.create(),k.center?k.center:k),n=new q(D(u,u,n,g),g),u=null,u=e&&e.targetGeometry&&"point"===e.targetGeometry.type?e.scale:a.hasOwnProperty("scale")&&a.scale?a.scale:
a.hasOwnProperty("zoom")&&-1!==a.zoom&&b&&b.effectiveLODs?b.zoomToScale(a.zoom):Array.isArray(k)||"point"===k.type||"extent"===k.type&&0===k.width&&0===k.height?h.extent&&x.canProject(h.extent,g)?I(x.project(h.extent,g),y):h.extent?I(h.extent,y):c.scale:x.canProject(k.extent,g)?I(x.project(k.extent,g),y):I(k.extent,y);h=0;e?h=e.rotation:a.hasOwnProperty("rotation")?h=a.rotation:c&&(h=c.rotation);a=new f({targetGeometry:n,scale:u,rotation:h});b&&(a=b.fit(a),b.rotationEnabled||(a.rotation=0));return a}
function K(a,h){var d=a.targetGeometry,y=h.targetGeometry;d.x=y.x;d.y=y.y;d.spatialReference=y.spatialReference;a.scale=h.scale;a.rotation=h.rotation;return a}function L(a,h,f){return f?d.set(a,.5*(h[0]-f.right+f.left),.5*(h[1]-f.bottom+f.top)):d.scale(a,h,.5)}function N(d,h,f,y){t.getTransform(d,h,f,y);return a.invert(d,d)}function Q(a,h,f){var y=g.toRadian(h.rotation)||0;h=Math.abs(Math.cos(y));y=Math.abs(Math.sin(y));return d.set(a,Math.round(f[1]*y+f[0]*h),Math.round(f[1]*h+f[0]*y))}function O(a){return a.scale*
(1/(39.37*w.getMetersPerUnitForSR(a.targetGeometry.spatialReference)*96))}function T(a){return 39.37*w.getMetersPerUnitForSR(a)*96}function R(a){return a.isWrappable?(a=B.getInfo(a),a.valid[1]-a.valid[0]):0}function Y(a,h){return Math.round(R(a)/h)}Object.defineProperty(t,"__esModule",{value:!0});var S=180/Math.PI;t.extentToScale=I;t.create=M;t.copy=K;t.getAnchor=L;t.getExtent=function(){var a=d.create();return function(h,d,y){var c=d.targetGeometry;H(a,c);d=.5*O(d);h.xmin=a[0]-d*y[0];h.ymin=a[1]-
d*y[1];h.xmax=a[0]+d*y[0];h.ymax=a[1]+d*y[1];h.spatialReference=c.spatialReference;return h}}();t.setExtent=function(a,h,d,y,c){t.centerAt(a,h,d.center);a.scale=I(d,y);c&&c.constraints&&c.constraints.constrain(a);return a};t.getOuterExtent=function(){var a=d.create(),h=d.create();return function(d,y,c){H(a,y.targetGeometry);Q(h,y,c);c=.5*O(y);d.set({xmin:a[0]-c*h[0],ymin:a[1]-c*h[1],xmax:a[0]+c*h[0],ymax:a[1]+c*h[1],spatialReference:y.targetGeometry.spatialReference});return d}}();t.getClippedExtent=
function(){var a=d.create(),h=d.create();return function(d,y,c){var b=O(y),e=y.targetGeometry.spatialReference,k=Y(e,b);H(a,y.targetGeometry);Q(h,y,c);e.isWrappable&&h[0]>k&&(h[0]=k);y=.5*b;d.set({xmin:a[0]-y*h[0],ymin:a[1]-y*h[1],xmax:a[0]+y*h[0],ymax:a[1]+y*h[1],spatialReference:e});return d}}();t.getOuterSize=Q;t.getPaddingScreenTranslation=function(){var a=d.create();return function(h,f,y){return d.sub(h,d.scale(h,f,.5),L(a,f,y))}}();var U=function(){var f=a.create(),h=d.create();return function(l,
y,c,b){var e=O(y);y=g.toRadian(y.rotation)||0;d.set(h,e,e);a.fromScaling(f,h);a.rotate(f,f,y);a.translate(f,f,t.getPaddingScreenTranslation(h,c,b));a.translate(f,f,[0,b.top-b.bottom]);return d.set(l,f[4],f[5])}}();t.getResolution=O;t.getResolutionToScaleFactor=T;t.getMatrix=function(){var f=d.create(),h=d.create(),g=d.create();return function(y,c,b,e,k,n){d.negate(f,c);d.scale(h,b,.5*n);d.set(g,1/e*n,-1/e*n);a.identity(y);a.translate(y,y,h);k&&a.rotate(y,y,k);a.scale(y,y,g);a.translate(y,y,f);return y}}();
t.getTransform=function(){var a=d.create();return function(h,d,y,c){var b=O(d),e=g.toRadian(d.rotation)||0;H(a,d.targetGeometry);return t.getMatrix(h,a,y,b,e,c)}}();t.getTransformNoRotation=function(){var a=d.create();return function(h,d,y,c){var b=O(d);H(a,d.targetGeometry);return t.getMatrix(h,a,y,b,0,c)}}();t.getWorldWidth=R;t.getWorldScreenWidth=Y;t.createAsync=function(a,h){if(a=M(a,h))return m.resolve(a);a=new l("viewpointUtils-createAsync:different-spatialReference","Target spatialReference cannot be projected and is different from out spatialReference");
return m.reject(a)};t.angleBetween=function(){var a=d.create(),h=d.create(),f=d.create();return function(y,c,b){d.subtract(a,y,c);d.normalize(a,a);d.subtract(h,y,b);d.normalize(h,h);d.cross(f,a,h);y=Math.acos(d.dot(a,h)/(d.length(a)*d.length(h)))*S;0>f[2]&&(y=-y);isNaN(y)&&(y=0);return y}}();t.addPadding=function(){var a=d.create();return function(h,d,y,c){var b=h.targetGeometry;K(h,d);U(a,d,y,c);b.x+=a[0];b.y+=a[1];return h}}();t.removePadding=function(){var a=d.create();return function(h,d,y,c){var b=
h.targetGeometry;K(h,d);U(a,d,y,c);b.x-=a[0];b.y-=a[1];return h}}();t.centerAt=function(){var a=d.create();return function(h,d,y){K(h,d);d=h.targetGeometry;var c=F(y),b=F(d);H(a,y);D(a,a,c,b);d.x=a[0];d.y=a[1];return h}}();t.pixelSizeAt=function(a,h,d){return O(h)};t.resize=function(){var a=d.create();return function(h,f,y,c,b){b||(b="center");d.sub(a,y,c);d.scale(a,a,.5);y=a[0];c=a[1];switch(b){case "center":d.set(a,0,0);break;case "left":d.set(a,-y,0);break;case "top":d.set(a,0,c);break;case "right":d.set(a,
y,0);break;case "bottom":d.set(a,0,-c);break;case "top-left":d.set(a,-y,c);break;case "bottom-left":d.set(a,-y,-c);break;case "top-right":d.set(a,y,c);break;case "bottom-right":d.set(a,y,-c)}t.translateBy(h,f,a);return h}}();t.rotateBy=function(a,h,d){K(a,h);a.rotation+=d;return a};t.rotateTo=function(a,h,d){K(a,h);a.rotation=d;return a};t.scaleBy=function(){var a=d.create();return function(h,f,y,c,b){K(h,f);0!==y&&(t.toMap(a,c,f,b),h.scale=f.scale*y,t.toScreen(a,a,h,b),t.translateBy(h,h,d.set(a,
a[0]-c[0],c[1]-a[1])));return h}}();t.scaleTo=function(a,h,d){K(a,h);a.scale=d;return a};t.scaleAndRotateBy=function(){var a=d.create();return function(h,f,y,c,b,e){K(h,f);0!==y&&(t.toMap(a,b,f,e),h.scale=f.scale*y,h.rotation+=c,t.toScreen(a,a,h,e),t.translateBy(h,h,d.set(a,a[0]-b[0],b[1]-a[1])));return h}}();t.padAndScaleAndRotateBy=function(){var a=d.create(),h=d.create();return function(f,y,c,b,e,k,n){t.getPaddingScreenTranslation(h,k,n);d.add(a,e,h);return b?t.scaleAndRotateBy(f,y,c,b,a,k):t.scaleBy(f,
y,c,a,k)}}();t.toMap=function(){var f=a.create();return function(h,a,y,c){return d.transformMat2d(h,a,N(f,y,c,1))}}();t.toScreen=function(){var f=a.create();return function(h,a,y,c){return d.transformMat2d(h,a,t.getTransform(f,y,c,1))}}();t.translateBy=function(){var f=d.create(),h=a.create();return function(l,y,c){K(l,y);var b=O(y),e=l.targetGeometry;a.fromRotation(h,g.toRadian(y.rotation)||0);a.scale(h,h,d.fromValues(b,b));d.transformMat2d(f,c,h);e.x+=f[0];e.y+=f[1];return l}}()})},"esri/views/2d/libs/gl-matrix/common":function(){define([],
function(){if(!A)var A=1E-6;if(!t)var t="undefined"!==typeof Float32Array?Float32Array:Array;if(!g)var g=Math.random;var a={GLMAT_EPSILON:A,GLMAT_ARRAY_TYPE:t,GLMAT_RANDOM:g,setMatrixArrayType:function(d){a.GLMAT_ARRAY_TYPE=d}},d=Math.PI/180,f=180/Math.PI;a.toRadian=function(a){return a*d};a.toDegree=function(a){return a*f};a.setMatrixArrayType(Array);return a})},"esri/views/2d/libs/gl-matrix/mat2d":function(){define(["./common"],function(A){var t=A.GLMAT_ARRAY_TYPE;A={create:function(){var g=new t(6);
g[0]=1;g[1]=0;g[2]=0;g[3]=1;g[4]=0;g[5]=0;return g},clone:function(g){var a=new t(6);a[0]=g[0];a[1]=g[1];a[2]=g[2];a[3]=g[3];a[4]=g[4];a[5]=g[5];return a},copy:function(g,a){g[0]=a[0];g[1]=a[1];g[2]=a[2];g[3]=a[3];g[4]=a[4];g[5]=a[5];return g},identity:function(g){g[0]=1;g[1]=0;g[2]=0;g[3]=1;g[4]=0;g[5]=0;return g},invert:function(g,a){var d=a[0],f=a[1],m=a[2],l=a[3],p=a[4];a=a[5];var r=d*l-f*m;if(!r)return null;r=1/r;g[0]=l*r;g[1]=-f*r;g[2]=-m*r;g[3]=d*r;g[4]=(m*a-l*p)*r;g[5]=(f*p-d*a)*r;return g},
determinant:function(g){return g[0]*g[3]-g[1]*g[2]},multiply:function(g,a,d){var f=a[0],m=a[1],l=a[2],p=a[3],r=a[4];a=a[5];var q=d[0],v=d[1],x=d[2],w=d[3],B=d[4];d=d[5];g[0]=f*q+l*v;g[1]=m*q+p*v;g[2]=f*x+l*w;g[3]=m*x+p*w;g[4]=f*B+l*d+r;g[5]=m*B+p*d+a;return g}};A.mul=A.multiply;A.rotate=function(g,a,d){var f=a[0],m=a[1],l=a[2],p=a[3],r=a[4];a=a[5];var q=Math.sin(d);d=Math.cos(d);g[0]=f*d+l*q;g[1]=m*d+p*q;g[2]=f*-q+l*d;g[3]=m*-q+p*d;g[4]=r;g[5]=a;return g};A.scale=function(g,a,d){var f=a[1],m=a[2],
l=a[3],p=a[4],r=a[5],q=d[0];d=d[1];g[0]=a[0]*q;g[1]=f*q;g[2]=m*d;g[3]=l*d;g[4]=p;g[5]=r;return g};A.translate=function(g,a,d){var f=a[0],m=a[1],l=a[2],p=a[3],r=a[4];a=a[5];var q=d[0];d=d[1];g[0]=f;g[1]=m;g[2]=l;g[3]=p;g[4]=f*q+l*d+r;g[5]=m*q+p*d+a;return g};A.fromRotation=function(g,a){var d=Math.sin(a);a=Math.cos(a);g[0]=a;g[1]=d;g[2]=-d;g[3]=a;g[4]=0;g[5]=0;return g};A.fromScaling=function(g,a){g[0]=a[0];g[1]=0;g[2]=0;g[3]=a[1];g[4]=0;g[5]=0;return g};A.fromTranslation=function(g,a){g[0]=1;g[1]=
0;g[2]=0;g[3]=1;g[4]=a[0];g[5]=a[1];return g};A.str=function(g){return"mat2d("+g[0]+", "+g[1]+", "+g[2]+", "+g[3]+", "+g[4]+", "+g[5]+")"};A.frob=function(g){return Math.sqrt(Math.pow(g[0],2)+Math.pow(g[1],2)+Math.pow(g[2],2)+Math.pow(g[3],2)+Math.pow(g[4],2)+Math.pow(g[5],2)+1)};return A})},"esri/views/2d/libs/gl-matrix/vec2":function(){define(["./common"],function(A){var t=A.GLMAT_ARRAY_TYPE,g=A.GLMAT_RANDOM,a={create:function(){var a=new t(2);a[0]=0;a[1]=0;return a},clone:function(a){var d=new t(2);
d[0]=a[0];d[1]=a[1];return d},fromValues:function(a,f){var d=new t(2);d[0]=a;d[1]=f;return d},copy:function(a,f){a[0]=f[0];a[1]=f[1];return a},set:function(a,f,g){a[0]=f;a[1]=g;return a},add:function(a,f,g){a[0]=f[0]+g[0];a[1]=f[1]+g[1];return a},subtract:function(a,f,g){a[0]=f[0]-g[0];a[1]=f[1]-g[1];return a}};a.sub=a.subtract;a.multiply=function(a,f,g){a[0]=f[0]*g[0];a[1]=f[1]*g[1];return a};a.mul=a.multiply;a.divide=function(a,f,g){a[0]=f[0]/g[0];a[1]=f[1]/g[1];return a};a.div=a.divide;a.min=function(a,
f,g){a[0]=Math.min(f[0],g[0]);a[1]=Math.min(f[1],g[1]);return a};a.max=function(a,f,g){a[0]=Math.max(f[0],g[0]);a[1]=Math.max(f[1],g[1]);return a};a.scale=function(a,f,g){a[0]=f[0]*g;a[1]=f[1]*g;return a};a.scaleAndAdd=function(a,f,g,l){a[0]=f[0]+g[0]*l;a[1]=f[1]+g[1]*l;return a};a.distance=function(a,f){var d=f[0]-a[0];a=f[1]-a[1];return Math.sqrt(d*d+a*a)};a.dist=a.distance;a.squaredDistance=function(a,f){var d=f[0]-a[0];a=f[1]-a[1];return d*d+a*a};a.sqrDist=a.squaredDistance;a.length=function(a){var d=
a[0];a=a[1];return Math.sqrt(d*d+a*a)};a.len=a.length;a.squaredLength=function(a){var d=a[0];a=a[1];return d*d+a*a};a.sqrLen=a.squaredLength;a.negate=function(a,f){a[0]=-f[0];a[1]=-f[1];return a};a.inverse=function(a,f){a[0]=1/f[0];a[1]=1/f[1];return a};a.normalize=function(a,f){var d=f[0],g=f[1],d=d*d+g*g;0<d&&(d=1/Math.sqrt(d),a[0]=f[0]*d,a[1]=f[1]*d);return a};a.dot=function(a,f){return a[0]*f[0]+a[1]*f[1]};a.cross=function(a,f,g){f=f[0]*g[1]-f[1]*g[0];a[0]=a[1]=0;a[2]=f;return a};a.lerp=function(a,
f,g,l){var d=f[0];f=f[1];a[0]=d+l*(g[0]-d);a[1]=f+l*(g[1]-f);return a};a.random=function(a,f){f=f||1;var d=2*g()*Math.PI;a[0]=Math.cos(d)*f;a[1]=Math.sin(d)*f;return a};a.transformMat2=function(a,f,g){var d=f[0];f=f[1];a[0]=g[0]*d+g[2]*f;a[1]=g[1]*d+g[3]*f;return a};a.transformMat2d=function(a,f,g){var d=f[0];f=f[1];a[0]=g[0]*d+g[2]*f+g[4];a[1]=g[1]*d+g[3]*f+g[5];return a};a.transformMat3=function(a,f,g){var d=f[0];f=f[1];a[0]=g[0]*d+g[3]*f+g[6];a[1]=g[1]*d+g[4]*f+g[7];return a};a.transformMat4=function(a,
f,g){var d=f[0];f=f[1];a[0]=g[0]*d+g[4]*f+g[12];a[1]=g[1]*d+g[5]*f+g[13];return a};a.forEach=function(){var d=a.create();return function(a,g,l,p,r,q){g||(g=2);l||(l=0);for(p=p?Math.min(p*g+l,a.length):a.length;l<p;l+=g)d[0]=a[l],d[1]=a[l+1],r(d,d,q),a[l]=d[0],a[l+1]=d[1];return a}}();a.str=function(a){return"vec2("+a[0]+", "+a[1]+")"};return a})},"esri/views/2d/ViewState":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../geometry/Extent ./viewpointUtils ./libs/gl-matrix/vec2 ./libs/gl-matrix/mat2d".split(" "),
function(A,t,g,a,d,f,m,l,p,r){return function(f){function q(){var a=null!==f&&f.apply(this,arguments)||this;a.pixelRatio=1;a.size=[0,0];return a}g(q,f);x=q;Object.defineProperty(q.prototype,"center",{get:function(){var a=this.viewpoint.targetGeometry;return p.set(p.create(),a.x,a.y)},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"extent",{get:function(){return l.getExtent(new m,this.viewpoint,this.size)},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"height",
{get:function(){return this.size?this.size[1]:0},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"id",{get:function(){return this._get("id")+1},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"inverseTransform",{get:function(){return r.invert(r.create(),this.transform)},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"latitude",{get:function(){return this.viewpoint.targetGeometry.latitude},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,
"longitude",{get:function(){return this.viewpoint.targetGeometry.longitude},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"resolution",{get:function(){return l.getResolution(this.viewpoint)},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"rotation",{get:function(){return this.viewpoint.rotation},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"scale",{get:function(){return this.viewpoint.scale},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,
"screenCenter",{get:function(){return p.scale(p.create(),this.size,.5)},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"spatialReference",{get:function(){return this.viewpoint.targetGeometry.spatialReference},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"transform",{get:function(){return l.getTransform(r.create(),this.viewpoint,this.size,this.pixelRatio)},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"transformNoRotation",{get:function(){return l.getTransformNoRotation(r.create(),
this.viewpoint,this.size,this.pixelRatio)},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"clippedExtent",{get:function(){return l.getClippedExtent(new m,this.viewpoint,this.size)},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"width",{get:function(){return this.size?this.size[0]:0},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"worldScreenWidth",{get:function(){return l.getWorldScreenWidth(this.spatialReference,this.resolution)},enumerable:!0,
configurable:!0});Object.defineProperty(q.prototype,"worldWidth",{get:function(){return l.getWorldWidth(this.spatialReference)},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"wrappable",{get:function(){return!!this.spatialReference&&this.spatialReference.isWrappable},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"x",{get:function(){return this.center[0]},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"y",{get:function(){return this.center[1]},
enumerable:!0,configurable:!0});q.prototype.copy=function(a){this.viewpoint&&this.size?(this._set("viewpoint",l.copy(this.viewpoint,a.viewpoint)),this._set("size",p.copy(this.size,a.size))):(this.viewpoint=a.viewpoint.clone(),p.copy(this.size,a.size));this._set("pixelRatio",a.pixelRatio);return this};q.prototype.clone=function(){return new x({viewpoint:this.viewpoint.clone(),size:p.clone(this.size)})};q.prototype.toMap=function(a,d){return p.transformMat2d(a,d,this.inverseTransform)};q.prototype.toScreen=
function(a,d){return p.transformMat2d(a,d,this.transform)};q.prototype.pixelSizeAt=function(a){return l.pixelSizeAt(a,this.viewpoint,this.size)};a([d.property({dependsOn:["viewpoint"]})],q.prototype,"center",null);a([d.property({readOnly:!0,dependsOn:["viewpoint","size"]})],q.prototype,"extent",null);a([d.property({readOnly:!0,dependsOn:["size"]})],q.prototype,"height",null);a([d.property({value:0,readOnly:!0,dependsOn:["transform"]})],q.prototype,"id",null);a([d.property({readOnly:!0,dependsOn:["transform"]})],
q.prototype,"inverseTransform",null);a([d.property({readOnly:!0,dependsOn:["viewpoint"]})],q.prototype,"latitude",null);a([d.property({readOnly:!0,dependsOn:["viewpoint"]})],q.prototype,"longitude",null);a([d.property()],q.prototype,"pixelRatio",void 0);a([d.property({readOnly:!0,dependsOn:["viewpoint"]})],q.prototype,"resolution",null);a([d.property({readOnly:!0,dependsOn:["viewpoint"]})],q.prototype,"rotation",null);a([d.property({readOnly:!0,dependsOn:["viewpoint"]})],q.prototype,"scale",null);
a([d.property({readOnly:!0,dependsOn:["size"]})],q.prototype,"screenCenter",null);a([d.property()],q.prototype,"size",void 0);a([d.property({readOnly:!0,dependsOn:["viewpoint"]})],q.prototype,"spatialReference",null);a([d.property({readOnly:!0,dependsOn:["viewpoint","size","pixelRatio"]})],q.prototype,"transform",null);a([d.property({readOnly:!0,dependsOn:["viewpoint","size","pixelRatio"]})],q.prototype,"transformNoRotation",null);a([d.property()],q.prototype,"viewpoint",void 0);a([d.property({readOnly:!0,
dependsOn:["viewpoint","size"]})],q.prototype,"clippedExtent",null);a([d.property({readOnly:!0,dependsOn:["size"]})],q.prototype,"width",null);a([d.property({readOnly:!0,dependsOn:["worldWidth","resolution"]})],q.prototype,"worldScreenWidth",null);a([d.property({readOnly:!0,dependsOn:["spatialReference"]})],q.prototype,"worldWidth",null);a([d.property({readOnly:!0,dependsOn:["spatialReference"]})],q.prototype,"wrappable",null);a([d.property({readOnly:!0,dependsOn:["center"]})],q.prototype,"x",null);
a([d.property({readOnly:!0,dependsOn:["center"]})],q.prototype,"y",null);return q=x=a([d.subclass("esri.views.2d.ViewState")],q);var x}(d.declared(f))})},"esri/views/2d/MapViewConstraints":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/Evented ../../layers/support/LOD ./constraints/ZoomConstraint ./constraints/RotationConstraint".split(" "),function(A,t,g,a,d,f,m,
l,p,r){return function(f){function m(){var a=null!==f&&f.apply(this,arguments)||this;a.enabled=!0;a.lods=null;a.minScale=0;a.maxScale=0;a.minZoom=-1;a.maxZoom=-1;a.rotationEnabled=!0;a.snapToZoom=!0;return a}g(m,f);m.prototype.initialize=function(){this.watch("_zoom, _rotation",this.emit.bind(this,"update"),!0)};m.prototype.destroy=function(){this.view=null;this._set("_zoom",null);this._set("_rotation",null)};Object.defineProperty(m.prototype,"_rotation",{get:function(){return new r({rotationEnabled:this.rotationEnabled})},
enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"_defaultLODs",{get:function(){var a=this.get("view.defaultsFromMap.tileInfo"),d=this.get("view.spatialReference");return a&&d&&a.spatialReference.equals(d)?a.lods:null},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"_zoom",{get:function(){return new p({lods:this.lods||this._defaultLODs,minZoom:this.minZoom,maxZoom:this.maxZoom,minScale:this.minScale,maxScale:this.maxScale,snapToZoom:this.snapToZoom})},enumerable:!0,
configurable:!0});m.prototype.canZoomInTo=function(a){var d=this.effectiveMaxScale;return 0===d||a>=d};m.prototype.canZoomOutTo=function(a){var d=this.effectiveMinScale;return 0===d||a<=d};m.prototype.constrain=function(a,d){if(!this.enabled)return a;this._zoom.constrain(a,d);this._rotation.constrain(a,d);return a};m.prototype.fit=function(a){if(!this.enabled||!this.snapToZoom)return a;this._zoom.fit(a);return a};m.prototype.zoomToScale=function(a){return this._zoom.zoomToScale(a)};m.prototype.scaleToZoom=
function(a){return this._zoom.scaleToZoom(a)};m.prototype.snapScale=function(a){return this._zoom.snapToClosestScale(a)};m.prototype.snapToNextScale=function(a){return this._zoom.snapToNextScale(a)};m.prototype.snapToPreviousScale=function(a){return this._zoom.snapToPreviousScale(a)};a([d.property({readOnly:!0,aliasOf:"_zoom.effectiveLODs"})],m.prototype,"effectiveLODs",void 0);a([d.property({readOnly:!0,aliasOf:"_zoom.effectiveMinScale"})],m.prototype,"effectiveMinScale",void 0);a([d.property({readOnly:!0,
aliasOf:"_zoom.effectiveMaxScale"})],m.prototype,"effectiveMaxScale",void 0);a([d.property({readOnly:!0,aliasOf:"_zoom.effectiveMinZoom"})],m.prototype,"effectiveMinZoom",void 0);a([d.property({readOnly:!0,aliasOf:"_zoom.effectiveMaxZoom"})],m.prototype,"effectiveMaxZoom",void 0);a([d.property()],m.prototype,"enabled",void 0);a([d.property({type:[l]})],m.prototype,"lods",void 0);a([d.property()],m.prototype,"minScale",void 0);a([d.property()],m.prototype,"maxScale",void 0);a([d.property()],m.prototype,
"minZoom",void 0);a([d.property()],m.prototype,"maxZoom",void 0);a([d.property()],m.prototype,"rotationEnabled",void 0);a([d.property()],m.prototype,"snapToZoom",void 0);a([d.property()],m.prototype,"view",void 0);a([d.property({type:r,dependsOn:["rotationEnabled"]})],m.prototype,"_rotation",null);a([d.property({dependsOn:["view.spatialReference","view.defaultsFromMap.tileInfo"]})],m.prototype,"_defaultLODs",null);a([d.property({readOnly:!0,type:p,dependsOn:"lods minZoom maxZoom minScale maxScale snapToZoom _defaultLODs".split(" ")})],
m.prototype,"_zoom",null);return m=a([d.subclass("esri.views.2d.MapViewConstraints")],m)}(d.declared(f,m))})},"esri/views/2d/constraints/ZoomConstraint":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ../../../core/Accessor ../../../layers/support/LOD".split(" "),function(A,t,g,a,d,f,m){return function(f){function l(){var a=null!==f&&f.apply(this,arguments)||this;a._lodByScale={};a._scales=
[];a.effectiveLODs=null;a.effectiveMinZoom=-1;a.effectiveMaxZoom=-1;a.effectiveMinScale=0;a.effectiveMaxScale=0;a.enabled=!0;a.lods=null;a.minZoom=-1;a.maxZoom=-1;a.minScale=0;a.maxScale=0;a.snapToZoom=!0;return a}g(l,f);r=l;l.prototype.initialize=function(){var a=this,d=this.lods,f=this.minScale,g=this.maxScale,l=this.minZoom,m=this.maxZoom,p=-1,r=-1,t=!1,I=!1;0!==f&&0!==g&&f<g&&(g=[g,f],f=g[0],g=g[1]);if(d&&d.length){d=d.map(function(a){return a.clone()});d.sort(function(a,d){return d.scale-a.scale});
d.forEach(function(a,d){return a.level=d});for(var z,M=0,K=d;M<K.length;M++){var A=K[M];!t&&0<f&&f>=A.scale&&(p=A.level,t=!0);!I&&0<g&&g>=A.scale&&(r=z?z.level:-1,I=!0);z=A}-1===l&&(l=0===f?0:p);-1===m&&(m=0===g?d.length-1:r);l=Math.max(l,0);l=Math.min(l,d.length-1);m=Math.max(m,0);m=Math.min(m,d.length-1);l>m&&(f=[m,l],l=f[0],m=f[1]);f=d[l].scale;g=d[m].scale;d.splice(0,l);d.splice(m-l+1,d.length);d.forEach(function(d,f){a._lodByScale[d.scale]=d;a._scales[f]=d.scale});this._set("effectiveLODs",d);
this._set("effectiveMinZoom",l);this._set("effectiveMaxZoom",m)}this._set("effectiveMinScale",f);this._set("effectiveMaxScale",g)};l.prototype.constrain=function(a,d){if(!this.enabled||d&&a.scale===d.scale)return a;var f=this.effectiveMinScale,g=this.effectiveMaxScale,l=a.targetGeometry,m=d&&d.targetGeometry,p=0!==f&&a.scale>f;if(0!==g&&a.scale<g||p)f=p?f:g,m&&(d=(f-d.scale)/(a.scale-d.scale),l.x=m.x+(l.x-m.x)*d,l.y=m.y+(l.y-m.y)*d),a.scale=f;this.snapToZoom&&this.effectiveLODs&&(a.scale=this._getClosestScale(a.scale));
return a};l.prototype.fit=function(a){if(!this.effectiveLODs)return this.constrain(a,null);var d=a.scale,f=this.scaleToZoom(d);a.scale=.99<Math.abs(f-Math.round(f))?this.snapToPreviousScale(d):this.zoomToScale(Math.round(f));return a};l.prototype.zoomToScale=function(a){if(!this.effectiveLODs)return 0;a-=this.effectiveMinZoom;a=Math.max(0,a);var d=this._scales;if(0>=a)return d[0];if(a>=d.length)return d[d.length-1];var f=Math.round(a);return d[f]+(f-a)*(d[Math.round(a-.5)]-d[f])};l.prototype.scaleToZoom=
function(a){if(!this.effectiveLODs)return-1;var d=this._scales,f=0,g=d.length-1,l,m;for(f;f<g;f++){l=d[f];m=d[f+1];if(l<=a)return f+this.effectiveMinZoom;if(m===a)return f+1+this.effectiveMinZoom;if(l>a&&m<a)return f+1-(a-m)/(l-m)+this.effectiveMinZoom}return f};l.prototype.snapToClosestScale=function(a){if(!this.effectiveLODs)return a;a=this.scaleToZoom(a);return this.zoomToScale(Math.round(a))};l.prototype.snapToNextScale=function(a,d){void 0===d&&(d=.5);if(!this.effectiveLODs)return a*d;a=Math.round(this.scaleToZoom(a));
return this.zoomToScale(a+1)};l.prototype.snapToPreviousScale=function(a,d){void 0===d&&(d=2);if(!this.effectiveLODs)return a*d;a=Math.round(this.scaleToZoom(a));return this.zoomToScale(a-1)};l.prototype.clone=function(){return new r({enabled:this.enabled,lods:this.lods,minZoom:this.minZoom,maxZoom:this.maxZoom,minScale:this.minScale,maxScale:this.maxScale})};l.prototype._getClosestScale=function(a){if(this._lodByScale[a])return this._lodByScale[a].scale;a=this._scales.reduce(function(d,f,g,l){return Math.abs(f-
a)<=Math.abs(d-a)?f:d},this._scales[0]);return this._lodByScale[a].scale};a([d.property({readOnly:!0})],l.prototype,"effectiveLODs",void 0);a([d.property({readOnly:!0})],l.prototype,"effectiveMinZoom",void 0);a([d.property({readOnly:!0})],l.prototype,"effectiveMaxZoom",void 0);a([d.property({readOnly:!0})],l.prototype,"effectiveMinScale",void 0);a([d.property({readOnly:!0})],l.prototype,"effectiveMaxScale",void 0);a([d.property()],l.prototype,"enabled",void 0);a([d.property({type:[m]})],l.prototype,
"lods",void 0);a([d.property()],l.prototype,"minZoom",void 0);a([d.property()],l.prototype,"maxZoom",void 0);a([d.property()],l.prototype,"minScale",void 0);a([d.property()],l.prototype,"maxScale",void 0);a([d.property()],l.prototype,"snapToZoom",void 0);return l=r=a([d.subclass("esri.views.2d.constraints.ZoomConstraint")],l);var r}(d.declared(f))})},"esri/views/2d/constraints/RotationConstraint":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ../../../core/Accessor".split(" "),
function(A,t,g,a,d,f){return function(f){function l(){var a=null!==f&&f.apply(this,arguments)||this;a.enabled=!0;a.rotationEnabled=!0;return a}g(l,f);m=l;l.prototype.constrain=function(a,d){if(!this.enabled)return a;this.rotationEnabled||(a.rotation=0);return a};l.prototype.clone=function(){return new m({enabled:this.enabled,rotationEnabled:this.rotationEnabled})};a([d.property()],l.prototype,"enabled",void 0);a([d.property()],l.prototype,"rotationEnabled",void 0);return l=m=a([d.subclass("esri.views.2d.constraints.RotationConstraint")],
l);var m}(d.declared(f))})},"esri/views/2d/AnimationManager":function(){define("../../core/Accessor ../../core/Scheduler ../../core/now ../ViewAnimation ./unitBezier ./viewpointUtils".split(" "),function(A,t,g,a,d,f){var m=function(a,f,g,m){var l=a.targetGeometry,p=f.targetGeometry;m?"string"===typeof m&&(m=d.parse(m)||d.ease):m=d.ease;this.easing=m;this.duration=g;this.sCenterX=l.x;this.sCenterY=l.y;this.sScale=a.scale;this.sRotation=a.rotation;this.tCenterX=p.x;this.tCenterY=p.y;this.tScale=f.scale;
this.tRotation=f.rotation;this.dCenterX=this.tCenterX-this.sCenterX;this.dCenterY=this.tCenterY-this.sCenterY;this.dScale=this.tScale-this.sScale;this.dRotation=this.tRotation-this.sRotation;180<this.dRotation?this.dRotation-=360:-180>this.dRotation&&(this.dRotation+=360)};m.prototype.applyRatio=function(a,d){var f=this.easing(d),g,l;1<=d?(d=this.tCenterX,g=this.tCenterY,l=this.tRotation,f=this.tScale):(d=this.sCenterX+f*this.dCenterX,g=this.sCenterY+f*this.dCenterY,l=this.sRotation+f*this.dRotation,
f=this.sScale+f*this.dScale);a.targetGeometry.x=d;a.targetGeometry.y=g;a.scale=f;a.rotation=l};return A.createSubclass({constructor:function(){this._updateTask=t.addFrameTask({postRender:this._postRender.bind(this)});this._updateTask.pause()},getDefaults:function(){return{viewpoint:f.create()}},properties:{animation:null,duration:{value:200},transition:{value:null},easing:{value:d.ease},viewpoint:null},animate:function(a,d,r){this.stop();f.copy(this.viewpoint,d);this.transition=new m(this.viewpoint,
a.target,r&&r.duration||this.duration,r&&r.easing||this.easing);a.always(function(){this.animation===a&&this._updateTask&&("finished"===a.state&&(this.transition.applyRatio(this.viewpoint,1),this.animation._dfd.progress(this.viewpoint)),this._updateTask.pause(),this.updateFunction=this.animation=null)}.bind(this));this._startTime=g();this._updateTask.resume();return this.animation=a},animateContinous:function(d,f){this.stop();this.updateFunction=f;this.viewpoint=d;var l=new a({target:d.clone()});
l.always(function(){this.animation===l&&this._updateTask&&(this._updateTask.pause(),this.updateFunction=this.animation=null)}.bind(this));this._startTime=g();this._updateTask.resume();return this.animation=l},stop:function(){this.animation&&(this.animation.stop(),this.updateFunction=this.animation=null)},_postRender:function(d){var f=this.animation;f&&f.state!==a.STOPPED?(this.updateFunction?this.updateFunction(this.viewpoint,d.deltaTime):(d=(g()-this._startTime)/this.transition.duration,f=1<=d,this.transition.applyRatio(this.viewpoint,
d),f&&this.animation.finish()),this.animation._dfd.progress(this.viewpoint)):this._updateTask.pause()}})})},"esri/views/2d/unitBezier":function(){define([],function(){var A=function(g,a,d,f){function m(a,d){var f,g,m,q;d=null==d?1E-6:d;m=a;for(g=0;8>g;g++){q=((r*m+p)*m+l)*m-a;if(Math.abs(q)<d)return m;f=(3*r*m+2*p)*m+l;if(1E-6>Math.abs(f))break;m-=q/f}f=0;g=1;m=a;if(m<f)return f;if(m>g)return g;for(;f<g;){q=((r*m+p)*m+l)*m;if(Math.abs(q-a)<d)break;a>q?f=m:g=m;m=.5*(g-f)+f}return m}var l=3*g,p=3*(d-
g)-l,r=1-l-p,q=3*a,v=3*(f-a)-q,x=1-q-v;return function(a,d){a=m(a,d);return((x*a+v)*a+q)*a}},t=/^cubic-bezier\((.*)\)/;A.parse=function(g){var a=A[g]||null;!a&&(g=t.exec(g))&&(g=g[1].split(",").map(function(a){return parseFloat(a.trim())}),4!==g.length||g.some(function(a){return isNaN(a)})||(a=A.apply(A,g)));return a};A.ease=A(.25,.1,.25,1);A.linear=A(0,0,1,1);A.easeIn=A["ease-in"]=A(.42,0,1,1);A.easeOut=A["ease-out"]=A(0,0,.58,1);A.easeInOut=A["ease-in-out"]=A(.42,0,.58,1);return A})},"esri/views/DOMContainer":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/_base/lang dojo/on dojo/dom dojo/dom-construct ../core/Accessor ../core/Evented ../core/HandleRegistry ../core/Scheduler ../core/watchUtils ../widgets/Popup ./PopupManager ./overlay/ViewOverlay ./ui/DefaultUI ../core/accessorSupport/decorators".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x,w,B,E,D,F){var H=[0,0];return function(p){function r(){var a=p.call(this)||this;a._domHandles=new q;a._freqInfo={freq:16,time:750};a._overlayRenderTaskHandle=null;a.height=0;a.position=null;a.resizing=!1;a.root=null;a.surface=null;a.suspended=!0;a.width=0;a.watch("cursor",function(d){var f=a.surface;f&&f.setAttribute("data-cursor",d)});a.watch("interacting",function(d){var f=a.surface;f&&f.setAttribute("data-interacting",d.toString())});return a}g(r,p);r.prototype.getDefaults=
function(){return d.mixin(this.inherited(arguments),{popup:{},ui:{}})};r.prototype.destroy=function(){this.ui.destroy();this.popup&&this.popup.destroy();this.container=null;this._domHandles.destroy()};Object.defineProperty(r.prototype,"container",{set:function(a){var d=this,f=this._get("container");if(f!==a)if(this._stopMeasuring(),f&&(f.classList.remove("esri-view"),this.popupManager.destroy(),this._set("popupManager",null),this._overlayRenderTaskHandle&&(this._overlayRenderTaskHandle.remove(),this._overlayRenderTaskHandle=
null),this.overlay.destroy(),this._set("overlay",null),l.destroy(this.root),this._set("root",null)),a){a.classList.add("esri-view");f=document.createElement("div");f.className="esri-view-root";a.insertBefore(f,a.firstChild);this._set("root",f);var g=document.createElement("div");g.className="esri-view-surface";m.setSelectable(g,!1);f.appendChild(g);this._set("surface",g);g=new E;f.appendChild(g.surface);this._set("overlay",g);g.watch("needsRender",function(a){a&&!d._overlayRenderTaskHandle?d._overlayRenderTaskHandle=
v.addFrameTask({render:function(){d.overlay.render()}}):d._overlayRenderTaskHandle&&(d._overlayRenderTaskHandle.remove(),d._overlayRenderTaskHandle=null)});this._forceReadyCycle();this._set("container",a);this._startMeasuring();a=new B({enabled:!0,view:this});this._set("popupManager",a)}else this._set("width",0),this._set("height",0),this._set("position",null),this._set("suspended",!0),this._set("surface",null),this._set("container",null)},enumerable:!0,configurable:!0});Object.defineProperty(r.prototype,
"popup",{set:function(a){var d=this._get("popup");a!==d&&(a||(a=new w({container:document.createElement("div")})),this._domHandles.remove("view-popup"),d&&d.destroy(),a&&(a.viewModel.view=this,this._domHandles.add([x.init(this,"root",function(d,f){var g=a.container;g||(a.container=document.createElement("div"));var p=g&&g.parentNode;m.isDescendant(p,f)&&p.removeChild(g);d&&!p&&l.place(a.container,d)})],"view-popup")),this._set("popup",a))},enumerable:!0,configurable:!0});Object.defineProperty(r.prototype,
"size",{get:function(){return[this.width,this.height]},enumerable:!0,configurable:!0});Object.defineProperty(r.prototype,"ui",{set:function(a){var d=this._get("ui");a!==d&&(this._domHandles.remove("ui"),d&&d.destroy(),a&&(a.view=this,this._domHandles.add([x.init(this,"root",function(d){a.container=d?l.create("div",null,d):null})],"ui")),this._set("ui",a))},enumerable:!0,configurable:!0});r.prototype.focus=function(){this.surface&&this.surface.focus()};r.prototype.pageToContainer=function(a,d,f){var g=
this.position;a-=g[0];d-=g[1];f?(f[0]=a,f[1]=d):f=[a,d];return f};r.prototype.containerToPage=function(a,d,f){var g=this.position;a+=g[0];d+=g[1];f?(f[0]=a,f[1]=d):f=[a,d];return f};r.prototype._stopMeasuring=function(){this._domHandles.remove("measuring");this._get("resizing")&&this._set("resizing",!1)};r.prototype._startMeasuring=function(){var a=this,d=this._freqInfo;d.freq=16;d.time=750;this._domHandles.add([f(window,"resize",function(){d.freq=16;d.time=750}),v.addFrameTask({prepare:function(d){var f=
a._measure(),g=a._freqInfo;g.time+=d.deltaTime;f&&(g.freq=16,a._get("resizing")||a._set("resizing",!0));g.time<g.freq||(g.time=0,a._position()||f?g.freq=16:g.freq=Math.min(750,2*g.freq),!f&&512<=g.freq&&a._get("resizing")&&a._set("resizing",!1))}})],"measuring");this._measure();this._position()};r.prototype._measure=function(){var a=this.container,d=a?a.clientWidth:0,f=a?a.clientHeight:0;if(0===d||0===f||"hidden"===window.getComputedStyle(a).visibility)return this.suspended||this._set("suspended",
!0),!1;var a=this.width,g=this.height;if(d===a&&f===g)return this.suspended&&this._set("suspended",!1),!1;this._set("width",d);this._set("height",f);this.suspended&&this._set("suspended",!1);this.emit("resize",{oldWidth:a,oldHeight:g,width:d,height:f});return!0};r.prototype._position=function(){var a=this.container,d=this.position,f=(a.ownerDocument||window.document).defaultView,a=a.getBoundingClientRect();H[0]=a.left+f.pageXOffset;H[1]=a.top+f.pageYOffset;return d&&H[0]===d[0]&&H[1]===d[1]?!1:(this._set("position",
H.slice()),!0)};a([F.property({value:null,cast:function(a){return m.byId(a)}})],r.prototype,"container",null);a([F.property({readOnly:!0})],r.prototype,"height",void 0);a([F.property({type:w})],r.prototype,"popup",null);a([F.property({type:B})],r.prototype,"popupManager",void 0);a([F.property({type:E})],r.prototype,"overlay",void 0);a([F.property({readOnly:!0})],r.prototype,"position",void 0);a([F.property({readOnly:!0})],r.prototype,"resizing",void 0);a([F.property({readOnly:!0})],r.prototype,"root",
void 0);a([F.property({value:null,dependsOn:["width","height"],readOnly:!0})],r.prototype,"size",null);a([F.property({readOnly:!0})],r.prototype,"surface",void 0);a([F.property({readOnly:!0})],r.prototype,"suspended",void 0);a([F.property({type:D})],r.prototype,"ui",null);a([F.property({readOnly:!0})],r.prototype,"width",void 0);return r=a([F.subclass("esri.views.DOMContainer")],r)}(F.declared(p,r))})},"esri/widgets/Popup":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/assignHelper ./support/widget ../core/accessorSupport/decorators ../core/lang ../core/Logger ../core/HandleRegistry ../core/watchUtils ./Widget ../widgets/support/widgetUtils ./Popup/PopupRenderer ./Popup/PopupViewModel dojo/i18n!./Popup/nls/Popup ./Spinner dojo/dom-geometry dojo/keys".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x,w,B,E,D,F,H){function I(a,d){return void 0===d?"esri-popup__"+a:"esri-popup__"+a+"-"+d}var z=A.toUrl("./Popup/images/default-action.svg"),M={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},K=p.getLogger("esri.widgets.Popup");return function(p){function t(a){a=p.call(this)||this;a._blurContainer=!1;a._containerNode=null;a._mainContainerNode=null;a._featureMenuNode=null;a._focusContainer=!1;a._focusDockButton=!1;a._focusFeatureMenuButton=!1;a._focusFirstFeature=
!1;a._handleRegistry=new r;a._displayActionTextLimit=2;a._pointerOffsetInPx=16;a._spinner=null;a._closeFeatureMenuHandle=null;a.actions=null;a.alignment="auto";a.autoCloseEnabled=null;a.content=null;a.collapsed=!1;a.collapseEnabled=!0;a.dockEnabled=!1;a.featureCount=null;a.featureMenuOpen=!1;a.features=null;a.featureNavigationEnabled=!0;a.highlightEnabled=null;a.location=null;a.popupRenderers=[];a.promises=null;a.selectedFeature=null;a.selectedFeatureIndex=null;a.selectedPopupRenderer=null;a.spinnerEnabled=
!0;a.title=null;a.updateLocationEnabled=null;a.view=null;a.viewModel=new B;a.visible=null;return a}g(t,p);t.prototype.postInitialize=function(){var a=this,d=q.pausable(this,"\n viewModel.visible,\n dockEnabled,\n viewModel.selectedFeature\n ",function(){return a._closeFeatureMenu()});this._closeFeatureMenuHandle=d;this.own(q.watch(this,"viewModel.screenLocation",function(){return a._positionContainer()}),q.watch(this,["viewModel.visible","dockEnabled"],function(){return a._toggleScreenLocationEnabled()}),
q.watch(this,"viewModel.screenLocation",function(d,f){!!d!==!!f&&a.reposition()}),q.watch(this,"viewModel.features",function(d){return a._createPopupRenderers(d)}),q.watch(this,"viewModel.view.padding viewModel.view.size viewModel.visible viewModel.waitingForResult viewModel.location alignment".split(" "),function(){return a.reposition()}),d,q.watch(this,"spinnerEnabled",function(d){return a._spinnerEnabledChange(d)}),q.watch(this,["title","content"],function(){return a._hasFeatureUpdated()}),q.watch(this,
"viewModel.view.size",function(d,f){return a._updateDockEnabledForViewSize(d,f)}),q.watch(this,"viewModel.view",function(d,f){return a._viewChange(d,f)}),q.watch(this,"viewModel.view.ready",function(d,f){return a._viewReadyChange(d,f)}),q.watch(this,["viewModel.waitingForResult","viewModel.location"],function(){return a._displaySpinner()}),q.watch(this,["popupRenderers","viewModel.selectedFeatureIndex"],function(){return a._updatePopupRenderer()}),q.watch(this,"selectedPopupRenderer.viewModel.title",
function(d){return a._setTitleFromPopupRenderer(d)}),q.watch(this,["selectedPopupRenderer.viewModel.content","selectedPopupRenderer.viewModel.waitingForContent"],function(){return a._setContentFromPopupRenderer()}),q.watch(this,"featureMenuOpen",function(d){return a._featureMenuOpenChanged(d)}),q.watch(this,"visible",function(d){return a._visibleChanged(d)}),q.on(this,"viewModel","trigger-action",function(d){return a._zoomToAction(d)}))};t.prototype.destroy=function(){this._destroyPopupRenderers();
this._destroySpinner();this._handleRegistry.destroy();this._handleRegistry=null};Object.defineProperty(t.prototype,"currentAlignment",{get:function(){return this._getCurrentAlignment()},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"currentDockPosition",{get:function(){return this._getCurrentDockPosition()},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"dockOptions",{get:function(){return this._get("dockOptions")||M},set:function(a){var f=d({},M),g=this.get("viewModel.view.breakpoints"),
l={};g&&(l.width=g.xsmall,l.height=g.xsmall);a=d({},f,a);f=d({},f.breakpoint,l);l=a.breakpoint;!0===l?a.breakpoint=f:"object"===typeof l&&(a.breakpoint=d({},f,l));this._set("dockOptions",a);this._setCurrentDockPosition();this.reposition()},enumerable:!0,configurable:!0});t.prototype.blur=function(){this.visible||K.warn("Popup cannot be blurred while visible is false");this._blurContainer=!0;this.scheduleRender()};t.prototype.clear=function(){};t.prototype.close=function(){this.visible=!1};t.prototype.focus=
function(){this.visible||K.warn("Popup cannot be focused while visible is false");this._focusContainer=!0;this.scheduleRender()};t.prototype.next=function(){return null};t.prototype.open=function(a){a=d({visible:!0},{featureMenuOpen:!1,updateLocationEnabled:!1,promises:[]},a);a.featureMenuOpen&&this._closeFeatureMenuHandle.pause();this.set(a);this._visibleChanged(!0)};t.prototype.previous=function(){return null};t.prototype.reposition=function(){this.renderNow();this._positionContainer();this._setCurrentAlignment()};
t.prototype.triggerAction=function(a){return null};t.prototype.render=function(){var a=this.collapsed,d=this.collapseEnabled,g=this.dockEnabled,m=this.actions,p=this.featureMenuOpen,q=this.featureNavigationEnabled,r=this.popupRenderers,v=this.visible,h=this.viewModel,w=h.featureCount,y=h.promiseCount,c=h.pendingPromisesCount,b=h.selectedFeatureIndex,e=h.title,h=h.waitingForResult,k=1<w&&q,q=1<w&&p,n=d&&!q&&a,u=m&&m.length,C=k&&this._getPageText(w,b),J=this._renderContent(),G=x.isRtl(),V=this.get("selectedPopupRenderer")?
this.get("selectedPopupRenderer.viewModel.waitingForContent")||this.get("selectedPopupRenderer.viewModel.content"):J,Z=g?E.undock:E.dock,m=this.currentAlignment,a=this.currentDockPosition,c=c?f.tsx("div",{key:I("loading-container"),role:"presentation",class:"esri-popup__loading-container","aria-label":E.loading,title:E.loading},f.tsx("span",{"aria-hidden":"true",class:f.join("esri-popup__icon","esri-icon-loading-indicator","esri-rotating")})):null,aa=(ba={},ba["esri-icon-layer-list"]=!q,ba["esri-icon-close"]=
q,ba),ba=f.tsx("span",{"aria-hidden":"true",class:"esri-popup__icon",classes:aa}),aa=(D={},D["esri-icon-right-triangle-arrow"]=G,D["esri-popup__pagination-previous-icon--rtl"]=G,D["esri-icon-left-triangle-arrow"]=!G,D["esri-popup__pagination-previous-icon"]=!G,D),D=f.tsx("span",{"aria-hidden":"true",class:"esri-popup__icon",classes:aa}),D=f.tsx("div",{role:"button",tabIndex:0,bind:this,onclick:this._previous,onkeydown:this._previous,class:f.join("esri-popup__button","esri-popup__pagination-previous"),
"aria-label":E.previous,title:E.previous},D),G=(t={},t["esri-icon-left-triangle-arrow"]=G,t["esri-popup__pagination-next-icon--rtl"]=G,t["esri-icon-right-triangle-arrow"]=!G,t["esri-popup__pagination-next-icon"]=!G,t),t=f.tsx("span",{"aria-hidden":"true",class:"esri-popup__icon",classes:G}),G=f.tsx("div",{role:"button",tabIndex:0,bind:this,onclick:this._next,onkeydown:this._next,class:f.join("esri-popup__button","esri-popup__pagination-next"),"aria-label":E.next,title:E.next},t),t=this.id+"-feature-menu",
p=f.tsx("div",{role:"button",tabIndex:0,bind:this,onclick:this._toggleFeatureMenu,onkeydown:this._toggleFeatureMenu,afterCreate:this._focusFeatureMenuButtonNode,afterUpdate:this._focusFeatureMenuButtonNode,class:f.join("esri-popup__button","esri-popup__feature-menu-button"),"aria-haspopup":"true","aria-controls":t,"aria-expanded":p,"aria-label":E.menu,title:E.menu},ba),C=f.tsx("div",{class:"esri-popup__pagination-page-text"},C),p=k?f.tsx("div",{class:"esri-popup__navigation-buttons"},D,C,G,p):null,
C=this._wouldDockTo(),C=(z={},z["esri-icon-minimize"]=g,z["esri-popup__icon--dock-icon"]=!g,z["esri-icon-dock-right"]=!g&&("top-right"===C||"bottom-right"===C),z["esri-icon-dock-left"]=!g&&("top-left"===C||"bottom-left"===C),z["esri-icon-maximize"]=!g&&"top-center"===C,z["esri-icon-dock-bottom"]=!g&&"bottom-center"===C,z),z=f.tsx("span",{"aria-hidden":"true",classes:C,class:"esri-popup__icon"}),z=this.get("dockOptions.buttonEnabled")?f.tsx("div",{role:"button","aria-label":Z,title:Z,tabIndex:0,bind:this,
onclick:this._toggleDockEnabled,onkeydown:this._toggleDockEnabled,afterCreate:this._focusDockButtonNode,afterUpdate:this._focusDockButtonNode,class:f.join("esri-popup__button","esri-popup__button--dock")},z):null,d=d&&(V||u||k),Z=(B={},B["esri-popup__header-title--button"]=d,B),C=d?n?E.expand:E.collapse:"",B=this.id+"-popup-title",e=e?f.tsx("h1",{class:"esri-popup__header-title",id:B,role:d?"button":"heading","aria-label":C,title:C,classes:Z,bind:this,tabIndex:d?0:-1,onclick:this._toggleCollapsed,
onkeydown:this._toggleCollapsed,innerHTML:e}):null,d=f.tsx("span",{"aria-hidden":"true",class:f.join("esri-popup__icon","esri-icon-close")}),d=f.tsx("div",{role:"button",tabIndex:0,bind:this,onclick:this._close,onkeydown:this._close,class:"esri-popup__button","aria-label":E.close,title:E.close},d),d=f.tsx("header",{class:"esri-popup__header"},e,f.tsx("div",{class:"esri-popup__header-buttons"},z,d)),z=this.id+"-popup-content",J=V&&!n?f.tsx("article",{key:I("content-container"),id:z,class:"esri-popup__content"},
J):null,V=!n&&("bottom-left"===m||"bottom-center"===m||"bottom-right"===m||"top-left"===a||"top-center"===a||"top-right"===a),n=!n&&("top-left"===m||"top-center"===m||"top-right"===m||"bottom-left"===a||"bottom-center"===a||"bottom-right"===a),Z=q?null:f.tsx("div",{key:I("actions"),class:"esri-popup__actions"},this._renderActions()),c=f.tsx("section",{key:I("navigation"),class:"esri-popup__navigation"},c,p),k=k||u?f.tsx("div",{key:I("feature-buttons"),class:"esri-popup__feature-buttons"},Z,c):null;
(b=this._renderFeatureMenuNode(r,b,q,t))&&this._closeFeatureMenuHandle.resume();r=l.substitute({total:r.length},E.selectedFeatures);b=f.tsx("section",{key:I("menu"),class:"esri-popup__feature-menu"},f.tsx("h2",{class:"esri-popup__feature-menu-header"},r),f.tsx("nav",{class:"esri-popup__feature-menu-viewport",afterCreate:this._featureMenuViewportNodeUpdated,afterUpdate:this._featureMenuViewportNodeUpdated},b));r=g?null:f.tsx("div",{key:I("pointer"),class:"esri-popup__pointer",role:"presentation"},
f.tsx("div",{class:f.join("esri-popup__pointer-direction","esri-popup--shadow")}));q=(F={},F["esri-popup--aligned-top-center"]="top-center"===m,F["esri-popup--aligned-bottom-center"]="bottom-center"===m,F["esri-popup--aligned-top-left"]="top-left"===m,F["esri-popup--aligned-bottom-left"]="bottom-left"===m,F["esri-popup--aligned-top-right"]="top-right"===m,F["esri-popup--aligned-bottom-right"]="bottom-right"===m,F["esri-popup--is-docked"]=g,F["esri-popup--shadow"]=!g,F["esri-popup--feature-updated"]=
v,F["esri-popup--is-docked-top-left"]="top-left"===a,F["esri-popup--is-docked-top-center"]="top-center"===a,F["esri-popup--is-docked-top-right"]="top-right"===a,F["esri-popup--is-docked-bottom-left"]="bottom-left"===a,F["esri-popup--is-docked-bottom-center"]="bottom-center"===a,F["esri-popup--is-docked-bottom-right"]="bottom-right"===a,F["esri-popup--feature-menu-open"]=q,F);F=this.get("selectedFeature.layer.title");m=this.get("selectedFeature.layer.id");g=(H={},H["esri-popup--shadow"]=g,H);H=V?b:
null;b=n?b:null;a=V?k:null;k=n?k:null;v=v&&!h&&(y?w:1)?f.tsx("div",{key:I("container"),class:"esri-popup__position-container",classes:q,"data-layer-title":F,"data-layer-id":m,bind:this,afterCreate:this._positionContainer,afterUpdate:this._positionContainer},f.tsx("div",{class:f.join("esri-popup__main-container","esri-widget"),classes:g,tabIndex:-1,"aria-role":"dialog","aria-labelledby":e?B:"","aria-describedby":J?z:"",bind:this,onkeyup:this._handleMainKeyup,afterCreate:this._mainContainerNodeUpdated,
afterUpdate:this._mainContainerNodeUpdated},a,H,d,J,k,b),r):null;return f.tsx("div",{key:I("base"),class:"esri-popup",role:"presentation"},v);var ba,D,t,z,B,F,H};t.prototype._visibleChanged=function(a){a&&(this._focusContainer=!0,this.scheduleRender())};t.prototype._featureMenuOpenChanged=function(a){a?this._focusFirstFeature=!0:this._focusFeatureMenuButton=!0;this.scheduleRender()};t.prototype._setTitleFromPopupRenderer=function(a){this.viewModel.title=a||""};t.prototype._setContentFromPopupRenderer=
function(){this.viewModel.content=this.selectedPopupRenderer||null;this.scheduleRender()};t.prototype._handleFeatureMenuKeyup=function(a){a.keyCode===H.ESCAPE&&(a.stopPropagation(),this.featureMenuOpen=!1)};t.prototype._handleFeatureMenuItemKeyup=function(a){var d=a.keyCode,f=this._featureMenuNode,g=this.get("features.length"),l=a.currentTarget["data-feature-index"];f&&(f=f.querySelectorAll("li"),d===H.UP_ARROW?(a.stopPropagation(),f[(l-1+g)%g].focus()):d===H.DOWN_ARROW?(a.stopPropagation(),f[(l+
1+g)%g].focus()):d===H.HOME?(a.stopPropagation(),f[0].focus()):d===H.END&&(a.stopPropagation(),f[f.length-1].focus()))};t.prototype._handleMainKeyup=function(a){var d=a.keyCode;d===H.LEFT_ARROW&&(a.stopPropagation(),this.previous());d===H.RIGHT_ARROW&&(a.stopPropagation(),this.next())};t.prototype._zoomToAction=function(a){a.action&&"zoom-to"===a.action.id&&this.viewModel.zoomToLocation()};t.prototype._spinnerEnabledChange=function(a){this._destroySpinner();a&&(a=this.get("viewModel.view"),this._createSpinner(a))};
t.prototype._displaySpinner=function(){var a=this._spinner;if(a){var d=this.viewModel,f=d.location;d.waitingForResult?a.show({location:f}):a.hide()}};t.prototype._getIconStyles=function(a){return{"background-image":a?"url("+a+")":""}};t.prototype._renderAction=function(a,d,g,m){var p=this,r=q.watch(a,["id","className","title","image","visible"],function(){return p.scheduleRender()});this._handleRegistry.add(r,m);r=this.get("selectedFeature.attributes");"zoom-to"===a.id&&(a.title=E.zoom,this._handleRegistry.add(q.init(this,
"view.animation.state",function(h){a.className="waiting-for-target"===h?f.join("esri-popup__icon","esri-icon-loading-indicator","esri-rotating"):f.join("esri-popup__icon","esri-icon-zoom-in-magnifying-glass")}),m));m=a.title;var v=a.className,x=a.image||v?a.image:z;m=m&&r?l.substitute(r,m):m;v=v&&r?l.substitute(r,v):v;r=x&&r?l.substitute(r,x):x;x=v||"esri-popup__icon";v=(h={},h["esri-popup__action-image"]=!!r,h);h=(w={},w["esri-disabled"]=-1!==x.indexOf("esri-icon-loading-indicator"),w);g=g<=this._displayActionTextLimit?
f.tsx("span",{key:I("action-text-"+d+"-"+a.uid),class:"esri-popup__action-text"},m):null;return a.visible?f.tsx("div",{key:I("action-"+d+"-"+a.uid),role:"button",tabIndex:0,title:m,"aria-label":m,classes:h,class:f.join("esri-popup__button","esri-popup__action"),bind:this,"data-action-index":d,onclick:this._triggerAction,onkeydown:this._triggerAction},f.tsx("span",{key:I("action-icon-"+d+"-"+a.uid+"-"+x),"aria-hidden":"true",class:x,classes:v,styles:this._getIconStyles(r)}),g):null;var h,w};t.prototype._renderActions=
function(){var a=this;this._handleRegistry.remove("actions");var d=this.actions;if(d){var f=d.length;return d.toArray().map(function(d,g){return a._renderAction(d,g,f,"actions")})}};t.prototype._updatePopupRenderer=function(){var a=this.popupRenderers[this.viewModel.selectedFeatureIndex]||null;a&&!a.contentEnabled&&(a.contentEnabled=!0);this._set("selectedPopupRenderer",a)};t.prototype._destroyPopupRenderers=function(){this.popupRenderers.forEach(function(a){return a.destroy()});this._set("popupRenderers",
[])};t.prototype._createPopupRenderers=function(a){var d=this;this._destroyPopupRenderers();var f=[];a&&a.forEach(function(a){a=new w({contentEnabled:!1,graphic:a,view:d.get("viewModel.view")});f.push(a)});this._set("popupRenderers",f)};t.prototype._isScreenLocationWithinView=function(a,d){return-1<a.x&&-1<a.y&&a.x<=d.width&&a.y<=d.height};t.prototype._isOutsideView=function(a){var d=a.popupHeight,f=a.popupWidth,g=a.screenLocation,l=a.side;a=a.view;if(isNaN(f)||isNaN(d)||!a||!g)return!1;var m=a.padding;
return"right"===l&&g.x+f/2>a.width-m.right||"left"===l&&g.x-f/2<m.left||"top"===l&&g.y-d<m.top||"bottom"===l&&g.y+d>a.height-m.bottom?!0:!1};t.prototype._determineCurrentAlignment=function(){var a=this._pointerOffsetInPx,d=this._containerNode,f=this._mainContainerNode,g=this.viewModel,l=g.screenLocation,g=g.view;if(!l||!g||!d)return"top-center";if(!this._isScreenLocationWithinView(l,g))return this._get("currentAlignment")||"top-center";var m=f?window.getComputedStyle(f,null):null,f=m?parseInt(m.getPropertyValue("max-height").replace(/[^-\d\.]/g,
""),10):0,m=m?parseInt(m.getPropertyValue("height").replace(/[^-\d\.]/g,""),10):0,p=F.getContentBox(d),d=p.w+a,p=Math.max(p.h,f,m)+a,a=this._isOutsideView({popupHeight:p,popupWidth:d,screenLocation:l,side:"right",view:g}),f=this._isOutsideView({popupHeight:p,popupWidth:d,screenLocation:l,side:"left",view:g}),m=this._isOutsideView({popupHeight:p,popupWidth:d,screenLocation:l,side:"top",view:g}),l=this._isOutsideView({popupHeight:p,popupWidth:d,screenLocation:l,side:"bottom",view:g});return f?m?"bottom-right":
"top-right":a?m?"bottom-left":"top-left":m?l?"top-center":"bottom-center":"top-center"};t.prototype._getCurrentAlignment=function(){var a=this.alignment;return this.dockEnabled?null:"auto"===a?this._determineCurrentAlignment():"function"===typeof a?a.call(this):a};t.prototype._setCurrentAlignment=function(){this._set("currentAlignment",this._getCurrentAlignment())};t.prototype._setCurrentDockPosition=function(){this._set("currentDockPosition",this._getCurrentDockPosition())};t.prototype._getDockPosition=
function(){var a=this.get("dockOptions.position");return"auto"===a?this._determineCurrentDockPosition():"function"===typeof a?a.call(this):a};t.prototype._getCurrentDockPosition=function(){return this.dockEnabled?this._getDockPosition():null};t.prototype._wouldDockTo=function(){return this.dockEnabled?null:this._getDockPosition()};t.prototype._renderFeatureMenuItemNode=function(a,d,g,l){var m=d===g;l=(p={},p["esri-popup__feature-menu-item--selected"]=m,p);a=a.title||E.untitled;m=m?f.tsx("span",{key:I("feature-menu-selected-feature-"+
g),title:E.selectedFeature,"aria-label":E.selectedFeature,class:"esri-icon-check-mark"}):null;return f.tsx("li",{role:"menuitem",tabIndex:-1,key:I("feature-menu-feature-"+g),classes:l,class:"esri-popup__feature-menu-item",title:a,"aria-label":a,bind:this,"data-feature-index":d,onkeyup:this._handleFeatureMenuItemKeyup,onclick:this._selectFeature,onkeydown:this._selectFeature},f.tsx("span",{class:"esri-popup__feature-menu-title"},a,m));var p};t.prototype._renderFeatureMenuNode=function(a,d,g,l){var m=
this;return 1<a.length?f.tsx("ol",{class:"esri-popup__feature-menu-list",id:l,bind:this,afterCreate:this._featureMenuNodeUpdated,afterUpdate:this._featureMenuNodeUpdated,onkeyup:this._handleFeatureMenuKeyup,role:"menu"},a.map(function(a,f){return m._renderFeatureMenuItemNode(a,f,d,g)})):null};t.prototype._determineCurrentDockPosition=function(){var a=this.get("viewModel.view"),d=x.isRtl()?"top-left":"top-right";if(!a)return d;var f=a.padding||{left:0,right:0,top:0,bottom:0},f=a.width-f.left-f.right;
return(a=a.get("breakpoints"))&&f<=a.xsmall?"bottom-center":d};t.prototype._renderContent=function(){var a=this.get("viewModel.content");if("string"===typeof a)return f.tsx("div",{key:I("content-string"),innerHTML:a});if(a&&a.isInstanceOf&&a.isInstanceOf(v))return f.tsx("div",{key:I("content-widget")},a.render());if(a instanceof HTMLElement)return f.tsx("div",{key:I("content-html-element"),bind:a,afterUpdate:this._attachToNode,afterCreate:this._attachToNode});if(a&&"function"===typeof a.postMixInProperties&&
"function"===typeof a.buildRendering&&"function"===typeof a.postCreate&&"function"===typeof a.startup)return f.tsx("div",{key:I("content-dijit"),bind:a.domNode,afterUpdate:this._attachToNode,afterCreate:this._attachToNode})};t.prototype._attachToNode=function(a){a.appendChild(this)};t.prototype._positionContainer=function(a){void 0===a&&(a=this._containerNode);a&&(this._containerNode=a);if(a){var d=this.viewModel.screenLocation,f=F.getContentBox(a);if(d=this._calculatePositionStyle(d,f))a.style.top=
d.top,a.style.left=d.left,a.style.bottom=d.bottom,a.style.right=d.right}};t.prototype._calculateFullWidth=function(a){var d=this.currentAlignment,f=this._pointerOffsetInPx;return"top-left"===d||"bottom-left"===d||"top-right"===d||"bottom-right"===d?a+f:a};t.prototype._calculateAlignmentPosition=function(a,d,f,g){var l=this.currentAlignment,m=this._pointerOffsetInPx;g/=2;var p=f.height-d;f=f.width-a;if("bottom-center"===l)return{top:d+m,left:a-g};if("top-left"===l)return{bottom:p+m,right:f+m};if("bottom-left"===
l)return{top:d+m,right:f+m};if("top-right"===l)return{bottom:p+m,left:a+m};if("bottom-right"===l)return{top:d+m,left:a+m};if("top-center"===l)return{bottom:p+m,left:a-g}};t.prototype._calculatePositionStyle=function(a,d){var f=this.view;if(f){var g=f.padding;if(this.dockEnabled)return{left:g.left?g.left+"px":"",top:g.top?g.top+"px":"",right:g.right?g.right+"px":"",bottom:g.bottom?g.bottom+"px":""};if(a&&d&&(d=this._calculateFullWidth(d.w),a=this._calculateAlignmentPosition(a.x,a.y,f,d)))return{top:void 0!==
a.top?a.top+"px":"auto",left:void 0!==a.left?a.left+"px":"auto",bottom:void 0!==a.bottom?a.bottom+"px":"auto",right:void 0!==a.right?a.right+"px":"auto"}}};t.prototype._viewChange=function(a,d){a&&d&&(this.close(),this.clear())};t.prototype._viewReadyChange=function(a,d){a?(a=this.get("viewModel.view"),this._wireUpView(a)):d&&(this.close(),this.clear())};t.prototype._wireUpView=function(a){this._destroySpinner();a&&(this.spinnerEnabled&&this._createSpinner(a),this._setDockEnabledForViewSize(this.dockOptions))};
t.prototype._dockingThresholdCrossed=function(a,d,f){var g=a[0];a=a[1];var l=d[0];d=d[1];var m=f.width;f=f.height;return g<=m&&l>m||g>m&&l<=m||a<=f&&d>f||a>f&&d<=f};t.prototype._updateDockEnabledForViewSize=function(a,d){if(a&&d){var f=this.get("viewModel.view.padding")||{left:0,right:0,top:0,bottom:0},g=f.left+f.right,l=f.top+f.bottom,f=[],m=[];f[0]=a[0]-g;f[1]=a[1]-l;m[0]=d[0]-g;m[1]=d[1]-l;a=this.dockOptions;this._dockingThresholdCrossed(f,m,a.breakpoint)&&this._setDockEnabledForViewSize(a);this._setCurrentDockPosition()}};
t.prototype._hasFeatureUpdated=function(){var a=this._containerNode,d=this.viewModel.pendingPromisesCount,f=this.get("selectedPopupRenderer.viewModel.waitingForContent");!a||d||f||(a.classList.remove("esri-popup--feature-updated"),a.offsetHeight,a.classList.add("esri-popup--feature-updated"))};t.prototype._focusDockButtonNode=function(a){this._focusDockButton&&(this._focusDockButton=!1,a.focus())};t.prototype._mainContainerNodeUpdated=function(a){this._mainContainerNode=a;this._focusContainer?(this._focusContainer=
!1,a.focus()):this._blurContainer&&(this._blurContainer=!1,a.blur())};t.prototype._featureMenuNodeUpdated=function(a){(this._featureMenuNode=a)&&this._focusFirstFeature&&(this._focusFirstFeature=!1,a=a.querySelectorAll("li"),a.length&&a[0].focus())};t.prototype._focusFeatureMenuButtonNode=function(a){this._focusFeatureMenuButton&&(this._focusFeatureMenuButton=!1,a.focus())};t.prototype._featureMenuViewportNodeUpdated=function(a){a&&(a.scrollTop=0)};t.prototype._toggleScreenLocationEnabled=function(){var a=
this.dockEnabled,d=this.viewModel;d&&(d.screenLocationEnabled=this.visible&&!a)};t.prototype._shouldDockAtCurrentViewSize=function(a){a=a.breakpoint;var d=this.get("viewModel.view.ui"),f=d.width,d=d.height;if(isNaN(f)||isNaN(d))return!1;f=a.hasOwnProperty("width")&&f<=a.width;a=a.hasOwnProperty("height")&&d<=a.height;return f||a};t.prototype._setDockEnabledForViewSize=function(a){a.breakpoint&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(a))};t.prototype._getPageText=function(a,d){return l.substitute({index:d+
1,total:a},E.pageText)};t.prototype._destroySpinner=function(){this._spinner&&(this._spinner.destroy(),this._spinner=null)};t.prototype._createSpinner=function(a){a&&(this._spinner=new D({container:document.createElement("div"),view:a}),a.root.appendChild(this._spinner.container))};t.prototype._closeFeatureMenu=function(){this.featureMenuOpen=!1};t.prototype._toggleCollapsed=function(){this.collapsed=!this.collapsed};t.prototype._close=function(){this.close();this.view&&this.view.focus()};t.prototype._toggleDockEnabled=
function(){this.dockEnabled=!this.dockEnabled;this._focusDockButton=!0;this.scheduleRender()};t.prototype._toggleFeatureMenu=function(){this.featureMenuOpen=!this.featureMenuOpen};t.prototype._triggerAction=function(a){this.viewModel.triggerAction(a.currentTarget["data-action-index"])};t.prototype._selectFeature=function(a){a=a.currentTarget["data-feature-index"];isNaN(a)||(this.viewModel.selectedFeatureIndex=a);this._closeFeatureMenu()};t.prototype._next=function(){this.next()};t.prototype._previous=
function(){this.previous()};a([m.aliasOf("viewModel.actions"),f.renderable()],t.prototype,"actions",void 0);a([m.property()],t.prototype,"alignment",void 0);a([m.aliasOf("viewModel.autoCloseEnabled")],t.prototype,"autoCloseEnabled",void 0);a([m.aliasOf("viewModel.content"),f.renderable()],t.prototype,"content",void 0);a([m.property(),f.renderable()],t.prototype,"collapsed",void 0);a([m.property(),f.renderable()],t.prototype,"collapseEnabled",void 0);a([m.property({readOnly:!0,dependsOn:["dockEnabled",
"alignment"]}),f.renderable()],t.prototype,"currentAlignment",null);a([m.property({readOnly:!0,dependsOn:["dockEnabled","dockOptions"]}),f.renderable()],t.prototype,"currentDockPosition",null);a([m.property(),f.renderable()],t.prototype,"dockOptions",null);a([m.property(),f.renderable()],t.prototype,"dockEnabled",void 0);a([m.aliasOf("viewModel.featureCount"),f.renderable()],t.prototype,"featureCount",void 0);a([m.property(),f.renderable()],t.prototype,"featureMenuOpen",void 0);a([m.aliasOf("viewModel.features"),
f.renderable()],t.prototype,"features",void 0);a([m.property(),f.renderable()],t.prototype,"featureNavigationEnabled",void 0);a([m.aliasOf("viewModel.highlightEnabled")],t.prototype,"highlightEnabled",void 0);a([m.aliasOf("viewModel.location"),f.renderable()],t.prototype,"location",void 0);a([m.property({readOnly:!0}),f.renderable()],t.prototype,"popupRenderers",void 0);a([m.aliasOf("viewModel.promises")],t.prototype,"promises",void 0);a([m.aliasOf("viewModel.selectedFeature"),f.renderable()],t.prototype,
"selectedFeature",void 0);a([m.aliasOf("viewModel.selectedFeatureIndex"),f.renderable()],t.prototype,"selectedFeatureIndex",void 0);a([m.property({readOnly:!0}),f.renderable()],t.prototype,"selectedPopupRenderer",void 0);a([m.property()],t.prototype,"spinnerEnabled",void 0);a([m.aliasOf("viewModel.title"),f.renderable()],t.prototype,"title",void 0);a([m.aliasOf("viewModel.updateLocationEnabled")],t.prototype,"updateLocationEnabled",void 0);a([m.aliasOf("viewModel.view")],t.prototype,"view",void 0);
a([m.property({type:B}),f.renderable("viewModel.screenLocation viewModel.screenLocationEnabled viewModel.state viewModel.pendingPromisesCount viewModel.promiseCount viewModel.waitingForResult".split(" ")),f.vmEvent(["triggerAction","trigger-action"])],t.prototype,"viewModel",void 0);a([m.aliasOf("viewModel.visible"),f.renderable()],t.prototype,"visible",void 0);a([m.aliasOf("viewModel.clear")],t.prototype,"clear",null);a([m.aliasOf("viewModel.next")],t.prototype,"next",null);a([m.aliasOf("viewModel.previous")],
t.prototype,"previous",null);a([m.aliasOf("viewModel.triggerAction")],t.prototype,"triggerAction",null);a([f.accessibleHandler()],t.prototype,"_toggleCollapsed",null);a([f.accessibleHandler()],t.prototype,"_close",null);a([f.accessibleHandler()],t.prototype,"_toggleDockEnabled",null);a([f.accessibleHandler()],t.prototype,"_toggleFeatureMenu",null);a([f.accessibleHandler()],t.prototype,"_triggerAction",null);a([f.accessibleHandler()],t.prototype,"_selectFeature",null);a([f.accessibleHandler()],t.prototype,
"_next",null);a([f.accessibleHandler()],t.prototype,"_previous",null);return t=a([m.subclass("esri.widgets.Popup")],t)}(m.declared(v))})},"esri/widgets/Widget":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/Accessor ../core/Evented ../core/HandleRegistry ../core/Logger ../core/watchUtils dojo/_base/lang dojo/dom ./libs/maquette/maquette ../core/Collection".split(" "),function(A,t,g,a,d,f,m,l,p,r,
q,v,x,w){var B=p.getLogger("esri.widgets.Widget"),E=0;return function(f){function m(a,d){a=f.call(this)||this;a._attached=!1;a.className="";a.destroyed=!1;a.domNode=null;a.visible=!0;a._handles=new l;a.render=a.render.bind(a);return a}g(m,f);m.prototype.normalizeCtorArgs=function(a,d){a=q.mixin({},a);d&&(a.container=d);return a};m.prototype.initialize=function(){var a=this;this._handles.add(this._renderableProps.map(function(d){return r.init(a,d,function(a,f){var g=this;w.isCollection(f)&&this._handles.remove(this.declaredClass+
":"+d+"-collection-change-event-listener");w.isCollection(a)&&(a=a.on("change",function(){return g.scheduleRender()}),this._handles.add(a,this.declaredClass+":"+d+"-collection-change-event-listener"));this.scheduleRender()})}));this._delegatedEventNames.length&&this._handles.add(r.init(this,"viewModel",function(){a._get("viewModel")&&a._handles.remove("delegated-events");a._delegatedEventNames.map(function(d){return a.viewModel.on(d,function(f){a.emit(d,f)})})}),"delegated-events");this.postInitialize();
this._handles.add(r.whenOnce(this,"container",function(d){return a._attach(d)}))};m.prototype.postInitialize=function(){};m.prototype.destroy=function(){this.destroyed||(this.viewModel&&this.viewModel.destroy(),this._detach(this.container),this._handles.destroy(),this._set("destroyed",!0))};m.prototype.startup=function(){B.warn("Widget.startup() is deprecated and no longer needed")};Object.defineProperty(m.prototype,"container",{set:function(a){this._get("container")||this._set("container",a)},enumerable:!0,
configurable:!0});m.prototype.castContainer=function(a){return v.byId(a)};Object.defineProperty(m.prototype,"id",{get:function(){return this._get("id")||this.get("container.id")||Date.now().toString(16)+"-widget-"+E++},set:function(a){a&&this._set("id",a)},enumerable:!0,configurable:!0});m.prototype.scheduleRender=function(){this._projector.scheduleRender()};m.prototype.on=function(a,d){var f=this.inherited(arguments);this._handles.add(f);return f};m.prototype.own=function(a){1<arguments.length&&
(a=Array.prototype.slice.call(arguments));this._handles.add(a)};m.prototype.renderNow=function(){this._projector.renderNow()};m.prototype._attach=function(a){a&&(this._projector.merge(a,this.render),this._attached=!0)};m.prototype._detach=function(a){a&&this._attached&&(this._projector.detach(this.render),a.parentNode&&a.parentNode.removeChild(a),this._attached=!1)};a([d.shared(x.createProjector())],m.prototype,"_projector",void 0);a([d.shared([])],m.prototype,"_renderableProps",void 0);a([d.shared([])],
m.prototype,"_delegatedEventNames",void 0);a([d.property({value:null})],m.prototype,"container",null);a([d.cast("container")],m.prototype,"castContainer",null);a([d.property({readOnly:!0})],m.prototype,"destroyed",void 0);a([d.property({aliasOf:"container"})],m.prototype,"domNode",void 0);a([d.property({dependsOn:["container"]})],m.prototype,"id",null);a([d.property()],m.prototype,"viewModel",void 0);a([d.property()],m.prototype,"visible",void 0);return m=a([d.subclass("esri.widgets.Widget")],m)}(d.declared(f,
m))})},"esri/widgets/Popup/PopupRenderer":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../support/widget ../Widget ./PopupRendererViewModel ../../core/requireUtils ../support/uriUtils dojo/i18n!./nls/PopupRenderer ../../core/watchUtils dojo/keys".split(" "),function(A,t,g,a,d,f,m,l,p,r,q,v,x){function w(a,d){return void 0===d?"esri-popup-renderer__"+a:"esri-popup-renderer__"+a+"-"+d}return function(t){function B(a){a=
t.call(this)||this;a._chartMap=new Map;a._activeMediaMap=new Map;a._chartRequirePromise=null;a._refreshTimers=new Map;a._mediaInfo=new Map;a.contentEnabled=null;a.graphic=null;a.title=null;a.view=null;a.viewModel=new l;return a}g(B,t);B.prototype.postInitialize=function(){var a=this;this.own(v.init(this,"viewModel.content",function(){return a._setupMediaRefreshTimers()}))};B.prototype.destroy=function(){this._clearMediaRefreshTimers();this._activeMediaMap.clear();this._activeMediaMap=null;this._cancelChartModules();
this._destroyCharts()};B.prototype.render=function(){var a=f.tsx("div",{key:w("loading-container"),class:"esri-popup-renderer__loading-container"},f.tsx("span",{class:f.join("esri-icon-loading-indicator esri-rotating","esri-popup-renderer__loading-spinner")})),a=this.viewModel.waitingForContent?a:this._renderContent();return f.tsx("div",{class:"esri-popup-renderer"},f.tsx("div",{class:"esri-popup-renderer__size-container"},f.tsx("div",{class:"esri-popup-renderer__main-container"},a)))};B.prototype.goToMedia=
function(a,d){this._setContentElementMedia(a,d)};B.prototype.nextMedia=function(a){this._pageContentElementMedia(a,"next")};B.prototype.previousMedia=function(a){this._pageContentElementMedia(a,"previous")};B.prototype._cancelChartModules=function(){this._chartRequirePromise&&this._chartRequirePromise.cancel()};B.prototype._destroyChart=function(a){var d=this._chartMap.get(a);d&&(d.chart.destroy(),d.tooltip.destroy());this._chartMap.delete(a)};B.prototype._destroyCharts=function(){this._chartMap.forEach(function(a){a.chart.destroy();
a.tooltip.destroy()});this._chartMap.clear()};B.prototype._renderContent=function(){this._destroyCharts();var a=this.viewModel.content;if("string"===typeof a)return f.tsx("div",{key:w("content-string"),innerHTML:a});if(a&&a.isInstanceOf&&a.isInstanceOf(m))return f.tsx("div",{key:w("content-widget")},a.render());if(a instanceof HTMLElement)return f.tsx("div",{key:w("content-html-element"),bind:a,afterUpdate:this._attachToNode,afterCreate:this._attachToNode});if(a&&"function"===typeof a.postMixInProperties&&
"function"===typeof a.buildRendering&&"function"===typeof a.postCreate&&"function"===typeof a.startup)return f.tsx("div",{key:w("content-dijit"),bind:a.domNode,afterUpdate:this._attachToNode,afterCreate:this._attachToNode});if(Array.isArray(a))return a.length?f.tsx("div",{key:w("content-content-elements")},a.map(this._renderContentElement,this)):null};B.prototype._renderContentElement=function(a,d){var f=this.viewModel.contentTypes;switch(a.type){case f.attachments:return this._renderAttachments(a,
d);case f.fields:return this._renderFields(a,d);case f.media:return this._renderMedia(a,d);case f.text:return this._renderText(a,d);default:return null}};B.prototype._renderAttachmentInfo=function(a,d){return f.tsx("li",{class:"esri-popup-renderer__attachments-item",key:w("attachment",d)},f.tsx("a",{class:"esri-popup-renderer__attachments-item-link",href:a.url,target:"_blank"},f.tsx("span",{class:f.join("esri-icon-download","esri-popup-renderer__attachments-item-icon")}),f.tsx("span",{class:"esri-popup-renderer__attachments-item-title"},
a.name||q.noTitle)))};B.prototype._renderAttachments=function(a,d){return(a=a.attachmentInfos)&&a.length?f.tsx("div",{key:w("attachments-element"),class:f.join("esri-popup-renderer__attachments","esri-popup-renderer__content-element")},f.tsx("div",{class:"esri-popup-renderer__attachments-title"},q.attach),f.tsx("ul",{class:"esri-popup-renderer__attachments-items"},a.map(this._renderAttachmentInfo))):null};B.prototype._renderFieldInfo=function(a,d){var g=this.viewModel,l=g.formattedAttributes.content[d]||
g.formattedAttributes.global,m=a.fieldName,g=a.label||m;a=!(!a.format||!a.format.dateFormat);l=r.autoLink(null==l[m]?"":l[m]);a=(p={},p["esri-popup-renderer__field-data--date"]=a,p);return f.tsx("tr",{key:w("fields-element-info-row",d)},f.tsx("th",{key:w("fields-element-info-row-header",d),class:"esri-popup-renderer__field-header",innerHTML:g}),f.tsx("td",{key:w("fields-element-info-row-data",d),class:"esri-popup-renderer__field-data",classes:a,innerHTML:l}));var p};B.prototype._renderFields=function(a,
d){var g=this;return(a=a.fieldInfos)?f.tsx("div",{key:w("fields-element",d),class:f.join("esri-popup-renderer__fields","esri-popup-renderer__content-element")},f.tsx("table",{summary:q.fieldsSummary,key:w("fields-element-table",d)},f.tsx("tbody",{key:w("fields-element-table-body",d)},a.map(function(a){return g._renderFieldInfo(a,d)})))):null};B.prototype._shouldOpenInNewTab=function(a){void 0===a&&(a="");return!/^(?:mailto:|tel:)/.test(a.trim().toLowerCase())};B.prototype._clearMediaRefreshTimers=
function(){this._refreshTimers.forEach(function(a){return clearTimeout(a)});this._refreshTimers.clear()};B.prototype._clearMediaRefreshTimer=function(a){var d=this._refreshTimers.get(a);d&&(clearTimeout(d),this._refreshTimers.delete(a))};B.prototype._getImageSource=function(a,d){var f=-1!==a.indexOf("?")?"\x26":"?";a=a.split("#");var g=a[1],g=void 0===g?"":g;return""+a[0]+f+"timestamp\x3d"+d+(g?"#":"")+g};B.prototype._setupMediaRefreshTimer=function(a){var d=this.get("viewModel.content");if(Array.isArray(d)&&
(d=d[a])&&"media"===d.type){var f=this._activeMediaMap.get(a);isNaN(f)&&(f=0);(d=d.mediaInfos[f])&&"image"===d.type&&d.refreshInterval&&this._setRefreshTimeout(a,d)}};B.prototype._setupMediaRefreshTimers=function(){var a=this;this._clearMediaRefreshTimers();var d=this.get("viewModel.content");Array.isArray(d)&&d.forEach(function(d,f){return a._setupMediaRefreshTimer(f)})};B.prototype._updateMediaInfoTimestamp=function(a,d){var f=Date.now();this._mediaInfo.set(d,{timestamp:f,sourceURL:this._getImageSource(a,
f)});this.scheduleRender()};B.prototype._setRefreshTimeout=function(a,d){var f=this,g=d.refreshInterval,l=d.value;g&&(d=6E4*g,this._updateMediaInfoTimestamp(l.sourceURL,a),d=setInterval(function(){f._updateMediaInfoTimestamp(l.sourceURL,a)},d),this._refreshTimers.set(a,d))};B.prototype._renderMediaInfoType=function(a,d){var g=a.value,l=a.title,l=void 0===l?"":l,m=a.type,p=a.refreshInterval,q=g.sourceURL,g=g.linkURL;if("image"===m)return a=this._shouldOpenInNewTab(g)?"_self":"_blank",q=(p=p?this._mediaInfo.get(d):
null)?p.sourceURL:q,d=f.tsx("img",{alt:l,key:w("media-image-"+(p?p.timestamp:0),d),src:q}),(l=g?f.tsx("a",{title:l,href:g,target:a},d):null)?l:d;if(-1!==m.indexOf("chart"))return f.tsx("div",{key:w("chart",d),bind:this,"data-media-info":a,"data-content-element-index":d,class:"esri-popup-renderer__media-chart",afterCreate:this._getChartDependencies,afterUpdate:this._getChartDependencies})};B.prototype._getChartDependencies=function(a){var d=this,f=a["data-media-info"],g=a["data-content-element-index"],
l=f.value,m=l.theme||"Claro",q=f.type,f=["dojox/charting/Chart2D","dojox/charting/action2d/Tooltip"],r=m;"string"===typeof m&&(r=m.replace(/\./g,"/"),-1===r.indexOf("/")&&(r="dojox/charting/themes/"+r));f.push(r);this._cancelChartModules();this._chartRequirePromise=p.when(A,f).then(function(f){d._renderChart(a,g,q,l,f[0],f[1],f[2]);d._chartRequirePromise=null})};B.prototype._renderChart=function(a,d,f,g,l,m,p){a=new l(a,{margins:{l:4,t:4,r:4,b:4}});p&&a.setTheme(p);switch(f){case "pie-chart":a.addPlot("default",
{type:"Pie",labels:!1});a.addSeries("Series A",g.fields);break;case "line-chart":a.addPlot("default",{type:"Markers"});a.addAxis("x",{min:0,majorTicks:!1,minorTicks:!1,majorLabels:!1,minorLabels:!1});a.addAxis("y",{includeZero:!0,vertical:!0,fixUpper:"minor"});g.fields.forEach(function(a,d){a.x=d+1});a.addSeries("Series A",g.fields);break;case "column-chart":a.addPlot("default",{type:"Columns",gap:3});a.addAxis("y",{includeZero:!0,vertical:!0,fixUpper:"minor"});a.addSeries("Series A",g.fields);break;
case "bar-chart":a.addPlot("default",{type:"Bars",gap:3}),a.addAxis("x",{includeZero:!0,fixUpper:"minor",minorLabels:!1}),a.addAxis("y",{vertical:!0,majorTicks:!1,minorTicks:!1,majorLabels:!1,minorLabels:!1}),a.addSeries("Series A",g.fields)}f=new m(a);a.render();this._chartMap.set(d,{chart:a,tooltip:f})};B.prototype._renderMediaInfo=function(a,d){this._destroyChart(d);var g=this._renderMediaInfoType(a,d),l=a.title?f.tsx("div",{key:w("media-title",d),class:"esri-popup-renderer__media-item-title",
innerHTML:a.title}):null;a=a.caption?f.tsx("div",{key:w("media-caption",d),class:"esri-popup-renderer__media-item-caption",innerHTML:a.caption}):null;return f.tsx("div",{key:w("media-container",d),class:"esri-popup-renderer__media-item-container"},f.tsx("div",{key:w("media-item-container",d),class:"esri-popup-renderer__media-item"},g),l,a)};B.prototype._renderMediaStatsItem=function(a,d,g){g="chart"===g?f.join("esri-popup-renderer__media-chart-icon","esri-icon-chart"):f.join("esri-popup-renderer__media-image-icon",
"esri-icon-media");return f.tsx("li",{class:"esri-popup-renderer__media-image-summary"},f.tsx("span",{class:"esri-popup-renderer__media-count","aria-label":a},"("+d+")"),f.tsx("span",{"aria-hidden":"true",class:g}))};B.prototype._renderMediaPageButton=function(a,d){var g=(a="previous"===a)?q.previous:q.next,l=a?f.join("esri-popup-renderer__button","esri-popup-renderer__media-previous"):f.join("esri-popup-renderer__button","esri-popup-renderer__media-next"),m=a?f.join("esri-popup-renderer__icon","esri-popup-renderer__media-previous-icon",
"esri-icon-left-triangle-arrow"):f.join("esri-popup-renderer__icon","esri-popup-renderer__media-next-icon","esri-icon-right-triangle-arrow"),p=a?f.join("esri-popup-renderer__icon","esri-popup-renderer__media-previous-icon--rtl","esri-icon-right-triangle-arrow"):f.join("esri-popup-renderer__icon","esri-popup-renderer__media-next-icon--rtl","esri-icon-left-triangle-arrow"),r=a?this._previousClick:this._nextClick;return f.tsx("div",{key:w(a?"previous":"next",d),title:g,tabIndex:0,role:"button",class:l,
"data-content-element-index":d,bind:this,onkeydown:r,onclick:r},f.tsx("span",{"aria-hidden":"true",class:m}),f.tsx("span",{"aria-hidden":"true",class:p}),f.tsx("span",{class:"esri-icon-font-fallback-text"},g))};B.prototype._handleMediaKeyup=function(a){var d=a.currentTarget["data-content-element-index"],f=a.keyCode;f===x.LEFT_ARROW&&(a.stopPropagation(),this.previousMedia(d));f===x.RIGHT_ARROW&&(a.stopPropagation(),this.nextMedia(d))};B.prototype._renderMedia=function(a,d){a=a.mediaInfos;var g=this._getMediaStats(a),
l=g.total,m=(p={},p["esri-popup-renderer--media-pagination-visible"]=1<g.total,p),p=this._renderMediaStatsItem(q.numImages,g.images,"image"),g=this._renderMediaStatsItem(q.numCharts,g.charts,"chart"),r=this._renderMediaPageButton("previous",d),v=this._renderMediaPageButton("next",d),x=this._activeMediaMap.get(d);isNaN(x)&&(this._activeMediaMap.set(d,0),x=0);return l?f.tsx("div",{key:w("media-element",d),"data-content-element-index":d,bind:this,onkeyup:this._handleMediaKeyup,class:f.join("esri-popup-renderer__media",
"esri-popup-renderer__content-element"),classes:m},f.tsx("ul",{class:"esri-popup-renderer__media-summary"},p,g),f.tsx("div",{key:w("media-element-container",d),class:"esri-popup-renderer__media-container"},r,this._renderMediaInfo(a[x],d),v)):null;var p};B.prototype._renderText=function(a,d){return a.text?f.tsx("div",{key:w("text-element",d),innerHTML:a.text,class:f.join("esri-popup-renderer__text","esri-popup-renderer__content-element")}):null};B.prototype._attachToNode=function(a){a.appendChild(this)};
B.prototype._getMediaStats=function(a){var d=0,f=0;a.forEach(function(a){a=a.type;"image"===a?d++:-1!==a.indexOf("chart")&&f++});return{total:f+d,images:d,charts:f}};B.prototype._setContentElementMedia=function(a,d){this._clearMediaRefreshTimer(a);var f=this.viewModel.content;(f=(f=f&&f[a])&&f.mediaInfos)&&f.length&&(this._activeMediaMap.set(a,(d+f.length)%f.length),this._setupMediaRefreshTimer(a),this.scheduleRender())};B.prototype._pageContentElementMedia=function(a,d){d="previous"===d?-1:1;d=this._activeMediaMap.get(a)+
d;this._setContentElementMedia(a,d)};B.prototype._previousClick=function(a){this.previousMedia(a.currentTarget["data-content-element-index"])};B.prototype._nextClick=function(a){this.nextMedia(a.currentTarget["data-content-element-index"])};a([d.aliasOf("viewModel.contentEnabled")],B.prototype,"contentEnabled",void 0);a([d.aliasOf("viewModel.graphic")],B.prototype,"graphic",void 0);a([d.aliasOf("viewModel.title")],B.prototype,"title",void 0);a([d.aliasOf("viewModel.view")],B.prototype,"view",void 0);
a([d.property({type:l}),f.renderable(["viewModel.waitingForContent","viewModel.content"])],B.prototype,"viewModel",void 0);a([f.accessibleHandler()],B.prototype,"_previousClick",null);a([f.accessibleHandler()],B.prototype,"_nextClick",null);return B=a([d.subclass("esri.widgets.Popup.PopupRenderer")],B)}(d.declared(m))})},"esri/widgets/Popup/PopupRendererViewModel":function(){define("../Widget ../../core/Accessor ../../core/date ../../core/Error ../../core/HandleRegistry ../../core/lang ../../core/Logger ../../core/urlUtils ../../core/promiseUtils ../../core/watchUtils ../../request ../../support/arcadeUtils ../../tasks/support/StatisticDefinition ../../tasks/support/Query ../../tasks/QueryTask dojo/promise/all dojo/i18n!dojo/cldr/nls/number dojox/html/entities".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x,w,B,E,D,F){var H=/\'/g,I=/href\s*=\s*(?:\"([^\"]+)\"|\'([^\']+)\')/ig,z=/^\s*expression\//i,M=/(\{([^\{\r\n]+)\})/g,K={attachments:"attachments",fields:"fields",media:"media",text:"text"},L=m.getLogger("esri.widgets.Popup.PopupRendererViewModel");return t.createSubclass({declaredClass:"esri.widgets.Popup.PopupRendererViewModel",properties:{content:{readOnly:!0},contentEnabled:!0,contentTypes:{readOnly:!0},formattedAttributes:{readOnly:!0},graphic:{},title:{readOnly:!0},
view:{},waitingForContent:{readOnly:!0}},constructor:function(){this._handles=new d},initialize:function(){this._handles.add([r.watch(this,["graphic","graphic.popupTemplate.title","graphic.popupTemplate.content","graphic.popupTemplate.fieldInfos","contentEnabled"],function(){this._updateGraphic(this.graphic,this.contentEnabled)}.bind(this))]);this._updateGraphic(this.graphic,this.contentEnabled)},destroy:function(){this._handles.destroy();this._handles=null;this._clearRelatedInfo();this._cancelPromises();
this.graphic=null;this._set("title",null);this._set("content",null);this._set("waitingForContent",null)},content:null,contentEnabled:!0,contentTypes:K,formattedAttributes:null,graphic:null,title:"",view:null,waitingForContent:!1,_handles:null,_contentPromise:null,_contentElementPromises:null,_relatedRecordsPromise:null,_relatedRecordsQueryPromises:[],_relatedLayersInfo:null,_relatedInfo:null,_addValuesToHref:function(a,d,g,l){d=this._trimString(d);return f.substitute(d&&"{"===d[0]?g:l,a)},_cancelPromises:function(){this._contentElementPromises&&
(this._contentElementPromises.forEach(function(a){a.cancel()},this),this._contentElementPromises=null);this._contentPromise&&(this._contentPromise.cancel(),this._contentPromise=null);this._relatedRecordsQueryPromises.forEach(function(a){a.cancel()});this._relatedRecordsQueryPromises.length=0;this._relatedRecordsPromise&&(this._relatedRecordsPromise.cancel(),this._relatedRecordsPromise=null)},_clearRelatedInfo:function(){this._relatedInfo=this._relatedLayersInfo=null},_compileContent:function(d,f){var g=
d.content;if(g&&(g.nodeName||g&&g&&"function"===typeof g.postMixInProperties&&"function"===typeof g.buildRendering&&"function"===typeof g.postCreate&&"function"===typeof g.startup||g&&g.isInstanceOf&&g.isInstanceOf(A)))return g;if("string"===typeof g)return this._compileText(d,{type:K.text,text:g}).text;if(Array.isArray(g))return g.map(function(a,g){g=(g=f&&f[g])&&g.value;switch(a.type){case K.attachments:return this._proxyAttachments(a,g);case K.fields:return this._compileFields(d,a);case K.media:return this._compileMedia(d,
a);case K.text:return this._compileText(d,a)}},this);if(g)try{throw new a(this.declaredClass+"::invalid content type.");}catch(T){L.warn(T.stack)}},_compileFields:function(a,d){d=f.clone(d);var g=(a=a.template)&&a.expressionInfos;a=a&&f.clone(a.fieldInfos);a=d.fieldInfos||a;var l=[];a&&a.forEach(function(a){var d=a.fieldName.toLowerCase();if(!a.hasOwnProperty("visible")||a.visible)d=this._isExpressionField(d)?this._getExpressionInfo(g,d):null,a.label=d?d.title:a.label,l.push(a)},this);d.fieldInfos=
l;return d},_compileMedia:function(a,d){d=f.clone(d);var g=d.mediaInfos,l=a.attributes,m=a.layer,p=this.formattedAttributes.global,q=a.substOptions,r,v;g&&(r=[],g.forEach(function(h){v=0;var d=h.value;switch(h.type){case "image":var y=d.sourceURL,y=y&&this._trimString(f.substitute(l,this._fixTokens(y,m)));v=!!y;break;case "pie-chart":case "line-chart":case "column-chart":case "bar-chart":var c,y=d.normalizeField;d.fields=d.fields.map(function(b){return(c=this._getLayerFieldInfo(m,b))?c.name:b},this);
y&&(c=this._getLayerFieldInfo(m,y),d.normalizeField=c?c.name:y);v=d.fields.some(function(b){return f.isDefined(l[b])||-1!==b.indexOf("relationships/")&&this._relatedInfo},this);break;default:return}if(v){h=f.clone(h);var d=h.value,y=h.title?this._processFieldsInLinks(this._fixTokens(h.title,m),l):"",b=h.caption?this._processFieldsInLinks(this._fixTokens(h.caption,m),l):"";h.title=y?this._trimString(f.substitute(p,y,q)):"";h.caption=b?this._trimString(f.substitute(p,b,q)):"";if("image"===h.type)d.sourceURL=
f.substitute(l,this._fixTokens(d.sourceURL,m)),d.linkURL&&(d.linkURL=this._trimString(f.substitute(l,this._fixTokens(d.linkURL,m))));else{var e,k=(y=a.template)&&y.fieldInfos;d.fields.forEach(function(b,c){if(-1!==b.indexOf("relationships/"))b=this._getRelatedChartInfos(m,k,b,d,l,q),Array.isArray(b)?d.fields=b:d.fields[c]=b;else{var n=l[b],n=void 0===n?null:n;e=l[d.normalizeField]||0;n&&e&&(n/=e);var u=k&&this._getFieldInfo(k,b);d.fields[c]={y:n,tooltip:(u&&u.label||b)+":"+this._formatValue(n,{fieldInfos:k,
fieldName:b,layer:m,substOptions:q,preventPlacesFormatting:!!e})}}},this)}r.push(h)}},this));d.mediaInfos=r;return d},_compileText:function(a,d){if((d=f.clone(d))&&d.text){var g=a.attributes,l=this.formattedAttributes.global,m=a.substOptions;a=this._processFieldsInLinks(this._fixTokens(d.text,a.layer),g);d.text=this._trimString(f.substitute(l,a,m))}return d},_compileTitle:function(a){var d="",g=a.title,l=a.layer,m=a.attributes,p=a.substOptions,q=this.formattedAttributes.global;g&&("function"===typeof g&&
(g=g.call(null,{graphic:a.graphic})),"string"===typeof g&&(a=this._processFieldsInLinks(this._fixTokens(g,l),m),d=this._trimString(f.substitute(q,a,p))));return d},_getExpressionInfo:function(a,d){if(this._isExpressionField(d)){d=d.replace(z,"");d=d.toLowerCase();var f;a.some(function(a){a.name.toLowerCase()===d&&(f=a);return!!f});return f}},_createGraphicInfo:function(a,d){var l=a.popupTemplate,m=l&&l.title,p=l&&l.content,q=a.layer,r=q&&q._getDateOpts&&q._getDateOpts().properties,v=f.clone(a.attributes)||
{},x={dateFormat:{properties:r,formatter:"DateFormat"+g.getFormat("short-date-short-time")}};return{graphic:a,template:l,title:m,content:p,contentEnabled:d,layer:q,attributes:v,properties:r,substOptions:x}},_fixTokens:function(a,d){return a.replace(M,function(a,f,g){return(a=this._getLayerFieldInfo(d,g))?"{"+a.name+"}":f}.bind(this))},_encodeAttributes:function(a){var d=f.clone(a)||{};Object.keys(d).forEach(function(a){var f=d[a];"string"===typeof f&&(f=encodeURIComponent(f).replace(H,"\x26apos;"),
d[a]=f)});return d},_formatAttributesToFieldInfos:function(a,d,f,g,l){a.forEach(function(m){var p=m.fieldName,q=this._getLayerFieldInfo(d,p);q&&(p=m.fieldName=q.name);l[p]=this._formatValue(l[p],{fieldInfos:a,fieldName:p,layer:d,substOptions:f});g&&m.format&&m.format.dateFormat&&(m=g.indexOf(p),-1<m&&g.splice(m,1))},this)},_getArcadeViewingMode:function(a){return a&&"local"===a.viewingMode?"localScene":"globalScene"},_formatAttributes:function(a,d,g,l,m,p,q,r){var x=f.clone(m);q&&q.forEach(function(h){var a=
"expression/"+h.name;h=r[h.name];var c=this.view,c=c&&v.getViewInfo({viewingMode:"3d"===c.type?this._getArcadeViewingMode(c):"map",scale:c.scale,spatialReference:c.spatialReference});h=v.executeFunction(h&&h.compiledFunc,v.createExecContext(p,c));"string"===typeof h&&(h=F.encode(h));x[a]=h},this);this._relatedInfo&&Object.keys(this._relatedInfo).forEach(function(h){var a=this._relatedInfo[h];h=this._relatedLayersInfo[h];a&&(a.relatedFeatures.forEach(this._relatedFeaturesAttributes.bind(this,h,m,x)),
a.relatedStatsFeatures.forEach(this._relatedStatsAttributes.bind(this,h,m,x)))},this);a&&this._formatAttributesToFieldInfos(a,d,g,l,x);if(d){var h=d.typeIdField;Object.keys(m).forEach(function(a){if(-1===a.indexOf("relationships/")){var y=m[a];if(f.isDefined(y)){var c=this._getDomainName(d,p,a,y);f.isDefined(c)?x[a]=c:a===h&&(y=this._getTypeName(d,p,y),f.isDefined(y)&&(x[a]=y))}}},this)}return x},_formatValue:function(a,d){var l=d.fieldInfos,m=d.fieldName,p=d.substOptions,l=l&&this._getFieldInfo(l,
m),q=f.clone(l),l=d.preventPlacesFormatting;(d=this._getLayerFieldInfo(d.layer,m))&&"date"===d.type&&(d=q.format||{},d.dateFormat=d.dateFormat||"short-date-short-time",q.format=d);d=q&&q.format;m="number"===typeof a&&p.dateFormat.properties&&-1===p.dateFormat.properties.indexOf(m)&&(!d||!d.dateFormat);if(!f.isDefined(a)||!q||!f.isDefined(d))return m?this._forceLTR(a):a;var r="",v=[],q=d.hasOwnProperty("places")||d.hasOwnProperty("digitSeparator"),x=d.hasOwnProperty("digitSeparator")?d.digitSeparator:
!0;if(q)r="NumberFormat",f.isDefined(d.places)&&(!l||0<d.places)&&(v.push("places: "+Number(d.places)),r+="("+v.join(",")+")");else if(d.dateFormat)r="DateFormat"+g.getFormat(d.dateFormat)||g.getFormat("short-date-short-time");else return m?this._forceLTR(a):a;a=f.substitute({myKey:a},"{myKey:"+r+"}",p)||"";q&&!x&&D.group&&(a=a.replace(new RegExp("\\"+D.group,"g"),""));return m?this._forceLTR(a):a},_forceLTR:function(a){return"\x26lrm;"+a},_getDomainName:function(a,d,f,g){return(a=a.getFieldDomain&&
a.getFieldDomain(f,{feature:d}))&&a.codedValues?a.getName(g):null},_getFieldInfo:function(a,d){d=d.toLowerCase();for(var f,g=0;g<a.length;g++){var l=a[g];if(l.fieldName&&l.fieldName.toLowerCase()===d){f=l;break}}return f},_getLayerFieldInfo:function(a,d){return d&&a&&a.getField?a.getField(d):null},_getTypeName:function(a,d){return(a=a.getType&&a.getType(d))&&a.name},_processFieldsInLinks:function(a,d){var f=this._encodeAttributes(d);a&&(a=a.replace(I,function(a,g,l){return this._addValuesToHref(a,
g||l,d,f)}.bind(this)));return a},_proxyAttachments:function(d,g){d=f.clone(d);g&&!(g instanceof a)&&g.attachmentInfos&&g.attachmentInfos.length&&(g=g.attachmentInfos.map(function(a){a.url=l.addProxy(a.url);return a},this),d.attachmentInfos=g);return d},_queryAttachments:function(a){var d=a.layer;if(!d)return p.resolve();"scene"===d.type&&d.associatedLayer&&(d=d.associatedLayer);var f=a.attributes;a=d&&d.objectIdField;f=f&&a&&f[a];if(a&&d.get("capabilities.data.supportsAttachment")&&f)return this._queryAttachmentInfos(d,
f)},_queryAttachmentInfos:function(a,d){var f=a.url+"/"+a.layerId+"/"+d+"/attachments",g=a.token||"";return q(f,{query:{f:"json",token:g},callbackParamName:"callback"}).then(function(a){a=a.data;a.attachmentInfos.forEach(function(a){a.url=f+"/"+a.id;g&&(a.url+="?token\x3d"+g);a.objectId=d});return a})},_queryContentElements:function(a){var d=a.content;if(!d||!Array.isArray(d))return p.resolve();var f=[],g={};d.forEach(function(d,l){d.type===K.attachments&&(d=this._queryAttachments(a))&&(g[l]=d,f.push(d))},
this);this._contentElementPromises=f;return 0===f.length?p.resolve():p.eachAlways(g).always(function(a){this._contentElementPromises=null;return a}.bind(this))},_trimString:function(a){return(a||"").trim()},_getContent:function(a){var d=a.template,d=d&&d.content;"function"===typeof d&&(d=d.call(null,{graphic:a.graphic}));return d&&"function"===typeof d.then?d:p.resolve(d)},_updateContent:function(a){var d;return a.contentEnabled?this._contentPromise=d=this._getContent(a).then(function(d){a.content=
d;return this._queryContentElements(a)}.bind(this)).then(function(d){this._set("content",this._compileContent(a,d))}.bind(this)).otherwise(function(a){L.log("error loading template",a)}.bind(this)).then(function(){this._contentPromise=null}.bind(this)):d=p.resolve()},_isExpressionField:function(a){return z.test(a)},_compileExpressions:function(a){if(a){var d={};a.forEach(function(a){d[a.name]={compiledFunc:v.createFunction(a.expression)}});return d}},_createFormattedAttributes:function(a){var d=a.graphic,
f=a.attributes,g=a.layer,l=a.template,m=l&&l.fieldInfos,p=l&&l.expressionInfos,q=this._compileExpressions(p),r=a.substOptions,h=a.properties,v={global:this._formatAttributes(m,g,r,h,f,d,p,q),content:[]};a=l&&l.content;Array.isArray(a)&&a.forEach(function(a,c){a.type===K.fields&&a.fieldInfos&&(v.content[c]=this._formatAttributes(a.fieldInfos,g,r,h,f,d,p,q))},this);return v},_queryGraphicInfo:function(a,d){var f=this._createGraphicInfo(a,d);return this._checkForRelatedRecords(f).then(function(){this._set("formattedAttributes",
this._createFormattedAttributes(f));this._set("title",this._compileTitle(f));return this._updateContent(f)}.bind(this))},_updateGraphic:function(a,d){this._handles&&(this._clearRelatedInfo(),this._cancelPromises(),this._set("title",""),this._set("content",null),this._set("formattedAttributes",null),this._set("waitingForContent",!1),a&&(this._set("waitingForContent",!0),this._relatedRecordsPromise=this._queryGraphicInfo(a,d).always(function(){this._relatedRecordsPromise=null;this._relatedRecordsQueryPromises.length=
0;this._set("waitingForContent",!1)}.bind(this))))},_getAllFieldInfos:function(a){var d=[],f=a.template,g=f&&f.fieldInfos;a=a.contentEnabled;g&&(d=d.concat(g));a&&(f=f&&f.content,Array.isArray(f)&&f.forEach(function(a){d=d.concat(a&&a.fieldInfos)},this));return d},_checkForRelatedRecords:function(a){var d=this._getAllFieldInfos(a).filter(function(a){return a&&a.fieldName&&-1!==a.fieldName.indexOf("relationships/")},this);return a.layer&&d&&0<d.length?this._getRelatedRecords({graphic:a.graphic,fieldsInfo:d}):
p.resolve()},_relatedFeaturesAttributes:function(a,d,f,g){Object.keys(g.attributes).forEach(function(l){if("esriRelCardinalityOneToOne"===a.relation.cardinality){var m=this._toRelatedFieldName([a.relation.id,l]);d[m]=f[m]=g.attributes[l]}},this)},_relatedStatsAttributes:function(a,d,f,g){Object.keys(g.attributes).forEach(function(l){var m=this._toRelatedFieldName([a.relation.id,l]);d[m]=f[m]=g.attributes[l]},this)},_getRelatedChartInfos:function(a,d,f,g,l,m){var p,q,r,h,v,y;p=[];y=this._fromRelatedFieldName(f);
v=y[0];q=this._relatedInfo[v];v=this._relatedLayersInfo[v];q&&q.relatedFeatures.forEach(function(c){var b=c.attributes,e;Object.keys(b).forEach(function(c){if(c===y[1]){e={};h=b[c];g.normalizeField&&(r=-1!==g.normalizeField.indexOf("relationships/")?b[this._fromRelatedFieldName(g.normalizeField)[1]]:l[g.normalizeField]);h&&r&&(h/=r);if(g.tooltipField)if(-1!==g.tooltipField.indexOf("relationships/"))c=this._fromRelatedFieldName(g.tooltipField)[1],c=b[c],e.tooltip=c+": "+this._formatValue(h,{fieldInfos:d,
fieldName:c,layer:a,substOptions:m,preventPlacesFormatting:!!r});else{if(c=this._getLayerFieldInfo(a,f))f=c.name;e.tooltip=f+": "+this._formatValue(h,{fieldInfos:d,fieldName:g.tooltipField,layer:a,substOptions:m,preventPlacesFormatting:!!r})}else e.tooltip=h;e.y=h;p.push(e)}},this)},this);return"esriRelCardinalityOneToMany"===v.relation.cardinality||"esriRelCardinalityManyToMany"===v.relation.cardinality?p:p[0]},_getRelatedRecords:function(a){var d=a.graphic;return this._relatedLayersInfo?this._queryRelatedLayers(d).then(function(a){this._setRelatedRecords(a);
return a}.bind(this)):this._getRelatedLayersInfo(a).then(function(a){Object.keys(a).forEach(function(d){a[d]&&(this._relatedLayersInfo[d].relatedLayerInfo=a[d].data)},this);return this._queryRelatedLayers(d).then(function(a){this._setRelatedRecords(a);return a}.bind(this))}.bind(this))},_getRelatedLayersInfo:function(a){var d=a.fieldsInfo,f,g={};f=a.graphic.layer;this._relatedLayersInfo||(this._relatedLayersInfo={});d.forEach(function(a){var d,g,l;d=this._fromRelatedFieldName(a.fieldName);g=d[0];
d=d[1];if(g){if(!this._relatedLayersInfo[g]){var m=f&&f.relationships;m&&m.some(function(h){if(h.id==g)return l=h,!0});l&&(this._relatedLayersInfo[g]={relation:l,relatedFields:[],outStatistics:[]})}this._relatedLayersInfo[g]&&(this._relatedLayersInfo[g].relatedFields.push(d),a.statisticType&&(a=new x({statisticType:a.statisticType,onStatisticField:d,outStatisticFieldName:d}),this._relatedLayersInfo[g].outStatistics.push(a)))}},this);Object.keys(this._relatedLayersInfo).forEach(function(a){var d;this._relatedLayersInfo[a]&&
(d=this._relatedLayersInfo[a].relation,d=f.url+"/"+d.relatedTableId,this._relatedLayersInfo[a].relatedLayerUrl=d,g[a]=q(d,{query:{f:"json"},callbackParamName:"callback"}))},this);return E(g)},_queryRelatedLayers:function(a){var d={};Object.keys(this._relatedLayersInfo).forEach(function(f){d[f]=this._queryRelatedLayer({graphic:a,relatedInfo:this._relatedLayersInfo[f]})},this);return E(d)},_queryRelatedLayer:function(a){var d,f,g,l,m,p,q,r,h;d=a.graphic;f=d.layer.layerId;q=a.relatedInfo;a=q.relatedLayerInfo;
r=q.relatedLayerUrl;h=q.relation;a&&a.relationships&&a.relationships.some(function(h){if(h.relatedTableId===parseInt(f,10))return g=h,!0});g&&(a.fields.some(function(h){if(h.name===g.keyField)return l=-1!==["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble"].indexOf(h.type)?"number":"string",!0}),m="string"===l?g.keyField+"\x3d'"+d.attributes[h.keyField]+"'":g.keyField+"\x3d"+d.attributes[h.keyField],m=new w({where:m,outFields:q.relatedFields}),q.outStatistics&&
0<q.outStatistics.length&&a.supportsStatistics&&(p=new w({where:m.where,outFields:m.outFields,outStatistics:q.outStatistics})),a=new B({url:r}),m=[a.execute(m)],p&&m.push(a.execute(p)));this._relatedRecordsQueryPromises=this._relatedRecordsQueryPromises.concat(m);return E(m)},_setRelatedRecords:function(a){this._relatedInfo=[];Object.keys(a).forEach(function(d){if(a[d]){var g=a[d];this._relatedInfo[d]={relatedFeatures:g[0].features};f.isDefined(g[1])&&(this._relatedInfo[d].relatedStatsFeatures=g[1].features)}},
this)},_fromRelatedFieldName:function(a){return-1!==a.indexOf("relationships/")?a.split("/").slice(1):[]},_toRelatedFieldName:function(a){return a&&0<a.length?"relationships/"+a[0]+"/"+a[1]:""}})})},"dojox/html/entities":function(){define(["dojo/_base/lang"],function(A){var t=A.getObject("dojox.html.entities",!0),g=function(a,f){var d,g;if(f._encCache&&f._encCache.regexp&&f._encCache.mapper&&f.length==f._encCache.length)d=f._encCache.mapper,g=f._encCache.regexp;else{d={};g=["["];var p;for(p=0;p<f.length;p++)d[f[p][0]]=
"\x26"+f[p][1]+";",g.push(f[p][0]);g.push("]");g=new RegExp(g.join(""),"g");f._encCache={mapper:d,regexp:g,length:f.length}}return a=a.replace(g,function(a){return d[a]})},a=function(a,f){var d,g;if(f._decCache&&f._decCache.regexp&&f._decCache.mapper&&f.length==f._decCache.length)d=f._decCache.mapper,g=f._decCache.regexp;else{d={};g=["("];var p;for(p=0;p<f.length;p++){var r="\x26"+f[p][1]+";";p&&g.push("|");d[r]=f[p][0];g.push(r)}g.push(")");g=new RegExp(g.join(""),"g");f._decCache={mapper:d,regexp:g,
length:f.length}}return a=a.replace(g,function(a){return d[a]})};t.html=[["\x26","amp"],['"',"quot"],["\x3c","lt"],["\x3e","gt"],["\u00a0","nbsp"]];t.latin=[["\u00a1","iexcl"],["\u00a2","cent"],["\u00a3","pound"],["\u20ac","euro"],["\u00a4","curren"],["\u00a5","yen"],["\u00a6","brvbar"],["\u00a7","sect"],["\u00a8","uml"],["\u00a9","copy"],["\u00aa","ordf"],["\u00ab","laquo"],["\u00ac","not"],["\u00ad","shy"],["\u00ae","reg"],["\u00af","macr"],["\u00b0","deg"],["\u00b1","plusmn"],["\u00b2","sup2"],
["\u00b3","sup3"],["\u00b4","acute"],["\u00b5","micro"],["\u00b6","para"],["\u00b7","middot"],["\u00b8","cedil"],["\u00b9","sup1"],["\u00ba","ordm"],["\u00bb","raquo"],["\u00bc","frac14"],["\u00bd","frac12"],["\u00be","frac34"],["\u00bf","iquest"],["\u00c0","Agrave"],["\u00c1","Aacute"],["\u00c2","Acirc"],["\u00c3","Atilde"],["\u00c4","Auml"],["\u00c5","Aring"],["\u00c6","AElig"],["\u00c7","Ccedil"],["\u00c8","Egrave"],["\u00c9","Eacute"],["\u00ca","Ecirc"],["\u00cb","Euml"],["\u00cc","Igrave"],["\u00cd",
"Iacute"],["\u00ce","Icirc"],["\u00cf","Iuml"],["\u00d0","ETH"],["\u00d1","Ntilde"],["\u00d2","Ograve"],["\u00d3","Oacute"],["\u00d4","Ocirc"],["\u00d5","Otilde"],["\u00d6","Ouml"],["\u00d7","times"],["\u00d8","Oslash"],["\u00d9","Ugrave"],["\u00da","Uacute"],["\u00db","Ucirc"],["\u00dc","Uuml"],["\u00dd","Yacute"],["\u00de","THORN"],["\u00df","szlig"],["\u00e0","agrave"],["\u00e1","aacute"],["\u00e2","acirc"],["\u00e3","atilde"],["\u00e4","auml"],["\u00e5","aring"],["\u00e6","aelig"],["\u00e7","ccedil"],
["\u00e8","egrave"],["\u00e9","eacute"],["\u00ea","ecirc"],["\u00eb","euml"],["\u00ec","igrave"],["\u00ed","iacute"],["\u00ee","icirc"],["\u00ef","iuml"],["\u00f0","eth"],["\u00f1","ntilde"],["\u00f2","ograve"],["\u00f3","oacute"],["\u00f4","ocirc"],["\u00f5","otilde"],["\u00f6","ouml"],["\u00f7","divide"],["\u00f8","oslash"],["\u00f9","ugrave"],["\u00fa","uacute"],["\u00fb","ucirc"],["\u00fc","uuml"],["\u00fd","yacute"],["\u00fe","thorn"],["\u00ff","yuml"],["\u0192","fnof"],["\u0391","Alpha"],["\u0392",
"Beta"],["\u0393","Gamma"],["\u0394","Delta"],["\u0395","Epsilon"],["\u0396","Zeta"],["\u0397","Eta"],["\u0398","Theta"],["\u0399","Iota"],["\u039a","Kappa"],["\u039b","Lambda"],["\u039c","Mu"],["\u039d","Nu"],["\u039e","Xi"],["\u039f","Omicron"],["\u03a0","Pi"],["\u03a1","Rho"],["\u03a3","Sigma"],["\u03a4","Tau"],["\u03a5","Upsilon"],["\u03a6","Phi"],["\u03a7","Chi"],["\u03a8","Psi"],["\u03a9","Omega"],["\u03b1","alpha"],["\u03b2","beta"],["\u03b3","gamma"],["\u03b4","delta"],["\u03b5","epsilon"],
["\u03b6","zeta"],["\u03b7","eta"],["\u03b8","theta"],["\u03b9","iota"],["\u03ba","kappa"],["\u03bb","lambda"],["\u03bc","mu"],["\u03bd","nu"],["\u03be","xi"],["\u03bf","omicron"],["\u03c0","pi"],["\u03c1","rho"],["\u03c2","sigmaf"],["\u03c3","sigma"],["\u03c4","tau"],["\u03c5","upsilon"],["\u03c6","phi"],["\u03c7","chi"],["\u03c8","psi"],["\u03c9","omega"],["\u03d1","thetasym"],["\u03d2","upsih"],["\u03d6","piv"],["\u2022","bull"],["\u2026","hellip"],["\u2032","prime"],["\u2033","Prime"],["\u203e",
"oline"],["\u2044","frasl"],["\u2118","weierp"],["\u2111","image"],["\u211c","real"],["\u2122","trade"],["\u2135","alefsym"],["\u2190","larr"],["\u2191","uarr"],["\u2192","rarr"],["\u2193","darr"],["\u2194","harr"],["\u21b5","crarr"],["\u21d0","lArr"],["\u21d1","uArr"],["\u21d2","rArr"],["\u21d3","dArr"],["\u21d4","hArr"],["\u2200","forall"],["\u2202","part"],["\u2203","exist"],["\u2205","empty"],["\u2207","nabla"],["\u2208","isin"],["\u2209","notin"],["\u220b","ni"],["\u220f","prod"],["\u2211","sum"],
["\u2212","minus"],["\u2217","lowast"],["\u221a","radic"],["\u221d","prop"],["\u221e","infin"],["\u2220","ang"],["\u2227","and"],["\u2228","or"],["\u2229","cap"],["\u222a","cup"],["\u222b","int"],["\u2234","there4"],["\u223c","sim"],["\u2245","cong"],["\u2248","asymp"],["\u2260","ne"],["\u2261","equiv"],["\u2264","le"],["\u2265","ge"],["\u2282","sub"],["\u2283","sup"],["\u2284","nsub"],["\u2286","sube"],["\u2287","supe"],["\u2295","oplus"],["\u2297","otimes"],["\u22a5","perp"],["\u22c5","sdot"],["\u2308",
"lceil"],["\u2309","rceil"],["\u230a","lfloor"],["\u230b","rfloor"],["\u2329","lang"],["\u232a","rang"],["\u25ca","loz"],["\u2660","spades"],["\u2663","clubs"],["\u2665","hearts"],["\u2666","diams"],["\u0152","OElig"],["\u0153","oelig"],["\u0160","Scaron"],["\u0161","scaron"],["\u0178","Yuml"],["\u02c6","circ"],["\u02dc","tilde"],["\u2002","ensp"],["\u2003","emsp"],["\u2009","thinsp"],["\u200c","zwnj"],["\u200d","zwj"],["\u200e","lrm"],["\u200f","rlm"],["\u2013","ndash"],["\u2014","mdash"],["\u2018",
"lsquo"],["\u2019","rsquo"],["\u201a","sbquo"],["\u201c","ldquo"],["\u201d","rdquo"],["\u201e","bdquo"],["\u2020","dagger"],["\u2021","Dagger"],["\u2030","permil"],["\u2039","lsaquo"],["\u203a","rsaquo"]];t.encode=function(a,f){a&&(f?a=g(a,f):(a=g(a,t.html),a=g(a,t.latin)));return a};t.decode=function(d,f){d&&(f?d=a(d,f):(d=a(d,t.html),d=a(d,t.latin)));return d};return t})},"esri/widgets/support/uriUtils":function(){define(["require","exports","../../core/lang","dojo/i18n!./nls/uriUtils"],function(A,
t,g,a){function d(a){var d=null;f.some(function(f){f.pattern.test(a)&&(d=f);return!!d});return d}Object.defineProperty(t,"__esModule",{value:!0});var f=[{id:"http",pattern:/^\s*(https?:\/\/([^\s]+))\s*$/i,target:"_blank",label:a.view},{id:"tel",pattern:/^\s*(tel:([^\s]+))\s*$/i,label:"{hierPart}"},{id:"mailto",pattern:/^\s*(mailto:([^\s]+))\s*$/i,label:"{hierPart}"},{id:"arcgis-appstudio-player",pattern:/^\s*(arcgis-appstudio-player:\/\/([^\s]+))\s*$/i,label:a.openInApp,appName:"App Studio Player"},
{id:"arcgis-collector",pattern:/^\s*(arcgis-collector:\/\/([^\s]+))\s*$/i,label:a.openInApp,appName:"Collector"},{id:"arcgis-explorer",pattern:/^\s*(arcgis-explorer:\/\/([^\s]+))\s*$/i,label:a.openInApp,appName:"Explorer"},{id:"arcgis-navigator",pattern:/^\s*(arcgis-navigator:\/\/([^\s]+))\s*$/i,label:a.openInApp,appName:"Navigator"},{id:"arcgis-survey123",pattern:/^\s*(arcgis-survey123:\/\/([^\s]+))\s*$/i,label:a.openInApp,appName:"Survey123"},{id:"arcgis-trek2there",pattern:/^\s*(arcgis-trek2there:\/\/([^\s]+))\s*$/i,
label:a.openInApp,appName:"Trek2There"},{id:"arcgis-workforce",pattern:/^\s*(arcgis-workforce:\/\/([^\s]+))\s*$/i,label:a.openInApp,appName:a.workforce},{id:"iform",pattern:/^\s*(iform:\/\/([^\s]+))\s*$/i,label:a.openInApp,appName:"iForm"},{id:"flow",pattern:/^\s*(flow:\/\/([^\s]+))\s*$/i,label:a.openInApp,appName:"FlowFinity"},{id:"lfmobile",pattern:/^\s*(lfmobile:\/\/([^\s]+))\s*$/i,label:a.openInApp,appName:"Laserfische"},{id:"mspbi",pattern:/^\s*(mspbi:\/\/([^\s]+))\s*$/i,label:a.openInApp,appName:"Microsoft Power Bi"}];
t.autoLink=function(a){if("string"!==typeof a||!a)return a;var f=d(a);if(!f)return a;var m=a.match(f.pattern),m=g.substitute({appName:f.appName,hierPart:m&&m[2]},f.label);return a.replace(f.pattern,"\x3ca "+(f.target?'target\x3d"'+f.target+'"':"")+'" href\x3d"$1"\x3e'+m+"\x3c/a\x3e")}})},"esri/widgets/Popup/PopupViewModel":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/tsSupport/assignHelper ../../core/Collection ../../core/Error ../../core/HandleRegistry ../../core/promiseUtils ../../core/watchUtils ../../geometry/geometryEngine ../../geometry/support/webMercatorUtils ../../support/Action ../support/AnchorElementViewModel ../../core/accessorSupport/decorators".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x,w,B){function E(a,d){return d.allLayerViews.find(function(d){return d.layer===a})}A=new x({id:"zoom-to"});var D=new (f.ofType(x))([A]);return function(d){function w(a){a=d.call(this)||this;a._handles=new l;a._originalActions=null;a.actions=D;a.goToOptions=null;a.autoCloseEnabled=!1;a.content=null;a.highlightEnabled=!0;a.title=null;a.updateLocationEnabled=!0;a.view=null;a.visible=!1;a.zoomFactor=4;return a}g(w,d);w.prototype.initialize=function(){this._handles.add([this.on("view-change",
this._autoClose),r.watch(this,["highlightEnabled","selectedFeature","visible","view"],this._highlightFeature),r.watch(this,"selectedFeature.popupTemplate.actions",this._getSelectedFeatureActions),r.watch(this,"selectedFeature.popupTemplate.overwriteActions",this._getSelectedFeatureActions)])};w.prototype.destroy=function(){this._handles.destroy();this.view=this._handles=null};Object.defineProperty(w.prototype,"featureCount",{get:function(){return this.features.length},enumerable:!0,configurable:!0});
Object.defineProperty(w.prototype,"features",{get:function(){return this._get("features")||[]},set:function(a){a=a||[];this._set("features",a);var d=this.pendingPromisesCount,f=this.selectedFeatureIndex,g=this.promiseCount&&a.length;g&&d&&-1===f?this.selectedFeatureIndex=0:g&&-1!==f||(this.selectedFeatureIndex=a.length?0:-1)},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"location",{get:function(){return this._get("location")||null},set:function(a){var d=this.get("location"),f=
this.get("view.spatialReference.isWebMercator");a&&a.get("spatialReference.isWGS84")&&f&&(a=v.geographicToWebMercator(a));this._set("location",a);a!==d&&this._centerAtLocation()},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"pendingPromisesCount",{get:function(){return this.promises.filter(function(a){return a&&!a.isFulfilled()}).length},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"waitingForResult",{get:function(){return 0<this.pendingPromisesCount&&0===
this.featureCount},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"promiseCount",{get:function(){return this.promises.length},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"promises",{get:function(){return this._get("promises")||[]},set:function(a){var d=this;this._get("promises").forEach(function(a){a.cancel()});this.features=[];this._set("promises",a);a.length&&(a=a.slice(0),a.forEach(function(a){a.always(function(f){d.notifyChange("pendingPromisesCount");
d._updateFeatures(a,f)})}),p.eachAlways(a).then(function(){d.featureCount||(d.visible=!1)}))},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"selectedFeature",{get:function(){var a=this.selectedFeatureIndex;if(-1===a)return null;a=this.features[a];if(!a)return null;this.updateLocationEnabled&&(this.location=this._getPointFromGeometry(a.geometry));return a},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"selectedFeatureIndex",{get:function(){var a=this._get("selectedFeatureIndex");
return"number"===typeof a?a:-1},set:function(a){var d=this.featureCount;a=isNaN(a)||-1>a||!d?-1:(a+d)%d;this._set("selectedFeatureIndex",a)},enumerable:!0,configurable:!0});Object.defineProperty(w.prototype,"state",{get:function(){return this.get("view.ready")?"ready":"disabled"},enumerable:!0,configurable:!0});w.prototype.centerAtLocation=function(){var a=this.location,d=this.view;return a&&d?d.goTo({target:a,scale:d.scale},this.goToOptions):p.reject(new m(this.declaredClass+"::Cannot center at location without a location and view."))};
w.prototype.clear=function(){this.set({promises:[],features:[],content:null,title:null,location:null})};w.prototype.triggerAction=function(a){(a=this.actions.getItemAt(a))&&this.emit("trigger-action",{action:a})};w.prototype.next=function(){this.selectedFeatureIndex+=1;return this};w.prototype.previous=function(){--this.selectedFeatureIndex;return this};w.prototype.zoomToLocation=function(){var a=this,d=this.location,f=this.selectedFeature,g=this.view,l=this.zoomFactor;if(!d||!g)return p.reject(new m(this.declaredClass+
"::Cannot zoom to location without a location and view."));var l=g.scale/l,q=this.get("selectedFeature.geometry"),r=f&&"3d"===g.type,d=(r=q||r)?f:d,v=r&&q&&"point"===q.type&&this._isScreenSize(f);return g.goTo({target:d,scale:v?l:void 0},this.goToOptions).then(function(){v&&"point"===q.type&&(a.location=q)})};w.prototype._autoClose=function(){this.autoCloseEnabled&&(this.visible=!1)};w.prototype._isScreenSize=function(a){var d=this.view;return"3d"!==d.type||"esri.Graphic"!==a.declaredClass?!0:(d=
d.getViewForGraphic(a))&&d.whenGraphicBounds?d.whenGraphicBounds(a).then(function(a){return!a||a[0]===a[3]&&a[1]===a[4]&&a[2]===a[5]}):!0};w.prototype._getSelectedFeatureActions=function(){this._originalActions&&(this.actions=this._originalActions,this._originalActions=null);var a=this.actions.filter(function(a){return!a.temporary}),d=this.get("selectedFeature.popupTemplate");d&&d.overwriteActions&&(this._originalActions=a);this.actions=this._getNewActions(d,a)};w.prototype._getNewActions=function(a,
d){if(!a||!a.actions)return d;var f=a.actions;f.forEach(function(a){a.temporary=!0});return a.overwriteActions?f:d.concat(f)};w.prototype._getPointFromGeometry=function(a){return a?"point"===a.type?a:"extent"===a.type?a.center:"polygon"===a.type?a.centroid:"multipoint"===a.type||"polyline"===a.type?a.extent.center:null:null};w.prototype._centerAtLocation=function(){var a=this.location,d=this.updateLocationEnabled,f=this.get("view.extent");d&&f&&a&&!q.contains(f,a)&&this.centerAtLocation()};w.prototype._highlightFeature=
function(){this._handles.remove("highlight");var a=this.selectedFeature,d=this.highlightEnabled,f=this.view,g=this.visible;a&&f&&d&&g&&(d=a.layer)&&(f=E(d,f))&&"function"===typeof f.highlight&&(d=d.objectIdField,g=a.attributes,a=f.highlight(g&&g[d]||a,{}),this._handles.add(a,"highlight"))};w.prototype._updateFeatures=function(a,d){var f=this.features;a&&d&&d.length&&!(!this._validatePromise(a)||d instanceof m||d instanceof Error)&&(f.length?(a=d.filter(function(a){return-1===f.indexOf(a)}),this.features=
f.concat(a)):this.features=d)};w.prototype._validatePromise=function(a){return!a.isCanceled()&&-1<this.promises.indexOf(a)};a([B.property({type:f.ofType(x)})],w.prototype,"actions",void 0);a([B.property()],w.prototype,"goToOptions",void 0);a([B.property()],w.prototype,"autoCloseEnabled",void 0);a([B.property()],w.prototype,"content",void 0);a([B.property({readOnly:!0,dependsOn:["features"]})],w.prototype,"featureCount",null);a([B.property()],w.prototype,"features",null);a([B.property()],w.prototype,
"highlightEnabled",void 0);a([B.property()],w.prototype,"location",null);a([B.property({readOnly:!0,dependsOn:["promises"]})],w.prototype,"pendingPromisesCount",null);a([B.property({readOnly:!0,dependsOn:["featureCount","pendingPromisesCount"]})],w.prototype,"waitingForResult",null);a([B.property({readOnly:!0,dependsOn:["promises"]})],w.prototype,"promiseCount",null);a([B.property()],w.prototype,"promises",null);a([B.property({value:null,readOnly:!0,dependsOn:["features","selectedFeatureIndex","updateLocationEnabled"]})],
w.prototype,"selectedFeature",null);a([B.property({value:-1})],w.prototype,"selectedFeatureIndex",null);a([B.property({readOnly:!0,dependsOn:["view.ready"]})],w.prototype,"state",null);a([B.property()],w.prototype,"title",void 0);a([B.property()],w.prototype,"updateLocationEnabled",void 0);a([B.property()],w.prototype,"view",void 0);a([B.property()],w.prototype,"visible",void 0);a([B.property()],w.prototype,"zoomFactor",void 0);a([B.property()],w.prototype,"centerAtLocation",null);a([B.property()],
w.prototype,"clear",null);a([B.property()],w.prototype,"triggerAction",null);a([B.property()],w.prototype,"next",null);a([B.property()],w.prototype,"previous",null);a([B.property()],w.prototype,"zoomToLocation",null);return w=a([B.subclass("esri.widgets.Popup.PopupViewModel")],w)}(B.declared(w))})},"esri/geometry/geometryEngine":function(){define("require exports ../kernel ./Geometry ./Polygon ./Polyline ./Point ./Extent ./Multipoint dojo/_base/lang".split(" "),function(A,t,g,a,d,f,m,l,p,r){function q(h){if(void 0===
m.fromJson){if(void 0!==h.x&&void 0!==h.y)return new m(h);if(void 0!==h.paths)return new f(h);if(void 0!==h.rings)return new d(h);if(void 0!==h.points)return new p(h);if(void 0!==h.xmin&&void 0!==h.ymin&&void 0!==h.xmax&&void 0!==h.ymax)return new l(h)}else{if(void 0!==h.x&&void 0!==h.y)return m.fromJson(h);if(void 0!==h.paths)return f.fromJson(h);if(void 0!==h.rings)return d.fromJson(h);if(void 0!==h.points)return p.fromJson(h);if(void 0!==h.xmin&&void 0!==h.ymin&&void 0!==h.xmax&&void 0!==h.ymax)return l.fromJson(h)}}
function v(h){if(void 0===m.fromJson){if(void 0!==h.x&&void 0!==h.y)return new m(h);if(void 0!==h.paths)return new f(h);if(void 0!==h.rings)return new d(h);if(void 0!==h.points)return new p(h);if(void 0!==h.xmin&&void 0!==h.ymin&&void 0!==h.xmax&&void 0!==h.ymax)return new l(h)}else{if(void 0!==h.x&&void 0!==h.y)return m.fromJSON(h);if(void 0!==h.paths)return f.fromJSON(h);if(void 0!==h.rings)return d.fromJSON(h);if(void 0!==h.points)return p.fromJSON(h);if(void 0!==h.xmin&&void 0!==h.ymin&&void 0!==
h.xmax&&void 0!==h.ymax)return l.fromJSON(h)}}function x(h,a){var d;if(null==h||void 0===h||"number"===typeof h)return h;var c=h.toString();if(""===c)return null;if(2==a){if(d=Y[c],void 0!==d)return d}else if(0==a){d=R[c];if(void 0!==d)return d;d=S[h];if(void 0!==d)return d}else if(3==a&&(d=R[c],void 0!==d))return d;if(1==a&&(d=S[h],void 0!==d))return d;if(!0===/^\d+$/.test(c))return parseInt(c);throw Error("Unrecognised Unit Type");}function w(h){if(void 0!==h&&null!==h)switch(h){case "loxodrome":return 1;
case "great-elliptic":return 2;case "normal-section":return 3;case "shape-preserving":return 4}return 0}function B(h,a){if(null===h||void 0===h||h.s())return null;switch(h.D()){case z.Xn.Point:var g=new m(h.lk(),h.mk(),a);if(O){var c=h.hasAttribute(z.xf.M);h.hasAttribute(z.xf.Z)&&g.set("z",h.lO());c&&g.set("m",h.NN())}return g;case z.Xn.Polygon:var g=h.hasAttribute(z.xf.Z),c=h.hasAttribute(z.xf.M),b=E(h,g,c),g=new d({rings:b,hasZ:g,hasM:c});O?g.set("spatialReference",a):g.setSpatialReference(a);g.setCacheValue("_geVersion",
h);return g;case z.Xn.Polyline:return g=h.hasAttribute(z.xf.Z),c=h.hasAttribute(z.xf.M),b=E(h,g,c),g=new f({paths:b,hasZ:g,hasM:c}),O?g.set("spatialReference",a):g.setSpatialReference(a),g.setCacheValue("_geVersion",h),g;case z.Xn.MultiPoint:var g=h.hasAttribute(z.xf.Z),c=h.hasAttribute(z.xf.M),e=b=null;g&&(b=h.mc(z.xf.Z));c&&(e=h.mc(z.xf.M));var k=new z.b,n=h.F();a=new p(a);O&&(a.set("hasZ",g),a.set("hasM",c));for(var u=0;u<n;u++){h.w(u,k);var C=[k.x,k.y];g&&C.push(b.get(u));c&&C.push(e.get(u));
a.addPoint(C)}a.setCacheValue("_geVersion",h);return a;case z.Xn.Envelope:return b=h.hasAttribute(z.xf.Z),g=h.hasAttribute(z.xf.M),c=new l(h.R.v,h.R.C,h.R.B,h.R.G,a),O&&(b&&(b=h.Ah(z.xf.Z,0),c.set("zmin",b.qa),c.set("zmax",b.va)),g&&(b=h.Ah(z.xf.M,0),c.set("mmin",b.qa),c.set("mmax",b.va))),c.setCacheValue("_geVersion",h),c}return null}function E(h,a,d){var c=[],b=h.ea(),e=null,k=null;a&&(e=h.mc(z.xf.Z));d&&(k=h.mc(z.xf.M));for(var n=new z.b,u=0;u<b;u++){for(var C=h.Ea(u),J=h.Ha(u),G=0,f=0,g=NaN,y=
NaN,l=NaN,m=NaN,p=h.vc(u),q=[],r=C;r<C+J;r++){h.w(r,n);var m=l=NaN,v=[n.x,n.y];a&&(l=e.get(r),v.push(l));d&&(m=k.get(r),v.push(m));r==C&&p&&(G=n.x,f=n.y,g=l,y=m);q.push(v)}!p||G==n.x&&f==n.y&&(!a||isNaN(g)&&isNaN(l)||g==l)&&(!d||isNaN(y)&&isNaN(m)||y==m)||q.push(q[0].slice(0));c.push(q)}return c}function D(h){var a=h._geVersion;if(null==a||void 0==a){if(Object.freeze&&Object.isFrozen(h))return 102100===h.wkid?X:4326===h.wkid?U:a=z.Nf.create(h.wkid);-1!=h.wkid&&null!==h.wkid&&void 0!==h.wkid?(a=z.Nf.create(h.wkid),
h._geVersion=a):""!==h.wkt&&void 0!==h.wkt&&null!==h.wkt&&(a=z.Nf.NL(h.wkt),h._geVersion=a)}return a}function F(h){if(null==h)return null;var a=h.getCacheValue("_geVersion");if(null==a||void 0==a)a=z.Pb.IL(h),h.setCacheValue("_geVersion",a);return a}function H(h){return null===h.spatialReference?null:D(h.spatialReference)}var I=this&&this.__extends||function(h,a){function d(){this.constructor=h}for(var c in a)a.hasOwnProperty(c)&&(h[c]=a[c]);h.prototype=null===a?Object.create(a):(d.prototype=a.prototype,
new d)},z;(function(h){var a=function(){function c(){}c.Sk=!1;c.it=!1;c.$v="";return c}();h.ah=a;if("undefined"!==typeof window)h.ah.$v="browser","Float64Array"in window&&(h.ah.it=!0),"ArrayBuffer"in window&&(h.ah.Sk=!0);else if("undefined"!==typeof process)a.$v="node",h.ah.Sk=!0,h.ah.it=!0;else{a.$v="browser";try{var d=new ArrayBuffer(0);new Uint8Array(d);h.ah.Sk=!0;h.ah.it=!0}catch(c){h.ah.Sk=!1}}})(z||(z={}));(function(h){(function(h){h[h.Unknown=0]="Unknown";h[h.Point=33]="Point";h[h.Line=322]=
"Line";h[h.Envelope=197]="Envelope";h[h.MultiPoint=550]="MultiPoint";h[h.Polyline=1607]="Polyline";h[h.Polygon=1736]="Polygon"})(h.Xn||(h.Xn={}));(function(h){h[h.enumMild=0]="enumMild";h[h.enumMedium=1]="enumMedium";h[h.enumHot=2]="enumHot"})(h.rH||(h.rH={}));var a=function(){function a(){this.description=null;this.Ux=0}a.prototype.D=function(){return 0};a.prototype.fb=function(){return-1};a.prototype.Qf=function(c){this.qc();c!=this.description&&this.nm(c)};a.prototype.nm=function(){};a.prototype.Ik=
function(c){this.qc();c!=this.description&&(c=h.Od.QN(this.description,c),c!=this.description&&this.nm(c))};a.prototype.hasAttribute=function(c){return this.description.hasAttribute(c)};a.prototype.Ne=function(c){this.qc();this.description.hasAttribute(c)||(c=h.Od.PN(this.description,c),this.nm(c))};a.prototype.Ah=function(){return null};a.prototype.Fp=function(){};a.prototype.o=function(){};a.prototype.Cn=function(){};a.prototype.dd=function(c){this.o(c)};a.prototype.s=function(){return!0};a.prototype.Ja=
function(){};a.prototype.Oe=function(){};a.prototype.Pa=function(){return null};a.prototype.copyTo=function(){};a.prototype.Mh=function(){return 0};a.prototype.$b=function(){return 0};a.prototype.WC=function(){return this.hasAttribute(1)};a.ve=function(c){return((c&192)>>6)+1>>1};a.Km=function(c){return 0!=(c&32)};a.qT=function(c){return 0!=(c&64)};a.SO=function(c){return 0!=(c&128)};a.Lc=function(c){return 0!=(c&256)};a.Th=function(c){return 0!=(c&512)};a.Kc=function(c){return 0!=(c&1024)};a.prototype.vm=
function(){var c=this.Pa();this.copyTo(c);return c};a.prototype.Rf=function(){return null};a.Yj=function(c){var b=c.Pa();c.copyTo(b);return b};a.prototype.qc=function(){0<=this.Ux&&(this.Ux+=2147483649)};a.Vu=function(c){var b=c.D();if(a.Th(b))return c.F();if(c.s())return 0;if(197==b)return 4;if(33==b)return 1;if(a.Lc(b))return 2;throw h.g.ra("missing type");};return a}();h.T=a})(z||(z={}));(function(h){var a=function(){function a(){this.y=this.x=0}a.Oa=function(c,b){var e=new a;e.x=c;e.y=b;return e};
a.prototype.ma=function(c,b){this.x=c;this.y=b};a.prototype.J=function(c){this.x=c.x;this.y=c.y};a.prototype.Cq=function(c,b){return this.x===c&&this.y===b};a.prototype.Ww=function(c){return 2.220446049250313E-16>=Math.abs(this.x-c.x)&&2.220446049250313E-16>=Math.abs(this.y-c.y)};a.prototype.ub=function(c){return this.x===c.x&&this.y===c.y};a.prototype.lc=function(c){return c==this?!0:c instanceof a?this.x==c.x&&this.y==c.y:!1};a.prototype.sub=function(c){this.x-=c.x;this.y-=c.y};a.prototype.pc=function(c,
b){this.x=c.x-b.x;this.y=c.y-b.y};a.prototype.add=function(c,b){void 0!==b?(this.x=c.x+b.x,this.y=c.y+b.y):(this.x+=c.x,this.y+=c.y)};a.prototype.Bp=function(){this.x=-this.x;this.y=-this.y};a.prototype.qr=function(c){this.x=-c.x;this.y=-c.y};a.prototype.OO=function(c,b,e){this.x=c.x*(1-e)+b.x*e;this.y=c.y*(1-e)+b.y*e};a.prototype.Fr=function(c,b){this.x=this.x*c+b.x;this.y=this.y*c+b.y};a.prototype.DR=function(c,b,e){this.x=b.x*c+e.x;this.y=b.y*c+e.y};a.prototype.scale=function(c){this.x*=c;this.y*=
c};a.prototype.compare=function(c){return this.y<c.y?-1:this.y>c.y?1:this.x<c.x?-1:this.x>c.x?1:0};a.prototype.normalize=function(){var c=this.length();0==c&&(this.x=1,this.y=0);this.x/=c;this.y/=c};a.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)};a.prototype.Up=function(){return this.x*this.x+this.y*this.y};a.Fb=function(c,b){return Math.sqrt(this.Zb(c,b))};a.Yv=function(c,b,e,k){c-=e;b-=k;return Math.sqrt(c*c+b*b)};a.prototype.ml=function(c){return this.x*c.x+this.y*
c.y};a.prototype.uA=function(c){return Math.abs(this.x*c.x)+Math.abs(this.y*c.y)};a.prototype.Ai=function(c){return this.x*c.y-this.y*c.x};a.prototype.Er=function(c,b){var e=-this.x*b+this.y*c;this.x=this.x*c+this.y*b;this.y=e};a.prototype.tt=function(){var c=this.x;this.x=-this.y;this.y=c};a.prototype.zD=function(c){this.x=-c.y;this.y=c.x};a.prototype.Kp=function(){var c=this.x;this.x=this.y;this.y=-c};a.prototype.FA=function(){this.y=this.x=NaN};a.prototype.pv=function(){return isNaN(this.x)};a.prototype.ps=
function(){return 0<this.x?0<=this.y?1:4:0<this.y?2:0==this.x?4:3};a.cq=function(c,b){var e=c.ps(),k=b.ps();return k==e?(e=c.Ai(b),0>e?1:0<e?-1:0):e<k?-1:1};a.HT=function(c,b){return a.cq(c,b)};a.Zb=function(c,b){var e=c.x-b.x;c=c.y-b.y;return e*e+c*c};a.prototype.toString=function(){return"("+this.x+" , "+this.y+")"};a.prototype.Eh=function(){this.y=this.x=NaN};a.prototype.yJ=function(){return this.pv()?NaN:Math.abs(this.x)>=Math.abs(this.y)?Math.abs(this.x):Math.abs(this.y)};a.prototype.offset=
function(c,b){var e=a.Fb(c,b),k=a.Oa(this.x,this.y);if(0==e)return a.Fb(k,c);var n=new a;n.J(b);n.sub(c);k.sub(c);return k.Ai(n)/e};a.yn=function(c,b,e){var k=new h.$k;k.set(b.x);k.sub(c.x);var n=new h.$k;n.set(e.y);n.sub(c.y);var u=new h.$k;u.set(b.y);u.sub(c.y);var a=new h.$k;a.set(e.x);a.sub(c.x);k.Ap(n);u.Ap(a);k.sub(u);if(!k.Dq())return e=k.value(),0>e?-1:0<e?1:0;k=new h.Tn(b.x);n=new h.Tn(c.x);u=new h.Tn(c.y);k=k.nr(n);c=new h.Tn(e.y);c=c.nr(u);b=new h.Tn(b.y);b=b.nr(u);e=new h.Tn(e.x);e=e.nr(n);
k=k.Wp(c);b=b.Wp(e);k=k.Wp(b);return k.vP()?-1:k.nO()?1:0};a.prototype.hc=function(){return h.I.Rh(h.I.Rh())};return a}();h.b=a})(z||(z={}));(function(h){var a=function(){function h(c){this.Ov=this.Or=0;this.ES=c}h.prototype.reset=function(){this.Ov=this.Or=0};h.prototype.add=function(c){c-=this.Ov;var b=this.Or+c;this.Ov=b-this.Or-c;this.Or=b};h.prototype.sub=function(c){this.add(-c)};h.prototype.rl=function(){return this.ES+this.Or};return h}();h.av=a;a=function(){function h(){}h.LT=function(c,
b){return 0<=b?Math.abs(c):-Math.abs(c)};h.sign=function(c){return 0>c?-1:0<c?1:0};h.gH=function(c){return c-360*Math.floor(c/360)};h.round=function(c){return Math.floor(c+.5)};h.Ty=function(c){return c*c};h.ut=function(c,b,e){var k;.5>=e?k=c+(b-c)*e:k=b-(b-c)*(1-e);return k};h.BD=function(c,b,e,k){.5>=e?(k.x=c.x+(b.x-c.x)*e,k.y=c.y+(b.y-c.y)*e):(k.x=b.x-(b.x-c.x)*(1-e),k.y=b.y-(b.y-c.y)*(1-e))};h.tP=function(c,b,e,k,n,u){.5>=n?(u.x=c+(e-c)*n,u.y=b+(k-b)*n):(u.x=e-(e-c)*(1-n),u.y=k-(k-b)*(1-n))};
return h}();h.vi=a})(z||(z={}));(function(h){var a=function(a){function c(){a.call(this);this.ha=this.la=this.ja=this.na=0;this.fa=null}I(c,a);c.prototype.Mb=function(){return h.b.Oa(this.na,this.ja)};c.prototype.ht=function(b){b.x=this.na;b.y=this.ja};c.prototype.ed=function(b){this.gl(0,b)};c.prototype.Ny=function(b,e){this.gl(0,h.b.Oa(b,e))};c.prototype.En=function(b){this.wA(0,b)};c.prototype.setStart=function(b){this.CA(0,b)};c.prototype.gt=function(b,e){return this.yd(0,b,e)};c.prototype.My=
function(b,e,c){this.om(0,b,e,c)};c.prototype.oc=function(){return h.b.Oa(this.la,this.ha)};c.prototype.uw=function(b){b.x=this.la;b.y=this.ha};c.prototype.vd=function(b){this.gl(1,b)};c.prototype.Ok=function(b,e){this.gl(1,h.b.Oa(b,e))};c.prototype.Bn=function(b){this.wA(1,b)};c.prototype.setEnd=function(b){this.CA(1,b)};c.prototype.Ws=function(b,e){return this.yd(1,b,e)};c.prototype.Cy=function(b,e,c){this.om(1,b,e,c)};c.prototype.fb=function(){return 1};c.prototype.s=function(){return this.sc()};
c.prototype.Ja=function(){};c.prototype.Mh=function(){return 0};c.prototype.Ga=function(b,e,c,n,u){return this.wJ(b,e,c,n,u)};c.prototype.jc=function(b,e){return 0!=this.fq(b,e,!1)};c.prototype.Eq=function(b,e){return this.qs(b,e,!1)};c.prototype.qs=function(){return null};c.prototype.sc=function(){return!1};c.prototype.rv=function(b){this.qc();if(null==this.fa&&0<b)this.fa=h.I.Lh(2*b);else if(null!=this.fa&&this.fa.length<2*b){for(var e=this.fa.slice(0),c=this.fa.length;c<2*b;c++)e[c]=0;this.fa=
e}};c.KI=function(b,e,c){if(0<c)var k=0;for(var u=0;u<c;u++)e[0+k]=b[0],k++};c.prototype.gl=function(b,e){0!=b?(this.la=e.x,this.ha=e.y):(this.na=e.x,this.ja=e.y)};c.prototype.nm=function(b){if(null!=this.fa){for(var e=h.Od.iu(b,this.description),k=[],n=c.Xk(this.description,0),u=c.Xk(this.description,1),a=c.Xk(b,0),d=c.Xk(b,1),G=0,f=1,g=b.Aa;f<g;f++){var y=b.Hd(f),l=h.pa.Wa(y);if(-1==e[f])for(var m=h.pa.ue(y),y=0;y<l;y++)k[a+G]=m,k[d+G]=m,G++;else for(m=this.description.fj(e[f])-2,y=0;y<l;y++)k[a+
G]=this.fa[n+m],k[d+G]=this.fa[u+m],G++,m++}this.fa=k}this.description=b};c.prototype.wA=function(b,e){if(this.sc())throw h.g.ra("empty geometry");e.Qf(this.description);e.sc()&&e.ko();for(var c=0;c<this.description.Aa;c++)for(var n=this.description.Fd(c),u=0,a=h.pa.Wa(n);u<a;u++){var d=this.yd(b,n,u);e.setAttribute(n,u,d)}};c.prototype.CA=function(b,e){this.qc();if(e.sc())throw h.g.ra("empty geometry");for(var c=e.description,n=0,u=c.Aa;n<u;n++)for(var a=c.Fd(n),d=h.pa.Wa(a),G=0;G<d;G++){var f=e.ld(a,
G);this.om(b,a,G,f)}};c.prototype.yd=function(b,e,k){if(this.sc())throw h.g.ra("This operation was performed on an Empty Geometry.");if(0==e)return 0!=b?0!=k?this.ha:this.la:0!=k?this.ja:this.na;if(k>=h.pa.Wa(e))throw h.g.Uc();var n=this.description.zf(e);return 0<=n?(null!=this.fa&&this.rv(this.description.le.length-2),this.fa[c.Xk(this.description,b)+this.description.fj(n)-2+k]):h.pa.ue(e)};c.prototype.om=function(b,e,k,n){this.qc();if(k>=h.pa.Wa(e))throw h.g.Uc();var u=this.description.zf(e);0>
u&&(this.Ne(e),u=this.description.zf(e));0==e?0!=b?0!=k?this.ha=n:this.la=n:0!=k?this.ja=n:this.na=n:(null==this.fa&&this.rv(this.description.le.length-2),this.fa[c.Xk(this.description,b)+this.description.fj(u)-2+k]=n)};c.prototype.copyTo=function(b){if(b.D()!=this.D())throw h.g.N();b.description=this.description;b.rv(this.description.le.length-2);c.KI(this.fa,b.fa,2*(this.description.le.length-2));b.na=this.na;b.ja=this.ja;b.la=this.la;b.ha=this.ha;b.qc();this.eo(b)};c.prototype.Ah=function(b,e){var c=
new h.Nd;if(this.sc())return c.Ja(),c;c.qa=this.yd(0,b,e);c.va=c.qa;c.Oj(this.yd(1,b,e));return c};c.prototype.XE=function(b){this.sc()?b.Ja():(b.qa=this.yd(0,0,0),b.va=b.qa,b.Oj(this.yd(1,0,0)))};c.prototype.uu=function(b,e){e.Qf(this.description);e.ic(this.Kb(b));for(var c=1,n=this.description.Aa;c<n;c++)for(var u=this.description.Fd(c),a=h.pa.Wa(u),d=0;d<a;d++){var G=this.ld(b,u,d);e.setAttribute(u,d,G)}};c.prototype.sJ=function(b){if(this.description!=b.description||this.na!=b.na||this.la!=b.la||
this.ja!=b.ja||this.ha!=b.ha)return!1;for(var e=0;e<2*(this.description.le.length-2);e++)if(this.fa[e]!=b.fa[e])return!1;return!0};c.prototype.kD=function(){return this.na==this.la&&this.ja==this.ha};c.prototype.reverse=function(){var b=this.na;this.na=this.la;this.la=b;b=this.ja;this.ja=this.ha;this.ha=b;for(var b=1,e=this.description.Aa;b<e;b++)for(var c=this.description.Hd(b),n=0,u=h.pa.Wa(c);n<u;n++){var a=this.yd(0,c,n),d=this.yd(1,c,n);this.om(0,c,n,d);this.om(1,c,n,a)}};c.prototype.fq=function(b,
e,c){var k=b.D();switch(this.D()){case 322:if(322==k)return h.yb.xJ(this,b,e,c);throw h.g.wa();default:throw h.g.wa();}};c.prototype.wJ=function(b,e,c,n,u){var k=b.D();switch(this.D()){case 322:if(322==k)return h.yb.ov(this,b,e,c,n,u);throw h.g.wa();default:throw h.g.wa();}};c.prototype.kv=function(){return null};c.Xk=function(b,e){return e*(b.le.length-2)};c.prototype.Kb=function(b,e){if(void 0===e)return e=new h.b,this.Kb(b,e),e;h.vi.tP(this.na,this.ja,this.la,this.ha,b,e)};c.prototype.Gd=function(){return null};
c.prototype.TC=function(){return null};c.prototype.nt=function(){return null};c.prototype.mg=function(){return null};c.prototype.mD=function(){return null};c.prototype.Pf=function(){return null};c.prototype.rA=function(b,e){return void 0!==e?this.Ru(e)-this.Ru(b):this.Ru(b)};c.prototype.eo=function(){};c.prototype.xm=function(){return null};c.prototype.Bi=function(){};c.prototype.ld=function(){return null};c.prototype.xe=function(){return null};c.prototype.Ru=function(){return null};c.prototype.AD=
function(){return null};c.prototype.Fb=function(b,e){if(!e&&0!=this.fq(b,0,!1))return 0;e=1.7976931348623157E308;var c,n;c=this.Mb();n=b.Gd(c,!1);c.sub(b.Kb(n));c=c.length();c<e&&(e=c);c=this.oc();n=b.Gd(c,!1);c.sub(b.Kb(n));c=c.length();c<e&&(e=c);c=b.Mb();n=this.Gd(c,!1);c.sub(this.Kb(n));c=c.length();c<e&&(e=c);c=b.oc();n=this.Gd(c,!1);c.sub(this.Kb(n));c=c.length();c<e&&(e=c);return e};c.prototype.Rf=function(){return h.Hh.il(this,null)};return c}(h.T);h.fA=a})(z||(z={}));new z.b;(function(h){(function(h){h[h.Unknown=
-1]="Unknown";h[h.Not=0]="Not";h[h.Weak=1]="Weak";h[h.Strong=2]="Strong"})(h.tH||(h.tH={}));(function(h){h[h.DirtyIsKnownSimple=1]="DirtyIsKnownSimple";h[h.IsWeakSimple=2]="IsWeakSimple";h[h.IsStrongSimple=4]="IsStrongSimple";h[h.DirtyOGCFlags=8]="DirtyOGCFlags";h[h.DirtyVerifiedStreams=32]="DirtyVerifiedStreams";h[h.DirtyExactIntervals=64]="DirtyExactIntervals";h[h.DirtyLooseIntervals=128]="DirtyLooseIntervals";h[h.DirtyIntervals=192]="DirtyIntervals";h[h.DirtyIsEnvelope=256]="DirtyIsEnvelope";h[h.DirtyLength2D=
512]="DirtyLength2D";h[h.DirtyRingAreas2D=1024]="DirtyRingAreas2D";h[h.DirtyCoordinates=1993]="DirtyCoordinates";h[h.DirtyAllInternal=65535]="DirtyAllInternal";h[h.DirtyAll=16777215]="DirtyAll"})(h.cH||(h.cH={}));var a=function(a){function c(){a.call(this);this.El=65535;this.ta=0;this.rg=-1;this.pb=null}I(c,a);c.prototype.eo=function(){};c.prototype.qv=function(){};c.prototype.xv=function(){};c.prototype.F=function(){return this.ta};c.prototype.s=function(){return this.sc()};c.prototype.sc=function(){return 0==
this.ta};c.prototype.gj=function(b){return 0!=(this.El&b)};c.prototype.yf=function(b,e){this.El=e?this.El|b:this.El&~b};c.prototype.kc=function(){this.gj(32)&&this.FJ()};c.prototype.Su=function(){if(this.sc())throw h.g.ra("This operation was performed on an Empty Geometry.");};c.prototype.Sd=function(b,e){if(0>b||b>=this.ta)throw h.g.ra("index out of bounds");this.kc();e.Qf(this.description);e.s()&&e.ko();for(var c=0;c<this.description.Aa;c++)for(var n=this.description.Fd(c),u=0,a=h.pa.Wa(n);u<a;u++){var d=
this.Ba[c].Bh(a*b+u);e.setAttribute(n,u,d)}};c.prototype.Iu=function(b,e){this.kc();for(var c=e.description,n=0;n<c.Aa;n++)for(var u=c.Fd(n),a=h.pa.Wa(u),d=0;d<a;d++){var G=e.ld(u,d);this.setAttribute(u,b,d,G)}};c.prototype.w=function(b,e){if(0>b||b>=this.F())throw h.g.Uc();this.kc();this.Ba[0].ec(2*b,e)};c.prototype.Fa=function(b){var e=new h.b;this.w(b,e);return e};c.prototype.uc=function(b,e){this.Ba[0].ec(2*b,e)};c.prototype.ic=function(b,e,c){if(0>b||b>=this.ta)throw h.g.Uc();this.kc();var k=
this.Ba[0];void 0!==c?(k.write(2*b,e),k.write(2*b+1,c)):k.Rn(2*b,e);this.ce(1993)};c.prototype.Lw=function(b){if(0>b||b>=this.F())throw h.g.Uc();this.kc();var e=this.Ba[0],c=new h.ee;c.x=e.read(2*b);c.y=e.read(2*b+1);c.z=this.hasAttribute(1)?this.Ba[1].Bh(b):h.pa.ue(1);return c};c.prototype.Py=function(b,e){if(0>b||b>=this.F())throw h.g.Uc();this.Ne(1);this.kc();this.ce(1993);var c=this.Ba[0];c.write(2*b,e.x);c.write(2*b+1,e.y);this.Ba[1].Uk(b,e.z)};c.prototype.ld=function(b,e,c){if(0>e||e>=this.ta)throw h.g.Uc();
var k=h.pa.Wa(b);if(c>=k)throw h.g.Uc();this.kc();var u=this.description.zf(b);return 0<=u?this.Ba[u].Bh(e*k+c):h.pa.ue(b)};c.prototype.nC=function(b,e,c){return this.ld(b,e,c)};c.prototype.setAttribute=function(b,e,c,n){if(0>e||e>=this.ta)throw h.g.Uc();var k=h.pa.Wa(b);if(c>=k)throw h.g.Uc();this.Ne(b);this.kc();b=this.description.zf(b);this.ce(1993);this.Ba[b].Uk(e*k+c,n)};c.prototype.mc=function(b){this.Su();this.Ne(b);this.kc();return this.Ba[this.description.zf(b)]};c.prototype.bm=function(b,
e){if(null!=e&&h.pa.Qh(b)!=e.Qh())throw h.g.N();this.Ne(b);b=this.description.zf(b);null==this.Ba&&(this.Ba=h.Ac.ay(this.description.Aa));this.Ba[b]=e;this.ce(16777215)};c.prototype.nm=function(b){var e=null;if(null!=this.Ba)for(var c=h.Od.iu(b,this.description),e=[],n=0,u=b.Aa;n<u;n++)-1!=c[n]&&(e[n]=this.Ba[c[n]]);this.description=b;this.Ba=e;this.rg=-1;this.ce(16777215)};c.prototype.IA=function(b){this.ss(!0);b instanceof h.i?this.R.o(b):this.R.Cn(b)};c.prototype.EJ=function(b){this.ss(!1);b instanceof
h.i?this.R.o(b):this.R.Cn(b)};c.prototype.Fp=function(b){this.ss(!0);this.R.copyTo(b)};c.prototype.o=function(b){this.IA(b)};c.prototype.Cn=function(b){this.IA(b)};c.prototype.dd=function(b){this.EJ(b)};c.prototype.Ah=function(b,e){var c=new h.Nd;if(this.sc())return c.Ja(),c;this.ss(!0);return this.R.Ah(b,e)};c.prototype.hc=function(){var b=this.description.hc();if(!this.sc())for(var e=this.F(),c=0,n=this.description.Aa;c<n;c++)b=this.Ba[c].jj(b,0,e*h.pa.Wa(this.description.Fd(c)));return b};c.prototype.lc=
function(b){if(b==this)return!0;if(!(b instanceof c&&this.description.lc(b.description))||this.sc()!=b.sc())return!1;if(this.sc())return!0;var e=this.F();if(e!=b.F())return!1;for(var k=0;k<this.description.Aa;k++){var n=this.description.Hd(k),u=this.mc(n),a=b.mc(n);if(!u.lc(a,0,e*h.pa.Wa(n)))return!1}return!0};c.prototype.copyTo=function(b){if(b.D()!=this.D())throw h.g.N();this.tA(b)};c.prototype.tA=function(b){this.kc();b.description=this.description;b.Ba=null;var e=this.description.Aa,c=null;if(null!=
this.Ba)for(var c=[],n=0;n<e;n++)null!=this.Ba[n]&&(c[n]=this.Ba[n].Ip(this.F()*h.pa.Wa(this.description.Fd(n))));null!=this.R?(b.R=this.R.Pa(),this.R.copyTo(b.R)):b.R=null;b.ta=this.ta;b.El=this.El;b.Ba=c;try{this.eo(b)}catch(u){throw b.Ja(),h.g.BI();}};c.prototype.EA=function(){this.ta=0;this.rg=-1;this.Ba=null;this.ce(16777215)};c.prototype.ce=function(b){16777215==b&&(this.rg=-1,this.qv());this.El|=b;this.kJ();this.qc()};c.prototype.ss=function(b){this.kc();if(this.gj(192))if(null==this.R?this.R=
new h.Vj(this.description):this.R.Qf(this.description),this.s())this.R.Ja();else{this.wv(b);for(var e=1;e<this.description.Aa;e++)for(var c=this.description.Fd(e),n=h.pa.Wa(c),u=this.Ba[e],a=0;a<n;a++){var d=new h.Nd;d.Ja();for(var G=0;G<this.ta;G++){var f=u.Bh(G*n+a);d.Db(f)}this.R.setInterval(c,a,d)}b&&this.yf(192,!1)}};c.prototype.wv=function(){this.R.Ja();for(var b=this.Ba[0],e=new h.b,c=0;c<this.ta;c++)b.ec(2*c,e),this.R.Db(e)};c.prototype.tm=function(b){b.Ja();for(var e=this.Ba[0],c=new h.b,
n=0;n<this.ta;n++)e.ec(2*n,c),b.Db(c)};c.prototype.FJ=function(){if(this.rg<this.ta){null==this.Ba&&(this.Ba=h.Ac.ay(this.description.Aa));this.rg=2147483647;for(var b=0;b<this.description.Aa;b++){var e=this.description.Fd(b);if(null!=this.Ba[b]){var c=h.pa.Wa(e),n=h.I.truncate(this.Ba[b].size/c);n<this.ta&&(n=h.I.truncate(this.rg>this.ta+5?(5*this.ta+3)/4:this.ta),this.Ba[b].resize(n*c,h.pa.ue(e)));n<this.rg&&(this.rg=n)}else this.Ba[b]=h.Ac.Tv(e,this.ta),this.rg=this.ta}}this.xv();this.yf(32,!1)};
c.prototype.jo=function(b){if(0>b)throw h.g.N();b!=this.ta&&(this.ta=b,this.ce(65535))};c.prototype.rj=function(b){if(!this.gj(1)){if(!this.gj(2))return 0;if(this.TP>=b)return this.gj(8)?1:2}return-1};c.prototype.hg=function(b,e){this.TP=e;if(-1==b)this.yf(1,!0),this.yf(8,!0);else if(this.yf(1,!1),this.yf(8,!0),0==b)this.yf(2,!1),this.yf(4,!1);else if(1==b)this.yf(2,!0),this.yf(4,!1);else if(2==b)this.yf(2,!0),this.yf(4,!0);else throw h.g.ra("internal error.");};c.prototype.kJ=function(){null!=this.pb&&
(this.pb=null)};c.prototype.vJ=function(b,e,c,n){if(0>b||b>=this.ta)throw h.g.ra("index out of bounds");if(0>e||e>=this.ta)throw h.g.ra("index out of bounds");this.kc();n.Qf(this.description);n.s()&&n.ko();for(var k=0;k<this.description.Aa;k++)for(var a=this.description.Fd(k),d=0,G=h.pa.Wa(a);d<G;d++){var f=this.Ba[k].Bh(G*b+d),g=this.Ba[k].Bh(G*e+d);n.setAttribute(a,d,h.vi.ut(f,g,c))}};c.prototype.mv=function(b,e){var c=this.Ba[0].f,n=c[2*b]-c[2*e],c=c[2*b+1]-c[2*e+1];return Math.sqrt(n*n+c*c)};
c.prototype.bh=function(b,e){if(0>b||b>=this.ta)throw h.g.Uc();if(e.s())throw h.g.N();this.kc();for(var c=e.description,n=0;n<c.Aa;n++)for(var u=c.Hd(n),a=h.pa.Wa(u),d=0;d<a;d++){var G=e.ld(u,d);this.setAttribute(u,b,d,G)}};c.prototype.jv=function(){return null};c.prototype.dj=function(){return null};return c}(h.T);h.Wr=a})(z||(z={}));(function(h){var a=function(){function a(){this.cb=this.Qm=null;this.Ol=124234251;this.Ct=!0;this.Ae=-1;this.cb=new h.Fc(7);this.Qm=null}a.prototype.Hn=function(c){this.Qm=
c};a.prototype.lM=function(){this.Ct=!1};a.prototype.de=function(c){this.cb.de(c)};a.prototype.nq=function(c){var b=this.cb.be();this.mS(b);this.oS(c,b);return b};a.prototype.fM=function(c){this.cb.Jc(c)};a.prototype.addElement=function(c,b){var e;-1==b?(-1==this.Ae&&(this.Ae=this.nq(-1)),e=this.Ae):e=b;return this.MA(c,0,e)};a.prototype.PA=function(c){-1==this.Ae&&(this.Ae=this.nq(-1));return this.MA(c,1,this.Ae)};a.prototype.qm=function(c){var b;-1==this.Ae&&(this.Ae=this.nq(-1));b=this.Ae;var e=
this.cb.f;if(-1==b||-1==e[7*b])return c=this.cb.Pj([-1,-1,-1,c,this.ck(),-1,-1]),e=this.cb.f,e[7*b]=c,this.mo(-1,c,b,e),c;var k=-1==b?-1:e[7*b+2];c=this.cb.Pj([-1,-1,k,c,this.ck(),-1,-1]);e=this.cb.f;e[7*k+1]=c;this.Fv(c,e);-1===e[7*c+2]&&(e[7*b]=c);this.mo(-1,c,b,e);return c};a.prototype.vs=function(c,b,e,k){var n=-1;-1==n&&(-1==this.Ae&&(this.Ae=this.nq(-1)),n=this.Ae);var u=this.cb.f;if(-1==n||-1==u[7*n])return e=this.cb.Pj([-1,-1,-1,e,this.ck(),-1,-1]),u=this.cb.f,u[7*n]=e,this.mo(-1,e,n,u),e;
var a;k?(k=-1!=b?this.Qm.compare(this,e,b):-1,a=-1!=c?this.Qm.compare(this,e,c):1):(k=-1,a=1);if(0==k||0==a)return u[7*n+3]=0==k?b:c,-1;(-1!=b&&-1!=c?this.Ol>h.I.$x(this.Ol)>>1:-1!=b)?c=b:k=a;for(b=!0;;){if(0>k)if(a=u[7*c],-1!=a)c=a;else{k=c;e=this.cb.Pj([-1,-1,c,e,this.ck(),-1,-1]);u=this.cb.f;u[7*c]=e;break}else if(a=u[7*c+1],-1!=a)c=a;else{k=u[7*c+6];e=this.cb.Pj([-1,-1,c,e,this.ck(),-1,-1]);u=this.cb.f;u[7*c+1]=e;break}b&&(k*=-1,b=!1)}this.Fv(e,u);-1===u[7*e+2]&&(u[7*n]=e);this.mo(k,e,n,u);return e};
a.prototype.tC=function(){return this.xN(this.Ae)};a.prototype.kd=function(c,b){b=-1==b?this.Ae:b;this.Ct?this.eM(c,b):this.$S(c,b)};a.prototype.search=function(c,b){for(b=this.dt(b);-1!=b;){var e=this.Qm.compare(this,c,b);if(0==e)return b;b=0>e?this.ik(b):this.Jo(b)}return-1};a.prototype.GR=function(c){for(var b=this.dt(-1),e=-1;-1!=b;){var k=c.compare(this,b);if(0==k)return b;0>k?b=this.ik(b):(e=b,b=this.Jo(b))}return e};a.prototype.sF=function(c){for(var b=this.dt(-1),e=-1;-1!=b;){var k=c.compare(this,
b);if(0==k)return b;0>k?(e=b,b=this.ik(b)):b=this.Jo(b)}return e};a.prototype.da=function(c){return this.cb.O(c,3)};a.prototype.ik=function(c){return this.cb.O(c,0)};a.prototype.Jo=function(c){return this.cb.O(c,1)};a.prototype.getParent=function(c){return this.cb.O(c,2)};a.prototype.bb=function(c){return this.cb.O(c,6)};a.prototype.ge=function(c){return this.cb.O(c,5)};a.prototype.gc=function(c){return-1==c?this.gk(this.Ae):this.gk(c)};a.prototype.tc=function(c){return-1==c?this.uq(this.Ae):this.uq(c)};
a.prototype.hO=function(c){return-1==c?this.QC(this.Ae):this.QC(c)};a.prototype.Vi=function(c,b){this.By(c,b)};a.prototype.dt=function(c){return-1==c?this.MC(this.Ae):this.MC(c)};a.prototype.clear=function(){this.cb.Nh(!1);this.Ae=-1};a.prototype.size=function(c){return-1==c?this.OC(this.Ae):this.OC(c)};a.prototype.pK=function(c,b){for(var e=b[7*c],k=b[7*c+1],n=b[7*c+4];-1!=e||-1!=k;){var u=-1!=e?b[7*e+4]:2147483647,k=-1!=k?b[7*k+4]:2147483647;if(n<=Math.min(u,k))break;u<=k?this.oF(e,b):this.nF(c,
b);e=b[7*c];k=b[7*c+1]}};a.prototype.Fv=function(c,b){if(this.Ct)for(var e=b[7*c+4],k=b[7*c+2];-1!=k&&b[7*k+4]>e;)b[7*k]==c?this.oF(c,b):this.nF(k,b),k=b[7*c+2]};a.prototype.nF=function(c,b){var e=b[7*c+1],k;b[7*e+2]=b[7*c+2];b[7*c+2]=e;k=b[7*e];b[7*c+1]=k;-1!=k&&(b[7*k+2]=c);b[7*e]=c;k=b[7*e+2];-1!=k&&(b[7*k]==c?b[7*k]=e:b[7*k+1]=e)};a.prototype.oF=function(c,b){var e=b[7*c+2],k;b[7*c+2]=b[7*e+2];b[7*e+2]=c;k=b[7*c+1];b[7*e]=k;-1!=k&&(b[7*k+2]=e);b[7*c+1]=e;k=b[7*c+2];-1!=k&&(b[7*k]===e?b[7*k]=c:
b[7*k+1]=c)};a.prototype.Tj=function(c,b){this.cb.L(c,2,b)};a.prototype.Gy=function(c,b){this.cb.L(c,0,b)};a.prototype.Ky=function(c,b){this.cb.L(c,1,b)};a.prototype.Jy=function(c,b){this.cb.L(c,5,b)};a.prototype.Gu=function(c,b){this.cb.L(c,6,b)};a.prototype.VF=function(c,b){this.cb.L(b,0,c)};a.prototype.mS=function(c){this.cb.L(c,4,0)};a.prototype.oS=function(c,b){this.cb.L(b,5,c)};a.prototype.MC=function(c){return-1==c?-1:this.cb.O(c,0)};a.prototype.gk=function(c){return-1==c?-1:this.cb.O(c,1)};
a.prototype.uq=function(c){return-1==c?-1:this.cb.O(c,2)};a.prototype.xN=function(c){return-1==c?-1:this.cb.O(c,3)};a.prototype.OC=function(c){return-1==c?0:this.cb.O(c,4)};a.prototype.QC=function(c){return this.cb.O(c,5)};a.prototype.ou=function(c){return this.cb.Pj([-1,-1,-1,c,this.ck(),-1,-1])};a.prototype.bk=function(c){-1!=c&&this.cb.Jc(c)};a.prototype.ck=function(){this.Ol=h.I.$x(this.Ol);return this.Ol&1073741823};a.prototype.MA=function(c,b,e){var k=this.cb.f;if(-1==e||-1==k[7*e])return c=
this.cb.Pj([-1,-1,-1,c,this.ck(),-1,-1]),k=this.cb.f,k[7*e]=c,this.mo(-1,c,e,k),c;for(var n=-1==e?-1:k[7*e];;){var u=-1==b?1:this.Qm.compare(this,c,n);if(0>u)if(u=this.ik(n),-1!=u)n=u;else{b=n;c=this.cb.Pj([-1,-1,n,c,this.ck(),-1,-1]);k=this.cb.f;k[7*n]=c;break}else{if(1==b&&0==u)return k[7*e+3]=n,-1;u=k[7*n+1];if(-1!=u)n=u;else{b=k[7*n+6];c=this.cb.Pj([-1,-1,n,c,this.ck(),-1,-1]);k=this.cb.f;k[7*n+1]=c;break}}}this.Fv(c,k);-1===k[7*c+2]&&(k[7*e]=c);this.mo(b,c,e,k);return c};a.prototype.mo=function(c,
b,e,k){var n;-1!=c?(n=k[7*c+5],k[7*c+5]=b):n=-1==e?-1:k[7*e+2];k[7*b+5]=n;-1!=n&&(k[7*n+6]=b);k[7*b+6]=c;c==(-1==e?-1:k[7*e+1])&&(k[7*e+1]=b);-1==c&&(k[7*e+2]=b);k[7*e+4]=(-1==e?0:k[7*e+4])+1};a.prototype.ry=function(c,b){var e=this.cb.f,k=e[7*c+5];c=e[7*c+6];-1!=k?e[7*k+6]=c:e[7*b+1]=c;-1!=c?e[7*c+5]=k:e[7*b+2]=k;e[7*b+4]=-1===b?-1:e[7*b+4]-1};a.prototype.$S=function(c,b){this.ry(c,b);var e=this.ik(c),k=this.Jo(c),n=this.getParent(c),u=c;if(-1!=e&&-1!=k){this.Ol=h.I.$x(this.Ol);var a;a=1073741823<
this.Ol?this.bb(c):this.ge(c);var d=this.getParent(a)==c;this.cb.Pu(c,a,0);this.cb.Pu(c,a,1);this.cb.Pu(c,a,2);-1!=n?this.ik(n)==c?this.Gy(n,a):this.Ky(n,a):this.VF(a,b);d?(e==a?(this.Gy(a,c),this.Tj(k,a)):k==a&&(this.Ky(a,c),this.Tj(e,a)),this.Tj(c,a),n=a):(this.Tj(e,a),this.Tj(k,a),n=this.getParent(c),u=a);e=this.ik(c);k=this.Jo(c);-1!=e&&this.Tj(e,c);-1!=k&&this.Tj(k,c)}e=-1!=e?e:k;-1==n?this.VF(e,b):this.ik(n)==u?this.Gy(n,e):this.Ky(n,e);-1!=e&&this.Tj(e,n);this.bk(c,b)};a.prototype.eM=function(c,
b){var e=this.cb.f;e[7*c+4]=2147483647;var k=-1,n=-1,u=-1===b?-1:e[7*b],h=u==c;h&&(k=e[7*u],n=e[7*u+1],-1==k&&-1==n)?(this.ry(u,b),this.bk(u,b),e[7*b]=-1):(this.pK(c,e),u=e[7*c+2],-1!=u&&(e[7*u]==c?e[7*u]=-1:e[7*u+1]=-1),this.ry(c,b),this.bk(c,b),h&&(e[7*b]=-1==k||-1!=e[7*k+2]?n:k))};a.prototype.By=function(c,b){this.cb.L(c,3,b)};return a}();h.bj=a})(z||(z={}));(function(h){var a=function(){function a(c,b){void 0!==c&&this.K(c,b)}a.prototype.K=function(c,b){this.qa=c;this.va=b;this.normalize()};a.prototype.normalize=
function(){if(!isNaN(this.qa)){if(this.qa>this.va){var c=this.qa;this.qa=this.va;this.va=c}isNaN(this.va)&&this.Ja()}};a.prototype.Ja=function(){this.va=this.qa=NaN};a.prototype.s=function(){return isNaN(this.qa)};a.prototype.Db=function(c){"number"===typeof c?this.s()?this.va=this.qa=c:this.Oj(c):c.s()||(this.s()?(this.qa=c.qa,this.va=c.va):(this.qa>c.qa&&(this.qa=c.qa),this.va<c.va&&(this.va=c.va),this.qa>this.va&&this.Ja()))};a.prototype.Oj=function(c){c<this.qa?this.qa=c:c>this.va&&(this.va=c)};
a.prototype.contains=function(c){return"number"===typeof c?c>=this.qa&&c<=this.va:c.qa>=this.qa&&c.va<=this.va};a.prototype.Ga=function(c){this.s()||c.s()?this.Ja():(this.qa<c.qa&&(this.qa=c.qa),this.va>c.va&&(this.va=c.va),this.qa>this.va&&this.Ja())};a.prototype.P=function(c){this.s()||(this.qa-=c,this.va+=c,this.va<this.qa&&this.Ja())};a.prototype.lv=function(){return this.s()?2.220446049250313E-14:2.220446049250313E-14*(Math.abs(this.qa)+Math.abs(this.va)+1)};a.prototype.yy=function(c,b){c>b?
(this.qa=b,this.va=c):(this.qa=c,this.va=b)};a.prototype.Sy=function(c){return h.I.Kr(c,this.qa,this.va)};a.prototype.aa=function(){return this.va-this.qa};a.prototype.Af=function(){return.5*(this.qa+this.va)};a.prototype.lc=function(c){return c==this?!0:c instanceof a?this.s()&&c.s()?!0:this.qa!=c.qa||this.va!=c.va?!1:!0:!1};a.prototype.hc=function(){return h.I.Rh(h.I.Rh())};return a}();h.Nd=a})(z||(z={}));(function(h){var a=new h.Nd,d=new h.Nd,c=function(){return function(){this.Zd=null;this.Lf=
-1;this.ib=new h.yb;this.ux=55555555;this.Et=this.Ft=!1;this.$h=new h.Nd;this.$h.yy(0,0)}}();h.XT=c;var b=function(){function b(b,e,u){this.a=b;this.Mj=NaN;this.mE=this.sp=0;this.nE=NaN;this.ka=e;this.tp=10*e;this.oE=this.pE=NaN;this.Zf=!1;this.Cl=this.mr=this.un=this.gr=this.fr=-1;this.lx=u;this.Rx=new c;this.vE=new c;h.I.truncate(3*b.pd/2)}b.prototype.$C=function(b,e,c,h){b.Zd=null===h?null:h[c[5*e]];b.Et=null!=b.Zd;b.Et||(h=c[5*e+2],-1!==h&&this.a.gR(c[5*e],c[5*h],b.ib),b.Zd=b.ib,b.$h.yy(b.ib.na,
b.ib.la),b.$h.va+=this.ka,b.ib.KE(),b.Ft=b.ib.ha==b.ib.ja,b.Ft||(b.ux=(b.ib.la-b.ib.na)/(b.ib.ha-b.ib.ja)))};b.prototype.tL=function(b,e){var c=b.fq(e,this.ka,!0);if(0!=c)return 2==c?this.aw():this.Oh();b.ht(K);b.uw(L);e.ht(N);e.uw(Q);M.ma(this.sp,this.Mj);K.ub(N)&&this.Mj==K.y?0>L.compare(Q)?M.J(L):M.J(Q):K.ub(Q)&&this.Mj==K.y?0>L.compare(N)?M.J(L):M.J(N):N.ub(L)&&this.Mj==N.y?0>K.compare(Q)?M.J(K):M.J(Q):L.ub(Q)&&this.Mj==L.y&&(0>K.compare(N)?M.J(K):M.J(N));return b.xe(M.y,M.x)<e.xe(M.y,M.x)?-1:
1};b.prototype.rL=function(b,e){if(b.ib.ja==e.ib.ja&&b.ib.na==e.ib.na)return b.ib.ha==e.ib.ha&&b.ib.la==e.ib.la?this.lx?this.aw():0:this.HB(b,e);if(b.ib.ha==e.ib.ha&&b.ib.la==e.ib.la)return this.GB(b,e);var c=this.GB(b,e);b=this.HB(b,e);return 0>c&&0>b?-1:0<c&&0<b?1:this.Oh()};b.prototype.mL=function(b,e){if(b.la>e.la){if(e.la>e.na&&e.ha-e.ja<2*this.ka&&b.Kh(e.la,e.ha,this.ka))return this.Oh()}else if((e.ha-e.ja)/(e.la-e.na)*(b.la-b.na)<this.tp&&e.Kh(b.la,b.ha,this.ka))return this.Oh();return 1};
b.prototype.nL=function(b,e){if(b.na<e.na){if(e.la>e.na&&e.ha-e.ja<2*this.ka&&b.Kh(e.la,e.ha,this.ka))return this.Oh()}else if((e.ha-e.ja)/(e.la-e.na)*(b.na-b.la)<this.tp&&e.Kh(b.na,b.ja,this.ka))return this.Oh();return-1};b.prototype.oL=function(b,e){var c=new h.b;c.pc(e.oc(),e.Mb());c.Kp();c.normalize();var k=new h.b;k.pc(b.Mb(),e.Mb());var n=new h.b;n.pc(b.oc(),e.Mb());var k=k.ml(c),c=n.ml(c),n=Math.abs(k),a=Math.abs(c);if(n<a){if(n<this.tp&&e.Kh(b.na,b.ja,this.ka))return this.Oh()}else if(a<this.tp&&
e.Kh(b.la,b.ha,this.ka))return this.Oh();return 0>k&&0>c?-1:0<k&&0<c?1:this.Oh()};b.prototype.FB=function(b,e){return b.ja==e.ja&&b.na==e.na?this.mL(b,e):b.ha==e.ha&&b.la==e.la?this.nL(b,e):this.oL(b,e)};b.prototype.qL=function(b,e){return b.ha==e.ha&&b.la==e.la&&b.ja==e.ja&&b.na==e.na?this.lx?this.aw():0:this.Oh()};b.prototype.GB=function(b,e){var c=1;if(b.ib.ja<e.ib.ja){var c=-1,k=b;b=e;e=k}k=b.ib;b=e.ib;var n=k.na-b.na;e=e.ux*(k.ja-b.ja);var h=this.tp;return n<e-h?-c:n>e+h?c:b.Kh(k.na,k.ja,this.ka)?
this.Oh():n<e?-c:c};b.prototype.HB=function(b,e){var c=1;if(e.ib.ha<b.ib.ha){var c=-1,k=b;b=e;e=k}k=b.ib;b=e.ib;var n=k.la-b.na;e=e.ux*(k.ha-b.ja);var h=this.tp;return n<e-h?-c:n>e+h?c:b.Kh(k.la,k.ha,this.ka)?this.Oh():n<e?-c:c};b.prototype.aw=function(){this.Zf=!0;this.ei=new h.wd(5,this.un,this.mr);return-1};b.prototype.Oh=function(){this.Zf=!0;this.lx?this.ei=new h.wd(4,this.un,this.mr):this.mr=this.un=this.gr=this.fr=-1;return-1};b.prototype.sL=function(b,e,c,h){if(this.Zf)return-1;var k=this.nE==
this.Mj&&this.mE==this.sp,n;k&&b==this.fr?n=this.oE:(n=NaN,this.fr=-1);k&&e==this.gr?k=this.pE:(k=NaN,this.gr=-1);c.Zd.XE(a);h.Zd.XE(d);if(a.va<d.qa)return-1;if(d.va<a.qa)return 1;this.nE=this.Mj;this.mE=this.sp;isNaN(n)&&(this.fr=b,this.oE=n=b=c.Zd.xe(this.Mj,this.sp));isNaN(k)&&(this.gr=e,this.pE=k=b=h.Zd.xe(this.Mj,this.sp));return Math.abs(n-k)<=this.ka?this.tL(c.Zd,h.Zd):n<k?-1:n>k?1:0};b.prototype.lq=function(){this.Zf=!1};b.prototype.rl=function(){return this.ei};b.prototype.XF=function(b,
e){this.Mj=b;this.sp=e;this.mr=this.un=this.gr=this.fr=-1};b.prototype.compare=function(b,e,c){if(this.Zf)return-1;b=b.da(c);this.Cl=c;return this.JB(e,e,b,b)};b.prototype.JB=function(b,e,c,h){var k;this.un==e?k=this.Rx:(this.un=e,k=this.Rx,this.Rx.Lf=b,this.$C(k,e,this.a.cd.f,this.a.Ge));var n;null==n&&(this.mr=h,n=this.vE,this.vE.Lf=c,this.$C(n,h,this.a.cd.f,this.a.Ge));if(k.Et||n.Et)return this.sL(e,h,k,n);if(k.$h.va<n.$h.qa)return-1;if(n.$h.va<k.$h.qa)return 1;b=k.Ft?1:0;b|=n.Ft?2:0;return 0==
b?this.rL(k,n):1==b?this.FB(k.ib,n.ib):2==b?-1*this.FB(n.ib,k.ib):this.qL(k.ib,n.ib)};return b}();h.hA=b})(z||(z={}));(function(h){var a=function(){function a(c,b){this.a=c;this.ka=b;this.Zf=!1;this.un=-1;this.$h=new h.Nd;this.pp=new h.b;this.pp.Eh();this.Vd=new h.yb;this.Cl=-1;this.Cx=1.7976931348623157E308}a.prototype.lq=function(){this.Zf=!1;this.Cx=1.7976931348623157E308};a.prototype.bh=function(c){this.pp.J(c)};a.prototype.compare=function(c,b){return this.KB(b,c.da(b))};a.prototype.KB=function(c,
b){var e=null!=this.a.cc(b);e||(this.a.Oc(b,this.Vd),this.$h.yy(this.Vd.na,this.Vd.la));if(e)throw h.g.ra("not implemented");if(this.pp.x+this.ka<this.$h.qa)return-1;if(this.pp.x-this.ka>this.$h.va)return 1;if(this.Vd.ja==this.Vd.ha)return this.Cl=c,this.Zf=!0,0;this.Vd.KE();b=this.Vd.Mb();e=new h.b;e.pc(this.Vd.oc(),b);e.Kp();var k=new h.b;k.pc(this.pp,b);b=e.ml(k);b/=e.length();return b<10*-this.ka?-1:b>10*this.ka?1:this.Vd.Eq(this.pp,this.ka)&&(e=Math.abs(b),e<this.Cx&&(this.Cl=c,this.Cx=e),this.Zf=
!0,e<.25*this.ka)?0:0>b?-1:1};return a}();h.JI=a})(z||(z={}));(function(h){function a(c,b,e,k){e=new Float64Array(c.subarray(e,k));c.set(e,b)}var d=function(){function c(b){this.Sa=this.Xf=!1;this.f=[];var e=b;2>e&&(e=2);this.f=h.I.Lh(e,c.ob);this.size=b}c.Yc=function(b,e){c.ob=e;b=new c(b);c.ob=0;return b};c.lj=function(b){var e=new c(0);e.f=b.f.slice(0);e.size=b.size;return e};c.V=function(b,e){var k=new c(0);k.size=b.size;k.size>e&&(k.size=e);k.f=b.f.slice(0,k.size);return k};c.prototype.xb=function(){};
c.prototype.read=function(b){return this.f[b]};c.prototype.ec=function(b,e){e.x=this.f[b];e.y=this.f[b+1]};c.prototype.get=function(b){return this.f[b]};c.prototype.write=function(b,e){if(this.Sa)throw h.g.xa();this.f[b]=e};c.prototype.set=function(b,e){if(this.Sa)throw h.g.xa();this.f[b]=e};c.prototype.Rn=function(b,e){if(this.Sa)throw h.g.xa();this.f[b]=e.x;this.f[b+1]=e.y};c.prototype.add=function(b){this.resize(this.size+1);this.f[this.size-1]=b};c.prototype.Ip=function(b){return c.V(this,b)};
c.prototype.Bh=function(b){return this.read(b)};c.prototype.resize=function(b,e){void 0===e&&(e=0);if(this.Xf)throw h.g.ra("invalid call. Attribute Stream is locked and cannot be resized.");if(b<=this.size){if(h.I.truncate(5*b/4)<this.f.length){var c=this.f.slice(0,b);this.f=c}}else if(b>this.f.length){h.I.truncate(64>b?Math.max(2*b,4):5*b/4);for(var c=this.f.slice(0),n=this.f.length;n<b;n++)c[n]=e;this.f=c}this.size=b};c.prototype.cf=function(b){(null==this.f||b>this.f.length)&&this.resize(b);if(this.Xf)throw h.g.ra("invalid call. Attribute Stream is locked and cannot be resized.");
this.size=b};c.prototype.Uk=function(b,e){this.write(b,e)};c.prototype.jj=function(b,e,c){for(var k=this.size;e<k&&e<c;e++)b=h.I.Rh(this.read(e));return b};c.prototype.lc=function(b,e,k){if(null==b||!(b instanceof c))return!1;var n=this.size,u=b.size;if(k>n||k>u&&n!=u)return!1;for(k>n&&(k=n);e<k;e++)if(this.read(e)!=b.read(e))return!1;return!0};c.prototype.nk=function(b,e,c,n,u,a,d){if(this.Sa)throw h.g.xa();if(!u&&(1>a||0!=n%a))throw h.g.N();var k=this.size-d;k<n&&this.resize(this.size+n-k);for(k=
0;k<d-b;k++)this.f[b+n+k]=this.f[b+k];this.f==e.f&&b<c&&(c+=n);if(u)for(k=0;k<n;k++)this.f[k+b]=e.f[c+k];else for(u=n,d=0;d<n;d+=a)for(u-=a,k=0;k<a;k++)this.f[b+d+k]=e.f[c+u+k]};c.prototype.ul=function(b,e,c,n){if(this.Sa)throw h.g.xa();n-=b;for(var k=this.f.slice(b,b+n),a=0;a<n;a++)this.f[b+c+a]=k[a];for(n=0;n<c;n++)this.f[b+n]=e};c.prototype.lg=function(b,e,c){if(this.Sa)throw h.g.xa();for(var k=this.f.slice(b,b+(c-b)),u=0;u<c-b;u++)this.f[u+b+2]=k[u];this.f[b]=e.x;this.f[b+1]=e.y};c.prototype.km=
function(b,e,c,n,u,a){if(0>b||0>e||0>n)throw h.g.N();if(!u&&(0>=a||0!=e%a))throw h.g.N();if(c.size<n+e)throw h.g.N();if(0!=e)if(this.size<e+b&&this.resize(e+b),c==this)this.xi(b,e,n,u,a);else if(u)for(u=0;u<e;u++)this.f[b]=c.f[n],b++,n++;else if(n=n+e-a,1==a)for(u=0;u<e;u++)this.f[b]=c.f[n],b++,n--;else for(u=0,e=h.I.truncate(e/a);u<e;u++){for(var k=0;k<a;k++)this.f[b+k]=c.f[n+k];b+=a;n-=a}};c.prototype.oj=function(b,e,c){if(this.Sa)throw h.g.xa();if(b+e>this.size)throw h.g.xa();if(0<c-(b+e)){c-=
b+e;for(var k=this.f.slice(b+e,b+c+e),u=0;u<c;u++)this.f[b+u]=k[u]}this.size-=e};c.prototype.Jp=function(b,e,c){if(this.Sa)throw h.g.xa();if(1>c||0!=e%c)throw h.g.xa();for(var k=e>>1,u=0;u<k;u+=c){e-=c;for(var a=0;a<c;a++){var d=this.f[b+u+a];this.f[b+u+a]=this.f[b+e+a];this.f[b+e+a]=d}}};c.prototype.dh=function(b,e,c){if(0>e||0>c||0>e||c+e>this.size)throw h.g.N();for(var k=e;k<e+c;k++)this.f[k]=b};c.prototype.xi=function(b,e,c,n,u){if(!n||b!=c){for(var k=0;k<e;k++)this.f[b+k]=this.f[c+k];if(!n)for(c=
b,b=b+e-u,n=0,e=h.I.truncate(e/2);n<e;n++){for(k=0;k<u;k++){var a=this.f[c+k];this.f[c+k]=this.f[b+k];this.f[b+k]=a}c+=u;b-=u}}};c.prototype.$p=function(b,e,c,n,u){if(0>b||0>e||0>n)throw h.g.N();if(0!=e)for(this.size<(e<<1)+b&&this.resize((e<<1)+b),u||(b+=e-1<<1),u=u?2:-2,e+=n;n<e;n++)this.f[b]=c[n].x,this.f[b+1]=c[n].y,b+=u};c.prototype.Hp=function(b,e,c,n,u){if(0>b||0>e||0>n||this.size<e+b)throw h.g.N();if(u)for(u=0;u<e;u++)c[n+u]=this.f[b+u];else for(n=n+e-1;b<e;b++)c[n]=this.f[b],n--};c.prototype.clear=
function(b){b?this.resize(0):this.cf(0)};c.prototype.xd=function(b,e,c){var k=this.f.slice(0,b),u=this.f.slice(e);b=this.f.slice(b,e).sort(c);this.f.length=0;this.f.push.apply(this.f,k.concat(b).concat(u))};c.prototype.Qh=function(){return 1};c.ob=0;return c}();h.qd=d;d=function(){function c(b){this.Sa=this.Xf=!1;this.f=null;var e=b;2>e&&(e=2);this.f=new Float64Array(e);this.size=b}c.Yc=function(b,e){var k=new c(b),n=k.f;2>b&&(b=2);if(0!==e)for(var u=0;u<b;u++)n[u]=e;return k};c.lj=function(b){var e=
new c(0);e.f=new Float64Array(b.f);e.size=b.size;return e};c.V=function(b,e){var k=new c(0);k.size=b.size;k.size>e&&(k.size=e);e=k.size;2>e&&(e=2);k.f=new Float64Array(e);k.f.set(b.f.length<=e?b.f:b.f.subarray(0,e),0);return k};c.prototype.xb=function(b){0>=b||(null==this.f?this.f=new Float64Array(b):b<=this.f.length||(0<this.f.length?(b=new Float64Array(b),b.set(this.f),this.f=b):this.f=new Float64Array(b)))};c.prototype.read=function(b){return this.f[b]};c.prototype.ec=function(b,e){e.x=this.f[b];
e.y=this.f[b+1]};c.prototype.get=function(b){return this.f[b]};c.prototype.write=function(b,e){if(this.Sa)throw h.g.xa();this.f[b]=e};c.prototype.set=function(b,e){if(this.Sa)throw h.g.xa();this.f[b]=e};c.prototype.Rn=function(b,e){if(this.Sa)throw h.g.xa();this.f[b]=e.x;this.f[b+1]=e.y};c.prototype.add=function(b){this.resize(this.size+1);this.f[this.size-1]=b};c.prototype.Ip=function(b){return c.V(this,b)};c.prototype.Bh=function(b){return this.read(b)};c.prototype.resize=function(b,e){void 0===
e&&(e=0);if(this.Xf)throw h.g.ra("invalid call. Attribute Stream is locked and cannot be resized.");if(b<=this.size){if(30<this.f.length&&5*b/4<this.f.length){var c=new Float64Array(this.f,0,b);this.f=c}}else{b>this.f.length&&(c=h.I.truncate(64>b?Math.max(2*b,4):5*b/4),c=new Float64Array(c),c.set(this.f),this.f=c);for(var c=this.f,n=this.size;n<b;n++)c[n]=e}this.size=b};c.prototype.cf=function(b){(null==this.f||b>this.f.length)&&this.resize(b);if(this.Xf)throw h.g.ra("invalid call. Attribute Stream is locked and cannot be resized.");
this.size=b};c.prototype.Uk=function(b,e){this.write(b,e)};c.prototype.jj=function(b,e,c){for(var k=this.size;e<k&&e<c;e++)b=h.I.Rh(this.read(e));return b};c.prototype.lc=function(b,e,k){if(null==b||!(b instanceof c))return!1;var n=this.size,u=b.size;if(k>n||k>u&&n!=u)return!1;for(k>n&&(k=n);e<k;e++)if(this.read(e)!=b.read(e))return!1;return!0};c.prototype.nk=function(b,e,c,n,u,C,d){if(this.Sa)throw h.g.xa();if(!u&&(1>C||0!=n%C))throw h.g.N();var k=this.size-d;k<n&&this.resize(this.size+n-k);a(this.f,
b+n,b,b+(d-b));this.f==e.f&&b<c&&(c+=n);if(u)this.f.set(e.f.subarray(c,c+n),b);else for(u=n,d=0;d<n;d+=C)for(u-=C,k=0;k<C;k++)this.f[b+d+k]=e.f[c+u+k]};c.prototype.ul=function(b,e,c,n){if(this.Sa)throw h.g.xa();n-=b;a(this.f,b+n,b,b+n);for(n=0;n<c;n++)this.f[b+n]=e};c.prototype.lg=function(b,e,c){if(this.Sa)throw h.g.xa();a(this.f,b+2,b,b+(c-b));this.f[b]=e.x;this.f[b+1]=e.y};c.prototype.km=function(b,e,c,n,u,a){if(0>b||0>e||0>n)throw h.g.N();if(!u&&(0>=a||0!=e%a))throw h.g.N();if(c.size<n+e)throw h.g.N();
if(0!=e)if(this.size<e+b&&this.resize(e+b),c==this)this.xi(b,e,n,u,a);else if(u)for(u=0;u<e;u++)this.f[b]=c.f[n],b++,n++;else if(n=n+e-a,1==a)for(u=0;u<e;u++)this.f[b]=c.f[n],b++,n--;else for(u=0,e=h.I.truncate(e/a);u<e;u++){for(var k=0;k<a;k++)this.f[b+k]=c.f[n+k];b+=a;n-=a}};c.prototype.oj=function(b,e,c){if(this.Sa)throw h.g.xa();if(b+e>this.size)throw h.g.xa();0<c-(b+e)&&a(this.f,b,b+e,b+(c-(b+e))+e);this.size-=e};c.prototype.Jp=function(b,e,c){if(this.Sa)throw h.g.xa();if(1>c||0!=e%c)throw h.g.xa();
for(var k=e>>1,u=0;u<k;u+=c){e-=c;for(var a=0;a<c;a++){var d=this.f[b+u+a];this.f[b+u+a]=this.f[b+e+a];this.f[b+e+a]=d}}};c.prototype.dh=function(b,e,c){if(0>e||0>c||0>e||c+e>this.size)throw h.g.N();for(var k=e;k<e+c;k++)this.f[k]=b};c.prototype.xi=function(b,e,c,n,u){if(!n||b!=c)if(this.f.set(this.f.subarray(c,c+e),b),!n)for(c=b,b=b+e-u,n=0,e=h.I.truncate(e/2);n<e;n++){for(var k=0;k<u;k++){var a=this.f[c+k];this.f[c+k]=this.f[b+k];this.f[b+k]=a}c+=u;b-=u}};c.prototype.$p=function(b,e,c,n,u){if(0>
b||0>e||0>n)throw h.g.N();if(0!=e)for(this.size<(e<<1)+b&&this.resize((e<<1)+b),u||(b+=e-1<<1),u=u?2:-2,e+=n;n<e;n++)this.f[b]=c[n].x,this.f[b+1]=c[n].y,b+=u};c.prototype.Hp=function(b,e,c,n,u){if(0>b||0>e||0>n||this.size<e+b)throw h.g.N();if(u)for(u=0;u<e;u++)c[n+u]=this.f[b+u];else for(n=n+e-1;b<e;b++)c[n]=this.f[b],n--};c.prototype.clear=function(b){b?this.resize(0):this.cf(0)};c.prototype.xd=function(b,e,c){Array.prototype.sort.call(this.f.subarray(b,e),c)};c.prototype.Qh=function(){return 1};
return c}();h.QG=d})(z||(z={}));!0===z.ah.Sk&&!0===z.ah.it&&(z.qd=z.QG);(function(a){function h(c,b,e,k){e=new Int32Array(c.subarray(e,k));c.set(e,b)}a.tT=function(){return function(){this.random=1973}}();var d=function(){function c(b){this.Sa=this.Xf=!1;this.f=[];var e=b;2>e&&(e=2);this.f=this.f=a.I.Lh(e,c.ob);this.size=b}c.Yc=function(b,e){c.ob=e;b=new c(b);c.ob=0;return b};c.lj=function(b){var e=new c(0);e.f=b.f.slice(0);e.size=b.size;return e};c.V=function(b,e){var k=new c(0);k.size=b.size;k.size>
e&&(k.size=e);k.f=b.f.slice(0,k.size);return k};c.prototype.xb=function(){};c.prototype.read=function(b){return this.f[b]};c.prototype.ec=function(b,e){e.x=this.f[b];e.y=this.f[b+1]};c.prototype.get=function(b){return this.f[b]};c.prototype.write=function(b,e){if(this.Sa)throw a.g.xa();this.f[b]=e};c.prototype.set=function(b,e){if(this.Sa)throw a.g.xa();this.f[b]=e};c.prototype.Rn=function(b,e){if(this.Sa)throw a.g.xa();this.f[b]=e.x;this.f[b+1]=e.y};c.prototype.add=function(b){this.resize(this.size+
1);this.f[this.size-1]=b};c.prototype.Ip=function(b){return c.V(this,b)};c.prototype.Bh=function(b){return this.read(b)};c.prototype.resize=function(b,e){void 0===e&&(e=0);if(this.Xf)throw a.g.ra("invalid call. Attribute Stream is locked and cannot be resized.");if(b<=this.size){if(a.I.truncate(5*b/4)<this.f.length){var c=this.f.slice(0,b);this.f=c}}else if(b>this.f.length){a.I.truncate(64>b?Math.max(2*b,4):5*b/4);for(var c=this.f.slice(0),n=this.f.length;n<b;n++)c[n]=e;this.f=c}this.size=b};c.prototype.cf=
function(b){(null==this.f||b>this.f.length)&&this.resize(b);if(this.Xf)throw a.g.ra("invalid call. Attribute Stream is locked and cannot be resized.");this.size=b};c.prototype.Uk=function(b,e){this.write(b,e)};c.prototype.jj=function(b,e,c){for(var k=this.size;e<k&&e<c;e++)b=a.I.kg(this.read(e),b);return b};c.prototype.lc=function(b,e,k){if(null==b||!(b instanceof c))return!1;var n=this.size,a=b.size;if(k>n||k>a&&n!=a)return!1;for(k>n&&(k=n);e<k;e++)if(this.read(e)!=b.read(e))return!1;return!0};c.prototype.nk=
function(b,e,c,n,u,h,d){if(this.Sa)throw a.g.xa();if(!u&&(1>h||0!=n%h))throw a.g.N();for(var k=0;k<d-b;k++)this.f[b+n+k]=this.f[b+k];this.f==e.f&&b<c&&(c+=n);if(u)for(k=0;k<n;k++)this.f[k+b]=e.f[c+k];else for(u=n,d=0;d<n;d+=h)for(u-=h,k=0;k<h;k++)this.f[b+d+k]=e.f[c+u+k]};c.prototype.ul=function(b,e,c,n){if(this.Sa)throw a.g.xa();n-=b;for(var k=this.f.slice(b,b+n),h=0;h<n;h++)this.f[b+c+h]=k[h];for(n=0;n<c;n++)this.f[b+n]=e};c.prototype.lg=function(b,e,c){if(this.Sa)throw a.g.xa();for(var k=this.f.slice(b,
b+(c-b)),u=0;u<c-b;u++)this.f[u+b+2]=k[u];this.f[b]=e.x;this.f[b+1]=e.y};c.prototype.km=function(b,e,c,n,u,h){if(0>b||0>e||0>n)throw a.g.N();if(!u&&(0>=h||0!=e%h))throw a.g.N();if(c.size<n+e)throw a.g.N();if(0!=e)if(this.size<e+b&&this.resize(e+b),c==this)this.xi(b,e,n,u,h);else if(u)for(u=0;u<e;u++)this.f[b]=c.f[n],b++,n++;else if(n=n+e-h,1==h)for(u=0;u<e;u++)this.f[b]=c.f[n],b++,n--;else for(u=0,e=a.I.truncate(e/h);u<e;u++){for(var k=0;k<h;k++)this.f[b+k]=c.f[n+k];b+=h;n-=h}};c.prototype.oj=function(b,
e,c){if(this.Sa)throw a.g.xa();if(b+e>this.size)throw a.g.xa();if(0<c-(b+e)){c-=b+e;for(var k=this.f.slice(b+e,b+c+e),u=0;u<c;u++)this.f[b+u]=k[u]}this.size-=e};c.prototype.Jp=function(b,e,c){if(this.Sa)throw a.g.xa();if(1>c||0!=e%c)throw a.g.xa();for(var k=e>>1,u=0;u<k;u+=c){e-=c;for(var h=0;h<c;h++){var d=this.f[b+u+h];this.f[b+u+h]=this.f[b+e+h];this.f[b+e+h]=d}}};c.prototype.dh=function(b,e,c){if(0>e||0>c||0>e||c+e>this.size)throw a.g.N();for(var k=e;k<e+c;k++)this.f[k]=b};c.prototype.xi=function(b,
e,c,n,u){if(!n||b!=c){for(var k=0;k<e;k++)this.f[b+k]=this.f[c+k];if(!n)for(c=b,b=b+e-u,n=0,e=a.I.truncate(e/2);n<e;n++){for(k=0;k<u;k++){var h=this.f[c+k];this.f[c+k]=this.f[b+k];this.f[b+k]=h}c+=u;b-=u}}};c.prototype.$p=function(b,e,c,n,u){if(0>b||0>e||0>n)throw a.g.N();if(0!=e)for(this.size<(e<<1)+b&&this.resize((e<<1)+b),u||(b+=e-1<<1),u=u?2:-2,e+=n;n<e;n++)this.f[b]=c[n].x,this.f[b+1]=c[n].y,b+=u};c.prototype.Hp=function(b,e,c,n,u){if(0>b||0>e||0>n||this.size<e+b)throw a.g.N();if(u)for(u=0;u<
e;u++)c[n+u]=this.f[b+u];else for(n=n+e-1;b<e;b++)c[n]=this.f[b],n--};c.prototype.clear=function(b){b?this.resize(0):this.cf(0)};c.prototype.xd=function(b,e,c){var k=this.f.slice(0,b),a=this.f.slice(e);b=this.f.slice(b,e).sort(c);this.f.length=0;this.f.push.apply(this.f,k.concat(b).concat(a))};c.prototype.Qh=function(){return 2};c.prototype.tc=function(){return this.f[this.size-1]};c.prototype.af=function(){this.resize(this.size-1)};c.prototype.JF=function(b){this.f[this.size-1]=b};c.prototype.QE=
function(b){b<this.size-1&&(this.f[b]=this.f[this.size-1]);this.resize(this.size-1)};c.prototype.Qs=function(b){for(var e=0,c=this.size;e<c;e++)if(this.f[e]==b)return e;return-1};c.prototype.Nw=function(b){return 0<=this.Qs(b)};c.ob=0;return c}();a.ga=d;d=function(){function c(b){this.Sa=this.Xf=!1;this.f=null;var e=b;2>e&&(e=2);this.f=new Int32Array(e);this.size=b}c.Yc=function(b,e){var k=new c(b),n=k.f;2>b&&(b=2);if(0!==e)for(var a=0;a<b;a++)n[a]=e;return k};c.lj=function(b){var e=new c(0);e.f=
new Int32Array(b.f);e.size=b.size;return e};c.V=function(b,e){var k=new c(0);k.size=b.size;k.size>e&&(k.size=e);e=k.size;2>e&&(e=2);k.f=new Int32Array(e);k.f.set(b.f.length<=e?b.f:b.f.subarray(0,e),0);return k};c.prototype.xb=function(b){0>=b||(null==this.f?this.f=new Int32Array(b):b<=this.f.length||(0<this.f.length?(b=new Int32Array(b),b.set(this.f),this.f=b):this.f=new Int32Array(b)))};c.prototype.read=function(b){return this.f[b]};c.prototype.ec=function(b,e){e.x=this.f[b];e.y=this.f[b+1]};c.prototype.get=
function(b){return this.f[b]};c.prototype.write=function(b,e){if(this.Sa)throw a.g.xa();this.f[b]=e};c.prototype.set=function(b,e){if(this.Sa)throw a.g.xa();this.f[b]=e};c.prototype.Rn=function(b,e){if(this.Sa)throw a.g.xa();this.f[b]=e.x;this.f[b+1]=e.y};c.prototype.add=function(b){this.resize(this.size+1);this.f[this.size-1]=b};c.prototype.Ip=function(b){return c.V(this,b)};c.prototype.Bh=function(b){return this.read(b)};c.prototype.resize=function(b,e){void 0===e&&(e=0);if(this.Xf)throw a.g.ra("invalid call. Attribute Stream is locked and cannot be resized.");
if(b<=this.size){if(30<this.f.length&&5*b/4<this.f.length){var c=new Int32Array(this.f,0,b);this.f=c}}else{b>this.f.length&&(c=a.I.truncate(64>b?Math.max(2*b,4):5*b/4),c=new Int32Array(c),c.set(this.f),this.f=c);for(var c=this.f,n=this.size;n<b;n++)c[n]=e}this.size=b};c.prototype.cf=function(b){(null==this.f||b>this.f.length)&&this.resize(b);if(this.Xf)throw a.g.ra("invalid call. Attribute Stream is locked and cannot be resized.");this.size=b};c.prototype.Uk=function(b,e){this.write(b,e)};c.prototype.jj=
function(b,e,c){for(var k=this.size;e<k&&e<c;e++)b=a.I.kg(this.read(e),b);return b};c.prototype.lc=function(b,e,k){if(null==b||!(b instanceof c))return!1;var n=this.size,a=b.size;if(k>n||k>a&&n!=a)return!1;for(k>n&&(k=n);e<k;e++)if(this.read(e)!=b.read(e))return!1;return!0};c.prototype.nk=function(b,e,c,n,u,C,d){if(this.Sa)throw a.g.xa();if(!u&&(1>C||0!=n%C))throw a.g.N();h(this.f,b+n,b,b+(d-b));this.f==e.f&&b<c&&(c+=n);if(u)this.f.set(e.f.subarray(c,c+n),b);else for(u=n,d=0;d<n;d+=C){u-=C;for(var k=
0;k<C;k++)this.f[b+d+k]=e.f[c+u+k]}};c.prototype.ul=function(b,e,c,n){if(this.Sa)throw a.g.xa();n-=b;h(this.f,b+n,b,b+n);for(n=0;n<c;n++)this.f[b+n]=e};c.prototype.lg=function(b,e,c){if(this.Sa)throw a.g.xa();h(this.f,b+2,b,b+(c-b));this.f[b]=e.x;this.f[b+1]=e.y};c.prototype.km=function(b,e,c,n,u,h){if(0>b||0>e||0>n)throw a.g.N();if(!u&&(0>=h||0!=e%h))throw a.g.N();if(c.size<n+e)throw a.g.N();if(0!=e)if(this.size<e+b&&this.resize(e+b),c==this)this.xi(b,e,n,u,h);else if(u)for(u=0;u<e;u++)this.f[b]=
c.f[n],b++,n++;else if(n=n+e-h,1==h)for(u=0;u<e;u++)this.f[b]=c.f[n],b++,n--;else for(u=0,e=a.I.truncate(e/h);u<e;u++){for(var k=0;k<h;k++)this.f[b+k]=c.f[n+k];b+=h;n-=h}};c.prototype.oj=function(b,e,c){if(this.Sa)throw a.g.xa();if(b+e>this.size)throw a.g.xa();0<c-(b+e)&&h(this.f,b,b+e,b+(c-(b+e))+e);this.size-=e};c.prototype.Jp=function(b,e,c){if(this.Sa)throw a.g.xa();if(1>c||0!=e%c)throw a.g.xa();for(var k=e>>1,u=0;u<k;u+=c){e-=c;for(var h=0;h<c;h++){var d=this.f[b+u+h];this.f[b+u+h]=this.f[b+
e+h];this.f[b+e+h]=d}}};c.prototype.dh=function(b,e,c){if(0>e||0>c||0>e||c+e>this.size)throw a.g.N();for(var k=e;k<e+c;k++)this.f[k]=b};c.prototype.xi=function(b,e,c,n,u){if(!n||b!=c)if(this.f.set(this.f.subarray(c,c+e),b),!n)for(c=b,b=b+e-u,n=0,e=a.I.truncate(e/2);n<e;n++){for(var k=0;k<u;k++){var h=this.f[c+k];this.f[c+k]=this.f[b+k];this.f[b+k]=h}c+=u;b-=u}};c.prototype.$p=function(b,e,c,n,u){if(0>b||0>e||0>n)throw a.g.N();if(0!=e)for(this.size<(e<<1)+b&&this.resize((e<<1)+b),u||(b+=e-1<<1),u=
u?2:-2,e+=n;n<e;n++)this.f[b]=c[n].x,this.f[b+1]=c[n].y,b+=u};c.prototype.Hp=function(b,e,c,n,u){if(0>b||0>e||0>n||this.size<e+b)throw a.g.N();if(u)for(u=0;u<e;u++)c[n+u]=this.f[b+u];else for(n=n+e-1;b<e;b++)c[n]=this.f[b],n--};c.prototype.clear=function(b){b?this.resize(0):this.cf(0)};c.prototype.xd=function(b,e,k){10>e-b?c.$i(this.f,b,e,k):c.$g(this.f,b,e-1,k)};c.prototype.Qh=function(){return 2};c.prototype.tc=function(){return this.f[this.size-1]};c.prototype.af=function(){this.resize(this.size-
1)};c.prototype.JF=function(b){this.f[this.size-1]=b};c.prototype.QE=function(b){b<this.size-1&&(this.f[b]=this.f[this.size-1]);this.resize(this.size-1)};c.prototype.Qs=function(b){for(var e=0,c=this.size;e<c;e++)if(this.f[e]==b)return e;return-1};c.prototype.Nw=function(b){return 0<=this.Qs(b)};c.$i=function(b,e,c,n){for(var k=e;k<c;k++){for(var a=b[k],h=k-1;h>=e&&0<n(b[h],a);)b[h+1]=b[h],h--;b[h+1]=a}};c.Wf=function(b,e,c){var k=b[c];b[c]=b[e];b[e]=k};c.$g=function(b,e,k,n){if(!(e>=k))for(;;){if(9>
k-e){c.$i(b,e,k+1,n);break}var a=b[e];c.Wf(b,e,k);for(var h=e,d=e;d<k;d++)0>=n(b[d],a)&&(c.Wf(b,h,d),h+=1);c.Wf(b,h,k);h-e<k-h?(c.$g(b,e,h-1,n),e=h+1):(c.$g(b,h+1,k,n),k=h-1)}};return c}();a.Xu=d})(z||(z={}));!0===z.ah.Sk&&(z.ga=z.Xu);(function(a){function h(c,b,e,k){e=new Int8Array(c.subarray(e,k));c.set(e,b)}var d=function(){function c(b){this.Sa=this.Xf=!1;this.f=[];var e=b;2>e&&(e=2);this.f=a.I.Lh(e,c.ob);this.size=b}c.Yc=function(b,e){c.ob=e;b=new c(b);c.ob=0;return b};c.lj=function(b){var e=
new c(0);e.f=b.f.slice(0);e.size=b.size;return e};c.V=function(b,e){var k=new c(0);k.size=b.size;k.size>e&&(k.size=e);k.f=b.f.slice(0,k.size);return k};c.prototype.xb=function(){};c.prototype.read=function(b){return this.f[b]};c.prototype.ec=function(b,e){e.x=this.f[b];e.y=this.f[b+1]};c.prototype.get=function(b){return this.f[b]};c.prototype.write=function(b,e){if(this.Sa)throw a.g.xa();this.f[b]=e};c.prototype.set=function(b,e){if(this.Sa)throw a.g.xa();this.f[b]=e};c.prototype.Rn=function(b,e){if(this.Sa)throw a.g.xa();
this.f[b]=e.x;this.f[b+1]=e.y};c.prototype.add=function(b){this.resize(this.size+1);this.f[this.size-1]=b};c.prototype.Ip=function(b){return c.V(this,b)};c.prototype.Bh=function(b){return this.read(b)};c.prototype.resize=function(b,e){void 0===e&&(e=0);if(this.Xf)throw a.g.ra("invalid call. Attribute Stream is locked and cannot be resized.");if(b<=this.size){if(a.I.truncate(5*b/4)<this.f.length){var c=this.f.slice(0,b);this.f=c}}else if(b>this.f.length){a.I.truncate(64>b?Math.max(2*b,4):5*b/4);for(var c=
this.f.slice(0),n=this.f.length;n<b;n++)c[n]=e;this.f=c}this.size=b};c.prototype.cf=function(b){(null==this.f||b>this.f.length)&&this.resize(b);if(this.Xf)throw a.g.ra("invalid call. Attribute Stream is locked and cannot be resized.");this.size=b};c.prototype.Uk=function(b,e){this.write(b,e)};c.prototype.jj=function(b,e,c){for(var k=this.size;e<k&&e<c;e++)b=a.I.kg(this.read(e),b);return b};c.prototype.lc=function(b,e,k){if(null==b||!(b instanceof c))return!1;var n=this.size,a=b.size;if(k>n||k>a&&
n!=a)return!1;for(k>n&&(k=n);e<k;e++)if(this.read(e)!=b.read(e))return!1;return!0};c.prototype.nk=function(b,e,c,n,u,h,d){if(this.Sa)throw a.g.xa();if(!u&&(1>h||0!=n%h))throw a.g.N();for(var k=0;k<d-b;k++)this.f[b+n+k]=this.f[b+k];this.f==e.f&&b<c&&(c+=n);if(u)for(k=0;k<n;k++)this.f[k+b]=e.f[c+k];else for(u=n,d=0;d<n;d+=h)for(u-=h,k=0;k<h;k++)this.f[b+d+k]=e.f[c+u+k]};c.prototype.ul=function(b,e,c,n){if(this.Sa)throw a.g.xa();n-=b;for(var k=this.f.slice(b,b+n),h=0;h<n;h++)this.f[b+c+h]=k[h];for(n=
0;n<c;n++)this.f[b+n]=e};c.prototype.lg=function(b,e,c){if(this.Sa)throw a.g.xa();for(var k=this.f.slice(b,b+(c-b)),u=0;u<c-b;u++)this.f[u+b+2]=k[u];this.f[b]=e.x;this.f[b+1]=e.y};c.prototype.km=function(b,e,c,n,u,h){if(0>b||0>e||0>n)throw a.g.N();if(!u&&(0>=h||0!=e%h))throw a.g.N();if(c.size<n+e)throw a.g.N();if(0!=e)if(this.size<e+b&&this.resize(e+b),c==this)this.xi(b,e,n,u,h);else if(u)for(u=0;u<e;u++)this.f[b]=c.f[n],b++,n++;else if(n=n+e-h,1==h)for(u=0;u<e;u++)this.f[b]=c.f[n],b++,n--;else for(u=
0,e=a.I.truncate(e/h);u<e;u++){for(var k=0;k<h;k++)this.f[b+k]=c.f[n+k];b+=h;n-=h}};c.prototype.oj=function(b,e,c){if(this.Sa)throw a.g.xa();if(b+e>this.size)throw a.g.xa();if(0<c-(b+e)){c-=b+e;for(var k=this.f.slice(b+e,b+c+e),u=0;u<c;u++)this.f[b+u]=k[u]}this.size-=e};c.prototype.Jp=function(b,e,c){if(this.Sa)throw a.g.xa();if(1>c||0!=e%c)throw a.g.xa();for(var k=e>>1,u=0;u<k;u+=c){e-=c;for(var h=0;h<c;h++){var d=this.f[b+u+h];this.f[b+u+h]=this.f[b+e+h];this.f[b+e+h]=d}}};c.prototype.dh=function(b,
e,c){if(0>e||0>c||0>e||c+e>this.size)throw a.g.N();for(var k=e;k<e+c;k++)this.f[k]=b};c.prototype.xi=function(b,e,c,n,u){if(!n||b!=c){for(var k=0;k<e;k++)this.f[b+k]=this.f[c+k];if(!n)for(c=b,b=b+e-u,n=0,e=a.I.truncate(e/2);n<e;n++){for(k=0;k<u;k++){var h=this.f[c+k];this.f[c+k]=this.f[b+k];this.f[b+k]=h}c+=u;b-=u}}};c.prototype.$p=function(b,e,c,n,u){if(0>b||0>e||0>n)throw a.g.N();if(0!=e)for(this.size<(e<<1)+b&&this.resize((e<<1)+b),u||(b+=e-1<<1),u=u?2:-2,e+=n;n<e;n++)this.f[b]=c[n].x,this.f[b+
1]=c[n].y,b+=u};c.prototype.Hp=function(b,e,c,n,u){if(0>b||0>e||0>n||this.size<e+b)throw a.g.N();if(u)for(u=0;u<e;u++)c[n+u]=this.f[b+u];else for(n=n+e-1;b<e;b++)c[n]=this.f[b],n--};c.prototype.clear=function(b){b?this.resize(0):this.cf(0)};c.prototype.xd=function(b,e,c){var k=this.f.slice(0,b),a=this.f.slice(e);b=this.f.slice(b,e).sort(c);this.f.length=0;this.f.push.apply(this.f,k.concat(b).concat(a))};c.prototype.Qh=function(){return 1};c.prototype.xy=function(b,e){if(this.Sa)throw a.g.ra("invalid call. Attribute Stream is read only.");
this.f[b]|=e};c.prototype.BB=function(b,e){if(this.Sa)throw a.g.ra("invalid call. Attribute Stream is read only.");this.f[b]&=~e};c.ob=0;return c}();a.Wk=d;d=function(){function c(b){this.f=null;var e=b;2>e&&(e=2);this.f=new Int8Array(e);this.size=b}c.Yc=function(b,e){var k=new c(b),n=k.f;2>b&&(b=2);if(0!==e)for(var a=0;a<b;a++)n[a]=e;return k};c.lj=function(b){var e=new c(0);e.f=new Int8Array(b.f);e.size=b.size;return e};c.V=function(b,e){var k=new c(0);k.size=b.size;k.size>e&&(k.size=e);e=k.size;
2>e&&(e=2);k.f=new Int8Array(e);k.f.set(b.f.length<=e?b.f:b.f.subarray(0,e),0);return k};c.prototype.xb=function(b){0>=b||(null==this.f?this.f=new Int8Array(b):b<=this.f.length||(0<this.f.length?(b=new Int8Array(b),b.set(this.f),this.f=b):this.f=new Int8Array(b)))};c.prototype.read=function(b){return this.f[b]};c.prototype.ec=function(b,e){e.x=this.f[b];e.y=this.f[b+1]};c.prototype.get=function(b){return this.f[b]};c.prototype.write=function(b,e){if(this.Sa)throw a.g.xa();this.f[b]=e};c.prototype.set=
function(b,e){if(this.Sa)throw a.g.xa();this.f[b]=e};c.prototype.Rn=function(b,e){if(this.Sa)throw a.g.xa();this.f[b]=e.x;this.f[b+1]=e.y};c.prototype.add=function(b){this.resize(this.size+1);this.f[this.size-1]=b};c.prototype.Ip=function(b){return c.V(this,b)};c.prototype.Bh=function(b){return this.read(b)};c.prototype.resize=function(b,e){void 0===e&&(e=0);if(this.Xf)throw a.g.ra("invalid call. Attribute Stream is locked and cannot be resized.");if(b<=this.size){if(30<this.f.length&&5*b/4<this.f.length){var c=
new Int8Array(this.f,0,b);this.f=c}}else{b>this.f.length&&(c=a.I.truncate(64>b?Math.max(2*b,4):5*b/4),c=new Int8Array(c),c.set(this.f),this.f=c);for(var c=this.f,n=this.size;n<b;n++)c[n]=e}this.size=b};c.prototype.cf=function(b){(null==this.f||b>this.f.length)&&this.resize(b);if(this.Xf)throw a.g.ra("invalid call. Attribute Stream is locked and cannot be resized.");this.size=b};c.prototype.Uk=function(b,e){this.write(b,e)};c.prototype.jj=function(b,e,c){for(var k=this.size;e<k&&e<c;e++)b=a.I.kg(this.read(e),
b);return b};c.prototype.lc=function(b,e,k){if(null==b||!(b instanceof c))return!1;var n=this.size,a=b.size;if(k>n||k>a&&n!=a)return!1;for(k>n&&(k=n);e<k;e++)if(this.read(e)!=b.read(e))return!1;return!0};c.prototype.nk=function(b,e,c,n,u,C,d){if(this.Sa)throw a.g.xa();if(!u&&(1>C||0!=n%C))throw a.g.N();h(this.f,b+n,b,b+(d-b));this.f==e.f&&b<c&&(c+=n);if(u)this.f.set(e.f.subarray(c,c+n),b);else for(u=n,d=0;d<n;d+=C){u-=C;for(var k=0;k<C;k++)this.f[b+d+k]=e.f[c+u+k]}};c.prototype.ul=function(b,e,c,
n){if(this.Sa)throw a.g.xa();n-=b;h(this.f,b+n,b,b+n);for(n=0;n<c;n++)this.f[b+n]=e};c.prototype.lg=function(b,e,c){if(this.Sa)throw a.g.xa();h(this.f,b+2,b,b+(c-b));this.f[b]=e.x;this.f[b+1]=e.y};c.prototype.km=function(b,e,c,n,u,h){if(0>b||0>e||0>n)throw a.g.N();if(!u&&(0>=h||0!=e%h))throw a.g.N();if(c.size<n+e)throw a.g.N();if(0!=e)if(this.size<e+b&&this.resize(e+b),c==this)this.xi(b,e,n,u,h);else if(u)for(u=0;u<e;u++)this.f[b]=c.f[n],b++,n++;else if(n=n+e-h,1==h)for(u=0;u<e;u++)this.f[b]=c.f[n],
b++,n--;else for(u=0,e=a.I.truncate(e/h);u<e;u++){for(var k=0;k<h;k++)this.f[b+k]=c.f[n+k];b+=h;n-=h}};c.prototype.oj=function(b,e,c){if(this.Sa)throw a.g.xa();if(b+e>this.size)throw a.g.xa();0<c-(b+e)&&h(this.f,b,b+e,b+(c-(b+e))+e);this.size-=e};c.prototype.Jp=function(b,e,c){if(this.Sa)throw a.g.xa();if(1>c||0!=e%c)throw a.g.xa();for(var k=e>>1,u=0;u<k;u+=c){e-=c;for(var h=0;h<c;h++){var d=this.f[b+u+h];this.f[b+u+h]=this.f[b+e+h];this.f[b+e+h]=d}}};c.prototype.dh=function(b,e,c){if(0>e||0>c||0>
e||c+e>this.size)throw a.g.N();for(var k=e;k<e+c;k++)this.f[k]=b};c.prototype.xi=function(b,e,c,n,u){if(!n||b!=c)if(this.f.set(this.f.subarray(c,c+e),b),!n)for(c=b,b=b+e-u,n=0,e=a.I.truncate(e/2);n<e;n++){for(var k=0;k<u;k++){var h=this.f[c+k];this.f[c+k]=this.f[b+k];this.f[b+k]=h}c+=u;b-=u}};c.prototype.$p=function(b,e,c,n,u){if(0>b||0>e||0>n)throw a.g.N();if(0!=e)for(this.size<(e<<1)+b&&this.resize((e<<1)+b),u||(b+=e-1<<1),u=u?2:-2,e+=n;n<e;n++)this.f[b]=c[n].x,this.f[b+1]=c[n].y,b+=u};c.prototype.Hp=
function(b,e,c,n,u){if(0>b||0>e||0>n||this.size<e+b)throw a.g.N();if(u)for(u=0;u<e;u++)c[n+u]=this.f[b+u];else for(n=n+e-1;b<e;b++)c[n]=this.f[b],n--};c.prototype.clear=function(b){b?this.resize(0):this.cf(0)};c.prototype.xd=function(b,e,c){e=this.f.subarray(b,e);Array.prototype.sort.call(e,c);this.f.set(e,b)};c.prototype.xy=function(b,e){if(this.Sa)throw a.g.ra("invalid call. Attribute Stream is read only.");this.f[b]|=e};c.prototype.BB=function(b,e){if(this.Sa)throw a.g.ra("invalid call. Attribute Stream is read only.");
this.f[b]&=~e};c.prototype.Qh=function(){return 1};return c}();a.Yu=d})(z||(z={}));!0===z.ah.Sk&&(z.Wk=z.Yu);(function(a){var h=function(){function h(){}h.to=function(c,b){return a.Wk.Yc(c,b)};h.kl=function(c,b){return a.qd.Yc(c,b)};h.Sv=function(c,b,e){switch(c){case 1:c=a.qd.Yc(b,e);break;case 2:c=a.ga.Yc(b,e);break;case 4:c=a.Wk.Yc(b,e);break;default:throw a.g.wa();}return c};h.Tv=function(c,b){return h.Sv(a.pa.Qh(c),b*a.pa.Wa(c),a.pa.ue(c))};h.Dg=function(c,b){return a.ga.Yc(c,b)};h.ay=function(c){var b,
e=[];for(b=0;b<c;b++)e.push(null);return e};return h}();a.Ac=h})(z||(z={}));(function(a){var h=function(){function h(){}h.to=function(c,b){return a.Yu.Yc(c,b)};h.kl=function(c,b){return a.qd.Yc(c,b)};h.Sv=function(c,b,e){switch(c){case 1:c=a.qd.Yc(b,e);break;case 2:c=a.Xu.Yc(b,e);break;case 4:c=a.Yu.Yc(b,e);break;default:throw a.g.wa();}return c};h.Tv=function(c,b){return a.Ac.Sv(a.pa.Qh(c),b*a.pa.Wa(c),a.pa.ue(c))};h.Dg=function(c,b){return a.Xu.Yc(c,b)};h.ay=function(c){var b,e=[];for(b=0;b<c;b++)e.push(null);
return e};return h}();a.RG=h})(z||(z={}));!0===z.ah.Sk&&(z.Ac=z.RG);(function(a){a.ca=function(){return function(a){void 0===a&&(a=0);this.l=a}}()})(z||(z={}));(function(a){var h=function(){function c(){}c.nb=function(b,e){return 0<=e?c.H(b):-c.H(b)};c.H=function(b){return 0>b?-b:b};c.Ih=function(b){return 3.552713678800501E-15>b};c.Xz=function(b,e,k){return c.H(b-e)<=k*(1+(c.H(b)+c.H(e))/2)};c.S=function(b,e){return c.Xz(b,e,3.552713678800501E-15)};c.wI=function(b){return 3.552713678800501E-15>=
c.H(b)};c.Vc=function(b){return c.wI(b)};return c}();a.j=h;var d=function(){function c(){}c.Sn=function(b,e){b=h.H(b);e=h.H(e);var c=0;0!=b+e&&(b>e?(c=e/b,c=b*Math.sqrt(1+c*c)):(c=b/e,c=e*Math.sqrt(1+c*c)));return c};c.Ep=function(b,e,k,n,a){for(var u=[0,0,0],d=[0,0,0],G=0;2>=G;G++)e[G]-=b[G],k[G]-=e[G];k=u[1]*d[2]-u[2]*d[1];e=u[2]*d[0]-u[0]*d[2];u=u[0]*d[1]-u[1]*d[0];b=-1*(k*b[0]+e*b[1]+u*b[2]);n[0]=k;n[1]=e;n[2]=u;n[3]=b;d=c.jm(n);n[0]/=d;n[1]/=d;n[2]/=d;n[3]/=d;0!=a&&(d=h.Vc(u)?h.Vc(b)?h.nb(1,
e):-h.nb(1,b):h.nb(1,u),d*=h.nb(1,a),n[0]*=d,n[1]*=d,n[2]*=d,n[3]*=d)};c.Uu=function(b,e,c){c[0]=b[1]*e[2]-e[1]*b[2];c[1]=b[2]*e[0]-e[2]*b[0];c[2]=b[0]*e[1]-e[0]*b[1]};c.Qr=function(b,e){return b[0]*e[0]+b[1]*e[1]+b[2]*e[2]};c.jm=function(b){return c.Sn(c.Sn(b[0],b[1]),b[2])};c.wm=function(b,e,k,n,a,h){var u=c.n(1,b,e),C=Math.cos(e);n.l=(u+0)*C*Math.cos(k);a.l=(u+0)*C*Math.sin(k);h.l=(u*(1-b)+0)*Math.sin(e)};c.JK=function(b,e,k,n,a,C,d){var u=c.Sn(e,k),J=1*Math.sqrt(1-b),f=J/1;if(h.S(u,0))C.l=0,a.l=
h.nb(1.570796326794897,n),d.l=h.H(n)-J;else{C.l=Math.atan2(k,e);k=Math.atan2(1*n,J*u);C=Math.cos(k);var g=Math.sin(k);e=J*b/(1-b);b*=1;k=Math.atan2(n+e*g*g*g,u-b*C*C*C);3.141592653589793<h.H(k)&&(k=h.nb(3.141592653589793,k)-k);k=Math.atan(f*Math.tan(k));g=Math.sin(k);C=Math.cos(k);a.l=Math.atan2(n+e*g*g*g,u-b*C*C*C);1.570796326794897<h.H(a.l)&&(a.l=h.nb(3.141592653589793,a.l)-a.l);k=Math.atan(f*Math.tan(a.l));g=Math.sin(k);C=Math.cos(k);d.l=(n-J*g)*Math.sin(a.l)+(u-1*C)*Math.cos(a.l)}};c.n=function(b,
e,c){c=Math.sin(c);return b/Math.sqrt(1-e*c*c)};c.sr=function(b,e){return Math.atan2(Math.sin(e)*(1-b),Math.cos(e))};c.Si=function(b,e){return Math.atan2(Math.sin(e),Math.cos(e)*(1-b))};c.xn=function(b,e){if(h.Ih(b)||0==e||h.S(h.H(e),1.570796326794897))return e;var k,n,a,C,d,G,f,g,y;if(.006884661117170036>b){C=Math.sqrt(1-b);d=(1-C)/(1+C);G=d*d;f=d*G;g=d*f;k=d*g;y=d*k;n=d*y;a=1.572916666666667*f-3.2578125*k+4.295068359375*n;C=2.142578125*g-6.071484375*y;b=3.129296875*k-11.249837239583334*n;var l=
4.775276692708333*y,m=7.958636765252976*n,p=Math.cos(2*e);return e+Math.sin(2*e)*(1.5*d-.84375*f+.525390625*k-.2688395182291667*n-a+b-m+p*(2*(1.3125*G-1.71875*g+1.650146484375*y)-4*C+6*l+p*(4*a-12*b+24*m+p*(8*C-32*l+p*(16*b-80*m+p*(32*l+64*p*m))))))}C=1-b;d=b/2;G=h.H(e);f=G*c.Yr(b)/(1.570796326794897*C);g=9999;y=G;for(G=0;1E-16<g&&50>G;G++)n=c.Tk(b,y),k=(c.Lz(y,b)-d*Math.sin(2*y)/n)/C-f,n=1/(n*n*n),a=k/n,k=y-a,g=h.H(a),y=k;return 0<=e?y:-y};c.nR=function(b,e){return h.Ih(e)?b:b*c.Yr(e)/1.570796326794897};
c.W=function(b){b=c.Hz(b,6.283185307179586);return 0>b?b+6.283185307179586:3.141592653589793>h.H(b)||h.S(h.H(b),3.141592653589793)?b:b-6.283185307179586};c.Hz=function(b,e){return b-Math.floor(b/e)*e};c.gg=function(b,e){if(.006884661117170036>e){e=Math.sqrt(1-e);e=(1-e)/(1+e);var k=e*e,n=k*k;return b/(1+e)*(1+.25*k+.015625*n+.00390625*k*n)*1.570796326794897}return b*c.Yr(e)};c.Dp=function(b,e){var k=h.nb(1,Math.sin(e));e=h.H(c.Hz(e,3.141592653589793));e=1.570796326794897>=e?e:3.141592653589793-e;
var n;h.S(e,1.570796326794897)?n=e:n=Math.atan(Math.sqrt(1-b)*Math.tan(e));return n*k};c.q=function(b,e,k){if(.006884661117170036>e){e=Math.sqrt(1-e);e=(1-e)/(1+e);var n=e*e,a=e*n,h=e*a,d=e*h,G=e*d,f=e*G,g=-.7291666666666666*a+.2278645833333333*d+.03987630208333334*f,y=.615234375*h-.21533203125*G,l=-.54140625*d+.20302734375*f,m=.48876953125*G,p=-.4488699776785715*f,q=Math.cos(2*k);return b/(1+e)*((1+.25*n+.015625*h+.00390625*G)*k+Math.sin(2*k)*(-1.5*e+.1875*a+.0234375*d+.00732421875*f-g+l-p+q*(2*
(.9375*n-.234375*h-.03662109375*G)-4*y+6*m+q*(4*g-12*l+24*p+q*(8*y-32*m+q*(16*l-80*p+q*(32*m+64*q*p)))))))}return b*(c.Lz(k,e)-.5*e*Math.sin(2*k)/c.Tk(e,k))};c.Tk=function(b,e){e=Math.sin(e);return Math.sqrt(1-b*e*e)};c.Yr=function(b){return h.Xz(b,1,2.220446049250313E-16)?1:1>b?c.js(0,1-b)-b/3*c.hs(0,1-b):NaN};c.Lz=function(b,e){var k=h.nb(1,b);b=h.H(b);var n=Math.floor(b/1.570796326794897),u;if(1<e)u=0==b?0:NaN;else if(h.Vc(n))u=c.sin(b),u=u*c.js(1-u*u,1-e*u*u)-e/3*u*u*u*c.hs(1-u*u,1-e*u*u);else{u=
a.I.truncate(n%2);var C=c.Yr(e);0<u?(u=Math.sin(1.570796326794897*(n+1)-b),u=u*c.js(1-u*u,1-e*u*u)-e/3*u*u*u*c.hs(1-u*u,1-e*u*u),u=C*(n+1)-u):(u=Math.sin(b-1.570796326794897*n),u=u*c.js(1-u*u,1-e*u*u)-e/3*u*u*u*c.hs(1-u*u,1-e*u*u),u=C*n+u)}return u*k};c.sin=function(b){b=c.W(b);var e=h.nb(1,b);b=h.H(b);return h.S(b,3.141592653589793)?0:h.S(b,1.570796326794897)?1*e:Math.sin(b)*e};c.hs=function(b,e){for(var c=1,n=0,a=1,C,d,G,f;;){C=.2*(b+e+3*c);d=(C-b)/C;G=(C-e)/C;f=(C-c)/C;if(1E-4>h.H(d)&&1E-4>h.H(G)&&
1E-4>h.H(f))break;f=Math.sqrt(e);C=Math.sqrt(c);f=Math.sqrt(b)*(f+C)+f*C;n+=a/(C*(c+f));a*=.25;b=.25*(b+f);e=.25*(e+f);c=.25*(c+f)}b=d*G;c=f*f;e=b-c;c=b-6*c;d=c+e+e;return 3*n+a*(1+c*(-.2142857142857143+.10227272727272728*c-.1730769230769231*f*d)+f*(.1666666666666667*d+f*(-.4090909090909091*e+.1153846153846154*f*b)))/(C*Math.sqrt(C))};c.js=function(b,e){for(var c,n,a,C,d=1;;d=.25*(d+c)){c=(b+e+d)/3;n=2-(c+b)/c;a=2-(c+e)/c;C=2-(c+d)/c;if(1E-4>h.H(n)&&1E-4>h.H(a)&&1E-4>h.H(C))break;c=Math.sqrt(e);n=
Math.sqrt(d);c=Math.sqrt(b)*(c+n)+c*n;b=.25*(b+c);e=.25*(e+c)}b=n*a-C*C;e=n*a*C;return(1+(.04166666666666666*b-.1-.06818181818181818*e)*b+.07142857142857142*e)/Math.sqrt(c)};c.qu=function(b,e){if(h.Ih(b)||0==e||h.S(h.H(e),1.570796326794897))return e;var c,n,a;if(.006884661117170036>b){c=b*b;n=b*c;a=b*n;var C=b*a,d=b*C,G=b*d,f=-(.02708333333333333*n+.03430059523809524*a+.03149181547619048*C+.02634359154541446*d+.02156896735835538*G),g=.007669890873015873*a+.01299603174603175*C+.0148051353064374*d+
.01454454953803912*G,y=-(.002275545634920635*C+.004830845032667949*d+.006558395368616723*G),l=6.957236677288761E-4*d+.001775193002406544*G,m=-(2.17324089394402E-4*G),p=Math.cos(2*e);return e+Math.sin(2*e)*(-(.5*b+.2083333333333333*c+.09375*n+.04878472222222222*a+.02916666666666667*C+.01938905423280423*d+.01388255931712963*G)-f+y-m+p*(2*(.1041666666666667*c+.0875*n+.06050347222222222*a+.04151785714285714*C+.02958958540013228*d+.02203667534722222*G)-4*g+6*l+p*(4*f-12*y+24*m+p*(8*g-32*l+p*(16*y-80*m+
p*(32*l+64*p*m))))))}0==e||h.S(h.H(e),1.570796326794897)?c=e:(n=Math.sqrt(b),a=n*Math.sin(e),c=Math.tan(.7853981633974483+e/2)*Math.pow((1-a)/(1+a),n/2),c=2*Math.atan(c)-1.570796326794897);return c};c.$K=function(b,e){if(h.Ih(b)||0==e||h.S(h.H(e),1.570796326794897))return e;var c,n;if(.006884661117170036>b){p=b*b;y=b*p;l=b*y;c=b*l;m=b*c;n=b*m;var a=.05833333333333333*y+.07232142857142858*l+.05634300595238095*c+.0355325796406526*m+.020235546186067*n,C=.02653149801587302*l+.04379960317460317*c+.0429211791776896*
m+.03255384637546096*n,d=.01294022817460318*c+.02668104344536636*m+.03155651254609588*n,G=.00659454790965208*m+.0163075268674227*n,f=.003463473736911237*n,g=Math.cos(2*e);return e+Math.sin(2*e)*(.5*b+.2083333333333333*p+.08333333333333333*y+.03611111111111111*l+.01875*c+.01195601851851852*m+.008863673941798942*n-a+d-f+g*(2*(.1458333333333333*p+.1208333333333333*y+.07039930555555556*l+.03616071428571429*c+.01839451058201058*m+.01017113095238095*n)-4*C+6*G+g*(4*a-12*d+24*f+g*(8*C-32*G+g*(16*d-80*f+
g*(32*G+64*g*f))))))}for(var y=Math.sqrt(b),l=y/2,m=Math.tan(.7853981633974483+e/2),a=0,C=1,p=e;0!=C;p=n)if(c=y*Math.sin(p),n=m*Math.pow((1+c)/(1-c),l),n=2*Math.atan(n)-1.570796326794897,a++,h.S(n,p)||3E4<a)C=0;return p};return c}();a.u=d})(z||(z={}));(function(a){var h=function(){function h(){}h.Fb=function(c,b,e,k,n,h,C,d){if(null!=h||null!=C||null!=d){k=a.u.W(k);b=a.u.W(b);e=a.u.W(e);n=a.u.W(n);1.570796326794897<a.j.H(e)&&(e=a.j.nb(3.141592653589793,e)-e,b=a.u.W(b+3.141592653589793));1.570796326794897<
a.j.H(n)&&(n=a.j.nb(3.141592653589793,n)-n,k=a.u.W(k+3.141592653589793));var u=a.u.W(k-b);if(a.j.S(e,n)&&(a.j.S(b,k)||a.j.S(a.j.H(e),1.570796326794897)))null!=h&&(h.l=0),null!=C&&(C.l=0),null!=d&&(d.l=0);else{if(a.j.S(e,-n)){if(a.j.S(a.j.H(e),1.570796326794897)){null!=h&&(h.l=3.141592653589793*c);null!=C&&(C.l=0<e?a.u.W(3.141592653589793-a.u.W(k)):a.u.W(k));null!=d&&(d.l=0<e?a.u.W(k):a.u.W(3.141592653589793-a.u.W(k)));return}if(a.j.S(a.j.H(u),3.141592653589793)){null!=h&&(h.l=3.141592653589793*c);
null!=C&&(C.l=0);null!=d&&(d.l=0);return}}var J=1.570796326794897==a.j.H(e)?0:Math.cos(e),f=Math.sin(e),g=1.570796326794897==a.j.H(n)?0:Math.cos(n),y=Math.sin(n),l=1.570796326794897==a.j.H(u)?0:Math.cos(u),m=3.141592653589793==a.j.H(u)?0:Math.sin(u);if(null!=h){var p=Math.sin((n-e)/2),u=Math.sin(u/2);h.l=2*Math.asin(Math.sqrt(p*p+J*g*u*u))*c}null!=C&&(a.j.S(a.j.H(e),1.570796326794897)?C.l=0>e?k:a.u.W(3.141592653589793-k):C.l=Math.atan2(g*m,J*y-f*g*l));null!=d&&(a.j.S(a.j.H(n),1.570796326794897)?d.l=
0>n?b:a.u.W(3.141592653589793-b):(d.l=Math.atan2(J*m,y*J*l-g*f),d.l=a.u.W(d.l+3.141592653589793)))}}};h.gf=function(c,b,e,k,n,h,C){if(null!=h||null!=C){b=a.u.W(b);e=a.u.W(e);1.570796326794897<a.j.H(e)&&(e=a.j.nb(3.141592653589793,e)-e,b=a.u.W(b+3.141592653589793));a.j.S(a.j.H(e),1.570796326794897)&&(b=0);n=a.u.W(n);var u=a.j.S(a.j.H(n),1.570796326794897)?0:Math.cos(n),d=a.j.S(a.j.H(n),3.141592653589793)?0:Math.sin(n),f=a.j.S(a.j.H(e),1.570796326794897)?0:Math.cos(e),g=Math.sin(e);c=k/c;k=a.j.S(a.j.H(c),
1.570796326794897)?0:Math.cos(c);var y=a.j.S(a.j.H(c),3.141592653589793)?0:Math.sin(c),l=Math.asin(g*k+f*y*u);null!=C&&(C.l=l);null!=h&&(h.l=a.j.S(a.j.H(l),1.570796326794897)?a.j.S(e,-l)?0>l?n:a.u.W(3.141592653589793-n):b:a.j.S(a.j.H(e),1.570796326794897)&&a.j.S(c,3.141592653589793)?0>e?n:a.u.W(3.141592653589793-n):a.u.W(b+Math.atan2(y*d,f*k-g*y*u)))}};return h}();a.zg=h})(z||(z={}));(function(a){var h=function(){function h(){}h.Fb=function(c,b,e,k,n,u,h,d,G){var C=new a.ca(0),J=new a.ca(0),f=[0,
0,0],g=[0,0,0],y=[0,0,0],l=new a.ca(0),m=new a.ca(0),p=new a.ca(0),q=new a.ca(0),r=new a.ca(0);if(null!=h||null!=d||null!=G)if(a.j.Ih(b))a.zg.Fb(c,e,k,n,u,h,d,G);else{n=a.u.W(n);e=a.u.W(e);var v=a.u.W(n-e);if(a.j.S(k,u)&&(a.j.S(e,n)||a.j.S(a.j.H(k),1.570796326794897)))null!=h&&(h.l=0),null!=d&&(d.l=0),null!=G&&(G.l=0);else{if(a.j.S(k,-u)){if(a.j.S(a.j.H(k),1.570796326794897)){null!=h&&(h.l=2*a.u.gg(c,b));null!=d&&(d.l=0<k?a.u.W(3.141592653589793-a.u.W(n)):a.u.W(n));null!=G&&(G.l=0<k?a.u.W(n):a.u.W(3.141592653589793-
a.u.W(n)));return}a.j.S(a.j.H(v),3.141592653589793)&&(null!=h&&(h.l=2*a.u.gg(c,b)),null!=d&&(d.l=0),null!=G&&(G.l=0))}else if(a.j.S(a.j.H(k),1.570796326794897)||a.j.S(a.j.H(u),1.570796326794897))a.j.S(a.j.H(k),1.570796326794897)?e=n:n=e;var x=0,w;0>v&&(x=1,w=e,e=n,n=w,w=k,k=u,u=w);var v=a.u.sr(b,k),t=a.u.sr(b,u);if(null!=d||null!=G)a.zg.Fb(c,e,v,n,t,null,C,J),C=Math.atan2(Math.sin(C.l)*Math.cos(k-v),Math.cos(C.l)),J=Math.atan2(Math.sin(J.l)*Math.cos(u-t),Math.cos(J.l)),0!=x&&(w=C,C=J,J=w),null!=d&&
(d.l=C),null!=G&&(G.l=J);null!=h&&(a.u.wm(b,k,e,p,q,r),f[0]=p.l,f[1]=q.l,f[2]=r.l,a.u.wm(b,u,n,p,q,r),g[0]=p.l,g[1]=q.l,g[2]=r.l,y[0]=f[1]*g[2]-g[1]*f[2],y[1]=-(f[0]*g[2]-g[0]*f[2]),y[2]=f[0]*g[1]-g[0]*f[1],b=1-a.u.Tk(b,a.u.Dp(b,a.u.Si(b,Math.acos(y[2]/Math.sqrt(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]))))),b*=2-b,d=Math.atan2(-y[1],-y[0]),y=a.u.W(d-1.570796326794897),d=a.u.W(d+1.570796326794897),y=a.j.H(a.u.W(e-y))<=a.j.H(a.u.W(e-d))?y:d,a.zg.Fb(1,y,0,e,v,l,null,null),a.zg.Fb(1,y,0,n,t,m,null,null),3.141592653589793<
l.l+m.l&&(y=a.u.W(y+3.141592653589793),a.zg.Fb(1,y,0,e,v,l,null,null),a.zg.Fb(1,y,0,n,t,m,null,null)),l.l*=a.j.nb(1,k),m.l*=a.j.nb(1,u),l.l=a.u.Si(b,l.l),m.l=a.u.Si(b,m.l),e=a.u.q(c,b,l.l),c=a.u.q(c,b,m.l),h.l=a.j.H(c-e))}}};h.gf=function(c,b,e,k,n,u,h,d){var C=0,J=new a.ca(0),f=new a.ca(0),g=[0,0,0],y=[0,0,0],l=new a.ca(0),m=new a.ca(0),p=new a.ca(0);if(null!=h||null!=d)if(a.j.Ih(b))a.zg.gf(c,e,k,n,u,h,d);else if(a.j.Vc(n))null!=h&&(h.l=e),null!=d&&(d.l=k);else{u=a.u.W(u);0>n&&(n=a.j.H(n),u=a.u.W(u+
3.141592653589793));e=a.u.W(e);k=a.u.W(k);1.570796326794897<a.j.H(k)&&(e=a.u.W(e+3.141592653589793),k=a.j.nb(3.141592653589793,k)-k);a.j.S(a.j.H(k),1.570796326794897)&&(e=0);var q;if(a.j.Vc(k))q=a.j.H(1.570796326794897-a.j.H(u)),q=a.u.Si(b,q),q=1-a.u.Tk(b,a.u.Dp(b,q)),q*=2-q,c=n/a.u.gg(c,q)*1.570796326794897,c=a.u.xn(q,c),c=a.u.sr(q,c),a.zg.gf(1,e,k,c,u,h,J),null!=d&&(C=J.l),null!=d&&(d.l=a.u.Si(b,C));else if(a.j.S(a.j.H(k),1.570796326794897))C=a.u.gg(c,b),J=2*C,c=a.j.nb(1.570796326794897,k),u=0<
c?a.u.W(3.141592653589793-u):u,k=C-n,a.j.H(k)<=C?null!=h&&(h.l=u):(k=Math.floor(n/J),0==a.I.truncate(k%2)?(null!=h&&(h.l=u),k=C-(n-k*J)):(null!=h&&(h.l=a.u.W(u+3.141592653589793)),k=C-((k+1)*J-n))),null!=d&&(d.l=a.u.xn(b,k/C*c));else{q=a.u.sr(b,k);u=Math.atan2(Math.sin(u),Math.cos(u)*Math.cos(k-q));var r=a.I.truncate(a.j.nb(1,q))*(1.570796326794897>=a.j.H(u)?1:-1);u=a.u.W(e+Math.atan(Math.tan(u)*-Math.sin(q)));a.zg.Fb(c,u,0,e,q,null,f,null);q=a.j.H(1.570796326794897-a.j.H(f.l));q=a.u.Si(b,q);q=1-
a.u.Tk(b,a.u.Dp(b,q));q*=2-q;a.u.wm(b,0,u,l,m,p);g[0]=l.l;g[1]=m.l;g[2]=p.l;a.u.wm(b,k,e,l,m,p);y[0]=l.l;y[1]=m.l;y[2]=p.l;k=Math.acos((g[0]*y[0]+g[1]*y[1]+g[2]*y[2])/Math.sqrt(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]));k=a.u.Si(q,k);k=a.u.q(c,q,k)+n*r;n=0<k?f.l:a.u.W(f.l+3.141592653589793);c=a.j.H(k)/a.u.gg(c,q)*1.570796326794897;c=a.u.xn(q,c);c=a.u.sr(q,c);a.zg.gf(1,u,0,c,n,h,J);null!=d&&(C=J.l);null!=d&&(d.l=a.u.Si(b,C))}}};return h}();a.Xj=h})(z||(z={}));(function(a){var h=function(){function h(){}h.Fb=
function(c,b,e,k,n,u,h,d,G){var C=0,J=0,f=0;if(null!=h||null!=d||null!=G)if(a.j.Ih(b))a.zg.Fb(c,e,k,n,u,h,d,G);else{var g=a.u.W(n-e);if(a.j.S(k,u)&&(a.j.Vc(g)||a.j.S(a.j.H(k),1.570796326794897)))null!=h&&(h.l=0),null!=d&&(d.l=0),null!=G&&(G.l=0);else{if(a.j.S(k,-u)){if(a.j.S(a.j.H(k),1.570796326794897)){null!=h&&(h.l=2*a.u.gg(c,b));null!=d&&(d.l=0<k?a.u.W(3.141592653589793-a.u.W(n)):a.u.W(n));null!=G&&(G.l=0<k?a.u.W(n):a.u.W(3.141592653589793-a.u.W(n)));return}a.j.S(a.j.H(g),3.141592653589793)&&(null!=
h&&(h.l=2*a.u.gg(c,b)),null!=d&&(d.l=0),null!=G&&(G.l=0))}else{if(a.j.S(a.j.H(k),1.570796326794897)||a.j.S(a.j.H(u),1.570796326794897)){a.Xj.Fb(c,b,e,k,n,u,h,d,G);return}if(a.j.Vc(g)||a.j.S(a.j.H(g),3.141592653589793)){a.Xj.Fb(c,b,e,k,n,u,h,d,G);return}}var y=1-Math.sqrt(1-b),l=b/(1-b),m=c*(1-y);c=a.u.Dp(b,k);var p=a.u.Dp(b,u);b=1.570796326794897==a.j.H(c)?0:Math.cos(c);var q=Math.sin(c),r=1.570796326794897==a.j.H(p)?0:Math.cos(p),v=Math.sin(p),x=g,w=Math.cos(x),t=Math.sin(x),B=1,z=0,E,D,F,P,I;do{E=
x;D=Math.sqrt(Math.pow(r*t,2)+Math.pow(b*v-q*r*w,2));F=q*v+b*r*w;P=Math.atan2(D,F);if(0==D){B=0;break}I=b*r*t/D;C=Math.cos(Math.asin(I));C*=C;J=F-2*q*v/C;1<a.j.H(J)&&(J=a.j.nb(1,J));f=J*J;x=y/16*C*(4+y*(4-3*C));x=g+(1-x)*y*I*(P+x*D*(J+x*F*(2*f-1)));w=Math.cos(x);t=Math.sin(x);z++;if(3.141592653589793<a.j.H(x)&&30<z){B=0;break}}while(5E3>=z&&!a.j.S(E,x));if(0!=B)l*=C,y=l*(256+l*(-128+l*(74-47*l)))/1024,null!=h&&(h.l=m*(1+l*(4096+l*(-768+l*(320-175*l)))/16384)*(P-y*D*(J+y/4*(F*(2*f-1)-y/6*J*(4*D*D-
3)*(4*f-3))))),null!=d&&(a.j.S(a.j.H(k),1.570796326794897)?d.l=0>k?n:a.u.W(3.141592653589793-n):d.l=Math.atan2(r*t,b*v-q*r*w)),null!=G&&(a.j.S(a.j.H(u),1.570796326794897)?G.l=0>u?e:a.u.W(3.141592653589793-e):(G.l=Math.atan2(b*t,b*v*w-q*r),G.l=a.u.W(G.l+3.141592653589793)));else{x=a.j.nb(3.141592653589793,g);F=q*v-b*r;P=Math.acos(F);D=Math.sin(P);C=1;z=I=0;do f=I,C*=C,w=C*C,I=y*C*(1+y+y*y),J=y*y*w*(1+2.25*y),B=y*y*y*w*C,w=1-.25*I+.1875*J-.1953125*B,I=.25*I-.25*J+.29296875*B,t=.03125*J-.05859375*B,
B*=.00651041666666667,J=F-2*q*v/C,1<a.j.H(J)&&(J=a.j.nb(1,J)),C=Math.acos(J),F=Math.cos(2*C),E=Math.cos(3*C),I=a.j.S(k,-u)?a.u.W(3.141592653589793-g)/(3.141592653589793*y*w):a.u.W(x-g)/(y*(w*P+I*D*J+t*Math.sin(2*P)*F+B*Math.sin(3*P)*E)),t=I*D/(b*r),x=1.570796326794897<a.j.H(g)?a.j.nb(3.141592653589793,t)-Math.asin(t):Math.asin(t),w=Math.cos(x),D=Math.sqrt(Math.pow(r*t,2)+Math.pow(b*v-q*r*w,2)),P=3.141592653589793-Math.asin(a.j.H(D)),F=Math.cos(P),C=Math.cos(Math.asin(I)),z++;while(70>=z&&!a.j.S(f,
I));null!=h&&(C*=C,l*=C,w=1+l*(4096+l*(-768+l*(320-175*l)))/16384,a.j.S(k,-u)?h.l=3.141592653589793*m*w:(J=F-2*q*v/C,C=Math.acos(J),F=Math.cos(2*C),E=Math.cos(3*C),h.l=m*(w*P+l*(-512+l*(128+l*(-60+35*l)))/2048*D*J+l*(-4+5*l)/6144*l*l*Math.sin(2*P)*F+B*Math.sin(3*P)*E+-7.62939453125E-5*l*l*l*l*Math.sin(4*P)*Math.cos(4*C))));null!=d&&(a.j.Vc(k)&&a.j.Vc(u)?(C=Math.sqrt(1-I*I),d.l=Math.acos(C),0>g&&(d.l*=-1)):a.j.S(a.j.H(k),1.570796326794897)?d.l=0>k?n:a.u.W(3.141592653589793-n):(h=I/b,m=Math.sqrt(1-
h*h),0>b*v-q*r*Math.cos(x)&&(m*=-1),d.l=Math.atan2(h,m),a.j.S(k,-u)&&a.j.H(a.u.W(e-n))>3.141592653589793*(1-y*Math.cos(k))&&(0<k&&1.570796326794897>a.j.H(d.l)||0>k&&1.570796326794897<a.j.H(d.l))&&(d.l=a.j.nb(3.141592653589793,d.l)-d.l)));if(null!=G)if(a.j.Vc(k)&&a.j.Vc(u))C=Math.sqrt(1-I*I),G.l=Math.acos(C),0<=g&&(G.l*=-1);else if(a.j.S(a.j.H(u),1.570796326794897))G.l=0>u?e:a.u.W(3.141592653589793-e);else if(g=I/r,h=Math.sqrt(1-g*g),m=Math.sin(x/2),0>Math.sin(p-c)-2*b*v*m*m&&(h*=-1),G.l=Math.atan2(g,
h),G.l=a.u.W(G.l+3.141592653589793),a.j.S(k,-u)&&!a.j.Vc(k)&&!a.j.S(a.j.H(k),1.570796326794897)&&a.j.H(a.u.W(e-n))>3.141592653589793*(1-y*Math.cos(k))&&(null!=d?m=d.l:(h=I/b,m=Math.sqrt(1-h*h),0>b*v-q*r*Math.cos(x)&&(m*=-1),m=Math.atan2(h,m),a.j.S(k,-u)&&a.j.H(a.u.W(e-n))>3.141592653589793*(1-y*Math.cos(k))&&(0<k&&1.570796326794897>a.j.H(m)||0>k&&1.570796326794897<a.j.H(m))&&(m=a.j.nb(3.141592653589793,m)-m)),1.570796326794897>=a.j.H(m)&&1.570796326794897<a.j.H(G.l)||1.570796326794897<=a.j.H(m)&&
1.570796326794897>a.j.H(G.l)))G.l=-1*a.u.W(G.l+3.141592653589793)}}}};h.gf=function(c,b,e,k,n,u,h,d){if(null!=h||null!=d)if(a.j.Ih(b))a.zg.gf(c,e,k,n,u,h,d);else if(u=a.u.W(u),a.j.S(a.j.H(k),1.570796326794897)||a.j.Vc(u)||a.j.S(a.j.H(u),3.141592653589793))a.Xj.gf(c,b,e,k,n,u,h,d);else{var C=1.570796326794897==a.j.H(u)?0:Math.cos(u),J=3.141592653589793==a.j.H(u)?0:Math.sin(u);a.j.S(a.j.H(k),1.570796326794897)&&(e=0);u=1-Math.sqrt(1-b);var f=a.u.Dp(b,k);k=1.570796326794897==a.j.H(f)?0:Math.cos(f);var g=
Math.sin(f),f=Math.atan2(Math.tan(f),C),y=k*J,l=y*y,m=1-l,p=b/(1-b)*m;b=p*(256+p*(-128+p*(74-47*p)))/1024;var q=b/4,r=b/6,v=n/(c*(1-u)*(1+p*(4096+p*(-768+p*(320-175*p)))/16384)),x=v,w;do{w=x;n=1.570796326794897==a.j.H(x)?0:Math.cos(x);var p=3.141592653589793==a.j.H(x)?0:Math.sin(x),t=p*p;c=Math.cos(2*f+x);x=c*c;x=b*p*(c+q*(n*(2*x-1)-r*c*(4*t-3)*(4*x-3)))+v}while(!a.j.S(w,x));n=1.570796326794897==a.j.H(x)?0:Math.cos(x);p=3.141592653589793==a.j.H(x)?0:Math.sin(x);null!=h&&(J=Math.atan2(p*J,k*n-g*p*
C),m=u/16*m*(4+u*(4-3*m)),c=Math.cos(2*f+x),h.l=a.u.W(e+(J-(1-m)*u*y*(x+m*p*(c+m*n*(2*c*c-1))))));null!=d&&(m=g*p-k*n*C,m=(1-u)*Math.sqrt(l+m*m),d.l=Math.atan2(g*n+k*p*C,m))}};return h}();a.cs=h})(z||(z={}));(function(a){var h=function(){function h(){}h.Fb=function(c,b,e,k,n,u,h,d,G){var C=a.u.W(n-e),J=a.j.S(a.j.H(k),1.570796326794897),f=a.j.S(a.j.H(u),1.570796326794897);if(a.j.S(k,u)&&(a.j.Vc(C)||J))null!=h&&(h.l=0),null!=d&&(d.l=0),null!=G&&(G.l=0);else{var g,y;a.j.Ih(b)?(g=Math.sin(k),y=Math.sin(u),
g=Math.sqrt((1+g)/(1-g)),y=Math.sqrt((1+y)/(1-y)),g=Math.log(y)-Math.log(g),g=Math.atan2(C,g),null!=h&&(h.l=a.j.S(k,u)?a.j.H(c*Math.cos(k)*C):a.j.H((c*u-c*k)/Math.cos(g)))):(y=a.u.qu(b,u),g=Math.sin(a.u.qu(b,k)),y=Math.sin(y),g=Math.sqrt((1+g)/(1-g)),y=Math.sqrt((1+y)/(1-y)),g=Math.log(y)-Math.log(g),g=Math.atan2(C,g),null!=h&&(a.j.S(k,u)?h.l=a.j.H(c*C*Math.cos(k)/a.u.Tk(b,k)):(C=a.u.q(c,b,k),c=a.u.q(c,b,u),h.l=a.j.H((c-C)/Math.cos(g)))));if(null!=d||null!=G)h=a.u.W(g+3.141592653589793),J&&f||!J&&
!f||(J?g=0>k?n:a.u.W(3.141592653589793-n):f&&(h=0>u?e:a.u.W(3.141592653589793-e))),null!=d&&(d.l=g),null!=G&&(G.l=h)}};h.gf=function(c,b,e,k,n,u,h,d){u=a.u.W(u);0>n&&(n=a.j.H(n),u=a.u.W(u+3.141592653589793));a.j.Ih(b)?a.j.S(a.j.H(k),1.570796326794897)?(e=0>k?u:a.u.W(3.141592653589793-u),u=n/c%6.283185307179586,3.141592653589793>=u?c=k-a.j.nb(u,k):(e=a.u.W(e+3.141592653589793),c=-k+a.j.nb(u-3.141592653589793,k))):a.j.S(a.j.H(u),1.570796326794897)?(e=a.u.W(e+a.j.nb(n,u)/(c*Math.cos(k))),c=k):(c=k+n*
Math.cos(u)/c,1.570796326794897<a.j.H(c)&&(c=1.570796326794897),a.j.S(a.j.H(c),1.570796326794897)&&(a.j.Vc(u)||a.j.S(a.j.H(u),3.141592653589793))||(1.570796316258184<a.j.H(c)&&(c=a.j.nb(1.570796316258184,c)),b=Math.sin(k),k=Math.sin(c),b=Math.sqrt((1+b)/(1-b)),k=Math.sqrt((1+k)/(1-k)),b=Math.log(k)-Math.log(b),e=a.u.W(e+Math.tan(u)*b))):a.j.S(a.j.H(k),1.570796326794897)?(e=0>k?u:a.u.W(3.141592653589793-u),u=n/a.u.nR(c,b),u%=6.283185307179586,3.141592653589793>=u?(c=k-a.j.nb(u,k),c=a.u.xn(b,c)):(e=
a.u.W(e+3.141592653589793),c=-k+a.j.nb(u-3.141592653589793,k),c=a.u.xn(b,c))):a.j.S(a.j.H(u),1.570796326794897)?(e=a.u.W(e+a.j.nb(n,u)*a.u.Tk(b,k)/(c*Math.cos(k))),c=k):(c=1.570796326794897*(n*Math.cos(u)+a.u.q(c,b,k))/a.u.gg(c,b),1.570796326794897<a.j.H(c)&&(c=a.j.nb(1.570796326794897,c)),c=a.u.xn(b,c),a.j.S(a.j.H(c),1.570796326794897)&&(a.j.Vc(u)||a.j.S(a.j.H(u),3.141592653589793))||(n=a.u.qu(b,k),k=a.u.qu(b,c),1.570796316258184<a.j.H(k)&&(k=a.j.nb(1.570796316258184,c),c=a.u.$K(b,k)),b=Math.sin(n),
k=Math.sin(k),b=Math.sqrt((1+b)/(1-b)),k=Math.sqrt((1+k)/(1-k)),b=Math.log(k)-Math.log(b),e=a.u.W(e+Math.tan(u)*b)));null!=h&&(h.l=e);null!=d&&(d.l=c)};return h}();a.Zz=h})(z||(z={}));(function(a){var h=function(){function h(){}h.gw=function(c,b,e,k,n,u,h){a.cs.Fb(c,b,e,k,n,u,null,h,null)};h.Ph=function(c,b,e,k,n,u,h,d){a.cs.gf(c,b,e,k,n,u,h,d)};h.Rd=function(c,b,e,k,n,u,h,d,G,f){switch(f){case 2:a.Xj.Fb(c,b,e,k,n,u,h,d,G);break;case 3:a.$z.Fb(c,b,e,k,n,u,h,d,G);break;case 1:a.Zz.Fb(c,b,e,k,n,u,h,
d,G);break;default:a.cs.Fb(c,b,e,k,n,u,h,d,G)}};h.dk=function(c,b,e,k,n,u,h,d,G){switch(G){case 2:a.Xj.gf(c,b,e,k,n,u,h,d);break;case 3:a.$z.gf(c,b,e,k,n,u,h,d);break;case 1:a.Zz.gf(c,b,e,k,n,u,h,d);break;default:a.cs.gf(c,b,e,k,n,u,h,d)}};return h}();a.zb=h})(z||(z={}));(function(a){var h=function(){function h(){}h.QS=function(c,b){var e=8;0>e&&(e=8);var k=[0,0,0,0],n=new a.b;n.J(b);n.scale(9102==a.Ya.Em(c).Se().Qc()?1:a.Ya.Em(c).Se().Dj/3.141592653589793*180);-180>n.x?(n.x-=n.x%360,-180>n.x&&(n.x+=
360)):180<n.x&&(n.x-=n.x%360,180<n.x&&(n.x-=360));90<n.y&&(n.y=90);-90>n.y&&(n.y=-90);c=5*e;b=(c+31)/32;for(var u=-180,C=180,d=c-1,G=b-1;0<=G;G--)for(var f=d-32*G,g=Math.min(32,c-32*G),y=1;y<g;y+=2){var l=.5*(C+u);n.x>=l?(k[G]|=1<<f,u=l):C=l;f-=2;d-=2}u=-90;C=90;d=c-2;for(G=b-1;0<=G;G--)for(f=d-32*G,g=Math.min(32,c-32*G),y=0;y<g;y+=2)l=.5*(C+u),n.y>=l?(k[G]|=1<<f,u=l):C=l,f-=2,d-=2;return h.XS(k,e,e)};h.XS=function(c,b,e){for(var k=[],n=0;n<b;n++)k[n]="";for(var a=n=0,h=0;h<b;h++){var d=c[n]>>a&31,
a=a+5;if(31<a){var G=37-a,d=d&(1<<G)-1,a=a-32;n++;d|=(c[n]&(1<<a)-1)<<G}k[b-1-h]="0123456789bcdefghjkmnpqrstuvwxyz".split("")[d]}if(e>b)for(h=0;h<e-b;h++)k.push("0");else e<b&&(k.length=e);return k.join("")};return h}();a.qH=h})(z||(z={}));(function(a){var h={gcstol:[0,1E-8,1,1.11111E-8,2,1.68845E-8,3,2.17661E-8,4,2.22508E-8,5,2.34848E-8,6,2.37811E-8,7,2.88455E-8,8,3.1456E-8,9,3.29779E-8,10,3.66789E-8,11,4.23597E-8,12,4.79463E-8,13,6.45223E-8,14,7.26274E-8,15,7.49945E-8,16,7.52506E-8,17,7.97991E-8,
18,9.66202E-8,19,9.79918E-8,20,9.89735E-8,21,1.02314E-7,22,1.08146E-7,23,2.29734E-7,24,2.42985E-7,25,2.7546E-7,26,3.37034E-7,27,4.30795E-7,28,5.20871E-7,29,5.50921E-7,30,6.74068E-7,31,6.86177E-7,32,7.25263E-7,33,7.44101E-7,34,7.74267E-7,35,9.62954E-7,36,1.06103E-6,37,1.14363E-6,38,1.16219E-6,39,1.36419E-6,40,1.36744E-6,41,1.43239E-6,42,1.73624E-6,43,1.84825E-6,44,1.90986E-6,45,1.97572E-6,46,2.12207E-6,47,2.72837E-6,48,3.1831E-6,49,3.58099E-6,50,3.81972E-6,51,4.09256E-6,52,4.40737E-6,53,4.77465E-6,
54,5.16178E-6,55,5.20871E-6,56,5.72958E-6,57,6.03113E-6,58,6.98729E-6,59,9.24125E-6,60,1.14592E-5],pcstol:[0,6.66667E-9,1,2E-8,2,4.97098E-5,3,.001,4,.00109362,5,.00328087,6,.00497101],newtoold:[2154,102110,2195,102200,2204,32036,2205,26979,2225,102641,2226,102642,2227,102643,2228,102644,2229,102645,2230,102646,2231,102653,2232,102654,2233,102655,2234,102656,2235,102657,2236,102658,2237,102659,2238,102660,2239,102666,2240,102667,2241,102668,2242,102669,2243,102670,2246,102679,2247,102680,2248,102685,
2249,102686,2250,102687,2254,102694,2255,102695,2257,102712,2258,102713,2259,102714,2260,102715,2261,102716,2262,102717,2263,102718,2264,102719,2267,102724,2268,102725,2271,102728,2272,102729,2274,102736,2275,102737,2276,102738,2277,102739,2278,102740,2279,102741,2283,102746,2284,102747,2285,102748,2286,102749,2287,102752,2288,102753,2289,102754,2312,23433,2326,102140,2395,2091,2396,2092,2397,2166,2398,2167,2399,2168,2759,102229,2760,102230,2761,102248,2762,102249,2763,102250,2764,102251,2765,102252,
2766,102241,2767,102242,2768,102243,2769,102244,2770,102245,2771,102246,2772,102253,2773,102254,2774,102255,2775,102256,2776,102257,2777,102258,2778,102259,2779,102260,2780,102266,2781,102267,2782,102261,2783,102262,2784,102263,2785,102264,2786,102265,2787,102268,2788,102269,2789,102270,2790,102271,2791,102272,2792,102273,2793,102274,2794,102275,2795,102276,2796,102277,2797,102278,2798,102279,2799,102280,2800,102281,2801,102282,2802,102283,2803,102284,2804,102285,2805,102286,2806,102287,2807,102288,
2808,102289,2809,102290,2810,102291,2811,102292,2812,102293,2813,102294,2814,102295,2815,102296,2816,102297,2817,102298,2818,102300,2819,102304,2820,102307,2821,102308,2822,102309,2823,102310,2824,102311,2825,102312,2826,102313,2827,102314,2828,102315,2829,102316,2830,102317,2831,102318,2832,102320,2833,102321,2834,102322,2835,102323,2836,102324,2837,102325,2838,102326,2839,102327,2840,102330,2841,102334,2842,102335,2843,102336,2844,102337,2845,102338,2846,102339,2847,102340,2848,102341,2849,102342,
2850,102343,2851,102344,2852,102345,2853,102346,2854,102347,2855,102348,2856,102349,2857,102350,2858,102351,2859,102352,2860,102353,2861,102354,2862,102355,2863,102356,2864,102357,2865,102358,2866,102361,2942,102167,2943,102169,2944,2139,2945,2140,2946,2141,2947,2142,2948,2143,2949,2144,2950,2145,2951,2146,2952,2147,2953,2036,2954,2291,2955,2153,2956,2152,2957,2151,2958,2150,2959,2149,2960,2037,2961,2038,2962,2148,2965,2244,2966,2245,3003,102091,3004,102092,3005,102190,3060,2982,3067,102139,3072,
102606,3074,102608,3075,102208,3077,102210,3078,102123,3080,102119,3081,102603,3082,102602,3083,102601,3088,65163,3089,102763,3090,102363,3092,102151,3093,102152,3094,102153,3095,102154,3096,102155,3097,102145,3098,102146,3099,102147,3100,102148,3101,102149,3102,2155,3107,102172,3110,102170,3111,102171,3119,2214,3158,102234,3159,102235,3160,102236,3336,2979,3338,102006,3346,2600,3370,102126,3371,102127,3372,102130,3373,102131,3400,102184,3401,102185,3404,3359,3407,3366,3417,102675,3418,102676,3419,
102677,3420,102678,3421,102707,3422,102708,3423,102709,3424,102711,3433,102651,3434,102652,3435,102671,3436,102672,3437,102710,3438,102730,3448,102095,3451,102681,3452,102682,3455,102735,3461,2063,3462,2064,3463,3073,3464,3076,3560,102742,3566,102743,3567,102744,3734,102722,3735,102723,3736,102755,3737,102756,3738,102757,3739,102758,3741,102205,3742,102206,3743,102207,3748,102211,3750,102202,3751,102203,3759,102663,3760,102463,3764,102112,3770,102090,3771,102180,3772,102181,3773,102182,3775,102186,
3776,102187,3777,102188,3800,102183,3801,102189,3812,102199,3814,102609,3815,102469,3819,104990,3821,104136,3824,104137,3825,102444,3826,102443,3827,102442,3828,102441,3857,102100,3889,104991,3906,104992,4048,103201,4049,103202,4050,103203,4051,103204,4056,103205,4057,103206,4058,103207,4059,103208,4060,103209,4061,103210,4062,103211,4063,103212,4071,103213,4082,103214,4083,103215,4093,103216,4094,103217,4095,103218,4096,103219,4167,104108,4169,37252,4171,104107,4189,104110,4197,4234,4223,37223,4304,
104304,4414,102201,4415,102762,4417,102764,4434,102765,4437,102647,4455,32029,4456,32018,4457,3454,4462,102439,4463,4466,4470,4469,4484,103794,4485,103795,4486,103796,4487,103797,4488,103798,4489,103799,4611,104104,4612,104111,4613,37255,4615,37247,4616,37250,4617,4140,4618,4291,4620,37211,4626,37235,4647,102362,4658,37204,4668,37201,4669,4126,4672,37217,4673,104125,4675,37220,4684,37232,4698,4631,4707,37213,4708,37231,4709,37212,4710,37238,4711,37214,4712,37237,4713,37208,4714,37215,4715,37253,4716,
37216,4717,37239,4719,37219,4722,37242,4724,37233,4725,37222,4727,37224,4728,37246,4729,37226,4730,37227,4731,37228,4732,37229,4733,37230,4734,37251,4735,37259,4736,37254,4739,37205,4758,104133,4760,37001,4762,104114,4826,102214,5013,104142,5014,102331,5015,102332,5016,102333,5173,102085,5174,102086,5175,102087,5176,102088,5177,102089,5178,102040,5179,102080,5185,102081,5186,102082,5187,102083,5188,102084,5221,102066,5246,104100,5247,102490,5324,104144,5325,102420,5329,2934,5365,104143,5367,102305,
5451,104132,5513,102065,5514,102067,5519,102111,5520,31461,5646,102745,5839,5388,5858,5532,5879,4474,21896,21891,21897,21892,21898,21893,21899,21894,26701,102124,26702,102125,26799,26747,26847,102683,26848,102684,26849,102691,26850,102692,26851,102693,26852,102704,26853,102750,26854,102751,26857,102466,26858,102467,26859,102468,26901,102128,26902,102129,27493,27492,29101,29100,29168,29118,29169,29119,29170,29120,29171,29121,29172,29122,29187,29177,29188,29178,29189,29179,29190,29180,29191,29181,29192,
29182,29193,29183,29194,29184,29195,29185,29902,29900,31279,31278,31281,31291,31282,31292,31283,31293,31284,31294,31285,31295,31286,31296,31287,31297,31466,31462,31467,31463,31468,31464,31469,31465,31986,31917,31987,31918,31988,31919,31989,31920,31990,31921,31991,31922,32064,32074,32065,32075,32066,32076,32067,32077],pcsid:[2066,6,2136,5,2155,5,2157,3,2158,3,2159,5,2160,5,2219,3,2220,3,2244,5,2245,5,2256,5,2265,5,2266,5,2269,5,2270,5,2273,5,2290,3,2291,3,2294,3,2295,3,2313,3,2314,5,2964,5,2967,5,
2968,5,2991,3,2992,5,2993,3,2994,5,3073,3,3076,3,3079,3,3091,5,3106,3,3108,3,3109,3,3141,3,3142,3,3167,2,3337,3,3347,3,3348,3,3359,5,3360,3,3361,5,3362,3,3363,5,3364,3,3365,5,3366,5,3402,3,3403,3,3405,3,3406,3,3439,3,3440,3,3447,3,3449,3,3450,3,3453,5,3454,5,3460,3,3479,5,3480,3,3481,5,3482,3,3483,5,3484,3,3485,5,3486,3,3487,5,3488,3,3489,3,3490,5,3491,3,3492,5,3493,3,3494,5,3495,3,3496,5,3497,3,3498,5,3499,3,3500,5,3501,3,3502,5,3503,3,3504,5,3505,3,3506,5,3507,3,3508,5,3509,3,3510,5,3511,3,3512,
5,3513,3,3514,3,3515,5,3516,3,3517,5,3518,3,3519,5,3520,3,3521,5,3522,3,3523,5,3524,3,3525,5,3526,3,3527,5,3528,3,3529,5,3530,3,3531,5,3532,3,3533,5,3534,3,3535,5,3536,3,3537,5,3538,3,3539,5,3540,3,3541,5,3542,3,3543,5,3544,3,3545,5,3546,3,3547,5,3548,3,3549,5,3550,3,3551,5,3552,3,3553,5,3582,5,3583,3,3584,5,3585,3,3586,5,3587,3,3588,5,3589,3,3590,5,3591,3,3592,3,3593,5,3598,5,3599,3,3600,5,3605,5,3606,3,3607,3,3608,5,3609,3,3610,5,3611,3,3612,5,3613,3,3614,5,3615,3,3616,5,3617,3,3618,5,3619,3,3620,
5,3621,3,3622,5,3623,3,3624,5,3625,3,3626,5,3627,3,3628,5,3629,3,3630,5,3631,3,3632,5,3633,3,3634,5,3635,3,3636,5,3640,5,3641,3,3642,5,3643,3,3644,5,3645,3,3646,5,3647,3,3648,5,3649,3,3650,5,3651,3,3652,5,3653,3,3654,5,3655,3,3656,5,3657,3,3658,5,3659,3,3660,5,3661,3,3662,5,3663,3,3664,5,3668,5,3669,3,3670,5,3671,3,3672,5,3673,3,3674,5,3675,3,3676,5,3677,5,3678,3,3679,5,3680,5,3681,3,3682,5,3683,5,3684,3,3685,3,3686,5,3687,3,3688,5,3689,3,3690,5,3691,3,3692,5,3696,5,3697,3,3698,5,3699,3,3700,5,3740,
3,3749,3,3783,3,3784,3,3793,3,3794,3,3802,3,3816,3,3829,3,3854,3,3920,3,3978,3,3979,3,3991,5,3992,5,4026,3,4037,3,4038,3,4217,5,4438,5,4439,5,4467,3,4471,3,4474,3,4559,3,4839,3,5018,3,5048,3,5167,3,5168,3,5223,3,5234,3,5235,3,5243,3,5266,3,5316,3,5320,3,5321,3,5330,3,5331,3,5337,3,5361,3,5362,3,5382,3,5383,3,5396,3,5456,3,5457,3,5469,3,5472,4,5490,3,5518,3,5523,3,5559,3,5588,5,5589,5,5596,3,5627,3,5629,3,5641,3,5643,3,5644,3,5654,5,5655,5,5659,3,5700,3,5825,3,5836,3,5837,3,5842,3,5844,3,5880,3,5887,
3,5890,3,20499,3,20538,3,20539,3,20790,3,20791,3,21291,3,21292,3,21500,3,21817,3,21818,3,22032,3,22033,3,22091,3,22092,3,22332,3,22391,3,22392,3,22700,3,22770,3,22780,3,22832,3,23090,3,23095,3,23239,3,23240,3,23433,3,23700,3,24047,3,24048,3,24100,5,24200,3,24305,3,24306,3,24382,4,24383,3,24500,3,24547,3,24548,3,24571,2,24600,3,25E3,3,25231,3,25884,3,25932,3,26237,3,26331,3,26332,3,26591,3,26592,3,26632,3,26692,3,26855,5,26856,5,27120,3,27200,3,27291,4,27292,4,27429,3,27492,3,27500,3,27700,3,28232,
3,28600,3,28991,3,28992,3,29100,3,29220,3,29221,3,29333,3,29635,3,29636,3,29701,3,29738,3,29739,3,29849,3,29850,3,29871,2,29872,5,29873,3,29900,3,29901,3,29903,3,30200,6,30339,3,30340,3,30591,3,30592,3,30791,3,30792,3,31028,3,31121,3,31154,3,31170,3,31171,3,31370,3,31528,3,31529,3,31600,3,31700,3,31838,3,31839,3,31901,3,32061,3,32062,3,32098,3,32099,5,32100,3,32104,3,32161,3,32766,3,53034,3,53048,3,53049,3,54034,3,65061,5,65062,5,65161,3,65163,3,102041,5,102064,4,102068,1,102069,0,102217,5,102218,
3,102219,5,102220,5,102378,5,102379,5,102380,3,102381,5,102589,5,102599,5,102600,5,102604,5,102605,3,102606,3,102647,3,102704,5,102705,5,102733,5,102761,5,102762,3,102763,5,102764,3,102765,3,102766,5,102970,5,102974,5,102993,3,102994,3,102995,5,102996,5,103015,3,103016,5,103017,3,103018,5,103025,3,103026,3,103027,5,103028,5,103035,3,103036,3,103037,5,103038,5,103039,3,103040,3,103041,5,103042,5,103043,3,103044,3,103045,5,103046,5,103047,3,103048,3,103049,5,103050,5,103051,3,103052,5,103053,3,103054,
5,103055,3,103056,5,103057,3,103058,3,103059,5,103060,5,103061,3,103062,3,103063,5,103064,5,103069,5,103070,3,103071,3,103072,5,103073,5,103086,3,103087,3,103088,5,103089,5,103094,5,103095,3,103096,5,103103,3,103104,5,103105,3,103106,5,103121,3,103122,5,103123,3,103124,3,103125,5,103126,5,103127,3,103128,3,103129,5,103130,5,103131,3,103132,3,103133,5,103134,5,103135,3,103136,3,103137,5,103138,5,103139,3,103140,5,103141,3,103142,5,103143,3,103144,5,103145,3,103146,5,103147,3,103148,3,103149,5,103150,
5,103151,3,103152,5,103172,3,103173,5,103174,3,103175,3,103176,5,103177,5,103178,3,103179,3,103180,5,103181,5,103182,3,103183,3,103184,5,103185,5,103228,3,103229,3,103230,5,103231,5,103250,3,103251,5,103252,3,103253,5,103260,3,103261,3,103262,5,103263,5,103270,3,103271,3,103272,5,103273,5,103274,3,103275,3,103276,5,103277,5,103278,3,103279,3,103280,5,103281,5,103282,3,103283,3,103284,5,103285,5,103286,3,103287,5,103288,3,103289,5,103290,3,103291,5,103292,3,103293,3,103294,5,103295,5,103296,3,103297,
3,103298,5,103299,5,103376,5,103377,3,103378,3,103379,5,103380,5,103393,3,103394,3,103395,5,103396,5,103472,3,103473,5,103474,3,103475,5,103482,3,103483,5,103484,3,103485,5,103500,3,103501,5,103502,3,103503,3,103504,5,103505,5,103506,3,103507,3,103508,5,103509,5,103510,3,103511,3,103512,5,103513,5,103514,3,103515,5,103516,3,103517,5,103518,3,103519,5,103520,3,103521,5,103522,3,103523,3,103524,5,103525,5,103526,3,103527,5,103561,5,103562,5,103563,3,103564,3,103565,5,103566,5,103567,3,103568,3,103569,
5,103570,5,103585,5,103695,5],pcsidc:[[2E3,2045,3],[2056,2065,3],[2067,2135,3],[2137,2153,3],[2161,2170,3],[2172,2193,3],[2196,2198,3],[2200,2203,3],[2206,2217,3],[2222,2224,5],[2251,2253,5],[2280,2282,5],[2308,2311,3],[2315,2325,3],[2327,2394,3],[2400,2462,3],[2523,2576,3],[2578,2693,3],[2695,2758,3],[2867,2888,5],[2891,2930,5],[2931,2941,3],[2969,2973,3],[2975,2982,3],[2984,2988,3],[2995,3002,3],[3006,3051,3],[3054,3059,3],[3061,3066,3],[3068,3071,3],[3084,3087,3],[3112,3118,3],[3120,3138,3],[3146,
3151,3],[3153,3157,3],[3161,3166,3],[3168,3172,3],[3174,3203,3],[3294,3313,3],[3315,3335,3],[3339,3345,3],[3350,3358,3],[3367,3369,3],[3374,3399,3],[3408,3416,3],[3425,3432,5],[3441,3446,5],[3456,3459,5],[3465,3478,3],[3554,3559,3],[3561,3565,5],[3568,3570,5],[3571,3581,3],[3594,3597,3],[3601,3604,3],[3637,3639,3],[3665,3667,3],[3693,3695,3],[3701,3727,3],[3728,3733,5],[3744,3747,3],[3753,3758,5],[3761,3763,3],[3765,3769,3],[3779,3781,3],[3788,3791,3],[3797,3799,3],[3832,3841,3],[3844,3852,3],[3873,
3885,3],[3890,3893,3],[3907,3912,3],[3942,3950,3],[3968,3970,3],[3973,3976,3],[3986,3989,3],[3994,3997,3],[4399,4413,5],[4418,4433,5],[4491,4554,3],[5069,5072,3],[5105,5130,3],[5180,5184,3],[5253,5259,3],[5269,5275,3],[5292,5311,3],[5343,5349,3],[5355,5357,3],[5387,5389,3],[5459,5463,3],[5479,5482,3],[5530,5539,3],[5550,5552,3],[5562,5583,3],[5623,5625,5],[5631,5639,3],[5649,5653,3],[5663,5680,3],[5682,5685,3],[5875,5877,3],[20002,20032,3],[20062,20092,3],[20135,20138,3],[20248,20258,3],[20348,20358,
3],[20436,20440,3],[20822,20824,3],[20934,20936,3],[21035,21037,3],[21095,21097,3],[21148,21150,3],[21413,21423,3],[21473,21483,3],[21780,21782,3],[21891,21894,3],[22171,22177,3],[22181,22187,3],[22191,22197,3],[22234,22236,3],[22521,22525,3],[22991,22994,3],[23028,23038,3],[23830,23853,3],[23866,23872,3],[23877,23884,3],[23886,23894,3],[23946,23948,3],[24311,24313,3],[24342,24347,3],[24370,24374,4],[24375,24381,3],[24718,24721,3],[24817,24821,3],[24877,24882,3],[24891,24893,3],[25391,25395,3],[25828,
25838,3],[26191,26195,3],[26391,26393,3],[26703,26722,3],[26729,26760,5],[26766,26798,5],[26860,26870,5],[26891,26899,3],[26903,26923,3],[26929,26946,3],[26948,26998,3],[27037,27040,3],[27205,27232,3],[27258,27260,3],[27391,27398,3],[27561,27564,3],[27571,27574,3],[27581,27584,3],[27591,27594,3],[28191,28193,3],[28348,28358,3],[28402,28432,3],[28462,28492,3],[29118,29122,3],[29177,29185,3],[30161,30179,3],[30491,30494,3],[30729,30732,3],[31251,31259,3],[31265,31268,3],[31275,31278,3],[31288,31297,
3],[31461,31465,3],[31491,31495,3],[31917,31922,3],[31965,31985,3],[31992,32E3,3],[32001,32003,5],[32005,32031,5],[32033,32060,5],[32074,32077,5],[32081,32086,3],[32107,32130,3],[32133,32158,3],[32164,32167,5],[32180,32199,3],[32201,32260,3],[32301,32360,3],[32601,32662,3],[32664,32667,5],[32701,32761,3],[53001,53004,3],[53008,53019,3],[53021,53032,3],[53042,53046,3],[54001,54004,3],[54008,54019,3],[54021,54032,3],[54042,54046,3],[54048,54053,3],[102001,102040,3],[102042,102063,3],[102065,102067,
3],[102070,102112,3],[102114,102117,3],[102118,102121,5],[102122,102208,3],[102210,102216,3],[102221,102300,3],[102304,102377,3],[102382,102388,3],[102389,102391,5],[102401,102444,3],[102450,102452,3],[102461,102468,5],[102469,102492,3],[102500,102519,5],[102530,102549,3],[102570,102588,3],[102590,102598,3],[102601,102603,3],[102608,102628,3],[102629,102646,5],[102648,102672,5],[102675,102700,5],[102701,102703,3],[102707,102730,5],[102735,102758,5],[102767,102798,3],[102962,102969,3],[102971,102973,
3],[102975,102989,3],[102990,102992,5],[102997,103002,3],[103003,103008,5],[103009,103011,3],[103012,103014,5],[103019,103021,3],[103022,103024,5],[103029,103031,3],[103032,103034,5],[103065,103068,3],[103074,103076,3],[103077,103079,5],[103080,103082,3],[103083,103085,5],[103090,103093,3],[103097,103099,3],[103100,103102,5],[103107,103109,3],[103110,103112,5],[103113,103116,3],[103117,103120,5],[103153,103157,3],[103158,103162,5],[103163,103165,3],[103166,103171,5],[103186,103188,3],[103189,103191,
5],[103192,103195,3],[103196,103199,5],[103200,103224,3],[103225,103227,5],[103232,103237,3],[103238,103243,5],[103244,103246,3],[103247,103249,5],[103254,103256,3],[103257,103259,5],[103264,103266,3],[103267,103269,5],[103300,103375,3],[103381,103383,3],[103384,103386,5],[103387,103389,3],[103390,103392,5],[103397,103399,3],[103400,103471,5],[103476,103478,3],[103479,103481,5],[103486,103488,3],[103489,103491,5],[103492,103495,3],[103496,103499,5],[103539,103543,3],[103544,103548,5],[103549,103551,
3],[103552,103557,5],[103558,103560,3],[103571,103573,3],[103574,103576,5],[103577,103580,3],[103581,103583,5],[103600,103694,3],[103700,103793,5],[103794,103799,3]],gcsid:[4042,0,4075,0,4081,0,4168,0,4170,0,4188,0,4261,1,4262,0,4263,0,4288,0,4289,0,4305,1,4322,0,4324,0,4326,0,4466,0,4469,0,4475,0,4483,0,4490,0,4555,0,4558,0,4614,0,4619,0,4657,0,4670,0,4671,0,4674,0,4682,0,4683,0,4718,0,4720,0,4721,0,4723,0,4726,0,4737,0,4738,0,4759,0,4761,0,4807,1,4808,0,4809,0,4816,1,4817,0,4818,0,4819,1,4820,0,
4821,1,4823,0,4824,0,4901,1,4902,1,4903,0,4904,0,5228,0,5229,0,5233,0,5252,0,5264,0,5340,0,5354,0,5360,0,5371,0,5373,0,5381,0,5393,0,5464,0,5467,0,5489,0,5524,0,5527,0,5546,0,5561,0,5593,0,5681,0,5886,0,37225,1,37235,0,37257,0,37259,0,37260,0,104020,0,104139,1,104140,1,104223,0,104286,0,104287,0,104304,0,104305,0,104896,0,104900,5,104901,0,104902,0,104903,9,104904,2,104905,2,104906,59,104907,54,104908,0,104909,58,104910,31,104911,56,104912,6,104913,50,104914,41,104915,10,104916,3,104917,30,104918,
8,104919,60,104920,53,104921,44,104922,48,104923,51,104924,38,104925,0,104926,49,104927,57,104928,21,104929,23,104930,35,104931,49,104932,27,104933,17,104934,13,104935,7,104936,56,104937,40,104938,28,104939,37,104940,15,104941,55,104942,22,104943,4,104944,0,104945,20,104946,42,104947,47,104948,52,104949,43,104950,46,104951,39,104952,24,104953,16,104954,50,104955,36,104956,33,104957,46,104958,14,104959,19,104960,0,104961,34,104962,32,104963,29,104964,45,104965,26,104966,25,104967,41,104968,11,104969,
12,104970,18],gcsidc:[[4001,4016,0],[4018,4025,0],[4027,4029,0],[4031,4036,0],[4044,4047,0],[4052,4054,0],[4120,4166,0],[4172,4176,0],[4178,4185,0],[4190,4196,0],[4198,4216,0],[4218,4222,0],[4224,4232,0],[4234,4260,0],[4265,4267,0],[4269,4286,0],[4291,4303,0],[4306,4319,0],[4600,4610,0],[4621,4625,0],[4627,4633,0],[4636,4639,0],[4641,4646,0],[4659,4667,0],[4676,4680,0],[4686,4697,0],[4699,4706,0],[4740,4757,0],[4763,4765,0],[4801,4806,0],[4810,4812,1],[4813,4815,0],[37001,37008,0],[37201,37208,0],
[37211,37224,0],[37226,37233,0],[37237,37243,0],[37245,37247,0],[37249,37255,0],[104100,104138,0],[104141,104145,0],[104256,104261,0],[104700,104786,0],[104990,104992,0]]},d={c:[[2E3,2045,9001],[2056,2065,9001],[2067,2135,9001],[2137,2153,9001],[2161,2170,9001],[2172,2193,9001],[2196,2198,9001],[2200,2203,9001],[2206,2217,9001],[2222,2224,9002],[2251,2253,9002],[2280,2282,9002],[2308,2311,9001],[2315,2325,9001],[2327,2394,9001],[2400,2462,9001],[2523,2576,9001],[2578,2693,9001],[2695,2758,9001],[2867,
2869,9002],[2870,2888,9003],[2891,2895,9003],[2896,2898,9002],[2902,2908,9003],[2915,2920,9003],[2921,2923,9002],[2924,2930,9003],[2931,2941,9001],[2969,2973,9001],[2975,2982,9001],[2984,2988,9001],[2995,3002,9001],[3006,3051,9001],[3054,3059,9001],[3061,3066,9001],[3068,3071,9001],[3084,3087,9001],[3112,3118,9001],[3120,3138,9001],[3146,3151,9001],[3153,3157,9001],[3161,3166,9001],[3168,3172,9001],[3174,3203,9001],[3294,3313,9001],[3315,3335,9001],[3339,3345,9001],[3350,3358,9001],[3367,3369,9001],
[3374,3399,9001],[3408,3416,9001],[3425,3432,9003],[3441,3446,9003],[3456,3459,9003],[3465,3478,9001],[3554,3559,9001],[3561,3565,9003],[3568,3570,9003],[3571,3581,9001],[3594,3597,9001],[3601,3604,9001],[3637,3639,9001],[3665,3667,9001],[3693,3695,9001],[3701,3727,9001],[3728,3733,9003],[3744,3747,9001],[3753,3758,9003],[3761,3763,9001],[3765,3769,9001],[3779,3781,9001],[3788,3791,9001],[3797,3799,9001],[3832,3841,9001],[3844,3852,9001],[3873,3885,9001],[3890,3893,9001],[3907,3912,9001],[3942,3950,
9001],[3968,3970,9001],[3973,3976,9001],[3986,3989,9001],[3994,3997,9001],[4001,4016,9102],[4018,4025,9102],[4027,4029,9102],[4031,4036,9102],[4044,4047,9102],[4052,4054,9102],[4120,4166,9102],[4172,4176,9102],[4178,4185,9102],[4190,4196,9102],[4198,4216,9102],[4218,4222,9102],[4224,4232,9102],[4234,4260,9102],[4265,4267,9102],[4269,4286,9102],[4291,4303,9102],[4306,4319,9102],[4399,4413,9003],[4418,4433,9003],[4491,4554,9001],[4600,4610,9102],[4621,4625,9102],[4627,4633,9102],[4636,4639,9102],[4641,
4646,9102],[4659,4667,9102],[4676,4680,9102],[4686,4697,9102],[4699,4706,9102],[4740,4757,9102],[4763,4765,9102],[4801,4806,9102],[4810,4812,9105],[4813,4815,9102],[5069,5072,9001],[5105,5130,9001],[5180,5184,9001],[5253,5259,9001],[5269,5275,9001],[5292,5311,9001],[5343,5349,9001],[5355,5357,9001],[5387,5389,9001],[5459,5463,9001],[5479,5482,9001],[5530,5539,9001],[5550,5552,9001],[5562,5583,9001],[5623,5625,9003],[5631,5639,9001],[5649,5653,9001],[5663,5680,9001],[5682,5685,9001],[5875,5877,9001],
[20002,20032,9001],[20062,20092,9001],[20135,20138,9001],[20248,20258,9001],[20348,20358,9001],[20436,20440,9001],[20822,20824,9001],[20934,20936,9001],[21035,21037,9001],[21095,21097,9001],[21148,21150,9001],[21413,21423,9001],[21473,21483,9001],[21780,21782,9001],[21891,21894,9001],[22171,22177,9001],[22181,22187,9001],[22191,22197,9001],[22234,22236,9001],[22521,22525,9001],[22991,22994,9001],[23028,23038,9001],[23830,23853,9001],[23866,23872,9001],[23877,23884,9001],[23886,23894,9001],[23946,
23948,9001],[24311,24313,9001],[24342,24347,9001],[24370,24374,9084],[24375,24381,9001],[24718,24721,9001],[24817,24821,9001],[24877,24882,9001],[24891,24893,9001],[25391,25395,9001],[25828,25838,9001],[26191,26195,9001],[26391,26393,9001],[26703,26722,9001],[26729,26760,9003],[26766,26798,9003],[26860,26870,9003],[26891,26899,9001],[26903,26923,9001],[26929,26946,9001],[26948,26998,9001],[27037,27040,9001],[27205,27232,9001],[27258,27260,9001],[27391,27398,9001],[27561,27564,9001],[27571,27574,9001],
[27581,27584,9001],[27591,27594,9001],[28191,28193,9001],[28348,28358,9001],[28402,28432,9001],[28462,28492,9001],[29118,29122,9001],[29177,29185,9001],[30161,30179,9001],[30491,30494,9001],[30729,30732,9001],[31251,31259,9001],[31265,31268,9001],[31275,31278,9001],[31288,31297,9001],[31461,31465,9001],[31491,31495,9001],[31917,31922,9001],[31965,31985,9001],[31992,32E3,9001],[32001,32003,9003],[32005,32031,9003],[32033,32060,9003],[32074,32077,9003],[32081,32086,9001],[32107,32130,9001],[32133,32158,
9001],[32164,32167,9003],[32180,32199,9001],[32201,32260,9001],[32301,32360,9001],[32601,32662,9001],[32664,32667,9003],[32701,32761,9001],[37001,37008,9102],[37201,37208,9102],[37211,37224,9102],[37226,37233,9102],[37237,37243,9102],[37245,37247,9102],[37249,37255,9102],[53001,53004,9001],[53008,53019,9001],[53021,53032,9001],[53042,53046,9001],[54001,54004,9001],[54008,54019,9001],[54021,54032,9001],[54042,54046,9001],[54048,54053,9001],[102001,102040,9001],[102042,102063,9001],[102065,102067,9001],
[102070,102112,9001],[102114,102117,9001],[102122,102208,9001],[102210,102216,9001],[102221,102300,9001],[102304,102377,9001],[102382,102388,9001],[102389,102391,9003],[102401,102444,9001],[102450,102452,9001],[102461,102468,9003],[102469,102492,9001],[102500,102519,9002],[102530,102549,9001],[102570,102588,9001],[102590,102598,9001],[102601,102603,9001],[102608,102628,9001],[102629,102646,9003],[102648,102672,9003],[102675,102700,9003],[102701,102703,9001],[102707,102730,9003],[102735,102758,9003],
[102767,102798,9001],[102962,102969,9001],[102971,102973,9001],[102975,102989,9001],[102990,102992,9002],[102997,103002,9001],[103003,103008,9003],[103009,103011,9001],[103012,103014,9003],[103019,103021,9001],[103022,103024,9003],[103029,103031,9001],[103032,103034,9003],[103065,103068,9001],[103074,103076,9001],[103077,103079,9002],[103080,103082,9001],[103083,103085,9003],[103090,103093,9001],[103097,103099,9001],[103100,103102,9003],[103107,103109,9001],[103110,103112,9003],[103113,103116,9001],
[103117,103120,9003],[103153,103157,9001],[103158,103162,9003],[103163,103165,9001],[103166,103168,9002],[103169,103171,9003],[103186,103188,9001],[103189,103191,9003],[103192,103195,9001],[103196,103199,9003],[103200,103224,9001],[103225,103227,9002],[103232,103237,9001],[103238,103243,9003],[103244,103246,9001],[103247,103249,9003],[103254,103256,9001],[103257,103259,9003],[103264,103266,9001],[103267,103269,9003],[103300,103375,9001],[103381,103383,9001],[103384,103386,9002],[103387,103389,9001],
[103390,103392,9003],[103397,103399,9001],[103400,103471,9003],[103476,103478,9001],[103479,103481,9003],[103486,103488,9001],[103489,103491,9003],[103492,103495,9001],[103496,103499,9003],[103539,103543,9001],[103544,103548,9003],[103549,103551,9001],[103552,103554,9002],[103555,103557,9003],[103558,103560,9001],[103571,103573,9001],[103574,103576,9003],[103577,103580,9001],[103581,103583,9003],[103600,103694,9001],[103700,103793,9003],[103794,103799,9001],[104100,104138,9102],[104141,104145,9102],
[104256,104261,9102],[104700,104786,9102],[104900,104970,9102],[104990,104992,9102]],nc:[2066,9039,2136,9094,2155,9003,2157,9001,2158,9001,2159,9094,2160,9094,2219,9001,2220,9001,2244,9003,2245,9003,2256,9002,2265,9002,2266,9002,2269,9002,2270,9002,2273,9002,2290,9001,2291,9001,2294,9001,2295,9001,2313,9001,2314,9005,2899,9003,2900,9003,2901,9002,2909,9002,2910,9002,2911,9003,2912,9003,2913,9002,2914,9002,2964,9003,2967,9003,2968,9003,2991,9001,2992,9002,2993,9001,2994,9002,3073,9001,3076,9001,3079,
9001,3091,9003,3106,9001,3108,9001,3109,9001,3141,9001,3142,9001,3167,9301,3337,9001,3347,9001,3348,9001,3359,9003,3360,9001,3361,9002,3362,9001,3363,9003,3364,9001,3365,9003,3366,9005,3402,9001,3403,9001,3405,9001,3406,9001,3439,9001,3440,9001,3447,9001,3449,9001,3450,9001,3453,9003,3454,9003,3460,9001,3479,9002,3480,9001,3481,9002,3482,9001,3483,9002,3484,9001,3485,9003,3486,9001,3487,9003,3488,9001,3489,9001,3490,9003,3491,9001,3492,9003,3493,9001,3494,9003,3495,9001,3496,9003,3497,9001,3498,9003,
3499,9001,3500,9003,3501,9001,3502,9003,3503,9001,3504,9003,3505,9001,3506,9003,3507,9001,3508,9003,3509,9001,3510,9003,3511,9001,3512,9003,3513,9001,3514,9001,3515,9003,3516,9001,3517,9003,3518,9001,3519,9003,3520,9001,3521,9003,3522,9001,3523,9003,3524,9001,3525,9003,3526,9001,3527,9003,3528,9001,3529,9003,3530,9001,3531,9003,3532,9001,3533,9003,3534,9001,3535,9003,3536,9001,3537,9003,3538,9001,3539,9003,3540,9001,3541,9003,3542,9001,3543,9003,3544,9001,3545,9003,3546,9001,3547,9003,3548,9001,3549,
9003,3550,9001,3551,9003,3552,9001,3553,9003,3582,9003,3583,9001,3584,9003,3585,9001,3586,9003,3587,9001,3588,9002,3589,9001,3590,9002,3591,9001,3592,9001,3593,9002,3598,9003,3599,9001,3600,9003,3605,9002,3606,9001,3607,9001,3608,9003,3609,9001,3610,9003,3611,9001,3612,9003,3613,9001,3614,9003,3615,9001,3616,9003,3617,9001,3618,9003,3619,9001,3620,9003,3621,9001,3622,9003,3623,9001,3624,9003,3625,9001,3626,9003,3627,9001,3628,9003,3629,9001,3630,9003,3631,9001,3632,9003,3633,9001,3634,9002,3635,9001,
3636,9002,3640,9003,3641,9001,3642,9003,3643,9001,3644,9002,3645,9001,3646,9002,3647,9001,3648,9002,3649,9001,3650,9003,3651,9001,3652,9003,3653,9001,3654,9003,3655,9001,3656,9002,3657,9001,3658,9003,3659,9001,3660,9003,3661,9001,3662,9003,3663,9001,3664,9003,3668,9003,3669,9001,3670,9003,3671,9001,3672,9003,3673,9001,3674,9003,3675,9001,3676,9002,3677,9003,3678,9001,3679,9002,3680,9003,3681,9001,3682,9002,3683,9003,3684,9001,3685,9001,3686,9003,3687,9001,3688,9003,3689,9001,3690,9003,3691,9001,3692,
9003,3696,9003,3697,9001,3698,9003,3699,9001,3700,9003,3740,9001,3749,9001,3783,9001,3784,9001,3793,9001,3794,9001,3802,9001,3816,9001,3829,9001,3854,9001,3920,9001,3978,9001,3979,9001,3991,9003,3992,9003,4026,9001,4037,9001,4038,9001,4042,9102,4075,9102,4081,9102,4168,9102,4170,9102,4188,9102,4217,9003,4261,9105,4262,9102,4263,9102,4288,9102,4289,9102,4305,9105,4322,9102,4324,9102,4326,9102,4438,9003,4439,9003,4466,9102,4467,9001,4469,9102,4471,9001,4474,9001,4475,9102,4483,9102,4490,9102,4555,9102,
4558,9102,4559,9001,4614,9102,4619,9102,4657,9102,4670,9102,4671,9102,4674,9102,4682,9102,4683,9102,4718,9102,4720,9102,4721,9102,4723,9102,4726,9102,4737,9102,4738,9102,4759,9102,4761,9102,4807,9105,4808,9102,4809,9102,4816,9105,4817,9102,4818,9102,4819,9105,4820,9102,4821,9105,4823,9102,4824,9102,4839,9001,4901,9105,4902,9105,4903,9102,4904,9102,5018,9001,5048,9001,5167,9001,5168,9001,5223,9001,5228,9102,5229,9102,5233,9102,5234,9001,5235,9001,5243,9001,5252,9102,5264,9102,5266,9001,5316,9001,5320,
9001,5321,9001,5330,9001,5331,9001,5337,9001,5340,9102,5354,9102,5360,9102,5361,9001,5362,9001,5371,9102,5373,9102,5381,9102,5382,9001,5383,9001,5393,9102,5396,9001,5456,9001,5457,9001,5464,9102,5467,9102,5469,9001,5472,9037,5489,9102,5490,9001,5518,9001,5523,9001,5524,9102,5527,9102,5546,9102,5559,9001,5561,9102,5588,9002,5589,9005,5593,9102,5596,9001,5627,9001,5629,9001,5641,9001,5643,9001,5644,9001,5654,9003,5655,9003,5659,9001,5681,9102,5700,9001,5825,9001,5836,9001,5837,9001,5842,9001,5844,9001,
5880,9001,5886,9102,5887,9001,5890,9001,20499,9001,20538,9001,20539,9001,20790,9001,20791,9001,21291,9001,21292,9001,21500,9001,21817,9001,21818,9001,22032,9001,22033,9001,22091,9001,22092,9001,22332,9001,22391,9001,22392,9001,22700,9001,22770,9001,22780,9001,22832,9001,23090,9001,23095,9001,23239,9001,23240,9001,23433,9001,23700,9001,24047,9001,24048,9001,24100,9005,24200,9001,24305,9001,24306,9001,24382,9084,24383,9001,24500,9001,24547,9001,24548,9001,24571,9062,24600,9001,25E3,9001,25231,9001,
25884,9001,25932,9001,26237,9001,26331,9001,26332,9001,26591,9001,26592,9001,26632,9001,26692,9001,26855,9003,26856,9003,27120,9001,27200,9001,27291,9040,27292,9040,27429,9001,27492,9001,27500,9001,27700,9001,28232,9001,28600,9001,28991,9001,28992,9001,29100,9001,29220,9001,29221,9001,29333,9001,29635,9001,29636,9001,29701,9001,29738,9001,29739,9001,29849,9001,29850,9001,29871,9042,29872,9041,29873,9001,29900,9001,29901,9001,29903,9001,30200,9039,30339,9001,30340,9001,30591,9001,30592,9001,30791,
9001,30792,9001,31028,9001,31121,9001,31154,9001,31170,9001,31171,9001,31370,9001,31528,9001,31529,9001,31600,9001,31700,9001,31838,9001,31839,9001,31901,9001,32061,9001,32062,9001,32098,9001,32099,9003,32100,9001,32104,9001,32161,9001,32766,9001,37225,9105,37235,9102,37257,9102,37259,9102,37260,9102,53034,9001,53048,9001,53049,9001,54034,9001,65061,9003,65062,9003,65161,9001,65163,9001,102041,9003,102064,9085,102068,109030,102069,109031,102118,9003,102119,9002,102120,9003,102121,9003,102217,9003,
102218,9001,102219,9003,102220,9003,102378,9002,102379,9002,102380,9001,102381,9002,102589,9003,102599,9003,102600,9003,102604,9003,102605,9001,102606,9001,102647,9001,102704,9003,102705,9003,102733,9003,102761,9003,102762,9001,102763,9003,102764,9001,102765,9001,102766,9003,102970,9002,102974,9003,102993,9001,102994,9001,102995,9003,102996,9003,103015,9001,103016,9003,103017,9001,103018,9003,103025,9001,103026,9001,103027,9003,103028,9003,103035,9001,103036,9001,103037,9003,103038,9003,103039,9001,
103040,9001,103041,9003,103042,9003,103043,9001,103044,9001,103045,9003,103046,9003,103047,9001,103048,9001,103049,9003,103050,9003,103051,9001,103052,9003,103053,9001,103054,9003,103055,9001,103056,9003,103057,9001,103058,9001,103059,9003,103060,9003,103061,9001,103062,9001,103063,9003,103064,9003,103069,9003,103070,9001,103071,9001,103072,9003,103073,9003,103086,9001,103087,9001,103088,9003,103089,9003,103094,9002,103095,9001,103096,9003,103103,9001,103104,9003,103105,9001,103106,9003,103121,9001,
103122,9003,103123,9001,103124,9001,103125,9002,103126,9002,103127,9001,103128,9001,103129,9003,103130,9003,103131,9001,103132,9001,103133,9003,103134,9003,103135,9001,103136,9001,103137,9002,103138,9002,103139,9001,103140,9003,103141,9001,103142,9003,103143,9001,103144,9003,103145,9001,103146,9002,103147,9001,103148,9001,103149,9003,103150,9003,103151,9001,103152,9003,103172,9001,103173,9003,103174,9001,103175,9001,103176,9003,103177,9003,103178,9001,103179,9001,103180,9003,103181,9003,103182,9001,
103183,9001,103184,9003,103185,9003,103228,9001,103229,9001,103230,9003,103231,9003,103250,9001,103251,9003,103252,9001,103253,9003,103260,9001,103261,9001,103262,9003,103263,9003,103270,9001,103271,9001,103272,9003,103273,9003,103274,9001,103275,9001,103276,9003,103277,9003,103278,9001,103279,9001,103280,9003,103281,9003,103282,9001,103283,9001,103284,9003,103285,9003,103286,9001,103287,9003,103288,9001,103289,9003,103290,9001,103291,9003,103292,9001,103293,9001,103294,9003,103295,9003,103296,9001,
103297,9001,103298,9003,103299,9003,103376,9003,103377,9001,103378,9001,103379,9003,103380,9003,103393,9001,103394,9001,103395,9003,103396,9003,103472,9001,103473,9002,103474,9001,103475,9003,103482,9001,103483,9003,103484,9001,103485,9003,103500,9001,103501,9003,103502,9001,103503,9001,103504,9002,103505,9002,103506,9001,103507,9001,103508,9003,103509,9003,103510,9001,103511,9001,103512,9003,103513,9003,103514,9001,103515,9003,103516,9001,103517,9003,103518,9001,103519,9003,103520,9001,103521,9002,
103522,9001,103523,9001,103524,9003,103525,9003,103526,9001,103527,9003,103561,9003,103562,9003,103563,9001,103564,9001,103565,9003,103566,9003,103567,9001,103568,9001,103569,9003,103570,9003,103585,9003,103695,9003,104020,9102,104139,9105,104140,9105,104223,9102,104286,9102,104287,9102,104304,9102,104305,9102,104896,9102]},c=function(){function b(){}b.cC=function(e){!1===b.ti&&b.bo();var c=b.NG(e);if(-1==c){var n=b.ks(e);n!=e&&(c=b.cC(n))}return c};b.NG=function(e){return void 0!==b.ds[e]?b.ds[e]:
-1};b.SM=function(e){!1===b.ti&&b.bo();var c=b.Fz(e);if(1E38==c){var n=b.ks(e);n!=e&&(c=b.Fz(n));if(1E38==c)return 1E-10}return c};b.WO=function(e){if(void 0!==b.Un[e])return!0;var c=b.ks(e);return c!=e&&void 0!==b.Un[c]?!0:!1};b.ZO=function(e){if(void 0!==b.Gh[e])return!0;var c=b.ks(e);return c!=e&&void 0!==b.Gh[c]?!0:!1};b.Fz=function(e){!1===b.ti&&b.bo();return void 0!==b.Un[e]?b.Un[e]:void 0!==b.Gh[e]?b.Gh[e]:1E38};b.oU=function(e){!1===b.ti&&b.bo();return void 0!==b.ew[e]?b.ew[e]:e};b.ks=function(e){!1===
b.ti&&b.bo();return void 0!==b.Mw[e]?b.Mw[e]:e};b.bo=function(){for(var e=h,c,n=0;n<e.pcsid.length;n+=2)b.Gh[e.pcsid[n]]=e.pcstol[2*e.pcsid[n+1]+1];for(n=0;n<e.pcsidc.length;n+=1){c=e.pcsidc[n];for(var a=c[0];a<=c[1];a++)b.Gh[a]=e.pcstol[2*c[2]+1]}for(n=0;n<e.gcsid.length;n+=2)b.Un[e.gcsid[n]]=e.gcstol[2*e.gcsid[n+1]+1];for(n=0;n<e.gcsidc.length;n+=1)for(c=e.gcsidc[n],a=c[0];a<=c[1];a++)b.Gh[a]=e.gcstol[2*c[2]+1];for(n=0;n<d.c.length;n+=1)for(c=d.c[n],a=c[0];a<=c[1];a++)b.ds[a]=c[2];for(n=0;n<d.nc.length;n+=
2)b.ds[d.nc[n]]=d.nc[n+1];d=null;for(n=0;n<e.newtoold.length;n+=2)b.ew[e.newtoold[n+1]]=e.newtoold[n],b.Mw[e.newtoold[n]]=e.newtoold[n+1];h=null;b.ti=!0};b.ti=!1;b.Un=[];b.Gh=[];b.ew=[];b.Mw=[];b.ds=[];return b}();a.ls=c})(z||(z={}));(function(a){function h(b){return 0===b.length?'""':'"'==b[0]||"."==b[0]||"0"<=b[0]&&"9">=b[0]?b:'"'+b.trim()+'"'}var d=[],c=function(){function b(){}b.UM=function(e){try{for(var c=0;c<d.length;c++)if(d[c].wkttext===e)return d[c].unit;for(var n,u=c="",C=!1,f=0;f<e.length;f++){var G=
e[f];!0===C?'"'==G?'"'==e[f+1]?c+=G:C=!1:c+=G:/[\s]/.test(G)||(","==G?(u=""!==c?u+(h(c)+","):u+",",c=""):")"==G||"]"==G?(u=""!==c?u+(h(c)+"]}"):u+"]}",c=""):"("==G||"["==G?(u+='{ "entity": "'+c.toUpperCase().trim()+'", "values":[',c=""):'"'==G?(C=!0,c=""):c+=G)}n=JSON.parse(u);var g=b.Dz(n);if(null===g)return null;n=null;for(G=0;G<g.values.length;G++)if("object"===typeof g.values[G]&&"UNIT"===g.values[G].entity){n=g.values[G];break}if(null===n)return null;var y=a.Tb.EL("GEOGCS"===g.entity?1:0,n.values[1],
n.values[2]);d.push({wkttext:e,unit:y});10<d.length&&d.shift();return y}catch(aa){return null}};b.Dz=function(e){if(null===e)return null;if("GEOGCS"===e.entity||"PROJCS"===e.entity)return e;for(var c=[],a=0;a<e.values.length;a++)if("object"===typeof e.values[a]&&void 0!==e.values[a].entity){if("GEOGCS"===e.values[a].entity||"PROJCS"==e.values[a].entity)return e.values[a];c.push(e.values[a])}for(e=0;e<c.length;e++)if(a=b.Dz(c[e]),null!==a)return a;return null};b.TM=function(b){var e=-1;if(null!=b&&
0<b.length){var c,a;c=b.indexOf("PROJCS");if(0<=c){var h=0;c=b.lastIndexOf("UNIT");if(0<=c&&(c=b.indexOf(",",c+4),0<c&&(c++,a=b.indexOf("]",c+1),0<a)))try{h=parseFloat(b.substring(c,a))}catch(G){h=0}0<h&&(e=.001/h)}else if(c=b.indexOf("GEOGCS"),0<=c){var d=0,h=0;c=b.indexOf("SPHEROID",c+6);if(0<c&&(c=b.indexOf(",",c+8),0<c)){c++;a=b.indexOf(",",c+1);if(0<a)try{d=parseFloat(b.substring(c,a))}catch(G){d=0}if(0<d&&(c=b.indexOf("UNIT",a+1),0<=c&&(c=b.indexOf(",",c+4),0<c&&(c++,a=b.indexOf("]",c+1),0<
a))))try{h=parseFloat(b.substring(c,a))}catch(G){h=0}}0<d&&0<h&&(e=.001/(d*h))}}return e};return b}();a.mA=c})(z||(z={}));(function(a){(function(a){a[a.NONE=0]="NONE";a[a.LINEAR=1]="LINEAR";a[a.ANGULAR=2]="ANGULAR"})(a.BH||(a.BH={}));(function(a){a[a.enumFloat=0]="enumFloat";a[a.enumDouble=1]="enumDouble";a[a.enumInt32=2]="enumInt32";a[a.enumInt64=3]="enumInt64";a[a.enumInt8=4]="enumInt8";a[a.enumInt16=5]="enumInt16"})(a.oI||(a.oI={}));(function(a){a[a.POSITION=0]="POSITION";a[a.Z=1]="Z";a[a.M=2]=
"M";a[a.ID=3]="ID";a[a.NORMAL=4]="NORMAL";a[a.TEXTURE1D=5]="TEXTURE1D";a[a.TEXTURE2D=6]="TEXTURE2D";a[a.TEXTURE3D=7]="TEXTURE3D";a[a.ID2=8]="ID2";a[a.MAXSEMANTICS=10]="MAXSEMANTICS"})(a.xf||(a.xf={}));var h=function(){function h(c,b){this.er=this.le=null;this.up=this.Aa=0;this.Wg=this.Jf=null;this.tk=0;if(void 0!==b){this.Aa=b.Aa;this.up=b.up;this.Jf=b.Jf.slice(0);this.Wg=b.Wg.slice(0);this.tk=b.tk;this.er=[];for(b=c=0;b<this.Aa;b++)this.er[b]=c,c+=h.Wa(this.Jf[b]);this.up=c;this.le=[];for(b=0;b<
this.Aa;b++){c=h.Wa(this.Hd(b));for(var e=h.ue(this.Hd(b)),k=0;k<c;k++)this.le[this.er[b]+k]=e}}else this.up=this.Aa=0}h.prototype.Hd=function(c){if(0>c||c>this.Aa)throw a.g.N();return this.Jf[c]};h.prototype.zf=function(c){return this.Wg[c]};h.JN=function(c){return h.ac[c]};h.Qh=function(c){return h.Cc[c]};h.ye=function(c){return h.Bd[c]};h.Gh=function(c){return h.ye(h.Qh(c))*h.Wa(c)};h.Wa=function(c){return h.ob[c]};h.Wf=function(c){return 2>c};h.ti=function(c){return h.Wf(h.Qh(c))};h.prototype.hasAttribute=
function(c){return 0<=this.Wg[c]};h.prototype.WC=function(){return this.hasAttribute(1)};h.ue=function(c){return h.V[c]};h.prototype.XN=function(c){return this.er[c]};h.nD=function(c,b){return h.V[c]===b};h.$g=function(c){if(4==c)return 2;if(8==c)return 3;throw a.g.N();};h.prototype.lc=function(c){return this===c};h.prototype.jj=function(){for(var c=a.I.kg(this.Jf[0]),b=1;b<this.Aa;b++)c=a.I.kg(this.Jf[b],c);return c};h.prototype.fj=function(c){return this.er[c]};h.prototype.hc=function(){return this.tk};
h.prototype.Fd=function(c){return this.Jf[c]};h.V=[0,0,NaN,0,0,0,0,0,0];h.ac=[1,1,1,0,2,1,1,1,0];h.Cc=[1,1,1,2,0,0,0,0,2];h.Bd=[4,8,4,8,1,2];h.ob=[2,1,1,1,3,1,2,3,2];return h}();a.pa=h})(z||(z={}));(function(a){function h(b,c,a,u){var e=b.jd,k=b.e+c+1;1===a?u=5<=e[k]:2===a?u=5<e[k]||5==e[k]&&(u||0>k||void 0!==e[k+1]||e[k-1]&1):3===a?u=u||void 0!==e[k]||0>k:(u=!1,0!==a&&d("!Big.RM!"));if(1>k||!e[0])u?(b.e=-c,b.jd=[1]):b.jd=[b.e=0];else{e.length=k--;if(u)for(;9<++e[k];)e[k]=0,k--||(++b.e,e.unshift(1));
for(k=e.length;!e[--k];e.pop());}}function d(b){b=Error(b);b.name="BigError";throw b;}var c=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,b=function(){function b(e){if(e instanceof b)this.Dd=e.Dd,this.e=e.e,this.jd=e.jd.slice();else{var k,a,h;0===e&&0>1/e?e="-0":c.test(e+="")||d(NaN);this.Dd="-"==e.charAt(0)?(e=e.slice(1),-1):1;-1<(k=e.indexOf("."))&&(e=e.replace(".",""));0<(a=e.search(/e/i))?(0>k&&(k=a),k+=+e.slice(a+1),e=e.substring(0,a)):0>k&&(k=e.length);for(a=0;"0"==e.charAt(a);a++);if(a==(h=e.length))this.jd=
[this.e=0];else{for(;"0"==e.charAt(--h););this.e=k-a-1;this.jd=[];for(k=0;a<=h;this.jd[k++]=+e.charAt(a++));}}}b.prototype.abs=function(){var e=new b(this);e.Dd=1;return e};b.prototype.DB=function(){var e=0,c=this.jd,a=(e=new b(e)).jd,h=this.Dd,d=e.Dd,G=this.e,f=e.e;if(!c[0]||!a[0])return c[0]?h:a[0]?-d:0;if(h!=d)return h;e=0>h;if(G!=f)return G>(f^e)?1:-1;h=-1;for(d=(G=c.length)<(f=a.length)?G:f;++h<d;)if(c[h]!=a[h])return c[h]>(a[h]^e)?1:-1;return G==f?0:G>(f^e)?1:-1};b.prototype.VB=function(e){var c=
this.jd,k=(e=new b(e)).jd,a=this.Dd==e.Dd?1:-1,f=b.Cc;(f!==~~f||0>f||1E6<f)&&d("!Big.DP!");if(!c[0]||!k[0])return c[0]==k[0]&&d(NaN),k[0]||d(a/0),new b(0*a);var G,g,y,l,m=k.slice(),p=G=k.length,q=c.length,r=c.slice(0,G),v=r.length,x=e,w=x.jd=[],t=0,B=f+(x.e=this.e-e.e)+1;x.Dd=a;a=0>B?0:B;for(m.unshift(0);v++<G;r.push(0));do{for(g=0;10>g;g++){if(G!=(v=r.length))y=G>v?1:-1;else for(l=-1,y=0;++l<G;)if(k[l]!=r[l]){y=k[l]>r[l]?1:-1;break}if(0>y){for(e=v==G?k:m;v;){if(r[--v]<e[v]){for(l=v;l&&!r[--l];r[l]=
9);--r[l];r[v]+=10}r[v]-=e[v]}for(;!r[0];r.shift());}else break}w[t++]=y?g:++g;r[0]&&y?r[v]=c[p]||0:r=[c[p]]}while((p++<q||void 0!==r[0])&&a--);w[0]||1==t||(w.shift(),x.e--);t>B&&h(x,f,b.ye,void 0!==r[0]);return x};b.prototype.nO=function(){return 0<this.DB()};b.prototype.vP=function(){return 0>this.DB()};b.prototype.nr=function(e){var c,k,a=this.Dd,h=(e=new b(e)).Dd;if(a!=h)return e.Dd=-h,this.NE(e);var d=this.jd.slice();k=this.e;var f=e.jd,g=e.e;if(!d[0]||!f[0])return f[0]?(e.Dd=-h,e):new b(d[0]?
this:0);if(a=k-g){(c=0>a)?(a=-a,k=d):(g=k,k=f);k.reverse();for(h=a;h--;k.push(0));k.reverse()}else for(k=((c=d.length<f.length)?d:f).length,a=h=0;h<k;h++)if(d[h]!=f[h]){c=d[h]<f[h];break}c&&(k=d,d=f,f=k,e.Dd=-e.Dd);if(0<(h=(k=f.length)-(c=d.length)))for(;h--;d[c++]=0);for(h=c;k>a;){if(d[--k]<f[k]){for(c=k;c&&!d[--c];d[c]=9);--d[c];d[k]+=10}d[k]-=f[k]}for(;0==d[--h];d.pop());for(;0==d[0];)d.shift(),--g;d[0]||(e.Dd=1,d=[g=0]);e.jd=d;e.e=g;return e};b.prototype.NE=function(e){var c,k=this.Dd;c=(e=new b(e)).Dd;
if(k!=c)return e.Dd=-c,this.nr(e);c=this.e;var a=this.jd,h=e.e,d=e.jd;if(!a[0]||!d[0])return d[0]?e:new b(a[0]?this:0*k);a=a.slice();if(k=c-h){0<k?(h=c,c=d):(k=-k,c=a);for(c.reverse();k--;c.push(0));c.reverse()}0>a.length-d.length&&(c=d,d=a,a=c);k=d.length;for(c=0;k;)c=(a[--k]=a[k]+d[k]+c)/10|0,a[k]%=10;c&&(a.unshift(c),++h);for(k=a.length;0==a[--k];a.pop());e.jd=a;e.e=h;return e};b.prototype.pow=function(e){var c=this,k=new b(1),a=k,h=0>e;(e!==~~e||-1E6>e||1E6<e)&&d("!pow!");for(e=h?-e:e;;){e&1&&
(a=a.Wp(c));e>>=1;if(!e)break;c=c.Wp(c)}return h?k.VB(a):a};b.prototype.round=function(e,c){var k=this;null==e?e=0:(e!==~~e||0>e||1E6<e)&&d("!round!");h(k=new b(k),e,null==c?b.ye:c);return k};b.prototype.sqrt=function(){var e,c,a;c=this.jd;e=this.Dd;a=this.e;var C=new b("0.5");if(!c[0])return new b(this);0>e&&d(NaN);e=Math.sqrt(this.toString());0==e||e==1/0?(e=c.join(""),e.length+a&1||(e+="0"),c=new b(Math.sqrt(e).toString()),c.e=((a+1)/2|0)-(0>a||a&1)):c=new b(e.toString());e=c.e+(b.Cc+=4);do a=
c,c=C.Wp(a.NE(this.VB(a)));while(a.jd.slice(0,e).join("")!==c.jd.slice(0,e).join(""));h(c,b.Cc-=4,b.ye);return c};b.prototype.Wp=function(e){var c,k=this.jd,a=(e=new b(e)).jd,h=k.length,d=a.length,f=this.e,g=e.e;e.Dd=this.Dd==e.Dd?1:-1;if(!k[0]||!a[0])return new b(0*e.Dd);e.e=f+g;h<d&&(c=k,k=a,a=c,g=h,h=d,d=g);for(c=Array(g=h+d);g--;c[g]=0);for(f=d;f--;){d=0;for(g=h+f;g>f;)d=c[g]+a[f]*k[g-f-1]+d,c[g--]=d%10,d=d/10|0;c[g]=(c[g]+d)%10}d&&++e.e;c[0]||c.shift();for(f=c.length;!c[--f];c.pop());e.jd=c;
return e};b.prototype.toString=function(){var b=this.e,e=this.jd.join(""),c=e.length;if(-7>=b||21<=b)e=e.charAt(0)+(1<c?"."+e.slice(1):"")+(0>b?"e":"e+")+b;else if(0>b){for(;++b;e="0"+e);e="0."+e}else if(0<b)if(++b>c)for(b-=c;b--;e+="0");else b<c&&(e=e.slice(0,b)+"."+e.slice(b));else 1<c&&(e=e.charAt(0)+"."+e.slice(1));return 0>this.Dd&&this.jd[0]?"-"+e:e};b.Cc=20;b.ye=1;return b}();a.Tn=b})(z||(z={}));(function(a){var h=function(){function c(b){this.$e=b}c.prototype.Zp=function(b,e,c){var k=new a.b,
h=new a.b,d=this.$e;c.xd(b,e,function(b,e){d.ec(2*b,k);d.ec(2*e,h);return k.compare(h)})};c.prototype.Mo=function(b){return this.$e.read(2*b+1)};return c}(),d=function(){function c(){}c.No=function(b){if(b.s())return!1;var e=b.D();return 1736==e?0==b.Mh()?!1:!0:1607==e?(e=[!1],c.qz(b,!0,e),e[0]):197==e||a.T.Lc(e)&&!b.kD()?!0:!1};c.il=function(b){var e=b.D();if(1736==e)return e=new a.Xa(b.description),b.s()||b.tA(e),e;if(1607==e)return c.qz(b,!1,null);if(197==e)return e=new a.Xa(b.description),b.s()||
e.Wc(b,!1),e;if(a.T.Lc(e)){e=new a.pe(b.description);if(!b.s()&&!b.kD()){var k=new a.Va;b.En(k);e.add(k);b.Bn(k);e.add(k)}return e}if(a.T.Km(e))return null;throw a.g.N();};c.qz=function(b,e,c){null!=c&&(c[0]=!1);var k=null;e||(k=new a.pe(b.description));if(!b.s()){var u=new a.ga(0);u.xb(2*b.ea());for(var d=0,f=b.ea();d<f;d++)if(0<b.Ha(d)&&!b.Oo(d)){var G=b.Ea(d);u.add(G);G=b.Dc(d)-1;u.add(G)}if(0<u.size){f=new a.Rr;d=b.mc(0);f.sort(u,0,u.size,new h(d));f=new a.b;d.ec(2*u.get(0),f);for(var G=0,g=1,
y=new a.Va,l=new a.b,m=1,p=u.size;m<p;m++)if(d.ec(2*u.get(m),l),l.ub(f))u.get(G)>u.get(m)?(u.set(G,2147483647),G=m):u.set(m,2147483647),g++;else{if(0==(g&1))u.set(G,2147483647);else if(e)return null!=c&&(c[0]=!0),null;f.J(l);G=m;g=1}if(0==(g&1))u.set(G,2147483647);else if(e)return null!=c&&(c[0]=!0),null;if(!e)for(u.xd(0,u.size,function(b,e){return b-e}),m=0,p=u.size;m<p&&2147483647!=u.get(m);m++)b.Sd(u.get(m),y),k.add(y)}}return e?null:k};return c}();a.Hh=d})(z||(z={}));(function(a){var h=function(){function h(){this.lf=
new a.ga(0);this.Lq=new a.ga(0);this.gE=1;this.Qq=NaN}h.prototype.sort=function(c,b,e,k){if(32>e-b)k.Zp(b,e,c);else{var a=!0;try{for(var h=Infinity,d=-Infinity,f=b;f<e;f++){var G=k.Mo(c.get(f));G<h&&(h=G);G>d&&(d=G)}if(this.reset(e-b,h,d,e-b)){for(f=b;f<e;f++){var g=c.get(f),G=k.Mo(g),y=this.oC(G);this.lf.set(y,this.lf.get(y)+1);this.Lq.write(f-b,g)}var l=this.lf.get(0);this.lf.set(0,0);for(var f=1,m=this.lf.size;f<m;f++){var p=this.lf.get(f);this.lf.set(f,l);l+=p}for(f=b;f<e;f++){var g=this.Lq.read(f-
b),G=k.Mo(g),y=this.oC(G),q=this.lf.get(y);c.set(q+b,g);this.lf.set(y,q+1)}a=!1}}catch(ga){this.lf.resize(0),this.Lq.resize(0)}if(a)k.Zp(b,e,c);else{f=e=0;for(m=this.lf.size;f<m;f++)a=e,e=this.lf.get(f),e>a&&k.Zp(b+a,b+e,c);100<this.lf.size&&(this.lf.resize(0),this.Lq.resize(0))}}};h.prototype.reset=function(c,b,e,k){if(2>c||e==b)return!1;c=Math.min(h.tI,c);this.lf.xb(c);this.lf.resize(c);this.lf.dh(0,0,this.lf.size);this.gE=b;this.Lq.resize(k);this.Qq=(e-b)/(c-1);return!0};h.prototype.oC=function(c){return a.I.truncate((c-
this.gE)/this.Qq)};h.tI=65536;return h}();a.Rr=h})(z||(z={}));(function(a){var h;(function(b){b[b.enum_line=1]="enum_line";b[b.enum_arc=2]="enum_arc";b[b.enum_dummy=4]="enum_dummy";b[b.enum_concave_dip=8]="enum_concave_dip";b[b.enum_connection=3]="enum_connection"})(h||(h={}));var d=function(){function b(){}b.Ks=function(e,c,k,n,h,d){var u=new b;u.Fl=new a.b;u.Ql=new a.b;u.Lt=new a.b;u.Fl.J(e);u.Ql.J(c);u.Lt.J(k);u.qn=n;u.Rg=h;u.Ug=d;return u};b.Oa=function(e,c,k,n){var u=new b;u.Fl=new a.b;u.Ql=
new a.b;u.Lt=new a.b;u.Fl.J(e);u.Ql.J(c);u.Lt.Eh();u.qn=4;u.Rg=k;u.Ug=n;return u};return b}(),c=function(){function b(b,e,c,k,a,n){this.It=null;this.ua=0;this.Ex=b;this.yE=this.wE=0;this.Da=e;this.Pi=c;this.Cj=k;this.mp=a;this.Yb=n}b.prototype.next=function(){for(var b=new a.Va;;){if(this.ua==this.Ex.F())return null;this.Ex.Sd(this.ua,b);this.ua++;if(!b.s())break}var e=!1;null==this.It&&(this.wE=b.lk(),this.yE=b.mk(),this.It=k.buffer(b,this.Da,this.Pi,this.Cj,this.mp,this.Yb),e=!0);var c;this.ua<
this.Ex.F()?(c=new a.Ka,this.It.copyTo(c)):c=this.It;if(!e){var e=new a.Bg,n=b.lk()-this.wE,b=b.mk()-this.yE;e.Nn(n,b);c.Oe(e)}return c};b.prototype.ya=function(){return 0};return b}(),b=function(){function b(b,e){this.Ma=b;this.ua=0;this.Yo=e}b.prototype.next=function(){var b=this.Ma.U;if(this.ua<b.ea()){var e=this.ua;this.ua++;if(!b.Oo(e))for(var c=b.Fa(b.Dc(e)-1);this.ua<b.ea();){var k=b.Fa(b.Ea(this.ua));if(b.Oo(this.ua))break;if(k!=c)break;c=b.Fa(b.Dc(this.ua)-1);this.ua++}if(1==this.ua-e)return this.Ma.kB(this.Ma.U,
e,this.Yo);c=new a.Xa(this.Ma.U.description);c.Zj(this.Ma.U,e,!0);for(e+=1;e<this.ua;e++)c.ys(this.Ma.U,e,0,b.ct(e),!1);return this.Ma.kB(c,0,this.Yo)}return null};b.prototype.ya=function(){return 0};return b}(),e=function(){function b(b){this.Ma=b;this.ua=0}b.prototype.next=function(){var b=this.Ma.U;if(this.ua<b.ea()){var e=this.ua;b.oo(this.ua);for(this.ua++;this.ua<b.ea()&&!(0<b.oo(this.ua));)this.ua++;return 0==e&&this.ua==b.ea()?this.Ma.Gv(b,0,b.ea()):this.Ma.Gv(b,e,this.ua)}return null};b.prototype.ya=
function(){return 0};return b}(),k=function(){function k(b){this.Vq=this.Tt=this.Wq=this.sd=null;this.Jd=[];this.Yb=b;this.hb=this.wt=this.OP=this.Da=this.vx=this.jr=this.ka=0;this.sx=this.Cj=-1;this.Yo=!0}k.buffer=function(b,e,c,n,h,d){if(null==b)throw a.g.N();if(0>n)throw a.g.N();if(b.s())return new a.Ka(b.description);var u=new a.i;b.dd(u);0<e&&u.P(e,e);d=new k(d);d.Pi=c;d.U=b;d.ka=a.Ia.zd(c,u,!0);d.jr=a.Ia.zd(null,u,!0);d.Da=e;d.OP=b.D();0>=h&&(h=96);d.hb=Math.abs(d.Da);d.wt=0!=d.hb?1/d.hb:0;
isNaN(n)||0==n?n=1E-5*d.hb:n>.5*d.hb&&(n=.5*d.hb);12>h&&(h=12);b=Math.abs(e)*(1-Math.cos(Math.PI/h));b>n?n=b:(b=Math.PI/Math.acos(1-n/Math.abs(e)),b<h-1&&(h=a.I.truncate(b),12>h&&(h=12,n=Math.abs(e)*(1-Math.cos(Math.PI/h)))));d.Cj=n;d.mp=h;d.vx=Math.min(d.jr,.25*n);return d.lB()};k.prototype.Ss=function(){if(null==this.sd)this.sd=[];else if(0!==this.sd.length)return;var b=this.pB(),b=a.I.truncate((b+3)/4),e=.5*Math.PI/b;this.sx=e;for(var c=0;c<4*b;c++)this.sd.push(null);for(var k=Math.cos(e),e=Math.sin(e),
n=a.b.Oa(0,1),c=0;c<b;c++)this.sd[c+0*b]=a.b.Oa(n.y,-n.x),this.sd[c+1*b]=a.b.Oa(-n.x,-n.y),this.sd[c+2*b]=a.b.Oa(-n.y,n.x),this.sd[c+3*b]=n,n=a.b.Oa(n.x,n.y),n.Er(k,e)};k.prototype.lB=function(){var b=this.U.D();if(a.T.Lc(b))return b=new a.Xa(this.U.description),b.Bc(this.U,!0),this.U=b,this.lB();if(this.Da<=this.ka)if(a.T.SO(b)){if(0>=this.Da&&(b=new a.i,this.U.o(b),b.aa()<=2*-this.Da||b.ba()<=2*this.Da))return new a.Ka(this.U.description)}else return new a.Ka(this.U.description);switch(this.U.D()){case 33:return this.tK();
case 550:return this.sK();case 1607:return this.vK();case 1736:return this.uK();case 197:return this.qK();default:throw a.g.wa();}};k.prototype.vK=function(){if(this.oD(this.U)){var e=new a.Va;this.U.Sd(0,e);var c=new a.i;this.U.o(c);e.ic(c.Af());return this.Es(e)}this.U=this.SQ(this.U);e=new b(this,this.Yo);return a.wi.local().$(e,this.Pi,this.Yb).next()};k.prototype.uK=function(){if(0==this.Da)return this.U;var b=a.as.local();this.Ss();this.U=b.$(this.U,null,!1,this.Yb);if(0>this.Da){var c=this.U,
c=this.Gv(c,0,c.ea());return b.$(c,this.Pi,!1,this.Yb)}if(this.oD(this.U))return b=new a.Va,this.U.Sd(0,b),c=new a.i,this.U.o(c),b.ic(c.Af()),this.Es(b);b=new e(this);return a.wi.local().$(b,this.Pi,this.Yb).next()};k.prototype.Gv=function(b,e,c){for(var n=new a.Ka(b.description);e<c;e++)if(!(1>b.Ha(e))){var h=b.oo(e),u=new a.i;b.Ti(e,u);if(0<this.Da)if(0<h)if(this.pD(b,e))h=new a.Va,b.Sd(b.Ea(e),h),h.ic(u.Af()),this.us(n,h);else{var d=h=new a.Xa(b.description),d=a.Tr.sD(this.U,e)||2==this.sm(this.U,
e,d,!0,1)?this.jB(b,e):this.rm(h);n.add(d,!1)}else{if(!(u.aa()+this.ka<=2*this.hb||u.ba()+this.ka<=2*this.hb||(d=h=new a.Xa(b.description),this.sm(this.U,e,d,!0,1),h.s()))){var C=new a.i;C.K(u);C.P(this.hb,this.hb);d.ws(C);d=this.rm(h);u=1;for(h=d.ea();u<h;u++)n.Zj(d,u,!0)}}else if(0<h){if(!(u.aa()+this.ka<=2*this.hb||u.ba()+this.ka<=2*this.hb||(d=h=new a.Xa(b.description),this.sm(this.U,e,d,!0,-1),h.s())))for(C=new a.i,d.dd(C),C.P(this.hb,this.hb),d.ws(C),d=this.rm(h),u=1,h=d.ea();u<h;u++)n.Zj(d,
u,!0)}else for(d=h=new a.Xa(b.description),this.sm(this.U,e,d,!0,-1),d=this.rm(h),u=0,h=d.ea();u<h;u++)n.Zj(d,u,!0)}if(0<this.Da)return 1<n.ea()?n=this.rm(n):k.Id(n);b=new a.i;n.dd(b);if(n.s())return k.Id(n);b.P(this.hb,this.hb);n.ws(b);n=this.rm(n);b=new a.Ka(n.description);u=1;for(h=n.ea();u<h;u++)b.Zj(n,u,!1);return k.Id(b)};k.prototype.tK=function(){return this.Es(this.U)};k.prototype.Es=function(b){var e=new a.Ka(this.U.description);this.us(e,b);return this.nS(e)};k.prototype.sK=function(){var b=
new c(this.U,this.Da,this.Pi,this.Cj,this.mp,this.Yb);return a.wi.local().$(b,this.Pi,this.Yb).next()};k.prototype.qK=function(){var b=new a.Ka(this.U.description);if(0>=this.Da){if(0==this.Da)b.Wc(this.U,!1);else{var e=new a.Vj;this.U.Fp(e);e.P(this.Da,this.Da);b.Wc(e,!1)}return b}b.Wc(this.U,!1);this.U=b;return this.jB(b,0)};k.prototype.jB=function(b,e){this.Ss();var c=new a.Ka(b.description),n=new a.b,h=new a.b,u=new a.b,d=new a.b,C=new a.b,f=new a.b,g=new a.b,y=new a.b,l=b.Ha(e),m=b.Ea(e),p=0;
for(e=b.Ha(e);p<e;p++){b.w(m+p,h);b.w(m+(p+1)%l,d);b.w(m+(p+2)%l,f);g.pc(d,h);if(0==g.length())throw a.g.wa();g.tt();g.normalize();g.scale(this.hb);n.add(g,h);u.add(g,d);0==p?c.Nr(n):c.Lm(n);c.Lm(u);y.pc(f,d);if(0==y.length())throw a.g.wa();y.tt();y.normalize();y.scale(this.hb);C.add(y,d);this.NA(c,d,u,C,!1)}return k.Id(c)};k.prototype.kB=function(b,e,c){this.Ss();if(1>b.Ha(e))return null;if(this.pD(b,e)&&0<this.Da){c=new a.Va;b.Sd(b.Ea(e),c);var k=new a.i;b.Ti(e,k);c.ic(k.Af());return this.Es(c)}k=
new a.Xa(b.description);if(b.Oo(e))this.sm(b,e,k,c,1),this.sm(b,e,k,c,-1);else{var n=new a.Xa(b.description);n.Zj(b,e,!1);n.ys(b,e,0,b.ct(e),!1);this.sm(n,0,k,c,1)}return this.rm(k)};k.prototype.rm=function(b){return a.Of.Qj(b,this.jr,!0,!0,this.Yb)};k.prototype.pB=function(){if(0==this.Cj)return this.mp;var b=1-this.Cj*Math.abs(this.wt),e;-1>b?e=4:e=2*Math.PI/Math.acos(b)+.5;4>e?e=4:e>this.mp&&(e=this.mp);return a.I.truncate(e)};k.prototype.NA=function(b,e,c,k,n){this.Ss();var h=new a.b;h.pc(c,e);
h.scale(this.wt);var u=new a.b;u.pc(k,e);u.scale(this.wt);h=Math.atan2(h.y,h.x)/this.sx;0>h&&(h=this.sd.length+h);h=this.sd.length-h;u=Math.atan2(u.y,u.x)/this.sx;0>u&&(u=this.sd.length+u);u=this.sd.length-u;u<h&&(u+=this.sd.length);var d=a.I.truncate(u),u=a.I.truncate(Math.ceil(h)),h=new a.b;h.J(this.sd[u%this.sd.length]);h.Fr(this.hb,e);var C=10*this.ka;h.sub(c);h.length()<C&&(u+=1);h.J(this.sd[d%this.sd.length]);h.Fr(this.hb,e);h.sub(k);h.length()<C&&--d;c=d-u;c++;d=0;for(u%=this.sd.length;d<c;d++,
u=(u+1)%this.sd.length)h.J(this.sd[u]),h.Fr(this.hb,e),b.Lm(h);n&&b.Lm(k)};k.prototype.sm=function(b,e,c,k,n){var h=new a.fd,u=h.QJ(b,e);h.xo(this.vx,!1,!1);if(2>h.F(u)){if(0>n)return 1;n=b;h=new a.Va;n.Sd(n.Ea(e),h);this.us(c,h);return 1}var C=h.Fa(h.Cb(h.Vb(u))),f=new a.Bg;f.Nn(-C.x,-C.y);h.Oe(f);if(k&&(this.MM(h,u,n),2>h.F(u))){if(0>n)return 1;n=b;h=new a.Va;n.Sd(n.Ea(e),h);this.us(c,h);return 1}this.Jd.length=0;var G=h.Vb(u);e=h.Cb(G);var g=1==n?h.Ua(e):h.X(e);b=1==n?h.X(e):h.Ua(e);var J=!0;k=
new a.b;for(var u=new a.b,y=new a.b,l=new a.b,m=new a.b,V=new a.b,p=new a.b,q=new a.b,r=new a.b,v=new a.b,x=this.hb,G=h.Ha(G),w=0;w<G;w++)h.w(b,u),J&&(h.w(e,k),h.w(g,y),q.pc(k,y),q.normalize(),v.zD(q),v.scale(x),l.add(v,k)),p.pc(u,k),p.normalize(),r.zD(p),r.scale(x),m.add(k,r),g=q.Ai(p),J=q.ml(p),0>g||0>J&&0==g?this.Jd.push(d.Ks(l,m,k,2,this.Jd.length+1,this.Jd.length-1)):l.ub(m)||(this.Jd.push(d.Oa(l,k,this.Jd.length+1,this.Jd.length-1,"dummy")),this.Jd.push(d.Oa(k,m,this.Jd.length+1,this.Jd.length-
1,"dummy"))),V.add(u,r),this.Jd.push(d.Ks(m,V,k,1,this.Jd.length+1,this.Jd.length-1)),l.J(V),v.J(r),y.J(k),k.J(u),q.J(p),g=e,e=b,J=!1,b=1==n?h.X(e):h.Ua(e);this.Jd[this.Jd.length-1].Rg=0;this.Jd[0].Ug=this.Jd.length-1;this.UQ(c);f.Nn(C.x,C.y);c.ZA(f,c.ea()-1);return 1};k.prototype.UQ=function(b){for(var e=this.aL(),c=!0,k=e+1,a=e;k!=e;a=k){var n=this.Jd[a],k=-1!=n.Rg?n.Rg:(a+1)%this.Jd.length;0!=n.qn&&(c&&b.Nr(n.Fl),2==n.qn?this.NA(b,n.Lt,n.Fl,n.Ql,!0):b.Lm(n.Ql),c=!1)}};k.prototype.aL=function(){null==
this.Vq&&(this.Vq=[null,null,null,null,null,null,null,null,null]);for(var b=0,e=0,c=this.Jd.length;e<c;){var k=this.Jd[e];if(0!=(k.qn&3)){b=e;break}e=k.Rg}c=b+1;for(e=b;c!=b;e=c){for(var k=this.Jd[e],c=k.Rg,n=1,h=null;c!=e;){h=this.Jd[c];if(0!=(h.qn&3))break;c=h.Rg;n++}1!=n&&1==(k.qn&h.qn)&&(null==this.Wq&&(this.Wq=new a.yb,this.Tt=new a.yb),this.Wq.ed(k.Fl),this.Wq.vd(k.Ql),this.Tt.ed(h.Fl),this.Tt.vd(h.Ql),1==this.Wq.Ga(this.Tt,this.Vq,null,null,this.jr)&&(k.Ql.J(this.Vq[0]),h.Fl.J(this.Vq[0]),
k.Rg=c,h.Ug=e))}return b};k.prototype.rt=function(b,e,c){var k=new a.b;k.pc(c,b);c=k.length();c=this.hb*this.hb-c*c*.25;if(0<c){c=Math.sqrt(c);k.normalize();k.Kp();var n=new a.b;n.pc(e,b);if(n.ml(k)+c>=this.hb)return!0}return!1};k.prototype.MM=function(b,e,c){for(var k=0;1>k;k++){var n=!1,h=b.Vb(e),u=b.Ha(h);if(0==u)break;var d=u;if(3>u)break;!b.vc(h)&&(d=u-1);for(var h=b.Cb(h),u=0<c?b.Ua(h):b.X(h),C=0<c?b.X(h):b.Ua(h),f=u,g=!0,J=new a.b,y=new a.b,l=new a.b,m=new a.b,p=new a.b,q=a.b.Oa(0,0),r=new a.b,
v=new a.b,x=new a.b,w=new a.b,t=this.hb,B=0,z=0;z<d;){b.w(C,y);g&&(b.w(h,J),b.w(u,l),f=u);v.pc(J,l);v.normalize();r.pc(y,J);r.normalize();if(f==C)break;var E=v.Ai(r),D=v.ml(r),F=!0;0>E||0>D&&0==E||!this.rt(l,J,y)||(q.J(y),F=!1,++B,n=!0);if(F){if(0<B)for(;;){E=0<c?b.Ua(f):b.X(f);if(E==h)break;b.w(E,m);if(this.rt(m,l,q))l.J(m),f=E,F=!1,++B;else{E!=C&&this.rt(m,l,y)&&this.rt(m,J,y)&&(l.J(m),f=E,F=!1,++B);break}}if(!F)continue;if(0<B){f=0<c?b.Ua(u):b.X(u);for(g=1;g<B;g++)F=0<c?b.Ua(f):b.X(f),b.vf(f,!0),
f=F;x.pc(J,l);B=x.length();B=t*t-B*B*.25;B=Math.sqrt(B);t-B>.5*this.Cj?(p.add(l,J),p.scale(.5),x.normalize(),x.Kp(),w.J(x),w.scale(t-B),p.add(w),b.Yi(u,p)):b.vf(u,!0);B=0}l.J(J);f=h}J.J(y);u=h;h=C;C=0<c?b.X(h):b.Ua(h);z++;g=!1}if(0<B){f=0<c?b.Ua(u):b.X(u);for(g=1;g<B;g++)F=0<c?b.Ua(f):b.X(f),b.vf(f,!0),f=F;p.add(l,J);p.scale(.5);x.pc(J,l);B=x.length();B=t*t-B*B*.25;B=Math.sqrt(B);x.normalize();x.Kp();w.J(x);w.scale(t-B);p.add(w);b.Yi(u,p)}b.xo(this.vx,!1,!1);if(!n)break}};k.prototype.pD=function(b,
e){if(1==b.Ha(e))return!0;var c=new a.i;b.Ti(e,c);return Math.max(c.aa(),c.ba())<.5*this.Cj?!0:!1};k.prototype.oD=function(b){var e=new a.i;b.o(e);return Math.max(e.aa(),e.ba())<.5*this.Cj?!0:!1};k.prototype.SQ=function(b){b=a.Sz.local().$(b,.25*this.Cj,!1,this.Yb);for(var e=0,c=0,k=b.ea();c<k;c++)e=Math.max(b.Ha(c),e);if(32>e)return this.Yo=!1,b;this.Yo=!0;return a.Of.Qj(b,this.jr,!1,!0,this.Yb)};k.prototype.us=function(b,e){e=e.w();if(null!=this.sd&&0!==this.sd.length){var c=new a.b;c.J(this.sd[0]);
c.Fr(this.hb,e);b.Nr(c);for(var k=1,n=this.sd.length;k<n;k++)c.J(this.sd[k]),c.Fr(this.hb,e),b.Lm(c)}else for(var k=this.pB(),c=a.I.truncate((k+3)/4),k=.5*Math.PI/c,n=Math.cos(k),h=Math.sin(k),u=new a.b,d=3;0<=d;d--)switch(u.ma(0,this.hb),d){case 0:for(k=0;k<c;k++)b.wj(u.x+e.x,u.y+e.y),u.Er(n,h);break;case 1:for(k=0;k<c;k++)b.wj(-u.y+e.x,u.x+e.y),u.Er(n,h);break;case 2:for(k=0;k<c;k++)b.wj(-u.x+e.x,-u.y+e.y),u.Er(n,h);break;default:for(b.Uy(u.y+e.x,-u.x+e.y),k=1;k<c;k++)u.Er(n,h),b.wj(u.y+e.x,-u.x+
e.y)}};k.Id=function(b){b.hg(1,0);return b};k.prototype.nS=function(b){b.hg(2,this.ka);b.hl();return b};return k}();a.UG=k})(z||(z={}));(function(a){var h=function(){function h(c){this.Qb=c;this.a=new a.fd;this.vg=new a.ga(0)}h.prototype.po=function(c,b,e){switch(b){case 0:if(c.v<e&&c.B<=e)break;else return c.v>=e?1:-1;case 1:if(c.C<e&&c.G<=e)break;else return c.C>=e?1:-1;case 2:if(c.v>=e&&c.B>e)break;else return c.B<=e?1:-1;case 3:if(!(c.C>=e&&c.G>e))return c.G<=e?1:-1}return 0};h.prototype.cL=function(c,
b){return 1736==c.D()?this.dL(c,b):this.eL(c)};h.prototype.dL=function(c,b){if(0==this.Qb.aa()||0==this.Qb.ba())return c.Pa();var e=new a.i;c.dd(e);this.U=this.a.Eb(c);var k=new a.i,n=new a.i,h=new a.b,d=new a.b,f=[0,0,0,0,0,0,0,0,0],g=[0,0,0,0,0,0,0,0,0];new a.Ag;var y=new a.yb,l=new a.ga(0);l.xb(Math.min(100,c.F()));for(var m=!1,p=0;!m&&4>p;p++){var q=!1,r=0!=(p&1),v=0;switch(p){case 0:v=this.Qb.v;q=e.v<=v&&e.B>=v;break;case 1:v=this.Qb.C;q=e.C<=v&&e.G>=v;break;case 2:v=this.Qb.B;q=e.v<=v&&e.B>=
v;break;case 3:v=this.Qb.G,q=e.C<=v&&e.G>=v}if(q)for(m=!0,q=this.a.Vb(this.U);-1!=q;){var x=-1,w=-1,t=this.a.Cb(q),B=t;do{var z=this.a.cc(B);null==z&&(z=y,this.a.w(B,h),z.ed(h),this.a.w(this.a.X(B),d),z.vd(d));z.o(k);var E=this.po(k,p,v),D=0,F=-1;if(-1==E){z=z.nt(r,v,f,g);0<z?D=this.a.Mr(B,g,z):D=0;for(var D=D+1,P=B,I=this.a.X(P),z=0;z<D;z++){this.a.w(P,h);this.a.w(I,d);F=this.a.cc(P);null==F&&(F=y,F.ed(h),F.vd(d));F.o(n);F=this.po(n,p,v);if(-1==F){if(r)F=Math.abs(h.y-v),K=Math.abs(d.y-v),F<K?(h.y=
v,this.a.Yi(P,h)):(d.y=v,this.a.Yi(I,d));else{var F=Math.abs(h.x-v),K=Math.abs(d.x-v);F<K?(h.x=v,this.a.Yi(P,h)):(d.x=v,this.a.Yi(I,d))}F=this.a.cc(P);null==F&&(F=y,F.ed(h),F.vd(d));F.o(n);F=this.po(n,p,v)}K=x;x=F;-1==w&&(w=x);if(0!=K||1!=x)1==K&&0==x||0!=K||0!=x||l.add(P);1==x&&(m=!1);F=P=I;I=this.a.X(I)}}if(0==D){K=x;x=E;-1==w&&(w=x);if(0!=K||1!=x)1==K&&0==x||0!=K||0!=x||l.add(B);1==x&&(m=!1);F=this.a.X(B)}B=F}while(B!=t);0==w&&0==x&&l.add(t);z=0;for(x=l.size;z<x;z++)w=l.get(z),this.a.vf(w,!1);
l.clear(!1);q=3>this.a.Ha(q)?this.a.Cr(q):this.a.bc(q)}}if(m)return c.Pa();this.AR();0<b&&this.gM(b);return this.a.hf(this.U)};h.prototype.eL=function(c){var b=new a.i,e=new a.i,k=[0,0,0,0,0,0,0,0,0],n=[0,0,0,0,0,0,0,0,0],h=new a.Ag,d=c,f=new a.i;c.dd(f);for(var g=0;4>g;g++){var y=!1,l=0!=(g&1),m=0;switch(g){case 0:m=this.Qb.v;y=f.v<=m&&f.B>=m;break;case 1:m=this.Qb.C;y=f.C<=m&&f.G>=m;break;case 2:m=this.Qb.B;y=f.v<=m&&f.B>=m;break;case 3:m=this.Qb.G,y=f.C<=m&&f.G>=m}if(y){y=d;d=c.Pa();y=y.Ca();y.Lk();
for(var p,q=new a.b;y.kb();)for(var r,v=!0;y.La();){var x=y.ia();x.o(b);var w=this.po(b,g,m);if(-1==w){if(w=x.nt(l,m,k,n),0<w){var t=0;p=x.Mb();for(var B=0;B<=w;B++)if(r=B<w?n[B]:1,t!=r){x.Bi(t,r,h);var z=h.get();z.ed(p);B<w&&(l?(q.x=k[B],q.y=m):(q.x=m,q.y=k[B]),z.vd(q));z.o(e);var E=this.po(e,g,m);if(-1==E){p=z.Mb();t=z.oc();if(l)E=Math.abs(p.y-m),D=Math.abs(t.y-m),E<D?(p.y=m,z.ed(p)):(t.y=m,z.vd(t));else{var E=Math.abs(p.x-m),D=Math.abs(t.x-m);E<D?(p.x=m,z.ed(p)):(t.x=m,z.vd(t))}z.o(e);E=this.po(e,
g,m)}p=z.oc();t=r;r=E;1==r?(d.Bc(z,v),v=!1):v=!0}}}else r=w,1==r?(d.Bc(x,v),v=!1):v=!0}}}return d};h.prototype.AR=function(){this.vn=-1;this.Nu(!1,this.Qb.v);this.Nu(!1,this.Qb.B);this.Nu(!0,this.Qb.C);this.Nu(!0,this.Qb.G);this.vg.resize(0);this.vg.xb(100);this.vn=this.a.re();for(var c=new a.b,b=this.a.Vb(this.U);-1!=b;b=this.a.bc(b))for(var e=this.a.Cb(b),k=0,n=this.a.Ha(b);k<n;k++,e=this.a.X(e))if(this.a.w(e,c),this.Qb.v==c.x||this.Qb.B==c.x||this.Qb.C==c.y||this.Qb.G==c.y)this.a.lb(e,this.vn,
this.vg.size),this.vg.add(e);this.zu(!1,this.Qb.v);this.zu(!1,this.Qb.B);this.zu(!0,this.Qb.C);this.zu(!0,this.Qb.G);this.WM()};h.prototype.gM=function(c){for(var b=new a.b,e=new a.b,k=a.I.Lh(2048,0),n=this.a.Vb(this.U);-1!=n;n=this.a.bc(n)){var h=this.a.Cb(n),d=h;do{var f=this.a.X(d);this.a.w(d,b);var g=-1;b.x==this.Qb.v?(this.a.w(f,e),e.x==this.Qb.v&&(g=1)):b.x==this.Qb.B&&(this.a.w(f,e),e.x==this.Qb.B&&(g=1));b.y==this.Qb.C?(this.a.w(f,e),e.y==this.Qb.C&&(g=0)):b.y==this.Qb.G&&(this.a.w(f,e),e.y==
this.Qb.G&&(g=0));if(-1!=g&&(g=a.b.Fb(b,e),g=a.I.truncate(Math.min(Math.ceil(g/c),2048)),!(1>=g))){for(var y=1;y<g;y++)k[y-1]=1*y/g;this.a.Mr(d,k,g-1)}d=f}while(d!=h)}};h.prototype.Nu=function(c,b){var e=this.a.re(),k=new a.b,n=new a.ga(0);n.xb(100);for(var h=this.a.Vb(this.U);-1!=h;h=this.a.bc(h))for(var d=this.a.Cb(h),f=0,g=this.a.Ha(h);f<g;f++){var y=this.a.X(d);this.a.w(d,k);if(c?k.y==b:k.x==b)if(this.a.w(y,k),c?k.y==b:k.x==b)1!=this.a.Ra(d,e)&&(n.add(d),this.a.lb(d,e,1)),1!=this.a.Ra(y,e)&&(n.add(y),
this.a.lb(y,e,1));d=y}this.a.bf(e);if(!(3>n.size)){var l=this;n.xd(0,n.size,function(b,e){return l.kj(b,e)});e=new a.b;h=new a.b;d=new a.b;h.Eh();for(var m=-1,f=new a.ga(0),g=new a.ga(0),y=this.a.re(),p=this.a.re(),q=0,r=n.size;q<r;q++){var v=n.get(q);this.a.w(v,k);if(!k.ub(h)){if(-1!=m){for(var x=m;x<q;x++){var m=n.get(x),w=this.a.X(m),v=this.a.Ua(m),t=!1;0>this.kj(m,w)&&(this.a.w(w,e),c?e.y==b:e.x==b)&&(f.add(m),t=!0,this.a.lb(m,p,1));0>this.kj(m,v)&&(this.a.w(v,e),c?e.y==b:e.x==b)&&(t||f.add(m),
this.a.lb(m,y,1))}x=0;for(t=f.size;x<t;x++){m=f.get(x);v=this.a.Ra(m,y);w=this.a.Ra(m,p);if(1==v){v=this.a.Ua(m);this.a.w(v,d);var B=[0];B[0]=0;if(!d.ub(k)){var z=a.b.Fb(h,d);B[0]=a.b.Fb(d,k)/z;0==B[0]?B[0]=2.220446049250313E-16:1==B[0]&&(B[0]=.9999999999999998);this.a.Mr(v,B,1);v=this.a.Ua(m);this.a.Yi(v,k);g.add(v);this.a.lb(v,y,1);this.a.lb(v,p,-1)}}1==w&&(w=this.a.X(m),this.a.w(w,d),B=[0],B[0]=0,d.ub(k)||(z=a.b.Fb(h,d),B[0]=a.b.Fb(h,k)/z,0==B[0]?B[0]=2.220446049250313E-16:1==B[0]&&(B[0]=.9999999999999998),
this.a.Mr(m,B,1),v=this.a.X(m),this.a.Yi(v,k),g.add(v),this.a.lb(v,y,-1),this.a.lb(v,p,1)))}m=f;f=g;g=m;g.clear(!1)}m=q;h.J(k)}}this.a.bf(y);this.a.bf(p)}};h.prototype.zu=function(c,b){var e=new a.b,k=new a.ga(0);k.xb(100);for(var n=this.a.re(),h=0,d=this.vg.size;h<d;h++){var f=this.vg.get(h);if(-1!=f){var g=this.a.X(f);this.a.w(f,e);if(c?e.y==b:e.x==b)if(this.a.w(g,e),c?e.y==b:e.x==b)-2!=this.a.Ra(f,n)&&(k.add(f),this.a.lb(f,n,-2)),-2!=this.a.Ra(g,n)&&(k.add(g),this.a.lb(g,n,-2))}}if(0!=k.size){var y=
this;k.xd(0,k.size,function(b,e){return y.kj(b,e)});h=0;for(d=k.size;h<d;h++){var l=k.get(h);this.a.lb(l,n,h)}f=new a.b;g=new a.b;g.Eh();for(var m=-1,h=0,d=k.size;h<d;h++)if(l=k.get(h),-1!=l&&(this.a.w(l,e),!e.ub(g))){if(-1!=m)for(;;){for(var l=!1,p=1<h-m?h-1:h,q=m;q<p;q++){var r=k.get(q);if(-1!=r){var v=-1,x=this.a.X(r);0>this.kj(r,x)&&(this.a.w(x,f),c?f.y==b:f.x==b)&&(v=x);var x=-1,w=this.a.Ua(r);0>this.kj(r,w)&&(this.a.w(w,f),c?f.y==b:f.x==b)&&(x=w);if(-1!=v&&-1!=x)this.no(r,k,n),this.a.vf(r,!1),
this.no(v,k,n),this.a.vf(v,!1),l=!0;else if(-1!=v||-1!=x){for(w=q+1;w<h;w++){var B=k.get(w);if(-1!=B){var t=this.a.X(B),z=-1;0>this.kj(B,t)&&(this.a.w(t,f),c?f.y==b:f.x==b)&&(z=t);var t=this.a.Ua(B),E=-1;0>this.kj(B,t)&&(this.a.w(t,f),c?f.y==b:f.x==b)&&(E=t);if(-1!=z&&-1!=E){this.no(B,k,n);this.a.vf(B,!1);this.no(z,k,n);this.a.vf(z,!1);l=!0;break}if(-1!=v&&-1!=E){this.dF(k,r,v,B,E,n);l=!0;break}else if(-1!=x&&-1!=z){this.dF(k,B,z,r,x,n);l=!0;break}}}if(l)break}}}if(!l)break}m=h;g.J(e)}}this.a.bf(n)};
h.prototype.no=function(c,b,e){e=this.a.Ra(c,e);b.set(e,-1);e=this.a.Ra(c,this.vn);this.vg.set(e,-1);b=this.a.rd(c);-1!=b&&this.a.Cb(b)==c&&(this.a.Dh(b,-1),this.a.Wi(b,-1))};h.prototype.dF=function(c,b,e,k,a,h){this.a.Sc(b,k);this.a.Tc(k,b);this.a.Tc(e,a);this.a.Sc(a,e);this.no(k,c,h);this.a.Ui(k,!1);this.no(a,c,h);this.a.Ui(a,!0)};h.prototype.WM=function(){for(var c=0,b=this.vg.size;c<b;c++){var e=this.vg.get(c);-1!=e&&this.a.im(e,-1)}for(var k=0,a=0,h=this.a.Vb(this.U);-1!=h;){var d=this.a.Cb(h);
if(-1==d||h!=this.a.rd(d)){var f=h,h=this.a.bc(h);this.a.Dh(f,-1);this.a.yu(f)}else{e=d;f=0;do this.a.im(e,h),f++,e=this.a.X(e);while(e!=d);2>=f?(e=this.a.Ra(d,this.vn),this.vg.set(e,-1),d=this.a.vf(d,!1),2==f&&(e=this.a.Ra(d,this.vn),this.vg.set(e,-1),this.a.vf(d,!1)),f=h,h=this.a.bc(h),this.a.Dh(f,-1),this.a.yu(f)):(this.a.Jr(h,!1),this.a.Wi(h,this.a.Ua(d)),this.a.hm(h,f),a+=f,k++,h=this.a.bc(h))}}c=0;for(b=this.vg.size;c<b;c++)if(e=this.vg.get(c),-1!=e&&(h=this.a.rd(e),-1==h)){h=this.a.Cf(this.U,
-1);f=0;d=e;do this.a.im(e,h),f++,e=this.a.X(e);while(e!=d);2>=f?(e=this.a.Ra(d,this.vn),this.vg.set(e,-1),d=this.a.vf(d,!1),2==f&&(e=this.a.Ra(d,this.vn),0<=e&&this.vg.set(e,-1),this.a.vf(d,!1)),f=h,this.a.Dh(f,-1),this.a.yu(f)):(this.a.Gn(h,!0),this.a.hm(h,f),this.a.Dh(h,d),this.a.Wi(h,this.a.Ua(d)),this.a.Jr(h,!1),a+=f,k++)}this.a.gm(this.U,k);this.a.Pk(this.U,a);c=0;for(b=this.a.$c;-1!=b;b=this.a.we(b))c+=this.a.F(b);this.a.ZF(c)};h.Xk=function(c,b,e){return(new h(b)).cL(c,e)};h.clip=function(c,
b,e,k){if(c.s())return c;if(b.s())return c.Pa();e=c.D();if(33==e)return k=c.w(),b.contains(k)?c:c.Pa();if(197==e)return k=new a.i,c.o(k),k.Ga(b)?(b=new a.Vj,c.copyTo(b),b.Cu(k),b):c.Pa();var n=new a.i;c.dd(n);if(b.contains(n))return c;if(!b.jc(n))return c.Pa();n=c.pb;if(null!=n&&(n=n.hi,null!=n)){n=n.Dn(b);if(1==n){if(1736!=e)throw a.g.wa();c=new a.Ka(c.description);c.ws(b);return c}if(0==n)return c.Pa()}switch(e){case 550:e=null;for(var n=c.F(),u=c.mc(0),d=0,f=0;f<n;f++)k=new a.b,u.ec(2*f,k),b.contains(k)||
(0==d&&(e=c.Pa()),d<f&&e.Pd(c,d,f),d=f+1);0<d&&e.Pd(c,d,n);return 0==d?c:e;case 1736:case 1607:return h.Xk(c,b,k);default:throw a.g.wa();}};h.prototype.kj=function(c,b){var e=new a.b;this.a.w(c,e);c=new a.b;this.a.w(b,c);return e.compare(c)};return h}();a.Ed=h})(z||(z={}));(function(a){var h=new a.b,d=function(){function b(b,c,n,h,d){this.Ml=new a.b;this.ln=new a.b;this.Ck=new a.b;this.a=b;this.Px=n;this.bn=h;this.Ml=c;this.vk=d;this.ln.Eh();this.Ck.Eh()}b.prototype.sB=function(b){this.a.w(b,this.ln);
b=a.I.truncate((this.ln.x-this.Ml.x)*this.bn+.5);var e=a.I.truncate((this.ln.y-this.Ml.y)*this.bn+.5);return c.XC(b,e)};b.prototype.vw=function(b){return this.a.Ra(b,this.vk)};return b}();a.wT=function(){return function(){}}();var c=function(){function b(){this.Ml=new a.b;this.Zo=[0,0,0,0];this.Kq=[0,0,0,0];this.en=this.vk=-1}b.zM=function(e,c){var k=new b;k.a=e;k.ka=c;k.Px=c*c;k.Kt=2*c;k.bn=1/k.Kt;return k.fL()};b.Vw=function(b,c,a,h,d){b-=a;c-=h;return b*b+c*c<=d};b.XC=function(b,c){return a.I.kg(c,
a.I.kg(b))};b.prototype.hL=function(e,c){this.a.uc(e,h);for(var k=(h.y-this.Ml.y)*this.bn,u=a.I.truncate((h.x-this.Ml.x)*this.bn),d=a.I.truncate(k),f=k=0;1>=f;f+=1)for(var g=0;1>=g;g+=1){var y=b.XC(u+f,d+g),l=this.uk.DN(y);-1!=l&&(this.Zo[k]=l,this.Kq[k]=y,k++)}for(u=k-1;1<=u;u--)for(l=this.Zo[u],d=u-1;0<=d;d--)if(l==this.Zo[d]){this.Kq[d]=-1;k--;u!=k&&(this.Kq[u]=this.Kq[k],this.Zo[u]=this.Zo[k]);break}for(d=0;d<k;d++)this.iL(e,this.Kq[d],h,this.Zo[d],c)};b.prototype.iL=function(e,c,n,h,d){for(var k=
new a.b;-1!=h;h=this.uk.SN(h)){var u=this.uk.da(h);e==u||-1!=c&&this.a.Ra(u,this.vk)!=c||(this.a.uc(u,k),b.Vw(n.x,n.y,k.x,k.y,this.Px)&&d.add(h))}};b.prototype.Tl=function(b,c,a){var e=this.a.Ra(b,this.en),k=this.a.Ra(c,this.en);-1==e&&(e=this.nd.jh(),this.nd.addElement(e,b),this.a.lb(b,this.en,e));-1==k?this.nd.addElement(e,c):this.nd.Qv(e,k);this.a.lb(c,this.en,-2);c=this.aQ(b,c);a&&(a=this.St.sB(b),this.a.lb(b,this.vk,a));return c};b.$P=function(e,c,n){e.lc(c);n=e;var k=new a.b;b.HH(e.w(),c.w(),
k);n.ic(k)};b.HH=function(b,c,a){var e=b.x;b.x!=c.x&&(e=(1*b.x+1*c.x)/2);var k=b.y;b.y!=c.y&&(k=(1*b.y+1*c.y)/2);a.ma(e,k)};b.prototype.aQ=function(b,c){var e=new a.b;this.a.w(b,e);var k=new a.b;this.a.w(c,k);var h=this.a.RC(b);c=this.a.RC(c);var d=h+c,f=0,g=e.x;e.x!=k.x&&(g=(e.x*h+k.x*c)/d,f++);var y=e.y;e.y!=k.y&&(y=(e.y*h+k.y*c)/d,f++);0<f&&this.a.ic(b,g,y);this.a.pS(b,d);return 0!=f};b.prototype.fL=function(){var b=this.a.pd,c=this.a.wC();this.Ml=c.yw();c=Math.max(c.ba(),c.aa())/2147483646;this.Kt<
c&&(this.Kt=c,this.bn=1/this.Kt);this.nd=new a.Ur;this.nd.Dr(a.I.truncate(this.a.pd/3+1));this.nd.$l(a.I.truncate(this.a.pd/3+1));this.vk=this.a.re();this.en=this.a.re();this.St=new d(this.a,this.Ml,this.Px,this.bn,this.vk);this.uk=new a.AH(a.I.truncate(4*b/3),this.St);this.uk.wR(this.a.pd);b=!1;for(c=this.a.$c;-1!=c;c=this.a.we(c))for(var n=this.a.Vb(c);-1!=n;n=this.a.bc(n))for(var h=this.a.Cb(n),C=0,f=this.a.Ha(n);C<f;C++){var g=this.St.sB(h);this.a.lb(h,this.vk,g);this.uk.addElement(h,g);h=this.a.X(h)}var y=
new a.ga(0);y.xb(10);for(c=this.a.$c;-1!=c;c=this.a.we(c))for(n=this.a.Vb(c);-1!=n;n=this.a.bc(n))for(h=this.a.Cb(n),C=0,f=this.a.Ha(n);C<f;C++){if(-2!=this.a.Ra(h,this.en))for(g=this.a.Ra(h,this.vk),this.uk.Jc(h,g);;){this.hL(h,y);if(0==y.size)break;for(var g=!1,l=0,m=y.size;l<m;l++){var p=y.get(l),q=this.uk.da(p);this.uk.kd(p);g=this.Tl(h,q,l+1==m)||g}b=b||g;y.clear(!1);if(!g)break}h=this.a.X(h)}b&&this.ZJ();this.St=this.uk=null;this.a.bf(this.vk);this.a.bf(this.en);return b};b.prototype.ZJ=function(){for(var b=
new a.b,c=this.nd.Wd;-1!=c;c=this.nd.Cw(c)){var n=this.nd.gc(c);this.a.w(this.nd.da(n),b);for(n=this.nd.bb(n);-1!=n;n=this.nd.bb(n))this.a.Yi(this.nd.da(n),b)}};return b}();a.Sr=c})(z||(z={}));(function(a){var h=Math.PI,d=2*Math.PI,c=Math.PI/2,b=function(){function b(){}b.yL=function(e,c){var a=new b;a.x=e;a.y=c;a.type=0;a.mh=0;return a};b.um=function(e){var c=new b;c.x=e.x;c.y=e.y;c.type=0;c.mh=0;return c};b.xL=function(e){var c=new b;c.x=e.x;c.y=e.y;c.type=e.type;c.mh=e.mh;return c};b.Ad=function(e,
c,a){var k=new b;k.x=e.x+c*Math.cos(a);k.y=e.y+c*Math.sin(a);k.type=e.type;k.mh=e.mh;return k};b.Js=function(e,c){var a=new b;a.x=.5*(e.x+c.x);a.y=.5*(e.y+c.y);a.type=e.type;a.mh=e.mh;return a};b.LB=function(e,c){var a=new b;a.x=e.x+.001*(c.x-e.x);a.y=e.y+.001*(c.y-e.y);a.type=e.type;a.mh=e.mh;return a};return b}(),e=function(){return function(){}}();(function(b){b[b.Round=0]="Round";b[b.Bevel=1]="Bevel";b[b.Miter=2]="Miter";b[b.Square=3]="Square"})(a.EH||(a.EH={}));var k=function(){function k(b){this.Kx=
this.Ib=this.dg=null;this.oe=b}k.$=function(b,e,c,n,h,d){if(null==b)throw a.g.N();if(1>b.fb())throw a.g.N();if(0==e||b.s())return b;d=new k(d);d.$m=b;d.Da=e;d.ka=h;d.bi=c;d.Dx=n;return d.hv()};k.prototype.hJ=function(){var b=this.$m,e=b.Mb(),c=b.oc(),k=new a.b;k.pc(c,e);k.normalize();k.tt();k.scale(this.Da);e.add(k);c.add(k);k=b.Pa();b.ed(e);b.vd(c);return k};k.prototype.gJ=function(){var b=this.$m;if(0<this.Da&&2!=this.bi){var e=new a.Ka;e.Wc(b,!1);this.$m=e;return this.hv()}b=new a.Vj(b.R);b.P(this.Da,
this.Da);return b};k.prototype.rF=function(b,e,c,a){return(e.x-b.x)*(a.x-c.x)+(e.y-b.y)*(a.y-c.y)};k.prototype.Ub=function(e,a){if(void 0===a)this.Ib.push(e),this.Xe++;else if(0==this.Xe)this.Ub(e);else{var k=this.eu,n,h;n=this.dg[0==a?k-1:a-1];h=this.dg[a];var u=this.rF(n,h,this.Ib[this.Xe-1],e);0<u?this.Ub(e):0>u&&(0<this.rF(n,h,h,this.Ib[this.Xe-1])?(h=this.dg[0==a?k-2:1==a?k-1:a-2],k=b.Ad(n,this.Da,Math.atan2(n.y-h.y,n.x-h.x)-c),this.Ib[this.Xe-1]=k,1==this.bi||2==this.bi?(k=b.Js(k,n),this.Ub(k),
k=b.Ad(n,this.Da,this.vt+c),n=b.Js(k,n),n.type|=256,this.Ub(n)):(k=b.Ad(n,this.Da,this.vt+c),k.type|=256),this.Ub(k),this.Ub(e,a)):(k=b.Ad(h,this.Da,this.vt+c),this.Ub(k),1==this.bi||2==this.bi?(k=b.Js(k,h),this.Ub(k),k=b.Ad(h,this.Da,this.gx-c),n=b.Js(k,h),n.type|=256,this.Ub(n)):(k=b.Ad(h,this.Da,this.gx-c),k.type|=256),this.Ub(k)))}};k.prototype.mB=function(){var e,k,n,f,g,y,l=this.eu;this.Xe=0;var m=.5*this.ka,p=0,q=0;for(e=0;e<l;e++){f=this.dg[e];g=0==e?this.dg[l-1]:this.dg[e-1];y=e==l-1?this.dg[0]:
this.dg[e+1];var r=g.x-f.x,v=g.y-f.y,x=y.x-f.x,w=y.y-f.y;k=Math.atan2(v,r);n=Math.atan2(w,x);this.vt=k;this.gx=n;0==e&&(p=k,q=n);r=r*w-x*v;v=n;n<k&&(n+=d);if(0<r*this.Da)1==this.bi||2==this.bi?(k=b.Ad(f,this.Da,k+c),this.Ub(k),k=b.LB(f,k),this.Ub(k),k=b.Ad(f,this.Da,n-c),f=b.LB(f,k),f.type|=256,this.Ub(f),this.Ub(k)):(r=.5*(n-k),r=this.Da/Math.abs(Math.sin(r)),k=b.Ad(f,r,.5*(k+n)),this.Ub(k,e));else if(0!=(f.type&512)){r=1-m/Math.abs(this.Da);g=1;y=0>this.Da?-h:h;-1<r&&1>r&&(v=2*Math.acos(r),.017453292519943295>
v&&(v=.017453292519943295),g=a.I.truncate(h/v+1.5),1<g&&(y/=g));v=k+c;k=b.Ad(f,this.Da,v);0==e&&(k.type|=1024);this.Ub(k,e);r=this.Da/Math.cos(y/2);v+=y/2;k=b.Ad(f,r,v);k.type|=1024;for(this.Ub(k);0<--g;)v+=y,k=b.Ad(f,r,v),k.type|=1024,this.Ub(k);k=b.Ad(f,this.Da,n-c);k.type|=1024;this.Ub(k)}else if(1==this.bi)k=b.Ad(f,this.Da,k+c),this.Ub(k,e),k=b.Ad(f,this.Da,n-c),this.Ub(k);else if(0==this.bi)for(r=1-m/Math.abs(this.Da),g=1,y=n-c-(k+c),-1<r&&1>r&&(v=2*Math.acos(r),.017453292519943295>v&&(v=.017453292519943295),
g=a.I.truncate(Math.abs(y)/v+1.5),1<g&&(y/=g)),r=this.Da/Math.cos(.5*y),v=k+c+.5*y,k=b.Ad(f,r,v),this.Ub(k,e);0<--g;)v+=y,k=b.Ad(f,r,v),this.Ub(k);else 2==this.bi?(r=g.x-f.x,v=g.y-f.y,x=y.x-f.x,w=y.y-f.y,g=(r*x+v*w)/Math.sqrt(r*r+v*v)/Math.sqrt(x*x+w*w),.99999999<g?(k=b.Ad(f,1.4142135623730951*this.Da,n-.25*h),this.Ub(k,e),k=b.Ad(f,1.4142135623730951*this.Da,n+.25*h),this.Ub(k)):(g=Math.abs(this.Da/Math.sin(.5*Math.acos(g))),y=Math.abs(this.Dx*this.Da),g>y?(r=.5*(n-k),r=this.Da/Math.abs(Math.sin(r)),
k=b.Ad(f,r,.5*(k+n)),n=a.b.Oa(k.x,k.y),k=a.b.Oa(f.x,f.y),f=new a.b,f.pc(n,k),n=new a.b,n.DR(y/f.length(),f,k),k=(g-y)*Math.abs(this.Da)/Math.sqrt(g*g-this.Da*this.Da),0<this.Da?f.tt():f.Kp(),f.scale(k/f.length()),k=new a.b,k.add(n,f),g=new a.b,g.pc(n,f),k=b.um(k),this.Ub(k,e),k=b.um(g),this.Ub(k)):(r=.5*(n-k),r=this.Da/Math.abs(Math.sin(r)),k=b.Ad(f,r,.5*(k+n)),this.Ub(k,e)))):(n=v,0<this.Da?(n>k&&(n-=d),g=k-n<c):(n<k&&(n+=d),g=n-k<c),g?(r=1.4142135623730951*this.Da,v=0>r?k+.25*h:k+.75*h,k=b.Ad(f,
r,v),this.Ub(k,e),v=0>r?n-.25*h:n-.75*h,k=b.Ad(f,r,v),this.Ub(k)):(r=.5*(n-k),r=this.Da/Math.abs(Math.sin(r)),n<k&&(n+=d),k=b.Ad(f,r,(k+n)/2),this.Ub(k,e)))}this.vt=p;this.gx=q;this.Ub(this.Ib[0],0);f=b.xL(this.Ib[this.Xe-1]);this.Ib[0]=f;return this.sR()};k.prototype.xs=function(b,e){if(!(2>e))for(var c=0;c<e;c++){var k=this.Ib[b+c];0!=c?this.Kx.Lm(a.b.Oa(k.x,k.y)):this.Kx.Nr(a.b.Oa(k.x,k.y))}};k.prototype.iJ=function(e,c,k){var a=e.Ea(c),n=e.Dc(c);this.Ib=[];this.Kx=k;if(e.vc(c)){for(c=e.Fa(a);e.Fa(n-
1).ub(c);)n--;if(2<=n-a){this.eu=n-a;this.dg=[];for(c=a;c<n;c++)this.dg.push(b.um(e.Fa(c)));this.mB()&&this.xs(0,this.Xe-1)}}else{for(c=e.Fa(a);a<n&&e.Fa(a+1).ub(c);)a++;for(c=e.Fa(n-1);a<n&&e.Fa(n-2).ub(c);)n--;if(2<=n-a){this.eu=2*(n-a)-2;this.dg=[];k=b.um(e.Fa(a));k.type|=1536;this.dg.push(k);for(c=a+1;c<n-1;c++)k=b.um(e.Fa(c)),this.dg.push(k);k=b.um(e.Fa(n-1));k.type|=512;this.dg.push(k);for(c=n-2;c>=a+1;c--)k=b.um(e.Fa(c)),k.type|=1024,this.dg.push(k);if(this.mB())if(2<=this.Ib.length){e=-1;
(n=0!=(this.Ib[this.Xe-1].type&1024))||(e=0);for(c=1;c<this.Xe;c++)(a=0!=(this.Ib[c].type&1024))?n||(n=c-1,1<n-e+1&&this.xs(e,n-e+1)):n&&(e=c-1),n=a;n||(n=this.Xe-1,1<n-e+1&&this.xs(e,n-e+1))}else e=0,n=this.Xe-1,0<=e&&1<=n-e&&this.xs(e,n-e+1)}}this.dg=null;this.eu=0;this.Ib=null;this.Xe=0};k.prototype.sR=function(){for(var b=!1,e=0;e<this.Xe;e++){var c=this.Ib[e];c.Rg=e+1;c.Ug=e-1;this.Ib[e]=c}c=this.Ib[0];c.Ug=this.Xe-2;this.Ib[0]=c;c=this.Ib[this.Xe-2];c.Rg=0;this.Ib[this.Xe-2]=c;for(e=c=0;e<this.Xe;e++)if(0!=
(this.Ib[c].type&256)){var k=this.$L(c);if(-1!=k)c=k;else{b=!0;break}}else c=this.Ib[c].Rg;if(b)return!1;this.vL(c);return!0};k.prototype.$L=function(b){for(var e=this.Xe-1,c=b,k,a,n=1;n<=e-2;n++){k=c=this.Ib[c].Rg;a=b;for(var h=1;h<=n;h++){a=this.Ib[a].Ug;if(0==(this.Ib[a].type&256)&&0==(this.Ib[k].type&256)){var u=this.oO(a,k);if(-1!=u)return u}k=this.Ib[k].Ug}}return-1};k.prototype.oO=function(b,c){var k,n,h,u;k=this.Ib[this.Ib[b].Ug];n=this.Ib[b];h=this.Ib[this.Ib[c].Ug];u=this.Ib[c];if(!this.HR(k,
n,h,u))return-1;var d=new e;return this.NM(k,n,h,u,d)&&!d.cB&&a.I.bG((n.x-k.x)*(u.y-h.y)-(n.y-k.y)*(u.x-h.x))!=a.I.bG(this.Da)?(k=this.Ib[b].Ug,d.Xl.type=n.type,d.Xl.Rg=c,d.Xl.Ug=k,this.Ib[b]=d.Xl,d.Xl=this.Ib[c],d.Xl.Ug=b,this.Ib[c]=d.Xl,c):-1};k.prototype.HR=function(b,e,c,k){return Math.max(b.x,e.x)>=Math.min(c.x,k.x)&&Math.max(c.x,k.x)>=Math.min(b.x,e.x)&&Math.max(b.y,e.y)>=Math.min(c.y,k.y)&&Math.max(c.y,k.y)>=Math.min(b.y,e.y)};k.prototype.NM=function(e,c,k,a,n){n.cB=!1;var h,u,d;h=(c.y-e.y)*
(a.x-k.x)-(c.x-e.x)*(a.y-k.y);u=(k.y-e.y)*(c.x-e.x)-(k.x-e.x)*(c.y-e.y);h=0==h?2:u/h;return 0<=h&&1>=h&&(d=h,h=(a.y-k.y)*(c.x-e.x)-(a.x-k.x)*(c.y-e.y),u=(e.y-k.y)*(a.x-k.x)-(e.x-k.x)*(a.y-k.y),h=0==h?2:u/h,0<=h&&1>=h)?(n.Xl=b.yL(e.x+h*(c.x-e.x),e.y+h*(c.y-e.y)),n.Xl.mh=k.mh+d*(a.mh-k.mh),0!=d&&1!=d||0!=h&&1!=h||(n.cB=!0),n.wU=h,n.xU=d,(0==d||1==d)&&0<h&&1>h||(0==h||1==h)&&0<d&&1>d?!1:!0):!1};k.prototype.vL=function(b){for(;this.Ib[b].Ug<b;)b=this.Ib[b].Ug;var e=0,c=b;do c=this.Ib[c],this.Ib[e]=c,
c=c.Rg,e++;while(c!=b);this.Ib[e]=this.Ib[0];this.Xe=e+1};k.prototype.qA=function(b){var e=this.$m,c=e.Ca();if(null!=c){c.Lk();for(var k=-1;c.kb();)k++,this.iJ(e,k,b)}};k.prototype.hv=function(){var b=this.$m.D();return 322==b?this.hJ():197==b?this.gJ():a.T.Lc(b)?(b=new a.Xa,b.Bc(this.$m,!0),this.$m=b,this.hv()):1607==b?(b=new a.Xa,this.qA(b),b):1736==b?(b=new a.Ka,this.qA(b),b):null};return k}();a.XG=k})(z||(z={}));(function(a){var h=function(){function b(b){this.xj=b}b.prototype.w=function(b,e){this.xj.a.w(b,
e)};b.prototype.kd=function(b){var e=this.xj.za.da(b);this.xj.za.kd(b,-1);this.xj.a.vf(e,!1)};return b}(),d=function(){function b(b){this.xj=b}b.prototype.w=function(b,e){this.xj.NP.w(b,e)};b.prototype.kd=function(b){this.xj.za.kd(b,-1)};return b}(),c=function(){function b(b){this.xj=b}b.prototype.w=function(b,e){e.J(this.xj.PP[b])};b.prototype.kd=function(b){this.xj.za.kd(b,-1)};return b}(),b=function(){function b(b){void 0===b?(this.za=new a.bj,this.za.de(20),this.a=new a.fd,this.FP=this.a.jg(550),
this.cr=this.a.Cf(this.FP,-1),this.oh=new h(this)):b instanceof Array?(this.za=new a.bj,this.za.de(20),this.PP=b,this.oh=new c(this)):(this.za=new a.bj,this.za.de(20),this.NP=b,this.oh=new d(this))}b.prototype.Eb=function(b){var e=b.D();if(a.Wr.Th(e))this.OJ(b);else if(a.al.Lc(e))this.SJ(b);else if(197==e)this.LJ(b);else if(33==e)this.RJ(b);else throw a.g.N("invalid shape type");};b.prototype.sN=function(){var b=new a.Va,e=this.za.gc(-1),c=new a.Ka(this.a.wp);this.a.Jk(this.za.da(e),b);c.df(b);for(e=
this.za.bb(e);-1!=e;e=this.za.bb(e))this.a.Jk(this.za.da(e),b),c.lineTo(b);return c};b.wL=function(e){var c=new b(e),k=e.F(),h=1,d=new a.b,f=new a.b,g=new a.b;for(e.w(0,d);;){e.w(h,f);if(!(f.Ww(d)&&h<k-1))break;h++}c.za.addElement(0,-1);c.za.qm(h);for(k=h+1;k<e.F();k++)e.w(k,g),h=c.cz(g),-1!=h&&c.za.Vi(h,k);g=new a.Va;h=c.za.gc(-1);k=new a.Ka(e.description);e.Sd(c.za.da(h),g);k.df(g);for(h=c.za.bb(h);-1!=h;h=c.za.bb(h))e.Sd(c.za.da(h),g),k.lineTo(g);return k};b.Oa=function(e,c,a){for(var k=new b(e),
n=1,h=e[0];e[n].Ww(h)&&n<c-1;)n++;k.za.addElement(0,-1);k.za.qm(n);for(n+=1;n<c;n++)h=k.cz(e[n]),-1!=h&&k.za.Vi(h,n);e=0;for(c=k.za.gc(-1);-1!=c;c=k.za.bb(c))a[e++]=k.za.da(c);return e};b.sD=function(e,c){var k=e.Ea(c),n=e.Dc(c);c=!e.vc(c)&&e.Oo(c);e=e.mc(0);k*=2;n*=2;c&&(n-=2);if(6>n-k)return!0;c=new a.b;var h=new a.b,d=new a.b;e.ec(k,c);e.ec(k+2,h);e.ec(k+4,d);var f=b.Bd(h,d,c);if(f.Dq()||!b.ac(f.value()))return!1;for(var g=a.b.Oa(h.x,h.y),y=new a.b,k=k+6;k<n;k+=2){y.J(h);h.J(d);e.ec(k,d);f=b.Bd(h,
d,c);if(f.Dq()||!b.ac(f.value()))return!1;f=b.Bd(g,d,c);if(f.Dq()||!b.ac(f.value()))return!1;f=b.Bd(h,d,y);if(f.Dq()||!b.ac(f.value()))return!1}return!0};b.prototype.OJ=function(b){for(var e=new a.Va,c=new a.b,k=0;k<b.F();k++){b.w(k,c);var h=this.hq(c);if(-1!=h){b.Sd(k,e);var d=this.a.Ub(this.cr,e);this.za.Vi(h,d)}}};b.prototype.LJ=function(b){for(var e=new a.Va,c=new a.b,k=0;4>k;k++){b.vu(k,c);var h=this.hq(c);if(-1!=h){b.uf(k,e);var d=this.a.Ub(this.cr,e);this.za.Vi(h,d)}}};b.prototype.SJ=function(b){var e=
new a.Va,c=b.Mb(),c=this.hq(c);if(-1!=c){b.En(e);var k=this.a.Ub(this.cr,e);this.za.Vi(c,k)}c=b.oc();c=this.hq(c);-1!=c&&(b.Bn(e),b=this.a.Ub(this.cr,e),this.za.Vi(c,b))};b.prototype.RJ=function(b){var e=b.w(),e=this.hq(e);-1!=e&&(b=this.a.Ub(this.cr,b),this.za.Vi(e,b))};b.prototype.hq=function(b){var e=-1;if(0==this.za.size(-1))return e=this.za.addElement(-4,-1);if(1==this.za.size(-1)){var c=this.a.Fa(this.za.da(this.za.gc(-1)));b.Ww(c)||(e=this.za.qm(-5));return e}return e=this.cz(b)};b.prototype.cz=
function(e){var c=-1,k=this.za.gc(-1),h=this.za.tc(-1),d=this.za.da(k),f=this.za.da(h),g=new a.b,y=new a.b;this.oh.w(d,g);this.oh.w(f,y);d=a.b.yn(y,e,g);if(b.ac(d))c=this.za.qm(-1),g=this.az(e,h,k),g!=k&&this.bz(e,k,this.za.ge(g));else if(b.ti(d)){for(var y=this.za.dt(-1),l=this.za.gc(-1),m=this.za.tc(-1),p,d=new a.b,f=new a.b;l!=this.za.ge(m);)p=this.za.da(y),this.oh.w(p,d),p=a.b.yn(d,e,g),b.ti(p)?(m=y,y=this.za.ik(y)):(l=y,y=this.za.Jo(y));y=m;g=l;p=this.za.da(y);l=this.za.da(g);this.oh.w(p,d);
this.oh.w(l,f);if(g==k||(d=a.b.yn(f,e,d),b.ac(d)))c=this.za.vs(g,y,-2,!1),this.bz(e,y,h),this.az(e,g,k)}else null==this.ib&&(this.ib=new a.yb),this.ib.ed(y),this.ib.vd(g),g=this.ib.Gd(e,!0),0>g?(g=this.za.ge(h),this.za.kd(h,-1),c=this.za.qm(-3),this.az(e,g,k)):1<g&&(g=this.za.bb(k),this.za.kd(k,-1),c=this.za.vs(-1,g,-3,!1),this.bz(e,g,h));return c};b.prototype.bz=function(e,c,h){if(c!=h){var k=this.za.da(c),n=this.za.bb(c),u=new a.b,d=new a.b;for(this.oh.w(k,u);c!=h&&2<this.za.size(-1);){this.oh.w(this.za.da(n),
d);k=a.b.yn(d,e,u);if(b.ac(k))break;k=c;c=n;u.J(d);n=this.za.bb(c);this.oh.kd(k)}}};b.prototype.az=function(e,c,h){if(c==h)return h;var k=this.za.da(c),n=this.za.ge(c),u=new a.b,d=new a.b;for(this.oh.w(k,u);c!=h&&2<this.za.size(-1);){this.oh.w(this.za.da(n),d);k=a.b.yn(u,e,d);if(b.ac(k))break;k=c;c=n;u.J(d);n=this.za.ge(c);this.oh.kd(k)}return c};b.Bd=function(b,e,c){var k=new a.$k;k.set(e.x);k.sub(b.x);var n=new a.$k;n.set(c.y);n.sub(b.y);var h=new a.$k;h.set(e.y);h.sub(b.y);e=new a.$k;e.set(c.x);
e.sub(b.x);k.Ap(n);h.Ap(e);k.sub(h);return k};b.ac=function(b){return 0>b};b.ti=function(b){return 0<b};b.ao=function(b){return 0==b};return b}();a.Tr=b})(z||(z={}));(function(a){var h=function(){function h(c){this.oe=this.a=null;this.WD=!0;this.oe=c}h.HE=function(c,b,e){c=a.Ia.As(c);return a.Sr.Vw(b.lk(),b.mk(),e.lk(),e.mk(),a.vi.Ty(c))};h.gL=function(c,b){var e=new a.Va;a.Sr.$P(c,b,e);return e};h.$=function(c,b,e,k){e=new h(e);e.a=c;e.ka=b;e.WD=k;return e.rJ()};h.prototype.lJ=function(c){return a.Sr.zM(this.a,
c)};h.prototype.oJ=function(c){return a.Zu.$(this.a,c,this.oe)};h.prototype.rJ=function(){for(var c=this.ka,b=a.Ia.As(c),c=a.Ia.UJ(c),e=1.00001*c,c=1.000001*c,k=!1,n=30<this.a.pd+10?1E3:(this.a.pd+10)*(this.a.pd+10),h=0,d=this.a.pO();;h++){if(h>n)throw a.g.ra("Internal Error: max number of iterations exceeded");var f=this.lJ(b),k=k||f;this.WD&&(f=0!=this.a.xo(b,!0,!1),k=k||f);f=!1;if(0==h||d||a.Zu.DE(!0,this.a,c,null,this.oe))f=this.oJ(e),k=k||f;if(!f)break}return k};return h}();a.aj=h})(z||(z={}));
(function(a){var h=function(){function h(c){this.Ld=this.zc=null;this.Yb=c;this.hx=!0}h.prototype.et=function(c,b){var e=this.a.cc(c);if(null==e){if(!this.a.Oc(c,b))return null;e=b}return e};h.prototype.LL=function(){var c=this.a.Gp(!1),b=!1,e=new a.yb,k=new a.yb,n=new a.i;n.Ja();var h=new a.i;h.Ja();for(var d=new a.Va,f=new a.gA,g=c.next();-1!=g;g=c.next()){var y=null,l=!1;if(!a.T.Km(this.a.Lb(c.mj))){y=this.et(g,e);if(null==y)continue;y.o(n);n.P(this.ka,this.ka);if(y.mg(this.ka))if(y.mg(0))l=!0,
y=null;else continue}var m=this.a.Gp(c),p=m.next();for(-1!=p&&(p=m.next());-1!=p;p=m.next()){var q=null,r=!1;if(!a.T.Km(this.a.Lb(m.mj))){q=this.et(p,k);if(null==q)continue;q.o(h);if(q.mg(this.ka))if(q.mg(0))r=!0,q=null;else continue}var v=0,x=0;if(null!=y&&null!=q)n.rD(h)&&(f.zn(y),f.zn(q),f.Ga(this.ka,!1),v=f.kk(0),x=f.kk(1),0<v+x&&(this.a.Tp(g,f,0,!0),this.a.Tp(p,f,1,!0)),f.clear());else if(null!=y){var w=new a.b;this.a.w(p,w);if(n.contains(w)){f.zn(y);this.a.Jk(p,d);f.Tw(this.ka,d,!1);v=f.kk(0);
if(0<v)if(this.a.Tp(g,f,0,!0),r){r=-1;for(w=this.a.X(p);-1!=w&&w!=p&&(q=this.et(w,k),r=w,null!=q&&q.mg(0));w=this.a.X(w));for(w=p;-1!=w&&(this.a.bh(w,f.nf),w!=r);w=this.a.X(w));}else this.a.bh(p,f.nf);f.clear()}}else if(null!=q){if(w=new a.b,this.a.w(g,w),h.P(this.ka,this.ka),h.contains(w)){f.zn(q);this.a.Jk(g,d);f.Tw(this.ka,d,!1);x=f.kk(0);if(0<x)if(this.a.Tp(p,f,0,!0),l){r=-1;for(w=this.a.X(g);-1!=w&&w!=g&&(q=this.et(w,k),r=w,null!=q&&q.mg(0));w=this.a.X(w));for(w=g;-1!=w&&(this.a.bh(w,f.nf),w!=
r);w=this.a.X(w));}else this.a.bh(g,f.nf);f.clear()}}else continue;if(0!=v+x){if(0!=v){y=this.a.cc(g);if(null==y){if(!this.a.Oc(g,e))continue;y=e;e.o(n)}else y.o(n);if(y.mg(this.ka))break}b=!0}}}return b};h.prototype.ML=function(){return this.HQ()};h.prototype.HQ=function(){return(new a.aA).GS(this.a,this.ka)};h.prototype.EE=function(){var c=!1,b,e;null==this.zc&&(this.zc=new a.bj);var k=new a.ga(0);k.xb(this.a.pd+1);for(var n=this.a.Gp(),h=n.next();-1!=h;h=n.next())k.add(h);this.a.Mu(k,k.size);k.add(-1);
n=this.a.re();h=this.a.re();this.Ld=new a.hA(this.a,this.ka,!this.hx);this.zc.Hn(this.Ld);var d=new a.ga(0),f=new a.ga(0),g=0;new a.b;var y=this.a.cd;this.a.wb.kc();for(var l=this.a.wb.Ba[0].f,m,p,q=k.get(g++);-1!=q;){p=y.O(q,0);m=l[2*p];p=l[2*p+1];var r=m,v=p;do{var x=y.O(q,2),w=y.O(q,1);-1!=x&&(b=y.O(x,0),e=l[2*b],b=l[2*b+1],0>(v<b?-1:v>b?1:r<e?-1:r>e?1:0)&&(f.add(q),f.add(x)));-1!=w&&(b=y.O(w,0),e=l[2*b],b=l[2*b+1],0>(v<b?-1:v>b?1:r<e?-1:r>e?1:0)&&(f.add(w),f.add(w)));e=this.a.Ra(q,n);-1!=e&&(d.add(e),
this.a.lb(q,n,-1));e=this.a.Ra(q,h);-1!=e&&(d.add(e),this.a.lb(q,h,-1));q=k.get(g++);-1!==q&&(v=y.O(q,0),r=l[2*v],v=l[2*v+1])}while(-1!=q&&r===m&&v===p);r=1==d.size&&2==f.size;e=v=-1;x=0;for(w=d.size;x<w;x++){b=d.get(x);var B=this.zc.ge(b);-1==B||d.Nw(B)||(v=B);b=this.zc.bb(b);-1==b||d.Nw(b)||(e=b);if(-1!=v&&-1!=e)break}this.Ld.XF(p,m);x=0;for(w=d.size;x<w;x++)b=d.get(x),this.zc.kd(b,-1);d.clear(!1);if(!r&&-1!=v&&-1!=e&&this.SK(v,e)){c=!0;this.ei=this.Ld.rl();break}x=0;for(w=f.size;x<w;x+=2){p=f.get(x);
m=f.get(x+1);r?(p=this.zc.vs(v,e,p,!0),r=!1):p=this.zc.addElement(p,-1);if(this.Ld.Zf){this.ei=this.Ld.rl();c=!0;break}-1==this.a.Ra(m,n)?this.a.lb(m,n,p):this.a.lb(m,h,p)}if(c)break;f.cf(0)}this.a.bf(n);this.a.bf(h);return c};h.prototype.SK=function(c,b){this.Ld.compare(this.zc,this.zc.da(c),b);c=this.Ld.Zf;this.Ld.lq();return c};h.Gh=function(c){for(var b=c.$c;-1!=b;b=c.we(b))if(a.T.Kc(c.Lb(b)))return!0;return!1};h.Yk=function(c,b,e,k){if(!h.Gh(c))return!1;b=new h(k);b.a=c;b.ka=e;if(15>c.pd)c=b.LL();
else return b.ML();return c};h.$=function(c,b,e){return h.Yk(c,c.wC(),b,e)};h.DE=function(c,b,e,k,n){if(!h.Gh(b))return!1;var u=new h(n);u.a=b;u.ka=e;u.hx=c;if(u.EE())return null!=k&&k.aq(u.ei),!0;var d=new a.Bg;d.Oy();b.Oe(d);u=new h(n);u.a=b;u.ka=e;u.hx=c;c=u.EE();d.Oy();b.Oe(d);return c?(null!=k&&k.aq(u.ei),!0):!1};return h}();a.Zu=h})(z||(z={}));(function(a){(function(b){b[b.Left=0]="Left";b[b.Right=1]="Right";b[b.Coincident=2]="Coincident";b[b.Undefined=3]="Undefined";b[b.Uncut=4]="Uncut"})(a.ZG||
(a.ZG={}));var h=function(){return function(b,c,a,h,d,f,g,y,l,m,p){this.U=b;this.cu=c;this.Yq=a;this.ag=h;this.Il=m;this.xk=p}}();a.yT=h;var d=function(){function b(b,e){this.jE=b;this.Zh=e}b.prototype.nJ=function(b,e){var c=new a.b;this.Zh.w(b,c);var k=new a.b;this.Zh.w(e,k);c=c.compare(k);if(0!=c)return c;c=this.Zh.Ra(b,this.jE);k=this.Zh.Ra(e,this.jE);return c<k?-1:c==k?0:1};return b}(),c=function(){return function(b,c,a,h,d,f,g,y,l){this.ag=b;this.Yq=c;this.Lx=a;this.sE=h;this.Wh=d;this.xk=f;
this.Il=g;this.tE=y;this.RP=l}}();a.xT=c;var b=function(){function b(){}b.YG=function(e,c,u,d,f,g){if(c.s())e=new h(c,4,-1,-1,NaN,4,-1,-1,NaN,-1,-1,NaN,-1,-1,NaN),f.push(e);else{var k=new a.fd;k.Eb(c);k.Eb(u);a.aj.$(k,d,g,!0);c=0;u=k.re();for(d=k.$c;-1!=d;d=k.we(d))for(g=k.Vb(d);-1!=g;g=k.bc(g))for(var n=k.Cb(g),C=0,G=k.Ha(g);C<G;n=k.X(n),C++)k.lb(n,u,c++);c=b.qM(u,k);b.CI(e,c,k,f)}};b.qM=function(e,c){for(var k=c.pd,n=new a.ga(0),h=c.$c;-1!=h;h=c.we(h))for(var f=c.Vb(h);-1!=f;f=c.bc(f))for(var g=
c.Cb(f),y=0,l=c.Ha(f);y<l;g=c.X(g),y++)n.add(g);var m=new d(e,c);n.xd(0,k,function(b,e){return m.nJ(b,e)});e=[];var p=[],q=c.re(),r=c.re(),h=c.$c,f=c.we(h),l=new a.b,v=new a.b,x=n.get(0),w=c.rd(x),B=c.Vf(w);c.w(x,l);for(var t=1,g=0;t<k-1;){for(var z=!1,y=t;y<k;y++)if(y!=g){var E=n.get(y),D=c.rd(E),F=c.Vf(D);c.w(E,v);if(l.ub(v))B==h&&F==f&&(z=b.SI(q,r,c,e,p,w,x,D,E));else break}if(z||g==t-1){z&&g==t-1&&t--;if(++g==k)break;x=n.get(g);w=c.rd(x);B=c.Vf(w);c.w(x,l)}z||(t=g+1)}k=[];for(h=c.$c;-1!=h;h=c.we(h))for(f=
c.Vb(h);-1!=f;f=c.bc(f))for(n=c.Cb(f),y=0,l=c.Ha(f);y<l;n=c.X(n),y++){g=c.Ra(n,r);if(0<=g)for(;g<p.length&&p[g].ag==n;)k.push(p[g++]);g=c.Ra(n,q);if(0<=g)for(;g<e.length&&e[g].ag==n;)k.push(e[g++])}c.bf(q);c.bf(r);return k};b.SI=function(e,c,a,h,d,f,g,y,l){var k=a.hk(f),n=a.hk(y),u=a.Cb(f),C=a.Cb(y),G=a.Ua(g),J=a.Ua(l),m=!1,p=!1,q=!1,r=!1;g!=u&&(l!=C&&(m=b.VI(e,a,h,f,G,y,J)),l!=n&&(p=b.YI(e,a,h,f,G,y,l)));g!=k&&(l!=C&&(q=b.aJ(c,a,d,f,g,y,J,u)),l!=n&&(r=b.dJ(c,a,d,f,g,y,l,u)));m&&p&&q?(e=h.length-
1,2==d[r?d.length-2:d.length-1].Wh&&(h[e-1]=h[e],--h.length)):m&&p&&r&&2==d[d.length-1].Wh&&(d=h[h.length-1],--h.length,a.Ra(d.ag,e)==h.length&&a.lb(d.ag,e,-1));return m||p||q||r};b.VI=function(b,e,h,d,f,g,y){var k,n;n=new a.yb;var u=new a.yb,C=[0,0],G=[0,0];k=e.cc(f);null==k&&(e.Oc(f,n),k=n);n=e.cc(y);null==n&&(e.Oc(y,u),n=u);k=k.Ga(n,null,C,G,0);2>k&&(d=new c(f,d,C[0],NaN,k,y,g,G[0],NaN),h.push(d),d=e.Ra(f,b),0>d&&e.lb(f,b,h.length-1));return!0};b.YI=function(b,e,h,d,f,g,y){var k,n;n=new a.yb;var u=
new a.yb,C=[0,0],G=[0,0];k=e.cc(f);null==k&&(e.Oc(f,n),k=n);n=e.cc(y);null==n&&(e.Oc(y,u),n=u);k=k.Ga(n,null,C,G,0);return 2>k?(d=new c(f,d,C[0],NaN,k,y,g,G[0],NaN),h.push(d),d=e.Ra(f,b),0>d&&e.lb(f,b,h.length-1),!0):!1};b.aJ=function(b,e,h,d,f,g,y,l){var k,n;n=new a.yb;var u=new a.yb,C=[0,0],G=[0,0];k=e.cc(f);null==k&&(e.Oc(f,n),k=n);n=e.cc(y);null==n&&(e.Oc(y,u),n=u);k=k.Ga(n,null,C,G,0);if(2==k)return d=new c(f,d,C[0],C[1],k,y,g,G[0],G[1]),h.push(d),d=e.Ra(f,b),0>d&&e.lb(f,b,h.length-1),!0;u=!1;
f==l&&(d=new c(f,d,C[0],NaN,k,y,g,G[0],NaN),h.push(d),d=e.Ra(f,b),0>d&&e.lb(f,b,h.length-1),u=!0);return u};b.dJ=function(b,e,h,d,f,g,y,l){var k,n;n=new a.yb;var u=new a.yb,C=[0,0],G=[0,0];k=e.cc(f);null==k&&(e.Oc(f,n),k=n);n=e.cc(y);null==n&&(e.Oc(y,u),n=u);k=k.Ga(n,null,C,G,0);if(2==k)return d=new c(f,d,C[0],C[1],k,y,g,G[0],G[1]),h.push(d),d=e.Ra(f,b),0>d&&e.lb(f,b,h.length-1),!0;u=!1;f==l&&(d=new c(f,d,C[0],NaN,k,y,g,G[0],NaN),h.push(d),d=e.Ra(f,b),0>d&&e.lb(f,b,h.length-1),u=!0);return u};b.CI=
function(e,c,u,d){var k,n=[];n[0]=new a.b;n[1]=new a.b;n[2]=new a.b;n[3]=new a.b;var f=new a.b,g=new a.b,C=new a.b,y=new a.b,l=null;null!=d&&(l=new a.Ag,l.mq());var m,p=0,q=null,r=new a.yb;new a.yb;for(var v=u.Vb(u.$c);-1!=v;v=u.bc(v)){var x,w=4,B=-1,t,z,E,D=-1,F,I,P,K,H=-1,A=-1,M=NaN;x=!0;var L=!1,O=!0,Q=!0,T=!0,N=0;E=v;F=0;for(var R=u.Cb(v),Y=u.Ha(v),U=0;U<Y;R=u.X(R),U++){m=u.cc(R);if(null==m){if(!u.Oc(R,r))continue;m=r}-1==D&&(D=R);for(var S=0;p<c.length&&R==c[p].ag;){B=c[p].Yq;t=c[p].ag;z=c[p].Lx;
I=c[p].Il;P=c[p].xk;K=c[p].tE;if(2==c[p].Wh){if(L||(E=B,D=t,F=z,H=I,A=P,M=K,w=2,null!=d?q=new a.Xa:N=0,T=!1,Q=!0),z=c[p].sE,K=c[p].RP,null!=d?(m.Bi(S,c[p].sE,l),q.Bc(l.get(),Q)):N++,S=z,L=!0,Q=x=!1,p+1==c.length||2!=c[p+1].Wh||c[p+1].ag==t&&c[p+1].Lx!=S)null!=d?(k=new h(q,2,B,t,z,w,E,D,F,I,P,K,H,A,M),d.push(k)):null.add(N),E=B,D=t,F=z,H=I,A=P,M=K,w=2,L=x=!1,Q=T=!0}else{var X=u.X(t);if(p<c.length-1&&c[p+1].ag==X&&c[p+1].xk==P&&2==c[p+1].Wh)z!=S&&(T&&(null!=d?q=new a.Xa:N=0),x=0<p&&c[p-1].Yq==B?1==
w?0:0==w?1:3:3,null!=d?(m.Bi(S,z,l),q.Bc(l.get(),Q),k=new h(q,x,B,t,z,w,E,D,F,I,P,K,H,A,M),d.push(k)):(N++,null.add(N)),S=z,E=B,D=t,F=z,H=I,A=P,M=K,w=x,x=O=!1,Q=T=!0);else if(!b.KK(e,u,c,p,f,g)){b.KG(u,c,p,v,R,C,y);var W=!1,X=!1;k=!0;if(!(f.ub(C)||g.ub(C)||f.ub(y)||g.ub(y))){n[0].J(f);n[1].J(g);n[2].J(C);n[3].J(y);n.sort(a.b.cq);var ca=n[0],da=n[1],ea=n[2],fa=n[3];ca.ub(f)?da.ub(g)?e?(X=W=!0,k=!1):W=!1:fa.ub(g)?e?k=X=W=!0:W=!1:(W=!0,k=da.ub(C)):da.ub(f)?ea.ub(g)?e?(X=W=!0,k=!1):W=!1:ca.ub(g)?e?k=
X=W=!0:W=!1:(W=!0,k=ea.ub(C)):ea.ub(f)?fa.ub(g)?e?(X=W=!0,k=!1):W=!1:da.ub(g)?e?k=X=W=!0:W=!1:(W=!0,k=fa.ub(C)):ca.ub(g)?e?(X=W=!0,k=!1):W=!1:ea.ub(g)?e?k=X=W=!0:W=!1:(W=!0,k=ca.ub(C))}if(W){W=R==t;if(z!=S||W&&0==S)T&&(null!=d?q=new a.Xa:N=0),null!=d?(m.Bi(S,z,l),q.Bc(l.get(),Q)):N++;if(k)if(1!=w){if(z!=S||W&&0==S)null!=d?(k=new h(q,1,B,t,z,w,E,D,F,I,P,K,H,A,M),d.push(k)):null.add(N);if(!X)w=1;else if(p==c.length-2||c[p+2].Yq!=B)w=0}else{if(z!=S||W&&0==S)null!=d?(k=new h(q,3,B,t,z,w,E,D,F,I,P,K,H,
A,M),d.push(k)):null.add(N);w=1}else if(0!=w){if(z!=S||W&&0==S)null!=d?(k=new h(q,0,B,t,z,w,E,D,F,I,P,K,H,A,M),d.push(k)):null.add(N);if(!X)w=0;else if(p==c.length-2||c[p+2].Yq!=B)w=1}else{if(z!=S||W&&0==S)null!=d?(k=new h(q,3,B,t,z,w,E,D,F,I,P,K,H,A,M),d.push(k)):null.add(N);w=0}if(z!=S||W&&0==S)S=z,E=B,D=t,F=z,H=I,A=P,M=K,x=O=!1,Q=T=!0}}}p++}1!=S&&(T&&(null!=d?q=new a.Xa:N=0),null!=d?(m.Bi(S,1,l),q.Bc(l.get(),Q)):N++,Q=T=!1,O=!0)}O&&(z=1,t=u.hk(v),t=u.Ua(t),P=I=-1,K=NaN,x?null!=d?(k=new h(q,4,B,
t,z,w,E,D,F,I,P,K,H,A,M),d.push(k)):null.add(N):(x=1==w?0:0==w?1:3,null!=d?(k=new h(q,x,B,t,z,w,E,D,F,I,P,K,H,A,M),d.push(k)):null.add(N)))}};b.KK=function(e,c,h,d,f,g){var k=h[d].tE;if(1==k)return b.GJ(e,c,h,d,f,g);if(0==k)return b.dK(e,c,h,d,f,g);throw a.g.wa();};b.GJ=function(b,e,c,h,d,f){var k=new a.yb,n=c[h].ag,u=c[h].Il,g=c[h].xk,C=-1,G=-1,y=-1,l=-1;if(!b&&0<h)var J=c[h-1],C=J.ag,G=J.Il,y=J.xk,l=J.Wh;var m=-1,p=-1,q=-1,r=-1;h<c.length-1&&(J=c[h+1],m=J.ag,p=J.Il,q=J.xk,r=J.Wh);var v=e.X(n),J=
e.X(g);if(!b)return 0<h&&C==n&&G==u&&y==J&&2==l||h<c.length-1&&m==v&&p==u&&q==J&&2==r?(b=e.cc(g),null==b&&(e.Oc(g,k),b=k),f.J(b.Pf(1)),d.qr(f),f.normalize(),d.normalize(),!1):h<c.length-1&&m==n&&p==u&&q==J?(b=e.cc(g),null==b&&(e.Oc(g,k),b=k),d.J(b.Pf(1)),b=e.cc(J),null==b&&(e.Oc(J,k),b=k),f.J(b.Pf(0)),d.Bp(),f.normalize(),d.normalize(),!1):!0;if(h==c.length-1||m!=n||p!=u||q!=J||2==r)return b=e.cc(g),null==b&&(e.Oc(g,k),b=k),f.J(b.Pf(1)),d.qr(f),f.normalize(),d.normalize(),!1;b=e.cc(g);null==b&&(e.Oc(g,
k),b=k);d.J(b.Pf(1));b=e.cc(J);null==b&&(e.Oc(J,k),b=k);f.J(b.Pf(0));d.Bp();f.normalize();d.normalize();return!1};b.dK=function(b,e,c,h,d,f){var k=new a.yb,n=c[h].ag,u=c[h].Il,g=c[h].xk,C=-1,G=-1,y=-1,l=-1;if(!b&&h<c.length-1)var J=c[h+1],C=J.ag,G=J.Il,y=J.xk,l=J.Wh;var m=-1,p=-1,q=-1,J=-1;0<h&&(J=c[h-1],m=J.ag,p=J.Il,q=J.xk,J=J.Wh);var r=e.X(n),v=e.Ua(g);return b?0==h||m!=n||p!=u||q!=v||2==J?(b=e.cc(g),null==b&&(e.Oc(g,k),b=k),f.J(b.Pf(0)),d.qr(f),f.normalize(),d.normalize(),!1):!0:0<h&&m==n&&p==
u&&q==v&&2==J||h<c.length-1&&C==r&&G==u&&y==v&&2==l?(b=e.cc(g),null==b&&(e.Oc(g,k),b=k),f.J(b.Pf(0)),d.qr(f),f.normalize(),d.normalize(),!1):!0};b.KG=function(b,e,c,h,d,f,g){var k=new a.yb,n=b.cc(d);null==n&&(b.Oc(d,k),n=k);c=e[c];e=c.ag;c=c.Lx;d=b.X(e);if(1==c)f.J(n.Pf(1)),-1!=d&&d!=b.hk(h)?(n=b.cc(d),null==n&&(b.Oc(d,k),n=k),g.J(n.Pf(0)),n=b.cc(e),null==n&&b.Oc(e,k)):g.J(f),f.Bp(),g.normalize(),f.normalize();else if(0==c)g.J(n.Pf(c)),f.qr(g),g.normalize(),f.normalize();else throw a.g.wa();};return b}();
a.$G=b})(z||(z={}));(function(a){(function(b){b[b.Linear=0]="Linear";b[b.Angular=1]="Angular";b[b.Area=2]="Area"})(a.RI||(a.RI={}));var h=function(){function b(b,e,c){this.Nc=e;this.Dj=c;this.wx=b}b.PC=function(e){return 0!==e.Nc?null:-1===e.wx?new b(-1,2,e.Dj*e.Dj):b.Qd(k[e.wx])};b.Qd=function(b){b=e[b];return void 0===b?null:b};b.EL=function(e,c,a){var k=null;if(void 0!==a&&null!==a)try{"EPSG"===a.values[0]&&(k=b.Qd(parseInt(a.values[1])))}catch(Z){}null===k&&(k=new b(-1,e,c));return k};b.prototype.Qc=
function(){return this.wx};b.prototype.rC=function(b){if(b.Nc!=this.Nc)throw a.g.xa();return this.Dj/b.Dj};b.ih=function(b,e,c){return e.rC(c)*b};b.OB=function(b,e,c,a,k){c=c.rC(a);for(a=0;a<e;a++)k[a]=b[a]*c};return b}();a.Tb=h;for(var d=[109402,4046.8564224,109403,4046.87260987425,109463,100,109401,1E4,109461,225E8,109460,25E8,109451,1E-4,109444,404.68564224000005,109424,404.6849341289498,109428,404.68493792602754,109416,404.67838076760535,109420,404.68423895571647,109448,404.683871963536,109411,
404.6872609874253,109450,.01,109408,3.34450944,109405,.09290304,109430,.09290354800069446,109423,.0929028774400711,109427,.09290287831176021,109441,.09290349665192114,109407,.09290137299531805,109440,.09290286332673177,109431,.09290274144751023,109432,.09290207073852812,109433,.09290279616016,109434,.09290273520025,109419,.09290271785025629,109447,.0929026336004445,109406,.09290341161327487,109453,6.4516E-4,109454,6.451625806477421E-4,109414,1E6,109445,.04046856422400001,109425,.04046849341289498,
109429,.04046849379260275,109417,.04046783807676053,109421,.04046842389557164,109449,.0404683871963536,109412,.04046872609874253,109404,1,109410,1.000027193184865,109413,2589998.4703195216,109452,1E-6,109409,3429904,109458,3434290.937856,109457,3434528.1495040003,109464,1.244521604938272E-7,109455,25.292852640000003,109456,25.29295381171408,109459,2.89612324,109439,2589988.110336,109462,.7168473118308245,109442,.83612736,109422,.83612589696064,109426,.836125904805842,109415,.8361123569578626,109435,
.836124673027592,109436,.836118636646753,109437,.8361251654414399,109438,.83612461680225,109418,.8361244606523066,109446,.8361237024040001,109443,.8361307045194736],c=[9103,2.908882086657216E-4,9104,4.84813681109536E-6,9102,.0174532925199433,9106,.01570796326794897,9105,.01570796326794897,9109,1E-6,9114,9.817477042468104E-4,1031,4.84813681109536E-9,9112,1.570796326794897E-4,9101,1,9113,1.570796326794897E-6],b=[109031,15E4,109461,109030,5E4,109460,1033,.01,109451,9097,20.1168,109444,9052,20.1167824,
109424,9062,20.116782494375872,109428,9038,20.1166195164,109416,9042,20.116765121552632,109420,9301,20.116756,109448,9033,20.11684023368047,109411,109005,.1,109450,9014,1.8288,109408,9002,.3048,109405,9070,.3048008333333334,109430,9051,.3047997333333333,109423,9061,.3047997347632708,109427,9095,.3048007491,109441,9005,.3047972654,109407,9094,.3047997101815088,109440,9080,.3047995102481469,109431,9081,.30479841,109432,9082,.3047996,109433,9083,.3047995,109434,9041,.304799471538676,109419,9300,.3047993333333334,
109447,9003,.3048006096012192,109406,109008,.0254,109453,109009,.0254000508001016,109454,9036,1E3,109414,9098,.201168,109445,9053,.201167824,109425,9063,.2011678249437587,109429,9039,.201166195164,109417,9043,.2011676512155263,109421,9302,.20116756,109449,9034,.2011684023368047,109412,9001,1,109404,9031,1.0000135965,109410,9035,1609.3472186944375,109413,1025,.001,109452,9030,1852,109409,109013,1853.184,109458,109012,1853.248,109457,109016,3.527777777777778E-4,109464,109010,5.0292,109455,109011,5.029210058420118,
109456,109014,1.7018,109459,9093,1609.344,109439,109015,.8466683600033867,109462,9096,.9144,109442,9050,.9143992,109422,9060,.9143992042898124,109426,9037,.9143917962000001,109415,9084,.9143985307444408,109435,9085,.91439523,109436,9086,.9143988,109437,9087,.9143985,109438,9040,.9143984146160287,109418,9099,.914398,109446,109002,.9144018288036576,109443,109001,.9144,109442,109003,20.1168,109444,109004,.201168,109445,109006,.01,109451,109007,.001,109452],e=[],k=[],n=0;n<d.length;n+=2)e[d[n]]=new h(d[n],
2,d[n+1]);d=null;for(n=0;n<c.length;n+=2)e[c[n]]=new h(c[n],1,c[n+1]);c=null;for(n=0;n<b.length;n+=3)e[b[n]]=new h(b[n],0,b[n+1]),k[b[n]]=b[n+2];b=null})(z||(z={}));(function(a){var h=function(){function a(){}a.prototype.set=function(c,b){void 0!==b?(this.Lf=c,this.Og=b):"number"===typeof c?(this.Lf=c,this.Og=0):(this.Lf=c.Lf,this.Og=c.Og)};a.prototype.value=function(){return this.Lf};a.prototype.sub=function(c){if("number"===typeof c){var b=this.Lf-c;c=this.Og+2.220446049250313E-16*Math.abs(b)}else b=
this.Lf-c.Lf,c=this.Og+c.Og+2.220446049250313E-16*Math.abs(b);this.Lf=b;this.Og=c};a.prototype.Ap=function(c){var b=this.Lf*c.Lf;this.Og=this.Og*Math.abs(c.Lf)+c.Og*Math.abs(this.Lf)+this.Og*c.Og+2.220446049250313E-16*Math.abs(b);this.Lf=b};a.prototype.eP=function(){return Math.abs(this.Lf)<=this.Og};a.prototype.Dq=function(){return this.eP()&&0!=this.Og};return a}();a.$k=h})(z||(z={}));var M=new z.b,K=new z.b,L=new z.b,N=new z.b,Q=new z.b;(function(a){var h;(function(c){c[c.closedPath=1]="closedPath";
c[c.exteriorPath=2]="exteriorPath";c[c.ringAreaValid=4]="ringAreaValid"})(h||(h={}));var d=function(){function c(b,e,c,a,h,d,f){void 0!==e?(this.ab=b,this.mj=e,this.$j=c,this.zh=a,this.ua=d,this.mx=f,this.Pt=h):(this.ab=b.ab,this.mj=b.mj,this.$j=b.$j,this.zh=b.zh,this.ua=b.ua,this.mx=b.mx,this.Pt=b.Pt);this.JD=!0}c.prototype.next=function(){return this.JD?(this.JD=!1,this.zh):-1!=this.zh?(this.zh=this.ab.X(this.zh),this.ua++,-1!=this.zh&&this.zh!=this.Pt?this.zh:this.cQ()):-1};c.prototype.cQ=function(){this.$j=
this.ab.bc(this.$j);for(this.ua=0;-1!=this.mj;){for(;-1!=this.$j;this.$j=this.ab.bc(this.$j))if(this.Pt=this.zh=this.ab.Cb(this.$j),-1!=this.zh)return this.zh;this.mj=this.ab.we(this.mj);if(-1==this.mj)break;if(!this.mx||a.T.Kc(this.ab.Lb(this.mj)))this.$j=this.ab.Vb(this.mj)}return-1};c.UL=function(b,e,a,n,h,d,f){return new c(b,e,a,n,h,d,f)};return c}();a.CT=d;h=function(){function c(){this.Zm=this.Al=this.Ej=this.Mc=this.Jj=this.jn=this.fi=this.Rc=this.sh=this.wg=this.Ge=this.wp=this.zp=this.wb=
this.Hk=null;this.Xt=this.$c=-1;this.pd=0;this.kx=!1;this.wp=this.zp=this.wb=null}c.prototype.Fi=function(b){return null!=this.Ge?this.Ge[b]:null};c.prototype.Fh=function(b,e){if(null==this.Ge){if(null==e)return;this.Ge=[];for(var c=0,a=this.wb.F();c<a;c++)this.Ge.push(null)}this.Ge[b]=e};c.prototype.Mn=function(b,e){this.Rc.L(b,1,e)};c.prototype.Ln=function(b,e){this.Rc.L(b,2,e)};c.prototype.Iy=function(b,e){this.Rc.L(b,6,e)};c.prototype.Ho=function(b){return this.Rc.O(b,6)};c.prototype.Hu=function(b,
e){this.Rc.L(b,7,e)};c.prototype.bt=function(b){return this.Rc.O(b,0)};c.prototype.MF=function(b,e){this.Mc.L(b,1,e)};c.prototype.QF=function(b,e){this.Mc.L(b,0,e)};c.prototype.xC=function(b){return this.Mc.O(b,7)};c.prototype.Jn=function(b,e){this.Mc.L(b,3,e)};c.prototype.Kn=function(b,e){this.Mc.L(b,4,e)};c.prototype.jQ=function(b){null==this.Mc&&(this.Mc=new a.Fc(8));var e=this.Mc.be();this.Mc.L(e,2,b);this.Mc.L(e,5,0);this.Mc.L(e,6,0);this.Mc.L(e,7,e);return e};c.prototype.bN=function(b){this.Mc.Jc(b)};
c.prototype.lQ=function(b){null==this.Rc&&(this.Rc=new a.Fc(8),this.cd=new a.Fc(5),this.fi=new a.qd(0),this.jn=new a.qd(0));var e=this.Rc.be();this.Rc.L(e,0,e);this.Rc.L(e,3,0);this.Rc.L(e,6,0);this.Hu(e,b);e>=this.fi.size&&(b=16>e?16:a.I.truncate(3*e/2),this.fi.resize(b),this.jn.resize(b));this.fi.set(e,0);this.jn.set(e,0);return e};c.prototype.iC=function(b){this.Rc.Jc(b)};c.prototype.dw=function(b){this.cd.Jc(b);this.pd--};c.prototype.mQ=function(b){null==this.Rc&&(this.Rc=new a.Fc(8),this.cd=
new a.Fc(5),this.fi=new a.qd(0),this.jn=new a.qd(0));var e=this.cd.be(),c=0<=b?b:e;this.cd.L(e,0,c);if(0>b){if(c>=this.wb.F()){b=16>c?16:a.I.truncate(3*c/2);this.wb.resize(b);if(null!=this.Ge)for(var n=0;n<b;n++)this.Ge.push(null);null!=this.wg&&this.wg.resize(b);this.zp=this.wb.mc(0)}this.wb.ic(c,-1E38,-1E38);null!=this.Ge&&(this.Ge[c]=null);null!=this.wg&&this.wg.write(c,1)}this.cd.L(e,4,2*c);this.pd++;return e};c.prototype.vl=function(b,e,c){var a=-1!=e?this.Ua(e):this.hk(b),k=-1!=a?this.X(a):
-1,h=this.mQ(null==c?this.pd:-1),d=this.gb(h);null!=c&&this.wb.Iu(d,c);this.im(h,b);this.Sc(h,k);this.Tc(h,a);-1!=k&&this.Tc(k,h);-1!=a&&this.Sc(a,h);c=this.vc(b);a=this.Cb(b);-1==e&&this.Wi(b,h);e==a&&this.Dh(b,h);c&&-1==k&&(this.Sc(h,h),this.Tc(h,h));this.hm(b,this.Ha(b)+1);b=this.Vf(b);this.Pk(b,this.F(b)+1);return h};c.prototype.Fo=function(){null==this.Zm&&(this.Zm=new a.Va(this.wb.description));return this.Zm};c.prototype.Pp=function(b,e){this.Mc.L(b,2,this.Mc.O(b,2)&-134217729||(1==e?134217728:
0))};c.prototype.Cm=function(b){return 0!=(this.Mc.O(b,2)&134217728)?1:0};c.prototype.MJ=function(b){var e=this.jg(b.D(),b.description);1736==b.D()&&this.Pp(e,b.Cm());this.WA(e,b);return e};c.prototype.NJ=function(b){var e=this.jg(b.D(),b.description);this.XA(e,b);return e};c.prototype.TQ=function(b,e){null==this.Rc&&(this.Rc=new a.Fc(8),this.cd=new a.Fc(5),this.fi=new a.qd(0),this.jn=new a.qd(0));this.Rc.de(this.Rc.Xc+b);this.cd.de(this.cd.Xc+e);this.fi.xb(this.fi.size+b);this.jn.xb(this.jn.size+
b)};c.prototype.WA=function(b,e){this.TQ(e.ea(),e.F());this.Hk.Pd(e,0,e.F());this.zp=this.wb.mc(0);for(var c=null!=this.Ge&&null!=e.Fe,n=0,h=e.ea();n<h;n++)if(!(2>e.Ha(n))){var d=this.Cf(b,-1);this.Gn(d,e.vc(n));for(var f=e.Ea(n),g=e.Dc(n);f<g;f++){var y=this.vl(d,-1,null);if(c)if(y=this.gb(y),0!=(e.NC(f)&1))this.Fh(y,null);else{var l=new a.Ag;e.cc(f,l,!0);this.Fh(y,l.get())}}}};c.prototype.XA=function(b,e){this.Hk.Pd(e,0,e.F());this.zp=this.wb.mc(0);b=this.Cf(b,-1);var c=0;for(e=e.F();c<e;c++)this.vl(b,
-1,null)};c.prototype.DS=function(b,e,c){var k=this.X(b);if(-1==k)throw a.g.wa();for(var h=this.Fo(),d=this.rd(b),f=0,g=e.kk(c);f<g;f++){var y=this.gb(b),l=this.X(b),m=e.Io(c,f);0==f&&(m.En(h),this.bh(b,h));322==m.D()?this.Fh(y,null):this.Fh(y,a.T.Yj(m));m.Bn(h);f<g-1?b=this.vl(d,l,h):this.bh(k,h)}};c.prototype.CS=function(b,e,c){var k=this.X(b);if(-1==k)throw a.g.wa();for(var h=this.Fo(),d=this.rd(b),f=0,g=e.kk(c);f<g;f++){var y=this.gb(b),l=this.X(b),m=e.Io(c,g-f-1);0==f&&(m.Bn(h),this.bh(b,h));
322==m.D()?this.Fh(y,null):this.Fh(y,a.T.Yj(m));m.En(h);f<g-1?b=this.vl(d,l,h):this.bh(k,h)}};c.prototype.wC=function(){var b=new a.i;b.Ja();for(var e=this.Gp(),c=new a.b,n=!0,h=e.next();-1!=h;h=e.next())this.w(h,c),n?b.Db(c.x,c.y):b.Oj(c.x,c.y),n=!1;return b};c.prototype.Eb=function(b){var e=b.D();if(a.T.Kc(e))return this.MJ(b);if(550==e)return this.NJ(b);throw a.g.wa();};c.prototype.YJ=function(b,e){var c=e.D();if(a.T.Kc(c))this.WA(b,e);else if(550==c)this.XA(b,e);else throw a.g.wa();};c.prototype.QJ=
function(b,e){var c=this.jg(1736,b.description);if(2>b.Ha(e))return c;this.Hk.Pd(b,b.Ea(e),b.Dc(e));this.zp=this.wb.mc(0);var n=this.Cf(c,-1);this.Gn(n,b.vc(e)||!0);var h=null!=this.Ge&&null!=b.Fe,d=b.Ea(e);for(e=b.Dc(e);d<e;d++){var f=this.vl(n,-1,null);if(h)if(f=this.gb(f),0!=(b.NC(d)&1))this.Fh(f,null);else{var g=new a.Ag;b.cc(d,g,!0);this.Fh(f,g.get())}}return c};c.prototype.hf=function(b){var e=this.Lb(b),c=a.sH.jg(e,this.Hk.description),n=this.F(b);if(0==n)return c;if(a.T.Kc(e)){for(var e=this.ea(b),
h=a.Ac.Dg(e+1),d=a.Ac.to(e+1,0),f=c.description,g=0,y=f.Aa;g<y;g++){for(var l=f.Hd(g),m=a.pa.Wa(l),p=a.Ac.Tv(l,n),q=this.wb.mc(l),r=0,v=0,x=0,w=this.Vb(b);-1!=w;w=this.bc(w)){var t=0;this.vc(w)&&(t|=1);this.VO(w)&&(t|=4);0!=t&&d.xy(v,t);var B=this.Ha(w);h.write(v++,x);x+=B;if(0==l)for(var B=q,z=p,E=new a.b,t=this.Cb(w);r<x;t=this.X(t),r++){var D=this.gb(t);B.ec(2*D,E);z.Rn(2*r,E)}else for(t=this.Cb(w);r<x;t=this.X(t),r++)for(D=this.gb(t),z=0;z<m;z++)E=q.Bh(D*m+z),p.Uk(r*m+z,E)}c.bm(l,p);h.write(e,
n)}c.NF(d);c.OF(h);c.ce(16777215)}else if(550==e){f=c.description;c.resize(n);g=0;for(y=f.Aa;g<y;g++){l=f.Hd(g);m=a.pa.Wa(l);p=c.mc(l);q=this.wb.mc(l);r=0;w=this.Vb(b);B=this.Ha(w);for(t=this.Cb(w);r<B;t=this.X(t),r++)for(D=this.gb(t),z=0;z<m;z++)E=q.Bh(D*m+z),p.Uk(r*m+z,E);c.bm(l,p)}c.ce(16777215)}return c};c.prototype.sy=function(b){for(var e=this.Vb(b);-1!=e;e=this.Cr(e));var e=this.aO(b),c=this.we(b);-1!=e?this.MF(e,c):this.$c=c;-1!=c?this.QF(c,e):this.Xt=e;this.bN(b)};c.prototype.jg=function(b,
e){return void 0===e?this.QB(b,a.Od.Tf()):this.QB(b,e)};c.prototype.QB=function(b,e){b=this.jQ(b);null==this.wb?this.wb=this.Hk=new a.pe(e):this.Hk.Ik(e);this.wp=this.Hk.description;this.kx=1<this.wp.Aa;-1==this.$c?this.$c=b:(this.QF(b,this.Xt),this.MF(this.Xt,b));return this.Xt=b};c.prototype.we=function(b){return this.Mc.O(b,1)};c.prototype.aO=function(b){return this.Mc.O(b,0)};c.prototype.Lb=function(b){return this.Mc.O(b,2)&2147483647};c.prototype.EF=function(b,e,c){e=this.Ej[e];b=this.xC(b);
b>=e.size&&e.resize(Math.max(a.I.truncate(1.25*b),16),-1);e.write(b,c)};c.prototype.yC=function(b,e){b=this.xC(b);e=this.Ej[e];return b<e.size?e.read(b):-1};c.prototype.RB=function(){null==this.Ej&&(this.Ej=[]);for(var b=0;b<this.Ej.length;b++)if(null==this.Ej[b])return this.Ej[b]=a.Ac.Dg(0),b;this.Ej.push(a.Ac.Dg(0));return this.Ej.length-1};c.prototype.tR=function(b){this.Ej[b]=null};c.prototype.Vb=function(b){return this.Mc.O(b,3)};c.prototype.Ys=function(b){return this.Mc.O(b,4)};c.prototype.F=
function(b){return this.Mc.O(b,5)};c.prototype.ea=function(b){return this.Mc.O(b,6)};c.prototype.xo=function(b,e,c){for(var k=0,h=this.$c;-1!=h;h=this.we(h)){var d=this.Lb(h);if(a.T.Kc(d)&&(!c||1736==d))for(var d=1736==this.Lb(h),f=this.Vb(h);-1!=f;){for(var g=0,y=this.Cb(f);g<a.I.truncate(this.Ha(f)/2);){var l=this.X(y);if(-1==l)break;var m=this.gb(y),p=this.Fi(m);null!=p?m=p.$b():(p=this.gb(l),m=this.wb.mv(m,p));m<=b?(0==m?0==k&&(k=-1):k=1,l!=this.hk(f)&&(this.Zy(l,y),this.vf(l,!0))):y=this.X(y);
g++}g=this.Cb(f);for(y=this.vc(f)?g:this.hk(f);0<this.Ha(f);)if(l=this.Ua(y),-1!=l){var q=this.gb(l),p=this.Fi(q);null!=p?m=p.$b():(m=this.gb(y),m=this.wb.mv(m,q));if(m<=b)0==m?0==k&&(k=-1):k=1,this.Zy(l,y),this.vf(l,!1),g==l&&(g=this.Cb(f));else if(y=this.Ua(y),y==g)break}else{this.vf(y,!0);0==k&&(k=-1);break}y=this.Ha(f);e&&(d?3>y:2>y)?(f=this.Cr(f),k=0<y?1:0==k?-1:k):f=this.bc(f)}}return k};c.prototype.Zy=function(b,e){var c=this.gb(b),a=this.gb(e);null!=this.wg&&(c=this.wg.read(c),this.wg.write(a,
c));if(null!=this.sh)for(a=0,c=this.sh.length;a<c;a++)if(null!=this.sh[a]){var h=this.Ra(b,a);-1!=h&&this.lb(e,a,h)}};c.prototype.Mr=function(b,e,c){var k=0,h=this.X(b);if(-1==h)throw a.g.wa();for(var d=this.gb(b),f=this.gb(h),g=this.Fi(d),y=null==g?this.wb.mv(d,f):g.$b(),l=0;l<c;l++){var m=e[l];if(0<m&&1>m){var p=m;null!=g&&(p=0<y?g.rA(m)/y:0);this.wb.vJ(d,f,p,this.Fo());var q=this.vl(this.rd(b),h,this.Fo());k++;if(null!=g){var r=g.xm(0,m),p=this.gb(this.Ua(q));this.Fh(p,r);this.Yi(q,r.oc());if(l==
c-1||1==e[l+1])m=g.xm(m,1),this.Fh(p,m)}}}return k};c.prototype.bh=function(b,e){var c=this.gb(b);this.wb.Iu(c,e);c=this.Fi(c);null!=c&&c.setStart(e);b=this.Ua(b);-1!=b&&(b=this.gb(b),null!=this.Fi(b)&&c.setEnd(e))};c.prototype.Jk=function(b,e){b=this.gb(b);this.wb.Sd(b,e)};c.prototype.Yi=function(b,e){this.ic(b,e.x,e.y)};c.prototype.ic=function(b,e,c){var a=this.gb(b);this.wb.ic(a,e,c);a=this.Fi(a);null!=a&&a.Ny(e,c);b=this.Ua(b);-1!=b&&(b=this.gb(b),null!=this.Fi(b)&&a.Ok(e,c))};c.prototype.w=function(b,
e){this.wb.w(this.cd.O(b,0),e)};c.prototype.uc=function(b,e){this.wb.Ba[0].ec(2*this.cd.O(b,0),e)};c.prototype.Fa=function(b){var e=new a.b;this.wb.w(this.cd.O(b,0),e);return e};c.prototype.SC=function(b,e){this.zp.ec(2*b,e)};c.prototype.ld=function(b,e,c){return this.wb.ld(b,this.gb(e),c)};c.prototype.setAttribute=function(b,e,c,a){this.wb.setAttribute(b,this.gb(e),c,a)};c.prototype.gb=function(b){return this.cd.O(b,0)};c.prototype.mk=function(b){var e=new a.b;this.w(b,e);return e.y};c.prototype.Cq=
function(b,e){b=this.gb(b);e=this.gb(e);var c=this.wb.Ba[0].f;return c[2*b]===c[2*e]&&c[2*b+1]===c[2*e+1]};c.prototype.pt=function(b,e){b=this.gb(b);var c=this.wb.Ba[0].f;return c[2*b]===e.x&&c[2*b+1]===e.y};c.prototype.pS=function(b,e){1>e&&(e=1);if(null==this.wg){if(1==e)return;this.wg=a.Ac.kl(this.wb.F(),1)}b=this.gb(b);b>=this.wg.size&&this.wg.resize(b+1,1);this.wg.write(b,e)};c.prototype.RC=function(b){b=this.gb(b);return null==this.wg||b>=this.wg.size?1:this.wg.read(b)};c.prototype.lb=function(b,
e,c){e=this.sh[e];b=this.gb(b);e.size<this.wb.F()&&e.resize(this.wb.F(),-1);e.write(b,c)};c.prototype.Ra=function(b,e){b=this.gb(b);e=this.sh[e];return b<e.size?e.read(b):-1};c.prototype.re=function(){null==this.sh&&(this.sh=[]);for(var b=0;b<this.sh.length;b++)if(null==this.sh[b])return this.sh[b]=a.Ac.Dg(0,-1),b;this.sh.push(a.Ac.Dg(0,-1));return this.sh.length-1};c.prototype.bf=function(b){this.sh[b]=null};c.prototype.cc=function(b){return null!=this.Ge?(b=this.gb(b),this.Ge[b]):null};c.prototype.Oc=
function(b,e){var c=this.cd.O(b,2);if(-1==c)return!1;if(this.kx){var n=new a.Va;this.Jk(b,n);e.setStart(n);this.Jk(c,n);e.setEnd(n)}else this.wb.uc(this.cd.O(b,0),M),e.gl(0,M),this.wb.uc(this.cd.O(c,0),M),e.gl(1,M);return!0};c.prototype.gR=function(b,e,c){if(this.kx){var k=new a.Va;this.Jk(b,k);c.setStart(k);this.Jk(e,k);c.setEnd(k)}else this.wb.uc(b,M),c.gl(0,M),this.wb.uc(e,M),c.gl(1,M)};c.prototype.Cf=function(b,e){var c;if(-1!=e){if(b!=this.Vf(e))throw a.g.wa();c=this.wq(e)}else c=this.Ys(b);
var n=this.lQ(b);-1!=e&&this.Mn(e,n);this.Ln(n,e);this.Mn(n,c);-1!=c?this.Ln(c,n):this.Jn(b,n);-1==e&&this.Kn(b,n);this.gm(b,this.ea(b)+1);return n};c.prototype.aD=function(b,e,c,a){b=this.Cf(b,-1);for(var k=0,n=e,h=!1;n==c&&(h=!0),this.im(n,b),k++,n=this.X(n),n!=e;);this.Gn(b,!0);this.hm(b,k);h&&(e=c);this.Dh(b,e);this.Wi(b,this.Ua(e));this.Jr(b,!1);null!=a&&(a[0]=h);return b};c.prototype.Cr=function(b){var e=this.wq(b),c=this.bc(b),a=this.Vf(b);-1!=e?this.Ln(e,c):this.Jn(a,c);-1!=c?this.Mn(c,e):
this.Kn(a,e);this.bL(b);this.gm(a,this.ea(a)-1);this.iC(b);return c};c.prototype.bL=function(b){var e=this.Cb(b);if(-1!=e){for(var c=0,a=this.Ha(b);c<a;c++){var h=e,e=this.X(e);this.dw(h)}e=this.Vf(b);this.Pk(e,this.F(e)-this.Ha(b))}this.hm(b,0)};c.prototype.bc=function(b){return this.Rc.O(b,2)};c.prototype.wq=function(b){return this.Rc.O(b,1)};c.prototype.Ha=function(b){return this.Rc.O(b,3)};c.prototype.vc=function(b){return 0!=(this.Ho(b)&1)};c.prototype.Gn=function(b,e){if(this.vc(b)!=e){if(0<
this.Ha(b)){var c=this.Cb(b),a=this.hk(b);e?(this.Sc(a,c),this.Tc(c,a)):(this.Sc(a,-1),this.Tc(c,-1));c=this.gb(a);this.Fh(c,null)}this.Iy(b,(this.Ho(b)|1)-1|(e?1:0))}};c.prototype.Vf=function(b){return this.Rc.O(b,7)};c.prototype.VO=function(b){return 0!=(this.Ho(b)&2)};c.prototype.Dy=function(b,e){this.Iy(b,(this.Ho(b)|2)-2|(e?2:0))};c.prototype.Gw=function(b){if(this.bP(b))return this.fi.get(this.bt(b));var e=new a.yb,c=this.Cb(b);if(-1==c)return 0;var n=new a.b;this.w(c,n);for(var h=0,d=0,f=this.Ha(b);d<
f;d++,c=this.X(c)){var g=this.cc(c);if(null==g){if(!this.Oc(c,e))continue;g=e}h+=g.kv(n.x,n.y)}this.Jr(b,!0);this.fi.set(this.bt(b),h);return h};c.prototype.Rp=function(b,e,c){e=this.Jj[e];b=this.bt(b);e.size<this.fi.size&&e.resize(this.fi.size,-1);e.write(b,c)};c.prototype.Ei=function(b,e){b=this.bt(b);e=this.Jj[e];return b<e.size?e.read(b):-1};c.prototype.Uv=function(){null==this.Jj&&(this.Jj=[]);for(var b=0;b<this.Jj.length;b++)if(null==this.Jj[b])return this.Jj[b]=a.Ac.Dg(0),b;this.Jj.push(a.Ac.Dg(0));
return this.Jj.length-1};c.prototype.ty=function(b){this.Jj[b]=null};c.prototype.bQ=function(b,e,c){if(-1==c)throw a.g.N();if(e!=c){var k=this.bc(c),h=this.wq(c),d=this.Vf(c);-1==h?this.Jn(d,k):this.Ln(h,k);-1==k?this.Kn(d,h):this.Mn(k,h);this.Pk(d,this.F(d)-this.Ha(c));this.gm(d,this.ea(d)-1);h=-1==e?this.Ys(b):this.wq(e);this.Mn(c,h);this.Ln(c,e);-1==e?this.Kn(b,c):this.Mn(e,c);-1==h?this.Jn(b,c):this.Ln(h,c);this.Pk(b,this.F(b)+this.Ha(c));this.gm(b,this.ea(b)+1);this.Hu(c,b)}};c.prototype.zi=
function(b,e){this.wb.Sd(this.gb(e),this.Fo());this.vl(b,-1,this.Fo())};c.prototype.vf=function(b,e){var c=this.rd(b),n=this.Ua(b),h=this.X(b);-1!=n&&this.Sc(n,h);var d=this.Ha(c);b==this.Cb(c)&&this.Dh(c,1<d?h:-1);-1!=h&&this.Tc(h,n);b==this.hk(c)&&this.Wi(c,1<d?n:-1);if(-1!=n&&-1!=h){var n=this.gb(n),f=this.gb(h);e?(e=this.Fi(n),null!=e&&(n=new a.b,this.wb.w(f,n),e.vd(n))):(f=this.gb(b),e=this.Fi(f),this.Fh(n,e),null!=e&&(n=this.wb.Fa(n),e.ed(n)))}this.hm(c,d-1);c=this.Vf(c);this.Pk(c,this.F(c)-
1);this.dw(b);return h};c.prototype.Cb=function(b){return this.Rc.O(b,4)};c.prototype.hk=function(b){return this.Rc.O(b,5)};c.prototype.X=function(b){return this.cd.O(b,2)};c.prototype.Ua=function(b){return this.cd.O(b,1)};c.prototype.rd=function(b){return this.cd.O(b,3)};c.prototype.Ub=function(b,e){return this.vl(b,-1,e)};c.prototype.Gp=function(b){if(void 0===b)return this.Gp(!1);if(b instanceof d)return new d(b);var e,c=-1,n=-1,h=-1,f=0,g=!1;for(e=this.$c;-1!=e;e=this.we(e))if(!b||a.T.Kc(this.Lb(e))){for(c=
this.Vb(e);-1!=c;c=this.bc(c))if(h=n=this.Cb(c),f=0,-1!=n){g=!0;break}if(g)break}return d.UL(this,e,c,n,h,f,b)};c.prototype.Oe=function(b){this.Hk.Oe(b);if(null!=this.Ge)for(var e=0,c=this.Ge.length;e<c;e++)null!=this.Ge[e]&&this.Ge[e].Oe(b)};c.prototype.Tp=function(b,e,c,a){a?this.DS(b,e,c):this.CS(b,e,c)};c.prototype.Tc=function(b,e){this.cd.L(b,1,e)};c.prototype.Sc=function(b,e){this.cd.L(b,2,e)};c.prototype.im=function(b,e){this.cd.L(b,3,e)};c.prototype.hm=function(b,e){this.Rc.L(b,3,e)};c.prototype.Dh=
function(b,e){this.Rc.L(b,4,e)};c.prototype.Wi=function(b,e){this.Rc.L(b,5,e)};c.prototype.gm=function(b,e){this.Mc.L(b,6,e)};c.prototype.Pk=function(b,e){this.Mc.L(b,5,e)};c.prototype.lF=function(b){var e=b;do{var c=this.X(e);this.Sc(e,this.Ua(e));this.Tc(e,c);e=c}while(e!=b)};c.prototype.ZF=function(b){this.pd=b};c.prototype.yu=function(b){var e=this.wq(b),c=this.bc(b),a=this.Vf(b);-1!=e?this.Ln(e,c):this.Jn(a,c);-1!=c?this.Mn(c,e):this.Kn(a,e);this.Dh(b,-1);this.Wi(b,-1);this.iC(b)};c.prototype.Ui=
function(b,e){var c=this.Ua(b),n=this.X(b);-1!=c&&this.Sc(c,n);-1!=n&&this.Tc(n,c);if(-1!=c&&-1!=n)if(c=this.gb(c),n=this.gb(n),e){if(e=this.Fi(c),null!=e){var h=new a.b;this.wb.w(n,h);e.vd(h)}}else n=this.gb(b),e=this.Fi(n),this.Fh(c,e),null!=e&&(h=new a.b,this.wb.w(c,h),e.ed(h));this.dw(b)};c.prototype.bP=function(b){return 0!=(this.Ho(b)&4)};c.prototype.Jr=function(b,e){this.Iy(b,(this.Ho(b)|4)-4|(e?4:0))};c.prototype.Mu=function(b,e){var c=this.cd.f;this.wb.kc();var a=this.wb.Ba[0].f;b.xd(0,e,
function(b,e){b=c[5*b];e=c[5*e];var k=a[2*b];b=a[2*b+1];var n=a[2*e];e=a[2*e+1];return b<e?-1:b>e?1:k<n?-1:k>n?1:0})};c.prototype.pO=function(){for(var b=this.$c;-1!=b;b=this.we(b))if(!a.T.Kc(this.Lb(b)))return!0;return!1};c.prototype.Vy=function(b,e){for(var c=this.Vb(b),a=this.Vb(e),h=this.Ys(b),d=this.Ys(e),f=this.Vb(b);-1!=f;f=this.bc(f))this.Hu(f,e);for(f=this.Vb(e);-1!=f;f=this.bc(f))this.Hu(f,b);this.Jn(b,a);this.Jn(e,c);this.Kn(b,d);this.Kn(e,h);c=this.F(b);a=this.ea(b);h=this.ea(e);this.Pk(b,
this.F(e));this.Pk(e,c);this.gm(b,h);this.gm(e,a);c=this.Mc.O(b,2);this.Mc.L(b,2,this.Mc.O(e,2));this.Mc.L(e,2,c)};return c}();a.fd=h})(z||(z={}));(function(a){var h=function(h){function c(b,e,c,n){h.call(this);this.R=new a.i;void 0===b?this.MB():"number"===typeof b?this.AL(b,e,c,n):b instanceof a.Va?void 0!==e?this.Ks(b,e,c):this.BL(b):b instanceof a.pa?void 0!==e?this.DL(b,e):this.CL(b):b instanceof a.i?this.zL(b):this.MB()}I(c,h);c.prototype.Ks=function(b,e,c){this.description=a.Od.Tf();this.R.Ja();
b.s()||this.sv(b,e,c)};c.prototype.zL=function(b){this.description=a.Od.Tf();this.R.K(b);this.R.normalize()};c.prototype.CL=function(b){if(null==b)throw a.g.N();this.description=b;this.R.Ja()};c.prototype.DL=function(b,e){if(null==b)throw a.g.N();this.description=b;this.R.K(e);this.R.normalize()};c.prototype.MB=function(){this.description=a.Od.Tf();this.R.Ja()};c.prototype.BL=function(b){this.description=a.Od.Tf();this.R.Ja();b.s()||this.sv(b)};c.prototype.AL=function(b,e,c,n){this.description=a.Od.Tf();
this.K(b,e,c,n)};c.prototype.K=function(b,e,c,a){this.qc();if("number"===typeof b)this.R.K(b,e,c,a);else for(this.Ja(),e=0,c=b.length;e<c;e++)this.Db(b[e])};c.prototype.Cu=function(b){this.qc();if(!b.dP())throw a.g.N();this.R.K(b)};c.prototype.Ja=function(){this.qc();this.R.Ja()};c.prototype.s=function(){return this.R.s()};c.prototype.aa=function(){return this.R.aa()};c.prototype.ba=function(){return this.R.ba()};c.prototype.lw=function(){return this.R.lw()};c.prototype.Vs=function(){return this.R.Vs()};
c.prototype.qq=function(){return this.R.Af()};c.prototype.Db=function(b){if(b instanceof a.b)this.qc(),this.R.Db(b);else if(b instanceof a.i)this.qc(),this.R.Db(b);else if(b instanceof a.Va){if(this.qc(),!b.sc()){var e=b.description;this.description!=e&&this.Ik(e);if(this.s())this.sv(b);else{this.R.Db(b.w());for(var k=1,n=e.Aa;k<n;k++)for(var h=e.Fd(k),d=a.pa.Wa(h),f=0;f<d;f++){var g=b.ld(h,f),y=this.Ah(h,f);y.Db(g);setInterval(h,f,y)}}}}else if(b instanceof c&&!b.s())for(e=b.description,e!=this.description&&
this.Ik(e),this.R.Db(b.R),k=1,n=e.Aa;k<n;k++)for(h=e.Hd(k),d=a.pa.Wa(h),f=0;f<d;f++)g=b.Ah(h,f),y=this.Ah(h,f),y.Db(g),setInterval(h,f,y)};c.prototype.sv=function(b,e,c){if(void 0!==e){this.R.K(b.w(),e,c);e=b.description;c=1;for(var k=e.Aa;c<k;c++)for(var h=e.Fd(c),d=a.pa.Wa(h),f=0;f<d;f++){var g=b.ld(h,f);this.setInterval(h,f,g,g)}}else for(this.R.K(b.fa[0],b.fa[1]),e=b.description,c=1,k=e.Aa;c<k;c++)for(h=e.Fd(c),d=a.pa.Wa(h),f=0;f<d;f++)g=b.ld(h,f),this.setInterval(h,f,g,g)};c.prototype.setInterval=
function(b,e,c,n){var k=null;"number"===typeof c?k=new a.Nd(c,n):k=c;this.qc();if(0==b)if(0==e)this.R.v=k.qa,this.R.B=k.va;else if(1==e)this.R.C=k.qa,this.R.G=k.va;else throw a.g.Uc();else this.DA(0,b,e,k.qa),this.DA(1,b,e,k.va)};c.prototype.P=function(b,e){this.qc();this.R.P(b,e)};c.prototype.Oe=function(b){if(b instanceof a.Bg)this.qc(),b.$y(this.R);else if(this.qc(),!this.R.s()){var e=new a.fH;this.Cn(e);e.UO()?e.Ja():b.$y(e)}};c.prototype.copyTo=function(b){if(b.D()!=this.D())throw a.g.N();b.qc();
b.description=this.description;b.R.K(this.R);b.fa=null;if(null!=this.fa){b.ns();for(var e=0;e<2*(this.description.le.length-2);e++)b.fa[e]=this.fa[e]}};c.prototype.Pa=function(){return new c(this.description)};c.prototype.Mh=function(){return this.R.rN()};c.prototype.$b=function(){return this.R.CC()};c.prototype.D=function(){return 197};c.prototype.fb=function(){return 2};c.prototype.Fp=function(b){this.copyTo(b)};c.prototype.o=function(b){b.v=this.R.v;b.C=this.R.C;b.B=this.R.B;b.G=this.R.G};c.prototype.Cn=
function(b){b.v=this.R.v;b.C=this.R.C;b.B=this.R.B;b.G=this.R.G;b.K(this.R.v,this.R.C,this.yd(0,1,0),this.R.B,this.R.G,this.yd(1,1,0))};c.prototype.Ah=function(b,e){var c=new a.Nd;c.K(this.yd(0,b,e),this.yd(1,b,e));return c};c.prototype.uf=function(b,e){e.Qf(this.description);var c=this.description.Aa-1;switch(b){case 0:for(b=0;b<c;b++)for(var n=this.description.Hd(b),h=a.pa.Wa(n),d=0;d<h;d++)e.setAttribute(n,d,this.yd(0,n,d));e.ic(this.R.v,this.R.C);break;case 1:for(b=0;b<c;b++)for(n=this.description.Hd(b),
h=a.pa.Wa(n),d=0;d<h;d++)e.setAttribute(n,d,this.yd(1,n,d));e.ic(this.R.v,this.R.G);break;case 2:for(b=0;b<c;b++)for(n=this.description.Hd(b),h=a.pa.Wa(n),d=0;d<h;d++)e.setAttribute(n,d,this.yd(0,n,d));e.ic(this.R.B,this.R.G);break;case 3:for(b=0;b<c;b++)for(n=this.description.Hd(b),h=a.pa.Wa(n),d=0;d<h;d++)e.setAttribute(n,d,this.yd(1,n,d));e.ic(this.R.B,this.R.C);break;default:throw a.g.Uc();}};c.prototype.vu=function(b,e){b=this.R.vu(b);e.ma(b.x,b.y)};c.prototype.zN=function(b,e){return e*(b.up-
2)};c.prototype.mC=function(b,e,c){if(this.R.s())throw a.g.ra("empty geometry");if(0==e)return 0!=b?0!=c?this.R.G:this.R.B:0!=c?this.R.C:this.R.v;if(c>=a.pa.Wa(e))throw a.g.N();var k=this.description.zf(e);this.ns();return 0<=k?this.fa[this.zN(this.description,b)+this.description.XN(k)-2+c]:a.pa.ue(e)};c.prototype.ns=function(){this.qc();if(null==this.fa&&2<this.description.le.length){this.fa=[];for(var b=c.V(this.description,0),e=c.V(this.description,1),k=0,n=1,h=this.description.Aa;n<h;n++)for(var d=
this.description.Hd(n),f=a.pa.Wa(d),d=a.pa.ue(d),g=0;g<f;g++)this.fa[b+k]=d,this.fa[e+k]=d,k++}};c.prototype.nm=function(b){if(null!=this.fa)if(2<b.le.length){for(var e=a.Od.iu(b,this.description),k=[],n=c.V(this.description,0),h=c.V(this.description,1),d=c.V(b,0),f=c.V(b,1),g=0,y=1,l=b.Aa;y<l;y++){var m=b.Hd(y),p=a.pa.Wa(m);if(-1==e[y])for(var q=a.pa.ue(m),m=0;m<p;m++)k[d+g]=q,k[f+g]=q,g++;else for(q=this.description.fj(e[y])-2,m=0;m<p;m++)k[d+g]=this.fa[n+q],k[f+g]=this.fa[h+q],g++,q++}this.fa=
k}else this.fa=null;this.description=b};c.prototype.yd=function(b,e,k){if(this.R.s())throw a.g.ra("This operation was performed on an Empty Geometry.");if(0==e)return 0!=b?0!=k?this.R.G:this.R.B:0!=k?this.R.C:this.R.v;if(k>=a.pa.Wa(e))throw a.g.Uc();var n=this.description.zf(e);return 0<=n?(this.ns(),this.fa[c.V(this.description,b)+this.description.fj(n)-2+k]):a.pa.ue(e)};c.prototype.DA=function(b,e,k,n){this.qc();if(0==e)0!=b?0!=k?this.R.G=n:this.R.B=n:0!=k?this.R.C=n:this.R.v=n;else{if(k>=a.pa.Wa(e))throw a.g.Uc();
if(!this.hasAttribute(e)){if(a.pa.nD(e,n))return;this.Ne(e)}e=this.description.zf(e);this.ns();this.fa[c.V(this.description,b)+this.description.fj(e)-2+k]=n}};c.V=function(b,e){return e*(b.le.length-2)};c.prototype.Ga=function(b){this.qc();var e=new a.i;b.o(e);return this.R.Ga(e)};c.prototype.jc=function(b){return b instanceof a.i?this.R.jc(b):this.R.jc(b.R)};c.prototype.offset=function(b,e){this.qc();this.R.offset(b,e)};c.prototype.normalize=function(){this.qc();this.R.normalize()};c.prototype.Af=
function(b){if(void 0!==b)if(b.Qf(this.description),this.s())b.Ja();else{for(var e=this.description.Aa,c=1;c<e;c++)for(var n=this.description.Hd(c),h=a.pa.Wa(n),d=0;d<h;d++){var f=.5*(this.mC(0,n,d)+this.mC(1,n,d));b.setAttribute(n,d,f)}b.ic(this.R.Af())}else{b=new a.Va(this.description);if(this.s())return b;e=this.description.Aa;for(c=1;c<e;c++)for(n=this.description.Fd(c),h=a.pa.Wa(n),d=0;d<h;d++)f=.5*(this.yd(0,n,d)+this.yd(1,n,d)),b.setAttribute(n,d,f);b.ic(this.R.lw(),this.R.Vs());return b}};
c.prototype.yw=function(){return new a.Va(this.R.yw())};c.prototype.contains=function(b){return b instanceof a.Va?b.s()?!1:this.R.contains(b.lk(),b.mk()):this.R.contains(b.R)};c.prototype.lc=function(b){if(b==this)return!0;if(!(b instanceof c)||this.description!=b.description)return!1;if(this.s())return b.s()?!0:!1;if(!this.R.lc(b.R))return!1;for(var e=0,a=2*(this.description.le.length-2);e<a;e++)if(this.fa[e]!=b.fa[e])return!1;return!0};c.prototype.hc=function(){var b=this.description.hc(),b=a.I.kg(b,
this.R.hc());if(!this.s()&&null!=this.fa)for(var e=0,c=2*(this.description.le.length-2);e<c;e++)b=a.I.kg(b,this.fa[e]);return b};c.prototype.Rf=function(){return a.Hh.il(this,null)};c.prototype.toString=function(){return this.s()?"Envelope: []":"Envelope: ["+this.R.v+", "+this.R.C+", "+this.R.B+", "+this.R.G+"]"};return c}(a.T);a.Vj=h})(z||(z={}));(function(a){var h=function(){function h(c,b,e,a){void 0===c?this.Ja():(this.v=c,this.C=b,this.B=e,this.G=a)}h.Oa=function(c,b,e,a){var k=new h;k.v=c;k.C=
b;k.B=e;k.G=a;return k};h.prototype.K=function(c,b,e,k){"number"===typeof c?void 0!==e?(this.v=c,this.C=b,this.B=e,this.G=k,this.normalize()):(this.v=c,this.C=b,this.B=c,this.G=b):c instanceof a.b?void 0!==b?(this.v=c.x-.5*b,this.B=this.v+b,this.C=c.y-.5*e,this.G=this.C+e,this.normalize()):(this.v=c.x,this.C=c.y,this.B=c.x,this.G=c.y):c instanceof h?this.K(c.v,c.C,c.B,c.G):c instanceof a.Nd&&(c.s()||b.s()?this.Ja():(this.v=c.qa,this.B=c.va,this.C=b.qa,this.G=b.va))};h.prototype.IN=function(c,b){var e=
new h;e.K(this.v,this.C,this.B,this.G);e.P(c,b);return e};h.prototype.Ey=function(c,b){if(void 0!==b)if(0==b)this.Ja();else{this.v=c[0].x;this.C=c[0].y;this.B=this.v;this.G=this.C;for(var e=1;e<b;e++){var a=c[e];a.x<this.v?this.v=a.x:a.x>this.B&&(this.B=a.x);a.y<this.C?this.C=a.y:a.y>this.G&&(this.G=a.y)}}else if(null==c||0==c.length)this.Ja();else for(a=c[0],this.K(a.x,a.y),e=1;e<c.length;e++)a=c[e],this.Oj(a.x,a.y)};h.prototype.Ja=function(){this.G=this.B=this.C=this.v=NaN};h.prototype.s=function(){return isNaN(this.v)};
h.prototype.Db=function(c,b){"number"===typeof c?this.s()?(this.v=c,this.C=b,this.B=c,this.G=b):(this.v>c?this.v=c:this.B<c&&(this.B=c),this.C>b?this.C=b:this.G<b&&(this.G=b)):c instanceof a.b?this.Db(c.x,c.y):c instanceof a.ee?this.Db(c.x,c.y):c instanceof h&&!c.s()&&(this.Db(c.v,c.C),this.Db(c.B,c.G))};h.prototype.Oj=function(c,b){this.v>c?this.v=c:this.B<c&&(this.B=c);this.C>b?this.C=b:this.G<b&&(this.G=b)};h.prototype.P=function(c,b){this.s()||(this.v-=c,this.B+=c,this.C-=b,this.G+=b,(this.v>
this.B||this.C>this.G)&&this.Ja())};h.prototype.scale=function(c){0>c&&this.Ja();this.s()||(this.v*=c,this.B*=c,this.C*=c,this.G*=c)};h.prototype.jc=function(c){return!this.s()&&!c.s()&&(this.v<=c.v?this.B>=c.v:c.B>=this.v)&&(this.C<=c.C?this.G>=c.C:c.G>=this.C)};h.prototype.rD=function(c){return(this.v<=c.v?this.B>=c.v:c.B>=this.v)&&(this.C<=c.C?this.G>=c.C:c.G>=this.C)};h.prototype.Ga=function(c){if(this.s()||c.s())return!1;c.v>this.v&&(this.v=c.v);c.B<this.B&&(this.B=c.B);c.C>this.C&&(this.C=c.C);
c.G<this.G&&(this.G=c.G);(c=this.v<=this.B&&this.C<=this.G)||this.Ja();return c};h.prototype.vu=function(c){switch(c){case 0:return a.b.Oa(this.v,this.C);case 1:return a.b.Oa(this.v,this.G);case 2:return a.b.Oa(this.B,this.G);case 3:return a.b.Oa(this.B,this.C);default:throw a.g.Uc();}};h.prototype.hy=function(c){if(null==c||4>c.length)throw a.g.N();null!=c[0]?c[0].ma(this.v,this.C):c[0]=a.b.Oa(this.v,this.C);null!=c[1]?c[1].ma(this.v,this.G):c[1]=a.b.Oa(this.v,this.G);null!=c[2]?c[2].ma(this.B,this.G):
c[2]=a.b.Oa(this.B,this.G);null!=c[3]?c[3].ma(this.B,this.C):c[3]=a.b.Oa(this.B,this.C)};h.prototype.rN=function(){return this.s()?0:this.aa()*this.ba()};h.prototype.CC=function(){return this.s()?0:2*(this.aa()+this.ba())};h.prototype.lw=function(){return(this.B+this.v)/2};h.prototype.Vs=function(){return(this.G+this.C)/2};h.prototype.aa=function(){return this.B-this.v};h.prototype.ba=function(){return this.G-this.C};h.prototype.move=function(c,b){this.s()||(this.v+=c,this.C+=b,this.B+=c,this.G+=
b)};h.prototype.offset=function(c,b){this.v+=c;this.B+=c;this.C+=b;this.G+=b};h.prototype.normalize=function(){if(!this.s()){var c=Math.min(this.v,this.B),b=Math.max(this.v,this.B);this.v=c;this.B=b;c=Math.min(this.C,this.G);b=Math.max(this.C,this.G);this.C=c;this.G=b}};h.prototype.Yl=function(c){c.ma(this.v,this.C)};h.prototype.YE=function(c){c.ma(this.B,this.C)};h.prototype.aF=function(c){c.ma(this.v,this.G)};h.prototype.Zl=function(c){c.ma(this.B,this.G)};h.prototype.dP=function(){return this.s()||
this.v<=this.B&&this.C<=this.G};h.prototype.Af=function(){return a.b.Oa((this.B+this.v)/2,(this.G+this.C)/2)};h.prototype.yw=function(){return a.b.Oa(this.v,this.C)};h.prototype.contains=function(c,b){if(void 0!==b)return c>=this.v&&c<=this.B&&b>=this.C&&b<=this.G;if(c instanceof a.Va)return this.contains(c.lk(),c.mk());if(c instanceof a.b)return this.contains(c.x,c.y);if(c instanceof h)return c.v>=this.v&&c.B<=this.B&&c.C>=this.C&&c.G<=this.G;throw a.g.N();};h.prototype.jl=function(c,b){if(void 0!==
b)return c>this.v&&c<this.B&&b>this.C&&b<this.G;if(c instanceof a.b)return this.jl(c.x,c.y);if(c instanceof h)return c.v>this.v&&c.B<this.B&&c.C>this.C&&c.G<this.G;throw a.g.N();};h.prototype.lc=function(c){return c==this?!0:c instanceof h?this.s()&&c.s()?!0:this.v!=c.v||this.C!=c.C||this.B!=c.B||this.G!=c.G?!1:!0:!1};h.prototype.hc=function(){var c=this.v,c=a.I.truncate(c^c>>>32),b=a.I.kg(c),c=this.B,c=a.I.truncate(c^c>>>32),b=a.I.kg(c,b),c=this.C,c=a.I.truncate(c^c>>>32),b=a.I.kg(c,b),c=this.G,
c=a.I.truncate(c^c>>>32);return b=a.I.kg(c,b)};h.prototype.vv=function(c){var b=new a.b;b.J(c);if(b.pv())return b;if(this.s())return b.FA(),b;b.x<this.v?b.x=this.v:b.x>this.B&&(b.x=this.B);b.y<this.C?b.y=this.C:b.y>this.G&&(b.y=this.G);if(!b.lc(c))return b;c=this.Af();(b.x<c.x?b.x-this.v:this.B-b.x)<(b.y<c.y?b.y-this.C:this.G-b.y)?b.x=b.x<c.x?this.v:this.B:b.y=b.y<c.y?this.C:this.G;return b};h.prototype.ms=function(c){if(this.s())return NaN;if(c.x==this.v)return c.y-this.C;var b=this.G-this.C,e=this.B-
this.v;return c.y==this.G?b+c.x-this.v:c.x==this.B?b+e+this.G-c.y:c.y==this.C?2*b+e+this.B-c.x:this.ms(this.vv(c))};h.prototype.vA=function(c){if(this.s())return-1;c=this.ms(c);var b=this.G-this.C,e=this.B-this.v;return c<b?0:(c-=b)<e?1:c-e<b?2:3};h.prototype.lv=function(){return this.s()?2.220446049250313E-14:2.220446049250313E-14*(Math.abs(this.v)+Math.abs(this.B)+Math.abs(this.C)+Math.abs(this.G)+1)};h.prototype.Nv=function(c,b){var e=this.ej(c),a=this.ej(b);if(0!=(e&a))return 0;if(0==(e|a))return 4;
var n=(0!=e?1:0)|(0!=a?2:0);do{var d=b.x-c.x,f=b.y-c.y;d>f?0!=(e&h.Cc)?(0!=(e&h.ob)?(c.y+=f*(this.v-c.x)/d,c.x=this.v):(c.y+=f*(this.B-c.x)/d,c.x=this.B),e=this.ej(c)):0!=(a&h.Cc)?(0!=(a&h.ob)?(b.y+=f*(this.v-b.x)/d,b.x=this.v):(b.y+=f*(this.B-b.x)/d,b.x=this.B),a=this.ej(b)):0!=e?(0!=(e&h.ac)?(c.x+=d*(this.C-c.y)/f,c.y=this.C):(c.x+=d*(this.G-c.y)/f,c.y=this.G),e=this.ej(c)):(0!=(a&h.ac)?(b.x+=d*(this.C-b.y)/f,b.y=this.C):(b.x+=d*(this.G-b.y)/f,b.y=this.G),a=this.ej(b)):0!=(e&h.Bd)?(0!=(e&h.ac)?
(c.x+=d*(this.C-c.y)/f,c.y=this.C):(c.x+=d*(this.G-c.y)/f,c.y=this.G),e=this.ej(c)):0!=(a&h.Bd)?(0!=(a&h.ac)?(b.x+=d*(this.C-b.y)/f,b.y=this.C):(b.x+=d*(this.G-b.y)/f,b.y=this.G),a=this.ej(b)):0!=e?(0!=(e&h.ob)?(c.y+=f*(this.v-c.x)/d,c.x=this.v):(c.y+=f*(this.B-c.x)/d,c.x=this.B),e=this.ej(c)):(0!=(a&h.ob)?(b.y+=f*(this.v-b.x)/d,b.x=this.v):(b.y+=f*(this.B-b.x)/d,b.x=this.B),a=this.ej(b));if(0!=(e&a))return 0}while(0!=(e|a));return n};h.prototype.ej=function(c){return(c.x<this.v?1:0)|(c.x>this.B?
1:0)<<1|(c.y<this.C?1:0)<<2|(c.y>this.G?1:0)<<3};h.prototype.mg=function(c){return!this.s()&&(this.aa()<=c||this.ba()<=c)};h.prototype.Fb=function(c){return c instanceof a.b?Math.sqrt(this.gG(c)):Math.sqrt(this.Ou(c))};h.prototype.Ou=function(c){var b=0,e=0,a;a=this.v-c.B;a>b&&(b=a);a=this.C-c.G;a>e&&(e=a);a=c.v-this.B;a>b&&(b=a);a=c.C-this.G;a>e&&(e=a);return b*b+e*e};h.prototype.gG=function(c){var b=0,e=0,a;a=this.v-c.x;a>b&&(b=a);a=this.C-c.y;a>e&&(e=a);a=c.x-this.B;a>b&&(b=a);a=c.y-this.G;a>e&&
(e=a);return b*b+e*e};h.prototype.wu=function(c){this.s()?c.Ja():c.K(this.v,this.B)};h.ob=1;h.ac=4;h.Cc=3;h.Bd=12;return h}();a.i=h})(z||(z={}));(function(a){var h;(function(c){c[c.initialize=0]="initialize";c[c.initializeRed=1]="initializeRed";c[c.initializeBlue=2]="initializeBlue";c[c.initializeRedBlue=3]="initializeRedBlue";c[c.sweep=4]="sweep";c[c.sweepBruteForce=5]="sweepBruteForce";c[c.sweepRedBlueBruteForce=6]="sweepRedBlueBruteForce";c[c.sweepRedBlue=7]="sweepRedBlue";c[c.sweepRed=8]="sweepRed";
c[c.sweepBlue=9]="sweepBlue";c[c.iterate=10]="iterate";c[c.iterateRed=11]="iterateRed";c[c.iterateBlue=12]="iterateBlue";c[c.iterateBruteForce=13]="iterateBruteForce";c[c.iterateRedBlueBruteForce=14]="iterateRedBlueBruteForce";c[c.resetRed=15]="resetRed";c[c.resetBlue=16]="resetBlue"})(h||(h={}));var d=function(){function c(b,e){this.th=b;this.KD=e}c.prototype.Zp=function(b,e,c){this.th.BS(c,b,e,this.KD)};c.prototype.Mo=function(b){return this.th.pq(b,this.KD)};return c}();h=function(){function c(){this.Vt=
this.cn=this.Ve=this.ad=null;this.fp=new a.i;this.Al=this.Mi=this.Ni=this.od=this.rf=this.ud=this.Nt=this.Wm=this.Zc=this.vb=null;this.Hb=-1;this.ka=0;this.Rj()}c.prototype.Vp=function(){this.Rj();this.At=!0;null==this.vb?(this.Wm=new a.ga(0),this.vb=[]):(this.Wm.cf(0),this.vb.length=0)};c.prototype.Wc=function(b,e){if(!this.At)throw a.g.xa();var c=new a.i;c.K(e);this.Wm.add(b);this.vb.push(c)};c.prototype.wo=function(){if(!this.At)throw a.g.xa();this.At=!1;null!=this.vb&&0<this.vb.length&&(this.Hb=
0,this.Ec=!1)};c.prototype.jG=function(){this.Rj();this.zt=!0;null==this.vb?(this.Wm=new a.ga(0),this.vb=[]):(this.Wm.cf(0),this.vb.length=0)};c.prototype.OA=function(b,e){if(!this.zt)throw a.g.xa();var c=new a.i;c.K(e);this.Wm.add(b);this.vb.push(c)};c.prototype.$B=function(){if(!this.zt)throw a.g.xa();this.zt=!1;null!=this.vb&&0<this.vb.length&&null!=this.Zc&&0<this.Zc.length&&(-1==this.Hb?this.Hb=3:2==this.Hb?this.Hb=3:3!=this.Hb&&(this.Hb=1),this.Ec=!1)};c.prototype.iG=function(){this.Rj();this.yt=
!0;null==this.Zc?(this.Nt=new a.ga(0),this.Zc=[]):(this.Nt.cf(0),this.Zc.length=0)};c.prototype.LA=function(b,e){if(!this.yt)throw a.g.xa();var c=new a.i;c.K(e);this.Nt.add(b);this.Zc.push(c)};c.prototype.ZB=function(){if(!this.yt)throw a.g.xa();this.yt=!1;null!=this.vb&&0<this.vb.length&&null!=this.Zc&&0<this.Zc.length&&(-1==this.Hb?this.Hb=3:1==this.Hb?this.Hb=3:3!=this.Hb&&(this.Hb=2),this.Ec=!1)};c.prototype.next=function(){if(this.Ec)return!1;for(var b=!0;b;)switch(this.Hb){case 0:b=this.Qw();
break;case 1:b=this.yO();break;case 2:b=this.vO();break;case 3:b=this.xO();break;case 4:b=this.LS();break;case 5:b=this.HS();break;case 6:b=this.IS();break;case 7:b=this.JS();break;case 8:b=this.Qu();break;case 9:b=this.Wy();break;case 10:b=this.$w();break;case 11:b=this.iP();break;case 12:b=this.fP();break;case 13:b=this.gP();break;case 14:b=this.hP();break;case 15:b=this.hF();break;case 16:b=this.gF();break;default:throw a.g.wa();}return this.Ec?!1:!0};c.prototype.YF=function(b){this.ka=b};c.prototype.Fw=
function(b){return this.vb[b]};c.prototype.jw=function(b){return this.Zc[b]};c.prototype.jk=function(b){return this.Wm.read(b)};c.prototype.ek=function(b){return this.Nt.read(b)};c.Cv=function(b){return 1==(b&1)};c.Yk=function(b){return 0==(b&1)};c.prototype.Rj=function(){this.At=this.yt=this.zt=!1;this.pf=this.qf=this.tg=this.ae=-1;this.Ec=!0};c.prototype.Qw=function(){this.mf=this.Ff=-1;if(10>this.vb.length)return this.ae=this.vb.length,this.Hb=5,!0;null==this.ad&&(this.ad=new a.bq(!0),this.cn=
this.ad.Re(),this.ud=new a.ga(0));this.ad.Vp();for(var b=0;b<this.vb.length;b++){var e=this.vb[b];this.ad.gq(e.v,e.B)}this.ad.wo();this.ud.xb(2*this.vb.length);this.ud.resize(0);for(b=0;b<2*this.vb.length;b++)this.ud.add(b);this.Lr(this.ud,2*this.vb.length,!0);this.ae=2*this.vb.length;this.Hb=4;return!0};c.prototype.yO=function(){this.mf=this.Ff=-1;if(10>this.vb.length||10>this.Zc.length)return this.ae=this.vb.length,this.Hb=6,!0;null==this.ad&&(this.ad=new a.bq(!0),this.cn=this.ad.Re(),this.ud=new a.ga(0));
this.ad.Vp();for(var b=0;b<this.vb.length;b++){var e=this.vb[b];this.ad.gq(e.v,e.B)}this.ad.wo();this.ud.xb(2*this.vb.length);this.ud.resize(0);for(b=0;b<2*this.vb.length;b++)this.ud.add(b);this.Lr(this.ud,this.ud.size,!0);this.ae=this.ud.size;-1!=this.qf&&(this.od.Fg(this.qf),this.Ni.resize(0),this.qf=-1);this.Hb=7;return this.gF()};c.prototype.vO=function(){this.mf=this.Ff=-1;if(10>this.vb.length||10>this.Zc.length)return this.ae=this.vb.length,this.Hb=6,!0;null==this.Ve&&(this.Ve=new a.bq(!0),
this.Vt=this.Ve.Re(),this.rf=new a.ga(0));this.Ve.Vp();for(var b=0;b<this.Zc.length;b++){var e=this.Zc[b];this.Ve.gq(e.v,e.B)}this.Ve.wo();this.rf.xb(2*this.Zc.length);this.rf.resize(0);for(b=0;b<2*this.Zc.length;b++)this.rf.add(b);this.Lr(this.rf,this.rf.size,!1);this.tg=this.rf.size;-1!=this.pf&&(this.od.Fg(this.pf),this.Mi.resize(0),this.pf=-1);this.Hb=7;return this.hF()};c.prototype.xO=function(){this.mf=this.Ff=-1;if(10>this.vb.length||10>this.Zc.length)return this.ae=this.vb.length,this.Hb=
6,!0;null==this.ad&&(this.ad=new a.bq(!0),this.cn=this.ad.Re(),this.ud=new a.ga(0));null==this.Ve&&(this.Ve=new a.bq(!0),this.Vt=this.Ve.Re(),this.rf=new a.ga(0));this.ad.Vp();for(var b=0;b<this.vb.length;b++){var e=this.vb[b];this.ad.gq(e.v,e.B)}this.ad.wo();this.Ve.Vp();for(b=0;b<this.Zc.length;b++)e=this.Zc[b],this.Ve.gq(e.v,e.B);this.Ve.wo();this.ud.xb(2*this.vb.length);this.rf.xb(2*this.Zc.length);this.ud.resize(0);this.rf.resize(0);for(b=0;b<2*this.vb.length;b++)this.ud.add(b);for(b=0;b<2*this.Zc.length;b++)this.rf.add(b);
this.Lr(this.ud,this.ud.size,!0);this.Lr(this.rf,this.rf.size,!1);this.ae=this.ud.size;this.tg=this.rf.size;-1!=this.qf&&(this.od.Fg(this.qf),this.Ni.resize(0),this.qf=-1);-1!=this.pf&&(this.od.Fg(this.pf),this.Mi.resize(0),this.pf=-1);this.Hb=7;return!0};c.prototype.LS=function(){var b=this.ud.get(--this.ae),e=b>>1;if(c.Yk(b))return this.ad.remove(e),0==this.ae?(this.mf=this.Ff=-1,this.Ec=!0,!1):!0;this.cn.uy(this.vb[e].v,this.vb[e].B,this.ka);this.Ff=e;this.Hb=10;return!0};c.prototype.HS=function(){if(-1==
--this.ae)return this.mf=this.Ff=-1,this.Ec=!0,!1;this.tg=this.Ff=this.ae;this.Hb=13;return!0};c.prototype.IS=function(){if(-1==--this.ae)return this.mf=this.Ff=-1,this.Ec=!0,!1;this.Ff=this.ae;this.tg=this.Zc.length;this.Hb=14;return!0};c.prototype.JS=function(){var b=this.ud.get(this.ae-1),e=this.rf.get(this.tg-1),a=this.pq(b,!0),n=this.pq(e,!1);return a>n?this.Qu():a<n?this.Wy():c.Cv(b)?this.Qu():c.Cv(e)?this.Wy():this.Qu()};c.prototype.Qu=function(){var b=this.ud.get(--this.ae),e=b>>1;if(c.Yk(b))return-1!=
this.qf&&-1!=this.Ni.get(e)?(this.od.Jc(this.qf,this.Ni.get(e)),this.Ni.set(e,-1)):this.ad.remove(e),0==this.ae?(this.mf=this.Ff=-1,this.Ec=!0,!1):!0;if(-1!=this.pf&&0<this.od.vq(this.pf))for(b=this.od.gc(this.pf);-1!=b;){var k=this.od.getData(b);this.Ve.lg(k);this.Mi.set(k,-1);k=this.od.bb(b);this.od.Jc(this.pf,b);b=k}0<this.Ve.size()?(this.Vt.uy(this.vb[e].v,this.vb[e].B,this.ka),this.Ff=e,this.Hb=12):(-1==this.qf&&(null==this.od&&(this.od=new a.$n),this.Ni=new a.ga(0),this.Ni.resize(this.vb.length,
-1),this.Ni.dh(-1,0,this.vb.length),this.qf=this.od.jh(1)),this.Ni.set(e,this.od.addElement(this.qf,e)),this.Hb=7);return!0};c.prototype.Wy=function(){var b=this.rf.get(--this.tg),e=b>>1;if(c.Yk(b))return-1!=this.pf&&-1!=this.Mi.get(e)?(this.od.Jc(this.pf,this.Mi.get(e)),this.Mi.set(e,-1)):this.Ve.remove(e),0==this.tg?(this.mf=this.Ff=-1,this.Ec=!0,!1):!0;if(-1!=this.qf&&0<this.od.vq(this.qf))for(b=this.od.gc(this.qf);-1!=b;){var k=this.od.getData(b);this.ad.lg(k);this.Ni.set(k,-1);k=this.od.bb(b);
this.od.Jc(this.qf,b);b=k}0<this.ad.size()?(this.cn.uy(this.Zc[e].v,this.Zc[e].B,this.ka),this.mf=e,this.Hb=11):(-1==this.pf&&(null==this.od&&(this.od=new a.$n),this.Mi=new a.ga(0),this.Mi.resize(this.Zc.length,-1),this.Mi.dh(-1,0,this.Zc.length),this.pf=this.od.jh(0)),this.Mi.set(e,this.od.addElement(this.pf,e)),this.Hb=7);return!0};c.prototype.$w=function(){this.mf=this.cn.next();if(-1!=this.mf)return!1;var b=this.ud.get(this.ae)>>1;this.ad.lg(b);this.Hb=4;return!0};c.prototype.iP=function(){this.Ff=
this.cn.next();if(-1!=this.Ff)return!1;this.mf=this.Ff=-1;var b=this.rf.get(this.tg)>>1;this.Ve.lg(b);this.Hb=7;return!0};c.prototype.fP=function(){this.mf=this.Vt.next();if(-1!=this.mf)return!1;var b=this.ud.get(this.ae)>>1;this.ad.lg(b);this.Hb=7;return!0};c.prototype.gP=function(){if(-1==--this.tg)return this.Hb=5,!0;this.fp.K(this.vb[this.ae]);var b=this.vb[this.tg];this.fp.P(this.ka,this.ka);return this.fp.jc(b)?(this.mf=this.tg,!1):!0};c.prototype.hP=function(){if(-1==--this.tg)return this.Hb=
6,!0;this.fp.K(this.vb[this.ae]);var b=this.Zc[this.tg];this.fp.P(this.ka,this.ka);return this.fp.jc(b)?(this.mf=this.tg,!1):!0};c.prototype.hF=function(){if(null==this.ad)return this.Ec=!0,!1;this.ae=this.ud.size;0<this.ad.size()&&this.ad.reset();-1!=this.qf&&(this.od.Fg(this.qf),this.Ni.resize(0),this.qf=-1);this.Ec=!1;return!0};c.prototype.gF=function(){if(null==this.Ve)return this.Ec=!0,!1;this.tg=this.rf.size;0<this.Ve.size()&&this.Ve.reset();-1!=this.pf&&(this.od.Fg(this.pf),this.Mi.resize(0),
this.pf=-1);this.Ec=!1;return!0};c.prototype.Lr=function(b,e,c){null==this.Al&&(this.Al=new a.Rr);c=new d(this,c);this.Al.sort(b,0,e,c)};c.prototype.BS=function(b,e,a,n){var k=this;b.xd(e,a,function(b,e){var a=k.pq(b,n),h=k.pq(e,n);return a<h||a==h&&c.Yk(b)&&c.Cv(e)?-1:1})};c.prototype.pq=function(b,e){var a=.5*this.ka;if(e)return e=this.vb[b>>1],a=c.Yk(b)?e.C-a:e.G+a;e=this.Zc[b>>1];return a=c.Yk(b)?e.C-a:e.G+a};return c}();a.sz=h})(z||(z={}));(function(a){var h=function(){function h(){}h.Oa=function(c,
b,e,a,n,d){var k=new h;k.v=c;k.C=b;k.Je=e;k.B=a;k.G=n;k.ig=d;return k};h.prototype.Ja=function(){this.Je=this.v=NaN};h.prototype.s=function(){return isNaN(this.v)};h.prototype.UO=function(){return isNaN(this.Je)};h.prototype.K=function(c,b,e,a,n,h){void 0!==a?"number"===typeof c?(this.v=c,this.C=b,this.Je=e,this.B=a,this.G=n,this.ig=h):(this.v=c.x-.5*b,this.B=this.v+b,this.C=c.y-.5*e,this.G=this.C+e,this.Je=c.z-.5*a,this.ig=this.Je+a):(this.v=c,this.C=b,this.Je=e,this.B=c,this.G=b,this.ig=e)};h.prototype.move=
function(c){this.v+=c.x;this.C+=c.y;this.Je+=c.z;this.B+=c.x;this.G+=c.y;this.ig+=c.z};h.prototype.copyTo=function(c){c.v=this.v;c.C=this.C;c.B=this.B;c.G=this.G};h.prototype.Oj=function(c,b,e){this.v>c?this.v=c:this.B<c&&(this.B=c);this.C>b?this.C=b:this.G<b&&(this.G=b);0==isNaN(this.Je)?this.Je>e?this.Je=e:this.ig<e&&(this.ig=e):this.ig=this.Je=e};h.prototype.Db=function(c,b,e,k,n,d){if("number"===typeof c)k?(this.Db(c,b,e),this.Db(k,n,d)):this.s()?(this.v=c,this.C=b,this.Je=e,this.B=c,this.G=b,
this.ig=e):this.Oj(c,b,e);else if(c instanceof a.ee)this.Db(c.x,c.y,c.z);else if(c instanceof h)c.s()||(this.Db(c.v,c.C,c.Je),this.Db(c.B,c.G,c.ig));else throw a.g.N();};h.prototype.Oa=function(c,b,e){c.s()||b.s()?this.Ja():(this.v=c.qa,this.B=c.va,this.C=b.qa,this.G=b.va,this.Je=e.qa,this.ig=e.va)};h.prototype.hy=function(c){if(null==c||8>c.length)throw a.g.N();c[0]=new a.ee(this.v,this.C,this.Je);c[1]=new a.ee(this.v,this.G,this.Je);c[2]=new a.ee(this.B,this.G,this.Je);c[3]=new a.ee(this.B,this.C,
this.Je);c[4]=new a.ee(this.v,this.C,this.ig);c[5]=new a.ee(this.v,this.G,this.ig);c[6]=new a.ee(this.B,this.G,this.ig);c[7]=new a.ee(this.B,this.C,this.ig)};h.prototype.Ey=function(c){if(null==c||0==c.length)this.Ja();else{var b=c[0];this.K(b.x,b.y,b.z);for(b=1;b<c.length;b++){var e=c[b];this.Oj(e.x,e.y,e.z)}}};return h}();a.fH=h})(z||(z={}));(function(a){(function(a){a.wa=function(){var a=Error();a.message="Internal Error";return a};a.qe=function(){var a=Error();a.message="Not Implemented";return a};
a.cj=function(){var a=Error();a.message="The input unit and the spatial reference unit are not of the same unit type.ie Linear vs.Angular";return a};a.xa=function(){var a=Error();a.message="Invalid Call";return a};a.N=function(a){var c=Error();c.message="Illegal Argument Exception";void 0!==a&&(c.message+=": "+a);return c};a.BI=function(){var a=Error();a.message="Runtime Exception.";return a};a.ra=function(a){var c=Error();c.message="Geometry Exception: "+a;return c};a.PG=function(){var a=Error();
a.message="Assert Failed Exception";return a};a.Uc=function(){var a=Error();a.message="IndexOutOfBoundsException";return a};a.aU=function(a){a.message="UserCancelException";return a}})(a.g||(a.g={}))})(z||(z={}));(function(a){var h=function(){function b(b,c){this.Ma=b;this.hE=c;this.kE=-1;this.rk=!1}b.prototype.next=function(){if(++this.kE==this.hE.F())return null;var b=this.hE.Fa(this.kE);b.scale(this.Ma.Rb);var c=new a.Ka;this.Ma.Iv(b,this.rk,c);return c};b.prototype.ya=function(){return 0};return b}(),
d=function(){function b(b,c,n){this.Ma=b;this.Zt=c;this.Om=!1;this.Um=n;this.Mt=[0];this.zj=[0];this.Qi=[0];this.Sq=[0];this.rk=!1;this.$o=new a.Ka;this.Bj=[]}b.prototype.next=function(){if(this.Om){this.Om=!1;this.bd.ia();var b=a.T.Yj(this.$o);return b=a.Of.Qj(b,this.Ma.jp,!0,!0,this.Ma.Yb)}null==this.bd&&(this.bd=this.Zt.Ca(),this.bd.kb(),null!=this.Um&&this.Um.lo());if(!this.bd.La()){if(!this.bd.kb())return null;null!=this.Um&&this.Um.lo()}b=null;this.zj[0]=0;this.Fx=this.Mt[0]=0;this.uh=NaN;this.Om=
!1;for(var k=this.Bj.length=0,n=new a.b,h=new a.b,d=[0];this.bd.La()&&8>this.Fx;){var f=this.bd.ia();n.J(f.Mb());h.J(f.oc());n.scale(this.Ma.Rb);h.scale(this.Ma.Rb);a.ui.Hs(n,h)?n.x=h.x:a.ui.Fs(n,h)&&(h.x=n.x);this.Bj.length=0;a.ui.kC(this.Ma.Gb,this.Ma.Xb,this.Ma.ke,n,h,this.Ma.Nx,this.Ma.hr,d,this.Qi,this.Sq,this.Bj,this.Mt);null!=this.Um&&(f=this.Bj.slice(0),this.Um.dD(this.Um.ea()-1,f,f.length-1));a.ui.Gs(n,h)?(this.$o.Ja(),this.Ma.Iv(n,this.rk,this.$o),this.Om=!0):(this.$o.Ja(),this.Om=this.Lv(d[0],
this.$o));if(this.Om){this.bd.oi();if(this.bd.Ow()){this.bd.oi();this.bd.ia();break}this.bd.yR();break}null==b&&(b=new a.Ka,b.lo());this.TA(b);k++}this.Mt[0]=0;if(0<k){for(d=this.bd.Jb();0<k;)this.bd.oi(),n.J(this.Zt.Fa(this.bd.Jb())),h.J(this.Zt.Fa(this.bd.Bm())),n.scale(this.Ma.Rb),h.scale(this.Ma.Rb),this.rk&&(a.ui.Hs(n,h)?n.x=h.x:a.ui.Fs(n,h)&&(h.x=n.x)),this.Bj.length=0,a.ui.kC(this.Ma.Gb,this.Ma.Xb,this.Ma.ke,h,n,this.Ma.Nx,this.Ma.hr,null,this.Qi,this.Sq,this.Bj,this.Mt),this.TA(b),k--;n.J(this.Zt.Fa(this.bd.Jb()));
n.scale(this.Ma.Rb);c.kq(this.Ma.Gb,this.Ma.Xb,this.Ma.Rb,this.Ma.hb,n,this.uh+1.570796326794897,this.uh+4.71238898038469,this.Ma.Sm,this.rk,this.zj,b,NaN,NaN);this.bd.Sb(d);this.bd.ia();k=a.Ia.Cg(null,b,!0);return b=a.Of.Qj(b,k,!0,!0,this.Ma.Yb)}this.Om=!1;this.bd.ia();b=a.T.Yj(this.$o);return b=a.Of.Qj(b,this.Ma.jp,!0,!0,this.Ma.Yb)};b.prototype.TA=function(b){var e=this.Bj[0],n,h=this.Qi[0]-1.570796326794897,d=this.Sq[0]+1.570796326794897,f;if(!isNaN(this.uh)){this.uh>=this.Qi[0]?(n=this.uh+1.570796326794897,
h=n+3.141592653589793-(this.uh-this.Qi[0])):(n=this.uh+1.570796326794897,h=n+3.141592653589793-(6.283185307179586-(this.Qi[0]-this.uh)));f=this.uh>=this.Qi[0]&&3.141592653589793>=this.uh-this.Qi[0]?!1:this.uh<this.Qi[0]&&3.141592653589793<=this.Qi[0]-this.uh?!1:!0;var g=!1;if(Math.abs(h-n)<=.5*this.Ma.Sm)if(f){var l=b.Fa(b.F()-2);l.scale(this.Ma.Rb);var m=new a.ca(0);a.zb.gw(this.Ma.Gb,this.Ma.Xb,e.x,e.y,l.x,l.y,m);for(l=m.l;l<=n;)l+=6.283185307179586;for(;l>n;)l-=6.283185307179586;l<h&&(g=!0)}else g=
!0;g?(b.eF(0,b.F()-1),this.rk||(e=new a.b,e.J(b.Fa(b.F()-1)),e.scale(this.Ma.Rb),-3.141592653589793>e.x-this.zj[0]?this.zj[0]-=6.283185307179586:3.141592653589793<e.x-this.zj[0]&&(this.zj[0]+=6.283185307179586)),f||(h=.5*(h+n))):(f?(n=new a.b,n.J(e),n.scale(1/this.Ma.Rb),b.kf(0,-1,n)):c.kq(this.Ma.Gb,this.Ma.Xb,this.Ma.Rb,this.Ma.hb,this.Bj[0],n,h,this.Ma.Sm,this.rk,this.zj,b,NaN,NaN),this.Fx+=1)}c.Hv(this.Ma.Gb,this.Ma.Xb,this.Ma.Rb,this.Ma.hb,this.Ma.ke,this.Bj,h,d,this.rk,this.zj,b);this.uh=this.Sq[0]};
b.prototype.Lv=function(b,c){return this.Ma.Lv(this.Bj,b,this.Qi[0],this.Sq[0],this.rk,c)};b.prototype.ya=function(){return 0};return b}(),c=function(){function b(){}b.buffer=function(c,k,n,h,d,f){if(null==c)throw a.g.N("Geometry::Geodesic_bufferer::buffer");if(c.s())return new a.Ka(c.description);var e=new b;e.sg=k;e.wc=a.Ya.Em(k);var u=a.Ya.ft(e.wc);e.Yb=f;e.Gb=a.Ya.Ts(e.wc);e.Xb=u*(2-u);e.Rb=e.wc.Se().Dj;e.ka=e.sg.xq();e.jp=e.wc.xq();e.hr=e.jp*e.Rb;e.ip=1.570796326794897/e.Rb;e.rU=3.141592653589793/
e.Rb;e.Uq=6.283185307179586/e.Rb;e.sU=e.Uq/6;e.Ix=0;e.qU=1.5707963267948966*e.Gb/e.Ix;4==n?(e.ke=2,e.Gt=!0):(e.ke=n,e.Gt=!1);e.Da=h;e.hb=Math.abs(h);isNaN(d)||.001>d?e.sS():e.Rm=d;n=c.D();a.T.Lc(n)?(n=new a.Xa(c.description),n.Bc(c,!0),c=n,n=1607):197==n&&(n=new a.i,c.o(n),n.aa()<=e.ka||n.ba()<=e.ka?(n=new a.Xa(c.description),n.Wc(c,!1),c=n,n=1607):(n=new a.Ka(c.description),n.Wc(c,!1),c=n,n=1736));e.tS();a.T.Km(n)||e.uS();if(e.hb<=.5*e.Rm)return 1736!=n?new a.Ka(c.description):e.Gt?c:a.ui.oq(c,e.sg,
e.ke,e.Nx,-1,f);if(0>e.Da&&1736!=n)return new a.Ka(c.description);e.Gt&&a.T.Kc(n)?(k=a.ui.oq(c,k,4,NaN,e.Rm,f),c=a.Ya.Wl(k,e.sg,e.wc)):c=a.Ya.Wl(c,e.sg,e.wc);c=a.gh.qo(c,e.wc);if(c.s())return new a.Ka(c.description);!e.Gt&&a.T.Kc(n)&&(c=a.ui.IE(e.Rb,c));c=b.PS(c,e.wc);switch(n){case 1736:k=e.yK(c);break;case 1607:k=e.zK(c);break;case 550:k=e.wK(c);break;case 33:k=e.xK(c);break;default:throw a.g.ra("corrupted_geometry");}e=a.Ya.Wl(k,e.wc,e.sg);e.Ik(c.description);return e};b.prototype.yK=function(b){var c=
new a.Ka;b=new d(this,b,c);b=a.wi.local().$(b,this.wc,this.Yb).next();b=a.Vn.nl(b,this.wc,2);var e=new a.Bg;e.scale(1/this.Rb,1/this.Rb);c.Oe(e);c=a.Vn.nl(c,this.wc,2);return 0<=this.Da?a.wi.local().$(c,b,this.wc,this.Yb):a.Zr.local().$(c,b,this.wc,this.Yb)};b.prototype.zK=function(b){b=new d(this,b,null);b=a.wi.local().$(b,this.wc,this.Yb).next();return b=a.Vn.nl(b,this.wc,2)};b.prototype.wK=function(b){b=new h(this,b);b=a.wi.local().$(b,this.wc,this.Yb).next();return b=a.Vn.nl(b,this.wc,2)};b.prototype.xK=
function(b){b=b.w();b.scale(this.Rb);var c=new a.Ka;this.Iv(b,!1,c);return c=a.Vn.nl(c,this.wc,2)};b.prototype.Lv=function(c,k,n,h,d,f){var e=c[0],u=c[c.length-1],g=e.y>u.y?e.y:u.y,C=a.u.q(this.Gb,this.Xb,e.y<u.y?e.y:u.y),g=a.u.q(this.Gb,this.Xb,g);if(.001<this.Ix-(C+k+this.hb)&&.001<this.Ix+(g-k-this.hb))return!1;k=n-1.570796326794897;n=h+1.570796326794897;var C=k-3.141592653589793,g=k+3.141592653589793,l=n+3.141592653589793,m=[NaN],y=[NaN],J=[NaN],p=[NaN];h=!1;b.wG(this.Gb,this.Xb,this.hb,e,k,C,
u,n,m,y);b.wG(this.Gb,this.Xb,this.hb,u,l,n,e,C,J,p);n<m[0]&&m[0]<l?h=!0:n<y[0]&&y[0]<l&&(h=!0);h||(C<J[0]&&J[0]<k?h=!0:C<p[0]&&p[0]<k&&(h=!0));if(!h&&d)return!1;for(var q=[],r=c.length-1;0<=r;r--)q.push(c[r]);f.Ja();f.lo();r=[0];b.Hv(this.Gb,this.Xb,this.Rb,this.hb,this.ke,c,k,n,d,r,f);b.kq(this.Gb,this.Xb,this.Rb,this.hb,u,n,l,this.Sm,d,r,f,m[0],y[0]);b.Hv(this.Gb,this.Xb,this.Rb,this.hb,this.ke,q,l,g,d,r,f);b.kq(this.Gb,this.Xb,this.Rb,this.hb,e,C,k,this.Sm,d,r,f,J[0],p[0]);c=!1;d||(c=this.zB(this.Rb,
f));return h||c};b.prototype.Iv=function(c,a,n){n.Ja();n.lo();b.kq(this.Gb,this.Xb,this.Rb,this.hb,c,-this.Sm,6.283185307179586,this.Sm,a,[0],n,NaN,NaN);a||this.zB(this.Rb,n)};b.prototype.zB=function(b,c){var e=this.XK(b,c);b=this.YK(b,c);return e||b};b.prototype.XK=function(b,c){var e=c.F(),k=!1,h=new a.i;c.o(h);if(!a.j.S(h.G*b,1.570796326794897)&&!a.j.S(h.C*b,-1.570796326794897))return!1;for(var d=new a.b,e=e-1;0<=e;e--)c.w(e,d),d.y==h.G&&a.j.S(d.y*b,1.570796326794897)?(k=!0,this.RE(d,e,c)):d.y==
h.C&&a.j.S(d.y*b,-1.570796326794897)&&(k=!0,this.RE(d,e,c));return k};b.prototype.YK=function(b,c){var e=c.Fa(0),a=c.Fa(c.F()-1);return 3.141592653589793<Math.abs(e.x-a.x)*b?(this.RQ(c),!0):this.WK(c)};b.prototype.WK=function(b){return 0>b.Mh()?(this.QQ(b),!0):!1};b.prototype.RE=function(b,c,n){var e=n.F(),k=0<c?c-1:e-1,e=n.Fa(c<e-1?c+1:0),k=n.Fa(k);if(!a.j.S(e.y,b.y)&&!a.j.S(e.x,b.x)){var h=new a.b;h.ma(e.x,b.y);n.ic(c,h)}a.j.S(k.y,b.y)||a.j.S(k.x,b.x)||(e=new a.b,e.ma(k.x,b.y),n.kf(0,c,e))};b.prototype.RQ=
function(b){var c=new a.Ka,e=new a.Ka,h=new a.Bg,d=b.Fa(0),f=b.Fa(b.F()-1),g=new a.b;d.x>f.x?(f=this.ip,h.Nn(-this.Uq,0)):(f=-this.ip,h.Nn(this.Uq,0));c.add(b,!1);b.Ja();e.add(c,!1);e.Oe(h);d=new a.i;e.o(d);d.P((this.Uq-d.aa())/2,0);d.C=-this.ip;d.G=this.ip;for(var l=0;l<e.F();l++)e.w(l,g),c.kf(0,-1,g);e.Oe(h);for(l=0;l<e.F();l++)e.w(l,g),c.kf(0,-1,g);e=c.Fa(0);h=c.Fa(c.F()-1);g.ma(h.x,f);c.kf(0,-1,g);g.ma(.5*(h.x+e.x),f);c.kf(0,-1,g);g.ma(e.x,f);c.kf(0,-1,g);c=a.gh.Rw(c,this.wc,2,d.v);c=a.gh.Rw(c,
this.wc,2,d.B);c=a.Ed.clip(c,d,this.jp,NaN);b.add(c,!1)};b.prototype.QQ=function(b){var c=new a.i;b.o(c);c.P((this.Uq-c.aa())/2,0);c.C=-this.ip;c.G=this.ip;b.lo();var e=new a.b;e.ma(c.v,c.C);b.kf(1,-1,e);e.ma(c.v,c.G);b.kf(1,-1,e);e.ma(.5*(c.v+c.B),c.G);b.kf(1,-1,e);e.ma(c.B,c.G);b.kf(1,-1,e);e.ma(c.B,c.C);b.kf(1,-1,e);e.ma(.5*(c.v+c.B),c.C);b.kf(1,-1,e)};b.Hv=function(c,k,n,h,d,f,g,l,m,y,p){var e=null;m||(e=new a.b,e.Eh(),0<p.F()&&(e.J(p.Fa(p.F()-1)),e.scale(n)));var u=new a.ca(0),C=new a.ca(0),
G=new a.ca(0),J=new a.b,q=new a.b,r=f[f.length-1];n=1/n;for(var v=0;v<f.length;v++){var V=f[v],x;0==v?x=g:v==f.length-1?x=l:(a.zb.Rd(c,k,r.x,r.y,V.x,V.y,null,null,u,d),x=u.l-1.570796326794897);a.zb.Ph(c,k,V.x,V.y,h,x,C,G);m?q.ma(C.l,G.l):(J.ma(C.l,G.l),b.Gz(V.x,J.x,e.x,y),q.ma(y[0]+J.x,J.y),e.J(q));q.scale(n);p.kf(0,-1,q)}};b.kq=function(c,k,n,h,d,f,g,l,m,y,p,q,r){if(!(g-f<l)){var e=new a.ca(0),u=new a.ca(0),C=new a.b,G=new a.b,J=null;m||(J=new a.b,J.Eh(),0<p.F()&&(J.J(p.Fa(p.F()-1)),J.scale(n)));
var v=a.I.truncate(Math.ceil(f/l)),V=v++*l;V==f&&(V=v++*l);for(n=1/n;V<g+l;){f<q&&q<V?(V=q,v--):f<r&&r<V&&(V=r,v--);if(V>=g)break;a.zb.Ph(c,k,d.x,d.y,h,V,e,u);m?G.ma(e.l,u.l):(C.ma(e.l,u.l),b.Gz(d.x,C.x,J.x,y),G.ma(y[0]+C.x,C.y),J.J(G));G.scale(n);p.kf(0,-1,G);f=V;V=v++*l}}};b.wG=function(b,c,n,h,d,f,g,l,m,y){var e=new a.b,k=new a.b,u=new a.ca(0),C=new a.ca(0);a.zb.Ph(b,c,h.x,h.y,n,d,u,C);e.ma(u.l,C.l);a.zb.Ph(b,c,h.x,h.y,n,f,u,C);k.ma(u.l,C.l);n=new a.ca(0);a.zb.gw(b,c,g.x,g.y,e.x,e.y,n);m[0]=n.l;
a.zb.gw(b,c,g.x,g.y,k.x,k.y,n);for(y[0]=n.l;m[0]<=y[0];)m[0]+=6.283185307179586;for(;m[0]>y[0];)m[0]-=6.283185307179586;for(;m[0]>=l;)m[0]-=6.283185307179586,y[0]-=6.283185307179586;for(;m[0]<l;)m[0]+=6.283185307179586,y[0]+=6.283185307179586};b.Gz=function(b,c,a,h){if(isNaN(a)){for(;3.141592653589793<h[0]+c-b;)h[0]-=6.283185307179586;for(;3.141592653589793<b-(h[0]+c);)h[0]+=6.283185307179586}else 3.141592653589793<h[0]+c-a?h[0]-=6.283185307179586:3.141592653589793<a-(h[0]+c)&&(h[0]+=6.283185307179586)};
b.PS=function(b,c){var e=b.D(),k;a.T.Kc(e)?k=b.ea():550==e?k=b.F():k=1;if(1==k)return b;var h=new a.ga(0);h.resize(k);for(var d=[],f=new a.i,g=0;g<k;g++){h.write(g,g);var l;a.T.Kc(e)?(b.Ti(g,f),l=f.Af()):l=b.Fa(g);l=a.qH.QS(c,l);d[g]=l}h.xd(0,h.size,function(b,c){return d[b]<d[c]?-1:d[b]>d[c]?1:0});f=b.Pa();for(g=0;g<k;g++)l=h.read(g),a.T.Kc(e)?f.Zj(b,l,!0):f.Pd(b,l,l+1);return f};b.prototype.tS=function(){var b=Math.min(3.141592653589793*this.Gb-this.hb,this.hb),b=Math.min(b,.39269908169872414*this.Gb),
c=new a.b;c.ma(0,10*this.Rb);var n=45*this.Rb,h=new a.ca(0),d=new a.ca(0),f=new a.ca(0),g=new a.ca(0),l=new a.ca(0),m=new a.ca(0),y=new a.ca(0),p=new a.ca(0),q=new a.b,r=new a.b,v=new a.b,x=new a.b;a.zb.Ph(this.Gb,this.Xb,c.x,c.y,b,0,h,d);q.ma(h.l,d.l);a.zb.Ph(this.Gb,this.Xb,c.x,c.y,b,n,f,g);r.ma(f.l,g.l);for(var h=new a.ca(0),d=new a.ca(0),w=new a.ca(0);;){a.zb.Ph(this.Gb,this.Xb,c.x,c.y,b,.5*(0+n),l,m);v.ma(l.l,m.l);a.zb.Rd(this.Gb,this.Xb,q.x,q.y,r.x,r.y,h,d,null,2);a.zb.dk(this.Gb,this.Xb,q.x,
q.y,.5*h.l,d.l,y,p,2);x.ma(y.l,p.l);a.zb.Rd(this.Gb,this.Xb,v.x,v.y,x.x,x.y,w,null,null,2);if(w.l<=this.Rm)break;n*=.9;a.zb.Ph(this.Gb,this.Xb,c.x,c.y,b,n,f,g);r.ma(f.l,g.l)}this.Sm=6.283185307179586/Math.ceil(6.283185307179586/(n-0))};b.prototype.uS=function(){var b=Math.min(3.141592653589793*this.Gb-this.hb,this.hb),b=Math.min(b,.39269908169872414*this.Gb),c=new a.b,n=new a.b;c.ma(0,10*this.Rb);n.ma(10*this.Rb,10*this.Rb);var h=new a.ca(0),d=new a.ca(0),f=new a.ca(0);a.zb.Rd(this.Gb,this.Xb,c.x,
c.y,n.x,n.y,f,h,d,this.ke);var g=new a.ca(0),l=new a.ca(0),m=new a.ca(0),y=new a.ca(0),p=new a.b,q=new a.ca(0),r=new a.ca(0),v=new a.ca(0),x=new a.ca(0),w=new a.ca(0),t=new a.ca(0),B=new a.ca(0),z=new a.ca(0),E=new a.ca(0),D=new a.b,F=new a.b,I=new a.b,K=new a.b,P=1,h=h.l,d=d.l+1.570796326794897,f=f.l;a.zb.Ph(this.Gb,this.Xb,c.x,c.y,b,h-1.570796326794897,r,v);D.ma(r.l,v.l);a.zb.Ph(this.Gb,this.Xb,n.x,n.y,b,d,x,w);F.ma(x.l,w.l);for(var r=new a.ca(0),v=new a.ca(0),d=new a.ca(0),H=new a.ca(0);;){a.zb.dk(this.Gb,
this.Xb,c.x,c.y,.5*(0+P)*f,h,g,l,this.ke);p.ma(g.l,l.l);a.zb.Rd(this.Gb,this.Xb,c.x,c.y,p.x,p.y,null,null,q,this.ke);a.zb.Ph(this.Gb,this.Xb,p.x,p.y,b,q.l+1.570796326794897,t,B);I.ma(t.l,B.l);a.zb.Rd(this.Gb,this.Xb,D.x,D.y,F.x,F.y,r,v,null,2);a.zb.dk(this.Gb,this.Xb,D.x,D.y,.5*r.l,v.l,z,E,2);K.ma(z.l,E.l);a.zb.Rd(this.Gb,this.Xb,I.x,I.y,K.x,K.y,d,null,null,2);if(d.l<=this.Rm)break;P*=.9;a.zb.dk(this.Gb,this.Xb,c.x,c.y,P*f,h,m,y,this.ke);n.ma(m.l,y.l);a.zb.Rd(this.Gb,this.Xb,c.x,c.y,n.x,n.y,null,
null,H,this.ke);a.zb.Ph(this.Gb,this.Xb,n.x,n.y,b,H.l+1.570796326794897,x,w);F.ma(x.l,w.l)}b=P*f;1E5<b&&(b=1E5);this.Nx=b};b.prototype.sS=function(){var b;b=5E4<this.hb?100:1E4<this.hb?10:1;500>this.hb/b&&(b=this.hb/500);.01>b&&(b=.01);this.Rm=b};return b}();a.pH=c})(z||(z={}));(function(a){var h=function(){function h(){}h.ac=function(c,b){var e=new a.b;e.J(b);c.push(e)};h.$i=function(c,b){c.add(b.x);c.add(b.y)};h.cx=function(c){c.cf(c.size-2)};h.cy=function(c,b){b.ma(c.get(c.size-2),c.get(c.size-
1))};h.oq=function(c,b,e,k,n,d){if(null==c)throw a.g.N();var u=c.D();if(c.s()||a.T.Km(u))return c;var f=new h;f.sg=b;f.wc=a.Ya.Em(b);var g=a.Ya.ft(f.wc);f.Yb=d;f.Gb=a.Ya.Ts(f.wc);f.Xb=g*(2-g);f.Rb=f.wc.Se().Dj;f.jp=f.wc.xq();f.hr=f.jp*f.Rb;f.Bx=k;f.Ax=n;f.ke=e;197==u?(e=new a.Ka(c.description),e.Wc(c,!1)):a.T.Lc(u)?(e=new a.Xa(c.description),e.Bc(c,!0)):e=c;if(4!=f.ke){b=0==f.sg.lc(f.wc)?a.Ya.Wl(e,f.sg,f.wc):a.gh.qo(e,f.wc);if(b.s())return b;b=h.IE(f.Rb,b);b=f.hw(b);b=a.Vn.nl(b,f.wc,f.ke);f=a.Ya.Wl(b,
f.wc,f.sg)}else{2==a.Nf.Am(b)?(c=a.Ya.TN(),b=a.$r.local().$(e,c,b,d),b==c&&(b=new a.Ka,c.copyTo(b))):b=a.gh.qo(e,f.wc);if(b.s())return b;f=f.wS(b)}return f};h.IE=function(c,b){var e=new a.i;b.dd(e);if(3.141592653589793>e.aa()*c)return b;for(var k=!1,e=b.Ca(),n=new a.b,d=new a.b;e.kb();)for(;e.La();){var f=e.ia();n.J(f.Mb());d.J(f.oc());n.scale(c);d.scale(c);if(3.141592653589793<Math.abs(n.x-d.x)){var g=h.Gs(n,d);if(!g){k=!0;break}if(6.283185307179586<Math.abs(n.x-d.x)){k=!0;break}}}if(!k)return b;
var k=b.Pa(),l=1<b.description.Aa,m=new a.b,y=new a.b,p=new a.b,q=new a.b,r=new a.Va;for(e.Lk();e.kb();)for(var v=NaN,x=[0];e.La();){f=e.ia();n.J(f.Mb());d.J(f.oc());n.scale(c);d.scale(c);isNaN(v)?(h.Bd(n.x,NaN,x),y.J(n)):y.J(p);v=y.x;if(g=h.Gs(n,d)){if(6.283185307179586<d.x-n.x)for(;6.283185307179586<d.x-n.x;)d.x-=6.283185307179586;if(-6.283185307179586>d.x-n.x)for(;-6.283185307179586>d.x-n.x;)d.x+=6.283185307179586;h.Bd(d.x,NaN,x);p.J(d)}else m.J(d),h.eK(m),h.Bd(m.x,v,x),p.ma(x[0]+m.x,m.y);.5>Math.abs(p.x-
d.x)&&p.J(d);l?(f.uu(0,r),q.J(y),q.scale(1/c),r.ic(q),(g=e.wl())?k.df(r):k.lineTo(r),e.Jm()&&!b.vc(e.Qa)&&(f.uu(1,r),q.J(p),q.scale(1/c),r.ic(q),k.lineTo(r))):((g=e.wl())&&k.Sw(),f=k.ea()-1,q.J(y),q.scale(1/c),k.kf(f,-1,q),e.Jm()&&!b.vc(e.Qa)&&(q.J(p),q.scale(1/c),k.kf(f,-1,q)))}return k};h.kC=function(c,b,e,k,n,d,f,g,l,m,y,p){var u=new a.b,C=new a.b,G=0<k.compare(n);h.Ez(G,k,n,u,C);h.Jz(c,b,e,u,C,d,NaN,f,g,l,m,null,y,p);G&&h.gy(l,m,null,y)};h.prototype.hw=function(c){var b=c.Pa(),e=c.Ca(),k=[],n=
null,d=null,f=1<c.description.Aa;f&&(n=new a.qd(0),d=new a.Ag);for(var g=[0],l=new a.b,m=new a.b,y=new a.b,p=new a.b;e.kb();)for(g[0]=0;e.La();){var q=e.ia();l.J(q.Mb());m.J(q.oc());l.scale(this.Rb);m.scale(this.Rb);var r=0<l.compare(m);h.Ez(r,l,m,y,p);k.length=0;null!=n&&n.cf(0);0<this.Bx?h.Jz(this.Gb,this.Xb,this.ke,y,p,this.Bx,this.Ax,this.hr,null,null,null,f?n:null,k,g):h.dH(this.Gb,this.Xb,this.ke,y,p,this.Ax,this.hr,f?n:null,k,g);r&&h.gy(null,null,f?n:null,k);k[0].J(q.Mb());k[k.length-1].J(q.oc());
for(var v=1;v<k.length-1;v++)k[v].scale(1/this.Rb);f?(r=h.Cz(r,q,d),h.oz(e.wl(),e.Jm()&&!c.vc(e.Qa),q,r,n,k,b)):h.mz(e.wl(),e.Jm()&&!c.vc(e.Qa),k,b)}return b};h.prototype.wS=function(c){var b=c.Pa(),e=c.Ca(),k=[],n=null,d=new a.Ag,f=1<c.description.Aa;for(f&&(n=new a.qd(0));e.kb();)for(;e.La();){var g=e.ia(),l=g.Mb(),m=g.oc(),l=0<l.compare(m),m=h.Cz(l,g,d);k.length=0;null!=n&&n.cf(0);h.FR(this.Gb,this.Xb,this.Rb,m,this.sg,this.Bx,this.Ax,f?n:null,k);l&&h.gy(null,null,f?n:null,k);f?h.oz(e.wl(),e.Jm()&&
!c.vc(e.Qa),g,m,n,k,b):h.mz(e.wl(),e.Jm()&&!c.vc(e.Qa),k,b)}return b};h.mz=function(c,b,e,a){c&&a.Sw();c=a.ea()-1;var k=e.slice(0);a.dD(c,k,k.length-1);b&&a.kf(c,-1,e[e.length-1])};h.oz=function(c,b,e,k,n,h,d){var u=new a.Va;e.En(u);c?d.df(u):d.lineTo(u);if(2<h.length){c=k.$b();for(var f=1;f<h.length-1;f++){var g=k.AD(n.get(f)*c);k.uu(g,u);u.ic(h[f]);d.lineTo(u)}}b&&(e.Bn(u),d.lineTo(u))};h.Jz=function(c,b,e,k,n,d,f,g,l,m,y,p,q,r){var u=new a.ca(0),C=new a.ca(0),G=new a.ca(0);a.zb.Rd(c,b,k.x,k.y,
n.x,n.y,G,u,C,e);var G=G.l,J=u=u.l,C=C.l;0>J&&(J+=6.283185307179586);0>C&&(C+=6.283185307179586);null!=l&&(l[0]=G);null!=m&&(m[0]=J);null!=y&&(y[0]=C);m=l=NaN;null!=p&&(m=a.u.gg(c,b),y=a.u.q(c,b,k.y),l=(m-y)/G,m=(m+y)/G);y=h.Hs(k,n);var C=h.Fs(k,n),J=y||C,v=h.wz(k,n,g),x=new a.ca(0),V=new a.ca(0),w=new a.b,Z=new a.b,t=new a.b;h.Bd(k.x,NaN,r);var B=[r[0]];if(G<=d)h.ac(q,k),h.Bd(n.x,NaN,r),null!=p&&p.add(0),J?(y&&h.by(k,n,p,q),C&&h.Vx(k,n,p,q)):v?h.Xx(k,n,u,l,m,p,q):0<f&&(Z.ma(k.x-B[0],k.y),w.ma(n.x-
r[0],n.y),h.yv(c,b,e,k,G,u,Z,w,0,1,f,p,q,B)),h.ac(q,n);else{d=1+a.I.truncate(Math.ceil(G/d));var z=G/(d-1),aa=new a.b,E=0;h.ac(q,k);aa.J(k);Z.ma(k.x-r[0],k.y);null!=p&&p.add(0);for(var D=1;D<d;D++){var F;D<d-1?(a.zb.dk(c,b,k.x,k.y,D*z,u,x,V,e),w.ma(x.l,V.l),h.Bd(w.x,aa.x,r),t.ma(r[0]+w.x,w.y),F=D/(d-1)):(h.Bd(n.x,NaN,r),w.ma(n.x-r[0],n.y),t.J(n),F=1);J?(1==D&&y&&h.by(k,t,p,q),D==d-1&&C&&h.Vx(aa,n,p,q)):v?h.uz(aa,t,g)&&(k.x<n.x?aa.x>t.x&&(r[0]+=6.283185307179586,t.ma(r[0]+w.x,w.y)):aa.x<t.x&&(r[0]-=
6.283185307179586,t.ma(r[0]+w.x,w.y)),h.Xx(aa,t,u,l,m,p,q)):0<f&&h.yv(c,b,e,k,G,u,Z,w,E,F,f,p,q,B);h.ac(q,t);null!=p&&p.add(F);aa.J(t);Z.J(w);B[0]=r[0];E=F}}};h.dH=function(c,b,e,k,n,d,f,g,l,m){var u=new a.ca(0),C=new a.ca(0),G=new a.ca(0);a.zb.Rd(c,b,k.x,k.y,n.x,n.y,G,u,C,e);var C=G.l,u=u.l,y=G=NaN;if(null!=g)var y=a.u.gg(c,b),p=a.u.q(c,b,k.y),G=(y-p)/C,y=(y+p)/C;var p=h.Hs(k,n),J=h.Fs(k,n),q=p||J;f=h.wz(k,n,f);var r=h.Gs(k,n),r=q||f||r;h.Bd(k.x,NaN,m);var v=new a.b;h.ac(l,k);v.J(k);null!=g&&g.add(0);
r?(q?(p&&h.by(k,n,g,l),J&&h.Vx(k,n,g,l)):f&&h.Xx(k,n,u,G,y,g,l),h.Bd(n.x,NaN,m),h.ac(l,n)):C<=d?(h.Bd(n.x,NaN,m),h.ac(l,n)):(G=new a.b,f=new a.b,G.J(k),f.J(n),G.x-=m[0],f.x-=m[0],-3.141592653589793>f.x?f.x+=6.283185307179586:3.141592653589793<f.x&&(f.x-=6.283185307179586),h.yv(c,b,e,k,C,u,G,f,0,1,d,g,l,m),h.ac(l,n),h.Bd(n.x,NaN,m));null!=g&&g.add(1)};h.yv=function(c,b,e,k,n,d,f,g,l,m,y,p,q,r){var u=new a.b,C=new a.b;u.ma(f.x+r[0],f.y);new a.ca(0);new a.ca(0);new a.ca(0);new a.ca(0);var G=new a.ca(0),
J=new a.ca(0),v=new a.ca(0),x=new a.b,V=new a.b,w=new a.b,t=new a.b;x.J(f);V.J(g);f=new a.qd(0);g=new a.qd(0);h.$i(f,V);g.add(m);var Z=new a.b,B=new a.yb,z=[];for(h.Kz(4,z);0<f.size;){for(var E=!1,aa,D=NaN,F=0;3>F;F++)if(aa=z[F]*m+(1-z[F])*l,a.zb.dk(c,b,k.x,k.y,aa*n,d,G,J,e),w.ma(G.l,J.l),0==F&&(D=aa,t.J(w)),h.mR(x,w,V,B),B.Kb(B.Gd(w,!0),Z),a.zb.Rd(c,b,w.x,w.y,Z.x,Z.y,v,null,null,2),v.l>y){E=!0;break}E?(V.J(t),m=D,h.$i(f,V),g.add(m)):(h.cx(f),g.oj(g.size-1,1,g.size-1),0<f.size&&(h.Bd(V.x,u.x,r),C.ma(r[0]+
V.x,V.y),h.ac(q,C),u.J(C),null!=p&&p.add(m),x.J(V),l=m,h.cy(f,V),m=g.get(g.size-1)))}};h.FR=function(c,b,e,k,n,d,f,g,l){var u=new a.b,C=new a.b,m=new a.b,G=new a.b,y=new a.b,p=new a.b,J=new a.b,q=new a.b,r=new a.b,v=new a.b,x=new a.ca(0),w=new a.ca(0),t=new a.b,B=[[],[]],z=1==a.Nf.Am(n);n=n.Ko();var E=k.Mb(),D=k.oc();z?(p.ma(E.x*e,E.y*e),J.ma(D.x*e,D.y*e)):(B[0][0]=E.x,B[0][1]=E.y,B[1][0]=D.x,B[1][1]=D.y,a.Ya.tu(),p.x=B[0][0]*e,p.y=B[0][1]*e,J.x=B[1][0]*e,J.y=B[1][1]*e);var F=0,I=0,K=1,P=k.mD();u.J(E);
C.J(D);var D=new a.qd(0),H=new a.qd(0),A=new a.qd(0);h.$i(D,C);h.$i(H,J);A.add(K);h.ac(l,u);null!=g&&g.add(I);var M=[],L;L=0<f?P?5:3:P?5:1;h.Kz(L,M);for(var O=new a.ca(0),Q=new a.ca(0),T=new a.ca(0),N=new a.ca(0),R=new a.ca(0),S=new a.ca(0),Y=new a.ca(0);0<H.size;){var U=!1,X,W=NaN;a.zb.Rd(c,b,p.x,p.y,J.x,J.y,O,Q,null,2);for(E=0;E<L;E++){if(0==E){if(!P&&0>=f&&O.l<=d&&3.141592653589793>Math.abs(p.x-J.x))break;if(k.rA(I,K)<=n)break}X=M[E]*K+(1-M[E])*I;k.Kb(X,m);z?q.ma(m.x*e,m.y*e):(B[0][0]=m.x,B[0][1]=
m.y,a.Ya.tu(),q.x=B[0][0]*e,q.y=B[0][1]*e);if(0==E&&(W=X,y.J(m),v.J(q),0<d&&(O.l>d||3.141592653589793<=Math.abs(p.x-J.x)))){U=!0;break}if(P&&0<d){if(a.zb.Rd(c,b,p.x,p.y,q.x,q.y,T,null,null,2),T.l>d||3.141592653589793<=Math.abs(p.x-q.x)){U=!0;break}}else if(0<f)if(P?(G.OO(u,C,M[E]),z?r.ma(G.x*e,G.y*e):(B[0][0]=G.x,B[0][1]=G.y,a.Ya.tu(),r.x=B[0][0]*e,r.y=B[0][1]*e)):(G.J(m),r.J(q)),a.zb.Rd(c,b,p.x,p.y,r.x,r.y,N,null,null,2),N.l<=O.l){a.zb.dk(c,b,p.x,p.y,N.l,Q.l,x,w,2);t.ma(x.l,w.l);a.zb.Rd(c,b,t.x,
t.y,q.x,q.y,R,null,null,2);if(R.l>f){U=!0;break}if(P){a.zb.Rd(c,b,t.x,t.y,r.x,r.y,S,null,null,2);if(S.l>f){U=!0;break}a.zb.Rd(c,b,r.x,r.y,q.x,q.y,Y,null,null,2);if(Y.l>f){U=!0;break}}}else{U=!0;break}}U?(C.J(y),J.J(v),K=W,h.$i(D,C),h.$i(H,J),A.add(K)):(h.cx(D),h.cx(H),A.oj(A.size-1,1,A.size-1),h.ac(l,C),F+=O.l,null!=g&&g.add(F),0<H.size&&(u.J(C),p.J(J),I=K,h.cy(D,C),h.cy(H,J),K=A.get(A.size-1)))}if(null!=g)for(c=1/F,E=0;E<g.size;E++)g.write(E,g.read(E)*c)};h.gy=function(c,b,e,a){a.reverse();null!=
e&&e.Jp(0,e.size,1);e=null!=c?c[0]:NaN;a=null!=b?b[0]:NaN;null!=c&&(c[0]=a);null!=b&&(b[0]=e)};h.Ez=function(c,b,e,a,n){c?(a.J(e),n.J(b)):(a.J(b),n.J(e))};h.Cz=function(c,b,e){if(!c)return b;e.create(b.D());b.copyTo(e.get());e.get().reverse();return e.get()};h.Bd=function(c,b,e){if(isNaN(b)){for(;3.141592653589793<e[0]-c;)e[0]-=6.283185307179586;for(;3.141592653589793<c-e[0];)e[0]+=6.283185307179586}else 3.141592653589793<e[0]+c-b?e[0]-=6.283185307179586:3.141592653589793<b-(e[0]+c)&&(e[0]+=6.283185307179586)};
h.mR=function(c,b,e,a){3.141592653589793>Math.abs(b.x-c.x)?(a.ed(c),3.141592653589793<=e.x-c.x?a.Ok(e.x-6.283185307179586,e.y):3.141592653589793<=c.x-e.x?a.Ok(e.x+6.283185307179586,e.y):a.Ok(e.x,e.y)):(a.ed(e),3.141592653589793<=c.x-e.x?a.Ok(c.x-6.283185307179586,c.y):3.141592653589793<=e.x-c.x?a.Ok(c.x+6.283185307179586,c.y):a.Ok(c.x,c.y))};h.Kz=function(c,b){for(var e=0;e<c;e++){var a=Math.ceil(e/2)/(c+1);0!=e%2&&(a=-a);b[e]=.5+a}};h.Hs=function(c,b){return a.j.S(c.y,1.570796326794897)&&!a.j.S(b.y,
1.570796326794897)||a.j.S(c.y,-1.570796326794897)&&!a.j.S(b.y,-1.570796326794897)?!0:!1};h.Fs=function(c,b){return a.j.S(b.y,1.570796326794897)&&!a.j.S(c.y,1.570796326794897)||a.j.S(b.y,-1.570796326794897)&&!a.j.S(c.y,-1.570796326794897)?!0:!1};h.wz=function(c,b,e){return!h.uz(c,b,e)||a.j.S(c.y,1.570796326794897)||a.j.S(c.y,-1.570796326794897)||a.j.S(b.y,1.570796326794897)||a.j.S(b.y,-1.570796326794897)?!1:!0};h.uz=function(c,b,e){return Math.abs(Math.abs(c.x-b.x)-3.141592653589793)<=e?!0:!1};h.Gs=
function(c,b){return a.j.S(c.y,1.570796326794897)&&a.j.S(b.y,1.570796326794897)||a.j.S(c.y,-1.570796326794897)&&a.j.S(b.y,-1.570796326794897)?!0:!1};h.by=function(c,b,e,k){if(0<c.y){var n=new a.b;n.ma(b.x,1.570796326794897)}else n=new a.b,n.ma(b.x,-1.570796326794897);a.j.S(c.x,n.x)||a.j.S(b.y,n.y)||(h.ac(k,n),null!=e&&e.add(0))};h.Vx=function(c,b,e,k){if(0<b.y){var n=new a.b;n.ma(c.x,1.570796326794897)}else n=new a.b,n.ma(c.x,-1.570796326794897);a.j.S(b.x,n.x)||a.j.S(c.y,n.y)||(h.ac(k,n),null!=e&&
e.add(1))};h.Xx=function(c,b,e,k,n,d,f){a.j.Vc(e)?(0<1.570796326794897-c.y&&(e=new a.b,e.ma(c.x,1.570796326794897),h.ac(f,e),null!=d&&d.add(k)),0<1.570796326794897-b.y&&(e=new a.b,e.ma(b.x,1.570796326794897),h.ac(f,e),null!=d&&d.add(k))):(0<1.570796326794897+c.y&&(e=new a.b,e.ma(c.x,-1.570796326794897),h.ac(f,e),null!=d&&d.add(n)),0<1.570796326794897+b.y&&(e=new a.b,e.ma(b.x,-1.570796326794897),h.ac(f,e),null!=d&&d.add(n)))};h.eK=function(c){if(-3.141592653589793>c.x)for(;-3.141592653589793>c.x;)c.x+=
6.283185307179586;if(3.141592653589793<c.x)for(;3.141592653589793<c.x;)c.x-=6.283185307179586};return h}();a.ui=h})(z||(z={}));(function(a){var h=function(){function h(){}h.nl=function(c,b,e){if(null==c||null==b||!a.Ya.Qo(b))throw a.g.N();if(c.s())return c;var k=c,n=k.D();if(a.T.Kc(n)){k=a.gh.qo(c,b);c=new a.i;k.o(c);for(var n=a.Ia.zd(b,c,!1),d=a.Ya.Fm(b),f=Math.floor((c.v-d.v)/d.aa())*d.aa()+d.v;f<c.B;)f>c.v+n&&f<c.B-n&&(k=a.gh.Rw(k,b,e,f)),f+=d.aa()}else{if(197==n)return c=new a.Ka(k.description),
c.Wc(k,!1),h.nl(c,b,e);if(a.T.Lc(n))return c=new a.Xa(k.description),c.Bc(k,!0),h.nl(c,b,e)}return h.VG(k,b)};h.VG=function(c,b){if(null==c||null==b||!a.Ya.Qo(b))throw a.g.N();if(c.s())return c;var e;e=c.D();197==e?(e=new a.Ka(c.description),e.Wc(c,!1)):a.T.Lc(e)?(e=new a.Xa(c.description),e.Bc(c,!0)):e=c;e=a.gh.qo(e,b);return e.s()?e:1==a.Nf.Am(b)?a.gh.aN(e,b,e!=c):h.SG(e,b,e!=c)};h.SG=function(c,b,e){if(!a.Ya.Qo(b))throw a.g.N();if(c.s())return c;var k=a.Ya.IC(b),n=0-180*k,k=360*k;2==a.Nf.Am(b)&&
(n=a.Ya.Fm(b),k=n.B,n=n.v,k-=n);return a.gh.gC(c,n,k,b,e)};return h}();a.Vn=h})(z||(z={}));(function(a){var h=function(){function h(){}h.OH=function(c,b){var e=Math.abs(c%b);return isNaN(e)||e==c||e<=Math.abs(b)/2?e:0>c?-1*(e-b):0<c?1*(e-b):0*(e-b)};h.H=function(c){return 0>c?-c:c};h.nb=function(c,b){return 0<=b?h.H(c):-h.H(c)};h.S=function(c,b){return c==b||h.H(c-b)<=h.bF*(1+(h.H(c)+h.H(b))/2)};h.Vc=function(c){return 0==c||h.H(c)<=h.bF};h.bs=function(c){c=h.OH(c,h.fv);return h.H(c)<=h.$g?c:0>c?
c+h.fv:c-h.fv};h.Yz=function(c,b){c.l=h.bs(c.l);b.l=h.bs(b.l);h.H(b.l)>h.Vr&&(c.l=h.bs(c.l+h.$g),b.l=h.nb(h.$g,b.l)-b.l)};h.gg=function(c,b){b=Math.sqrt(1-b);b=(1-b)/(1+b);var e=b*b;return c/(1+b)*(1+e*(.25+e*(.015625+1/256*e)))*h.Vr};h.pN=function(c,b,e,k,n){var d,f,g,l,m,p,y,q=0,r=p=0,v=0,x=0,w=0;m=0;var t,B,z;y=0;var E,D,F;z=new a.ca;d=new a.ca;if(null!=n)if(z.l=c,d.l=b,h.Yz(z,d),c=z.l,b=d.l,z.l=e,d.l=k,h.Yz(z,d),e=z.l,k=d.l,e=h.bs(e-c),h.S(b,k)&&(h.Vc(e)||h.S(h.H(b),h.Vr)))null!=n&&(n.l=0);else{if(h.S(b,
-k)){if(h.S(h.H(b),h.Vr)){null!=n&&(n.l=2*h.gg(6378137,.0066943799901413165));return}if(h.S(h.H(e),h.$g)){null!=n&&(n.l=2*h.gg(6378137,.0066943799901413165));return}}if(h.Vc(.0066943799901413165))x=Math.cos(b),w=Math.cos(k),null!=n&&(q=Math.sin((k-b)/2),p=Math.sin(e/2),y=2*Math.asin(Math.sqrt(q*q+x*w*p*p)),n.l=6378137*y);else{z=1-Math.sqrt(.9933056200098587);c=1-z;d=Math.atan(c*Math.tan(b));b=Math.sin(d);d=Math.cos(d);f=Math.atan(c*Math.tan(k));k=Math.sin(f);f=Math.cos(f);l=g=e;D=0;F=1;E=e;for(B=
!0;1==B;)D+=1,1==F&&(m=Math.sin(E),p=Math.cos(E),q=f*m,y=d*k-b*f*p,q=Math.sqrt(q*q+y*y),p=b*k+d*f*p,y=Math.atan2(q,p),r=1E-15>h.H(q)?d*f*m/h.nb(1E-15,q):d*f*m/q,v=1-r*r,x=1E-15>h.H(v)?p-b*k/h.nb(1E-15,v)*2:p-b*k/v*2,w=x*x,m=((-3*v+4)*z+4)*v*z/16),t=(1-m)*z*(y+m*q*(x+p*m*(2*w-1))),1==F?(E=e+t*r,1E-14>h.H(E-l)?B=!1:h.H(E)>h.$g?(F=2,E=h.$g,0>e&&(E=-E),r=0,v=1,g=l=2,y=h.$g-h.H(Math.atan(b/d)+Math.atan(k/f)),q=Math.sin(y),p=Math.cos(y),m=((-3*v+4)*z+4)*v*z/16,1E-14>h.H(r-g)?B=!1:(x=1E-15>h.H(v)?p-b*k/
h.nb(1E-15,v)*2:p-b*k/v*2,w=x*x)):(0>(E-l)*(l-g)&&5<D&&(E=(2*E+3*l+g)/6),g=l,l=E)):(r=(E-e)/t,0>(r-l)*(l-g)&&5<D&&(r=(2*r+3*l+g)/6),g=l,l=r,v=1-r*r,m=r*q/(d*f),p=-Math.sqrt(h.H(1-m*m)),E=Math.atan2(m,p),q=f*m,y=d*k-b*f*p,q=Math.sqrt(q*q+y*y),p=b*k+d*f*p,y=Math.atan2(q,p),m=((-3*v+4)*z+4)*v*z/16,1E-14>h.H(r-g)?B=!1:(x=1E-15>h.H(v)?p-b*k/h.nb(1E-15,v)*2:p-b*k/v*2,w=x*x));null!=n&&(r=Math.sqrt(1+(1/(c*c)-1)*v),r=(r-1)/(r+1),v=r*(1-.375*r*r),n.l=(1+r*r/4)/(1-r)*c*6378137*(y-v*q*(x+v/4*(p*(-1+2*w)-v/6*
x*(-3+4*q*q)*(-3+4*w)))))}}};h.$g=3.141592653589793;h.Vr=1.5707963267948966;h.fv=6.283185307179586;h.bF=3.552713678800501E-15;return h}();a.nH=h})(z||(z={}));(function(a){var h=function(){function a(){}a.prototype.uv=function(c){this.hi=c};a.prototype.GA=function(c){this.Ab=c};a.prototype.HA=function(c){this.nn=c};a.vB=function(c){return c.s()||1607!=c.D()&&1736!=c.D()?!1:!0};a.tB=function(c){return c.s()||1607!=c.D()&&1736!=c.D()||20>c.F()?!1:!0};a.uB=function(c){return c.s()||1607!=c.D()&&1736!=
c.D()||20>c.F()?!1:!0};return a}();a.Wj=h})(z||(z={}));(function(a){var h=function(){function h(){}h.FH=function(c){var b=new a.Ka;b.Uy(c.R.v,c.R.C);b.wj(c.R.v,c.R.G);b.wj(c.R.B,c.R.G);b.wj(c.R.B,c.R.C);return b};h.aT=function(c,b){var e=a.wi.local();c=new a.Pc(c);return e.$(c,b,null).next()};h.ll=function(c,b,e){return a.Zr.local().$(c,b,e,null)};h.On=function(c,b,e){return a.dv.local().$(c,b,e,null)};h.MS=function(c,b,e){var k=a.dv.local();c=new a.Pc(c);b=new a.Pc(b);e=k.$(c,b,e,null);for(k=[];null!=
(b=e.next());)k.push(b);return k};h.lc=function(c,b,e){return a.bl.local().$(3,c,b,e,null)};h.nM=function(c,b,e){return a.bl.local().$(4,c,b,e,null)};h.QO=function(c,b,e){var k=a.$r.local();c=new a.Pc(c);b=new a.Pc(b);e=k.$(c,b,e,null);for(k=[];null!=(b=e.next());)k.push(b);return k};h.kM=function(c,b,e){var k=a.Zr.local();c=new a.Pc(c);b=new a.Pc(b);e=k.$(c,b,e,null);for(k=[];null!=(b=e.next());)k.push(b);return k};h.Ga=function(c,b,e){return a.$r.local().$(c,b,e,null)};h.jT=function(c,b,e){return a.bl.local().$(2,
c,b,e,null)};h.contains=function(c,b,e){return a.bl.local().$(1,c,b,e,null)};h.VL=function(c,b,e){return a.bl.local().$(16,c,b,e,null)};h.touches=function(c,b,e){return a.bl.local().$(8,c,b,e,null)};h.tQ=function(c,b,e){return a.bl.local().$(32,c,b,e,null)};h.RO=function(c,b,e){return a.bl.local().$(1073741824,c,b,e,null)};h.py=function(c,b,e,k){return a.fI.local().$(c,b,e,k,null)};h.Fb=function(c,b,e,k){var n=null;if(null!=e){if(n=e.Se(),null!=k&&n.Qc()!=k.Qc()&&n.Nc!=k.Nc)throw a.g.cj();}else if(null!=
k)throw a.g.N();c=a.ZH.local().$(c,b,null);null!==n&&null!==k&&(c=a.Tb.ih(c,n,k));return c};h.clip=function(c,b,e){return a.SH.local().$(c,a.i.Oa(b.R.v,b.R.C,b.R.B,b.R.G),e,null)};h.xm=function(c,b,e){if(null==c||null==b)return null;c=a.UH.local().$(!0,c,b,e,null);for(b=[];null!=(e=c.next());)e.s()||b.push(e);return b.slice(0)};h.rK=function(c,b,e,k,n,d,f,g){if(!0===n)return h.VP(c,b,e,k,d,f,g);n=e;if(null!=b){if(f=b.Se(),null!=k&&f.Qc()!=k.Qc()){if(f.Nc!=k.Nc)throw a.g.cj();n=[];a.Tb.OB(e,e.length,
k,f,n)}}else if(null!=k)throw a.g.N();e=a.Oz.local();if(d){c=new a.Pc(c);b=e.$(c,b,n,d,null);for(c=[];null!=(d=b.next());)c.push(d);d=c.slice(0)}else for(d=[],k=0;k<c.length;k++)d[k]=e.$(c[k],b,n[k],null);return d};h.VP=function(c,b,e,k,n,h,d){if(null===b)throw a.g.N();if(null===k||void 0===k)k=4326!==b.Qc()?b.Se():a.Tb.Qd(9001);if(0!==k.Nc)throw a.g.N();a.Tb.OB(e,e.length,k,a.Tb.Qd(9001),e);k=a.Tz.local();if(n){c=new a.Pc(c);b=k.$(c,b,h,e,d,!1,n,null);for(e=[];null!=(h=b.next());)e.push(h);n=e.slice(0)}else{n=
[];for(var u=0;u<c.length;u++)n[u]=k.$(c[u],b,h,e[u],d,!1,null)}return n};h.buffer=function(c,b,e,k,n,h,d){var u=e;if(!1===n){if(null!=b){if(n=b.Se(),null!=k&&n.Qc()!=k.Qc()){if(n.Nc!=k.Nc)throw a.g.cj();u=a.Tb.ih(e,k,n)}}else if(null!=k)throw a.g.N();c=a.Oz.local().$(c,b,u,null)}else{if(null===b)throw a.g.N();if(null===k||void 0===k)k=4326!==b.Qc()?b.Se():a.Tb.Qd(9001);if(0!==k.Nc)throw a.g.N();u=a.Tb.ih(e,k,a.Tb.Qd(9001));c=a.Tz.local().$(c,b,h,u,d,!1,null)}return c};h.sQ=function(c,b,e,k,n,h,d){if(null!=
b){var u=b.Se();if(null!=d&&u.Qc()!=d.Qc()){if(u.Nc!=d.Nc)throw a.g.cj();e=a.Tb.ih(e,d,u)}}else if(null!=d)throw a.g.N();c=new a.Pc(c);b=a.Wz.local().$(c,b,e,k,n,h,null);for(e=[];null!=(k=b.next());)e.push(k);return e.slice(0)};h.offset=function(c,b,e,k,n,h,d){if(null!=b){var u=b.Se();if(null!=d&&u.Qc()!=d.Qc()){if(u.Nc!=d.Nc)throw a.g.cj();e=a.Tb.ih(e,d,u)}}else if(null!=d)throw a.g.N();return a.Wz.local().$(c,b,e,k,n,h,null)};h.JL=function(c){return a.Qz.local().$(c,null)};h.KL=function(c,b){var e=
a.Qz.local();c=new a.Pc(c);e=e.$(c,b,null);for(c=[];null!=(b=e.next());)c.push(b);return c};h.zw=function(c,b,e){return a.bv.local().zw(c,b,e)};h.Aw=function(c,b){return a.bv.local().Aw(c,b)};h.Bw=function(c,b,e,k){return a.bv.local().Bw(c,b,e,k)};h.Qy=function(c,b){return a.as.local().$(c,b,!1,null)};h.cP=function(c,b){return a.as.local().Ro(c,b,null)};h.fN=function(c,b,e,k,n){var h=a.Sz.local();if(null!=b){if(b=b.Se(),null!=n&&b.Qc()!=n.Qc()){if(b.Nc!=n.Nc)throw a.g.cj();e=a.Tb.ih(e,n,b)}}else if(null!=
n)throw a.g.N();return h.$(c,e,k,null)};h.oq=function(c,b,e,k){var n=a.WH.local();if(null!=b){if(b=b.Se(),null!=k&&b.Qc()!=k.Qc()){if(b.Nc!=k.Nc)throw a.g.cj();e=a.Tb.ih(e,k,b)}}else if(null!=k)throw a.g.N();return n.$(c,e,null)};h.fw=function(c,b,e,k,n){void 0===n&&(n=0);var h=a.aI.local();if(4==n)throw a.g.qe();if(0!==n)throw a.g.qe();if(null!=b){var d=b.Se();if(null!=k&&d.Qc()!=k.Qc()){if(d.Nc!=k.Nc)throw a.g.cj();e=a.Tb.ih(e,k,d)}}else if(null!=k)throw a.g.N();return h.$(c,e,b,n,null)};h.jN=function(c,
b,e,k){if(null===c)return 0;if(4==k)throw a.g.qe();if(0!==k)throw a.g.qe();if(197==c.D())c=h.FH(c);else if(1736!=c.D())return 0;k=a.Ya.Em(b);c=a.Ya.Wl(c,b,k);c=a.oH.kN([c])[0];if(null!==e){if(2!==e.Nc)throw a.g.N("Unit must be a area unit type");c=a.Tb.ih(c,a.Tb.Qd(109404),e)}return c};h.nN=function(c,b,e,k){c=a.cI.local().$(c,b,k,null);if(null!==e){if(0!==e.Nc)throw a.g.N("Unit must be a linear unit type");c=a.Tb.ih(c,a.Tb.Qd(9001),e)}return c};h.BQ=function(c,b,e){if(null===c)return 0;var k=null;
if(null!=b){k=b.Se();if(0==k.Nc&&(k=a.Tb.PC(k),null==k&&null!==e))throw a.g.N();if(null!=e&&k.Qc()!=e.Qc()&&k.Nc!=e.Nc)throw a.g.cj();}else if(null!=e)throw a.g.N();return 1736==c.D()||197==c.D()?(c=c.Mh(),null!==e?a.Tb.ih(c,k,e):c):0};h.CQ=function(c,b,e){if(null===c||c.s()||1>c.fb())return 0;var k=null;if(null!=b){if(k=b.Se(),null!=e&&k.Qc()!=e.Qc()&&k.Nc!=e.Nc)throw a.g.cj();}else if(null!=e)throw a.g.N();1736==c.D()||197==c.D()?b=c.Rf():a.T.Lc(c.D())?(b=new a.Xa(c.description),b.Bc(c,!0)):b=c;
c=0;b=b.Ca();for(var n=new a.b,h=new a.b;b.kb();)for(;b.La();){var d=b.ia();d.ht(n);d.uw(h);c+=a.b.Fb(n,h)}null!==k&&null!==e&&(c=a.Tb.ih(c,k,e));return c};h.YT=function(c,b){return a.Nf.mN(c,b)};h.IL=function(c){return void 0!==c.points?h.kH(c,void 0===c.hasZ?!1:c.hasZ,void 0===c.hasM?!1:c.hasM):void 0!==c.rings?h.Nz(c.rings,void 0===c.hasZ?!1:c.hasZ,void 0===c.hasM?!1:c.hasM,"P"):void 0!==c.paths?h.Nz(c.paths,void 0===c.hasZ?!1:c.hasZ,void 0===c.hasM?!1:c.hasM,"L"):void 0!==c.x?h.uH(c):void 0!==
c.xmin?h.hH(c):null};h.uH=function(c){if(null==c.x||"NaN"==c.x)return new a.Va;var b=new a.Va(c.x,c.y);void 0!==c.z&&null!==c.z&&b.rS(c.z);void 0!==c.m&&null!==c.m&&b.bS(c.m);return b};h.hH=function(c){if(null==c.xmin||"NaN"==c.xmin)return new a.Vj;var b=new a.Vj(c.xmin,c.ymin,c.xmax,c.ymax);void 0!==c.zmin&&null!==c.zmin&&b.setInterval(1,0,c.zmin,c.zmax);void 0!==c.mmin&&null!==c.mmin&&b.setInterval(2,0,c.mmin,c.mmax);return b};h.kH=function(c,b,e){var k=0,n=new a.pe,h=3*c.points.length;0!=h%2&&
h++;2>h&&(h=2);var d=a.I.truncate(3*c.points.length/2);4>d?d=4:16>d&&(d=16);for(var h=a.Ac.kl(h,0),f=a.Ac.kl(d),d=a.Ac.kl(d),g=0;g<c.points.length;g++)h.write(2*g,c.points[g][0]),h.write(2*g+1,c.points[g][1]),f.write(g,b||e?c.points[g][2]:NaN),d.write(g,e&&b?c.points[g][3]:NaN),k++;0!=k&&(n.resize(k),n.bm(0,h));b&&(n.Ne(1),n.bm(1,f));e&&(n.Ne(2),n.bm(2,0==b?f:d));n.ce(16777215);return n};h.Nz=function(c,b,e,k){var n,h=0,d=2;"P"==k?(n=new a.Ka,h=1,d=3):n=new a.Xa;for(var f=a.Ac.Dg(0),g=a.Ac.to(0),
l=0,m=0,p=[],y=[],q=0;q<c.length;q++){var r=c[q].length;p[q]=!1;if("P"===k&&c[q][0][0]===c[q][c[q].length-1][0]&&c[q][0][1]===c[q][c[q].length-1][1]){var v=0==e?!0:c[q][0][3]===c[q][c[q].length-1][3]||void 0===c[q][0][3]&&void 0===c[q][c[q].length-1][3];(0==b||c[q][0][2]===c[q][c[q].length-1][2]||void 0===c[q][0][2]&&void 0===c[q][c[q].length-1][2])&&v&&(p[q]=!0,--r)}r>=d?(y[q]=!1,m+=1,f.add(l),g.add(h),l+=r):y[q]=!0}k=3*l;0!=k%2&&k++;2>k&&(k=2);q=a.I.truncate(3*l/2);4>q?q=4:16>q&&(q=16);k=a.Ac.kl(k,
0);h=a.Ac.kl(q);d=a.Ac.kl(q);for(q=r=0;q<c.length;q++)if(!1===y[q])for(v=0;v<c[q].length;v++){var x=!1;v===c[q].length-1&&!0===p[q]&&(x=!0);x||(k.write(2*r,c[q][v][0]),k.write(2*r+1,c[q][v][1]),h.write(r,b||e?c[q][v][2]:NaN),d.write(r,e&&b?c[q][v][3]:NaN),r++)}0!=l&&(c=n,f.resize(m),g.resize(m),0<l&&(f.add(l),g.add(0)),c.bm(0,k),c.NF(g),c.OF(f));b&&(n.Ne(1),n.bm(1,h));e&&(n.Ne(2),n.bm(2,0==b?h:d));n.ce(16777215);return n};return h}();a.Pb=h})(z||(z={}));(function(a){var h=function(){function a(){}
a.Zk=function(c){var b=0,e=0,a=c.length,n=c[e],h;for(e;e<a-1;e++)h=c[e+1],b+=(h[0]-n[0])*(h[1]+n[1]),n=h;return 0<=b};a.rotate=function(c,b,e){b=b*Math.PI/180;var k=Math.cos(b),n=Math.sin(b);if(void 0!==c.paths){b={paths:[]};for(var h=0;h<c.paths.length;h++){for(var d=c.paths[h],f=[],g=0;g<d.length;g++){var l=d[g].slice(0);f.push(l);var m=k*(d[g][0]-e.x)-n*(d[g][1]-e.y)+e.x,p=n*(d[g][0]-e.x)+k*(d[g][1]-e.y)+e.y;l[0]=m;l[1]=p}b.paths.push(f)}return b}if(void 0!==c.rings){b={rings:[]};for(h=0;h<c.rings.length;h++){for(var d=
c.rings[h],f=[],y=a.Zk(d),g=0;g<d.length;g++)l=d[g].slice(0),f.push(l),m=k*(d[g][0]-e.x)-n*(d[g][1]-e.y)+e.x,p=n*(d[g][0]-e.x)+k*(d[g][1]-e.y)+e.y,l[0]=m,l[1]=p;a.Zk(f)!==y&&f.reverse();b.rings.push(f)}return b}if(void 0!==c.x)return b={x:k*(c.x-e.x)-n*(c.y-e.y)+e.x,y:n*(c.x-e.x)+k*(c.y-e.y)+e.y},void 0!==c.z&&(b.z=c.z),void 0!==c.m&&(b.m=c.m),b;if(void 0!==c.points){b={points:[]};c=c.points;for(g=0;g<c.length;g++)h=c[g].slice(0),h[0]=k*(c[g][0]-e.x)-n*(c[g][1]-e.y)+e.x,h[1]=n*(c[g][0]-e.x)+k*(c[g][1]-
e.y)+e.y,b.points.push(h);return b}return null};a.eC=function(c,b){var e,k;if(void 0!==c.paths){e={paths:[]};for(var n=0;n<c.paths.length;n++){for(var h=c.paths[n],d=[],f=0;f<h.length;f++){var g=h[f].slice(0);d.push(g);k=b.x-h[f][0];g[0]=h[f][0]+2*k}e.paths.push(d)}return e}if(void 0!==c.rings){e={rings:[]};for(n=0;n<c.rings.length;n++){for(var h=c.rings[n],l=a.Zk(h),d=[],f=0;f<h.length;f++)g=h[f].slice(0),d.push(g),k=b.x-h[f][0],g[0]=h[f][0]+2*k;a.Zk(d)!==l&&d.reverse();e.rings.push(d)}return e}if(void 0!==
c.x)return k=b.x-c.x,e={x:c.x+2*k,y:c.y},void 0!==c.z&&(e.z=c.z),void 0!==c.m&&(e.m=c.m),e;if(void 0!==c.points){e={points:[]};n=c.points;for(f=0;f<n.length;f++)h=n[f].slice(0),k=b.x-h[0],h[0]+=2*k,e.points.push(h);return e}return void 0!==c.xmin?(e={v:c.xmin,C:c.ymin,B:c.xmax,G:c.ymax},void 0!==c.zmin&&(e.zmin=c.zmin,e.zmax=c.zmax),void 0!==c.mmin&&(e.mmin=c.mmin,e.mmax=c.mmax),k=b.x-c.xmin,e.xmax=c.xmin+2*k,k=b.x-c.xmax,e.xmin=c.xmax+2*k,e):null};a.fC=function(c,b){var e,k;if(void 0!==c.paths){e=
{paths:[]};for(var n=0;n<c.paths.length;n++){for(var h=c.paths[n],d=[],f=0;f<h.length;f++){var g=h[f].slice(0);d.push(g);k=b.y-h[f][1];g[1]=h[f][1]+2*k}e.paths.push(d)}return e}if(void 0!==c.rings){e={rings:[]};for(n=0;n<c.rings.length;n++){for(var h=c.rings[n],l=a.Zk(h),d=[],f=0;f<h.length;f++)g=h[f].slice(0),d.push(g),k=b.y-h[f][1],g[1]=h[f][1]+2*k;a.Zk(d)!==l&&d.reverse();e.rings.push(d)}return e}if(void 0!==c.x)return k=b.y-c.y,e={y:c.y+2*k,x:c.x},void 0!==c.z&&(e.z=c.z),void 0!==c.m&&(e.m=c.m),
e;if(void 0!==c.points){e={points:[]};n=c.points;for(f=0;f<n.length;f++)h=n[f].slice(0),k=b.y-h[1],h[1]+=2*k,e.points.push(h);return e}return void 0!==c.xmin?(e={v:c.xmin,C:c.ymin,B:c.xmax,G:c.ymax},void 0!==c.zmin&&(e.zmin=c.zmin,e.zmax=c.zmax),void 0!==c.mmin&&(e.mmin=c.mmin,e.mmax=c.mmax),k=b.y-c.ymin,e.ymax=c.ymin+2*k,k=b.y-c.ymax,e.ymin=c.ymax+2*k,e):null};return a}();a.Wn=h})(z||(z={}));(function(a){var h=function(){function h(){}h.jg=function(c,b){null==b&&(b=a.Od.Tf());switch(c){case 33:return new a.Va(b);
case 322:return new a.yb(b);case 197:return new a.Vj(b);case 550:return new a.pe(b);case 1607:return new a.Xa(b);case 1736:return new a.Ka(b);default:throw a.g.ra("invalid argument.");}};return h}();a.sH=h})(z||(z={}));(function(a){var h=function(){function h(c,b){this.De=a.ga.Yc(c,-1);this.oa=new a.Ur;this.tk=b}h.prototype.wR=function(c){this.oa.Dr(Math.min(this.De.size,c));this.oa.$l(c)};h.prototype.addElement=function(c,b){if(void 0===b)return this.JJ(c);b=a.I.truncate(b%this.De.size);var e=this.De.get(b);
-1==e&&(e=this.oa.jh(),this.De.set(b,e));return this.oa.addElement(e,c)};h.prototype.JJ=function(c){var b=this.tk.vw(c),b=a.I.truncate(b%this.De.size),e=this.De.get(b);-1==e&&(e=this.oa.jh(),this.De.set(b,e));return this.oa.addElement(e,c)};h.prototype.Jc=function(c,b){if(void 0===b)this.dM(c);else{b=a.I.truncate(b%this.De.size);var e=this.De.get(b);if(-1==e)throw a.g.N();for(var k=this.oa.gc(e),n=-1;-1!=k;){var h=this.oa.bb(k);this.oa.da(k)==c?(this.oa.Jc(e,n,k),-1==this.oa.gc(e)&&(this.oa.Fg(e),
this.De.set(b,-1))):n=k;k=h}}};h.prototype.dM=function(c){var b=this.tk.vw(c),b=a.I.truncate(b%this.De.size),e=this.De.get(b);if(-1==e)throw a.g.N();for(var k=this.oa.gc(e),n=-1;-1!=k;){var h=this.oa.bb(k);this.oa.da(k)==c?(this.oa.Jc(e,n,k),-1==this.oa.gc(e)&&(this.oa.Fg(e),this.De.set(b,-1))):n=k;k=h}};h.prototype.DN=function(c){c=a.I.truncate(c%this.De.size);c=this.De.get(c);return-1==c?-1:this.oa.gc(c)};h.prototype.SN=function(c){return this.oa.bb(c)};h.prototype.kd=function(c){var b=this.tk.vw(this.da(c)),
b=a.I.truncate(b%this.De.size),e=this.De.get(b);if(-1==e)throw a.g.N();for(var k=this.oa.gc(e),n=-1;-1!=k;){if(k==c){this.oa.Jc(e,n,k);-1==this.oa.gc(e)&&(this.oa.Fg(e),this.De.set(b,-1));return}n=k;k=this.oa.bb(k)}throw a.g.N();};h.prototype.da=function(c){return this.oa.da(c)};h.prototype.clear=function(){this.De=a.ga.Yc(this.De.size,-1);this.oa.clear()};h.prototype.size=function(){return this.oa.HC()};return h}();a.AH=h})(z||(z={}));(function(a){var h=function(){function h(){this.ci=new a.Fc(3);
this.oa=new a.Fc(6);this.AP=!1;this.Wd=-1}h.prototype.bk=function(c){this.ci.Jc(c)};h.prototype.ou=function(){return this.ci.be()};h.prototype.Rs=function(c){this.oa.Jc(c)};h.prototype.Yx=function(){return this.oa.be()};h.prototype.Jy=function(c,b){this.ci.L(c,1,b)};h.prototype.Gu=function(c,b){this.ci.L(c,2,b)};h.prototype.aS=function(c,b){this.ci.L(c,3,b)};h.prototype.Hy=function(c,b){this.oa.L(c,4,b)};h.prototype.dS=function(c,b){this.oa.L(c,3,b)};h.prototype.RF=function(c,b){this.oa.L(c,2,b)};
h.prototype.jh=function(c){var b=this.Yx();this.oa.L(b,3,this.Wd);this.oa.L(b,4,0);this.oa.L(b,5,c);-1!=this.Wd&&this.RF(this.Wd,b);return this.Wd=b};h.prototype.Fg=function(c){this.CB(c);var b=this.oa.O(c,2),e=this.oa.O(c,3);-1!=b?this.dS(b,e):this.Wd=e;-1!=e&&this.RF(e,b);this.Rs(c);return e};h.prototype.Dr=function(c){this.oa.de(c)};h.prototype.DC=function(c){return this.oa.O(c,5)};h.prototype.$R=function(c,b){this.oa.L(c,5,b)};h.prototype.addElement=function(c,b){return this.AO(c,b)};h.prototype.AO=
function(c,b){var e=this.ou();this.Gu(e,-1);-1==this.oa.O(c,0)&&this.oa.L(c,0,e);var a=this.oa.O(c,1);this.Jy(e,a);-1!=a&&this.Gu(a,e);this.oa.L(c,1,e);this.setData(e,b);this.Hy(c,this.vq(c)+1);this.AP&&this.aS(e,c);return e};h.prototype.Jc=function(c,b){var e=this.ge(b),a=this.bb(b);-1!=e?this.Gu(e,a):this.oa.L(c,0,a);-1!=a?this.Jy(a,e):this.oa.L(c,1,e);this.bk(b);this.Hy(c,this.vq(c)-1);return a};h.prototype.$l=function(c){this.ci.de(c)};h.prototype.getData=function(c){return this.ci.O(c,0)};h.prototype.setData=
function(c,b){this.ci.L(c,0,b)};h.prototype.bb=function(c){return this.ci.O(c,2)};h.prototype.ge=function(c){return this.ci.O(c,1)};h.prototype.gc=function(c){return this.oa.O(c,0)};h.prototype.tc=function(c){return this.oa.O(c,1)};h.prototype.clear=function(){for(var c=this.Wd;-1!=c;)c=this.Fg(c)};h.prototype.CB=function(c){for(var b=this.tc(c);-1!=b;){var e=b,b=this.ge(e);this.bk(e)}this.oa.L(c,0,-1);this.oa.L(c,1,-1);this.Hy(c,0)};h.prototype.s=function(){return 0==this.ci.size};h.prototype.HC=
function(){return this.ci.size};h.prototype.vq=function(c){return this.oa.O(c,4)};h.prototype.Cw=function(c){return this.oa.O(c,3)};return h}();a.$n=h})(z||(z={}));(function(a){var h=function(){function h(c){void 0===c?(this.bg=new a.Fc(2),this.oa=new a.Fc(4),this.Wd=-1,this.Bt=!0):(this.bg=new a.Fc(2),this.oa=new a.Fc(c?4:2),this.Wd=-1,this.Bt=c)}h.prototype.bk=function(c){this.bg.Jc(c)};h.prototype.ou=function(){return this.bg.be()};h.prototype.Rs=function(c){this.oa.Jc(c)};h.prototype.Yx=function(){return this.oa.be()};
h.prototype.jh=function(){var c=this.Yx();this.Bt&&(this.oa.L(c,3,this.Wd),-1!=this.Wd&&this.oa.L(this.Wd,2,c),this.Wd=c);return c};h.prototype.Fg=function(c){for(var b=this.gc(c);-1!=b;){var e=b,b=this.bb(b);this.bk(e)}this.Bt&&(b=this.oa.O(c,2),e=this.oa.O(c,3),-1!=b?this.oa.L(b,3,e):this.Wd=e,-1!=e&&this.oa.L(e,2,b));this.Rs(c)};h.prototype.Dr=function(c){this.oa.de(c)};h.prototype.addElement=function(c,b){var e=this.oa.O(c,1),a=this.ou();-1!=e?this.bg.L(e,1,a):this.oa.L(c,0,a);this.oa.L(c,1,a);
this.bg.L(a,0,b);return a};h.prototype.$l=function(c){this.bg.de(c)};h.prototype.Jc=function(c,b,e){-1!=b?(this.bg.L(b,1,this.bg.O(e,1)),this.oa.O(c,1)==e&&this.oa.L(c,1,b)):(this.oa.L(c,0,this.bg.O(e,1)),this.oa.O(c,1)==e&&this.oa.L(c,1,-1));this.bk(e)};h.prototype.Qv=function(c,b){var e=this.oa.O(c,1),a=this.oa.O(b,0);-1!=a&&(-1!=e?this.bg.L(e,1,a):this.oa.L(c,0,a),this.oa.L(c,1,this.oa.O(b,1)));this.Bt&&(e=this.oa.O(b,2),a=this.oa.O(b,3),-1!=e?this.oa.L(e,3,a):this.Wd=a,-1!=a&&this.oa.L(a,2,e));
this.Rs(b)};h.prototype.da=function(c){return this.bg.O(c,0)};h.prototype.Vi=function(c,b){this.bg.L(c,0,b)};h.prototype.bb=function(c){return this.bg.O(c,1)};h.prototype.gc=function(c){return this.oa.O(c,0)};h.prototype.Dm=function(c){return this.da(this.gc(c))};h.prototype.clear=function(){this.bg.Nh(!0);this.oa.Nh(!0);this.Wd=-1};h.prototype.s=function(c){return void 0===c?0==this.bg.size:-1==this.oa.O(c,0)};h.prototype.HC=function(){return this.bg.size};h.prototype.Cw=function(c){return this.oa.O(c,
3)};return h}();a.Ur=h})(z||(z={}));(function(a){var h=function(){function h(){}h.kz=function(c,b,e,k,n,d,f){var u=new a.b;u.J(c);c=new a.b;c.J(b);n.vv(u);n.vv(c);b=n.ms(u);var g=n.ms(c);0==g&&(g=n.CC());if(u.x!=c.x&&(u.y!=c.y||u.y!=n.C&&u.y!=n.G)||g>b!=d){b=n.vA(u);var g=n.vA(c),C,l=d?1:3;do b=b+l&3,C=n.vu(b),0!=f&&(k=h.kz(u,C,e,k,n,d,f)),e[k++].ma(C.x,C.y),u=C;while((b&3)!=g);0!=f&&(k=h.kz(u,c,e,k,n,d,f))}else if(n=new a.b,n.ma(c.x-u.x,c.y-u.y),0!=f&&(f=a.I.truncate(n.yJ()/f),0<f))for(n.scale(1/
(f+1)),d=0;d<f;d++)u.add(n),e[k++].ma(u.x,u.y);return k};h.zd=function(c,b,e){b=b.lv();c=null!=c&&void 0!==c.Ko?c.Ko():0;e&&(b*=4,c*=1.1);return Math.max(c,b)};h.As=function(c){return 2*Math.sqrt(2)*c};h.UJ=function(c){return Math.sqrt(2)*c};h.Cg=function(c,b,e){var k=new a.i;b.o(k);return h.zd(c,k,e)};h.rB=function(c,b,e){b=b.Ah(1,0).lv();c=null!=c?c.Ko():0;e&&(b*=4,c*=1.1);return Math.max(c,b)};h.$T=function(c,b){var e=new a.i;c.dd(e);e.Db(b);return e};h.$s=function(c,b){var e=new a.i;c.dd(e);c=
new a.i;b.dd(c);e.Db(c);return e};h.fU=function(c,b){var e=c.HN(b),k=c.Ea(b),n=c.Dc(b),h=c.Fa(e);e==k?(n=c.Fa(n-1),e=c.Fa(k+1)):e==n-1?(n=c.Fa(e-1),e=c.Fa(k)):(n=c.Fa(e-1),e=c.Fa(e+1));h=a.b.yn(n,h,e);return 0==h?0<c.oo(b):-1==h};h.CK=function(c){var b=new a.i;c.dd(b);if(b.s())return null;var e=new a.co(b,8),k=-1,n=new a.i,h=!1;do for(var d=0,f=c.ea();d<f;d++)if(c.Ti(d,n),k=e.kt(d,n,k),-1==k){if(h)throw a.g.ra("internal error");c.tm(b,!1);h=!0;e.reset(b,8);break}else h=!1;while(h);return e};h.nB=
function(c){var b=new a.i;c.dd(b);for(var e=new a.co(b,8),k=-1,n=c.Ca(),h=new a.i,d=!1;n.kb();)for(;n.La();){var f=n.ia(),g=n.Jb();f.o(h);k=e.kt(g,h,k);if(-1==k){if(d)throw a.g.wa();c.tm(b,!1);d=!0;e.reset(b,8);n.Lk();break}}return e};h.ij=function(c,b){var e=new a.i;c.dd(e);for(var k=new a.co(e,8),n=-1,h=new a.i,d=c.Ca(),f=!1;d.kb();)for(;d.La();){var g=d.ia(),l=d.Jb();g.o(h);if(h.jc(b)&&(n=k.kt(l,h,n),-1==n)){if(f)throw a.g.ra("internal error.");c.tm(e,!1);f=!0;k.reset(e,8);d.Lk();break}}return k};
h.DT=function(c){var b=new a.i;c.dd(b);for(var e=new a.co(b,8),k=new a.b,n=new a.i,h=!1,d=0;d<c.F();d++)if(c.w(d,k),n.K(k),-1==e.lg(d,n)){if(h)throw a.g.wa();c.tm(b,!1);h=!0;e.reset(b,8);d=-1}return e};h.oB=function(c,b){for(var e=new a.co(b,8),k=new a.b,n=!1,h=new a.i,d=0;d<c.F();d++)if(c.w(d,k),b.contains(k)&&(h.K(k),-1==e.lg(d,h))){if(n)throw a.g.wa();n=!0;d=new a.i;c.tm(d,!1);e.reset(d,8);d=-1}return e};h.AN=function(c,b,e){var k=new a.i,n=new a.i;c.dd(k);b.dd(n);k.P(e,e);n.P(e,e);var h=new a.i;
h.K(k);h.Ga(n);c=c.Ca();b=b.Ca();var d=new a.sz;d.YF(e);var f=!1;for(d.jG();c.kb();)for(;c.La();)c.ia().o(k),k.jc(h)&&(f=!0,e=new a.i,e.K(k),d.OA(c.Jb(),e));d.$B();if(!f)return null;k=!1;for(d.iG();b.kb();)for(;b.La();)b.ia().o(n),n.jc(h)&&(k=!0,e=new a.i,e.K(n),d.LA(b.Jb(),e));d.ZB();return k?d:null};h.BN=function(c,b,e,k,n){var h=c.D(),d=b.D(),f=new a.i,g=new a.i;c.dd(f);b.dd(g);f.P(e,e);g.P(e,e);var l=new a.i;l.K(f);l.Ga(g);var m=new a.sz;m.YF(e);var p=!1;m.jG();var q=0;for(e=c.ea();q<e;q++)if(!k||
1736!=h||c.qt(q))c.Ti(q,f),f.jc(l)&&(p=!0,m.OA(q,f));m.$B();if(!p)return null;c=!1;m.iG();k=0;for(e=b.ea();k<e;k++)if(!n||1736!=d||b.qt(k))b.Ti(k,g),g.jc(l)&&(c=!0,m.LA(k,g));m.ZB();return c?m:null};h.hU=function(c,b){return 0<c.rj(b)};h.zT=function(c,b){var e=new a.i;c.hR(b,e);var e=new a.co(e,8),k=-1,n=new a.i;c=c.Ca();c.vy(b);if(c.kb())for(;c.La();){b=c.ia();var h=c.Jb();b.dd(n);k=e.kt(h,n,k);if(-1==k)throw a.g.ra("internal error");}return e};return h}();a.Ia=h})(z||(z={}));(function(a){var h=
function(){function b(b){this.Na=b}b.prototype.compare=function(b,c,a){b=b.da(a);a=this.Na.uj(c);var k=this.Na.uj(b);return a<k?-1:a==k?e.Po(c)&&e.st(b)?-1:e.Po(b)&&e.st(c)?1:0:1};return b}(),d=function(){function b(b){this.Na=b}b.prototype.Zp=function(b,c,e){this.Na.yS(e,b,c)};b.prototype.Mo=function(b){return this.Na.uj(b)};return b}(),c;(function(b){b[b.initialize=0]="initialize";b[b.pIn=1]="pIn";b[b.pL=2]="pL";b[b.pR=3]="pR";b[b.pT=4]="pT";b[b.right=5]="right";b[b.left=6]="left";b[b.all=7]="all"})(c||
(c={}));var b=function(){function b(){this.Na=null;this.gi=new a.Nd;this.ug=new a.ga(0);this.$f=[0,0]}b.prototype.Ch=function(b,c){this.gi.qa=b.qa-c;this.gi.va=b.va+c;this.ug.resize(0);this.Ud=0;this.$f[0]=0};b.prototype.uy=function(b,c,e){if(b>c)throw a.g.N();this.gi.qa=b-e;this.gi.va=c+e;this.ug.resize(0);this.Ud=0;this.$f[0]=0};b.prototype.Fn=function(b,c){this.gi.qa=b-c;this.gi.va=b+c;this.ug.resize(0);this.Ud=0;this.$f[0]=0};b.prototype.next=function(){if(!this.Na.Vo)throw a.g.xa();if(0>this.Ud)return-1;
for(var b=!0;b;)switch(this.$f[this.Ud]){case 1:b=this.uQ();break;case 2:b=this.vQ();break;case 3:b=this.wQ();break;case 4:b=this.xQ();break;case 5:b=this.BR();break;case 6:b=this.sP();break;case 7:b=this.XJ();break;case 0:b=this.Qw();break;default:throw a.g.wa();}return-1!=this.pg?this.Bo()>>1:-1};b.JT=function(c,e,a){var k=new b;k.Na=c;k.ug.xb(20);k.Ch(e,a);return k};b.KT=function(c,e,a){var k=new b;k.Na=c;k.ug.xb(20);k.Fn(e,a);return k};b.Oa=function(c){var e=new b;e.Na=c;e.ug.xb(20);e.Ud=-1;return e};
b.prototype.Qw=function(){this.pg=this.YD=this.di=this.yc=-1;if(null!=this.Na.Yd&&0<this.Na.Yd.size)return this.$f[0]=1,this.di=this.Na.Ze,!0;this.Ud=-1;return!1};b.prototype.uQ=function(){this.yc=this.di;if(-1==this.yc)return this.pg=this.Ud=-1,!1;var b=this.Na.Co(this.yc);if(this.gi.va<b)return b=this.Na.tj(this.yc),this.di=this.Na.Di(this.yc),-1!=b&&(this.vh=this.Na.gk(b),this.$f[++this.Ud]=6),!0;if(b<this.gi.qa)return b=this.Na.tj(this.yc),this.di=this.Na.sj(this.yc),-1!=b&&(this.vh=this.Na.uq(b),
this.$f[++this.Ud]=5),!0;this.$f[this.Ud]=2;this.YD=this.yc;b=this.Na.tj(this.yc);this.di=this.Na.Di(this.yc);-1!=b&&(this.vh=this.Na.gk(b),this.$f[++this.Ud]=7);return!0};b.prototype.vQ=function(){this.yc=this.di;if(-1==this.yc)return this.$f[this.Ud]=3,this.di=this.Na.sj(this.YD),!0;if(this.Na.Co(this.yc)<this.gi.qa){var b=this.Na.tj(this.yc);this.di=this.Na.sj(this.yc);-1!=b&&(this.vh=this.Na.uq(b),this.$f[++this.Ud]=5);return!0}b=this.Na.tj(this.yc);this.di=this.Na.Di(this.yc);-1!=b&&(this.vh=
this.Na.gk(b),this.$f[++this.Ud]=7);b=this.Na.sj(this.yc);-1!=b&&this.ug.add(b);return!0};b.prototype.wQ=function(){this.yc=this.di;if(-1==this.yc)return this.$f[this.Ud]=4,!0;if(this.gi.va<this.Na.Co(this.yc)){var b=this.Na.tj(this.yc);this.di=this.Na.Di(this.yc);-1!=b&&(this.vh=this.Na.gk(b),this.$f[++this.Ud]=6);return!0}b=this.Na.tj(this.yc);this.di=this.Na.sj(this.yc);-1!=b&&(this.vh=this.Na.gk(b),this.$f[++this.Ud]=7);b=this.Na.Di(this.yc);-1!=b&&this.ug.add(b);return!0};b.prototype.xQ=function(){if(0==
this.ug.size)return this.pg=this.Ud=-1,!1;this.yc=this.ug.get(this.ug.size-1);this.ug.resize(this.ug.size-1);var b=this.Na.tj(this.yc);-1!=b&&(this.vh=this.Na.gk(b),this.$f[++this.Ud]=7);-1!=this.Na.Di(this.yc)&&this.ug.add(this.Na.Di(this.yc));-1!=this.Na.sj(this.yc)&&this.ug.add(this.Na.sj(this.yc));return!0};b.prototype.sP=function(){this.pg=this.vh;if(-1!=this.pg&&e.Po(this.Bo())&&this.Na.uj(this.Bo())<=this.gi.va)return this.vh=this.GC(),!1;this.Ud--;return!0};b.prototype.BR=function(){this.pg=
this.vh;if(-1!=this.pg&&e.st(this.Bo())&&this.Na.uj(this.Bo())>=this.gi.qa)return this.vh=this.bO(),!1;this.Ud--;return!0};b.prototype.XJ=function(){this.pg=this.vh;if(-1!=this.pg&&e.Po(this.Bo()))return this.vh=this.GC(),!1;this.Ud--;return!0};b.prototype.GC=function(){return this.Na.Df?this.Na.If.bb(this.pg):this.Na.ki.bb(this.pg)};b.prototype.bO=function(){return this.Na.Df?this.Na.If.ge(this.pg):this.Na.ki.ge(this.pg)};b.prototype.Bo=function(){return this.Na.Df?this.Na.If.da(this.pg):this.Na.ki.getData(this.pg)};
return b}();a.IT=b;var e=function(){function c(b){this.Al=this.rh=this.If=this.ki=this.Hl=this.Ki=this.Yd=this.Li=null;this.Df=b;this.Vo=this.Dt=!1}c.prototype.Vp=function(){this.Rj(!0)};c.prototype.gq=function(b,c){if(!this.Dt)throw a.g.xa();this.Li.push(new a.Nd(b,c))};c.prototype.wo=function(){if(!this.Dt)throw a.g.ra("invalid call");this.Dt=!1;this.Vo=!0;this.Df||(this.BO(),this.Jt=this.Li.length)};c.prototype.lg=function(b){if(!this.Df||!this.Vo)throw a.g.N("invalid call");if(-1==this.Ze){var c=
this.Li.length;if(this.nx){var e=new a.ga(0);e.xb(2*c);this.$E(e);this.rh.xb(2*c);this.rh.resize(0);this.ZE(e);this.Hl.resize(c,-1);this.Hl.dh(-1,0,c);this.nx=!1}else this.Hl.dh(-1,0,c);this.Ze=this.Ms()}c=this.cD(b<<1,this.Ze);e=this.If.addElement((b<<1)+1,this.Hw(c));this.TF(c,e);this.Hl.set(b,c);this.Jt++};c.prototype.remove=function(b){if(!this.Df||!this.Vo)throw a.g.ra("invalid call");var c=this.Hl.get(b);if(-1==c)throw a.g.N("the interval does not exist in the interval tree");this.Hl.set(b,
-1);this.Jt--;var e=this.Hw(c),k;k=this.If.hO(e);this.If.kd(this.LN(c),e);this.If.kd(this.eO(c),e);b=this.If.size(e);0==b&&(this.If.fM(e),this.WF(k,-1));this.Ki.Jc(c);for(var e=this.JC(k),n=this.Di(k),h=this.sj(k),c=0;!(0<b||k==this.Ze||-1!=n&&-1!=h);)k==this.Di(e)?-1!=n?(this.Sj(e,n),this.Xi(n,e),this.Sj(k,-1)):-1!=h?(this.Sj(e,h),this.Xi(h,e),this.Uj(k,-1)):this.Sj(e,-1):-1!=n?(this.Uj(e,n),this.Xi(n,e),this.Sj(k,-1)):-1!=h?(this.Uj(e,h),this.Xi(h,e),this.Uj(k,-1)):this.Uj(e,-1),this.Xi(k,-1),c++,
k=e,e=this.tj(k),b=-1!=e?this.If.size(e):0,n=this.Di(k),h=this.sj(k),e=this.JC(k)};c.prototype.reset=function(){if(!this.Df||!this.Vo)throw a.g.N("invalid call");this.Rj(!1)};c.prototype.size=function(){return this.Jt};c.prototype.Re=function(){return b.Oa(this)};c.prototype.$E=function(b){for(var c=this.Li.length,e=0;e<2*c;e++)b.add(e);this.zS(b,2*c)};c.prototype.ZE=function(b){for(var c=NaN,e=0;e<b.size;e++){var a=b.get(e),k=this.uj(a);k!=c&&(this.rh.add(a),c=k)}};c.prototype.BO=function(){var b=
this.Li.length,c=new a.ga(0);c.xb(2*b);this.$E(c);this.rh.xb(2*b);this.rh.resize(0);this.ZE(c);this.Ki.de(b);this.ki.$l(2*b);var e=a.Ac.Dg(b);e.dh(-1,0,b);this.Ze=this.Ms();for(b=0;b<c.size;b++){var k=c.get(b),h=e.get(k>>1);-1!=h?this.TF(h,this.ki.addElement(this.Hw(h),k)):(h=this.cD(k,this.Ze),e.set(k>>1,h))}};c.prototype.cD=function(b,c){var e=c,k=c,n,h=-1,d=0,f=this.rh.size-1,u=0,g=b>>1,l=NaN,m=NaN;n=!0;for(var p=this.RN(g),g=this.ON(g);n;){d<f?(u=d+a.I.truncate((f-d)/2),-1==this.rw(e)&&this.CF(e,
this.rh.get(u),this.rh.get(u+1))):-1==this.rw(e)&&this.CF(e,this.rh.get(d),this.rh.get(d));var q=this.Co(e);if(g<q)-1!=c&&(c==e?(k=e,l=q,c=this.Di(e),-1!=c?m=this.Co(c):m=NaN):m>q&&(q<l?this.Sj(k,e):this.Uj(k,e),this.Uj(e,c),this.Df&&(this.Xi(e,k),this.Xi(c,e)),k=e,l=q,c=-1,m=NaN)),f=this.MN(e),-1==f&&(f=this.Ms(),this.YR(e,f)),e=f,f=u;else if(p>q)-1!=c&&(c==e?(k=e,l=q,c=this.sj(e),-1!=c?m=this.Co(c):m=NaN):m<q&&(q<l?this.Sj(k,e):this.Uj(k,e),this.Sj(e,c),this.Df&&(this.Xi(e,k),this.Xi(c,e)),k=e,
l=q,c=-1,m=NaN)),d=this.fO(e),-1==d&&(d=this.Ms(),this.iS(e,d)),e=d,d=u+1;else{n=this.tj(e);-1==n&&(n=this.TL(e),this.WF(e,n));var y=this.KJ(n,b),h=this.SL();this.lS(h,n);this.XR(h,y);e!=c&&(q<l?this.Sj(k,e):this.Uj(k,e),this.Df&&this.Xi(e,k),-1!=c&&(m<q?this.Sj(e,c):this.Uj(e,c),this.Df&&this.Xi(c,e)));n=!1}}return h};c.prototype.Ms=function(){return this.Yd.be()};c.prototype.TL=function(b){return this.Df?this.If.nq(b):this.ki.jh(b)};c.prototype.SL=function(){return this.Ki.be()};c.prototype.Rj=
function(b){b?(this.Dt=this.nx=!0,this.Vo=!1,null==this.rh?this.rh=a.Ac.Dg(0):this.rh.resize(0),null==this.Li?this.Li=[]:this.Li.length=0):this.nx=!1;this.Df?null==this.Hl?(this.Hl=a.Ac.Dg(0),this.If=new a.bj,this.If.Hn(new h(this))):this.If.clear():null==this.ki?this.ki=new a.$n:this.ki.clear();null==this.Yd?(this.Ki=new a.Fc(3),this.Yd=new a.Fc(this.Df?8:7)):(this.Ki.Nh(!1),this.Yd.Nh(!1));this.Ze=-1;this.Jt=0};c.prototype.CF=function(b,c,e){this.SR(b,c);this.TR(b,e)};c.prototype.Co=function(b){var c=
this.rw(b);if(-1==c)return NaN;c=this.uj(c);b=this.uj(this.wN(b));return c==b?c:.5*(c+b)};c.prototype.SR=function(b,c){this.Yd.L(b,0,c)};c.prototype.TR=function(b,c){this.Yd.L(b,1,c)};c.prototype.YR=function(b,c){this.Yd.L(b,3,c)};c.prototype.iS=function(b,c){this.Yd.L(b,4,c)};c.prototype.WF=function(b,c){this.Yd.L(b,2,c)};c.prototype.Sj=function(b,c){this.Yd.L(b,5,c)};c.prototype.Uj=function(b,c){this.Yd.L(b,6,c)};c.prototype.Xi=function(b,c){this.Yd.L(b,7,c)};c.prototype.lS=function(b,c){this.Ki.L(b,
0,c)};c.prototype.KJ=function(b,c){return this.Df?this.If.addElement(c,b):this.ki.addElement(b,c)};c.prototype.XR=function(b,c){this.Ki.L(b,1,c)};c.prototype.TF=function(b,c){this.Ki.L(b,2,c)};c.prototype.gk=function(b){return this.Df?this.If.gc(b):this.ki.gc(b)};c.prototype.uq=function(b){return this.Df?this.If.tc(b):this.ki.tc(b)};c.Po=function(b){return 0==(b&1)};c.st=function(b){return 1==(b&1)};c.prototype.rw=function(b){return this.Yd.O(b,0)};c.prototype.wN=function(b){return this.Yd.O(b,1)};
c.prototype.tj=function(b){return this.Yd.O(b,2)};c.prototype.MN=function(b){return this.Yd.O(b,3)};c.prototype.fO=function(b){return this.Yd.O(b,4)};c.prototype.Di=function(b){return this.Yd.O(b,5)};c.prototype.sj=function(b){return this.Yd.O(b,6)};c.prototype.JC=function(b){return this.Yd.O(b,7)};c.prototype.Hw=function(b){return this.Ki.O(b,0)};c.prototype.LN=function(b){return this.Ki.O(b,1)};c.prototype.eO=function(b){return this.Ki.O(b,2)};c.prototype.RN=function(b){return this.Li[b].qa};c.prototype.ON=
function(b){return this.Li[b].va};c.prototype.zS=function(b,c){null==this.Al&&(this.Al=new a.Rr);var e=new d(this);this.Al.sort(b,0,c,e)};c.prototype.yS=function(b,e,a){var k=this;b.xd(e,a,function(b,e){var a=k.uj(b),h=k.uj(e);return a<h||a==h&&c.Po(b)&&c.st(e)?-1:1})};c.prototype.uj=function(b){var e=this.Li[b>>1];return c.Po(b)?e.qa:e.va};return c}();a.bq=e})(z||(z={}));(function(a){var h=function(h){function c(b,c,k,n){h.call(this);void 0===b?this.description=a.Od.Tf():void 0===k?this.description=
b:(this.description=a.Od.Tf(),this.Ny(b,c),this.Ok(k,n))}I(c,h);c.prototype.D=function(){return 322};c.prototype.$b=function(){var b=this.na-this.la,c=this.ja-this.ha;return Math.sqrt(b*b+c*c)};c.prototype.mg=function(b){var c=this.na-this.la,a=this.ja-this.ha;return Math.sqrt(c*c+a*a)<=b};c.prototype.mD=function(){return!1};c.prototype.Pf=function(){var b=new a.b;b.pc(this.oc(),this.Mb());return b};c.prototype.Fp=function(b){b.Ja();b.Qf(this.description);var c=new a.i;this.o(c);b.Cu(c);for(var c=
1,k=this.description.Aa;c<k;c++)for(var n=this.description.Hd(c),h=a.pa.Wa(n);c<h;c++){var d=this.Ah(n,0);b.setInterval(n,0,d)}};c.prototype.o=function(b){b.K(this.na,this.ja,this.la,this.ha);b.normalize()};c.prototype.Cn=function(b){b.Ja();b.Db(this.na,this.ja,this.yd(0,1,0));b.Db(this.la,this.ha,this.yd(1,1,0))};c.prototype.Oe=function(b){if(b instanceof a.Bg){this.qc();var c=new a.b;c.x=this.na;c.y=this.ja;b.Zi(c,c);this.na=c.x;this.ja=c.y;c.x=this.la;c.y=this.ha;b.Zi(c,c);this.la=c.x;this.ha=
c.y}else this.qc(),c=new a.ee,c.x=this.na,c.y=this.ja,c.z=this.yd(0,1,0),c=b.Qn(c),this.na=c.x,this.ja=c.y,this.om(0,1,0,c.z),c.x=this.la,c.y=this.ha,c.z=this.yd(1,1,0),c=b.Qn(c),this.la=c.x,this.ha=c.y,this.om(1,1,0,c.z)};c.prototype.Pa=function(){return new c(this.description)};c.prototype.kv=function(b,c){return(this.la-b-(this.na-b))*(this.ha-c+(this.ja-c))*.5};c.prototype.Ru=function(b){return b*this.$b()};c.prototype.AD=function(b){return b/this.$b()};c.prototype.sC=function(b){return a.vi.ut(this.na,
this.la,b)};c.prototype.vN=function(b){return a.vi.ut(this.ja,this.ha,b)};c.prototype.xm=function(b,c){var e=new a.Ag;this.Bi(b,c,e);return e.get()};c.prototype.Bi=function(b,c,k){if(null==k)throw a.g.N();k.mq();k=k.get();k.Qf(this.description);var e=new a.b;this.Kb(b,e);k.Ny(e.x,e.y);this.Kb(c,e);k.Ok(e.x,e.y);for(var e=1,h=this.description.Aa;e<h;e++)for(var d=this.description.Fd(e),f=a.pa.Wa(d),g=0;g<f;g++){var l=this.ld(b,d,g);k.My(d,g,l);l=this.ld(c,d,g);k.Cy(d,g,l)}};c.prototype.ld=function(b,
c,k){if(0==c)return 0==k?this.Kb(b).x:this.Kb(b).y;switch(a.pa.JN(c)){case 0:return.5>b?this.gt(c,k):this.Ws(c,k);case 1:var e=this.gt(c,k);c=this.Ws(c,k);return a.vi.ut(e,c,b);case 2:throw a.g.ra("not implemented");}throw a.g.wa();};c.prototype.Gd=function(b,c){var e=this.la-this.na,a=this.ha-this.ja,h=e*e+a*a;if(0==h)return.5;e=((b.x-this.na)*e+(b.y-this.ja)*a)/h;c||(0>e?e=0:1<e&&(e=1));return e};c.prototype.nt=function(b,c,a,h){if(b){b=this.ha-this.ja;if(0==b)return c==this.ha?-1:0;c=(c-this.ja)/
b;if(0>c||1<c)return 0;null!=a&&(a[0]=this.sC(c))}else{b=this.la-this.na;if(0==b)return c==this.la?-1:0;c=(c-this.na)/b;if(0>c||1<c)return 0;null!=a&&(a[0]=this.vN(c))}null!=h&&(h[0]=c);return 1};c.prototype.xe=function(b,c){var e=this.ha-this.ja;if(0==e)return b==this.ha?c:NaN;e=(b-this.ja)/e;b=this.sC(e);1==e&&(b=this.la);return b};c.prototype.qs=function(b,c,a){return 0<=this.ho(b.x,b.y,c,a)};c.prototype.Kh=function(b,c,a){return 0<=this.ho(b,c,a,!0)};c.prototype.Eq=function(b,c){return this.qs(b,
c,!1)};c.prototype.KE=function(){if(this.ha<this.ja||this.ha==this.ja&&this.la<this.na){var b=this.na;this.na=this.la;this.la=b;b=this.ja;this.ja=this.ha;this.ha=b;for(var b=0,c=this.description.up-2;b<c;b++){var a=this.fa[b];this.fa[b]=this.fa[b+c];this.fa[b+c]=a}}};c.prototype.rs=function(b,c){b=a.b.Oa(b,c);b.sub(this.Mb());c=new a.b;c.pc(this.oc(),this.Mb());var e=c.Ai(b);b=8.881784197001252E-16*(Math.abs(c.x*b.y)+Math.abs(c.y*b.x));return e>b?-1:e<-b?1:0};c.prototype.ho=function(b,c,k,h){var e=
this.na,n=this.ja,d=b-e,f=c-n,d=Math.sqrt(d*d+f*f);if(d<=Math.max(k,6.661338147750939E-16*d))return h&&0==d?NaN:0;d=b-this.la;f=c-this.ha;d=Math.sqrt(d*d+f*f);if(d<=Math.max(k,6.661338147750939E-16*d))return h&&0==d?NaN:1;d=this.la-this.na;f=this.ha-this.ja;h=Math.sqrt(d*d+f*f);if(0<h){var g=1/h,d=d*g,f=f*g,l=b-e,m=c-n,p=l*d+m*f,q=1.7763568394002505E-15*(Math.abs(l*d)+Math.abs(m*f)),y=d,d=-f,f=y,q=Math.max(k,q);if(p<-q||p>h+q)return NaN;if(Math.abs(l*d+m*f)<=Math.max(k,1.7763568394002505E-15*(Math.abs(l*
d)+Math.abs(m*f)))&&(d=a.I.Kr(p*g,0,1),.5>=d?(f=this.na+(this.la-this.na)*d,h=this.ja+(this.ha-this.ja)*d):(f=this.la-(this.la-this.na)*(1-d),h=this.ha-(this.ha-this.ja)*(1-d)),a.b.Yv(f,h,b,c)<=k)){if(.5>d){if(a.b.Yv(f,h,e,n)<=k)return 0}else if(a.b.Yv(f,h,this.la,this.ha)<=k)return 1;return d}}return NaN};c.prototype.lc=function(b){return null==b?!1:b==this?!0:b.constructor!==this.constructor?!1:this.sJ(b)};c.prototype.AA=function(b,c,k){var e=k?this.na:this.la;k=k?this.ja:this.ha;var h=new a.b;
h.x=b.la-e;h.y=b.ha-k;return c.ml(h)>6.661338147750939E-16*c.uA(h)?(h.x=b.na-e,h.y=b.ja-k,c.ml(h)<=6.661338147750939E-16*c.uA(h)):!0};c.prototype.zA=function(b){var c=new a.b;c.x=this.la-this.na;c.y=this.ha-this.ja;if(!this.AA(b,c,!1))return!1;c.Bp();return this.AA(b,c,!0)?!0:!1};c.ye=function(b,c){var e=b.rs(c.na,c.ja),a=b.rs(c.la,c.ha);if(0>e&&0>a||0<e&&0<a)return!1;e=c.rs(b.na,b.ja);a=c.rs(b.la,b.ha);if(0>e&&0>a||0<e&&0<a)return!1;e=b.$b();a=c.$b();return e>a?b.zA(c):c.zA(b)};c.Id=function(b,c,
k){var e=a.b.Oa(NaN,NaN),h=b.la-b.na,d=b.ha-b.ja,f=c.la-c.na,g=c.ha-c.ja,l=f*d-h*g;if(0==l)return e;var m=8.881784197001252E-16*(Math.abs(f*d)+Math.abs(h*g)),p=c.na-b.na,q=c.ja-b.ja,y=f*q-p*g,r=y/l,v=Math.abs(l),f=(8.881784197001252E-16*(Math.abs(f*q)+Math.abs(p*g))*v+m*Math.abs(y))/(l*l)+2.220446049250313E-16*Math.abs(r);if(r<-f||r>1+f)return e;g=h*q-p*d;f=g/l;h=(8.881784197001252E-16*(Math.abs(h*q)+Math.abs(p*d))*v+m*Math.abs(g))/(l*l)+2.220446049250313E-16*Math.abs(f);if(f<-h||f>1+h)return e;r=
a.I.Kr(r,0,1);h=a.I.Kr(f,0,1);d=b.Kb(r);l=c.Kb(h);m=new a.b;m.pc(d,l);if(m.length()>k&&(m.add(d,l),m.scale(.5),r=b.Gd(m,!1),h=c.Gd(m,!1),b=b.Kb(r),c=c.Kb(h),b.sub(c),b.length()>k))return e;e.ma(r,h);return e};c.xJ=function(b,e,a,h){var k=0;if(b.na==e.na&&b.ja==e.ja||b.na==e.la&&b.ja==e.ha)if(k++,!h)return 1;if(b.la==e.na&&b.ha==e.ja||b.la==e.la&&b.ha==e.ha){k++;if(2==k)return 2;if(!h)return 1}return e.Kh(b.na,b.ja,a)||e.Kh(b.la,b.ha,a)||b.Kh(e.na,e.ja,a)||b.Kh(e.la,e.ha,a)?1:h&&0!=k?0:0==c.ye(b,e)?
0:1};c.ov=function(b,e,k,h,d,f){var n=0,u=b.ho(e.na,e.ja,f,!1),g=b.ho(e.la,e.ha,f,!1),l=e.ho(b.na,b.ja,f,!1),m=e.ho(b.la,b.ha,f,!1);isNaN(u)||(null!=h&&(h[n]=u),null!=d&&(d[n]=0),null!=k&&(k[n]=a.b.Oa(e.na,e.ja)),n++);isNaN(g)||(null!=h&&(h[n]=g),null!=d&&(d[n]=1),null!=k&&(k[n]=a.b.Oa(e.la,e.ha)),n++);2==n||isNaN(l)||0==u&&0==l||0==g&&1==l||(null!=h&&(h[n]=0),null!=d&&(d[n]=l),null!=k&&(k[n]=a.b.Oa(b.na,b.ja)),n++);2==n||isNaN(m)||1==u&&0==m||1==g&&1==m||(null!=h&&(h[n]=1),null!=d&&(d[n]=m),null!=
k&&(k[n]=a.b.Oa(e.la,e.ha)),n++);if(0<n)return 2==n&&null!=h&&h[0]>h[1]&&(b=h[0],h[0]=h[1],h[1]=b,null!=d&&(h=d[0],d[0]=d[1],d[1]=h),null!=k&&(d=a.b.Oa(k[0].x,k[0].y),k[0]=k[1],k[1]=d)),n;n=c.Id(b,e,f);if(isNaN(n.x))return 0;null!=k&&(k[0]=b.Kb(n.x));null!=h&&(h[0]=n.x);null!=d&&(d[0]=n.y);return 1};c.prototype.TC=function(){return 0};c.prototype.eo=function(){};c.prototype.toString=function(){return"Line: ["+this.na.toString()+", "+this.ja.toString()+", "+this.la.toString()+", "+this.ha.toString()+
"]"};return c}(a.fA);a.yb=h})(z||(z={}));(function(a){var h=function(){function a(){this.Gl=[];this.ua=-1}a.prototype.ya=function(){return this.ua};a.prototype.next=function(){if(null!=this.Gl&&0!=this.Gl.length){this.ua++;var c=this.Gl[0];1>=this.Gl.length?this.Gl=[]:this.Gl=this.Gl.slice(1);return c}return this.Gl=null};return a}();a.MT=h})(z||(z={}));(function(a){(function(a){a[a.enumFillRuleOddEven=0]="enumFillRuleOddEven";a[a.enumFillRuleWinding=1]="enumFillRuleWinding"})(a.qI||(a.qI={}));var h=
function(h){function c(b,c){h.call(this);this.Yf=!1;this.np=null;this.ap=this.bp=0;this.Uh=null;this.ng=!1;this.td=this.li=this.Fe=this.qb=this.jb=null;this.gp=this.Qa=this.cp=0;if(void 0===c)this.Yf=b,this.ng=!1,this.ta=this.ap=this.bp=this.cp=0,this.description=a.Od.Tf();else{if(null==c)throw a.g.N();this.Yf=b;this.ng=!1;this.ta=this.ap=this.bp=this.cp=0;this.description=c}this.Uh=null;this.Qa=0}I(c,h);c.prototype.Hm=function(){return 0<this.cp};c.prototype.nv=function(){this.qc();null==this.np?
this.np=new a.Va(this.description):this.np.Qf(this.description)};c.prototype.Uy=function(b,c){var e=new a.b;e.x=b;e.y=c;this.Nr(e)};c.prototype.Nr=function(b){this.nv();this.np.ic(b);this.ng=!0};c.prototype.df=function(b){if(b.s())throw a.g.N();this.Ik(b.description);this.nv();b.copyTo(this.np);this.ng=!0};c.prototype.iv=function(){var b=1;this.ng&&(this.nv(),null==this.jb?(this.jb=a.Ac.Dg(2),this.jb.write(0,0),this.qb=a.Ac.to(2,0)):(this.jb.resize(this.jb.size+1,0),this.qb.resize(this.qb.size+1,
0)),this.Yf&&this.qb.write(this.qb.size-2,1),b++);var c=this.ta;this.jb.write(this.jb.size-1,this.ta+b);this.jo(c+b);this.qb.write(this.jb.size-1,0);this.ng&&(this.Iu(c,this.np),this.ng=!1)};c.prototype.wj=function(b,c){this.iv();this.ic(this.ta-1,b,c)};c.prototype.Lm=function(b){this.iv();this.ic(this.ta-1,b)};c.prototype.lineTo=function(b){this.iv();this.Iu(this.ta-1,b)};c.prototype.ro=function(){var b;this.Su();void 0===b&&(this.ng=!1,b=this.ea()-1);var c=this.qb.read(b);this.qb.write(b,c|1);null!=
this.Fe&&(b=this.Dc(b)-1,this.Fe.write(b,1),this.li.write(b,-1))};c.$i=function(b){return c.Id[b]};c.prototype.vc=function(b){return 0!=(this.qb.read(b)&1)};c.prototype.Oo=function(b){if(this.vc(b))return!0;var c=this.Ea(b);b=this.Dc(b)-1;if(c>b)return!1;c=this.Fa(c);b=this.Fa(b);return c.ub(b)};c.prototype.yq=function(b){return 0!=(this.qb.read(b)&2)};c.prototype.Bc=function(b,c){this.Ik(b.description);if(322==b.D()){var e=new a.Va;if(c||this.s())b.En(e),this.df(e);b.Bn(e);this.lineTo(e)}else throw a.g.wa();
};c.prototype.ws=function(b){var c=0==this.ta;this.Uy(b.v,b.C);this.wj(b.v,b.G);this.wj(b.B,b.G);this.wj(b.B,b.C);this.ro();this.ng=!1;c&&this.yf(256,!1)};c.prototype.Wc=function(b,c){if(!b.s()){for(var e=0==this.ta,h=new a.Va(this.description),d=0;4>d;d++)b.uf(c?4-d-1:d,h),0==d?this.df(h):this.lineTo(h);this.ro();this.ng=!1;e&&!c&&this.yf(256,!1)}};c.prototype.add=function(b,c){for(var e=0;e<b.ea();e++)this.Zj(b,e,!c)};c.prototype.Zj=function(b,c,a){this.Cf(-1,b,c,a)};c.prototype.lo=function(){this.Sw()};
c.prototype.ys=function(b,c,k,h,d){d||0!=this.ea()||(d=!0);0>c&&(c=b.ea()-1);if(c>=b.ea()||0>k||0>h||h>b.ct(c))throw a.g.ra("index out of bounds");if(0!=h){var e=b.vc(c)&&k+h==b.ct(c);if(!e||1!=h){this.ng=!1;this.Ik(b.description);k=b.Ea(c)+k+1;d&&(h++,k--);e&&h--;e=this.ta;this.jo(this.ta+h);this.kc();if(d){if(0==h)return;this.jb.add(this.ta);d=b.qb.read(c);d&=-5;this.Yf&&(d|=1);this.qb.write(this.qb.size-1,d);this.qb.add(0)}else this.jb.write(this.qb.size-1,this.ta);d=0;for(var n=this.description.Aa;d<
n;d++){var f=this.description.Hd(d),u=a.pa.Wa(f),g=b.description.zf(f);0>g||null==b.Ba[g]?this.Ba[d].ul(u*e,a.pa.ue(f),h*u,u*e):this.Ba[d].nk(u*e,b.Ba[g],u*k,h*u,!0,u,u*e)}if(this.Hm())throw a.g.wa();if(b.yq(c))throw a.g.wa();this.ce(1993)}}};c.prototype.Cr=function(b){this.kc();var c=this.ea();0>b&&(b=c-1);if(b>=c)throw a.g.N();for(var k=this.Ea(b),h=this.Ha(b),d=0,f=this.description.Aa;d<f;d++)if(null!=this.Ba[d]){var g=a.pa.Wa(this.description.Fd(d));this.Ba[d].oj(g*k,g*h,g*this.ta)}for(k=b+1;k<=
c;k++)d=this.jb.read(k),this.jb.write(k-1,d-h);if(null==this.qb)for(k=b+1;k<=c;k++)b=this.qb.read(k),this.qb.write(k-1,b);this.jb.resize(c);this.qb.resize(c);this.ta-=h;this.rg-=h;this.ce(1993)};c.prototype.Cf=function(b,c,k,h){if(c==this)throw a.g.N();if(k>=c.ea())throw a.g.N();var e=this.ea();if(b>e)throw a.g.N();0>b&&(b=e);0>k&&(k=c.ea()-1);this.ng=!1;this.Ik(c.description);c.kc();var n=c.Ea(k),d=c.Ha(k),f=this.ta,g=c.vc(k)&&!h?1:0;this.jo(this.ta+d);this.kc();for(var l=b<e?this.Ea(b):f,m=0,p=
this.description.Aa;m<p;m++){var q=this.description.Fd(m),y=c.description.zf(q),r=a.pa.Wa(q);0<=y&&null!=c.Ba[y]?(0!=g&&this.Ba[m].nk(l*r,c.Ba[y],r*n,r,!0,r,r*f),this.Ba[m].nk((l+g)*r,c.Ba[y],r*(n+g),r*(d-g),h,r,r*(f+g))):this.Ba[m].ul(l*r,a.pa.ue(q),r*d,r*f)}this.jb.add(f+d);for(h=e;h>=b+1;h--)n=this.jb.read(h-1),this.jb.write(h,n+d);c.yq(k);this.qb.add(0);for(h=e-1;h>=b+1;h--)e=this.qb.read(h),e&=-5,this.qb.write(h+1,e);e=c.VN().read(k);e&=-5;this.Yf&&(e|=1);this.qb.write(b,e)};c.prototype.Sw=function(){var b=
-1,c=this.ea();if(b>c)throw a.g.N();0>b&&(b=c);this.ng=!1;this.kc();this.jb.add(this.ta);for(var k=c;k>=b+1;k--){var h=this.jb.read(k-1);this.jb.write(k,h+0)}this.qb.add(0);for(k=c-1;k>=b+1;k--)c=this.qb.read(k),c&=-5,this.qb.write(k+1,c);this.Yf&&this.qb.write(b,1)};c.prototype.dD=function(b,c,k){var e=-1;0>b&&(b=this.ea());if(b>this.ea()||e>this.Ha(b)||k>c.length)throw a.g.ra("index out of bounds");if(0!=k){b==this.ea()&&(this.jb.add(this.ta),this.Yf?this.qb.add(1):this.qb.add(0));0>e&&(e=this.Ha(b));
this.kc();var h=this.ta;this.jo(this.ta+k);this.kc();for(var d=0,f=this.description.Aa;d<f;d++){var g=this.description.Fd(d),l=a.pa.Wa(g);this.Ba[d].km(l*(this.Ea(b)+e+k),(h-this.Ea(b)-e)*l,this.Ba[d],l*(this.Ea(b)+e),!0,l);0==d?this.Ba[d].$p(l*(this.Ea(b)+e),k,c,0,!0):this.Ba[d].dh(a.pa.ue(g),(this.Ea(b)+e)*l,k*l)}this.Hm()&&(this.Fe.km(this.Ea(b)+e+k,h-this.Ea(b)-e,this.Fe,this.Ea(b)+e,!0,1),this.li.km(this.Ea(b)+e+k,h-this.Ea(b)-e,this.li,this.Ea(b)+e,!0,1),this.Fe.dh(1,this.Ea(b)+e,k),this.li.dh(-1,
this.Ea(b)+e,k));b+=1;for(c=this.ea();b<=c;b++)this.jb.write(b,this.jb.read(b)+k)}};c.prototype.kf=function(b,c,k){var e=this.ea();0>b&&(b=this.ea());if(b>=e||c>this.Ha(b))throw a.g.ra("index out of bounds");b==this.ea()&&(this.jb.add(this.ta),this.Yf?this.qb.add(1):this.qb.add(0));0>c&&(c=this.Ha(b));var h=this.ta;this.jo(this.ta+1);this.kc();var d=this.Ea(b);this.Ba[0].lg(2*(d+c),k,2*h);k=1;for(var f=this.description.Aa;k<f;k++){var g=this.description.Fd(k),l=a.pa.Wa(g);this.Ba[k].ul(l*(d+c),a.pa.ue(g),
l,l*h)}for(b+=1;b<=e;b++)this.jb.write(b,this.jb.read(b)+1)};c.prototype.eF=function(b,c){var e=this.ea();0>b&&(b=e-1);if(b>=e||c>=this.Ha(b))throw a.g.ra("index out of bounds");this.kc();var h=this.Ea(b);0>c&&(c=this.Ha(b)-1);h+=c;c=0;for(var d=this.description.Aa;c<d;c++)if(null!=this.Ba[c]){var f=a.pa.Wa(this.description.Fd(c));this.Ba[c].oj(f*h,f,f*this.ta)}for(;e>=b+1;e--)h=this.jb.read(e),this.jb.write(e,h-1);this.ta--;this.rg--;this.ce(1993)};c.prototype.Rf=function(){return a.Hh.il(this,null)};
c.prototype.Ja=function(){this.cp=0;this.ng=!1;this.td=this.Fe=this.li=this.qb=this.jb=null;this.EA()};c.prototype.Oe=function(b){b instanceof a.Bg?this.ZA(b,-1):this.$J(b)};c.prototype.ZA=function(b,c){if(!this.s()&&!b.XO()){this.kc();var e=this.Ba[0],h=new a.b,d=new a.b,f,g,l;for(0>c?(f=this.Hm(),g=0,l=this.ta):(f=this.yq(c),g=this.Ea(c),l=this.Dc(c));g<l;g++){h.x=e.read(2*g);h.y=e.read(2*g+1);if(f&&(c=this.li.read(g),0<=c))switch(this.Fe.read(g)&7){case 2:d.x=this.td.read(c);d.y=this.td.read(c+
1);b.Zi(d,d);this.td.write(c,d.x);this.td.write(c+1,d.y);d.x=this.td.read(c+3);d.y=this.td.read(c+4);b.Zi(d,d);this.td.write(c+3,d.x);this.td.write(c+4,d.y);break;case 4:throw a.g.wa();}b.Zi(h,h);e.write(2*g,h.x);e.write(2*g+1,h.y)}this.ce(1993)}};c.prototype.$J=function(b){if(!this.s()){this.Ne(1);this.kc();for(var c=this.Ba[0],k=this.Ba[1],h=new a.ee,d=new a.ee,f=this.Hm(),g=0;g<this.ta;g++){h.x=c.read(2*g);h.y=c.read(2*g+1);h.z=k.read(g);if(f){var l=this.li.read(g);if(0<=l)switch(this.Fe.read(g)&
7){case 2:d.x=this.td.read(l);d.y=this.td.read(l+1);d.z=this.td.read(l+2);d=b.Qn(d);this.td.write(l,d.x);this.td.write(l+1,d.y);this.td.write(l+1,d.z);d.x=this.td.read(l+3);d.y=this.td.read(l+4);d.z=this.td.read(l+5);d=b.Qn(d);this.td.write(l+3,d.x);this.td.write(l+4,d.y);this.td.write(l+5,d.z);break;case 4:throw a.g.wa();}}h=b.Qn(h);c.write(2*g,h.x);c.write(2*g+1,h.y);k.write(g,h.z)}this.ce(1993)}};c.prototype.xv=function(){null==this.jb&&(this.jb=a.Ac.Dg(1,0),this.qb=a.Ac.to(1,0));null!=this.Fe&&
(this.Fe.resize(this.rg,1),this.li.resize(this.rg,-1))};c.prototype.eo=function(b){b.ng=!1;b.cp=this.cp;b.gp=this.gp;null!=this.jb?b.jb=a.ga.lj(this.jb):b.jb=null;null!=this.qb?b.qb=a.Wk.lj(this.qb):b.qb=null;null!=this.li?b.li=a.ga.lj(this.li):b.li=null;null!=this.Fe?b.Fe=a.Wk.lj(this.Fe):b.Fe=null;null!=this.td?b.td=a.qd.lj(this.td):b.td=null;b.bp=this.bp;b.ap=this.ap;this.gj(1024)?b.Uh=null:b.Uh=this.Uh};c.prototype.$b=function(){if(!this.gj(512))return this.bp;for(var b=this.Ca(),c=new a.av(0);b.kb();)for(;b.La();)c.add(b.ia().$b());
this.bp=c.rl();this.yf(512,!1);return c.rl()};c.prototype.lc=function(b){if(b==this)return!0;if(!(b instanceof c&&h.prototype.lc.call(this,b)))return!1;var e=this.ea();return e!=b.ea()||null!=this.jb&&!this.jb.lc(b.jb,0,e+1)||this.gp!=b.gp||null!=this.qb&&!this.qb.lc(b.qb,0,e)?!1:h.prototype.lc.call(this,b)};c.prototype.Ca=function(){return new a.GI(this)};c.prototype.wv=function(b){h.prototype.wv.call(this,b);if(this.Hm())for(b=this.Ca();b.kb();)for(;b.La();)break};c.prototype.tm=function(b,c){h.prototype.tm.call(this,
b,c);if(this.Hm())for(b=this.Ca();b.kb();)for(;b.La();)break};c.prototype.qv=function(){null==this.jb||0==this.jb.size?this.ta=0:this.ta=this.jb.read(this.jb.size-1)};c.prototype.Mh=function(){if(!this.Yf)return 0;this.ts();return this.ap};c.prototype.qt=function(b){if(!this.Yf)return!1;if(!this.gj(8))return 0!=(this.qb.read(b)&4);this.ts();return 0<this.Uh.read(b)};c.prototype.oo=function(b){if(!this.Yf)return 0;this.ts();return this.Uh.read(b)};c.prototype.ts=function(){if(this.gj(1024)){var b=
this.ea();null==this.Uh?this.Uh=new a.qd(b):this.Uh.size!=b&&this.Uh.resize(b);for(var b=new a.av(0),c=new a.av(0),k=new a.b,h=0,d=this.Ca();d.kb();){c.reset();for(this.w(this.Ea(d.Qa),k);d.La();)c.add(d.ia().kv(k.x,k.y));b.add(c.rl());var f=h++;this.Uh.write(f,c.rl())}this.ap=b.rl();this.yf(1024,!1)}};c.prototype.hl=function(){if(this.gj(8)){this.ts();var b=this.ea();if(null==this.qb||this.qb.size<b)this.qb=a.Ac.to(b+1);for(var c=1,k=0;k<b;k++){var h=this.Uh.read(k);0==k&&(c=0<h?1:-1);0<h*c?this.qb.xy(k,
4):this.qb.BB(k,4)}this.yf(8,!1)}};c.prototype.Ew=function(b){var c=this.Qa,k=this.ea();if(0<=c&&c<k){if(b<this.Dc(c)){if(b>=this.Ea(c))return c;c--}else c++;if(0<=c&&c<k&&b>=this.Ea(c)&&b<this.Dc(c))return this.Qa=c}if(5>k){for(c=0;c<k;c++)if(b<this.Dc(c))return this.Qa=c;throw a.g.ra("corrupted geometry");}c=0;for(--k;k>c;){var h=c+(k-c>>1),d=this.Ea(h);if(b<d)k=h-1;else if(c=this.Dc(h),b>=c)c=h+1;else return this.Qa=h}return this.Qa=c};c.prototype.HN=function(b){var c=this.mc(0);this.WN();var k=
this.Dc(b),h=this.Ea(b);b=-1;var d=new a.b,f=new a.b;d.y=-Infinity;d.x=-Infinity;for(h+=0;h<k;h++)c.ec(2*h,f),-1==d.compare(f)&&(b=h,d.J(f));return b};c.prototype.Iw=function(){var b=this.F();if(!this.Yf)for(var b=b-this.ea(),c=0,a=this.ea();c<a;c++)this.vc(c)&&b++;return b};c.prototype.ct=function(b){var c=this.Ha(b);this.vc(b)||c--;return c};c.prototype.Pa=function(){return new c(this.Yf,this.description)};c.prototype.fb=function(){return this.Yf?2:1};c.prototype.D=function(){return this.Yf?1736:
1607};c.prototype.WN=function(){this.Su()};c.prototype.OF=function(b){this.jb=b;this.ce(16777215)};c.prototype.VN=function(){this.Su();return this.qb};c.prototype.NF=function(b){this.qb=b;this.ce(16777215)};c.prototype.ea=function(){return null!=this.jb?this.jb.size-1:0};c.prototype.Dc=function(b){return this.jb.read(b+1)};c.prototype.Ha=function(b){return this.jb.read(b+1)-this.jb.read(b)};c.prototype.Ea=function(b){return this.jb.read(b)};c.prototype.jv=function(b,c){null==this.pb&&(this.pb=new a.Wj);
c=a.dA.jR(c);var e=this.pb.hi;if(null!=e)if(e.Sx<b||c>e.cO())this.pb.uv(null);else return!0;e=a.dA.create(this,b,c);this.pb.uv(e);return!0};c.prototype.hc=function(){var b=h.prototype.hc.call(this);if(!this.sc()){var c=this.ea();null!=this.jb&&this.jb.jj(b,0,c+1);null!=this.qb&&this.qb.jj(b,0,c)}return b};c.prototype.NC=function(b){return null!=this.Fe?this.Fe.read(b):1};c.prototype.cc=function(b,c,k){var e=this.Ew(b);if(b==this.Dc(e)-1&&!this.vc(e))throw a.g.ra("index out of bounds");this.kc();var h=
this.Fe,d=1;null!=h&&(d=h.read(b)&7);switch(d){case 1:c.mq();break;case 2:throw a.g.wa();case 4:throw a.g.wa();default:throw a.g.wa();}c=c.get();k?c.Qf(a.Od.Tf()):c.Qf(this.description);e=b==this.Dc(e)-1&&this.vc(e)?this.Ea(e):b+1;h=new a.b;this.w(b,h);c.ed(h);this.w(e,h);c.vd(h);if(!k)for(k=1,h=this.description.Aa;k<h;k++)for(var d=this.description.Fd(k),f=a.pa.Wa(d),g=0;g<f;g++){var l=this.ld(d,b,g);c.My(d,g,l);l=this.ld(d,e,g);c.Cy(d,g,l)}};c.prototype.Ti=function(b,c){if(b>=this.ea())throw a.g.N();
if(this.s())c.Ja();else{if(this.yq(b))throw a.g.ra("not implemented");var e=this.mc(0),h=new a.b,d=new a.i;d.Ja();var f=this.Ea(b);for(b=this.Dc(b);f<b;f++)e.ec(2*f,h),d.Db(h);c.K(d)}};c.prototype.hR=function(b,c){if(b>=this.ea())throw a.g.N();if(this.s())c.Ja();else{if(this.yq(b))throw a.g.ra("not implemented");var e=this.mc(0),h=new a.b,d=new a.i;d.Ja();var f=this.Ea(b);for(b=this.Dc(b);f<b;f++)e.ec(2*f,h),d.Db(h);c.K(d)}};c.prototype.dj=function(b){null==this.pb&&(this.pb=new a.Wj);if(0==b||16>
this.F())return!1;b=a.Ia.nB(this);this.pb.GA(b);return!0};c.prototype.jJ=function(){null==this.pb&&(this.pb=new a.Wj);if(null!=this.pb.nn)return!0;this.pb.HA(null);var b=a.Ia.CK(this);this.pb.HA(b);return!0};c.prototype.Pp=function(b){this.gp=b};c.prototype.Cm=function(){return this.gp};c.Id=[0,0,6,0,8,0];return c}(a.Wr);a.al=h})(z||(z={}));(function(a){var h=function(h){function c(b){h.call(this);if(void 0!==b){if(null==b)throw a.g.N();this.description=b}else this.description=a.Od.Tf();this.ta=0}
I(c,h);c.prototype.Pa=function(){return new c(this.description)};c.prototype.add=function(b){this.resize(this.ta+1);this.bh(this.ta-1,b)};c.prototype.zs=function(b,c){this.resize(this.ta+1);var e=new a.b;e.ma(b,c);this.ic(this.ta-1,e)};c.prototype.Pd=function(b,c,k){k=0>k?b.F():k;if(0>c||c>b.F()||k<c)throw a.g.N();if(c!=k){this.Ik(b.description);k-=c;var e=this.ta;this.resize(this.ta+k);this.kc();for(var h=0,d=b.description.Aa;h<d;h++){var f=b.description.Fd(h),g=a.pa.Wa(f),l=this.mc(f),f=b.mc(f);
l.nk(e*g,f,c*g,k*g,!0,1,e*g)}}};c.prototype.eF=function(b){if(0>b||b>=this.F())throw a.g.ra("index out of bounds");this.kc();for(var c=0,k=this.description.Aa;c<k;c++)if(null!=this.Ba[c]){var h=a.pa.Wa(this.description.Fd(c));this.Ba[c].oj(h*b,h,h*this.ta)}this.ta--;this.rg--;this.ce(1993)};c.prototype.resize=function(b){this.jo(b)};c.prototype.eo=function(){};c.prototype.Ja=function(){h.prototype.EA.call(this)};c.prototype.Oe=function(b){if(b instanceof a.Bg){if(!this.s()){this.kc();for(var c=this.Ba[0],
k=new a.b,h=0;h<this.ta;h++)k.x=c.read(2*h),k.y=c.read(2*h+1),b.Zi(k,k),c.write(2*h,k.x),c.write(2*h+1,k.y);this.ce(1993)}}else if(!this.s()){this.kc();this.Ne(1);this.kc();for(var c=this.Ba[0],k=this.Ba[1],d=new a.ee,h=0;h<this.ta;h++){d.x=c.read(2*h);d.y=c.read(2*h+1);d.z=k.read(h);var f=b.Qn(d);c.write(2*h,f.x);c.write(2*h+1,f.y);k.write(h,f.z)}this.ce(1993)}};c.prototype.fb=function(){return 0};c.prototype.D=function(){return 550};c.prototype.Mh=function(){return 0};c.prototype.$b=function(){return 0};
c.prototype.lc=function(b){return b==this?!0:b instanceof c?h.prototype.lc.call(this,b):!1};c.prototype.fR=function(b,c){var e=this.ta,e=Math.min(e,c+1E3);if(0>c||c>=this.ta||e<c||1E3!=b.length)throw a.g.N();var h=this.mc(0),d=e-c,f=[];h.Hp(2*c,2*d,f,0,!0);for(h=0;h<d;h++)b[h]=a.b.Oa(f[2*h],f[2*h+1]);return e};c.prototype.qv=function(){};c.prototype.xv=function(){};c.prototype.jv=function(){return!1};c.prototype.dj=function(){return!1};c.prototype.Rf=function(){return null};return c}(a.Wr);a.pe=h})(z||
(z={}));(function(a){(function(a){a[a.NotDetermined=0]="NotDetermined";a[a.Structure=1]="Structure";a[a.DegenerateSegments=2]="DegenerateSegments";a[a.Clustering=3]="Clustering";a[a.Cracking=4]="Cracking";a[a.CrossOver=5]="CrossOver";a[a.RingOrientation=6]="RingOrientation";a[a.RingOrder=7]="RingOrder";a[a.OGCPolylineSelfTangency=8]="OGCPolylineSelfTangency";a[a.OGCPolygonSelfTangency=9]="OGCPolygonSelfTangency";a[a.OGCDisconnectedInterior=10]="OGCDisconnectedInterior"})(a.NH||(a.NH={}));var h=function(){function a(c,
b,e){void 0===c?(this.yh=0,this.Gk=this.Fk=-1):(this.yh=c,this.Fk=b,this.Gk=e)}a.prototype.aq=function(c){this.yh=c.yh;this.Fk=c.Fk;this.Gk=c.Gk};return a}();a.wd=h})(z||(z={}));(function(a){var h=function(){function h(){}h.WT=function(c){if(!1===c)throw a.g.PG();};h.bG=function(c){return isNaN(c)?NaN:0===c?c:0<c?1:-1};h.Lh=function(c,b){void 0===b&&(b=0);for(var e=[],a=0;a<c;a++)e[a]=b;return e};h.Ps=function(c,b){var e,a;void 0===e&&(e=0);for(void 0===a&&(a=c.length-1);e<=a;e++)c[e]=b};h.Kr=function(c,
b,e){return c<b?b:c>e?e:c};h.mU=function(){return 4};h.kg=function(c,b){var e=5381;void 0!==b?e=(b<<5)+b+(c&255):e=(e<<5)+e+(c&255);e=(e<<5)+e+(c>>8&255);e=(e<<5)+e+(c>>16&255);return(e<<5)+e+(c>>24&255)&2147483647};h.Rh=function(){throw Error("Not Implemented");};h.iU=function(){return-Infinity};h.kU=function(){return Infinity};h.bU=function(){return 2147483647};h.QT=function(){return 2.220446049250313E-16};h.ST=function(){return 1.7976931348623157E308};h.$x=function(c){return h.JH(c)+12345&2147483647};
h.FD=function(c){var b=32,e=c%h.gv|0,a=c/h.gv|0;if(0===(b&=63))return c;32>b?(c=e>>>b|a<<32-b,b=a>>b):(c=a>>b-32,b=0<=a?0:-1);return b*h.gv+(c>>>0)};h.JH=function(c){c|=0;return(1103495168*c|0)+(20077*c|0)|0};h.truncate=function(c){return 0>c?-1*Math.floor(Math.abs(c)):Math.floor(c)};h.aH=Math.pow(2,53)-1;h.UT=-h.aH;h.pF=65536;h.zU=16777216;h.gv=h.pF*h.pF;return h}();a.I=h})(z||(z={}));(function(a){(function(a){a[a.Project=0]="Project";a[a.Union=1]="Union";a[a.Difference=2]="Difference";a[a.Proximity2D=
3]="Proximity2D";a[a.Relate=4]="Relate";a[a.Equals=5]="Equals";a[a.Disjoint=6]="Disjoint";a[a.Intersects=7]="Intersects";a[a.Within=8]="Within";a[a.Contains=9]="Contains";a[a.Crosses=10]="Crosses";a[a.Touches=11]="Touches";a[a.Overlaps=12]="Overlaps";a[a.Buffer=13]="Buffer";a[a.Distance=14]="Distance";a[a.Intersection=15]="Intersection";a[a.Clip=16]="Clip";a[a.Cut=17]="Cut";a[a.DensifyByLength=18]="DensifyByLength";a[a.DensifyByAngle=19]="DensifyByAngle";a[a.LabelPoint=20]="LabelPoint";a[a.GeodesicBuffer=
21]="GeodesicBuffer";a[a.GeodeticDensifyByLength=22]="GeodeticDensifyByLength";a[a.ShapePreservingDensify=23]="ShapePreservingDensify";a[a.GeodeticLength=24]="GeodeticLength";a[a.GeodeticArea=25]="GeodeticArea";a[a.Simplify=26]="Simplify";a[a.SimplifyOGC=27]="SimplifyOGC";a[a.Offset=28]="Offset";a[a.Generalize=29]="Generalize";a[a.SymmetricDifference=30]="SymmetricDifference";a[a.ConvexHull=31]="ConvexHull";a[a.Boundary=32]="Boundary";a[a.SimpleRelation=33]="SimpleRelation"})(a.iI||(a.iI={}));var h=
function(){function h(){}h.prototype.D=function(){return null};h.NT=function(c){a.T.Th(c.D())&&(c=c.pb,null!=c&&(c.uv(null),c.GA(null)))};return h}();a.Me=h})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,arguments)}I(c,h);c.prototype.D=function(){return 13};c.local=function(){null===c.V&&(c.V=new c);return c.V};c.prototype.$=function(b,c,k,h,d){return b instanceof a.T?(d=new a.Pc(b),this.$(d,c,[k],!1,h).next()):!0===h?(k=new a.Pz(b,c,k,!1,d),a.wi.local().$(k,c,d)):new a.Pz(b,
c,k,!1,d)};c.V=null;return c}(a.Me);a.Oz=h})(z||(z={}));(function(a){var h=function(){function h(c,b,e,k,h){this.ua=-1;this.ne=c;this.fx=b;this.Oq=e;this.BP=new a.i;this.BP.Ja();this.Vm=-1;this.Yb=h}h.prototype.next=function(){for(var c;null!=(c=this.ne.next());)return this.ua=this.ne.ya(),this.Vm+1<this.Oq.length&&this.Vm++,this.buffer(c,this.Oq[this.Vm]);return null};h.prototype.ya=function(){return this.ua};h.prototype.buffer=function(c,b){return a.UG.buffer(c,b,this.fx,NaN,96,this.Yb)};return h}();
a.Pz=h})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,arguments)}I(c,h);c.prototype.D=function(){return 16};c.local=function(){null===c.V&&(c.V=new c);return c.V};c.prototype.$=function(b,c,k,h){return b instanceof a.T?(b=new a.Pc(b),this.$(b,c,k,h).next()):new a.TH(b,c,k,h)};c.V=null;return c}(a.Me);a.SH=h})(z||(z={}));(function(a){var h=function(){function h(c,b,e){this.ua=-1;if(null==c)throw a.g.N();this.R=b;this.wk=c;this.ka=a.Ia.zd(e,b,!1)}h.prototype.next=function(){var c;
return null!=(c=this.wk.next())?(this.ua=this.wk.ya(),a.Ed.clip(c,this.R,this.ka,0)):null};h.prototype.ya=function(){return this.ua};return h}();a.TH=h})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,arguments)}I(c,h);c.prototype.D=function(){return 31};c.local=function(){null===c.V&&(c.V=new c);return c.V};c.prototype.$=function(b,c,k){return b instanceof a.T?a.Rz.qB(b):new a.Rz(c,b,k)};c.V=null;return c}(a.Me);a.Qz=h})(z||(z={}));(function(a){var h=function(){function h(c,
b,e){this.cE=new a.Tr;this.ua=-1;if(null==b)throw a.g.N();this.zP=c;this.Ec=!1;this.wk=b;this.Yb=e}h.prototype.next=function(){if(this.zP){if(!this.Ec){var c=this.GK(this.wk);this.Ec=!0;return c}return null}if(!this.Ec){c=this.wk.next();if(null!=c)return this.ua=this.wk.ya(),h.qB(c);this.Ec=!0}return null};h.prototype.ya=function(){return this.ua};h.prototype.GK=function(c){for(var b;null!=(b=c.next());)this.cE.Eb(b);return this.cE.sN()};h.qB=function(c){if(h.Gh(c))return c;var b=c.D();if(a.al.Lc(b))return b=
new a.Xa(c.description),b.Bc(c,!0),b;if(550==b&&2==c.F()){var e=new a.Va,b=new a.Xa(c.description);c.Sd(0,e);b.df(e);c.Sd(1,e);b.lineTo(e);return b}return a.Tr.wL(c)};h.Gh=function(c){if(c.s())return!0;var b=c.D();return 33==b||197==b?!0:a.al.Lc(b)?!1:550==b?1==c.F()?!0:!1:1607==b?1==c.ea()&&2>=c.F()?!0:!1:1!=c.ea()?!1:2>=c.F()?!0:a.Tr.sD(c,0)};return h}();a.Rz=h})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,arguments)}I(c,h);c.prototype.D=function(){return 17};c.local=function(){null===
c.V&&(c.V=new c);return c.V};c.prototype.$=function(b,c,k,h,d){return new a.VH(b,c,k,h,d)};c.V=null;return c}(a.Me);a.UH=h})(z||(z={}));(function(a){var h=function(){function h(c,b,e,k,h){this.Ef=null;if(null==b||null==e)throw a.g.ra("invalid argument");this.xP=c;this.rx=b;this.RD=e;c=a.Ia.$s(b,e);this.ka=a.Ia.zd(k,c,!0);this.QD=-1;this.oe=h}h.prototype.ya=function(){return 0};h.prototype.next=function(){this.gN();return++this.QD<this.Ef.length?this.Ef[this.QD]:null};h.prototype.gN=function(){if(null==
this.Ef)switch(this.Ef=[],this.rx.D()){case 1607:this.iN();break;case 1736:this.hN()}};h.prototype.iN=function(){var c=new a.Xa,b=new a.Xa,e=new a.Xa;this.Ef.push(c);this.Ef.push(b);var k=[];a.$G.YG(this.xP,this.rx,this.RD,this.ka,k,this.oe);for(var h=0;h<k.length;h++){var d=k[h];0==d.cu?c.add(d.U,!1):1==d.cu||2==d.cu?b.add(d.U,!1):3==d.cu?this.Ef.push(d.U):e.add(d.U,!1)}e.s()||c.s()&&b.s()&&!(3<=this.Ef.length)||this.Ef.push(e);c.s()&&b.s()&&3>this.Ef.length&&(this.Ef.length=0)};h.prototype.hN=function(){var c=
new a.ga(0),b=new a.fd,e=b.RB(),k=b.Eb(this.rx),h=b.Eb(this.RD),d=new a.Of;try{d.Np(b,this.ka,this.oe);d.xm(e,k,h,c);var f=b.hf(k),g=new a.Ka,l=new a.Ka;this.Ef.length=0;this.Ef.push(g);this.Ef.push(l);for(k=0;k<c.size;k++){var m,p=new a.fd,q=p.Eb(f),r=p.Eb(b.hf(c.get(k)));d.Mp(p,this.oe);var y=d.mt(q,r);m=p.hf(y);if(!m.s()){var v=b.yC(c.get(k),e);2==v?g.add(m,!1):1==v?l.add(m,!1):this.Ef.push(m);var x=new a.fd,q=x.Eb(f),r=x.Eb(b.hf(c.get(k)));d.Mp(x,this.oe);f=x.hf(d.ll(q,r))}}!f.s()&&0<c.size&&
this.Ef.push(f);g.s()&&l.s()&&(this.Ef.length=0)}finally{d.xg()}};return h}();a.VH=h})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,arguments)}I(c,h);c.prototype.D=function(){return 18};c.local=function(){null===c.V&&(c.V=new c);return c.V};c.prototype.$=function(b,c,k){if(b instanceof a.T)return b=new a.Pc(b),this.$(b,c,k).next();if(0>=c)throw a.g.N();return new a.XH(b,c,k)};c.V=null;return c}(a.Me);a.WH=h})(z||(z={}));(function(a){var h=function(){function h(c,b){this.ua=
-1;this.ne=c;this.$q=b}h.prototype.ya=function(){return this.ua};h.prototype.next=function(){var c;return null!=(c=this.ne.next())?(this.ua=this.ne.ya(),this.hM(c)):null};h.prototype.hM=function(c){if(c.s()||1>c.fb())return c;var b=c.D();if(1736==b||1607==b)return this.Xv(c);if(a.T.Lc(b))return this.jM(c);if(197==b)return this.iM(c);throw a.g.wa();};h.prototype.jM=function(c){if(c.$b()<=this.$q)return c;var b=new a.Xa(c.description);b.Bc(c,!0);return this.Xv(b)};h.prototype.iM=function(c){var b=new a.Ka(c.description);
b.Wc(c,!1);var e=new a.i;c.o(e);c=e.ba();return e.aa()<=this.$q&&c<=this.$q?b:this.Xv(b)};h.prototype.Xv=function(c){for(var b=c.Pa(),e=c.Ca();e.kb();)for(var k=!0;e.La();){var h=e.ia();if(322!=h.D())throw a.g.ra("not implemented");var d=e.lD(),f=h.$b();if(f>this.$q){var g=Math.ceil(f/this.$q),f=new a.Va(c.description);k&&(h.En(f),b.df(f));for(var l=k=1/g,m=0,g=g-1;m<g;m++)h.uu(l,f),b.lineTo(f),l+=k;d?b.ro():(h.Bn(f),b.lineTo(f))}else d?b.ro():b.Bc(h,k);k=!1}return b};return h}();a.XH=h})(z||(z={}));
(function(a){var h=function(h){function c(){h.apply(this,arguments)}I(c,h);c.local=function(){null===c.V&&(c.V=new c);return c.V};c.prototype.D=function(){return 2};c.prototype.$=function(b,c,k,h){return b instanceof a.T?(b=new a.Pc(b),c=new a.Pc(c),this.$(b,c,k,h).next()):new a.YH(b,c,k,h)};c.ll=function(b,e,k,h){if(b.s()||e.s())return b;var d=b.fb(),n=e.fb();if(d>n)return b;var f=b.D(),g=e.D(),l=new a.i,m=new a.i,p=new a.i;b.o(l);e.o(m);p.K(l);p.Db(m);var p=a.Ia.zd(k,p,!1),q=p*Math.sqrt(2)*1.00001,
r=new a.i;r.K(l);r.P(q,q);if(!r.jc(m))return b;if(1==d&&2==n)return c.UI(b,e,g,k,h);if(33==f)switch(a.al.Lc(g)?(k=new a.Xa(e.description),k.Bc(e,!0)):k=e,g){case 1736:return c.kP(b,k,p);case 1607:return c.nP(b,k,p);case 550:return c.dN(b,k,p);case 197:return c.FM(b,k,p);case 33:return c.rO(b,k,p);default:throw a.g.N();}else if(550==f)switch(g){case 1736:return c.ZI(b,e,p);case 197:return c.TI(b,e,p);case 33:return c.WI(b,e,p)}return a.Of.ll(b,e,k,h)};c.kP=function(b,c,k){return 0==a.gd.uD(c,b,k)?
b:b.Pa()};c.nP=function(b,c,k){var e=b.w();c=c.Ca();for(var h=k*Math.sqrt(2)*1.00001,d=h*h,f=new a.i;c.kb();)for(;c.La();){var g=c.ia();g.o(f);f.P(h,h);if(f.contains(e)){if(g.Eq(e,k))return b.Pa();var l=g.Mb();if(a.b.Zb(e,l)<=d)return b.Pa();l=g.oc();if(a.b.Zb(e,l)<=d)return b.Pa()}}return b};c.dN=function(b,c,k){var e=c.mc(0);c=c.F();var h=b.w(),d=new a.b;k=k*Math.sqrt(2)*1.00001;k*=k;for(var f=0;f<c;f++)if(e.ec(2*f,d),a.b.Zb(d,h)<=k)return b.Pa();return b};c.FM=function(b,c,k){var e=new a.i;c.o(e);
e.P(k,k);c=b.w();return e.contains(c)?b.Pa():b};c.rO=function(b,c,k){k=k*Math.sqrt(2)*1.00001;k*=k;var e=b.w();c=c.w();return a.b.Zb(e,c)<=k?b.Pa():b};c.ZI=function(b,c,k){var e=new a.i;c.o(e);e.P(k,k);for(var h=b.F(),d=!1,f=[],g=0;g<h;g++)f[g]=!1;for(var l=new a.b,g=0;g<h;g++)b.w(g,l),e.contains(l)&&0!=a.gd.he(c,l,k)&&(d=!0,f[g]=!0);if(!d)return b;c=b.Pa();for(g=0;g<h;g++)f[g]||c.Pd(b,g,g+1);return c};c.TI=function(b,c,k){var e=new a.i;c.o(e);e.P(k,k);c=b.F();var h=!1;k=[];for(var d=0;d<c;d++)k[d]=
!1;for(var f=new a.b,d=0;d<c;d++)b.w(d,f),e.contains(f)&&(h=!0,k[d]=!0);if(!h)return b;e=b.Pa();for(d=0;d<c;d++)k[d]||e.Pd(b,d,d+1);return e};c.WI=function(b,c,k){var e=b.mc(0),h=b.F(),d=c.w(),f=new a.b,g=!1;c=[];for(var l=0;l<h;l++)c[l]=!1;l=k*Math.sqrt(2)*1.00001;k=l*l;for(l=0;l<h;l++)e.ec(2*l,f),a.b.Zb(f,d)<=k&&(g=!0,c[l]=!0);if(!g)return b;e=b.Pa();for(l=0;l<h;l++)c[l]||e.Pd(b,l,l+1);return e};c.UI=function(b,c,k,h,d){var e=new a.Vj;b.Fp(e);var n=new a.i;c.o(n);e.Db(n);e.P(.1*e.aa(),.1*e.ba());
n=new a.Ka;n.Wc(e,!1);1736==k?n.add(c,!0):n.Wc(c,!0);return a.$r.local().$(b,n,h,d)};c.V=null;return c}(a.Me);a.Zr=h})(z||(z={}));(function(a){var h=function(){function h(c,b,e,a){this.Fq=null==b;this.ua=-1;this.ne=c;this.fx=e;this.EP=b.next();this.Yb=a}h.prototype.next=function(){if(this.Fq)return null;var c;return null!=(c=this.ne.next())?(this.ua=this.ne.ya(),a.Zr.ll(c,this.EP,this.fx,this.Yb)):null};h.prototype.ya=function(){return this.ua};return h}();a.YH=h})(z||(z={}));(function(a){var h=function(){function c(b){this.oe=
b;this.Ii=new a.i;this.Ii.Ja();this.Ng=new a.i;this.Ng.Ja()}c.prototype.Pr=function(){var b;b=this.Ii.v;this.Ii.v=this.Ng.v;this.Ng.v=b;b=this.Ii.B;this.Ii.B=this.Ng.B;this.Ng.B=b;b=this.Ii.C;this.Ii.C=this.Ng.C;this.Ng.C=b;b=this.Ii.G;this.Ii.G=this.Ng.G;this.Ng.G=b};c.prototype.wM=function(b,c){var e=!this.Ii.jc(this.Ng);if(a.T.Kc(b.D())&&a.T.Kc(c.D())){if(b.F()>c.F())return this.gB(b,c,e);this.Pr();e=this.gB(c,b,e);this.Pr();return e}if(550==b.D()&&a.T.Kc(c.D()))return e=this.hB(c,b,e),this.Pr(),
e;if(550==c.D()&&a.T.Kc(b.D()))return this.hB(b,c,e);if(550==b.D()&&550==c.D()){if(b.F()>c.F())return this.iB(b,c);this.Pr();e=this.iB(c,b);this.Pr();return e}return 0};c.prototype.gB=function(b,c,k){var e=b.Ca(),h=c.Ca(),d=new a.i,f=new a.i,g=1.7976931348623157E308;if(!k&&this.iT(b,c,e,h))return 0;for(;e.kb();)for(;e.La();)if(b=e.ia(),b.o(d),!(d.Ou(this.Ng)>g)){for(;h.kb();)for(;h.La();)if(c=h.ia(),c.o(f),d.Ou(f)<g&&(c=b.Fb(c,k),c*=c,c<g)){if(0==c)return 0;g=c}h.Lk()}return Math.sqrt(g)};c.prototype.hB=
function(b,c,k){var e=b.Ca(),h=new a.i,d=1.7976931348623157E308,f=new a.b,g,l=c.F();for(k=!k&&1736==b.D();e.kb();)for(;e.La();){var m=e.ia();m.o(h);if(!(1<l&&h.Ou(this.Ng)>d)){for(var p=0;p<l;p++){c.w(p,f);if(k&&0!=a.gd.he(b,f,0))return 0;g=m.Gd(f,!1);f.sub(m.Kb(g));g=f.Up();if(g<d){if(0==g)return 0;d=g}}k=!1}}return Math.sqrt(d)};c.prototype.iB=function(b,c){for(var e=1.7976931348623157E308,h=new a.b,d=new a.b,f,g=b.F(),l=c.F(),m=0;m<g;m++)if(b.w(m,h),!(1<l&&this.Ng.gG(h)>e))for(var p=0;p<l;p++)if(c.w(p,
d),f=a.b.Zb(h,d),f<e){if(0==f)return 0;e=f}return Math.sqrt(e)};c.prototype.iT=function(b,c,k,h){if(1736==b.D()){for(;h.kb();)if(h.La()){var e=h.ia();if(0!=a.gd.he(b,e.oc(),0))return!0}h.Lk()}if(1736==c.D()){for(;k.kb();)if(k.La()&&(b=k.ia(),0!=a.gd.he(c,b.oc(),0)))return!0;k.Lk()}return!1};c.prototype.il=function(b,c){if(b.s()||c.s())return NaN;b.o(this.Ii);c.o(this.Ng);return this.wM(b,c)};return c}(),d=function(c){function b(){c.apply(this,arguments)}I(b,c);b.prototype.$=function(b,c,d){if(null==
b||null==c)throw a.g.N();if(b.s()||c.s())return NaN;var e,k;e=b.D();k=c.D();if(33==e){if(33==k)return a.b.Fb(b.w(),c.w());if(197==k)return d=new a.i,c.o(d),d.Fb(b.w());e=new a.pe;e.add(b);b=e}else if(197==e){if(197==k)return k=new a.i,b.o(k),d=new a.i,c.o(d),d.Fb(k);e=new a.Ka;e.Wc(b,!1);b=e}33==k?(k=new a.pe,k.add(c),c=k):197==k&&(k=new a.Ka,k.Wc(c,!1),c=k);return(new h(d)).il(b,c)};b.local=function(){null===b.V&&(b.V=new b);return b.V};b.prototype.D=function(){return 14};b.V=null;return b}(a.Me);
a.ZH=d})(z||(z={}));(function(a){var h=function(){function h(c,b,e,a){this.aE=c;this.fE=b;this.oe=a;this.HD=e}h.prototype.next=function(){var c=this.aE.next();return null==c?null:this.yz(c)};h.prototype.ya=function(){return this.aE.ya()};h.prototype.yz=function(c){var b=c.D();if(a.T.Km(b))return c;if(197==b)return b=new a.Ka(c.description),b.Wc(c,!1),this.yz(b);if(c.s())return c;if(null==c)throw a.g.wa();for(var b=c.Pa(),e=new a.yb,k=0,h=c.ea();k<h;k++)this.mH(c,k,b,e);return b};h.prototype.mH=function(c,
b,e,k){if(!(2>c.Ha(b))){var h=c.Ea(b),d=c.Dc(b)-1,f=c.mc(0),g=c.vc(b),l=new a.ga(0);l.xb(c.Ha(b)+1);var m=new a.ga(0);m.xb(c.Ha(b)+1);l.add(g?h:d);l.add(h);for(h=new a.b;1<l.size;){var p=l.tc();l.af();var q=l.tc();c.w(p,h);k.ed(h);c.w(q,h);k.vd(h);q=this.jH(k,h,f,p,q,d);0<=q?(l.add(q),l.add(p)):m.add(p)}g||m.add(l.get(0));if(m.size==l.size)e.Zj(c,b,!0);else if(2<=m.size&&(!this.HD||2!=m.size||!(g||a.b.Fb(c.Fa(m.get(0)),c.Fa(m.get(1)))<=this.fE))){b=new a.Va;k=0;for(d=m.size;k<d;k++)c.Sd(m.get(k),
b),0==k?e.df(b):e.lineTo(b);g&&(this.HD||2!=m.size||e.lineTo(b),e.ro())}}};h.prototype.jH=function(c,b,e,a,h,d){var k=h-1;h<=a&&(k=d);d=h=-1;for(a+=1;a<=k;a++){e.ec(2*a,b);var n=b.x,f=b.y;c.Kb(c.Gd(b,!1),b);b.x-=n;b.y-=f;n=b.length();n>this.fE&&n>d&&(h=a,d=n)}return h};return h}();a.$H=h})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,arguments)}I(c,h);c.prototype.D=function(){return 29};c.prototype.$=function(b,c,k,h){return b instanceof a.T?(b=new a.Pc(b),this.$(b,c,k,h).next()):
new a.$H(b,c,k,h)};c.local=function(){null===c.V&&(c.V=new c);return c.V};c.V=null;return c}(a.Me);a.Sz=h})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,arguments)}I(c,h);c.prototype.D=function(){return 21};c.local=function(){null===c.V&&(c.V=new c);return c.V};c.prototype.$=function(b,c,k,h,d,f,g,l){return b instanceof a.T?(l=new a.Pc(b),this.$(l,c,k,[h],d,f,!1,g).next()):!0===g?(k=new a.Uz(b,c,k,h,d,!1,!1,l),a.wi.local().$(k,c,l)):new a.Uz(b,c,k,h,d,!1,!1,l)};c.V=null;return c}(a.Me);
a.Tz=h})(z||(z={}));(function(a){var h=function(){function h(c,b,e,k,h,d,f,g){if(d)throw a.g.qe();if(null==b)throw a.g.N();this.ua=-1;this.Xq=c;this.cg=b;this.ke=e;this.Oq=k;this.Rm=h;this.Vm=-1;this.Yb=g;this.CP=new a.i;this.CP.Ja()}h.prototype.next=function(){for(var c;null!=(c=this.Xq.next());)return this.ua=this.Xq.ya(),this.Vm+1<this.Oq.length&&this.Vm++,this.oN(c,this.Oq[this.Vm]);return null};h.prototype.ya=function(){return this.ua};h.prototype.oN=function(c,b){return a.pH.buffer(c,this.cg,
this.ke,b,this.Rm,this.Yb)};return h}();a.Uz=h})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,arguments)}I(c,h);c.prototype.D=function(){return 24};c.local=function(){null===c.V&&(c.V=new c);return c.V};c.prototype.$=function(b,c,k){if(null==c)throw a.g.N();if(b.s()||1>b.fb())return 0;if(4==k)throw a.g.qe();var e=a.Ya.Em(c),h=a.Ya.ft(e),d=a.Ya.Ts(e),h=h*(2-h),f=e.Se().Dj,g=b.D(),l;1736==g||197==g?l=b.Rf():a.T.Lc(g)?(l=new a.Xa(b.description),l.Bc(b,!0)):l=b;if(0==e.lc(c)){if(a.Ya.Qo(c)){l=
a.gh.qo(l,c);1607==g&&l==b&&(l=a.T.Yj(b));b=new a.Nd;a.Ya.Fm(c).wu(b);for(var g=0,m=l.F();g<m;g++){var p=l.Fa(g);p.x=a.gh.pu(p.x,b);l.ic(g,p)}}b=l.Pa();l=a.gh.ZQ(c,e,l,b)?b:a.Ya.Wl(l,c,e)}return this.yM(l,k,d,h,f)};c.prototype.yM=function(b,c,k,h,d){var e=new a.ca(0),n=0;for(b=b.Ca();b.kb();)for(;b.La();){var f=b.ia(),g=f.Mb(),f=f.oc();g.scale(d);f.scale(d);a.zb.Rd(k,h,g.x,g.y,f.x,f.y,e,null,null,c);n+=e.l}return n};c.V=null;return c}(a.Me);a.cI=h})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,
arguments)}I(c,h);c.prototype.D=function(){return 18};c.local=function(){null===c.V&&(c.V=new c);return c.V};c.prototype.$=function(b,c,k,h,d){return b instanceof a.T?(b=new a.Pc(b),this.$(b,c,k,h,d).next()):new a.bI(b,k,h,c,-1,-1,d)};c.V=null;return c}(a.Me);a.aI=h})(z||(z={}));(function(a){var h=function(){function h(c,b,e,k,h,d){if(0<d)throw a.g.qe();if(4!=e&&0<h)throw a.g.qe();if(null==b)throw a.g.N();this.ua=-1;this.Xq=c;this.cg=b;this.ke=e;this.IP=k;this.HP=h}h.prototype.next=function(){for(var c;null!=
(c=this.Xq.next());)return this.ua=this.Xq.ya(),this.hw(c);return null};h.prototype.ya=function(){return this.ua};h.prototype.hw=function(c){return a.ui.oq(c,this.cg,this.ke,this.IP,this.HP,this.Yb)};return h}();a.bI=h})(z||(z={}));(function(a){(function(a){a[a.Unknown=0]="Unknown";a[a.Contains=1]="Contains";a[a.Within=2]="Within";a[a.Equals=3]="Equals";a[a.Disjoint=4]="Disjoint";a[a.Touches=8]="Touches";a[a.Crosses=16]="Crosses";a[a.Overlaps=32]="Overlaps";a[a.NoThisRelation=64]="NoThisRelation";
a[a.Intersects=1073741824]="Intersects";a[a.IntersectsOrDisjoint=1073741828]="IntersectsOrDisjoint"})(a.xH||(a.xH={}));var h=function(){function h(){}h.lU=function(c,b,e,k){if(b.s()||c.s())return 4;var d=c.D(),f=b.D(),g;a.T.Lc(d)&&(c=g=new a.Xa(c.description),g.Bc(c,!0));a.T.Lc(f)&&(b=g=new a.Xa(b.description),g.Bc(b,!0));switch(d){case 33:switch(f){case 33:return h.sO(c,b,e);case 197:return h.Id(h.BG(b,c,e));case 550:return h.Id(h.HG(b,c,e));case 1607:return h.Id(h.Az(b,c,e,k));case 1736:return h.Id(h.pz(b,
c,e))}throw a.g.wa();case 197:switch(f){case 33:return h.BG(c,b,e);case 197:return h.fK(c,b,e);case 550:return h.Id(h.DG(b,c,e,k));case 1607:return h.Id(h.vz(b,c));case 1736:return h.Id(h.lz(b,c))}throw a.g.wa();case 550:switch(f){case 33:return h.HG(c,b,e);case 197:return h.DG(c,b,e,k);case 550:return h.FG(c,b,e,k);case 1607:return h.Id(h.xz(b,c));case 1736:return h.Id(h.nz(b,c))}throw a.g.wa();case 1607:switch(f){case 33:return h.Az(c,b,e,k);case 197:return h.vz(c,b);case 550:return h.xz(c,b);case 1607:return h.iQ(c,
b);case 1736:return h.Id(h.rz(b,c))}throw a.g.wa();case 1736:switch(f){case 33:return h.pz(c,b,e);case 197:return h.lz(c,b);case 550:return h.nz(c,b);case 1607:return h.rz(c,b);case 1736:return h.oP(c,b)}throw a.g.wa();default:throw a.g.wa();}};h.sO=function(c,b,a){c=c.w();b=b.w();return h.jz(c,b,a)};h.jz=function(c,b,a){c.sub(b);return c.Up()<=a*a?3:4};h.BG=function(c,b,e){var k=new a.i;c.o(k);c=b.w();return h.ZL(k,c,e)};h.ZL=function(c,b,a){c.P(-a,-a);if(c.contains(b))return 1;c.P(a,a);return c.contains(b)?
8:4};h.uM=function(c,b,a){return b.contains(a)?1:c.contains(a)?8:4};h.fK=function(c,b,e){var k=new a.i;c.o(k);c=new a.i;b.o(c);return h.MK(k,c,e)};h.MK=function(c,b,a){var e=0;c.contains(b)&&(e|=1);b.contains(c)&&(e|=2);if(0!=e)return e;c.P(-a,-a);b.P(-a,-a);if(c.jc(b))return e=c,e.P(a,a),e=e.contains(b)?1:0,b.P(a,a),e|=b.contains(c)?2:0,0!=e?e:32;e=c;e.P(a,a);b.P(a,a);return e.jc(b)?8:4};h.HG=function(c,b,a){b=b.w();return h.JG(c,b,a)};h.JG=function(c,b,a){for(var e=0,d=c.F();e<d;e++){var f;f=c.Fa(e);
f=h.jz(f,b,a);if(4!=f)return 0!=(f&2)&&1!=d?1:f}return 4};h.DG=function(c,b,e,k){var d=new a.i;b.o(d);return h.eN(c,d,e,k)};h.eN=function(c,b,a,k){b.P(-a,-a);b.P(a,a);for(var e=a=0,d=c.F();e<d;e++){var f;f=c.Fa(e);f=h.Id(h.uM(b,b,f));if(4!=f&&(a|=f,4==k))return 1073741824}return 0==a?4:2==a?a:32};h.FG=function(c,b,a,k){for(var e=0,d=0,f=b.F();d<f;d++){var g;g=b.Fa(d);g=h.JG(c,g,a);if(4!=g&&(e++,4==k))return 1073741824}return 0<e?e==b.F()?3==k?(g=h.FG(b,c,a,1),1==g?3:0):1:32:0};h.Az=function(c,b,a,
k){b=b.w();return h.XP(c,b,a,k)};h.GM=function(c,b){var a=null;c=c.pb;null!=c&&(a=c.hi);if(null!=a){a=a.Kk(b.x,b.y);if(0==a)return 4;if(1==a)return 1}else return-1;return 0};h.XP=function(c,b,e,k){if(0==(k&1073741839))return 64;var d=h.GM(c,b);if(0<d)return d;e*=e;for(d=c.Ca();d.kb();){var f=d.Qa;if(!c.vc(f)){var g=c.Ha(f),f=c.Ea(f);if(0==g)continue;if(a.b.Zb(c.Fa(f),b)<=e||1<g&&a.b.Zb(c.Fa(f+g-1),b)<=e)return 8}if(8!=k)for(;d.La();)if(g=d.ia(),g=g.Kb(g.Gd(b,!1)),a.b.Zb(g,b)<=e)return 0!=(k&1073741828)?
1073741824:1}return 0!=(k&1073741828)?4:64};h.vz=function(c,b){var e=new a.i;b.o(e);return h.rP(c,e)};h.rP=function(c,b){c=h.ao(c,b);return 0<c?c:0};h.ao=function(c,b){c=c.pb;if(null!=c)c=c.hi;else return-1;if(null!=c){c=c.Dn(b);if(0==c)return 4;if(1==c)return 1}else return-1;return 0};h.xz=function(c,b){var e=new a.i;b.o(e);e=h.ao(c,e);return 0<e?e:0};h.fs=function(c,b){var e=new a.i;b.o(e);e=h.ao(c,e);return 0<e?e:-1==e&&(e=new a.i,c.o(e),e=h.ao(b,e),0<e)?h.Id(e):0};h.iQ=function(c,b){c=h.fs(c,
b);return 0<c?c:0};h.pz=function(c,b,a){b=b.w();return h.lP(c,b,a)};h.lP=function(c,b,e){c=a.gd.he(c,b,e);if(0==c)return 4;if(1==c)return 1;if(2==c)return 8;throw a.g.wa();};h.lz=function(c,b){var e=new a.i;b.o(e);return h.uO(c,e)};h.uO=function(c,b){c=h.ao(c,b);return 0<c?c:0};h.nz=function(c,b){c=h.fs(c,b);return 0<c?c:0};h.rz=function(c,b){c=h.fs(c,b);return 0<c?c:0};h.oP=function(c,b){c=h.fs(c,b);return 0<c?c:0};h.iR=function(c,b){var e=c.D(),k=b.D(),h;if(a.T.Th(e)&&(h=c.pb,null!=h&&(h=h.hi,null!=
h))){if(33==k){var d=b.w();h=h.Kk(d.x,d.y)}else d=new a.i,b.o(d),h=h.Dn(d);if(1==h)return 1;if(0==h)return 4}if(a.T.Th(k)&&(h=b.pb,null!=h&&(h=h.hi,null!=h))){33==e?(e=c.w(),h=h.Kk(e.x,e.y)):(e=new a.i,c.o(e),h=h.Dn(e));if(1==h)return 2;if(0==h)return 4}return 0};h.Id=function(c){0!=(c&1)&&(c=c&-2|2);0!=(c&2)&&(c=c&-3|1);return c};return h}();a.dI=h})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,arguments)}I(c,h);c.local=function(){null===c.V&&(c.V=new c);return c.V};c.prototype.D=
function(){return 15};c.prototype.$=function(b,c,k,h,d){return b instanceof a.T?(b=new a.Pc(b),c=new a.Pc(c),this.$(b,c,k,h,d).next()):void 0===d?new a.Vz(b,c,k,h,-1):new a.Vz(b,c,k,h,d)};c.V=null;return c}(a.Me);a.$r=h})(z||(z={}));(function(a){var h=function(){function h(c,b,e,k,h){this.Fq=null==b;this.ua=-1;this.ne=c;this.cg=e;this.Ce=b.next();this.Ji=this.Ce.D();this.Yb=k;this.Xh=h;if(-1!=this.Xh&&(0>=this.Xh||7<this.Xh))throw a.g.N("bad dimension mask");}h.prototype.next=function(){if(this.Fq)return null;
var c;if(null!=this.du){c=this.du.next();if(null!=c)return c;this.du=null}for(;null!=(c=this.ne.next());){this.ua=this.ne.ya();if(-1==this.Xh)return c=this.Ga(c);this.du=this.PO(c);return c=this.du.next()}return null};h.prototype.ya=function(){return this.ua};h.prototype.Ga=function(c){var b=this.uG(c);if(null!=b)return b;var b=a.Ia.$s(this.Ce,c),e=a.Ia.zd(this.cg,b,!0),b=new a.i;this.Ce.o(b);var k=new a.i;c.o(k);b.P(2*e,2*e);b.Ga(k);b.P(100*e,100*e);e=a.Ed.clip(this.Ce,b,0,0);c=a.Ed.clip(c,b,0,0);
return a.Of.mt(c,e,this.cg,this.Yb)};h.prototype.SE=function(c,b,e){var k=0;if(0!=(b&1))null==e[0]&&(e[0]=new a.pe(c)),k++;else for(var h=0;h<e.length-1;h++)e[h]=e[h+1];if(0!=(b&2))null==e[k]&&(e[k]=new a.Xa(c)),k++;else for(h=k;h<e.length-1;h++)e[h]=e[h+1];if(0!=(b&4))null==e[k]&&(e[k]=new a.Ka(c)),k++;else for(h=k;h<e.length-1;h++)e[h]=e[h+1];if(3!=k){c=[];for(h=0;h<k;h++)c[h]=e[h];return new a.Pc(c)}return new a.Pc(e)};h.prototype.PO=function(c){var b=this.uG(c);if(null!=b){var e=[null,null,null];
e[b.fb()]=b;return this.SE(c.description,this.Xh,e)}b=a.Ia.$s(this.Ce,c);e=a.Ia.zd(this.cg,b,!0);b=new a.i;this.Ce.o(b);b.P(2*e,2*e);var k=new a.i;c.o(k);b.Ga(k);b.P(100*e,100*e);e=a.Ed.clip(this.Ce,b,0,0);b=a.Ed.clip(c,b,0,0);e=a.Of.Uw(b,e,this.cg,this.Yb);return this.SE(c.description,this.Xh,e)};h.prototype.uG=function(c){var b=a.Ia.$s(c,this.Ce),e=a.Ia.zd(this.cg,b,!1),b=c.D(),k=c.s(),d=this.Ce.s(),d=k||d;if(!d){d=new a.i;c.o(d);var f=new a.i;this.Ce.o(f);f.P(2*e,2*e);d=!d.jc(f)}if(!d)if(f=a.dI.iR(this.Ce,
c),4==f)d=!0;else{if(0!=(f&2))return this.Ce;if(0!=(f&1))return c}if(d)return e=a.T.ve(b),d=a.T.ve(this.Ji),e<d?h.V(c,k):e>d?this.kF():0==e?550==b&&33==this.Ji?this.kF():h.V(c,k):h.V(c,k);if((-1==this.Xh||4==this.Xh)&&197==b&&197==this.Ji)return e=this.Ce,b=new a.i,c.o(b),k=new a.i,e.o(k),b.Ga(k),e=new a.Vj,c.copyTo(e),e.Cu(b),e;if(197==b&&0==a.T.ve(this.Ji)||197==this.Ji&&0==a.T.ve(b))return k=197==b?c:this.Ce,c=197==b?this.Ce:c,b=new a.i,k.o(b),a.Ed.clip(c,b,e,0);if(0==a.T.ve(b)&&0<a.T.ve(this.Ji)||
0<a.T.ve(b)&&0==a.T.ve(this.Ji)){e=a.Ia.Cg(this.cg,c,!1);if(550==b||33==b)return a.Of.jD(c,this.Ce,e);if(550==this.Ji||33==this.Ji)return a.Of.jD(this.Ce,c,e);throw a.g.wa();}return-1!=this.Xh&&2!=this.Xh||1607!=b||1736!=this.Ji?-1!=this.Xh&&2!=this.Xh||1736!=b||1607!=this.Ji?null:this.rG(this.Ce,c):this.rG(c,this.Ce)};h.prototype.rG=function(c,b){var e=c,k=b,h=a.Ia.Cg(this.cg,b,!1),d=new a.i;k.o(d);var f=new a.i;e.o(f);f.P(2*h,2*h);d.Ga(f);d.P(10*h,10*h);var e=c=a.Ed.clip(c,d,0,0),f=new a.ga(0),
g=-1,l=k.pb;if(null!=l){var m=l.hi;if(null!=m){g=0;f.xb(e.F()+e.ea());for(var p=new a.i,q=e.Ca();q.kb();)for(;q.La();){q.ia().o(p);var r=m.Dn(p);1==r?f.add(1):0==r?f.add(0):(f.add(-1),g++)}}}5<b.F()&&(k=b=a.Ed.clip(b,d,0,0),l=k.pb);0>g&&(g=e.Iw());d=e.F()+k.F();if(g*k.F()>Math.log(d)*d*4)return null;d=null;g=k.Ca();null!=l&&null!=l.Ab&&(d=l.Ab);null==d&&20<k.F()&&(d=a.Ia.nB(k));k=c.Pa();l=null;m=e.Ca();p=[0,0,0,0,0,0,0,0,0];q=new a.qd(0);r=new a.Ag;c=-1;for(var v=0,y=0,x=0<f.size,w=-1;m.kb();){var w=
m.Qa,t=0;c=-1;for(v=0;m.La();){var B=x?a.I.truncate(f.get(y)):-1;y++;var z=m.ia();if(0>B){if(null!=d)for(null==l?l=d.KN(z,h):l.Fn(z,h),B=l.next();-1!=B;B=l.next()){g.Sb(d.da(B));for(var B=g.ia(),E=z.Ga(B,null,p,null,h),B=0;B<E;B++)q.add(p[B])}else for(g.Lk();g.kb();)for(;g.La();)for(B=g.ia(),E=z.Ga(B,null,p,null,h),B=0;B<E;B++)q.add(p[B]);if(0<q.size){q.xd(0,q.size,function(b,c){return b-c});var D=0;q.add(1);for(var E=-1,B=0,F=q.size;B<F;B++){var I=q.get(B);if(I!=D){var K=!1;0!=D||1!=I?(z.Bi(D,I,
r),D=r.get()):(D=z,K=!0);if(2<=t){k.ys(e,w,c,v,3==t);if(1!=this.UA(b,D.Mb(),h)&&1!=this.VA(b,D,h))return null;k.Bc(D,!1);t=1;v=0}else switch(E=this.VA(b,D,h),E){case 1:K?2>t?(c=m.Jb()-e.Ea(w),v=1,t=0==t?3:2):v++:(k.Bc(D,0==t),t=1);break;case 0:t=0;c=-1;v=0;break;default:return null}D=I}}}else{B=this.UA(b,z.Mb(),h);if(0>B)return null;1==B?(2>t&&(c=m.Jb()-e.Ea(w),t=0==t?3:2),v++):(c=-1,v=0)}q.clear(!1)}else 0!=B&&1==B&&(0==t?(t=3,c=m.Jb()-e.Ea(w)):1==t?(t=2,c=m.Jb()-e.Ea(w)):v++)}2<=t&&(k.ys(e,w,c,
v,3==t),c=-1)}return k};h.prototype.UA=function(c,b,e){return a.ff.xl(c,b,e)};h.prototype.VA=function(c,b,e){var k=b.Mb();b=b.oc();var h=a.ff.xl(c,k,e),d=a.ff.xl(c,b,e);if(1==h&&0==d||0==h&&1==d)return-1;if(0==h||0==d)return 0;if(1==h||1==d)return 1;h=new a.b;h.add(k,b);h.scale(.5);c=a.ff.xl(c,h,e);return 0==c?0:1==c?1:-1};h.V=function(c,b){return b?c:c.Pa()};h.prototype.kF=function(){null==this.$D&&(this.$D=this.Ce.Pa());return this.$D};return h}();a.Vz=h})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,
arguments)}I(c,h);c.prototype.D=function(){return 28};c.local=function(){null===c.V&&(c.V=new c);return c.V};c.prototype.$=function(b,c,k,h,d,f,g){return b instanceof a.T?(b=new a.Pc(b),this.$(b,c,k,h,d,f,g).next()):new a.eI(b,c,k,h,d,f,g)};c.V=null;return c}(a.Me);a.Wz=h})(z||(z={}));(function(a){var h=function(){function h(c,b,a,k,h,d,f){this.ua=-1;this.ne=c;this.Pi=b;this.Da=a;this.bi=k;this.Dx=h;this.XD=d;this.oe=f}h.prototype.next=function(){var c=this.ne.next();return null!=c?(this.ua=this.ne.ya(),
this.RH(c)):null};h.prototype.ya=function(){return this.ua};h.prototype.RH=function(c){var b;b=0>=this.XD?a.Ia.Cg(this.Pi,c,!1):this.XD;return a.XG.$(c,this.Da,this.bi,this.Dx,b,this.oe)};return h}();a.eI=h})(z||(z={}));(function(a){var h=function(){function c(){}c.prototype.reset=function(){this.Pg=this.Fj=-1;this.Hq=this.Uo=!1};c.prototype.QM=function(b,c,a){for(b.Sb(c,a);b.La();){var e=b.ia(),e=e.$b();if(0!=e)return b.Jb()}for(b.Sb(c,a);b.Ow();)if(e=b.oi(),e=e.$b(),0!=e)return b.Jb();return-1};
c.prototype.RM=function(b,c){for(b.Sb(c,-1);b.Ow();)if(0!=b.oi().$b())return b.Jb();return-1};c.prototype.PM=function(b,c){b.Sb(c,-1);for(b.ia();b.La();)if(0!=b.ia().$b())return b.Jb();return-1};c.prototype.OM=function(b,c,k,h){this.Fj=this.QM(c,k,h);if(-1!=this.Fj){c.Sb(this.Fj,-1);var e=c.ia(),d=e.Kb(e.Gd(b,!1));k=a.b.Zb(d,b);h=new a.b;h.J(d);h.sub(e.Mb());d=new a.b;d.J(b);d.sub(e.Mb());this.Uo=0>h.Ai(d);this.Pg=this.PM(c,this.Fj);if(-1!=this.Pg){c.Sb(this.Pg,-1);var e=c.ia(),n=e.Gd(b,!1),n=e.Kb(n),
f=a.b.Zb(n,b);f>k?this.Pg=-1:(h.J(n),h.sub(e.Mb()),d.J(b),d.sub(e.Mb()),this.Hq=0>h.Ai(d))}-1==this.Pg&&(this.Pg=this.RM(c,this.Fj),-1!=this.Pg&&(c.Sb(this.Pg,-1),e=c.ia(),n=e.Gd(b,!1),n=e.Kb(n),f=a.b.Zb(n,b),f>k?this.Pg=-1:(h.J(n),h.sub(e.Mb()),d.J(b),d.sub(e.Mb()),this.Hq=0>h.Ai(d),b=this.Fj,this.Fj=this.Pg,this.Pg=b,b=this.Uo,this.Uo=this.Hq,this.Hq=b)))}};c.prototype.FK=function(b,c,a,h,d){a=a.Ca();this.OM(b,a,h,d);if(-1!=this.Fj&&-1==this.Pg)return this.Uo;if(-1!=this.Fj&&-1!=this.Pg){if(this.Uo==
this.Hq)return this.Uo;a.Sb(this.Fj,-1);b=a.ia().Pf(1);a.Sb(this.Pg,-1);c=a.ia().Pf(0);return 0<=b.Ai(c)?!0:!1}return c};return c}(),d=function(c){function b(){c.apply(this,arguments)}I(b,c);b.local=function(){null===b.V&&(b.V=new b);return b.V};b.prototype.D=function(){return 3};b.prototype.zw=function(b,c,h,d){void 0===d&&(d=!1);if(b.s())return new a.dl;c=c.w();var e=b,k=b.D();197==k&&(e=new a.Ka,e.Wc(b,!1),k=1736);switch(k){case 33:return this.OE(e,c);case 550:return this.BE(e,c);case 1607:case 1736:return this.dQ(e,
c,h,d);default:throw a.g.ra("not implemented");}};b.prototype.Aw=function(b,c){if(b.s())return new a.dl;c=c.w();var e=b,k=b.D();197==k&&(e=new a.Ka,e.Wc(b,!1),k=1736);switch(k){case 33:return this.OE(e,c);case 550:case 1607:case 1736:return this.BE(e,c);default:throw a.g.ra("not implemented");}};b.prototype.Bw=function(b,c,h,d){if(0>d)throw a.g.N();if(b.s())return[];c=c.w();var e=b,k=b.D();197==k&&(e=new a.Ka,e.Wc(b,!1),k=1736);switch(k){case 33:return this.IQ(e,c,h,d);case 550:case 1607:case 1736:return this.gQ(e,
c,h,d);default:throw a.g.ra("not implemented");}};b.prototype.dQ=function(b,c,d,f){if(1736==b.D()&&d&&(d=new a.i,b.o(d),d=a.Ia.zd(null,d,!1),0!=(f?a.gd.he(b,c,0):a.gd.he(b,c,d)))){var e=new a.dl(c,0,0);f&&e.UF(!0);return e}for(var k=b.Ca(),e=new a.b,n=d=-1,g=1.7976931348623157E308,u=0;k.kb();)for(;k.La();){var l=k.ia(),l=l.Kb(l.Gd(c,!1)),m=a.b.Zb(l,c);m<g?(u=1,e=l,d=k.Jb(),n=k.Qa,g=m):m==g&&u++}e=new a.dl(e,d,Math.sqrt(g));f&&(k.Sb(d,n),l=k.ia(),f=0>a.b.yn(c,l.Mb(),l.oc()),1<u&&(u=new h,u.reset(),
f=u.FK(c,f,b,d,n)),e.UF(f));return e};b.prototype.OE=function(b,c){b=b.w();c=a.b.Fb(b,c);return new a.dl(b,0,c)};b.prototype.BE=function(b,c){var e=b.mc(0);b=b.F();for(var k=0,h=0,d=0,f=1.7976931348623157E308,g=0;g<b;g++){var l=new a.b;e.ec(2*g,l);var m=a.b.Zb(l,c);m<f&&(h=l.x,d=l.y,k=g,f=m)}e=new a.dl;e.tv(h,d,k,Math.sqrt(f));return e};b.prototype.IQ=function(b,c,h,d){if(0==d)return h=[];h*=h;b=b.w();c=a.b.Zb(b,c);c<=h?(h=[],d=new a.dl,d.tv(b.x,b.y,0,Math.sqrt(c)),h[0]=d):h=[];return h};b.prototype.gQ=
function(b,c,h,d){if(0==d)return d=[];var e=b.mc(0),k=b.F();b=[];var n=0;h*=h;for(var f=0;f<k;f++){var g=e.read(2*f),u=e.read(2*f+1),l=c.x-g,m=c.y-u,l=l*l+m*m;l<=h&&(m=new a.dl,m.tv(g,u,f,Math.sqrt(l)),n++,b.push(m))}c=b.length;b.sort(function(b,c){return b.Da<c.Da?-1:b.Da==c.Da?0:1});if(d>=c)return b.slice(0);b.length=d;return b.slice(0)};b.V=null;return b}(a.Me);a.bv=d})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,arguments)}I(c,h);c.prototype.D=function(){return 4};c.prototype.$=
function(b,c,k,h,d){return a.el.py(b,c,k,h,d)};c.local=function(){null===c.V&&(c.V=new c);return c.V};c.V=null;return c}(a.Me);a.fI=h})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,arguments)}I(c,h);c.prototype.D=function(){return 33};c.prototype.$=function(b,c,k,h,d){return 1073741824===b?!a.hd.qy(c,k,h,4,d):a.hd.qy(c,k,h,b,d)};c.local=function(){null===c.V&&(c.V=new c);return c.V};c.V=null;return c}(a.Me);a.bl=h})(z||(z={}));(function(a){var h=function(){function h(c,b,e,
k){this.oe=k;this.yP=e;this.ua=-1;if(null==c)throw a.g.N();this.wk=c;this.Pi=b}h.prototype.next=function(){var c;return null!=(c=this.wk.next())?(this.ua=this.wk.ya(),this.Qy(c)):null};h.prototype.ya=function(){return this.ua};h.prototype.Qy=function(c){if(null==c)throw a.g.N();return a.cv.cG(c,this.Pi,this.yP,this.oe)};return h}();a.gI=h})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,arguments)}I(c,h);c.prototype.D=function(){return 26};c.prototype.$=function(b,c,k,h){return b instanceof
a.T?(b=new a.Pc(b),this.$(b,c,k,h).next()):new a.gI(b,c,k,h)};c.prototype.Ro=function(b,c,k,h,d){return 0<(void 0!==h?a.cv.Ro(b,c,k,h,d):a.cv.Ro(b,c,!1,null,k))};c.local=function(){null===c.V&&(c.V=new c);return c.V};c.V=null;return c}(a.Me);a.as=h})(z||(z={}));(function(a){var h=function(){function b(){this.hp=0}b.prototype.hS=function(b){this.hp&=-2;this.hp|=b?1:0};b.prototype.sl=function(){return 0!=(this.hp&1)};b.prototype.LC=function(){return this.sl()?0:1};return b}();a.AT=h;var d=function(){return function(){}}(),
c=function(){return function(b,c,a,e){this.x=b;this.y=c;this.Sh=a;this.yl=e}}(),b=function(){function b(b){this.me=b}b.prototype.compare=function(b,c,a){b=b.da(a);c=this.me.$e.read(2*c);b=this.me.$e.read(2*b);c-=b;return 0>c?-1:0<c?1:0};return b}(),e=function(){function b(b){this.me=b}b.prototype.compare=function(b,c,a){c=this.me.$a[c];b=this.me.$a[b.da(a)];var e=c.sl(),k=b.sl();a=c.Zd.xe(this.me.wn,0);var h=b.Zd.xe(this.me.wn,0);a==h&&(a=Math.min(e?c.Zd.ja:c.Zd.ha,k?b.Zd.ja:b.Zd.ha),e=.5*(a-this.me.wn)+
this.me.wn,e==this.me.wn&&(e=a),a=c.Zd.xe(e,0),h=b.Zd.xe(e,0));return a<h?-1:a>h?1:0};return b}(),k=function(){function b(b,c){this.VE=new a.b;this.parent=b;this.mO=c}b.prototype.Zp=function(b,c,a){var e=this.parent,k=this.mO;a.xd(b,c,function(b,c){return e.kj(b,c,k)})};b.prototype.Mo=function(b){b=this.parent.xh.get(b);this.parent.$e.ec(2*(b>>1),this.VE);return this.VE.y+(0!=(b&1)?this.parent.Ri:-this.parent.Ri)};return b}(),n=function(){function n(b,c,e,k,h){this.SD=b.description;this.U=b;this.sg=
c;this.Ri=a.Ia.Cg(this.sg,b,!1);this.pn=a.Ia.Cg(this.sg,b,!0);this.yx=e;this.wP=this.SD.Aa;this.$a=[];this.dn=[];this.Lg=new a.$n;this.Za=new a.bj;this.Kd=new a.wd;this.GD=this.pk=h}n.prototype.Yw=function(){this.GD=!0;return(!a.T.Kc(this.U.D())||this.yB()&&this.xB(!1))&&this.OK()?a.T.Kc(this.U.D())?this.RK()?1607==this.U.D()?this.TK()?2:0:this.UK()?this.VK():0:0:2:0};n.prototype.Yy=function(b,c){var e=this.$e.read(2*b);b=this.$e.read(2*b+1);var k=this.$e.read(2*c);c=this.$e.read(2*c+1);var h=!a.Sr.Vw(e,
b,k,c,this.Ri*this.Ri);return h?h:0==this.U.fb()?!1:e==k&&b==c};n.prototype.yB=function(){for(var b=this.U,c=b.Yf?3:2,e=0,k=b.ea();e<k;e++)if(b.Ha(e)<c)return this.Kd=new a.wd(1,e,0),!1;return!0};n.prototype.xB=function(b){for(var c=this.U,e=c.Ca(),k=c.hasAttribute(1),c=k?a.Ia.rB(this.sg,c,!1):0;e.kb();)for(;e.La();){var h=e.ia();if(!(h.$b()>this.Ri)){if(b&&k){var d=h.gt(1,0),h=h.gt(1,0);if(Math.abs(h-d)>c)continue}this.Kd=new a.wd(2,e.Jb(),-1);return!1}}return!0};n.prototype.OK=function(){var c=
this.U,e=null;a.T.Kc(this.U.D())&&(e=this.U);var h=(this.GD||this.pk)&&null!=e,d=c.F();this.$e=c.mc(0);this.xh=new a.ga(0);this.xh.xb(2*d);this.wh=new a.ga(0);this.wh.xb(2*d);h&&(null==this.Bk&&(this.Bk=new a.ga(0)),this.Bk.xb(d));for(var n=c=0;n<d;n++)if(this.xh.add(2*n),this.xh.add(2*n+1),this.wh.add(2*n),this.wh.add(2*n+1),h){for(;n>=e.Dc(c);)c++;this.Bk.add(c)}(new a.Rr).sort(this.wh,0,2*d,new k(this,h));this.Za.clear();this.Za.Hn(new b(this));this.Za.de(d);e=0;for(d*=2;e<d;e++)if(h=this.wh.get(e),
c=this.xh.get(h),h=c>>1,0==(c&1)){c=this.Za.addElement(h,-1);n=this.Za.ge(c);if(-1!=n&&!this.Yy(this.Za.da(n),h))return this.Kd=new a.wd(3,h,this.Za.da(n)),!1;var f=this.Za.bb(c);if(-1!=f&&!this.Yy(this.Za.da(f),h))return this.Kd=new a.wd(3,h,this.Za.da(f)),!1}else if(c=this.Za.search(h,-1),n=this.Za.ge(c),f=this.Za.bb(c),this.Za.kd(c,-1),-1!=n&&-1!=f&&!this.Yy(this.Za.da(n),this.Za.da(f)))return this.Kd=new a.wd(3,this.Za.da(n),this.Za.da(f)),!1;return!0};n.prototype.RK=function(){return 10>this.U.F()?
this.PK():this.QK()};n.prototype.QK=function(){var b=new a.fd;b.Eb(this.U);var c=new a.wd;return a.Zu.DE(!1,b,this.Ri,c,this.oe)?(c.Fk=b.gb(c.Fk),c.Gk=b.gb(c.Gk),this.Kd.aq(c),!1):!0};n.prototype.PK=function(){for(var b=this.U,c=b.Ca(),b=b.Ca();c.kb();)for(;c.La();){var e=c.ia();if(!c.Jm()||!c.YO()){b.xR(c);do for(;b.La();){var k=b.ia(),k=e.fq(k,this.Ri,!0);if(0!=k)return this.Kd=new a.wd(2==k?5:4,c.Jb(),b.Jb()),!1}while(b.kb())}}return!0};n.prototype.UK=function(){var b=this.U;this.$a.length=0;this.dn.length=
0;this.Hf=b.Ca();this.Hf.NR();var c=new a.ga(0);c.xb(10);for(var e=NaN,k=0,h=0,b=2*b.F();h<b;h++){var d=this.wh.get(h),d=this.xh.get(d);if(0==(d&1)){var d=d>>1,n=this.$e.read(2*d),f=this.$e.read(2*d+1);if(0!=c.size&&(n!=e||f!=k)){if(!this.TE(c))return!1;null!=c&&c.clear(!1)}c.add(d);e=n;k=f}}return this.TE(c)?!0:!1};n.prototype.TK=function(){for(var b=this.U,c=Array(b.ea()),e=0,k=b.ea();e<k;e++)c[e]=b.Oo(e);var k=new d,h,n,f,g=new a.b,e=this.wh.get(0),e=this.xh.get(e),u=e>>1;this.$e.ec(2*u,g);e=this.Bk.get(u);
h=c[e];n=b.Ea(e);f=b.Dc(e)-1;k.ak=u==n||u==f;k.Ev=this.pk?!h&&k.ak:k.ak;k.Sh=e;k.x=g.x;k.y=g.y;k.yl=u;for(var l=new d,m=1,p=this.wh.size;m<p;m++)if(e=this.wh.get(m),e=this.xh.get(e),0==(e&1)){u=e>>1;this.$e.ec(2*u,g);e=this.Bk.get(u);e!=k.Sh&&(h=c[e],n=b.Ea(e),f=b.Dc(e)-1);var q,r=u==n||u==f;q=this.pk?!h&&k.ak:k.ak;l.x=g.x;l.y=g.y;l.Sh=e;l.yl=u;l.Ev=q;l.ak=r;if(l.x==k.x&&l.y==k.y)if(this.pk){if(!l.Ev||!k.Ev)if(l.Sh!=k.Sh||!l.ak&&!k.ak)return this.Kd=new a.wd(8,l.yl,k.yl),!1}else if(!l.ak||!k.ak)return this.Kd=
new a.wd(5,l.yl,k.yl),!1;e=k;k=l;l=e}return!0};n.prototype.AB=function(){for(var b=this.U,e=[],k=-1,h=!1,d=0,n=b.ea();d<n;d++)b.qt(d)&&(h=!1,k++,d<n-1&&(b.qt(d+1)||(h=!0))),e[d]=h?k:-1;var h=new a.b,d=this.wh.get(0),d=this.xh.get(d),f=d>>1;this.$e.ec(2*f,h);for(var d=this.Bk.get(f),k=new c(h.x,h.y,d,f,e[d]),b=[],g=1,n=this.wh.size;g<n;g++)if(d=this.wh.get(g),d=this.xh.get(d),0==(d&1)){f=d>>1;this.$e.ec(2*f,h);d=this.Bk.get(f);d=new c(h.x,h.y,d,f,e[d]);if(d.x==k.x&&d.y==k.y){if(d.Sh==k.Sh)return this.Kd=
new a.wd(9,d.yl,k.yl),!1;0<=e[d.Sh]&&e[d.Sh]==e[k.Sh]&&(0!=b.length&&b[b.length-1]==k||b.push(k),b.push(d))}k=d}if(0==b.length)return!0;d=new a.$n(!0);a.I.Ps(e,-1);h=-1;g=new a.b;g.Eh();k=0;for(n=b.length;k<n;k++){f=b[k];if(f.x!=g.x||f.y!=g.y)h=d.jh(0),g.x=f.x,g.y=f.y;var u=e[f.Sh];-1==u&&(u=d.jh(2),e[f.Sh]=u);d.addElement(u,h);d.addElement(h,u)}n=new a.ga(0);n.xb(10);for(k=d.Wd;-1!=k;k=d.Cw(k))if(b=d.DC(k),0==(b&1)&&0!=(b&2)){b=-1;n.add(k);for(n.add(-1);0<n.size;){h=n.tc();n.af();g=n.tc();n.af();
f=d.DC(g);if(0!=(f&1)){b=0==(f&2)?h:g;break}d.$R(g,f|1);for(f=d.gc(g);-1!=f;f=d.bb(f))u=d.getData(f),u!=h&&(n.add(u),n.add(g))}if(-1!=b){d=-1;k=0;for(n=e.length;k<n;k++)if(e[k]==b){d=k;break}this.Kd=new a.wd(10,d,-1);return!1}}return!0};n.prototype.VK=function(){var b=this.U;if(0>=b.Mh())return this.Kd=new a.wd(6,1==b.ea()?1:-1,-1),0;if(1==b.ea())return this.pk&&!this.AB()?0:2;this.gn=a.ga.Yc(b.ea(),0);this.Hx=a.ga.Yc(b.ea(),-1);for(var c=-1,k=0,h=0,d=b.ea();h<d;h++){var n=b.oo(h);this.gn.write(h,
0>n?0:256);if(0<n)c=h,k=n;else{if(0==n)return this.Kd=new a.wd(6,h,-1),0;if(0>c||k<Math.abs(n))if(this.Kd=new a.wd(7,h,-1),this.pk)return 0;this.Hx.write(h,c)}}this.kr=b.ea();this.Ll=new a.ga(0);this.Ll.xb(10);d=b.F();this.wn=NaN;b=new a.ga(0);b.xb(10);this.yp=a.ga.Yc(d,-1);this.hu=a.ga.Yc(d,-1);null!=this.Hi?this.Hi.clear(!1):this.Hi=new a.ga(0);this.Hi.xb(10);this.Za.clear();this.Za.Hn(new e(this));c=0;for(d*=2;0<this.kr&&c<d;c++)if(k=this.wh.get(c),k=this.xh.get(k),0==(k&1)){k>>=1;h=this.$e.read(2*
k+1);if(h!=this.wn&&0!=b.size){if(!this.yr(b))return 0;null!=b&&b.clear(!1)}b.add(k);this.wn=h}return 0<this.kr&&!this.yr(b)?0:this.pk?0==this.Kd.yh&&this.AB()?2:0:0==this.Kd.yh?2:1};n.prototype.TE=function(b){if(1==b.size)return!0;for(var c=0,e=b.size;c<e;c++){var k=b.get(c);this.Hf.Sb(k);var h=this.Hf.oi();this.$a.push(this.Ls(h,k,this.Hf.Qa,!0));this.Hf.ia();h=this.Hf.ia();this.$a.push(this.Ls(h,k,this.Hf.Qa,!1))}var d=this;this.$a.sort(function(b,c){return d.sM(b,c)});k=this.Lg.Wd;-1==k&&(k=this.Lg.jh(0));
this.Lg.$l(this.$a.length);c=0;for(e=this.$a.length;c<e;c++)this.Lg.addElement(k,c);for(var c=!0,n=e=-1;c;){c=!1;h=this.Lg.gc(k);if(-1==h)break;for(var f=this.Lg.bb(h);-1!=f;){e=this.Lg.getData(h);n=this.Lg.getData(f);e=this.$a[e].tn;n=this.$a[n].tn;if(e==n)if(c=!0,this.Lg.Jc(k,h),h=this.Lg.ge(f),f=this.Lg.Jc(k,f),-1==f||-1==h)break;else continue;h=f;f=this.Lg.bb(h)}}c=this.Lg.vq(k);this.Lg.CB(k);if(0<c)return this.Kd=new a.wd(5,e,n),!1;c=0;for(e=b.size;c<e;c++)this.my(this.$a[c]);this.$a.length=
0;return!0};n.prototype.yr=function(b){for(var c=0,e=b.size;c<e;c++){var k=b.get(c),h=this.yp.read(k);if(-1!=h){var d=this.Za.da(h);this.Hi.add(d);this.Za.kd(h,-1);this.my(this.$a[d]);this.$a[d]=null;this.yp.write(k,-1)}h=this.hu.read(k);-1!=h&&(d=this.Za.da(h),this.Hi.add(d),this.Za.kd(h,-1),this.my(this.$a[d]),this.$a[d]=null,this.hu.write(k,-1))}c=0;for(e=b.size;c<e;c++){k=b.get(c);this.Hf.Sb(k);h=this.Hf.oi();if(h.ja>h.ha){var n=this.Hf.Jb(),f=this.Ls(h,k,this.Hf.Qa,!0);0<this.Hi.size?(d=this.Hi.tc(),
this.Hi.af(),this.$a[d]=f):(d=this.$a.length,this.$a.push(f));h=this.Za.addElement(d,-1);-1==this.yp.read(n)?this.yp.write(n,h):this.hu.write(n,h);0==(this.gn.read(this.Hf.Qa)&3)&&this.Ll.add(h)}this.Hf.ia();h=this.Hf.ia();h.ja<h.ha&&(n=this.Hf.Bm(),f=this.Ls(h,k,this.Hf.Qa,!1),0<this.Hi.size?(d=this.Hi.tc(),this.Hi.af(),this.$a[d]=f):(d=this.$a.length,this.$a.push(f)),h=this.Za.addElement(d,-1),-1==this.yp.read(n)?this.yp.write(n,h):this.hu.write(n,h),0==(this.gn.read(this.Hf.Qa)&3)&&this.Ll.add(h))}c=
0;for(e=this.Ll.size;c<e&&0<this.kr;c++)if(h=this.Ll.get(c),0==(this.gn.read(this.$a[this.Za.da(h)].Gx)&3)){b=-1;for(var k=this.Za.ge(h),g=h,f=null,d=-1,u=0;-1!=k;){d=this.Za.da(k);f=this.$a[d];d=f.Gx;u=this.gn.read(d);if(0!=(u&3))break;g=k;k=this.Za.ge(k)}-1==k?(n=1,k=g):(b=1==(u&3)?d:this.Hx.read(d),n=0!=f.LC()?0:1,k=this.Za.bb(k));do{d=this.Za.da(k);f=this.$a[d];d=f.Gx;g=this.gn.read(d);if(0==(g&3)){if(n!=f.LC())return this.Kd=new a.wd(6,d,-1),!1;u=0==n||f.sl()?2:1;g=g&252|u;this.gn.write(d,u);
if(2==u&&0==this.Kd.yh&&this.Hx.read(d)!=b&&(this.Kd=new a.wd(7,d,-1),this.pk))return!1;this.kr--;if(0==this.kr)return!0}1==(g&3)&&(b=d);g=k;k=this.Za.bb(k);n=0!=n?0:1}while(g!=h)}null!=this.Ll?this.Ll.clear(!1):this.Ll=new a.ga(0);return!0};n.prototype.Ls=function(b,c,e,k){if(322==b.D())b=this.PL(b);else throw a.g.wa();b.tn=c;b.Gx=e;b.hp=0;b.hS(k);return b};n.prototype.PL=function(b){var c;0<this.dn.length?(c=this.dn[this.dn.length-1],--this.dn.length,b.copyTo(c.Zd)):(c=new h,c.Zd=a.fA.Yj(b));return c};
n.prototype.my=function(b){322==b.Zd.D()&&this.dn.push(b)};n.prototype.eQ=function(){for(var b=this.U.F(),c=new a.ga(0),e=0;e<b;e++)c.add(e);var k=this;c.xd(0,b,function(b,c){return k.Is(b,c)});for(e=1;e<b;e++)if(0==this.Is(c.get(e-1),c.get(e)))return this.Kd=new a.wd(3,c.get(e-1),c.get(e)),0;return 2};n.prototype.NQ=function(){return this.yB()?this.xB(!0)?2:0:0};n.prototype.LQ=function(){return this.Yw()};n.prototype.fQ=function(){for(var b=this.U.F(),c=new a.ga(0),e=0;e<b;e++)c.add(e);var k=this;
c.xd(0,b,function(b,c){return k.uL(b,c)});var h=Array(b);a.I.Ps(h,!1);h[c.get(0)]=!0;for(e=1;e<b;e++){var d=c.get(e-1),n=c.get(e);0==this.Is(d,n)?h[n]=!1:h[n]=!0}for(var c=this.U.Pa(),d=this.U,n=0,f=1,e=0;e<b;e++)h[e]?f=e+1:(n<f&&c.Pd(d,n,f),n=e+1);n<f&&c.Pd(d,n,f);c.hg(2,this.pn);return c};n.prototype.OQ=function(){var b=this.U,c=b.Ca(),e=b.Ca(),k=this.U.Pa(),h=this.U,d=b.hasAttribute(1),n=d?a.Ia.rB(this.sg,b,!0):0,f=new a.ga(0),g=new a.ga(0);f.xb(a.I.truncate(b.F()/2+1));for(g.xb(a.I.truncate(b.F()/
2+1));c.kb();)if(e.kb(),!(2>b.Ha(c.Qa))){e.zR();for(var u,l,m=!0;c.La();){var p=c.ia(),q=e.oi();if(c.Jb()>e.Jb())break;m&&(f.add(c.Jb()),g.add(e.Bm()),m=!1);l=f.tc();var r=c.Bm();if(1<r-l){var v=new a.b;v.pc(b.Fa(l),b.Fa(r));u=v.length()}else u=p.$b();l=g.tc();r=e.Jb();1<r-l?(v=new a.b,v.pc(b.Fa(l),b.Fa(r)),l=v.length()):l=q.$b();u>this.pn?f.add(c.Bm()):d&&(u=b.ld(1,f.tc(),0),p=p.Ws(1,0),Math.abs(p-u)>n&&f.add(c.Bm()));l>this.pn?g.add(e.Jb()):d&&(u=b.ld(1,g.tc(),0),p=q.Ws(1,0),Math.abs(p-u)>n&&g.add(e.Jb()))}f.tc()<
g.tc()?f.size>g.size?f.af():g.af():(f.tc()!=g.tc()&&g.af(),g.af());if(2<=g.size+f.size){m=new a.Va;q=0;for(p=f.size;q<p;q++)h.Sd(f.get(q),m),0==q?k.df(m):k.lineTo(m);for(q=g.size-1;0<q;q--)h.Sd(g.get(q),m),k.lineTo(m);h.vc(c.Qa)?k.ro():0<g.size&&(h.Sd(g.get(0),m),k.lineTo(m))}null!=f&&f.clear(!1);null!=g&&g.clear(!1)}k.hg(2,this.pn);return k};n.prototype.MQ=function(){return this.xS()};n.prototype.xS=function(){if(1736==this.U.D()&&1==this.U.Cm())return a.Of.Qj(this.U,this.pn,!0,!1,this.oe);this.Zh=
new a.fd;this.Zh.Eb(this.U);0!=this.Zh.pd&&(1!=this.yx&&a.aj.$(this.Zh,this.pn,this.oe,!0),1736==this.U.D()&&a.mm.$(this.Zh,this.Zh.$c,this.yx,!1,this.oe));this.U=this.Zh.hf(this.Zh.$c);1736==this.U.D()&&(this.U.hl(),this.U.Pp(0));this.U.hg(2,this.pn);return this.U};n.ac=function(b,c,e){if(b.s())return 1;var k=b.D();if(33==k)return 1;if(197==k)return e=new a.i,b.o(e),e.mg(a.Ia.Cg(c,b,!1))?0:1;if(a.T.Lc(k))throw a.g.wa();if(!a.T.Th(k))throw a.g.wa();var k=a.Ia.Cg(c,b,!1),h=b.rj(k);e=e?-1:h;if(-1!=
e)return e;1==e&&(k=0);e=(new n(b,c,e,0,!1)).Yw();b.hg(e,k);return e};n.Ro=function(b,c,e,k,h){null!=k&&(k.yh=0,k.Fk=-1,k.Gk=-1);if(b.s())return 1;var d=b.D();if(33==d)return 1;var f=a.Ia.Cg(c,b,!1);if(197==d)return c=new a.i,b.o(c),c.mg(f)?(null!=k&&(k.yh=2,k.Fk=-1,k.Gk=-1),0):1;if(a.T.Lc(d))return f=new a.Xa(b.description),f.Bc(b,!0),n.Ro(f,c,e,k,h);h=b.rj(f);e=e?-1:h;if(-1!=e)return e;c=new n(b,c,e,0,!1);if(550==d)e=c.eQ();else if(1607==d)e=c.NQ();else if(1736==d)e=c.LQ();else throw a.g.wa();b.hg(e,
f);null!=k&&0==e&&k.aq(c.Kd);return e};n.ob=function(b,c,e,k,h){null!=k&&(k.yh=0,k.Fk=-1,k.Gk=-1);if(b.s())return 1;var d=b.D();if(33==d)return 1;var f=a.Ia.Cg(c,b,!1);if(197==d)return c=new a.i,b.o(c),c.mg(f)?(null!=k&&(k.yh=2,k.Fk=-1,k.Gk=-1),0):1;if(a.T.Lc(d))return d=new a.Xa(b.description),d.Bc(b,!0),n.Ro(d,c,e,k,h);b=new n(b,c,-1,0,!0);if(550==d||1607==d||1736==d)c=b.Yw();else throw a.g.wa();null!=k&&k.aq(b.Kd);return c};n.cG=function(b,c,e,k){if(b.s())return b;var h=b.D();if(33==h)return b;
var d=a.Ia.Cg(c,b,!1);if(197==h)return c=new a.i,b.o(c),c.mg(d)?b.Pa():b;if(a.T.Lc(h))return h=new a.Xa(b.description),h.Bc(b,!0),n.cG(h,c,e,k);k=b.rj(d);e=e?-1:k;if(2==e)return b;b=new n(b,c,e,0,!1);if(550==h)b=b.fQ();else if(1607==h)b=b.OQ();else if(1736==h)b=b.MQ();else throw a.g.wa();return b};n.Ry=function(b,c,e,k){if(b.s())return b;var h=b.D();if(33==h)return b;var d=a.Ia.Cg(c,b,!1);if(197==h)return c=new a.i,b.o(c),c.mg(d)?b.Pa():b;if(a.T.Lc(h))return d=new a.Xa(b.description),d.Bc(b,!0),n.Ry(d,
c,e,k);if(!a.T.Th(h))throw a.g.ra("OGC simplify is not implemented for this geometry type "+h);return a.Of.Ry(b,d,!1,k)};n.prototype.kj=function(b,c,e){if(b==c)return 0;b=this.xh.get(b);var k=this.xh.get(c);c=b>>1;var h=k>>1,d=new a.b,n=new a.b;this.$e.ec(2*c,d);d.y+=0!=(b&1)?this.Ri:-this.Ri;this.$e.ec(2*h,n);n.y+=0!=(k&1)?this.Ri:-this.Ri;b=d.compare(n);return 0==b&&e?(e=this.Bk.get(c)-this.Bk.get(h),0>e?-1:0<e?1:0):b};n.prototype.Is=function(b,c){if(b==c)return 0;var e=this.U,k=e.Fa(b),h=e.Fa(c);
if(k.x<h.x)return-1;if(k.x>h.x)return 1;if(k.y<h.y)return-1;if(k.y>h.y)return 1;for(k=1;k<this.wP;k++)for(var h=this.SD.Hd(k),d=a.pa.Wa(h),n=0;n<d;n++){var f=e.ld(h,b,n),g=e.ld(h,c,n);if(f<g)return-1;if(f>g)return 1}return 0};n.prototype.uL=function(b,c){var a=this.Is(b,c);return 0==a?b<c?-1:1:a};n.prototype.sM=function(b,c){if(b===c)return 0;var a=b.Zd.Pf(b.sl()?1:0);b.sl()&&a.Bp();b=c.Zd.Pf(c.sl()?1:0);c.sl()&&b.Bp();c=a.ps();var e=b.ps();return e==c?(c=a.Ai(b),Math.abs(c)<=8.881784197001252E-16*
(Math.abs(b.x*a.y)+Math.abs(b.y*a.x))&&(c--,c++),0>c?1:0<c?-1:0):c<e?-1:1};return n}();a.cv=n})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,arguments)}I(c,h);c.prototype.D=function(){return 30};c.local=function(){null===c.V&&(c.V=new c);return c.V};c.prototype.$=function(b,c,k,h){return b instanceof a.T?(b=new a.Pc(b),c=new a.Pc(c),this.$(b,c,k,h).next()):new a.hI(b,c,k,h)};c.On=function(b,e,k,h){var d=b.fb(),n=e.fb();if(b.s()&&e.s())return d>n?b:e;if(b.s())return e;if(e.s())return b;
var f=new a.i,g=new a.i,l=new a.i;b.o(f);e.o(g);l.K(f);l.Db(g);f=a.Ia.zd(k,l,!1);g=b.D();l=e.D();return 33==g&&33==l?c.qP(b,e,f):g!=l?0<d||0<n?d>n?b:e:550==g?c.pA(b,e,f):c.pA(e,b,f):a.Of.On(b,e,k,h)};c.qP=function(b,c,k){k=k*Math.sqrt(2)*1.00001;k*=k;var e=b.w(),h=c.w(),d=new a.pe(b.description);a.b.Zb(e,h)>k&&(d.add(b),d.add(c));return d};c.pA=function(b,c,k){var e=b.mc(0),h=b.F(),d=c.w(),f=b.Pa();k=k*Math.sqrt(2)*1.00001;var g=new a.i;b.o(g);g.P(k,k);if(g.contains(d)){k*=k;for(var g=!1,l=[],m=0;m<
h;m++)l[m]=!1;for(m=0;m<h;m++){var p=e.read(2*m),q=e.read(2*m+1),p=p-d.x,q=q-d.y;p*p+q*q<=k&&(g=!0,l[m]=!0)}if(g)for(m=0;m<h;m++)l[m]||f.Pd(b,m,m+1);else f.Pd(b,0,h),f.add(c)}else f.Pd(b,0,h),f.add(c);return f};c.V=null;return c}(a.Me);a.dv=h})(z||(z={}));(function(a){var h=function(){function h(c,b,a,k){this.Fq=null==b;this.ua=-1;this.ne=c;this.cg=a;this.QP=b.next();this.Yb=k}h.prototype.next=function(){if(this.Fq)return null;var c;return null!=(c=this.ne.next())?(this.ua=this.ne.ya(),a.dv.On(c,
this.QP,this.cg,this.Yb)):null};h.prototype.ya=function(){return this.ua};return h}();a.hI=h})(z||(z={}));(function(a){var h=function(){function b(){}b.prototype.jt=function(){this.iw=null;this.Vu=-1;this.xG=!1};return b}(),d=function(){function b(){this.jq=0;this.Ci=[]}b.prototype.TJ=function(b){this.jq+=b.Vu;this.Ci.push(b)};b.prototype.PQ=function(){this.jq-=this.Ci[this.Ci.length-1].Vu;--this.Ci.length};b.prototype.Dv=function(){return this.Ci[this.Ci.length-1]};b.prototype.lc=function(b){return b===
this};return b}(),c=function(){function b(b,c,a){this.ua=-1;this.Ec=!1;this.bE=[!1,!1,!1,!1];this.ep=[0,0,0,0];this.ox=!1;this.Gj=-1;this.So=0;this.Tm=-1;this.rn=[];this.ne=b;this.cg=c;this.Yb=a}b.ac=function(b){var c=[],a;for(a in b)c.push(Number(a));c.sort(function(b,c){return b-c});return c};b.prototype.UC=function(c){var e=this.rn[c],h=b.ac(e)[0],d=e[h],f=d.Dv().iw,d=d.Dv().xG;delete e[h];d&&(f=a.as.local().$(f,this.cg,!1,this.Yb),0==c&&33==f.D()&&(c=new a.pe(f.description),f.s()||c.add(f),f=
c));return f};b.prototype.next=function(){if(this.Ec&&this.Tm==this.Gj)return null;for(;!this.FS(););if(-1==this.Gj)return null;if(this.ox){for(this.Tm++;;){if(this.Tm>this.Gj||0>this.Tm)throw a.g.wa();if(this.bE[this.Tm])break}this.ua++;return this.UC(this.Tm)}this.ua=0;this.Tm=this.Gj;return this.UC(this.Gj)};b.prototype.ya=function(){return this.ua};b.prototype.FS=function(){if(this.Ec)return!0;var b=null;null!=this.ne&&(b=this.ne.next(),null==b&&(this.Ec=!0,this.ne=null));if(null!=b){var c=b.fb();
this.bE[c]=!0;c>=this.Gj&&!this.ox&&(this.SA(c,!1,b),c>this.Gj&&!this.ox&&this.vR(c))}if(0<this.So)for(c=0;c<=this.Gj;c++)for(;1<this.ep[c];)if(b=this.jL(c),0!=b.length)b=a.Of.oM(b,this.cg,this.Yb),this.SA(c,!0,b);else break;return this.Ec};b.prototype.jL=function(c){for(var a=[],e=[],h=this.rn[c],d=b.ac(h),f=0;f<d.length;f++){var g=d[f],l=h[g];if(this.Ec||1E4<l.jq&&1<l.Ci.length){this.ep[c]-=l.Ci.length;for(this.So-=l.Ci.length;0<l.Ci.length;)a.push(l.Dv().iw),l.PQ();e.push(g)}}for(f=0;f<e.length;f++)delete h[e[f]];
return a};b.prototype.vR=function(b){for(var c=0;c<b;c++)this.rn[c]=[],this.So-=this.ep[c],this.ep[c]=0};b.prototype.SA=function(c,a,n){var e=new h;e.jt();e.iw=n;n=b.$g(n);e.Vu=n;n=b.Wf(n);if(c+1>this.rn.length)for(var k=0,f=Math.max(2,c+1);k<f;k++)this.rn.push([]);k=this.rn[c][n];void 0===k&&(k=new d,this.rn[c][n]=k);e.xG=a;k.TJ(e);this.ep[c]++;this.So++;this.Gj=Math.max(this.Gj,c)};b.Wf=function(b){return 0<b?a.I.truncate(Math.log(b)/Math.log(4)+.5):0};b.$g=function(b){var c=b.D();if(a.T.Th(c))return b.F();
if(33==c)return 1;if(197==c)return 4;if(a.T.Lc(c))return 2;throw a.g.wa();};return b}();a.jI=c})(z||(z={}));(function(a){var h=function(h){function c(){h.apply(this,arguments)}I(c,h);c.prototype.D=function(){return 1};c.prototype.$=function(b,c,k,h){return void 0===h?new a.jI(b,c,k):this.xM(b,c,k,h)};c.prototype.xM=function(b,c,k,h){b=new a.Pc([b,c]);return this.$(b,k,h).next()};c.local=function(){null===c.V&&(c.V=new c);return c.V};c.V=null;return c}(a.Me);a.wi=h})(z||(z={}));(function(a){var h;
(function(a){a[a.nextPath=0]="nextPath";a[a.nextSegment=1]="nextSegment";a[a.iterate=2]="iterate"})(h||(h={}));h=function(){function h(c,b,e,k){this.dr=new a.i;this.LP=c;this.MP=b;this.Wo=k;this.hn=-1;this.qk=!1;var h=c.pb;null!=h&&(h=k?h.nn:h.Ab,null!=h&&(this.Ec=!1,this.ka=e,this.Ab=h,this.au=this.Ab.Re(),this.Xo=this.qk=!0,this.Hb=0,k?this.hn=b.ea():this.bd=b.Ca()));this.qk||(h=b.pb,null!=h&&(h=k?h.nn:h.Ab,null!=h&&(this.Ec=!1,this.ka=e,this.Ab=h,this.au=this.Ab.Re(),this.qk=!0,this.Xo=!1,this.Hb=
0,k?this.hn=c.ea():this.bd=c.Ca())));this.qk||(this.th=k?a.Ia.BN(c,b,e,1<=c.rj(0),1<=b.rj(0)):a.Ia.AN(c,b,e))}h.prototype.next=function(){if(this.qk){if(this.Ec)return!1;for(var c=!0;c;)switch(this.Hb){case 0:c=this.nQ();break;case 1:c=this.oQ();break;case 2:c=this.$w();break;default:throw a.g.ra("internal error");}return this.Ec?!1:!0}return null==this.th?!1:this.th.next()};h.prototype.jk=function(){return this.qk?this.Xo?this.Ab.da(this.Rq):this.Wo?this.hn:this.bd.Jb():this.th.jk(this.th.Ff)};h.prototype.ek=
function(){return this.qk?this.Xo?this.Wo?this.hn:this.bd.Jb():this.Ab.da(this.Rq):this.th.ek(this.th.mf)};h.prototype.Fw=function(){if(!this.Wo)throw a.g.ra("internal error");return this.qk?this.Xo?this.Ab.uC(this.Rq):this.dr:this.th.Fw(this.th.Ff)};h.prototype.jw=function(){if(!this.Wo)throw a.g.ra("internal error");return this.qk?this.Xo?this.dr:this.Ab.uC(this.Rq):this.th.jw(this.th.mf)};h.prototype.nQ=function(){if(!this.Wo){if(!this.bd.kb())return this.Ec=!0,!1;this.Hb=1;return!0}if(-1==--this.hn)return this.Ec=
!0,!1;this.Xo?this.MP.Ti(this.hn,this.dr):this.LP.Ti(this.hn,this.dr);this.au.Ch(this.dr,this.ka);this.Hb=2;return!0};h.prototype.oQ=function(){if(!this.bd.La())return this.Hb=0,!0;var c=this.bd.ia();this.au.Fn(c,this.ka);this.Hb=2;return!0};h.prototype.$w=function(){this.Rq=this.au.next();return-1==this.Rq?(this.Hb=this.Wo?0:1,!0):!1};return h}();a.cl=h})(z||(z={}));(function(a){a=a.kI||(a.kI={});a[a.enumClosed=1]="enumClosed";a[a.enumHasNonlinearSegments=2]="enumHasNonlinearSegments";a[a.enumOGCStartPolygon=
4]="enumOGCStartPolygon";a[a.enumCalcMask=4]="enumCalcMask"})(z||(z={}));(function(a){var d=function(){function d(){}d.Fb=function(c,b,e,k,h,f,g,l,m){var n=[0,0,0],u=[0,0,0],p=[0,0,0],q=[0,0,0,0],r=new a.ca(0),C=new a.ca(0),G=new a.ca(0);if(null!=g||null!=l||null!=m)if(a.j.Ih(b))a.zg.Fb(c,e,k,h,f,g,l,m);else{h=a.u.W(h);e=a.u.W(e);var v=a.u.W(h-e);if(a.j.S(k,f)&&(a.j.S(e,h)||a.j.S(a.j.H(k),1.570796326794897)))null!=g&&(g.l=0),null!=l&&(l.l=0),null!=m&&(m.l=0);else{if(a.j.S(k,-f)){if(a.j.S(a.j.H(k),
1.570796326794897)){null!=g&&(g.l=2*a.u.gg(c,b));null!=l&&(l.l=0<k?a.u.W(3.141592653589793-a.u.W(h)):a.u.W(h));null!=m&&(m.l=0<k?a.u.W(h):a.u.W(3.141592653589793-a.u.W(h)));return}a.j.S(a.j.H(v),3.141592653589793)&&(null!=g&&(g.l=2*a.u.gg(c,b)),null!=l&&(l.l=0),null!=m&&(m.l=0))}else{if(a.j.S(a.j.H(k),1.570796326794897)||a.j.S(a.j.H(f),1.570796326794897)){a.Xj.Fb(c,b,e,k,h,f,g,l,m);return}if(a.j.S(e,h)||a.j.S(a.j.H(v),3.141592653589793)){a.Xj.Fb(c,b,e,k,h,f,g,l,m);return}if(a.j.Vc(k)){a.Xj.Fb(c,b,
e,k,h,f,g,l,m);return}}var x=Math.sqrt(1-b);h=a.u.W(h-e);e=0;a.u.wm(b,k,e,r,C,G);n[0]=r.l;n[1]=C.l;n[2]=G.l;a.u.wm(b,f,h,r,C,G);u[0]=r.l;u[1]=C.l;u[2]=G.l;p[0]=0;p[1]=0;p[2]=-1*b*a.u.n(1,b,k)*Math.sin(k);0>h?a.u.Ep(p,u,n,q,0):a.u.Ep(p,n,u,q,0);for(var C=[0,0,0],G=[0,0,0],y=[0,0,0],n=[0,0,0],r=[0,0,0],w=Math.acos(q[2]/1),J=1-b,B=Math.tan(w),t=1+B*B/J,z=2*p[2]*B/J,B=Math.sqrt(z*z-4*t*(p[2]*p[2]/J-1)),t=2*t,J=(-z+B)/t,z=(-z-B)/t,B=Math.tan(w),t=B*J+p[2],w=(J+z)/2,p=(t+(B*z+p[2]))/2,B=a.u.Sn(J-w,t-p),
J=p/x*1.570796326794897,z=0;100>z;z++){t=a.u.Tk(b,J);t=t*t/Math.cos(J)*(Math.sin(J)-p*t/(1*(1-b)));if(a.j.Vc(t))break;J-=t}var p=a.u.n(1,b,J)*Math.cos(J),p=Math.sqrt((p-w)*(p+w)),B=1-B/p,B=B*(2-B),t=a.u.jm(C),w=a.u.jm(G),J=a.u.jm(y),E=a.u.Qr(y,C),z=a.u.Qr(y,G);a.u.Uu(y,C,n);a.u.Uu(y,G,r);C=Math.acos(E/(J*t));G=Math.acos(z/(J*w));G*=a.j.nb(1,a.u.Qr(n,r));if(1.570796326794897<=a.j.H(C)&&1.570796326794897<=a.j.H(G)||3.141592653589793<a.j.H(C-G))C=(3.141592653589793-a.j.H(C))*a.j.nb(1,C),G=(3.141592653589793-
a.j.H(G))*a.j.nb(1,G);n=a.u.Si(B,G);r=a.u.q(p,B,a.u.Si(B,C));n=a.u.q(p,B,n);n=a.j.H(n-r)*c;C=new a.ca(0);G=new a.ca(0);y=q[1]/1;y*=-a.j.nb(1,v);r=Math.acos(y)*a.j.nb(1,v);d.gf(c,b,e,k,n,r,C,G);a.j.S(h,C.l)&&a.j.S(f,G.l)||(B=a.u.Sn(a.u.W(h-C.l),f-G.l),d.gf(c,b,e,k,n,a.u.W(r+3.141592653589793),C,G),t=a.u.Sn(a.u.W(h-C.l),f-G.l),t<B&&(r=a.u.W(r+3.141592653589793)));C=[0,0,0,0];G=[0,0,0,0];p=[0,0,0];B=[0,0,0];c=[0,0,0];e=[0,0,0];k=[0,0,0];y=[0,0,0];p[0]=0;p[1]=0;p[2]=x;B[0]=0;B[1]=0;B[2]=0;a.u.Ep(B,p,
u,C,0);a.j.Vc(f)?(c[0]=u[0],c[1]=u[1],c[2]=1,e[0]=1*Math.cos(h)-1*Math.sin(h),e[1]=1*Math.sin(h)+1*Math.cos(h)):(b=a.u.n(1,b,f)*Math.cos(f),c[0]=0,c[1]=0,u[2]+=Math.tan(1.570796326794897-a.j.H(f))*b*a.j.nb(1,f),e[0]=b*Math.cos(h)-b*Math.sin(h),e[1]=b*Math.sin(h)+b*Math.cos(h));e[2]=u[2];a.u.Ep(u,e,c,G,1);a.u.Uu(G,C,k);a.u.Uu(G,q,y);y=a.u.Qr(k,y)/(a.u.jm(k)*a.u.jm(y));y*=a.j.nb(1,v);h=Math.acos(y)*-a.j.nb(1,v);0<r&&0<h?h=a.u.W(h+3.141592653589793):0>r&&0>h&&(h=a.u.W(h+3.141592653589793));null!=g&&
(g.l=n);null!=l&&(l.l=r);null!=m&&(m.l=h)}}};d.gf=function(c,b,e,k,d,h,f,g){var n=[0,0,0],u=[0,0,0],l=[0,0,0],m=[0,0,0],p=[0,0,0],q=[0,0,0],r=[0,0,0],C=[0,0,0,0],v=new a.ca(0),x=new a.ca(0),y=new a.ca(0),w=new a.ca(0),J=new a.ca(0),B=new a.ca(0);if(null!=f&&null!=g)if(a.j.Ih(b))a.zg.gf(c,e,k,d,h,f,g);else if(a.j.Vc(d))null!=f&&(f.l=e),null!=g&&(g.l=k);else if(h=a.u.W(h),0>d&&(d=a.j.H(d),h=a.u.W(h+3.141592653589793)),e=a.u.W(e),k=a.u.W(k),1.570796326794897<a.j.H(k)&&(e=a.u.W(e+3.141592653589793),k=
a.j.nb(3.141592653589793,k)-k),a.j.S(a.j.H(k),1.570796326794897)||a.j.Vc(k)||a.j.Vc(h)||a.j.S(a.j.H(h),3.141592653589793))a.Xj.gf(c,b,e,k,d,h,f,g);else{var t=Math.sqrt(1-b);c=d/c;a.u.wm(b,k,0,w,J,B);n[0]=w.l;n[1]=J.l;n[2]=J.l;r[0]=0;r[1]=0;r[2]=-1*b*a.u.n(1,b,k)*Math.sin(k);w=a.u.n(1,b,k);J=a.u.W(1.570796326794897-h);B=Math.sin(J);d=Math.cos(k);k=Math.sin(k);p[0]=w*d-k*B;p[1]=Math.cos(J);p[2]=(1-b)*w*k+d*B;0>h?a.u.Ep(r,p,n,C,0):a.u.Ep(r,n,p,C,0);n=Math.acos(C[2]/1);C=Math.atan2(-C[1],-C[0]);k=1-b;
p=Math.tan(n);J=1+p*p/k;w=2*r[2]*p/k;p=Math.sqrt(w*w-4*J*(r[2]*r[2]/k-1));J*=2;k=(-w+p)/J;w=(-w-p)/J;p=Math.tan(n);J=p*k+r[2];n=(k+w)/2;r=(J+(p*w+r[2]))/2;p=a.u.Sn(k-n,J-r);t=r/t*1.570796326794897;for(k=0;100>k;k++){w=a.u.Tk(b,t);w=w*w/Math.cos(t)*(Math.sin(t)-r*w/(1*(1-b)));if(a.j.Vc(w))break;t-=w}t=a.u.n(1,b,t)*Math.cos(t);t=Math.sqrt((t-n)*(t+n));r=1-p/t;r*=2-r;q=Math.acos(a.u.Qr(q,u)/(a.u.jm(q)*a.u.jm(u)));q*=a.j.nb(1,u[0]);h=(a.u.q(t,r,a.u.Si(r,q))+c*a.j.nb(1,h))/a.u.gg(t,r);h=a.u.W(1.570796326794897*
h);h=a.u.xn(r,h);a.u.n(t,r,h);p=a.u.W(C+e);e=Math.cos(p);h=Math.sin(p);l[0]=m[0]*e+m[1]*-h;l[1]=m[0]*h+m[1]*e;l[2]=m[2];a.u.JK(b,l[0],l[1],l[2],y,x,v);null!=f&&(f.l=x.l);null!=g&&(g.l=y.l)}};return d}();a.$z=d})(z||(z={}));(function(a){var d=function(){function b(b){this.Na=null;this.Ar=new a.b;this.Br=new a.b;this.a=b}b.prototype.compare=function(b,c,a){this.a.uc(c,this.Ar);this.a.uc(b.da(a),this.Br);return this.Ar.compare(this.Br)};return b}(),h=function(){function b(b){this.nf=new a.b;this.ln=
new a.b;this.a=b}b.prototype.bh=function(b){this.nf.J(b)};b.prototype.compare=function(b,c){this.a.uc(b.da(c),this.ln);return this.nf.compare(this.ln)};return b}(),c=function(b){function c(c){b.call(this,c.a,c.ka,!1);this.ab=c}I(c,b);c.prototype.compare=function(b,c,a){if(this.Zf)return-1;var e=this.ab.Cd.Dm(this.ab.lh(c));b=b.da(a);var k=this.ab.Cd.Dm(this.ab.lh(b));this.Cl=a;return this.JB(c,e,b,k)};return c}(a.hA),b=function(b){function c(c){b.call(this,c.a,c.ka);this.ab=c}I(c,b);c.prototype.compare=
function(b,c){if(this.Zf)return-1;b=this.ab.Cd.Dm(this.ab.lh(b.da(c)));this.Cl=c;return this.KB(c,b)};return c}(a.JI),e=function(){function e(){this.zc=this.Ue=this.Zm=this.Cd=this.Kg=this.nd=this.$a=this.a=null;this.og=!1;this.Xg=this.Kl=this.Vd=this.Lj=this.Mg=this.Hj=this.sf=this.Ld=null;this.Yg=this.rp=this.Tx=this.ka=0;this.Ht=this.Nm=!1;this.mn=new a.b;this.Ck=new a.b;this.$a=new a.Fc(8);this.nd=new a.Fc(5);this.Kg=new a.Ur;this.Cd=new a.Ur;this.og=!1;this.Xg=new a.b;this.Xg.ma(0,0);this.ka=
0;this.Yg=-1;this.Nm=!1;this.a=null;this.Ue=new a.bj;this.zc=new a.bj;this.Mg=new a.ga(0);this.Lj=new a.gA;this.sf=new a.ga(0);this.Hj=new a.ga(0);this.Zm=new a.Va}e.prototype.GS=function(b,c){var e=new a.Bg;e.Oy();b.Oe(e);this.Op(b);this.Nm=!1;this.ka=c;this.Tx=c*c;c=this.Xy();b.Oe(e);c||(this.JM(),c||this.Xy());-1!=this.Yg&&(this.a.bf(this.Yg),this.Yg=-1);this.a=null;return this.Nm};e.prototype.KS=function(b,c){this.Op(b);this.Nm=!1;this.ka=c;this.Tx=c*c;this.og=!1;this.Xy();this.og||(this.og=1==
b.xo(c,!0,!1));-1!=this.Yg&&(this.a.bf(this.Yg),this.Yg=-1);this.a=null};e.prototype.Uf=function(b,c){return this.$a.O(b,0+c)};e.prototype.zy=function(b,c,a){this.$a.L(b,0+c,a)};e.prototype.lh=function(b){return this.$a.O(b,2)};e.prototype.UR=function(b,c){this.$a.L(b,2,c)};e.prototype.FC=function(b,c){return this.$a.O(b,3+c)};e.prototype.Eo=function(b){return this.$a.O(b,7)};e.prototype.Nk=function(b,c){this.$a.L(b,7,c)};e.prototype.Go=function(b,c){return this.$a.O(b,3+this.Do(b,c))};e.prototype.Qp=
function(b,c,a){this.$a.L(b,3+this.Do(b,c),a)};e.prototype.ZN=function(b,c){return this.$a.O(b,5+this.Do(b,c))};e.prototype.Sp=function(b,c,a){this.$a.L(b,5+this.Do(b,c),a)};e.prototype.rq=function(b){return this.nd.O(b,0)};e.prototype.RR=function(b,c){this.nd.L(b,0,c)};e.prototype.ow=function(b){return this.nd.O(b,4)};e.prototype.Lp=function(b,c){this.nd.L(b,4,c)};e.prototype.fk=function(b){return this.nd.O(b,1)};e.prototype.dm=function(b,c){this.nd.L(b,1,c)};e.prototype.nw=function(b){return this.nd.O(b,
3)};e.prototype.Hr=function(b,c){this.nd.L(b,3,c)};e.prototype.Ul=function(b){var c=this.nd.be(),a=this.Kg.jh();this.RR(c,a);-1!=b?(this.Kg.addElement(a,b),this.a.lb(b,this.Yg,c),this.Lp(c,this.a.gb(b))):this.Lp(c,-1);return c};e.prototype.aM=function(b){this.nd.Jc(b)};e.prototype.QA=function(b,c){this.Kg.addElement(this.rq(b),c);this.a.lb(c,this.Yg,b)};e.prototype.rr=function(b){var c=this.$a.be(),a=this.Cd.jh();this.UR(c,a);-1!=b&&this.Cd.addElement(a,b);return c};e.prototype.RA=function(b,c){this.Cd.addElement(this.lh(b),
c)};e.prototype.Ns=function(b){this.$a.Jc(b);b=this.Mg.Qs(b);0<=b&&this.Mg.QE(b)};e.prototype.yi=function(b,c){if(-1==this.Uf(b,0))this.zy(b,0,c);else if(-1==this.Uf(b,1))this.zy(b,1,c);else throw a.g.wa();this.Av(b,c)};e.prototype.Av=function(b,c){var a=this.fk(c);if(-1!=a){var e=this.Go(a,c);this.Sp(e,c,b);this.Qp(b,c,e);this.Qp(a,c,b);this.Sp(b,c,a)}else this.Sp(b,c,b),this.Qp(b,c,b),this.dm(c,b)};e.prototype.Do=function(b,c){return this.Uf(b,0)==c?0:1};e.prototype.Tl=function(b,c){var a=this.nw(c);
-1!=a&&(this.Ue.kd(a,-1),this.Hr(c,-1));var e,a=this.fk(c);if(-1!=a){var k=e=a,d;do{d=!1;var h=this.Do(e,c),n=this.FC(e,h);if(this.Uf(e,h+1&1)==b){this.Os(e);this.Cd.Fg(this.lh(e));this.Ns(e);if(e==n){a=-1;break}a==e&&(a=this.fk(c),k=n,d=!0)}e=n}while(e!=k||d);if(-1!=a){do h=this.Do(e,c),n=this.FC(e,h),this.zy(e,h,b),e=n;while(e!=k);e=this.fk(b);-1!=e?(k=this.Go(e,b),d=this.Go(a,b),k==e?(this.dm(b,a),this.Av(e,b),this.dm(b,e)):d==a&&this.Av(a,b),this.Qp(a,b,k),this.Sp(k,b,a),this.Qp(e,b,d),this.Sp(d,
b,e)):this.dm(b,a)}}a=this.rq(b);e=this.rq(c);for(k=this.Kg.gc(e);-1!=k;k=this.Kg.bb(k))this.a.lb(this.Kg.da(k),this.Yg,b);this.Kg.Qv(a,e);this.aM(c)};e.prototype.YP=function(b,c){var a=this.Uf(b,0),e=this.Uf(b,1),k=this.Uf(c,0),d=this.Uf(c,1);this.Cd.Qv(this.lh(b),this.lh(c));c==this.fk(a)&&this.dm(a,b);c==this.fk(e)&&this.dm(e,b);this.Os(c);this.Ns(c);a==k&&e==d||e==k&&a==d||(this.zm(a,this.mn),this.zm(k,this.Ck),this.mn.ub(this.Ck)?(a!=k&&this.Tl(a,k),e!=d&&this.Tl(e,d)):(e!=k&&this.Tl(e,k),a!=
d&&this.Tl(a,d)))};e.prototype.Os=function(b){var c=this.Uf(b,1);this.SB(b,this.Uf(b,0));this.SB(b,c)};e.prototype.SB=function(b,c){var a=this.Go(b,c),e=this.ZN(b,c),k=this.fk(c);a!=b?(this.Qp(e,c,a),this.Sp(a,c,e),k==b&&this.dm(c,a)):this.dm(c,-1)};e.prototype.YA=function(b,c,a){var e=this.Cd.gc(b),k=this.Cd.da(e);b=this.se(k);var d=this.se(this.a.X(k));this.a.Tp(k,c,a,!0);for(e=this.Cd.bb(e);-1!=e;e=this.Cd.bb(e)){var k=this.Cd.da(e),h=this.se(k)==b;this.a.Tp(k,c,a,h)}e=c.Io(a,0).Mb();c=c.Io(a,
c.kk(a)-1).oc();this.yG(b,e);this.yG(d,c)};e.prototype.PB=function(b,c,a){var e=this.lh(b),k=this.Uf(b,0),d=this.Uf(b,1),h=this.rr(-1);this.Mg.add(h);this.Nk(h,-3);this.sf.add(h);this.yi(h,k);b=1;for(c=c.kk(a);b<c;b++)a=this.Ul(-1),this.Hj.add(a),this.sf.add(a),this.yi(h,a),h=this.rr(-1),this.Mg.add(h),this.Nk(h,-3),this.sf.add(h),this.yi(h,a);this.yi(h,d);for(e=this.Cd.gc(e);-1!=e;e=this.Cd.bb(e))if(d=this.Cd.da(e),this.se(d)==k){b=0;do 0<b&&(h=this.sf.get(b-1),this.QA(h,d),-1==this.ow(h)&&this.Lp(h,
this.a.gb(d))),h=this.sf.get(b),b+=2,this.RA(h,d),d=this.a.X(d);while(b<this.sf.size)}else{b=this.sf.size-1;do b<this.sf.size-2&&(h=this.sf.get(b+1),this.QA(h,d),0>this.ow(h)&&this.Lp(h,this.a.gb(d))),h=this.sf.get(b),b-=2,this.RA(h,d),d=this.a.X(d);while(0<=b)}this.sf.clear(!1)};e.prototype.se=function(b){return this.a.Ra(b,this.Yg)};e.prototype.UE=function(b,c,e){var k=this.Uf(c,0),d=new a.b;this.zm(k,d);var h=new a.b,n=this.Uf(c,1);this.zm(n,h);var f=e.kk(b),g=e.Io(b,0),u=new a.b;g.ht(u);if(!d.ub(u)){if(!this.og){var l=
d.compare(this.Xg),u=u.compare(this.Xg);0>l*u&&(this.og=!0)}this.lC(k,this.sf);this.Hj.add(k)}!this.og&&1<f&&(l=d.compare(h),g=g.oc(),d.compare(g)!=l||g.compare(h)!=l?this.og=!0:0>g.compare(this.Xg)&&(this.og=!0));g=e.Io(b,f-1);b=g.oc();h.ub(b)||(this.og||(l=h.compare(this.Xg),u=b.compare(this.Xg),0>l*u&&(this.og=!0)),this.lC(n,this.sf),this.Hj.add(n));this.sf.add(c);h=0;for(n=this.sf.size;h<n;h++)b=this.sf.get(h),e=this.Eo(b),a.Fc.Zw(e)&&(this.zc.kd(e,-1),this.Nk(b,-1)),b!=c&&-3!=this.Eo(b)&&(this.Mg.add(b),
this.Nk(b,-3));this.sf.clear(!1)};e.prototype.NK=function(b,c){this.Ld.compare(this.zc,this.zc.da(b),c);this.Ld.Zf&&(this.Ld.lq(),this.dC(b,c))};e.prototype.dC=function(b,c){this.Nm=!0;b=this.zc.da(b);c=this.zc.da(c);var e,k;k=this.Cd.Dm(this.lh(b));var d=this.Cd.Dm(this.lh(c));e=this.a.cc(k);null==e&&(null==this.Vd&&(this.Vd=new a.yb),this.a.Oc(k,this.Vd),e=this.Vd);k=this.a.cc(d);null==k&&(null==this.Kl&&(this.Kl=new a.yb),this.a.Oc(d,this.Kl),k=this.Kl);this.Lj.zn(e);this.Lj.zn(k);this.Lj.Ga(this.ka,
!0)&&(this.og=!0);this.fG(b,c,-1,this.Lj);this.Lj.clear()};e.prototype.VM=function(b,c){this.Nm=!0;c=this.zc.da(c);var e,k=this.Cd.Dm(this.lh(c));e=this.a.cc(k);null==e&&(null==this.Vd&&(this.Vd=new a.yb),this.a.Oc(k,this.Vd),e=this.Vd);k=this.qC(b);this.Lj.zn(e);this.a.Jk(k,this.Zm);this.Lj.Tw(this.ka,this.Zm,!0);this.fG(c,-1,b,this.Lj);this.Lj.clear()};e.prototype.DO=function(){if(0!=this.Mg.size)for(;0!=this.Mg.size;){if(this.Mg.size>Math.max(100,this.a.pd)){this.Mg.clear(!1);this.og=!0;break}var b=
this.Mg.tc();this.Mg.af();this.Nk(b,-1);-1!=this.TO(b)&&this.CO(b);this.Mm=!1}};e.prototype.CO=function(b){var c;this.Mm?(c=this.zc.vs(this.lE,this.iE,b,!0),this.Mm=!1):c=this.zc.PA(b);-1==c?this.YP(this.zc.da(this.zc.tC()),b):(this.Nk(b,c),this.Ld.Zf&&(this.Ld.lq(),this.dC(this.Ld.Cl,c)))};e.prototype.TO=function(b){var c=this.Uf(b,0);b=this.Uf(b,1);this.zm(c,this.mn);this.zm(b,this.Ck);if(a.b.Zb(this.mn,this.Ck)<=this.Tx)return this.og=!0,-1;var e=this.mn.compare(this.Xg),k=this.Ck.compare(this.Xg);
return 0>=e&&0<k?b:0>=k&&0<e?c:-1};e.prototype.HM=function(){var b=new a.ga(0);b.xb(this.a.pd);for(var c=this.a.Gp(),e=c.next();-1!=e;e=c.next())-1!=this.a.Ra(e,this.Yg)&&b.add(e);this.a.Mu(b,b.size);this.IM(b)};e.prototype.IM=function(b){this.Ue.clear();this.Ue.de(b.size);this.Ue.Hn(new d(this.a));var c=new a.b;c.Eh();for(var e=-1,k=new a.b,h=0,n=b.size;h<n;h++){var f=b.get(h);this.a.uc(f,k);k.ub(c)?(f=this.a.Ra(f,this.Yg),this.Tl(e,f)):(e=this.se(f),this.a.uc(f,c),f=this.Ue.qm(f),this.Hr(e,f))}};
e.prototype.JM=function(){var b=new a.ga(0);b.xb(this.a.pd);for(var c=this.Ue.gc(-1);-1!=c;c=this.Ue.bb(c))b.add(this.Ue.da(c));this.Ue.clear();this.a.Mu(b,b.size);for(var c=0,e=b.size;c<e;c++){var k=b.get(c),d=this.se(k),k=this.Ue.qm(k);this.Hr(d,k)}};e.prototype.lC=function(b,c){var e=this.fk(b);if(-1!=e){var k=e;do a.Fc.Zw(this.Eo(k))&&c.add(k),k=this.Go(k,b);while(k!=e)}};e.prototype.yG=function(b,c){for(b=this.Kg.gc(this.rq(b));-1!=b;b=this.Kg.bb(b))this.a.Yi(this.Kg.da(b),c)};e.prototype.fG=
function(b,c,a,e){this.Os(b);-1!=c&&this.Os(c);this.UE(0,b,e);-1!=c&&this.UE(1,c,e);-1!=a&&(e.nf.w(this.mn),this.zm(a,this.Ck),this.Ck.ub(this.mn)||this.Hj.add(a));a=0;for(var k=this.Hj.size;a<k;a++){var d=this.Hj.get(a),h=this.nw(d);-1!=h&&(this.Ue.kd(h,-1),this.Hr(d,-1))}a=this.lh(b);k=-1!=c?this.lh(c):-1;this.YA(a,e,0);-1!=c&&this.YA(k,e,1);this.PB(b,e,0);-1!=c&&this.PB(c,e,1);this.Cd.Fg(a);this.Ns(b);-1!=c&&(this.Cd.Fg(k),this.Ns(c));a=0;for(k=this.Hj.size;a<k;a++)d=this.Hj.get(a),d==this.rp&&
(this.Ht=!0),h=this.nw(d),-1==h&&(h=this.Ue.PA(this.qC(d)),-1==h?(b=this.se(this.Ue.da(this.Ue.tC())),this.Tl(b,d)):this.Hr(d,h));this.Hj.clear(!1)};e.prototype.zm=function(b,c){this.a.SC(this.ow(b),c)};e.prototype.qC=function(b){return this.Kg.Dm(this.rq(b))};e.prototype.Xy=function(){this.Ht=!1;this.rp=-1;null==this.Ld&&(this.zc.Ct=!1,this.Ld=new c(this),this.zc.Qm=this.Ld);var e=new a.ga(0),k=null,d=null,f=0;this.iE=this.lE=-1;this.Mm=!1;for(var g=this.Ue.gc(-1);-1!=g;){f++;this.Mm=!1;var l=this.Ue.da(g);
this.rp=this.se(l);this.a.uc(l,this.Xg);this.Ld.XF(this.Xg.y,this.Xg.x);var m,p=this.fk(this.rp);m=-1==p;if(!m){l=p;do{var q=this.Eo(l);-1==q?(this.Mg.add(l),this.Nk(l,-3)):-3!=q&&e.add(q);l=this.Go(l,this.rp)}while(l!=p)}if(0<e.size){this.Mm=1==e.size&&1==this.Mg.size;m=0;for(p=e.size;m<p;m++)l=this.zc.da(e.get(m)),this.Nk(l,-2);var r=-2,v=-2;m=0;for(p=e.size;m<p;m++){q=e.get(m);if(-2==r){var x=this.zc.ge(q);-1!=x?(l=this.zc.da(x),l=this.Eo(l),-2!=l&&(r=x)):r=-1}-2==v&&(q=this.zc.bb(q),-1!=q?(l=
this.zc.da(q),l=this.Eo(l),-2!=l&&(v=q)):v=-1);if(-2!=r&&-2!=v)break}m=0;for(p=e.size;m<p;m++)q=e.get(m),l=this.zc.da(q),this.zc.kd(q,-1),this.Nk(l,-1);e.clear(!1);this.lE=-1!=r?r:-1;this.iE=-1!=v?v:-1;-1!=r&&-1!=v?this.Mm||this.NK(r,v):-1==r&&-1==v&&(this.Mm=!1)}else m&&(null==k&&(k=new b(this)),k.bh(this.Xg),this.zc.sF(k),k.Zf&&(k.lq(),this.VM(this.rp,k.Cl)));this.DO();this.Ht?(this.Ht=!1,null==d&&(d=new h(this.a)),d.bh(this.Xg),g=this.Ue.sF(d)):g=this.Ue.bb(g)}return this.Nm};e.prototype.Op=function(b){this.a=
b;this.Yg=this.a.re();this.$a.de(b.pd+32);this.nd.de(b.pd);this.Kg.Dr(b.pd);this.Kg.$l(b.pd);this.Cd.Dr(b.pd+32);this.Cd.$l(b.pd+32);for(b=this.a.$c;-1!=b;b=this.a.we(b))if(a.T.Kc(this.a.Lb(b)))for(f=this.a.Vb(b);-1!=f;f=this.a.bc(f)){var c=this.a.Ha(f),e=this.a.Cb(f),k=this.Ul(e),d=this.rr(e);this.yi(d,k);g=this.a.X(e);e=0;for(c-=2;e<c;e++){var h=this.a.X(g),n=this.Ul(g);this.yi(d,n);d=this.rr(g);this.yi(d,n);g=h}this.a.vc(f)?(n=this.Ul(g),this.yi(d,n),d=this.rr(g),this.yi(d,n),this.yi(d,k)):(n=
this.Ul(g),this.yi(d,n))}else for(var f=this.a.Vb(b);-1!=f;f=this.a.bc(f))for(var g=this.a.Cb(f),k=0,c=this.a.Ha(f);k<c;k++)this.Ul(g),g=this.a.X(g);this.HM()};return e}();a.aA=e})(z||(z={}));(function(a){var d=function(d){function c(b,c,k){d.call(this);if(void 0!==b)if(void 0!==k){this.description=a.Od.Tf();var e=new a.ee;e.K(b,c,k);this.Py(e)}else if(void 0!==c)this.description=a.Od.Tf(),this.ic(b,c);else if(b instanceof a.pa)this.description=b;else if(b instanceof a.b)this.description=a.Od.Tf(),
this.ic(b);else throw a.g.N();else this.description=a.Od.Tf()}I(c,d);c.prototype.w=function(b){if(void 0!==b){if(this.sc())throw a.g.ra("This operation should not be performed on an empty geometry.");b.ma(this.fa[0],this.fa[1])}else{if(this.sc())throw a.g.ra("This operation should not be performed on an empty geometry.");b=new a.b;b.ma(this.fa[0],this.fa[1]);return b}};c.prototype.ic=function(b,c){"number"===typeof b?(this.qc(),null==this.fa&&this.ko(),this.fa[0]=b,this.fa[1]=c):(this.qc(),this.ic(b.x,
b.y))};c.prototype.Lw=function(){if(this.sc())throw a.g.ra("This operation should not be performed on an empty geometry.");var b=new a.ee;b.x=this.fa[0];b.y=this.fa[1];this.description.WC()?b.z=this.fa[2]:b.z=a.pa.ue(1);return b};c.prototype.Py=function(b){this.qc();var c=this.hasAttribute(1);c||a.pa.nD(1,b.z)||(this.Ne(1),c=!0);null==this.fa&&this.ko();this.fa[0]=b.x;this.fa[1]=b.y;c&&(this.fa[2]=b.z)};c.prototype.lk=function(){if(this.sc())throw a.g.ra("This operation should not be performed on an empty geometry.");
return this.fa[0]};c.prototype.qS=function(b){this.setAttribute(0,0,b)};c.prototype.mk=function(){if(this.sc())throw a.g.ra("This operation should not be performed on an empty geometry.");return this.fa[1]};c.prototype.$F=function(b){this.setAttribute(0,1,b)};c.prototype.lO=function(){return this.ld(1,0)};c.prototype.rS=function(b){this.setAttribute(1,0,b)};c.prototype.NN=function(){return this.ld(2,0)};c.prototype.bS=function(b){this.setAttribute(2,0,b)};c.prototype.Qc=function(){return this.nC(3,
0)};c.prototype.ld=function(b,c){var e=this.description.zf(b);return 0<=e?this.fa[this.description.fj(e)+c]:a.pa.ue(b)};c.prototype.nC=function(b,c){var e=this.description.zf(b);return 0<=e?this.fa[this.description.fj(e)+c]:a.pa.ue(b)};c.prototype.setAttribute=function(b,c,a){this.qc();var e=this.description.zf(b);0>e&&(this.Ne(b),e=this.description.zf(b));null==this.fa&&this.ko();this.fa[this.description.fj(e)+c]=a};c.prototype.D=function(){return 33};c.prototype.fb=function(){return 0};c.prototype.Ja=
function(){this.qc();null!=this.fa&&(this.fa[0]=NaN,this.fa[1]=NaN)};c.prototype.nm=function(b){if(null!=this.fa){for(var c=a.Od.iu(b,this.description),k=[],d=0,h=0,f=b.Aa;h<f;h++){var g=b.Hd(h),l=a.pa.Wa(g);if(-1==c[h])for(var m=a.pa.ue(g),g=0;g<l;g++)k[d]=m,d++;else for(m=this.description.fj(c[h]),g=0;g<l;g++)k[d]=this.fa[m],d++,m++}this.fa=k}this.description=b};c.prototype.ko=function(){this.iF(this.description.le.length);c.ob(this.description.le,this.fa,this.description.le.length);this.fa[0]=
NaN;this.fa[1]=NaN};c.prototype.Oe=function(b){if(b instanceof a.Bg){if(!this.sc()){var c=this.w();b.Zi(c,c);this.ic(c)}}else this.sc()||(this.Ne(1),c=this.Lw(),this.Py(b.Qn(c)))};c.prototype.copyTo=function(b){if(33!=b.D())throw a.g.N();b.qc();null==this.fa?(b.Ja(),b.fa=null,b.Qf(this.description)):(b.Qf(this.description),b.iF(this.description.le.length),c.ob(this.fa,b.fa,this.description.le.length))};c.prototype.Pa=function(){return new c(this.description)};c.prototype.s=function(){return this.sc()};
c.prototype.sc=function(){return null==this.fa||isNaN(this.fa[0])||isNaN(this.fa[1])};c.prototype.Fp=function(b){b.Ja();this.description!=b.description&&b.Qf(this.description);b.Db(this)};c.prototype.o=function(b){this.sc()?b.Ja():(b.v=this.fa[0],b.C=this.fa[1],b.B=this.fa[0],b.G=this.fa[1])};c.prototype.Cn=function(b){if(this.sc())b.Ja();else{var c=this.Lw();b.v=c.x;b.C=c.y;b.Je=c.z;b.B=c.x;b.G=c.y;b.ig=c.z}};c.prototype.Ah=function(b,c){var e=new a.Nd;if(this.sc())return e.Ja(),e;b=this.ld(b,c);
e.qa=b;e.va=b;return e};c.prototype.iF=function(b){if(null==this.fa)this.fa=a.I.Lh(b);else if(this.fa.length<b){for(var c=this.fa.slice(0),k=this.fa.length;k<b;k++)c[k]=0;this.fa=c}};c.ob=function(b,c,a){if(0<a)for(a=0;a<b.length;a++)c[a]=b[a]};c.prototype.lc=function(b){if(b==this)return!0;if(!(b instanceof c)||this.description!=b.description)return!1;if(this.sc())return b.sc()?!0:!1;for(var a=0,k=this.description.le.length;a<k;a++)if(this.fa[a]!=b.fa[a])return!1;return!0};c.prototype.hc=function(){var b=
this.description.hc();if(!this.sc())for(var c=0,k=this.description.le.length;c<k;c++)var d=this.fa[c],d=a.I.truncate(d^d>>>32),b=a.I.kg(d,b);return b};c.prototype.Rf=function(){return null};return c}(a.T);a.Va=d})(z||(z={}));(function(a){var d=function(){function a(c,b,a){void 0!==c&&(this.x=c,this.y=b,this.z=a)}a.Oa=function(c,b,e){var k=new a;k.x=c;k.y=b;k.z=e;return k};a.prototype.K=function(c,b,a){this.x=c;this.y=b;this.z=a};a.prototype.Lu=function(){this.z=this.y=this.x=0};a.prototype.normalize=
function(){var c=this.length();0==c&&(this.x/=c,this.y/=c,this.z/=c)};a.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};a.prototype.sub=function(c){return new a(this.x-c.x,this.y-c.y,this.z-c.z)};a.prototype.Ap=function(c){return new a(this.x*c,this.y*c,this.z*c)};a.prototype.FA=function(){this.x=NaN};a.prototype.pv=function(){return isNaN(this.x)};return a}();a.ee=d})(z||(z={}));(function(a){var d=function(){function d(c,b,a){this.gu=this.Yt=null;this.Gf=
b;this.KP=b.y-a;this.JP=b.y+a;this.xp=0;this.ix=c;this.ka=a;this.UP=a*a;this.jx=0!=a;this.xt=!1}d.prototype.result=function(){return 0!=this.xp?1:0};d.prototype.DJ=function(c){c=c.Kb(c.Gd(this.Gf,!1));return a.b.Zb(c,this.Gf)<=this.UP?!0:!1};d.prototype.WB=function(c){if(!this.jx&&(this.ix&&this.Gf.ub(c.Mb())||this.Gf.ub(c.oc())))this.xt=!0;else if(c.ja==this.Gf.y&&c.ja==c.ha){if(this.ix&&!this.jx){var b=Math.max(c.na,c.la);this.Gf.x>Math.min(c.na,c.la)&&this.Gf.x<b&&(this.xt=!0)}}else{var a=!1,b=
Math.max(c.na,c.la);this.Gf.x>b?a=!0:this.Gf.x>=Math.min(c.na,c.la)&&(a=0<c.nt(!0,this.Gf.y,this.gu,null)&&this.gu[0]<=this.Gf.x);if(a){if(this.Gf.y==c.Mb().y){if(this.Gf.y<c.oc().y)return}else if(this.Gf.y==c.oc().y&&this.Gf.y<c.Mb().y)return;this.xp=this.ix?this.xp^1:this.xp+(c.Mb().y>c.oc().y?1:-1)}}};d.prototype.zr=function(c){var b=c.Ah(0,1);if(b.qa>this.JP||b.va<this.KP)return!1;if(this.jx&&this.DJ(c))return!0;if(b.qa>this.Gf.y||b.va<this.Gf.y)return!1;null==this.Yt&&(this.Yt=[null,null,null,
null,null]);null==this.gu&&(this.gu=[0,0,0]);b=c.TC(this.Yt);if(0<b)for(c=0;c<b;c++){var a=this.Yt[c].get();this.WB(a);if(this.xt)return!0}else if(this.WB(c),this.xt)return!0;return!1};d.V=function(c,b,a){b=new d(0==c.Cm(),b,a);for(c=c.Ca();c.kb();)for(;c.La();)if(a=c.ia(),b.zr(a))return-1;return b.result()};d.Bd=function(c,b,e,k){var h=new a.i;c.dd(h);h.P(k,k);var f=new d(0==c.Cm(),e,k);c=c.Ca();var g=new a.i;g.K(h);g.B=e.x+k;g.C=e.y-k;g.G=e.y+k;e=b.xw(g,k);for(k=e.next();-1!=k;k=e.next())if(c.Sb(b.da(k)),
c.La()&&(k=c.ia(),f.zr(k)))return-1;return f.result()};d.xl=function(c,b,e){if(c.s())return 0;var k=new a.i;c.dd(k);k.P(e,e);if(!k.contains(b))return 0;k=c.pb;if(null!=k){var h=k.hi;if(null!=h){h=h.Kk(b.x,b.y);if(1==h)return 1;if(0==h)return 0}k=k.Ab;if(null!=k)return d.Bd(c,k,b,e)}return d.V(c,b,e)};d.aP=function(c,b,e,k){if(c.s())return 0;var h=new a.i;c.dd(h);h.P(k,k);if(!h.contains(b,e))return 0;h=c.pb;if(null!=h&&(h=h.hi,null!=h)){h=h.Kk(b,e);if(1==h)return 1;if(0==h)return 0}return d.V(c,a.b.Oa(b,
e),k)};d.$O=function(c,b,a){return b.s()?0:d.xl(c,b.w(),a)};d.vD=function(c,b,e,k,h){var f=new a.i;c.dd(f);f.P(k,k);if(!f.contains(e))return 0;var n=new d(!0,e,k);if(null!=h){var g=new a.i;g.K(f);g.B=e.x+k;g.C=e.y-k;g.G=e.y+k;c=c.Ca();k=h.xw(g,k);for(g=k.next();-1!=g;g=k.next())if(c.Sb(h.da(g),b),c.La()&&c.Qa==b&&(g=c.ia(),n.zr(g)))return-1}else if(c=c.Ca(),c.vy(b),c.kb())for(;c.La();)if(g=c.ia(),n.zr(g))return-1;return n.result()};d.tD=function(c,b,e){var k=new a.i;c.dd(k);k.P(e,e);if(!k.contains(b))return 0;
b=new d(!1,b,e);for(e=c.Ca();e.kb();)if(!(0>c.oo(e.Qa))){for(b.xp=0;e.La();)if(k=e.ia(),b.zr(k))return-1;if(0!=b.xp)return 1}return b.result()};d.$i=function(c,b,e,k,h){var f=c.Ca();f.vy(b);if(!f.kb()||!f.La())throw a.g.ra("corrupted geometry");for(b=2;2==b&&f.La();)b=f.ia().Kb(.5),b=d.vD(c,e,b,k,h);if(2==b)throw a.g.ra("internal error");return 1==b?!0:!1};d.An=function(c,b){c=c.F();return 16>c?!1:2*c+Math.log(c)/Math.log(2)*1*b<1*c*b};return d}();a.ff=d})(z||(z={}));(function(a){var d=function(a){function c(b){a.call(this,
!0,b)}I(c,a);c.prototype.Pa=function(){return new c(this.description)};c.prototype.fb=function(){return 2};c.prototype.D=function(){return 1736};return c}(a.al);a.Ka=d})(z||(z={}));(function(a){(function(a){a[a.PiPOutside=0]="PiPOutside";a[a.PiPInside=1]="PiPInside";a[a.PiPBoundary=2]="PiPBoundary"})(a.pI||(a.pI={}));var d=function(){function d(){}d.uD=function(c,b,e){c=a.ff.$O(c,b,e);return 0==c?0:1==c?1:2};d.he=function(c,b,e){c=a.ff.xl(c,b,e);return 0==c?0:1==c?1:2};d.CH=function(c,b,e,k){c=a.ff.aP(c,
b,e,k);return 0==c?0:1==c?1:2};d.gU=function(c,b,e,k){return 0==a.ff.vD(c,b,e,k,null)?0:1};d.tD=function(c,b,e){return 0==a.ff.tD(c,b,e)?0:1};d.ZS=function(c,b,e,k,h){if(b.length<e||h.length<e)throw a.g.N();for(var f=0;f<e;f++)h[f]=d.he(c,b[f],k)};d.eT=function(c,b,e,k,h){if(b.length/2<e||h.length<e)throw a.g.N();for(var f=0;f<e;f++)h[f]=d.CH(c,b[2*f],b[2*f+1],k)};d.nG=function(c,b,e,k,h){if(1736==c.D())d.ZS(c,b,e,k,h);else if(197==c.D()){var f=new a.i;c.o(f);d.jP(f,b,e,k,h)}else throw a.g.ra("invalid_call");
};d.nU=function(c,b,e,k,h){if(1736==c.D())d.eT(c,b,e,k,h);else if(197==c.D()){var f=new a.i;c.o(f);d.mP(f,b,e,k,h)}else throw a.g.xa();};d.jP=function(c,b,e,k,d){if(b.length<e||d.length<e)throw a.g.N();if(c.s())for(k=0;k<e;k++)d[k]=0;else for(c.P(.5*-k,.5*-k),c.P(.5*k,.5*k),k=0;k<e;k++)c.contains(b[k])?d[k]=1:c.contains(b[k])?d[k]=2:d[k]=0};d.mP=function(c,b,e,k,d){if(b.length/2<e||d.length<e)throw a.g.N();if(c.s())for(k=0;k<e;k++)d[k]=0;else for(c.P(.5*-k,.5*-k),c.P(.5*k,.5*k),k=0;k<e;k++)c.contains(b[2*
k],b[2*k+1])?d[k]=1:c.contains(b[2*k],b[2*k+1])?d[k]=2:d[k]=0};d.lT=function(c,b,a,k,d){for(var e=0;e<a;e++)d[e]=c.Eq(b[e],k)?2:0};d.hT=function(c,b,a,k,d){var e=c.pb,h=null;null!=e&&(h=e.hi);for(var e=a,f=0;f<a;f++)if(d[f]=1,null!=h){var n=b[f];0==h.Kk(n.x,n.y)&&(d[f]=0,e--)}if(0!=e)for(c=c.Ca();c.kb()&&0!=e;)for(;c.La()&&0!=e;)for(h=c.ia(),f=0;f<a&&0!=e;f++)1==d[f]&&h.Eq(b[f],k)&&(d[f]=2,e--);for(f=0;f<a;f++)1==d[f]&&(d[f]=0)};d.oG=function(c,b,e,k,h){var f=c.D();if(1607==f)d.hT(c,b,e,k,h);else if(a.T.Lc(f))d.lT(c,
b,e,k,h);else throw a.g.ra("Invalid call.");};return d}();a.gd=d})(z||(z={}));(function(a){var d=function(a){function c(b,c){2==arguments.length?(a.call(this,!1,b.description),this.df(b),this.lineTo(c)):a.call(this,!1,b)}I(c,a);c.prototype.Pa=function(){return new c(this.description)};c.prototype.fb=function(){return 1};c.prototype.D=function(){return 1607};return c}(a.al);a.Xa=d})(z||(z={}));(function(a){var d=function(){function a(){}a.GT=function(){};return a}();a.RT=d})(z||(z={}));(function(a){var d=
function(){function c(){}c.Rv=function(b){return b*c.rQ};c.aG=function(b,a){return c.cR(a-b)};c.kR=function(b){if(-360<=b&&720>b)return 0>b?b+=360:360<=b&&(b-=360),b;b=a.vi.gH(b);0>b&&(b+=360);return b};c.cR=function(b){b=c.kR(b);180<b&&(b-=360);return b};c.OT=.0174532925199433;c.rQ=57.29577951308232;return c}(),h=function(){function c(){}c.qo=function(b,c){var e=new a.i;b.o(e);var d=a.Ya.Fm(c),h=new a.i;h.K(d);h.v=e.v;h.B=e.B;h.P(.01*h.ba(),0);d=a.Ia.zd(c,e,!1);return h.contains(e)?b:a.Ed.clip(b,
h,d,0)};c.Rw=function(b,e,k,d){if(!a.Ya.Qo(e))throw a.g.N();var h=a.Ia.Cg(e,b,!1),f=a.Ya.Fm(e),n=a.Ya.Em(e),g=n.Se().Dj,l=a.Ya.ft(n),n=a.Ya.Ts(n),l=l*(2-l),m=new a.Nd;f.wu(m);var p=[[0,0],[0,0]];2==a.Nf.Am(e)?(p[0][0]=c.pu(d,m),p[0][1]=f.Vs(),a.Ya.tu(),f=p[0][0]*g):f=d*g;var q=new a.ca,r=new a.fd;b=r.Eb(b);for(var v=[0],x=new a.b,w=new a.b,y=new a.b,t=new a.b,B=new a.b,z=new a.b,E=r.Vb(b);-1!=E;E=r.bc(E)){var D=r.Cb(E);r.w(D,y);for(var F=!1,I=D=r.X(D);-1!=I;I=r.X(I)){if(I==D){if(F)break;F=!0}r.w(I,
t);if((h<d-y.x&&t.x-d>h||h<d-t.x&&y.x-d>h||h<-t.y&&y.y>h)&&!(Math.abs(y.x-t.x)>=.5*m.aa())&&(2==a.Nf.Am(e)?(p[0][0]=c.pu(y.x,m),p[0][1]=y.y,p[1][0]=c.pu(t.x,m),p[1][1]=t.y,a.Ya.YQ(),B.x=p[0][0]*g,B.y=p[0][1]*g,z.x=p[1][0]*g,z.y=p[1][1]*g):(B.x=y.x*g,B.y=y.y*g,z.x=t.x*g,z.y=t.y*g),z.x=6.283185307179586*(t.x-y.x)/m.aa()+B.x,w.x=f,w.y=c.yH(n,l,B,z,f,k),!isNaN(w.y))){a.zb.Rd(n,l,B.x,B.y,z.x,z.y,q,null,null,k);var K=q.l;a.zb.Rd(n,l,B.x,B.y,w.x,w.y,q,null,null,k);var H=q.l;2==a.Nf.Am(e)?(p[0][0]=w.x/g,
p[0][1]=w.y/g,a.Ya.qN(),x.y=p[0][1],x.x=d):(x.x=d,x.y=w.y/g);v[0]=0<K?a.I.Kr(H/K,0,1):.5;0!=v[0]&&1!=v[0]&&(K=r.Ua(I),r.Mr(K,v,1),r.ic(r.X(K),x.x,x.y))}y.J(t)}}return r.hf(b)};c.aN=function(b,e,k){if(b.s())return b;var d=a.Ya.IC(e);return c.gC(b,0-180*d,360*d,e,k)};c.yH=function(b,e,k,d,h,f){if(3.141592653589793<=Math.abs(k.x-d.x)||!c.Jv(k.x,d.x,h))return NaN;var n;k.x>d.x?n=d:(n=k,k=d);d=new a.ca(0);var g=new a.ca(0),u=new a.ca(0);a.zb.Rd(b,e,n.x,n.y,k.x,k.y,g,d,null,f);var l=g.l,m=0,p=1,q=new a.b;
for(q.J(n);l*(p-m)>1E-12*b;){var r=.5*(m+p);a.zb.dk(b,e,n.x,n.y,l*r,d.l,g,u,f);q.x=g.l;q.y=u.l;if(q.x==h)break;if(c.Jv(n.x,q.x,h))p=r;else if(c.Jv(k.x,q.x,h))m=r;else return NaN}return q.y};c.Jv=function(b,c,a){b=d.Rv(b);c=d.aG(b,d.Rv(c));a=d.aG(b,d.Rv(a));return 0==a||0<c&&0<a&&a<=c||0>c&&0>a&&a>=c?!0:!1};c.pu=function(b,c){var a=c.va-c.qa;return c.Sy(b-Math.floor((b-c.qa)/a)*a)};c.eU=function(b,c,k,d){var e=new a.Nd;e.K(c,k);k=d.aa();b=Math.floor((b-c)/k)*k+b;for(e=e.Af();Math.abs(b-e)>Math.abs(b+
k-e);)b+=k;return b};c.cU=function(b,c,k,d,h){var e;k.y>d.y?e=d:(e=k,k=d);d=new a.Nd;d.K(e.y,k.y);if(!d.contains(0)||3.141592653589793<=Math.abs(e.x-k.x))return NaN;if(e.x==k.x)return e.x;var f=new a.ca(0),n=new a.ca(0),g=new a.ca(0);a.zb.Rd(b,c,e.x,e.y,k.x,k.y,n,f,null,h);var l=n.l,u=0,m=1,p=new a.b;for(p.J(e);l*(m-u)>1E-12*b;){var q=.5*(u+m);a.zb.dk(b,c,e.x,e.y,l*q,f.l,n,g,h);p.x=n.l;p.y=g.l;d.K(e.y,p.y);if(0==p.y)break;if(d.contains(0))m=q;else if(d.K(k.y,p.y),d.contains(0))u=q;else return NaN}return p.x};
c.gC=function(b,c,k,d,h){var e=new a.i;b.o(e);if(e.s())return b;var f=new a.Nd;e.wu(f);var n=new a.Nd;n.K(c,c+k);if(n.contains(f)&&n.va!=f.va)return b;var g=new a.i;g.K(e);var l=b.D();if(33==l){g=h?b:b.vm();e=g.lk();if(e<n.qa||e>=n.va||e==n.va)e+=Math.ceil((n.qa-e)/k)*k,e=n.Sy(e),g.qS(e);return g}if(550==l){g=h?b:b.vm();d=g.mc(0);l=2*g.F();b=!1;for(h=0;h<l;h+=2)if(e=d.read(h),e<n.qa||e>=n.va||e==n.va)b=!0,e+=Math.ceil((n.qa-e)/k)*k,e=n.Sy(e),d.write(h,e);b&&g.ce(1993);return g}if(n.contains(f))return b;
if(197==l)return k=h?b:b.vm(),e.Ga(g),k.Cu(e),k;var u=.1*Math.max(e.ba(),e.aa());g.P(0,u);n=b;b=d.Ko();h=a.wi.local();for(var m=new a.Bg,p=0;;){var q=Math.floor((f.qa-c)/k),r=Math.ceil((f.va-c)/k);if(3<r-q){q=Math.floor(.5*(r+q));g.v=e.v-u;g.B=c+k*q;var v=a.Ed.clip(n,g,b,0);g.v=g.B;g.B=e.B+u;var x=a.Ed.clip(n,g,b,0);m.Nn((q-r)*k,0);x.Oe(m);1736==l?n=h.$(v,x,d,null):(n=v,n.add(x,!1));n.o(e);e.wu(f);p++}else break}g.v=c;g.B=c+k;c=new a.i;c.K(g);c.P(b,0);c=Math.floor((e.v-g.v)/k)*k;0!=c?(g.move(c,0),
m.Nn(-c,0)):m.IF();c=1607==l?new a.Xa(n.description):new a.Ka(n.description);f=new a.i;for(u=new a.i;e.B>g.v;){p=a.Ed.clip(n,g,b,0);p.o(u);if(1607==l?!p.s()&&(u.aa()>b||u.ba()>b):!p.s()&&(1736!=l||u.aa()>b))p.Oe(m),p.o(u),c.o(f),f.P(b,b),f.jc(u)&&1736==l?c=h.$(c,p,d,null):c.add(p,!1);g.move(k,0);m.shift(-k,0)}return c};c.ZQ=function(b,c,k,d){var e=new a.pe(k.description);e.Pd(k,0,-1);var e=a.Ya.Wl(e,b,c),h=k.F();d.Ja();if(!a.Ya.Qo(b)||h!=e.F())return!1;var f=new a.i;k.o(f);var n=new a.i;e.o(n);f=
f.aa();n=n.aa();if(0!=f&&0!=n){if(n/=f,b=a.Ya.Fm(c).aa()/a.Ya.Fm(b).aa(),1E-10<Math.abs(n/b-1))return!1}else if(0!=f||0!=n)return!1;d.add(k,!1);for(k=0;k<h;k++)b=e.Fa(k),d.ic(k,b);return!0};c.dU=function(){throw a.g.qe();};return c}();a.gh=h})(z||(z={}));(function(a){(function(a){a[a.rightSide=1]="rightSide"})(a.sI||(a.sI={}));var d=function(){function d(c,b,e){this.Nq=new a.b;void 0===c?this.tn=-1:(this.Nq.J(c),this.tn=b,this.Da=e,this.Ut=0)}d.prototype.UF=function(c){this.Ut=c?this.Ut|1:this.Ut&
-2};d.prototype.s=function(){return 0>this.tn};d.prototype.pw=function(){if(this.s())throw a.g.ra("invalid call");return new a.Va(this.Nq.x,this.Nq.y)};d.prototype.gb=function(){if(this.s())throw a.g.ra("invalid call");return this.tn};d.prototype.sw=function(){if(this.s())throw a.g.ra("invalid call");return this.Da};d.prototype.Xw=function(){return 0!=(this.Ut&1)};d.prototype.tv=function(c,b,a,k){this.Nq.x=c;this.Nq.y=b;this.tn=a;this.Da=k};return d}();a.dl=d})(z||(z={}));(function(a){var d=function(){function c(){}
c.prototype.Fn=function(b,c){this.Vg.resize(0);this.ai.length=0;this.Aj=-1;b.dd(this.Kj);this.Kj.P(c,c);this.Kj.jc(this.Ab.Qb)?((this.Iq=a.T.Lc(b.D()))?(this.rE=b.Mb(),this.qE=b.oc(),this.ka=c):this.ka=NaN,this.Vg.add(this.Ab.Ze),this.ai.push(this.Ab.Qb),this.ar=this.Ab.sq(this.Ab.Ze)):this.ar=-1};c.prototype.Ch=function(b,c){this.Vg.resize(0);this.ai.length=0;this.Aj=-1;this.Kj.K(b);this.Kj.P(c,c);this.ka=NaN;this.Kj.jc(this.Ab.Qb)?(this.Vg.add(this.Ab.Ze),this.ai.push(this.Ab.Qb),this.ar=this.Ab.sq(this.Ab.Ze),
this.Iq=!1):this.ar=-1};c.prototype.next=function(){if(0==this.Vg.size)return-1;this.Aj=this.ar;var b=null,c=null,k,d=null,f=null;this.Iq&&(b=new a.b,c=new a.b,d=new a.i);for(var g=!1;!g;){for(;-1!=this.Aj;){k=this.Ab.kw(this.Ab.Us(this.Aj));if(k.jc(this.Kj))if(this.Iq){if(b.J(this.rE),c.J(this.qE),d.K(k),d.P(this.ka,this.ka),0<d.Nv(b,c)){g=!0;break}}else{g=!0;break}this.Aj=this.Ab.at(this.Aj)}if(-1==this.Aj){k=this.Vg.tc();var l=this.ai[this.ai.length-1];null==f&&(f=[],f[0]=new a.i,f[1]=new a.i,
f[2]=new a.i,f[3]=new a.i);h.BF(l,f);this.Vg.af();--this.ai.length;for(l=0;4>l;l++){var m=this.Ab.zo(k,l);if(-1!=m&&0<this.Ab.gO(m)&&f[l].jc(this.Kj))if(this.Iq){if(b.J(this.rE),c.J(this.qE),d.K(f[l]),d.P(this.ka,this.ka),0<d.Nv(b,c)){var p=new a.i;p.K(f[l]);this.Vg.add(m);this.ai.push(p)}}else p=new a.i,p.K(f[l]),this.Vg.add(m),this.ai.push(p)}if(0==this.Vg.size)return-1;this.Aj=this.Ab.sq(this.Vg.get(this.Vg.size-1))}}this.ar=this.Ab.at(this.Aj);return this.Aj};c.HL=function(b,e,k){var d=new c;
d.Ab=b;d.Kj=new a.i;d.Vg=new a.ga(0);d.ai=[];d.Fn(e,k);return d};c.GL=function(b,e,k){var d=new c;d.Ab=b;d.Kj=new a.i;d.Vg=new a.ga(0);d.ai=[];d.Ch(e,k);return d};c.FL=function(b){var e=new c;e.Ab=b;e.Kj=new a.i;e.Vg=new a.ga(0);e.ai=[];return e};return c}();a.TT=d;var h=function(){function c(b,c){this.Ye=new a.Fc(11);this.qh=new a.Fc(5);this.Jq=[];this.Rt=new a.ga(0);this.Qb=new a.i;this.Rj(b,c)}c.prototype.reset=function(b,c){this.Ye.Nh(!1);this.qh.Nh(!1);this.Jq.length=0;this.Rt.clear(!1);this.Rj(b,
c)};c.prototype.lg=function(b,c){return this.lt(b,c,0,this.Qb,this.Ze,!1,-1)};c.prototype.kt=function(b,c,a){a=-1==a?this.Ze:this.KC(a);var e=this.ba(a),k=this.CN(a);return this.lt(b,c,e,k,a,!1,-1)};c.prototype.da=function(b){return this.yN(b)};c.prototype.uC=function(b){return this.kw(this.Us(b))};c.prototype.ba=function(b){return this.Xs(b)};c.prototype.CN=function(b){var c=new a.i;c.K(this.Qb);var k=this.Xs(b);b=this.EC(b);for(var d=0;d<2*k;d+=2){var h=a.I.truncate(3&b>>d);0==h?(c.v=.5*(c.v+c.B),
c.C=.5*(c.C+c.G)):1==h?(c.B=.5*(c.v+c.B),c.C=.5*(c.C+c.G)):(2==h?c.B=.5*(c.v+c.B):c.v=.5*(c.v+c.B),c.G=.5*(c.C+c.G))}return c};c.prototype.gO=function(b){return this.Kw(b)};c.prototype.KN=function(b,c){return d.HL(this,b,c)};c.prototype.xw=function(b,c){return d.GL(this,b,c)};c.prototype.Re=function(){return d.FL(this)};c.prototype.Rj=function(b,c){if(0>c||32<2*c)throw a.g.N("invalid height");this.GP=c;this.Qb.K(b);this.Ze=this.Ye.be();this.Ku(this.Ze,0);this.Eu(this.Ze,0);this.LF(this.Ze,0);this.HF(this.Ze,
0)};c.prototype.lt=function(b,e,k,d,h,f,g){if(!d.contains(e))return 0==k?-1:this.lt(b,e,0,this.Qb,this.Ze,f,g);if(!f)for(var n=h;-1!=n;n=this.UN(n))this.Ku(n,this.Kw(n)+1);n=new a.i;n.K(d);d=h;var l=[];l[0]=new a.i;l[1]=new a.i;l[2]=new a.i;for(l[3]=new a.i;k<this.GP&&this.IK(d);k++){c.BF(n,l);for(var u=!1,m=0;4>m;m++)if(l[m].contains(e)){var u=!0,p=this.zo(d,m);-1==p&&(p=this.OL(d,m));this.Ku(p,this.Kw(p)+1);d=p;n.K(l[m]);break}if(!u)break}return this.zO(b,e,k,n,d,f,h,g)};c.prototype.zO=function(b,
c,a,d,h,f,g,l){var e=this.AC(h);if(f){if(h==g)return l;this.mM(l);f=l}else f=this.QL(),this.By(f,b),this.IR(this.Us(f),c);this.gS(f,h);-1!=e?(this.Ju(f,e),this.Fu(e,f)):this.DF(h,f);this.Fy(h,f);this.Eu(h,this.Zs(h)+1);this.HK(h)&&this.$M(a,d,h);return f};c.prototype.mM=function(b){var c=this.KC(b),a=this.AC(c),d=this.$N(b),h=this.at(b);this.sq(c)==b?(-1!=h?this.Ju(h,-1):this.Fy(c,-1),this.DF(c,h)):a==b?(this.Fu(d,-1),this.Fy(c,d)):(this.Ju(h,d),this.Fu(d,h));this.Ju(b,-1);this.Fu(b,-1);this.Eu(c,
this.Zs(c)-1)};c.BF=function(b,c){var a=.5*(b.v+b.B),e=.5*(b.C+b.G);c[0].K(a,e,b.B,b.G);c[1].K(b.v,e,a,b.G);c[2].K(b.v,b.C,a,e);c[3].K(a,b.C,b.B,e)};c.prototype.HK=function(b){return 8==this.Zs(b)&&!this.VC(b)};c.prototype.$M=function(b,c,a){var e,k,d=this.sq(a);do k=this.Us(d),e=this.qh.O(d,0),k=this.kw(k),this.lt(e,k,b,c,a,!0,d),d=e=this.at(d);while(-1!=d)};c.prototype.IK=function(b){return 8<=this.Zs(b)||this.VC(b)};c.prototype.VC=function(b){return-1!=this.zo(b,0)||-1!=this.zo(b,1)||-1!=this.zo(b,
2)||-1!=this.zo(b,3)};c.prototype.OL=function(b,c){var a=this.Ye.be();this.MR(b,c,a);this.Ku(a,0);this.Eu(a,0);this.Tj(a,b);this.HF(a,this.Xs(b)+1);this.LF(a,c<<2*this.Xs(b)|this.EC(b));return a};c.prototype.QL=function(){var b=this.qh.be(),c;0<this.Rt.size?(c=this.Rt.tc(),this.Rt.af()):(c=this.Jq.length,this.Jq.push(new a.i));this.JR(b,c);return b};c.prototype.zo=function(b,c){return this.Ye.O(b,c)};c.prototype.MR=function(b,c,a){this.Ye.L(b,c,a)};c.prototype.sq=function(b){return this.Ye.O(b,4)};
c.prototype.DF=function(b,c){this.Ye.L(b,4,c)};c.prototype.AC=function(b){return this.Ye.O(b,5)};c.prototype.Fy=function(b,c){this.Ye.L(b,5,c)};c.prototype.EC=function(b){return this.Ye.O(b,6)};c.prototype.LF=function(b,c){this.Ye.L(b,6,c)};c.prototype.Zs=function(b){return this.Ye.O(b,7)};c.prototype.Kw=function(b){return this.Ye.O(b,8)};c.prototype.Eu=function(b,c){this.Ye.L(b,7,c)};c.prototype.Ku=function(b,c){this.Ye.L(b,8,c)};c.prototype.UN=function(b){return this.Ye.O(b,9)};c.prototype.Tj=function(b,
c){this.Ye.L(b,9,c)};c.prototype.Xs=function(b){return this.Ye.O(b,10)};c.prototype.HF=function(b,c){this.Ye.L(b,10,c)};c.prototype.yN=function(b){return this.qh.O(b,0)};c.prototype.By=function(b,c){this.qh.L(b,0,c)};c.prototype.$N=function(b){return this.qh.O(b,1)};c.prototype.at=function(b){return this.qh.O(b,2)};c.prototype.Ju=function(b,c){this.qh.L(b,1,c)};c.prototype.Fu=function(b,c){this.qh.L(b,2,c)};c.prototype.KC=function(b){return this.qh.O(b,3)};c.prototype.gS=function(b,c){this.qh.L(b,
3,c)};c.prototype.Us=function(b){return this.qh.O(b,4)};c.prototype.JR=function(b,c){this.qh.L(b,4,c)};c.prototype.kw=function(b){return this.Jq[b]};c.prototype.IR=function(b,c){this.Jq[b].K(c)};return c}();a.co=h})(z||(z={}));(function(a){(function(c){c[c.Outside=0]="Outside";c[c.Inside=1]="Inside";c[c.Border=2]="Border"})(a.wH||(a.wH={}));var d=function(){function c(b,c){this.Hg=null;this.SP=c;this.Hg=b}c.prototype.Bu=function(b,c){this.PD!=c&&b.flush();this.PD=c};c.prototype.XB=function(b,c){for(var a=
0;a<c;)for(var e=b[a++],d=b[a++],h=b[a++]*this.SP;e<d;e++)this.Hg[h+(e>>4)]|=this.PD<<2*(e&15)};return c}();a.VT=d;var h=function(){function c(b,c,a){this.Hg=null;this.Qx=this.Sx=this.zE=this.xE=this.Qq=this.VD=this.tf=this.Pl=0;this.ii=this.Nj=this.sk=null;this.jt(b,c,a)}c.create=function(b,e,k){if(!c.Cc(b))throw a.g.N();return c.Id(b,e,k)};c.ti=function(b,e,k){if(!c.Cc(b))throw a.g.N();return c.ye(b,e,k)};c.jR=function(b){switch(b){case 0:b=1024;break;case 1:b=16384;break;case 2:b=262144;break;
default:throw a.g.ra("Internal Error");}return b};c.Cc=function(b){return b.s()||1607!=b.D()&&1736!=b.D()?!1:!0};c.prototype.KM=function(b,c){c=c.Ca();for(var e=new a.b,d=new a.b;c.kb();)for(;c.La();){var h=c.ia();if(322!=h.D())throw a.g.ra("Internal Error");b.Zi(h.Mb(),e);b.Zi(h.oc(),d);this.ii.zv(e.x,e.y,d.x,d.y)}this.ii.fF(a.ev.$u)};c.prototype.LM=function(){throw a.g.ra("Internal Error");};c.prototype.cw=function(b,c){for(var e=1;4>e;e++)b.zv(c[e-1].x,c[e-1].y,c[e].x,c[e].y);b.zv(c[3].x,c[3].y,
c[0].x,c[0].y);this.ii.fF(a.ev.$u)};c.prototype.kG=function(b,c,k){for(var e=[null,null,null,null],d=0;d<e.length;d++)e[d]=new a.b;c=c.Ca();k=this.Nj.TS(k)+1.5;for(var d=new a.b,h=new a.b,f=new a.b,g=new a.b,l=new a.b,m=new a.i,p=new a.b;c.kb();){var q=!1,r=!0;for(p.ma(0,0);c.La();){var v=c.ia();g.x=v.na;g.y=v.ja;l.x=v.la;l.y=v.ha;m.Ja();m.Db(g.x,g.y);m.Oj(l.x,l.y);if(this.sk.rD(m)){this.Nj.Zi(l,l);r?(this.Nj.Zi(g,g),p.J(g),r=!1):g.J(p);d.pc(l,g);var v=d.length(),x=.5>v;0==v?d.ma(1,0):(x||p.J(l),
d.scale(k/v),h.ma(-d.y,d.x),f.ma(d.y,-d.x),g.sub(d),l.add(d),e[0].add(g,h),e[1].add(g,f),e[2].add(l,f),e[3].add(l,h),x?q=!0:this.cw(b,e))}else q&&(this.cw(b,e),q=!1),r=!0}q&&this.cw(b,e)}};c.prototype.fz=function(b){return a.I.truncate(b*this.VD+this.xE)};c.prototype.gz=function(b){return a.I.truncate(b*this.Qq+this.zE)};c.Id=function(b,a,k){return new c(b,a,k)};c.ye=function(b,a,k){return new c(b,a,k)};c.prototype.jt=function(b,c,k){this.tf=Math.max(a.I.truncate(2*Math.sqrt(k)+.5),64);this.Pl=a.I.truncate((2*
this.tf+31)/32);this.sk=new a.i;this.Sx=c;k=0;for(var e=this.tf,h=this.Pl;8<=e;)k+=e*h,e=a.I.truncate(e/2),h=a.I.truncate((2*e+31)/32);this.Hg=a.I.Lh(k,0);this.ii=new a.ev;k=new d(this.Hg,this.Pl,this);this.ii.vS(this.tf,this.tf,k);b.o(this.sk);this.sk.P(c,c);var e=new a.i,h=a.i.Oa(1,1,this.tf-2,this.tf-2),f=c*h.aa();c*=h.ba();e.K(this.sk.Af(),Math.max(f,this.sk.aa()),Math.max(c,this.sk.ba()));this.Qx=this.Sx;this.Nj=new a.Bg;this.Nj.wO(e,h);new a.Bg;switch(b.D()){case 550:k.Bu(this.ii,2);this.LM();
break;case 1607:k.Bu(this.ii,2);this.kG(this.ii,b,this.Qx);break;case 1736:k.Bu(this.ii,1),this.KM(this.Nj,b),k.Bu(this.ii,2),this.kG(this.ii,b,this.Qx)}this.VD=this.Nj.mb;this.Qq=this.Nj.eb;this.xE=this.Nj.Nb;this.zE=this.Nj.Ob;this.BK()};c.prototype.BK=function(){this.ii.flush();for(var b=0,c=this.tf*this.Pl,k=this.tf,d=a.I.truncate(this.tf/2),h=this.Pl,f=a.I.truncate((2*d+31)/32);8<k;){for(k=0;k<d;k++)for(var g=2*k,l=2*k+1,m=0;m<d;m++){var p=2*m,q=2*m+1,r=p>>4,p=2*(p&15),v=q>>4,q=2*(q&15),x=this.Hg[b+
h*g+r]>>p&3,x=x|this.Hg[b+h*g+v]>>q&3,x=x|this.Hg[b+h*l+r]>>p&3,x=x|this.Hg[b+h*l+v]>>q&3;this.Hg[c+f*k+(m>>4)]|=x<<2*(m&15)}k=d;h=f;b=c;d=a.I.truncate(k/2);f=a.I.truncate((2*d+31)/32);c=b+h*k}};c.prototype.Kk=function(b,c){if(!this.sk.contains(b,c))return 0;b=this.fz(b);c=this.gz(c);if(0>b||b>=this.tf||0>c||c>=this.tf)return 0;b=this.Hg[this.Pl*c+(b>>4)]>>2*(b&15)&3;return 0==b?0:1==b?1:2};c.prototype.Dn=function(b){if(!b.Ga(this.sk))return 0;var c=this.fz(b.v),k=this.fz(b.B),d=this.gz(b.C);b=this.gz(b.G);
0>c&&(c=0);0>d&&(d=0);k>=this.tf&&(k=this.tf-1);b>=this.tf&&(b=this.tf-1);if(c>k||d>b)return 0;for(var h=Math.max(k-c,1)*Math.max(b-d,1),f=0,g=this.Pl,l=this.tf,m=0;;){if(32>h||16>l){for(h=d;h<=b;h++)for(var p=c;p<=k;p++)if(m=this.Hg[f+g*h+(p>>4)]>>2*(p&15)&3,1<m)return 2;if(0==m)return 0;if(1==m)return 1}f+=g*l;l=a.I.truncate(l/2);g=a.I.truncate((2*l+31)/32);c=a.I.truncate(c/2);d=a.I.truncate(d/2);k=a.I.truncate(k/2);b=a.I.truncate(b/2);h=Math.max(k-c,1)*Math.max(b-d,1)}};c.prototype.cO=function(){return this.tf*
this.Pl};return c}();a.dA=h})(z||(z={}));(function(a){(function(c){c[c.contains=1]="contains";c[c.within=2]="within";c[c.equals=3]="equals";c[c.disjoint=4]="disjoint";c[c.touches=8]="touches";c[c.crosses=16]="crosses";c[c.overlaps=32]="overlaps";c[c.unknown=0]="unknown";c[c.intersects=1073741824]="intersects"})(a.zI||(a.zI={}));var d=function(){function c(){}c.Oa=function(b,a,k,d,h,f,g,l){var e=new c;e.Wt=b;e.Jl=a;e.Oi=k;e.ji=d;e.dE=h;e.tU=f;e.uU=g;e.vU=l;return e};return c}(),h=function(){function c(){}
c.vT=function(b,e,k){if(!c.pQ(b))return!1;var d=a.Ia.Cg(e,b,!1);e=!1;a.Wj.vB(b)&&(e=e||b.jv(d,k));d=b.D();1736!=d&&1607!=d||!a.Wj.tB(b)||0==k||(e=e||b.dj(k));1736!=d&&1607!=d||!a.Wj.uB(b)||0==k||(e=e||b.jJ());return e};c.pQ=function(b){return a.Wj.vB(b)||a.Wj.tB(b)||a.Wj.uB(b)};return c}();a.rT=h;h=function(){function c(){this.Tg=[]}c.qy=function(b,e,d,h,f){var k=b.D(),n=e.D();if(197==k){if(197==n)return c.AQ(b,e,d,h);if(33==n)return 2==h?h=1:1==h&&(h=2),c.Iz(e,b,d,h)}else if(33==k){if(197==n)return c.Iz(b,
e,d,h);if(33==n)return c.eR(b,e,d,h)}if(b.s()||e.s())return 4==h?!0:!1;var g=new a.i;b.o(g);var l=new a.i;e.o(l);var u=new a.i;u.K(g);u.Db(l);d=a.Ia.zd(d,u,!1);if(c.nj(g,l,d))return 4==h?!0:!1;g=!1;a.al.Lc(k)&&(k=new a.Xa(b.description),k.Bc(b,!0),b=k,k=1607);a.al.Lc(n)&&(n=new a.Xa(e.description),n.Bc(e,!0),e=n,n=1607);if(197!=k&&197!=n){if(b.fb()<e.fb()||33==k&&550==n)2==h?h=1:1==h&&(h=2)}else 1736!=k&&197!=n&&(2==h?h=1:1==h&&(h=2));switch(k){case 1736:switch(n){case 1736:g=c.vr(b,e,d,h,f);break;
case 1607:g=c.Vl(b,e,d,h,f);break;case 33:g=c.ur(b,e,d,h,f);break;case 550:g=c.tr(b,e,d,h,f);break;case 197:g=c.xD(b,e,d,h,f)}break;case 1607:switch(n){case 1736:g=c.Vl(e,b,d,h,f);break;case 1607:g=c.ey(b,e,d,h,f);break;case 33:g=c.xr(b,e,d,h,f);break;case 550:g=c.wr(b,e,d,h,f);break;case 197:g=c.WE(b,e,d,h)}break;case 33:switch(n){case 1736:g=c.ur(e,b,d,h,f);break;case 1607:g=c.xr(e,b,d,h,f);break;case 550:g=c.pr(e,b,d,h,f)}break;case 550:switch(n){case 1736:g=c.tr(e,b,d,h,f);break;case 1607:g=c.wr(e,
b,d,h,f);break;case 550:g=c.Wx(b,e,d,h,f);break;case 33:g=c.pr(b,e,d,h,f);break;case 197:g=c.oA(b,e,d,h)}break;case 197:switch(n){case 1736:g=c.xD(e,b,d,h,f);break;case 1607:g=c.WE(e,b,d,h);break;case 550:g=c.oA(e,b,d,h)}}return g};c.AQ=function(b,e,d,h){if(b.s()||e.s())return 4==h?!0:!1;var k=new a.i,f=new a.i,n=new a.i;b.o(k);e.o(f);n.K(k);n.Db(f);b=a.Ia.zd(d,n,!1);switch(h){case 4:return c.nj(k,f,b);case 2:return c.Bz(f,k,b);case 1:return c.Bz(k,f,b);case 3:return c.ye(k,f,b);case 8:return c.kT(k,
f,b);case 32:return c.fT(k,f,b);case 16:return c.cT(k,f,b)}return!1};c.Iz=function(b,e,d,h){if(b.s()||e.s())return 4==h?!0:!1;b=b.w();var k=new a.i,f=new a.i;e.o(k);f.K(b);f.Db(k);e=a.Ia.zd(d,f,!1);switch(h){case 4:return c.ru(b,k,e);case 2:return c.bx(b,k,e);case 1:return c.YL(b,k,e);case 3:return c.KA(b,k,e);case 8:return c.ax(b,k,e)}return!1};c.eR=function(b,e,d,h){if(b.s()||e.s())return 4==h?!0:!1;b=b.w();e=e.w();var k=new a.i;k.K(b);k.Db(e);d=a.Ia.zd(d,k,!1);switch(h){case 4:return c.rM(b,e,
d);case 2:return c.hz(e,b,d);case 1:return c.hz(b,e,d);case 3:return c.dB(b,e,d)}return!1};c.vr=function(b,a,d,h,f){switch(h){case 4:return c.dT(b,a,d);case 2:return c.su(a,b,d,f);case 1:return c.su(b,a,d,f);case 3:return c.TG(b,a,d);case 8:return c.vH(b,a,d);case 32:return c.bH(b,a,d,f)}return!1};c.Vl=function(b,a,d,h,f){switch(h){case 4:return c.gT(b,a,d);case 1:return c.dy(b,a,d,f);case 8:return c.zH(b,a,d,f);case 16:return c.lR(b,a,d)}return!1};c.ur=function(b,a,d,h){switch(h){case 4:return c.YS(b,
a,d);case 1:return c.qQ(b,a,d);case 8:return c.lH(b,a,d)}return!1};c.tr=function(b,a,d,h){switch(h){case 4:return c.OS(b,a,d);case 1:return c.hQ(b,a,d);case 8:return c.iH(b,a,d);case 16:return c.dR(b,a,d)}return!1};c.xD=function(b,a,d,h,f){if(c.ER(b,a,d))return 4==h?!0:!1;if(4==h)return!1;switch(h){case 2:return c.DH(b,a,d);case 1:return c.WP(b,a,d);case 3:return c.OG(b,a,d);case 8:return c.eH(b,a,d,f);case 32:return c.WG(b,a,d,f);case 16:return c.zQ(b,a,d,f)}return!1};c.ey=function(b,a,d,h){switch(h){case 4:return c.EI(b,
a,d);case 2:return c.JE(a,b,d);case 1:return c.JE(b,a,d);case 3:return c.QI(b,a,d);case 8:return c.cF(b,a,d);case 32:return c.$I(b,a,d);case 16:return c.LE(b,a,d)}return!1};c.xr=function(b,a,d,h){switch(h){case 4:return c.yI(b,a,d);case 1:return c.KH(b,a,d);case 8:return c.MG(b,a,d)}return!1};c.wr=function(b,a,d,h){switch(h){case 4:return c.vI(b,a,d);case 1:return c.IH(b,a,d);case 8:return c.fJ(b,a,d);case 16:return c.QH(b,a,d)}return!1};c.WE=function(b,a,d,h){if(c.nI(b,a,d))return 4==h?!0:!1;if(4==
h)return!1;switch(h){case 2:return c.WJ(b,a,d);case 1:return c.GH(b,a,d);case 3:return c.MI(b,a,d);case 8:return c.cJ(b,a,d);case 32:return c.XI(b,a,d);case 16:return c.MH(b,a,d)}return!1};c.Wx=function(b,a,d,h){switch(h){case 4:return c.xI(b,a,d);case 2:return c.kA(a,b,d);case 1:return c.kA(b,a,d);case 3:return c.LI(b,a,d);case 32:return c.bJ(b,a,d)}return!1};c.pr=function(b,a,d,h){switch(h){case 4:return c.lA(b,a,d);case 2:return c.HJ(b,a,d);case 1:return c.PH(b,a,d);case 3:return c.mu(b,a,d)}return!1};
c.oA=function(b,a,d,h){switch(h){case 4:return c.uI(b,a,d);case 2:return c.LG(b,a,d);case 1:return c.LH(b,a,d);case 3:return c.DI(b,a,d);case 8:return c.eJ(b,a,d);case 16:return c.mI(b,a,d)}return!1};c.TG=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);if(!c.ye(k,h,d))return!1;k=c.fc(b,e,!1);if(4==k||1==k||2==k)return!1;if(c.jA(b,e,d))return!0;k=b.$b();h=e.$b();return Math.abs(k-h)>4*Math.max(b.F(),e.F())*d?!1:c.Vv(b,e,d,!0)};c.dT=function(b,a,d){var e=c.fc(b,a,!0);return 4==e?!0:1==e||2==e||
1073741824==e?!1:c.ZC(b,a,d)};c.vH=function(b,a,d){var e=c.fc(b,a,!1);return 4==e||1==e||2==e?!1:c.AE(b,a,d,null)};c.bH=function(b,a,d,h){var e=c.fc(b,a,!1);return 4==e||1==e||2==e?!1:c.wD(b,a,d,h)};c.su=function(b,e,d,h){var k=new a.i,f=new a.i;b.o(k);e.o(f);if(!c.rc(k,f,d))return!1;k=c.fc(b,e,!1);return 4==k||2==k?!1:1==k?!0:c.bC(b,e,d,h)};c.gT=function(b,a,d){var e=c.fc(b,a,!0);return 4==e?!0:1==e||1073741824==e?!1:c.ZC(b,a,d)};c.zH=function(b,a,d,h){var e=c.fc(b,a,!1);return 4==e||1==e?!1:c.CE(b,
a,d,h)};c.lR=function(b,a,d){var e=c.fc(b,a,!1);return 4==e||1==e?!1:c.YC(b,a,d,null)};c.dy=function(b,e,d,h){var k=new a.i,f=new a.i;b.o(k);e.o(f);if(!c.rc(k,f,d))return!1;k=c.fc(b,e,!1);return 4==k?!1:1==k?!0:c.jC(b,e,d,h)};c.YS=function(b,c,d){return 0==a.gd.uD(b,c,d)?!0:!1};c.lH=function(b,a,d){a=a.w();return c.yD(b,a,d)};c.qQ=function(b,a,d){a=a.w();return c.YB(b,a,d)};c.OS=function(b,e,d){var k=c.fc(b,e,!1);if(4==k)return!0;if(1==k)return!1;k=new a.i;b.o(k);k.P(d,d);for(var h=new a.b,f=0;f<
e.F();f++)if(e.w(f,h),k.contains(h)){var g=a.gd.he(b,h,d);if(1==g||2==g)return!1}return!0};c.iH=function(b,c,d){var e=this.fc(b,c,!1);if(4==e||1==e)return!1;e=new a.i;b.o(e);e.P(d,d);var k,h=!1,f;f=b;for(var g=!1,l=0;l<c.F();l++){k=c.Fa(l);if(e.contains(k))if(k=a.gd.he(f,k,d),2==k)h=!0;else if(1==k)return!1;g||(!a.ff.An(b,c.F()-1)||null!=b.pb&&null!=b.pb.Ab?f=b:(f=new a.Ka,b.copyTo(f),f.dj(1)),g=!0)}return h?!0:!1};c.dR=function(b,c,d){var e=this.fc(b,c,!1);if(4==e||1==e)return!1;var k=new a.i,e=
new a.i,h=new a.i;b.o(k);c.o(h);e.K(k);e.P(d,d);var h=k=!1,f,g;g=b;for(var l=!1,m=0;m<c.F();m++){f=c.Fa(m);e.contains(f)?(f=a.gd.he(g,f,d),0==f?h=!0:1==f&&(k=!0)):h=!0;if(k&&h)return!0;l||(!a.ff.An(b,c.F()-1)||null!=b.pb&&null!=b.pb.Ab?g=b:(g=new a.Ka,b.copyTo(g),g.dj(1)),l=!0)}return!1};c.hQ=function(b,c,d){var e=new a.i,k=new a.i;b.o(e);c.o(k);if(!this.rc(e,k,d))return!1;k=this.fc(b,c,!1);if(4==k)return!1;if(1==k)return!0;var k=!1,h,f;f=b;for(var g=!1,l=0;l<c.F();l++){h=c.Fa(l);if(!e.contains(h))return!1;
h=a.gd.he(f,h,d);if(1==h)k=!0;else if(0==h)return!1;g||(!a.ff.An(b,c.F()-1)||null!=b.pb&&null!=b.pb.Ab?f=b:(f=new a.Ka,b.copyTo(f),f.dj(1)),g=!0)}return k};c.OG=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);if(!c.ye(k,h,d))return!1;k=new a.Ka;k.Wc(e,!1);return c.Vv(b,k,d,!0)};c.ER=function(b,e,d){var k=c.fc(b,e,!1);if(4==k)return!0;if(1==k||2==k)return!1;var h=new a.i,k=new a.i;b.o(h);e.o(k);if(c.rc(k,h,d))return!1;h=new a.b;k.Yl(h);e=a.gd.he(b,h,d);if(0!=e)return!1;k.YE(h);e=a.gd.he(b,h,
d);if(0!=e)return!1;k.Zl(h);e=a.gd.he(b,h,d);if(0!=e)return!1;k.aF(h);e=a.gd.he(b,h,d);if(0!=e)return!1;e=b.mc(0);h=new a.i;h.K(k);h.P(d,d);for(var f=0,g=b.F();f<g;f++){var l=e.read(2*f),m=e.read(2*f+1);if(h.contains(l,m))return!1}return!c.cA(b,k,d)};c.eH=function(b,e,d,h){var k=c.fc(b,e,!1);if(4==k||1==k||2==k)return!1;var k=new a.i,f=new a.i;b.o(k);e.o(f);if(c.rc(f,k,d))return!1;if(f.aa()<=d&&f.ba()<=d)return e=e.qq(),c.yD(b,e,d);if(f.aa()<=d||f.ba()<=d)return k=new a.Xa,f=new a.Va,e.uf(0,f),k.df(f),
e.uf(2,f),k.lineTo(f),c.CE(b,k,d,h);k=new a.Ka;k.Wc(e,!1);return c.AE(b,k,d,h)};c.WG=function(b,e,d,h){var k=c.fc(b,e,!1);if(4==k||1==k||2==k)return!1;var k=new a.i,f=new a.i;b.o(k);e.o(f);if(c.rc(f,k,d)||f.aa()<=d||f.ba()<=d)return!1;k=new a.Ka;k.Wc(e,!1);return c.wD(b,k,d,h)};c.DH=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);return c.rc(h,k,d)};c.WP=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);if(!c.rc(k,h,d))return!1;k=c.fc(b,e,!1);if(4==k||2==k)return!1;if(1==k)return!0;if(h.aa()<=
d&&h.ba()<=d)return e=e.qq(),c.YB(b,e,d);if(h.aa()<=d||h.ba()<=d)return h=new a.Xa,k=new a.Va,e.uf(0,k),h.df(k),e.uf(2,k),h.lineTo(k),c.jC(b,h,d,null);h=new a.Ka;h.Wc(e,!1);return c.bC(b,h,d,null)};c.zQ=function(b,e,d,h){var k=new a.i,f=new a.i;b.o(k);e.o(f);if(c.rc(f,k,d)||f.ba()>d&&f.aa()>d||f.ba()<=d&&f.aa()<=d)return!1;k=new a.Xa;f=new a.Va;e.uf(0,f);k.df(f);e.uf(2,f);k.lineTo(f);return c.YC(b,k,d,h)};c.QI=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);return c.ye(k,h,d)&&4!=c.fc(b,e,!1)?
c.jA(b,e,d)?!0:c.Vv(b,e,d,!1):!1};c.EI=function(b,c,d){return 4==this.fc(b,c,!1)?!0:(new a.cl(b,c,d,!0)).next()?!this.ED(b,c,d):!1};c.cF=function(b,e,d){if(4==c.fc(b,e,!1))return!1;var k=new a.qd(0);if(0!=c.Zv(b,e,d,k))return!1;for(var h=new a.pe,f=0;f<k.size;f+=2){var g=k.read(f),l=k.read(f+1);h.zs(g,l)}b=b.Rf();e=e.Rf();b.Pd(e,0,e.F());return c.lu(b,h,d)};c.LE=function(b,e,d){if(4==c.fc(b,e,!1))return!1;var k=new a.qd(0);if(0!=c.Zv(b,e,d,k))return!1;for(var h=new a.pe,f=0;f<k.size;f+=2){var g=k.read(f),
l=k.read(f+1);h.zs(g,l)}b=b.Rf();e=e.Rf();b.Pd(e,0,e.F());return!c.lu(b,h,d)};c.$I=function(b,a,d){return 4==c.fc(b,a,!1)?!1:c.iA(b,a,d)};c.JE=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);return c.rc(k,h,d)&&4!=c.fc(b,e,!1)?c.Wf(e,b,d,!1):!1};c.yI=function(b,a,d){if(4==c.fc(b,a,!1))return!0;a=a.w();return!c.ex(b,a,d)};c.MG=function(b,a,d){if(4==c.fc(b,a,!1))return!1;a=a.w();return c.bw(b,a,d)};c.KH=function(b,a,d){if(4==c.fc(b,a,!1))return!1;a=a.w();return c.bA(b,a,d)};c.vI=function(b,a,
d){return 4==c.fc(b,a,!1)?!0:!c.eA(b,a,d,!1)};c.fJ=function(b,c,d){if(4==this.fc(b,c,!1))return!1;var e=b.Ca(),k=new a.i,h=new a.i,f=new a.i;b.o(k);c.o(h);k.P(d,d);h.P(d,d);f.K(k);f.Ga(h);var g,l,k=null;g=b.pb;null!=g?(l=g.Ab,k=g.nn,null==l&&(l=g=a.Ia.ij(b,f))):l=g=a.Ia.ij(b,f);var m=l.Re(),p=null;null!=k&&(p=k.Re());var q=new a.b,r=new a.b,v=!1,x=d*d,k=new a.Wk(c.F());for(g=0;g<c.F();g++)k.write(g,0);for(g=0;g<c.F();g++)if(c.w(g,q),f.contains(q))if(h.K(q.x,q.y,q.x,q.y),null==p||(p.Ch(h,d),-1!=p.next())){m.Ch(h,
d);for(var w=m.next();-1!=w;w=m.next())if(e.Sb(l.da(w)),w=e.ia(),w.Kb(w.Gd(q,!1),r),a.b.Zb(q,r)<=x){k.write(g,1);v=!0;break}}if(!v)return!1;b=b.Rf();e=new a.pe;h=new a.b;for(g=0;g<c.F();g++)0!=k.read(g)&&(c.w(g,h),e.zs(h.x,h.y));return this.lu(b,e,d)};c.QH=function(b,c,d){if(4==this.fc(b,c,!1))return!1;var e=b.Ca(),k=new a.i,h=new a.i,f=new a.i;b.o(k);c.o(h);k.P(d,d);h.P(d,d);f.K(k);f.Ga(h);var g,l,k=null;g=b.pb;null!=g?(l=g.Ab,k=g.nn,null==l&&(l=g=a.Ia.ij(b,f))):l=g=a.Ia.ij(b,f);var m=l.Re(),p=null;
null!=k&&(p=k.Re());var q=new a.b,r=new a.b,v=!1,x=!1,w=d*d,k=new a.Wk(c.F());for(g=0;g<c.F();g++)k.write(g,0);for(g=0;g<c.F();g++)if(c.w(g,q),f.contains(q))if(h.K(q.x,q.y,q.x,q.y),null!=p&&(p.Ch(h,d),-1==p.next()))x=!0;else{m.Ch(h,d);for(var y=!1,t=m.next();-1!=t;t=m.next())if(e.Sb(l.da(t)),t=e.ia(),t.Kb(t.Gd(q,!1),r),a.b.Zb(q,r)<=w){k.write(g,1);y=v=!0;break}y||(x=!0)}else x=!0;if(!v||!x)return!1;b=b.Rf();e=new a.pe;h=new a.b;for(g=0;g<c.F();g++)0!=k.read(g)&&(c.w(g,h),e.zs(h.x,h.y));return!this.lu(b,
e,d)};c.IH=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);if(!c.rc(k,h,d)||4==c.fc(b,e,!1)||!c.eA(b,e,d,!0))return!1;b=b.Rf();return!c.nA(b,e,d)};c.MI=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);return h.ba()>d&&h.aa()>d?!1:c.ye(k,h,d)};c.nI=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);return c.rc(h,k,d)?!1:!c.cA(b,h,d)};c.cJ=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);if(h.ba()<=d&&h.aa()<=d)return h=e.qq(),c.bw(b,h,d);if(h.ba()<=d||h.aa()<=d)return h=new a.Xa,
k=new a.Va,e.uf(0,k),h.df(k),e.uf(2,k),h.lineTo(k),c.cF(b,h,d);b=b.Ca();e=new a.i;k=new a.i;e.K(h);k.K(h);e.P(-d,-d);k.P(d,d);for(var h=!1,f=new a.i,g=new a.i;b.kb();)for(;b.La();){b.ia().o(f);g.K(e);g.Ga(f);if(!g.s()&&(g.ba()>d||g.aa()>d))return!1;g.K(k);g.Ga(f);g.s()||(h=!0)}return h};c.XI=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);if(c.rc(k,h,d)||c.rc(h,k,d)||c.rc(h,k,d)||h.ba()>d&&h.aa()>d||h.ba()<=d&&h.aa()<=d)return!1;k=new a.Xa;h=new a.Va;e.uf(0,h);k.df(h);e.uf(2,h);k.lineTo(h);
return c.iA(b,k,d)};c.WJ=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);if(!c.rc(h,k,d)||h.ba()<=d&&h.aa()<=d)return!1;if(h.ba()<=d||h.aa()<=d)return c.rc(h,k,d);b=b.Ca();e=new a.i;e.K(h);e.P(-d,-d);for(var h=!1,k=new a.i,f=new a.i;b.kb();)for(;b.La();)b.ia().o(k),e.jl(k)?h=!0:(f.K(e),f.Ga(k),!f.s()&&(f.ba()>d||f.aa()>d)&&(h=!0));return h};c.GH=function(b,e,d){var k=new a.i,h=new a.i;e.o(h);b.o(k);if(!c.rc(k,h,d)||h.ba()>d&&h.aa()>d)return!1;if(h.ba()<=d&&h.aa()<=d)return e=e.qq(),c.bA(b,e,
d);k=new a.Xa;h=new a.Va;e.uf(0,h);k.df(h);e.uf(2,h);k.lineTo(h);return c.Wf(k,b,d,!1)};c.MH=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);if(c.rc(h,k,d)||h.ba()<=d&&h.aa()<=d)return!1;if(h.ba()<=d||h.aa()<=d)return k=new a.Xa,h=new a.Va,e.uf(0,h),k.df(h),e.uf(2,h),k.lineTo(h),c.LE(b,k,d);b=b.Ca();e=new a.i;k=new a.i;k.K(h);e.K(h);k.P(-d,-d);e.P(d,d);for(var f=h=!1,g=new a.i,l=new a.i;b.kb();)for(;b.La();)if(b.ia().o(g),f||e.contains(g)||(f=!0),h||(l.K(k),l.Ga(g),!l.s()&&(l.ba()>d||l.aa()>
d)&&(h=!0)),h&&f)return!0;return!1};c.LI=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);return c.ye(k,h,d)?c.OI(b,e,d)?!0:c.Pw(b,e,d,!1,!0,!1):!1};c.xI=function(b,a,d){return!c.nA(b,a,d)};c.bJ=function(b,a,d){return c.Pw(b,a,d,!1,!1,!0)};c.kA=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);return c.rc(k,h,d)?c.Pw(e,b,d,!0,!1,!1):!1};c.lu=function(b,c,d){d*=d;for(var e=new a.b,k=new a.b,h=0;h<c.F();h++){c.w(h,k);for(var f=!1,g=0;g<b.F();g++)if(b.w(g,e),a.b.Zb(e,k)<=d){f=!0;break}if(!f)return!1}return!0};
c.mu=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);return c.ye(k,h,d)};c.lA=function(b,a,d){a=a.w();return c.or(b,a,d)};c.HJ=function(b,a,d){return c.mu(b,a,d)};c.PH=function(b,a,d){return!c.lA(b,a,d)};c.DI=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);return h.ba()>d||h.aa()>d?!1:c.ye(k,h,d)};c.uI=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);if(c.rc(h,k,d))return!1;e=new a.i;e.K(h);e.P(d,d);d=new a.b;for(h=0;h<b.F();h++)if(b.w(h,d),e.contains(d))return!1;return!0};c.eJ=function(b,
c,d){var e=new a.i,k=new a.i,h=new a.i;c.o(e);if(e.ba()<=d&&e.aa()<=d)return!1;if(e.ba()<=d||e.aa()<=d){c=new a.b;var f=!1;k.K(e);h.K(e);k.P(d,d);e.ba()>d?h.P(0,-d):h.P(-d,0);for(var g=0;g<b.F();g++)if(b.w(g,c),k.contains(c)){if(e.ba()>d){if(c.y>h.C&&c.y<h.G)return!1}else if(c.x>h.v&&c.x<h.B)return!1;f=!0}return f}k.K(e);h.K(e);k.P(d,d);h.P(-d,-d);c=new a.b;f=!1;for(g=0;g<b.F();g++)if(b.w(g,c),k.contains(c)){if(h.jl(c))return!1;f=!0}return f};c.LG=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);
if(!c.rc(h,k,d))return!1;if(h.ba()<=d&&h.aa()<=d)return c.ye(k,h,d);if(h.ba()<=d||h.aa()<=d){e=!1;var k=new a.i,f=new a.i;k.K(h);f.K(h);h.ba()>d?k.P(0,-d):k.P(-d,0);f.P(d,d);for(var g=new a.b,l=0;l<b.F();l++){b.w(l,g);if(!f.contains(g))return!1;h.ba()>d?g.y>k.C&&g.y<k.G&&(e=!0):g.x>k.v&&g.x<k.B&&(e=!0)}return e}e=!1;k=new a.i;f=new a.i;k.K(h);f.K(h);k.P(-d,-d);f.P(d,d);g=new a.b;for(l=0;l<b.F();l++){b.w(l,g);if(!f.contains(g))return!1;k.jl(g)&&(e=!0)}return e};c.LH=function(b,e,d){var k=new a.i,h=
new a.i;b.o(k);e.o(h);if(!c.rc(k,h,d)||h.ba()>d||h.aa()>d)return!1;e=e.qq();return!c.or(b,e,d)};c.mI=function(b,e,d){var k=new a.i,h=new a.i;b.o(k);e.o(h);if(c.rc(h,k,d)||h.ba()<=d&&h.aa()<=d)return!1;if(h.ba()<=d||h.aa()<=d){e=new a.i;k=new a.i;e.K(h);h.ba()>d?e.P(0,-d):e.P(-d,0);k.K(h);k.P(d,d);for(var f=new a.b,g=!1,l=!1,m=0;m<b.F();m++)if(b.w(m,f),g||(h.ba()>d?f.y>e.C&&f.y<e.G&&(g=!0):f.x>e.v&&f.x<e.B&&(g=!0)),l||k.contains(f)||(l=!0),g&&l)return!0;return!1}e=new a.i;k=new a.i;e.K(h);e.P(-d,-d);
k.K(h);k.P(d,d);f=new a.b;l=g=!1;for(m=0;m<b.F();m++)if(b.w(m,f),!g&&e.jl(f)&&(g=!0),l||k.contains(f)||(l=!0),g&&l)return!0;return!1};c.dB=function(b,c,d){return a.b.Zb(b,c)<=d*d?!0:!1};c.rM=function(b,c,d){return a.b.Zb(b,c)>d*d?!0:!1};c.hz=function(b,a,d){return c.dB(b,a,d)};c.KA=function(b,e,d){var k=new a.i;k.K(b);return c.ye(k,e,d)};c.ru=function(b,c,d){var e=new a.i;e.K(c);e.P(d,d);return!e.contains(b)};c.ax=function(b,c,d){if(c.ba()<=d&&c.aa()<=d)return!1;var e=new a.i,k=new a.i;e.K(c);e.P(d,
d);if(!e.contains(b))return!1;if(c.ba()<=d||c.aa()<=d){k.K(c);c.ba()>d?k.P(0,-d):k.P(-d,0);if(c.ba()>d){if(b.y>k.C&&b.y<k.G)return!1}else if(b.x>k.v&&b.x<k.B)return!1;return!0}k.K(c);k.P(-d,-d);return k.jl(b)?!1:!0};c.bx=function(b,c,d){if(c.ba()<=d&&c.aa()<=d)return!0;if(c.ba()<=d||c.aa()<=d){var e=new a.i;e.K(c);c.ba()>d?e.P(0,-d):e.P(-d,0);var k=!1;c.ba()>d?b.y>e.C&&b.y<e.G&&(k=!0):b.x>e.v&&b.x<e.B&&(k=!0);return k}e=new a.i;e.K(c);e.P(-d,-d);return e.jl(b)};c.YL=function(b,a,d){return c.KA(b,
a,d)};c.ye=function(b,a,d){return c.rc(b,a,d)&&c.rc(a,b,d)};c.nj=function(b,c,d){var e=new a.i;e.K(c);e.P(d,d);return!b.jc(e)};c.kT=function(b,e,d){if(b.ba()<=d&&b.aa()<=d){var k=b.Af();return c.ax(k,e,d)}if(e.ba()<=d&&e.aa()<=d)return k=e.Af(),c.ax(k,b,d);b.ba()>d&&b.aa()>d&&(e.ba()<=d||e.aa()<=d)?k=e:(k=b,b=e);if(k.ba()<=d||k.aa()<=d){if(b.ba()<=d||b.aa()<=d){e=new a.yb;var h=new a.yb,f=[0,0],g=[0,0],l=new a.b;k.Yl(l);e.ed(l);k.Zl(l);e.vd(l);b.Yl(l);h.ed(l);b.Zl(l);h.vd(l);e.Ga(h,null,f,g,d);return 1!=
e.Ga(h,null,null,null,d)?!1:0==f[0]||1==f[1]||0==g[0]||1==g[1]}e=new a.i;h=new a.i;e.K(b);e.P(-d,-d);h.K(e);h.Ga(k);return!h.s()&&(h.ba()>d||h.aa()>d)?!1:!0}b.P(d,d);h=new a.i;h.K(k);h.Ga(b);return h.s()||!h.s()&&h.ba()>d&&h.aa()>d?!1:!0};c.fT=function(b,e,d){if(c.rc(b,e,d)||c.rc(e,b,d)||b.ba()<=d&&b.aa()<=d||e.ba()<=d&&e.aa()<=d)return!1;if(b.ba()<=d||b.aa()<=d){if(e.ba()>d&&e.aa()>d)return!1;var k=new a.yb,h=new a.yb,f=[0,0],g=[0,0],l=new a.b;b.Yl(l);k.ed(l);b.Zl(l);k.vd(l);e.Yl(l);h.ed(l);e.Zl(l);
h.vd(l);k.Ga(h,null,f,g,d);return 2!=k.Ga(h,null,null,null,d)?!1:(0<f[0]||1>f[1])&&(0<g[0]||1>g[1])}if(e.ba()<=d||e.aa()<=d)return!1;k=new a.i;k.K(b);k.Ga(e);return k.s()||k.ba()<=d||k.aa()<=d?!1:!0};c.Bz=function(b,e,d){if(!c.rc(b,e,d))return!1;if(b.ba()<=d&&b.aa()<=d)return b=b.Af(),c.bx(b,e,d);if(e.ba()<=d&&e.aa()<=d)return e=e.Af(),c.bx(e,b,d);if(b.ba()<=d||b.aa()<=d)return c.rc(b,e,d);if(e.ba()<=d||e.aa()<=d){var k=new a.i;k.K(b);k.P(-d,-d);if(k.jl(e))return!0;b=new a.i;b.K(k);b.Ga(e);return b.s()||
b.ba()<=d&&b.aa()<=d?!1:!0}return c.rc(b,e,d)};c.cT=function(b,e,d){if(c.rc(b,e,d)||c.rc(e,b,d)||b.ba()<=d&&b.aa()<=d||e.ba()<=d&&e.aa()<=d||e.ba()>d&&e.aa()>d&&b.ba()>d&&b.aa()>d)return!1;var k;b.ba()>d&&b.aa()>d?k=e:(k=b,b=e);if(b.ba()>d&&b.aa()>d){e=new a.i;var h=new a.i;h.K(b);h.P(-d,-d);e.K(h);e.Ga(k);return e.s()||e.ba()<=d&&e.aa()<=d?!1:!0}e=new a.yb;var h=new a.yb,f=[0,0],g=[0,0],l=new a.b;k.Yl(l);e.ed(l);k.Zl(l);e.vd(l);b.Yl(l);h.ed(l);b.Zl(l);h.vd(l);e.Ga(h,null,f,g,d);return 1!=e.Ga(h,
null,null,null,d)?!1:0<f[0]&&1>f[1]&&0<g[0]&&1>g[1]};c.ZC=function(b,c,d){var e,k,h=new a.i,f=new a.i,g=new a.cl(b,c,d,!0);if(!g.next())return!0;if(this.ED(b,c,d))return!1;var l;l=b;var m;m=null;1736==c.D()&&(m=c);var p=!1,q=!1;do{e=g.jk();k=g.ek();k=c.Fa(c.Ea(k));h.K(g.Fw());h.P(d,d);if(h.contains(k)&&(k=a.gd.he(l,k,0),0!=k)||1736==c.D()&&(e=b.Fa(b.Ea(e)),f.K(g.jw()),f.P(d,d),f.contains(e)&&(k=a.gd.he(m,e,0),0!=k)))return!1;p||(!a.ff.An(b,c.ea()-1)||null!=b.pb&&null!=b.pb.Ab?l=b:(l=new a.Ka,b.copyTo(l),
l.dj(1)),p=!0);1736!=c.D()||q||(q=c,!a.ff.An(q,b.ea()-1)||null!=c.pb&&null!=c.pb.Ab?m=c:(m=new a.Ka,q.copyTo(m),m.dj(1)),q=!0)}while(g.next());return!0};c.rc=function(b,c,d){var e=new a.i;e.K(b);e.P(d,d);return e.contains(c)};c.lm=function(b,c,d){var e=new a.i;e.K(c);e.P(d,d);c=new a.b;b.Yl(c);if(!e.contains(c))return!0;b.YE(c);if(!e.contains(c))return!0;b.aF(c);if(!e.contains(c))return!0;b.Zl(c);return e.contains(c)?!1:!0};c.jA=function(b,c,d){if(b.ea()!=c.ea()||b.F()!=c.F())return!1;var e=new a.b,
k=new a.b,h=!0;d*=d;for(var f=0;f<b.ea();f++){if(b.Dc(f)!=c.Dc(f)){h=!1;break}for(var g=b.Ea(f);g<c.Dc(f);g++)if(b.w(g,e),c.w(g,k),a.b.Zb(e,k)>d){h=!1;break}if(!h)break}return h?!0:!1};c.OI=function(b,c,d){if(b.F()!=c.F())return!1;var e=new a.b,k=new a.b,h=!0;d*=d;for(var f=0;f<b.F();f++)if(b.w(f,e),c.w(f,k),a.b.Zb(e,k)>d){h=!1;break}return h?!0:!1};c.Pw=function(b,c,d,h,f,g){var e=!1,k;b.F()>c.F()?(h&&(h=!1,e=!0),k=c):(k=b,b=c);c=null;if(f||g||e){c=new a.Wk(b.F());for(var n=0;n<b.F();n++)c.write(n,
0)}var n=new a.i,l=new a.i,m=new a.i;k.o(n);b.o(l);n.P(d,d);l.P(d,d);m.K(n);m.Ga(l);for(var l=new a.b,p=new a.b,u=!0,q=a.Ia.oB(b,m),r=q.Re(),v=d*d,x=0;x<k.F();x++)if(k.w(x,l),m.contains(l)){var w=!1;n.K(l.x,l.y,l.x,l.y);r.Ch(n,d);for(var y=r.next();-1!=y&&!(y=q.da(y),b.w(y,p),a.b.Zb(l,p)<=v&&((f||g||e)&&c.write(y,1),w=!0,h));y=r.next());if(!w&&(u=!1,f||h))return!1}else{if(f||h)return!1;u=!1}if(g&&u)return!1;if(h)return!0;for(n=0;n<b.F();n++)if(1==c.read(n)){if(g)return!0}else if(f||e)return!1;return g?
!1:!0};c.nA=function(b,c,d){var e;b.F()>c.F()?e=c:(e=b,b=c);c=new a.i;var k=new a.i,h=new a.i;e.o(c);b.o(k);c.P(d,d);k.P(d,d);h.K(c);h.Ga(k);for(var k=new a.b,f=new a.b,g=d*d,l=a.Ia.oB(b,h),m=l.Re(),p=0;p<e.F();p++)if(e.w(p,k),h.contains(k)){c.K(k.x,k.y,k.x,k.y);m.Ch(c,d);for(var q=m.next();-1!=q;q=m.next())if(b.w(l.da(q),f),a.b.Zb(k,f)<=g)return!0}return!1};c.Vv=function(b,a,d,h){return c.Wf(b,a,d,h)&&c.Wf(a,b,d,h)};c.Wf=function(b,e,k,h){function f(b,c){return q.IB(b,c)}var g=!0,n=[0,0],l=[0,0],
m=0,p=new a.ga(0),q=new c,r,v=new a.i,x=new a.i,w=new a.i;b.o(v);e.o(x);v.P(k,k);x.P(k,k);w.K(v);w.Ga(x);b=b.Ca();var x=e.Ca(),y=null,t=y=null,B=e.pb;null!=B?(y=B.Ab,t=B.nn,null==y&&(y=a.Ia.ij(e,w))):y=a.Ia.ij(e,w);e=y.Re();B=null;for(null!=t&&(B=t.Re());b.kb();)for(;b.La();){var z=!1,E=b.ia();E.o(v);if(!v.jc(w))return!1;if(null!=B&&(B.Ch(v,k),-1==B.next()))return g=!1;t=E.$b();e.Fn(E,k);for(r=e.next();-1!=r;r=e.next()){x.Sb(y.da(r));r=x.ia();var D=E.Ga(r,null,n,l,k);if(2==D&&(!h||l[0]<=l[1])){var D=
n[0],F=n[1],I=l[0],K=l[1];if(D*t<=k&&(1-F)*t<=k){z=!0;m=0;p.resize(0);q.Tg.length=0;for(var H=b.Jb(),I=!0;I;){if(b.La()){E=b.ia();t=E.$b();D=E.Ga(r,null,n,l,k);if(2==D&&(!h||l[0]<=l[1])&&(D=n[0],F=n[1],D*t<=k&&(1-F)*t<=k)){H=b.Jb();continue}if(x.La()&&(r=x.ia(),D=E.Ga(r,null,n,l,k),2==D&&(!h||l[0]<=l[1])&&(D=n[0],F=n[1],D*t<=k&&(1-F)*t<=k))){H=b.Jb();continue}}I=!1}H!=b.Jb()&&(b.Sb(H),b.ia());break}else H=b.Jb(),r=d.Oa(H,b.Qa,D,F,x.Jb(),x.Qa,I,K),q.Tg.push(r),p.add(p.size)}}if(!z){if(m==q.Tg.length)return!1;
1<p.size-m&&p.xd(m,p.size,f);for(z=0;m<q.Tg.length;m++)if(r=q.Tg[p.get(m)],!(r.Oi<z&&r.ji<z)){if(t*(r.Oi-z)>k)return!1;z=r.ji;if(t*(1-z)<=k||1==z)break}if(t*(1-z)>k)return!1;m=0;p.resize(0);q.Tg.length=0}}return g};c.iA=function(b,e,d){if(1>c.Zv(b,e,d,null))return!1;var k=new a.i,h=new a.i;b.o(k);e.o(h);var f=c.lm(k,h,d),k=c.lm(h,k,d);return f&&k?!0:f&&!k?!c.Wf(e,b,d,!1):k&&!f?!c.Wf(b,e,d,!1):!c.Wf(b,e,d,!1)&&!c.Wf(e,b,d,!1)};c.Zv=function(b,e,k,h){function f(b,c){return x.IB(b,c)}var g,n;b.Iw()>
e.Iw()?(g=e,n=b):(g=b,n=e);b=g.Ca();e=n.Ca();var l=[0,0],m=[0,0],p=-1,q=0,r,v=new a.ga(0),x=new c,w,y=new a.i,t=new a.i,B=new a.i;g.o(y);n.o(t);y.P(k,k);t.P(k,k);B.K(y);B.Ga(t);g=null;null!=h&&(g=new a.b);r=t=t=null;var z=n.pb;null!=z?(t=z.Ab,r=z.nn,null==t&&(t=a.Ia.ij(n,B))):t=a.Ia.ij(n,B);n=t.Re();z=null;for(null!=r&&(z=r.Re());b.kb();)for(r=0;b.La();){var E=b.ia();E.o(y);if(y.jc(B)&&(null==z||(z.Ch(y,k),-1!=z.next()))){var D=E.$b();n.Fn(E,k);for(var F=n.next();-1!=F;F=n.next()){var I=t.da(F);e.Sb(I);
w=e.ia();var K=w.$b(),H=E.Ga(w,null,l,m,k);if(0<H){var F=l[0],p=m[0],A=2==H?l[1]:NaN,P=2==H?m[1]:NaN;if(2==H){if(D*(A-F)>k)return p=1;var M=D*(A-F);if(e.La()){w=e.ia();H=E.Ga(w,null,l,null,k);if(2==H){var H=l[0],L=l[1],H=D*(L-H);if(M+H>k)return p=1}e.Sb(I);e.ia()}if(!e.wl()){e.oi();w=e.oi();H=E.Ga(w,null,l,null,k);if(2==H&&(H=l[0],L=l[1],H=D*(L-H),M+H>k))return p=1;e.Sb(I);e.ia()}if(b.La()){I=b.Jb();E=b.ia();H=E.Ga(w,null,l,null,k);if(2==H&&(H=l[0],L=l[1],H=D*(L-H),M+H>k))return p=1;b.Sb(I);b.ia()}if(!b.wl()){I=
b.Jb();b.oi();E=b.oi();H=E.Ga(w,null,l,null,k);if(2==H&&(H=l[0],L=l[1],H=K*(L-H),M+H>k))return p=1;b.Sb(I);b.ia()}w=d.Oa(b.Jb(),b.Qa,F,A,e.Jb(),e.Qa,p,P);x.Tg.push(w);v.add(v.size)}p=0;null!=h&&(E.Kb(F,g),h.add(g.x),h.add(g.y))}}if(q<x.Tg.length){v.xd(q,v.size,f);E=0;for(F=x.Tg[v.get(q)].Jl;q<x.Tg.length;q++)if(w=x.Tg[v.get(q)],!(w.Oi<E&&w.ji<E))if(D*(w.Oi-E)>k)r=D*(w.ji-w.Oi),E=w.ji,F=w.Jl;else{w.Jl!=F?(r=D*(w.ji-w.Oi),F=w.Jl):r+=D*(w.ji-w.Oi);if(r>k)return p=1;E=w.ji;if(1==E)break}D*(1-E)>k&&(r=
0);q=0;v.resize(0);x.Tg.length=0}}}return p};c.ED=function(b,c,d){var e=b.Ca(),k=c.Ca();for(b=new a.cl(b,c,d,!1);b.next();){c=b.jk();var h=b.ek();e.Sb(c);k.Sb(h);c=e.ia();if(0<k.ia().Ga(c,null,null,null,d))return!0}return!1};c.eA=function(b,c,d,h){var e=b.Ca(),k=new a.i,f=new a.i,g=new a.i;b.o(k);c.o(f);k.P(d,d);k.contains(f);f.P(d,d);g.K(k);g.Ga(f);k=b.pb;null!=k?(k=k.Ab,null==k&&(k=a.Ia.ij(b,g))):k=a.Ia.ij(b,g);b=k.Re();for(var n=new a.b,l=new a.b,m=d*d,p=0;p<c.F();p++)if(c.w(p,n),g.contains(n)){f.K(n.x,
n.y,n.x,n.y);b.Ch(f,d);for(var q=!1,r=b.next();-1!=r;r=b.next())if(e.Sb(k.da(r)),r=e.ia(),r.Kb(r.Gd(n,!1),l),a.b.Zb(l,n)<=m){q=!0;break}if(h){if(!q)return!1}else if(q)return!0}return h?!0:!1};c.ex=function(b,c,d){var e=new a.b,k=d*d,h=b.Ca();b=b.pb;if(null!=b&&(b=b.Ab,null!=b)){var f=new a.i;f.K(c);d=b.xw(f,d);for(f=d.next();-1!=f;f=d.next())if(h.Sb(b.da(f)),h.La()){var f=h.ia(),g=f.Gd(c,!1);f.Kb(g,e);if(a.b.Zb(c,e)<=k)return!0}return!1}for(b=new a.i;h.kb();)for(;h.La();)if(f=h.ia(),f.o(b),b.P(d,
d),b.contains(c)&&(g=f.Gd(c,!1),f.Kb(g,e),a.b.Zb(c,e)<=k))return!0;return!1};c.bA=function(b,a,d){return c.ex(b,a,d)&&!c.bw(b,a,d)};c.bw=function(b,a,d){b=b.Rf();return!c.or(b,a,d)};c.cA=function(b,c,d){if(b.Hm()){var e=new a.yb(c.v,c.C,c.v,c.G),k=new a.yb(c.v,c.G,c.B,c.G),h=new a.yb(c.B,c.G,c.B,c.C);c=new a.yb(c.B,c.C,c.v,c.C);for(b=b.Ca();b.kb();)for(;b.La();){var f=b.ia();if(f.jc(e,d)||f.jc(k,d)||f.jc(h,d)||f.jc(c,d))return!0}}else{e=new a.i;e.K(c);e.P(d,d);d=b.mc(0);k=new a.b;h=new a.b;c=new a.b;
for(var f=new a.b,g=0,l=b.ea();g<l;g++)for(var m=!0,p=b.Ea(g),q=b.Dc(g);p<q;p++)if(m)d.ec(2*p,h),m=!1;else{d.ec(2*p,k);c.J(h);f.J(k);if(0!=e.Nv(c,f))return!0;h.J(k)}}return!1};c.fc=function(b,e,d){var k=b.D(),h=e.D();if(a.T.Th(k)){var f=b.pb;if(null!=f&&(f=f.hi,null!=f))if(33==h){var g=e.w(),g=f.Kk(g.x,g.y);if(1==g)return 1;if(0==g)return 4}else{g=new a.i;e.o(g);g=f.Dn(g);if(1==g)return 1;if(0==g)return 4;if(d&&a.T.Th(h)&&c.zz(e,f))return 1073741824}}if(a.T.Th(h)&&(f=e.pb,null!=f&&(f=f.hi,null!=f)))if(33==
k){b=b.w();g=f.Kk(b.x,b.y);if(1==g)return 2;if(0==g)return 4}else{e=new a.i;b.o(e);g=f.Dn(e);if(1==g)return 2;if(0==g)return 4;if(d&&a.T.Th(k)&&c.zz(b,f))return 1073741824}return 0};c.zz=function(b,c){for(var e=b.F(),d=new a.b,h=0;h<e;h++)if(b.w(h,d),1==c.Kk(d.x,d.y))return!0;return!1};c.AE=function(b,c,d,h){for(var e=1<=b.rj(0)&&1<=c.rj(0),k=b.Ca(),f=c.Ca(),g=[0,0],n=[0,0],l=new a.cl(b,c,d,!1),m=!1;l.next();){var p=l.jk(),q=l.ek();k.Sb(p);f.Sb(q);p=k.ia();q=f.ia().Ga(p,null,n,g,d);if(2==q){m=g[0];
q=g[1];p=p.$b();if(e&&(q-m)*p>d)return!1;m=!0}else if(0!=q){m=g[0];p=n[0];if(0<m&&1>m&&0<p&&1>p)return!1;m=!0}}if(!m)return!1;k=new a.i;f=new a.i;e=new a.i;b.o(k);c.o(f);k.P(1E3*d,1E3*d);f.P(1E3*d,1E3*d);e.K(k);e.Ga(f);return 10<b.F()&&(b=a.Ed.clip(b,e,d,0),b.s())||10<c.F()&&(c=a.Ed.clip(c,e,d,0),c.s())?!1:a.el.vr(b,c,d,"F********",h)};c.wD=function(b,e,d,h){var k=1<=b.rj(0)&&1<=e.rj(0),f=new a.i,g=new a.i,n=new a.i;b.o(f);e.o(g);for(var l=!1,m=c.lm(f,g,d),p=c.lm(g,f,d),q=b.Ca(),r=e.Ca(),v=[0,0],
x=[0,0],w=new a.cl(b,e,d,!1);w.next();){var y=w.jk(),t=w.ek();q.Sb(y);r.Sb(t);t=q.ia();y=r.ia().Ga(t,null,x,v,d);if(2==y){var y=v[0],B=v[1],t=t.$b();if(k&&(B-y)*t>d&&(l=!0,m&&p))return!0}else if(0!=y&&(y=v[0],t=x[0],0<y&&1>y&&0<t&&1>t))return!0}k=new a.i;q=new a.i;k.K(f);k.P(1E3*d,1E3*d);q.K(g);q.P(1E3*d,1E3*d);n.K(k);n.Ga(q);f="";f=l?f+"**":f+"T*";if(m){if(10<e.F()&&(e=a.Ed.clip(e,n,d,0),e.s()))return!1;f+="****"}else f+="T***";if(p){if(10<b.F()&&(b=a.Ed.clip(b,n,d,0),b.s()))return!1;f+="***"}else f+=
"T**";return a.el.vr(b,e,d,f.toString(),h)};c.bC=function(b,e,d,h){var k=[!1],f=c.wB(b,e,d,k);if(k[0])return f;k=new a.i;e.o(k);k.P(1E3*d,1E3*d);return 10<b.F()&&(b=a.Ed.clip(b,k,d,0),b.s())?!1:a.el.su(b,e,d,h)};c.wB=function(b,c,d,h){h[0]=!1;for(var e=b.Ca(),k=c.Ca(),f=[0,0],g=[0,0],n=new a.cl(b,c,d,!1),l=!1;n.next();){var m=n.jk(),p=n.ek();e.Sb(m,-1);k.Sb(p,-1);m=e.ia();m=k.ia().Ga(m,null,g,f,d);if(0!=m&&(l=!0,1==m&&(m=f[0],p=g[0],0<m&&1>m&&0<p&&1>p)))return h[0]=!0,!1}if(!l){h[0]=!0;f=new a.i;
b.o(f);f.P(d,d);n=b;l=!1;g=new a.i;h=0;for(e=c.ea();h<e;h++)if(0<c.Ha(h)){c.Ti(h,g);if(f.jc(g)){if(k=c.Fa(c.Ea(h)),k=a.ff.xl(n,k,0),0==k)return!1}else return!1;l||(!a.ff.An(b,c.ea()-1)||null!=b.pb&&null!=b.pb.Ab?n=b:(k=new a.Ka,b.copyTo(k),k.dj(1),n=k),l=!0)}if(1==b.ea()||1607==c.D())return!0;f=new a.i;c.o(f);f.P(d,d);g=c;n=!1;d=new a.i;h=0;for(e=b.ea();h<e;h++)if(0<b.Ha(h)){b.Ti(h,d);if(f.jc(d)&&(k=b.Fa(b.Ea(h)),k=a.ff.xl(g,k,0),1==k))return!1;n||(!a.ff.An(c,b.ea()-1)||null!=c.pb&&null!=c.pb.Ab?
g=c:(k=new a.Ka,c.copyTo(k),k.dj(1),g=k),n=!0)}return!0}return!1};c.CE=function(b,c,d,h){for(var e=b.Ca(),k=c.Ca(),f=[0,0],g=[0,0],n=new a.cl(b,c,d,!1),l=!1;n.next();){var m=n.jk(),p=n.ek();e.Sb(m);k.Sb(p);m=e.ia();m=k.ia().Ga(m,null,g,f,d);if(2==m)l=!0;else if(0!=m){l=f[0];m=g[0];if(0<l&&1>l&&0<m&&1>m)return!1;l=!0}}if(!l)return!1;k=new a.i;f=new a.i;e=new a.i;b.o(k);c.o(f);k.P(1E3*d,1E3*d);f.P(1E3*d,1E3*d);e.K(k);e.Ga(f);return 10<b.F()&&(b=a.Ed.clip(b,e,d,0),b.s())||10<c.F()&&(c=a.Ed.clip(c,e,
d,0),c.s())?!1:a.el.Vl(b,c,d,"F********",h)};c.YC=function(b,e,d,h){for(var k=b.Ca(),f=e.Ca(),g=[0,0],n=[0,0],l=new a.cl(b,e,d,!1),m=!1;l.next();){var p=l.jk(),q=l.ek();k.Sb(p);f.Sb(q);p=k.ia();p=f.ia().Ga(p,null,n,g,d);if(2==p)m=!0;else if(0!=p){m=g[0];p=n[0];if(0<m&&1>m&&0<p&&1>p)return!0;m=!0}}if(!m)return!1;f=new a.i;g=new a.i;n=new a.i;l=new a.i;k=new a.i;b.o(f);e.o(g);return c.lm(g,f,d)?(n.K(f),n.P(1E3*d,1E3*d),l.K(g),l.P(1E3*d,1E3*d),k.K(n),k.Ga(l),10<b.F()&&(b=a.Ed.clip(b,k,d,0),b.s())||10<
e.F()&&(e=a.Ed.clip(e,k,d,0),e.s())?!1:d=a.el.Vl(b,e,d,"T********",h)):d=a.el.Vl(b,e,d,"T*****T**",h)};c.jC=function(b,e,d,h){var k=[!1],f=c.wB(b,e,d,k);if(k[0])return f;k=new a.i;e.o(k);k.P(1E3*d,1E3*d);return 10<b.F()&&(b=a.Ed.clip(b,k,d,0),b.s())?!1:a.el.dy(b,e,d,h)};c.YB=function(b,c,d){return 1==a.gd.he(b,c,d)?!0:!1};c.yD=function(b,c,d){return 2==a.gd.he(b,c,d)?!0:!1};c.or=function(b,c,d){var e=new a.b;d*=d;for(var k=0;k<b.F();k++)if(b.w(k,e),a.b.Zb(e,c)<=d)return!1;return!0};c.prototype.IB=
function(b,c){b=this.Tg[b];c=this.Tg[c];return b.Jl<c.Jl||b.Jl==c.Jl&&(b.Wt<c.Wt||b.Wt==c.Wt&&(b.Oi<c.Oi||b.Oi==c.Oi&&(b.ji<c.ji||b.ji==c.ji&&b.dE<c.dE)))?-1:1};return c}();a.hd=h})(z||(z={}));(function(a){var d;(function(c){c[c.InteriorInterior=0]="InteriorInterior";c[c.InteriorBoundary=1]="InteriorBoundary";c[c.InteriorExterior=2]="InteriorExterior";c[c.BoundaryInterior=3]="BoundaryInterior";c[c.BoundaryBoundary=4]="BoundaryBoundary";c[c.BoundaryExterior=5]="BoundaryExterior";c[c.ExteriorInterior=
6]="ExteriorInterior";c[c.ExteriorBoundary=7]="ExteriorBoundary";c[c.ExteriorExterior=8]="ExteriorExterior"})(d||(d={}));var h;(function(c){c[c.AreaAreaPredicates=0]="AreaAreaPredicates";c[c.AreaLinePredicates=1]="AreaLinePredicates";c[c.LineLinePredicates=2]="LineLinePredicates";c[c.AreaPointPredicates=3]="AreaPointPredicates";c[c.LinePointPredicates=4]="LinePointPredicates";c[c.PointPointPredicates=5]="PointPointPredicates"})(h||(h={}));d=function(){function c(){this.Xd=0;this.h=new a.gs;this.A=
[0,0,0,0,0,0,0,0,0];this.Ta=[0,0,0,0,0,0,0,0,0];this.Y=[!1,!1,!1,!1,!1,!1,!1,!1,!1];this.Nl=this.$t=-1}c.py=function(b,c,d,h,f){if(9!=h.length)throw a.g.ra("relation string length has to be 9 characters");for(var e=0;9>e;e++){var k=h.charAt(e);if("*"!=k&&"T"!=k&&"F"!=k&&"0"!=k&&"1"!=k&&"2"!=k)throw a.g.ra("relation string");}e=this.YN(h,b.fb(),c.fb());if(0!=e)return a.hd.qy(b,c,d,e,f);e=new a.i;b.o(e);k=new a.i;c.o(k);var g=new a.i;g.K(e);g.Db(k);d=a.Ia.zd(d,g,!1);b=this.NB(b,d);c=this.NB(c,d);if(b.s()||
c.s())return this.rR(b,c,h);e=c.D();k=!1;switch(b.D()){case 1736:switch(e){case 1736:k=this.vr(b,c,d,h,f);break;case 1607:k=this.Vl(b,c,d,h,f);break;case 33:k=this.ur(b,c,d,h,f);break;case 550:k=this.tr(b,c,d,h,f)}break;case 1607:switch(e){case 1736:k=this.Vl(c,b,d,this.Lo(h),f);break;case 1607:k=this.ey(b,c,d,h,f);break;case 33:k=this.xr(b,c,d,h,f);break;case 550:k=this.wr(b,c,d,h,f)}break;case 33:switch(e){case 1736:k=this.ur(c,b,d,this.Lo(h),f);break;case 1607:k=this.xr(c,b,d,this.Lo(h),f);break;
case 33:k=this.KQ(b,c,d,h);break;case 550:k=this.pr(c,b,d,this.Lo(h),f)}break;case 550:switch(e){case 1736:k=this.tr(c,b,d,this.Lo(h),f);break;case 1607:k=this.wr(c,b,d,this.Lo(h),f);break;case 550:k=this.Wx(b,c,d,h,f);break;case 33:k=this.pr(b,c,d,h,f)}break;default:k=!1}return k};c.vr=function(b,e,d,h,f){var k=new c;k.pi();k.si(h);k.vF();var g=new a.i,n=new a.i;b.o(g);e.o(n);h=!1;a.hd.nj(g,n,d)&&(k.Bs(b,e),h=!0);h||(g=a.hd.fc(b,e,!1),4==g?(k.Bs(b,e),h=!0):1==g?(k.Bv(e),h=!0):2==g&&(k.$A(b),h=!0));
h||(h=new a.fd,b=h.Eb(b),e=h.Eb(e),k.In(h,d,f),k.so(b,e),k.h.xg());return c.Mf(k.A,k.Hc)};c.su=function(b,e,d,h){var k=new c;k.pi();k.si("T*****F**");k.vF();var f=new a.i,g=new a.i;b.o(f);e.o(g);var n=!1;a.hd.nj(f,g,d)&&(k.Bs(b,e),n=!0);n||(f=a.hd.fc(b,e,!1),4==f?(k.Bs(b,e),n=!0):1==f?(k.Bv(e),n=!0):2==f&&(k.$A(b),n=!0));if(n)return f=this.Mf(k.A,k.Hc);n=new a.fd;b=n.Eb(b);f=n.Eb(e);a.aj.$(n,d,h,!1);d=n.hf(f).Rf();n.xo(0,!0,!0);a.mm.$(n,b,-1,!1,h);if(0==n.F(b))return!1;a.mm.$(n,f,-1,!1,h);k.Op(n,
h);e=0==n.F(f);if(!e&&(k.so(b,f),k.h.xg(),f=this.Mf(k.A,k.Hc),!f))return f;b=n.hf(b);n=new a.fd;b=n.Eb(b);f=n.Eb(d);k.Op(n,h);k.Xd=0;k.pi();k.si(e?"T*****F**":"******F**");k.wy();k.so(b,f);k.h.xg();return f=this.Mf(k.A,k.Hc)};c.Vl=function(b,e,d,h,f){var k=new c;k.pi();k.si(h);k.wy();var g=new a.i,n=new a.i;b.o(g);e.o(n);h=!1;a.hd.nj(g,n,d)&&(k.Cs(b,e),h=!0);h||(g=a.hd.fc(b,e,!1),4==g?(k.Cs(b,e),h=!0):1==g&&(k.aB(e),h=!0));h||(h=new a.fd,b=h.Eb(b),e=h.Eb(e),k.In(h,d,f),k.Jg=k.h.uo(),c.es(e,k.h,k.Jg),
k.so(b,e),k.h.vo(k.Jg),k.h.xg());return c.Mf(k.A,k.Hc)};c.dy=function(b,e,d,h){var k=new c;k.pi();k.si("T*****F**");k.wy();var f=new a.i,g=new a.i;b.o(f);e.o(g);var n=!1;a.hd.nj(f,g,d)&&(k.Cs(b,e),n=!0);n||(f=a.hd.fc(b,e,!1),4==f?(k.Cs(b,e),n=!0):1==f&&(k.aB(e),n=!0));if(n)return d=this.Mf(k.A,k.Hc);n=new a.fd;b=n.Eb(b);e=n.Eb(e);k.In(n,d,h);if(0==n.F(b))return!1;k.so(b,e);k.h.xg();return d=this.Mf(k.A,k.Hc)};c.tr=function(b,e,d,h,f){var k=new c;k.pi();k.si(h);k.wF();var g=new a.i,n=new a.i;b.o(g);
e.o(n);h=!1;a.hd.nj(g,n,d)&&(k.Ds(b),h=!0);h||(g=a.hd.fc(b,e,!1),4==g?(k.Ds(b),h=!0):1==g&&(k.cK(),h=!0));h||(h=new a.fd,b=h.Eb(b),e=h.Eb(e),k.In(h,d,f),k.Pv(b,e),k.h.xg());return c.Mf(k.A,k.Hc)};c.ey=function(b,e,d,h,f){var k=new c;k.pi();k.si(h);k.ZR();h=new a.i;var g=new a.i;b.o(h);e.o(g);var n=!1;a.hd.nj(h,g,d)&&(k.CD(b,e),n=!0);n||4!=a.hd.fc(b,e,!1)||(k.CD(b,e),n=!0);n||(h=new a.fd,b=h.Eb(b),e=h.Eb(e),k.In(h,d,f),k.ph=k.h.uo(),k.Jg=k.h.uo(),c.es(b,k.h,k.ph),c.es(e,k.h,k.Jg),k.so(b,e),k.h.vo(k.ph),
k.h.vo(k.Jg),k.h.xg());return c.Mf(k.A,k.Hc)};c.wr=function(b,e,d,h,f){var k=new c;k.pi();k.si(h);k.KF();h=new a.i;var g=new a.i;b.o(h);e.o(g);var n=!1;a.hd.nj(h,g,d)&&(k.dx(b),n=!0);n||4!=a.hd.fc(b,e,!1)||(k.dx(b),n=!0);n||(h=new a.fd,b=h.Eb(b),e=h.Eb(e),k.In(h,d,f),k.ph=k.h.uo(),c.es(b,k.h,k.ph),k.Pv(b,e),k.h.vo(k.ph),k.h.xg());return c.Mf(k.A,k.Hc)};c.Wx=function(b,e,d,h,f){var k=new c;k.pi();k.si(h);k.PF();h=new a.i;var g=new a.i;b.o(h);e.o(g);var n=!1;a.hd.nj(h,g,d)&&(k.PE(),n=!0);n||(h=new a.fd,
b=h.Eb(b),e=h.Eb(e),k.In(h,d,f),k.Pv(b,e),k.h.xg());return c.Mf(k.A,k.Hc)};c.ur=function(b,e,d,h){var k=new c;k.pi();k.si(h);k.wF();var f=new a.i;b.o(f);e=e.w();var g=!1;a.hd.ru(e,f,d)&&(k.Ds(b),g=!0);g||(d=a.gd.he(b,e,d),1==d?(k.A[0]=0,k.A[2]=2,k.A[3]=-1,k.A[5]=1,k.A[6]=-1):2==d?(k.A[6]=-1,0!=b.Mh()?(k.A[0]=-1,k.A[3]=0,k.A[2]=2,k.A[5]=1):(k.A[0]=0,k.A[3]=-1,k.A[5]=-1,d=new a.i,b.o(d),k.A[2]=0==d.ba()&&0==d.aa()?-1:1)):k.Ds(b));return this.Mf(k.A,h)};c.xr=function(b,e,d,h,f){var k=new c;k.pi();k.si(h);
k.KF();var g=new a.i;b.o(g);h=e.w();var n=!1;a.hd.ru(h,g,d)&&(k.dx(b),n=!0);if(!n){var g=null,l=n=!1;if(k.Y[0]||k.Y[6])a.hd.ex(b,h,d)?(k.Y[0]&&(g=a.Hh.il(b,f),l=!a.hd.or(g,h,d),n=!0,k.A[0]=l?-1:0),k.A[6]=-1):(k.A[0]=-1,k.A[6]=0);k.Y[3]&&(null!=g&&g.s()?k.A[3]=-1:(n||(null==g&&(g=a.Hh.il(b,f)),l=!a.hd.or(g,h,d),n=!0),k.A[3]=l?0:-1));k.Y[5]&&(null!=g&&g.s()?k.A[5]=-1:n&&!l?k.A[5]=0:(null==g&&(g=a.Hh.il(b,f)),f=a.hd.mu(g,e,d),k.A[5]=f?-1:0));k.Y[2]&&(0!=b.$b()?k.A[2]=1:(f=new a.pe(b.description),f.Pd(b,
0,b.F()),b=a.hd.mu(f,e,d),k.A[2]=b?-1:0))}return this.Mf(k.A,k.Hc)};c.pr=function(b,e,d,h){var k=new c;k.pi();k.si(h);k.PF();var f=new a.i;b.o(f);e=e.w();var g=!1;a.hd.ru(e,f,d)&&(k.PE(),g=!0);if(!g){f=!1;g=!0;d*=d;for(var n=0;n<b.F();n++){var l=b.Fa(n);a.b.Zb(l,e)<=d?f=!0:g=!1;if(f&&!g)break}f?(k.A[0]=0,k.A[2]=g?-1:0,k.A[6]=-1):(k.A[0]=-1,k.A[2]=0,k.A[6]=0)}return c.Mf(k.A,h)};c.KQ=function(b,e,d,h){b=b.w();e=e.w();for(var k=[],f=0;9>f;f++)k[f]=-1;a.b.Zb(b,e)<=d*d?k[0]=0:(k[2]=0,k[6]=0);k[8]=2;return c.Mf(k,
h)};c.Mf=function(b,c){for(var a=0;9>a;a++)switch(c.charAt(a)){case "T":if(-1==b[a])return!1;break;case "F":if(-1!=b[a])return!1;break;case "0":if(0!=b[a])return!1;break;case "1":if(1!=b[a])return!1;break;case "2":if(2!=b[a])return!1}return!0};c.rR=function(b,c,d){var e=[-1,-1,-1,-1,-1,-1,-1,-1,-1];if(b.s()&&c.s()){for(var k=0;9>k;k++)e[k]=-1;return this.Mf(e,d)}k=!1;b.s()&&(b=c,k=!0);e[0]=-1;e[1]=-1;e[3]=-1;e[4]=-1;e[6]=-1;e[7]=-1;e[8]=2;c=b.D();a.T.Kc(c)?1736==c?0!=b.Mh()?(e[2]=2,e[5]=1):(e[5]=
-1,c=new a.i,b.o(c),e[2]=0==c.ba()&&0==c.aa()?0:1):(c=0!=b.$b(),e[2]=c?1:0,e[5]=a.Hh.No(b)?0:-1):(e[2]=0,e[5]=-1);k&&this.qG(e);return this.Mf(e,d)};c.YN=function(b,a,d){return c.mT(b)?3:c.NS(b)?4:c.nT(b,a,d)?8:c.CR(b,a,d)?16:c.yQ(b)?1:c.LK(b,a,d)?32:0};c.mT=function(b){return"T"==b.charAt(0)&&"*"==b.charAt(1)&&"F"==b.charAt(2)&&"*"==b.charAt(3)&&"*"==b.charAt(4)&&"F"==b.charAt(5)&&"F"==b.charAt(6)&&"F"==b.charAt(7)&&"*"==b.charAt(8)?!0:!1};c.NS=function(b){return"F"==b.charAt(0)&&"F"==b.charAt(1)&&
"*"==b.charAt(2)&&"F"==b.charAt(3)&&"F"==b.charAt(4)&&"*"==b.charAt(5)&&"*"==b.charAt(6)&&"*"==b.charAt(7)&&"*"==b.charAt(8)?!0:!1};c.nT=function(b,c,a){if(0==c&&0==a)return!1;if(2!=c||2!=a)if("F"==b.charAt(0)&&"*"==b.charAt(1)&&"*"==b.charAt(2)&&"T"==b.charAt(3)&&"*"==b.charAt(4)&&"*"==b.charAt(5)&&"*"==b.charAt(6)&&"*"==b.charAt(7)&&"*"==b.charAt(8)||1==c&&1==a&&"F"==b.charAt(0)&&"T"==b.charAt(1)&&"*"==b.charAt(2)&&"*"==b.charAt(3)&&"*"==b.charAt(4)&&"*"==b.charAt(5)&&"*"==b.charAt(6)&&"*"==b.charAt(7)&&
"*"==b.charAt(8))return!0;return 0!=a&&"F"==b.charAt(0)&&"*"==b.charAt(1)&&"*"==b.charAt(2)&&"*"==b.charAt(3)&&"T"==b.charAt(4)&&"*"==b.charAt(5)&&"*"==b.charAt(6)&&"*"==b.charAt(7)&&"*"==b.charAt(8)?!0:!1};c.CR=function(b,c,a){return c>a?"T"==b.charAt(0)&&"*"==b.charAt(1)&&"*"==b.charAt(2)&&"*"==b.charAt(3)&&"*"==b.charAt(4)&&"*"==b.charAt(5)&&"T"==b.charAt(6)&&"*"==b.charAt(7)&&"*"==b.charAt(8)?!0:!1:1==c&&1==a&&"0"==b.charAt(0)&&"*"==b.charAt(1)&&"*"==b.charAt(2)&&"*"==b.charAt(3)&&"*"==b.charAt(4)&&
"*"==b.charAt(5)&&"*"==b.charAt(6)&&"*"==b.charAt(7)&&"*"==b.charAt(8)?!0:!1};c.yQ=function(b){return"T"==b.charAt(0)&&"*"==b.charAt(1)&&"*"==b.charAt(2)&&"*"==b.charAt(3)&&"*"==b.charAt(4)&&"*"==b.charAt(5)&&"F"==b.charAt(6)&&"F"==b.charAt(7)&&"*"==b.charAt(8)?!0:!1};c.LK=function(b,c,a){if(c==a){if(1!=c)return"T"==b.charAt(0)&&"*"==b.charAt(1)&&"T"==b.charAt(2)&&"*"==b.charAt(3)&&"*"==b.charAt(4)&&"*"==b.charAt(5)&&"T"==b.charAt(6)&&"*"==b.charAt(7)&&"*"==b.charAt(8)?!0:!1;if("1"==b.charAt(0)&&
"*"==b.charAt(1)&&"T"==b.charAt(2)&&"*"==b.charAt(3)&&"*"==b.charAt(4)&&"*"==b.charAt(5)&&"T"==b.charAt(6)&&"*"==b.charAt(7)&&"*"==b.charAt(8))return!0}return!1};c.es=function(b,c,a){b=c.ya(b);for(var e=c.Be;-1!=e;e=c.Bf(e))if(0!=(c.md(e)&b)){var d=c.te(e);if(-1==d)c.fm(e,a,0);else{var k=d,h=0;do 0!=(c.Gg(k)&b)&&h++,k=c.Wb(c.sa(k));while(k!=d);c.fm(e,a,h)}}};c.Lo=function(b){var c;c=""+b.charAt(0);c+=b.charAt(3);c+=b.charAt(6);c+=b.charAt(1);c+=b.charAt(4);c+=b.charAt(7);c+=b.charAt(2);c+=b.charAt(5);
return c+=b.charAt(8)};c.prototype.pi=function(){for(var b=0;9>b;b++)this.A[b]=-2,this.Ta[b]=-2};c.qG=function(b){var c=b[1],a=b[2],d=b[5];b[1]=b[3];b[2]=b[6];b[5]=b[7];b[3]=c;b[6]=a;b[7]=d};c.prototype.si=function(b){this.Hc=b;for(b=0;9>b;b++)"*"!=this.Hc.charAt(b)?(this.Y[b]=!0,this.Xd++):this.Y[b]=!1};c.prototype.SF=function(){for(var b=0;9>b;b++)this.Y[b]&&-2==this.A[b]&&(this.A[b]=-1,this.Y[b]=!1)};c.prototype.dc=function(b){if(-2==this.A[b])return!1;if(-1==this.A[b])return this.Y[b]=!1,this.Xd--,
!0;if("T"!=this.Hc.charAt(b)&&"F"!=this.Hc.charAt(b)){if(this.A[b]<this.Ta[b])return!1;this.Y[b]=!1;this.Xd--;return!0}this.Y[b]=!1;this.Xd--;return!0};c.prototype.vF=function(){this.$t=0;this.Ta[0]=2;this.Ta[1]=1;this.Ta[2]=2;this.Ta[3]=1;this.Ta[4]=1;this.Ta[5]=1;this.Ta[6]=2;this.Ta[7]=1;this.Ta[8]=2;this.Y[8]&&(this.A[8]=2,this.Y[8]=!1,this.Xd--)};c.prototype.wy=function(){this.$t=1;this.Nl=3;this.Ta[0]=1;this.Ta[1]=0;this.Ta[2]=2;this.Ta[3]=1;this.Ta[4]=0;this.Ta[5]=1;this.Ta[6]=1;this.Ta[7]=
0;this.Ta[8]=2;this.Y[8]&&(this.A[8]=2,this.Y[8]=!1,this.Xd--)};c.prototype.ZR=function(){this.$t=2;this.Nl=4;this.Ta[0]=1;this.Ta[1]=0;this.Ta[2]=1;this.Ta[3]=0;this.Ta[4]=0;this.Ta[5]=0;this.Ta[6]=1;this.Ta[7]=0;this.Ta[8]=2;this.Y[8]&&(this.A[8]=2,this.Y[8]=!1,this.Xd--)};c.prototype.wF=function(){this.Nl=3;this.Ta[0]=0;this.Ta[1]=-1;this.Ta[2]=2;this.Ta[3]=0;this.Ta[4]=-1;this.Ta[5]=1;this.Ta[6]=0;this.Ta[7]=-1;this.Ta[8]=2;this.Y[1]&&(this.A[1]=-1,this.Y[1]=!1,this.Xd--);this.Y[4]&&(this.A[4]=
-1,this.Y[4]=!1,this.Xd--);this.Y[7]&&(this.A[7]=-1,this.Y[7]=!1,this.Xd--);this.Y[8]&&(this.A[8]=2,this.Y[8]=!1,this.Xd--)};c.prototype.KF=function(){this.Nl=4;this.Ta[0]=0;this.Ta[1]=-1;this.Ta[2]=1;this.Ta[3]=0;this.Ta[4]=-1;this.Ta[5]=0;this.Ta[6]=0;this.Ta[7]=-1;this.Ta[8]=2;this.Y[1]&&(this.A[1]=-1,this.Y[1]=!1,this.Xd--);this.Y[4]&&(this.A[4]=-1,this.Y[4]=!1,this.Xd--);this.Y[7]&&(this.A[7]=-1,this.Y[7]=!1,this.Xd--);this.Y[8]&&(this.A[8]=2,this.Y[8]=!1,this.Xd--)};c.prototype.PF=function(){this.Nl=
5;this.Ta[0]=0;this.Ta[1]=-1;this.Ta[2]=0;this.Ta[3]=-1;this.Ta[4]=-1;this.Ta[5]=-1;this.Ta[6]=0;this.Ta[7]=-1;this.Ta[8]=2;this.Y[1]&&(this.A[1]=-1,this.Y[1]=!1,this.Xd--);this.Y[3]&&(this.A[3]=-1,this.Y[3]=!1,this.Xd--);this.Y[4]&&(this.A[4]=-1,this.Y[4]=!1,this.Xd--);this.Y[5]&&(this.A[5]=-1,this.Y[5]=!1,this.Xd--);this.Y[7]&&(this.A[7]=-1,this.Y[7]=!1,this.Xd--);this.Y[8]&&(this.A[8]=2,this.Y[8]=!1,this.Xd--)};c.prototype.aK=function(b,c,a){var e=!0;this.Y[0]&&(this.HO(b,c,a),e=e&&this.dc(0));
this.Y[1]&&(this.eD(b,c,1),e=e&&this.dc(1));this.Y[2]&&(this.fD(b,c,a,2),e=e&&this.dc(2));this.Y[3]&&(this.eD(b,a,3),e=e&&this.dc(3));this.Y[4]&&(this.gK(b,c,a),e=e&&this.dc(4));this.Y[5]&&(this.eB(b,a,5),e=e&&this.dc(5));this.Y[6]&&(this.fD(b,a,c,6),e=e&&this.dc(6));this.Y[7]&&(this.eB(b,c,7),e=e&&this.dc(7));return e};c.prototype.Bs=function(b,c){this.A[0]=-1;this.A[1]=-1;this.A[3]=-1;this.A[4]=-1;this.iq(b,this.Y[2]?2:-1,this.Hc.charAt(2),this.Y[5]?5:-1,this.Hc.charAt(5));this.iq(c,this.Y[6]?6:
-1,this.Hc.charAt(6),this.Y[7]?7:-1,this.Hc.charAt(7))};c.prototype.iq=function(b,c,d,h,f){if(-1!=c||-1!=h)("T"!=d&&"F"!=d&&-1!=c||"T"!=f&&"F"!=f&&-1!=h?0!=b.Mh():1)?(-1!=c&&(this.A[c]=2),-1!=h&&(this.A[h]=1)):(-1!=h&&(this.A[h]=-1),-1!=c&&(d=new a.i,b.o(d),this.A[c]=0==d.ba()&&0==d.aa()?0:1))};c.prototype.Bv=function(b){this.A[2]=2;this.A[3]=-1;this.A[4]=-1;this.A[5]=1;this.A[6]=-1;this.A[7]=-1;this.iq(b,this.Y[0]?0:-1,this.Hc.charAt(0),this.Y[1]?1:-1,this.Hc.charAt(1))};c.prototype.$A=function(b){this.Bv(b);
c.qG(this.A)};c.prototype.Cs=function(b,c){this.A[0]=-1;this.A[1]=-1;this.A[3]=-1;this.A[4]=-1;if(this.Y[6]){var e=this.Hc.charAt(6),e="T"!=e&&"F"!=e?0!=c.$b():!0;this.A[6]=e?1:0}this.Y[7]&&(e=a.Hh.No(c),this.A[7]=e?0:-1);this.iq(b,this.Y[2]?2:-1,this.Hc.charAt(2),this.Y[5]?5:-1,this.Hc.charAt(5))};c.prototype.aB=function(b){if(this.Y[0]){var c=this.Hc.charAt(0),c="T"!=c&&"F"!=c?0!=b.$b():!0;this.A[0]=c?1:0}this.Y[1]&&(b=a.Hh.No(b),this.A[1]=b?0:-1);this.A[2]=2;this.A[3]=-1;this.A[4]=-1;this.A[5]=
1;this.A[6]=-1;this.A[7]=-1};c.prototype.Ds=function(b){this.A[0]=-1;this.A[3]=-1;this.A[6]=0;this.iq(b,this.Y[2]?2:-1,this.Hc.charAt(2),this.Y[5]?5:-1,this.Hc.charAt(5))};c.prototype.cK=function(){this.A[0]=0;this.A[2]=2;this.A[3]=-1;this.A[5]=1;this.A[6]=-1};c.prototype.CD=function(b,c){this.A[0]=-1;this.A[1]=-1;this.A[3]=-1;this.A[4]=-1;if(this.Y[2]){var e=this.Hc.charAt(2),e="T"!=e&&"F"!=e?0!=b.$b():!0;this.A[2]=e?1:0}this.Y[5]&&(e=a.Hh.No(b),this.A[5]=e?0:-1);this.Y[6]&&(e=this.Hc.charAt(6),
e="T"!=e&&"F"!=e?0!=c.$b():!0,this.A[6]=e?1:0);this.Y[7]&&(e=a.Hh.No(c),this.A[7]=e?0:-1)};c.prototype.dx=function(b){this.A[0]=-1;this.A[3]=-1;if(this.Y[2]){var c=this.Hc.charAt(2),c="T"!=c&&"F"!=c?0!=b.$b():!0;this.A[2]=c?1:0}this.Y[5]&&(b=a.Hh.No(b),this.A[5]=b?0:-1);this.A[6]=0};c.prototype.PE=function(){this.A[0]=-1;this.A[2]=0;this.A[6]=0};c.prototype.bK=function(b,c,a){var e=!0;this.Y[0]&&(this.IO(b,c),e=e&&this.dc(0));this.Y[1]&&(this.EO(b,c,a,this.Jg),e=e&&this.dc(1));this.Y[2]&&(this.FO(b,
c),e=e&&this.dc(2));this.Y[3]&&(this.kK(b,c,a,this.Jg),e=e&&this.dc(3));this.Y[4]&&(this.hK(b,c,a,this.Jg),e=e&&this.dc(4));this.Y[5]&&(this.iK(b,c,a),e=e&&this.dc(5));this.Y[6]&&(this.BM(b,c),e=e&&this.dc(6));this.Y[7]&&(this.AM(b,c,a,this.Jg),e=e&&this.dc(7));return e};c.prototype.uP=function(b,c,a){var e=!0;this.Y[0]&&(this.LO(b,c,a,this.ph,this.Jg),e=e&&this.dc(0));this.Y[1]&&(this.gD(b,c,a,this.ph,this.Jg,1),e=e&&this.dc(1));this.Y[2]&&(this.hD(b,c,a,2),e=e&&this.dc(2));this.Y[3]&&(this.gD(b,
a,c,this.Jg,this.ph,3),e=e&&this.dc(3));this.Y[4]&&(this.mK(b,c,a,this.ph,this.Jg),e=e&&this.dc(4));this.Y[5]&&(this.fB(b,a,this.ph,5),e=e&&this.dc(5));this.Y[6]&&(this.hD(b,a,c,6),e=e&&this.dc(6));this.Y[7]&&(this.fB(b,c,this.Jg,7),e=e&&this.dc(7));return e};c.prototype.bB=function(b,c,a){var e=!0;this.Y[0]&&(this.JO(b,c),e=e&&this.dc(0));this.Y[2]&&(this.GO(b,c),e=e&&this.dc(2));this.Y[3]&&(this.lK(b,c,a),e=e&&this.dc(3));this.Y[5]&&(this.jK(b,c),e=e&&this.dc(5));this.Y[6]&&(this.CM(b,c),e=e&&this.dc(6));
return e};c.prototype.DD=function(b,c,a){var e=!0;this.Y[0]&&(this.MO(b,c,a,this.ph),e=e&&this.dc(0));this.Y[2]&&(this.KO(b,a),e=e&&this.dc(2));this.Y[3]&&(this.oK(b,c,a,this.ph),e=e&&this.dc(3));this.Y[5]&&(this.nK(b,c,a,this.ph),e=e&&this.dc(5));this.Y[6]&&(this.DM(b,c,a),e=e&&this.dc(6));return e};c.prototype.JQ=function(b,c,a){var e=!0;this.Y[0]&&(this.NO(b,c,a),e=e&&this.dc(0));this.Y[2]&&(this.iD(b,c,a,2),e=e&&this.dc(2));this.Y[6]&&(this.iD(b,a,c,6),e=e&&this.dc(6));return e};c.prototype.HO=
function(b,c,a){2!=this.A[0]&&(b=this.h.Qe(b),0!=(b&c)&&0!=(b&a)&&(this.A[0]=2))};c.prototype.eD=function(b,c,a){if(1!=this.A[a]){var e=this.h.Qe(this.h.sa(b));0!=(this.h.Qe(b)&c)&&0!=(e&c)&&(this.A[a]=1)}};c.prototype.fD=function(b,c,a,d){2!=this.A[d]&&(b=this.h.Qe(b),0!=(b&c)&&0==(b&a)&&(this.A[d]=2))};c.prototype.gK=function(b,c,a){if(1!=this.A[4]){var e=this.h.Gg(b);0!=(e&c)&&0!=(e&a)?this.A[4]=1:0!=this.A[4]&&1!=this.h.tb(this.h.fe(this.h.sa(b)),this.ni)&&(b=this.h.md(this.h.jf(b)),0!=(b&c)&&
0!=(b&a)&&(this.A[4]=0))}};c.prototype.eB=function(b,c,a){if(1!=this.A[a]){var e=this.h.Qe(this.h.sa(b));0==(this.h.Qe(b)&c)&&0==(e&c)&&(this.A[a]=1)}};c.prototype.IO=function(b,c){if(1!=this.A[0]){var a=this.h.Qe(this.h.sa(b));0!=(this.h.Qe(b)&c)&&0!=(a&c)&&(this.A[0]=1)}};c.prototype.EO=function(b,c,a,d){if(0!=this.A[1]&&1!=this.h.tb(this.h.fe(this.h.sa(b)),this.ni)){var e=this.h.jf(b),k=this.h.md(e);0==(k&c)&&0!=(this.h.Qe(b)&c)&&(b=this.h.Sf(e,d),0!=(k&a)&&0!=b%2&&(this.A[1]=0))}};c.prototype.FO=
function(b,c){2!=this.A[2]&&0!=(this.h.Gg(b)&c)&&(this.A[2]=2)};c.prototype.kK=function(b,c,a,d){if(1!=this.A[3]){var e=this.h.Gg(b);0!=(e&c)&&0!=(e&a)?this.A[3]=1:0!=this.A[3]&&1!=this.h.tb(this.h.fe(this.h.sa(b)),this.ni)&&(e=this.h.jf(b),b=this.h.md(e),0!=(b&c)&&(c=this.h.Sf(e,d),0!=(b&a)&&0==c%2&&(this.A[3]=0)))}};c.prototype.hK=function(b,c,a,d){if(0!=this.A[4]&&1!=this.h.tb(this.h.fe(this.h.sa(b)),this.ni)){var e=this.h.jf(b);b=this.h.md(e);0!=(b&c)&&(c=this.h.Sf(e,d),0!=(b&a)&&0!=c%2&&(this.A[4]=
0))}};c.prototype.iK=function(b,c,a){1!=this.A[5]&&(b=this.h.Gg(b),0!=(b&c)&&0==(b&a)&&(this.A[5]=1))};c.prototype.BM=function(b,c){if(1!=this.A[6]){var a=this.h.Qe(this.h.sa(b));0==(this.h.Qe(b)&c)&&0==(a&c)&&(this.A[6]=1)}};c.prototype.AM=function(b,c,a,d){if(0!=this.A[7]&&1!=this.h.tb(this.h.fe(this.h.sa(b)),this.ni)){var e=this.h.jf(b),k=this.h.md(e);0==(k&c)&&0==(this.h.Qe(b)&c)&&(b=this.h.Sf(e,d),0!=(k&a)&&0!=b%2&&(this.A[7]=0))}};c.prototype.LO=function(b,c,a,d,h){if(1!=this.A[0]){var e=this.h.Gg(b);
0!=(e&c)&&0!=(e&a)?this.A[0]=1:0!=this.A[0]&&1!=this.h.tb(this.h.fe(this.h.sa(b)),this.ni)&&(b=this.h.jf(b),e=this.h.md(b),0!=(e&c)&&0!=(e&a)&&(c=this.h.Sf(b,d),h=this.h.Sf(b,h),0==c%2&&0==h%2&&(this.A[0]=0)))}};c.prototype.gD=function(b,c,a,d,h,f){if(0!=this.A[f]&&1!=this.h.tb(this.h.fe(this.h.sa(b)),this.ni)){b=this.h.jf(b);var e=this.h.md(b);0!=(e&c)&&0!=(e&a)&&(c=this.h.Sf(b,d),h=this.h.Sf(b,h),0==c%2&&0!=h%2&&(this.A[f]=0))}};c.prototype.hD=function(b,c,a,d){1!=this.A[d]&&(b=this.h.Gg(b),0!=
(b&c)&&0==(b&a)&&(this.A[d]=1))};c.prototype.mK=function(b,c,a,d,h){if(0!=this.A[4]&&1!=this.h.tb(this.h.fe(this.h.sa(b)),this.ni)){b=this.h.jf(b);var e=this.h.md(b);0!=(e&c)&&0!=(e&a)&&(c=this.h.Sf(b,d),h=this.h.Sf(b,h),0!=c%2&&0!=h%2&&(this.A[4]=0))}};c.prototype.fB=function(b,c,a,d){0!=this.A[d]&&1!=this.h.tb(this.h.fe(this.h.sa(b)),this.ni)&&(b=this.h.jf(b),0==(this.h.md(b)&c)&&0!=this.h.Sf(b,a)%2&&(this.A[d]=0))};c.prototype.JO=function(b,c){0!=this.A[0]&&0==(this.h.md(b)&c)&&0!=(this.h.pj(this.h.mw(b))&
c)&&(this.A[0]=0)};c.prototype.GO=function(b,c){2!=this.A[2]&&0!=(this.h.md(b)&c)&&(this.A[2]=2)};c.prototype.lK=function(b,c,a){0!=this.A[3]&&(b=this.h.md(b),0!=(b&c)&&0!=(b&a)&&(this.A[3]=0))};c.prototype.jK=function(b,c){1!=this.A[5]&&0!=(this.h.md(b)&c)&&(this.A[5]=1)};c.prototype.CM=function(b,c){0!=this.A[6]&&0==(this.h.md(b)&c)&&0==(this.h.pj(this.h.mw(b))&c)&&(this.A[6]=0)};c.prototype.MO=function(b,c,a,d){if(0!=this.A[0]){var e=this.h.md(b);0!=(e&c)&&0!=(e&a)&&0==this.h.Sf(b,d)%2&&(this.A[0]=
0)}};c.prototype.KO=function(b,c){1!=this.A[2]&&(-1!=this.h.te(b)?this.A[2]=1:0!=this.A[2]&&0==(this.h.md(b)&c)&&(this.A[2]=0))};c.prototype.oK=function(b,c,a,d){if(0!=this.A[3]){var e=this.h.md(b);0!=(e&c)&&0!=(e&a)&&0!=this.h.Sf(b,d)%2&&(this.A[3]=0)}};c.prototype.nK=function(b,c,a,d){if(0!=this.A[5]){var e=this.h.md(b);0!=(e&c)&&0==(e&a)&&0!=this.h.Sf(b,d)%2&&(this.A[5]=0)}};c.prototype.DM=function(b,c,a){0!=this.A[6]&&(b=this.h.md(b),0==(b&c)&&0!=(b&a)&&(this.A[6]=0))};c.prototype.NO=function(b,
c,a){0!=this.A[0]&&(b=this.h.md(b),0!=(b&c)&&0!=(b&a)&&(this.A[0]=0))};c.prototype.iD=function(b,c,a,d){0!=this.A[d]&&(b=this.h.md(b),0!=(b&c)&&0==(b&a)&&(this.A[d]=0))};c.prototype.so=function(b,c){var e=!1;b=this.h.ya(b);c=this.h.ya(c);this.ni=this.h.Eg();for(var d=this.h.Be;-1!=d;d=this.h.Bf(d)){var h=this.h.te(d);if(-1==h){if(-1!=this.Nl)switch(this.Nl){case 3:e=this.bB(d,b,c);break;case 4:e=this.DD(d,b,c);break;default:throw a.g.ra("internal error");}}else{var f=h;do{var g=f;if(1!=this.h.tb(g,
this.ni)){do{switch(this.$t){case 0:e=this.aK(g,b,c);break;case 1:e=this.bK(g,b,c);break;case 2:e=this.uP(g,b,c);break;default:throw a.g.ra("internal error");}if(e)break;this.h.Bb(g,this.ni,1);g=this.h.Wb(g)}while(g!=f&&!e)}if(e)break;f=this.h.Wb(this.h.sa(g))}while(f!=h);if(e)break}}e||this.SF();this.h.kh(this.ni)};c.prototype.Pv=function(b,c){var e=!1;b=this.h.ya(b);c=this.h.ya(c);for(var d=this.h.Be;-1!=d;d=this.h.Bf(d)){switch(this.Nl){case 3:e=this.bB(d,b,c);break;case 4:e=this.DD(d,b,c);break;
case 5:e=this.JQ(d,b,c);break;default:throw a.g.wa();}if(e)break}e||this.SF()};c.prototype.Op=function(b,c){this.h.Mp(b,c)};c.prototype.In=function(b,c,a){this.tM(b,c,a);this.Op(b,a)};c.prototype.tM=function(b,c,d){a.aj.$(b,c,d,!1);b.xo(0,!0,!0);for(c=b.$c;-1!=c;c=b.we(c))1736==b.Lb(c)&&a.mm.$(b,c,-1,!1,d)};c.NB=function(b,c){var e=b.D();if(a.T.Lc(e))return e=new a.Xa(b.description),e.Bc(b,!0),e;if(197==e){e=new a.i;b.o(e);if(e.ba()<=c&&e.aa()<=c)return e=new a.Va(b.description),b.Af(e),e;if(e.ba()<=
c||e.aa()<=c)return e=new a.Xa(b.description),c=new a.Va,b.uf(0,c),e.df(c),b.uf(2,c),e.lineTo(c),e;e=new a.Ka(b.description);e.Wc(b,!1);return e}return b};return c}();a.el=d})(z||(z={}));(function(a){var d=function(){function b(b){this.Dl=new a.ga(0);this.Ot=new a.ga(0);this.Ar=new a.b;this.Br=new a.b;this.a=b;this.Tq=-1}b.prototype.cc=function(b){return this.a.cc(this.Jw(b))};b.prototype.ot=function(b){var c=this.tw(b);b=this.vC(b);if(this.a.Ua(c)==b){var a=c,c=b;b=a}this.a.uc(c,this.Ar);this.a.uc(b,
this.Br);return this.Ar.y<this.Br.y};b.prototype.Jw=function(b){var c=this.tw(b);b=this.vC(b);return this.a.X(c)==b?c:b};b.prototype.tw=function(b){return this.Dl.get(b)};b.prototype.vC=function(b){return this.Ot.get(b)};b.prototype.hC=function(b){this.Dl.set(b,this.Tq);this.Tq=b};b.prototype.GE=function(b){if(-1!=this.Tq){var c=this.Tq;this.Tq=this.Dl.get(c);this.Dl.set(c,b);this.Ot.set(c,this.a.X(b));return c}null==this.Dl&&(this.Dl=new a.ga(0),this.Ot=new a.ga(0));c=this.Dl.size;this.Dl.add(b);
this.Ot.add(this.a.X(b));return c};b.prototype.Dw=function(b){return this.a.rd(this.tw(b))};return b}();a.BT=d;var h=function(){function b(b){this.me=b;this.Vd=new a.yb;this.Kl=new a.yb;this.eE=0;this.on=null;this.zx=-1}b.prototype.compare=function(b,c,a){a=b.da(a);var e=this.me.$a,d;this.zx==c?d=this.eE:(this.on=e.cc(c),null==this.on?(b=e.a,b.Oc(e.Jw(c),this.Vd),this.on=this.Vd,d=this.Vd.xe(this.me.Zg,0)):d=this.on.xe(this.me.Zg,0),this.eE=d,this.zx=c);b=e.cc(a);var h;null==b?(b=e.a,b.Oc(e.Jw(a),
this.Kl),b=this.Kl,h=this.Kl.xe(this.me.Zg,0)):h=b.xe(this.me.Zg,0);d==h&&(c=e.ot(c),a=e.ot(a),a=Math.min(c?this.on.ha:this.on.ja,a?b.ha:b.ja),c=.5*(a+this.me.Zg),c==this.me.Zg&&(c=a),d=this.on.xe(c,0),h=b.xe(c,0));return d<h?-1:d>h?1:0};b.prototype.reset=function(){this.zx=-1};return b}(),c=function(){function b(){this.Rl=this.Dk=null;this.Za=new a.bj;this.Za.lM();this.Ld=new h(this);this.Za.Hn(this.Ld)}b.prototype.XM=function(){var b=!1;this.Qt&&(b=this.YM());if(1==this.a.ea(this.U)){var c=this.a.Vb(this.U),
b=this.a.Gw(c);this.a.Dy(c,!0);return 0>b?(b=this.a.Cb(c),this.a.lF(b),this.a.Wi(c,this.a.Ua(b)),!0):!1}this.Ak=this.a.Uv();this.kn=this.a.Uv();for(c=this.a.Vb(this.U);-1!=c;c=this.a.bc(c))this.a.Rp(c,this.Ak,0),this.a.Rp(c,this.kn,-1);c=new a.ga(0);this.Zg=NaN;var d=new a.b;this.lr=this.a.ea(this.U);this.fn=this.a.re();this.br=this.a.re();for(var h=this.Dk.gc(this.Dk.Wd);-1!=h;h=this.Dk.bb(h)){var f=this.Dk.getData(h);this.a.uc(f,d);d.y!=this.Zg&&0!=c.size&&(b=this.yr(c)||b,this.Ld.reset(),c.clear(!1));
c.add(f);this.Zg=d.y;if(0==this.lr)break}0<this.lr&&(b=this.yr(c)||b,c.clear(!1));this.a.bf(this.fn);this.a.bf(this.br);for(c=this.a.Vb(this.U);-1!=c;)if(3==this.a.Ei(c,this.Ak)){this.a.Dy(c,!0);d=c;for(c=this.a.Ei(c,this.kn);-1!=c;)h=this.a.Ei(c,this.kn),this.a.bQ(this.U,this.a.bc(d),c),d=c,c=h;c=this.a.bc(d)}else this.a.Dy(c,!1),c=this.a.bc(c);this.a.ty(this.Ak);this.a.ty(this.kn);return b};b.prototype.yr=function(b){return this.WQ(b)};b.prototype.WQ=function(b){var c=!1;null==this.$a&&(this.$a=
new d(this.a));null==this.Rl?(this.Rl=new a.ga(0),this.Rl.xb(16)):this.Rl.clear(!1);this.VQ(b);for(var e=0,h=b.size;e<h;e++){var f=b.get(e);-1!=f&&this.bD(f,-1)}for(e=0;e<this.Rl.size&&0<this.lr;e++)if(b=this.Rl.get(e),f=this.$a.Dw(this.Za.da(b)),h=-1,0==this.a.Ei(f,this.Ak)){for(var f=this.Za.ge(b),g=b,l;-1!=f;){var m=this.Za.da(f),p=this.$a.Dw(m),q=this.a.Ei(p,this.Ak);if(0!=q){h=p;break}g=f;f=this.Za.ge(f)}-1==f?(l=!0,f=g):(m=this.Za.da(f),l=this.$a.ot(m),f=this.Za.bb(f),l=!l);do{m=this.Za.da(f);
p=this.$a.Dw(m);q=this.a.Ei(p,this.Ak);if(0==q&&(l!=this.$a.ot(m)&&(c=this.a.Cb(p),this.a.lF(c),this.a.Wi(p,this.a.Ua(c)),c=!0),this.a.Rp(p,this.Ak,l?3:2),l||(g=this.a.Ei(h,this.kn),this.a.Rp(h,this.kn,p),this.a.Rp(p,this.kn,g)),this.lr--,0==this.lr))return c;h=p;g=f;f=this.Za.bb(f);l=!l}while(g!=b)}return c};b.prototype.VQ=function(b){for(var c=0,a=b.size;c<a;c++){var e=b.get(c),d=this.a.Ra(e,this.fn),h=this.a.Ra(e,this.br);if(-1!=d){var f=this.Za.da(d);this.$a.hC(f);this.a.lb(e,this.fn,-1)}-1!=
h&&(f=this.Za.da(h),this.$a.hC(f),this.a.lb(e,this.br,-1));f=-1;-1!=d&&-1!=h?(this.Za.kd(d,-1),this.Za.kd(h,-1),b.set(c,-1)):f=-1!=d?d:h;-1!=f&&(this.bD(e,f)||this.Za.kd(f,-1),b.set(c,-1))}};b.prototype.bD=function(b,c){var e=new a.b,d=new a.b;this.a.uc(b,e);var h=this.a.X(b);this.a.uc(h,d);var k=!1;if(e.y<d.y){var k=!0,f=this.$a.GE(b),g;-1==c?g=this.Za.addElement(f,-1):(g=c,this.Za.Vi(g,f));f=this.a.Ra(h,this.fn);-1==f?this.a.lb(h,this.fn,g):this.a.lb(h,this.br,g);h=this.a.rd(b);0==this.a.Ei(h,this.Ak)&&
this.Rl.add(g)}h=this.a.Ua(b);this.a.uc(h,d);e.y<d.y&&(k=!0,f=this.$a.GE(h),-1==c?g=this.Za.addElement(f,-1):(g=c,this.Za.Vi(g,f)),f=this.a.Ra(h,this.fn),-1==f?this.a.lb(h,this.fn,g):this.a.lb(h,this.br,g),h=this.a.rd(b),0==this.a.Ei(h,this.Ak)&&this.Rl.add(g));return k};b.$=function(c,a,d,h){var e=new b;e.a=c;e.U=a;e.Dk=d;e.Qt=h;return e.XM()};b.prototype.YM=function(){var b=new a.ga(0),c=new a.ga(0),d=-1,h=-1,f=new a.b;f.Eh();for(var g=-1,l=-1,m=-1,p=new a.b,q=this.Dk.gc(this.Dk.Wd);-1!=q;q=this.Dk.bb(q)){var r=
this.Dk.getData(q);this.a.uc(r,p);var v=this.a.rd(r);f.ub(p)&&l==v?(-1==h&&(d=this.a.Uv(),h=this.a.re()),-1==m&&(m=c.size,this.a.lb(g,h,m),c.add(1),-1==this.a.Ei(v,d)&&(this.a.Rp(v,d,g),b.add(v))),this.a.lb(r,h,m),c.JF(c.tc()+1)):(m=-1,f.J(p));g=r;l=v}if(0==b.size)return!1;f=new a.ga(0);g=new a.ga(0);l=0;for(m=b.size;l<m;l++){var v=b.get(l),x=this.a.Ei(v,d),r=this.a.Ra(x,h);f.clear(!1);g.clear(!1);f.add(x);g.add(r);for(r=this.a.X(x);r!=x;r=this.a.X(r)){var w=r,p=this.a.Ra(w,h);if(-1!=p)if(0==g.size)g.add(p),
f.add(w);else if(g.tc()==p){var q=f.tc(),y=this.a.X(q),x=this.a.X(w);this.a.Sc(q,x);this.a.Tc(x,q);this.a.Sc(w,y);this.a.Tc(y,w);w=[!1];y=this.a.aD(this.U,y,this.a.Cb(v),w);this.a.lb(r,h,-1);w[0]&&this.a.Dh(v,x);r=this.a.Ha(v);x=this.a.Ha(y);r-=x;this.a.hm(v,r);c.set(p,c.get(p)-1);1==c.get(p)&&(c.set(p,0),g.af(),f.af());r=x=q}else f.add(r),g.add(p)}}this.a.ty(d);this.a.bf(h);return!0};return b}();a.AI=c})(z||(z={}));(function(a){var d=function(){function d(){}d.prototype.Ag=function(){this.Mx=this.ib=
null};d.prototype.get=function(){return this.Mx};d.prototype.set=function(c){this.Mx=c;if(null!=c)throw 322==c.D()&&(this.ib=c),a.g.wa();};d.prototype.create=function(c){if(322==c)this.mq();else throw a.g.ra("Not Implemented");};d.prototype.mq=function(){null==this.ib&&(this.ib=new a.yb);this.Mx=this.ib};return d}();a.Ag=d})(z||(z={}));(function(a){a=a.FI||(a.FI={});a[a.enumLineSeg=1]="enumLineSeg";a[a.enumBezierSeg=2]="enumBezierSeg";a[a.enumArcSeg=4]="enumArcSeg";a[a.enumNonlinearSegmentMask=6]=
"enumNonlinearSegmentMask";a[a.enumSegmentMask=7]="enumSegmentMask";a[a.enumDensified=8]="enumDensified"})(z||(z={}));(function(a){var d=function(){return function(c){this.ri=c;this.dz=this.ez=1;this.ky=this.jy=this.ly=0}}(),h=function(){function c(){this.op=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.Ij=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.nf=new a.Va;this.ka=this.fu=0;this.an=[];this.ir=[];this.bu=[];this.qp=[];this.Jx=[]}c.prototype.ny=function(b){if(null!=b){for(var c=0,a=b.length;c<a;c++)this.oR(b[c]);
b.length=0}};c.prototype.oR=function(b){b.ri=null;this.qp.push(b)};c.prototype.nu=function(b){if(0===this.qp.length)var c=new d(b);else c=this.qp[this.qp.length-1],c.ri=b,--this.qp.length;return c};c.prototype.dO=function(b,c){return 0==b?this.ir[c]:this.bu[c]};c.prototype.Zx=function(){this.fu>=this.Jx.length&&this.Jx.push(new a.Ag);var b=this.Jx[this.fu];this.fu++;return b};c.prototype.clear=function(){this.ny(this.an);this.ny(this.ir);this.ny(this.bu);this.fu=0};c.prototype.zn=function(b){this.an.push(this.nu(b))};
c.prototype.kk=function(b){return 0==b?this.ir.length:this.bu.length};c.prototype.Io=function(b,c){return this.dO(b,c).ri};c.prototype.Ga=function(b,c){if(2!=this.an.length)throw a.g.wa();this.ka=b;var e=a.vi.Ty(.01*b),d=!1,h=this.an[0],f=this.an[1];if(c||0!=(h.ri.fq(f.ri,b,!0)&5)){if(322==h.ri.D()&&(c=h.ri,322==f.ri.D())){var g=f.ri,l=a.yb.ov(c,g,null,this.op,this.Ij,b);if(0==l)throw a.yb.ov(c,g,null,this.op,this.Ij,b),a.g.wa();b=Array(9);a.I.Ps(b,null);for(var m=0;m<l;m++){var p=this.op[m],q=this.Ij[m],
r=h.ky,v=1;0==p?(r=h.ly,v=h.ez):1==p&&(r=h.jy,v=h.dz);var x=f.ky,w=1;0==q?(x=f.ly,w=f.ez):1==q&&(x=f.jy,w=f.dz);var y=new a.b;r==x?(r=new a.b,c.Kb(p,r),p=new a.b,g.Kb(q,p),q=v+w,w/=q,a.vi.BD(r,p,w,y),a.b.Zb(y,r)+a.b.Zb(y,p)>e&&(d=!0)):r>x?(c.Kb(p,y),p=new a.b,g.Kb(q,p),a.b.Zb(y,p)>e&&(d=!0)):(g.Kb(q,y),r=new a.b,c.Kb(p,r),a.b.Zb(y,r)>e&&(d=!0));b[m]=y}h=0;f=-1;for(m=0;m<=l;m++)w=m<l?this.op[m]:1,w!=h&&(e=this.Zx(),c.Bi(h,w,e),-1!=f&&e.get().ed(b[f]),m!=l&&e.get().vd(b[m]),h=w,this.ir.push(this.nu(e.get()))),
f=m;c=[0,0,0,0,0,0,0,0,0];for(m=0;m<l;m++)c[m]=m;1<l&&this.Ij[0]>this.Ij[1]&&(w=this.Ij[0],this.Ij[0]=this.Ij[1],this.Ij[1]=w,m=c[0],c[0]=c[1],c[1]=m);h=0;f=-1;for(m=0;m<=l;m++)w=m<l?this.Ij[m]:1,w!=h&&(e=this.Zx(),g.Bi(h,w,e),-1!=f&&(h=c[f],e.get().ed(b[h])),m!=l&&(h=c[m],e.get().vd(b[h])),h=w,this.bu.push(this.nu(e.get()))),f=m;return d}throw a.g.wa();}return!1};c.prototype.Tw=function(b,c,d){c.copyTo(this.nf);if(1!=this.an.length)throw a.g.wa();this.ka=b;var e=this.an[0];if(d||e.ri.qs(c.w(),b,
!0))if(322==e.ri.D()){b=e.ri;var h=b.Gd(c.w(),!1);this.op[0]=h;var k=e.ky;d=1;0==h?(k=e.ly,d=e.ez):1==h&&(k=e.jy,d=e.dz);e=new a.b;0==k?(k=new a.b,b.Kb(h,k),c=c.w(),a.vi.BD(k,c,1/(d+1),e)):0<k?(e=new a.b,b.Kb(h,e)):e=c.w();d=0;h=-1;for(k=0;1>=k;k++){c=1>k?this.op[k]:1;if(c!=d){var f=this.Zx();b.Bi(d,c,f);-1!=h&&f.get().ed(e);1!=k&&f.get().vd(e);d=c;this.ir.push(this.nu(f.get()))}h=k}this.nf.ic(e)}else throw a.g.wa();};return c}();a.gA=h})(z||(z={}));(function(a){var d=function(){function d(c){this.Pq=
this.yj=this.ib=null;this.zk=this.Ee=this.Gc=this.ze=this.Sg=this.Qa=0;this.ab=null;this.zl=!1;this.ze=-1;this.Sg=this.Gc=0;this.Qa=-1;this.ab=c;this.Ee=this.eq(this.Sg);this.zl=!1;this.yj=null;this.zk=-1;this.Pq=new a.b}d.Yn=function(c,b){if(0>b||b>=c.F())throw a.g.Uc();var e=new d(c),h=c.Ew(b);e.Gc=b-c.Ea(h);e.Sg=h+1;e.Qa=h;e.Ee=e.eq(e.Qa);e.zk=e.ab.Ea(e.Qa);return e};d.Un=function(c,b,e){if(0>b||b>=c.ea()||0>e)throw a.g.Uc();var h=c.vc(b)?0:1;if(e>=c.Ha(b)-h)throw a.g.Uc();c=new d(c);c.ze=-1;c.Gc=
e;c.Qa=b;c.Sg=c.Gc+1;c.Ee=c.eq(c.Sg);c.zk=c.ab.Ea(c.Qa);return c};d.prototype.xR=function(c){if(this.ab!=c.ab)throw a.g.xa();this.ze=c.ze;this.Gc=c.Gc;this.Qa=c.Qa;this.Sg=c.Sg;this.Ee=c.Ee;this.zl=c.zl;this.zk=c.zk;this.yj=null};d.prototype.ia=function(){this.ze!=this.Gc&&this.JA();if(this.zl)this.Gc=(this.Gc+1)%this.Ee;else{if(this.Gc==this.Ee)throw a.g.Uc();this.Gc++}return this.yj};d.prototype.oi=function(){if(this.zl)this.Gc=(this.Ee+this.Gc-1)%this.Ee;else{if(0==this.Gc)throw a.g.Uc();this.Gc--}this.Gc!=
this.ze&&this.JA();return this.yj};d.prototype.yR=function(){this.ze=-1;this.Gc=0};d.prototype.zR=function(){this.Gc=this.Ee;this.ze=-1};d.prototype.Sb=function(c,b){void 0===b&&(b=-1);if(0<=this.Qa&&this.Qa<this.ab.ea()){var a=this.uJ();if(c>=a&&c<this.ab.Dc(this.Qa)){this.ze=-1;this.Gc=c-a;return}}a=0<=b&&b<this.ab.ea()&&c>=this.ab.Ea(b)&&c<this.ab.Dc(b)?b:this.ab.Ew(c);this.Sg=a+1;this.Qa=a;this.ze=-1;this.Gc=c-this.ab.Ea(a);this.Ee=this.eq(a);this.zk=this.ab.Ea(this.Qa)};d.prototype.kb=function(){this.Qa=
this.Sg;if(this.Qa>=this.ab.ea())return!1;this.ze=-1;this.Gc=0;this.Ee=this.eq(this.Qa);this.zk=this.ab.Ea(this.Qa);this.Sg++;return!0};d.prototype.Lk=function(){this.Ee=this.Gc=this.ze=-1;this.Sg=0;this.zk=this.Qa=-1};d.prototype.vy=function(c){if(0>c)throw a.g.Uc();this.Sg=c;this.zk=this.Ee=this.Gc=this.ze=this.Qa=-1};d.prototype.eq=function(c){if(this.ab.sc())return 0;var b=1;this.ab.vc(c)&&(b=0);return this.ab.Ha(c)-b};d.prototype.lD=function(){return this.ze==this.Ee-1&&this.ab.vc(this.Qa)};
d.prototype.NR=function(){this.zl=!0};d.prototype.Jb=function(){return this.ab.jb.f[this.Qa]+this.ze};d.prototype.uJ=function(){return this.ab.Ea(this.Qa)};d.prototype.Bm=function(){return this.lD()?this.ab.Ea(this.Qa):this.Jb()+1};d.prototype.wl=function(){return 0==this.ze};d.prototype.Jm=function(){return this.ze==this.Ee-1};d.prototype.La=function(){return this.Gc<this.Ee};d.prototype.Ow=function(){return 0<this.Gc};d.prototype.vm=function(){var c=new d(this.ab);c.ze=this.ze;c.Gc=this.Gc;c.Ee=
this.Ee;c.Qa=this.Qa;c.Sg=this.Sg;c.ab=this.ab;c.zl=this.zl;return c};d.prototype.JA=function(){if(0>this.Gc||this.Gc>=this.Ee)throw a.g.Uc();this.ze=this.Gc;var c=this.Jb();this.ab.kc();var b=this.ab.Fe,e=1;null!=b&&(e=b.read(c)&7);b=this.ab.description;switch(e){case 1:null==this.ib&&(this.ib=new a.yb);this.yj=this.ib;break;case 2:throw a.g.ra("internal error");case 4:throw a.g.wa();default:throw a.g.wa();}this.yj.Qf(b);e=this.Bm();this.ab.uc(c,this.Pq);this.yj.ed(this.Pq);this.ab.uc(e,this.Pq);
this.yj.vd(this.Pq);for(var d=1,h=b.Aa;d<h;d++)for(var f=b.Hd(d),g=a.pa.Wa(f),l=0;l<g;l++){var m=this.ab.ld(f,c,l);this.yj.My(f,l,m);m=this.ab.ld(f,e,l);this.yj.Cy(f,l,m)}};d.prototype.YO=function(){return this.Qa==this.ab.ea()-1};return d}();a.GI=d})(z||(z={}));(function(a){var d=function(){function d(c){c instanceof a.T?(this.ZD=c,this.ua=-1,this.Wh=1):(this.DP=c.slice(0),this.ua=-1,this.Wh=c.length)}d.prototype.ya=function(){return this.ua};d.prototype.next=function(){return this.ua<this.Wh-1?
(this.ua++,null!=this.ZD?this.ZD:this.DP[this.ua]):null};return d}();a.Pc=d})(z||(z={}));(function(a){var d=function(){return function(){this.next=null}}(),h=function(){function c(){this.Cp=this.ju=this.ku=this.vj=this.eh=0;this.aC=!1;this.eG=0;this.am=this.wf=this.Vk=this.hh=null;this.Mk=0;this.Kv=null;this.vj=this.eh=-1}c.prototype.vS=function(b,c,d){this.eh=b;this.vj=c;this.hh=this.Vk=null;this.Cp=0;this.Kv=d;null==this.am&&(this.am=a.I.Lh(384,0));this.hG()};c.prototype.aa=function(){return this.eh};
c.prototype.ba=function(){return this.vj};c.prototype.flush=function(){0<this.Mk&&(this.Kv.XB(this.am,this.Mk),this.Mk=0)};c.prototype.hG=function(){if(0<this.Cp){for(var b=0;b<this.vj;b++){for(var c=this.Vk[b];null!=c;){var a=c,c=c.next;a.next=null}this.Vk[b]=null}this.hh=null}this.ku=this.vj;this.ju=-1;this.Cp=0};c.prototype.fF=function(b){this.aC=b==c.$u;for(b=this.ku;b<=this.ju;b++)this.VJ(),this.PJ(b),this.vM();this.hG()};c.prototype.zv=function(b,c,h,f){if(c!=f){var e=1;c>f&&(e=b,b=h,h=e,e=
c,c=f,f=e,e=-1);if(!(0>f||c>=this.vj)){0>b&&0>h?h=b=-1:b>=this.eh&&h>=this.eh&&(h=b=this.eh);var k=(h-b)/(f-c);f>this.vj&&(f=this.vj,h=k*(f-c)+b);0>c&&(b=k*(0-c)+b,c=0);var g=Math.max(this.eh+1,8388607);-8388607>b?(c=(0-b)/k+c,b=0):b>g&&(c=(this.eh-b)/k+c,b=this.eh);-8388607>h?f=(0-b)/k+c:h>g&&(f=(this.eh-b)/k+c);c=a.I.truncate(c);f=a.I.truncate(f);c!=f&&(h=new d,h.x=a.I.truncate(4294967296*b),h.y=c,h.G=f,h.pM=a.I.truncate(4294967296*k),h.dir=e,null==this.Vk&&(this.Vk=a.I.Lh(this.vj,null)),h.next=
this.Vk[h.y],this.Vk[h.y]=h,h.y<this.ku&&(this.ku=h.y),h.G>this.ju&&(this.ju=h.G),this.Cp++)}}};c.prototype.VJ=function(){if(null!=this.hh){for(var b=!1,c=null,a=this.hh;null!=a;)if(a.y++,a.y==a.G){var d=a,a=a.next;null!=c?c.next=a:this.hh=a;d.next=null}else a.x+=a.pM,null!=c&&c.x>a.x&&(b=!0),c=a,a=a.next;b&&(this.hh=this.dG(this.hh))}};c.prototype.PJ=function(b){if(!(b>=this.vj)){var c=this.Vk[b];if(null!=c){this.Vk[b]=null;c=this.dG(c);this.Cp-=this.eG;b=this.hh;for(var a=!0,d=c,h=null;null!=b&&
null!=d;)b.x>d.x?(a&&(this.hh=d),a=d.next,d.next=b,null!=h&&(h.next=d),h=d,d=a):(a=b.next,b.next=d,null!=h&&(h.next=b),h=b,b=a),a=!1;null==this.hh&&(this.hh=c)}}};c.Mz=function(b,c){return 0>b?0:b>c?c:b};c.prototype.vM=function(){if(null!=this.hh)for(var b=0,e=this.hh,d=a.I.truncate(a.I.FD(e.x)),h=e.next;null!=h;h=h.next)if(b=this.aC?b^1:b+h.dir,h.x>e.x){var f=a.I.truncate(a.I.FD(h.x));0!=b&&(e=c.Mz(d,this.eh),d=c.Mz(f,this.eh),d>e&&e<this.eh&&(this.am[this.Mk++]=e,this.am[this.Mk++]=d,this.am[this.Mk++]=
h.y,this.Mk==this.am.length&&(this.Kv.XB(this.am,this.Mk),this.Mk=0)));e=h;d=f}};c.prototype.dG=function(b){for(var e=0,d=b;null!=d;d=d.next)e++;this.eG=e;if(1==e)return b;null==this.wf?this.wf=a.I.Lh(Math.max(e,16),null):this.wf.length<e&&(this.wf=a.I.Lh(Math.max(e,2*this.wf.length),null));for(var h=0,d=b;null!=d;d=d.next)this.wf[h++]=d;2==e?this.wf[0].x>this.wf[1].x&&(b=this.wf[0],this.wf[0]=this.wf[1],this.wf[1]=b):c.pP(this.wf,e,function(b,c){return b==c?0:b.x<c.x?-1:b.x>c.x?1:0});b=this.wf[0];
this.wf[0]=null;d=b;for(h=1;h<e;h++)d.next=this.wf[h],d=this.wf[h],this.wf[h]=null;d.next=null;return b};c.pP=function(b,c,a){if(c==b.length)b.sort(a);else{var e=b.slice(0,0),d=b.slice(c);c=b.slice(0,c).sort(a);b.length=0;b.push.apply(b,e.concat(c).concat(d))}};c.$u=0;c.sT=1;return c}();a.ev=h})(z||(z={}));(function(a){var d=function(){function d(){}d.prototype.Jh=function(c,b){var a=this.a.Ra(c,this.vp);this.yk==a&&(this.yk=this.$d.bb(this.yk));this.Xm==a&&(this.Xm=this.$d.bb(this.Xm));this.$d.Jc(this.Ox,
a);this.hj(c);if(b&&(a=this.a.rd(c),-1!=a&&this.a.Cb(a)==c)){b=this.a.X(c);if(b!=c){var d=this.a.rd(b);if(d==a){this.a.Dh(a,b);return}b=this.a.Ua(c);if(b!=c&&(d=this.a.rd(b),d==a)){this.a.Dh(a,b);return}}this.a.Dh(a,-1);this.a.Wi(a,-1)}};d.prototype.yA=function(){for(var c=!1,b=0,e=new a.b;;){b++;null==this.nh?(this.nh=new a.ga(0),this.Mq=new a.ga(0),this.ie=new a.ga(0)):(this.nh.clear(!1),this.Mq.clear(!1),this.ie.clear(!1));for(var d=this.Xm,h=0,f=!0;d!=this.yk;){var g=this.$d.getData(d),l=new a.b;
this.a.uc(g,l);f&&(this.a.uc(g,e),f=!1);var l=this.a.Ua(g),m=this.a.X(g);-559038737!=this.a.Ra(l,this.fg)&&(this.nh.add(l),this.a.lb(l,this.fg,-559038737),this.Mq.add(g),this.ie.add(h++));-559038737!=this.a.Ra(m,this.fg)&&(this.nh.add(m),this.a.lb(m,this.fg,-559038737),this.Mq.add(g),this.ie.add(h++));d=this.$d.bb(d)}if(2>this.nh.size)break;var p=this;this.ie.xd(0,this.ie.size,function(b,c){return p.mJ(b,c)});d=0;for(h=this.ie.size;d<h;d++)f=this.ie.get(d),f=this.nh.get(f),this.a.lb(f,this.fg,d),
l=new a.b,this.a.uc(f,l);l=this.zJ(e);d=0;for(h=this.ie.size;d<h;d++)f=this.ie.get(d),-1!=f&&(f=this.nh.get(f),this.a.lb(f,this.fg,-1));if(l)c=!0;else break}return c};d.prototype.zJ=function(c){for(var b=!1,a=!0;a;){var a=!1,d=0;-1==this.ie.get(d)&&(d=this.fl(d));for(var h=this.fl(d),f=0,g=this.ie.size;f<g&&-1!=d&&-1!=h&&d!=h;f++){var l=this.ie.get(d),h=this.ie.get(h),l=this.nh.get(l),h=this.nh.get(h),m=this.a.X(l);this.a.pt(m,c)||(m=this.a.Ua(l));var p=this.a.X(h);this.a.pt(p,c)||(p=this.a.Ua(h));
var q=this.os(m,l),r=this.os(p,h),v=q?this.a.Ua(m):this.a.X(m),x=r?this.a.Ua(p):this.a.X(p),w=!1;this.io(m)?w=!0:this.io(p)?w=!0:this.io(l)?w=!0:this.io(h)?w=!0:this.io(v)?w=!0:this.io(x)&&(w=!0);!w&&this.a.Cq(l,h)&&(w=!0,this.BA(q,r,m,l,p,h));!w&&this.a.Cq(v,x)&&(w=!0,this.BA(!q,!r,m,v,p,x));w&&(b=!0);a=a||w;d=this.fl(d);h=this.fl(d)}}if(!b)for(d=0,-1==this.ie.get(d)&&(d=this.fl(d)),h=this.fl(d),f=0,g=this.ie.size;f<g&&-1!=d&&-1!=h&&d!=h;f++)l=this.ie.get(d),h=this.ie.get(h),l=this.nh.get(l),h=this.nh.get(h),
m=this.a.X(l),this.a.pt(m,c)||(m=this.a.Ua(l)),p=this.a.X(h),this.a.pt(p,c)||(p=this.a.Ua(h)),q=this.os(m,l),r=this.os(p,h),v=q?this.a.Ua(m):this.a.X(m),x=r?this.a.Ua(p):this.a.X(p),this.qJ(q,r,l,m,v,h,p,x)&&(b=!0),d=this.fl(d),h=this.fl(d);return b};d.prototype.CJ=function(){1736==this.a.Lb(this.U)&&1==this.a.Cm(this.U)&&(new a.Of).DQ(this.Qt,this.a,this.U,this.oe);var c=!1,b=!0;this.fg=this.vp=-1;var e=this.a.F(this.U),d=new a.ga(0);d.xb(e);for(var h=this.a.Vb(this.U);-1!=h;h=this.a.bc(h))for(var f=
this.a.Cb(h),g=0,l=this.a.Ha(h);g<l;g++)d.add(f),f=this.a.X(f);var m=this.a.cd.f,p=this.a.cd.Ic;this.a.wb.kc();var q=this.a.wb.Ba[0].f;d.xd(0,e,function(b,c){var a=m[p*b],e=m[p*c],d=q[2*a],a=q[2*a+1],h=q[2*e],e=q[2*e+1],d=a<e?-1:a>e?1:d<h?-1:d>h?1:0;0==d&&(d=m[p*b+3],e=m[p*c+3],d=d<e?-1:d==e?0:1);return d});this.vp=this.a.re();this.$d=new a.$n;this.Ox=this.$d.jh(0);this.$d.$l(e);for(h=0;h<e;h++)f=d.get(h),g=this.$d.addElement(this.Ox,f),this.a.lb(f,this.vp,g);this.fg=this.a.re();this.yk=-1;for(this.sA()&&
(c=!0);b;){b=!1;e=0;d=!1;do{d=!1;this.Xm=-1;for(var l=0,h=new a.b,g=new a.b,r=this.$d.gc(this.Ox);-1!=r;)f=this.$d.getData(r),-1!=this.Xm?(this.a.uc(f,g),h.ub(g))?l++:(h.J(g),this.yk=r,0<l&&(f=this.yA())&&(d=!0,-1!=this.yk&&(f=this.$d.getData(this.yk),this.a.uc(f,h))),this.Xm=r=this.yk,l=0):(this.Xm=r,this.a.uc(this.$d.getData(r),h),l=0),-1!=r&&(r=this.$d.bb(r));this.yk=-1;0<l&&(f=this.yA())&&(d=!0);if(10<e++)throw a.g.wa();d&&this.tJ();this.sA()&&(d=!0);b=b||d&&!1;c=c||d}while(d)}this.a.bf(this.vp);
this.a.bf(this.fg);return c=a.AI.$(this.a,this.U,this.$d,this.Qt)||c};d.prototype.os=function(c,b){return this.a.X(b)==c?!1:!0};d.prototype.qJ=function(c,b,a,d,h,f,g,l){if(d==g)return this.hj(a),this.hj(f),!1;var e=this.a.Ra(a,this.fg),k=this.a.Ra(h,this.fg),n=this.a.Ra(f,this.fg),m=this.a.Ra(l,this.fg);a=[0,0,0,0,0,0,0,0];var p=[0,0,0,0];a[0]=0;p[0]=e;a[1]=0;p[1]=k;a[2]=1;p[2]=n;a[3]=1;p[3]=m;for(e=1;4>e;e++){k=p[e];n=a[e];for(m=e-1;0<=m&&p[m]>k;)p[m+1]=p[m],a[m+1]=a[m],m--;p[m+1]=k;a[m+1]=n}p=0;
0!=a[0]&&(p|=1);0!=a[1]&&(p|=2);0!=a[2]&&(p|=4);0!=a[3]&&(p|=8);if(5!=p&&10!=p)return!1;c==b?c?(this.a.Sc(l,d),this.a.Tc(d,l),this.a.Sc(h,g),this.a.Tc(g,h)):(this.a.Tc(l,d),this.a.Sc(d,l),this.a.Tc(h,g),this.a.Sc(g,h)):c?(this.a.Tc(d,f),this.a.Sc(f,d),this.a.Tc(g,h),this.a.Sc(h,g)):(this.a.Sc(d,f),this.a.Tc(f,d),this.a.Sc(g,h),this.a.Tc(h,g));return!0};d.prototype.BA=function(c,b,a,d,h,f){this.pU?this.BJ():this.AJ(c,b,a,d,h,f)};d.prototype.BJ=function(){throw a.g.ra("not implemented.");};d.prototype.AJ=
function(c,b,a,d,h,f){if(c!=b)c?(this.a.Sc(a,h),this.a.Tc(h,a),this.a.Sc(f,d),this.a.Tc(d,f),this.pm(h,a),this.Jh(h,!0),this.a.Ui(h,!0),this.hj(a),this.pm(f,d),this.Jh(f,!0),this.a.Ui(f,!1)):(this.a.Sc(h,a),this.a.Tc(a,h),this.a.Sc(d,f),this.a.Tc(f,d),this.pm(h,a),this.Jh(h,!0),this.a.Ui(h,!1),this.hj(a),this.pm(f,d),this.Jh(f,!0),this.a.Ui(f,!0)),this.hj(d);else{var e=c?a:d,k=b?h:f;c=c?d:a;b=b?f:h;h=!1;this.a.Sc(e,k);this.a.Sc(k,e);this.a.Tc(c,b);this.a.Tc(b,c);for(f=b;f!=k;)a=this.a.Ua(f),d=this.a.X(f),
this.a.Tc(f,d),this.a.Sc(f,a),h=h||f==e,f=d;h||(a=this.a.Ua(k),d=this.a.X(k),this.a.Tc(k,d),this.a.Sc(k,a));this.pm(k,e);this.Jh(k,!0);this.a.Ui(k,!1);this.hj(e);this.pm(b,c);this.Jh(b,!0);this.a.Ui(b,!1);this.hj(c)}};d.prototype.sA=function(){for(var c=!1,b=this.a.Vb(this.U);-1!=b;){for(var a=this.a.Cb(b),d=0,h=this.a.Ha(b);d<h&&1<h;){var f=this.a.Ua(a),g=this.a.X(a);this.a.Cq(f,g)?(c=!0,this.Jh(a,!1),this.a.vf(a,!0),this.Jh(g,!1),this.a.vf(g,!0),a=f,d=0,h=this.a.Ha(b)):(a=g,d++)}if(2>this.a.Ha(b)){c=
this.a.Cb(b);d=0;for(h=this.a.Ha(b);d<h;d++)this.Jh(c,!1),c=this.a.X(c);b=this.a.Cr(b);c=!0}else b=this.a.bc(b)}return c};d.prototype.io=function(c){for(var b=!1;;){var a=this.a.X(c),d=this.a.Ua(c);if(a==c)return this.Jh(c,!0),this.a.Ui(c,!1),!0;if(!this.a.Cq(a,d))break;b=!0;this.hj(d);this.hj(a);this.Jh(c,!0);this.a.Ui(c,!1);this.pm(a,d);this.Jh(a,!0);this.a.Ui(a,!0);if(a==d)break;c=d}return b};d.prototype.tJ=function(){for(var c=0,b=this.$d.gc(this.$d.Wd);-1!=b;b=this.$d.bb(b)){var a=this.$d.getData(b);
this.a.im(a,-1)}for(var d=0,h=this.a.Vb(this.U);-1!=h;)if(b=this.a.Cb(h),-1==b||-1!=this.a.rd(b))a=h,h=this.a.bc(h),this.a.yu(a);else{this.a.im(b,h);for(var f=1,a=this.a.X(b);a!=b;a=this.a.X(a))this.a.im(a,h),f++;this.a.Jr(h,!1);this.a.hm(h,f);this.a.Wi(h,this.a.Ua(b));d+=f;c++;h=this.a.bc(h)}for(b=this.$d.gc(this.$d.Wd);-1!=b;b=this.$d.bb(b))a=this.$d.getData(b),-1==this.a.rd(a)&&(h=this.a.aD(this.U,a,a,null),d+=this.a.Ha(h),c++);this.a.gm(this.U,c);this.a.Pk(this.U,d);c=0;for(d=this.a.$c;-1!=d;d=
this.a.we(d))c+=this.a.F(d);this.a.ZF(c)};d.prototype.fl=function(c){for(var b=0,a=this.ie.size-1;b<a;b++)if(c=(c+1)%this.ie.size,-1!=this.ie.get(c))return c;return-1};d.prototype.pm=function(c,b){var a=this.a.Ra(b,this.vp),d=this.a.Ra(b,this.fg);this.a.Zy(c,b);this.a.lb(b,this.vp,a);this.a.lb(b,this.fg,d)};d.prototype.hj=function(c){var b=this.a.Ra(c,this.fg);-1!=b&&(this.ie.set(b,-1),this.a.lb(c,this.fg,-1))};d.$=function(c,b,a,h,f){var e=new d;e.a=c;e.U=b;e.yx=a;e.Qt=h;e.oe=f;return e.CJ()};d.prototype.mJ=
function(c,b){var e=this.nh.get(c),d=new a.b;this.a.uc(e,d);var e=new a.b,h=this.nh.get(b);this.a.uc(h,e);if(d.ub(e))return 0;c=this.Mq.get(c);h=new a.b;this.a.uc(c,h);b=this.Mq.get(b);c=new a.b;this.a.uc(b,c);b=new a.b;b.pc(d,h);d=new a.b;d.pc(e,c);return a.b.cq(b,d)};return d}();a.mm=d})(z||(z={}));(function(a){(function(a){a[a.Local=0]="Local";a[a.Geographic=1]="Geographic";a[a.Projected=2]="Projected";a[a.Unknown=3]="Unknown"})(a.HI||(a.HI={}));(function(a){a[a.Integer32=0]="Integer32";a[a.Integer64=
1]="Integer64";a[a.FloatingPoint=2]="FloatingPoint"})(a.rI||(a.rI={}));var d=function(){function d(){this.fo="";this.mi=0;this.Sl=null}d.prototype.Qc=function(){return this.mi};d.prototype.Ko=function(){var c=.001;0!=this.mi?c=a.ls.SM(this.mi):null!=this.Sl&&(c=a.mA.TM(this.Sl));return c};d.prototype.Se=function(){if(0!=this.mi)return a.Tb.Qd(a.ls.cC(this.mi));if(null!=this.Sl)return a.mA.UM(this.Sl)};d.Am=function(c){if(0!=c.mi){if(!0===a.ls.WO(c.mi))return 1;if(!0===a.ls.ZO(c.mi))return 2}return 3};
d.create=function(c){if(0>=c)throw a.g.N("Invalid or unsupported wkid: "+c);var b=new d;b.mi=c;return b};d.NL=function(c){if(null==c||0==c.length)throw a.g.N("Cannot create SpatialReference from null or empty text.");var b=new d;b.Sl=c;return b};d.prototype.lc=function(c){return this==c?!0:null==c||this.constructor!=c.constructor||this.mi!=c.mi||0==this.mi&&this.Sl!==c.Sl?!1:!0};d.mN=function(c,b){var e=Math.PI/180,d=new a.ca;a.nH.pN(c.w().x*e,c.w().y*e,b.w().x*e,b.w().y*e,d);return d.l};d.prototype.toString=
function(){return"[ tol: "+this.xq()+"; wkid: "+this.Qc()+"; wkt: "+this.Sl+"]"};d.prototype.hc=function(){if(""!==this.fo)return this.fo;var c=this.toString();if(Array.prototype.reduce)return this.fo="S"+c.split("").reduce(function(b,c){b=(b<<5)-b+c.charCodeAt(0);return b&b},0);var b=0;if(0===c.length)return"";for(var a=0;a<c.length;a++)b=(b<<5)-b+c.charCodeAt(a),b&=b;return this.fo="S"+b};d.prototype.xq=function(){return this.Ko()};d.jU=!0;d.ET=2147483645;d.FT=9007199254740990;return d}();a.Nf=
d})(z||(z={}));(function(a){function d(b,c){89.99999<c?c=89.99999:-89.99999>c&&(c=-89.99999);c*=.017453292519943;return[111319.49079327169*b,3189068.5*Math.log((1+Math.sin(c))/(1-Math.sin(c)))]}function h(b,c,a){b=b/6378137*57.29577951308232;return a?[b,57.29577951308232*(1.5707963267948966-2*Math.atan(Math.exp(-1*c/6378137)))]:[b-360*Math.floor((b+180)/360),57.29577951308232*(1.5707963267948966-2*Math.atan(Math.exp(-1*c/6378137)))]}function c(b,c){var e=b.vm();if(33===b.D()){var d=c(e.lk(),e.mk());
e.ic(d[0],d[1])}else if(197===b.D())d=c(b.R.v,b.R.C,!0),b=c(b.R.B,b.R.G,!0),e.K(d[0],d[1],b[0],b[1]);else for(d=new a.b,b=0;b<e.F();b++){e.w(b,d);var h=c(d.x,d.y,!0);d.ma(h[0],h[1]);e.ic(b,d)}return e}function b(b){return c(b,h)}function e(b){return c(b,d)}var k=function(){function b(){}b.Xr=function(b){var c=Math.PI/180,e=Math.sin(b.y*c);return a.b.Oa(6378137*b.x*c,3167719.6636462314*(e/(1-.006694379990197414*e*e)-6.111035746609262*Math.log((1-.0818191908429643*e)/(1+.0818191908429643*e))))};b.Wu=
function(b,c,e,d){var h=1/298.257223563,k=Math.sin(e);e=Math.cos(e);var f=(1-h)*Math.tan(b);b=1/Math.sqrt(1+f*f);for(var g=f*b,n=Math.atan2(f,e),f=b*k*b*k,l=1-f,m=2.7233160610754688E11*l/4.040829998466145E13,p=1+m/16384*(4096+m*(-768+m*(320-175*m))),q=m/1024*(256+m*(-128+m*(74-47*m))),m=d/(6356752.31424518*p),r=2*Math.PI,v,u,x,w;1E-12<Math.abs(m-r);)x=Math.cos(2*n+m),v=Math.sin(m),u=Math.cos(m),w=q*v*(x+q/4*(u*(-1+2*x*x)-q/6*x*(-3+4*v*v)*(-3+4*x*x))),r=m,m=d/(6356752.31424518*p)+w;d=g*v-b*u*e;l=h/
16*l*(4+h*(4-3*l));return a.b.Oa((c+(Math.atan2(v*k,b*u-g*v*e)-(1-l)*h*Math.sqrt(f)*(m+l*v*(x+l*u*(-1+2*x*x)))))/(Math.PI/180),Math.atan2(g*u+b*v*e,(1-h)*Math.sqrt(f+d*d))/(Math.PI/180))};b.cN=function(b,c,a,e){var d=1/298.257223563,h=e-c,k=Math.atan((1-d)*Math.tan(b)),f=Math.atan((1-d)*Math.tan(a)),g=Math.sin(k),k=Math.cos(k),n=Math.sin(f),f=Math.cos(f),l=h,m,p=1E3,q,r,v,u,x,w,y;do{v=Math.sin(l);u=Math.cos(l);r=Math.sqrt(f*v*f*v+(k*n-g*f*u)*(k*n-g*f*u));if(0===r)return 0;u=g*n+k*f*u;x=Math.atan2(r,
u);w=k*f*v/r;q=1-w*w;v=u-2*g*n/q;isNaN(v)&&(v=0);y=d/16*q*(4+d*(4-3*q));m=l;l=h+(1-y)*d*w*(x+y*r*(v+y*u*(-1+2*v*v)))}while(1E-12<Math.abs(l-m)&&0<--p);if(0===p)return g=e-c,{azimuth:Math.atan2(Math.sin(g)*Math.cos(a),Math.cos(b)*Math.sin(a)-Math.sin(b)*Math.cos(a)*Math.cos(g)),geodesicDistance:6371009*Math.acos(Math.sin(b)*Math.sin(a)+Math.cos(b)*Math.cos(a)*Math.cos(e-c))};b=2.7233160610754688E11*q/4.040829998466145E13;c=b/1024*(256+b*(-128+b*(74-47*b)));return{azimuth:Math.atan2(f*Math.sin(l),k*
n-g*f*Math.cos(l)),lN:6356752.31424518*(1+b/16384*(4096+b*(-768+b*(320-175*b))))*(x-c*r*(v+c/4*(u*(-1+2*v*v)-c/6*v*(-3+4*r*r)*(-3+4*v*v)))),yU:Math.atan2(k*Math.sin(l),k*n*Math.cos(l)-g*f)}};b.oT=function(b){var c=b.hasAttribute(1),e=b.hasAttribute(2),d=[],h=b.ea(),k=null,f=null;c&&(k=b.mc(1));e&&(f=b.mc(2));for(var g=new a.b,n=0;n<h;n++){for(var l=b.Ea(n),m=b.Ha(n),p=0,q=0,r=NaN,v=NaN,u=NaN,x=NaN,w=b.vc(n),y=[],t=l;t<l+m;t++){b.w(t,g);var x=u=NaN,B=[g.x,g.y];c&&(u=k.get(t),B.push(u));e&&(h=f.get(t),
B.push(x));t==l&&w&&(p=g.x,q=g.y,r=u,v=x);y.push(B)}!w||p==g.x&&q==g.y&&(!c||isNaN(r)&&isNaN(u)||r==u)&&(!e||isNaN(v)&&isNaN(x)||v==x)||y.push(y[0].slice(0));d.push(y)}return d};b.fw=function(c,a){c=b.oT(c);var e=Math.PI/180;637.100877151506>a&&(a=637.100877151506);for(var d=[],h=0;h<c.length;h++){var k=c[h],f;d.push(f=[]);f.push([k[0][0],k[0][1]]);var g,n,l,m,p,q;g=k[0][0]*e;n=k[0][1]*e;for(p=0;p<k.length-1;p++)if(l=k[p+1][0]*e,m=k[p+1][1]*e,g!==l||n!==m){m=b.cN(n,g,m,l);l=m.azimuth;m=m.lN;var r=
m/a;if(1<r){for(q=1;q<=r-1;q++){var v=b.Wu(n,g,l,q*a);f.push([v.x,v.y])}q=b.Wu(n,g,l,(m+Math.floor(r-1)*a)/2);f.push([q.x,q.y])}n=b.Wu(n,g,l,m);f.push([n.x,n.y]);g=n.x*e;n=n.y*e}}return{mF:d}};b.kN=function(c){for(var e=[],d=0;d<c.length;d++){var h=c[d],h=b.fw(h,1E4);e.push(h)}c=[];for(var k,f,g=0;g<e.length;g++){for(var h=e[g],n=0,d=0;d<h.mF.length;d++){var l=h.mF[d];k=b.Xr(a.b.Oa(l[0][0],l[0][1]));f=b.Xr(a.b.Oa(l[l.length-1][0],l[l.length-1][1]));var m=f.x*k.y-k.x*f.y,p;for(p=0;p<l.length-1;p++)k=
b.Xr(a.b.Oa(l[p+1][0],l[p+1][1])),f=b.Xr(a.b.Oa(l[p][0],l[p][1])),m+=f.x*k.y-k.x*f.y;m/=4046.87;n+=m}c.push(n/-2*4046.85642)}return c};return b}();a.oH=k;k=function(){function c(){}c.oy=function(b,a,e,d,h,k,f){c.AG[b.hc()]=a;0==isNaN(e)&&(c.CG[b.hc()]=e);0==isNaN(d)&&(c.iz[b.hc()]=d);0==isNaN(h)&&(c.lG[b.hc()]=h);c.EG[b.hc()]=k;null!==f&&(c.GG[b.hc()]=f)};c.xu=function(b,a,e){c.IG[b.hc()+"-"+a.hc()]=e};c.Em=function(b){b=c.AG[b.hc()];if(void 0==b)throw a.g.qe();return b};c.IC=function(b){b=c.CG[b.hc()];
if(void 0==b)throw a.g.qe();return b};c.ft=function(b){b=c.iz[b.hc()];if(void 0==b)throw a.g.qe();return b};c.Ts=function(b){b=c.lG[b.hc()];if(void 0==b)throw a.g.qe();return b};c.Fm=function(b){b=c.GG[b.hc()];if(void 0==b)throw a.g.qe();return a.i.Oa(b[0],b[1],b[2],b[3])};c.Qo=function(b){b=c.EG[b.hc()];if(void 0==b)throw a.g.qe();return b};c.Wl=function(b,e,d){if(e.lc(d))return b;var h=c.IG[e.hc()+"-"+d.hc()];if(void 0!==h)return h(b,e,d);throw a.g.qe();};c.tu=function(){throw a.g.qe();};c.qN=function(){throw a.g.qe();
};c.YQ=function(){throw a.g.qe();};c.TN=function(){throw a.g.qe();};c.qR=function(){var c=a.Nf.create(102100),d=a.Nf.create(3857),h=a.Nf.create(4326);a.Ya.oy(c,h,NaN,NaN,NaN,!1,null);a.Ya.oy(h,h,1,.0033528106647474805,6378137,!0,[-180,-90,180,90]);a.Ya.oy(d,h,NaN,NaN,NaN,!1,null);a.Ya.xu(c,h,b);a.Ya.xu(h,c,e);a.Ya.xu(d,h,b);a.Ya.xu(h,d,e)};c.AG=[];c.CG=[];c.iz=[];c.lG=[];c.EG=[];c.GG=[];c.IG=[];return c}();a.Ya=k})(z||(z={}));z.Ya.qR();(function(a){var d=function(){function d(c){this.f=null;this.qg=
-1;this.Xc=this.size=this.We=0;this.Ic=c}d.prototype.Jc=function(c){c<this.We?(this.f[c*this.Ic]=this.qg,this.qg=c):this.We--;this.size--};d.prototype.O=function(c,b){return this.f[c*this.Ic+b]};d.prototype.L=function(c,b,a){this.f[c*this.Ic+b]=a};d.prototype.be=function(){var c=this.qg;if(-1==c){if(this.We==this.Xc){c=0!=this.Xc?a.I.truncate(3*(this.Xc+1)/2):1;2147483647<c&&(c=2147483647);if(c==this.Xc)throw a.g.Uc();this.Gm(c)}c=this.We;this.We++}else this.qg=this.f[c*this.Ic];this.size++;for(var b=
c*this.Ic+this.Ic,e=c*this.Ic;e<b;e++)this.f[e]=-1;return c};d.prototype.Pj=function(c){var b=this.qg;if(-1==b){if(this.We==this.Xc){b=0!=this.Xc?a.I.truncate(3*(this.Xc+1)/2):1;2147483647<b&&(b=2147483647);if(b==this.Xc)throw a.g.Uc();this.Gm(b)}b=this.We;this.We++}else this.qg=this.f[b*this.Ic];this.size++;for(var e=b*this.Ic,d=this.Ic,h=0;h<d;h++)this.f[e+h]=c[h];return b};d.prototype.Nh=function(c){this.qg=-1;this.size=this.We=0;c&&(this.f=null,this.Xc=0)};d.prototype.de=function(c){c>this.Xc&&
this.Gm(c)};d.prototype.Pu=function(c,b,a){var e=this.f[this.Ic*b+a];this.f[this.Ic*b+a]=this.f[this.Ic*c+a];this.f[this.Ic*c+a]=e};d.Zk=function(){return-2};d.lm=function(){return-3};d.Zw=function(c){return 0<=c};d.prototype.Gm=function(c){null==this.f&&(this.f=[]);this.Xc=c};return d}();a.Fc=d;d=function(){function d(c){this.f=new Int32Array(0);this.qg=-1;this.Xc=this.size=this.We=0;this.Ic=c}d.prototype.Jc=function(c){c<this.We?(this.f[c*this.Ic]=this.qg,this.qg=c):this.We--;this.size--};d.prototype.O=
function(c,b){return this.f[c*this.Ic+b]};d.prototype.L=function(c,b,a){this.f[c*this.Ic+b]=a};d.prototype.be=function(){var c=this.qg;if(-1==c){if(this.We==this.Xc){c=0!=this.Xc?a.I.truncate(3*(this.Xc+1)/2):1;2147483647<c&&(c=2147483647);if(c==this.Xc)throw a.g.Uc();this.Gm(c)}c=this.We;this.We++}else this.qg=this.f[c*this.Ic];this.size++;for(var b=c*this.Ic;b<c*this.Ic+this.Ic;b++)this.f[b]=-1;return c};d.prototype.Pj=function(c){var b=this.qg;if(-1==b){if(this.We==this.Xc){b=0!=this.Xc?a.I.truncate(3*
(this.Xc+1)/2):1;2147483647<b&&(b=2147483647);if(b==this.Xc)throw a.g.Uc();this.Gm(b)}b=this.We;this.We++}else this.qg=this.f[b*this.Ic];this.size++;for(var e=b*this.Ic,d=0;d<c.length;d++)this.f[e+d]=c[d];return b};d.prototype.Nh=function(c){this.qg=-1;this.size=this.We=0;c&&(this.f=null,this.Xc=0)};d.prototype.de=function(c){c>this.Xc&&this.Gm(c)};d.prototype.Pu=function(c,b,a){var e=this.f[this.Ic*b+a];this.f[this.Ic*b+a]=this.f[this.Ic*c+a];this.f[this.Ic*c+a]=e};d.Zk=function(){return-2};d.lm=
function(){return-3};d.Zw=function(c){return 0<=c};d.prototype.Gm=function(c){null==this.f&&(this.f=new Int32Array(0));var b=new Int32Array(this.Ic*c);b.set(this.f,0);this.f=b;this.Xc=c};return d}();a.II=d;!0===a.ah.Sk&&(a.Fc=a.II)})(z||(z={}));(function(a){var d;(function(b){b[b.enumInputModeBuildGraph=0]="enumInputModeBuildGraph";b[b.enumInputModeSimplifyAlternate=4]="enumInputModeSimplifyAlternate";b[b.enumInputModeSimplifyWinding=5]="enumInputModeSimplifyWinding";b[b.enumInputModeIsSimplePolygon=
7]="enumInputModeIsSimplePolygon"})(d||(d={}));var h=function(){function b(b){this.me=b;this.Zg=NaN;this.LD=new a.Ag;this.MD=new a.Ag;this.Aq=new a.Nd;this.Bq=new a.Nd}b.prototype.compare=function(b,c,a){b=b.da(a);this.me.iy(c,this.LD);this.me.iy(b,this.MD);c=this.LD.get();b=this.MD.get();this.Aq.K(c.na,c.la);this.Bq.K(b.na,b.la);if(this.Aq.va<this.Bq.qa)return-1;if(this.Aq.qa>this.Bq.va)return 1;a=c.ja==c.ha;var e=b.ja==b.ha;if(a||e){if(a&&e)return 0;if(c.ja==b.ja&&c.na==b.na)return a?1:-1;if(c.ha==
b.ha&&c.la==b.la)return a?-1:1}a=c.xe(this.Zg,this.Aq.qa);e=b.xe(this.Zg,this.Bq.qa);a==e&&(a=Math.min(c.ha,b.ha),e=.5*(a+this.Zg),e==this.Zg&&(e=a),a=c.xe(e,this.Aq.qa),e=b.xe(e,this.Bq.qa));return a<e?-1:a>e?1:0};b.prototype.$F=function(b){this.Zg=b};return b}(),c=function(){function b(b){this.ab=b;this.uE=new a.Ag;this.nf=new a.b;this.xx=new a.Nd}b.prototype.eS=function(b){this.nf.J(b)};b.prototype.compare=function(b,c){this.ab.iy(b.da(c),this.uE);b=this.uE.get();this.xx.K(b.na,b.la);if(this.nf.x<
this.xx.qa)return-1;if(this.nf.x>this.xx.va)return 1;b=b.xe(this.nf.y,this.nf.x);return this.nf.x<b?-1:this.nf.x>b?1:0};return b}();d=function(){function b(){this.OD=this.Vh=this.Yh=this.px=this.Pm=this.je=this.xc=this.Ig=this.Td=null;this.sn=this.eg=-1;this.ND=!0;this.tx=!1;this.qx=NaN;this.ei=new a.wd;this.EK=2147483647;this.DK=a.I.truncate(-2147483648);this.Kf=this.Md=this.Ek=this.lp=this.Bl=this.kp=this.Zq=this.Be=-1;this.ta=0}b.prototype.Mv=function(b){this.qx=b};b.prototype.Ul=function(){null==
this.Td&&(this.Td=new a.Fc(8));var b=this.Td.be();this.Td.L(b,1,0);return b};b.prototype.kQ=function(){null==this.xc&&(this.xc=new a.Fc(8));var b=this.xc.be();this.xc.L(b,2,0);this.xc.L(b,3,0);var c=this.xc.be();this.xc.L(c,2,0);this.xc.L(c,3,0);this.GF(b,c);this.GF(c,b);return b};b.prototype.FE=function(){null==this.je&&(this.je=new a.Fc(8));var b=this.je.be();this.je.L(b,2,0);return b};b.prototype.QR=function(b,c){this.Td.L(b,7,c)};b.prototype.em=function(b,c){this.Td.L(b,2,c)};b.prototype.PR=function(b,
c){this.Td.L(b,1,c)};b.prototype.fS=function(b,c){this.Td.L(b,3,c)};b.prototype.cS=function(b,c){this.Td.L(b,4,c)};b.prototype.Lp=function(b,c){this.Td.L(b,5,c)};b.prototype.uN=function(b){return this.Td.O(b,5)};b.prototype.OR=function(b,c){this.Td.L(b,6,c)};b.prototype.IJ=function(b,c){this.OR(c,b)};b.prototype.FF=function(b,c){this.xc.L(b,1,c)};b.prototype.GF=function(b,c){this.xc.L(b,4,c)};b.prototype.Rk=function(b,c){this.xc.L(b,5,c)};b.prototype.Qk=function(b,c){this.xc.L(b,6,c)};b.prototype.VR=
function(b,c){this.xc.L(b,2,c)};b.prototype.Du=function(b,c){this.xc.L(b,3,c)};b.prototype.zC=function(b){return this.xc.O(b,3)};b.prototype.Ir=function(b,c){this.xc.L(b,7,c)};b.prototype.zG=function(b,c){if(-1!=this.ql(b))for(c=c?-1:b,b=this.ql(b);-1!=b;b=this.zq(b))this.a.lb(this.Gi(b),this.lp,c)};b.prototype.Tu=function(b,c){-1!=b&&(this.zG(b,c),this.zG(this.sa(b),c))};b.prototype.Gr=function(b,c){this.je.L(b,1,c)};b.prototype.yg=function(b,c){this.je.L(b,2,c)};b.prototype.cm=function(b,c){this.je.L(b,
3,c);this.LR(b,this.tN(c));this.KR(c,b)};b.prototype.KR=function(b,c){this.je.L(b,4,c)};b.prototype.LR=function(b,c){this.je.L(b,5,c)};b.prototype.AF=function(b,c){this.je.L(b,6,c)};b.prototype.yF=function(b,c){this.je.L(b,7,c)};b.prototype.xF=function(b,c){this.Pm.write(b,c)};b.prototype.zF=function(b,c){this.px.write(b,c)};b.prototype.bT=function(b){var c=0,e=0,d=this.pC(b),h=new a.b,f=new a.b,g=new a.b;this.tq(d,h);f.J(h);var l=d;do this.pl(l,g),e+=a.b.Fb(f,g),this.Pe(this.sa(l))!=b&&(c+=(g.x-
h.x-(f.x-h.x))*(g.y-h.y+(f.y-h.y))*.5),f.J(g),l=this.Wb(l);while(l!=d);this.Pm.write(b,c);this.px.write(b,e)};b.prototype.GQ=function(b){var e=new h(this),d=new a.bj;d.de(a.I.truncate(this.ta/2));d.Hn(e);for(var f=new a.ga(0),g=this.Eg(),l=null,m=0,p=new a.b,q=this.Be;-1!=q;q=this.Bf(q)){m++;var r=this.te(q);if(-1!=r){f.cf(0);if(!this.VS(d,g,f,r)){this.w(q,p);e.$F(p.y);var v=r;do{var x=this.tb(v,g);-1!=x&&(d.kd(x,-1),this.Bb(v,g,-2));v=this.Wb(this.sa(v))}while(r!=v);v=r;do x=this.tb(v,g),-1==x&&
(x=d.addElement(v,-1),f.add(x)),v=this.Wb(this.sa(v));while(r!=v)}for(r=f.size-1;0<=r;r--)x=f.get(r),v=d.da(x),this.Bb(this.sa(v),g,x),this.FQ(d,x,b)}else-1==this.mw(q)&&(null==l&&(l=new c(this)),this.w(q,p),l.eS(p),v=d.GR(l),r=this.Ek,-1!=v&&(x=d.da(v),this.Pe(x)==this.Pe(this.sa(x))&&(x=this.BC(d,v)),-1!=x&&(r=this.Pe(x))),this.IJ(r,q))}this.kh(g)};b.prototype.FQ=function(b,c,a){var e=b.da(c),d=this.Pe(e);if(-1==this.ym(d)){var h=this.BC(b,c),f=this.sa(e),k=this.Pe(f);this.yo(d);this.yo(k);var g=
this.ym(d),l=this.ym(k);-1==h&&-1==g&&(k==d?(this.cm(k,this.Ek),g=l=this.Ek):(-1==l&&(this.cm(k,this.Ek),l=this.Ek),this.cm(d,k),g=k));if(-1!=h){var n=this.Pe(h);-1==l&&(0>=this.yo(n)?(l=this.ym(n),this.cm(k,l)):(this.cm(k,n),l=n),k==d&&(g=l))}-1==g&&this.WS(d,k);0==a?this.aR(b,c,e,h,d,k):5==a?this.bR(b,c,e,f,d,k):4==a&&this.$Q(e,h,d,k)}};b.prototype.aR=function(b,c,a,d,h,f){var e=this.pj(h);if(-1!=d){var k=this.pj(f),g=this.pj(this.Pe(d));d=e&k&g;g^=g&this.Gg(a);g|=d;0!=g&&(this.yg(f,k|g),this.yg(h,
g|e),e=e||g)}for(c=b.bb(c);-1!=c;c=b.bb(c)){d=b.da(c);a=this.Pe(this.sa(d));h=this.pj(a);f=this.Gg(d);k=this.Pe(d);g=this.pj(k);d=h&g&e;e^=e&f;e|=d;if(0==e)break;this.yg(a,h|e);this.yg(k,g|e)}};b.prototype.bR=function(b,c,d,h,f,g){if(f!=g){d=this.tb(d,this.Kf);d+=this.tb(h,this.Kf);h=0;var e=new a.ga(0),k=new a.ga(0);k.add(0);for(var l=b.gc(-1);l!=c;l=b.bb(l)){var n=b.da(l),m=this.sa(n),p=this.Pe(n),q=this.Pe(m);if(p!=q){n=this.tb(n,this.Kf);n+=this.tb(m,this.Kf);h+=n;m=!1;0!=e.size&&e.tc()==q&&(k.af(),
e.af(),m=!0);if(-1==this.ym(q))throw a.g.wa();m&&this.ym(q)==p||(k.add(h),e.add(p))}}h+=d;0!=e.size&&e.tc()==g&&(k.af(),e.af());0!=h?0==k.tc()&&(b=this.a.$c,b=this.ya(b),this.yg(f,b)):0!=k.tc()&&(b=this.a.$c,b=this.ya(b),this.yg(f,b))}};b.prototype.$Q=function(b,c,a,d){var e=this.ya(this.a.$c);if(-1==c)this.yg(d,this.sn),b=this.tb(b,this.eg),0!=(b&1)?this.yg(a,e):this.yg(a,this.sn);else{var h=this.pj(d);0==h&&(h=this.pj(this.Pe(c)),this.yg(d,h));b=this.tb(b,this.eg);0!=(b&1)?this.yg(a,h==e?this.sn:
e):this.yg(a,h)}};b.prototype.VS=function(b,c,a,d){var e=d,h=-1,f=-1,k=0;do{if(2==k)return!1;var g=this.tb(e,c);if(-1!=g){if(-1!=h)return!1;h=g}else{if(-1!=f)return!1;f=e}k++;e=this.Wb(this.sa(e))}while(d!=e);if(-1==f||-1==h)return!1;this.Bb(b.da(h),c,-2);b.Vi(h,f);a.add(h);return!0};b.prototype.WS=function(b,c){var a=this.yo(b);if(0!=a){var e=this.yo(c);0<a&&0>e?this.cm(b,c):0>a&&0<e?this.cm(b,c):(a=this.ym(c),-1!=a&&this.cm(b,a))}};b.prototype.RL=function(b,c){this.lp=this.a.re();for(var e=0,d=
c.size;e<d;e++){var h=c.get(e),f=this.a.Ra(h,this.Bl),k=this.a.Vf(this.a.rd(h)),g=this.a.Lb(k);if(a.T.Kc(g)){var l=this.a.X(h);if(-1!=l){var m=this.a.Ra(l,this.Bl);if(f!=m){var p=this.kQ(),q=this.sa(p),r=this.Ig.be();this.Ig.L(r,0,h);this.Ig.L(r,1,-1);this.Ir(p,r);this.FF(p,f);r=this.te(f);-1==r?(this.em(f,p),this.Rk(p,q),this.Qk(q,p)):(f=this.fe(r),this.Rk(r,q),this.Qk(q,r),this.Qk(f,p),this.Rk(p,f));this.FF(q,m);f=this.te(m);-1==f?(this.em(m,q),this.Qk(p,q),this.Rk(q,p)):(m=this.fe(f),this.Rk(f,
p),this.Qk(p,f),this.Qk(m,q),this.Rk(q,m));k=this.ya(k);0==b?(this.Bb(q,this.Md,0),this.Bb(p,this.Md,1736==g?k:0)):5==b?(m=new a.b,this.a.w(h,m),h=new a.b,this.a.w(l,h),f=l=0,0>m.compare(h)?l=1:f=-1,this.Bb(q,this.Md,0),this.Bb(p,this.Md,0),this.Bb(p,this.Kf,l),this.Bb(q,this.Kf,f)):7==b?(this.Bb(q,this.Md,this.sn),this.Bb(p,this.Md,1736==g?k:0)):4==b&&(this.Bb(q,this.Md,0),this.Bb(p,this.Md,0),this.Bb(p,this.eg,1),this.Bb(q,this.eg,1));g=1736==g?this.DK:0;this.Du(p,k|g);this.Du(q,k|g)}}}}};b.prototype.ZP=
function(b,c){var a=this.ql(c);if(-1!=a){var e=this.ql(b);this.Ig.L(a,1,e);this.Ir(b,a);this.Ir(c,-1)}b=this.sa(b);c=this.sa(c);a=this.ql(c);-1!=a&&(e=this.ql(b),this.Ig.L(a,1,e),this.Ir(b,a),this.Ir(c,-1))};b.prototype.AS=function(b){function c(b,c){return d.lL(b,c)}var e=new a.ga(0);e.xb(10);for(var d=this,h=this.Be;-1!=h;h=this.Bf(h)){e.clear(!1);var f=this.te(h);if(-1!=f){var g=f;do e.add(g),g=this.Wb(this.sa(g));while(g!=f);if(1<e.size){g=!0;if(2<e.size)e.xd(0,e.size,c),e.add(e.get(0));else if(0<
this.kL(e.get(0),e.get(1))){var l=e.get(0);e.set(0,e.get(1));e.set(1,l)}else g=!1;for(var m=l=e.get(0),p=this.jf(m),q=this.sa(m),r=-1,v=1,x=e.size;v<x;v++){var w=e.get(v),y=this.sa(w),t=this.qj(y);if(t==p&&w!=m){if(0==b)r=this.zC(m)|this.zC(w),this.Du(m,r),this.Du(q,r),this.Bb(m,this.Md,this.tb(m,this.Md)|this.tb(w,this.Md)),this.Bb(q,this.Md,this.tb(q,this.Md)|this.tb(y,this.Md));else if(-1!=this.Kf)r=this.tb(m,this.Kf)+this.tb(w,this.Kf),y=this.tb(q,this.Kf)+this.tb(y,this.Kf),this.Bb(m,this.Kf,
r),this.Bb(q,this.Kf,y);else{if(7==b){this.ei=new a.wd(5,h,-1);return}-1!=this.eg&&(r=this.tb(m,this.eg)+this.tb(w,this.eg),y=this.tb(q,this.eg)+this.tb(y,this.eg),this.Bb(m,this.eg,r),this.Bb(q,this.eg,y))}this.ZP(m,w);this.Wv(w);r=m;e.set(v,-1);w==l&&(e.set(0,-1),l=-1)}else this.Tu(r,!1),r=-1,m=w,p=t,q=y}this.Tu(r,!1);r=-1;if(g){l=-1;v=0;for(x=e.size;v<x;v++)if(w=e.get(v),-1!=w)if(-1==l)m=l=w,p=this.jf(m),q=this.sa(m);else if(w!=m&&(y=this.sa(w),t=this.qj(y),this.Qk(q,w),this.Rk(w,q),m=w,p=t,q=
y,7==b&&(this.tb(w,this.Md)|this.tb(this.fe(w),this.Md))==(this.sn|1))){this.ei=new a.wd(5,h,-1);return}this.em(h,l)}else{l=-1;v=0;for(x=e.size;v<x;v++)if(w=e.get(v),-1!=w){l=w;break}f!=l&&this.em(h,l)}}}}};b.prototype.AK=function(){for(var b=-1,c=this.Eg(),d=this.Be;-1!=d;d=this.Bf(d)){var h=this.te(d);if(-1!=h){var f=h;do{if(1!=this.tb(f,c)){var g=this.FE();this.Gr(g,f);this.yF(g,b);-1!=b&&this.AF(b,g);var b=g,l=0,m=f;do l|=this.tb(m,this.Md),this.VR(m,g),this.Bb(m,c,1),m=this.Wb(m);while(m!=f);
this.yg(g,l)}f=this.Wb(this.sa(f))}while(f!=h)}}g=this.FE();this.Gr(g,-1);this.yF(g,b);-1!=b&&this.AF(b,g);this.Ek=g;this.Pm=a.qd.Yc(this.je.size,NaN);this.px=a.qd.Yc(this.je.size,NaN);this.xF(this.Ek,Infinity);this.zF(this.Ek,Infinity);this.kh(c)};b.prototype.EN=function(b,c,a){c=-1!=c?c:this.te(b);if(-1==c)return-1;for(b=c;;){if(1!=this.tb(c,a))return c;c=this.Wb(this.sa(c));if(c==b)return-1}};b.prototype.uR=function(){for(var b=this.Eg(),c=this.Be;-1!=c;c=this.Bf(c))for(var a=-1;;){var d=this.EN(c,
a,b);if(-1==d)break;for(var a=this.Wb(this.sa(d)),h=d;;){var f=this.Wb(h),g=this.fe(h),l=this.sa(h);if(g==l){this.bM(h);if(a==h||a==l)a=-1;if(h==d||g==d){d=f;if(h==d||g==d)break;h=f;continue}}else this.Bb(h,b,1);h=f;if(h==d)break}}};b.prototype.Ay=function(b,c,d,h){this.xg();this.ND=h;this.a=b;this.kp=this.a.RB();b=new a.ga(0);b.xb(null!=d?this.a.F(d.get(0)):this.a.pd);var e=0,f=1,k=null!=d?d.get(0):this.a.$c;for(h=1;-1!=k;){this.a.EF(k,this.kp,f);for(var f=f<<1,g=this.a.Vb(k);-1!=g;g=this.a.bc(g))for(var l=
this.a.Cb(g),n=0,m=this.a.Ha(g);n<m;n++)b.add(l),l=this.a.X(l);a.T.Km(this.a.Lb(k))||(e+=this.a.ea(k));null!=d?(k=h<d.size?d.get(h):-1,h++):k=this.a.we(k)}this.sn=f;this.ta=b.size;this.a.Mu(b,this.ta);null==this.Ig&&(this.Ig=new a.Fc(2),this.Td=new a.Fc(8),this.xc=new a.Fc(8),this.je=new a.Fc(8));this.Ig.de(this.ta);this.Td.de(this.ta+10);this.xc.de(2*this.ta+32);this.je.de(Math.max(32,e));this.Bl=this.a.re();d=new a.b;h=0;e=new a.b;d.Eh();for(f=0;f<=this.ta;f++)if(f<this.ta?(l=b.get(f),this.a.w(l,
e)):e.Eh(),!d.ub(e)){if(h<f){l=this.Ul();for(m=n=-1;h<f;h++)m=b.get(h),this.a.lb(m,this.Bl,l),k=this.Ig.be(),this.Ig.L(k,0,m),this.Ig.L(k,1,n),n=k,g=this.a.rd(m),k=this.a.Vf(g),k=this.ya(k),this.PR(l,this.md(l)|k);this.QR(l,n);this.Lp(l,this.a.gb(m));-1!=this.Zq&&this.cS(this.Zq,l);this.fS(l,this.Zq);this.Zq=l;-1==this.Be&&(this.Be=l)}h=f;d.J(e)}this.Md=this.Eg();5==c&&(this.Kf=this.Eg());4==c&&(this.eg=this.Eg());this.RL(c,b);0==this.ei.yh&&(this.AS(c),0==this.ei.yh&&(isNaN(this.qx)||this.ZK()?(this.AK(),
0==this.ei.yh&&(this.kh(this.Md),this.Md=-1,this.ND&&this.GQ(c))):this.tx=!0))};b.prototype.Wv=function(b){var c=this.Wb(b),a=this.fe(b),e=this.sa(b),d=this.Wb(e),h=this.fe(e);c!=e&&(this.Qk(h,c),this.Rk(c,h));a!=e&&(this.Qk(a,d),this.Rk(d,a));a=this.qj(b);this.te(a)==b&&(d!=b?this.em(a,d):this.em(a,-1));d=this.qj(e);this.te(d)==e&&(c!=e?this.em(d,c):this.em(d,-1));this.xc.Jc(b);this.xc.Jc(e)};b.prototype.BC=function(b,c){for(;;)if(c=b.ge(c),-1!=c){var a=b.da(c);if(this.Pe(a)!=this.Pe(this.sa(a)))return a}else return-1};
b.prototype.Mp=function(b,c,a){void 0===a&&(a=!0);this.Ay(b,0,null,a)};b.prototype.tF=function(b,c){var e=new a.ga(0);e.add(c);this.Ay(b,4,e,1736==b.Lb(c))};b.prototype.uF=function(b,c){var e=new a.ga(0);e.add(c);this.Ay(b,5,e,!0)};b.prototype.xg=function(){null!=this.a&&(-1!=this.kp&&(this.a.tR(this.kp),this.kp=-1),-1!=this.Bl&&(this.a.bf(this.Bl),this.Bl=-1),-1!=this.lp&&(this.a.bf(this.lp),this.lp=-1),-1!=this.Md&&(this.kh(this.Md),this.Md=-1),-1!=this.Kf&&(this.kh(this.Kf),this.Kf=-1),-1!=this.eg&&
(this.kh(this.eg),this.eg=-1),this.a=null,this.Td.Nh(!0),this.Ig.Nh(!0),this.Zq=this.Be=-1,null!=this.xc&&this.xc.Nh(!0),null!=this.Yh&&(this.Yh.length=0),null!=this.Vh&&(this.Vh.length=0),null!=this.OD&&(this.OD.length=0),null!=this.je&&this.je.Nh(!0),this.Ek=-1,this.Pm=null)};b.prototype.te=function(b){return this.Td.O(b,2)};b.prototype.w=function(b,c){this.a.SC(this.uN(b),c)};b.prototype.md=function(b){return this.Td.O(b,1)};b.prototype.Bf=function(b){return this.Td.O(b,4)};b.prototype.mw=function(b){return this.Td.O(b,
6)};b.prototype.ol=function(b){return this.Td.O(b,7)};b.prototype.zq=function(b){return this.Ig.O(b,1)};b.prototype.Gi=function(b){return this.Ig.O(b,0)};b.prototype.Sf=function(b,c){c=this.Vh[c];return c.size<=b?-1:c.read(b)};b.prototype.fm=function(b,c,a){c=this.Vh[c];c.size<=b&&c.resize(this.Td.size,-1);c.write(b,a)};b.prototype.uo=function(){null==this.Vh&&(this.Vh=[]);for(var b=a.ga.Yc(this.Td.Xc,-1),c=0,d=this.Vh.length;c<d;c++)if(null==this.Vh[c])return this.Vh[c]=b,c;this.Vh.push(b);return this.Vh.length-
1};b.prototype.vo=function(b){this.Vh[b]=null};b.prototype.qj=function(b){return this.xc.O(b,1)};b.prototype.jf=function(b){return this.qj(this.sa(b))};b.prototype.sa=function(b){return this.xc.O(b,4)};b.prototype.fe=function(b){return this.xc.O(b,5)};b.prototype.Wb=function(b){return this.xc.O(b,6)};b.prototype.Pe=function(b){return this.xc.O(b,2)};b.prototype.Qe=function(b){return this.pj(this.xc.O(b,2))};b.prototype.ql=function(b){return this.xc.O(b,7)};b.prototype.tq=function(b,c){this.w(this.qj(b),
c)};b.prototype.pl=function(b,c){this.w(this.jf(b),c)};b.prototype.Gg=function(b){return this.xc.O(b,3)&this.EK};b.prototype.tb=function(b,c){c=this.Yh[c];return c.size<=b?-1:c.read(b)};b.prototype.Bb=function(b,c,a){c=this.Yh[c];c.size<=b&&c.resize(this.xc.size,-1);c.write(b,a)};b.prototype.Eg=function(){null==this.Yh&&(this.Yh=[]);for(var b=a.ga.Yc(this.xc.Xc,-1),c=0,d=this.Yh.length;c<d;c++)if(null==this.Yh[c])return this.Yh[c]=b,c;this.Yh.push(b);return this.Yh.length-1};b.prototype.kh=function(b){this.Yh[b]=
null};b.prototype.bM=function(b){var c=this.Pe(b),a=this.Wb(b);a==this.sa(b)&&(a=this.Wb(a),a==b&&(a=-1));this.pC(c)==b&&this.Gr(c,a);a=this.Pm.read(c);isNaN(a)||(this.xF(c,NaN),this.zF(c,NaN));this.Tu(b,!0);this.Wv(b)};b.prototype.cM=function(b){for(var c=0,a=b.size;c<a;c++){var e=b.get(c),d=this.Pe(this.sa(e));this.Gr(this.Pe(e),-1);this.Gr(d,-1);this.Tu(e,!0);this.Wv(e)}};b.prototype.pC=function(b){return this.je.O(b,1)};b.prototype.pj=function(b){return this.je.O(b,2)};b.prototype.ym=function(b){return this.je.O(b,
3)};b.prototype.tN=function(b){return this.je.O(b,4)};b.prototype.yo=function(b){var c=this.Pm.read(b);isNaN(c)&&(this.bT(b),c=this.Pm.read(b));return c};b.prototype.ya=function(b){return this.a.yC(b,this.kp)};b.prototype.se=function(b){return this.a.Ra(b,this.Bl)};b.prototype.GN=function(b){return this.a.Ra(b,this.lp)};b.prototype.FN=function(b,c){var a=this.te(b);if(-1==a)return-1;var e=a,d=-1,h=-1;do{if(this.jf(e)==c)return e;if(-1==d){d=this.te(c);if(-1==d)break;h=d}if(this.jf(h)==b)return e=
this.sa(h);e=this.Wb(this.sa(e));h=this.Wb(this.sa(h))}while(e!=a&&h!=d);return-1};b.prototype.iy=function(b,c){c.mq();c=c.get();var e=new a.b;this.tq(b,e);c.ed(e);this.pl(b,e);c.vd(e)};b.prototype.lL=function(b,c){if(b==c)return 0;var e=new a.b;this.pl(b,e);var d=new a.b;this.pl(c,d);if(e.ub(d))return 0;c=new a.b;this.tq(b,c);b=new a.b;b.pc(e,c);e=new a.b;e.pc(d,c);return a.b.cq(b,e)};b.prototype.kL=function(b,c){if(b==c)return 0;var e=new a.b;this.pl(b,e);var d=new a.b;this.pl(c,d);if(e.ub(d))return 0;
c=new a.b;this.tq(b,c);b=new a.b;b.pc(e,c);e=new a.b;e.pc(d,c);return 0<=e.y&&0<b.y?a.b.cq(b,e):0};b.prototype.ZK=function(){for(var b=a.vi.Ty(this.qx),c=new a.b,d=new a.b,h=new a.b,f=new a.b,g=new a.b,l=this.Be;-1!=l;l=this.Bf(l)){var m=this.te(l);if(-1!=m){var p=m;this.tq(p,c);this.pl(p,d);g.pc(d,c);var q=g.Up();do{var r=p,p=this.Wb(this.sa(p));if(p!=r){this.pl(p,h);f.pc(h,c);var r=f.Up(),v=f.Ai(g);if(v*v/(r*q)*Math.min(r,q)<=b)return!1;g.J(f);q=r;d.J(h)}}while(p!=m)}}return!0};return b}();a.gs=
d})(z||(z={}));(function(a){var d=function(){function d(){this.h=null;this.TD=new a.b;this.UD=new a.b;this.Qg=null;this.Gq=!1;this.Ym=-1}d.prototype.Te=function(c){return c<this.Qg.length?this.Qg[c]:!1};d.prototype.xm=function(c,b,e,d){var h=a.T.ve(this.h.a.Lb(e));if(2==a.T.ve(this.h.a.Lb(b))&&1==h)this.WL(c,b,e,d);else throw a.g.wa();};d.prototype.Mp=function(c,b){null==this.h&&(this.h=new a.gs);this.h.Mp(c,b)};d.prototype.Np=function(c,b,e){a.aj.$(c,b,e,!0);for(b=c.$c;-1!=b;b=c.we(b))1736==c.Lb(b)&&
a.mm.$(c,b,-1,this.Gq,e);this.Mp(c,e)};d.prototype.EB=function(c,b,a,d,h){var e=this.h.a;if(1736==e.Lb(c))for(c=e.Vb(c);-1!=c;c=e.bc(c)){var f=e.Cb(c);this.h.se(f);this.h.se(e.X(f));var k=this.h.GN(f);if(-1!=k){var g=this.h.tb(k,a);if(1!=g&&2!=g)if(this.Te(this.h.Qe(k))){this.h.Bb(k,a,1);var g=e.Cf(b,-1),l=k,n=this.h.se(f),m=1;do{var p=this.tl(f,h);e.zi(g,p);-1!=d&&this.h.fm(n,d,1);this.h.Bb(l,a,1);var l=this.h.Wb(l),q;do p=1==m?e.X(f):e.Ua(f),q=-1!=p?this.h.se(p):-1;while(q==n);var r=this.h.qj(l);
if(r!=q){do p=1==m?e.Ua(f):e.X(f),q=-1!=p?this.h.se(p):-1;while(q==n);r!=q?(q=r,p=this.h.Gi(this.h.ol(q))):m=-m}n=q;f=p}while(l!=k);e.Gn(g,!0)}else this.h.Bb(k,a,2)}}};d.prototype.UB=function(){for(var c=this.h.Eg(),b=new a.ga(0),e=this.h.Be;-1!=e;e=this.h.Bf(e)){var d=this.h.te(e),h=d;if(-1!=d){do{if(1!=this.h.tb(h,c)){var f=this.h.sa(h);this.h.Bb(f,c,1);this.h.Bb(h,c,1);this.Te(this.h.Qe(h))&&this.Te(this.h.Qe(f))&&b.add(h)}h=this.h.Wb(this.h.sa(h))}while(h!=d)}}this.h.kh(c);this.h.cM(b)};d.prototype.tl=
function(c,b){return-1==b?c:this.kO(c,b)};d.prototype.kO=function(c,b){var a=this.h.a,d,h,f=this.h.ol(this.h.se(c));do{d=this.h.Gi(f);h=a.Vf(a.rd(d));if(h==b)return d;f=this.h.zq(f)}while(-1!=f);return c};d.prototype.Xp=function(c,b,e){this.UB();var d=this.h.a,h=d.jg(1736),f=this.h.Eg();this.pG(c,b,h,e,f,-1);this.h.kh(f);a.mm.$(d,h,1,this.Gq,null);return h};d.prototype.pG=function(c,b,a,d,h,f){this.EB(c,a,h,f,d);-1!=b&&this.EB(b,a,h,f,d);c=this.h.a;for(b=this.h.Be;-1!=b;b=this.h.Bf(b)){var e=this.h.te(b);
if(-1!=e){var k=e;do{var g=this.h.tb(k,h);if(1!=g&&2!=g)if(this.Te(this.h.Qe(k))){var g=c.Cf(a,-1),l=k;do{var m=this.h.ql(l);-1!=m?m=this.h.Gi(m):(m=this.h.Gi(this.h.ql(this.h.sa(l))),m=this.h.a.X(m));m=this.tl(m,d);c.zi(g,m);this.h.Bb(l,h,1);-1!=f&&(m=this.h.se(m),this.h.fm(m,f,1));l=this.h.Wb(l)}while(l!=k);c.Gn(g,!0)}else this.h.Bb(k,h,2);k=this.h.Wb(this.h.sa(k))}while(k!=e)}}};d.prototype.RS=function(c,b,e){var d=this.h.a,h=d.jg(1736),f=d.jg(1607),g=d.jg(550);this.UB();var l=-1,m=this.h.Eg(),
p=this.h.uo();this.pG(c,b,h,e,m,p);for(c=this.h.Be;-1!=c;c=this.h.Bf(c))if(b=this.h.te(c),-1!=b){var q=b;do{var r=this.h.tb(q,m),v=this.h.tb(this.h.sa(q),m),r=r|v;if(2==r)if(r=this.h.Gg(q),this.Te(r)){var x=d.Cf(f,-1),w=q,r=this.Au(c,d),r=this.tl(r,e);d.zi(x,r);this.h.fm(c,p,1);do{r=this.h.jf(w);v=this.Au(r,d);v=this.tl(v,e);d.zi(x,v);this.h.Bb(w,m,1);this.h.Bb(this.h.sa(w),m,1);this.h.fm(r,p,1);w=this.h.Wb(w);r=this.h.tb(w,m);v=this.h.tb(this.h.sa(w),m);r|=v;if(2!=r)break;r=this.h.Gg(w);if(!this.Te(r)){this.h.Bb(w,
m,1);this.h.Bb(this.h.sa(w),m,1);break}}while(w!=q)}else this.h.Bb(q,m,1),this.h.Bb(this.h.sa(q),m,1);q=this.h.Wb(this.h.sa(q))}while(q!=b)}for(c=this.h.Be;-1!=c;c=this.h.Bf(c))r=this.h.Sf(c,p),1!=r&&(r=this.h.md(c),this.Te(r)&&(-1==l&&(l=d.Cf(g,-1)),b=this.h.ol(c),-1!=b&&(b=this.h.Gi(b),r=this.tl(b,e),d.zi(l,r))));this.h.vo(p);this.h.kh(m);a.mm.$(d,h,1,this.Gq,null);e=[];e[0]=g;e[1]=f;e[2]=h;return e};d.prototype.Au=function(c,b){var a=-1;for(c=this.h.ol(c);-1!=c;c=this.h.zq(c)){var d=this.h.Gi(c);
-1==a&&(a=d);var h=this.h.ya(b.Vf(b.rd(d)));if(this.Te(h)){a=d;break}}return a};d.prototype.fy=function(c,b){for(var e=this.h.qj(b),d=this.h.jf(b),h=0,f=0,g=this.h.ol(e);-1!=g;g=this.h.zq(g)){var l=this.h.Gi(g),m=c.rd(l),p=this.h.ya(c.Vf(m)),q=c.X(l),r=c.Ua(l),m=c.Cb(m);m==l&&(this.Ym=b);-1!=q&&this.h.se(q)==d?(h++,this.Te(p)&&(m==q&&(this.Ym=this.h.Wb(b)),f++)):-1!=r&&this.h.se(r)==d&&(h--,this.Te(p)&&(m==r&&(this.Ym=this.h.Wb(b)),f--))}this.h.w(e,this.TD);this.h.w(d,this.UD);e=a.b.Fb(this.TD,this.UD);
return(0!=f?f:h)*e};d.prototype.Ao=function(c){return this.h.Gg(c)|this.h.Qe(c)|this.h.Qe(this.h.sa(c))};d.prototype.sG=function(c){for(var b=this.h.sa(this.h.fe(c)),a=-1;b!=c;){if(this.Te(this.Ao(b))){if(-1!=a)return-1;a=b}b=this.h.sa(this.h.fe(b))}return-1!=a?this.h.sa(a):-1};d.prototype.tG=function(c){for(var b=this.h.sa(this.h.Wb(c)),a=-1;b!=c;){if(this.Te(this.Ao(b))){if(-1!=a)return-1;a=b}b=this.h.sa(this.h.Wb(b))}return-1!=a?this.h.sa(a):-1};d.prototype.jF=function(c,b,e,d,h){var f=this.h.a,
k=c,g=this.h.sa(k);this.h.Bb(k,e,1);this.h.Bb(g,e,1);var l=this.fy(f,k);this.Ym=-1;for(var m=k,n=-1,p=!1,q=1;;){var r=this.h.fe(k);if(r==g)break;g=this.h.Wb(g);if(this.h.sa(r)!=g)if(k=this.sG(k),-1==k)break;else p=!0,g=this.h.sa(k);else k=r;if(k==c){n=c;break}r=this.Ao(k);if(!this.Te(r))break;this.h.Bb(k,e,1);this.h.Bb(g,e,1);m=k;l+=this.fy(f,k);q++}if(-1==n)for(k=c,g=this.h.sa(k),n=k;;){c=this.h.Wb(k);if(c==g)break;g=this.h.fe(g);if(this.h.sa(c)!=g)if(k=this.tG(k),-1==k){p=!0;break}else g=this.h.sa(k);
else k=c;r=this.Ao(k);if(!this.Te(r))break;this.h.Bb(k,e,1);this.h.Bb(g,e,1);n=k;l+=this.fy(f,k);q++}else if(-1!=this.Ym&&(m=this.Ym,n=this.h.fe(this.Ym),this.h.sa(n)!=this.h.Wb(this.h.sa(m))&&(n=this.sG(m),-1==n)))throw a.g.wa();0<=l||(k=n,n=this.h.sa(m),m=this.h.sa(k));e=f.Cf(b,-1);k=m;m=this.h.qj(m);p=this.h.jf(n)==m&&p;l=this.Au(m,f);l=this.tl(l,h);f.zi(e,l);-1!=d&&this.h.fm(m,d,1);m=0;for(q=p?a.I.truncate((q+1)/2):-1;;){c=this.h.jf(k);l=this.Au(c,f);l=this.tl(l,h);f.zi(e,l);m++;-1!=d&&this.h.fm(c,
d,1);p&&m==q&&(e=f.Cf(b,-1),f.zi(e,l));if(k==n)break;c=this.h.Wb(k);if(this.h.fe(this.h.sa(k))!=this.h.sa(c)){if(k=this.tG(k),-1==k)throw a.g.wa();}else k=c}};d.prototype.Yp=function(c){for(var b=this.h.a.jg(1607),a=this.h.Eg(),d=this.h.Be;-1!=d;d=this.h.Bf(d)){var h=this.h.te(d),f=h;do 1!=this.h.tb(f,a)&&this.Te(this.Ao(f))&&this.jF(f,b,a,-1,c),f=this.h.Wb(this.h.sa(f));while(f!=h)}this.h.kh(a);return b};d.prototype.SS=function(c){for(var b=this.h.a,a=b.jg(1607),d=b.jg(550),h=this.h.Eg(),f=this.h.uo(),
g=-1,l=this.h.Be;-1!=l;l=this.h.Bf(l)){var m=this.h.te(l),p=m;do{var q=this.h.tb(p,h);1!=q&&(q=this.Ao(p),this.Te(q)&&this.jF(p,a,h,f,c));p=this.h.Wb(this.h.sa(p))}while(p!=m)}for(l=this.h.Be;-1!=l;l=this.h.Bf(l))q=this.h.Sf(l,f),1!=q&&(q=this.h.md(l),this.Te(q)&&(-1==g&&(g=b.Cf(d,-1)),m=this.h.ol(l),-1!=m&&(m=this.h.Gi(m),m=this.tl(m,c),b.zi(g,m))));this.h.kh(h);this.h.vo(f);c=[];c[0]=d;c[1]=a;return c};d.prototype.Pn=function(){for(var c=this.h.a,b=c.jg(550),a=c.Cf(b,-1),d=this.h.Be;-1!=d;d=this.h.Bf(d))if(this.Te(this.h.md(d))){for(var h=
-1,f=this.h.ol(d);-1!=f;f=this.h.zq(f)){var g=this.h.Gi(f);-1==h&&(h=g);var l=this.h.ya(c.Vf(c.rd(g)));if(this.Te(l)){h=g;break}}c.zi(a,h)}return b};d.prototype.Im=function(c){this.Qg=[];for(var b=0;b<c;b++)this.Qg[b]=!1};d.qF=function(c,b,e,d){var h=c.Pa(),f=Array(1E3);a.I.Ps(f,null);var k=a.I.Lh(1E3,0),g=c.F(),l=!0,m=2==b.fb();if(1!=b.fb()&&2!=b.fb())throw a.g.wa();for(var p=0;p<g;){var q=a.I.truncate(c.fR(f,p)-p);m?a.gd.nG(b,f,q,e,k):a.gd.oG(b,f,q,e,k);for(var r=0,v=0;v<q;v++){var x=0==k[v];d||
(x=!x);x&&(l&&(l=!1,h.Pd(c,0,p)),r!=v&&h.Pd(c,p+r,p+v),r=v+1)}l||r==q||h.Pd(c,p+r,p+q);p+=q}return l?c:h};d.jD=function(c,b,e){return c instanceof a.pe?d.qF(c,b,e,!0):b instanceof a.Va?c.s()||b.s()?c.Pa():a.aj.HE(e,c,b)?a.aj.gL(c,b):c.Pa():d.mG(c,b,e,!0)};d.mt=function(c,b,e,h){var f=new a.i;c.o(f);var k=new a.i;b.o(k);var g=new a.i;g.K(f);g.Db(k);e=a.Ia.zd(e,g,!0);g=new a.i;g.K(k);k=a.Ia.As(e);g.P(k,k);if(!f.jc(g)){if(c.fb()<=b.fb())return d.Cc(d.ob(c.Pa()),c,"\x26");if(c.fb()>b.fb())return d.Cc(d.ob(b.Pa()),
c,"\x26")}k=new d;f=new a.fd;g=f.Eb(d.ob(c));b=f.Eb(d.ob(b));k.Np(f,e,h);h=k.mt(g,b);c=d.Cc(f.hf(h),c,"\x26");a.T.Kc(c.D())&&(c.hg(2,e),1736==c.D()&&c.hl());return c};d.mG=function(c,b,e,d){if(c.s())return c.Pa();if(b.s())return d?c.Pa():null;var h=[null],f=[0],k=2==b.fb();if(1!=b.fb()&&2!=b.fb())throw a.g.wa();h[0]=c.w();k?a.gd.nG(b,h,1,e,f):a.gd.oG(b,h,1,e,f);b=0==f[0];d||(b=!b);return b?c.Pa():c};d.PT=function(c,b,e){return c instanceof a.pe?d.qF(c,b,e,!1):b instanceof a.Va?c.s()?c.Pa():b.s()?
c:a.aj.HE(e,c,b)?c.Pa():c:d.mG(c,b,e,!1)};d.prototype.ME=function(c,b,e,d,h){if(c.s())return c;var f=new a.fd;c=f.Eb(c);return this.Qj(f,c,b,e,d,h)};d.prototype.EQ=function(c,b,e,d,h,f){if(h&&550!=c.Lb(b)){var k=new a.aA;k.KS(c,e);k.og?(a.aj.$(c,e,f,!0),h=!1):this.h.Mv(e)}else a.aj.$(c,e,f,!0),h=!1;d&&550!=c.Lb(b)?this.h.uF(c,b):this.h.tF(c,b);if(this.h.tx)return this.h.xg(),this.h=null,this.Qj(c,b,e,d,!1,f);this.h.Mv(NaN);f=this.h.ya(b);this.Im(f+1);this.Qg[f]=!0;if(1736==c.Lb(b)||d&&550!=c.Lb(b))return c.Pp(b,
0),b=this.Xp(b,-1,-1),c=c.hf(b),c.Pp(0),h?c.hg(1,0):(c.hg(2,e),c.hl()),c;if(1607==c.Lb(b))return b=this.Yp(-1),c=c.hf(b),h||c.hg(2,e),c;if(550==c.Lb(b))return b=this.Pn(),c=c.hf(b),h||c.hg(2,e),c;throw a.g.wa();};d.prototype.Qj=function(c,b,e,d,h,f){this.h=new a.gs;try{return this.EQ(c,b,e,d,h,f)}finally{this.h.xg()}};d.Qj=function(c,b,a,h,f){return(new d).ME(c,b,a,h,f)};d.prototype.DQ=function(c,b,e){this.Gq=c;this.h=new a.gs;c=b.Cm(e);var d=b.Lb(e);1!=c||550==d?this.h.tF(b,e):this.h.uF(b,e);if(!this.h.tx)if(this.h.Mv(NaN),
d=this.h.ya(e),this.Im(d+1),this.Qg[d]=!0,1736==b.Lb(e)||1==c&&550!=b.Lb(e))b.Pp(e,0),c=this.Xp(e,-1,-1),b.Vy(c,e),b.sy(c);else if(1607==b.Lb(e))c=this.Yp(-1),b.Vy(c,e),b.sy(c);else if(550==b.Lb(e))c=this.Pn(),b.Vy(c,e),b.sy(c);else throw a.g.ra("internal error");};d.Ry=function(c,b,a,h){var e=new d;e.Gq=!0;return e.ME(c,b,!1,a,h)};d.prototype.ll=function(c,b){var e=a.T.ve(this.h.a.Lb(c)),d=a.T.ve(this.h.a.Lb(b));if(e>d)return c;var h=this.h.ya(c),f=this.h.ya(b);this.Im((h|f)+1);this.Qg[this.h.ya(c)]=
!0;if(2==e&&2==d)return this.Xp(c,b,-1);if(1==e&&2==d||1==e&&1==d)return this.Yp(-1);if(0==e)return this.Pn();throw a.g.wa();};d.prototype.TB=function(c,b){var e=a.T.ve(this.h.a.Lb(c)),d=a.T.ve(this.h.a.Lb(b));if(e>d)return c;if(e<d)return b;var h=this.h.ya(c),f=this.h.ya(b);this.Im((h|f)+1);this.Qg[this.h.ya(c)]=!0;this.Qg[this.h.ya(b)]=!0;this.Qg[this.h.ya(c)|this.h.ya(b)]=!0;if(2==e&&2==d)return this.Xp(c,b,-1);if(1==e&&1==d)return this.Yp(-1);if(0==e&&0==d)return this.Pn();throw a.g.wa();};d.prototype.mt=
function(c,b){var e=a.T.ve(this.h.a.Lb(c)),d=a.T.ve(this.h.a.Lb(b)),h=this.h.ya(c),f=this.h.ya(b);this.Im((h|f)+1);this.Qg[this.h.ya(c)|this.h.ya(b)]=!0;h=-1;1<this.h.a.wp.Aa&&(h=c);if(2==e&&2==d)return this.Xp(c,b,h);if(1==e&&0<d||1==d&&0<e)return this.Yp(h);if(0==e||0==d)return this.Pn();throw a.g.wa();};d.prototype.Uw=function(c,b){var e=a.T.ve(this.h.a.Lb(c)),d=a.T.ve(this.h.a.Lb(b)),h=this.h.ya(c),f=this.h.ya(b);this.Im((h|f)+1);this.Qg[this.h.ya(c)|this.h.ya(b)]=!0;h=-1;1<this.h.a.wp.Aa&&(h=
c);if(2==e&&2==d)return this.RS(c,b,h);if(1==e&&0<d||1==d&&0<e)return this.SS(h);if(0==e||0==d)return e=[],e[0]=this.Pn(),e;throw a.g.wa();};d.prototype.On=function(c,b){var e=a.T.ve(this.h.a.Lb(c)),d=a.T.ve(this.h.a.Lb(b)),h=this.h.ya(c),f=this.h.ya(b);this.Im((h|f)+1);this.Qg[this.h.ya(c)]=!0;this.Qg[this.h.ya(b)]=!0;if(2==e&&2==d)return this.Xp(c,b,-1);if(1==e&&1==d)return this.Yp(-1);if(0==e&&0==d)return this.Pn();throw a.g.wa();};d.ob=function(c){var b=c.D();return 197==b?(b=new a.Ka(c.description),
c.s()||b.Wc(c,!1),b):33==b?(b=new a.pe(c.description),c.s()||b.add(c),b):322==b?(b=new a.Xa(c.description),c.s()||b.Bc(c,!0),b):c};d.Cc=function(c,b,e){var d=c.D();return 197==d?(b=new a.Ka(c.description),c.s()||b.Wc(c,!1),b):33!=d||"|"!=e&&"^"!=e?322==d?(b=new a.Xa(c.description),c.s()||b.Bc(c,!0),b):33==d&&"-"==e&&33==b.D()||550==d&&"\x26"==e&&33==b.D()?(b=new a.Va(c.description),c.s()||c.Sd(0,b),b):c:(b=new a.pe(c.description),c.s()||b.add(c),b)};d.ll=function(c,b,e,h){if(c.s()||b.s()||c.fb()>
b.fb())return d.Cc(d.ob(c),c,"-");var f=new a.i;c.o(f);var k=new a.i;b.o(k);if(!f.jc(k))return d.Cc(d.ob(c),c,"-");var g=new a.i;g.K(f);g.Db(k);e=a.Ia.zd(e,g,!0);k=new d;f=new a.fd;g=f.Eb(d.ob(c));b=f.Eb(d.ob(b));k.Np(f,e,h);h=k.ll(g,b);h=f.hf(h);c=d.Cc(h,c,"-");a.T.Kc(c.D())&&(c.hg(2,e),1736==c.D()&&c.hl());return c};d.TB=function(c,b,e,h){if(c.fb()>b.fb())return d.Cc(d.ob(c),c,"|");if(c.fb()<b.fb()||c.s())return d.Cc(d.ob(b),c,"|");if(b.s())return d.Cc(d.ob(c),c,"|");var f=new a.i;c.o(f);var k=
new a.i;b.o(k);var g=new a.i;g.K(f);g.Db(k);e=a.Ia.zd(e,g,!0);if(!f.jc(k.IN(e,e)))switch(c=d.ob(c),b=d.ob(b),c.D()){case 550:return c=a.T.Yj(c),c.Pd(b,0,-1),c;case 1607:return c=a.T.Yj(c),c.add(b,!1),c;case 1736:return c=a.T.Yj(c),c.add(b,!1),c;default:throw a.g.wa();}k=new d;f=new a.fd;g=f.Eb(d.ob(c));b=f.Eb(d.ob(b));k.Np(f,e,h);b=k.TB(g,b);c=d.Cc(f.hf(b),c,"|");a.T.Kc(c.D())&&(c.hg(2,e),1736==c.D()&&c.hl());return c};d.oM=function(c,b,e){if(2>c.length)throw a.g.N("not enough geometries to dissolve");
for(var h=0,f=0,g=c.length;f<g;f++)h=Math.max(c[f].fb(),h);var l=new a.i;l.Ja();for(var m=new a.fd,p=-1,q=0,r=-1,f=0,g=c.length;f<g;f++)if(c[f].fb()==h)if(c[f].s())-1==r&&(r=f);else{r=f;-1==p?p=m.Eb(d.ob(c[f])):m.YJ(p,d.ob(c[f]));var v=new a.i;c[f].dd(v);l.Db(v);q++}if(2>q)return d.ob(c[r]);c=2==h;b=a.Ia.zd(0==h?b:null,l,!0);return(new d).Qj(m,p,b,c,!0,e)};d.Uw=function(c,b,e,h){var f=[null,null,null],k=new a.i;c.o(k);var g=new a.i;b.o(g);var l=new a.i;l.K(k);l.Db(g);e=a.Ia.zd(e,l,!0);l=new a.i;l.K(g);
g=a.Ia.As(e);l.P(g,g);if(!k.jc(l)){if(c.fb()<=b.fb())return c=d.Cc(d.ob(c.Pa()),c,"\x26"),f[c.fb()]=c,f;if(c.fb()>b.fb())return c=d.Cc(d.ob(b.Pa()),c,"\x26"),f[c.fb()]=c,f}g=new d;k=new a.fd;l=k.Eb(d.ob(c));b=k.Eb(d.ob(b));g.Np(k,e,h);h=g.Uw(l,b);for(b=0;b<h.length;b++)g=d.Cc(k.hf(h[b]),c,"\x26"),a.T.Kc(g.D())&&(g.hg(2,e),1736==g.D()&&g.hl()),f[g.fb()]=g;return f};d.On=function(c,b,e,h){if(c.fb()>b.fb())return d.Cc(d.ob(c),c,"^");if(c.fb()<b.fb()||c.s())return d.Cc(d.ob(b),c,"^");if(b.s())return d.Cc(d.ob(c),
c,"^");var f=new a.i;c.o(f);var k=new a.i;b.o(k);var g=new a.i;g.K(f);g.Db(k);e=a.Ia.zd(e,g,!0);k=new d;f=new a.fd;g=f.Eb(d.ob(c));b=f.Eb(d.ob(b));k.Np(f,e,h);h=k.On(g,b);c=d.Cc(f.hf(h),c,"^");a.T.Kc(c.D())&&(c.hg(2,e),1736==c.D()&&c.hl());return c};d.uT=function(c,b,e){b=b.D();e=e.D();return 550==c.D()&&(33==b||33==e)&&1>=c.F()?(e=new a.Va(c.description),c.s()||c.Sd(0,e),e):c};d.prototype.ZM=function(c,b){var a=this.h.a;c=a.Cf(c,-1);for(var d=b.size,h=0;h<d;h++){var f=b.get(h);a.zi(c,f)}a.Gn(c,!0)};
d.prototype.WR=function(c,b){for(var a=this.h.a,d=a.$c;-1!=d;d=a.we(d))if(d==b)for(var h=a.Vb(d);-1!=h;h=a.bc(h)){var f=a.Cb(h);if(-1!=f)for(var g=a.X(f);-1!=g;){var f=this.h.se(f),l=this.h.se(g),f=this.h.FN(f,l);-1!=f&&(l=this.h.sa(f),this.h.Bb(f,c,1),this.h.Bb(l,c,2));f=g;g=a.X(f)}}};d.prototype.XQ=function(c,b,e,d){e=this.h.ya(e);d=this.h.ya(d);var h=new a.ga(0);h.xb(256);for(var f=this.h.a,k=this.h.Eg(),g=this.h.Be;-1!=g;g=this.h.Bf(g)){var l=this.h.te(g);if(-1!=l){var m=l;do{if(1!=this.h.tb(m,
k)){var p=m,q=m,r=!1,v=0;do{this.h.Bb(p,k,1);if(!r){var x=this.h.Gg(p);0!=(x&d)&&0!=(this.h.Qe(p)&e)&&(q=p,r=!0)}r&&(h.add(this.h.Gi(this.h.ol(this.h.qj(p)))),-1!=c&&(x=this.h.Gg(p),0!=(x&d)&&(x=this.h.tb(p,c),v|=x)));p=this.h.Wb(p)}while(p!=q);r&&0<this.h.yo(this.h.Pe(q))&&(p=f.jg(1736),this.ZM(p,h),-1!=b&&f.EF(p,b,v));h.clear(!1)}m=this.h.Wb(this.h.sa(m))}while(m!=l)}}this.h.kh(k)};d.prototype.WL=function(c,b,a,d){this.h.uR();var e=-1;-1!=c&&(e=this.h.Eg(),this.WR(e,a));this.XQ(e,c,b,a);var h=this.h.a;
c=0;for(e=h.$c;-1!=e;e=h.we(e))e!=b&&e!=a&&(d.add(e),c++);d.xd(0,c,function(b,c){b=h.Gw(h.Vb(b));c=h.Gw(h.Vb(c));return b<c?-1:b==c?0:1})};d.prototype.xg=function(){null!=this.h&&(this.h.xg(),this.h=null)};return d}();a.Of=d})(z||(z={}));(function(a){var d=function(){function d(c){void 0!==c?this.Ly(c):this.IF()}d.prototype.Lu=function(){this.Ob=this.Nb=this.sb=this.rb=this.eb=this.mb=0};d.prototype.lc=function(c){return this==c?!0:c instanceof d?this.mb==c.mb&&this.rb==c.rb&&this.Nb==c.Nb&&this.sb==
c.sb&&this.eb==c.eb&&this.Ob==c.Ob:!1};d.prototype.hc=function(){a.I.Rh();a.I.Rh();a.I.Rh();a.I.Rh();a.I.Rh();return a.I.Rh()};d.prototype.Zi=function(c,b){var a=this.sb*c.x+this.eb*c.y+this.Ob;b.x=this.mb*c.x+this.rb*c.y+this.Nb;b.y=a};d.prototype.multiply=function(c){d.multiply(this,c,this)};d.multiply=function(c,b,a){var e,d,h,f,g;e=c.mb*b.mb+c.sb*b.rb;d=c.rb*b.mb+c.eb*b.rb;h=c.Nb*b.mb+c.Ob*b.rb+b.Nb;f=c.mb*b.sb+c.sb*b.eb;g=c.rb*b.sb+c.eb*b.eb;c=c.Nb*b.sb+c.Ob*b.eb+b.Ob;a.mb=e;a.rb=d;a.Nb=h;a.sb=
f;a.eb=g;a.Ob=c};d.prototype.vm=function(){var c=new d;c.mb=this.mb;c.rb=this.rb;c.Nb=this.Nb;c.sb=this.sb;c.eb=this.eb;c.Ob=this.Ob;return c};d.prototype.$y=function(c){if(!c.s()){for(var b=[],e=0;4>e;e++)b[e]=new a.b;c.hy(b);this.US(b,b);c.Ey(b,4)}};d.prototype.US=function(c,b){for(var e=0;e<c.length;e++){var d=new a.b,h=c[e];d.x=this.mb*h.x+this.rb*h.y+this.Nb;d.y=this.sb*h.x+this.eb*h.y+this.Ob;b[e]=d}};d.prototype.wO=function(c,b){c.s()||b.s()||0==c.aa()||0==c.ba()?this.Lu():(this.rb=this.sb=
0,this.mb=b.aa()/c.aa(),this.eb=b.ba()/c.ba(),this.Nb=b.v-c.v*this.mb,this.Ob=b.C-c.C*this.eb)};d.prototype.TS=function(c){var b=new a.b,e=new a.b;b.ma(this.mb,this.sb);e.ma(this.rb,this.eb);b.sub(b);var d=.5*b.Up();b.ma(this.mb,this.sb);e.ma(this.rb,this.eb);b.add(e);b=.5*b.Up();return c*(d>b?Math.sqrt(d):Math.sqrt(b))};d.prototype.IF=function(){this.mb=1;this.sb=this.Nb=this.rb=0;this.eb=1;this.Ob=0};d.prototype.XO=function(){return 1==this.mb&&1==this.eb&&0==this.rb&&0==this.Nb&&0==this.sb&&0==
this.Ob};d.prototype.mg=function(c){return Math.abs(this.mb*this.eb-this.sb*this.rb)<=2*c*(Math.abs(this.mb*this.eb)+Math.abs(this.sb*this.rb))};d.prototype.Nn=function(c,b){this.mb=1;this.rb=0;this.Nb=c;this.sb=0;this.eb=1;this.Ob=b};d.prototype.Ly=function(c,b){void 0!==b?(this.mb=c,this.sb=this.Nb=this.rb=0,this.eb=b,this.Ob=0):this.Ly(c,c)};d.prototype.Oy=function(){this.mb=0;this.rb=1;this.Nb=0;this.sb=1;this.Ob=this.eb=0};d.prototype.jS=function(c){this.kS(Math.cos(c),Math.sin(c))};d.prototype.kS=
function(c,b){this.mb=c;this.rb=-b;this.Nb=0;this.sb=b;this.eb=c;this.Ob=0};d.prototype.shift=function(c,b){this.Nb+=c;this.Ob+=b};d.prototype.scale=function(c,b){this.mb*=c;this.rb*=c;this.Nb*=c;this.sb*=b;this.eb*=b;this.Ob*=b};d.prototype.rotate=function(c){var b=new d;b.jS(c);this.multiply(b)};d.prototype.inverse=function(c){if(void 0!==c){var b=this.mb*this.eb-this.rb*this.sb;0==b?c.Lu():(b=1/b,c.Nb=(this.rb*this.Ob-this.Nb*this.eb)*b,c.Ob=(this.Nb*this.sb-this.mb*this.Ob)*b,c.mb=this.eb*b,c.rb=
-this.rb*b,c.sb=-this.sb*b,c.eb=this.mb*b)}else this.inverse(this)};return d}();a.Bg=d})(z||(z={}));(function(a){var d=function(){function d(){}d.prototype.Lu=function(){this.fh=this.Ob=this.Nb=this.Le=this.Ie=this.He=this.Ke=this.eb=this.rb=this.ef=this.sb=this.mb=0};d.prototype.Ly=function(c,b,a){this.mb=c;this.rb=this.ef=this.sb=0;this.eb=b;this.Ie=this.He=this.Ke=0;this.Le=a;this.fh=this.Ob=this.Nb=0};d.prototype.$y=function(c){if(c.s())return c;for(var b=new a.ee[8],e=0;8>e;e++)b[e]=new a.ee;
c.hy(b);this.transform(b,8,b);c.Ey(b);return c};d.prototype.transform=function(c,b,e){for(var d=0;d<b;d++){var h=new a.ee,f=c[d];h.x=this.mb*f.x+this.rb*f.y+this.He*f.z+this.Nb;h.y=this.sb*f.x+this.eb*f.y+this.Ie*f.z+this.Ob;h.z=this.ef*f.x+this.Ke*f.y+this.Le*f.z+this.fh;e[d]=h}};d.prototype.Qn=function(c){var b=new a.ee;b.x=this.mb*c.x+this.rb*c.y+this.He*c.z+this.Nb;b.y=this.sb*c.x+this.eb*c.y+this.Ie*c.z+this.Ob;b.z=this.ef*c.x+this.Ke*c.y+this.Le*c.z+this.fh;return b};d.prototype.Ap=function(c){d.multiply(this,
c,this)};d.multiply=function(c,b,a){var e,d,h,f,g,l,m,p,q,r,v;e=c.mb*b.mb+c.sb*b.rb+c.ef*b.He;d=c.mb*b.sb+c.sb*b.eb+c.ef*b.Ie;h=c.mb*b.ef+c.sb*b.Ke+c.ef*b.Le;f=c.rb*b.mb+c.eb*b.rb+c.Ke*b.He;g=c.rb*b.sb+c.eb*b.eb+c.Ke*b.Ie;l=c.rb*b.ef+c.eb*b.Ke+c.Ke*b.Le;m=c.He*b.mb+c.Ie*b.rb+c.Le*b.He;p=c.He*b.sb+c.Ie*b.eb+c.Le*b.Ie;q=c.He*b.ef+c.Ie*b.Ke+c.Le*b.Le;r=c.Nb*b.mb+c.Ob*b.rb+c.fh*b.He+b.Nb;v=c.Nb*b.sb+c.Ob*b.eb+c.fh*b.Ie+b.Ob;c=c.Nb*b.ef+c.Ob*b.Ke+c.fh*b.Le+b.fh;a.mb=e;a.sb=d;a.ef=h;a.rb=f;a.eb=g;a.Ke=
l;a.He=m;a.Ie=p;a.Le=q;a.Nb=r;a.Ob=v;a.fh=c};d.inverse=function(c,b){var e=c.mb*(c.eb*c.Le-c.Ke*c.Ie)-c.sb*(c.rb*c.Le-c.Ke*c.He)+c.ef*(c.rb*c.Ie-c.eb*c.He);if(0!=e){var d,h,f,g,l,m,p,q,r,v;q=1/e;e=(c.eb*c.Le-c.Ke*c.Ie)*q;f=-(c.rb*c.Le-c.Ke*c.He)*q;m=(c.rb*c.Ie-c.eb*c.He)*q;d=-(c.sb*c.Le-c.Ie*c.ef)*q;g=(c.mb*c.Le-c.ef*c.He)*q;p=-(c.mb*c.Ie-c.sb*c.He)*q;h=(c.sb*c.Ke-c.ef*c.eb)*q;l=-(c.mb*c.Ke-c.ef*c.rb)*q;q*=c.mb*c.eb-c.sb*c.rb;r=-(c.Nb*e+c.Ob*f+c.fh*m);v=-(c.Nb*d+c.Ob*g+c.fh*p);c=-(c.Nb*h+c.Ob*l+c.fh*
q);b.mb=e;b.sb=d;b.ef=h;b.rb=f;b.eb=g;b.Ke=l;b.He=m;b.Ie=p;b.Le=q;b.Nb=r;b.Ob=v;b.fh=c}else throw a.g.ra("math singularity");};d.prototype.vm=function(){var c=new d;c.mb=this.mb;c.sb=this.sb;c.ef=this.ef;c.rb=this.rb;c.eb=this.eb;c.Ke=this.Ke;c.He=this.He;c.Ie=this.Ie;c.Le=this.Le;c.Nb=this.Nb;c.Ob=this.Ob;c.fh=this.fh;return c};return d}();a.ZT=d})(z||(z={}));(function(a){var d=function(c){function b(b){if(void 0!==b)c.call(this,b.hc(),b);else{c.call(this);this.Jf=[];this.Jf[0]=0;this.Aa=1;this.Wg=
[];for(b=0;10>b;b++)this.Wg[b]=-1;this.Wg[this.Jf[0]]=0}this.To=!0}I(b,c);b.prototype.Ne=function(b){this.hasAttribute(b)||(this.Wg[b]=0,this.xA())};b.prototype.removeAttribute=function(b){if(0==b)throw a.g.N("Position attribue cannot be removed");this.hasAttribute(b)&&(this.Wg[b]=-1,this.xA())};b.prototype.reset=function(){this.Jf[0]=0;this.Aa=1;for(var b=0;b<this.Wg.length;b++)this.Wg[b]=-1;this.Wg[this.Jf[0]]=0;this.To=!0};b.prototype.qw=function(){return h.ww().add(this)};b.Tf=function(){return h.ww().iO()};
b.Zn=function(){return h.ww().jO()};b.prototype.pJ=function(){var b=this.hc();return new a.pa(b,this)};b.prototype.xA=function(){for(var b=this.Aa=0,c=0;10>b;b++)0<=this.Wg[b]&&(this.Jf[c]=b,this.Wg[b]=c,c++,this.Aa++);this.To=!0};b.prototype.hc=function(){this.To&&(this.tk=this.jj(),this.To=!1);return this.tk};b.prototype.lc=function(c){if(null==c)return!1;if(c==this)return!0;if(!(c instanceof b)||c.Aa!=this.Aa)return!1;for(var a=0;a<this.Aa;a++)if(this.Jf[a]!=c.Jf[a])return!1;return this.To!=c.To?
!1:!0};b.prototype.qD=function(b){if(b.Aa!=this.Aa)return!1;for(var c=0;c<this.Aa;c++)if(this.Jf[c]!=b.Jf[c])return!1;return!0};b.iu=function(b,c){for(var a=[],d=0;d<b.Aa;d++)a[d]=-1;for(var d=0,e=b.Aa;d<e;d++)a[d]=c.zf(b.Hd(d));return a};b.PN=function(c,a){c=new b(c);c.Ne(a);return c.qw()};b.QN=function(c,a){for(var d=null,e=0;10>e;e++)!c.hasAttribute(e)&&a.hasAttribute(e)&&(null==d&&(d=new b(c)),d.Ne(e));return null!=d?d.qw():c};b.bo=function(c,a){c=new b(c);c.removeAttribute(a);return c.qw()};
return b}(a.pa);a.Od=d;var h=function(){function c(){this.map=[];var b=new d;this.add(b);b=new d;b.Ne(1);this.add(b)}c.ww=function(){return c.lI};c.prototype.iO=function(){return c.Yn};c.prototype.jO=function(){return c.Zn};c.prototype.add=function(b){var a=b.hc();if(null!=c.Yn&&c.Yn.hc()==a&&b.qD(c.Yn))return c.Yn;if(null!=c.Zn&&c.Zn.hc()==a&&b.qD(c.Zn))return c.Zn;var d=null;void 0!==this.map[a]&&(d=this.map[a]);null==d&&(d=b.pJ(),1==d.Aa?c.Yn=d:2==d.Aa&&1==d.Hd(1)?c.Zn=d:this.map[a]=d);return d};
c.lI=new c;return c}()})(z||(z={}));var O=0==g.version.indexOf("4."),T;(function(a){a[a.Linear=0]="Linear";a[a.Angular=1]="Angular";a[a.Area=2]="Area";a[a.LinearOrAngular=3]="LinearOrAngular"})(T||(T={}));var R={feet:9002,kilometers:9036,meters:9001,miles:9035,"nautical-miles":9030,yards:9096},Y={acres:109402,ares:109463,hectares:109401,"square-feet":109405,"square-kilometers":109414,"square-meters":109404,"square-miles":109413,"square-yards":109442},S={degrees:9102,radians:9101};void 0===a.prototype.getCacheValue&&
r.extend(a,{cache:null,getCacheValue:function(a){if(null===this.cache||void 0===this.cache)this.cache={};return this.cache[a]},setCacheValue:function(a,d){if(null===this.cache||void 0===this.cache)this.cache={};this.cache[a]=d}});var U=z.Nf.create(4326),X=z.Nf.create(102100);return function(){function d(){}d.extendedSpatialReferenceInfo=function(a){if(null===a)return null;a=D(a);var d=a.Se();return{tolerance:a.xq(),unitType:null==d?-1:d.Nc,unitID:null==d?-1:d.Qc(),unitBaseFactor:null==d?0:d.Dj,unitSquareDerivative:null==
d?0:z.Tb.PC(d).Qc()}};d.clip=function(a,d){if(null===a)return null;d=z.Pb.clip(F(a),F(d),H(a));return B(d,a.spatialReference)};d.cut=function(a,d){d=F(d);d=z.Pb.xm(F(a),d,H(a));for(var c=[],b=0;b<d.length;b++)c.push(B(d[b],a.spatialReference));return c};d.contains=function(a,d){if(null===a||null===d)throw Error("Illegal Argument Exception");return z.Pb.contains(F(a),F(d),H(a))};d.crosses=function(a,d){if(null===a||null===d)throw Error("Illegal Argument Exception");return z.Pb.VL(F(a),F(d),H(a))};
d.distance=function(a,d,c){if(null===a||null===d)throw Error("Illegal Argument Exception");return z.Pb.Fb(F(a),F(d),H(a),z.Tb.Qd(x(c,3)))};d.equals=function(a,d){return null===a&&null!==d||null===d&&null!==a?!1:z.Pb.lc(F(a),F(d),H(a))};d.intersects=function(a,d){if(null===a||null===d)throw Error("Illegal Argument Exception");return z.Pb.RO(F(a),F(d),H(a))};d.touches=function(a,d){if(null===a||null===d)throw Error("Illegal Argument Exception");return z.Pb.touches(F(a),F(d),H(a))};d.within=function(a,
d){if(null===a||null===d)throw Error("Illegal Argument Exception");return z.Pb.jT(F(a),F(d),H(a))};d.disjoint=function(a,d){if(null===a||null===d)throw Error("Illegal Argument Exception");return z.Pb.nM(F(a),F(d),H(a))};d.overlaps=function(a,d){if(null===a||null===d)throw Error("Illegal Argument Exception");return z.Pb.tQ(F(a),F(d),H(a))};d.relate=function(a,d,c){if(null===a||null===d)throw Error("Illegal Argument Exception");return z.Pb.py(F(a),F(d),H(a),c)};d.isSimple=function(a){if(null===a)throw Error("Illegal Argument Exception");
return z.Pb.cP(F(a),H(a))};d.simplify=function(a){if(null===a)throw Error("Illegal Argument Exception");var d=z.Pb.Qy(F(a),H(a));return B(d,a.spatialReference)};d.convexHull=function(h,f){void 0===f&&(f=!1);if(null===h)throw Error("Illegal Argument Exception");return h instanceof a?(f=z.Pb.JL(F(h),H(h)),B(f,h.spatialReference)):d.NI(h,f)};d.NI=function(a,d){for(var c=[],b=0;b<a.length;b++)c.push(F(a[b]));c=z.Pb.KL(c,d);for(b=0;b<c.length;b++)c[b]=B(c[b],a[0].spatialReference);return c};d.difference=
function(h,f){if(null===h||null===f)throw Error("Illegal Argument Exception");return h instanceof a?(f=z.Pb.ll(F(h),F(f),H(h)),B(f,h.spatialReference)):d.XL(h,f)};d.XL=function(a,d){for(var c=[],b=0;b<a.length;b++)c.push(F(a[b]));c=z.Pb.kM(c,F(d),H(d));for(b=0;b<c.length;b++)c[b]=B(c[b],d.spatialReference);return c};d.symmetricDifference=function(h,f){if(null===h||null===f)throw Error("Illegal Argument Exception");return h instanceof a?(f=z.Pb.On(F(h),F(f),H(h)),B(f,h.spatialReference)):d.tO(h,f)};
d.tO=function(a,d){for(var c=[],b=0;b<a.length;b++)c.push(F(a[b]));c=z.Pb.MS(c,F(d),H(d));for(b=0;b<c.length;b++)c[b]=B(c[b],d.spatialReference);return c};d.intersect=function(h,f){if(null===h||null===f)throw Error("Illegal Argument Exception");return h instanceof a?(f=z.Pb.Ga(F(h),F(f),H(h)),B(f,h.spatialReference)):d.EM(h,f)};d.EM=function(a,d){for(var c=[],b=0;b<a.length;b++)c.push(F(a[b]));c=z.Pb.QO(c,F(d),H(d));for(b=0;b<c.length;b++)c[b]=B(c[b],d.spatialReference);return c};d.union=function(d,
h){void 0===h&&(h=null);if(null===d)return null;d instanceof a&&(d=[d],null!==h&&d.push(h));if(0===d.length)return null;h=[];for(var c=0;c<d.length;c++)h.push(F(d[c]));return B(z.Pb.aT(h,H(d[0])),d[0].spatialReference)};d.offset=function(h,f,c,b,e,k){var g=0;if(null!=b&&void 0!=b)switch(b){case "round":g=0;break;case "bevel":g=1;break;case "miter":g=2;break;case "square":g=3}return h instanceof a?(f=z.Pb.offset(F(h),H(h),f,g,e,k,z.Tb.Qd(x(c,3))),B(f,h.spatialReference)):d.qO(h,f,c,g,e,k)};d.qO=function(a,
d,c,b,e,h){if(null===a)return null;if(0===a.length)return[];for(var f=[],k=0;k<a.length;k++)f.push(F(a[k]));d=z.Pb.sQ(f,H(a[0]),d,b,e,h,z.Tb.Qd(x(c,3)));for(k=0;k<d.length;k++)d[k]=B(d[k],a[0].spatialReference);return d};d.buffer=function(h,f,c,b){void 0===b&&(b=!1);if(h instanceof a)return f=z.Pb.buffer(F(h),H(h),f,z.Tb.Qd(x(c,3)),!1,0,NaN),B(f,h.spatialReference);if("[object Array]"!==Object.prototype.toString.call(f)){for(var e=[],k=0;k<h.length;k++)e.push(f);f=e}if(f.length!=h.length){if(0==f.length)throw Error("Illegal Argument Exception");
for(var e=[],g=0,k=0;k<h.length;k++)void 0===f[k]?e.push(g):(e.push(f[k]),g=f[k]);f=e}return d.vG(h,f,c,!1,b,"geodesic",NaN)};d.geodesicBuffer=function(h,f,c,b,e,k){if(h instanceof a)return void 0===e&&(e=NaN),f=z.Pb.buffer(F(h),H(h),f,z.Tb.Qd(x(c,0)),!0,w(b),e),B(f,h.spatialReference);if("[object Array]"!==Object.prototype.toString.call(f)){for(var g=[],l=0;l<h.length;l++)g.push(f);f=g}if(f.length!=h.length){if(0==f.length)throw Error("Illegal Argument Exception");for(var g=[],m=0,l=0;l<h.length;l++)void 0===
f[l]?g.push(m):(g.push(f[l]),m=f[l]);f=g}return d.vG(h,f,c,!0,b,e,k)};d.vG=function(a,d,c,b,e,h,f){if(null===a)return null;if(0===a.length)return[];void 0===f&&(f=NaN);for(var k=[],g=0;g<a.length;g++)k.push(F(a[g]));d=z.Pb.rK(k,H(a[0]),d,z.Tb.Qd(x(c,0)),b,e,w(h),f);for(g=0;g<d.length;g++)d[g]=B(d[g],a[0].spatialReference);return d};d.nearestCoordinate=function(a,d,c){void 0===c&&(c=!0);d=z.Pb.zw(F(a),F(d),c);return{coordinate:B(d.pw(),a.spatialReference),distance:d.sw(),isRightSide:d.Xw(),vertexIndex:d.gb(),
isEmpty:d.s()}};d.nearestVertex=function(a,d){d=z.Pb.Aw(F(a),F(d));return{coordinate:B(d.pw(),a.spatialReference),distance:d.sw(),isRightSide:d.Xw(),vertexIndex:d.gb(),isEmpty:d.s()}};d.nearestVertices=function(a,d,c,b){d=F(d);c=z.Pb.Bw(F(a),d,c,b);b=[];for(d=0;d<c.length;d++)!1===c[d].s()&&b.push({coordinate:B(c[d].pw(),a.spatialReference),distance:c[d].sw(),isRightSide:c[d].Xw(),vertexIndex:c[d].gb(),isEmpty:c[d].s()});return b};d.generalize=function(a,d,c,b){d=z.Pb.fN(F(a),H(a),d,c,z.Tb.Qd(x(b,
3)));return B(d,a.spatialReference)};d.densify=function(a,d,c){d=z.Pb.oq(F(a),H(a),d,z.Tb.Qd(x(c,3)));return B(d,a.spatialReference)};d.geodesicDensify=function(a,d,c,b){void 0===b&&(b=0);d=z.Pb.fw(F(a),H(a),d,z.Tb.Qd(x(c,3)),b);return B(d,a.spatialReference)};d.rotate=function(a,d,c){if(void 0===c||null===c)switch(a.type){case "point":c=a;break;case "extent":c=O?a.get("center"):a.getCenter();break;default:c=O?a.get("extent").get("center"):a.getExtent().getCenter()}d=O?z.Wn.rotate(a.toJSON(),d,c.toJSON()):
z.Wn.rotate(a.toJson(),d,c.toJson());O?(d=v(d),d.set("spatialReference",a.spatialReference)):(d=q(d),d.setSpatialReference(a.spatialReference));return d};d.flipHorizontal=function(a,d){if(void 0===d||null===d)switch(a.type){case "point":d=a;break;case "extent":d=O?a.get("center"):a.getCenter();break;default:d=O?a.get("extent").get("center"):a.getExtent().getCenter()}d=O?z.Wn.eC(a.toJSON(),d.toJSON()):z.Wn.eC(a.toJson(),d.toJson());O?(d=v(d),d.set("spatialReference",a.spatialReference)):(d=q(d),d.setSpatialReference(a.spatialReference));
return d};d.flipVertical=function(a,d){if(void 0===d||null===d)switch(a.type){case "point":d=a;break;case "extent":d=O?a.get("center"):a.getCenter();break;default:d=O?a.get("extent").get("center"):a.getExtent().getCenter()}d=O?z.Wn.fC(a.toJSON(),d.toJSON()):z.Wn.fC(a.toJson(),d.toJson());O?(d=v(d),d.set("spatialReference",a.spatialReference)):(d=q(d),d.setSpatialReference(a.spatialReference));return d};d.planarArea=function(a,d){if(null===a)throw Error("Illegal Argument Exception");return z.Pb.BQ(F(a),
H(a),z.Tb.Qd(x(d,2)))};d.planarLength=function(a,d){if(null===a)throw Error("Illegal Argument Exception");return z.Pb.CQ(F(a),H(a),z.Tb.Qd(x(d,3)))};d.geodesicArea=function(a,d,c){if(null===a)throw Error("Illegal Argument Exception");return z.Pb.jN(F(a),H(a),z.Tb.Qd(x(d,2)),w(c))};d.geodesicLength=function(a,d,c){if(null===a)throw Error("Illegal Argument Exception");return z.Pb.nN(F(a),H(a),z.Tb.Qd(x(d,0)),w(c))};return d}()})},"esri/widgets/support/AnchorElementViewModel":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/watchUtils ../../core/Accessor ../../core/Evented ../../core/HandleRegistry ../../core/watchUtils".split(" "),
function(A,t,g,a,d,f,m,l,p,r){return function(l){function m(){var a=l.call(this)||this;a._anchorHandles=new p;a.location=null;a.screenLocation=null;a.screenLocationEnabled=!1;a.view=null;a._anchorHandles.add([r.watch(a,"screenLocationEnabled,location,view.size",function(){return a._updateScreenPointAndHandle()}),r.watch(a,"view, view.ready",function(){return a._wireUpView()})]);return a}g(m,l);m.prototype.destroy=function(){this.view=null;this._anchorHandles&&this._anchorHandles.destroy();this._viewpointHandle=
this._anchorHandles=null};m.prototype._wireUpView=function(){var a=this;this._anchorHandles.remove("view");this._viewpointHandle=null;if(this.get("view.ready")){this._setScreenLocation();var d=this.view,d=f.pausable(d,"3d"===d.type?"camera":"viewpoint",function(){return a._viewpointChange()});this._anchorHandles.add(d,"view");this._viewpointHandle=d;this._toggleWatchingViewpoint()}};m.prototype._viewpointChange=function(){this._setScreenLocation();this.emit("view-change")};m.prototype._updateScreenPointAndHandle=
function(){this._setScreenLocation();this._toggleWatchingViewpoint()};m.prototype._toggleWatchingViewpoint=function(){var a=this._viewpointHandle,d=this.screenLocationEnabled;a&&(this.location&&d?a.resume():a.pause())};m.prototype._setScreenLocation=function(){var a=this.location,d=this.view,f=this.screenLocationEnabled,g=this.get("view.ready"),a=f&&a&&g?d.toScreen(a):null;this._set("screenLocation",a)};a([d.property()],m.prototype,"location",void 0);a([d.property({readOnly:!0})],m.prototype,"screenLocation",
void 0);a([d.property()],m.prototype,"screenLocationEnabled",void 0);a([d.property()],m.prototype,"view",void 0);return m=a([d.subclass("esri.widgets.support.AnchorElementViewModel")],m)}(d.declared(m,l))})},"esri/widgets/Spinner":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ./support/widget ../core/accessorSupport/decorators ./Widget ../core/promiseUtils ../core/watchUtils ./support/AnchorElementViewModel".split(" "),function(A,t,g,a,
d,f,m,l,p,r){return function(m){function q(a){a=m.call(this)||this;a._animationDelay=500;a._animationPromise=null;a.location=null;a.view=null;a.visible=!1;a.viewModel=new r;return a}g(q,m);q.prototype.postInitialize=function(){var a=this;this.own([p.watch(this,"visible",function(d){return a._visibleChange(d)})])};q.prototype.destroy=function(){this._cancelAnimationPromise()};q.prototype.show=function(a){var d=this,f=a.location;a=a.promise;f&&(this.viewModel.location=f);this.visible=!0;a&&a.always(function(){return d.hide()})};
q.prototype.hide=function(){this.visible=!1};q.prototype.render=function(){var a=this.visible,f=!!this.viewModel.screenLocation,a=(g={},g["esri-spinner--start"]=a&&f,g["esri-spinner--finish"]=!a&&f,g),g=this._getPositionStyles();return d.tsx("div",{class:"esri-spinner",classes:a,styles:g});var g};q.prototype._cancelAnimationPromise=function(){this._animationPromise&&(this._animationPromise.cancel(),this._animationPromise=null)};q.prototype._visibleChange=function(a){var d=this;a?this.viewModel.screenLocationEnabled=
!0:(this._cancelAnimationPromise(),this._animationPromise=l.after(this._animationDelay).then(function(){d.viewModel.screenLocationEnabled=!1;d._animationPromise=null}))};q.prototype._getPositionStyles=function(){var a=this.viewModel.screenLocation;return a?{left:a.x+"px",top:a.y+"px"}:{}};a([f.aliasOf("viewModel.location")],q.prototype,"location",void 0);a([f.aliasOf("viewModel.view")],q.prototype,"view",void 0);a([f.property(),d.renderable()],q.prototype,"visible",void 0);a([f.property({type:r}),
d.renderable(["viewModel.screenLocation","viewModel.screenLocationEnabled"])],q.prototype,"viewModel",void 0);return q=a([f.subclass("esri.widgets.Spinner")],q)}(f.declared(m))})},"esri/views/overlay/ViewOverlay":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper dojo/dom ../../core/Accessor ../../core/accessorSupport/decorators ../../core/Collection ../../widgets/libs/maquette/maquette".split(" "),function(A,t,g,a,d,f,m,l,p){return function(f){function q(){var a=
null!==f&&f.apply(this,arguments)||this;a.items=new l;a._callbacks=new Map;a._projector=p.createProjector();return a}g(q,f);Object.defineProperty(q.prototype,"needsRender",{get:function(){return 0<this.items.length},enumerable:!0,configurable:!0});q.prototype.initialize=function(){var a=this,f=document.createElement("div");f.className="esri-overlay-surface";d.setSelectable(f,!1);this._set("surface",f);this._itemsChangeHandle=this.items.on("change",function(d){d.added.map(function(d){var f=function(){return d.render()};
a._callbacks.set(d,f);a._projector.append(a.surface,f)});d.removed.map(function(d){var f=a._projector.detach(a._callbacks.get(d));a.surface.removeChild(f.domNode);a._callbacks.delete(d)})})};q.prototype.addItem=function(a){this.items.add(a)};q.prototype.removeItem=function(a){this.items.remove(a)};q.prototype.destroy=function(){this.items.removeAll();this._itemsChangeHandle.remove();this._projector=this._callbacks=null};q.prototype.render=function(){this._projector.renderNow()};a([m.property({type:HTMLDivElement})],
q.prototype,"surface",void 0);a([m.property({type:l})],q.prototype,"items",void 0);a([m.property({readOnly:!0,dependsOn:["items.length"]})],q.prototype,"needsRender",null);return q=a([m.subclass("esri.views.overlay.ViewOverlay")],q)}(m.declared(f))})},"esri/views/ui/DefaultUI":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/watchUtils ./UI ./Component ../../widgets/Attribution ../../widgets/Compass ../../widgets/Zoom ../../widgets/NavigationToggle dojo/dom-geometry".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x){return function(m){function w(a){a=m.call(this)||this;a._defaultPositionLookup=null;a.components=[];return a}g(w,m);w.prototype.initialize=function(){this._handles.add([f.init(this,"components",this._componentsWatcher.bind(this)),f.init(this,"view",this._updateViewAwareWidgets.bind(this))])};w.prototype._findComponentPosition=function(a){if(!this._defaultPositionLookup){var d=x.isBodyLtr();this._defaultPositionLookup={attribution:"manual",compass:d?"top-left":"top-right",
"navigation-toggle":d?"top-left":"top-right",zoom:d?"top-left":"top-right"}}return this._defaultPositionLookup[a]};w.prototype._removeComponents=function(a){var d=this;a.forEach(function(a){if(a=d.find(a))d.remove(a),a.destroy()})};w.prototype._updateViewAwareWidgets=function(a){var d=this;this.components.forEach(function(f){(f=(f=d.find(f))&&f.widget)&&void 0!==f.view&&f.set("view",a)})};w.prototype._componentsWatcher=function(a,d){this._removeComponents(d);this._addComponents(a)};w.prototype._addComponents=
function(a){var d=this;this.initialized&&a.forEach(function(a){return d.add(d._createComponent(a),d._findComponentPosition(a))})};w.prototype._createComponent=function(a){var d=this._createWidget(a);if(d)return new l({id:a,node:d})};w.prototype._createWidget=function(a){if("attribution"===a)return this._createAttribution();if("compass"===a)return this._createCompass();if("navigation-toggle"===a)return this._createNavigationToggle();if("zoom"===a)return this._createZoom()};w.prototype._createAttribution=
function(){return new p({view:this.view})};w.prototype._createCompass=function(){return new r({view:this.view})};w.prototype._createNavigationToggle=function(){return new v({view:this.view})};w.prototype._createZoom=function(){return new q({view:this.view})};a([d.property()],w.prototype,"components",void 0);return w=a([d.subclass("esri.views.ui.DefaultUI")],w)}(d.declared(m))})},"esri/views/ui/UI":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./Component ../../core/Accessor ../../core/Evented ../../core/HandleRegistry ../../core/watchUtils dojo/_base/lang dojo/dom-class dojo/dom-construct dojo/dom-style".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x,w){function B(a){return"object"!==typeof a||a&&a.isInstanceOf&&a.isInstanceOf(f)||!("component"in a||"index"in a||"position"in a)?null:a}var E={left:0,top:0,bottom:0,right:0},D={bottom:30,top:15,right:15,left:15};return function(l){function m(){var a=l.call(this)||this;a._cornerNameToContainerLookup={};a._positionNameToContainerLookup={};a._components=[];a._handles=new p;a.padding=D;a.view=null;a._initContainers();return a}g(m,l);m.prototype.initialize=function(){this._handles.add([r.init(this,
"view.padding, container",this._applyViewPadding.bind(this)),r.init(this,"padding",this._applyUIPadding.bind(this))])};m.prototype.destroy=function(){this.container=null;this._components.forEach(function(a){a.destroy()});this._components.length=0;this._handles.destroy()};Object.defineProperty(m.prototype,"container",{set:function(a){var d=this._get("container");a!==d&&(a&&(v.add(a,"esri-ui"),this._attachContainers(a)),d&&(v.remove(d,"esri-ui"),w.set(d,{top:"",bottom:"",left:"",right:""}),x.empty(d)),
this._set("container",a))},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"height",{get:function(){var a=this.get("view.height")||0;if(0===a)return a;var d=this._getViewPadding();return Math.max(a-(d.top+d.bottom),0)},enumerable:!0,configurable:!0});m.prototype.castPadding=function(a){return"number"===typeof a?{bottom:a,top:a,right:a,left:a}:q.mixin({},D,a)};Object.defineProperty(m.prototype,"width",{get:function(){var a=this.get("view.width")||0;if(0===a)return a;var d=this._getViewPadding();
return Math.max(a-(d.left+d.right),0)},enumerable:!0,configurable:!0});m.prototype.add=function(a,d){var g=this,l;if(Array.isArray(a))a.forEach(function(a){return g.add(a,d)});else{var m=B(a);m&&(l=m.index,d=m.position,a=m.component);d&&"object"===typeof d&&(l=d.index,d=d.position);!a||d&&!this._isValidPosition(d)||(a&&a.isInstanceOf&&a.isInstanceOf(f)||(a=new f({node:a})),this._place({component:a,position:d,index:l}),this._components.push(a))}};m.prototype.remove=function(a){if(a){if(Array.isArray(a))return a.map(this.remove,
this);if(a=this.find(a)){var d=this._components.indexOf(a);a.node.parentNode&&a.node.parentNode.removeChild(a.node);return this._components.splice(d,1)[0]}}};m.prototype.empty=function(a){var d=this;if(Array.isArray(a))return a.map(function(a){return d.empty(a)}).reduce(function(a,d){return a.concat(d)});a=a||"manual";if("manual"===a)return Array.prototype.slice.call(this._manualContainer.children).filter(function(a){return!v.contains(a,"esri-ui-corner")}).map(function(a){return d.remove(a)});if(this._isValidPosition(a))return Array.prototype.slice.call(this._cornerNameToContainerLookup[a].children).map(this.remove,
this)};m.prototype.move=function(a,d){var f=this;Array.isArray(a)&&a.forEach(function(a){return f.move(a,d)});if(a){var g,l=B(a)||B(d);l&&(g=l.index,d=l.position,a=l.component||a);(!d||this._isValidPosition(d))&&(a=this.remove(a))&&this.add(a,{position:d,index:g})}};m.prototype.find=function(a){return a?a&&a.isInstanceOf&&a.isInstanceOf(f)?this._findByComponent(a):"string"===typeof a?this._findById(a):this._findByNode(a.domNode||a):null};m.prototype._getViewPadding=function(){return this.get("view.padding")||
E};m.prototype._attachContainers=function(a){x.place(this._manualContainer,a);x.place(this._innerContainer,a)};m.prototype._initContainers=function(){var a=x.create("div",{className:"esri-ui-inner-container esri-ui-corner-container"}),d=x.create("div",{className:"esri-ui-inner-container esri-ui-manual-container"}),f=x.create("div",{className:"esri-ui-top-left esri-ui-corner"},a),g=x.create("div",{className:"esri-ui-top-right esri-ui-corner"},a),l=x.create("div",{className:"esri-ui-bottom-left esri-ui-corner"},
a),m=x.create("div",{className:"esri-ui-bottom-right esri-ui-corner"},a);this._innerContainer=a;this._manualContainer=d;this._cornerNameToContainerLookup={"top-left":f,"top-right":g,"bottom-left":l,"bottom-right":m};this._positionNameToContainerLookup=q.mixin({manual:d},this._cornerNameToContainerLookup)};m.prototype._isValidPosition=function(a){return!!this._positionNameToContainerLookup[a]};m.prototype._place=function(a){var d=a.component,f=a.index;a=this._positionNameToContainerLookup[a.position||
"manual"];var g;-1<f?(g=Array.prototype.slice.call(a.children),0===f?this._placeComponent(d,a,"first"):f>=g.length?this._placeComponent(d,a,"last"):this._placeComponent(d,g[f],"before")):this._placeComponent(d,a,"last")};m.prototype._placeComponent=function(a,d,f){var g=a.widget;g&&!g._started&&"function"===typeof g.postMixInProperties&&"function"===typeof g.buildRendering&&"function"===typeof g.postCreate&&"function"===typeof g.startup&&a.widget.startup();x.place(a.node,d,f)};m.prototype._applyViewPadding=
function(){var a=this.container;a&&w.set(a,this._toPxPosition(this._getViewPadding()))};m.prototype._applyUIPadding=function(){this._innerContainer&&w.set(this._innerContainer,this._toPxPosition(this.padding))};m.prototype._toPxPosition=function(a){return{top:this._toPxUnit(a.top),left:this._toPxUnit(a.left),right:this._toPxUnit(a.right),bottom:this._toPxUnit(a.bottom)}};m.prototype._toPxUnit=function(a){return 0===a?0:a+"px"};m.prototype._findByComponent=function(a){var d=null,f;this._components.some(function(g){(f=
g===a)&&(d=g);return f});return d};m.prototype._findById=function(a){var d=null,f;this._components.some(function(g){(f=g.id===a)&&(d=g);return f});return d};m.prototype._findByNode=function(a){var d=null,f;this._components.some(function(g){(f=g.node===a)&&(d=g);return f});return d};a([d.property()],m.prototype,"container",null);a([d.property({dependsOn:["view.height"]})],m.prototype,"height",null);a([d.property()],m.prototype,"padding",void 0);a([d.cast("padding")],m.prototype,"castPadding",null);
a([d.property()],m.prototype,"view",void 0);a([d.property({dependsOn:["view.width"]})],m.prototype,"width",null);return m=a([d.subclass("esri.views.ui.UI")],m)}(d.declared(m,l))})},"esri/views/ui/Component":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor dojo/dom dojo/dom-class".split(" "),function(A,t,g,a,d,f,m,l){return function(f){function p(){var a=null!==f&&f.apply(this,
arguments)||this;a.widget=null;return a}g(p,f);p.prototype.destroy=function(){this.widget&&this.widget.destroy();this.node=null};Object.defineProperty(p.prototype,"id",{get:function(){return this._get("id")||this.get("node.id")},set:function(a){this._set("id",a)},enumerable:!0,configurable:!0});Object.defineProperty(p.prototype,"node",{set:function(a){var d=this._get("node");a!==d&&(a&&l.add(a,"esri-component"),d&&l.remove(d,"esri-component"),this._set("node",a))},enumerable:!0,configurable:!0});
p.prototype.castNode=function(a){if(!a)return this._set("widget",null),null;if("string"===typeof a||a&&"nodeType"in a)return this._set("widget",null),m.byId(a);a&&"function"===typeof a.render&&!a.domNode&&(a.domNode=document.createElement("div"));this._set("widget",a);return a.domNode};a([d.property()],p.prototype,"id",null);a([d.property()],p.prototype,"node",null);a([d.cast("node")],p.prototype,"castNode",null);a([d.property({readOnly:!0})],p.prototype,"widget",void 0);return p=a([d.subclass("esri.views.ui.Component")],
p)}(d.declared(f))})},"esri/widgets/Attribution":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./support/widget ./Widget ./Attribution/AttributionViewModel ../core/watchUtils".split(" "),function(A,t,g,a,d,f,m,l,p){return function(m){function q(a){a=m.call(this)||this;a._isOpen=!1;a._attributionTextOverflowed=!1;a._prevSourceNodeHeight=0;a.itemDelimiter=" | ";a.view=null;a.viewModel=new l;return a}g(q,
m);q.prototype.postInitialize=function(){var a=this;this.own(p.on(this,"viewModel.items","change",function(){return a.scheduleRender()}))};Object.defineProperty(q.prototype,"attributionText",{get:function(){return this.viewModel.items.map(function(a){return a.text}).join(this.itemDelimiter)},enumerable:!0,configurable:!0});q.prototype.render=function(){var a=(d={},d["esri-attribution--open"]=this._isOpen,d);return f.tsx("div",{bind:this,class:"esri-attribution esri-widget",classes:a,onclick:this._toggleState,
onkeydown:this._toggleState},this._renderSourcesNode(),f.tsx("div",{class:"esri-attribution__powered-by"},"Powered by ",f.tsx("a",{target:"_blank",href:"http://www.esri.com/",class:"esri-attribution__link"},"Esri")));var d};q.prototype._renderSourcesNode=function(){var a=this._isOpen,d=this._isInteractive(),g=this.attributionText,a=(l={},l["esri-attribution__sources--open"]=a,l["esri-interactive"]=d,l);return f.tsx("div",{afterCreate:this._afterSourcesNodeCreate,afterUpdate:this._afterSourcesNodeUpdate,
bind:this,class:"esri-attribution__sources",classes:a,innerHTML:g,role:d?"button":void 0,tabIndex:d?0:-1});var l};q.prototype._afterSourcesNodeCreate=function(a){this._prevSourceNodeHeight=a.clientWidth};q.prototype._afterSourcesNodeUpdate=function(a){var d=!1,f=a.clientHeight;a=a.scrollWidth>=a.clientWidth;var g=this._attributionTextOverflowed!==a;this._attributionTextOverflowed=a;g&&(d=!0);this._isOpen&&(a=f<this._prevSourceNodeHeight,this._prevSourceNodeHeight=f,a&&(this._isOpen=!1,d=!0));d&&this.scheduleRender()};
q.prototype._toggleState=function(){this._isInteractive()&&(this._isOpen=!this._isOpen)};q.prototype._isInteractive=function(){return this._isOpen||this._attributionTextOverflowed};a([d.property({dependsOn:["viewModel.items.length","itemDelimiter"],readOnly:!0}),f.renderable()],q.prototype,"attributionText",null);a([d.property(),f.renderable()],q.prototype,"itemDelimiter",void 0);a([d.aliasOf("viewModel.view")],q.prototype,"view",void 0);a([d.property({type:l}),f.renderable(["state","view.size"])],
q.prototype,"viewModel",void 0);a([f.accessibleHandler()],q.prototype,"_toggleState",null);return q=a([d.subclass("esri.widgets.Attribution")],q)}(d.declared(m))})},"esri/widgets/Attribution/AttributionViewModel":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../geometry/support/webMercatorUtils ../../core/HandleRegistry ../../core/Accessor ../../core/lang ../../core/watchUtils ../../core/Collection ../../geometry/Extent".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v){return function(l){function x(a){a=l.call(this,a)||this;a._handles=new m;a._pendingAttributionItemsByLayerId={};a._attributionDataByLayerId={};a.items=new q;a.view=null;a._updateAttributionItems=a._updateAttributionItems.bind(a);return a}g(x,l);x.prototype.initialize=function(){this._handles.add(r.init(this,"view",this._viewWatcher))};x.prototype.destroy=function(){this._handles.destroy();this.view=this._handles=null};Object.defineProperty(x.prototype,"state",{get:function(){return this.get("view.ready")?
"ready":"disabled"},enumerable:!0,configurable:!0});x.prototype._viewWatcher=function(a){var d=this,f=this._handles;f&&f.remove();a&&(f.add([a.allLayerViews.on("change",function(a){d._addLayerViews(a.added);0<a.removed.length&&(a.removed.forEach(function(a){f.remove(a.uid)}),d._updateAttributionItems())}),r.init(a,"stationary",this._updateAttributionItems)]),this._addLayerViews(a.allLayerViews))};x.prototype._addLayerViews=function(a){var d=this;a.forEach(function(a){d._handles.has(a.uid)||d._handles.add(r.init(a,
"suspended",d._updateAttributionItems),a.uid)})};x.prototype._updateAttributionItems=function(){var a=this,d=[];this._getActiveLayerViews().forEach(function(f){var g=f.layer;if(!g.hasAttributionData){var l=g.get("copyright");l&&((f=a._findItem(d,l))?a._updateItemSource(f,g):d.push({text:l,layers:[g]}))}else if(g&&g.tileInfo){var m=a._attributionDataByLayerId;if(m[g.uid]){if(l=a._getDynamicAttribution(m[g.uid],a.view,g))(f=a._findItem(d,l))?a._updateItemSource(f,g):d.push({text:l,layers:[g]})}else{var p=
a._pendingAttributionItemsByLayerId;a._inProgress(p[g.uid])||(p[g.uid]=g.fetchAttributionData().then(function(d){d=a._createContributionIndex(d,a._isBingLayer(g));delete p[g.uid];m[g.uid]=d;a._updateAttributionItems()}))}}});this._itemsChanged(this.items,d)&&(this.items.removeAll(),this.items.addMany(d))};x.prototype._itemsChanged=function(a,d){return a.length!==d.length||a.some(function(a,f){return a.text!==d[f].text})};x.prototype._inProgress=function(a){return a&&!a.isFulfilled()};x.prototype._getActiveLayerViews=
function(){return this.get("view.allLayerViews").filter(function(a){return!a.suspended&&a.get("layer.attributionVisible")})};x.prototype._findItem=function(a,d){var f;a.some(function(a){var g=a.text===d;g&&(f=a);return g});return f};x.prototype._updateItemSource=function(a,d){-1===a.layers.indexOf(d)&&a.layers.push(d)};x.prototype._isBingLayer=function(a){return-1!==a.declaredClass.toLowerCase().indexOf("vetiledlayer")};x.prototype._createContributionIndex=function(a,d){a=a.contributors;var g={};
if(!a)return g;a.forEach(function(a,l){var m=a.coverageAreas;m&&m.forEach(function(m){var q=m.bbox,r=m.zoomMin-(d&&m.zoomMin?1:0),x=m.zoomMax-(d&&m.zoomMax?1:0);a={extent:f.geographicToWebMercator(new v({xmin:q[1],ymin:q[0],xmax:q[3],ymax:q[2]})),attribution:a.attribution||"",score:p.isDefined(m.score)?m.score:100,id:l};for(m=r;m<=x;m++)g[m]=g[m]||[],g[m].push(a)})});g.maxKey=Math.max.apply(null,Object.keys(g));return g};x.prototype._getDynamicAttribution=function(a,d,f){var g=d.extent;d=f.tileInfo.scaleToZoom(d.scale);
d=Math.min(a.maxKey,Math.round(d));if(!g||!p.isDefined(d)||-1>=d)return"";a=a[d];var l=g.center.clone().normalize(),m={};return a.filter(function(a){var d=!m[a.id]&&a.extent.contains(l);d&&(m[a.id]=!0);return d}).sort(function(a,d){return d.score-a.score||a.objectId-d.objectId}).map(function(a){return a.attribution}).join(", ")};a([d.property({readOnly:!0,type:q})],x.prototype,"items",void 0);a([d.property({dependsOn:["view.ready"],readOnly:!0})],x.prototype,"state",null);a([d.property()],x.prototype,
"view",void 0);return x=a([d.subclass("esri.widgets.Attribution.AttributionViewModel")],x)}(d.declared(l))})},"esri/widgets/Compass":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./support/widget ./Widget ./Compass/CompassViewModel dojo/i18n!./Compass/nls/Compass".split(" "),function(A,t,g,a,d,f,m,l,p){return function(m){function q(a){a=m.call(this)||this;a.activeMode=null;a.modes=null;a.view=null;a.viewModel=
new l;return a}g(q,m);q.prototype.reset=function(){};q.prototype.render=function(){var a=this.viewModel.orientation,d=this.viewModel.state,g="disabled"===d,l="compass"===("rotation"===d?"rotation":"compass"),d=(m={},m["esri-disabled"]=g,m["esri-compass--active"]="device-orientation"===this.viewModel.activeMode,m["esri-interactive"]=!g,m),m=(q={},q["esri-icon-compass"]=l,q["esri-icon-dial"]=!l,q);return f.tsx("div",{bind:this,class:"esri-compass esri-widget-button esri-widget",classes:d,onclick:this._start,
onkeydown:this._start,role:"button",tabIndex:g?-1:0,"aria-label":p.reset,title:p.reset},f.tsx("span",{"aria-hidden":"true",class:"esri-compass__icon",classes:m,styles:this._toRotationTransform(a)}),f.tsx("span",{class:"esri-icon-font-fallback-text"},p.reset));var m,q};q.prototype._start=function(){var a=this.viewModel;a.nextMode();a.startMode()};q.prototype._toRotationTransform=function(a){return{transform:"rotateZ("+a.z+"deg)"}};a([d.aliasOf("viewModel.activeMode")],q.prototype,"activeMode",void 0);
a([d.aliasOf("viewModel.modes")],q.prototype,"modes",void 0);a([d.aliasOf("viewModel.view")],q.prototype,"view",void 0);a([d.property({type:l}),f.renderable(["viewModel.orientation","viewModel.state"])],q.prototype,"viewModel",void 0);a([d.aliasOf("viewModel.reset")],q.prototype,"reset",null);a([f.accessibleHandler()],q.prototype,"_start",null);return q=a([d.subclass("esri.widgets.Compass")],q)}(d.declared(m))})},"esri/widgets/Compass/CompassViewModel":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/HandleRegistry ../../core/Logger ../../core/promiseUtils ../../core/watchUtils".split(" "),
function(A,t,g,a,d,f,m,l,p,r){var q=l.getLogger("esri.widgets.CompassViewModel");return function(f){function l(a){a=f.call(this,a)||this;a._handles=new m;a.canUseHeading=!1;a.orientation={x:0,y:0,z:0};a.view=null;a._updateForCamera=a._updateForCamera.bind(a);a._updateForRotation=a._updateForRotation.bind(a);a._updateRotationWatcher=a._updateRotationWatcher.bind(a);a._updateViewHeading=a._updateViewHeading.bind(a);a._checkHeadingSupport=a._checkHeadingSupport.bind(a);a._canUseHeading();return a}g(l,
f);l.prototype.initialize=function(){this._handles.add(r.init(this,"view",this._updateRotationWatcher))};l.prototype.destroy=function(){this._removeCheckHeadingListener();this._removeOrientationListener();this._handles.destroy();this.view=this._handles=null};Object.defineProperty(l.prototype,"activeMode",{get:function(){var a=this._get("activeMode");return a?a:(a=this.modes)?a[0]:"none"},set:function(a){this.stopMode();this._set("activeMode",a);void 0===a&&this._clearOverride("activeMode")},enumerable:!0,
configurable:!0});Object.defineProperty(l.prototype,"canShowNorth",{get:function(){var a=this.get("view.spatialReference");return a&&(a.isWebMercator||a.isWGS84)},enumerable:!0,configurable:!0});Object.defineProperty(l.prototype,"modes",{get:function(){return this._get("modes")||["reset"]},set:function(a){this._set("modes",a);void 0===a&&this._clearOverride("modes")},enumerable:!0,configurable:!0});Object.defineProperty(l.prototype,"state",{get:function(){return this.get("view.ready")?this.canShowNorth?
"compass":"rotation":"disabled"},enumerable:!0,configurable:!0});l.prototype.previousMode=function(){var a=this.modes;2>a.length||(a=a.indexOf(this.activeMode),this._paginateMode(a-1))};l.prototype.nextMode=function(){var a=this.modes;2>a.length||(a=a.indexOf(this.activeMode),this._paginateMode(a+1))};l.prototype.startMode=function(){var a=this.activeMode;"reset"===a&&this.reset();"device-orientation"===a&&(this._removeOrientationListener(),this._addOrientationListener())};l.prototype.stopMode=function(){"device-orientation"===
this.activeMode&&this._removeOrientationListener()};l.prototype.reset=function(){if(this.get("view.ready")){var a={};"2d"===this.view.type?a.rotation=0:a.heading=0;this.view.goTo(a)}};l.prototype._supportsDeviceOrientation=function(){return"DeviceOrientationEvent"in window};l.prototype._paginateMode=function(a){var d=this.modes;this.activeMode=d[(a+d.length)%d.length]};l.prototype._getHeading=function(a){return a.webkitCompassHeading};l.prototype._removeCheckHeadingListener=function(){this._supportsDeviceOrientation()&&
window.removeEventListener("deviceorientation",this._checkHeadingSupport)};l.prototype._checkHeadingSupport=function(a){"number"===typeof this._getHeading(a)&&this._set("canUseHeading",!0);this._removeCheckHeadingListener()};l.prototype._canUseHeading=function(){var a=this;this._supportsDeviceOrientation()&&(window.addEventListener("deviceorientation",this._checkHeadingSupport),p.after(500).then(function(){a._removeCheckHeadingListener()}))};l.prototype._updateViewHeading=function(a){var d=this.view;
a=this._getHeading(a);"number"!==typeof a||0>a||360<a||!d||("3d"===d.type&&d.goTo({heading:a}),"2d"===d.type&&(d.rotation=a))};l.prototype._removeOrientationListener=function(){this.canUseHeading&&window.removeEventListener("deviceorientation",this._updateViewHeading)};l.prototype._addOrientationListener=function(){var a=this.canShowNorth;this.canUseHeading?a?window.addEventListener("deviceorientation",this._updateViewHeading):q.warn("device-orientation mode requires 'canShowNorth' to be true"):q.warn("The deviceorientation event is not supported in this browser")};
l.prototype._updateForRotation=function(a){void 0!==a&&null!==a&&(this.orientation={z:a})};l.prototype._updateForCamera=function(a){a&&(this.orientation={x:0,y:0,z:-a.heading})};l.prototype._updateRotationWatcher=function(a){this._handles.removeAll();a&&("2d"===a.type?this._handles.add(r.init(this,"view.rotation",this._updateForRotation)):this._handles.add(r.init(this,"view.camera",this._updateForCamera)))};a([d.property({dependsOn:["modes"]})],l.prototype,"activeMode",null);a([d.property({dependsOn:["view.spatialReference.isWebMercator",
"view.spatialReference.wkid"],readOnly:!0})],l.prototype,"canShowNorth",null);a([d.property({readOnly:!0})],l.prototype,"canUseHeading",void 0);a([d.property({dependsOn:["canUseHeading"]})],l.prototype,"modes",null);a([d.property()],l.prototype,"orientation",void 0);a([d.property({dependsOn:["view.ready","canShowNorth"],readOnly:!0})],l.prototype,"state",null);a([d.property()],l.prototype,"view",void 0);a([d.property()],l.prototype,"previousMode",null);a([d.property()],l.prototype,"nextMode",null);
a([d.property()],l.prototype,"startMode",null);a([d.property()],l.prototype,"stopMode",null);a([d.property()],l.prototype,"reset",null);return l=a([d.subclass("esri.widgets.CompassViewModel")],l)}(d.declared(f))})},"esri/widgets/Zoom":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./support/widget ./Widget ./Zoom/IconButton ./Zoom/ZoomViewModel dojo/i18n!./Zoom/nls/Zoom".split(" "),function(A,t,g,a,d,f,
m,l,p,r){return function(m){function q(a){a=m.call(this)||this;a.view=null;a.viewModel=new p;return a}g(q,m);q.prototype.postInitialize=function(){this._zoomInButton=new l({action:this.zoomIn,iconClass:"esri-icon-plus",title:r.zoomIn});this._zoomOutButton=new l({action:this.zoomOut,iconClass:"esri-icon-minus",title:r.zoomOut})};Object.defineProperty(q.prototype,"layout",{set:function(a){"horizontal"!==a&&(a="vertical");this._set("layout",a)},enumerable:!0,configurable:!0});q.prototype.render=function(){var a=
this.viewModel,d=(g={},g["esri-zoom--horizontal"]="horizontal"===this.layout,g);this._zoomInButton.enabled="ready"===a.state&&a.canZoomIn;this._zoomOutButton.enabled="ready"===a.state&&a.canZoomOut;return f.tsx("div",{class:"esri-zoom esri-widget",classes:d},this._zoomInButton.render(),this._zoomOutButton.render());var g};q.prototype.zoomIn=function(){};q.prototype.zoomOut=function(){};a([d.property({value:"vertical"}),f.renderable()],q.prototype,"layout",null);a([d.aliasOf("viewModel.view"),f.renderable()],
q.prototype,"view",void 0);a([d.property({type:p}),f.renderable(["viewModel.canZoomIn","viewModel.canZoomOut","viewModel.state"])],q.prototype,"viewModel",void 0);a([d.aliasOf("viewModel.zoomIn")],q.prototype,"zoomIn",null);a([d.aliasOf("viewModel.zoomOut")],q.prototype,"zoomOut",null);return q=a([d.subclass("esri.widgets.Zoom")],q)}(d.declared(m))})},"esri/widgets/Zoom/IconButton":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../support/widget ../Widget".split(" "),
function(A,t,g,a,d,f,m){return function(l){function m(){var a=null!==l&&l.apply(this,arguments)||this;a.enabled=!0;a.iconClass="";a.title="";return a}g(m,l);m.prototype.render=function(){var a=this.enabled?0:-1,d=(g={},g["esri-disabled"]=!this.enabled,g["esri-interactive"]=this.enabled,g),g=(l={},l[this.iconClass]=!!this.iconClass,l);return f.tsx("div",{bind:this,class:"esri-widget-button esri-widget",classes:d,onclick:this._triggerAction,onkeydown:this._triggerAction,role:"button",tabIndex:a,title:this.title},
f.tsx("span",{"aria-hidden":"true",role:"presentation",class:"esri-icon",classes:g}),f.tsx("span",{class:"esri-icon-font-fallback-text"},this.title));var g,l};m.prototype._triggerAction=function(){this.action.call(this)};a([d.property()],m.prototype,"action",void 0);a([d.property(),f.renderable()],m.prototype,"enabled",void 0);a([d.property(),f.renderable()],m.prototype,"iconClass",void 0);a([d.property(),f.renderable()],m.prototype,"title",void 0);a([f.accessibleHandler()],m.prototype,"_triggerAction",
null);return m=a([d.subclass("esri.widgets.IconButton")],m)}(d.declared(m))})},"esri/widgets/Zoom/ZoomViewModel":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ./ZoomConditions3D ./ZoomConditions2D ../../core/Accessor".split(" "),function(A,t,g,a,d,f,m,l){return function(l){function p(a){a=l.call(this,a)||this;a.canZoomIn=null;a.canZoomOut=null;a.zoomIn=a.zoomIn.bind(a);a.zoomOut=a.zoomOut.bind(a);
return a}g(p,l);p.prototype.destroy=function(){this.view=null};Object.defineProperty(p.prototype,"state",{get:function(){return this.get("view.ready")?"ready":"disabled"},enumerable:!0,configurable:!0});Object.defineProperty(p.prototype,"view",{set:function(a){a?"2d"===a.type?this._zoomConditions=new m({view:a}):"3d"===a.type&&(this._zoomConditions=new f):this._zoomConditions=null;this._set("view",a)},enumerable:!0,configurable:!0});p.prototype.zoomIn=function(){this.canZoomIn&&this._zoomToFactor(.5)};
p.prototype.zoomOut=function(){this.canZoomOut&&this._zoomToFactor(2)};p.prototype._zoomToFactor=function(a){if("ready"===this.state){var d=this.view;"3d"===this.view.type?d.goTo({zoomFactor:1/a}):d.goTo({scale:this.get("view.scale")*a})}};a([d.property()],p.prototype,"_zoomConditions",void 0);a([d.property({aliasOf:"_zoomConditions.canZoomIn",readOnly:!0})],p.prototype,"canZoomIn",void 0);a([d.property({aliasOf:"_zoomConditions.canZoomOut",readOnly:!0})],p.prototype,"canZoomOut",void 0);a([d.property({dependsOn:["view.ready"],
readOnly:!0})],p.prototype,"state",null);a([d.property()],p.prototype,"view",null);a([d.property()],p.prototype,"zoomIn",null);a([d.property()],p.prototype,"zoomOut",null);return p=a([d.subclass("esri.widgets.Zoom.ZoomViewModel")],p)}(d.declared(l))})},"esri/widgets/Zoom/ZoomConditions3D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor".split(" "),function(A,t,g,a,d,f){return function(f){function l(){var a=
null!==f&&f.apply(this,arguments)||this;a.canZoomIn=!0;a.canZoomOut=!0;return a}g(l,f);a([d.property({readOnly:!0})],l.prototype,"canZoomIn",void 0);a([d.property({readOnly:!0})],l.prototype,"canZoomOut",void 0);return l=a([d.subclass("esri.widgets.Zoom.ZoomConditions3D")],l)}(d.declared(f))})},"esri/widgets/Zoom/ZoomConditions2D":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor".split(" "),
function(A,t,g,a,d,f){return function(f){function l(){return null!==f&&f.apply(this,arguments)||this}g(l,f);Object.defineProperty(l.prototype,"canZoomIn",{get:function(){var a=this.get("view.scale"),d=this.get("view.constraints.effectiveMaxScale");return 0===d||a>d},enumerable:!0,configurable:!0});Object.defineProperty(l.prototype,"canZoomOut",{get:function(){var a=this.get("view.scale"),d=this.get("view.constraints.effectiveMinScale");return 0===d||a<d},enumerable:!0,configurable:!0});a([d.property({dependsOn:["view.ready",
"view.scale"],readOnly:!0})],l.prototype,"canZoomIn",null);a([d.property({dependsOn:["view.ready","view.scale"],readOnly:!0})],l.prototype,"canZoomOut",null);a([d.property()],l.prototype,"view",void 0);return l=a([d.subclass("esri.widgets.Zoom.ZoomConditions2D")],l)}(d.declared(f))})},"esri/widgets/NavigationToggle":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ./support/widget ./Widget ./NavigationToggle/NavigationToggleViewModel dojo/i18n!./NavigationToggle/nls/NavigationToggle".split(" "),
function(A,t,g,a,d,f,m,l,p){return function(m){function q(a){a=m.call(this)||this;a.view=null;a.viewModel=new l;return a}g(q,m);Object.defineProperty(q.prototype,"layout",{set:function(a){"horizontal"!==a&&(a="vertical");this._set("layout",a)},enumerable:!0,configurable:!0});q.prototype.toggle=function(){};q.prototype.render=function(){var a="disabled"===this.get("viewModel.state"),d="pan"===this.get("viewModel.navigationMode"),g=(l={},l["esri-disabled"]=a,l["esri-navigation-toggle--horizontal"]=
"horizontal"===this.layout,l),l=(m={},m["esri-navigation-toggle__button--active"]=d,m),d=(q={},q["esri-navigation-toggle__button--active"]=!d,q);return f.tsx("div",{bind:this,class:"esri-navigation-toggle esri-widget",classes:g,onclick:this._toggle,onkeydown:this._toggle,tabIndex:a?-1:0,"aria-label":p.toggle,title:p.toggle},f.tsx("div",{class:f.join("esri-navigation-toggle__button esri-widget-button","esri-navigation-toggle__button--pan"),classes:l},f.tsx("span",{class:"esri-icon-pan"})),f.tsx("div",
{class:f.join("esri-navigation-toggle__button esri-widget-button","esri-navigation-toggle__button--rotate"),classes:d},f.tsx("span",{class:"esri-icon-rotate"})));var l,m,q};q.prototype._toggle=function(){this.toggle()};a([d.property({value:"vertical"}),f.renderable()],q.prototype,"layout",null);a([d.aliasOf("viewModel.view"),f.renderable()],q.prototype,"view",void 0);a([d.property({type:l}),f.renderable(["viewModel.state","viewModel.navigationMode"])],q.prototype,"viewModel",void 0);a([d.aliasOf("viewModel.toggle")],
q.prototype,"toggle",null);a([f.accessibleHandler()],q.prototype,"_toggle",null);return q=a([d.subclass("esri.widgets.NavigationToggle")],q)}(d.declared(m))})},"esri/widgets/NavigationToggle/NavigationToggleViewModel":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/watchUtils ../../core/Accessor ../../core/HandleRegistry".split(" "),function(A,t,g,a,d,f,m,l){return function(m){function p(a){a=
m.call(this,a)||this;a._handles=new l;a.navigationMode="pan";a.view=null;a.toggle=a.toggle.bind(a);return a}g(p,m);p.prototype.initialize=function(){this._handles.add(f.when(this,"view.inputManager",this._setNavigationMode.bind(this)))};p.prototype.destroy=function(){this._handles.destroy();this.view=this._handles=null};Object.defineProperty(p.prototype,"state",{get:function(){return this.get("view.ready")&&"3d"===this.view.type?"ready":"disabled"},enumerable:!0,configurable:!0});p.prototype.toggle=
function(){"disabled"!==this.state&&(this.navigationMode="pan"!==this.navigationMode?"pan":"rotate",this._setNavigationMode())};p.prototype._setNavigationMode=function(){this.get("view.inputManager").primaryDragAction="pan"===this.navigationMode?"pan":"rotate"};a([d.property({dependsOn:["view.ready"],readOnly:!0})],p.prototype,"state",null);a([d.property()],p.prototype,"navigationMode",void 0);a([d.property()],p.prototype,"view",void 0);a([d.property()],p.prototype,"toggle",null);return p=a([d.subclass("esri.widgets.NavigationToggleViewModel")],
p)}(d.declared(m))})},"esri/views/ui/2d/DefaultUI2D":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ../DefaultUI dojo/_base/lang".split(" "),function(A,t,g,a,d,f,m){return function(f){function l(){return f.call(this)||this}g(l,f);l.prototype.getDefaults=function(){return m.mixin(this.inherited(arguments),{components:["attribution","zoom"]})};return l=a([d.subclass("esri.views.ui.2d.DefaultUI2D")],
l)}(d.declared(f))})},"esri/views/2d/engine/Stage":function(){define("require exports ../../../core/tsSupport/extendsHelper ../../../core/promiseUtils ../../../core/Scheduler ../FrameBudget ./DOMContainer ./StageGL ./Container".split(" "),function(A,t,g,a,d,f,m,l,p){function r(a){if(a instanceof l)return a;if(a instanceof p){var d=0;for(a=a.children;d<a.length;d++){var f=r(a[d]);if(f)return f}}return null}return function(l){function m(a){var g=l.call(this)||this;g.element=a;g._budget=new f;g._renderParameters=
{budget:g._budget,state:g.state,devicePixelRatio:window.devicePixelRatio,stationary:!1};g._renderRequested=!1;g._taskHandle=d.addFrameTask({render:function(){return g.renderFrame()}});g._stationary=!0;g.attached=!0;g._taskHandle.pause();return g}g(m,l);m.prototype.destroy=function(){this.removeAllChildren();this.renderFrame();this._taskHandle.remove();this._taskHandle=null};Object.defineProperty(m.prototype,"state",{get:function(){return this._state},set:function(a){this._state=a;this.requestRender()},
enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"stationary",{get:function(){return this._stationary},set:function(a){this._stationary!==a&&(this._stationary=a,this.requestRender())},enumerable:!0,configurable:!0});m.prototype.start=function(){this._taskHandle.resume()};m.prototype.stop=function(){this._taskHandle.isPaused()||this._taskHandle.pause()};m.prototype.requestRender=function(){this._renderRequested=!0;this._taskHandle&&this._taskHandle.isPaused()&&this._taskHandle.resume()};
m.prototype.takeScreenshot=function(d){var f=r(this);return f?f.takeScreenshot(d):a.reject("Could not find an object capable of capturing screenshot!")};m.prototype.renderFrame=function(){this._renderRequested&&(this._renderRequested=!1,this._renderParameters.state=this._state,this._renderParameters.stationary=this.stationary,this._renderParameters.devicePixelRatio=window.devicePixelRatio,this.processRender(this._renderParameters));this._renderRequested||this._taskHandle.pause()};return m}(m)})},
"esri/views/2d/engine/DOMContainer":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","./Container"],function(A,t,g,a){return function(a){function d(){return null!==a&&a.apply(this,arguments)||this}g(d,a);d.prototype.createElement=function(){var a=document.createElement("div");a.setAttribute("class","esri-display-object");return a};d.prototype.setElement=function(a){this.element=a};d.prototype.doRender=function(d){var f=this.element.style;this.visible?(f.display="block",
d.opacity=this.opacity,a.prototype.doRender.call(this,d)):f.display="none"};d.prototype.prepareChildrenRenderParameters=function(a){return a};d.prototype.attachChild=function(a,d){var f=a.element;f||(f=a.createElement(),a.setElement(f));return a.attach(d)};d.prototype.detachChild=function(a,d){a.detach(d);this.element.contains(a.element)&&this.element.removeChild(a.element);a.setElement(null)};d.prototype.renderChildren=function(d){for(var f=this.children,g=this.element.childNodes,m=0,q=f.length,
v=0;v<q;v++)if(f[v].attached){var x=f[v].element;g[m]!==x&&(null!=g[m+1]?this.element.insertBefore(x,g[m]):this.element.appendChild(x));m+=1}a.prototype.renderChildren.call(this,d)};return d}(a)})},"esri/views/2d/engine/Container":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","./DisplayObject"],function(A,t,g,a){var d;(function(a){a[a.BEFORE=0]="BEFORE";a[a.ATTACHING=1]="ATTACHING";a[a.DETACHING=2]="DETACHING";a[a.RENDERING=3]="RENDERING";a[a.AFTER=4]="AFTER";a[a.DONE=
5]="DONE"})(d||(d={}));return function(a){function f(){var f=null!==a&&a.apply(this,arguments)||this;f._childrenSet=new Set;f._childrenToAttach=[];f._childrenToDetach=[];f._renderPhase=d.DONE;f.children=[];return f}g(f,a);Object.defineProperty(f.prototype,"numChildren",{get:function(){return this.children.length},enumerable:!0,configurable:!0});f.prototype.detach=function(a){var d=this.children;a=this.prepareChildrenRenderParameters(a);for(var f=d.length,g=0;g<f;g++){var l=d[g];l.attached&&(this.detachChild(l,
a),l.attached=!1,l.parent=null)}};f.prototype.doRender=function(a){var f=this.prepareChildrenRenderParameters(a);this._renderPhase=d.BEFORE;this.beforeRenderChildren(a,f);this._renderPhase=d.ATTACHING;this.attachChildren(f)||this.requestRender();this._renderPhase=d.DETACHING;for(var g=this._childrenToDetach;0<g.length;){var l=g.shift();this.detachChild(l,f);l.attached=!1;l.parent=null}this._renderPhase=d.RENDERING;this.renderChildren(f);this._renderPhase=d.AFTER;this.afterRenderChildren(a,f);this._renderPhase=
d.DONE};f.prototype.addChild=function(a){return this.addChildAt(a,this.children.length)};f.prototype.addChildAt=function(a,f){void 0===f&&(f=this.numChildren);if(!a||this.contains(a))return a;var g=a.parent;g&&g!==this&&g.removeChild(a);f>=this.numChildren?this.children.push(a):this.children.splice(f,0,a);this._childrenSet.add(a);f=this._childrenToDetach.indexOf(a);-1<f&&this._childrenToDetach.splice(f,1);this._childrenToAttach.push(a);this._renderPhase>=d.RENDERING&&this.requestRender();return a};
f.prototype.contains=function(a){return this._childrenSet.has(a)};f.prototype.getChildIndex=function(a){return this.children.indexOf(a)};f.prototype.getChildAt=function(a){return 0>a||a>this.children.length?null:this.children[a]};f.prototype.removeAllChildren=function(){for(var a=this.numChildren;a--;)this.removeChildAt(0)};f.prototype.removeChild=function(a){return this.contains(a)?this.removeChildAt(this.getChildIndex(a)):a};f.prototype.removeChildAt=function(a){if(0>a||a>=this.children.length)return null;
a=this.children.splice(a,1)[0];this._childrenSet["delete"](a);if(a.attached)this._childrenToDetach.push(a),this._renderPhase>=d.RENDERING&&this.requestRender();else{var f=this._childrenToAttach.indexOf(a);-1<f&&this._childrenToAttach.splice(f,1)}return a};f.prototype.requestChildRender=function(a){a&&a.parent===this&&this._renderPhase>=d.RENDERING&&this.requestRender()};f.prototype.setChildIndex=function(a,f){var g=this.getChildIndex(a);-1<g&&(this.children.splice(g,1),this.children.splice(f,0,a),
this._renderPhase>=d.RENDERING&&this.requestRender())};f.prototype.sortChildren=function(a){this._renderPhase>d.RENDERING&&this.requestRender();return this.children.sort(a)};f.prototype.attachChildren=function(a){var d=this._childrenToAttach;if(0===d.length)return!0;for(var f=0===d.length;!f;)f=d.shift(),this.attachChild(f,a)&&(f.attached=!0,f.parent=this),f=0===d.length;return 0===d.length};f.prototype.renderChildren=function(a){for(var d=this.children,f=d.length,g=0;g<f;g++){var l=d[g];l.attached&&
this.renderChild(l,a)}};f.prototype.beforeRenderChildren=function(a,d){};f.prototype.attachChild=function(a,d){return a.attach(d)};f.prototype.detachChild=function(a,d){a.detach(d)};f.prototype.renderChild=function(a,d){a.processRender(d)};f.prototype.afterRenderChildren=function(a,d){};return f}(a)})},"esri/views/2d/engine/DisplayObject":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","./Evented"],function(A,t,g,a){return function(a){function d(){var d=null!==a&&a.apply(this,
arguments)||this;d._renderRequestedCalled=!1;d._attached=!1;d._opacity=1;d.renderRequested=!1;d._visible=!0;return d}g(d,a);Object.defineProperty(d.prototype,"attached",{get:function(){return this._attached},set:function(a){this._attached!==a&&((this._attached=a)?this.hasEventListener("attach")&&this.emit("attach"):this.hasEventListener("detach")&&this.emit("detach"))},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"opacity",{get:function(){return this._opacity},set:function(a){this._opacity!==
a&&(this._opacity=a,this.requestRender())},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"visible",{get:function(){return this._visible},set:function(a){this._visible!==a&&(this._visible=a,this.requestRender())},enumerable:!0,configurable:!0});d.prototype.attach=function(a){return!0};d.prototype.detach=function(a){};d.prototype.processRender=function(a){this._renderRequestedCalled=!1;this.doRender(a);this._renderRequestedCalled||(this.renderRequested=!1);this.hasEventListener("post-render")&&
this.emit("post-render")};d.prototype.requestRender=function(){var a=this.renderRequested;this.renderRequested=this._renderRequestedCalled=!0;this.parent&&this.parent.requestChildRender(this);a!==this.renderRequested&&this.hasEventListener("will-render")&&this.emit("will-render")};d.prototype.dispose=function(){};return d}(a.Evented)})},"esri/views/2d/engine/Evented":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","dojo/aspect","dojo/on"],function(A,t,g,a,d){Object.defineProperty(t,
"__esModule",{value:!0});A=function(){function f(){}f.prototype.on=function(d,f){return a.after(this,"on"+d,f,!0)};f.prototype.once=function(a,f){return d.once(this,a,f)};f.prototype.emit=function(a){d.emit(this,a,this)};f.prototype.hasEventListener=function(a){a="on"+a;return!(!this[a]||!this[a].after)};return f}();t.Evented=A;t.EventedMixin=function(f){return function(f){function l(){return null!==f&&f.apply(this,arguments)||this}g(l,f);l.prototype.on=function(d,f){return a.after(this,"on"+d,f,
!0)};l.prototype.once=function(a,f){return d.once(this,a,f)};l.prototype.emit=function(a,f){d.emit(this,a,f)};l.prototype.hasEventListener=function(a){a="on"+a;return!(!this[a]||!this[a].after)};return l}(f)}})},"esri/views/2d/engine/StageGL":function(){define("require exports ../../../core/tsSupport/extendsHelper ../libs/gl-matrix/common ../libs/gl-matrix/vec2 ../libs/gl-matrix/mat2d ./webgl/BitBlitRenderer ../../support/screenshotUtils ../../../core/promiseUtils ../../webgl/RenderingContext ../../webgl/FramebufferObject ../../webgl/webgl-utils ../../webgl/Program ../../webgl/VertexArrayObject ../../webgl/BufferObject ./webgl/painter/WGLPainter ./Container ./webgl/shaders/glShaderSnippets".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x,w,B,E,D,F){function H(a){return{budget:a.budget,state:a.state,devicePixelRatio:a.devicePixelRatio,stationary:a.stationary}}var I={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg"};return function(t){function z(){var a=null!==t&&t.apply(this,arguments)||this;a._clipData=new Float32Array(8);a._upperLeft=d.create();a._upperRight=d.create();a._lowerLeft=d.create();a._lowerRight=d.create();a._mat2=f.create();a._clipRendererInitialized=!1;return a}g(z,t);Object.defineProperty(z.prototype,
"glPainter",{get:function(){return this._painter},enumerable:!0,configurable:!0});z.prototype.createElement=function(){var a=document.createElement("canvas");a.setAttribute("class","esri-display-object");return a};z.prototype.setElement=function(a){this.element=a};z.prototype.attach=function(a){if(this.attached)return!0;this._resizeCanvas(a);var d=v.setupWebGL(this.element,{alpha:!0,antialias:!1,depth:!0,stencil:!0});this._renderingContext=new r(d[0]);this.attached=!0;this._cachedRenderParams=H(a);
this._painter||(this._painter=new E,this._painter.initialize(this._renderingContext));return t.prototype.attach.call(this,a)};z.prototype.detach=function(a){t.prototype.detach.call(this,a);this._renderingContext&&(this._renderingContext.dispose(),this._renderingContext=null);this._cachedRenderParams=null};z.prototype.beforeRenderChildren=function(g,l){var m=g.state,p=this._painter;if(p)if(l=this._renderingContext,l.enforceState(),p.update(m,g.devicePixelRatio),m.spatialReference&&(m.spatialReference._isWrappable?
m.spatialReference._isWrappable():m.spatialReference.isWrappable)){var r=m.width,p=m.height,v=m.rotation,r=Math.round(r*g.devicePixelRatio),p=Math.round(p*g.devicePixelRatio),x=a.toRadian(v),w=Math.abs(Math.cos(x)),t=Math.abs(Math.sin(x)),B=Math.round(m.worldScreenWidth);if(Math.round(r*w+p*t)<=B)this._clipFrame=!1;else{this._clipFBO&&this._clipFBO.width===r&&this._clipFBO.height===p||(this._clipFBO=new q(l,{colorTarget:0,depthStencilTarget:3,width:r,height:p}));var z=.5*r,h=.5*p,m=1/r,E=1/p;g=.5*
B*g.devicePixelRatio;var y=.5*(r*t+p*w),r=this._upperLeft,w=this._upperRight,t=this._lowerLeft,B=this._lowerRight;d.set(r,-g,-y);d.set(w,g,-y);d.set(t,-g,y);d.set(B,g,y);f.identity(this._mat2);f.translate(this._mat2,this._mat2,[z,h]);0!==v&&f.rotate(this._mat2,this._mat2,x);d.transformMat2d(r,r,this._mat2);d.transformMat2d(w,w,this._mat2);d.transformMat2d(t,t,this._mat2);d.transformMat2d(B,B,this._mat2);v=this._clipData;v.set([2*t[0]*m-1,2*(p-t[1])*E-1,2*B[0]*m-1,2*(p-B[1])*E-1,2*r[0]*m-1,2*(p-r[1])*
E-1,2*w[0]*m-1,2*(p-w[1])*E-1]);this._clipRendererInitialized||this._initializeClipRenderer(l);this._clipVBO.setData(v);this._boundFBO=l.getBoundFramebufferObject();l.bindFramebuffer(this._clipFBO);l.setDepthWriteEnabled(!0);l.setStencilWriteMask(255);l.setClearColor(0,0,0,0);l.setClearDepth(1);l.setClearStencil(0);l.clear(l.gl.COLOR_BUFFER_BIT|l.gl.DEPTH_BUFFER_BIT|l.gl.STENCIL_BUFFER_BIT);l.setDepthWriteEnabled(!1);this._clipFrame=!0}}else this._clipFrame=!1};z.prototype.afterRenderChildren=function(a,
d){this._clipFrame&&this._clipRendererInitialized&&(a=this._renderingContext,a.bindFramebuffer(this._boundFBO),this._boundFBO=null,a.bindVAO(this._clipVAO),a.bindProgram(this._clipStencilProgram),a.setDepthWriteEnabled(!1),a.setDepthTestEnabled(!1),a.setStencilTestEnabled(!0),a.setBlendingEnabled(!1),a.setColorMask(!1,!1,!1,!1),a.setStencilOp(7680,7680,7681),a.setStencilWriteMask(255),a.setStencilFunction(519,1,255),a.drawElements(4,6,5123,0),a.bindVAO(),a.setColorMask(!0,!0,!0,!0),a.setBlendingEnabled(!0),
a.setStencilFunction(514,1,255),this._blitRenderer.render(a,this._clipFBO.colorTexture,9728,1),a.setStencilTestEnabled(!1))};z.prototype.doRender=function(a){var d=this.element.style;this.visible?(d.display="block",d.opacity=""+this.opacity,this._resizeCanvas(a),t.prototype.doRender.call(this,a),this._cachedRenderParams=H(a)):d.display="none"};z.prototype.takeScreenshot=function(a){void 0===a&&(a={});var d=a.pixelRatio||1;this._cachedRenderParams.devicePixelRatio=d;var f=Math.round(d*this._cachedRenderParams.state.width),
g=Math.round(d*this._cachedRenderParams.state.height),m=0,r=0,v=f,x=g,w=f,t=g;if(w=a.area)m=Math.round(d*w.x),r=Math.round(d*w.y),v=Math.round(d*w.width),x=Math.round(d*w.height);void 0!==a.width&&void 0!==a.height?(w=a.width/a.height,x*w<v?(w*=x,m+=Math.floor((v-w)/2),v=Math.floor(w)):(w=v/w,r+=Math.floor((x-w)/2),x=Math.floor(w)),w=a.width,t=a.height):(w=v,t=x);d=document.createElement("canvas");d.width=w;d.height=t;var B=d.getContext("2d"),h=new Uint8Array(v*x*4),z=this._renderingContext,y=q.create(z,
{colorTarget:1,depthStencilTarget:3,width:f,height:g});z.bindFramebuffer(y);z.setViewport(0,0,f,g);this._cachedRenderParams.budget&&this._cachedRenderParams.budget.reset(Number.MAX_VALUE);var c=this._cachedRenderParams,b=this._renderingContext.gl;this._renderingContext.setClearColor(0,0,0,0);this._renderingContext.setClearDepth(1);this._renderingContext.setClearStencil(0);this._renderingContext.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT|b.STENCIL_BUFFER_BIT);c.context=this._renderingContext;this.beforeRenderChildren(c,
c);if(void 0!==a.rotation&&null!==a.rotation){var b=c.state,e=b.clone();e.viewpoint.rotation=a.rotation;c.state=e;this.renderChildren(c);c.state=b}else this.renderChildren(c);this.afterRenderChildren(c,c);y.readPixels(m,g-(r+x),v,x,6408,5121,h);z.bindFramebuffer();z=B.getImageData(0,0,w,t);if(0!==m||0!==r||v!==f||x!==g||w!==f||t!==g)l.resampleHermite(h,v,x,z.data,w,t,!0);else{r=x-1;x=0;y=4*v;for(e=b=m=g=f=v=c=void 0;x<r;){b=x*y;e=r*y;for(c=0;c<y;c+=4)v=h[b+c],f=h[b+c+1],g=h[b+c+2],m=h[b+c+3],h[b+
c]=h[e+c],h[b+c+1]=h[e+c+1],h[b+c+2]=h[e+c+2],h[b+c+3]=h[e+c+3],h[e+c]=v,h[e+c+1]=f,h[e+c+2]=g,h[e+c+3]=m;x++;r--}v=z.data;f=h.length;for(r=0;r<f;r++)v[r]=h[r]}h=z.data;x=h.length;for(r=0;r<x;r+=4)m=h[r+3],0<m&&(g=m/255,v=Math.floor(h[r+0]/g),f=Math.floor(h[r+1]/g),g=Math.floor(h[r+2]/g),h[r+0]=255>=v?v:255,h[r+1]=255>=f?f:255,h[r+2]=255>=g?g:255);B.putImageData(z,0,0);B=I[a.format?a.format.toLowerCase():"png"];h=1;void 0!==a.quality&&(h=a.quality/100);a=d.toDataURL(B,h);return p.resolve({dataURL:a,
x:0,y:0,width:w,height:t})};z.prototype.prepareChildrenRenderParameters=function(a){if(!this.attached||!this._renderingContext)return null;a=H(a);var d=this._renderingContext,f=d.gl;d.setDepthWriteEnabled(!0);d.setStencilWriteMask(255);d.setClearColor(0,0,0,0);d.setClearDepth(1);d.setClearStencil(0);d.clear(f.COLOR_BUFFER_BIT|f.DEPTH_BUFFER_BIT|f.STENCIL_BUFFER_BIT);d.setViewport(0,0,this.element.width,this.element.height);d.setDepthWriteEnabled(!1);a.context=d;return a};z.prototype.attachChild=function(a,
d){return a.attach(d)};z.prototype.detachChild=function(a,d){return a.detach(d)};z.prototype.renderChild=function(a,d){return a.processRender(d)};z.prototype._resizeCanvas=function(a){var d=this.element,f=d.style,g=a.state,l=a.devicePixelRatio;a=Math.round(g.width*l);l=Math.round(g.height*l);if(d.width!==a||d.height!==l)d.width=a,d.height=l;f.width=g.width+"px";f.height=g.height+"px"};z.prototype._initializeClipRenderer=function(a){if(this._clipRendererInitialized)return!0;this._blitRenderer=new m;
var d={a_pos:0},f=new x(a,F.stencilVS,F.stencilFS,d);if(!f)return!1;var g=B.createVertex(a,35040,32),l=new Uint16Array([0,1,2,2,1,3]),l=B.createIndex(a,35044,l);a=new w(a,d,{geometry:[{name:"a_pos",count:2,type:5126,offset:0,stride:8,normalized:!1,divisor:0}]},{geometry:g},l);this._clipStencilProgram=f;this._clipVBO=g;this._clipVAO=a;return this._clipRendererInitialized=!0};return z}(D)})},"esri/views/2d/engine/webgl/BitBlitRenderer":function(){define("require exports ../../../webgl/Program ../../../webgl/VertexArrayObject ../../../webgl/BufferObject ./shaders/glShaderSnippets".split(" "),
function(A,t,g,a,d,f){return function(){function m(){this._initialized=!1}m.prototype.render=function(a,d,f,g){a&&(this._initialized||this._initialize(a),a.setBlendFunctionSeparate(1,771,1,771),a.bindVAO(this._vertexArrayObject),a.bindProgram(this._program),d.setSamplingMode(f),a.bindTexture(d,0),this._program.setUniform1i("u_tex",0),this._program.setUniform1f("u_opacity",g),a.drawArrays(5,0,4),a.bindVAO())};m.prototype._initialize=function(l){if(this._initialized)return!0;var m={a_pos:0,a_tex:1},
r=new g(l,f.bitblitVS,f.bitblitFS,m);if(!r)return!1;var q=new Int8Array(16);q[0]=-1;q[1]=-1;q[2]=0;q[3]=0;q[4]=1;q[5]=-1;q[6]=1;q[7]=0;q[8]=-1;q[9]=1;q[10]=0;q[11]=1;q[12]=1;q[13]=1;q[14]=1;q[15]=1;l=new a(l,m,{geometry:[{name:"a_pos",count:2,type:5120,offset:0,stride:4,normalized:!1,divisor:0},{name:"a_tex",count:2,type:5120,offset:2,stride:4,normalized:!1,divisor:0}]},{geometry:d.createVertex(l,35044,q)});this._program=r;this._vertexArrayObject=l;return this._initialized=!0};return m}()})},"esri/views/webgl/Program":function(){define(["require",
"exports","dojo/has"],function(A,t,g){return function(){function a(d,f,g,l,p){void 0===p&&(p={});this._glName=this._context=null;this._locations={};this._id=void 0;this._initialized=!1;this._fShader=this._vShader=null;this._defines={};this._nameToUniformLocation={};this._nameToAttribLocation={};this._nameToUniform1={};this._nameToUniform2={};this._nameToUniform3={};this._nameToUniform4={};this._nameToUniformMatrix3={};this._nameToUniformMatrix4={};d||console.error("RenderingContext isn't initialized!");
0===f.length&&console.error("Shaders source should not be empty!");this._context=d;this._vertexShaderSource=f;this._fragmentShaderSource=g;if(Array.isArray(p))for(d=0;d<p.length;d++)this._defines[p[d]]="1";else this._defines=p;this._id=a._nextId++;this._locations=l}Object.defineProperty(a.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,
"locations",{get:function(){return this._locations},enumerable:!0,configurable:!0});a.prototype.getDefine=function(a){return this._defines[a]};a.prototype.dispose=function(){if(this._context){var a=this._context.gl;this._vShader&&(a.deleteShader(this._vShader),this._vShader=null);this._fShader&&(a.deleteShader(this._fShader),this._fShader=null);this._glName&&(a.deleteProgram(this._glName),this._glName=null);this._context=null}};a.prototype.initialize=function(){if(!this._initialized){this._vShader=
this._loadShader(35633);this._fShader=this._loadShader(35632);this._vShader&&this._fShader||console.error("Error loading shaders!");var a=this._context.gl,f=a.createProgram();a.attachShader(f,this._vShader);a.attachShader(f,this._fShader);for(var g in this._locations)a.bindAttribLocation(f,this._locations[g],g);a.linkProgram(f);a.getProgramParameter(f,a.LINK_STATUS)||console.error("Could not initialize shader\nVALIDATE_STATUS: "+a.getProgramParameter(f,a.VALIDATE_STATUS)+", gl error ["+a.getError()+
"]infoLog: "+a.getProgramInfoLog(f));this._glName=f;this._initialized=!0}};a.prototype.getUniformLocation=function(a){this.initialize();void 0===this._nameToUniformLocation[a]&&(this._nameToUniformLocation[a]=this._context.gl.getUniformLocation(this._glName,a));return this._nameToUniformLocation[a]};a.prototype.hasUniform=function(a){return null!==this.getUniformLocation(a)};a.prototype.getAttribLocation=function(a){this.initialize();void 0===this._nameToAttribLocation[a]&&(this._nameToAttribLocation[a]=
this._context.gl.getAttribLocation(this._glName,a));return this._nameToAttribLocation[a]};a.prototype.setUniform1i=function(a,f){var d=this._nameToUniform1[a];if(void 0===d||f!==d)this._context.bindProgram(this),this._context.gl.uniform1i(this.getUniformLocation(a),f),this._nameToUniform1[a]=f};a.prototype.setUniform1f=function(a,f){var d=this._nameToUniform1[a];if(void 0===d||f!==d)this._context.bindProgram(this),this._context.gl.uniform1f(this.getUniformLocation(a),f),this._nameToUniform1[a]=f};
a.prototype.setUniform1fv=function(d,f){var g=this._nameToUniform2[d];void 0!==g&&a._arraysEqual(f,g)||(this._context.bindProgram(this),this._context.gl.uniform1fv(this.getUniformLocation(d),f),void 0===g?this._nameToUniform2[d]=new Float32Array(f):g.set(f))};a.prototype.setUniform2f=function(a,f,g){var d=this._nameToUniform2[a];if(void 0===d||f!==d[0]||g!==d[1])this._context.bindProgram(this),this._context.gl.uniform2f(this.getUniformLocation(a),f,g),void 0===d?this._nameToUniform2[a]=new Float32Array([f,
g]):(d[0]=f,d[1]=g)};a.prototype.setUniform2fv=function(d,f){var g=this._nameToUniform2[d];void 0!==g&&a._arraysEqual(f,g)||(this._context.bindProgram(this),this._context.gl.uniform2fv(this.getUniformLocation(d),f),void 0===g?this._nameToUniform2[d]=new Float32Array(f):g.set(f))};a.prototype.setUniform3f=function(a,f,g,l){var d=this._nameToUniform3[a];if(void 0===d||f!==d[0]||g!==d[1]||l!==d[2])this._context.bindProgram(this),this._context.gl.uniform3f(this.getUniformLocation(a),f,g,l),void 0===d?
this._nameToUniform3[a]=new Float32Array([f,g,l]):(d[0]=f,d[1]=g,d[2]=l)};a.prototype.setUniform3fv=function(d,f){var g=this._nameToUniform3[d];void 0!==g&&a._arraysEqual(f,g)||(this._context.bindProgram(this),this._context.gl.uniform3fv(this.getUniformLocation(d),f),void 0===g?this._nameToUniform3[d]=new Float32Array(f):g.set(f))};a.prototype.setUniform4f=function(a,f,g,l,p){var d=this._nameToUniform4[a];if(void 0===d||f!==d[0]||g!==d[1]||l!==d[2]||p!==d[3])this._context.bindProgram(this),this._context.gl.uniform4f(this.getUniformLocation(a),
f,g,l,p),void 0===d?this._nameToUniform4[a]=new Float32Array([f,g,l,p]):(d[0]=f,d[1]=g,d[2]=l,d[3]=p)};a.prototype.setUniform4fv=function(d,f){var g=this._nameToUniform4[d];void 0!==g&&a._arraysEqual(f,g)||(this._context.bindProgram(this),this._context.gl.uniform4fv(this.getUniformLocation(d),f),void 0===g?this._nameToUniform4[d]=new Float32Array(f):g.set(f))};a.prototype.setUniformMatrix3fv=function(d,f,g){void 0===g&&(g=!1);var l=this._nameToUniformMatrix3[d];void 0!==l&&(9===l.length?a._matrix3Equal(l,
f):a._arraysEqual(f,l))||(this._context.bindProgram(this),this._context.gl.uniformMatrix3fv(this.getUniformLocation(d),g,f),void 0===l?this._nameToUniformMatrix3[d]=new Float32Array(f):l.set(f))};a.prototype.setUniformMatrix4fv=function(d,f,g){void 0===g&&(g=!1);var l=this._nameToUniformMatrix4[d];void 0!==l&&(16===l.length?a._matrix4Equal(l,f):a._arraysEqual(f,l))||(this._context.bindProgram(this),this._context.gl.uniformMatrix4fv(this.getUniformLocation(d),g,f),void 0===l?this._nameToUniformMatrix4[d]=
new Float32Array(f):l.set(f))};a._padToThree=function(a){var d=a.toString();1E3>a&&(d=(" "+a).slice(-3));return d};a.prototype._addLineNumbers=function(d){var f=2;return d.replace(/\n/g,function(){return"\n"+a._padToThree(f++)+":"})};a.prototype._loadShader=function(a){var d=35633===a?this._vertexShaderSource:this._fragmentShaderSource,g="",l;for(l in this._defines)g+="#define "+l+" "+this._defines[l]+"\n";d=g+d;g=this._context.gl;a=g.createShader(a);g.shaderSource(a,d);g.compileShader(a);g.getShaderParameter(a,
g.COMPILE_STATUS)||(console.error(g.getShaderInfoLog(a)),console.error(this._addLineNumbers(d)));return a};a._matrix4Equal=function(a,f){return a[0]===f[0]&&a[1]===f[1]&&a[2]===f[2]&&a[3]===f[3]&&a[4]===f[4]&&a[5]===f[5]&&a[6]===f[6]&&a[7]===f[7]&&a[8]===f[8]&&a[9]===f[9]&&a[10]===f[10]&&a[11]===f[11]&&a[12]===f[12]&&a[13]===f[13]&&a[14]===f[14]&&a[15]===f[15]};a._matrix3Equal=function(a,f){return a[0]===f[0]&&a[1]===f[1]&&a[2]===f[2]&&a[3]===f[3]&&a[4]===f[4]&&a[5]===f[5]&&a[6]===f[6]&&a[7]===f[7]&&
a[8]===f[8]};a._arraysEqual=function(a,f){if(a.length!==f.length)return!1;for(var d=0;d<a.length;++d)if(a[d]!==f[d])return!1;return!0};a._nextId=0;return a}()})},"esri/views/webgl/VertexArrayObject":function(){define(["require","exports"],function(A,t){return function(){function g(a,d,f,m,l){this._locations=this._layout=this._glName=this._context=null;this._indexBuffer=this._buffers=void 0;this._initialized=!1;this._context=a;this._layout=f;this._buffers=m;this._locations=d;l&&(this._indexBuffer=
l);this._id=g._nextId++}Object.defineProperty(g.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"vertexBuffers",{get:function(){return this._buffers},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"indexBuffer",{get:function(){return this._indexBuffer},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,
"layout",{get:function(){return this._layout},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"locations",{get:function(){return this._locations},enumerable:!0,configurable:!0});g.prototype.dispose=function(a){void 0===a&&(a=!0);if(this._context){var d=this._context.extensions.vao;d&&this._glName&&(d.deleteVertexArrayOES(this._glName),this._glName=null);this._context.getBoundVAO()===this&&this._context.bindVAO(null);if(a){for(var f in this._buffers)this._buffers[f].dispose(),delete this._buffers[f];
this._indexBuffer&&(this._indexBuffer.dispose(),this._indexBuffer=null)}this._context=null}};g.prototype.initialize=function(){if(!this._initialized){var a=this._context.extensions.vao;if(a){var d=a.createVertexArrayOES();a.bindVertexArrayOES(d);this._bindLayout();a.bindVertexArrayOES(null);this._glName=d}this._initialized=!0}};g.prototype.bind=function(){this.initialize();var a=this._context.extensions.vao;a?a.bindVertexArrayOES(this.glName):(this._context.bindVAO(null),this._bindLayout())};g.prototype._bindLayout=
function(){var a=this._buffers,d=this._context.extensions.vao,f=this._layout,g=this._indexBuffer;a||console.error("Vertex buffer dictionary is empty!");var l=this._context.gl,p,r,q=0,v;for(v in a)for((p=a[v])||console.error("Vertex buffer is uninitialized!"),(r=f[v])||console.error("Vertex element descriptor is empty!"),this._context.bindBuffer(p),q=0;q<r.length;++q){p=r[q];var x=this._locations[p.name],w=p.baseInstance?p.baseInstance*p.stride:0;void 0===x&&console.error("There is no location for vertex attribute '"+
p.name+"' defined.");p.baseInstance&&!p.divisor&&console.error("Vertex attribute '"+p.name+"' uses baseInstanceOffset without divisor.");if(4>=p.count){if(l.enableVertexAttribArray(x),l.vertexAttribPointer(x,p.count,p.type,p.normalized,p.stride,p.offset+w),p.divisor&&0<p.divisor){var t=this._context.extensions.angleInstancedArrays;t&&t.vertexAttribDivisorANGLE(x,p.divisor)}}else if(16===p.count&&5126===p.type)for(var E=0;4>E;E++)l.enableVertexAttribArray(x+E),l.vertexAttribPointer(x+E,4,p.type,p.normalized,
p.stride,p.offset+16*E+w),p.divisor&&0<p.divisor&&(t=this._context.extensions.angleInstancedArrays)&&t.vertexAttribDivisorANGLE(x+E,p.divisor);else console.error("Unsupported vertex attribute element count: "+p.count)}g&&(d?l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,g.glName):this._context.bindBuffer(g))};g.prototype.unbind=function(){this.initialize();var a=this._context.extensions.vao;a?a.bindVertexArrayOES(null):this._unbindLayout()};g.prototype._unbindLayout=function(){var a=this._buffers,d=this._layout,
f=this._locations,g=this._context;a||console.error("Vertex buffer dictionary is empty!");var l=g.gl,p,r,q,v=0,x=0,w;for(w in a){(p=a[w])||console.error("Vertex buffer is uninitialized!");r=d[w];v=0;for(x=r.length;v<x;++v)q=r[v],l.disableVertexAttribArray(f[q.name]);g.unbindBuffer(p.bufferType)}(a=this._indexBuffer)&&g.unbindBuffer(a.bufferType)};g._nextId=0;return g}()})},"esri/views/webgl/BufferObject":function(){define(["require","exports"],function(A,t){return function(){function g(a,d,f,m,l){this._glName=
this._context=null;this._bufferType=void 0;this._usage=35044;this._size=-1;this._indexType=void 0;this._context=a;this._bufferType=d;this._usage=f;this._id=g._nextId++;this._glName=this._context.gl.createBuffer();m&&this.setData(m,l)}g.createIndex=function(a,d,f,m){return new g(a,34963,d,f,m)};g.createVertex=function(a,d,f){return new g(a,34962,d,f)};Object.defineProperty(g.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"glName",{get:function(){return this._glName},
enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"usage",{get:function(){return this._usage},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"bufferType",{get:function(){return this._bufferType},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"indexType",{get:function(){return this._indexType},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,
"byteSize",{get:function(){return 34962===this._bufferType?this._size:5125===this._indexType?4*this._size:2*this._size},enumerable:!0,configurable:!0});g.prototype.dispose=function(){this._context&&(this._glName&&(this._context.gl.deleteBuffer(this._glName),this._glName=null),this._context=null)};g.prototype.setData=function(a,d){if(a){if("number"===typeof a){if(0>a&&console.error("Buffer size cannot be negative!"),34963===this._bufferType&&d)switch(this._indexType=d,this._size=a,d){case 5123:a*=
2;break;case 5125:a*=4}}else d=a.byteLength,a instanceof Uint16Array&&(d/=2,this._indexType=5123),a instanceof Uint32Array&&(d/=4,this._indexType=5125),this._size=d;d=this._context.getBoundVAO();this._context.bindVAO(null);this._context.bindBuffer(this);this._context.gl.bufferData(this._bufferType,a,this._usage);this._context.bindVAO(d)}};g.prototype.setSubData=function(a,d,f,g){void 0===d&&(d=0);void 0===f&&(f=0);if(a){(0>d||d>=this._size)&&console.error("offset is out of range!");var l=d,m=f,r=
g,q=a.byteLength;a instanceof Uint16Array&&(q/=2,l*=2,m*=2,r*=2);a instanceof Uint32Array&&(q/=4,l*=4,m*=4,r*=4);void 0===g&&(g=q-1);f>=g&&console.error("end must be bigger than start!");d+f-g>this._size&&console.error("An attempt to write beyond the end of the buffer!");d=this._context.getBoundVAO();this._context.bindVAO(null);this._context.bindBuffer(this);this._context.gl.bufferSubData(this._bufferType,l,(a instanceof ArrayBuffer?a:a.buffer).slice(m,r));this._context.bindVAO(d)}};g._nextId=0;return g}()})},
"esri/views/2d/engine/webgl/shaders/glShaderSnippets":function(){define("require exports ../../../../webgl/ShaderSnippets dojo/text!./bitblit.vs.glsl dojo/text!./bitblit.fs.glsl dojo/text!./stencil.vs.glsl dojo/text!./stencil.fs.glsl dojo/text!./background.vs.glsl dojo/text!./background.fs.glsl dojo/text!./tileInfo.vs.glsl dojo/text!./tileInfo.fs.glsl".split(" "),function(A,t,g,a,d,f,m,l,p,r,q){function v(a,d){x+='\x3csnippet name\x3d"'+a+'"\x3e\x3c![CDATA[';x+=d;x+="]]\x3e\x3c/snippet\x3e"}var x=
"",x=x+'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e',x=x+"\x3csnippets\x3e";v("bitblitVS",a);v("bitblitFS",d);v("stencilVS",f);v("stencilFS",m);v("backgroundVS",l);v("backgroundFS",p);v("tileInfoVS",r);v("tileInfoFS",q);x+="\x3c/snippets\x3e";A=new g;g.parse(x,A);return A})},"esri/views/webgl/ShaderSnippets":function(){define(["require","exports","dojox/xml/parser"],function(A,t,g){return function(){function a(a){if(a)for(var d in a)this[d]=a[d]}a.parse=function(a,f){a=g.parse(a).getElementsByTagName("snippet");
for(var d=/\$[a-zA-Z][a-zA-Z0-9]*(?:\([^\(\)]*\))?[ \t]*/,l=/[\$\s]+/g,p=/\(([^\(\)]*)\)/,r=0;r<a.length;r++){for(var q=a[r].getAttribute("name"),v=a[r].textContent;;){var x=v.match(d);if(null==x)break;var w=x[0].replace(l,""),t=w.match(p),E=void 0;t&&(E=t[1].split(",").map(function(a){return a.trim()}));w=w.replace(p,"");E=f._instantiate(w,E);v=v.replace(x[0],E)}f[q]=v}};a.prototype._instantiate=function(a,f){a=this[a];for(f||(f=[]);;){var d=a.match(/\$(\d+)/);if(null==d)break;var g=parseInt(d[1],
10);a=a.replace(d[0],f[g])}return a};return a}()})},"dojox/xml/parser":function(){define(["dojo/_base/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/window","dojo/_base/sniff"],function(A){A.getObject("xml.parser",!0,dojox);dojox.xml.parser.parse=function(t,g){var a=A.doc,d;g=g||"text/xml";if(t&&A.trim(t)&&"DOMParser"in A.global){d=(new DOMParser).parseFromString(t,g);t=d.documentElement;if("parsererror"==t.nodeName&&"http://www.mozilla.org/newlayout/xml/parsererror.xml"==t.namespaceURI){if(a=
t.getElementsByTagNameNS("http://www.mozilla.org/newlayout/xml/parsererror.xml","sourcetext")[0])a=a.firstChild.data;throw Error("Error parsing text "+t.firstChild.data+" \n"+a);}return d}if("ActiveXObject"in A.global){a=function(a){return"MSXML"+a+".DOMDocument"};a=["Microsoft.XMLDOM",a(6),a(4),a(3),a(2)];A.some(a,function(a){try{d=new ActiveXObject(a)}catch(l){return!1}return!0});if(t&&d&&(d.async=!1,d.loadXML(t),t=d.parseError,0!==t.errorCode))throw Error("Line: "+t.line+"\nCol: "+t.linepos+"\nReason: "+
t.reason+"\nError Code: "+t.errorCode+"\nSource: "+t.srcText);if(d)return d}else if(a.implementation&&a.implementation.createDocument){if(t&&A.trim(t)&&a.createElement){g=a.createElement("xml");g.innerHTML=t;var f=a.implementation.createDocument("foo","",null);A.forEach(g.childNodes,function(a){f.importNode(a,!0)});return f}return a.implementation.createDocument("","",null)}return null};dojox.xml.parser.textContent=function(t,g){if(1<arguments.length)return dojox.xml.parser.replaceChildren(t,(t.ownerDocument||
A.doc).createTextNode(g)),g;if(void 0!==t.textContent)return t.textContent;var a="";t&&A.forEach(t.childNodes,function(d){switch(d.nodeType){case 1:case 5:a+=dojox.xml.parser.textContent(d);break;case 3:case 2:case 4:a+=d.nodeValue}});return a};dojox.xml.parser.replaceChildren=function(t,g){var a=[];A.isIE&&A.forEach(t.childNodes,function(d){a.push(d)});dojox.xml.parser.removeChildren(t);A.forEach(a,A.destroy);A.isArray(g)?A.forEach(g,function(a){t.appendChild(a)}):t.appendChild(g)};dojox.xml.parser.removeChildren=
function(t){for(var g=t.childNodes.length;t.hasChildNodes();)t.removeChild(t.firstChild);return g};dojox.xml.parser.innerXML=function(t){return t.innerXML?t.innerXML:t.xml?t.xml:"undefined"!=typeof XMLSerializer?(new XMLSerializer).serializeToString(t):null};return dojox.xml.parser})},"esri/views/support/screenshotUtils":function(){define(["require","exports","dojo/_base/lang"],function(A,t,g){Object.defineProperty(t,"__esModule",{value:!0});t.adjustScreenshotSettings=function(a,d){a=g.mixin({format:"png",
quality:100},a||{});var f,m;a.includePadding?(f=d.width,m=d.height):(f=d.width-d.padding.left-d.padding.right,m=d.height-d.padding.top-d.padding.bottom);var l=f/m;void 0!==a.width&&void 0===a.height?a.height=a.width/l:void 0!==a.height&&void 0===a.width&&(a.width=l*a.height);void 0!==a.height&&(a.height=Math.floor(a.height));void 0!==a.width&&(a.width=Math.floor(a.width));a.area||a.includePadding||(a.area={x:d.padding.left,y:d.padding.top,width:f,height:m});return a};t.resampleHermite=function(a,
d,f,g,l,p,r){void 0===r&&(r=!0);var m=d/l;f/=p;for(var v=Math.ceil(m/2),x=Math.ceil(f/2),w=0;w<p;w++)for(var t=0;t<l;t++){for(var E=4*(t+(r?p-w-1:w)*l),D=0,F=0,H=0,I=0,z=0,A=0,K=0,L=(w+.5)*f,N=Math.floor(w*f);N<(w+1)*f;N++)for(var Q=Math.abs(L-(N+.5))/x,O=(t+.5)*m,Q=Q*Q,T=Math.floor(t*m);T<(t+1)*m;T++){var R=Math.abs(O-(T+.5))/v,D=Math.sqrt(Q+R*R);-1<=D&&1>=D&&(D=2*D*D*D-3*D*D+1,0<D&&(R=4*(T+N*d),K+=D*a[R+3],H+=D,255>a[R+3]&&(D=D*a[R+3]/250),I+=D*a[R],z+=D*a[R+1],A+=D*a[R+2],F+=D))}g[E]=I/F;g[E+1]=
z/F;g[E+2]=A/F;g[E+3]=K/H}}})},"esri/views/webgl/RenderingContext":function(){define(["require","exports","./enums","./Extensions"],function(A,t,g,a){return function(){function d(d,g){this.gl=null;this._extensions=void 0;this._blendEnabled=!1;this._blendColorState={r:0,g:0,b:0,a:0};this._blendFunctionState={srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0};this._blendEquationState={mode:32774,modeAlpha:32774};this._colorMaskState={r:!0,g:!0,b:!0,a:!0};this._polygonCullingEnabled=!1;this._cullFace=1029;this._frontFace=
2305;this._scissorTestEnabled=!1;this._scissorRect={x:0,y:0,width:0,height:0};this._depthTestEnabled=!1;this._depthFunction=513;this._clearDepth=1;this._depthWriteEnabled=!0;this._depthRange={zNear:0,zFar:1};this._viewport=null;this._polygonOffsetFillEnabled=this._stencilTestEnabled=!1;this._polygonOffset=[0,0];this._stencilFunction={face:1032,func:519,ref:0,mask:1};this._clearStencil=0;this._stencilWriteMask=1;this._stencilOperation={face:1032,fail:7680,zFail:7680,zPass:7680};this._lineWidth=1;this._clearColor=
{r:0,g:0,b:0,a:0};this._activeFramebuffer=this._activeIndexBuffer=this._activeVertexBuffer=this._activeShaderProgram=null;this._activeTextureUnit=0;this._textureUnitMap={};this.gl=d;this._extensions=new a(d,g);g=d.getParameter(d.VIEWPORT);this._viewport={x:g[0],y:g[1],width:g[2],height:g[3]};g=this.extensions.textureFilterAnisotropic;this._parameters={versionString:d.getParameter(d.VERSION),maxVertexTextureImageUnits:d.getParameter(d.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxVertexAttributes:d.getParameter(d.MAX_VERTEX_ATTRIBS),
maxMaxAnisotropy:g?d.getParameter(g.MAX_TEXTURE_MAX_ANISOTROPY_EXT):void 0,maxTextureImageUnits:d.getParameter(d.MAX_TEXTURE_IMAGE_UNITS)};this.enforceState()}Object.defineProperty(d.prototype,"extensions",{get:function(){return this._extensions},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"contextAttributes",{get:function(){return this.gl.getContextAttributes()},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"parameters",{get:function(){return this._parameters},
enumerable:!0,configurable:!0});d.prototype.dispose=function(){this.bindVAO(null);this.unbindBuffer(34962);this.unbindBuffer(34963);this._textureUnitMap={};this.gl=null};d.prototype.setBlendingEnabled=function(a){this._blendEnabled!==a&&(!0===a?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this._blendEnabled=a)};d.prototype.setBlendColor=function(a,d,g,p){if(a!==this._blendColorState.r||d!==this._blendColorState.g||g!==this._blendColorState.b||p!==this._blendColorState.a)this.gl.blendColor(a,
d,g,p),this._blendColorState.r=a,this._blendColorState.g=d,this._blendColorState.b=g,this._blendColorState.a=p};d.prototype.setBlendFunction=function(a,d){if(a!==this._blendFunctionState.srcRGB||d!==this._blendFunctionState.dstRGB)this.gl.blendFunc(a,d),this._blendFunctionState.srcRGB=a,this._blendFunctionState.srcAlpha=a,this._blendFunctionState.dstRGB=d,this._blendFunctionState.dstAlpha=d};d.prototype.setBlendFunctionSeparate=function(a,d,g,p){if(this._blendFunctionState.srcRGB!==a||this._blendFunctionState.srcAlpha!==
g||this._blendFunctionState.dstRGB!==d||this._blendFunctionState.dstAlpha!==p)this.gl.blendFuncSeparate(a,d,g,p),this._blendFunctionState.srcRGB=a,this._blendFunctionState.srcAlpha=g,this._blendFunctionState.dstRGB=d,this._blendFunctionState.dstAlpha=p};d.prototype.setBlendEquation=function(a){this._blendEquationState.mode!==a&&(this.gl.blendEquation(a),this._blendEquationState.mode=a,this._blendEquationState.modeAlpha=a)};d.prototype.setBlendEquationSeparate=function(a,d){if(this._blendEquationState.mode!==
a||this._blendEquationState.modeAlpha!==d)this.gl.blendEquationSeparate(a,d),this._blendEquationState.mode=a,this._blendEquationState.modeAlpha=d};d.prototype.setColorMask=function(a,d,g,p){if(this._colorMaskState.r!==a||this._colorMaskState.g!==d||this._colorMaskState.b!==g||this._colorMaskState.a!==p)this.gl.colorMask(a,d,g,p),this._colorMaskState.r=a,this._colorMaskState.g=d,this._colorMaskState.b=g,this._colorMaskState.a=p};d.prototype.setClearColor=function(a,d,g,p){if(this._clearColor.r!==a||
this._clearColor.g!==d||this._clearColor.b!==g||this._clearColor.a!==p)this.gl.clearColor(a,d,g,p),this._clearColor.r=a,this._clearColor.g=d,this._clearColor.b=g,this._clearColor.a=p};d.prototype.setFaceCullingEnabled=function(a){this._polygonCullingEnabled!==a&&(!0===a?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this._polygonCullingEnabled=a)};d.prototype.setPolygonOffsetFillEnabled=function(a){this._polygonOffsetFillEnabled!==a&&(!0===a?this.gl.enable(this.gl.POLYGON_OFFSET_FILL):
this.gl.disable(this.gl.POLYGON_OFFSET_FILL),this._polygonOffsetFillEnabled=a)};d.prototype.setPolygonOffset=function(a,d){if(this._polygonOffset[0]!==a||this._polygonOffset[1]!==d)this._polygonOffset[0]=a,this._polygonOffset[1]=d,this.gl.polygonOffset(a,d)};d.prototype.setCullFace=function(a){this._cullFace!==a&&(this.gl.cullFace(a),this._cullFace=a)};d.prototype.setFrontFace=function(a){this._frontFace!==a&&(this.gl.frontFace(a),this._frontFace=a)};d.prototype.setScissorTestEnabled=function(a){this._scissorTestEnabled!==
a&&(!0===a?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this._scissorTestEnabled=a)};d.prototype.setScissorRect=function(a,d,g,p){if(this._scissorRect.x!==a||this._scissorRect.y!==d||this._scissorRect.width!==g||this._scissorRect.height!==p)this.gl.scissor(a,d,g,p),this._scissorRect.x=a,this._scissorRect.y=d,this._scissorRect.width=g,this._scissorRect.height=p};d.prototype.setDepthTestEnabled=function(a){this._depthTestEnabled!==a&&(!0===a?this.gl.enable(this.gl.DEPTH_TEST):
this.gl.disable(this.gl.DEPTH_TEST),this._depthTestEnabled=a)};d.prototype.setClearDepth=function(a){this._clearDepth!==a&&(this.gl.clearDepth(a),this._clearDepth=a)};d.prototype.setDepthFunction=function(a){this._depthFunction!==a&&(this.gl.depthFunc(a),this._depthFunction=a)};d.prototype.setDepthWriteEnabled=function(a){this._depthWriteEnabled!==a&&(this.gl.depthMask(a),this._depthWriteEnabled=a)};d.prototype.setDepthRange=function(a,d){if(this._depthRange.zNear!==a||this._depthRange.zFar!==d)this.gl.depthRange(a,
d),this._depthRange.zNear=a,this._depthRange.zFar=d};d.prototype.setStencilTestEnabled=function(a){this._stencilTestEnabled!==a&&(!0===a?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this._stencilTestEnabled=a)};d.prototype.setClearStencil=function(a){a!==this._clearStencil&&(this.gl.clearStencil(a),this._clearStencil=a)};d.prototype.setStencilFunction=function(a,d,g){if(this._stencilFunction.func!==a||this._stencilFunction.ref!==d||this._stencilFunction.mask!==g)this.gl.stencilFunc(a,
d,g),this._stencilFunction.face=1032,this._stencilFunction.func=a,this._stencilFunction.ref=d,this._stencilFunction.mask=g};d.prototype.setStencilFunctionSeparate=function(a,d,g,p){if(this._stencilFunction.face!==a||this._stencilFunction.func!==d||this._stencilFunction.ref!==g||this._stencilFunction.mask!==p)this.gl.stencilFuncSeparate(a,d,g,p),this._stencilFunction.face=a,this._stencilFunction.func=d,this._stencilFunction.ref=g,this._stencilFunction.mask=p};d.prototype.setStencilWriteMask=function(a){this._stencilWriteMask!==
a&&(this.gl.stencilMask(a),this._stencilWriteMask=a)};d.prototype.setStencilOp=function(a,d,g){if(this._stencilOperation.fail!==a||this._stencilOperation.zFail!==d||this._stencilOperation.zPass!==g)this.gl.stencilOp(a,d,g),this._stencilOperation.face=1032,this._stencilOperation.fail=a,this._stencilOperation.zFail=d,this._stencilOperation.zPass=g};d.prototype.setStencilOpSeparate=function(a,d,g,p){if(this._stencilOperation.face!==a||this._stencilOperation.fail!==d||this._stencilOperation.zFail!==g||
this._stencilOperation.zPass!==p)this.gl.stencilOpSeparate(a,d,g,p),this._stencilOperation.face=a,this._stencilOperation.face=a,this._stencilOperation.fail=d,this._stencilOperation.zFail=g,this._stencilOperation.zPass=p};d.prototype.setLineWidth=function(a){var d=this._lineWidth;this._lineWidth!==a&&(this.gl.lineWidth(a),this._lineWidth=a);return d};d.prototype.setActiveTexture=function(a){var d=this._activeTextureUnit;0<=a&&a!==this._activeTextureUnit&&(this.gl.activeTexture(g.BASE_TEXTURE_UNIT+
a),this._activeTextureUnit=a);return d};d.prototype.clear=function(a){a&&this.gl.clear(a)};d.prototype.drawArrays=function(a,d,g){this.gl.drawArrays(a,d,g)};d.prototype.drawElements=function(a,d,g,p){5123===g?this.gl.drawElements(a,d,g,p):5125===g&&this._extensions.elementIndexUint?this.gl.drawElements(a,d,g,p):console.warn("Data type is uint however extension OES_Element_index_unit is not supported therefore this draw call cannot be made")};d.prototype.drawArraysInstanced=function(a,d,g,p){this._extensions.angleInstancedArrays?
this._extensions.angleInstancedArrays.drawArraysInstancedANGLE(a,d,g,p):console.error("Extension ANGLE_instanced_arrays isn't supported!")};d.prototype.drawElementsInstanced=function(a,d,g,p,r){this._extensions.angleInstancedArrays?5125!==g||this._extensions.elementIndexUint?this._extensions.angleInstancedArrays.drawElementsInstancedANGLE(a,d,g,p,r):console.error("Extension OES_Element_index_unit is not supported!"):console.error("Extension ANGLE_instanced_arrays isn't supported!")};d.prototype.setViewport=
function(a,d,g,p){var f=this._viewport;if(f.x!==a||f.y!==d||f.width!==g||f.height!==p)f.x=a,f.y=d,f.width=g,f.height=p,this.gl.viewport(a,d,g,p)};d.prototype.getViewport=function(){return{x:this._viewport.x,y:this._viewport.y,width:this._viewport.width,height:this._viewport.height}};d.prototype.bindProgram=function(a){a?this._activeShaderProgram!==a&&(a.initialize(),this.gl.useProgram(a.glName),this._activeShaderProgram=a):(this.gl.useProgram(null),this._activeShaderProgram=null)};d.prototype.bindTexture=
function(a,g){void 0===g&&(g=0);-1===d._MAX_TEXTURE_IMAGE_UNITS&&(d._MAX_TEXTURE_IMAGE_UNITS=this.gl.getParameter(this.gl.MAX_TEXTURE_IMAGE_UNITS));(g>=d._MAX_TEXTURE_IMAGE_UNITS||0>g)&&console.error("Input texture unit is out of range of available units!");var f=this._textureUnitMap[g];this.setActiveTexture(g);null==a||null==a.glName?(null!=f&&(this.gl.bindTexture(f.descriptor.target,null),f.setBoundToUnit(g,!1)),this._textureUnitMap[g]=null):f&&f.id===a.id?a.applyChanges():(this.gl.bindTexture(a.descriptor.target,
a.glName),a.setBoundToUnit(g,!0),a.applyChanges(),this._textureUnitMap[g]=a)};d.prototype.bindFramebuffer=function(a){a?this._activeFramebuffer!==a&&(a.initialize()||this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,a.glName),this._activeFramebuffer=a):(this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this._activeFramebuffer=null)};d.prototype.bindBuffer=function(a){a&&(34962===a.bufferType?this._activeVertexBuffer=d._bindBuffer(this.gl,a,a.bufferType,this._activeVertexBuffer):this._activeIndexBuffer=
d._bindBuffer(this.gl,a,a.bufferType,this._activeIndexBuffer))};d.prototype.unbindBuffer=function(a){34962===a?this._activeVertexBuffer=d._bindBuffer(this.gl,null,a,this._activeVertexBuffer):this._activeIndexBuffer=d._bindBuffer(this.gl,null,a,this._activeIndexBuffer)};d.prototype.bindVAO=function(a){a?this._activeVertexArrayObject&&this._activeVertexArrayObject.id===a.id||(a.bind(),this._activeVertexArrayObject=a):this._activeVertexArrayObject&&(this._activeVertexArrayObject.unbind(),this._activeVertexArrayObject=
null)};d.prototype.getBoundTexture=function(a){return this._textureUnitMap[a]};d.prototype.getBoundFramebufferObject=function(){return this._activeFramebuffer};d.prototype.getBoundVAO=function(){return this._activeVertexArrayObject};d.prototype.resetState=function(){this.bindProgram(null);this.bindVAO(null);this.bindFramebuffer(null);this.unbindBuffer(34962);this.unbindBuffer(34963);for(var a=0;a<this.parameters.maxTextureImageUnits;a++)this.bindTexture(null,a);this.setBlendingEnabled(!1);this.setBlendFunction(1,
0);this.setBlendEquation(32774);this.setBlendColor(0,0,0,0);this.setFaceCullingEnabled(!1);this.setCullFace(1029);this.setFrontFace(2305);this.setPolygonOffsetFillEnabled(!1);this.setPolygonOffset(0,0);this.setScissorTestEnabled(!1);this.setScissorRect(0,0,this.gl.canvas.width,this.gl.canvas.height);this.setDepthTestEnabled(!1);this.setDepthFunction(513);this.setDepthRange(0,1);this.setStencilTestEnabled(!1);this.setStencilFunction(519,0,0);this.setStencilOp(7680,7680,7680);this.setClearColor(0,0,
0,0);this.setClearDepth(1);this.setClearStencil(0);this.setColorMask(!0,!0,!0,!0);this.setStencilWriteMask(4294967295);this.setDepthWriteEnabled(!0);this.setViewport(0,0,this.gl.canvas.width,this.gl.canvas.height)};d.prototype.enforceState=function(){var a=this.gl,d=this._extensions.vao;d&&d.bindVertexArrayOES(null);for(var l=0;l<this.parameters.maxVertexAttributes;l++)a.disableVertexAttribArray(l);this._activeVertexBuffer?a.bindBuffer(this._activeVertexBuffer.bufferType,this._activeVertexBuffer.glName):
a.bindBuffer(34962,null);this._activeIndexBuffer?a.bindBuffer(this._activeIndexBuffer.bufferType,this._activeIndexBuffer.glName):a.bindBuffer(34963,null);if(d&&this._activeVertexArrayObject){if(d=this._activeVertexArrayObject)this._activeVertexArrayObject.unbind(),this._activeVertexArrayObject=null;this.bindVAO(d)}a.bindFramebuffer(a.FRAMEBUFFER,this._activeFramebuffer?this._activeFramebuffer.glName:null);a.useProgram(this._activeShaderProgram?this._activeShaderProgram.glName:null);a.blendColor(this._blendColorState.r,
this._blendColorState.g,this._blendColorState.b,this._blendColorState.a);!0===this._blendEnabled?a.enable(this.gl.BLEND):a.disable(this.gl.BLEND);a.blendEquationSeparate(this._blendEquationState.mode,this._blendEquationState.modeAlpha);a.blendFuncSeparate(this._blendFunctionState.srcRGB,this._blendFunctionState.dstRGB,this._blendFunctionState.srcAlpha,this._blendFunctionState.dstAlpha);a.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearColor.a);a.clearDepth(this._clearDepth);
a.clearStencil(this._clearStencil);a.colorMask(this._colorMaskState.r,this._colorMaskState.g,this._colorMaskState.b,this._colorMaskState.a);a.cullFace(this._cullFace);a.depthFunc(this._depthFunction);a.depthRange(this._depthRange.zNear,this._depthRange.zFar);!0===this._depthTestEnabled?a.enable(a.DEPTH_TEST):a.disable(a.DEPTH_TEST);a.depthMask(this._depthWriteEnabled);a.frontFace(this._frontFace);a.lineWidth(this._lineWidth);!0===this._polygonCullingEnabled?a.enable(a.CULL_FACE):a.disable(a.CULL_FACE);
a.polygonOffset(this._polygonOffset[0],this._polygonOffset[1]);!0===this._polygonOffsetFillEnabled?a.enable(a.POLYGON_OFFSET_FILL):a.disable(a.POLYGON_OFFSET_FILL);a.scissor(this._scissorRect.x,this._scissorRect.y,this._scissorRect.width,this._scissorRect.height);!0===this._scissorTestEnabled?a.enable(a.SCISSOR_TEST):a.disable(a.SCISSOR_TEST);a.stencilFunc(this._stencilFunction.func,this._stencilFunction.ref,this._stencilFunction.mask);a.stencilOpSeparate(this._stencilOperation.face,this._stencilOperation.fail,
this._stencilOperation.zFail,this._stencilOperation.zPass);!0===this._stencilTestEnabled?a.enable(a.STENCIL_TEST):a.disable(a.STENCIL_TEST);a.stencilMask(this._stencilWriteMask);for(d=0;d<this.parameters.maxTextureImageUnits;d++)a.activeTexture(g.BASE_TEXTURE_UNIT+d),a.bindTexture(3553,null),(l=this._textureUnitMap[d])&&a.bindTexture(l.descriptor.target,l.glName);a.activeTexture(g.BASE_TEXTURE_UNIT+this._activeTextureUnit);a.viewport(this._viewport.x,this._viewport.y,this._viewport.width,this._viewport.height)};
d._bindBuffer=function(a,d,g,p){if(!d)return a.bindBuffer(g,null),null;if(p===d)return p;a.bindBuffer(g,d.glName);return d};d._MAX_TEXTURE_IMAGE_UNITS=-1;return d}()})},"esri/views/webgl/enums":function(){define(["require","exports"],function(A,t){Object.defineProperty(t,"__esModule",{value:!0});t.BASE_TEXTURE_UNIT=33984})},"esri/views/webgl/Extensions":function(){define(["require","exports"],function(A,t){return function(){function g(a,d){this._colorBufferFloatInit=this._textureFloatLinearInit=this._textureFloatInit=
this._disjointTimerQueryInit=this._compressedTextureS3TCInit=this._shaderTextureLODInit=this._textureFilterAnisotropicInit=this._depthTextureInit=this._elementIndexUintInit=this._standardDerivativesInit=this._angleInstancedArraysInit=this._vaoInit=!1;this._gl=a;d&&d.disabledExtensions&&(a=d.disabledExtensions,a.vao&&(this._vao=null,this._vaoInit=!0),a.angleInstancedArrays&&(this._angleInstancedArrays=null,this._angleInstancedArraysInit=!0),a.standardDerivatives&&(this._standardDerivatives=null,this._standardDerivativesInit=
!0),a.elementIndexUint&&(this._elementIndexUint=null,this._elementIndexUintInit=!0),a.depthTexture&&(this._depthTexture=null,this._depthTextureInit=!0),a.textureFilterAnisotropic&&(this._textureFilterAnisotropic=null,this._textureFilterAnisotropicInit=!0),a.compressedTextureS3TC&&(this._compressedTextureS3TC=null,this._compressedTextureS3TCInit=!0),a.shaderTextureLOD&&(this._shaderTextureLOD=null,this._shaderTextureLODInit=!0),a.disjointTimerQuery&&(this._disjointTimerQuery=null,this._disjointTimerQueryInit=
!0),a.textureFloat&&(this._textureFloat=null,this._textureFloatInit=!0),a.textureFloatLinear&&(this._textureFloatLinear=null,this._textureFloatLinearInit=!0),a.colorBufferFloat&&(this._colorBufferFloat=null,this._colorBufferFloatInit=!0))}Object.defineProperty(g.prototype,"vao",{get:function(){this._vaoInit||(this._vao=this._gl.getExtension("OES_vertex_array_object")||this._gl.getExtension("MOZ_OES_vertex_array_object")||this._gl.getExtension("WEBKIT_OES_vertex_array_object"),this._vaoInit=!0);return this._vao},
enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"angleInstancedArrays",{get:function(){this._angleInstancedArraysInit||(this._angleInstancedArrays=this._gl.getExtension("ANGLE_instanced_arrays"),this._angleInstancedArraysInit=!0);return this._angleInstancedArrays},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"standardDerivatives",{get:function(){this._standardDerivativesInit||(this._standardDerivatives=this._gl.getExtension("OES_standard_derivatives"),this._standardDerivativesInit=
!0);return this._standardDerivatives},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"elementIndexUint",{get:function(){this._elementIndexUintInit||(this._elementIndexUint=this._gl.getExtension("OES_element_index_uint"),this._elementIndexUintInit=!0);return this._elementIndexUint},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"depthTexture",{get:function(){this._depthTextureInit||(this._depthTexture=this._gl.getExtension("WEBGL_depth_texture")||this._gl.getExtension("MOZ_WEBGL_depth_texture")||
this._gl.getExtension("WEBKIT_WEBGL_depth_texture"),this._depthTextureInit=!0);return this._depthTexture},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"textureFilterAnisotropic",{get:function(){this._textureFilterAnisotropicInit||(this._textureFilterAnisotropic=this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this._textureFilterAnisotropicInit=!0);
return this._textureFilterAnisotropic},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"shaderTextureLOD",{get:function(){this._shaderTextureLODInit||(this._shaderTextureLOD=this._gl.getExtension("EXT_shader_texture_lod"),this._shaderTextureLODInit=!0);return this._shaderTextureLOD},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"compressedTextureS3TC",{get:function(){this._compressedTextureS3TCInit||(this._compressedTextureS3TC=this._gl.getExtension("WEBGL_compressed_texture_s3tc"),
this._compressedTextureS3TCInit=!0);return this._compressedTextureS3TC},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"disjointTimerQuery",{get:function(){this._disjointTimerQueryInit||(this._disjointTimerQuery=this._gl.getExtension("EXT_disjoint_timer_query"),this._disjointTimerQueryInit=!0);return this._disjointTimerQuery},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"textureFloat",{get:function(){this._textureFloatInit||(this._textureFloat=this._gl.getExtension("OES_texture_float"),
this._textureFloatInit=!0);return this._textureFloat},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"textureFloatLinear",{get:function(){this._textureFloatLinearInit||(this._textureFloatLinear=this._gl.getExtension("OES_texture_float_linear"),this._textureFloatLinearInit=!0);return this._textureFloatLinear},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"colorBufferFloat",{get:function(){this._colorBufferFloatInit||(this._colorBufferFloat=this._gl.getExtension("EXT_color_buffer_float"),
this._colorBufferFloatInit=!0);return this._colorBufferFloat},enumerable:!0,configurable:!0});return g}()})},"esri/views/webgl/FramebufferObject":function(){define(["require","exports","./Texture"],function(A,t,g){return function(){function a(d,f,m,l){this._colorAttachment=this._stencilAttachment=this._depthAttachment=this._glName=this._context=null;this._initialized=!1;this._context=d;this._desc={colorTarget:f.colorTarget,depthStencilTarget:f.depthStencilTarget,width:f.width,height:f.height,multisampled:f.multisampled};
this._id=a._nextId++;m&&(d=void 0,m instanceof g?(this._colorAttachment=m,d=m.descriptor):(d=m,this._colorAttachment=new g(this._context,d)),0!==this._desc.colorTarget&&console.error("Framebuffer is initialized with a texture however the descriptor indicates using a renderbuffer color attachment!"),a._validateTextureDimensions(d,this._desc));l&&(this._context.extensions.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!"),
m=void 0,l instanceof g?(this._depthStencilTexture=l,m=this._depthStencilTexture.descriptor):(m=l,this._depthStencilTexture=new g(this._context,m)),a._validateTextureDimensions(m,this._desc))}a.create=function(d,f){return new a(d,f)};a.createWithAttachments=function(d,f,g,l){return new a(d,g,f,l)};Object.defineProperty(a.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0});
Object.defineProperty(a.prototype,"descriptor",{get:function(){return this._desc},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"colorTexture",{get:function(){return this._colorAttachment instanceof g?this._colorAttachment:null},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"depthStencilTexture",{get:function(){return this._depthStencilTexture},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"width",{get:function(){return this._desc.width},
enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"height",{get:function(){return this._desc.height},enumerable:!0,configurable:!0});a.prototype.dispose=function(){this._context&&this._glName&&(this._disposeColorAttachment(),this._disposeDepthStencilAttachments(),this._context.gl.deleteFramebuffer(this._glName),this._glName=null)};a.prototype.attachColorTexture=function(d){if(d){a._validateTextureDimensions(d.descriptor,this._desc);this._disposeColorAttachment();if(this._initialized){this._context.bindFramebuffer(this);
var f=this._context.gl;f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,d.glName,0)}this._colorAttachment=d}};a.prototype.detachColorTexture=function(){var a=void 0;if(this._colorAttachment instanceof g){a=this._colorAttachment;if(this._initialized){this._context.bindFramebuffer(this);var f=this._context.gl;this._context.gl.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,null,0)}this._colorAttachment=null}return a};a.prototype.attachDepthStencilTexture=function(d){if(d){var f=
d.descriptor;34041!==f.pixelFormat&&console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!");34042!==f.dataType&&console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8_WEBGL!");this._context.extensions.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture!");a._validateTextureDimensions(f,this._desc);4!==this._desc.depthStencilTarget&&(this._desc.depthStencilTarget=4);this._disposeDepthStencilAttachments();
this._initialized&&(this._context.bindFramebuffer(this),f=this._context.gl,f.framebufferTexture2D(f.FRAMEBUFFER,f.DEPTH_STENCIL_ATTACHMENT,f.TEXTURE_2D,d.glName,0));this._depthStencilTexture=d}};a.prototype.detachDepthStencilTexture=function(){var a=this._depthStencilTexture;if(a&&this._initialized){this._context.bindFramebuffer(this);var f=this._context.gl;this._context.gl.framebufferTexture2D(f.FRAMEBUFFER,f.DEPTH_STENCIL_ATTACHMENT,f.TEXTURE_2D,null,0)}this._depthStencilTexture=null;return a};
a.prototype.copyToTexture=function(a,f,g,l,p,r,q){(0>a||0>f||0>p||0>r)&&console.error("Offsets cannot be negative!");(0>=g||0>=l)&&console.error("Copy width and height must be greater than zero!");var d=this._desc,m=q.descriptor;3553!==q.descriptor.target&&console.error("Texture target must be TEXTURE_2D!");(a+g>d.width||f+l>d.height||p+g>m.width||r+l>m.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");d=this._context;d.bindTexture(q);d.bindFramebuffer(this);
d.gl.copyTexSubImage2D(3553,0,p,r,a,f,g,l)};a.prototype.readPixels=function(a,f,g,l,p,r,q){(0>=g||0>=l)&&console.error("Copy width and height must be greater than zero!");q||console.error("Target memory is not initialized!");this._context.bindFramebuffer(this);this._context.gl.readPixels(a,f,g,l,p,r,q)};a.prototype.resize=function(d,f){var m=this._desc;if(m.width!==d||m.height!==f)if(this._initialized)m.width=d,m.height=f,this._colorAttachment instanceof g?(l=this._colorAttachment,m=l.descriptor,
m.width=d,m.height=f,this._colorAttachment.dispose(),this._colorAttachment=new g(this._context,m),a._validateTextureDimensions(l.descriptor,this._desc)):this._colorAttachment&&this._disposeColorAttachment(),null!=this._depthStencilTexture?(m=this._depthStencilTexture.descriptor,m.width=d,m.height=f,this._depthStencilTexture.dispose(),this._depthStencilTexture=new g(this._context,m)):(this._depthAttachment||this._stencilAttachment)&&this._disposeDepthStencilAttachments(),this._context.getBoundFramebufferObject()===
this&&this._context.bindFramebuffer(null),this._initialized=!1;else{m.width=d;m.height=f;if(this._colorAttachment instanceof g){var l=this._colorAttachment;l.resize(d,f)}this._depthStencilTexture&&this._depthStencilTexture.resize(d,f)}};a.prototype.initialize=function(){if(this._initialized)return!1;var a=this._context.gl;this._glName&&a.deleteFramebuffer(this._glName);var f=a.createFramebuffer(),m=this._desc;a.bindFramebuffer(a.FRAMEBUFFER,f);if(!this._colorAttachment)if(0===m.colorTarget)this._colorAttachment=
new g(this._context,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9728,wrapMode:33071,width:m.width,height:m.height});else{var l=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,l);a.renderbufferStorage(a.RENDERBUFFER,a.RGBA4,m.width,m.height);a.framebufferRenderbuffer(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.RENDERBUFFER,l);this._colorAttachment=l}this._colorAttachment instanceof g&&a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,this._colorAttachment.glName,0);
switch(m.depthStencilTarget){case 1:case 3:l=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,l);var p=1===m.depthStencilTarget?a.DEPTH_ATTACHMENT:a.DEPTH_STENCIL_ATTACHMENT;a.renderbufferStorage(a.RENDERBUFFER,1===m.depthStencilTarget?a.DEPTH_COMPONENT16:a.DEPTH_STENCIL,m.width,m.height);a.framebufferRenderbuffer(a.FRAMEBUFFER,p,a.RENDERBUFFER,l);this._depthAttachment=l;break;case 2:l=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,l);a.renderbufferStorage(a.RENDERBUFFER,a.STENCIL_INDEX8,
m.width,m.height);a.framebufferRenderbuffer(a.FRAMEBUFFER,a.STENCIL_ATTACHMENT,a.RENDERBUFFER,l);this._stencilAttachment=l;break;case 4:this._depthStencilTexture||(this._context.extensions.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!"),this._depthStencilTexture=new g(this._context,{target:3553,pixelFormat:34041,dataType:34042,samplingMode:9728,wrapMode:33071,width:m.width,height:m.height})),
a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.TEXTURE_2D,this._depthStencilTexture.glName,0)}a.checkFramebufferStatus(a.FRAMEBUFFER)!==a.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!");this._glName=f;return this._initialized=!0};a.prototype._disposeColorAttachment=function(){if(this._colorAttachment instanceof g){var a=this._colorAttachment;if(this._initialized){this._context.bindFramebuffer(this);var f=this._context.gl;f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,
f.TEXTURE_2D,null,0)}a.dispose()}else this._colorAttachment instanceof WebGLRenderbuffer&&(a=this._colorAttachment,f=this._context.gl,this._initialized&&(this._context.bindFramebuffer(this),f.framebufferRenderbuffer(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.RENDERBUFFER,null)),this._context.gl.deleteRenderbuffer(a));this._colorAttachment=null};a.prototype._disposeDepthStencilAttachments=function(){var a=this._context.gl;if(this._depthAttachment){if(this._initialized){this._context.bindFramebuffer(this);
var f=this._context.gl;f.framebufferRenderbuffer(f.FRAMEBUFFER,1===this._desc.depthStencilTarget?f.DEPTH_ATTACHMENT:f.DEPTH_STENCIL_ATTACHMENT,f.RENDERBUFFER,null)}a.deleteRenderbuffer(this._depthAttachment);this._depthAttachment=null}this._stencilAttachment&&(this._initialized&&(this._context.bindFramebuffer(this),f=this._context.gl,f.framebufferRenderbuffer(f.FRAMEBUFFER,f.STENCIL_ATTACHMENT,f.RENDERBUFFER,null)),a.deleteRenderbuffer(this._stencilAttachment),this._stencilAttachment=null);this._depthStencilTexture&&
(this._initialized&&(this._context.bindFramebuffer(this),a=this._context.gl,a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.TEXTURE_2D,null,0)),this._depthStencilTexture.dispose(),this._depthStencilTexture=null)};a._validateTextureDimensions=function(a,f){console.assert(0<=a.width&&0<=a.height);3553!==a.target&&console.error("Texture type must be TEXTURE_2D!");void 0!==f.width&&0<=f.width&&void 0!==f.height&&0<=f.height?f.width===a.width&&f.height===a.height||console.error("Color attachment texture must match the framebuffer's!"):
(f.width=a.width,f.height=a.height)};a._nextId=0;return a}()})},"esri/views/webgl/Texture":function(){define(["require","exports"],function(A,t){return function(){function g(a,d,f){this._glName=this._context=null;this._id=-1;this._desc=void 0;this._wrapModeDirty=this._samplingModeDirty=!1;this._boundToUnits=new Set;this._context=a;this._desc={pixelFormat:d.pixelFormat,internalFormat:d.internalFormat,dataType:d.dataType,target:d.target?d.target:3553,samplingMode:d.samplingMode?d.samplingMode:9729,
wrapMode:d.wrapMode?d.wrapMode:10497,maxAnisotropy:d.maxAnisotropy,flipped:void 0!==d.flipped?d.flipped:!1,hasMipmap:void 0!==d.hasMipmap?d.hasMipmap:!1,level:void 0!==d.level?d.level:0,unpackAlignment:d.unpackAlignment?d.unpackAlignment:4,width:d.width,height:d.height,preMultiplyAlpha:void 0!==d.preMultiplyAlpha?d.preMultiplyAlpha:!1};this._id=++g._nextId;this.setData(f)}Object.defineProperty(g.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,
"glName",{get:function(){return this._glName},enumerable:!0,configurable:!0});Object.defineProperty(g.prototype,"descriptor",{get:function(){return this._desc},enumerable:!0,configurable:!0});g.prototype.dispose=function(){var a=this;if(this._context){if(this._glName){var d=this._context.gl;this._boundToUnits.forEach(function(d){a._context.bindTexture(null,d)});d.deleteTexture(this._glName);this._glName=null}this._context=null}};g.prototype.resize=function(a,d){var f=this._desc;if(f.width!==a||f.height!==
d)f.width=a,f.height=d,this.setData(null)};g.prototype.setData=function(a){var d=this._context.gl;this._glName||(this._glName=d.createTexture());void 0===a&&(a=null);null===a&&(this._desc.width=this._desc.width||4,this._desc.height=this._desc.height||4);var f=this._context.getBoundTexture(0);this._context.bindTexture(this,0);var m=this._desc;g._validateTexture(m);d.pixelStorei(d.UNPACK_ALIGNMENT,m.unpackAlignment);d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,m.flipped?1:0);d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,
m.preMultiplyAlpha);a instanceof ImageData||a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement?(m.width&&m.height&&console.assert(a.width===m.width&&a.height===m.height),d.texImage2D(d.TEXTURE_2D,m.level,m.internalFormat?m.internalFormat:m.pixelFormat,m.pixelFormat,m.dataType,a),void 0===this._desc.width&&(this._desc.width=a.width),void 0===this._desc.height&&(this._desc.height=a.height)):(null!=m.width&&null!=m.height||console.error("Width and height must be specified!"),
d.texImage2D(d.TEXTURE_2D,m.level,m.internalFormat?m.internalFormat:m.pixelFormat,m.width,m.height,0,m.pixelFormat,m.dataType,a));m.hasMipmap&&this.generateMipmap();g._applySamplingMode(d,this._desc);g._applyWrapMode(d,this._desc);g._applyAnisotropicFilteringParameters(this._context,this._desc);this._context.bindTexture(f,0)};g.prototype.updateData=function(a,d,f,g,l,p){p||console.error("An attempt to use uninitialized data!");this._glName||console.error("An attempt to update uninitialized texture!");
var m=this._context.gl,q=this._desc,v=this._context.getBoundTexture(0);this._context.bindTexture(this,0);(0>d||0>f||g>q.width||l>q.height||d+g>q.width||f+l>q.height)&&console.error("An attempt to update out of bounds of the texture!");p instanceof ImageData||p instanceof HTMLImageElement||p instanceof HTMLCanvasElement||p instanceof HTMLVideoElement?(console.assert(p.width===g&&p.height===l),m.texSubImage2D(m.TEXTURE_2D,a,d,f,q.pixelFormat,q.dataType,p)):m.texSubImage2D(m.TEXTURE_2D,a,d,f,g,l,q.pixelFormat,
q.dataType,p);this._context.bindTexture(v,0)};g.prototype.generateMipmap=function(){var a=this._desc;a.hasMipmap||(a.hasMipmap=!0,g._validateTexture(a));9729===a.samplingMode?(this._samplingModeDirty=!0,a.samplingMode=9985):9728===a.samplingMode&&(this._samplingModeDirty=!0,a.samplingMode=9984);a=this._context.getBoundTexture(0);this._context.bindTexture(this,0);var d=this._context.gl;d.generateMipmap(d.TEXTURE_2D);this._context.bindTexture(a,0)};g.prototype.setSamplingMode=function(a){a!==this._desc.samplingMode&&
(this._desc.samplingMode=a,g._validateTexture(this._desc),this._samplingModeDirty=!0)};g.prototype.setWrapMode=function(a){a!==this._desc.wrapMode&&(this._desc.wrapMode=a,g._validateTexture(this._desc),this._wrapModeDirty=!0)};g.prototype.applyChanges=function(){var a=this._context.gl,d=this._desc;this._samplingModeDirty&&(g._applySamplingMode(a,d),this._samplingModeDirty=!1);this._wrapModeDirty&&(g._applyWrapMode(a,d),this._wrapModeDirty=!1)};g.prototype.setBoundToUnit=function(a,d){d?this._boundToUnits.add(a):
this._boundToUnits.delete(a)};g._isPowerOfTwo=function(a){return 0===(a&a-1)};g._validateTexture=function(a){(0>a.width||0>a.height)&&console.error("Negative dimension parameters are not allowed!");g._isPowerOfTwo(a.width)&&g._isPowerOfTwo(a.height)||(33071!==a.wrapMode&&console.error("Non-power-of-two textures must have a wrap mode of CLAMP_TO_EDGE!"),a.hasMipmap&&console.error("Mipmapping requires power-of-two textures!"))};g._applySamplingMode=function(a,d){var f=d.samplingMode;if(9985===f||9987===
f)f=9729;else if(9984===f||9986===f)f=9728;a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,f);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,d.samplingMode)};g._applyWrapMode=function(a,d){a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,d.wrapMode);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,d.wrapMode)};g._applyAnisotropicFilteringParameters=function(a,d){if(null!=d.maxAnisotropy){var f=a.extensions.textureFilterAnisotropic;f&&(a=a.gl,a.texParameterf(a.TEXTURE_2D,f.TEXTURE_MAX_ANISOTROPY_EXT,
d.maxAnisotropy))}};g._nextId=0;return g}()})},"esri/views/webgl/webgl-utils":function(){define([],function(){var A=function(t,g){for(var a=["webgl","experimental-webgl","webkit-3d","moz-webgl"],d=null,f=0;f<a.length;++f){try{d=t.getContext(a[f],g)}catch(m){}if(d)break}return d};return{create3DContext:A,setupWebGL:function(t,g){function a(a){var d=t.parentNode;d&&(d.innerHTML='\x3ctable style\x3d"background-color: #8CE; width: 100%; height: 100%;"\x3e\x3ctr\x3e\x3ctd align\x3d"center"\x3e\x3cdiv style\x3d"display: table-cell; vertical-align: middle;"\x3e\x3cdiv style\x3d""\x3e'+
a+"\x3c/div\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e")}if(!window.WebGLRenderingContext)return a('This page requires a browser that supports WebGL.\x3cbr/\x3e\x3ca href\x3d"http://get.webgl.org"\x3eClick here to upgrade your browser.\x3c/a\x3e'),[null,'This page requires a browser that supports WebGL.\x3cbr/\x3e\x3ca href\x3d"http://get.webgl.org"\x3eClick here to upgrade your browser.\x3c/a\x3e'];g=A(t,g);return g?[g]:(a('It doesn\'t appear your computer can support WebGL.\x3cbr/\x3e\x3ca href\x3d"http://get.webgl.org/troubleshooting/"\x3eClick here for more information.\x3c/a\x3e'),
[null,'It doesn\'t appear your computer can support WebGL.\x3cbr/\x3e\x3ca href\x3d"http://get.webgl.org/troubleshooting/"\x3eClick here for more information.\x3c/a\x3e'])},detectWebGL:function(){var t;try{t=window.WebGLRenderingContext}catch(a){t=[!1,0]}var g;try{g=A(document.createElement("canvas"))}catch(a){g=[!1,1]}t?g?(t=g,t=[!0,{VERSION:t.getParameter(t.VERSION),SHADING_LANGUAGE_VERSION:t.getParameter(t.SHADING_LANGUAGE_VERSION),VENDOR:t.getParameter(t.VENDOR),RENDERER:t.getParameter(t.RENDERER),
EXTENSIONS:t.getSupportedExtensions(),MAX_TEXTURE_SIZE:t.getParameter(t.MAX_TEXTURE_SIZE),MAX_RENDERBUFFER_SIZE:t.getParameter(t.MAX_RENDERBUFFER_SIZE),MAX_VERTEX_TEXTURE_IMAGE_UNITS:t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS)}]):t=[!1,1]:t=[!1,0];return t}}})},"esri/views/2d/engine/webgl/painter/WGLPainter":function(){define("require exports dojo/has ../../../../../core/libs/gl-matrix/mat4 ../../../../webgl/FramebufferObject ../Dispatcher ../GeometryUtils ../MaterialManager ../enums ./WGLTextPainter ./WGLIconPainter ./WGLFillPainter ./WGLLinePainter ./WGLBackgroundPainter ./TileInfoRenderer ./WGLHighlightPainter ./WGLHeatmapPainter ../Utils".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x,w,B,E,D,F){var H=new Uint8Array(4*F.C_HITTEST_SEARCH_SIZE*F.C_HITTEST_SEARCH_SIZE),I=new Uint32Array(H.buffer),z=new f;return function(){function f(){this._textPainter=new r;this._iconPainter=new q;this._fillPainter=new v;this._linePainter=new x;this._backgroundPainter=new w;this._hlPainter=new E;this._heatmapPainter=new D;this._extrudeMatrix=new Float32Array(16);this._extrudeNoRotationMatrix=new Float32Array(16);this._extrudeRotateVector=new Float32Array([0,0,1]);
this._extrudeScaleVector=new Float32Array([1,1,1]);this._state={rotation:0,width:0,height:0};this._cachedRotation=this._cachedHeight=this._cachedWidth=0;this._materialManager=new l}f.prototype.initialize=function(a){this._materialManager.initialize(a)};f.prototype.update=function(d,f){this._state=d;if(this._state.width!==this._cachedWidth||this._state.height!==this._cachedHeight||this._state.rotation!==this._cachedRotation)this._extrudeScaleVector[0]=2/d.width,this._extrudeScaleVector[1]=-2/d.height,
a.identity(this._extrudeMatrix),a.rotate(this._extrudeMatrix,this._extrudeMatrix,-d.rotation*m.C_DEG_TO_RAD,this._extrudeRotateVector),a.scale(this._extrudeMatrix,this._extrudeMatrix,this._extrudeScaleVector),a.transpose(this._extrudeMatrix,this._extrudeMatrix),a.identity(this._extrudeNoRotationMatrix),a.scale(this._extrudeNoRotationMatrix,this._extrudeNoRotationMatrix,this._extrudeScaleVector),a.transpose(this._extrudeNoRotationMatrix,this._extrudeNoRotationMatrix),this._cachedWidth=this._state.width,
this._cachedHeight=this._state.height,this._cachedRotation=this._state.rotation};f.prototype.setHighlightOptions=function(a){this._hlPainter.setHighlightOptions(a)};f.prototype.drawHeatmap=function(a,d,f,l){var m=this;this._heatmapPainter.bindHeatmapSurface(a,d.displayWidth*l,d.displayHeight*l);this._drawClippingRects(a,d.children);a.setBlendingEnabled(!0);a.setStencilWriteMask(0);a.setBlendFunctionSeparate(1,1,1,0);a.setStencilTestEnabled(!0);d.wglRendererInfo.symbolLevels.forEach(function(g){d.children.forEach(function(q){z.replayList(a,
q.displayList,g,m,q,d.textureManager,d.wglRendererInfo,p.WGLDrawPhase.GEOMETRY,f,l,!1)})});a.setStencilTestEnabled(!1);this._heatmapPainter.drawHeatmap(a,d.wglRendererInfo,.75);if(g("esri-feature-tiles-debug")){this._tileInforenderer||(this._tileInforenderer=new B);for(var q=this._tileInforenderer,r=0,v=d.children;r<v.length;r++){var x=v[r];x.attached&&x.visible&&q.render(a,x)}}};f.prototype.draw=function(a,d,f,l,m){var q=this;this._drawClippingRects(a,d.children);a.setBlendingEnabled(!0);a.setStencilWriteMask(0);
a.setBlendFunctionSeparate(1,771,1,771);a.setStencilTestEnabled(!0);d.wglRendererInfo.symbolLevels.forEach(function(g){d.children.forEach(function(h){h.displayList&&!h.displayList.empty&&z.replayList(a,h.displayList,g,q,h,d.textureManager,d.wglRendererInfo,p.WGLDrawPhase.GEOMETRY,f,l,m)})});a.setStencilTestEnabled(!1);if(g("esri-feature-tiles-debug")){this._tileInforenderer||(this._tileInforenderer=new B);for(var r=this._tileInforenderer,v=0,x=d.children;v<x.length;v++){var w=x[v];w.attached&&w.visible&&
r.render(a,w)}}};f.prototype.highlight=function(a,d,f,g){var l=this,m=a.getViewport();this._hlPainter.setup(a,m.width,m.height);this._hlPainter.startMaskDraw(a);this._drawClippingRects(a,d.children);a.setBlendingEnabled(!0);a.setStencilWriteMask(0);a.setBlendFunctionSeparate(1,771,1,771);a.setStencilTestEnabled(!0);d.wglRendererInfo.symbolLevels.forEach(function(m){d.children.forEach(function(q){q.hlDisplayList&&!q.hlDisplayList.empty&&z.replayList(a,q.hlDisplayList,m,l,q,d.textureManager,d.wglRendererInfo,
p.WGLDrawPhase.HIGHLIGHT,f,g,!1)})});this._hlPainter.draw(a)};f.prototype.hitTest=function(a,f,g,l,m){var q=this,r=F.C_HITTEST_SEARCH_SIZE,v=[0,0],x=[0,0];f=a.state;f.toMap(v,[0,0]);f.toMap(x,[r,r]);var w=l.children.filter(function(a){return!(v[0]>a.bounds[2]||x[0]<a.bounds[0]||v[1]<a.bounds[1]||x[1]>a.bounds[3])});if(0===w.length)return[];var t=a.context;this._hittestFBO||(this._hittestFBO=d.create(t,{colorTarget:0,depthStencilTarget:3,width:r,height:r}));f=t.getViewport();g=t.getBoundFramebufferObject();
t.bindFramebuffer(this._hittestFBO);t.setViewport(0,0,r,r);var h=t.gl;t.setClearColor(1,1,1,1);t.clear(h.COLOR_BUFFER_BIT);this._drawClippingRects(t,w);t.setBlendingEnabled(!1);t.setStencilWriteMask(0);t.setStencilTestEnabled(!0);l.wglRendererInfo.symbolLevels.forEach(function(b){w.forEach(function(c){c.displayList&&!c.displayList.empty&&z.replayList(t,c.displayList,b,q,c,l.textureManager,l.wglRendererInfo,p.WGLDrawPhase.HITTEST,m,a.devicePixelRatio,!1)})});t.setStencilTestEnabled(!1);t.setBlendingEnabled(!0);
this._hittestFBO.readPixels(0,0,r,r,6408,5121,H);for(var r=r*r,h=new Set,B=0;B<r;B++){var y=I[B];4294967295!==y&&h.add(y)}t.bindFramebuffer(g);t.setViewport(f.x,f.y,f.width,f.height);var c=[];h.forEach(function(a){c.push(a)});return c};f.prototype.drawFill=function(a,d,f,g,l,m,p,q,r,v,x){this._fillPainter.draw(a,d,f,l,m,p,q,r,v,x,this._materialManager,g)};f.prototype.drawLine=function(a,d,f,g,l,m,p,q,r,v){this._linePainter.draw(a,d,f,l,m,p,q,r,v,this._materialManager,g,this._extrudeMatrix)};f.prototype.drawIcon=
function(a,d,f,g,l,m,p,q){this._iconPainter.draw(a,d,f,l,m,p,q,this._materialManager,g,this._extrudeMatrix,this._extrudeNoRotationMatrix)};f.prototype.drawText=function(a,d,f,g,l,m,p,q){this._textPainter.draw(a,d,f,l,m,p,q,this._materialManager,g,this._extrudeMatrix,this._extrudeNoRotationMatrix)};f.prototype._drawClippingRects=function(a,d){if(0!==d.length){a.setDepthWriteEnabled(!1);a.setDepthTestEnabled(!1);a.setStencilTestEnabled(!0);a.setBlendingEnabled(!1);a.setColorMask(!1,!1,!1,!1);a.setStencilOp(7680,
7680,7681);a.setClearStencil(0);a.clear(a.gl.STENCIL_BUFFER_BIT);a.setStencilWriteMask(255);for(var f=d.length,g,l=f,m=0;m<f;m++)g=d[m],g.stencilRef=l,a.setStencilFunctionSeparate(1032,519,l,255),l--,this._backgroundPainter.draw(a,g);a.setColorMask(!0,!0,!0,!0)}};return f}()})},"esri/core/libs/gl-matrix/mat4":function(){define(["./common"],function(A){var t={scalar:{},SIMD:{},create:function(){var g=new A.ARRAY_TYPE(16);g[0]=1;g[1]=0;g[2]=0;g[3]=0;g[4]=0;g[5]=1;g[6]=0;g[7]=0;g[8]=0;g[9]=0;g[10]=1;
g[11]=0;g[12]=0;g[13]=0;g[14]=0;g[15]=1;return g},clone:function(g){var a=new A.ARRAY_TYPE(16);a[0]=g[0];a[1]=g[1];a[2]=g[2];a[3]=g[3];a[4]=g[4];a[5]=g[5];a[6]=g[6];a[7]=g[7];a[8]=g[8];a[9]=g[9];a[10]=g[10];a[11]=g[11];a[12]=g[12];a[13]=g[13];a[14]=g[14];a[15]=g[15];return a},copy:function(g,a){g[0]=a[0];g[1]=a[1];g[2]=a[2];g[3]=a[3];g[4]=a[4];g[5]=a[5];g[6]=a[6];g[7]=a[7];g[8]=a[8];g[9]=a[9];g[10]=a[10];g[11]=a[11];g[12]=a[12];g[13]=a[13];g[14]=a[14];g[15]=a[15];return g},fromValues:function(g,a,
d,f,m,l,p,r,q,v,x,w,t,E,D,F){var B=new A.ARRAY_TYPE(16);B[0]=g;B[1]=a;B[2]=d;B[3]=f;B[4]=m;B[5]=l;B[6]=p;B[7]=r;B[8]=q;B[9]=v;B[10]=x;B[11]=w;B[12]=t;B[13]=E;B[14]=D;B[15]=F;return B},set:function(g,a,d,f,m,l,p,r,q,v,x,w,t,E,D,F,H){g[0]=a;g[1]=d;g[2]=f;g[3]=m;g[4]=l;g[5]=p;g[6]=r;g[7]=q;g[8]=v;g[9]=x;g[10]=w;g[11]=t;g[12]=E;g[13]=D;g[14]=F;g[15]=H;return g},identity:function(g){g[0]=1;g[1]=0;g[2]=0;g[3]=0;g[4]=0;g[5]=1;g[6]=0;g[7]=0;g[8]=0;g[9]=0;g[10]=1;g[11]=0;g[12]=0;g[13]=0;g[14]=0;g[15]=1;return g}};
t.scalar.transpose=function(g,a){if(g===a){var d=a[1],f=a[2],m=a[3],l=a[6],p=a[7],r=a[11];g[1]=a[4];g[2]=a[8];g[3]=a[12];g[4]=d;g[6]=a[9];g[7]=a[13];g[8]=f;g[9]=l;g[11]=a[14];g[12]=m;g[13]=p;g[14]=r}else g[0]=a[0],g[1]=a[4],g[2]=a[8],g[3]=a[12],g[4]=a[1],g[5]=a[5],g[6]=a[9],g[7]=a[13],g[8]=a[2],g[9]=a[6],g[10]=a[10],g[11]=a[14],g[12]=a[3],g[13]=a[7],g[14]=a[11],g[15]=a[15];return g};t.SIMD.transpose=function(g,a){var d,f,m,l,p,r;d=SIMD.Float32x4.load(a,0);f=SIMD.Float32x4.load(a,4);m=SIMD.Float32x4.load(a,
8);a=SIMD.Float32x4.load(a,12);l=SIMD.Float32x4.shuffle(d,f,0,1,4,5);p=SIMD.Float32x4.shuffle(m,a,0,1,4,5);r=SIMD.Float32x4.shuffle(l,p,0,2,4,6);l=SIMD.Float32x4.shuffle(l,p,1,3,5,7);SIMD.Float32x4.store(g,0,r);SIMD.Float32x4.store(g,4,l);l=SIMD.Float32x4.shuffle(d,f,2,3,6,7);p=SIMD.Float32x4.shuffle(m,a,2,3,6,7);d=SIMD.Float32x4.shuffle(l,p,0,2,4,6);f=SIMD.Float32x4.shuffle(l,p,1,3,5,7);SIMD.Float32x4.store(g,8,d);SIMD.Float32x4.store(g,12,f);return g};t.transpose=A.USE_SIMD?t.SIMD.transpose:t.scalar.transpose;
t.scalar.invert=function(g,a){var d=a[0],f=a[1],m=a[2],l=a[3],p=a[4],r=a[5],q=a[6],v=a[7],x=a[8],w=a[9],t=a[10],E=a[11],D=a[12],F=a[13],H=a[14];a=a[15];var I=d*r-f*p,z=d*q-m*p,A=d*v-l*p,K=f*q-m*r,L=f*v-l*r,N=m*v-l*q,Q=x*F-w*D,O=x*H-t*D,T=x*a-E*D,R=w*H-t*F,Y=w*a-E*F,S=t*a-E*H,U=I*S-z*Y+A*R+K*T-L*O+N*Q;if(!U)return null;U=1/U;g[0]=(r*S-q*Y+v*R)*U;g[1]=(m*Y-f*S-l*R)*U;g[2]=(F*N-H*L+a*K)*U;g[3]=(t*L-w*N-E*K)*U;g[4]=(q*T-p*S-v*O)*U;g[5]=(d*S-m*T+l*O)*U;g[6]=(H*A-D*N-a*z)*U;g[7]=(x*N-t*A+E*z)*U;g[8]=(p*
Y-r*T+v*Q)*U;g[9]=(f*T-d*Y-l*Q)*U;g[10]=(D*L-F*A+a*I)*U;g[11]=(w*A-x*L-E*I)*U;g[12]=(r*O-p*R-q*Q)*U;g[13]=(d*R-f*O+m*Q)*U;g[14]=(F*z-D*K-H*I)*U;g[15]=(x*K-w*z+t*I)*U;return g};t.SIMD.invert=function(g,a){var d,f,m,l,p,r,q,v;p=SIMD.Float32x4.load(a,0);r=SIMD.Float32x4.load(a,4);q=SIMD.Float32x4.load(a,8);v=SIMD.Float32x4.load(a,12);a=SIMD.Float32x4.shuffle(p,r,0,1,4,5);f=SIMD.Float32x4.shuffle(q,v,0,1,4,5);d=SIMD.Float32x4.shuffle(a,f,0,2,4,6);f=SIMD.Float32x4.shuffle(f,a,1,3,5,7);a=SIMD.Float32x4.shuffle(p,
r,2,3,6,7);l=SIMD.Float32x4.shuffle(q,v,2,3,6,7);m=SIMD.Float32x4.shuffle(a,l,0,2,4,6);l=SIMD.Float32x4.shuffle(l,a,1,3,5,7);a=SIMD.Float32x4.mul(m,l);a=SIMD.Float32x4.swizzle(a,1,0,3,2);p=SIMD.Float32x4.mul(f,a);r=SIMD.Float32x4.mul(d,a);a=SIMD.Float32x4.swizzle(a,2,3,0,1);p=SIMD.Float32x4.sub(SIMD.Float32x4.mul(f,a),p);r=SIMD.Float32x4.sub(SIMD.Float32x4.mul(d,a),r);r=SIMD.Float32x4.swizzle(r,2,3,0,1);a=SIMD.Float32x4.mul(f,m);a=SIMD.Float32x4.swizzle(a,1,0,3,2);p=SIMD.Float32x4.add(SIMD.Float32x4.mul(l,
a),p);v=SIMD.Float32x4.mul(d,a);a=SIMD.Float32x4.swizzle(a,2,3,0,1);p=SIMD.Float32x4.sub(p,SIMD.Float32x4.mul(l,a));v=SIMD.Float32x4.sub(SIMD.Float32x4.mul(d,a),v);v=SIMD.Float32x4.swizzle(v,2,3,0,1);a=SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(f,2,3,0,1),l);a=SIMD.Float32x4.swizzle(a,1,0,3,2);m=SIMD.Float32x4.swizzle(m,2,3,0,1);p=SIMD.Float32x4.add(SIMD.Float32x4.mul(m,a),p);q=SIMD.Float32x4.mul(d,a);a=SIMD.Float32x4.swizzle(a,2,3,0,1);p=SIMD.Float32x4.sub(p,SIMD.Float32x4.mul(m,a));q=SIMD.Float32x4.sub(SIMD.Float32x4.mul(d,
a),q);q=SIMD.Float32x4.swizzle(q,2,3,0,1);a=SIMD.Float32x4.mul(d,f);a=SIMD.Float32x4.swizzle(a,1,0,3,2);q=SIMD.Float32x4.add(SIMD.Float32x4.mul(l,a),q);v=SIMD.Float32x4.sub(SIMD.Float32x4.mul(m,a),v);a=SIMD.Float32x4.swizzle(a,2,3,0,1);q=SIMD.Float32x4.sub(SIMD.Float32x4.mul(l,a),q);v=SIMD.Float32x4.sub(v,SIMD.Float32x4.mul(m,a));a=SIMD.Float32x4.mul(d,l);a=SIMD.Float32x4.swizzle(a,1,0,3,2);r=SIMD.Float32x4.sub(r,SIMD.Float32x4.mul(m,a));q=SIMD.Float32x4.add(SIMD.Float32x4.mul(f,a),q);a=SIMD.Float32x4.swizzle(a,
2,3,0,1);r=SIMD.Float32x4.add(SIMD.Float32x4.mul(m,a),r);q=SIMD.Float32x4.sub(q,SIMD.Float32x4.mul(f,a));a=SIMD.Float32x4.mul(d,m);a=SIMD.Float32x4.swizzle(a,1,0,3,2);r=SIMD.Float32x4.add(SIMD.Float32x4.mul(l,a),r);v=SIMD.Float32x4.sub(v,SIMD.Float32x4.mul(f,a));a=SIMD.Float32x4.swizzle(a,2,3,0,1);r=SIMD.Float32x4.sub(r,SIMD.Float32x4.mul(l,a));v=SIMD.Float32x4.add(SIMD.Float32x4.mul(f,a),v);d=SIMD.Float32x4.mul(d,p);d=SIMD.Float32x4.add(SIMD.Float32x4.swizzle(d,2,3,0,1),d);d=SIMD.Float32x4.add(SIMD.Float32x4.swizzle(d,
1,0,3,2),d);a=SIMD.Float32x4.reciprocalApproximation(d);d=SIMD.Float32x4.sub(SIMD.Float32x4.add(a,a),SIMD.Float32x4.mul(d,SIMD.Float32x4.mul(a,a)));d=SIMD.Float32x4.swizzle(d,0,0,0,0);if(!d)return null;SIMD.Float32x4.store(g,0,SIMD.Float32x4.mul(d,p));SIMD.Float32x4.store(g,4,SIMD.Float32x4.mul(d,r));SIMD.Float32x4.store(g,8,SIMD.Float32x4.mul(d,q));SIMD.Float32x4.store(g,12,SIMD.Float32x4.mul(d,v));return g};t.invert=A.USE_SIMD?t.SIMD.invert:t.scalar.invert;t.scalar.adjoint=function(g,a){var d=a[0],
f=a[1],m=a[2],l=a[3],p=a[4],r=a[5],q=a[6],v=a[7],x=a[8],w=a[9],t=a[10],E=a[11],D=a[12],F=a[13],H=a[14];a=a[15];g[0]=r*(t*a-E*H)-w*(q*a-v*H)+F*(q*E-v*t);g[1]=-(f*(t*a-E*H)-w*(m*a-l*H)+F*(m*E-l*t));g[2]=f*(q*a-v*H)-r*(m*a-l*H)+F*(m*v-l*q);g[3]=-(f*(q*E-v*t)-r*(m*E-l*t)+w*(m*v-l*q));g[4]=-(p*(t*a-E*H)-x*(q*a-v*H)+D*(q*E-v*t));g[5]=d*(t*a-E*H)-x*(m*a-l*H)+D*(m*E-l*t);g[6]=-(d*(q*a-v*H)-p*(m*a-l*H)+D*(m*v-l*q));g[7]=d*(q*E-v*t)-p*(m*E-l*t)+x*(m*v-l*q);g[8]=p*(w*a-E*F)-x*(r*a-v*F)+D*(r*E-v*w);g[9]=-(d*
(w*a-E*F)-x*(f*a-l*F)+D*(f*E-l*w));g[10]=d*(r*a-v*F)-p*(f*a-l*F)+D*(f*v-l*r);g[11]=-(d*(r*E-v*w)-p*(f*E-l*w)+x*(f*v-l*r));g[12]=-(p*(w*H-t*F)-x*(r*H-q*F)+D*(r*t-q*w));g[13]=d*(w*H-t*F)-x*(f*H-m*F)+D*(f*t-m*w);g[14]=-(d*(r*H-q*F)-p*(f*H-m*F)+D*(f*q-m*r));g[15]=d*(r*t-q*w)-p*(f*t-m*w)+x*(f*q-m*r);return g};t.SIMD.adjoint=function(g,a){var d,f,m,l,p,r,q,v;d=SIMD.Float32x4.load(a,0);f=SIMD.Float32x4.load(a,4);m=SIMD.Float32x4.load(a,8);l=SIMD.Float32x4.load(a,12);r=SIMD.Float32x4.shuffle(d,f,0,1,4,5);
p=SIMD.Float32x4.shuffle(m,l,0,1,4,5);a=SIMD.Float32x4.shuffle(r,p,0,2,4,6);p=SIMD.Float32x4.shuffle(p,r,1,3,5,7);r=SIMD.Float32x4.shuffle(d,f,2,3,6,7);f=SIMD.Float32x4.shuffle(m,l,2,3,6,7);d=SIMD.Float32x4.shuffle(r,f,0,2,4,6);f=SIMD.Float32x4.shuffle(f,r,1,3,5,7);r=SIMD.Float32x4.mul(d,f);r=SIMD.Float32x4.swizzle(r,1,0,3,2);m=SIMD.Float32x4.mul(p,r);l=SIMD.Float32x4.mul(a,r);r=SIMD.Float32x4.swizzle(r,2,3,0,1);m=SIMD.Float32x4.sub(SIMD.Float32x4.mul(p,r),m);l=SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,
r),l);l=SIMD.Float32x4.swizzle(l,2,3,0,1);r=SIMD.Float32x4.mul(p,d);r=SIMD.Float32x4.swizzle(r,1,0,3,2);m=SIMD.Float32x4.add(SIMD.Float32x4.mul(f,r),m);v=SIMD.Float32x4.mul(a,r);r=SIMD.Float32x4.swizzle(r,2,3,0,1);m=SIMD.Float32x4.sub(m,SIMD.Float32x4.mul(f,r));v=SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,r),v);v=SIMD.Float32x4.swizzle(v,2,3,0,1);r=SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(p,2,3,0,1),f);r=SIMD.Float32x4.swizzle(r,1,0,3,2);d=SIMD.Float32x4.swizzle(d,2,3,0,1);m=SIMD.Float32x4.add(SIMD.Float32x4.mul(d,
r),m);q=SIMD.Float32x4.mul(a,r);r=SIMD.Float32x4.swizzle(r,2,3,0,1);m=SIMD.Float32x4.sub(m,SIMD.Float32x4.mul(d,r));q=SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,r),q);q=SIMD.Float32x4.swizzle(q,2,3,0,1);r=SIMD.Float32x4.mul(a,p);r=SIMD.Float32x4.swizzle(r,1,0,3,2);q=SIMD.Float32x4.add(SIMD.Float32x4.mul(f,r),q);v=SIMD.Float32x4.sub(SIMD.Float32x4.mul(d,r),v);r=SIMD.Float32x4.swizzle(r,2,3,0,1);q=SIMD.Float32x4.sub(SIMD.Float32x4.mul(f,r),q);v=SIMD.Float32x4.sub(v,SIMD.Float32x4.mul(d,r));r=SIMD.Float32x4.mul(a,
f);r=SIMD.Float32x4.swizzle(r,1,0,3,2);l=SIMD.Float32x4.sub(l,SIMD.Float32x4.mul(d,r));q=SIMD.Float32x4.add(SIMD.Float32x4.mul(p,r),q);r=SIMD.Float32x4.swizzle(r,2,3,0,1);l=SIMD.Float32x4.add(SIMD.Float32x4.mul(d,r),l);q=SIMD.Float32x4.sub(q,SIMD.Float32x4.mul(p,r));r=SIMD.Float32x4.mul(a,d);r=SIMD.Float32x4.swizzle(r,1,0,3,2);l=SIMD.Float32x4.add(SIMD.Float32x4.mul(f,r),l);v=SIMD.Float32x4.sub(v,SIMD.Float32x4.mul(p,r));r=SIMD.Float32x4.swizzle(r,2,3,0,1);l=SIMD.Float32x4.sub(l,SIMD.Float32x4.mul(f,
r));v=SIMD.Float32x4.add(SIMD.Float32x4.mul(p,r),v);SIMD.Float32x4.store(g,0,m);SIMD.Float32x4.store(g,4,l);SIMD.Float32x4.store(g,8,q);SIMD.Float32x4.store(g,12,v);return g};t.adjoint=A.USE_SIMD?t.SIMD.adjoint:t.scalar.adjoint;t.determinant=function(g){var a=g[0],d=g[1],f=g[2],m=g[3],l=g[4],p=g[5],r=g[6],q=g[7],v=g[8],x=g[9],w=g[10],t=g[11],E=g[12],D=g[13],F=g[14];g=g[15];return(a*p-d*l)*(w*g-t*F)-(a*r-f*l)*(x*g-t*D)+(a*q-m*l)*(x*F-w*D)+(d*r-f*p)*(v*g-t*E)-(d*q-m*p)*(v*F-w*E)+(f*q-m*r)*(v*D-x*E)};
t.SIMD.multiply=function(g,a,d){var f=SIMD.Float32x4.load(a,0),m=SIMD.Float32x4.load(a,4),l=SIMD.Float32x4.load(a,8);a=SIMD.Float32x4.load(a,12);var p=SIMD.Float32x4.load(d,0),p=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(p,0,0,0,0),f),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(p,1,1,1,1),m),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(p,2,2,2,2),l),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(p,3,3,3,3),a))));SIMD.Float32x4.store(g,0,p);p=SIMD.Float32x4.load(d,
4);p=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(p,0,0,0,0),f),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(p,1,1,1,1),m),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(p,2,2,2,2),l),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(p,3,3,3,3),a))));SIMD.Float32x4.store(g,4,p);p=SIMD.Float32x4.load(d,8);p=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(p,0,0,0,0),f),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(p,1,1,1,1),m),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(p,
2,2,2,2),l),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(p,3,3,3,3),a))));SIMD.Float32x4.store(g,8,p);d=SIMD.Float32x4.load(d,12);f=SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,0,0,0,0),f),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,1,1,1,1),m),SIMD.Float32x4.add(SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,2,2,2,2),l),SIMD.Float32x4.mul(SIMD.Float32x4.swizzle(d,3,3,3,3),a))));SIMD.Float32x4.store(g,12,f);return g};t.scalar.multiply=function(g,a,d){var f=a[0],m=a[1],
l=a[2],p=a[3],r=a[4],q=a[5],v=a[6],x=a[7],w=a[8],t=a[9],E=a[10],D=a[11],F=a[12],H=a[13],I=a[14];a=a[15];var z=d[0],A=d[1],K=d[2],L=d[3];g[0]=z*f+A*r+K*w+L*F;g[1]=z*m+A*q+K*t+L*H;g[2]=z*l+A*v+K*E+L*I;g[3]=z*p+A*x+K*D+L*a;z=d[4];A=d[5];K=d[6];L=d[7];g[4]=z*f+A*r+K*w+L*F;g[5]=z*m+A*q+K*t+L*H;g[6]=z*l+A*v+K*E+L*I;g[7]=z*p+A*x+K*D+L*a;z=d[8];A=d[9];K=d[10];L=d[11];g[8]=z*f+A*r+K*w+L*F;g[9]=z*m+A*q+K*t+L*H;g[10]=z*l+A*v+K*E+L*I;g[11]=z*p+A*x+K*D+L*a;z=d[12];A=d[13];K=d[14];L=d[15];g[12]=z*f+A*r+K*w+L*F;
g[13]=z*m+A*q+K*t+L*H;g[14]=z*l+A*v+K*E+L*I;g[15]=z*p+A*x+K*D+L*a;return g};t.multiply=A.USE_SIMD?t.SIMD.multiply:t.scalar.multiply;t.mul=t.multiply;t.scalar.translate=function(g,a,d){var f=d[0],m=d[1];d=d[2];var l,p,r,q,v,x,w,t,E,D,F,H;a===g?(g[12]=a[0]*f+a[4]*m+a[8]*d+a[12],g[13]=a[1]*f+a[5]*m+a[9]*d+a[13],g[14]=a[2]*f+a[6]*m+a[10]*d+a[14],g[15]=a[3]*f+a[7]*m+a[11]*d+a[15]):(l=a[0],p=a[1],r=a[2],q=a[3],v=a[4],x=a[5],w=a[6],t=a[7],E=a[8],D=a[9],F=a[10],H=a[11],g[0]=l,g[1]=p,g[2]=r,g[3]=q,g[4]=v,
g[5]=x,g[6]=w,g[7]=t,g[8]=E,g[9]=D,g[10]=F,g[11]=H,g[12]=l*f+v*m+E*d+a[12],g[13]=p*f+x*m+D*d+a[13],g[14]=r*f+w*m+F*d+a[14],g[15]=q*f+t*m+H*d+a[15]);return g};t.SIMD.translate=function(g,a,d){var f=SIMD.Float32x4.load(a,0),m=SIMD.Float32x4.load(a,4),l=SIMD.Float32x4.load(a,8),p=SIMD.Float32x4.load(a,12);d=SIMD.Float32x4(d[0],d[1],d[2],0);a!==g&&(g[0]=a[0],g[1]=a[1],g[2]=a[2],g[3]=a[3],g[4]=a[4],g[5]=a[5],g[6]=a[6],g[7]=a[7],g[8]=a[8],g[9]=a[9],g[10]=a[10],g[11]=a[11]);f=SIMD.Float32x4.mul(f,SIMD.Float32x4.swizzle(d,
0,0,0,0));m=SIMD.Float32x4.mul(m,SIMD.Float32x4.swizzle(d,1,1,1,1));l=SIMD.Float32x4.mul(l,SIMD.Float32x4.swizzle(d,2,2,2,2));a=SIMD.Float32x4.add(f,SIMD.Float32x4.add(m,SIMD.Float32x4.add(l,p)));SIMD.Float32x4.store(g,12,a);return g};t.translate=A.USE_SIMD?t.SIMD.translate:t.scalar.translate;t.scalar.scale=function(g,a,d){var f=d[0],m=d[1];d=d[2];g[0]=a[0]*f;g[1]=a[1]*f;g[2]=a[2]*f;g[3]=a[3]*f;g[4]=a[4]*m;g[5]=a[5]*m;g[6]=a[6]*m;g[7]=a[7]*m;g[8]=a[8]*d;g[9]=a[9]*d;g[10]=a[10]*d;g[11]=a[11]*d;g[12]=
a[12];g[13]=a[13];g[14]=a[14];g[15]=a[15];return g};t.SIMD.scale=function(g,a,d){var f;d=SIMD.Float32x4(d[0],d[1],d[2],0);f=SIMD.Float32x4.load(a,0);SIMD.Float32x4.store(g,0,SIMD.Float32x4.mul(f,SIMD.Float32x4.swizzle(d,0,0,0,0)));f=SIMD.Float32x4.load(a,4);SIMD.Float32x4.store(g,4,SIMD.Float32x4.mul(f,SIMD.Float32x4.swizzle(d,1,1,1,1)));f=SIMD.Float32x4.load(a,8);SIMD.Float32x4.store(g,8,SIMD.Float32x4.mul(f,SIMD.Float32x4.swizzle(d,2,2,2,2)));g[12]=a[12];g[13]=a[13];g[14]=a[14];g[15]=a[15];return g};
t.scale=A.USE_SIMD?t.SIMD.scale:t.scalar.scale;t.rotate=function(g,a,d,f){var m=f[0],l=f[1];f=f[2];var p=Math.sqrt(m*m+l*l+f*f),r,q,v,x,w,t,E,D,F,H,I,z,M,K,L,N,Q,O,T,R;if(Math.abs(p)<A.EPSILON)return null;p=1/p;m*=p;l*=p;f*=p;r=Math.sin(d);q=Math.cos(d);v=1-q;d=a[0];p=a[1];x=a[2];w=a[3];t=a[4];E=a[5];D=a[6];F=a[7];H=a[8];I=a[9];z=a[10];M=a[11];K=m*m*v+q;L=l*m*v+f*r;N=f*m*v-l*r;Q=m*l*v-f*r;O=l*l*v+q;T=f*l*v+m*r;R=m*f*v+l*r;m=l*f*v-m*r;l=f*f*v+q;g[0]=d*K+t*L+H*N;g[1]=p*K+E*L+I*N;g[2]=x*K+D*L+z*N;g[3]=
w*K+F*L+M*N;g[4]=d*Q+t*O+H*T;g[5]=p*Q+E*O+I*T;g[6]=x*Q+D*O+z*T;g[7]=w*Q+F*O+M*T;g[8]=d*R+t*m+H*l;g[9]=p*R+E*m+I*l;g[10]=x*R+D*m+z*l;g[11]=w*R+F*m+M*l;a!==g&&(g[12]=a[12],g[13]=a[13],g[14]=a[14],g[15]=a[15]);return g};t.scalar.rotateX=function(g,a,d){var f=Math.sin(d);d=Math.cos(d);var m=a[4],l=a[5],p=a[6],r=a[7],q=a[8],v=a[9],x=a[10],w=a[11];a!==g&&(g[0]=a[0],g[1]=a[1],g[2]=a[2],g[3]=a[3],g[12]=a[12],g[13]=a[13],g[14]=a[14],g[15]=a[15]);g[4]=m*d+q*f;g[5]=l*d+v*f;g[6]=p*d+x*f;g[7]=r*d+w*f;g[8]=q*d-
m*f;g[9]=v*d-l*f;g[10]=x*d-p*f;g[11]=w*d-r*f;return g};t.SIMD.rotateX=function(g,a,d){var f=SIMD.Float32x4.splat(Math.sin(d));d=SIMD.Float32x4.splat(Math.cos(d));a!==g&&(g[0]=a[0],g[1]=a[1],g[2]=a[2],g[3]=a[3],g[12]=a[12],g[13]=a[13],g[14]=a[14],g[15]=a[15]);var m=SIMD.Float32x4.load(a,4);a=SIMD.Float32x4.load(a,8);SIMD.Float32x4.store(g,4,SIMD.Float32x4.add(SIMD.Float32x4.mul(m,d),SIMD.Float32x4.mul(a,f)));SIMD.Float32x4.store(g,8,SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,d),SIMD.Float32x4.mul(m,f)));
return g};t.rotateX=A.USE_SIMD?t.SIMD.rotateX:t.scalar.rotateX;t.scalar.rotateY=function(g,a,d){var f=Math.sin(d);d=Math.cos(d);var m=a[0],l=a[1],p=a[2],r=a[3],q=a[8],v=a[9],x=a[10],w=a[11];a!==g&&(g[4]=a[4],g[5]=a[5],g[6]=a[6],g[7]=a[7],g[12]=a[12],g[13]=a[13],g[14]=a[14],g[15]=a[15]);g[0]=m*d-q*f;g[1]=l*d-v*f;g[2]=p*d-x*f;g[3]=r*d-w*f;g[8]=m*f+q*d;g[9]=l*f+v*d;g[10]=p*f+x*d;g[11]=r*f+w*d;return g};t.SIMD.rotateY=function(g,a,d){var f=SIMD.Float32x4.splat(Math.sin(d));d=SIMD.Float32x4.splat(Math.cos(d));
a!==g&&(g[4]=a[4],g[5]=a[5],g[6]=a[6],g[7]=a[7],g[12]=a[12],g[13]=a[13],g[14]=a[14],g[15]=a[15]);var m=SIMD.Float32x4.load(a,0);a=SIMD.Float32x4.load(a,8);SIMD.Float32x4.store(g,0,SIMD.Float32x4.sub(SIMD.Float32x4.mul(m,d),SIMD.Float32x4.mul(a,f)));SIMD.Float32x4.store(g,8,SIMD.Float32x4.add(SIMD.Float32x4.mul(m,f),SIMD.Float32x4.mul(a,d)));return g};t.rotateY=A.USE_SIMD?t.SIMD.rotateY:t.scalar.rotateY;t.scalar.rotateZ=function(g,a,d){var f=Math.sin(d);d=Math.cos(d);var m=a[0],l=a[1],p=a[2],r=a[3],
q=a[4],v=a[5],x=a[6],w=a[7];a!==g&&(g[8]=a[8],g[9]=a[9],g[10]=a[10],g[11]=a[11],g[12]=a[12],g[13]=a[13],g[14]=a[14],g[15]=a[15]);g[0]=m*d+q*f;g[1]=l*d+v*f;g[2]=p*d+x*f;g[3]=r*d+w*f;g[4]=q*d-m*f;g[5]=v*d-l*f;g[6]=x*d-p*f;g[7]=w*d-r*f;return g};t.SIMD.rotateZ=function(g,a,d){var f=SIMD.Float32x4.splat(Math.sin(d));d=SIMD.Float32x4.splat(Math.cos(d));a!==g&&(g[8]=a[8],g[9]=a[9],g[10]=a[10],g[11]=a[11],g[12]=a[12],g[13]=a[13],g[14]=a[14],g[15]=a[15]);var m=SIMD.Float32x4.load(a,0);a=SIMD.Float32x4.load(a,
4);SIMD.Float32x4.store(g,0,SIMD.Float32x4.add(SIMD.Float32x4.mul(m,d),SIMD.Float32x4.mul(a,f)));SIMD.Float32x4.store(g,4,SIMD.Float32x4.sub(SIMD.Float32x4.mul(a,d),SIMD.Float32x4.mul(m,f)));return g};t.rotateZ=A.USE_SIMD?t.SIMD.rotateZ:t.scalar.rotateZ;t.fromTranslation=function(g,a){g[0]=1;g[1]=0;g[2]=0;g[3]=0;g[4]=0;g[5]=1;g[6]=0;g[7]=0;g[8]=0;g[9]=0;g[10]=1;g[11]=0;g[12]=a[0];g[13]=a[1];g[14]=a[2];g[15]=1;return g};t.fromScaling=function(g,a){g[0]=a[0];g[1]=0;g[2]=0;g[3]=0;g[4]=0;g[5]=a[1];g[6]=
0;g[7]=0;g[8]=0;g[9]=0;g[10]=a[2];g[11]=0;g[12]=0;g[13]=0;g[14]=0;g[15]=1;return g};t.fromRotation=function(g,a,d){var f=d[0],m=d[1];d=d[2];var l=Math.sqrt(f*f+m*m+d*d),p;if(Math.abs(l)<A.EPSILON)return null;l=1/l;f*=l;m*=l;d*=l;l=Math.sin(a);a=Math.cos(a);p=1-a;g[0]=f*f*p+a;g[1]=m*f*p+d*l;g[2]=d*f*p-m*l;g[3]=0;g[4]=f*m*p-d*l;g[5]=m*m*p+a;g[6]=d*m*p+f*l;g[7]=0;g[8]=f*d*p+m*l;g[9]=m*d*p-f*l;g[10]=d*d*p+a;g[11]=0;g[12]=0;g[13]=0;g[14]=0;g[15]=1;return g};t.fromXRotation=function(g,a){var d=Math.sin(a);
a=Math.cos(a);g[0]=1;g[1]=0;g[2]=0;g[3]=0;g[4]=0;g[5]=a;g[6]=d;g[7]=0;g[8]=0;g[9]=-d;g[10]=a;g[11]=0;g[12]=0;g[13]=0;g[14]=0;g[15]=1;return g};t.fromYRotation=function(g,a){var d=Math.sin(a);a=Math.cos(a);g[0]=a;g[1]=0;g[2]=-d;g[3]=0;g[4]=0;g[5]=1;g[6]=0;g[7]=0;g[8]=d;g[9]=0;g[10]=a;g[11]=0;g[12]=0;g[13]=0;g[14]=0;g[15]=1;return g};t.fromZRotation=function(g,a){var d=Math.sin(a);a=Math.cos(a);g[0]=a;g[1]=d;g[2]=0;g[3]=0;g[4]=-d;g[5]=a;g[6]=0;g[7]=0;g[8]=0;g[9]=0;g[10]=1;g[11]=0;g[12]=0;g[13]=0;g[14]=
0;g[15]=1;return g};t.fromRotationTranslation=function(g,a,d){var f=a[0],m=a[1],l=a[2],p=a[3],r=f+f,q=m+m,v=l+l;a=f*r;var x=f*q,f=f*v,w=m*q,m=m*v,l=l*v,r=p*r,q=p*q,p=p*v;g[0]=1-(w+l);g[1]=x+p;g[2]=f-q;g[3]=0;g[4]=x-p;g[5]=1-(a+l);g[6]=m+r;g[7]=0;g[8]=f+q;g[9]=m-r;g[10]=1-(a+w);g[11]=0;g[12]=d[0];g[13]=d[1];g[14]=d[2];g[15]=1;return g};t.getTranslation=function(g,a){g[0]=a[12];g[1]=a[13];g[2]=a[14];return g};t.getRotation=function(g,a){var d=a[0]+a[5]+a[10],f=0;0<d?(f=2*Math.sqrt(d+1),g[3]=.25*f,g[0]=
(a[6]-a[9])/f,g[1]=(a[8]-a[2])/f,g[2]=(a[1]-a[4])/f):a[0]>a[5]&a[0]>a[10]?(f=2*Math.sqrt(1+a[0]-a[5]-a[10]),g[3]=(a[6]-a[9])/f,g[0]=.25*f,g[1]=(a[1]+a[4])/f,g[2]=(a[8]+a[2])/f):a[5]>a[10]?(f=2*Math.sqrt(1+a[5]-a[0]-a[10]),g[3]=(a[8]-a[2])/f,g[0]=(a[1]+a[4])/f,g[1]=.25*f,g[2]=(a[6]+a[9])/f):(f=2*Math.sqrt(1+a[10]-a[0]-a[5]),g[3]=(a[1]-a[4])/f,g[0]=(a[8]+a[2])/f,g[1]=(a[6]+a[9])/f,g[2]=.25*f);return g};t.fromRotationTranslationScale=function(g,a,d,f){var m=a[0],l=a[1],p=a[2],r=a[3],q=m+m,v=l+l,x=p+
p;a=m*q;var w=m*v,m=m*x,t=l*v,l=l*x,p=p*x,q=r*q,v=r*v,r=r*x,x=f[0],E=f[1];f=f[2];g[0]=(1-(t+p))*x;g[1]=(w+r)*x;g[2]=(m-v)*x;g[3]=0;g[4]=(w-r)*E;g[5]=(1-(a+p))*E;g[6]=(l+q)*E;g[7]=0;g[8]=(m+v)*f;g[9]=(l-q)*f;g[10]=(1-(a+t))*f;g[11]=0;g[12]=d[0];g[13]=d[1];g[14]=d[2];g[15]=1;return g};t.fromRotationTranslationScaleOrigin=function(g,a,d,f,m){var l=a[0],p=a[1],r=a[2],q=a[3],v=l+l,x=p+p,w=r+r;a=l*v;var t=l*x,l=l*w,E=p*x,p=p*w,r=r*w,v=q*v,x=q*x,q=q*w,w=f[0],D=f[1];f=f[2];var F=m[0],H=m[1];m=m[2];g[0]=(1-
(E+r))*w;g[1]=(t+q)*w;g[2]=(l-x)*w;g[3]=0;g[4]=(t-q)*D;g[5]=(1-(a+r))*D;g[6]=(p+v)*D;g[7]=0;g[8]=(l+x)*f;g[9]=(p-v)*f;g[10]=(1-(a+E))*f;g[11]=0;g[12]=d[0]+F-(g[0]*F+g[4]*H+g[8]*m);g[13]=d[1]+H-(g[1]*F+g[5]*H+g[9]*m);g[14]=d[2]+m-(g[2]*F+g[6]*H+g[10]*m);g[15]=1;return g};t.fromQuat=function(g,a){var d=a[0],f=a[1],m=a[2];a=a[3];var l=d+d,p=f+f,r=m+m,d=d*l,q=f*l,f=f*p,v=m*l,x=m*p,m=m*r,l=a*l,p=a*p;a*=r;g[0]=1-f-m;g[1]=q+a;g[2]=v-p;g[3]=0;g[4]=q-a;g[5]=1-d-m;g[6]=x+l;g[7]=0;g[8]=v+p;g[9]=x-l;g[10]=1-
d-f;g[11]=0;g[12]=0;g[13]=0;g[14]=0;g[15]=1;return g};t.frustum=function(g,a,d,f,m,l,p){var r=1/(d-a),q=1/(m-f),v=1/(l-p);g[0]=2*l*r;g[1]=0;g[2]=0;g[3]=0;g[4]=0;g[5]=2*l*q;g[6]=0;g[7]=0;g[8]=(d+a)*r;g[9]=(m+f)*q;g[10]=(p+l)*v;g[11]=-1;g[12]=0;g[13]=0;g[14]=p*l*2*v;g[15]=0;return g};t.perspective=function(g,a,d,f,m){a=1/Math.tan(a/2);var l=1/(f-m);g[0]=a/d;g[1]=0;g[2]=0;g[3]=0;g[4]=0;g[5]=a;g[6]=0;g[7]=0;g[8]=0;g[9]=0;g[10]=(m+f)*l;g[11]=-1;g[12]=0;g[13]=0;g[14]=2*m*f*l;g[15]=0;return g};t.perspectiveFromFieldOfView=
function(g,a,d,f){var m=Math.tan(a.upDegrees*Math.PI/180),l=Math.tan(a.downDegrees*Math.PI/180),p=Math.tan(a.leftDegrees*Math.PI/180);a=Math.tan(a.rightDegrees*Math.PI/180);var r=2/(p+a),q=2/(m+l);g[0]=r;g[1]=0;g[2]=0;g[3]=0;g[4]=0;g[5]=q;g[6]=0;g[7]=0;g[8]=-((p-a)*r*.5);g[9]=(m-l)*q*.5;g[10]=f/(d-f);g[11]=-1;g[12]=0;g[13]=0;g[14]=f*d/(d-f);g[15]=0;return g};t.ortho=function(g,a,d,f,m,l,p){var r=1/(a-d),q=1/(f-m),v=1/(l-p);g[0]=-2*r;g[1]=0;g[2]=0;g[3]=0;g[4]=0;g[5]=-2*q;g[6]=0;g[7]=0;g[8]=0;g[9]=
0;g[10]=2*v;g[11]=0;g[12]=(a+d)*r;g[13]=(m+f)*q;g[14]=(p+l)*v;g[15]=1;return g};t.lookAt=function(g,a,d,f){var m,l,p,r,q,v,x,w,B=a[0],E=a[1];a=a[2];p=f[0];r=f[1];l=f[2];x=d[0];f=d[1];m=d[2];if(Math.abs(B-x)<A.EPSILON&&Math.abs(E-f)<A.EPSILON&&Math.abs(a-m)<A.EPSILON)return t.identity(g);d=B-x;f=E-f;x=a-m;w=1/Math.sqrt(d*d+f*f+x*x);d*=w;f*=w;x*=w;m=r*x-l*f;l=l*d-p*x;p=p*f-r*d;(w=Math.sqrt(m*m+l*l+p*p))?(w=1/w,m*=w,l*=w,p*=w):p=l=m=0;r=f*p-x*l;q=x*m-d*p;v=d*l-f*m;(w=Math.sqrt(r*r+q*q+v*v))?(w=1/w,r*=
w,q*=w,v*=w):v=q=r=0;g[0]=m;g[1]=r;g[2]=d;g[3]=0;g[4]=l;g[5]=q;g[6]=f;g[7]=0;g[8]=p;g[9]=v;g[10]=x;g[11]=0;g[12]=-(m*B+l*E+p*a);g[13]=-(r*B+q*E+v*a);g[14]=-(d*B+f*E+x*a);g[15]=1;return g};t.str=function(g){return"mat4("+g[0]+", "+g[1]+", "+g[2]+", "+g[3]+", "+g[4]+", "+g[5]+", "+g[6]+", "+g[7]+", "+g[8]+", "+g[9]+", "+g[10]+", "+g[11]+", "+g[12]+", "+g[13]+", "+g[14]+", "+g[15]+")"};t.frob=function(g){return Math.sqrt(Math.pow(g[0],2)+Math.pow(g[1],2)+Math.pow(g[2],2)+Math.pow(g[3],2)+Math.pow(g[4],
2)+Math.pow(g[5],2)+Math.pow(g[6],2)+Math.pow(g[7],2)+Math.pow(g[8],2)+Math.pow(g[9],2)+Math.pow(g[10],2)+Math.pow(g[11],2)+Math.pow(g[12],2)+Math.pow(g[13],2)+Math.pow(g[14],2)+Math.pow(g[15],2))};t.add=function(g,a,d){g[0]=a[0]+d[0];g[1]=a[1]+d[1];g[2]=a[2]+d[2];g[3]=a[3]+d[3];g[4]=a[4]+d[4];g[5]=a[5]+d[5];g[6]=a[6]+d[6];g[7]=a[7]+d[7];g[8]=a[8]+d[8];g[9]=a[9]+d[9];g[10]=a[10]+d[10];g[11]=a[11]+d[11];g[12]=a[12]+d[12];g[13]=a[13]+d[13];g[14]=a[14]+d[14];g[15]=a[15]+d[15];return g};t.subtract=function(g,
a,d){g[0]=a[0]-d[0];g[1]=a[1]-d[1];g[2]=a[2]-d[2];g[3]=a[3]-d[3];g[4]=a[4]-d[4];g[5]=a[5]-d[5];g[6]=a[6]-d[6];g[7]=a[7]-d[7];g[8]=a[8]-d[8];g[9]=a[9]-d[9];g[10]=a[10]-d[10];g[11]=a[11]-d[11];g[12]=a[12]-d[12];g[13]=a[13]-d[13];g[14]=a[14]-d[14];g[15]=a[15]-d[15];return g};t.sub=t.subtract;t.multiplyScalar=function(g,a,d){g[0]=a[0]*d;g[1]=a[1]*d;g[2]=a[2]*d;g[3]=a[3]*d;g[4]=a[4]*d;g[5]=a[5]*d;g[6]=a[6]*d;g[7]=a[7]*d;g[8]=a[8]*d;g[9]=a[9]*d;g[10]=a[10]*d;g[11]=a[11]*d;g[12]=a[12]*d;g[13]=a[13]*d;g[14]=
a[14]*d;g[15]=a[15]*d;return g};t.multiplyScalarAndAdd=function(g,a,d,f){g[0]=a[0]+d[0]*f;g[1]=a[1]+d[1]*f;g[2]=a[2]+d[2]*f;g[3]=a[3]+d[3]*f;g[4]=a[4]+d[4]*f;g[5]=a[5]+d[5]*f;g[6]=a[6]+d[6]*f;g[7]=a[7]+d[7]*f;g[8]=a[8]+d[8]*f;g[9]=a[9]+d[9]*f;g[10]=a[10]+d[10]*f;g[11]=a[11]+d[11]*f;g[12]=a[12]+d[12]*f;g[13]=a[13]+d[13]*f;g[14]=a[14]+d[14]*f;g[15]=a[15]+d[15]*f;return g};t.exactEquals=function(g,a){return g[0]===a[0]&&g[1]===a[1]&&g[2]===a[2]&&g[3]===a[3]&&g[4]===a[4]&&g[5]===a[5]&&g[6]===a[6]&&g[7]===
a[7]&&g[8]===a[8]&&g[9]===a[9]&&g[10]===a[10]&&g[11]===a[11]&&g[12]===a[12]&&g[13]===a[13]&&g[14]===a[14]&&g[15]===a[15]};t.equals=function(g,a){var d=g[0],f=g[1],m=g[2],l=g[3],p=g[4],r=g[5],q=g[6],v=g[7],x=g[8],w=g[9],t=g[10],E=g[11],D=g[12],F=g[13],H=g[14];g=g[15];var I=a[0],z=a[1],M=a[2],K=a[3],L=a[4],N=a[5],Q=a[6],O=a[7],T=a[8],R=a[9],Y=a[10],S=a[11],U=a[12],X=a[13],h=a[14];a=a[15];return Math.abs(d-I)<=A.EPSILON*Math.max(1,Math.abs(d),Math.abs(I))&&Math.abs(f-z)<=A.EPSILON*Math.max(1,Math.abs(f),
Math.abs(z))&&Math.abs(m-M)<=A.EPSILON*Math.max(1,Math.abs(m),Math.abs(M))&&Math.abs(l-K)<=A.EPSILON*Math.max(1,Math.abs(l),Math.abs(K))&&Math.abs(p-L)<=A.EPSILON*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(r-N)<=A.EPSILON*Math.max(1,Math.abs(r),Math.abs(N))&&Math.abs(q-Q)<=A.EPSILON*Math.max(1,Math.abs(q),Math.abs(Q))&&Math.abs(v-O)<=A.EPSILON*Math.max(1,Math.abs(v),Math.abs(O))&&Math.abs(x-T)<=A.EPSILON*Math.max(1,Math.abs(x),Math.abs(T))&&Math.abs(w-R)<=A.EPSILON*Math.max(1,Math.abs(w),Math.abs(R))&&
Math.abs(t-Y)<=A.EPSILON*Math.max(1,Math.abs(t),Math.abs(Y))&&Math.abs(E-S)<=A.EPSILON*Math.max(1,Math.abs(E),Math.abs(S))&&Math.abs(D-U)<=A.EPSILON*Math.max(1,Math.abs(D),Math.abs(U))&&Math.abs(F-X)<=A.EPSILON*Math.max(1,Math.abs(F),Math.abs(X))&&Math.abs(H-h)<=A.EPSILON*Math.max(1,Math.abs(H),Math.abs(h))&&Math.abs(g-a)<=A.EPSILON*Math.max(1,Math.abs(g),Math.abs(a))};return t})},"esri/core/libs/gl-matrix/common":function(){define([],function(){var A={EPSILON:1E-6};A.ARRAY_TYPE="undefined"!==typeof Float32Array?
Float32Array:Array;A.RANDOM=Math.random;A.ENABLE_SIMD=!1;A.SIMD_AVAILABLE=A.ARRAY_TYPE===Float32Array&&"SIMD"in this;A.USE_SIMD=A.ENABLE_SIMD&&A.SIMD_AVAILABLE;A.setMatrixArrayType=function(g){A.ARRAY_TYPE=g};var t=Math.PI/180;A.toRadian=function(g){return g*t};A.equals=function(g,a){return Math.abs(g-a)<=A.EPSILON*Math.max(1,Math.abs(g),Math.abs(a))};return A})},"esri/views/2d/engine/webgl/Dispatcher":function(){define(["require","exports","./enums"],function(A,t,g){return function(){function a(){}
a.prototype.replayList=function(a,f,g,l,p,r,q,v,x,w,t){var d=this;f=f.symbolLevels;f.length<=g||!(g=f[g])||(a.setStencilTestEnabled(!0),a.setStencilFunction(514,p.stencilRef,255),g.zLevels.forEach(function(f){f=f.geometryDPInfo;f.fill&&d._draw(a,f.fill,l,p,r,q,x,w,v,t);f.line&&d._draw(a,f.line,l,p,r,q,x,w,v,t);f.marker&&d._draw(a,f.marker,l,p,r,q,x,w,v,t);f.text&&d._draw(a,f.text,l,p,r,q,x,w,v,t)}))};a.prototype._draw=function(a,f,m,l,p,r,q,v,x,w){f.forEach(function(d){switch(d.geometryType){case g.WGLGeometryType.FILL:m.drawFill(a,
d.materialInfo,l,p,r,x,q,v,w,d.indexFrom,d.indexCount);break;case g.WGLGeometryType.LINE:m.drawLine(a,d.materialInfo,l,p,r,x,q,v,d.indexFrom,d.indexCount);break;case g.WGLGeometryType.MARKER:m.drawIcon(a,d.materialInfo,l,p,r,x,d.indexFrom,d.indexCount);break;case g.WGLGeometryType.TEXT:m.drawText(a,d.materialInfo,l,p,r,x,d.indexFrom,d.indexCount)}})};return a}()})},"esri/views/2d/engine/webgl/enums":function(){define(["require","exports"],function(A,t){Object.defineProperty(t,"__esModule",{value:!0});
(function(g){g[g.FILL=0]="FILL";g[g.LINE=1]="LINE";g[g.MARKER=2]="MARKER";g[g.TEXT=3]="TEXT";g[g.UNKNOWN=4]="UNKNOWN"})(t.WGLGeometryType||(t.WGLGeometryType={}));(function(g){g[g.SUCCEEDED=0]="SUCCEEDED";g[g.FAILED_OUT_OF_MEMORY=1]="FAILED_OUT_OF_MEMORY"})(t.WGLGeometryTransactionStatus||(t.WGLGeometryTransactionStatus={}));(function(g){g[g.GEOMETRY=1]="GEOMETRY";g[g.TEXT=2]="TEXT";g[g.HITTEST=3]="HITTEST";g[g.HIGHLIGHT=4]="HIGHLIGHT"})(t.WGLDrawPhase||(t.WGLDrawPhase={}));(function(g){g[g.NONE=
0]="NONE";g[g.OPACITY=1]="OPACITY";g[g.COLOR=2]="COLOR";g[g.ROTATION=4]="ROTATION";g[g.SIZE_MINMAX_VALUE=8]="SIZE_MINMAX_VALUE";g[g.SIZE_SCALE_STOPS=16]="SIZE_SCALE_STOPS";g[g.SIZE_FIELD_STOPS=32]="SIZE_FIELD_STOPS";g[g.SIZE_UNIT_VALUE=64]="SIZE_UNIT_VALUE"})(t.WGLVVFlag||(t.WGLVVFlag={}))})},"esri/views/2d/engine/webgl/GeometryUtils":function(){define(["require","exports"],function(A,t){function g(a,f){a%=f;return 0<=a?a:a+f}Object.defineProperty(t,"__esModule",{value:!0});t.C_INFINITY=Number.POSITIVE_INFINITY;
t.C_PI=Math.PI;t.C_2PI=2*t.C_PI;t.C_PI_BY_2=t.C_PI/2;t.C_RAD_TO_256=128/t.C_PI;t.C_256_TO_RAD=t.C_PI/128;t.C_DEG_TO_256=256/360;t.C_DEG_TO_RAD=t.C_PI/180;t.C_SQRT2=1.414213562;t.C_SQRT2_INV=1/t.C_SQRT2;var a=1/Math.LN2;t.positiveMod=g;t.radToByte=function(a){return g(a*t.C_RAD_TO_256,256)};t.degToByte=function(a){return g(a*t.C_DEG_TO_256,256)};t.log2=function(d){return Math.log(d)*a};t.sqr=function(a){return a*a};t.clamp=function(a,f,g){return Math.min(Math.max(a,f),g)};t.interpolate=function(a,
f,g){return a*(1-g)+f*g};t.between=function(a,f,g){return a>=f&&a<=g||a>=g&&a<=f}})},"esri/views/2d/engine/webgl/MaterialManager":function(){define("require exports ../../../webgl/ShaderVariations ./shaders/textShaderSnippets ./shaders/iconShaderSnippets ./shaders/fillShaderSnippets ./shaders/lineShaderSnippets ./MaterialInfoUtils ./enums".split(" "),function(A,t,g,a,d,f,m,l,p){return function(){function r(){this._programRep=new Map;this.isInitialize=!1}r.prototype.initialize=function(l){if(!this.isInitialize){var p=
new g("text",["textVS","textFS"],[],a,l);p.addDefine("ID","ID",[!1,!1],"ID");p.addDefine("HIGHLIGHT","HIGHLIGHT",[!1,!1],"HIGHLIGHT");p.addDefine("SDF","SDF",[!1,!1],"SDF");p.addDefine("VV_SIZE_MIN_MAX_VALUE","VV_SIZE_MIN_MAX_VALUE",[!1,!1],"VV_SIZE_MIN_MAX_VALUE");p.addDefine("VV_SIZE_SCALE_STOPS","VV_SIZE_SCALE_STOPS",[!1,!1],"VV_SIZE_SCALE_STOPS");p.addDefine("VV_SIZE_FIELD_STOPS","VV_SIZE_FIELD_STOPS",[!1,!1],"VV_SIZE_FIELD_STOPS");p.addDefine("VV_SIZE_UNIT_VALUE","VV_SIZE_UNIT_VALUE",[!1,!1],
"VV_SIZE_UNIT_VALUE");p.addDefine("VV_COLOR","VV_COLOR",[!1,!1],"VV_COLOR");p.addDefine("VV_ROTATION","VV_ROTATION",[!1,!1],"VV_ROTATION");p.addDefine("VV_OPACITY","VV_OPACITY",[!1,!1],"VV_OPACITY");p.addDefine("VERTEX_VISIBILITY","VERTEX_VISIBILITY",[!1,!1],"VERTEX_VISIBILITY");p.addDefine("PATTERN","PATTERN",[!1,!1],"PATTERN");p.addDefine("HEATMAP","HEATMAP",[!1,!1],"HEATMAP");var q=new g("icon",["iconVS","iconFS"],[],d,l);q.addDefine("ID","ID",[!0,!0],"ID");q.addDefine("HIGHLIGHT","HIGHLIGHT",
[!0,!0],"HIGHLIGHT");q.addDefine("SDF","SDF",[!0,!0],"SDF");q.addDefine("VV_SIZE_MIN_MAX_VALUE","VV_SIZE_MIN_MAX_VALUE",[!0,!1],"VV_SIZE_MIN_MAX_VALUE");q.addDefine("VV_SIZE_SCALE_STOPS","VV_SIZE_SCALE_STOPS",[!0,!1],"VV_SIZE_SCALE_STOPS");q.addDefine("VV_SIZE_FIELD_STOPS","VV_SIZE_FIELD_STOPS",[!0,!1],"VV_SIZE_FIELD_STOPS");q.addDefine("VV_SIZE_UNIT_VALUE","VV_SIZE_UNIT_VALUE",[!0,!1],"VV_SIZE_UNIT_VALUE");q.addDefine("VV_COLOR","VV_COLOR",[!0,!1],"VV_COLOR");q.addDefine("VV_ROTATION","VV_ROTATION",
[!0,!1],"VV_ROTATION");q.addDefine("VV_OPACITY","VV_OPACITY",[!0,!1],"VV_OPACITY");q.addDefine("VERTEX_VISIBILITY","VERTEX_VISIBILITY",[!1,!1],"VERTEX_VISIBILITY");q.addDefine("PATTERN","PATTERN",[!0,!0],"PATTERN");q.addDefine("HEATMAP","HEATMAP",[!0,!0],"HEATMAP");var r=new g("fill",["fillVS","fillFS"],[],f,l);r.addDefine("ID","ID",[!0,!0],"ID");r.addDefine("HIGHLIGHT","HIGHLIGHT",[!0,!0],"HIGHLIGHT");r.addDefine("SDF","SDF",[!1,!1],"SDF");r.addDefine("VV_SIZE_MIN_MAX_VALUE","VV_SIZE_MIN_MAX_VALUE",
[!1,!1],"VV_SIZE_MIN_MAX_VALUE");r.addDefine("VV_SIZE_SCALE_STOPS","VV_SIZE_SCALE_STOPS",[!1,!1],"VV_SIZE_SCALE_STOPS");r.addDefine("VV_SIZE_FIELD_STOPS","VV_SIZE_FIELD_STOPS",[!1,!1],"VV_SIZE_FIELD_STOPS");r.addDefine("VV_SIZE_UNIT_VALUE","VV_SIZE_UNIT_VALUE",[!1,!1],"VV_SIZE_UNIT_VALUE");r.addDefine("VV_COLOR","VV_COLOR",[!0,!1],"VV_COLOR");r.addDefine("VV_ROTATION","VV_ROTATION",[!1,!1],"VV_ROTATION");r.addDefine("VV_OPACITY","VV_OPACITY",[!0,!1],"VV_OPACITY");r.addDefine("VERTEX_VISIBILITY","VERTEX_VISIBILITY",
[!1,!1],"VERTEX_VISIBILITY");r.addDefine("PATTERN","PATTERN",[!0,!0],"PATTERN");r.addDefine("HEATMAP","HEATMAP",[!1,!1],"HEATMAP");l=new g("line",["lineVS","lineFS"],[],m,l);l.addDefine("ID","ID",[!0,!0],"ID");l.addDefine("HIGHLIGHT","HIGHLIGHT",[!0,!0],"HIGHLIGHT");l.addDefine("SDF","SDF",[!0,!0],"SDF");l.addDefine("VV_SIZE_MIN_MAX_VALUE","VV_SIZE_MIN_MAX_VALUE",[!0,!1],"VV_SIZE_MIN_MAX_VALUE");l.addDefine("VV_SIZE_SCALE_STOPS","VV_SIZE_SCALE_STOPS",[!0,!1],"VV_SIZE_SCALE_STOPS");l.addDefine("VV_SIZE_FIELD_STOPS",
"VV_SIZE_FIELD_STOPS",[!0,!1],"VV_SIZE_FIELD_STOPS");l.addDefine("VV_SIZE_UNIT_VALUE","VV_SIZE_UNIT_VALUE",[!0,!1],"VV_SIZE_UNIT_VALUE");l.addDefine("VV_COLOR","VV_COLOR",[!0,!1],"VV_COLOR");l.addDefine("VV_ROTATION","VV_ROTATION",[!0,!1],"VV_ROTATION");l.addDefine("VV_OPACITY","VV_OPACITY",[!0,!1],"VV_OPACITY");l.addDefine("VERTEX_VISIBILITY","VERTEX_VISIBILITY",[!1,!1],"VERTEX_VISIBILITY");l.addDefine("PATTERN","PATTERN",[!0,!0],"PATTERN");l.addDefine("HEATMAP","HEATMAP",[!1,!1],"HEATMAP");this._textShaderVariations=
p;this._fillShaderVariations=r;this._iconShaderVariations=q;this._lineShaderVariations=l;this.isInitialize=!0}};r.prototype.getProgram=function(a,d,f){a|=d===p.WGLDrawPhase.HITTEST?4:0;a|=d===p.WGLDrawPhase.HIGHLIGHT?8:0;if(this._programRep[a])return this._programRep[a];if(!this._iconShaderVariations||!this._fillShaderVariations||!this._lineShaderVariations)return null;d=l.getMaterialVariations(a);var g;switch(d.geometryType){case p.WGLGeometryType.MARKER:g=this._iconShaderVariations.getProgram(d.variations,
null,null,f);break;case p.WGLGeometryType.TEXT:g=this._textShaderVariations.getProgram(d.variations,null,null,f);break;case p.WGLGeometryType.FILL:g=this._fillShaderVariations.getProgram(d.variations,null,null,f);break;case p.WGLGeometryType.LINE:g=this._lineShaderVariations.getProgram(d.variations,null,null,f)}g&&(this._programRep[a]=g);return g};return r}()})},"esri/views/webgl/ShaderVariations":function(){define(["require","exports","./Program","./Util","./ShaderSourceVariator"],function(A,t,g,
a,d){function f(a){return a.reduce(function(a,d,f){d&&(a|=1<<f);return a},0)}return function(){function m(a,d,f,g,m,x){"string"===typeof a?this._initParams(a,d,f,g,m,x):this._initObject({programNamePrefix:a.programNamePrefix,shaderSnippetPrefixes:a.shaderSnippetPrefixes,baseDefines:a.baseDefines,snippets:a.snippets,rctx:a.rctx,vertexAttribLocs:a.vertexAttribLocs})}m.prototype._initObject=function(a){this._initParams(a.programNamePrefix,a.shaderSnippetPrefixes,a.baseDefines,a.snippets,a.rctx,a.vertexAttribLocs)};
m.prototype._initParams=function(a,f,g,m,v,x){this._defaultSnippets=m;this._defaultRctx=v;this._defaultVertexAttribLocs=x;this._programCache=new Map;this._variationInfo=new Map;this._shaderSourceVariator=new d(a,f,g)};m.prototype.addDefine=function(a,d,f,g){this._shaderSourceVariator.addDefine(a,d,f,g)};m.prototype.addBinaryShaderSnippetSuffix=function(a,d,f){this._shaderSourceVariator.addBinaryShaderSnippetSuffix(a,d,f)};m.prototype.addNaryShaderSnippetSuffix=function(a,d){this._shaderSourceVariator.addNaryShaderSnippetSuffix(a,
d)};m.prototype.getProgram=function(d,m,r,q){m=m||this._defaultSnippets;r=r||this._defaultRctx;q=q||this._defaultVertexAttribLocs;if(!m)throw Error("No ShaderSnippets provided to getProgram nor to ShaderVariations constructor.");if(!r)throw Error("No RenderingContext provided to getProgram nor to ShaderVariations constructor.");if(!q)throw Error("No VertexAttributeLocations provided to getProgram nor to ShaderVariations constructor.");var l=f(d);if(this._programCache[l])return this._programCache[l];
d=this._shaderSourceVariator.getShaderVariation(d);var p,w;p=d.shaderSnippetNames[0];w=m[p];a.assert(null!=w,"shader snippet '"+p+"' does not exist");p=d.shaderSnippetNames[1];m=m[p];a.assert(null!=m,"shader snippet '"+p+"' does not exist");r=new g(r,w,m,q,d.defines);return this._programCache[l]=r};m.prototype.getProgramByKey=function(d){if(this._programCache[d])return this._programCache[d];if(!this._variationInfo[d])return null;var f=this._variationInfo[d],l=this._defaultSnippets,m=this._defaultRctx,
v=this._defaultVertexAttribLocs,x,w;x=f.shaderSnippetNames[0];w=l[x];a.assert(null!=w,"shader snippet '"+x+"' does not exist");x=f.shaderSnippetNames[1];l=l[x];a.assert(null!=l,"shader snippet '"+x+"' does not exist");f=new g(m,w,l,v,f.defines);return this._programCache[d]=f};m.prototype.getProgramInfo=function(a){var d=this._shaderSourceVariator.getShaderVariation(a);a=f(a);this._variationInfo[a]||(this._variationInfo[a]=d);return{name:d.programName,key:a}};return m}()})},"esri/views/webgl/Util":function(){define(["require",
"exports","../../core/tsSupport/assignHelper","../../core/Error"],function(A,t,g,a){return function(){function d(){}d.vertexCount=function(a,g){return a.vertexBuffers[g].size/d.getStride(a.layout[g])};d.getStride=function(a){return a[0].stride};d.getBytesPerElement=function(a){switch(a){case 5126:return 4;case 5124:return 4;case 5125:return 4;case 5122:return 2;case 5123:return 2;case 5120:return 1;case 5121:return 1;default:throw Error("Unknown data type");}};d.addDescriptor=function(a,g,l,p,r,q){var f=
d.getBytesPerElement(p);if(0<a.length){var m=a[0].stride,w=m+f*l;a.forEach(function(a){return a.stride=w});a.push({name:g,count:l,type:p,offset:m,stride:w,normalized:r,divisor:q})}else a.push({name:g,count:l,type:p,offset:0,stride:f*l,normalized:r,divisor:q})};d.assertCompatibleVertexAttributeLocations=function(a,d){(a=a.locations===d.locations)||console.error("VertexAttributeLocations are incompatible");return a};d.hasAttribute=function(a,d){for(var f=0;f<a.length;f++)if(a[f].name===d)return!0;return!1};
d.findAttribute=function(a,d){for(var f=0;f<a.length;f++)if(a[f].name===d)return a[f];return null};d.copyFramebufferToTexture=function(a,d,g,p,r){void 0===r&&(r=0);var f=a.getBoundFramebufferObject(),l=a.getBoundTexture(0);a.bindFramebuffer(d);a.bindTexture(g,0);a.gl.copyTexImage2D(a.gl.TEXTURE_2D,r,g.descriptor.pixelFormat,p[0],p[1],p[2],p[3],0);a.gl.flush();a.bindFramebuffer(f);a.bindTexture(l,0)};d.assert=function(d,g){if(!d)throw new a(g);};d.setBaseInstanceOffset=function(a,d){var f={},m;for(m in a)f[m]=
a[m].map(function(a){return a.divisor?g({},a,{baseInstance:d}):a});return f};return d}()})},"esri/views/webgl/ShaderSourceVariator":function(){define(["require","exports","dojo/_base/lang","./Util"],function(A,t,g,a){return function(){function d(d,g,l){var f;"string"===typeof d?f=d:(f=d.programNamePrefix,g=d.shaderSnippetPrefixes,l=d.baseDefines);a.assert(g,"you must specify shader snippet prefixes");a.assert(2===g.length,"you must specify shader snippet prefixes for vertex and fragment shaders");
l&&0!==l.length||(l=[]);this.programNamePrefix=f;this.shaderSnippetPrefixes=g;this.baseDefines=l;this.variables=[];this.sealed=!1}d.prototype.addDefine=function(d,g,l,p){a.assert(!this.sealed,"you cannot add another variable after the first program has been generated");a.assert(d,"you must specify a program name suffix");this.variables.push({programNameSuffixes:["",d],shaderNameSuffixes:p||d,defineStr:g,affectsShaderTypes:l||[!0,!0]})};d.prototype.addBinaryShaderSnippetSuffix=function(d,g,l){a.assert(!this.sealed,
"you cannot add another variable after the first program has been generated");a.assert(d,"you must specify a program name suffix");this.variables.push({programNameSuffixes:["",d],shaderSnippetSuffixes:["",g],affectsShaderTypes:l||[!0,!0]})};d.prototype.addNaryShaderSnippetSuffix=function(d,g){a.assert(!this.sealed,"you cannot add another variable after the first program has been generated");var f=d.map(function(d){a.assert(null!=d.value,"value must always be specified");return d.value});this.variables.push({values:f,
programNameSuffixes:d.map(function(a,d){return null!=a.programNameSuffix?a.programNameSuffix:f[d]}),shaderSnippetSuffixes:d.map(function(a,d){return null!=a.shaderSnippetSuffix?a.shaderSnippetSuffix:f[d]}),affectsShaderTypes:g||[!0,!0]})};d.prototype.getShaderVariation=function(d){a.assert(d.length===this.variables.length,"you must specify a value for each variable");for(var f=this.programNamePrefix,l=g.clone(this.shaderSnippetPrefixes),p=g.clone(this.shaderSnippetPrefixes),r=g.clone(this.baseDefines),
q=0;q<this.variables.length;q++){var v=this.variables[q],x=d[q],w=void 0;v.values?(w=v.values.indexOf(x),a.assert(0<=w,"invalid value "+x+" for variable "+q)):w=x?1:0;f+=v.programNameSuffixes[w];for(x=0;2>x;x++)v.affectsShaderTypes[x]&&(v.shaderSnippetSuffixes&&(l[x]+=v.shaderSnippetSuffixes[w],p[x]+=v.shaderSnippetSuffixes[w]),v.defineStr&&w&&(r.push(v.defineStr),p[x]+=v.shaderNameSuffixes))}return{programName:f,shaderSnippetNames:l,shaderNames:p,defines:r}};return d}()})},"esri/views/2d/engine/webgl/shaders/textShaderSnippets":function(){define(["require",
"exports","../../../../webgl/ShaderSnippets","dojo/text!./textShaders.xml"],function(A,t,g,a){A=new g;g.parse(a,A);return A})},"esri/views/2d/engine/webgl/shaders/iconShaderSnippets":function(){define(["require","exports","../../../../webgl/ShaderSnippets","dojo/text!./iconShaders.xml"],function(A,t,g,a){A=new g;g.parse(a,A);return A})},"esri/views/2d/engine/webgl/shaders/fillShaderSnippets":function(){define(["require","exports","../../../../webgl/ShaderSnippets","dojo/text!./fillShaders.xml"],function(A,
t,g,a){A=new g;g.parse(a,A);return A})},"esri/views/2d/engine/webgl/shaders/lineShaderSnippets":function(){define(["require","exports","../../../../webgl/ShaderSnippets","dojo/text!./lineShaders.xml"],function(A,t,g,a){A=new g;g.parse(a,A);return A})},"esri/views/2d/engine/webgl/MaterialInfoUtils":function(){define(["require","exports","./MaterialKeyInfo","./enums","./MaterialInfo"],function(A,t,g,a,d){function f(a){var d=[];d[0]=a.sdf?!0:!1;d[1]=a.vvSizeMinMaxValue?!0:!1;d[2]=a.vvSizeScaleStops?
!0:!1;d[3]=a.vvSizeFieldStops?!0:!1;d[4]=a.vvSizeUnitValue?!0:!1;d[5]=a.vvColor?!0:!1;d[6]=a.vvRotation?!0:!1;d[7]=a.vvOpacity?!0:!1;d[8]=a.visibility?!0:!1;d[9]=a.pattern?!0:!1;d[10]=a.heatmap?!0:!1;return d.reduce(function(a,d,f){d&&(a|=1<<f+2);return a},0)}function m(d){if(d.geometryType===a.WGLGeometryType.UNKNOWN)return-1;var g=f(d)<<2;return d.geometryType+g}Object.defineProperty(t,"__esModule",{value:!0});t.createTextMaterialInfo=function(f,p){var l=d.pool.acquire(),q=g.pool.acquire();q.geometryType=
a.WGLGeometryType.TEXT;q.sdf=!0;q.pattern=!1;q.visibility=!0;q.heatmap=!1;l.texBindingInfo.push({unit:2,pageId:f.page,semantic:"u_texture"});0===p?q.vvOpacity=q.vvSizeMinMaxValue=q.vvSizeScaleStops=q.vvSizeFieldStops=q.vvSizeUnitValue=q.vvColor=q.vvRotation=!1:(q.vvOpacity=0!==(p&a.WGLVVFlag.OPACITY),q.vvSizeMinMaxValue=0!==(p&a.WGLVVFlag.SIZE_MINMAX_VALUE),q.vvSizeScaleStops=0!==(p&a.WGLVVFlag.SIZE_SCALE_STOPS),q.vvSizeFieldStops=0!==(p&a.WGLVVFlag.SIZE_FIELD_STOPS),q.vvSizeUnitValue=0!==(p&a.WGLVVFlag.SIZE_UNIT_VALUE),
q.vvColor=0!==(p&a.WGLVVFlag.COLOR),q.vvRotation=0!==(p&a.WGLVVFlag.ROTATION));l.materialKey=m(q);l.materialKeyInfo=q;return l};t.createMaterialInfo=function(f,p,r,q){var l=d.pool.acquire(),x=g.pool.acquire();x.geometryType=r;(p=p.spriteMosaicItem)?(x.sdf=p.sdf,x.pattern=!0,l.texBindingInfo.push({unit:1,pageId:p.page,semantic:"u_texture"})):(x.sdf=!1,x.pattern=!1);0===q?x.vvOpacity=x.vvSizeMinMaxValue=x.vvSizeScaleStops=x.vvSizeFieldStops=x.vvSizeUnitValue=x.vvColor=x.vvRotation=!1:(x.vvOpacity=0!==
(q&a.WGLVVFlag.OPACITY),x.vvSizeMinMaxValue=0!==(q&a.WGLVVFlag.SIZE_MINMAX_VALUE),x.vvSizeScaleStops=0!==(q&a.WGLVVFlag.SIZE_SCALE_STOPS),x.vvSizeFieldStops=0!==(q&a.WGLVVFlag.SIZE_FIELD_STOPS),x.vvSizeUnitValue=0!==(q&a.WGLVVFlag.SIZE_UNIT_VALUE),x.vvColor=0!==(q&a.WGLVVFlag.COLOR),x.vvRotation=0!==(q&a.WGLVVFlag.ROTATION));x.visibility=!1;x.heatmap=null!=f.heatmapInfo;l.materialKey=m(x);l.materialKeyInfo=x;return l};t.getMaterialKey=m;t.updateMaterialVariations=function(a,d){a.geometryType=d&3;
d>>=2;a.sdf=0!==(d&4);a.vvSizeMinMaxValue=0!==(d&8);a.vvSizeScaleStops=0!==(d&16);a.vvSizeFieldStops=0!==(d&32);a.vvSizeUnitValue=0!==(d&64);a.vvColor=0!==(d&128);a.vvRotation=0!==(d&256);a.vvOpacity=0!==(d&512);a.visibility=0!==(d&1024);a.pattern=0!==(d&2048);a.heatmap=0!==(d&4096);return a};t.getMaterialVariations=function(a){var d=a&3;a>>=2;return{geometryType:d,variations:[0!==(a&1),0!==(a&2),0!==(a&4),0!==(a&8),0!==(a&16),0!==(a&32),0!==(a&64),0!==(a&128),0!==(a&256),0!==(a&512),0!==(a&1024),
0!==(a&2048),0!==(a&4096)]}}})},"esri/views/2d/engine/webgl/MaterialKeyInfo":function(){define(["require","exports","../../../../core/ObjectPool","./enums"],function(A,t,g,a){return function(){function d(){this.heatmap=this.pattern=this.visibility=this.vvOpacity=this.vvRotation=this.vvColor=this.vvSizeUnitValue=this.vvSizeFieldStops=this.vvSizeScaleStops=this.vvSizeMinMaxValue=this.sdf=!1}d.prototype.copy=function(a){this.geometryType=a.geometryType;this.sdf=a.sdf;this.vvSizeMinMaxValue=a.vvSizeMinMaxValue;
this.vvSizeScaleStops=a.vvSizeScaleStops;this.vvSizeFieldStops=a.vvSizeFieldStops;this.vvSizeUnitValue=a.vvSizeUnitValue;this.vvColor=a.vvColor;this.vvRotation=a.vvRotation;this.vvOpacity=a.vvOpacity;this.visibility=a.visibility;this.pattern=a.pattern;this.heatmap=a.heatmap};d.prototype.release=function(){this.geometryType=a.WGLGeometryType.UNKNOWN;this.heatmap=this.pattern=this.visibility=this.vvOpacity=this.vvRotation=this.vvColor=this.vvSizeUnitValue=this.vvSizeFieldStops=this.vvSizeScaleStops=
this.vvSizeMinMaxValue=this.sdf=!1};d.pool=new g(d);return d}()})},"esri/views/2d/engine/webgl/MaterialInfo":function(){define("require exports ../../../../core/ObjectPool ./MaterialKeyInfo ./MaterialInfoUtils ./Utils".split(" "),function(A,t,g,a,d,f){return function(){function m(){this.texBindingInfo=[];this.materialParams=[]}m.prototype.release=function(){this.materialKey=null;this.texBindingInfo.length=0;this.materialParams.length=0;this.materialKeyInfo&&a.pool.release(this.materialKeyInfo)};m.prototype.copy=
function(d){var f=this;d.materialParams.forEach(function(a,d){f.materialParams[d]={name:a.name,value:a.value}});d.texBindingInfo.forEach(function(a,d){f.texBindingInfo[d]={unit:a.unit,pageId:a.pageId,semantic:a.semantic}});this.materialKeyInfo&&(a.pool.release(this.materialKeyInfo),this.materialKeyInfo=null);d.materialKeyInfo&&(this.materialKeyInfo=a.pool.acquire(),this.materialKeyInfo.copy(d.materialKeyInfo));this.materialKey=d.materialKey};m.serialize=function(a,d,g){var l=0,l=l+f.serializeInteger(a.materialKey,
d,g+l),l=l+m._serializeTexBindingInfo(a.texBindingInfo,d,g+l);return l+=m._serializeMaterialParams(a.materialParams,d,g+l)};m.deserialize=function(g,p,r){var l=0;g.materialInfo=m.pool.acquire();var v={n:0},l=l+f.deserializeInteger(v,p,r+l);g.materialInfo.materialKey=v.n;l+=m._deserializeTexBindingInfo(g.materialInfo.texBindingInfo,p,r+l);l+=m._deserializeMaterialParams(g.materialInfo.materialParams,p,r+l);g.materialInfo.materialKeyInfo=a.pool.acquire();d.updateMaterialVariations(g.materialInfo.materialKeyInfo,
g.materialInfo.materialKey);return l};m._serializeTexBindingInfo=function(a,d,g){for(var l=0,m=a.length,l=l+f.serializeInteger(m,d,g+l),p=0;p<m;++p)d&&(d[g+l]=a[p].unit),++l,l+=f.serializeInteger(a[p].pageId,d,g+l),l+=f.serializeString(a[p].semantic,d,g+l);return l};m._serializeMaterialParams=function(a,d,g){for(var l=0,m=a.length,l=l+f.serializeInteger(m,d,g+l),p=0;p<m;++p)l+=f.serializeString(a[p].name,d,g+l),l+=f.serializeUniform(a[p].value,d,g+l);return l};m._deserializeTexBindingInfo=function(a,
d,g){var l=0,m={n:void 0},l=l+f.deserializeInteger(m,d,g+l);a.length=m.n;for(var p={n:void 0},r={s:void 0},t=0;t<m.n;++t)a[t]={unit:void 0,pageId:void 0,semantic:void 0},a[t].unit=d[g+l],++l,l+=f.deserializeInteger(p,d,g+l),a[t].pageId=p.n,l+=f.deserializeString(r,d,g+l),a[t].semantic=r.s;return l};m._deserializeMaterialParams=function(a,d,g){var l=0,m={n:void 0},l=l+f.deserializeInteger(m,d,g+l);a.length=m.n;for(var p={s:void 0},r={n:void 0},t=0;t<m.n;++t)a[t]={name:void 0,value:void 0},l+=f.deserializeString(p,
d,g+l),a[t].name=p.s,l+=f.deserializeUniform(r,d,g+l),a[t].value=r.n;return l};m.pool=new g(m);return m}()})},"esri/views/2d/engine/webgl/Utils":function(){define(["require","exports","./enums"],function(A,t,g){function a(a){for(var d={},f=0;f<a.length;f++){var g=a[f];d[g.name]=g.strideInBytes}return d}function d(a){switch(a){case "esriSMS":return"simple-marker";case "esriPMS":return"picture-marker";case "esriSLS":return"simple-line";case "esriPLS":return"picture-line";case "esriSFS":return"simple-fill";
case "esriPFS":return"picture-fill";case "esriTS":return"text"}return a}function f(a){if(a=d(a.type)){switch(a){case "simple-marker":case "picture-marker":return!0;case "CIMPointSymbol":return!0}return!1}}function m(a){if(a=d(a.type)){switch(a){case "simple-fill":case "picture-fill":return!0;case "CIMPolygonSymbol":return!0}return!1}}function l(a){if(a=d(a.type)){switch(a){case "simple-line":case "picture-line":return!0;case "CIMLineSymbol":return!0}return!1}}function p(a){if(a=d(a.type)){switch(a){case "text":return!0;
case "CIMTextSymbol":return!0}return!1}}function r(a){return a&&a.length||0}function q(a,d,f){var g=0;do{var l=a%128;a-=l;a/=128;0<a&&(l+=128);d&&(d[f+g]=l);++g}while(0<a);return g}function v(a,d,f){for(var g=0,l=0,m=!0,p=1;m;){var q=d[f+g];++g;128<=q?(q-=128,m=!0):m=!1;l+=q*p;p*=128}a.n=l;return g}function x(a,d,f){void 0===d&&(d=0);void 0===f&&(f=!1);var g=a[d+3];a[d+0]*=g;a[d+1]*=g;a[d+2]*=g;f||(a[d+3]*=255);return a}function w(a){return"string"===typeof a}Object.defineProperty(t,"__esModule",
{value:!0});t.C_HITTEST_SEARCH_SIZE=4;t.C_TILE_SIZE=512;t.C_VBO_GEOMETRY="geometry";t.C_VBO_PERINSTANCE="per_instance";t.C_VBO_PERINSTANCE_VV="per_instance_vv";t.C_VBO_VISIBILITY="visibility";t.C_ICON_VERTEX_DEF=[{name:t.C_VBO_GEOMETRY,strideInBytes:24,divisor:0}];t.C_ICON_VERTEX_DEF_VV=[{name:t.C_VBO_GEOMETRY,strideInBytes:40,divisor:0}];t.C_ICON_HEATMAP=[{name:t.C_VBO_GEOMETRY,strideInBytes:28,divisor:0}];t.C_FILL_VERTEX_DEF=[{name:t.C_VBO_GEOMETRY,strideInBytes:24,divisor:0}];t.C_FILL_VERTEX_DEF_VV=
[{name:t.C_VBO_GEOMETRY,strideInBytes:32,divisor:0}];t.C_LINE_VERTEX_DEF=[{name:t.C_VBO_GEOMETRY,strideInBytes:32,divisor:0}];t.C_LINE_VERTEX_DEF_VV=[{name:t.C_VBO_GEOMETRY,strideInBytes:44,divisor:0}];t.C_TEXT_VERTEX_DEF=[{name:t.C_VBO_GEOMETRY,strideInBytes:20,divisor:0},{name:t.C_VBO_VISIBILITY,strideInBytes:1,divisor:0}];t.C_TEXT_VERTEX_DEF_VV=[{name:t.C_VBO_GEOMETRY,strideInBytes:40,divisor:0},{name:t.C_VBO_VISIBILITY,strideInBytes:1,divisor:0}];t.C_ICON_STRIDE_SPEC=a(t.C_ICON_VERTEX_DEF);t.C_ICON_STRIDE_SPEC_VV=
a(t.C_ICON_VERTEX_DEF_VV);t.C_ICON_STRIDE_SPEC_HEATMAP=a(t.C_ICON_HEATMAP);t.C_FILL_STRIDE_SPEC=a(t.C_FILL_VERTEX_DEF);t.C_FILL_STRIDE_SPEC_VV=a(t.C_FILL_VERTEX_DEF_VV);t.C_LINE_STRIDE_SPEC=a(t.C_LINE_VERTEX_DEF);t.C_LINE_STRIDE_SPEC_VV=a(t.C_LINE_VERTEX_DEF_VV);t.C_TEXT_STRIDE_SPEC=a(t.C_TEXT_VERTEX_DEF);t.C_TEXT_STRIDE_SPEC_VV=a(t.C_TEXT_VERTEX_DEF_VV);t.getStrides=function(a,d,f){void 0===f&&(f=!1);switch(a){case g.WGLGeometryType.MARKER:return d?t.C_ICON_STRIDE_SPEC_VV:f?t.C_ICON_STRIDE_SPEC_HEATMAP:
t.C_ICON_STRIDE_SPEC;case g.WGLGeometryType.FILL:return d?t.C_FILL_STRIDE_SPEC_VV:t.C_FILL_STRIDE_SPEC;case g.WGLGeometryType.LINE:return d?t.C_LINE_STRIDE_SPEC_VV:t.C_LINE_STRIDE_SPEC;case g.WGLGeometryType.TEXT:return d?t.C_TEXT_STRIDE_SPEC_VV:t.C_TEXT_STRIDE_SPEC}return null};t.getSymbolGeometryType=function(a){return f(a)?g.WGLGeometryType.MARKER:l(a)?g.WGLGeometryType.LINE:m(a)?g.WGLGeometryType.FILL:p(a)?g.WGLGeometryType.TEXT:g.WGLGeometryType.UNKNOWN};t.normalizeSymbolType=d;t.isMarkerSymbol=
f;t.isFillSymbol=m;t.isLineSymbol=l;t.isPictureSymbol=function(a){if(a=d(a.type))switch(a){case "picture-marker":case "picture-line":case "picture-fill":return!0}return!1};t.isTextSymbol=p;t.isSameUniformValue=function(a,d){return!1};t.isSameMaterialInfo=function(a,d){if(a.materialKey!==d.materialKey||r(a.texBindingInfo)!==r(d.texBindingInfo)||r(a.materialParams)!==r(d.materialParams))return!1;for(var f=a.texBindingInfo.length,g=0;g<f;++g){var l=a.texBindingInfo[g],m=d.texBindingInfo[g];if(l.unit!==
m.unit||l.pageId!==m.pageId||l.semantic!==m.semantic)return!1}a=a.materialParams.length;for(g=0;g<a;)return!1;return!0};t.i1616to32=function(a,d){return 65535&a|d<<16};t.i8888to32=function(a,d,f,g){return a&255|(d&255)<<8|(f&255)<<16|g<<24};t.i8816to32=function(a,d,f){return a&255|(d&255)<<8|f<<16};t.numTo32=function(a){return a|0};t.serializeInteger=q;t.deserializeInteger=v;t.serializeString=function(a,d,f){for(var g=0,l=a.length,m=0;m<l;++m)d&&(d[f+g]=a.charCodeAt(m)),++g;d&&(d[f+g]=0);++g;return g};
t.deserializeString=function(a,d,f){var g=0;a.s="";for(var l=!0;l;){var m=d[f+g];++g;0!==m?a.s+=String.fromCharCode(m):l=!1}return g};t.serializeUniform=function(a,d,f){return q(a,d,f)};t.deserializeUniform=function(a,d,f){return v(a,d,f)};t.premultiplyAlpha=x;t.copyAndPremultiply=function(a){a=Array.isArray(a)?[a[0],a[1],a[2],a[3]]:[a.r,a.g,a.b,a.a];x(a);return a};t.nextHighestPowerOfTwo=function(a){a--;a|=a>>1;a|=a>>2;a|=a>>4;a|=a>>8;a|=a>>16;a++;return a};t.isDefined=function(a){return null!==
a&&void 0!==a};t.isNumber=function(a){return"number"===typeof a};t.isString=w;t.isStringOrNull=function(a){return null==a||w(a)};t.lerp=function(a,d,f){return a+(d-a)*f};t.multimapAdd=function(a,d,f){var g;a.has(d)?g=a.get(d):(g=new Set,a.set(d,g));g.add(f)};t.multimapRemove=function(a,d,f){if(a.has(d)){var g=a.get(d);g.delete(f);0===g.size&&a.delete(d)}}})},"esri/views/2d/engine/webgl/painter/WGLTextPainter":function(){define(["require","exports","../../../../webgl/VertexArrayObject","../Utils"],
function(A,t,g,a){return function(){function d(){this._attributeLocations={a_pos:0,a_id:1,a_color:2,a_vertexOffset:3,a_texFontSize:4,a_visible:5};this._attributeLocationsVV={a_pos:0,a_id:1,a_color:2,a_vertexOffset:3,a_texFontSize:4,a_visible:5,a_vv:6};this._vertexAttributeLayout={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:20,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,offset:4,stride:20,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,offset:8,stride:20,normalized:!0,
divisor:0},{name:"a_vertexOffset",count:2,type:5122,offset:12,stride:20,normalized:!1,divisor:0},{name:"a_texFontSize",count:4,type:5120,offset:16,stride:20,normalized:!1,divisor:0}],visibility:[{name:"a_visible",count:1,type:5120,offset:0,stride:1,normalized:!1,divisor:0}]};this._vertexAttributeLayoutVV={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:36,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,offset:4,stride:36,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,
offset:8,stride:36,normalized:!0,divisor:0},{name:"a_vertexOffset",count:2,type:5122,offset:12,stride:36,normalized:!1,divisor:0},{name:"a_texFontSize",count:4,type:5120,offset:16,stride:36,normalized:!1,divisor:0},{name:"a_vv",count:4,type:5126,offset:20,stride:36,normalized:!1,divisor:0}],visibility:[{name:"a_visible",count:1,type:5120,offset:0,stride:1,normalized:!1,divisor:0}]};this._glyphsTextureSize=new Float32Array(2)}d.prototype.draw=function(a,d,g,p,r,q,v,x,w,t,E){if(g.canDisplay){var f=
d.materialKeyInfo,l=f.vvSizeMinMaxValue||f.vvSizeScaleStops||f.vvSizeFieldStops||f.vvSizeUnitValue||f.vvColor||f.vvRotation||f.vvOpacity;if(r=x.getProgram(d.materialKey,r,l?this._attributeLocationsVV:this._attributeLocations))a.bindProgram(r),l=this._getVAO(a,g,l),a.bindVAO(l),d=d.texBindingInfo[0],w.bindGlyphsPage(a,d.pageId,d.unit),r.setUniform1i(d.semantic,d.unit),w=w.glyphs,this._glyphsTextureSize[0]=w.width/4,this._glyphsTextureSize[1]=w.height/4,t=p.vvMaterialParameters.vvRotationEnabled&&"geographic"===
p.vvMaterialParameters.vvRotationType?t:E,r.setUniformMatrix4fv("u_transformMatrix",g.tileTransform.transform),r.setUniformMatrix4fv("u_extrudeMatrix",t),r.setUniform2fv("u_normalized_origin",g.tileTransform.displayCoord),r.setUniform2fv("u_mosaicSize",this._glyphsTextureSize),r.setUniform1f("u_pixelRatio",1),r.setUniform1f("u_opacity",1),f.vvSizeMinMaxValue&&r.setUniform4fv("u_vvSizeInfo",p.vvSizeMinMaxValue),f.vvColor&&(r.setUniform1fv("u_vvColorValues",p.vvColorValues),r.setUniform4fv("u_vvColors",
p.vvColors)),f.vvOpacity&&(r.setUniform1fv("u_vvOpacityValues",p.vvOpacityValues),r.setUniform1fv("u_vvOpacities",p.vvOpacities)),a.drawElements(4,v,5125,4*q),a.bindVAO(null)}};d.prototype._getVAO=function(d,m,l){if(m.textGeometry.vao)return m.textGeometry.vao;var f=m.textGeometry.vertexBufferMap[a.C_VBO_GEOMETRY],r=m.textGeometry.vertexBufferMap[a.C_VBO_VISIBILITY],q=m.textGeometry.indexBuffer;if(!f||!q)return null;m.textGeometry.vao=l?new g(d,this._attributeLocationsVV,this._vertexAttributeLayoutVV,
{geometry:f,visibility:r},q):new g(d,this._attributeLocations,this._vertexAttributeLayout,{geometry:f,visibility:r},q);return m.textGeometry.vao};return d}()})},"esri/views/2d/engine/webgl/painter/WGLIconPainter":function(){define(["require","exports","../../../../webgl/VertexArrayObject","../../../../webgl/Texture","../Utils"],function(A,t,g,a,d){return function(){function f(){this._iconAttributeLocations={a_pos:0,a_vertexOffsetAndTex:1,a_id:2,a_color:3,a_outlineColor:4,a_sizeAndOutlineWidth:5};
this._iconAttributeLocationsVV={a_pos:0,a_vertexOffsetAndTex:1,a_id:2,a_color:3,a_outlineColor:4,a_sizeAndOutlineWidth:5,a_vv:6};this._iconAttributeLocationsHeatmap={a_pos:0,a_vertexOffsetAndTex:1,a_id:2,a_color:3,a_outlineColor:4,a_sizeAndOutlineWidth:5,a_weight:6};this._iconVertexAttributes={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:24,normalized:!1,divisor:0},{name:"a_vertexOffsetAndTex",count:4,type:5120,offset:4,stride:24,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,
offset:8,stride:24,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,offset:12,stride:24,normalized:!0,divisor:0},{name:"a_outlineColor",count:4,type:5121,offset:16,stride:24,normalized:!0,divisor:0},{name:"a_sizeAndOutlineWidth",count:4,type:5121,offset:20,stride:24,normalized:!1,divisor:0}]};this._iconVertexAttributesWithVV={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:40,normalized:!1,divisor:0},{name:"a_vertexOffsetAndTex",count:4,type:5120,offset:4,stride:40,normalized:!1,
divisor:0},{name:"a_id",count:4,type:5121,offset:8,stride:40,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,offset:12,stride:40,normalized:!0,divisor:0},{name:"a_outlineColor",count:4,type:5121,offset:16,stride:40,normalized:!0,divisor:0},{name:"a_sizeAndOutlineWidth",count:4,type:5121,offset:20,stride:40,normalized:!1,divisor:0},{name:"a_vv",count:4,type:5126,offset:24,stride:40,normalized:!1,divisor:0}]};this._iconVertexAttributesWithHeatmap={geometry:[{name:"a_pos",count:2,type:5122,
offset:0,stride:28,normalized:!1,divisor:0},{name:"a_vertexOffsetAndTex",count:4,type:5120,offset:4,stride:28,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,offset:8,stride:28,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,offset:12,stride:28,normalized:!0,divisor:0},{name:"a_outlineColor",count:4,type:5121,offset:16,stride:28,normalized:!0,divisor:0},{name:"a_sizeAndOutlineWidth",count:4,type:5121,offset:20,stride:28,normalized:!1,divisor:0},{name:"a_weight",count:1,type:5126,
offset:24,stride:28,normalized:!1,divisor:0}]};this._spritesTextureSize=new Float32Array(2)}f.prototype.draw=function(d,f,g,r,q,v,x,w,t,E,D){if(g.canDisplay){var l=f.materialKeyInfo,m=l.heatmap,p=l.vvSizeMinMaxValue||l.vvSizeScaleStops||l.vvSizeFieldStops||l.vvSizeUnitValue||l.vvColor||l.vvRotation||l.vvOpacity;if(q=w.getProgram(f.materialKey,q,p?this._iconAttributeLocationsVV:this._iconAttributeLocations)){d.bindProgram(q);p=this._getVAO(d,g,p,m);d.bindVAO(p);if(m){t=r.heatmapParameters;if(t.intensityKernel&&
!t.refreshIntensityKernel)t=t.intensityKernel;else{t.intensityKernel&&(t.intensityKernel.dispose(),t.intensityKernel=null);w=t.radius;f=t.kernelSize;for(var z=t.blurRadius,B=w*w,m=[],p=-1;++p<f;)m[p]=Math.exp(-Math.pow(p-z,2)/(2*B))/(w/2*Math.sqrt(2*Math.PI));w=[];for(var A,L=0;L<f;L++)for(B=m[L],p=0;p<f;p++)A=L*f+p,z=m[p],w[4*A+0]=B*z,w[4*A+1]=0,w[4*A+2]=0,w[4*A+3]=1;f=new a(d,{target:3553,pixelFormat:6408,internalFormat:34836,dataType:5126,samplingMode:d.extensions.textureFloatLinear?9729:9728,
wrapMode:33071,width:f,height:f},new Float32Array(w));t.intensityKernel=f;t.refreshIntensityKernel=!1;t=f}d.bindTexture(t,1);q.setUniform1i("u_texture",1);this._spritesTextureSize[0]=Math.round(r.heatmapParameters.radius);this._spritesTextureSize[1]=Math.round(r.heatmapParameters.radius)}else m=f.texBindingInfo[0],f=m.pageId,t.bindSpritePage(d,f,m.unit),q.setUniform1i(m.semantic,m.unit),t=t.sprites,this._spritesTextureSize[0]=t.getWidth(f)/4,this._spritesTextureSize[1]=t.getHeight(f)/4;E=r.vvMaterialParameters.vvRotationEnabled&&
"geographic"===r.vvMaterialParameters.vvRotationType?E:D;q.setUniformMatrix4fv("u_transformMatrix",g.tileTransform.transform);q.setUniformMatrix4fv("u_extrudeMatrix",E);q.setUniform2fv("u_normalized_origin",g.tileTransform.displayCoord);q.setUniform2fv("u_mosaicSize",this._spritesTextureSize);q.setUniform1f("u_opacity",1);l.vvSizeMinMaxValue&&q.setUniform4fv("u_vvSizeMinMaxValue",r.vvSizeMinMaxValue);l.vvSizeScaleStops&&q.setUniform1f("u_vvSizeScaleStopsValue",r.vvSizeScaleStopsValue);l.vvSizeFieldStops&&
(q.setUniform1fv("u_vvSizeFieldStopsValues",r.vvSizeFieldStopsValues),q.setUniform1fv("u_vvSizeFieldStopsSizes",r.vvSizeFieldStopsSizes));l.vvSizeUnitValue&&q.setUniform1f("u_vvSizeUnitValueWorldToPixelsRatio",r.vvSizeUnitValueToPixelsRatio);l.vvColor&&(q.setUniform1fv("u_vvColorValues",r.vvColorValues),q.setUniform4fv("u_vvColors",r.vvColors));l.vvOpacity&&(q.setUniform1fv("u_vvOpacityValues",r.vvOpacityValues),q.setUniform1fv("u_vvOpacities",r.vvOpacities));d.drawElements(4,x,5125,4*v);d.bindVAO(null)}}};
f.prototype._getVAO=function(a,f,p,r){if(f.iconGeometry.vao)return f.iconGeometry.vao;var l=f.iconGeometry.vertexBufferMap[d.C_VBO_GEOMETRY],m=f.iconGeometry.indexBuffer;if(!l||!m)return null;f.iconGeometry.vao=p?new g(a,this._iconAttributeLocationsVV,this._iconVertexAttributesWithVV,{geometry:l},m):r?new g(a,this._iconAttributeLocationsHeatmap,this._iconVertexAttributesWithHeatmap,{geometry:l},m):new g(a,this._iconAttributeLocations,this._iconVertexAttributes,{geometry:l},m);return f.iconGeometry.vao};
return f}()})},"esri/views/2d/engine/webgl/painter/WGLFillPainter":function(){define(["require","exports","../../../../webgl/VertexArrayObject","../Utils"],function(A,t,g,a){return function(){function d(){this._isInitialized=!1;this._fillAttributeLocations={a_pos:0,a_id:1,a_color:2,a_tlbr:3,a_aux:4};this._fillAttributeLocationsVV={a_pos:0,a_id:1,a_color:2,a_tlbr:3,a_aux:4,a_vv:5};this._spritesTextureSize=new Float32Array(2)}d.prototype.draw=function(d,g,l,p,r,q,v,x,t,B,E,D){if(l.canDisplay){this._initialize();
var f=g.materialKeyInfo,m=f.vvColor||f.vvOpacity;if(r=E.getProgram(g.materialKey,r,m?this._fillAttributeLocationsVV:this._fillAttributeLocations))d.bindProgram(r),m=this._getVAO(d,l,m),d.bindVAO(m),0<g.texBindingInfo.length&&(g=g.texBindingInfo[0],m=g.pageId,E=D.sprites,this._spritesTextureSize[0]=E.getWidth(m),this._spritesTextureSize[1]=E.getHeight(m),r.setUniform1f("u_zoomFactor",l.coordRange/a.C_TILE_SIZE/Math.pow(2,q-l.key.level)/v),D.bindSpritePage(d,m,g.unit,x?9728:9729),r.setUniform1i(g.semantic,
g.unit),r.setUniform2fv("u_mosaicSize",this._spritesTextureSize)),r.setUniformMatrix4fv("u_transformMatrix",l.tileTransform.transform),r.setUniform2fv("u_normalized_origin",l.tileTransform.displayCoord),r.setUniform1f("u_opacity",1),f.vvColor&&(r.setUniform1fv("u_vvColorValues",p.vvColorValues),r.setUniform4fv("u_vvColors",p.vvColors)),f.vvOpacity&&(r.setUniform1fv("u_vvOpacityValues",p.vvOpacityValues),r.setUniform1fv("u_vvOpacities",p.vvOpacities)),d.drawElements(4,B,5125,4*t),d.bindVAO(null)}};
d.prototype._initialize=function(){if(this._isInitialized)return!0;this._fillVertexAttributeLayout={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:24,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,offset:4,stride:24,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,offset:8,stride:24,normalized:!0,divisor:0},{name:"a_tlbr",count:4,type:5123,offset:12,stride:24,normalized:!1,divisor:0},{name:"a_aux",count:4,type:5121,offset:20,stride:24,normalized:!1,divisor:0}]};this._fillVertexAttributeLayoutVV=
{geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:32,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,offset:4,stride:32,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,offset:8,stride:32,normalized:!0,divisor:0},{name:"a_tlbr",count:4,type:5123,offset:12,stride:32,normalized:!1,divisor:0},{name:"a_aux",count:4,type:5121,offset:20,stride:32,normalized:!1,divisor:0},{name:"a_vv",count:2,type:5126,offset:24,stride:32,normalized:!1,divisor:0}]};this._isInitialized=!0};d.prototype._getVAO=
function(d,m,l){if(m.fillGeometry.vao)return m.fillGeometry.vao;var f=m.fillGeometry.vertexBufferMap[a.C_VBO_GEOMETRY],r=m.fillGeometry.indexBuffer;if(!f||!r)return null;m.fillGeometry.vao=l?new g(d,this._fillAttributeLocationsVV,this._fillVertexAttributeLayoutVV,{geometry:f},r):new g(d,this._fillAttributeLocations,this._fillVertexAttributeLayout,{geometry:f},r);return m.fillGeometry.vao};return d}()})},"esri/views/2d/engine/webgl/painter/WGLLinePainter":function(){define(["require","exports","../../../../webgl/VertexArrayObject",
"../Utils"],function(A,t,g,a){return function(){function d(){this._lineAttributeLocations={a_pos:0,a_id:1,a_color:2,a_offsetAndNormal:3,a_accumulatedDistanceAndHalfWidth:4,a_tlbr:5,a_segmentDirection:6};this._lineAttributeLocationsVV={a_pos:0,a_id:1,a_color:2,a_offsetAndNormal:3,a_accumulatedDistanceAndHalfWidth:4,a_tlbr:5,a_segmentDirection:6,a_vv:7};this._lineVertexAttributeLayout={geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:32,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,
offset:4,stride:32,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,offset:8,stride:32,normalized:!0,divisor:0},{name:"a_offsetAndNormal",count:4,type:5120,offset:12,stride:32,normalized:!1,divisor:0},{name:"a_accumulatedDistanceAndHalfWidth",count:2,type:5123,offset:16,stride:32,normalized:!1,divisor:0},{name:"a_tlbr",count:4,type:5123,offset:20,stride:32,normalized:!1,divisor:0},{name:"a_segmentDirection",count:4,type:5120,offset:28,stride:32,normalized:!1,divisor:0}]};this._lineVertexAttributeLayoutVV=
{geometry:[{name:"a_pos",count:2,type:5122,offset:0,stride:44,normalized:!1,divisor:0},{name:"a_id",count:4,type:5121,offset:4,stride:44,normalized:!0,divisor:0},{name:"a_color",count:4,type:5121,offset:8,stride:44,normalized:!0,divisor:0},{name:"a_offsetAndNormal",count:4,type:5120,offset:12,stride:44,normalized:!1,divisor:0},{name:"a_accumulatedDistanceAndHalfWidth",count:2,type:5123,offset:16,stride:44,normalized:!1,divisor:0},{name:"a_tlbr",count:4,type:5123,offset:20,stride:44,normalized:!1,
divisor:0},{name:"a_segmentDirection",count:4,type:5120,offset:28,stride:44,normalized:!1,divisor:0},{name:"a_vv",count:3,type:5126,offset:32,stride:44,normalized:!1,divisor:0}]};this._spritesTextureSize=new Float32Array(2)}d.prototype.draw=function(d,g,l,p,r,q,v,x,t,B,E,D){var f=g.materialKeyInfo,m=f.vvSizeMinMaxValue||f.vvSizeScaleStops||f.vvSizeFieldStops||f.vvSizeUnitValue||f.vvColor||f.vvOpacity;if(r=B.getProgram(g.materialKey,r,m?this._lineAttributeLocationsVV:this._lineAttributeLocations)){d.bindProgram(r);
m=this._getVAO(d,l,m);d.bindVAO(m);m=1/v;if(0<g.texBindingInfo.length){g=g.texBindingInfo[0];B=g.pageId;var w=E.sprites;this._spritesTextureSize[0]=w.getWidth(B);this._spritesTextureSize[1]=w.getHeight(B);E.bindSpritePage(d,B,g.unit);r.setUniform1i(g.semantic,g.unit);r.setUniform2fv("u_mosaicSize",this._spritesTextureSize);r.setUniform1f("u_zoomFactor",Math.pow(2,q-l.key.level)/v);r.setUniform1f("u_tileCoordRatio",a.C_TILE_SIZE/l.coordRange)}r.setUniformMatrix4fv("u_transformMatrix",l.tileTransform.transform);
r.setUniformMatrix4fv("u_extrudeMatrix",D);r.setUniform2fv("u_normalized_origin",l.tileTransform.displayCoord);r.setUniform1f("u_opacity",1);r.setUniform1f("u_blur",0+m);r.setUniform1f("u_antialiasing",m);f.vvSizeMinMaxValue&&r.setUniform4fv("u_vvSizeMinMaxValue",p.vvSizeMinMaxValue);f.vvSizeScaleStops&&r.setUniform1f("u_vvSizeScaleStopsValue",p.vvSizeScaleStopsValue);f.vvSizeFieldStops&&(r.setUniform1fv("u_vvSizeFieldStopsValues",p.vvSizeFieldStopsValues),r.setUniform1fv("u_vvSizeFieldStopsSizes",
p.vvSizeFieldStopsSizes));f.vvSizeUnitValue&&r.setUniform1f("u_vvSizeUnitValueWorldToPixelsRatio",p.vvSizeUnitValueToPixelsRatio);f.vvColor&&(r.setUniform1fv("u_vvColorValues",p.vvColorValues),r.setUniform4fv("u_vvColors",p.vvColors));f.vvOpacity&&(r.setUniform1fv("u_vvOpacityValues",p.vvOpacityValues),r.setUniform1fv("u_vvOpacities",p.vvOpacities));d.setFaceCullingEnabled(!0);d.setFrontFace(2305);d.setCullFace(1029);d.drawElements(4,t,5125,4*x);d.setFaceCullingEnabled(!1);d.bindVAO(null)}};d.prototype._getVAO=
function(d,m,l){if(m.lineGeometry.vao)return m.lineGeometry.vao;var f=m.lineGeometry.vertexBufferMap[a.C_VBO_GEOMETRY],r=m.lineGeometry.indexBuffer;if(!f||!r)return null;m.lineGeometry.vao=l?new g(d,this._lineAttributeLocationsVV,this._lineVertexAttributeLayoutVV,{geometry:f},r):new g(d,this._lineAttributeLocations,this._lineVertexAttributeLayout,{geometry:f},r);return m.lineGeometry.vao};return d}()})},"esri/views/2d/engine/webgl/painter/WGLBackgroundPainter":function(){define("require exports ../../../../../core/libs/gl-matrix/vec4 ../../../../webgl/Program ../../../../webgl/VertexArrayObject ../../../../webgl/BufferObject ../shaders/glShaderSnippets".split(" "),
function(A,t,g,a,d,f,m){return function(){function l(){this._color=g.create();this._initialized=!1;this._color.set([1,0,0,1])}l.prototype.dispose=function(){this._solidProgram&&(this._solidProgram.dispose(),this._solidProgram=null);this._solidVertexArrayObject&&(this._solidVertexArrayObject.dispose(),this._solidVertexArrayObject=null)};l.prototype.draw=function(a,d,f){this._initialized||this._initialize(a);f&&(this._color[0]=f[0],this._color[1]=f[1],this._color[2]=f[2],this._color[3]=f[3]);a.bindVAO(this._solidVertexArrayObject);
a.bindProgram(this._solidProgram);this._solidProgram.setUniformMatrix4fv("u_transformMatrix",d.tileTransform.transform);this._solidProgram.setUniform2fv("u_normalized_origin",d.tileTransform.displayCoord);this._solidProgram.setUniform1f("u_coord_range",d.coordRange);this._solidProgram.setUniform1f("u_depth",0);this._solidProgram.setUniform4fv("u_color",this._color);a.drawArrays(5,0,4);a.bindVAO()};l.prototype._initialize=function(g){if(this._initialized)return!0;var l={a_pos:0},p=new a(g,m.backgroundVS,
m.backgroundFS,l);if(!p)return!1;var v=new Int8Array([0,0,1,0,0,1,1,1]),v=f.createVertex(g,35044,v);g=new d(g,l,{geometry:[{name:"a_pos",count:2,type:5120,offset:0,stride:2,normalized:!1,divisor:0}]},{geometry:v});this._solidProgram=p;this._solidVertexArrayObject=g;return this._initialized=!0};return l}()})},"esri/core/libs/gl-matrix/vec4":function(){define(["./common"],function(A){var t={create:function(){var g=new A.ARRAY_TYPE(4);g[0]=0;g[1]=0;g[2]=0;g[3]=0;return g},clone:function(g){var a=new A.ARRAY_TYPE(4);
a[0]=g[0];a[1]=g[1];a[2]=g[2];a[3]=g[3];return a},fromValues:function(g,a,d,f){var m=new A.ARRAY_TYPE(4);m[0]=g;m[1]=a;m[2]=d;m[3]=f;return m},copy:function(g,a){g[0]=a[0];g[1]=a[1];g[2]=a[2];g[3]=a[3];return g},set:function(g,a,d,f,m){g[0]=a;g[1]=d;g[2]=f;g[3]=m;return g},add:function(g,a,d){g[0]=a[0]+d[0];g[1]=a[1]+d[1];g[2]=a[2]+d[2];g[3]=a[3]+d[3];return g},subtract:function(g,a,d){g[0]=a[0]-d[0];g[1]=a[1]-d[1];g[2]=a[2]-d[2];g[3]=a[3]-d[3];return g}};t.sub=t.subtract;t.multiply=function(g,a,
d){g[0]=a[0]*d[0];g[1]=a[1]*d[1];g[2]=a[2]*d[2];g[3]=a[3]*d[3];return g};t.mul=t.multiply;t.divide=function(g,a,d){g[0]=a[0]/d[0];g[1]=a[1]/d[1];g[2]=a[2]/d[2];g[3]=a[3]/d[3];return g};t.div=t.divide;t.ceil=function(g,a){g[0]=Math.ceil(a[0]);g[1]=Math.ceil(a[1]);g[2]=Math.ceil(a[2]);g[3]=Math.ceil(a[3]);return g};t.floor=function(g,a){g[0]=Math.floor(a[0]);g[1]=Math.floor(a[1]);g[2]=Math.floor(a[2]);g[3]=Math.floor(a[3]);return g};t.min=function(g,a,d){g[0]=Math.min(a[0],d[0]);g[1]=Math.min(a[1],
d[1]);g[2]=Math.min(a[2],d[2]);g[3]=Math.min(a[3],d[3]);return g};t.max=function(g,a,d){g[0]=Math.max(a[0],d[0]);g[1]=Math.max(a[1],d[1]);g[2]=Math.max(a[2],d[2]);g[3]=Math.max(a[3],d[3]);return g};t.round=function(g,a){g[0]=Math.round(a[0]);g[1]=Math.round(a[1]);g[2]=Math.round(a[2]);g[3]=Math.round(a[3]);return g};t.scale=function(g,a,d){g[0]=a[0]*d;g[1]=a[1]*d;g[2]=a[2]*d;g[3]=a[3]*d;return g};t.scaleAndAdd=function(g,a,d,f){g[0]=a[0]+d[0]*f;g[1]=a[1]+d[1]*f;g[2]=a[2]+d[2]*f;g[3]=a[3]+d[3]*f;return g};
t.distance=function(g,a){var d=a[0]-g[0],f=a[1]-g[1],m=a[2]-g[2];g=a[3]-g[3];return Math.sqrt(d*d+f*f+m*m+g*g)};t.dist=t.distance;t.squaredDistance=function(g,a){var d=a[0]-g[0],f=a[1]-g[1],m=a[2]-g[2];g=a[3]-g[3];return d*d+f*f+m*m+g*g};t.sqrDist=t.squaredDistance;t.length=function(g){var a=g[0],d=g[1],f=g[2];g=g[3];return Math.sqrt(a*a+d*d+f*f+g*g)};t.len=t.length;t.squaredLength=function(g){var a=g[0],d=g[1],f=g[2];g=g[3];return a*a+d*d+f*f+g*g};t.sqrLen=t.squaredLength;t.negate=function(g,a){g[0]=
-a[0];g[1]=-a[1];g[2]=-a[2];g[3]=-a[3];return g};t.inverse=function(g,a){g[0]=1/a[0];g[1]=1/a[1];g[2]=1/a[2];g[3]=1/a[3];return g};t.normalize=function(g,a){var d=a[0],f=a[1],m=a[2];a=a[3];var l=d*d+f*f+m*m+a*a;0<l&&(l=1/Math.sqrt(l),g[0]=d*l,g[1]=f*l,g[2]=m*l,g[3]=a*l);return g};t.dot=function(g,a){return g[0]*a[0]+g[1]*a[1]+g[2]*a[2]+g[3]*a[3]};t.lerp=function(g,a,d,f){var m=a[0],l=a[1],p=a[2];a=a[3];g[0]=m+f*(d[0]-m);g[1]=l+f*(d[1]-l);g[2]=p+f*(d[2]-p);g[3]=a+f*(d[3]-a);return g};t.random=function(g,
a){a=a||1;g[0]=A.RANDOM();g[1]=A.RANDOM();g[2]=A.RANDOM();g[3]=A.RANDOM();t.normalize(g,g);t.scale(g,g,a);return g};t.transformMat4=function(g,a,d){var f=a[0],m=a[1],l=a[2];a=a[3];g[0]=d[0]*f+d[4]*m+d[8]*l+d[12]*a;g[1]=d[1]*f+d[5]*m+d[9]*l+d[13]*a;g[2]=d[2]*f+d[6]*m+d[10]*l+d[14]*a;g[3]=d[3]*f+d[7]*m+d[11]*l+d[15]*a;return g};t.transformQuat=function(g,a,d){var f=a[0],m=a[1],l=a[2],p=d[0],r=d[1],q=d[2];d=d[3];var v=d*f+r*l-q*m,x=d*m+q*f-p*l,t=d*l+p*m-r*f,f=-p*f-r*m-q*l;g[0]=v*d+f*-p+x*-q-t*-r;g[1]=
x*d+f*-r+t*-p-v*-q;g[2]=t*d+f*-q+v*-r-x*-p;g[3]=a[3];return g};t.forEach=function(){var g=t.create();return function(a,d,f,m,l,p){d||(d=4);f||(f=0);for(m=m?Math.min(m*d+f,a.length):a.length;f<m;f+=d)g[0]=a[f],g[1]=a[f+1],g[2]=a[f+2],g[3]=a[f+3],l(g,g,p),a[f]=g[0],a[f+1]=g[1],a[f+2]=g[2],a[f+3]=g[3];return a}}();t.str=function(g){return"vec4("+g[0]+", "+g[1]+", "+g[2]+", "+g[3]+")"};t.exactEquals=function(g,a){return g[0]===a[0]&&g[1]===a[1]&&g[2]===a[2]&&g[3]===a[3]};t.equals=function(g,a){var d=
g[0],f=g[1],m=g[2];g=g[3];var l=a[0],p=a[1],r=a[2];a=a[3];return Math.abs(d-l)<=A.EPSILON*Math.max(1,Math.abs(d),Math.abs(l))&&Math.abs(f-p)<=A.EPSILON*Math.max(1,Math.abs(f),Math.abs(p))&&Math.abs(m-r)<=A.EPSILON*Math.max(1,Math.abs(m),Math.abs(r))&&Math.abs(g-a)<=A.EPSILON*Math.max(1,Math.abs(g),Math.abs(a))};return t})},"esri/views/2d/engine/webgl/painter/TileInfoRenderer":function(){define("require exports ../../../../webgl/Program ../../../../webgl/VertexArrayObject ../../../../webgl/BufferObject ../../../../webgl/Texture ../GeometryUtils ../shaders/glShaderSnippets".split(" "),
function(A,t,g,a,d,f,m,l){return function(){function p(){this._initialized=!1;this._maxWidth=0;this._color=new Float32Array([1,0,0,1])}p.prototype.render=function(a,d){this._initialized||this._initialize(a);a.bindVAO(this._outlineVertexArrayObject);a.bindProgram(this._outlineProgram);this._outlineProgram.setUniformMatrix4fv("u_transformMatrix",d.tileTransform.transform);this._outlineProgram.setUniform2fv("u_normalized_origin",d.tileTransform.displayCoord);this._outlineProgram.setUniform1f("u_coord_range",
d.coordRange);this._outlineProgram.setUniform1f("u_depth",0);this._outlineProgram.setUniform4fv("u_color",this._color);a.setLineWidth(2);a.drawArrays(3,0,4);a.bindVAO();var f=this._getTexture(a,d);f&&(a.bindVAO(this._tileInfoVertexArrayObject),a.bindProgram(this._tileInfoProgram),a.bindTexture(f,0),this._tileInfoProgram.setUniformMatrix4fv("u_transformMatrix",d.tileTransform.transform),this._tileInfoProgram.setUniform2fv("u_normalized_origin",d.tileTransform.displayCoord),this._tileInfoProgram.setUniform1f("u_depth",
0),this._tileInfoProgram.setUniform1f("u_coord_ratio",d.coordRange/512),this._tileInfoProgram.setUniform2f("u_delta",8,8),this._tileInfoProgram.setUniform2f("u_dimensions",f.descriptor.width,f.descriptor.height),a.drawArrays(5,0,4),a.bindVAO())};p.prototype._initialize=function(f){if(this._initialized)return!0;var m={a_pos:0},p=new g(f,l.backgroundVS,l.backgroundFS,m),r=new g(f,l.tileInfoVS,l.tileInfoFS,m),t={geometry:[{name:"a_pos",count:2,type:5120,offset:0,stride:2,normalized:!1,divisor:0}]},B=
new Int8Array([0,0,1,0,1,1,0,1]),B=d.createVertex(f,35044,B),B=new a(f,m,t,{geometry:B}),E=new Int8Array([0,0,1,0,0,1,1,1]),E=d.createVertex(f,35044,E);f=new a(f,m,t,{geometry:E});this._outlineProgram=p;this._tileInfoProgram=r;this._outlineVertexArrayObject=B;this._tileInfoVertexArrayObject=f;return this._initialized=!0};p.prototype._getTexture=function(a,d){if(d.texture)return d.texture;this._canvas||(this._canvas=document.createElement("canvas"),this._canvas.setAttribute("id","canvas2d"),this._canvas.setAttribute("width",
"256"),this._canvas.setAttribute("height","32"),this._canvas.setAttribute("style","display:none"));var g=d.key.id,l=this._canvas.getContext("2d");l.font="24px sans-serif";l.textAlign="left";l.textBaseline="middle";var p=l.measureText(g),p=Math.pow(2,Math.ceil(m.log2(p.width+2)));p>this._maxWidth&&(this._maxWidth=p);l.clearRect(0,0,this._maxWidth,32);l.fillStyle="blue";l.fillText(g,0,16);d.texture=new f(a,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9728},this._canvas);return d.texture};
return p}()})},"esri/views/2d/engine/webgl/painter/WGLHighlightPainter":function(){define(["require","exports","dojo/has","./highlight/HighlightRenderer","./highlight/HighlightSurfaces"],function(A,t,g,a,d){return function(){function f(){this._hlRenderer=new a;this._hlSurfaces=new d;this._height=this._width=void 0}f.prototype.setup=function(a,d,f){this._width=d;this._height=f;d=Math.round(.7*d);f=Math.round(.7*f);this._hlRenderer.setup(a,d,f);this._hlSurfaces.setup(a,d,f)};f.prototype.setHighlightOptions=
function(a){this._hlRenderer.setHighlightOptions({fillColor:a.fillColor,outlineColor:a.outlineColor,outlineWidth:.7*a.outlineWidth,outerHaloWidth:.7*a.outerHaloWidth,innerHaloWidth:.7*a.innerHaloWidth,outlinePosition:.7*a.outlinePosition})};f.prototype.startMaskDraw=function(a){a.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo);a.setClearColor(0,0,0,0);a.setClearStencil(0);a.clear(a.gl.COLOR_BUFFER_BIT|a.gl.STENCIL_BUFFER_BIT);a.setViewport(0,0,.7*this._width,.7*this._height)};f.prototype.draw=function(a){a.setStencilTestEnabled(!1);
a.setBlendingEnabled(!1);a.bindFramebuffer(this._hlSurfaces.sharedBlur2Fbo);a.setClearColor(0,0,0,0);a.clear(a.gl.COLOR_BUFFER_BIT);this._hlRenderer.preBlur(a,this._hlSurfaces.sharedBlur1Tex);g("esri-feature-highlight-debug")?(a.bindFramebuffer(null),a.clear(a.gl.COLOR_BUFFER_BIT),this._hlRenderer.finalBlur(a,this._hlSurfaces.sharedBlur2Tex)):(a.bindFramebuffer(this._hlSurfaces.sharedBlur1Fbo),a.setClearColor(0,0,0,0),a.clear(a.gl.COLOR_BUFFER_BIT),this._hlRenderer.finalBlur(a,this._hlSurfaces.sharedBlur2Tex),
a.setBlendingEnabled(!0),a.bindFramebuffer(null),a.setViewport(0,0,this._width,this._height),this._hlRenderer.renderHighlight(a,this._hlSurfaces.sharedBlur1Tex))};return f}()})},"esri/views/2d/engine/webgl/painter/highlight/HighlightRenderer":function(){define("require exports ../../../../../webgl/BufferObject ../../../../../webgl/VertexArrayObject ../../../../../webgl/Texture ../../../../../webgl/enums ../../../../../webgl/ShaderVariations ../../shaders/hlShaderSnippets".split(" "),function(A,t,
g,a,d,f,m,l){var p=[void 0,void 0,void 0,1],r=[3,4],q=[0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1],v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return function(){function f(){this._height=this._width=void 0;this._highlightOptions={fillColor:[.2,.6,.9,.75],outlineColor:[.2,.6,.9,.9],outlinePosition:0,outlineWidth:3.4,innerHaloWidth:2,outerHaloWidth:3.3};this._resources=null}f.prototype._initialize=function(f,q,v){this._width=q;this._height=v;q=new g(f,34962,35044,(new Int8Array([-128,-128,0,0,127,-128,255,0,-128,127,
0,255,127,127,255,255])).buffer);v=new a(f,{a_position:0,a_texcoord:1},{geometry:[{name:"a_position",count:2,type:5120,offset:0,stride:4,normalized:!0},{name:"a_texcoord",count:2,type:5121,offset:2,stride:4,normalized:!0}]},{geometry:q});var x=(new m("hl",["texturedVS","highlightFS"],[],l,f,{a_position:0,a_texcoord:1})).getProgram([]),t=(new m("hl",["texturedVS","blurFS"],[],l,f,{a_position:0,a_texcoord:1})).getProgram([]);x.setUniform1i("u_texture",r[0]);x.setUniform1i("u_shade",r[1]);x.setUniform4fv("u_sigmas",
p);t.setUniform1i("u_texture",r[0]);t.setUniform4fv("u_sigmas",p);f=new d(f,{target:3553,pixelFormat:6408,dataType:5121,wrapMode:33071,width:256,height:1,samplingMode:9728});this._resources={quadGeometry:q,quadVAO:v,highlightProgram:x,blurProgram:t,shadeTex:f}};f.prototype.setHighlightOptions=function(a){function d(a,d,f){v[0]=(1-f)*a[0]+f*d[0];v[1]=(1-f)*a[1]+f*d[1];v[2]=(1-f)*a[2]+f*d[2];v[3]=(1-f)*a[3]+f*d[3]}this._highlightOptions=a;if(this._resources){var f=a.outlinePosition-a.outlineWidth/2-
a.outerHaloWidth,g=a.outlinePosition-a.outlineWidth/2,l=a.outlinePosition+a.outlineWidth/2,m=a.outlinePosition+a.outlineWidth/2+a.innerHaloWidth,q=Math.sqrt(Math.PI/2)*p[3],r=Math.abs(f)>q?Math.round(10*(Math.abs(f)-q))/10:0,q=Math.abs(m)>q?Math.round(10*(Math.abs(m)-q))/10:0;r&&!q?console.warn("The outer rim of the highlight is "+r+"px away from the edge of the feature; consider reducing some width values or shifting the outline position towards positive values (inwards)."):!r&&q?console.warn("The inner rim of the highlight is "+
q+"px away from the edge of the feature; consider reducing some width values or shifting the outline position towards negative values (outwards)."):r&&q&&console.warn("The highlight is "+Math.max(r,q)+"px away from the edge of the feature; consider reducing some width values.");for(var r=new Uint8Array(1024),v=[void 0,void 0,void 0,void 0],x=0;256>x;++x)q=f+x/255*(m-f),q<f?(r[4*x+0]=0,r[4*x+1]=0,r[4*x+2]=0,r[4*x+3]=0):q<g?d([0,0,0,0],a.outlineColor,(q-f)/(g-f)):q<l?(v[0]=a.outlineColor[0],v[1]=a.outlineColor[1],
v[2]=a.outlineColor[2],v[3]=a.outlineColor[3]):q<m?d(a.outlineColor,a.fillColor,(q-l)/(m-l)):(r[4*x+0]=a.fillColor[0],r[4*x+1]=a.fillColor[1],r[4*x+2]=a.fillColor[2],r[4*x+3]=a.fillColor[3]),r[4*x+0]=255*v[0]*v[3],r[4*x+1]=255*v[1]*v[3],r[4*x+2]=255*v[2]*v[3],r[4*x+3]=255*v[3];this._resources.highlightProgram.setUniform2fv("u_minMaxDistance",[f,m]);this._resources.shadeTex.updateData(0,0,0,256,1,r)}};f.prototype.setup=function(a,d,f){this._resources?(this._width=d,this._height=f):(this._initialize(a,
d,f),this.setHighlightOptions(this._highlightOptions))};f.prototype._teardown=function(){this._resources.quadGeometry.dispose();this._resources.quadVAO.dispose();this._resources.highlightProgram.dispose();this._resources.blurProgram.dispose();this._resources.shadeTex.dispose();this._resources=null};f.prototype.dispose=function(){this._resources&&this._teardown()};f.prototype.preBlur=function(a,d){a.bindTexture(d,r[0]);a.bindProgram(this._resources.blurProgram);this._resources.blurProgram.setUniform4fv("u_direction",
[1,0,1/this._width,0]);this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector",q);a.bindVAO(this._resources.quadVAO);a.drawArrays(5,0,4);a.bindVAO()};f.prototype.finalBlur=function(a,d){a.bindTexture(d,r[0]);a.bindProgram(this._resources.blurProgram);this._resources.blurProgram.setUniform4fv("u_direction",[0,1,0,1/this._height]);this._resources.blurProgram.setUniformMatrix4fv("u_channelSelector",v);a.bindVAO(this._resources.quadVAO);a.drawArrays(5,0,4);a.bindVAO()};f.prototype.renderHighlight=
function(a,d){a.bindTexture(d,r[0]);a.bindTexture(this._resources.shadeTex,r[1]);a.bindProgram(this._resources.highlightProgram);a.bindVAO(this._resources.quadVAO);a.drawArrays(5,0,4);a.bindVAO()};return f}()})},"esri/views/2d/engine/webgl/shaders/hlShaderSnippets":function(){define(["require","exports","../../../../webgl/ShaderSnippets","dojo/text!./hlShaders.xml"],function(A,t,g,a){A=new g;g.parse(a,A);return A})},"esri/views/2d/engine/webgl/painter/highlight/HighlightSurfaces":function(){define(["require",
"exports","../../../../../webgl/FramebufferObject","../../../../../webgl/Texture"],function(A,t,g,a){function d(d,m,l){m=new a(d,{target:3553,pixelFormat:6408,dataType:5121,wrapMode:33071,width:m,height:l,samplingMode:9729});d=g.createWithAttachments(d,m,{colorTarget:0,depthStencilTarget:2});return[m,d]}return function(){function a(){this._height=this._width=void 0;this._resources=null}a.prototype._initialize=function(a,f,g){this._width=f;this._height=g;var l=d(a,f,g),m=l[0],l=l[1];a=d(a,f,g);this._resources=
{sharedBlur1Tex:m,sharedBlur1Fbo:l,sharedBlur2Tex:a[0],sharedBlur2Fbo:a[1]}};a.prototype.setup=function(a,d,f){!this._resources||this._width===d&&this._height===f||this._teardown();this._resources||this._initialize(a,d,f)};a.prototype._teardown=function(){this._resources.sharedBlur1Tex.dispose();this._resources.sharedBlur1Fbo.dispose();this._resources.sharedBlur2Tex.dispose();this._resources.sharedBlur2Fbo.dispose();this._resources=null};a.prototype.dispose=function(){this._resources&&this._teardown()};
Object.defineProperty(a.prototype,"sharedBlur1Tex",{get:function(){return this._resources.sharedBlur1Tex},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"sharedBlur1Fbo",{get:function(){return this._resources.sharedBlur1Fbo},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"sharedBlur2Tex",{get:function(){return this._resources.sharedBlur2Tex},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"sharedBlur2Fbo",{get:function(){return this._resources.sharedBlur2Fbo},
enumerable:!0,configurable:!0});return a}()})},"esri/views/2d/engine/webgl/painter/WGLHeatmapPainter":function(){define("require exports ../../../../webgl/Program ../../../../webgl/VertexArrayObject ../../../../webgl/BufferObject ../../../../webgl/Texture ../../../../webgl/FramebufferObject dojo/text!../shaders/heatmap.vs.glsl dojo/text!../shaders/heatmap.fs.glsl".split(" "),function(A,t,g,a,d,f,m,l,p){return function(){function r(){this._initWGLExtensions=this._initialized=!1}r.prototype.bindHeatmapSurface=
function(a,d,g){if(!this._initWGLExtensions){var l=a.extensions;if(!l.textureFloatLinear||!l.colorBufferFloat)throw Error("Required WebGL extensions needed for the heatmap drawing are not available!");this._initWGLExtensions=!0}d=Math.round(d/4);g=Math.round(g/4);this._intensityFBO&&this._intensityFBO.width===d&&this._intensityFBO.height===g||(this._intensityFBO&&this._intensityFBO.dispose(),l=new f(a,{target:3553,internalFormat:34836,pixelFormat:6408,dataType:5126,samplingMode:a.extensions.textureFloatLinear?
9729:9728,wrapMode:33071,width:d,height:g}),this._intensityFBO=m.createWithAttachments(a,l,{colorTarget:0,depthStencilTarget:3,width:d,height:g,multisampled:!1}));this._boundFBO=a.getBoundFramebufferObject();a.bindFramebuffer(this._intensityFBO);this._prevVP=a.getViewport();a.setViewport(0,0,d,g);a.setStencilWriteMask(255);a.setClearColor(0,0,0,0);a.setClearStencil(0);a.clear(a.gl.COLOR_BUFFER_BIT|a.gl.STENCIL_BUFFER_BIT)};r.prototype.drawHeatmap=function(a,d,f){a.bindFramebuffer(this._boundFBO);
this._boundFBO=null;a.setViewport(this._prevVP.x,this._prevVP.y,this._prevVP.width,this._prevVP.height);this._initialized||(this._initialized=this._initialize(a));a.setBlendFunctionSeparate(1,771,1,771);a.setBlendingEnabled(!0);a.bindVAO(this._vertexArrayObject);a.bindProgram(this._program);a.bindTexture(this._intensityFBO.colorTexture,2);this._program.setUniform1i("u_texture",2);this._program.setUniform1f("u_opacity",f);d=d.heatmapParameters;this._updateGradient(a,d);this._program.setUniform2f("u_minmax",
d.minPixelIntensity,d.maxPixelIntensity);a.setActiveTexture(5);a.bindTexture(this._gradientTex,5);this._program.setUniform1i("u_gradient",5);a.drawArrays(5,0,4);a.bindVAO()};r.prototype._initialize=function(f){if(this._initialized)return!0;var m={a_pos:0,a_tex:1},q=new g(f,l,p,m);if(!q)return!1;var r=new Int8Array(16);r[0]=-1;r[1]=-1;r[2]=0;r[3]=0;r[4]=1;r[5]=-1;r[6]=1;r[7]=0;r[8]=-1;r[9]=1;r[10]=0;r[11]=1;r[12]=1;r[13]=1;r[14]=1;r[15]=1;f=new a(f,m,{geometry:[{name:"a_pos",count:2,type:5120,offset:0,
stride:4,normalized:!1,divisor:0},{name:"a_tex",count:2,type:5120,offset:2,stride:4,normalized:!1,divisor:0}]},{geometry:d.createVertex(f,35044,r)});this._program=q;this._vertexArrayObject=f;return this._initialized=!0};r.prototype._updateGradient=function(a,d){if(!this._gradientTex||d.color.refreshColorRamp){this._gradientTex&&(this._gradientTex.dispose(),this._gradientTex=null);this._gradientTex=new f(a,{target:3553,internalFormat:6408,pixelFormat:6408,dataType:5121,samplingMode:9728,wrapMode:33071,
width:1,height:512});a=document.createElement("CANVAS");a.width=1;a.height=512;for(var g=a.getContext("2d"),l=d.color,m=[],p=0;p<l.values.length;++p)m.push({ratio:l.values[p],color:"rgba("+Math.floor(255*l.colors[4*p+0])+", "+Math.floor(255*l.colors[4*p+1])+", "+Math.floor(255*l.colors[4*p+2])+", "+l.colors[4*p+3]+")"});l=g.createLinearGradient(0,0,0,512);for(p=0;p<m.length;p++){var q=m[p];l.addColorStop(q.ratio,q.color)}g.fillStyle=l;g.fillRect(0,0,1,512);this._gradientTex.setData(a);d.color.refreshColorRamp=
!1}};return r}()})},"esri/views/2d/layers/support/GraphicsView2D":function(){define("require exports ../../../../core/tsSupport/declareExtendsHelper ../../../../core/tsSupport/decorateHelper ../../../../core/accessorSupport/decorators ../../../../core/Collection ../../../../core/HandleRegistry ../../../../core/promiseUtils ../../../../Graphic ../../../layers/GraphicsView ../../engine/graphics/GFXSurface ../../engine/graphics/GFXGroup ../../engine/graphics/GFXObject".split(" "),function(A,t,g,a,d,
f,m,l,p,r,q,v,x){return function(r){function t(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];var f=r.apply(this,a)||this;f._frontGroup=new v;f._handles=new m;f._objects=new Map;f.container=new q;f.container.addChild(f._frontGroup);f.watch("graphics",function(){return f._reset()},!0);return f}g(t,r);t.prototype.hitTest=function(a,d){if(!this.view||!this.view.position)return null;a+=this.view.position[0]-window.pageXOffset;d+=this.view.position[1]-window.pageYOffset;return(a=this.container.hitTest(a,
d))?l.resolve(a.graphic):null};t.prototype._reset=function(){var a=this;this._handles.remove("graphics");this._objects.forEach(function(d,f){a._frontGroup.removeChild(d)});this._objects.clear();this.graphics&&(this.graphics.forEach(this._add,this),this._handles.add(this.graphics.on("change",function(d){return a._graphicsChangeHandler(d)}),"graphics"))};t.prototype._add=function(a){if(!this._objects.has(a)){var d=new x;d.graphic=a;d.renderingInfo={symbol:a.symbol};this._objects.set(a,d);this._frontGroup.addChild(d)}};
t.prototype._remove=function(a){var d=this._objects.get(a);d&&(this._objects.delete(a),this._frontGroup.removeChild(d))};t.prototype._graphicsChangeHandler=function(a){for(var d=a.removed,f=0,g=a.added;f<g.length;f++)a=g[f],this._add(a);for(f=0;f<d.length;f++)a=d[f],this._remove(a)};a([d.cast(f.ofType(p))],t.prototype,"graphics",void 0);a([d.property()],t.prototype,"view",void 0);return t=a([d.subclass("esri.views.2d.layers.support.GraphicsView2D")],t)}(d.declared(r))})},"esri/views/layers/GraphicsView":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/Collection ../../Graphic".split(" "),
function(A,t,g,a,d,f,m,l){return function(f){function p(){var a=null!==f&&f.apply(this,arguments)||this;a.graphics=null;a.renderer=null;a.view=null;return a}g(p,f);a([d.property({type:m.ofType(l)})],p.prototype,"graphics",void 0);a([d.property()],p.prototype,"renderer",void 0);a([d.property()],p.prototype,"view",void 0);return p=a([d.subclass("esri.views.layers.GraphicsView")],p)}(d.declared(f))})},"esri/views/2d/engine/graphics/GFXSurface":function(){define("require exports ../../../../core/tsSupport/extendsHelper ../../../../core/tsSupport/assignHelper ../../libs/gl-matrix/mat2d ../../libs/gl-matrix/common ../../libs/gfx ../../viewpointUtils ../Container ./Projector ../cssUtils".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q){var v=d.identity(d.create());return function(p){function x(){var a=null!==p&&p.apply(this,arguments)||this;a._transform=d.create();a._projector=new r;a._prevStateId=null;return a}g(x,p);x.prototype.createElement=function(){var a=document.createElement("div");a.setAttribute("class","esri-display-object");return a};x.prototype.setElement=function(a){this.surface&&(this.surface.destroy(),this.surface=null);if(this.element=a)this.surface=m.createSurface(this.element,400,
400)};x.prototype.doRender=function(a){var g=this.element.style;if(this.visible){g.display="block";g.opacity=""+a.opacity;var m=this._transform,r=a.state,x=this._prevStateId!==r.id;if(this.renderRequested||x){if(a.stationary)x&&(this._prevStateId=r.id),l.getMatrix(m,r.center,r.size,r.resolution,f.toRadian(r.rotation),1),this.surface.setDimensions(r.size[0],r.size[1]),this._projector.update(m,r.resolution),this.children.forEach(function(a){a.g&&a.g.setTransform(v)}),p.prototype.doRender.call(this,
a);else{var t=d.invert(d.create(),m);d.multiply(t,r.transform,t);this.children.forEach(function(a){a.g&&a.g.setTransform(t)})}q.clip(g,r.clipRect);g.transform=q.cssMatrix3d(d.fromRotation(d.create(),f.toRadian(r.rotation)));this.surface.rawNode.style.transform=q.cssMatrix(d.fromRotation(d.create(),f.toRadian(-r.rotation)))}}else g.display="none"};x.prototype.hitTest=function(a,d){if(!this.attached)return null;var f=this.surface.rawNode,f=f.parentElement||f.parentNode;f.style.zIndex="9000";a=document.elementFromPoint(a,
d);f.style.zIndex="";return a&&a.gfxObject||null};x.prototype.prepareChildrenRenderParameters=function(d){return a({},d,{projector:this._projector,surface:this.surface})};x.prototype.beforeRenderChildren=function(a,d){this.surface.openBatch()};x.prototype.attachChild=function(a,d){return a.attach(d)};x.prototype.detachChild=function(a,d){return a.detach()};x.prototype.renderChild=function(a,d){return a.processRender(d)};x.prototype.afterRenderChildren=function(a,d){this.surface.closeBatch()};return x}(p)})},
"esri/views/2d/libs/gfx":function(){define("require exports ./gfx/svg ./gfx/Circle ./gfx/Group ./gfx/Path ./gfx/Image ./gfx/Rect ./gfx/Shape ./gfx/Surface ./gfx/Text".split(" "),function(A,t,g,a,d,f,m,l,p,r,q){Object.defineProperty(t,"__esModule",{value:!0});t.createSurface=g.createSurface;t.Circle=a.default;t.Group=d.default;t.Path=f.default;t.Image=m.default;t.Rect=l.default;t.Shape=p.default;t.Surface=r.default;t.Text=q.default})},"esri/views/2d/libs/gfx/svg":function(){define(["require","exports",
"dojo/dom","./Surface"],function(A,t,g,a){function d(a,d){return document.createElementNS?document.createElementNS(a,d):document.createElement(d)}Object.defineProperty(t,"__esModule",{value:!0});t.xmlns={xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"};t.dasharray={solid:"none",shortdash:[4,1],shortdot:[1,1],shortdashdot:[4,1,1,1],shortdashdotdot:[4,1,1,1,1,1],dot:[1,3],dash:[4,3],longdash:[8,3],dashdot:[4,3,1,3],longdashdot:[8,3,1,3],longdashdotdot:[8,3,1,3,1,3]};t._createElementNS=
d;t._setAttributeNS=function(a,d,g,p){return a.setAttributeNS?a.setAttributeNS(d,g,p):a.setAttribute(g,p)};t._createTextNode=function(a){return document.createTextNode(a)};t._createFragment=function(){return document.createDocumentFragment()};t.getRef=function(a){return a&&"none"!==a?a.match(/^url\(#.+\)$/)?g.byId(a.slice(5,-1)):a.match(/^#dojoUnique\d+$/)?g.byId(a.slice(1)):null:null};t.createSurface=function(f,m,l){var p=new a.default;p.rawNode=d(t.xmlns.svg,"svg");p.rawNode.setAttribute("overflow",
"hidden");m&&p.rawNode.setAttribute("width",0>m?0:m);l&&p.rawNode.setAttribute("height",0>l?0:l);m=d(t.xmlns.svg,"defs");p.rawNode.appendChild(m);p.defNode=m;p._parent=g.byId(f);p._parent.appendChild(p.rawNode);return p}})},"esri/views/2d/libs/gfx/Surface":function(){define("require exports ../../../../core/tsSupport/extendsHelper dojo/has dojo/_base/array dojo/dom-construct dojox/gfx/_base ./svg ./Container ./Circle ./Group ./Path ./Image ./Rect ./Text".split(" "),function(A,t,g,a,d,f,m,l,p,r,q,
v,x,w,B){Object.defineProperty(t,"__esModule",{value:!0});var E=navigator.userAgent,D=534<function(){var a=/WebKit\/(\d*)/.exec(E);return a?parseInt(a[1],10):0}();A=function(p){function t(){var a=null!==p&&p.apply(this,arguments)||this;a.rawNode=null;a._parent=null;a._nodes=[];a._events=[];return a}g(t,p);t.prototype.destroy=function(){d.forEach(this._nodes,f.destroy);this._nodes=[];d.forEach(this._events,function(a){a&&a.remove()});this._events=[];this.rawNode=null;if(a("ie"))for(;this._parent.lastChild;)f.destroy(this._parent.lastChild);
else this._parent.innerHTML="";this.defNode=this._parent=null};t.prototype.setDimensions=function(a,d){if(!this.rawNode)return this;a=0>a?0:a;d=0>d?0:d;this.rawNode.setAttribute("width",a);this.rawNode.setAttribute("height",d);D&&(this.rawNode.style.width=a,this.rawNode.style.height=d);return this};t.prototype.getDimensions=function(){return this.rawNode?{width:m.normalizedLength(this.rawNode.getAttribute("width")),height:m.normalizedLength(this.rawNode.getAttribute("height"))}:null};t.prototype.getEventSource=
function(){return this.rawNode};t.prototype._getRealMatrix=function(){return null};t.prototype.createShape=function(a){switch(a.type){case m.defaultPath.type:return this.createPath(a);case m.defaultRect.type:return this.createRect(a);case m.defaultCircle.type:return this.createCircle(a);case m.defaultImage.type:return this.createImage(a);case m.defaultText.type:return this.createText(a)}console.error("[gfx] unknown shape",a);return null};t.prototype.createGroup=function(){return this.createObject(q.default)};
t.prototype.createRect=function(a){return this.createObject(w.default,a)};t.prototype.createCircle=function(a){return this.createObject(r.default,a)};t.prototype.createImage=function(a){return this.createObject(x.default,a)};t.prototype.createText=function(a){return this.createObject(B.default,a)};t.prototype.createPath=function(a){return this.createObject(v.default,a)};t.prototype.createObject=function(a,d){if(!this.rawNode)return null;var f=new a;a=l._createElementNS(l.xmlns.svg,a.nodeType);f.setRawNode(a);
f.setShape(d);this.add(f);return f};return t}(p.default);t.default=A})},"dojox/gfx/_base":function(){define("dojo/_base/kernel dojo/_base/lang dojo/_base/Color dojo/_base/sniff dojo/_base/window dojo/_base/array dojo/dom dojo/dom-construct dojo/dom-geometry".split(" "),function(A,t,g,a,d,f,m,l,p){var r=t.getObject("dojox.gfx",!0),q=r._base={};r._hasClass=function(a,d){return(a=a.getAttribute("className"))&&0<=(" "+a+" ").indexOf(" "+d+" ")};r._addClass=function(a,d){var f=a.getAttribute("className")||
"";(!f||0>(" "+f+" ").indexOf(" "+d+" "))&&a.setAttribute("className",f+(f?" ":"")+d)};r._removeClass=function(a,d){var f=a.getAttribute("className");f&&a.setAttribute("className",f.replace(new RegExp("(^|\\s+)"+d+"(\\s+|$)"),"$1$2"))};q._getFontMeasurements=function(){var f={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,small:0,medium:0,large:0,"x-large":0,"xx-large":0},g,m;a("ie")&&(m=d.doc.documentElement.style.fontSize||"",m||(d.doc.documentElement.style.fontSize="100%"));
var p=l.create("div",{style:{position:"absolute",left:"0",top:"-100px",width:"30px",height:"1000em",borderWidth:"0",margin:"0",padding:"0",outline:"none",lineHeight:"1",overflow:"hidden"}},d.body());for(g in f)p.style.fontSize=g,f[g]=16*Math.round(12*p.offsetHeight/16)/12/1E3;a("ie")&&(d.doc.documentElement.style.fontSize=m);d.body().removeChild(p);return f};var v=null;q._getCachedFontMeasurements=function(a){if(a||!v)v=q._getFontMeasurements();return v};var x=null,w={};q._getTextBox=function(a,f,
g){var m,q,r=arguments.length,v;x||(x=l.create("div",{style:{position:"absolute",top:"-10000px",left:"0",visibility:"hidden"}},d.body()));m=x;m.className="";q=m.style;q.borderWidth="0";q.margin="0";q.padding="0";q.outline="0";if(1<r&&f)for(v in f)v in w||(q[v]=f[v]);2<r&&g&&(m.className=g);m.innerHTML=a;m.getBoundingClientRect?(q=m.getBoundingClientRect(),q={l:q.left,t:q.top,w:q.width||q.right-q.left,h:q.height||q.bottom-q.top}):q=p.getMarginBox(m);m.innerHTML="";return q};q._computeTextLocation=
function(a,d,f,g){var l={};switch(a.align){case "end":l.x=a.x-d;break;case "middle":l.x=a.x-d/2;break;default:l.x=a.x}l.y=a.y-f*(g?.75:1);return l};q._computeTextBoundingBox=function(a){if(!r._base._isRendered(a))return{x:0,y:0,width:0,height:0};var d;d=a.getShape();var f=a.getFont()||r.defaultFont;a=a.getTextWidth();f=r.normalizedLength(f.size);d=q._computeTextLocation(d,a,f,!0);return{x:d.x,y:d.y,width:a,height:f}};q._isRendered=function(a){for(a=a.parent;a&&a.getParent;)a=a.parent;return null!==
a};var B=0;q._getUniqueId=function(){var a;do a=A._scopeName+"xUnique"+ ++B;while(m.byId(a));return a};q._fixMsTouchAction=function(a){a.rawNode.style.touchAction="none"};t.mixin(r,{defaultPath:{type:"path",path:""},defaultPolyline:{type:"polyline",points:[]},defaultRect:{type:"rect",x:0,y:0,width:100,height:100,r:0},defaultEllipse:{type:"ellipse",cx:0,cy:0,rx:200,ry:100},defaultCircle:{type:"circle",cx:0,cy:0,r:100},defaultLine:{type:"line",x1:0,y1:0,x2:100,y2:100},defaultImage:{type:"image",x:0,
y:0,width:0,height:0,src:""},defaultText:{type:"text",x:0,y:0,text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultTextPath:{type:"textpath",text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultStroke:{type:"stroke",color:"black",style:"solid",width:1,cap:"butt",join:4},defaultLinearGradient:{type:"linear",x1:0,y1:0,x2:100,y2:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultRadialGradient:{type:"radial",cx:0,cy:0,r:100,colors:[{offset:0,color:"black"},
{offset:1,color:"white"}]},defaultPattern:{type:"pattern",x:0,y:0,width:0,height:0,src:""},defaultFont:{type:"font",style:"normal",variant:"normal",weight:"normal",size:"10pt",family:"serif"},getDefault:function(){var a={};return function(d){var f=a[d];if(f)return new f;f=a[d]=new Function;f.prototype=r["default"+d];return new f}}(),normalizeColor:function(a){return a instanceof g?a:new g(a)},normalizeParameters:function(a,d){var f;if(d){var g={};for(f in a)f in d&&!(f in g)&&(a[f]=d[f])}return a},
makeParameters:function(a,d){var f=null;if(!d)return t.delegate(a);var g={};for(f in a)f in g||(g[f]=t.clone(f in d?d[f]:a[f]));return g},formatNumber:function(a,d){var f=a.toString();if(0<=f.indexOf("e"))f=a.toFixed(4);else{var g=f.indexOf(".");0<=g&&5<f.length-g&&(f=a.toFixed(4))}return 0>a?f:d?" "+f:f},makeFontString:function(a){return a.style+" "+a.variant+" "+a.weight+" "+a.size+" "+a.family},splitFontString:function(a){var d=r.getDefault("Font");a=a.split(/\s+/);if(!(5>a.length)){d.style=a[0];
d.variant=a[1];d.weight=a[2];var f=a[3].indexOf("/");d.size=0>f?a[3]:a[3].substring(0,f);var g=4;0>f&&("/"==a[4]?g=6:"/"==a[4].charAt(0)&&(g=5));g<a.length&&(d.family=a.slice(g).join(" "))}return d},cm_in_pt:72/2.54,mm_in_pt:7.2/2.54,px_in_pt:function(){return r._base._getCachedFontMeasurements()["12pt"]/12},pt2px:function(a){return a*r.px_in_pt()},px2pt:function(a){return a/r.px_in_pt()},normalizedLength:function(a){if(0===a.length)return 0;if(2<a.length){var d=r.px_in_pt(),f=parseFloat(a);switch(a.slice(-2)){case "px":return f;
case "pt":return f*d;case "in":return 72*f*d;case "pc":return 12*f*d;case "mm":return f*r.mm_in_pt*d;case "cm":return f*r.cm_in_pt*d}}return parseFloat(a)},pathVmlRegExp:/([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,pathSvgRegExp:/([A-DF-Za-df-z])|([-+]?\d*[.]?\d+(?:[eE][-+]?\d+)?)/g,equalSources:function(a,d){return a&&d&&a===d},switchTo:function(a){var d="string"==typeof a?r[a]:a;d&&(f.forEach("Group Rect Ellipse Circle Line Polyline Image Text Path TextPath EsriPath Surface createSurface fixTarget".split(" "),
function(a){r[a]=d[a]}),"string"==typeof a?r.renderer=a:f.some(["svg","vml","canvas","canvasWithEvents","silverlight"],function(a){return r.renderer=r[a]&&r[a].Surface===r.Surface?a:null}))}});return r})},"esri/views/2d/libs/gfx/Container":function(){define("require exports ../../../../core/tsSupport/extendsHelper dojox/gfx/matrix ./Shape ./svg".split(" "),function(A,t,g,a,d,f){Object.defineProperty(t,"__esModule",{value:!0});A=function(d){function l(){var a=null!==d&&d.apply(this,arguments)||this;
a.children=[];a._batch=0;return a}g(l,d);l.prototype.openBatch=function(){this._batch||(this.fragment=f._createFragment());++this._batch;return this};l.prototype.closeBatch=function(){this._batch=0<this._batch?--this._batch:0;this.fragment&&!this._batch&&(this.rawNode.appendChild(this.fragment),this.fragment=null);return this};l.prototype.add=function(a){if(this===a.getParent())return this;this.fragment?this.fragment.appendChild(a.rawNode):this.rawNode.appendChild(a.rawNode);var d=a.getParent();d&&
d.remove(a,!0);this.children.push(a);a._setParent(this,this._getRealMatrix());return this};l.prototype.remove=function(a,d){void 0===d&&(d=!1);if(this!==a.getParent())return this;this.rawNode===a.rawNode.parentNode&&this.rawNode.removeChild(a.rawNode);this.fragment&&this.fragment===a.rawNode.parentNode&&this.fragment.removeChild(a.rawNode);for(var f=0;f<this.children.length;++f)if(this.children[f]===a){d||(a.parent=null,a.parentMatrix=null);this.children.splice(f,1);break}return this};l.prototype.clear=
function(a){void 0===a&&(a=!1);for(var d=this.rawNode;d.lastChild;)d.removeChild(d.lastChild);var f=this.defNode;if(f){for(;f.lastChild;)f.removeChild(f.lastChild);d.appendChild(f)}for(f=0;f<this.children.length;++f)d=this.children[f],d.parent=null,d.parentMatrix=null,a&&d.destroy();this.children=[];return this};l.prototype.getBoundingBox=function(){if(!this.children)return null;var d=null;this.children.forEach(function(f){var g=f.getBoundingBox();g&&((f=f.getTransform())&&(g=a.multiplyRectangle(f,
g)),d?(d.x=Math.min(d.x,g.x),d.y=Math.min(d.y,g.y),d.endX=Math.max(d.endX,g.x+g.width),d.endY=Math.max(d.endY,g.y+g.height)):d={x:g.x,y:g.y,endX:g.x+g.width,endY:g.y+g.height,width:0,height:0})});d&&(d.width=d.endX-d.x,d.height=d.endY-d.y);return d};l.prototype._moveChildToFront=function(a){for(var d=0;d<this.children.length;++d)if(this.children[d]===a){this.children.splice(d,1);this.children.push(a);break}return this};l.prototype._moveChildToBack=function(a){for(var d=0;d<this.children.length;++d)if(this.children[d]===
a){this.children.splice(d,1);this.children.unshift(a);break}return this};return l}(d.default);t.default=A})},"dojox/gfx/matrix":function(){define(["./_base","dojo/_base/lang"],function(A,t){var g=A.matrix={},a={};g._degToRad=function(d){return a[d]||(a[d]=Math.PI*d/180)};g._radToDeg=function(a){return a/Math.PI*180};g.Matrix2D=function(a){if(a)if("number"==typeof a)this.xx=this.yy=a;else if(a instanceof Array){if(0<a.length){for(var d=g.normalize(a[0]),m=1;m<a.length;++m){var l=d,p=g.normalize(a[m]),
d=new g.Matrix2D;d.xx=l.xx*p.xx+l.xy*p.yx;d.xy=l.xx*p.xy+l.xy*p.yy;d.yx=l.yx*p.xx+l.yy*p.yx;d.yy=l.yx*p.xy+l.yy*p.yy;d.dx=l.xx*p.dx+l.xy*p.dy+l.dx;d.dy=l.yx*p.dx+l.yy*p.dy+l.dy}t.mixin(this,d)}}else t.mixin(this,a)};t.extend(g.Matrix2D,{xx:1,xy:0,yx:0,yy:1,dx:0,dy:0});t.mixin(g,{identity:new g.Matrix2D,flipX:new g.Matrix2D({xx:-1}),flipY:new g.Matrix2D({yy:-1}),flipXY:new g.Matrix2D({xx:-1,yy:-1}),translate:function(a,f){return 1<arguments.length?new g.Matrix2D({dx:a,dy:f}):new g.Matrix2D({dx:a.x,
dy:a.y})},scale:function(a,f){return 1<arguments.length?new g.Matrix2D({xx:a,yy:f}):"number"==typeof a?new g.Matrix2D({xx:a,yy:a}):new g.Matrix2D({xx:a.x,yy:a.y})},rotate:function(a){var d=Math.cos(a);a=Math.sin(a);return new g.Matrix2D({xx:d,xy:-a,yx:a,yy:d})},rotateg:function(a){return g.rotate(g._degToRad(a))},skewX:function(a){return new g.Matrix2D({xy:Math.tan(a)})},skewXg:function(a){return g.skewX(g._degToRad(a))},skewY:function(a){return new g.Matrix2D({yx:Math.tan(a)})},skewYg:function(a){return g.skewY(g._degToRad(a))},
reflect:function(a,f){1==arguments.length&&(f=a.y,a=a.x);var d=a*a,l=f*f,p=d+l,r=2*a*f/p;return new g.Matrix2D({xx:2*d/p-1,xy:r,yx:r,yy:2*l/p-1})},project:function(a,f){1==arguments.length&&(f=a.y,a=a.x);var d=a*a,l=f*f,p=d+l,r=a*f/p;return new g.Matrix2D({xx:d/p,xy:r,yx:r,yy:l/p})},normalize:function(a){return a instanceof g.Matrix2D?a:new g.Matrix2D(a)},isIdentity:function(a){return 1==a.xx&&0==a.xy&&0==a.yx&&1==a.yy&&0==a.dx&&0==a.dy},clone:function(a){var d=new g.Matrix2D,m;for(m in a)"number"==
typeof a[m]&&"number"==typeof d[m]&&d[m]!=a[m]&&(d[m]=a[m]);return d},invert:function(a){a=g.normalize(a);var d=a.xx*a.yy-a.xy*a.yx;return a=new g.Matrix2D({xx:a.yy/d,xy:-a.xy/d,yx:-a.yx/d,yy:a.xx/d,dx:(a.xy*a.dy-a.yy*a.dx)/d,dy:(a.yx*a.dx-a.xx*a.dy)/d})},_multiplyPoint:function(a,f,g){return{x:a.xx*f+a.xy*g+a.dx,y:a.yx*f+a.yy*g+a.dy}},multiplyPoint:function(a,f,m){a=g.normalize(a);return"number"==typeof f&&"number"==typeof m?g._multiplyPoint(a,f,m):g._multiplyPoint(a,f.x,f.y)},multiplyRectangle:function(a,
f){var d=g.normalize(a);f=f||{x:0,y:0,width:0,height:0};if(g.isIdentity(d))return{x:f.x,y:f.y,width:f.width,height:f.height};a=g.multiplyPoint(d,f.x,f.y);var l=g.multiplyPoint(d,f.x,f.y+f.height),p=g.multiplyPoint(d,f.x+f.width,f.y);f=g.multiplyPoint(d,f.x+f.width,f.y+f.height);var d=Math.min(a.x,l.x,p.x,f.x),r=Math.min(a.y,l.y,p.y,f.y);return{x:d,y:r,width:Math.max(a.x,l.x,p.x,f.x)-d,height:Math.max(a.y,l.y,p.y,f.y)-r}},multiply:function(a){for(var d=g.normalize(a),m=1;m<arguments.length;++m){var l=
d,p=g.normalize(arguments[m]),d=new g.Matrix2D;d.xx=l.xx*p.xx+l.xy*p.yx;d.xy=l.xx*p.xy+l.xy*p.yy;d.yx=l.yx*p.xx+l.yy*p.yx;d.yy=l.yx*p.xy+l.yy*p.yy;d.dx=l.xx*p.dx+l.xy*p.dy+l.dx;d.dy=l.yx*p.dx+l.yy*p.dy+l.dy}return d},_sandwich:function(a,f,m){return g.multiply(g.translate(f,m),a,g.translate(-f,-m))},scaleAt:function(a,f,m,l){switch(arguments.length){case 4:return g._sandwich(g.scale(a,f),m,l);case 3:return"number"==typeof m?g._sandwich(g.scale(a),f,m):g._sandwich(g.scale(a,f),m.x,m.y)}return g._sandwich(g.scale(a),
f.x,f.y)},rotateAt:function(a,f,m){return 2<arguments.length?g._sandwich(g.rotate(a),f,m):g._sandwich(g.rotate(a),f.x,f.y)},rotategAt:function(a,f,m){return 2<arguments.length?g._sandwich(g.rotateg(a),f,m):g._sandwich(g.rotateg(a),f.x,f.y)},skewXAt:function(a,f,m){return 2<arguments.length?g._sandwich(g.skewX(a),f,m):g._sandwich(g.skewX(a),f.x,f.y)},skewXgAt:function(a,f,m){return 2<arguments.length?g._sandwich(g.skewXg(a),f,m):g._sandwich(g.skewXg(a),f.x,f.y)},skewYAt:function(a,f,m){return 2<arguments.length?
g._sandwich(g.skewY(a),f,m):g._sandwich(g.skewY(a),f.x,f.y)},skewYgAt:function(a,f,m){return 2<arguments.length?g._sandwich(g.skewYg(a),f,m):g._sandwich(g.skewYg(a),f.x,f.y)}});A.Matrix2D=g.Matrix2D;return g})},"esri/views/2d/libs/gfx/Shape":function(){define("require exports dojox/gfx/_base dojo/_base/lang dojo/_base/Color dojo/dom dojo/dom-attr ./svg ./Surface ../gl-matrix/mat2d".split(" "),function(A,t,g,a,d,f,m,l,p,r){Object.defineProperty(t,"__esModule",{value:!0});A=function(){function q(){this.parentMatrix=
this.parent=this.bbox=this.strokeStyle=this.fillStyle=this.matrix=this.shape=this.rawNode=null}q.prototype.destroy=function(){if(this.fillStyle&&"type"in this.fillStyle){var a=this.rawNode.getAttribute("fill");(a=l.getRef(a))&&a.parentNode.removeChild(a)}this.rawNode&&"__gfxObject__"in this.rawNode&&(this.rawNode.__gfxObject__=null);this.rawNode=null};q.prototype.getNode=function(){return this.rawNode};q.prototype.getShape=function(){return this.shape};q.prototype.getTransform=function(){return this.matrix};
q.prototype.getFill=function(){return this.fillStyle};q.prototype.getStroke=function(){return this.strokeStyle};q.prototype.getParent=function(){return this.parent};q.prototype.getBoundingBox=function(){return this.bbox};q.prototype.setTransform=function(a){this.matrix=this.matrix?r.copy(this.matrix,a):r.clone(a);return this._applyTransform()};q.prototype.setFill=function(a){if(!a)return this.fillStyle=null,this.rawNode.setAttribute("fill","none"),this.rawNode.setAttribute("fill-opacity",0),this;
var d;if("object"===typeof a&&"type"in a){switch(a.type){case "linear":d=g.makeParameters(g.defaultLinearGradient,a);a=this._setFillObject(d,"linearGradient");a.setAttribute("x1",d.x1.toFixed(8));a.setAttribute("y1",d.y1.toFixed(8));a.setAttribute("x2",d.x2.toFixed(8));a.setAttribute("y2",d.y2.toFixed(8));break;case "radial":d=g.makeParameters(g.defaultRadialGradient,a);a=this._setFillObject(d,"radialGradient");a.setAttribute("cx",d.cx.toFixed(8));a.setAttribute("cy",d.cy.toFixed(8));a.setAttribute("r",
d.r.toFixed(8));break;case "pattern":d=g.makeParameters(g.defaultPattern,a),a=this._setFillObject(d,"pattern"),a.setAttribute("x",d.x.toFixed(8)),a.setAttribute("y",d.y.toFixed(8)),a.setAttribute("width",d.width.toFixed(8)),a.setAttribute("height",d.height.toFixed(8))}this.fillStyle=d;return this}this.fillStyle=d=g.normalizeColor(a);this.rawNode.setAttribute("fill",d.toCss());this.rawNode.setAttribute("fill-opacity",d.a);this.rawNode.setAttribute("fill-rule","evenodd");return this};q.prototype.setStroke=
function(f){var m=this.rawNode;if(!f)return this.strokeStyle=null,m.setAttribute("stroke","none"),m.setAttribute("stroke-opacity",0),this;if("string"===typeof f||a.isArray(f)||f instanceof d)f={color:f};f=this.strokeStyle=g.makeParameters(g.defaultStroke,f);f.color=g.normalizeColor(f.color);if(f){var p=0>f.width?0:f.width;m.setAttribute("stroke",f.color.toCss());m.setAttribute("stroke-opacity",f.color.a);m.setAttribute("stroke-width",p);m.setAttribute("stroke-linecap",f.cap);"number"===typeof f.join?
(m.setAttribute("stroke-linejoin","miter"),m.setAttribute("stroke-miterlimit",f.join)):m.setAttribute("stroke-linejoin",f.join);var q=f.style.toLowerCase();q in l.dasharray&&(q=l.dasharray[q]);if(q instanceof Array){for(var q=a._toArray(q),r=0;r<q.length;++r)q[r]*=p;if("butt"!==f.cap){for(r=0;r<q.length;r+=2)q[r]-=p,1>q[r]&&(q[r]=1);for(r=1;r<q.length;r+=2)q[r]+=p}q=q.join(",")}m.setAttribute("stroke-dasharray",q);m.setAttribute("dojoGfxStrokeStyle",f.style)}return this};q.prototype._getParentSurface=
function(){for(var a=this.parent;a&&!(a instanceof p.default);a=a.parent);return a};q.prototype._setFillObject=function(a,d){var f=l.xmlns.svg;this.fillStyle=a;var m=this._getParentSurface().defNode,p=this.rawNode.getAttribute("fill");if(p=l.getRef(p))if(p.tagName.toLowerCase()!==d.toLowerCase()){var q=p.id;p.parentNode.removeChild(p);p=l._createElementNS(f,d);p.setAttribute("id",q);m.appendChild(p)}else for(;p.childNodes.length;)p.removeChild(p.lastChild);else p=l._createElementNS(f,d),p.setAttribute("id",
g._base._getUniqueId()),m.appendChild(p);if("pattern"===d)p.setAttribute("patternUnits","userSpaceOnUse"),f=l._createElementNS(f,"image"),f.setAttribute("x",0),f.setAttribute("y",0),f.setAttribute("width",(0>a.width?0:a.width).toFixed(8)),f.setAttribute("height",(0>a.height?0:a.height).toFixed(8)),l._setAttributeNS(f,l.xmlns.xlink,"xlink:href",a.src),p.appendChild(f);else for(p.setAttribute("gradientUnits","userSpaceOnUse"),d=0;d<a.colors.length;++d){var m=a.colors[d],q=l._createElementNS(f,"stop"),
r=m.color=g.normalizeColor(m.color);q.setAttribute("offset",m.offset.toFixed(8));q.setAttribute("stop-color",r.toCss());q.setAttribute("stop-opacity",r.a);p.appendChild(q)}this.rawNode.setAttribute("fill","url(#"+p.getAttribute("id")+")");this.rawNode.removeAttribute("fill-opacity");this.rawNode.setAttribute("fill-rule","evenodd");return p};q.prototype._applyTransform=function(){var a=this.matrix;a?this.rawNode.setAttribute("transform","matrix("+a[0].toFixed(8)+","+a[1].toFixed(8)+","+a[2].toFixed(8)+
","+a[3].toFixed(8)+","+a[4].toFixed(8)+","+a[5].toFixed(8)+")"):this.rawNode.removeAttribute("transform");return this};q.prototype.setRawNode=function(a){a=this.rawNode=a;"image"!==this.shape.type&&a.setAttribute("fill","none");a.setAttribute("fill-opacity",0);a.setAttribute("stroke","none");a.setAttribute("stroke-opacity",0);a.setAttribute("stroke-width",1);a.setAttribute("stroke-linecap","butt");a.setAttribute("stroke-linejoin","miter");a.setAttribute("stroke-miterlimit",4);a.__gfxObject__=this};
q.prototype.setShape=function(a){this.shape=g.makeParameters(this.shape,a);for(var d in this.shape)if("type"!==d){a=this.shape[d];if("width"===d||"height"===d)a=0>a?0:a;this.rawNode.setAttribute(d,a)}this.bbox=null;return this};q.prototype._moveToFront=function(){this.rawNode.parentNode.appendChild(this.rawNode);return this};q.prototype._moveToBack=function(){this.rawNode.parentNode.insertBefore(this.rawNode,this.rawNode.parentNode.firstChild);return this};q.prototype._removeClipNode=function(){var a,
d=m.get(this.rawNode,"clip-path");d&&(a=f.byId(d.match(/gfx_clip[\d]+/)[0]))&&a.parentNode.removeChild(a);return a};q.prototype.moveToFront=function(){var a=this.getParent();a&&(a._moveChildToFront(this),this._moveToFront());return this};q.prototype.moveToBack=function(){var a=this.getParent();a&&(a._moveChildToBack(this),this._moveToBack());return this};q.prototype.removeShape=function(a){this.parent&&this.parent.remove(this,a);return this};q.prototype._setParent=function(a,d){this.parent=a;return this._updateParentMatrix(d)};
q.prototype._updateParentMatrix=function(a){this.parentMatrix=a?r.clone(a):null;return this._applyTransform()};q.prototype._getRealMatrix=function(){for(var a=r.clone(this.matrix||r.create()),d=this.parent;d;)d.matrix&&a&&r.multiply(a,d.matrix,a),d=d.parent;return a};return q}();t.default=A})},"esri/views/2d/libs/gfx/Circle":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","./Shape","dojox/gfx/_base"],function(A,t,g,a,d){Object.defineProperty(t,"__esModule",{value:!0});
A=function(a){function f(f){var g=a.call(this)||this;g.shape=d.getDefault("Circle");g.rawNode=f;return g}g(f,a);f.prototype.getBoundingBox=function(){if(!this.bbox){var a=this.shape;this.bbox={x:a.cx-a.r,y:a.cy-a.r,width:2*a.r,height:2*a.r}}return this.bbox};f.nodeType="circle";return f}(a.default);t.default=A})},"esri/views/2d/libs/gfx/Group":function(){define("require exports ../../../../core/tsSupport/extendsHelper ./Container dojox/gfx/_base ./svg ./Circle ./Path ./Image ./Rect ./Text".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q){Object.defineProperty(t,"__esModule",{value:!0});A=function(a){function v(){return null!==a&&a.apply(this,arguments)||this}g(v,a);v.prototype.setRawNode=function(a){this.rawNode=a;this.rawNode.__gfxObject__=this};v.prototype.destroy=function(){a.prototype.clear.call(this,!0);a.prototype.destroy.call(this)};v.prototype.createShape=function(a){switch(a.type){case d.defaultPath.type:return this.createPath(a);case d.defaultRect.type:return this.createRect(a);case d.defaultCircle.type:return this.createCircle(a);
case d.defaultImage.type:return this.createImage(a);case d.defaultText.type:return this.createText(a)}console.error("[gfx] unknown shape",a);return null};v.prototype.createGroup=function(){return this.createObject(v)};v.prototype.createRect=function(a){return this.createObject(r.default,a)};v.prototype.createCircle=function(a){return this.createObject(m.default,a)};v.prototype.createImage=function(a){return this.createObject(p.default,a)};v.prototype.createText=function(a){return this.createObject(q.default,
a)};v.prototype.createPath=function(a){return this.createObject(l.default,a)};v.prototype.createObject=function(a,d){if(!this.rawNode)return null;var g=new a;a=f._createElementNS(f.xmlns.svg,a.nodeType);g.setRawNode(a);g.setShape(d);this.add(g);return g};v.nodeType="g";return v}(a.default);t.default=A})},"esri/views/2d/libs/gfx/Path":function(){define("require exports ../../../../core/tsSupport/extendsHelper dojo/_base/lang dojox/gfx/_base dojox/gfx/matrix ./Shape".split(" "),function(A,t,g,a,d,f,
m){Object.defineProperty(t,"__esModule",{value:!0});A=function(l){function m(f){var g=l.call(this)||this;g.segments=[];g.tbbox=null;g.absolute=!0;g.last={};g.segmented=!1;g._validSegments={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0};g._2PI=2*Math.PI;g.rawNode=f;g.shape=a.clone(d.defaultPath);return g}g(m,l);m.prototype.setAbsoluteMode=function(a){this._confirmSegmented();this.absolute="string"===typeof a?"absolute"===a:a;return this};m.prototype.getAbsoluteMode=function(){this._confirmSegmented();return this.absolute};
m.prototype.getBoundingBox=function(){this._confirmSegmented();return this.bbox&&"l"in this.bbox?{x:this.bbox.l,y:this.bbox.t,width:this.bbox.r-this.bbox.l,height:this.bbox.b-this.bbox.t}:null};m.prototype._getRealBBox=function(){this._confirmSegmented();if(this.tbbox)return this.tbbox;var a=this.bbox,d=this._getRealMatrix();this.bbox=null;for(var f=this.segments.length,g=0;g<f;++g)this._updateWithSegment(this.segments[g],d);d=this.bbox;this.bbox=a;return this.tbbox=d?[{x:d.l,y:d.t},{x:d.r,y:d.t},
{x:d.r,y:d.b},{x:d.l,y:d.b}]:null};m.prototype.getLastPosition=function(){this._confirmSegmented();return"x"in this.last?this.last:null};m.prototype._applyTransform=function(){this.tbbox=null;l.prototype._applyTransform.call(this);return this};m.prototype._updateBBox=function(a,d,g){g&&(d=f.multiplyPoint(g,a,d),a=d.x,d=d.y);this.bbox&&"l"in this.bbox?(this.bbox.l>a&&(this.bbox.l=a),this.bbox.r<a&&(this.bbox.r=a),this.bbox.t>d&&(this.bbox.t=d),this.bbox.b<d&&(this.bbox.b=d)):this.bbox={l:a,b:d,r:a,
t:d}};m.prototype._updateWithSegment=function(a,f){var g=a.args,l=g.length,m;switch(a.action){case "M":case "L":case "C":case "S":case "Q":case "T":for(m=0;m<l;m+=2)this._updateBBox(g[m],g[m+1],f);this.last.x=g[l-2];this.last.y=g[l-1];this.absolute=!0;break;case "H":for(m=0;m<l;++m)this._updateBBox(g[m],this.last.y,f);this.last.x=g[l-1];this.absolute=!0;break;case "V":for(m=0;m<l;++m)this._updateBBox(this.last.x,g[m],f);this.last.y=g[l-1];this.absolute=!0;break;case "m":m=0;"x"in this.last||(this._updateBBox(this.last.x=
g[0],this.last.y=g[1],f),m=2);for(;m<l;m+=2)this._updateBBox(this.last.x+=g[m],this.last.y+=g[m+1],f);this.absolute=!1;break;case "l":case "t":for(m=0;m<l;m+=2)this._updateBBox(this.last.x+=g[m],this.last.y+=g[m+1],f);this.absolute=!1;break;case "h":for(m=0;m<l;++m)this._updateBBox(this.last.x+=g[m],this.last.y,f);this.absolute=!1;break;case "v":for(m=0;m<l;++m)this._updateBBox(this.last.x,this.last.y+=g[m],f);this.absolute=!1;break;case "c":for(m=0;m<l;m+=6)this._updateBBox(this.last.x+g[m],this.last.y+
g[m+1],f),this._updateBBox(this.last.x+g[m+2],this.last.y+g[m+3],f),this._updateBBox(this.last.x+=g[m+4],this.last.y+=g[m+5],f);this.absolute=!1;break;case "s":case "q":for(m=0;m<l;m+=4)this._updateBBox(this.last.x+g[m],this.last.y+g[m+1],f),this._updateBBox(this.last.x+=g[m+2],this.last.y+=g[m+3],f);this.absolute=!1;break;case "A":for(m=0;m<l;m+=7)this._updateBBox(g[m+5],g[m+6],f);this.last.x=g[l-2];this.last.y=g[l-1];this.absolute=!0;break;case "a":for(m=0;m<l;m+=7)this._updateBBox(this.last.x+=
g[m+5],this.last.y+=g[m+6],f);this.absolute=!1}a=[a.action];for(m=0;m<l;++m)a.push(d.formatNumber(g[m],!0));if("string"===typeof this.shape.path)this.shape.path+=a.join("");else for(m=0,l=a.length;m<l;++m)this.shape.path.push(a[m]);"string"===typeof this.shape.path&&this.rawNode.setAttribute("d",this.shape.path)};m.prototype._pushSegment=function(a,d){this.tbbox=null;var f=this._validSegments[a.toLowerCase()];"number"===typeof f&&(f?d.length>=f&&(a={action:a,args:d.slice(0,d.length-d.length%f)},this.segments.push(a),
this._updateWithSegment(a)):(a={action:a,args:[]},this.segments.push(a),this._updateWithSegment(a)))};m.prototype._collectArgs=function(a,d){for(var f=0;f<d.length;++f){var g=d[f];"boolean"===typeof g?a.push(g?1:0):"number"===typeof g?a.push(g):g instanceof Array?this._collectArgs(a,g):"x"in g&&"y"in g&&a.push(g.x,g.y)}};m.prototype._confirmSegmented=function(){if(!this.segmented){var a=this.shape.path;this.shape.path=[];this._setPath(a);this.shape.path=this.shape.path.join("");this.segmented=!0}};
m.prototype._setPath=function(f){f=a.isArray(f)?f:f.match(d.pathSvgRegExp);this.segments=[];this.absolute=!0;this.bbox={};this.last={};if(f){for(var g="",l=[],m=f.length,p=0;p<m;++p){var r=f[p],t=parseFloat(r);isNaN(t)?(g&&this._pushSegment(g,l),l=[],g=r):l.push(t)}this._pushSegment(g,l)}};m.prototype.setShape=function(a){l.prototype.setShape.call(this,"string"===typeof a?{path:a}:a);this.segmented=!1;this.segments=[];this.shape.path?this.rawNode.setAttribute("d",this.shape.path):this.rawNode.removeAttribute("d");
return this};m.nodeType="path";return m}(m.default);t.default=A})},"esri/views/2d/libs/gfx/Image":function(){define("require exports ../../../../core/tsSupport/extendsHelper dojox/gfx/_base ./Shape ./svg".split(" "),function(A,t,g,a,d,f){Object.defineProperty(t,"__esModule",{value:!0});A=function(d){function l(f){var g=d.call(this)||this;g.shape=a.getDefault("Image");g.rawNode=f;return g}g(l,d);l.prototype.setShape=function(d){this.shape=a.makeParameters(this.shape,d);this.bbox=null;d=this.rawNode;
for(var g in this.shape)if("type"!==g&&"src"!==g){var l=this.shape[g];if("width"===g||"height"===g)l=0>l?0:l;d.setAttribute(g,l)}d.setAttribute("preserveAspectRatio","none");f._setAttributeNS(d,f.xmlns.xlink,"xlink:href",this.shape.src);d.__gfxObject__=this;return this};l.prototype.getBoundingBox=function(){return this.shape};l.prototype.setStroke=function(){return this};l.prototype.setFill=function(){return this};l.nodeType="image";return l}(d.default);t.default=A})},"esri/views/2d/libs/gfx/Rect":function(){define(["require",
"exports","../../../../core/tsSupport/extendsHelper","dojox/gfx/_base","./Shape"],function(A,t,g,a,d){Object.defineProperty(t,"__esModule",{value:!0});A=function(d){function f(f){var g=d.call(this)||this;g.shape=a.getDefault("Rect");g.rawNode=f;return g}g(f,d);f.prototype.getBoundingBox=function(){return this.shape};f.prototype.setShape=function(d){this.shape=a.makeParameters(this.shape,d);this.bbox=null;for(var f in this.shape)if("type"!==f&&"r"!==f){d=this.shape[f];if("width"===f||"height"===f)d=
0>d?0:d;this.rawNode.setAttribute(f,d)}null!=this.shape.r&&(this.rawNode.setAttribute("ry",this.shape.r),this.rawNode.setAttribute("rx",this.shape.r));return this};f.nodeType="rect";return f}(d.default);t.default=A})},"esri/views/2d/libs/gfx/Text":function(){define("require exports ../../../../core/tsSupport/extendsHelper dojo/has dojox/gfx/_base ./Shape ./svg".split(" "),function(A,t,g,a,d,f,m){Object.defineProperty(t,"__esModule",{value:!0});var l=a("chrome")?"auto":"optimizeLegibility";A=function(a){function f(f){var g=
a.call(this)||this;g.fontStyle=null;g.shape=d.getDefault("Text");g.rawNode=f;return g}g(f,a);f.prototype.getFont=function(){return this.fontStyle};f.prototype.setFont=function(a){this.fontStyle="string"===typeof a?d.splitFontString(a):d.makeParameters(d.defaultFont,a);this._setFont();return this};f.prototype._setFont=function(){var a=this.fontStyle;this.rawNode.setAttribute("font-style",a.style);this.rawNode.setAttribute("font-weight",a.weight);this.rawNode.setAttribute("font-size",a.size);this.rawNode.setAttribute("font-family",
a.family)};f.prototype.setShape=function(a){this.shape=d.makeParameters(this.shape,a);this.bbox=null;a=this.rawNode;var f=this.shape;a.setAttribute("x",f.x);a.setAttribute("y",f.y);a.setAttribute("text-anchor",f.align);a.setAttribute("text-decoration",f.decoration);a.setAttribute("rotate",f.rotated?90:0);a.setAttribute("kerning",f.kerning?"auto":0);a.setAttribute("text-rendering",l);a.firstChild?a.firstChild.nodeValue=f.text:a.appendChild(m._createTextNode(f.text));return this};f.prototype.getTextWidth=
function(){var a=this.rawNode,d=a.parentNode,a=a.cloneNode(!0);a.style.visibility="hidden";var f=0,g=a.firstChild.nodeValue;d.appendChild(a);if(""!==g)for(;!f;)f=a.getBBox?parseInt(a.getBBox().width,10):68;d.removeChild(a);return f};f.prototype.getBoundingBox=function(){var a=null;if(this.getShape().text)try{a=this.rawNode.getBBox()}catch(v){a={x:0,y:0,width:0,height:0}}return a};f.nodeType="text";return f}(f.default);t.default=A})},"esri/views/2d/engine/graphics/Projector":function(){define(["require",
"exports"],function(A,t){function g(a,l,p,r,q){void 0===r&&(r=0);void 0===q&&(q=a.length);for(var m=a[r],t=a[q-1],w=0,B=0,E,D=r+1;D<q-1;D++){var F=a[D];E=F[0];var F=F[1],A=m[0],I=m[1],z=t[0],M=t[1];A===z?E=d(E-A):(z=(M-I)/(z-A),E=d(z*E-F+(I-z*A))/f(z*z+1));E>w&&(B=D,w=E)}w>l?(g(a,l,p,r,B+1),g(a,l,p,B,q)):(p(m[0],m[1]),p(t[0],t[1]))}var a=Math.round,d=Math.abs,f=Math.sqrt;return function(){function d(){this._transform=null}d.prototype.update=function(a,d){this._transform=a;this._resolution=d};d.prototype.toScreenPoint=
function(a,d,f){this.transformPoint(d.x+f*this._resolution,d.y,function(d,f){a.x=d;a.y=f});return a};d.prototype.toScreenPath=function(a,d){var f=this,l=null!=a.paths;a=l?a.paths:a.rings;var m="",p=function(a,g){a+=d*f._resolution;f.transformPoint(a,g,function(a,d){isNaN(a)||isNaN(d)||(m+=a,m+=",",m+=d,m+=" ")})};if(a)for(var t=a.length,B=0;B<t;B++)m+="M ",g(a[B],this._resolution,p),l||(m+="Z ");return m};d.prototype.transformPoint=function(d,f,g){var l=this._transform,m=l[1],p=l[3],r=l[5];g(a(l[0]*
d+l[2]*f+l[4]),a(m*d+p*f+r))};return d}()})},"esri/views/2d/engine/cssUtils":function(){define(["require","exports","dojo/has"],function(A,t,g){function a(a){return"matrix3d(\n "+a[0].toFixed(10)+", "+a[1].toFixed(10)+", 0, 0,\n "+a[2].toFixed(10)+", "+a[3].toFixed(10)+", 0, 0,\n 0, 0, 1, 0,\n "+Math.round(a[4]).toFixed(10)+", "+Math.round(a[5]).toFixed(10)+", 0, 1\n )"}function d(a){return"translate("+Math.round(a[0])+
"px, "+Math.round(a[1])+"px)"}function f(a){return"rotateZ( "+a+" deg)"}Object.defineProperty(t,"__esModule",{value:!0});g("ie");A=g("webkit");g("opera");var m=A&&"-webkit-transform"||"-moz-transform";t.clip=function(a,d){a.clip=d?"rect( "+d.top+"px, "+d.right+"px, "+d.bottom+"px, "+d.left+"px)":""};t.setTransform=function(f,g){var l=null;2===g.length&&(l=d(g));6===g.length&&(l=a(g));f.transform=f[m]=l};t.setOrigin=function(a,d){a.transformOrigin=d[0]+"px "+d[1]+"px 0"};t.cssMatrix=function(a){return"matrix(\n "+
a[0].toFixed(10)+", "+a[1].toFixed(10)+",\n "+a[2].toFixed(10)+", "+a[3].toFixed(10)+",\n "+a[4]+", "+a[5]+"\n )"};t.cssMatrix3d=a;t.translate=d;t.rotate=function(a){return f(a.toFixed(3))};t.rotateZ=f})},"esri/views/2d/engine/graphics/GFXGroup":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","dojo/_base/lang","../Container"],function(A,t,g,a,d){return function(d){function f(){return null!==d&&d.apply(this,arguments)||
this}g(f,d);f.prototype.attach=function(a){this.g=a.surface.createGroup();return d.prototype.attach.call(this,a)};f.prototype.detach=function(a){d.prototype.detach.call(this,a);this.g.destroy();this.g=null};f.prototype.prepareChildrenRenderParameters=function(d){return a.mixin({},d,{surface:this.g})};f.prototype.detachChild=function(a,d){return a.detach(d)};f.prototype.attachChild=function(a,d){return a.attach(d)};f.prototype.renderChild=function(a,d){return a.processRender(d)};return f}(d)})},"esri/views/2d/engine/graphics/GFXObject":function(){define("require exports ../../../../core/tsSupport/extendsHelper ../../../../geometry ../../../../geometry/support/webMercatorUtils ../../../../geometry/support/spatialReferenceUtils ../DisplayObject ./gfxUtils".split(" "),
function(A,t,g,a,d,f,m,l){var p=new Set,r=[];return function(m){function q(){var a=null!==m&&m.apply(this,arguments)||this;a._prevStateId=null;a.visible=!0;return a}g(q,m);Object.defineProperty(q.prototype,"graphic",{get:function(){return this._graphic},set:function(a){this._geometry=(this._graphic=a)&&a.geometry||null;this._projected=null;this.requestRender()},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"geometry",{get:function(){return this._geometry},enumerable:!0,configurable:!0});
Object.defineProperty(q.prototype,"isPolygonMarkerSymbol",{get:function(){var a=this.renderingInfo.symbol.type,d=this.geometry;return d&&"polygon"===d.type&&("simple-marker"===a||"picture-marker"===a||"text"===a)},enumerable:!0,configurable:!0});Object.defineProperty(q.prototype,"renderingInfo",{get:function(){return this._renderingInfo},set:function(a){this._renderingInfo=a;this.requestRender()},enumerable:!0,configurable:!0});q.prototype.detach=function(){this._removeShape();this._drawInfo=this._projected=
null};q.prototype.doRender=function(a){var d=a.surface,f=a.state,g=a.projector,m=this._prevStateId!==f.id;if(this.renderRequested||m)if(m&&a.stationary&&(this._prevStateId=f.id),m=this.visible&&this._projectGeometry(this.geometry,a.state.spatialReference),a=this._getScreenOffsets([],a.state),l.isShapeInvalid(this.renderingInfo.symbol,this._shape)&&this._removeShape(),a.length){var p=this._shape,q=m.type;if(!p||this._showRedraw(a,f))"point"===q?(p=l.drawPoint(g,d,m,p,this.renderingInfo,f.rotation,
a),l.stylePoint(p,this.renderingInfo)):"multipoint"===q?(p=l.drawMarkers(g,d,m,p,this.renderingInfo,f.rotation,a),l.styleMarkers(p,this.renderingInfo)):(p=l.drawShape(g,d,m,p,a),l.styleShape(p,this.renderingInfo)),this._shape=p,p.getNode().gfxObject=this}else this._removeShape()};q.prototype._getScreenOffsets=function(a,d){var g=d.clippedExtent,l=this._projected.outExtent,m=d.spatialReference;a.length=0;if(!l)return a;if(m.isWrappable){var m=f.getInfo(m),q=l.cache._partwise,g=g._getParts(m);r.length=
0;if(q&&q.length)for(l=0;l<q.length;l++)r.push.apply(r,q[l]._getParts(m));else r.push.apply(r,l._getParts(m));d=d.worldScreenWidth;a.length=0;p.clear();l=r.length;for(m=0;m<l;m++)for(var t=r[m],q=t.extent,t=t.frameIds,v=t.length,x=g.length,w=0;w<x;w++){var A=g[w];if(A.extent.intersects(q))for(var L=v,N=0;N<L;N++){var Q=(A.frameIds[0]-t[N])*d;p.has(Q)||(a.push(Q),p.add(Q))}}a.sort()}else g.intersects(l)&&a.push(0);return a};q.prototype._projectGeometry=function(a,f){var g=this._projected;a=this.isPolygonMarkerSymbol?
a.centroid:a;if(g&&g.inGeometry===a&&g.outSpatialReference===f)return g.outGeometry;a&&a.spatialReference.equals(f)?this._projected={inGeometry:a,outGeometry:a,outSpatialReference:f,outExtent:this._getExtent(a)}:d.canProject(a,f)?this._projected={inGeometry:a,outGeometry:d.project(a,f),outSpatialReference:f,outExtent:this._getExtent(a)}:this._projected={inGeometry:a,outGeometry:null,outSpatialReference:f,outExtent:null};return this._projected.outGeometry};q.prototype._getExtent=function(d){var f=
d.extent;if(!f){var g=f=void 0;"esri.geometry.Point"===d.declaredClass?(f=d.x,g=d.y):"esri.geometry.Multipoint"===d.declaredClass&&(f=d.points[0][0],g=d.points[0][1]);f=new a.Extent(f,g,f,g,d.spatialReference)}return f};q.prototype._removeShape=function(){var a=this._shape;a&&(a.removeShape(),a.getNode().gfxObject=null,a.destroy());this._shape=this._drawInfo=null};q.prototype._showRedraw=function(a,d){return!0};return q}(m)})},"esri/views/2d/engine/graphics/gfxUtils":function(){define("require exports dojo/_base/lang ../../libs/gl-matrix/mat2d ../../libs/gl-matrix/mat2dExtras ../../../../core/screenUtils ../../../../geometry/Polygon ../../../../symbols/SimpleMarkerSymbol ../../../../symbols/support/gfxUtils ../../../../Color".split(" "),
function(A,t,g,a,d,f,m,l,p,r){function q(a,d){d.toRgba?(a[0]=d.r,a[1]=d.g,a[2]=d.b,a[3]=d.a):(a[0]=d[0],a[1]=d[1],a[2]=d[2],a[3]=d[3]);return a}function v(a,d,f){null!=f&&(a[0]=d[0],a[1]=d[1],a[2]=d[2],a[3]=f);return a}function x(a,d,f){var g=d[0]/d[1];a[0]=a[1]=1;isNaN(f)||(1<g?(a[0]=f/d[0],a[1]=f/g/d[1]):(a[1]=f/d[1],a[0]=f*g/d[0]));return a}function w(g,m,q,r,t,v,w){var z=t.symbol;q=g.toScreenPoint(M,q,w[0]);w=[q.x,q.y];g=q.x;q=q.y;var h=t.heading,A=t.size&&t.size[0],y,c;a.identity(K);"number"===
typeof A&&(c=isFinite(A)&&A);c=(A=c&&isFinite(c)&&!isNaN(c))?f.pt2px(c):NaN;v&&d.rotategAt(K,K,v,w);h&&d.rotategAt(K,K,h,w);v=f.pt2px(z.xoffset);var h=f.pt2px(z.yoffset),b;if(0!==v||0!==h)b=[v,-h];v=null;0!==z.angle&&(v=a.create(),d.rotategAt(v,v,z.angle,w));var e;if("simple-marker"===z.type)switch(y=z.style,t=Math.round,c=A?c:f.pt2px(z.size),A=void 0,y){case l.STYLE_SQUARE:case l.STYLE_CROSS:case l.STYLE_X:case l.STYLE_DIAMOND:A=isNaN(c)?16:.5*c;y=D(m,r,I(y,g,q,t(g-A),t(g+A),t(q-A),t(q+A)));break;
case l.STYLE_PATH:y=e=D(m,r,z.path);e=e.getBoundingBox();z=x(a.create(),[e.width,e.height],c);1===z[0]&&1===z[3]||d.scaleAt(K,K,z,w);e=[-(e.x+.5*e.width)+g,-(e.y+.5*e.height)+q];break;default:A=isNaN(c)?16:.5*c,y=E(m,r,{cx:g,cy:q,r:A})}else if("picture-marker"===z.type){w=y=null;var h=f.pt2px(z.width),k=f.pt2px(z.height);A?(w=c,y=h/k*w):(y=h,w=k);b&&(null!=b[0]&&(b[0]=b[0]/h*y),null!=b[1]&&(b[1]=b[1]/k*w));y=B(m,r,{x:g-.5*y,y:q-.5*w,width:y,height:w,src:z.url});(c=y.getNode())&&(null!=t.opacity?c.setAttribute("opacity",
t.opacity.toString()):c.setAttribute("opacity","1"))}else if("text"===z.type){if(t=z.font&&z.font.clone())t.size=A?c:f.pt2px(t.size);y=F(m,r,{type:"text",text:z.text,x:g,y:q,align:p.getSVGAlign(z),decoration:z.decoration||t&&t.decoration,rotated:z.rotated,kerning:z.kerning});t&&y.setFont(t);c=y.getNode();m=p.getSVGBaseline(z);z=p.getSVGBaselineShift(z);c&&(c.setAttribute("dominant-baseline",m),z&&c.setAttribute("baseline-shift",z))}b&&a.translate(K,K,b);v&&a.multiply(K,K,v);e&&a.translate(K,K,e);
y.setTransform(K);return y}function B(a,d,f){return d?d.setShape(f):a.createImage(f)}function E(a,d,f){return d?d.setShape(f):a.createCircle(f)}function D(a,d,f){f=Array.isArray(f)?f.join(" "):f;return d?d.setShape(f):a.createPath(f)}function F(a,d,f){return d?d.setShape(f):a.createText(f)}function H(a,d){d=d&&d.shape&&d.shape.type;var f=a&&a.type;a=a&&a.style;f&&(a=L[f]||a);N[a]&&(a="path");return!(!d||!a||d===a)}function I(a,d,f,g,m,p,q,r){switch(a){case l.STYLE_SQUARE:return["M",g+","+p,m+","+
p,m+","+q,g+","+q,"Z"];case l.STYLE_CROSS:return["M",d+","+p,d+","+q,"M",g+","+f,m+","+f];case l.STYLE_X:return["M",g+","+p,m+","+q,"M",g+","+q,m+","+p];case l.STYLE_DIAMOND:return["M",d+","+p,m+","+f,d+","+q,g+","+f,"Z"];case l.STYLE_TARGET:return["M",g+","+p,m+","+p,m+","+q,g+","+q,g+","+p,"M",g-r+","+f,g+","+f,"M",d+","+(p-r),d+","+p,"M",m+r+","+f,m+","+f,"M",d+","+(q+r),d+","+q]}}function z(a,d){var f=d.symbol;if("picture-marker"!==f.type){var m=p.getFill(f);if("simple-marker"===f.type){var r=
f.style,t=(f=p.getStroke(f))&&f.color,r=r===l.STYLE_X||r===l.STYLE_CROSS,x=d.opacity;(d=d.color||q([0,0,0,0],r?t:m))&&null!=x&&(d=v([0,0,0,0],d,x));d&&(r?d!==t&&(f=f?g.mixin({},f):{},f.color=d):d!==m&&(m=d));a.setFill(m).setStroke(f)}else"text"===f.type&&(x=d.opacity,(d=d.color||q([0,0,0,0],m))&&null!=x&&(d=v([0,0,0,0],d,x)),d&&d!==m&&(m=d),a.setFill(m))}}Object.defineProperty(t,"__esModule",{value:!0});t.getScalingVector=x;var M={x:0,y:0},K=a.create();t.drawPoint=w;t.drawMarkers=function(a,d,f,g,
l,m,p){var q=l.symbol;f=f.points;d=g||d.createGroup();g=[0];d.children[0]&&H(q,d.children[0])&&d.clear();for(var h=0,r=f.length,q=0;q<r;q++)for(var t=f[q],c=p.length,b=0;b<c;b++)g[0]=p[b],d.add(w(a,d,{x:t[0],y:t[1]},d.children[h++],l,m,g));a=d.children.length;if(f.length*p.length<a)for(p=f.length*p.length,q=a-1;q>=p;q--)d.children[q].removeShape();return d};t.drawShape=function(a,d,f,g,l){var p=[];"extent"===f.type&&(f=m.fromExtent(f));if("polyline"===f.type||"polygon"===f.type){for(var q=l.length,
r=0;r<q;r++)p=p.concat(a.toScreenPath(f,l[r]));g=D(d,g,p)}return g};t.drawRect=function(a,d,f){return d?d.setShape(f):a.createRect(f)};t.drawImage=B;t.drawCircle=E;t.drawPath=D;t.drawText=F;var L={"picture-marker":"image","picture-fill":"path","simple-fill":"path","simple-line":"path",text:"text"},N={square:1,cross:1,x:1,diamond:1,target:1};t.isShapeInvalid=H;t.smsToPath=I;t.stylePoint=z;t.styleMarkers=function(a,d){for(var f=a.children.length,g=0;g<f;g++)z(a.children[g],d)};t.styleShape=function(a,
d){var l=d.symbol,m=d.size,t=d.color,x=d.opacity,w=d.outlineSize;d=p.getStroke(l);var z=p.getFill(l),h=!1,B;"simple-line"===l.type?(h=!0,B="none"!==l.style):B=l.outline&&"none"!==l.outline.style;var y,c,b;if(null!=m||null!=w)if(m=m&&isFinite(m[0])&&m[0],w=h?null:w,null!=m||null!=w)b=f.pt2px(w||m);m="picture-fill"===l.type;!t&&null==x||m||(h?(y=t||d&&d.color&&q([0,0,0,0],d.color))&&null!=x&&(y=v(y,y,x)):z&&(c=t||q([0,0,0,0],z))&&null!=x&&(c=v(c,c,x)));!B||null==b&&!y?a.setStroke(d):a.setStroke(g.mixin({},
d,null!=b?{width:b}:null,y&&{color:y}));l=t&&new r(t)||l.color;z&&"pattern"===z.type&&l&&!m?p.getPatternUrlWithColor(z.src,l.toCss(!0)).then(function(b){z.src=b;a.setFill(z)}):a.setFill(c||z);a.rawNode.setAttribute("vector-effect","non-scaling-stroke")}})},"esri/views/2d/libs/gl-matrix/mat2dExtras":function(){define(["require","exports","./mat2d","./vec2","./common"],function(A,t,g,a,d){Object.defineProperty(t,"__esModule",{value:!0});var f=function(){var d=g.create(),f=a.create();return function(l,
m,q){g.fromTranslation(d,q);g.multiply(l,d,m);a.negate(f,q);g.translate(l,l,f);return l}}();t.rotategAt=function(){var a=g.create();return function(l,m,r,q){g.fromRotation(a,d.toRadian(r));f(a,a,q);g.multiply(l,a,m);return l}}();t.scaleAt=function(){var a=g.create();return function(d,m,r,q){g.fromScaling(a,r);f(a,a,q);g.multiply(d,a,m);return d}}()})},"esri/symbols/support/gfxUtils":function(){define("require exports dojo/_base/lang dojox/gfx/_base ../../Color ../../core/screenUtils ../../request ../../core/promiseUtils ../../core/LRUMap".split(" "),
function(A,t,g,a,d,f,m,l,p){function r(a){if(!a)return null;var d,g=a.constructor,l=f.pt2px(a.width);switch(a.type){case "simple-fill":case "picture-fill":case "simple-marker":d=r(a.outline);break;case "simple-line":a.style!==g.STYLE_NULL&&0!==l&&(d={color:a.color,style:B(a.style),width:l,cap:a.cap,join:a.join===g.JOIN_MITER?f.pt2px(a.miterLimit):a.join});break;default:d=null}return d}Object.defineProperty(t,"__esModule",{value:!0});var q=A.toUrl("../../symbols/patterns/"),v={left:"start",center:"middle",
right:"end",justify:"start"},x={top:"text-before-edge",middle:"central",baseline:"alphabetic",bottom:"text-after-edge"},w=new p(1E3);t.getSVGAlign=function(a){return a=(a=a.horizontalAlignment)&&v[a.toLowerCase()]||"middle"};t.getSVGBaseline=function(a){return(a=a.verticalAlignment)&&x[a.toLowerCase()]||"alphabetic"};t.getSVGBaselineShift=function(a){return"bottom"===a.verticalAlignment?"super":null};t.getFill=function(d){var l=d.style,m=null;if(d){var p=d.constructor;switch(d.type){case "simple-marker":l!==
p.STYLE_CROSS&&l!==p.STYLE_X&&(m=d.color);break;case "simple-fill":l===p.STYLE_SOLID?m=d.color:l!==p.STYLE_NULL&&(m=g.mixin({},a.defaultPattern,{src:q+l+".png",width:8,height:8}));break;case "picture-fill":m=g.mixin({},a.defaultPattern,{src:d.url,width:f.pt2px(d.width)*d.xscale,height:f.pt2px(d.height)*d.yscale,x:f.pt2px(d.xoffset),y:f.pt2px(d.yoffset)});break;case "text":m=d.color}}return m};t.getPatternUrlWithColor=function(a,d){var f=a+"-"+d;return w.has(f)?l.resolve(w.get(f)):m(a,{responseType:"image",
allowImageDataAccess:!0}).then(function(a){a=a.data;var g=a.naturalWidth,l=a.naturalHeight,m=document.createElement("canvas");m.width=g;m.height=l;var p=m.getContext("2d");p.fillStyle=d;p.fillRect(0,0,g,l);p.globalCompositeOperation="destination-in";p.drawImage(a,0,0);a=m.toDataURL();w.set(f,a);return a})};t.getStroke=r;var B=function(){var a={};return function(d){if(a[d])return a[d];var f=d.replace(/-/g,"");return a[d]=f}}();t.defaultThematicColor=new d([128,128,128])})},"esri/views/2d/input/MapViewInputManager":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/watchUtils ../../../core/Accessor ../../../core/HandleRegistry ../../../core/accessorSupport/decorators ../../input/InputManager ../../input/BrowserEventSource ../../input/ViewEvents ../../input/handlers/PreventContextMenu ../input/handlers/DoubleClickZoom ../input/handlers/DragPan ../input/handlers/DragRotate ../input/handlers/KeyPan ../input/handlers/KeyZoom ../input/handlers/KeyRotate ../input/handlers/MouseWheelZoom ../input/handlers/PinchAction".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x,w,B,E,D,F,H,I){var z={left:"ArrowLeft",right:"ArrowRight",up:"ArrowUp",down:"ArrowDown"},M={zoomIn:["\x3d","+"],zoomOut:["-","_"]},K={dragRotate:"Alt",clockwiseOption1:"a",clockwiseOption2:"A",counterClockwiseOption1:"d",counterClockwiseOption2:"D",resetOption1:"n",resetOption2:"N"};return function(f){function t(){var a=null!==f&&f.apply(this,arguments)||this;a._handles=new m;return a}g(t,f);t.prototype.initialize=function(){var a=this;this.viewEvents=new q.ViewEvents(this.view);
this._handles.add([d.whenNot(this.view,"ready",function(){return a._disconnect()}),d.when(this.view,"ready",function(){return a._connect()})])};t.prototype.destroy=function(){this._handles&&(this._handles.removeAll(),this._handles=null);this._disconnect();this.viewEvents.destroy();this.viewEvents=null};t.prototype._disconnect=function(){this._inputManager&&(this.viewEvents.disconnect(),this._source.destroy(),this._inputManager.destroy(),this._inputManager=this._source=null)};t.prototype._connect=
function(){var a=new r.BrowserEventSource(this.view.surface),d=new p.InputManager(a);d.installHandlers("prevent-context-menu",[new v.PreventContextMenu]);d.installHandlers("navigation",[new I.PinchRotateAndZoom(this.view),new H.MouseWheelZoom(this.view),new x.DoubleClickZoom(this.view),new w.DragPan(this.view,"primary"),new E.KeyPan(this.view,z),new D.KeyZoom(this.view,M),new F.KeyRotate(this.view,K),new B.DragRotate(this.view,"secondary"),new x.DoubleClickZoom(this.view,["Ctrl"]),new B.DragRotate(this.view,
"primary",[K.dragRotate])]);this.viewEvents.connect(d);this._source=a;this._inputManager=d};a([l.property()],t.prototype,"view",void 0);return t=a([l.subclass("esri.views.2d.input.MapViewInputManager")],t)}(l.declared(f))})},"esri/views/input/InputManager":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor ../../core/now dojo/has ./keys ./recognizers ../../core/Logger ./handlers/LatestPointerType".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v){Object.defineProperty(t,"__esModule",{value:!0});var x=q.getLogger("esri.views.input.InputManager");A=function(f){function q(a,d){a=f.call(this)||this;a._pointerCaptures=new Map;a._nameToGroup={};a._handlers=[];a._currentPropagation=null;a._sourceEvents=new Set;a._keyModifiers=new Set;a._activeKeyModifiers=new Set;a.primaryKey=p.primaryKey;a.latestPointerType="mouse";a._installRecognizers();return a}g(q,f);q.prototype.normalizeCtorArgs=function(a,d){this._browserEvents=
a;this._browserEvents.onEventReceived=this._onEventReceived.bind(this);this._recognizers=d;this._recognizers||(this._recognizers=r.defaults.map(function(a){return new a}));return{}};q.prototype.destroy=function(){for(var a=0,d=Object.keys(this._nameToGroup);a<d.length;a++)this.uninstallHandlers(d[a])};q.prototype.installHandlers=function(a,d){var f=this;if(this._nameToGroup[a])x.error("There is already an InputHandler group registered under the name `"+a+"`");else if(0===d.length)x.error("Can't register a group of zero handlers");
else{var g={name:a,handlers:d.map(function(a,d){return{handler:a,active:!0,removed:!1,priorityIndex:0,eventCallback:null,uninstallCallback:null}})};this._nameToGroup[a]=g;a=function(a){var d=g.handlers[a];l._handlers.push(d);d.handler.onInstall({updateDependencies:function(){f.updateDependencies()},emit:function(a,g,l,m){f._emitInputEvent(d.priorityIndex,a,g,l,m)},setPointerCapture:function(a,l){f._setPointerCapture(g,d,a,l)},setEventCallback:function(a){d.eventCallback=a},setUninstallCallback:function(a){d.uninstallCallback=
a}})};var l=this;for(d=g.handlers.length-1;0<=d;d--)a(d);this.updateDependencies()}};q.prototype.uninstallHandlers=function(a){var d=this._nameToGroup[a];d?(d.handlers.forEach(function(a){a.removed=!0;a.uninstallCallback()}),delete this._nameToGroup[a],this._currentPropagation?this._currentPropagation.needsHandlerGarbageCollect=!0:this._garbageCollectRemovedHandlers()):x.error("There is no InputHandler group registered under the name `"+a+"`")};q.prototype.hasHandlers=function(a){return void 0!==
this._nameToGroup[a]};q.prototype.updateDependencies=function(){var a=new Set,d=new Set;this._handlersPriority=[];for(var f=this._handlers.length-1;0<=f;f--){var g=this._handlers[f];g.priorityIndex=f;this._handlersPriority.push(g)}this._handlersPriority=this._sortHandlersPriority(this._handlersPriority);for(f=this._handlersPriority.length-1;0<=f;f--){g=this._handlersPriority[f];g.priorityIndex=f;var l=g.handler.hasSideEffects;if(!l)for(var m=0,q=g.handler.outgoingEventTypes;m<q.length;m++)if(a.has(q[m])){l=
!0;break}if(l)for(m=0,q=g.handler.incomingEventMatches;m<q.length;m++){var r=q[m];a.add(r.eventType);for(var t=0,r=r.keyModifiers;t<r.length;t++){var v=r[t];p.isSystemModifier(v)||d.add(v)}}g.active=l}this._sourceEvents=a;this._keyModifiers=d;0<this._pointerCaptures.size&&this._sourceEvents.add("pointer-capture-lost");0<this._keyModifiers.size&&(this._sourceEvents.add("key-down"),this._sourceEvents.add("key-up"));this._browserEvents&&(this._browserEvents.activeEvents=this._sourceEvents)};q.prototype._setLatestPointerType=
function(a){this._set("latestPointerType",a)};q.prototype._onEventReceived=function(a,d){"pointer-capture-lost"===a&&this._pointerCaptures.delete(d.native.pointerId);this._updateKeyModifiers(a,d);this._emitInputEventFromSource(a,d,d.native.timestamp)};q.prototype._updateKeyModifiers=function(a,d){var f=this;if(d){var g=!1,l=function(){if(!g){var a=new Set;f._activeKeyModifiers.forEach(function(d){a.add(d)});f._activeKeyModifiers=a;g=!0}},m=function(a,d){d&&!f._activeKeyModifiers.has(a)?(l(),f._activeKeyModifiers.add(a)):
!d&&f._activeKeyModifiers.has(a)&&(l(),f._activeKeyModifiers.delete(a))};if("key-down"===a||"key-up"===a){var p=d.key;this._keyModifiers.has(p)&&m(p,"key-down"===a)}a=d.native;m("Alt",!(!a||!a.altKey));m("Ctrl",!(!a||!a.ctrlKey));m("Shift",!(!a||!a.shiftKey));m("Meta",!(!a||!a.metaKey));m("Primary",this._activeKeyModifiers.has(this.primaryKey))}};q.prototype._installRecognizers=function(){var a=this;this._latestPointerTypeHandler=new v.LatestPointerType(function(d){return a._setLatestPointerType(d)});
0<this._recognizers.length&&this.installHandlers("default",this._recognizers);this.installHandlers("input-manager-logic",[this._latestPointerTypeHandler])};q.prototype.allowPointerCapture=function(a){return 2!==a.button?!0:!l("chrome")};q.prototype._setPointerCapture=function(a,d,f,g){a=a.name+"-"+d.priorityIndex;d=this._pointerCaptures.get(f.pointerId)||new Set;this._pointerCaptures.set(f.pointerId,d);g&&this.allowPointerCapture(f)?(d.add(a),1===d.size&&this._browserEvents&&this._browserEvents.setPointerCapture(f,
!0)):!g&&d.has(a)&&(d.delete(a),0===d.size&&(this._pointerCaptures.delete(f.pointerId),this._browserEvents&&this._browserEvents.setPointerCapture(f,!1)))};q.prototype._garbageCollectRemovedHandlers=function(){this._handlers=this._handlers.filter(function(a){return!a.removed});this.updateDependencies()};q.prototype._emitInputEventFromSource=function(a,d,f){this._emitInputEvent(0,a,d,f)};q.prototype._emitInputEvent=function(a,d,f,g,l){g=void 0!==g?g:this._currentPropagation?this._currentPropagation.timestamp:
m();d=new w(d,f,g,l||this._activeKeyModifiers);this._currentPropagation?this._currentPropagation.addedEvents.push(d):this._doNewPropagation(a,d)};q.prototype._doNewPropagation=function(a,d){for(a=this._currentPropagation={events:[d],addedEvents:[],currentHandler:this._handlersPriority[a],needsHandlerGarbageCollect:!1,timestamp:d.timestamp};a.currentHandler;){if(a.currentHandler.removed)a.needsHandlerGarbageCollect=!0;else{d=a.events;var f=[];a.addedEvents=[];for(var g=0;g<d.length;g++){var l=d[g];
a.currentHandler.active&&a.currentHandler.eventCallback(l);l.shouldStopPropagation()||f.push(l)}a.events=f.concat(a.addedEvents)}a.currentHandler=this._handlersPriority[a.currentHandler.priorityIndex+1]}a.needsHandlerGarbageCollect&&this._garbageCollectRemovedHandlers();this._currentPropagation=null};q.prototype._compareHandlerPriority=function(a,d){if(a.handler.hasSideEffects!==d.handler.hasSideEffects)return a.handler.hasSideEffects?1:-1;for(var f=0,g=a.handler.incomingEventMatches;f<g.length;f++)for(var l=
g[f],m=function(a){if(l.eventType!==a.eventType)return"continue";var d=l.keyModifiers.filter(function(d){return-1!==a.keyModifiers.indexOf(d)});if(d.length===l.keyModifiers.length!==(d.length===a.keyModifiers.length))return{value:l.keyModifiers.length>a.keyModifiers.length?-1:1}},p=0,q=d.handler.incomingEventMatches;p<q.length;p++){var r=m(q[p]);if("object"===typeof r)return r.value}return a.priorityIndex>d.priorityIndex?-1:1};q.prototype._sortHandlersPriority=function(a){for(var d=[],f=0;f<a.length;f++){for(var g=
a[f],l=0;l<d.length&&0<=this._compareHandlerPriority(g,d[l]);)l++;d.splice(l,0,g)}return d};a([d.property({readOnly:!0})],q.prototype,"latestPointerType",void 0);return q=a([d.subclass("esri.views.input.InputManager")],q)}(d.declared(f));t.InputManager=A;var w=function(){function a(a,d,f,g){this.type=a;this.data=d;this.timestamp=f;this.modifiers=g;this._stopPropagation=!1}a.prototype.stopPropagation=function(){this._stopPropagation=!0};a.prototype.shouldStopPropagation=function(){return this._stopPropagation};
return a}()})},"esri/views/input/keys":function(){define(["require","exports","../../core/sniff"],function(A,t,g){Object.defineProperty(t,"__esModule",{value:!0});t.primaryKey="Meta";var a={8:"Backspace",9:"Tab",13:"Enter",27:"Escape",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete"};for(A=48;58>A;A++)a[A]=String.fromCharCode(A);for(A=1;25>A;A++)a[111+A]="F"+A;for(A=65;91>A;A++)a[A]=[String.fromCharCode(A+32),String.fromCharCode(A)];
var d={Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"};t.eventKey=function(f){if(void 0!==f.key)return d[f.key]||f.key;var g=a[f.keyCode];return Array.isArray(g)?f.shiftKey?g[1]:g[0]:g};t.isSystemModifier=function(a){switch(a){case "Ctrl":case "Alt":case "Shift":case "Meta":case "Primary":return!0}}})},"esri/views/input/recognizers":function(){define("require exports ./recognizers/Drag ./recognizers/PointerClickHoldAndDrag ./recognizers/SingleAndDoubleClick ./recognizers/VerticalTwoFingerDrag".split(" "),
function(A,t,g,a,d,f){Object.defineProperty(t,"__esModule",{value:!0});t.defaults=[a.PointerClickHoldAndDrag,d.SingleAndDoubleClick,g.Drag,f.VerticalTwoFingerDrag]})},"esri/views/input/recognizers/Drag":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","../InputHandler","./support"],function(A,t,g,a,d){Object.defineProperty(t,"__esModule",{value:!0});A=function(a){function f(){var d=a.call(this,!1)||this;d._startStateModifiers=new Set;d._activePointers=[];d._activePointerMap=
new Map;d._isDragging=!1;d._drag=d.registerOutgoing("drag");d.registerIncoming("pointer-drag",d._handlePointerDrag.bind(d));d.registerIncoming("pointer-down",d._handlePointerDown.bind(d));d.registerIncoming("pointer-up",d._handlePointerUpAndPointerLost.bind(d));d.registerIncoming("pointer-capture-lost",d._handlePointerUpAndPointerLost.bind(d));return d}g(f,a);f.prototype._createPayload=function(a,d){return{action:a,pointers:this._activePointers.map(function(a){return a.data}),startState:this._startState,
previousState:this._previousState,currentState:d}};f.prototype._fitCircleLSQ=function(){var a=this._activePointers.map(function(a){return a.data.currentEvent});return d.fitCircleLSQ(a)};f.prototype._createDragState=function(a){for(var d=this._fitCircleLSQ(),f=0,g=0,l=this._activePointers;g<l.length;g++){for(var m=l[g],t=this._pointerAngle(m,d),t=t-m.lastAngle;t>Math.PI;)t-=2*Math.PI;for(;t<-Math.PI;)t+=2*Math.PI;t=m.lastAngle+t;m.lastAngle=t;f+=t-m.initialAngle}f/=this._activePointers.length;return{angle:f,
radius:d.radius,center:d.center,timestamp:a}};f.prototype._updateMultiPointer=function(a,d){var f=a.startEvent.native.pointerId,g=this._activePointerMap.get(f),l=!g;l?(g={data:null,initialAngle:0,lastAngle:0},this._activePointers.push(g),this._activePointerMap.set(f,g),g.data={startEvent:a.startEvent,previousEvent:a.previousEvent,currentEvent:a.currentEvent},a=this._fitCircleLSQ(),g.initialAngle=this._pointerAngle(g,a),g.lastAngle=g.initialAngle):g.data={startEvent:g.data.startEvent,previousEvent:a.previousEvent,
currentEvent:a.currentEvent};l&&this._isDragging&&this._updateInitialAngles(d);return g};f.prototype._pointerAngle=function(a,d){a=a.data.currentEvent;return Math.atan2(a.y-d.center.y,a.x-d.center.x)};f.prototype._updateInitialAngles=function(a){a=this._createDragState(a);for(var d=0,f=this._activePointers;d<f.length;d++){var g=f[d];g.initialAngle=this._pointerAngle(g,a)}};f.prototype._emitStart=function(a){this._updateInitialAngles(a.timestamp);var d=this._createDragState(a.timestamp);this._previousState=
this._startState=d;this._startStateModifiers=a.modifiers;this._isDragging=!0;for(var f=0,g=this._activePointers;f<g.length;f++){var l=g[f];l.data={previousEvent:l.data.currentEvent,startEvent:l.data.currentEvent,currentEvent:l.data.currentEvent}}this._drag.emit(this._createPayload("start",d),a.timestamp)};f.prototype._emitUpdate=function(a){a=this._createDragState(a.timestamp);this._drag.emit(this._createPayload("update",a),void 0,this._startStateModifiers);this._previousState=a};f.prototype._emitEnd=
function(a){a=this._createDragState(a);this._drag.emit(this._createPayload("end",a),void 0,this._startStateModifiers);this._startState=this._previousState=null;this._isDragging=!1};f.prototype._handlePointerDown=function(a){var d=a.data;this._isDragging&&this._emitEnd(a.timestamp);this._updateMultiPointer({startEvent:d,previousEvent:d,currentEvent:d},a.timestamp)};f.prototype._removeMultiPointer=function(a,d){var f=a.native.pointerId,g=this._activePointerMap.get(f);g&&(this._isDragging&&(this._updateMultiPointer({startEvent:g.data.startEvent,
previousEvent:g.data.currentEvent,currentEvent:a},d),this._emitEnd(d)),this._activePointerMap.delete(f),a=this._activePointers.indexOf(g),this._activePointers.splice(a,1),this._isDragging&&this._updateInitialAngles(d))};f.prototype._handlePointerUpAndPointerLost=function(a){this._removeMultiPointer(a.data,a.timestamp)};f.prototype._handlePointerDrag=function(a){var d=a.data;switch(d.action){case "start":this._isDragging||this._emitStart(a);break;case "update":this._isDragging||this._emitStart(a),
this._updateMultiPointer(d,a.timestamp),this._emitUpdate(a)}};return f}(a.InputHandler);t.Drag=A})},"esri/views/input/InputHandler":function(){define(["require","exports","./EventMatch","../../core/Logger"],function(A,t,g,a){Object.defineProperty(t,"__esModule",{value:!0});var d=a.getLogger("esri.views.input.InputHandler");A=function(){function a(a){this._manager=null;this._incoming={};this._outgoing={};this._outgoingEventTypes=this._incomingEventTypes=this._incomingEventMatches=null;this._hasSideEffects=
a}Object.defineProperty(a.prototype,"incomingEventMatches",{get:function(){if(!this._incomingEventMatches){this._incomingEventMatches=[];for(var a in this._incoming)for(var d=0,f=this._incoming[a];d<f.length;d++)this._incomingEventMatches.push(f[d].match)}return this._incomingEventMatches},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"incomingEventTypes",{get:function(){this._incomingEventTypes||(this._incomingEventTypes=this.incomingEventMatches.map(function(a){return a.eventType}));
return this._incomingEventTypes},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"outgoingEventTypes",{get:function(){this._outgoingEventTypes||(this._outgoingEventTypes=Object.keys(this._outgoing));return this._outgoingEventTypes},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"hasSideEffects",{get:function(){return this._hasSideEffects},enumerable:!0,configurable:!0});a.prototype.onInstall=function(a){var f=this;this._manager?d.error("This InputHandler has already been registered with an InputManager"):
(a.setEventCallback(function(a){return f._handleEvent(a)}),a.setUninstallCallback(function(){return f._onUninstall()}),this._manager=a)};a.prototype.onUninstall=function(){};a.prototype.registerIncoming=function(a,d,l){var m=this;"function"===typeof d?(l=d,d=[]):d=d||[];a="string"===typeof a?new g.EventMatch(a,d):a;var p=function(){m._incomingEventTypes=null;m._incomingEventMatches=null};d=function(a){var d=m._incoming[a.match.eventType];d&&(a=d.indexOf(a),d.splice(a,1),p(),m._manager&&m._manager.updateDependencies())};
l=new f(a,l,{onPause:d,onRemove:d,onResume:function(a){var d=m._incoming[a.match.eventType];d&&-1===d.indexOf(a)&&(d.push(a),p(),m._manager&&m._manager.updateDependencies())}});d=this._incoming[a.eventType];d||(d=[],this._incoming[a.eventType]=d);d.push(l);p();this._manager&&this._manager.updateDependencies();return l};a.prototype.registerOutgoing=function(a){var d=this;if(this._outgoing[a])throw Error("There is already a callback registered for this outgoing InputEvent: "+a);var f=new m(a,{onEmit:function(a,
f,g,l){d._manager.emit(a.eventType,f,g,l)},onRemove:function(a){delete d._outgoing[a.eventType];d._manager.updateDependencies()}});this._outgoing[a]=f;this._outgoingEventTypes=null;this._manager&&this._manager.updateDependencies();return f};a.prototype.startCapturingPointer=function(a){this._manager.setPointerCapture(a,!0)};a.prototype.stopCapturingPointer=function(a){this._manager.setPointerCapture(a,!1)};a.prototype._onUninstall=function(){this._manager?(this.onUninstall(),this._manager=null):d.error("This InputHandler is not registered with an InputManager")};
a.prototype._handleEvent=function(a){var d=this._incoming[a.type];if(d)for(var f=0;f<d.length;f++){var g=d[f];if(g.match.matches(a)&&(g.callback(a),a.shouldStopPropagation()))break}};return a}();t.InputHandler=A;var f=function(){function a(a,d,f){this.match=a;this._callback=d;this._handler=f}a.prototype.pause=function(){this._handler.onPause(this)};a.prototype.resume=function(){this._handler.onResume(this)};a.prototype.remove=function(){this._handler.onRemove(this)};Object.defineProperty(a.prototype,
"callback",{get:function(){return this._callback},enumerable:!0,configurable:!0});return a}(),m=function(){function a(a,d){this.eventType=a;this._removed=!1;this._handler=d}a.prototype.emit=function(a,d,f){if(!this._removed)this._handler.onEmit(this,a,d,f)};a.prototype.remove=function(){this._removed=!0;this._handler.onRemove(this)};return a}()})},"esri/views/input/EventMatch":function(){define(["require","exports"],function(A,t){Object.defineProperty(t,"__esModule",{value:!0});A=function(){function g(a,
d){void 0===d&&(d=[]);this.eventType=a;this.keyModifiers=d}g.prototype.matches=function(a){if(a.type!==this.eventType)return!1;if(0===this.keyModifiers.length)return!0;a=a.modifiers;for(var d=0,f=this.keyModifiers;d<f.length;d++)if(!a.has(f[d]))return!1;return!0};return g}();t.EventMatch=A})},"esri/views/input/recognizers/support":function(){define(["require","exports"],function(A,t){Object.defineProperty(t,"__esModule",{value:!0});t.manhattanDistance=function(g,a){return Math.abs(a.x-g.x)+Math.abs(a.y-
g.y)};t.euclideanDistance=function(g,a){var d=a.x-g.x;g=a.y-g.y;return Math.sqrt(d*d+g*g)};t.fitCircleLSQ=function(g,a){a?(a.radius=0,a.center.x=0,a.center.y=0):a={radius:0,center:{x:0,y:0}};if(0===g.length)return a;if(1===g.length)return a.center.x=g[0].x,a.center.y=g[0].y,a;if(2===g.length){var d=g[0];g=g[1];var f=[g.x-d.x,g.y-d.y],m=f[0],f=f[1];a.radius=Math.sqrt(m*m+f*f)/2;a.center.x=(d.x+g.x)/2;a.center.y=(d.y+g.y)/2;return a}for(var l=0,p=0,r=0;r<g.length;r++)l+=g[r].x,p+=g[r].y;for(var l=l/
g.length,p=p/g.length,q=g.map(function(a){return a.x-l}),t=g.map(function(a){return a.y-p}),x=d=a=0,w=0,B=m=0,r=f=0;r<q.length;r++){var A=q[r],D=t[r],F=A*A,H=D*D;a+=F;d+=H;x+=A*D;w+=F*A;m+=H*D;B+=A*H;f+=D*F}r=a;q=x;t=d;w=.5*(w+B);m=.5*(m+f);f=r*t-x*q;B=(w*t-m*q)/f;m=(r*m-x*w)/f;return{radius:Math.sqrt(B*B+m*m+(a+d)/g.length),center:{x:B+l,y:m+p}}}})},"esri/views/input/recognizers/PointerClickHoldAndDrag":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","../InputHandler",
"./support"],function(A,t,g,a,d){Object.defineProperty(t,"__esModule",{value:!0});t.DefaultParameters={maximumClickDelay:300,movementUntilMouseDrag:1.5,movementUntilTouchDrag:6,holdDelay:500};A=function(a){function f(d,f,g,m){void 0===d&&(d=t.DefaultParameters.maximumClickDelay);void 0===f&&(f=t.DefaultParameters.movementUntilMouseDrag);void 0===g&&(g=t.DefaultParameters.movementUntilTouchDrag);void 0===m&&(m=t.DefaultParameters.holdDelay);var l=a.call(this,!1)||this;l.maximumClickDelay=d;l.movementUntilMouseDrag=
f;l.movementUntilTouchDrag=g;l.holdDelay=m;l._pointerState=new Map;l._modifiers=new Set;l._pointerDrag=l.registerOutgoing("pointer-drag");l._pointerClick=l.registerOutgoing("pointer-click");l._pointerHold=l.registerOutgoing("hold");l.registerIncoming("pointer-down",l._handlePointerDown.bind(l));l.registerIncoming("pointer-up",l._handlePointerUpOrLost.bind(l));l.registerIncoming("pointer-capture-lost",l._handlePointerUpOrLost.bind(l));l._moveHandle=l.registerIncoming("pointer-move",l._handlePointerMove.bind(l));
l._moveHandle.pause();return l}g(f,a);f.prototype.onUninstall=function(){this._pointerState.forEach(function(a){0!==a.holdTimeout&&(clearTimeout(a.holdTimeout),a.holdTimeout=0)});a.prototype.onUninstall.call(this)};f.prototype._handlePointerDown=function(a){var d=this,f=a.data,g=f.native.pointerId,l=0;0===this._pointerState.size&&(l=setTimeout(function(){var f=d._pointerState.get(g);f&&(f.isDragging||(d._pointerHold.emit(f.previousEvent,void 0,a.modifiers),f.holdEmitted=!0),f.holdTimeout=0)},this.holdDelay));
1===this._pointerState.size&&this._pointerState.forEach(function(a){0!==a.holdTimeout&&(clearTimeout(a.holdTimeout),a.holdTimeout=0)});this._pointerState.set(g,{startEvent:f,previousEvent:f,startTimestamp:a.timestamp,isDragging:!1,downButton:f.native.button,holdTimeout:l});this.startCapturingPointer(f.native);this._moveHandle.resume()};f.prototype._createPointerDragData=function(a,d,f){return{action:a,startEvent:d.startEvent,previousEvent:d.previousEvent,currentEvent:f}};f.prototype._handlePointerMove=
function(a){var f=a.data,g=this._pointerState.get(f.native.pointerId);g&&(g.isDragging?this._pointerDrag.emit(this._createPointerDragData("update",g,f),void 0,this._modifiers):d.euclideanDistance(f,g.startEvent)>("touch"===f.native.pointerType?this.movementUntilTouchDrag:this.movementUntilMouseDrag)&&(g.isDragging=!0,g.previousEvent=g.startEvent,this._modifiers=a.modifiers,0!==g.holdTimeout&&clearTimeout(g.holdTimeout),this._pointerDrag.emit(this._createPointerDragData("start",g,g.startEvent),g.startTimestamp),
this._pointerDrag.emit(this._createPointerDragData("update",g,f))),g.previousEvent=f)};f.prototype._handlePointerUpOrLost=function(a){var d=a.data,f=d.native.pointerId,g=this._pointerState.get(f);g&&(0!==g.holdTimeout&&clearTimeout(g.holdTimeout),g.isDragging?this._pointerDrag.emit(this._createPointerDragData("end",g,d),void 0,this._modifiers):g.downButton===d.native.button&&a.timestamp-g.startTimestamp<=this.maximumClickDelay&&!g.holdEmitted&&this._pointerClick.emit(d),this._pointerState.delete(f),
this.stopCapturingPointer(d.native),0===this._pointerState.size&&this._moveHandle.pause())};return f}(a.InputHandler);t.PointerClickHoldAndDrag=A})},"esri/views/input/recognizers/SingleAndDoubleClick":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","../InputHandler","./support"],function(A,t,g,a,d){Object.defineProperty(t,"__esModule",{value:!0});t.DefaultParameters={maximumDoubleClickDelay:250,maximumDoubleClickDistance:10,maximumDoubleTouchDelay:350,maximumDoubleTouchDistance:35};
A=function(a){function f(d,f,g,m){void 0===d&&(d=t.DefaultParameters.maximumDoubleClickDelay);void 0===f&&(f=t.DefaultParameters.maximumDoubleClickDistance);void 0===g&&(g=t.DefaultParameters.maximumDoubleTouchDelay);void 0===m&&(m=t.DefaultParameters.maximumDoubleTouchDistance);var l=a.call(this,!1)||this;l.maximumDoubleClickDelay=d;l.maximumDoubleClickDistance=f;l.maximumDoubleTouchDelay=g;l.maximumDoubleTouchDistance=m;l._pointerState=new Map;l._click=l.registerOutgoing("click");l._doubleClick=
l.registerOutgoing("double-click");l._firstClick=l.registerOutgoing("first-click");l.registerIncoming("pointer-click",l._handlePointerClick.bind(l));return l}g(f,a);f.prototype.onUninstall=function(){this._pointerState.forEach(function(a){0!==a.doubleClickTimeout&&(clearTimeout(a.doubleClickTimeout),a.doubleClickTimeout=0)})};f.prototype._pointerId=function(a){a=a.native;return"mouse"===a.pointerType?a.pointerId+":"+a.button:""+a.pointerType};f.prototype._handlePointerClick=function(a){var f=a.data,
g=this._pointerId(f),l=this._pointerState.get(g);if(l){clearTimeout(l.doubleClickTimeout);l.doubleClickTimeout=0;var m="touch"===f.native.pointerType?this.maximumDoubleTouchDistance:this.maximumDoubleClickDistance;d.manhattanDistance(l.event.data,f)>m?(this._doubleClickTimeoutExceeded(g),this._startClick(a)):(this._doubleClick.emit(f,void 0,l.event.modifiers),this._pointerState.delete(g))}else this._startClick(a)};f.prototype._startClick=function(a){var d=this,f=a.data,g=this._pointerId(a.data);this._pointerState.set(g,
{event:a,doubleClickTimeout:setTimeout(function(){return d._doubleClickTimeoutExceeded(g)},"touch"===f.native.pointerType?this.maximumDoubleTouchDelay:this.maximumDoubleClickDelay)});this._firstClick.emit(a.data,void 0,a.modifiers)};f.prototype._doubleClickTimeoutExceeded=function(a){var d=this._pointerState.get(a);this._click.emit(d.event.data,void 0,d.event.modifiers);d.doubleClickTimeout=0;this._pointerState.delete(a)};return f}(a.InputHandler);t.SingleAndDoubleClick=A})},"esri/views/input/recognizers/VerticalTwoFingerDrag":function(){define(["require",
"exports","../../../core/tsSupport/extendsHelper","../InputHandler"],function(A,t,g,a){Object.defineProperty(t,"__esModule",{value:!0});A=function(a){function d(d,f){void 0===d&&(d=20);void 0===f&&(f=40);var g=a.call(this,!1)||this;g._threshold=d;g._maxDelta=f;g._failed=!1;g._active=!1;g._vertical=g.registerOutgoing("vertical-two-finger-drag");g._artificalDragEnd=g.registerOutgoing("drag");g.registerIncoming("drag",g._handleDrag.bind(g));return g}g(d,a);Object.defineProperty(d.prototype,"failed",
{get:function(){return this._failed},enumerable:!0,configurable:!0});d.prototype._handleDrag=function(a){if(2===a.data.pointers.length)switch(a.data.action){case "start":this._handleDragStart(a);break;case "update":this._handleDragUpdate(a);break;case "end":this._handleDragEnd(a)}};d.prototype._handleDragStart=function(a){this._failed=!1};d.prototype._handleDragUpdate=function(a){this._failed||(this._active?(this._vertical.emit({delta:a.data.currentState.center.y-this._thresholdReachedCenter.y,action:"update"}),
a.stopPropagation()):(this._failed=!this._checkDeltaConstraint(a.data),!this._failed&&this._checkThresholdReached(a.data)&&(this._active=!0,this._thresholdReachedCenter=a.data.currentState.center,this._artificalDragEnd.emit({action:"end",currentState:a.data.currentState,previousState:a.data.previousState,startState:a.data.startState,pointers:a.data.pointers}),this._vertical.emit({delta:a.data.currentState.center.y-this._thresholdReachedCenter.y,action:"begin"}),a.stopPropagation())))};d.prototype._handleDragEnd=
function(a){this._active&&(this._vertical.emit({delta:a.data.currentState.center.y-this._thresholdReachedCenter.y,action:"end"}),a.stopPropagation());this._active=!1};d.prototype._checkDeltaConstraint=function(a){var d=Math.abs(a.pointers[0].startEvent.x-a.pointers[1].startEvent.x),f=Math.abs(a.pointers[0].startEvent.y-a.pointers[1].startEvent.y),g=Math.abs(a.pointers[0].currentEvent.y-a.pointers[1].currentEvent.y),m=Math.abs(a.pointers[0].currentEvent.x-a.pointers[1].currentEvent.x);return Math.abs(a.currentState.center.x-
a.startState.center.x)<this._threshold&&Math.abs(m-d)<=this._maxDelta&&Math.abs(g-f)<=this._maxDelta};d.prototype._checkThresholdReached=function(a){return Math.min(Math.abs(a.pointers[0].currentEvent.y-a.pointers[0].startEvent.y),Math.abs(a.pointers[1].currentEvent.y-a.pointers[1].startEvent.y),Math.abs(a.currentState.center.y-a.startState.center.y))>=this._threshold};return d}(a.InputHandler);t.VerticalTwoFingerDrag=A})},"esri/views/input/handlers/LatestPointerType":function(){define(["require",
"exports","../../../core/tsSupport/extendsHelper","../InputHandler"],function(A,t,g,a){Object.defineProperty(t,"__esModule",{value:!0});A=function(a){function d(d){var f=a.call(this,!0)||this;f._onChange=d;f._value="mouse";f.registerIncoming("pointer-down",function(a){f._setValue("touch"===a.data.native.pointerType?"touch":"mouse")});f._moveHandler=f.registerIncoming("pointer-move",function(a){f._setValue("touch"===a.data.native.pointerType?"touch":"mouse")});f._moveHandler.pause();return f}g(d,a);
d.prototype._setValue=function(a){a!==this._value&&("touch"===a?this._moveHandler.resume():this._moveHandler.pause(),this._value=a,this._onChange(a))};return d}(a.InputHandler);t.LatestPointerType=A})},"esri/views/input/BrowserEventSource":function(){define(["require","exports","./keys","../../core/libs/pep/pep","dojo/sniff"],function(A,t,g,a,d){Object.defineProperty(t,"__esModule",{value:!0});var f=d("trident"),m=d("edge"),l=d("chrome"),p=d("ff"),r=d("safari");A=function(){function d(d){this._active=
{};this._activePointerCaptures=new Set;this._keyDownState=new Set;this._element=d;a.applyLocal(d);d.getAttribute("tabindex")||d.setAttribute("tabindex","0");this._eventHandlers={"key-down":this._handleKey,"key-up":this._handleKey,"pointer-down":this._handlePointer,"pointer-move":this._handlePointerPreventDefault,"pointer-up":this._handlePointerPreventDefault,"pointer-enter":this._handlePointer,"pointer-leave":this._handlePointer,"mouse-wheel":this._handleMouseWheel,"pointer-capture-lost":this._handlePointerCaptureLost};
this._initialCssTouchAction=d.style.touchAction;d.style.touchAction="none"}d.prototype.destroy=function(){var a=this;this.activeEvents=this._callback=null;this._activePointerCaptures.forEach(function(d){a._element.releasePointerCapture(d)});this._activePointerCaptures=null;this._element.style.touchAction=this._initialCssTouchAction};Object.defineProperty(d.prototype,"onEventReceived",{set:function(a){this._callback=a},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"activeEvents",
{set:function(a){var d=this,f;for(f in this._active)a&&a.has(f)||(this._element.removeEventListener(q[f],this._active[f]),delete this._active[f]);a&&a.forEach(function(a){if(!d._active[a]&&q[a]){var f=(d._eventHandlers[a]||d._handleDefault).bind(d,a);d._element.addEventListener(q[a],f);d._active[a]=f}})},enumerable:!0,configurable:!0});d.prototype.setPointerCapture=function(a,d){d?(this._element.setPointerCapture(a.pointerId),this._activePointerCaptures.add(a.pointerId)):(this._element.releasePointerCapture(a.pointerId),
this._activePointerCaptures.delete(a.pointerId))};d.prototype._updateNormalizedPointerLikeEvent=function(a,d){var f=this._element.getBoundingClientRect();d.x=a.clientX-Math.round(f.left);d.y=a.clientY-Math.round(f.top);return d};d.prototype._handleKey=function(a,d){var f=g.eventKey(d);f&&"key-up"===a&&this._keyDownState.delete(f);d={native:d,key:f,repeat:f&&this._keyDownState.has(f)};f&&"key-down"===a&&this._keyDownState.add(d.key);this._callback(a,d)};d.prototype._handlePointer=function(a,d){d=this._updateNormalizedPointerLikeEvent(d,
{native:d,x:0,y:0});this._callback(a,d)};d.prototype._handlePointerPreventDefault=function(a,d){var f=this._updateNormalizedPointerLikeEvent(d,{native:d,x:0,y:0});d.preventDefault();this._callback(a,f)};d.prototype._handleMouseWheel=function(a,d){d.preventDefault();var g=d.deltaY;switch(d.deltaMode){case 0:if(f||m)g=g/document.documentElement.clientHeight*600;break;case 1:g*=30;break;case 2:g*=900}f||m?g*=.7:l||r?g*=.6:p&&(g*=1.375);var q=Math.abs(g);100<q&&(g=g/q*200/(1+Math.exp(-.02*(q-100))));
d=this._updateNormalizedPointerLikeEvent(d,{native:d,x:0,y:0,deltaY:g});this._callback(a,d)};d.prototype._handlePointerCaptureLost=function(a,d){this._activePointerCaptures.delete(d.pointerId);this._handleDefault(a,d)};d.prototype._handleDefault=function(a,d){var f={native:d};d.preventDefault();this._callback(a,f)};return d}();t.BrowserEventSource=A;var q={"key-down":"keydown","key-up":"keyup","pointer-down":"pointerdown","pointer-up":"pointerup","pointer-move":"pointermove","mouse-wheel":"wheel",
"pointer-capture-got":"gotpointercapture","pointer-capture-lost":"lostpointercapture","context-menu":"contextmenu","pointer-enter":"pointerenter","pointer-leave":"pointerleave"}})},"esri/core/libs/pep/pep":function(){define(function(){function A(a,b){b=b||Object.create(null);var c=document.createEvent("Event");c.initEvent(a,b.bubbles||!1,b.cancelable||!1);a=2;for(var d;a<r.length;a++)d=r[a],c[d]=b[d]||q[a];c.buttons=b.buttons||0;a=0;a=b.pressure?b.pressure:c.buttons?.5:0;c.x=c.clientX;c.y=c.clientY;
c.pointerId=b.pointerId||0;c.width=b.width||0;c.height=b.height||0;c.pressure=a;c.tiltX=b.tiltX||0;c.tiltY=b.tiltY||0;c.pointerType=b.pointerType||"";c.hwTimestamp=b.hwTimestamp||0;c.isPrimary=b.isPrimary||!1;return c}function t(){this.array=[];this.size=0}function g(a,b,c,d){this.addCallback=a.bind(d);this.removeCallback=b.bind(d);this.changedCallback=c.bind(d);K&&(this.observer=new K(this.mutationWatcher.bind(this)))}function a(a){return"body /shadow-deep/ "+d(a)}function d(a){return'[touch-action\x3d"'+
a+'"]'}function f(a){return"{ -ms-touch-action: "+a+"; touch-action: "+a+"; touch-action-delay: none; }"}function m(){if(O){N.forEach(function(b){String(b)===b?(Q+=d(b)+f(b)+"\n",T&&(Q+=a(b)+f(b)+"\n")):(Q+=b.selectors.map(d)+f(b.rule)+"\n",T&&(Q+=b.selectors.map(a)+f(b.rule)+"\n"))});var b=document.createElement("style");b.textContent=Q;document.head.appendChild(b)}}function l(a){if(!D.pointermap.has(a))throw a=Error("InvalidPointerId"),a.name="InvalidPointerId",a;}function p(a){if(!a.ownerDocument.contains(a))throw a=
Error("InvalidStateError"),a.name="InvalidStateError",a;}var r="bubbles cancelable view detail screenX screenY clientX clientY ctrlKey altKey shiftKey metaKey button relatedTarget pageX pageY".split(" "),q=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0],v=window.Map&&window.Map.prototype.forEach?Map:t;t.prototype={set:function(a,b){if(void 0===b)return this.delete(a);this.has(a)||this.size++;this.array[a]=b},has:function(a){return void 0!==this.array[a]},delete:function(a){this.has(a)&&(delete this.array[a],
this.size--)},get:function(a){return this.array[a]},clear:function(){this.size=this.array.length=0},forEach:function(a,b){return this.array.forEach(function(c,d){a.call(b,c,d,this)},this)}};var x="bubbles cancelable view detail screenX screenY clientX clientY ctrlKey altKey shiftKey metaKey button relatedTarget buttons pointerId width height pressure tiltX tiltY pointerType hwTimestamp isPrimary type target currentTarget which pageX pageY timeStamp".split(" "),w=[!1,!1,null,null,0,0,0,0,!1,!1,!1,
!1,0,null,0,0,0,0,0,0,0,"",0,!1,"",null,null,0,0,0,0],B={pointerover:1,pointerout:1,pointerenter:1,pointerleave:1},E="undefined"!==typeof SVGElementInstance,D={pointermap:new v,eventMap:Object.create(null),captureInfo:Object.create(null),eventSources:Object.create(null),eventSourceList:[],registerSource:function(a,b){var c=b.events;c&&(c.forEach(function(a){b[a]&&(this.eventMap[a]=b[a].bind(b))},this),this.eventSources[a]=b,this.eventSourceList.push(b))},register:function(a){for(var b=this.eventSourceList.length,
c=0,d;c<b&&(d=this.eventSourceList[c]);c++)d.register.call(d,a)},unregister:function(a){for(var b=this.eventSourceList.length,c=0,d;c<b&&(d=this.eventSourceList[c]);c++)d.unregister.call(d,a)},contains:function(a,b){try{return a.contains(b)}catch(Z){return!1}},down:function(a){a.bubbles=!0;this.fireEvent("pointerdown",a)},move:function(a){a.bubbles=!0;this.fireEvent("pointermove",a)},up:function(a){a.bubbles=!0;this.fireEvent("pointerup",a)},enter:function(a){a.bubbles=!1;this.fireEvent("pointerenter",
a)},leave:function(a){a.bubbles=!1;this.fireEvent("pointerleave",a)},over:function(a){a.bubbles=!0;this.fireEvent("pointerover",a)},out:function(a){a.bubbles=!0;this.fireEvent("pointerout",a)},cancel:function(a){a.bubbles=!0;this.fireEvent("pointercancel",a)},leaveOut:function(a){this.out(a);this.propagate(a,this.leave,!1)},enterOver:function(a){this.over(a);this.propagate(a,this.enter,!0)},eventHandler:function(a){if(!a._handledByPE){var b=a.type;(b=this.eventMap&&this.eventMap[b])&&b(a);a._handledByPE=
!0}},listen:function(a,b){b.forEach(function(b){this.addEvent(a,b)},this)},unlisten:function(a,b){b.forEach(function(b){this.removeEvent(a,b)},this)},addEvent:function(a,b){a.addEventListener(b,this.boundHandler)},removeEvent:function(a,b){a.removeEventListener(b,this.boundHandler)},makeEvent:function(a,b){this.captureInfo[b.pointerId]&&(b.relatedTarget=null);a=new A(a,b);b.preventDefault&&(a.preventDefault=b.preventDefault);a._target=a._target||b.target;return a},fireEvent:function(a,b){a=this.makeEvent(a,
b);return this.dispatchEvent(a)},cloneEvent:function(a){for(var b=Object.create(null),c,d=0;d<x.length;d++)c=x[d],b[c]=a[c]||w[d],E&&("target"===c||"relatedTarget"===c)&&b[c]instanceof SVGElementInstance&&(b[c]=b[c].correspondingUseElement);a.preventDefault&&(b.preventDefault=function(){a.preventDefault()});return b},getTarget:function(a){var b=this.captureInfo[a.pointerId];if(!b)return a._target;if(a._target===b||!(a.type in B))return b},propagate:function(a,b,c){for(var d=a.target,e=[];!d.contains(a.relatedTarget)&&
d!==document;)e.push(d),d=d.parentNode;c&&e.reverse();e.forEach(function(c){a.target=c;b.call(this,a)},this)},setCapture:function(a,b){this.captureInfo[a]&&this.releaseCapture(a);this.captureInfo[a]=b;var c=new A("gotpointercapture");c.pointerId=a;this.implicitRelease=this.releaseCapture.bind(this,a);document.addEventListener("pointerup",this.implicitRelease);document.addEventListener("pointercancel",this.implicitRelease);c._target=b;this.asyncDispatchEvent(c)},releaseCapture:function(a){var b=this.captureInfo[a];
if(b){var c=new A("lostpointercapture");c.pointerId=a;this.captureInfo[a]=void 0;document.removeEventListener("pointerup",this.implicitRelease);document.removeEventListener("pointercancel",this.implicitRelease);c._target=b;this.asyncDispatchEvent(c)}},dispatchEvent:function(a){var b=this.getTarget(a);if(b)return b.dispatchEvent(a)},asyncDispatchEvent:function(a){requestAnimationFrame(this.dispatchEvent.bind(this,a))}};D.boundHandler=D.eventHandler.bind(D);var F={shadow:function(a){if(a)return a.shadowRoot||
a.webkitShadowRoot},canTarget:function(a){return a&&!!a.elementFromPoint},targetingShadow:function(a){a=this.shadow(a);if(this.canTarget(a))return a},olderShadow:function(a){var b=a.olderShadowRoot;!b&&(a=a.querySelector("shadow"))&&(b=a.olderShadowRoot);return b},allShadows:function(a){var b=[];for(a=this.shadow(a);a;)b.push(a),a=this.olderShadow(a);return b},searchRoot:function(a,b,c){if(a){var d=a.elementFromPoint(b,c),e;for(e=this.targetingShadow(d);e;){if(a=e.elementFromPoint(b,c))return d=this.targetingShadow(a),
this.searchRoot(d,b,c)||a;e=this.olderShadow(e)}return d}},owner:function(a){for(;a.parentNode;)a=a.parentNode;a.nodeType!==Node.DOCUMENT_NODE&&a.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&(a=document);return a},findTarget:function(a){var b=a.clientX,c=a.clientY;a=this.owner(a.target);a.elementFromPoint(b,c)||(a=document);return this.searchRoot(a,b,c)}},H=Array.prototype.forEach.call.bind(Array.prototype.forEach),I=Array.prototype.map.call.bind(Array.prototype.map),z=Array.prototype.slice.call.bind(Array.prototype.slice),
M=Array.prototype.filter.call.bind(Array.prototype.filter),K=window.MutationObserver||window.WebKitMutationObserver,L={subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["touch-action"]};g.prototype={watchSubtree:function(a){this.observer&&F.canTarget(a)&&this.observer.observe(a,L)},enableOnSubtree:function(a){this.watchSubtree(a);a===document&&"complete"!==document.readyState?this.installOnLoad():this.installNewSubtree(a)},installNewSubtree:function(a){H(this.findElements(a),
this.addElement,this)},findElements:function(a){return a.querySelectorAll?a.querySelectorAll("[touch-action]"):[]},removeElement:function(a){this.removeCallback(a)},addElement:function(a){this.addCallback(a)},elementChanged:function(a,b){this.changedCallback(a,b)},concatLists:function(a,b){return a.concat(z(b))},installOnLoad:function(){document.addEventListener("readystatechange",function(){"complete"===document.readyState&&this.installNewSubtree(document)}.bind(this))},isElement:function(a){return a.nodeType===
Node.ELEMENT_NODE},flattenMutationTree:function(a){var b=I(a,this.findElements,this);b.push(M(a,this.isElement));return b.reduce(this.concatLists,[])},mutationWatcher:function(a){a.forEach(this.mutationHandler,this)},mutationHandler:function(a){"childList"===a.type?(this.flattenMutationTree(a.addedNodes).forEach(this.addElement,this),this.flattenMutationTree(a.removedNodes).forEach(this.removeElement,this)):"attributes"===a.type&&this.elementChanged(a.target,a.oldValue)}};var N=["none","auto","pan-x",
"pan-y",{rule:"pan-x pan-y",selectors:["pan-x pan-y","pan-y pan-x"]}],Q="",O=window.PointerEvent||window.MSPointerEvent,T=!window.ShadowDOMPolyfill&&document.head.createShadowRoot,R=D.pointermap,Y=[1,4,2,8,16],S=!1;try{S=1===(new MouseEvent("test",{buttons:1})).buttons}catch(G){}var U={POINTER_ID:1,POINTER_TYPE:"mouse",events:["mousedown","mousemove","mouseup","mouseover","mouseout"],register:function(a){D.listen(a,this.events)},unregister:function(a){D.unlisten(a,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(a){var b=
this.lastTouches,c=a.clientX;a=a.clientY;for(var d=0,e=b.length,f;d<e&&(f=b[d]);d++){var h=Math.abs(a-f.y);if(25>=Math.abs(c-f.x)&&25>=h)return!0}},prepareEvent:function(a){var b=D.cloneEvent(a),c=b.preventDefault;b.preventDefault=function(){a.preventDefault();c()};b.pointerId=this.POINTER_ID;b.isPrimary=!0;b.pointerType=this.POINTER_TYPE;return b},prepareButtonsForMove:function(a,b){var c=R.get(this.POINTER_ID);a.buttons=0!==b.which&&c?c.buttons:0;b.buttons=a.buttons},mousedown:function(a){if(!this.isEventSimulatedFromTouch(a)){var b=
R.get(this.POINTER_ID),c=this.prepareEvent(a);S||(c.buttons=Y[c.button],b&&(c.buttons|=b.buttons),a.buttons=c.buttons);R.set(this.POINTER_ID,a);b&&0!==b.buttons?D.move(c):D.down(c)}},mousemove:function(a){if(!this.isEventSimulatedFromTouch(a)){var b=this.prepareEvent(a);S||this.prepareButtonsForMove(b,a);b.button=-1;R.set(this.POINTER_ID,a);D.move(b)}},mouseup:function(a){if(!this.isEventSimulatedFromTouch(a)){var b=R.get(this.POINTER_ID),c=this.prepareEvent(a);if(!S){var d=Y[c.button];c.buttons=
b?b.buttons&~d:0;a.buttons=c.buttons}R.set(this.POINTER_ID,a);c.buttons&=~Y[c.button];0===c.buttons?D.up(c):D.move(c)}},mouseover:function(a){if(!this.isEventSimulatedFromTouch(a)){var b=this.prepareEvent(a);S||this.prepareButtonsForMove(b,a);b.button=-1;R.set(this.POINTER_ID,a);D.enterOver(b)}},mouseout:function(a){if(!this.isEventSimulatedFromTouch(a)){var b=this.prepareEvent(a);S||this.prepareButtonsForMove(b,a);b.button=-1;D.leaveOut(b)}},cancel:function(a){a=this.prepareEvent(a);D.cancel(a);
this.deactivateMouse()},deactivateMouse:function(){R.delete(this.POINTER_ID)}},X=D.captureInfo,h=F.findTarget.bind(F),P=F.allShadows.bind(F),y=D.pointermap,c,b={events:["touchstart","touchmove","touchend","touchcancel"],register:function(a){c.enableOnSubtree(a)},unregister:function(a){},elementAdded:function(a){var b=a.getAttribute("touch-action"),c=this.touchActionToScrollType(b);c&&(a._scrollType=c,D.listen(a,this.events),P(a).forEach(function(a){a._scrollType=c;D.listen(a,this.events)},this))},
elementRemoved:function(a){a._scrollType=void 0;D.unlisten(a,this.events);P(a).forEach(function(a){a._scrollType=void 0;D.unlisten(a,this.events)},this)},elementChanged:function(a,b){var c=a.getAttribute("touch-action"),d=this.touchActionToScrollType(c);b=this.touchActionToScrollType(b);d&&b?(a._scrollType=d,P(a).forEach(function(a){a._scrollType=d},this)):b?this.elementRemoved(a):d&&this.elementAdded(a)},scrollTypes:{EMITTER:"none",XSCROLLER:"pan-x",YSCROLLER:"pan-y",SCROLLER:/^(?:pan-x pan-y)|(?:pan-y pan-x)|auto$/},
touchActionToScrollType:function(a){var b=this.scrollTypes;if("none"===a)return"none";if(a===b.XSCROLLER)return"X";if(a===b.YSCROLLER)return"Y";if(b.SCROLLER.exec(a))return"XY"},POINTER_TYPE:"touch",firstTouch:null,isPrimaryTouch:function(a){return this.firstTouch===a.identifier},setPrimaryTouch:function(a){if(0===y.size||1===y.size&&y.has(1))this.firstTouch=a.identifier,this.firstXY={X:a.clientX,Y:a.clientY},this.scrolling=!1,this.cancelResetClickCount()},removePrimaryPointer:function(a){a.isPrimary&&
(this.firstXY=this.firstTouch=null,this.resetClickCount())},clickCount:0,resetId:null,resetClickCount:function(){var a=function(){this.clickCount=0;this.resetId=null}.bind(this);this.resetId=setTimeout(a,200)},cancelResetClickCount:function(){this.resetId&&clearTimeout(this.resetId)},typeToButtons:function(a){var b=0;if("touchstart"===a||"touchmove"===a)b=1;return b},touchToPointer:function(a){var b=this.currentTouchEvent,c=D.cloneEvent(a),d=c.pointerId=a.identifier+2;c.target=X[d]||h(c);c.bubbles=
!0;c.cancelable=!0;c.detail=this.clickCount;c.button=0;c.buttons=this.typeToButtons(b.type);c.width=a.radiusX||a.webkitRadiusX||0;c.height=a.radiusY||a.webkitRadiusY||0;c.pressure=a.force||a.webkitForce||.5;c.isPrimary=this.isPrimaryTouch(a);c.pointerType=this.POINTER_TYPE;c.altKey=b.altKey;c.ctrlKey=b.ctrlKey;c.metaKey=b.metaKey;c.shiftKey=b.shiftKey;var e=this;c.preventDefault=function(){e.scrolling=!1;e.firstXY=null;b.preventDefault()};return c},processTouches:function(a,b){var c=a.changedTouches;
this.currentTouchEvent=a;a=0;for(var d;a<c.length;a++)d=c[a],b.call(this,this.touchToPointer(d))},shouldScroll:function(a){if(this.firstXY){var b;b=a.currentTarget._scrollType;if("none"===b)b=!1;else if("XY"===b)b=!0;else{a=a.changedTouches[0];var c="Y"===b?"X":"Y";b=Math.abs(a["client"+b]-this.firstXY[b])>=Math.abs(a["client"+c]-this.firstXY[c])}this.firstXY=null;return b}},findTouch:function(a,b){for(var c=0,d=a.length,e;c<d&&(e=a[c]);c++)if(e.identifier===b)return!0},vacuumTouches:function(a){var b=
a.touches;if(y.size>=b.length){var c=[];y.forEach(function(a,d){1===d||this.findTouch(b,d-2)||c.push(a.out)},this);c.forEach(this.cancelOut,this)}},touchstart:function(a){this.vacuumTouches(a);this.setPrimaryTouch(a.changedTouches[0]);this.dedupSynthMouse(a);this.scrolling||(this.clickCount++,this.processTouches(a,this.overDown))},overDown:function(a){y.set(a.pointerId,{target:a.target,out:a,outTarget:a.target});D.enterOver(a);D.down(a)},touchmove:function(a){this.scrolling||(this.shouldScroll(a)?
(this.scrolling=!0,this.touchcancel(a)):(a.preventDefault(),this.processTouches(a,this.moveOverOut)))},moveOverOut:function(a){var b=y.get(a.pointerId);if(b){var c=b.out,d=b.outTarget;D.move(a);c&&d!==a.target&&(c.relatedTarget=a.target,a.relatedTarget=d,c.target=d,a.target?(D.leaveOut(c),D.enterOver(a)):(a.target=d,a.relatedTarget=null,this.cancelOut(a)));b.out=a;b.outTarget=a.target}},touchend:function(a){this.dedupSynthMouse(a);this.processTouches(a,this.upOut)},upOut:function(a){this.scrolling||
(D.up(a),D.leaveOut(a));this.cleanUpPointer(a)},touchcancel:function(a){this.processTouches(a,this.cancelOut)},cancelOut:function(a){D.cancel(a);D.leaveOut(a);this.cleanUpPointer(a)},cleanUpPointer:function(a){y.delete(a.pointerId);this.removePrimaryPointer(a)},dedupSynthMouse:function(a){var b=U.lastTouches;a=a.changedTouches[0];this.isPrimaryTouch(a)&&(a={x:a.clientX,y:a.clientY},b.push(a),b=function(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}.bind(null,b,a),setTimeout(b,2500))}};c=new g(b.elementAdded,
b.elementRemoved,b.elementChanged,b);var e=D.pointermap,k=window.MSPointerEvent&&"number"===typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE,n={events:"MSPointerDown MSPointerMove MSPointerUp MSPointerOut MSPointerOver MSPointerCancel MSGotPointerCapture MSLostPointerCapture".split(" "),register:function(a){D.listen(a,this.events)},unregister:function(a){D.unlisten(a,this.events)},POINTER_TYPES:["","unavailable","touch","pen","mouse"],prepareEvent:function(a){var b=a;k&&(b=D.cloneEvent(a),b.pointerType=
this.POINTER_TYPES[a.pointerType]);return b},cleanup:function(a){e.delete(a)},MSPointerDown:function(a){e.set(a.pointerId,a);a=this.prepareEvent(a);D.down(a)},MSPointerMove:function(a){a=this.prepareEvent(a);D.move(a)},MSPointerUp:function(a){var b=this.prepareEvent(a);D.up(b);this.cleanup(a.pointerId)},MSPointerOut:function(a){a=this.prepareEvent(a);D.leaveOut(a)},MSPointerOver:function(a){a=this.prepareEvent(a);D.enterOver(a)},MSPointerCancel:function(a){var b=this.prepareEvent(a);D.cancel(b);this.cleanup(a.pointerId)},
MSLostPointerCapture:function(a){a=D.makeEvent("lostpointercapture",a);D.dispatchEvent(a)},MSGotPointerCapture:function(a){a=D.makeEvent("gotpointercapture",a);D.dispatchEvent(a)}},u,C;window.navigator.msPointerEnabled?(u=function(a){l(a);p(this);0!==D.pointermap.get(a).buttons&&this.msSetPointerCapture(a)},C=function(a){l(a);this.msReleasePointerCapture(a)}):(u=function(a){l(a);p(this);0!==D.pointermap.get(a).buttons&&D.setCapture(a,this)},C=function(a){l(a);D.releaseCapture(a,this)});var J=window.PointerEvent||
window.MSPointerEvent;return{dispatcher:D,Installer:g,PointerEvent:A,PointerMap:v,targetFinding:F,applyGlobal:function(){m();window.PointerEvent||(window.PointerEvent=A,window.navigator.msPointerEnabled?(Object.defineProperty(window.navigator,"maxTouchPoints",{value:window.navigator.msMaxTouchPoints,enumerable:!0}),D.registerSource("ms",n)):(D.registerSource("mouse",U),void 0!==window.ontouchstart&&D.registerSource("touch",b)),D.register(document));window.Element&&!Element.prototype.setPointerCapture&&
Object.defineProperties(Element.prototype,{setPointerCapture:{value:u},releasePointerCapture:{value:C}})},applyLocal:function(a){J||(window.PointerEvent||(window.navigator.msPointerEnabled?D.registerSource("ms",n):(D.registerSource("mouse",U),void 0!==window.ontouchstart&&D.registerSource("touch",b)),D.register(document)),window.Element&&!Element.prototype.setPointerCapture&&(a.setPointerCapture=u.bind(a),a.releasePointerCapture=C.bind(a)),a.getAttribute("touch-action")||a.setAttribute("touch-action",
"none"))}}})},"esri/views/input/ViewEvents":function(){define(["require","exports","../../core/tsSupport/extendsHelper","./InputHandler","../../geometry/ScreenPoint"],function(A,t,g,a,d){function f(a){return!!l[a]}function m(a){for(var d=0;d<a.length;d++)if(!f(a[d]))return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0});var l={click:!0,"double-click":!0,hold:!0,drag:!0,"key-down":!0,"key-up":!0,"pointer-down":!0,"pointer-move":!0,"pointer-up":!0,"mouse-wheel":!0,"pointer-enter":!0,"pointer-leave":!0},
p;(function(a){a[a.Left=0]="Left";a[a.Middle=1]="Middle";a[a.Right=2]="Right"})(p||(p={}));A=function(){function a(a){this.handlers=new Map;this.counter=0;this.view=a;this.inputManager=null}a.prototype.connect=function(a){var d=this;a&&this.disconnect();this.inputManager=a;this.handlers.forEach(function(a,f){return d.inputManager.installHandlers(f,[a])})};a.prototype.disconnect=function(){var a=this;this.inputManager&&this.handlers.forEach(function(d,f){return a.inputManager.uninstallHandlers(f)});
this.inputManager=null};a.prototype.destroy=function(){this.disconnect();this.handlers.clear();this.view=null};a.prototype.register=function(a,d,g){var l=this;a=Array.isArray(a)?a:a.split(",");if(!m(a))return a.some(f)&&console.error("Error: registering input events and other events on the view at the same time is not supported."),null;var p=Array.isArray(d)?d:[];g=Array.isArray(d)?g:d;var q=this.createUniqueGroupName();d=new r(this.view,a,p,g);this.handlers.set(q,d);this.inputManager&&this.inputManager.installHandlers(q,
[d]);return{remove:function(){return l.removeHandler(q)}}};a.prototype.removeHandler=function(a){this.handlers.has(a)&&this.handlers.delete(a);this.inputManager&&this.inputManager.uninstallHandlers(a)};a.prototype.createUniqueGroupName=function(){this.counter+=1;return"viewEvents_"+this.counter};return a}();t.ViewEvents=A;var r=function(a){function f(d,f,g,l){var m=a.call(this,!0)||this;m.view=d;for(d=0;d<f.length;d++)switch(f[d]){case "click":m.registerIncoming("click",g,function(a){return l(m.wrapClick(a))});
break;case "double-click":m.registerIncoming("double-click",g,function(a){return l(m.wrapDoubleClick(a))});break;case "hold":m.registerIncoming("hold",g,function(a){return l(m.wrapHold(a))});break;case "drag":m.registerIncoming("drag",g,function(a){return l(m.wrapDrag(a))});break;case "key-down":m.registerIncoming("key-down",g,function(a){return l(m.wrapKeyDown(a))});break;case "key-up":m.registerIncoming("key-up",g,function(a){return l(m.wrapKeyUp(a))});break;case "pointer-down":m.registerIncoming("pointer-down",
g,function(a){return l(m.wrapPointer(a,"pointer-down"))});break;case "pointer-move":m.registerIncoming("pointer-move",g,function(a){return l(m.wrapPointer(a,"pointer-move"))});break;case "pointer-up":m.registerIncoming("pointer-up",g,function(a){return l(m.wrapPointer(a,"pointer-up"))});break;case "mouse-wheel":m.registerIncoming("mouse-wheel",g,function(a){return l(m.wrapMouseWheel(a))});break;case "pointer-enter":m.registerIncoming("pointer-enter",g,function(a){return l(m.wrapPointer(a,"pointer-enter"))});
break;case "pointer-leave":m.registerIncoming("pointer-leave",g,function(a){return l(m.wrapPointer(a,"pointer-leave"))})}return m}g(f,a);f.prototype.wrapClick=function(a){var f=a.data.x,g=a.data.y;return{type:"click",button:"touch"===a.data.native.pointerType?0:a.data.native.button,x:f,y:g,native:a.data.native,timestamp:a.timestamp,screenPoint:new d(f,g),mapPoint:this.view.toMap(f,g),stopPropagation:function(){return a.stopPropagation()}}};f.prototype.wrapDoubleClick=function(a){var d=a.data.x,f=
a.data.y;return{type:"double-click",button:"touch"===a.data.native.pointerType?0:a.data.native.button,x:d,y:f,native:a.data.native,timestamp:a.timestamp,mapPoint:this.view.toMap(d,f),stopPropagation:function(){return a.stopPropagation()}}};f.prototype.wrapHold=function(a){var d=a.data.x,f=a.data.y;return{type:"hold",button:"touch"===a.data.native.pointerType?0:a.data.native.button,x:d,y:f,native:a.data.native,timestamp:a.timestamp,mapPoint:this.view.toMap(d,f),stopPropagation:function(){return a.stopPropagation()}}};
f.prototype.wrapDrag=function(a){return{type:"drag",action:a.data.action,x:a.data.currentState.center.x,y:a.data.currentState.center.y,origin:{x:a.data.startState.center.x,y:a.data.startState.center.y},native:a.data.pointers[0].currentEvent.native,timestamp:a.timestamp,stopPropagation:function(){return a.stopPropagation()}}};f.prototype.wrapKeyDown=function(a){return{type:"key-down",key:a.data.key,repeat:a.data.repeat,native:a.data.native,timestamp:a.timestamp,stopPropagation:function(){return a.stopPropagation()}}};
f.prototype.wrapKeyUp=function(a){return{type:"key-up",key:a.data.key,native:a.data.native,timestamp:a.timestamp,stopPropagation:function(){return a.stopPropagation()}}};f.prototype.wrapPointer=function(a,d){return{type:d,x:a.data.x,y:a.data.y,pointerId:a.data.native.pointerId,pointerType:a.data.native.pointerType,native:a.data.native,timestamp:a.timestamp,stopPropagation:function(){return a.stopPropagation()}}};f.prototype.wrapMouseWheel=function(a){return{type:"mouse-wheel",x:a.data.x,y:a.data.y,
deltaY:a.data.deltaY,native:a.data.native,timestamp:a.timestamp,stopPropagation:function(){return a.stopPropagation()}}};return f}(a.InputHandler)})},"esri/views/input/handlers/PreventContextMenu":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","../InputHandler"],function(A,t,g,a){Object.defineProperty(t,"__esModule",{value:!0});A=function(a){function d(){var d=a.call(this,!0)||this;d.registerIncoming("context-menu",function(a){a.data.native.preventDefault()});return d}
g(d,a);return d}(a.InputHandler);t.PreventContextMenu=A;t.default=A})},"esri/views/2d/input/handlers/DoubleClickZoom":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","../../../input/InputHandler","../../../input/handlers/support"],function(A,t,g,a,d){Object.defineProperty(t,"__esModule",{value:!0});A=function(a){function f(d,f){var g=a.call(this,!0)||this;g.view=d;g.registerIncoming("double-click",f,function(a){return g._handleDoubleClick(a,f)});return g}g(f,a);f.prototype._handleDoubleClick=
function(a,f){d.eventMatchesPointerType(a.data.native,"primary")&&(a.stopPropagation(),f?this.view.navigation.zoomOut([a.data.x,a.data.y]):this.view.navigation.zoomIn([a.data.x,a.data.y]))};return f}(a.InputHandler);t.DoubleClickZoom=A})},"esri/views/input/handlers/support":function(){define(["require","exports"],function(A,t){Object.defineProperty(t,"__esModule",{value:!0});t.eventMatchesPointerType=function(g,a){switch(a){case "primary":return"touch"===g.pointerType||0===g.button;case "secondary":return"touch"!==
g.pointerType&&2===g.button;case "tertiary":return"touch"!==g.pointerType&&1===g.button}};t.eventMatchesMousePointerType=function(g,a){if("touch"===g.pointerType)return!1;switch(a){case "primary":return 0===g.button;case "secondary":return 2===g.button;case "tertiary":return 1===g.button}}})},"esri/views/2d/input/handlers/DragPan":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","../../../input/InputHandler","../../../input/handlers/support"],function(A,t,g,a,d){Object.defineProperty(t,
"__esModule",{value:!0});A=function(a){function f(d,f,g){var l=a.call(this,!0)||this;l.view=d;l.pointerType=f;l.registerIncoming("drag",g,function(a){return l._handleDrag(a)});l.registerIncoming("pointer-down",function(a){return l.stopMomentumNavigation()});return l}g(f,a);f.prototype._handleDrag=function(a){var f=a.data,g=this.view.navigation;if(1<f.pointers.length||g.pinch.zoomMomentum||g.pinch.rotateMomentum)this.stopMomentumNavigation();else if(d.eventMatchesPointerType(f.pointers[0].startEvent.native,
this.pointerType)){g=g.pan;switch(f.action){case "start":g.begin(this.view,f);break;case "update":g.update(this.view,f);break;case "end":g.end(this.view,f)}a.stopPropagation()}};f.prototype.stopMomentumNavigation=function(){this.view.navigation.pan.stopMomentumNavigation()};return f}(a.InputHandler);t.DragPan=A})},"esri/views/2d/input/handlers/DragRotate":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","../../../input/InputHandler","../../../input/handlers/support"],
function(A,t,g,a,d){Object.defineProperty(t,"__esModule",{value:!0});A=function(a){function f(d,f,g){var l=a.call(this,!0)||this;l.view=d;l.pointerType=f;l.registerIncoming("drag",g,function(a){return l._handleDrag(a)});return l}g(f,a);f.prototype._handleDrag=function(a){var f=a.data;if(!(1<f.pointers.length)&&d.eventMatchesPointerType(f.pointers[0].startEvent.native,this.pointerType)){var g=this.view.navigation.rotate;switch(f.action){case "start":g.begin(this.view,f);break;case "update":g.update(this.view,
f);break;case "end":g.end(this.view,f)}a.stopPropagation()}};return f}(a.InputHandler);t.DragRotate=A})},"esri/views/2d/input/handlers/KeyPan":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","../../../input/InputHandler"],function(A,t,g,a){Object.defineProperty(t,"__esModule",{value:!0});A=function(a){function d(d,f,g){var l=a.call(this,!0)||this;l.view=d;l.keys=f;l._keyMap=(m={},m[f.left]="left",m[f.right]="right",m[f.up]="up",m[f.down]="down",m);l.registerIncoming("key-down",
g,function(a){return l._handleKeyDown(a)});l.registerIncoming("key-up",g,function(a){return l._handleKeyUp(a)});return l;var m}g(d,a);d.prototype._handleKeyDown=function(a){a.data.repeat||this._handleKey(a,!0)};d.prototype._handleKeyUp=function(a){this._handleKey(a,!1)};d.prototype._handleKey=function(a,d){var f=this._keyMap[a.data.key];if(null!=f){if(d)switch(f){case "left":this.view.navigation.continousPanLeft();break;case "right":this.view.navigation.continousPanRight();break;case "up":this.view.navigation.continousPanUp();
break;case "down":this.view.navigation.continousPanDown()}else this.view.navigation.stop();a.stopPropagation()}};return d}(a.InputHandler);t.KeyPan=A})},"esri/views/2d/input/handlers/KeyZoom":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","../../../input/InputHandler"],function(A,t,g,a){Object.defineProperty(t,"__esModule",{value:!0});var d;(function(a){a[a.IN=0]="IN";a[a.OUT=1]="OUT"})(d||(d={}));A=function(a){function f(f,g,m){var l=a.call(this,!0)||this;l.view=
f;l.keys=g;l._keysToZoomAction={};l.registerIncoming("key-down",m,function(a){return l._handleKeyDown(a)});g.zoomIn.forEach(function(a){return l._keysToZoomAction[a]=d.IN});g.zoomOut.forEach(function(a){return l._keysToZoomAction[a]=d.OUT});return l}g(f,a);f.prototype._handleKeyDown=function(a){this._handleKey(a)};f.prototype._handleKey=function(a){var f=a.modifiers;0<f.size&&!f.has("Shift")||(f=this._keysToZoomAction[a.data.key],f===d.IN?(this.view.navigation.zoomIn(),a.stopPropagation()):f===d.OUT&&
(this.view.navigation.zoomOut(),a.stopPropagation()))};return f}(a.InputHandler);t.KeyZoom=A})},"esri/views/2d/input/handlers/KeyRotate":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","../../../input/InputHandler"],function(A,t,g,a){Object.defineProperty(t,"__esModule",{value:!0});A=function(a){function d(d,f,g){var l=a.call(this,!0)||this;l.view=d;l.keys=f;l._keyToDirection=(m={},m[f.clockwiseOption1]="clockwise",m[f.clockwiseOption2]="clockwise",m[f.counterClockwiseOption1]=
"counterClockwise",m[f.counterClockwiseOption2]="counterClockwise",m[f.resetOption1]="reset",m[f.resetOption2]="reset",m);l.registerIncoming("key-down",g,function(a){return l._handleKeyDown(a)});l.registerIncoming("key-up",g,function(a){return l._handleKeyUp(a)});return l;var m}g(d,a);d.prototype._handleKeyDown=function(a){a.data.repeat||this._handleKey(a,!0)};d.prototype._handleKeyUp=function(a){this._handleKey(a,!1)};d.prototype._handleKey=function(a,d){var f=a.modifiers;0<f.size&&!f.has("Shift")||
!this.view.constraints.rotationEnabled||!(f=this._keyToDirection[a.data.key])||(d?"clockwise"===f?this.view.navigation.continousRotateClockwise():"counterClockwise"===f?this.view.navigation.continousRotateCounterclockwise():this.view.navigation.resetRotation():this.view.navigation.stop(),a.stopPropagation())};return d}(a.InputHandler);t.KeyRotate=A})},"esri/views/2d/input/handlers/MouseWheelZoom":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","../../../input/InputHandler"],
function(A,t,g,a){Object.defineProperty(t,"__esModule",{value:!0});A=function(a){function d(d,f){var g=a.call(this,!0)||this;g.view=d;g._canZoom=!0;g.registerIncoming("mouse-wheel",f,function(a){return g._handleMouseWheel(a)});return g}g(d,a);d.prototype._handleMouseWheel=function(a){var d=this;if(this._canZoom){var f=a.data;if(f=this.view.navigation.zoom(1/Math.pow(.6,1/60*f.deltaY),[f.x,f.y]))this._canZoom=!1,f.always(function(){d._canZoom=!0});a.stopPropagation()}};return d}(a.InputHandler);t.MouseWheelZoom=
A})},"esri/views/2d/input/handlers/PinchAction":function(){define(["require","exports","../../../../core/tsSupport/extendsHelper","../../../input/InputHandler"],function(A,t,g,a){Object.defineProperty(t,"__esModule",{value:!0});A=function(a){function d(d){var f=a.call(this,!0)||this;f.view=d;f.registerIncoming("drag",function(a){return f._handleDrag(a)});f.registerIncoming("pointer-down",function(a){return f.stopMomentumNavigation()});return f}g(d,a);d.prototype._handleDrag=function(a){var d=a.data;
if(!(2>d.pointers.length)){var f=this.view.navigation.pinch;switch(d.action){case "start":f.begin(this.view,d);break;case "update":f.update(this.view,d);break;case "end":f.end(this.view,d)}a.stopPropagation()}};d.prototype.stopMomentumNavigation=function(){this.view.navigation.pinch.stopMomentumNavigation()};return d}(a.InputHandler);t.PinchRotateAndZoom=A})},"esri/views/2d/navigation/MapViewNavigation":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ../../../core/Accessor ../../../Viewpoint ../../../geometry/Point ./actions/Pan ./actions/Rotate ./actions/Pinch ./ZoomBox ../viewpointUtils".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x){var w=new m({targetGeometry:new l}),B=[0,0];return function(f){function l(a){a=f.call(this)||this;a.animationManager=null;return a}g(l,f);l.prototype.initialize=function(){this.pan=new p({navigation:this});this.rotate=new r({navigation:this});this.pinch=new q({navigation:this});this.zoomBox=new v({view:this.view,navigation:this})};l.prototype.destroy=function(){this.zoomBox.destroy();this.animationManager=this.zoomBox=null};l.prototype.begin=function(){this._set("interacting",
!0)};l.prototype.end=function(){this._set("interacting",!1)};l.prototype.zoom=function(a,d){void 0===d&&(d=this._getDefaultAnchor());this.stop();this.begin();if(this.view.constraints.snapToZoom&&this.view.constraints.effectiveLODs)return 1>a?this.zoomIn(d):this.zoomOut(d);this.setViewpoint(d,a,0)};l.prototype.zoomIn=function(a){void 0===a&&(a=this._getDefaultAnchor());this.begin();var d=this.view,f=d.scale,g=d.constraints.snapToNextScale(f);a=d.goTo(this._scaleAndRotateViewpoint(w,a,g/f,0));this.end();
return a};l.prototype.zoomOut=function(a){void 0===a&&(a=this._getDefaultAnchor());this.begin();var d=this.view,f=d.scale,g=d.constraints.snapToPreviousScale(f);a=d.goTo(this._scaleAndRotateViewpoint(w,a,g/f,0));this.end();return a};l.prototype.setViewpoint=function(a,d,f){this.begin();this.view.state.viewpoint=this._scaleAndRotateViewpoint(w,a,d,f);this.end()};l.prototype.animateViewpoint=function(a,d,f){return this.view.goTo(this._scaleAndRotateViewpoint(w,a,d,f))};l.prototype.continousRotateClockwise=
function(){var a=this.get("view.viewpoint");this.animationManager.animateContinous(a,function(a){x.rotateBy(a,a,-1)})};l.prototype.continousRotateCounterclockwise=function(){var a=this.get("view.viewpoint");this.animationManager.animateContinous(a,function(a){x.rotateBy(a,a,1)})};l.prototype.resetRotation=function(){this.view.rotation=0};l.prototype.continousPanLeft=function(){var a=this.get("view.viewpoint");this.animationManager.animateContinous(a,function(a){x.translateBy(a,a,[-10,0])})};l.prototype.continousPanRight=
function(){var a=this.get("view.viewpoint");this.animationManager.animateContinous(a,function(a){x.translateBy(a,a,[10,0])})};l.prototype.continousPanUp=function(){var a=this.get("view.viewpoint");this.animationManager.animateContinous(a,function(a){x.translateBy(a,a,[0,10])})};l.prototype.continousPanDown=function(){var a=this.get("view.viewpoint");this.animationManager.animateContinous(a,function(a){x.translateBy(a,a,[0,-10])})};l.prototype.stop=function(){this.pan.stopMomentumNavigation();this.animationManager.stop();
this.end()};l.prototype._getDefaultAnchor=function(){var a=this.view.size;B[0]=.5*a[0];B[1]=.5*a[1];return B};l.prototype._scaleAndRotateViewpoint=function(a,d,f,g){var l=this.view,m=l.size,p=l.padding,q=l.constraints,r=l.viewpoint,t=l.scale*f,l=q.canZoomInTo(t),q=q.canZoomOutTo(t);return 1>f&&!l||1<f&&!q?r:x.padAndScaleAndRotateBy(a,r,f,g,d,m,p)};a([d.property()],l.prototype,"animationManager",void 0);a([d.property({type:Boolean,readOnly:!0})],l.prototype,"interacting",void 0);a([d.property()],l.prototype,
"pan",void 0);a([d.property()],l.prototype,"pinch",void 0);a([d.property()],l.prototype,"rotate",void 0);a([d.property()],l.prototype,"view",void 0);a([d.property()],l.prototype,"zoomBox",void 0);return l=a([d.subclass("esri.views.2d.navigation.MapViewNavigation")],l)}(d.declared(f))})},"esri/views/2d/navigation/actions/Pan":function(){define("require exports ../../../../core/tsSupport/declareExtendsHelper ../../../../core/tsSupport/decorateHelper ../../../../core/accessorSupport/decorators ../../../../core/Accessor ../../viewpointUtils ../../../navigation/Momentum ../../../3d/lib/glMatrix".split(" "),
function(A,t,g,a,d,f,m,l,p){return function(f){function q(a){var d=f.call(this)||this;d.animationTime=0;d.momentumEstimator=new l.ScreenspaceMomentumEstimator(.05,600,6,.92);d.momentum=null;d.momentumVelocityX=0;d.momentumVelocityY=0;d.momentumFinished=!1;d.viewpoint=m.create();d.watch("momentumFinished",function(a){a&&d.navigation.stop()});return d}g(q,f);q.prototype.begin=function(a,d){this.navigation.begin();this.momentumEstimator.reset();this.addToEstimator(d)};q.prototype.update=function(a,d){this.addToEstimator(d);
var f=d.pointers[0];d=f.currentEvent.x;var g=f.currentEvent.y;d=(f=f.previousEvent)?f.x-d:-d;g=f?g-f.y:g;a.viewpoint=m.translateBy(this.viewpoint,a.viewpoint,[d||0,g||0])};q.prototype.end=function(a,d){this.addToEstimator(d);this.momentum=this.momentumEstimator.evaluateMomentum();this.animationTime=0;this.momentum&&(this.momentumVelocityX=(this.momentum.dataNewest[0]-this.momentum.dataOldest[0])/this.momentum.dataTimeDelta,this.momentumVelocityY=(this.momentum.dataNewest[1]-this.momentum.dataOldest[1])/
this.momentum.dataTimeDelta,this.onAnimationUpdate(a));this.navigation.end()};q.prototype.addToEstimator=function(a){var d=a.pointers[0],f=d.currentEvent.x,d=d.currentEvent.y;this.momentumEstimator.add(f,d,p.vec3.createFrom(f,d,0),.001*a.currentState.timestamp)};q.prototype.onAnimationUpdate=function(a){var d=this;this.navigation.animationManager.animateContinous(a.viewpoint,function(f,g){d.momentumFinished=!d.momentum||d.momentum.isFinished(d.animationTime);g*=.001;if(!d.momentumFinished){var l=
d.momentum.velocityFactor(d.animationTime);a.viewpoint=m.translateBy(f,f,[-(l*d.momentumVelocityX*g),l*d.momentumVelocityY*g])}d.animationTime+=g})};q.prototype.stopMomentumNavigation=function(){this.momentum&&(this.momentumEstimator.reset(),this.momentum=null,this.navigation.stop())};a([d.property()],q.prototype,"momentumFinished",void 0);a([d.property()],q.prototype,"viewpoint",void 0);a([d.property()],q.prototype,"navigation",void 0);return q=a([d.subclass("esri.views.2d.navigation.actions.Pan")],
q)}(d.declared(f))})},"esri/views/navigation/Momentum":function(){define(["require","exports","../../core/tsSupport/extendsHelper","./ValueHistory","../3d/lib/glMatrix"],function(A,t,g,a,d){Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function a(a,d,f){this._initialVelocity=a;this._stopVelocity=d;this._friction=f;this._duration=Math.abs(Math.log(Math.abs(this._initialVelocity)/this._stopVelocity)/Math.log(1-this._friction))}Object.defineProperty(a.prototype,"duration",{get:function(){return this._duration},
enumerable:!0,configurable:!0});a.prototype.isFinished=function(a){return a>this.duration};Object.defineProperty(a.prototype,"friction",{get:function(){return this._friction},enumerable:!0,configurable:!0});a.prototype.value=function(a){a=Math.min(a,this.duration);var d=1-this._friction;return this._initialVelocity*(Math.pow(d,a)-1)/Math.log(d)};a.prototype.valueDelta=function(a,d){var f=this.value(a);return this.value(a+d)-f};return a}();t.Momentum=f;A=function(){function d(d,f,g,l){void 0===d&&
(d=.05);this._minimumInitialVelocity=f;this._stopVelocity=g;this._friction=l;this._history=new a.ValueHistory(1E3*d)}d.prototype.add=function(a,d){void 0!==d&&(d*=1E3);this._history.add(a,d)};d.prototype.reset=function(){this._history.reset()};Object.defineProperty(d.prototype,"stopVelocity",{get:function(){return this._stopVelocity},enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"friction",{get:function(){return this._friction},enumerable:!0,configurable:!0});d.prototype.evaluateMomentum=
function(){var a=this._evaluateVelocity();return null!==a?new f(a,this._stopVelocity,this._friction):null};d.prototype._evaluateVelocity=function(){var a=this._history,d=a.oldest,a=a.newest;if(d&&a){var f=(a.timeStamp-d.timeStamp)/1E3;if(0<f&&(d=(a.value-d.value)/f,Math.abs(d)>=this._minimumInitialVelocity))return d}return null};return d}();t.MomentumEstimator=A;var m=function(a){function d(d,f,g){return a.call(this,d,f,g)||this}g(d,a);d.prototype.value=function(d){d=a.prototype.value.call(this,d);
return Math.exp(d)};d.prototype.valueDelta=function(d,f){var g=a.prototype.value.call(this,d);d=a.prototype.value.call(this,d+f);return Math.exp(d-g)};return d}(f);t.ZoomMomentum=m;var l=function(a){function d(d,f,g,l){void 0===d&&(d=.05);void 0===f&&(f=4);void 0===g&&(g=.01);void 0===l&&(l=.95);return a.call(this,d,f,g,l)||this}g(d,a);d.prototype.add=function(d,f){a.prototype.add.call(this,Math.log(d),f)};d.prototype.evaluateMomentum=function(){var a=this._evaluateVelocity();return null!==a?new m(a,
this.stopVelocity,this.friction):null};return d}(A);t.ZoomMomentumEstimator=l;A=function(a){function d(d,f,g,l){void 0===d&&(d=.05);void 0===f&&(f=4);void 0===g&&(g=.01);void 0===l&&(l=.95);return a.call(this,d,f,g,l)||this}g(d,a);d.prototype.add=function(d,f){var g=this._history.newest;if(g){g=g.value;for(d-=g;d>Math.PI;)d-=2*Math.PI;for(;d<-Math.PI;)d+=2*Math.PI;d=g+d}a.prototype.add.call(this,d,f)};return d}(A);t.RotationMomentumEstimator=A;var p=function(a){function d(d,f,g,l,m,p){d=a.call(this,
d,f,g)||this;d.dataOldest=l;d.dataNewest=m;d.dataTimeDelta=p;return d}g(d,a);d.prototype.velocityFactor=function(a){a=Math.min(a,this.duration);return Math.pow(1-this.friction,a)};d.prototype.valueFromInitialVelocity=function(a,d){d=Math.min(d,this.duration);var f=1-this.friction;return a*(Math.pow(f,d)-1)/Math.log(f)};return d}(f);t.ScreenspaceMomentum=p;A=function(){function f(d,f,g,l){void 0===d&&(d=.05);this._minimumInitialVelocity=f;this._stopVelocity=g;this._friction=l;this._entryPool=[];this._history=
new a.ValueHistory(1E3*d)}f.prototype.add=function(a,f,g,l){void 0!==l&&(l*=1E3);var m;0!==this._entryPool.length?(m=this._entryPool.pop(),m.x=a,m.y=f,d.vec3d.set(g,m.data)):m={x:a,y:f,data:d.vec3d.create(g)};this._history.add(m,l)};f.prototype.reset=function(){for(var a=0,d=this._history.values;a<d.length;a++)this._entryPool.push(d[a].value);this._history.reset()};Object.defineProperty(f.prototype,"stopVelocity",{get:function(){return this._stopVelocity},enumerable:!0,configurable:!0});Object.defineProperty(f.prototype,
"friction",{get:function(){return this._friction},enumerable:!0,configurable:!0});f.prototype.evaluateMomentum=function(){var a=this._evaluateVelocity(),d=this._history.oldest,f=this._history.newest;return null!==a?new p(a,this._stopVelocity,this._friction,d.value.data,f.value.data,.001*(f.timeStamp-d.timeStamp)):null};f.prototype._evaluateVelocity=function(){var a=this._history,d=a.oldest,f=a.newest;if(d&&f&&(a=.001*(f.timeStamp-d.timeStamp),0<a)){var g=f.value.x-d.value.x,d=f.value.y-d.value.y,
d=Math.sqrt(g*g+d*d)/a;if(Math.abs(d)>=this._minimumInitialVelocity)return d}return null};return f}();t.ScreenspaceMomentumEstimator=A})},"esri/views/navigation/ValueHistory":function(){define(["require","exports","../../core/now"],function(A,t,g){Object.defineProperty(t,"__esModule",{value:!0});A=function(){function a(a){this._maximumAge=a;this._values=[]}Object.defineProperty(a.prototype,"values",{get:function(){return this._values},enumerable:!0,configurable:!0});a.prototype.reset=function(){this._values=
[]};a.prototype.add=function(a,f){f=void 0!==f?f:g();this._values.push({value:a,timeStamp:f});this._cleanup(f)};Object.defineProperty(a.prototype,"newest",{get:function(){var a=this._values.length;if(0<a)return this._values[a-1]},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"oldest",{get:function(){if(0<this._values.length)return this._values[0]},enumerable:!0,configurable:!0});a.prototype._cleanup=function(a){for(;0<this._values.length;)if(this._values[0].timeStamp+this._maximumAge<
a)this._values.shift();else break};return a}();t.ValueHistory=A})},"esri/views/2d/navigation/actions/Rotate":function(){define("require exports ../../../../core/tsSupport/declareExtendsHelper ../../../../core/tsSupport/decorateHelper ../../../../core/accessorSupport/decorators ../../../../core/Accessor ../../viewpointUtils ../../libs/gl-matrix/vec2".split(" "),function(A,t,g,a,d,f,m,l){return function(f){function p(a){a=f.call(this)||this;a.animationTime=0;a.viewpoint=m.create();return a}g(p,f);p.prototype.begin=
function(a,d){this.navigation.begin()};p.prototype.update=function(a,d){var f=d.pointers[0];d=l.create();l.set(d,f.currentEvent.x+a.padding.left-a.padding.right,a.height-f.currentEvent.y+a.padding.top-a.padding.bottom);var f=f.previousEvent,g=l.create();l.set(g,f.x+a.padding.left-a.padding.right,a.height-f.y+a.padding.top-a.padding.bottom);d=m.angleBetween([a.state.paddedScreenCenter[0]+a.padding.left-a.padding.right,a.state.paddedScreenCenter[1]],d,g);a.viewpoint=m.rotateBy(this.viewpoint,a.content.viewpoint,
d)};p.prototype.end=function(a,d){this.navigation.end()};a([d.property()],p.prototype,"viewpoint",void 0);a([d.property()],p.prototype,"navigation",void 0);return p=a([d.subclass("esri.views.2d.actions.Rotate")],p)}(d.declared(f))})},"esri/views/2d/navigation/actions/Pinch":function(){define("require exports ../../../../core/tsSupport/declareExtendsHelper ../../../../core/tsSupport/decorateHelper ../../../../core/accessorSupport/decorators ../../../../core/Accessor ../../viewpointUtils ../../../navigation/Momentum ../../libs/gl-matrix/vec2".split(" "),
function(A,t,g,a,d,f,m,l,p){return function(f){function q(a){var d=f.call(this,a)||this;d.animationTime=0;d.momentumFinished=!1;d.rotateMomentumEstimator=new l.RotationMomentumEstimator(.05,6,.15,.95);d.rotateMomentum=null;d.rotationDirection=1;d.zoomMomentumEstimator=new l.ZoomMomentumEstimator(.05);d.zoomMomentum=null;d.zoomDirection=1;d.viewpoint=m.create();d.watch("momentumFinished",function(a){a&&d.navigation.stop()});return d}g(q,f);q.prototype.begin=function(a,d){this.navigation.begin();this.rotateMomentumEstimator.reset();
this.zoomMomentumEstimator.reset();this.addToRotateEstimator(d,0);this.addToZoomEstimator(d,d.startState.radius/d.currentState.radius)};q.prototype.update=function(a,d){var f=d.currentState,g=f.angle,l=f.radius,f=f.center,m=d.previousState,p=m.radius,q=m.angle,m=d.startState.radius/l;p&&(l/=p,g=180*(g-q)/Math.PI,this.rotationDirection=0<=g?1:-1,this.zoomDirection=1<=l?1:-1,a.constraints.rotationEnabled||(g=0),this.addToRotateEstimator(d,g),this.addToZoomEstimator(d,m),this.center=f,this.navigation.setViewpoint([f.x,
f.y],1/l,g))};q.prototype.end=function(a,d){this.addToRotateEstimator(d,0);this.addToZoomEstimator(d,d.startState.radius/d.currentState.radius);this.rotateMomentum=this.rotateMomentumEstimator.evaluateMomentum();this.zoomMomentum=this.zoomMomentumEstimator.evaluateMomentum();this.animationTime=0;if(this.rotateMomentum||this.zoomMomentum)this.onAnimationUpdate(a);this.navigation.end()};q.prototype.addToRotateEstimator=function(a,d){this.rotateMomentumEstimator.add(d,.001*a.currentState.timestamp)};
q.prototype.addToZoomEstimator=function(a,d){this.zoomMomentumEstimator.add(d,.001*a.currentState.timestamp)};q.prototype.canZoomIn=function(a){var d=a.scale;a=a.constraints.effectiveMaxScale;return 0===a||d>a};q.prototype.canZoomOut=function(a){var d=a.scale;a=a.constraints.effectiveMinScale;return 0===a||d<a};q.prototype.onAnimationUpdate=function(a){var d=this;this.navigation.animationManager.animateContinous(a.viewpoint,function(f,g){var l=!d.canZoomIn(a)&&1<d.zoomDirection||!d.canZoomOut(a)&&
1>d.zoomDirection;d.momentumFinished=!d.rotateMomentum||d.rotateMomentum.isFinished(d.animationTime)||l;g*=.001;d.notifyChange("momentumFinished");if(!d.momentumFinished){var l=Math.abs(d.rotateMomentum.valueDelta(d.animationTime,g))*d.rotationDirection*2,q=d.zoomMomentum?Math.abs(d.zoomMomentum.valueDelta(d.animationTime,g)):1,r=p.create(),t=p.create();p.set(r,d.center.x,d.center.y);m.getPaddingScreenTranslation(t,a.size,a.padding);p.add(r,r,t);m.scaleAndRotateBy(f,a.viewpoint,q,l,r,a.size)}d.animationTime+=
g})};q.prototype.stopMomentumNavigation=function(){if(this.rotateMomentum||this.zoomMomentum)this.rotateMomentum&&(this.rotateMomentumEstimator.reset(),this.rotateMomentum=null),this.zoomMomentum&&(this.zoomMomentumEstimator.reset(),this.zoomMomentum=null),this.navigation.stop()};a([d.property()],q.prototype,"momentumFinished",void 0);a([d.property()],q.prototype,"viewpoint",void 0);a([d.property()],q.prototype,"navigation",void 0);return q=a([d.subclass("esri.views.2d.navigation.actions.Pinch")],
q)}(d.declared(f))})},"esri/views/2d/navigation/ZoomBox":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ../../../core/Accessor".split(" "),function(A,t,g,a,d,f){return function(f){function l(a){a=f.call(this,a)||this;a._container=null;a._overlay=null;a._backgroundShape=null;a._boxShape=null;a._box={x:0,y:0,width:0,height:0};a._redraw=a._redraw.bind(a);return a}g(l,f);l.prototype.destroy=
function(){this.view=null};Object.defineProperty(l.prototype,"view",{set:function(a){var d=this;this._handles&&this._handles.forEach(function(a){a.remove()});this._handles=null;this._destroyOverlay();this._set("view",a);a&&(a.on("drag",["Shift"],function(a){return d._handleDrag(a,1)}),a.on("drag",["Shift","Ctrl"],function(a){return d._handleDrag(a,-1)}))},enumerable:!0,configurable:!0});l.prototype._start=function(a,d,f,g){this._createContainer();this._createOverlay();this.navigation.begin()};l.prototype._update=
function(a,d,f,g){this._box.x=a;this._box.y=d;this._box.width=f;this._box.height=g;this._rafId||(this._rafId=requestAnimationFrame(this._redraw))};l.prototype._end=function(a,d,f,g,l){var m=this.view;a=m.toMap(a+.5*f,d+.5*g);f=Math.max(f/m.width,g/m.height);-1===l&&(f=1/f);this._destroyOverlay();this.navigation.end();m.goTo({center:a,scale:m.scale*f})};l.prototype._updateBox=function(a,d,f,g){var l=this._boxShape;l.setAttributeNS(null,"x",""+a);l.setAttributeNS(null,"y",""+d);l.setAttributeNS(null,
"width",""+f);l.setAttributeNS(null,"height",""+g);l.setAttributeNS(null,"class","esri-zoom-box__outline")};l.prototype._updateBackground=function(a,d,f,g){this._backgroundShape.setAttributeNS(null,"d",this._toSVGPath(a,d,f,g,this.view.width,this.view.height))};l.prototype._createContainer=function(){var a=document.createElement("div");a.className="esri-zoom-box__container";this.view.root.appendChild(a);this._container=a};l.prototype._createOverlay=function(){var a=this.view.width,d=this.view.height,
f=document.createElementNS("http://www.w3.org/2000/svg","path");f.setAttributeNS(null,"d","M 0 0 L "+a+" 0 L "+a+" "+d+" L 0 "+d+" Z");f.setAttributeNS(null,"class","esri-zoom-box__overlay-background");a=document.createElementNS("http://www.w3.org/2000/svg","rect");d=document.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink");d.setAttributeNS(null,"class","esri-zoom-box__overlay");d.appendChild(f);d.appendChild(a);
this._container.appendChild(d);this._backgroundShape=f;this._boxShape=a;this._overlay=d};l.prototype._destroyOverlay=function(){this._container&&this._container.parentNode&&this._container.parentNode.removeChild(this._container);this._container=this._backgroundShape=this._boxShape=this._overlay=null};l.prototype._toSVGPath=function(a,d,f,g,l,m){f=a+f;g=d+g;return"M 0 0 L "+l+" 0 L "+l+" "+m+" L 0 "+m+" ZM "+a+" "+d+" L "+a+" "+g+" L "+f+" "+g+" L "+f+" "+d+" Z"};l.prototype._handleDrag=function(a,
d){var f=a.x,g=a.y,l=a.origin.x,m=a.origin.y,p;f>l?(p=l,l=f-l):(p=f,l-=f);g>m?(f=m,g-=m):(f=g,g=m-g);switch(a.action){case "start":this._start(p,f,l,g);break;case "update":this._update(p,f,l,g);break;case "end":this._end(p,f,l,g,d)}a.stopPropagation()};l.prototype._redraw=function(){if(this._rafId&&(this._rafId=null,this._overlay)){var a=this._box,d=a.x,f=a.y,g=a.width,a=a.height;this._updateBox(d,f,g,a);this._updateBackground(d,f,g,a);this._rafId=requestAnimationFrame(this._redraw)}};a([d.property()],
l.prototype,"navigation",void 0);a([d.property()],l.prototype,"view",null);return l=a([d.subclass("esri.views.2d.navigation.ZoomBox")],l)}(d.declared(f))})},"esri/views/2d/support/HighlightOptions":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ../../../core/Accessor ../../../Color".split(" "),function(A,t,g,a,d,f,m){return function(f){function l(){var a=null!==f&&f.apply(this,arguments)||
this;a.color=new m([0,255,255]);a.haloOpacity=1;a.fillOpacity=.5;return a}g(l,f);a([d.property({type:m})],l.prototype,"color",void 0);a([d.property()],l.prototype,"haloOpacity",void 0);a([d.property()],l.prototype,"fillOpacity",void 0);return l=a([d.subclass("esri.views.2d.support.HighlightOptions")],l)}(d.declared(f))})},"esri/views/BreakpointsOwner":function(){define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper ../core/tsSupport/assignHelper ../core/accessorSupport/decorators ../core/watchUtils ./DOMContainer ../core/Accessor ../core/ArrayPool ../core/HandleRegistry dojo/dom-class".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v){var x={widthBreakpoint:{getValue:function(a){var d=a.viewSize[0];a=a.breakpoints;var f=this.values;return d<=a.xsmall?f.xsmall:d<=a.small?f.small:d<=a.medium?f.medium:d<=a.large?f.large:f.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-width-xsmall esri-view-width-less-than-small esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge",small:"esri-view-width-small esri-view-width-greater-than-xsmall esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge",
medium:"esri-view-width-medium esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-less-than-large esri-view-width-less-than-xlarge",large:"esri-view-width-large esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-less-than-xlarge",xlarge:"esri-view-width-xlarge esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-greater-than-large"}},
heightBreakpoint:{getValue:function(a){var d=a.viewSize[1];a=a.breakpoints;var f=this.values;return d<=a.xsmall?f.xsmall:d<=a.small?f.small:d<=a.medium?f.medium:d<=a.large?f.large:f.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-height-xsmall esri-view-height-less-than-small esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge",small:"esri-view-height-small esri-view-height-greater-than-xsmall esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge",
medium:"esri-view-height-medium esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-less-than-large esri-view-height-less-than-xlarge",large:"esri-view-height-large esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-less-than-xlarge",xlarge:"esri-view-height-xlarge esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-greater-than-large"}},
orientation:{getValue:function(a){a=a.viewSize;var d=this.values;return a[1]>=a[0]?d.portrait:d.landscape},values:{portrait:"portrait",landscape:"landscape"},valueToClassName:{portrait:"esri-view-orientation-portrait",landscape:"esri-view-orientation-landscape"}}},w={xsmall:544,small:768,medium:992,large:1200};return function(l){function p(){var a=null!==l&&l.apply(this,arguments)||this;a._breakpointsHandles=new q;a.breakpoints=w;a.orientation=null;a.widthBreakpoint=null;a.heightBreakpoint=null;return a}
g(p,l);p.prototype.initialize=function(){this._breakpointsHandles.add([m.init(this,["breakpoints","size"],this._updateClassNames)])};p.prototype.destroy=function(){this.destroyed||(this._removeActiveClassNames(),this._breakpointsHandles.destroy(),this._breakpointsHandles=null)};p.prototype._updateClassNames=function(){if(this.container){var a=r.acquire(),d=r.acquire(),f=!1,g,l,m;for(g in x)l=this[g],m=x[g].getValue({viewSize:this.size,breakpoints:this.breakpoints}),l!==m&&(f=!0,this[g]=m,d.push(x[g].valueToClassName[l]),
a.push(x[g].valueToClassName[m]));f&&(this._applyClassNameChanges(a,d),r.release(a),r.release(d))}};p.prototype._applyClassNameChanges=function(a,d){var f=this.container;f&&(v.remove(f,d),v.add(f,a))};p.prototype._removeActiveClassNames=function(){var a=this.container;if(a)for(var d in x)v.remove(a,x[d].valueToClassName[this[d]])};a([f.property({set:function(a){var f=this._get("breakpoints");if(a!==f){f=(f=a)&&f.xsmall<f.small&&f.small<f.medium&&f.medium<f.large;if(!f){var g=JSON.stringify(w,null,
2);console.warn("provided breakpoints are not valid, using defaults:"+g)}a=f?a:w;this._set("breakpoints",d({},a))}}})],p.prototype,"breakpoints",void 0);a([f.property()],p.prototype,"orientation",void 0);a([f.property()],p.prototype,"widthBreakpoint",void 0);a([f.property()],p.prototype,"heightBreakpoint",void 0);return p=a([f.subclass("esri.views.BreakpointsOwner")],p)}(f.declared(p,l))})},"esri/views/2d/layers/GraphicsLayerView2D":function(){define("require exports ../../../core/tsSupport/extendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ./LayerView2D ./support/GraphicsView2D".split(" "),
function(A,t,g,a,d,f,m){return function(f){function l(){var a=null!==f&&f.apply(this,arguments)||this;a.graphicsView=new m;a.container=a.graphicsView.container;return a}g(l,f);l.prototype.hitTest=function(a,d){return this.graphicsView.hitTest(a,d)};l.prototype.attach=function(){var a=this;this.layer.createGraphicsController({layerView:this}).then(function(d){a.graphicsView.view=a.view;a.graphicsView.graphics=d.graphics})};l.prototype.detach=function(){this.graphicsView.graphics=null};l.prototype.update=
function(a){};l.prototype.moveStart=function(){};l.prototype.viewChange=function(){};l.prototype.moveEnd=function(){};return l=a([d.subclass("esri.views.2d.layers.GraphicsLayerView2D")],l)}(d.declared(f))})},"esri/views/2d/layers/LayerView2D":function(){define("require exports ../../../core/tsSupport/extendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ../../../core/watchUtils ../../layers/LayerView".split(" "),function(A,t,g,a,d,f,m){return function(l){function m(){var a=
null!==l&&l.apply(this,arguments)||this;a.attached=!1;a.moving=!1;a.updateRequested=!1;return a}g(m,l);m.prototype.initialize=function(){var a=this;this.when(function(){a.requestUpdate()});f.init(this,"suspended",function(d){a.container.visible=!d;!d&&a.updateRequested&&a.view.requestLayerViewUpdate(a)},!0);f.init(this,"fullOpacity",function(d){a.container.opacity=d},!0);var d=function(){this.notifyChange("rendering")}.bind(this);this.container.on("post-render",d);this.container.on("will-render",
d)};m.prototype.destroy=function(){this.attached&&(this.attached=!1,this.detach());this.updateRequested=!1;this.layer=null};Object.defineProperty(m.prototype,"rendering",{get:function(){return this.isRendering()},enumerable:!0,configurable:!0});Object.defineProperty(m.prototype,"updating",{get:function(){return!this.suspended&&(!this.attached||this.updateRequested||this.isUpdating())},enumerable:!0,configurable:!0});m.prototype.requestUpdate=function(){this.updateRequested||(this.updateRequested=
!0,this.suspended||this.view.requestLayerViewUpdate(this))};m.prototype.processUpdate=function(a){this.isFulfilled()&&!this.isResolved()?this.updateRequested=!1:(this._set("updateParameters",a),this.updateRequested&&!this.suspended&&(this.updateRequested=!1,this.update(a)))};m.prototype.isUpdating=function(){return!1};m.prototype.isRendering=function(){return this.attached&&(this.moving||this.container.renderRequested)};m.prototype.canResume=function(){var a=this.inherited(arguments),d=this.layer;
if(a&&null!=d.minScale&&null!=d.minScale){var a=this.view.scale,f=d.minScale,d=d.maxScale,g=!f,l=!d;!g&&a<=f&&(g=!0);!l&&a>=d&&(l=!0);a=g&&l}return a};a([d.property()],m.prototype,"attached",void 0);a([d.property()],m.prototype,"container",void 0);a([d.property()],m.prototype,"moving",void 0);a([d.property({dependsOn:["moving"]})],m.prototype,"rendering",null);a([d.property({dependsOn:["view.scale","layer.minScale","layer.maxScale"]})],m.prototype,"suspended",void 0);a([d.property({readOnly:!0})],
m.prototype,"updateParameters",void 0);a([d.property()],m.prototype,"updateRequested",void 0);a([d.property({dependsOn:["updateRequested","attached"]})],m.prototype,"updating",null);a([d.property()],m.prototype,"view",void 0);return m=a([d.subclass("esri.views.2d.layers.LayerView2D")],m)}(d.declared(m))})},"esri/views/2d/layers/FeatureLayerView2D":function(){define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper dojo/has ../../../core/accessorSupport/decorators ../../../core/Collection ../../../core/Error ../../../core/HandleRegistry ../../../core/promiseUtils ../../../core/requireUtils ../../../Graphic ../../../layers/graphics/QueryEngine ./LayerView2D ../../layers/RefreshableLayerView ./support/FeaturesView2D ../engine/DOMContainer".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x,w,B,E,D){function F(a){return a&&a.update}return function(t){function w(){var a=null!==t&&t.apply(this,arguments)||this;a._handles=new p;a.container=new D;return a}g(w,t);w.prototype.highlight=function(a,d){var f=this;d=this.featuresView;var g;a instanceof v?g=[a.getAttribute(this.layer.objectIdField)]:"number"===typeof a?g=[a]:m.isCollection(a)?g=a.map(function(a){return a.getAttribute(f.layer.objectIdField)}).toArray():Array.isArray(a)&&0<a.length&&(g="number"===
typeof a[0]?a:a.map(function(a){return a.getAttribute(f.layer.objectIdField)}));return g&&g.length&&d&&d.highlight?d.highlight(g):{remove:function(){}}};w.prototype.queryGraphics=function(){return this._queryEngine?this._queryEngine.queryFeatures():this._rejectQuery()};w.prototype.queryFeatures=function(a){return this._queryEngine?this._queryEngine.queryFeatures(a):this._rejectQuery()};w.prototype.queryObjectIds=function(a){return this._queryEngine?this._queryEngine.queryObjectIds(a):this._rejectQuery()};
w.prototype.queryFeatureCount=function(a){return this._queryEngine?this._queryEngine.queryFeatureCount(a):this._rejectQuery()};w.prototype.queryExtent=function(a){return this._queryEngine?this._queryEngine.queryExtent(a):this._rejectQuery()};w.prototype.hitTest=function(a,d){return this.suspended||!this.featuresView?r.resolve():this.featuresView.hitTest(a,d)};w.prototype.update=function(a){F(this.controller)?this.controller.update(a):F(this.featuresView)&&this.featuresView.update(a)};w.prototype.attach=
function(){var a=this;this._canUseWebGL()?q.when(A,["./support/FeatureLayerView2DWebGL"]).then(function(d){if(a.attached)return(new d[0]({layer:a.layer,view:a.view})).when()}).then(function(d){a.featuresView=d;a.container.addChild(d.container);d.attached=!0;d.attach()}):this.layer.createGraphicsController({layerView:this}).then(function(d){if(a.attached){a._set("controller",d);a.requestUpdate();var f=new E;f.mapView=a.view;f.graphics=d.graphics;f.layer=a.layer;f.renderer=a.layer.renderer;a.featuresView=
f;a._handles.add(a.layer.watch("renderer",function(){f.renderer=a.layer.renderer}));a._queryEngine=new x;a._queryEngine.features=d.graphics;a._queryEngine.objectIdField=a.layer.objectIdField;a.container.addChild(f.container)}})};w.prototype.detach=function(){this.container.removeAllChildren();this._handles.removeAll();this.featuresView&&(this.featuresView.destroy(),this.featuresView=null);this.controller&&(this.controller.destroy&&this.controller.destroy(),this._set("controller",null))};w.prototype.moveStart=
function(){this.requestUpdate()};w.prototype.viewChange=function(){this.requestUpdate()};w.prototype.moveEnd=function(){this.requestUpdate()};w.prototype.doRefresh=function(){if(!this.updateRequested&&!this.suspended){var a;if(a=this.controller)a=(a=this.controller.activeController)&&a.refresh;a&&this.controller.activeController.refresh()}};w.prototype.isUpdating=function(){return null==this.featuresView||!0===this.get("controller.updating")||this.featuresView.updateRequested||F(this.featuresView)&&
this.featuresView.isUpdating()};w.prototype._canUseWebGL=function(){return d("esri-featurelayer-webgl")&&d("esri-webgl")&&this._isRendererWebGLCompatible()&&(this.layer.capabilities.query.supportsQuantization&&("polygon"!==this.layer.geometryType||this.layer.capabilities.query.supportsCentroid)||this.layer.source&&"esri.layers.graphics.sources.CSVSource"===this.layer.source.declaredClass)};w.prototype._isRendererWebGLCompatible=function(){var a=this.layer.renderer;return a&&-1!==["simple","class-breaks",
"unique-value"].indexOf(a.type)?!0:!1};w.prototype._rejectQuery=function(){return r.reject(new l("FeatureLayerView2D","Not ready to execute query"))};a([f.property({readOnly:!0})],w.prototype,"controller",void 0);a([f.property()],w.prototype,"featuresView",void 0);a([f.property({dependsOn:["controller.updating","featuresView","featuresView.updating"]})],w.prototype,"updating",void 0);return w=a([f.subclass("esri.views.2d.layers.FeatureLayerView2D")],w)}(f.declared(w,B))})},"esri/views/layers/RefreshableLayerView":function(){define("require exports ../../core/tsSupport/declareExtendsHelper ../../core/tsSupport/decorateHelper ../../core/accessorSupport/decorators ../../core/Accessor".split(" "),
function(A,t,g,a,d,f){return function(f){function l(){var a=null!==f&&f.apply(this,arguments)||this;a.refreshTimestamp=null;return a}g(l,f);l.prototype.refresh=function(a){void 0===a&&(a=Date.now());this._set("refreshTimestamp",a);this.doRefresh&&this.doRefresh()};a([d.property()],l.prototype,"layer",void 0);a([d.aliasOf("layer.refreshInterval")],l.prototype,"refreshInterval",void 0);a([d.property({readOnly:!0})],l.prototype,"refreshTimestamp",void 0);return l=a([d.subclass("esri.layers.mixins.RefreshableLayerView")],
l)}(d.declared(f))})},"esri/views/2d/layers/support/FeaturesView2D":function(){define("require exports ../../../../core/tsSupport/declareExtendsHelper ../../../../core/tsSupport/decorateHelper ../../../../core/accessorSupport/decorators ../../../../core/Collection ../../../../core/HandleRegistry ../../../../core/promiseUtils ../../../../core/Logger ../../../../renderers/support/renderingInfoUtils ../../../../Graphic ../../../layers/GraphicsView ../../engine/graphics/GFXSurface ../../engine/graphics/GFXGroup ../../engine/graphics/GFXObject ../../../../symbols/Symbol3D".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x,w,B,E){var D=p.getLogger("esri.views.2d.layers.support.FeaturesView2D");return function(p){function t(){for(var a=[],d=0;d<arguments.length;d++)a[d]=arguments[d];var f=p.apply(this,a)||this;f._handles=new m;f._backgroundGroup=new w;f._frontGroup=new w;f._frontObjects=new Map;f._backgroundObjects=new Map;f._scale=0;f.container=new x;f.layer=null;f.container.addChild(f._backgroundGroup);f.container.addChild(f._frontGroup);f.watch("graphics",function(){return f._reset()});
f.watch("renderer",function(){return f._resymbolize()});f.watch("mapView.scale, mapView.stationary",function(){return f._applyScale()});return f}g(t,p);t.prototype.destroy=function(){this.renderer=this.graphics=null};t.prototype.hitTest=function(a,d){a+=this.mapView.position[0]-window.pageXOffset;d+=this.mapView.position[1]-window.pageYOffset;return(a=this.container.hitTest(a,d))?l.resolve(a.graphic):l.resolve()};t.prototype._reset=function(){var a=this;this._handles.remove("graphics");this.graphics&&
(this.graphics.forEach(this._add,this),this._handles.add(this.graphics.on("change",function(d){return a._graphicsChangeHandler(d)}),"graphics"))};t.prototype._applyScale=function(){var a=this.get("mapView.scale"),d=this.get("mapView.stationary");a!==this._scale&&d&&(this._scale=a,this._resymbolize())};t.prototype._resymbolize=function(){var a=this;this.graphics&&this.graphics.forEach(function(d){return a._resymbolizeGraphic(d)})};t.prototype._add=function(a){if(!this._frontObjects.has(a)){var d=r.getRenderingInfo(a,
{renderer:this.renderer,viewingMode:"map",scale:this.mapView.state.scale,resolution:this.mapView.state.resolution,spatialReference:this.mapView.spatialReference});if(d)if(d.symbol instanceof E)D.error("3D symbols are not supported with MapView");else{var f=new B;f.graphic=a;f.renderingInfo=d;this._frontObjects.set(a,f);this._frontGroup.addChild(f);var g=d.renderer&&d.renderer.backgroundFillSymbol;g&&f.isPolygonMarkerSymbol&&(f=new B,f.graphic=a,f.renderingInfo=null!=d.outlineSize?{symbol:g,size:[d.outlineSize,
d.outlineSize,d.outlineSize]}:{symbol:g},this._backgroundObjects.set(a,f),this._backgroundGroup.addChild(f))}}};t.prototype._remove=function(a){var d=this._frontObjects.get(a);d&&(this._frontObjects.delete(a),this._frontGroup.removeChild(d),this._backgroundObjects.has(a)&&(d=this._backgroundObjects.get(a),this._backgroundObjects.delete(a),this._backgroundGroup.removeChild(d)))};t.prototype._resymbolizeGraphic=function(a){if(this._frontObjects.has(a)){var d=r.getRenderingInfo(a,{renderer:this.renderer,
viewingMode:"map",scale:this.mapView.state.scale,resolution:this.mapView.state.resolution,spatialReference:this.mapView.spatialReference});if(d)if(d.symbol instanceof E)D.error("3D symbols are not supported with MapView");else{var f=this._frontObjects.get(a);f&&(f.renderingInfo=d);var g=d.renderer&&d.renderer.backgroundFillSymbol,l=this._backgroundObjects.get(a);g&&f.isPolygonMarkerSymbol?(l||(l=new B,l.graphic=a,this._backgroundObjects.set(a,l),this._backgroundGroup.addChild(l)),l.renderingInfo=
null!=d.outlineSize?{symbol:g,size:[d.outlineSize,d.outlineSize,d.outlineSize]}:{symbol:g}):!g&&l&&(this._backgroundObjects.delete(a),this._backgroundGroup.removeChild(l))}}};t.prototype._graphicsChangeHandler=function(a){for(var d=a.removed,f=0,g=a.added;f<g.length;f++)a=g[f],this._add(a);for(f=0;f<d.length;f++)a=d[f],this._remove(a)};a([d.property()],t.prototype,"container",void 0);a([d.property(),d.cast(f.ofType(q))],t.prototype,"graphics",void 0);a([d.property()],t.prototype,"layer",void 0);a([d.property()],
t.prototype,"mapView",void 0);return t=a([d.subclass("esri.views.2d.layers.support.FeaturesView2D")],t)}(d.declared(v))})},"esri/renderers/support/renderingInfoUtils":function(){define(["require","exports"],function(A,t){function g(a,f){if(!a||a.symbol)return null;f=f.renderer;return a&&f&&f.getObservationRenderer?f.getObservationRenderer(a):f}function a(a,f){if(a.symbol)return a.symbol;var d=g(a,f);return d&&d.getSymbol(a,f)}Object.defineProperty(t,"__esModule",{value:!0});t.getRenderer=g;t.getSymbol=
a;t.getRenderingInfo=function(d,f){var m=g(d,f),l=a(d,f);if(!l)return null;l={renderer:m,symbol:l};if(m){m.colorInfo&&(l.color=m.getColor(d).toRgba());if(m.sizeInfo){var p=m.getSize(d);l.size=[p,p,p]}if(m.visualVariables){d=m.getVisualVariableValues(d,f);p=["proportional","proportional","proportional"];for(f=0;f<d.length;f++){var r=d[f],m=r.variable,q=r.value;"color"===m.type?l.color=q.toRgba():"size"===m.type?"outline"===m.target?l.outlineSize=q:(r=m.axis,m=m.useSymbolValue?"symbolValue":q,"width"===
r?p[0]=m:"depth"===r?p[1]=m:"height"===r?p[2]=m:p[0]="width-and-depth"===r?p[1]=m:p[1]=p[2]=m):"opacity"===m.type?l.opacity=q:"rotation"===m.type&&"tilt"===m.axis?l.tilt=q:"rotation"===m.type&&"roll"===m.axis?l.roll=q:"rotation"===m.type&&(l.heading=q)}if(isFinite(p[0])||isFinite(p[1])||isFinite(p[2]))l.size=p}}return l}})},"esri/views/2d/layers/TiledLayerView2D":function(){define("require exports ../../../core/tsSupport/extendsHelper ../../../core/tsSupport/decorateHelper ../../../core/accessorSupport/decorators ../../../core/ObjectPool ../../../core/Error ../../../core/promiseUtils ./LayerView2D ../tiling/TileInfoView ../tiling/TileKey ../tiling/TileQueue ../tiling/TileStrategy ../engine/Bitmap ../engine/BitmapSource ../engine/BitmapContainer ../engine/Canvas2DContainer ../engine/Tiled ../../layers/RefreshableLayerView".split(" "),
function(A,t,g,a,d,f,m,l,p,r,q,v,x,w,B,E,D,F,H){var I=function(a){function d(d){d=a.call(this,d)||this;d.key=new q(0,0,0,0);return d}g(d,a);d.prototype.acquire=function(a){};d.prototype.release=function(){this.key.set(0,0,0,0)};d.pool=new f(d,!0);return d}(F(w));return function(f){function p(){var a=null!==f&&f.apply(this,arguments)||this;a._tileStrategy=null;a._tileInfoView=null;a._fetchQueue=null;a._tileRequests=new Map;a.container=new D;a.layer=null;return a}g(p,f);p.prototype.initialize=function(){var a=
this.layer.tileInfo,a=a&&a.spatialReference,d;a||(d=new m("layerview:tiling-information-missing","The layer doesn't provide tiling information",{layer:this.layer}));a.equals(this.view.spatialReference)||(d=new m("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",{layer:this.layer}));d&&this.addResolvingPromise(l.reject(d))};p.prototype.hitTest=function(a,d){return null};p.prototype.update=function(a){this._fetchQueue.pause();
this._fetchQueue.state=a.state;this._tileStrategy.update(a);this._fetchQueue.resume();this.notifyChange("updating")};p.prototype.attach=function(){var a=this;this._tileContainer=new E;this.container.addChild(this._tileContainer);this._tileInfoView=new r(this.layer.tileInfo,this.layer.fullExtent);this._fetchQueue=new v({tileInfoView:this._tileInfoView,process:function(d){return a.fetchTile(d)}});this._tileStrategy=new x({cachePolicy:"keep",acquireTile:function(d){return a.acquireTile(d)},releaseTile:function(d){return a.releaseTile(d)},
tileInfoView:this._tileInfoView})};p.prototype.detach=function(){this._tileStrategy.destroy();this._fetchQueue.clear();this.container.removeChild(this._tileContainer);this._fetchQueue=this._tileStrategy=this._tileInfoView=this._tileContainer=null};p.prototype.moveStart=function(){this.requestUpdate()};p.prototype.viewChange=function(){this.requestUpdate()};p.prototype.moveEnd=function(){this.requestUpdate()};p.prototype.doRefresh=function(){var a=this;this.updateRequested||this.suspended||(this._fetchQueue.reset(),
this._tileStrategy.tiles.forEach(function(d){return a._enqueueTileFetch(d)}),this.notifyChange("updating"))};p.prototype.isUpdating=function(){var a=!0;this._tileRequests.forEach(function(d){a=a&&d.isFulfilled()});return!a};p.prototype.getTileBounds=function(a,d){return this._tileStrategy.tileInfoView.getTileBounds(a,d)};p.prototype.getTileCoords=function(a,d){return this._tileStrategy.tileInfoView.getTileCoords(a,d)};p.prototype.getTileResolution=function(a){return this._tileStrategy.tileInfoView.getTileResolution(a)};
p.prototype.acquireTile=function(a){var d=I.pool.acquire();d.key.set(a);this._tileInfoView.getTileCoords(d.coords,d.key);d.resolution=this._tileInfoView.getTileResolution(d.key);a=this._tileInfoView.tileInfo.size;d.width=a[0];d.height=a[1];this._enqueueTileFetch(d);this.requestUpdate();return d};p.prototype.releaseTile=function(a){var d=this,f=this._tileRequests.get(a);f&&!f.isFulfilled()&&f.cancel();this._tileRequests.delete(a);this._tileContainer.removeChild(a);a.once("detach",function(){I.pool.release(a);
d.requestUpdate()});this.requestUpdate()};p.prototype.fetchTile=function(a){var d=this,f=this.layer.tilemapCache;if(f){var g=a.level,l=a.row,m=a.col;return f.fetchAvailabilityUpsample(g,l,m,a).then(function(){return d._fetchImage(a)}).otherwise(function(){a.level=g;a.row=l;a.col=m;return d._fetchImage(a)})}return this._fetchImage(a)};p.prototype._enqueueTileFetch=function(a){var d=this;if(!this._fetchQueue.has(a.key)){var f=this._fetchQueue.push(a.key).then(function(f){a.source=f;a.once("attach",
function(){return d.requestUpdate()});d._tileContainer.addChild(a);d.requestUpdate()});this._tileRequests.set(a,f)}};p.prototype._fetchImage=function(a){var d=this;return this.layer.fetchTile(a.level,a.row,a.col,{timestamp:this.refreshTimestamp}).then(function(f){f=B.pool.acquire(f);f.coords=d.getTileCoords(f.coords,a);f.resolution=d.getTileResolution(a);return f})};return p=a([d.subclass("esri.views.2d.layers.TiledLayerView2D")],p)}(d.declared(p,H))})},"esri/views/2d/engine/Bitmap":function(){define(["require",
"exports","../../../core/tsSupport/extendsHelper","./DisplayObject"],function(A,t,g,a){var d=[0,0];return function(a){function f(d){var f=a.call(this)||this;f.source=d;f.coords=[0,0];f.resolution=0;f.rotation=0;f.width=0;f.height=0;return f}g(f,a);f.prototype.doRender=function(a){this.source&&this.source.ready&&null!=a.context&&this.renderCanvas2D(a)};f.prototype.renderCanvas2D=function(a){var f=this.source,g=a.context,l=a.state;a=l.rotation;var m=this.resolution/l.resolution*l.pixelRatio;if(!(.05>
m)){g.save();var t=l.toScreen(d,this.coords),l=t[0],t=t[1];.99<m&&1.01>m?g.translate(Math.round(l),Math.round(t)):(g.translate(l,t),g.scale(m,m));a&&g.rotate(a*Math.PI/180);f.rotation&&(g.translate(.5*this.width,.5*this.height),g.rotate(-f.rotation*Math.PI/180),g.translate(.5*-this.width,.5*-this.height));a=(this.coords[0]-f.coords[0])/f.resolution;m=-(this.coords[1]-f.coords[1])/f.resolution;l=this.resolution/f.resolution*f.width;t=this.resolution/f.resolution*f.height;g.clearRect(0,0,this.width,
this.height);f.draw(g,Math.round(a),Math.round(m),Math.round(l),Math.round(t),0,0,this.width,this.height);g.restore()}};return f}(a)})},"esri/views/2d/engine/BitmapSource":function(){define(["require","exports","../../../core/ObjectPool"],function(A,t,g){return function(){function a(a){this.coords=[0,0];this._height=0;this.pixelRatio=1;this._width=this.rotation=this.resolution=0;this.data=a}a.prototype.release=function(){this.data=null};Object.defineProperty(a.prototype,"data",{get:function(){return this._data},
set:function(a){this._data=a;this._width=this._height=0;a&&(a instanceof HTMLImageElement?(this._width=a.naturalWidth,this._height=a.naturalHeight):0<a.width&&0<a.height&&(this._width=a.width,this._height=a.height))},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"ready",{get:function(){return 0<this._width},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,
"width",{get:function(){return this._width},enumerable:!0,configurable:!0});a.prototype.draw=function(a,f,g,l,p,r,q,t,x){this.ready&&l&&p&&t&&x&&a.drawImage(this._data,f,g,l,p,r,q,t,x)};a.pool=new g(a,!0);return a}()})},"esri/views/2d/engine/BitmapContainer":function(){define("require exports ../../../core/tsSupport/extendsHelper ../../../core/tsSupport/decorateHelper ./Container ../ViewState ../viewStateUtils".split(" "),function(A,t,g,a,d,f,m){var l=[0,0];return function(a){function d(){var d=null!==
a&&a.apply(this,arguments)||this;d._childrenCanvas=null;d._childrenRenderParameters={budget:null,context:null,devicePixelRatio:1,state:new f,stationary:!0};return d}g(d,a);d.prototype.attach=function(d){this._childrenCanvas||(this._childrenCanvas=document.createElement("canvas"),this._childrenRenderParameters.context=this._childrenCanvas.getContext("2d"));return a.prototype.attach.call(this,d)};d.prototype.detach=function(d){a.prototype.detach.call(this,d);this._childrenCanvas=null;this._childrenRenderParameters.context=
null};d.prototype.doRender=function(d){this.visible&&a.prototype.doRender.call(this,d)};d.prototype.prepareChildrenRenderParameters=function(a){var d=this._childrenCanvas,f=this._childrenRenderParameters,g=a.state,p=g.pixelRatio,q=f.state;q.copy(g);var r=m.getOuterSize(l,g),g=r[0],r=r[1],g=g*p,r=r*p;q.size=l;q.viewpoint.rotation=0;d.width!==g||d.height!==r?(d.width=g,d.height=r):f.context.clearRect(0,0,g,r);f.budget=a.budget;f.devicePixelRatio=a.devicePixelRatio;return f};d.prototype.beforeRenderChildren=
function(a,d){this.sortChildren(function(a,d){return d.resolution-a.resolution})};d.prototype.afterRenderChildren=function(a,d){var f=a.context;a=a.state;var g=d.context;d=d.state;0===a.rotation?f.drawImage(g.canvas,0,0):(f.save(),f.translate(.5*a.width,.5*a.height),f.rotate(a.rotation*Math.PI/180),f.translate(.5*-a.width,.5*-a.height),f.drawImage(g.canvas,.5*(a.width-d.width),.5*(a.height-d.height)),f.restore())};return d}(d)})},"esri/views/2d/viewStateUtils":function(){define(["require","exports"],
function(A,t){Object.defineProperty(t,"__esModule",{value:!0});var g=Math.PI/180;t.snapToPixel=function(a,d,f){var g=f.resolution;f=f.size;a[0]=g*(Math.round(d[0]/g)+f[0]%2*.5);a[1]=g*(Math.round(d[1]/g)+f[1]%2*.5);return a};t.getOuterSize=function(a,d){var f=d.rotation*g,m=Math.abs(Math.cos(f)),f=Math.abs(Math.sin(f)),l=d.size;d=l[0];l=l[1];a[0]=Math.round(l*f+d*m);a[1]=Math.round(l*m+d*f);return a};t.getBBox=function(a,d,f,g){var l=d[0];d=d[1];var m=g[0];g=g[1];f*=.5;a[0]=l-f*m;a[1]=d-f*g;a[2]=
l+f*m;a[3]=d+f*g;return a};t.bboxIntersects=function(a,d){var f=a[1],g=a[2],l=a[3],p=d[0],r=d[1],q=d[3];return!(a[0]>d[2]||g<p||f>q||l<r)}})},"esri/views/2d/engine/Canvas2DContainer":function(){define(["require","exports","../../../core/tsSupport/extendsHelper","../ViewState","./Container"],function(A,t,g,a,d){return function(d){function f(){var f=null!==d&&d.apply(this,arguments)||this;f._childrenRenderParameters={budget:null,context:null,devicePixelRatio:1,state:new a,stationary:!0};f.hidpi=!1;
return f}g(f,d);f.prototype.createElement=function(){var a=document.createElement("canvas");a.setAttribute("class","esri-display-object");return a};f.prototype.setElement=function(a){this.element=a};f.prototype.doRender=function(a){var f=this.element,g=f.style;if(this.visible){var l=a.state,m=a.devicePixelRatio,t=l.width,l=l.height;f.width=t*(this.hidpi?m:1);f.height=l*(this.hidpi?m:1);g.display="block";g.opacity=""+this.opacity;g.width=t+"px";g.height=l+"px";d.prototype.doRender.call(this,a)}else g.display=
"none"};f.prototype.prepareChildrenRenderParameters=function(a){var d=this._childrenRenderParameters;d.budget=a.budget;d.context=this.element.getContext("2d");d.devicePixelRatio=a.devicePixelRatio;d.state.copy(a.state);d.state.pixelRatio=this.hidpi?a.devicePixelRatio:1;d.stationary=a.stationary;return d};f.prototype.beforeRenderChildren=function(a,d){a=d.context;var f=d.state;a.save();if(f.spatialReference.isWrappable){var g=f.width;d=f.height;var l=f.pixelRatio,m=this.hidpi?l:1,l=f.rotation*Math.PI/
180,p=Math.round(g*m*Math.abs(Math.cos(l))+d*m*Math.abs(Math.sin(l))),f=f.worldScreenWidth*m;f<p&&(g=g*m*.5,d=d*m*.5,l&&(a.translate(g,d),a.rotate(l),a.translate(-g,-d)),a.beginPath(),a.rect(g-.5*f,d-.5*p,f,p),a.closePath(),l&&(a.translate(g,d),a.rotate(-l),a.translate(-g,-d)),a.clip("evenodd"))}};f.prototype.afterRenderChildren=function(a,d){d.context.restore()};f.prototype.renderChild=function(a,d){d.context.save();a.processRender(d);d.context.restore()};return f}(d)})},"esri/views/2d/engine/Tiled":function(){define(["require",
"exports","../../../core/tsSupport/extendsHelper","./Evented"],function(A,t,g,a){return function(d){d=function(a){function d(){for(var d=0;d<arguments.length;d++);return a.call(this)||this}g(d,a);return d}(d);return a.EventedMixin(d)}})},"url:esri/views/2d/engine/webgl/shaders/bitblit.vs.glsl":"attribute vec2 a_pos;\r\nattribute vec2 a_tex;\r\n\r\nvarying mediump vec2 v_uv;\r\n\r\nvoid main(void) {\r\n gl_Position \x3d vec4(a_pos, 0.0, 1.0);\r\n v_uv \x3d a_tex;\r\n}\r\n","url:esri/views/2d/engine/webgl/shaders/bitblit.fs.glsl":"\tuniform lowp sampler2D u_tex;\r\n\tuniform lowp float u_opacity;\r\n\r\n\tvarying mediump vec2 v_uv;\r\n\r\n\tvoid main() {\r\n\t\tlowp vec4 color \x3d texture2D(u_tex, v_uv);\r\n\r\n // Note: output in pre-multiplied alpha for correct alpha compositing\r\n\t\tgl_FragColor \x3d color * u_opacity;\r\n\t}\r\n",
"url:esri/views/2d/engine/webgl/shaders/stencil.vs.glsl":"attribute vec2 a_pos;\r\n\r\nvoid main() {\r\n gl_Position \x3d vec4(a_pos, 0.0, 1.0);\r\n}\r\n","url:esri/views/2d/engine/webgl/shaders/stencil.fs.glsl":"void main() {\r\n gl_FragColor \x3d vec4(1.0, 1.0, 1.0, 1.0);\r\n}\r\n","url:esri/views/2d/engine/webgl/shaders/background.vs.glsl":"attribute vec2 a_pos;\r\n\r\nuniform highp mat4 u_transformMatrix;\r\nuniform mediump vec2 u_normalized_origin;\r\nuniform mediump float u_coord_range;\r\nuniform mediump float u_depth;\r\n\r\nvoid main() {\r\n gl_Position \x3d vec4(u_normalized_origin, u_depth, 0.0) + u_transformMatrix * vec4(u_coord_range * a_pos, 0.0, 1.0);\r\n}\r\n",
"url:esri/views/2d/engine/webgl/shaders/background.fs.glsl":"uniform lowp vec4 u_color;\r\nvoid main() {\r\n gl_FragColor \x3d u_color;\r\n}","url:esri/views/2d/engine/webgl/shaders/tileInfo.vs.glsl":"attribute vec2 a_pos;\r\n\r\nuniform highp mat4 u_transformMatrix;\r\nuniform mediump vec2 u_normalized_origin;\r\nuniform mediump float u_depth;\r\nuniform mediump float u_coord_ratio;\r\nuniform mediump vec2 u_delta; // in tile coordinates\r\nuniform mediump vec2 u_dimensions; // in tile coordinates\r\n\r\nvarying mediump vec2 v_tex;\r\n\r\nvoid main() {\r\n mediump vec2 offests \x3d u_coord_ratio * vec2(u_delta + a_pos * u_dimensions);\r\n gl_Position \x3d vec4(u_normalized_origin, u_depth, 0.0) + u_transformMatrix * vec4(offests, 0.0, 1.0);\r\n\r\n v_tex \x3d a_pos;\r\n}\r\n",
"url:esri/views/2d/engine/webgl/shaders/tileInfo.fs.glsl":"uniform mediump sampler2D u_texture;\r\nvarying mediump vec2 v_tex;\r\n\r\nvoid main(void) {\r\n lowp vec4 color \x3d texture2D(u_texture, v_tex);\r\n gl_FragColor \x3d 0.75 * color;\r\n}\r\n","url:esri/views/2d/engine/webgl/shaders/textShaders.xml":'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\r\n\x3c!--\r\n Add your GLSL snippets to this file. You should start from\r\n importing your old GLSL files. For instance, if you have a\r\n file such as myShader.vs.glsl you should create a new \x3csnippet name\x3d"myShaderVS"\x3e\r\n and then copy and paste the GLSL source as the content. You will then convert your\r\n code to use the {@link esri/views/2d/engine/webgl/glShaderSnippets glShaderSnippets}\r\n instance to access the GLSL code, instead of importing it directly with require("dojo/text!...").\r\n--\x3e\r\n\x3csnippets\x3e\r\n\r\n \x3csnippet name\x3d"textVS"\x3e\r\n \x3c![CDATA[\r\n precision mediump float;\r\n\r\n attribute vec2 a_pos; // 2 * 2 (2 x signed 16)\r\n attribute vec4 a_id; // 4 (4 x unsigned byte)\r\n attribute vec4 a_color; // 4 (4 x unsigned byte)\r\n attribute vec2 a_vertexOffset; // 2 * 2 // (2 x signed 16) offset from the anchor point of the string\r\n attribute vec4 a_texFontSize; // 4 (4 x unsigned byte) texture coordinatesm and font size\r\n\r\n attribute lowp float a_visible; // a one byte controlling the visibility of the vertex (a separate visibility buffer), values are 0 or 1 (visible)\r\n\r\n // the relative transformation of a vertex given in tile coordinates to a relative normalized coordinate\r\n // relative to the tile\'s upper left corner\r\n // the extrusion vector.\r\n uniform highp mat4 u_transformMatrix;\r\n // the extrude matrix which is responsible for the \'anti-zoom\' as well as the rotation\r\n uniform highp mat4 u_extrudeMatrix;\r\n // u_normalized_origin is the tile\'s upper left corner given in normalized coordinates\r\n uniform highp vec2 u_normalized_origin;\r\n // the size of the mosaic given in pixels\r\n uniform vec2 u_mosaicSize;\r\n uniform float u_pixelRatio;\r\n\r\n // the opacity of the layer\r\n uniform mediump float u_opacity;\r\n\r\n varying mediump vec4 v_color;\r\n varying mediump float v_antialiasingWidth;\r\n varying mediump float v_edgeDistanceOffset;\r\n\r\n // the interpolated texture coordinate value to be used by the fragment shader in order to sample the sprite texture\r\n varying mediump vec2 v_tex;\r\n // the calculated transparency to be applied by the fragment shader. It is incorporating both the fade as well as the\r\n // opacity of the layer given by the painter\r\n varying lowp float v_transparency;\r\n\r\n // the vertex offsets are given in integers, therefore in order to maintain a reasonable precission we multiply the values\r\n // by 16 and then at the shader devide by the same number\r\n const float offsetPrecision \x3d 1.0 / 32.0;\r\n const float outlineScale \x3d 1.0 / 10.0;\r\n const float sdfFontSize \x3d 24.0;\r\n\r\n // maximum SDF distance of 8 pixels represent the distance values that range from -2 inside the geometry to 6 on the outside.\r\n // 6 is actually the maximum distance outside the glyph, therefore it is the limitation of the halo which is 1/4 of the geometry size.\r\n const float maxSdfDistance \x3d 8.0;\r\n\r\n void main()\r\n {\r\n // make sure to clip the vertices in case that given record is marked as invisible\r\n float z \x3d 2.0 * step(1.0, a_visible);\r\n\r\n // we use the list significant bit of the position in order to store the indication whethe the vertex is of a halow of a glyph\r\n mediump float halo \x3d mod(a_pos, 2.0).x;\r\n\r\n float fontScale \x3d a_texFontSize.z / sdfFontSize;\r\n // we need to scale the extrude matrix by the font-scale in order to get the right text size\r\n mat4 extrudeMatrix \x3d fontScale * u_extrudeMatrix;\r\n\r\n // If the label rotates with the map, and if the rotated label is upside down, hide it\r\n gl_Position \x3d vec4(u_normalized_origin, 0.0, 0.0) + u_transformMatrix * vec4(floor(a_pos * 0.5), z, 1.0) + extrudeMatrix * vec4(offsetPrecision * a_vertexOffset, 0.0, 0.0);\r\n\r\n v_transparency \x3d u_opacity;\r\n v_tex \x3d a_texFontSize.xy / u_mosaicSize;\r\n v_color \x3d a_color;\r\n v_antialiasingWidth \x3d 0.105 * sdfFontSize / a_texFontSize.z / u_pixelRatio;\r\n // if halo.x is zero (not a halo) v_edgeDistanceOffset will end up being zero as well.\r\n v_edgeDistanceOffset \x3d halo * outlineScale * a_texFontSize.w / fontScale / maxSdfDistance;\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"textFS"\x3e\r\n \x3c![CDATA[\r\n precision lowp float;\r\n\r\n uniform lowp sampler2D u_texture;\r\n\r\n varying mediump vec4 v_color;\r\n varying mediump float v_antialiasingWidth;\r\n varying mediump float v_edgeDistanceOffset;\r\n varying mediump vec2 v_tex;\r\n varying lowp float v_transparency;\r\n\r\n\r\n void main()\r\n {\r\n // read the distance from the SDF texture\r\n lowp float dist \x3d texture2D(u_texture, v_tex).a;\r\n\r\n // the edge distance if a factor of the outline width\r\n float glyphEdgeDistance \x3d 0.75 - v_edgeDistanceOffset;\r\n\r\n // use a smooth-step in order to calculate the geometry of the shape given by the distance field\r\n lowp float alpha \x3d smoothstep(glyphEdgeDistance - v_antialiasingWidth, glyphEdgeDistance + v_antialiasingWidth, dist) * v_transparency;\r\n\r\n gl_FragColor \x3d alpha * v_color;\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n\x3c/snippets\x3e\r\n',
"url:esri/views/2d/engine/webgl/shaders/iconShaders.xml":'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\r\n\x3c!--\r\n Add your GLSL snippets to this file. You should start from\r\n importing your old GLSL files. For instance, if you have a\r\n file such as myShader.vs.glsl you should create a new \x3csnippet name\x3d"myShaderVS"\x3e\r\n and then copy and paste the GLSL source as the content. You will then convert your\r\n code to use the {@link esri/views/2d/engine/webgl/glShaderSnippets glShaderSnippets}\r\n instance to access the GLSL code, instead of importing it directly with require("dojo/text!...").\r\n--\x3e\r\n\x3csnippets\x3e\r\n\r\n \x3csnippet name\x3d"rgba2floatFunc"\x3e\r\n \x3c![CDATA[\r\n float rgba2float(vec4 rgba) {\r\n return dot(rgba, vec4(1.0/16777216.0, 1.0/65535.0, 1.0/256.0, 1.0));\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"iconVVUniformsVS"\x3e\r\n \x3c![CDATA[\r\n #if defined(VV_COLOR) || defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE) || defined(VV_OPACITY) || defined(VV_ROTATION)\r\n attribute vec4 a_vv;\r\n #endif // VV_COLOR || VV_SIZE_MIN_MAX_VALUE || VV_SIZE_SCALE_STOPS || VV_SIZE_FIELD_STOPS || VV_SIZE_UNIT_VALUE || VV_OPACITY || VV_ROTATION\r\n\r\n #ifdef VV_COLOR\r\n uniform float u_vvColorValues[8];\r\n uniform vec4 u_vvColors[8];\r\n #endif // VV_COLOR\r\n\r\n #ifdef VV_SIZE_MIN_MAX_VALUE\r\n uniform vec4 u_vvSizeMinMaxValue;\r\n #endif // VV_SIZE_MIN_MAX_VALUE\r\n\r\n #ifdef VV_SIZE_SCALE_STOPS\r\n uniform float u_vvSizeScaleStopsValue;\r\n #endif // VV_SIZE_SCALE_STOPS\r\n\r\n #ifdef VV_SIZE_FIELD_STOPS\r\n uniform float u_vvSizeFieldStopsValues[6];\r\n uniform float u_vvSizeFieldStopsSizes[6];\r\n #endif // VV_SIZE_FIELD_STOPS\r\n\r\n #ifdef VV_SIZE_UNIT_VALUE\r\n uniform float u_vvSizeUnitValueWorldToPixelsRatio;\r\n #endif // VV_SIZE_UNIT_VALUE\r\n\r\n #ifdef VV_OPACITY\r\n uniform float u_vvOpacityValues[8];\r\n uniform float u_vvOpacities[8];\r\n #endif // VV_OPACITY\r\n\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"iconVVFunctions"\x3e\r\n \x3c![CDATA[\r\n #ifdef VV_SIZE_MIN_MAX_VALUE\r\n float getVVMinMaxSize(float sizeValue) {\r\n // we need to multiply by 8 in order to translate to tile coordinates\r\n float interpolationRatio \x3d (sizeValue - u_vvSizeMinMaxValue.x) / (u_vvSizeMinMaxValue.y - u_vvSizeMinMaxValue.x);\r\n return clamp(u_vvSizeMinMaxValue.z + interpolationRatio * (u_vvSizeMinMaxValue.w - u_vvSizeMinMaxValue.z), u_vvSizeMinMaxValue.z, u_vvSizeMinMaxValue.w);\r\n }\r\n #endif // VV_SIZE_MIN_MAX_VALUE\r\n\r\n #ifdef VV_SIZE_FIELD_STOPS\r\n const int VV_SIZE_N \x3d 6;\r\n float getVVStopsSize(float sizeValue) {\r\n if (sizeValue \x3c\x3d u_vvSizeFieldStopsValues[0]) {\r\n return u_vvSizeFieldStopsSizes[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_SIZE_N; ++i) {\r\n if (u_vvSizeFieldStopsValues[i] \x3e\x3d sizeValue) {\r\n float f \x3d (sizeValue - u_vvSizeFieldStopsValues[i-1]) / (u_vvSizeFieldStopsValues[i] - u_vvSizeFieldStopsValues[i-1]);\r\n return mix(u_vvSizeFieldStopsSizes[i-1], u_vvSizeFieldStopsSizes[i], f);\r\n }\r\n }\r\n\r\n return u_vvSizeFieldStopsSizes[VV_SIZE_N - 1];\r\n }\r\n #endif // VV_SIZE_FIELD_STOPS\r\n\r\n #ifdef VV_SIZE_UNIT_VALUE\r\n float getVVUnitValue(float sizeValue) {\r\n return u_vvSizeUnitValueWorldToPixelsRatio * sizeValue;\r\n }\r\n #endif // VV_SIZE_UNIT_VALUE\r\n\r\n #ifdef VV_OPACITY\r\n const int VV_OPACITY_N \x3d 8;\r\n float getVVOpacity(float opacityValue) {\r\n if (opacityValue \x3c\x3d u_vvOpacityValues[0]) {\r\n return u_vvOpacities[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_OPACITY_N; ++i) {\r\n if (u_vvOpacityValues[i] \x3e\x3d opacityValue) {\r\n float f \x3d (opacityValue - u_vvOpacityValues[i-1]) / (u_vvOpacityValues[i] - u_vvOpacityValues[i-1]);\r\n return mix(u_vvOpacities[i-1], u_vvOpacities[i], f);\r\n }\r\n }\r\n\r\n return u_vvOpacities[VV_OPACITY_N - 1];\r\n }\r\n #endif // VV_OPACITY\r\n\r\n #ifdef VV_ROTATION\r\n mat4 getVVRotation(float rotationValue) {\r\n // YF TODO: if the symbol has rotation we need to combine the symbo\'s rotation with the VV one\r\n float angle \x3d C_DEG_TO_RAD * rotationValue;\r\n\r\n float sinA \x3d sin(angle);\r\n float cosA \x3d cos(angle);\r\n\r\n return mat4(cosA, sinA, 0, 0,\r\n -sinA, cosA, 0, 0,\r\n 0, 0, 1, 0,\r\n 0, 0, 0, 1);\r\n }\r\n #endif // VV_ROTATION\r\n\r\n #ifdef VV_COLOR\r\n const int VV_COLOR_N \x3d 8;\r\n\r\n vec4 getVVColor(float colorValue) {\r\n if (colorValue \x3c\x3d u_vvColorValues[0]) {\r\n return u_vvColors[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_COLOR_N; ++i) {\r\n if (u_vvColorValues[i] \x3e\x3d colorValue) {\r\n float f \x3d (colorValue - u_vvColorValues[i-1]) / (u_vvColorValues[i] - u_vvColorValues[i-1]);\r\n return mix(u_vvColors[i-1], u_vvColors[i], f);\r\n }\r\n }\r\n\r\n return u_vvColors[VV_COLOR_N - 1];\r\n }\r\n #endif // VV_COLOR\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n\r\n \x3csnippet name\x3d"iconVS"\x3e\r\n \x3c![CDATA[\r\n precision mediump float;\r\n\r\n //const float C_256_TO_RAD \x3d 3.14159265359 / 128.0;\r\n const float C_DEG_TO_RAD \x3d 3.14159265359 / 180.0;\r\n const float C_OFFSET_PRECISION \x3d 1.0 / 64.0;\r\n\r\n // per-vertex attributes (4 bytes)\r\n attribute vec4 a_vertexOffsetAndTex;\r\n\r\n // per quad (instance) attributes (20 bytes \x3d\x3d\x3e equivalent of 5 bytes per vertex)\r\n attribute vec2 a_pos;\r\n attribute vec4 a_id; // since we need to render the Id as a color we need to break it into RGBA components. so just like a color, the Id is normalized.\r\n attribute vec4 a_color;\r\n attribute vec4 a_outlineColor;\r\n attribute vec4 a_sizeAndOutlineWidth;\r\n\r\n // the relative transformation of a vertex given in tile coordinates to a relative normalized coordinate\r\n // relative to the tile\'s upper left corner\r\n // the extrusion vector.\r\n uniform highp mat4 u_transformMatrix;\r\n // the extrude matrix which is responsible for the \'anti-zoom\' as well as the rotation\r\n uniform highp mat4 u_extrudeMatrix;\r\n // u_normalized_origin is the tile\'s upper left corner given in normalized coordinates\r\n uniform highp vec2 u_normalized_origin;\r\n\r\n // the size of the mosaic given in pixels\r\n uniform vec2 u_mosaicSize;\r\n\r\n // the opacity of the layer given by the painter\r\n uniform mediump float u_opacity;\r\n\r\n // the interpolated texture coordinate value to be used by the fragment shader in order to sample the sprite texture\r\n varying mediump vec2 v_tex;\r\n // the calculated transparency to be applied by the fragment shader. It is incorporating both the fade as well as the\r\n // opacity of the layer given by the painter\r\n varying lowp float v_transparency;\r\n // the of the icon given in pixels\r\n varying mediump vec2 v_size;\r\n\r\n // icon color. If is a picture-marker it is used to tint the texture color\r\n varying lowp vec4 v_color;\r\n\r\n #ifdef SDF\r\n varying lowp vec4 v_outlineColor;\r\n varying mediump float v_outlineWidth;\r\n #endif // SDF\r\n\r\n #ifdef ID\r\n varying highp vec4 v_id;\r\n #endif // ID\r\n\r\n #ifdef HEATMAP\r\n attribute float a_heatmapWeight;\r\n varying mediump float v_heatmapWeight;\r\n #endif // HEATMAP\r\n\r\n // import the VV inputs and functions (they are #ifdefed, so if the proper #define is not set it will end-up being a no-op)\r\n $iconVVUniformsVS\r\n $iconVVFunctions\r\n\r\n void main()\r\n {\r\n vec2 a_offset \x3d a_vertexOffsetAndTex.xy;\r\n vec2 a_tex \x3d a_vertexOffsetAndTex.zw;\r\n vec2 a_size \x3d a_sizeAndOutlineWidth.xy;\r\n\r\n // default values (we need them for the variations to come)\r\n float a_angle \x3d 0.0;\r\n float delta_z \x3d 0.0;\r\n float depth \x3d 0.0;\r\n v_transparency \x3d 1.0;\r\n\r\n #if defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE)\r\n\r\n #ifdef VV_SIZE_MIN_MAX_VALUE\r\n // vv size override the original symbol\'s size\r\n vec2 size \x3d vec2(getVVMinMaxSize(a_vv.x));\r\n #endif // VV_SIZE_MIN_MAX_VALUE\r\n\r\n #ifdef VV_SIZE_SCALE_STOPS\r\n vec2 size \x3d vec2(u_vvSizeScaleStopsValue);\r\n #endif // VV_SIZE_SCALE_STOPS\r\n\r\n #ifdef VV_SIZE_FIELD_STOPS\r\n vec2 size \x3d vec2(getVVStopsSize(a_vv.x));\r\n #endif // VV_SIZE_FIELD_STOPS\r\n\r\n #ifdef VV_SIZE_UNIT_VALUE\r\n vec2 size \x3d vec2(getVVUnitValue(a_vv.x));\r\n #endif // VV_SIZE_UNIT_VALUE\r\n\r\n vec2 offset \x3d C_OFFSET_PRECISION * a_offset * size;\r\n v_size \x3d size;\r\n #else\r\n #ifdef HEATMAP\r\n // reconstruct the kernel size\r\n a_size \x3d 9.0 * a_size + 1.0;\r\n #endif // HEATMAP\r\n\r\n vec2 offset \x3d C_OFFSET_PRECISION * a_offset * a_size;\r\n v_size \x3d a_size;\r\n #endif // defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE)\r\n\r\n #ifdef SDF\r\n offset *\x3d 2.0;\r\n #endif // SDF\r\n\r\n #ifdef VV_ROTATION\r\n gl_Position \x3d vec4(u_normalized_origin, depth, 0.0) + u_transformMatrix * vec4(a_pos, 0.0, 1.0) + u_extrudeMatrix * getVVRotation(a_vv.w) * vec4(offset, delta_z, 0.0);\r\n #else\r\n gl_Position \x3d vec4(u_normalized_origin, depth, 0.0) + u_transformMatrix * vec4(a_pos, 0.0, 1.0) + u_extrudeMatrix * vec4(offset, delta_z, 0.0);\r\n #endif // VV_ROTATION\r\n\r\n #ifdef VV_OPACITY\r\n v_transparency \x3d getVVOpacity(a_vv.z);\r\n #else\r\n v_transparency \x3d u_opacity;\r\n #endif // VV_OPACITY\r\n\r\n #ifdef VV_COLOR\r\n v_color \x3d getVVColor(a_vv.y);\r\n #else\r\n v_color \x3d a_color;\r\n #endif // VV_COLOR\r\n\r\n // output the texture coordinates and the transparency\r\n v_tex \x3d a_tex / u_mosaicSize;\r\n\r\n #ifdef SDF\r\n v_outlineColor \x3d a_outlineColor;\r\n v_outlineWidth \x3d a_sizeAndOutlineWidth.z;\r\n #endif // SDF\r\n\r\n #ifdef ID\r\n v_id \x3d a_id;\r\n #endif // ID\r\n\r\n #ifdef HEATMAP\r\n v_heatmapWeight \x3d a_heatmapWeight;\r\n #endif // HEATMAP\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"iconFS"\x3e\r\n \x3c![CDATA[\r\n precision mediump float;\r\n\r\n uniform lowp sampler2D u_texture;\r\n\r\n varying lowp vec2 v_tex;\r\n varying lowp float v_transparency;\r\n varying mediump vec2 v_size;\r\n varying lowp vec4 v_color;\r\n\r\n #ifdef SDF\r\n varying lowp vec4 v_outlineColor;\r\n varying mediump float v_outlineWidth;\r\n\r\n // we need the conversion function from RGBA to float\r\n $rgba2floatFunc\r\n #endif // SDF\r\n\r\n #ifdef ID\r\n varying highp vec4 v_id;\r\n #endif // ID\r\n\r\n #ifdef HEATMAP\r\n varying mediump float v_heatmapWeight;\r\n #endif // HEATMAP\r\n\r\n const float softEdgeRatio \x3d 1.0; // use blur here if needed\r\n\r\n void main()\r\n {\r\n #ifdef SDF\r\n lowp vec4 fillPixelColor \x3d v_color;\r\n\r\n // calculate the distance from the edge [-0.5, 0.5]\r\n float d \x3d 0.5 - rgba2float(texture2D(u_texture, v_tex));\r\n\r\n // Work around loss of precision for \'d \x3d 0.0\'.\r\n // \'0\' gets normalised to 0.5 * 256 \x3d 128 before float packing, but can only\r\n // be stored in the texture as 128 / 255 \x3d 0.502.\r\n // see: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/7058#issuecomment-603110\r\n const float diff \x3d (128.0/255.0 - 0.5);\r\n\r\n // adjust all values, not just those close to 0, to avoid discontinuities in\r\n // the outlines of other shapes e.g. circles\r\n d \x3d d - diff;\r\n\r\n // the soft edge ratio is about 1.5 pixels allocated for the soft edge.\r\n float size \x3d max(v_size.x, v_size.y);\r\n float dist \x3d d * size * softEdgeRatio;\r\n\r\n // set the fragment\'s transparency according to the distance from the edge\r\n fillPixelColor *\x3d clamp(0.5 - dist, 0.0, 1.0);\r\n\r\n // count for the outline\r\n // therefore tint the entire icon area.\r\n if (v_outlineWidth \x3e 0.25) {\r\n lowp vec4 outlinePixelColor \x3d v_outlineColor;\r\n\r\n // outlines can\'t be larger than the size of the symbol\r\n float clampedOutlineSize \x3d min(v_outlineWidth, size);\r\n\r\n outlinePixelColor *\x3d clamp(0.5 - abs(dist) + clampedOutlineSize * 0.5, 0.0, 1.0);\r\n\r\n // finally combine the outline and the fill colors (outline draws on top of fill)\r\n gl_FragColor \x3d v_transparency * ((1.0 - outlinePixelColor.a) * fillPixelColor + outlinePixelColor);\r\n }\r\n else {\r\n gl_FragColor \x3d v_transparency * fillPixelColor;\r\n }\r\n #else // not an SDF\r\n lowp vec4 texColor \x3d texture2D(u_texture, v_tex);\r\n\r\n #ifdef HEATMAP\r\n texColor.r *\x3d v_heatmapWeight;\r\n #endif // HEATMAP\r\n\r\n gl_FragColor \x3d v_transparency * texColor;\r\n #endif // SDF\r\n\r\n #ifdef HIGHLIGHT\r\n gl_FragColor.a \x3d step(1.0 / 255.0, gl_FragColor.a);\r\n #endif // HIGHLIGHT\r\n\r\n #ifdef ID\r\n if (gl_FragColor.a \x3c 1.0 / 255.0) {\r\n discard;\r\n }\r\n gl_FragColor \x3d v_id;\r\n #endif // ID\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\x3c/snippets\x3e\r\n\r\n',
"url:esri/views/2d/engine/webgl/shaders/fillShaders.xml":'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\r\n\x3c!--\r\n // YF TODO: (doc)\r\n--\x3e\r\n\x3csnippets\x3e\r\n \x3csnippet name\x3d"fillVVUniformsVS"\x3e\r\n \x3c![CDATA[\r\n #if defined(VV_COLOR)|| defined(VV_OPACITY)\r\n attribute vec4 a_vv;\r\n #endif // VV_COLOR || VV_OPACITY\r\n\r\n #ifdef VV_COLOR\r\n uniform float u_vvColorValues[8];\r\n uniform vec4 u_vvColors[8];\r\n #endif // VV_COLOR\r\n\r\n #ifdef VV_OPACITY\r\n uniform float u_vvOpacityValues[8];\r\n uniform float u_vvOpacities[8];\r\n #endif // VV_OPACITY\r\n\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"fillVVFunctions"\x3e\r\n \x3c![CDATA[\r\n #ifdef VV_OPACITY\r\n const int VV_OPACITY_N \x3d 8;\r\n\r\n float getVVOpacity(float opacityValue) {\r\n if (opacityValue \x3c\x3d u_vvOpacityValues[0]) {\r\n return u_vvOpacities[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_OPACITY_N; ++i) {\r\n if (u_vvOpacityValues[i] \x3e\x3d opacityValue) {\r\n float f \x3d (opacityValue - u_vvOpacityValues[i-1]) / (u_vvOpacityValues[i] - u_vvOpacityValues[i-1]);\r\n return mix(u_vvOpacities[i-1], u_vvOpacities[i], f);\r\n }\r\n }\r\n\r\n return u_vvOpacities[VV_OPACITY_N - 1];\r\n }\r\n #endif // VV_OPACITY\r\n\r\n #ifdef VV_COLOR\r\n const int VV_COLOR_N \x3d 8;\r\n\r\n vec4 getVVColor(float colorValue) {\r\n if (colorValue \x3c\x3d u_vvColorValues[0]) {\r\n return u_vvColors[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_COLOR_N; ++i) {\r\n if (u_vvColorValues[i] \x3e\x3d colorValue) {\r\n float f \x3d (colorValue - u_vvColorValues[i-1]) / (u_vvColorValues[i] - u_vvColorValues[i-1]);\r\n return mix(u_vvColors[i-1], u_vvColors[i], f);\r\n }\r\n }\r\n\r\n return u_vvColors[VV_COLOR_N - 1];\r\n }\r\n #endif // VV_COLOR\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"fillVS"\x3e\r\n \x3c![CDATA[\r\n precision mediump float;\r\n\r\n attribute vec2 a_pos;\r\n attribute vec4 a_id; // since we need to render the Id as a color we need to break it into RGBA components. so just like a color, the Id is normalized.\r\n attribute vec4 a_color;\r\n attribute vec4 a_tlbr;\r\n attribute vec4 a_aux;\r\n\r\n uniform highp mat4 u_transformMatrix;\r\n uniform highp vec2 u_normalized_origin;\r\n\r\n varying lowp vec4 v_color;\r\n varying lowp float v_opacity;\r\n\r\n // import the VV inputs and functions (they are #ifdefed, so if the proper #define is not set it will end-up being a no-op)\r\n $fillVVUniformsVS\r\n $fillVVFunctions\r\n\r\n #ifdef PATTERN\r\n uniform mediump float u_zoomFactor;\r\n uniform mediump vec2 u_mosaicSize;\r\n\r\n varying mediump vec4 v_tlbr;\r\n varying mediump vec2 v_tileTextureCoord;\r\n #endif // PATTERN\r\n\r\n #ifdef ID\r\n varying highp vec4 v_id;\r\n #endif // ID\r\n\r\n void main()\r\n {\r\n #ifdef VV_OPACITY\r\n v_opacity \x3d getVVOpacity(a_vv.y);\r\n #else\r\n v_opacity \x3d 1.0;\r\n #endif\r\n\r\n #ifdef VV_COLOR\r\n v_color \x3d getVVColor(a_vv.x);\r\n #else\r\n v_color \x3d a_color;\r\n #endif // VV_COLOR\r\n\r\n #ifdef ID\r\n v_id \x3d a_id;\r\n #endif // ID\r\n\r\n #ifdef PATTERN\r\n // calculate the pattern matrix\r\n mat3 patternMatrix \x3d mat3(1.0, 0.0, 0.0,\r\n 0.0, 1.0, 0.0,\r\n 0.0, 0.0, 1.0);\r\n patternMatrix[0][0] \x3d 1.0 / (u_zoomFactor * a_aux.x);\r\n patternMatrix[1][1] \x3d 1.0 / (u_zoomFactor * a_aux.y);\r\n\r\n // calculate the texture coordinates of the current vertex. It will of course get interpolated.\r\n // The pattern matrix is a 3x3 scale matrix which \'tiles\' the texture inside the tile, translating from\r\n // tile coordinates to texture coordinates.\r\n v_tileTextureCoord \x3d (patternMatrix * vec3(a_pos, 1.0)).xy;\r\n v_tlbr \x3d vec4(a_tlbr.x / u_mosaicSize.x, a_tlbr.y / u_mosaicSize.y, a_tlbr.z / u_mosaicSize.x, a_tlbr.w / u_mosaicSize.y);\r\n #endif // PATTERN\r\n\r\n gl_Position \x3d vec4(u_normalized_origin, 0.0, 0.0) + u_transformMatrix * vec4(a_pos, 0, 1.0);\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"fillFS"\x3e\r\n \x3c![CDATA[\r\n precision lowp float;\r\n uniform lowp float u_opacity;\r\n\r\n #ifdef PATTERN\r\n uniform lowp sampler2D u_texture;\r\n\r\n varying mediump vec4 v_tlbr;\r\n varying mediump vec2 v_tileTextureCoord;\r\n #endif // PATTERN\r\n\r\n #ifdef ID\r\n varying highp vec4 v_id;\r\n #endif // ID\r\n\r\n varying lowp vec4 v_color;\r\n varying lowp float v_opacity;\r\n\r\n void main()\r\n {\r\n #ifdef PATTERN\r\n // normalize the calculated texture coordinate such that it fits in the range of 0 to 1.\r\n mediump vec2 normalizedTextureCoord \x3d mod(v_tileTextureCoord, 1.0);\r\n // interpolate the image coordinate between the top-left and the bottom right to get the actual position to sample.\r\n // after normalizing the position, we get a value ranging between 0 and 1 which refers to the entire texture, however\r\n // we need to only sample from area that has our sprite in the mosaic.\r\n mediump vec2 samplePos \x3d mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\r\n // sample the sprite mosaic\r\n lowp vec4 color \x3d texture2D(u_texture, samplePos);\r\n gl_FragColor \x3d u_opacity * v_opacity * v_color * color;\r\n #else\r\n gl_FragColor \x3d u_opacity * v_opacity * v_color;\r\n #endif // PATTERN\r\n\r\n #ifdef HIGHLIGHT\r\n gl_FragColor.a \x3d step(1.0 / 255.0, gl_FragColor.a);\r\n #endif // HIGHLIGHT\r\n\r\n #ifdef ID\r\n if (gl_FragColor.a \x3c 1.0 / 255.0) {\r\n discard;\r\n }\r\n gl_FragColor \x3d v_id;\r\n #endif // ID\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\x3c/snippets\x3e\r\n',
"url:esri/views/2d/engine/webgl/shaders/lineShaders.xml":'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\r\n\x3c!--\r\n // YF TODO: (doc)\r\n--\x3e\r\n\x3csnippets\x3e\r\n \x3csnippet name\x3d"lineVVUniformsVS"\x3e\r\n \x3c![CDATA[\r\n #if defined(VV_COLOR) || defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE) || defined(VV_OPACITY)\r\n attribute vec3 a_vv;\r\n #endif // VV_COLOR || VV_SIZE_MIN_MAX_VALUE || VV_SIZE_SCALE_STOPS || VV_SIZE_FIELD_STOPS || VV_SIZE_UNIT_VALUE || VV_OPACITY\r\n\r\n #ifdef VV_COLOR\r\n uniform float u_vvColorValues[8];\r\n uniform vec4 u_vvColors[8];\r\n #endif // VV_COLOR\r\n\r\n #ifdef VV_SIZE_MIN_MAX_VALUE\r\n uniform vec4 u_vvSizeMinMaxValue;\r\n #endif // VV_SIZE_MIN_MAX_VALUE\r\n\r\n #ifdef VV_SIZE_SCALE_STOPS\r\n uniform float u_vvSizeScaleStopsValue;\r\n #endif\r\n\r\n #ifdef VV_SIZE_FIELD_STOPS\r\n uniform float u_vvSizeFieldStopsValues[6];\r\n uniform float u_vvSizeFieldStopsSizes[6];\r\n #endif // VV_SIZE_FIELD_STOPS\r\n\r\n #ifdef VV_SIZE_UNIT_VALUE\r\n uniform float u_vvSizeUnitValueWorldToPixelsRatio;\r\n #endif // VV_SIZE_UNIT_VALUE\r\n\r\n #ifdef VV_OPACITY\r\n uniform float u_vvOpacityValues[8];\r\n uniform float u_vvOpacities[8];\r\n #endif // VV_OPACITY\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"lineVVFunctions"\x3e\r\n \x3c![CDATA[\r\n #ifdef VV_SIZE_MIN_MAX_VALUE\r\n float getVVMinMaxSize(float sizeValue) {\r\n float f \x3d (sizeValue - u_vvSizeMinMaxValue.x) / (u_vvSizeMinMaxValue.y - u_vvSizeMinMaxValue.x);\r\n return clamp(mix(u_vvSizeMinMaxValue.z, u_vvSizeMinMaxValue.w, f), u_vvSizeMinMaxValue.z, u_vvSizeMinMaxValue.w);\r\n }\r\n #endif // VV_SIZE_MIN_MAX_VALUE\r\n\r\n #ifdef VV_SIZE_FIELD_STOPS\r\n const int VV_SIZE_N \x3d 6;\r\n float getVVStopsSize(float sizeValue) {\r\n if (sizeValue \x3c\x3d u_vvSizeFieldStopsValues[0]) {\r\n return u_vvSizeFieldStopsSizes[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_SIZE_N; ++i) {\r\n if (u_vvSizeFieldStopsValues[i] \x3e\x3d sizeValue) {\r\n float f \x3d (sizeValue - u_vvSizeFieldStopsValues[i-1]) / (u_vvSizeFieldStopsValues[i] - u_vvSizeFieldStopsValues[i-1]);\r\n return mix(u_vvSizeFieldStopsSizes[i-1], u_vvSizeFieldStopsSizes[i], f);\r\n }\r\n }\r\n\r\n return u_vvSizeFieldStopsSizes[VV_SIZE_N - 1];\r\n }\r\n #endif // VV_SIZE_FIELD_STOPS\r\n\r\n #ifdef VV_SIZE_UNIT_VALUE\r\n float getVVUnitValue(float sizeValue) {\r\n return u_vvSizeUnitValueWorldToPixelsRatio * sizeValue;\r\n }\r\n #endif // VV_SIZE_UNIT_VALUE\r\n\r\n #ifdef VV_OPACITY\r\n const int VV_OPACITY_N \x3d 8;\r\n float getVVOpacity(float opacityValue) {\r\n if (opacityValue \x3c\x3d u_vvOpacityValues[0]) {\r\n return u_vvOpacities[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_OPACITY_N; ++i) {\r\n if (u_vvOpacityValues[i] \x3e\x3d opacityValue) {\r\n float f \x3d (opacityValue - u_vvOpacityValues[i-1]) / (u_vvOpacityValues[i] - u_vvOpacityValues[i-1]);\r\n return mix(u_vvOpacities[i-1], u_vvOpacities[i], f);\r\n }\r\n }\r\n\r\n return u_vvOpacities[VV_OPACITY_N - 1];\r\n }\r\n #endif // VV_OPACITY\r\n\r\n #ifdef VV_COLOR\r\n const int VV_COLOR_N \x3d 8;\r\n\r\n vec4 getVVColor(float colorValue) {\r\n if (colorValue \x3c\x3d u_vvColorValues[0]) {\r\n return u_vvColors[0];\r\n }\r\n\r\n for (int i \x3d 1; i \x3c VV_COLOR_N; ++i) {\r\n if (u_vvColorValues[i] \x3e\x3d colorValue) {\r\n float f \x3d (colorValue - u_vvColorValues[i-1]) / (u_vvColorValues[i] - u_vvColorValues[i-1]);\r\n return mix(u_vvColors[i-1], u_vvColors[i], f);\r\n }\r\n }\r\n\r\n return u_vvColors[VV_COLOR_N - 1];\r\n }\r\n #endif // VV_COLOR\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"lineVS"\x3e\r\n \x3c![CDATA[\r\n precision mediump float;\r\n\r\n attribute vec2 a_pos;\r\n attribute vec4 a_id;\r\n attribute vec4 a_color;\r\n attribute vec4 a_offsetAndNormal;\r\n attribute vec2 a_accumulatedDistanceAndHalfWidth;\r\n attribute vec4 a_tlbr;\r\n attribute vec4 a_segmentDirection;\r\n\r\n // the relative transformation of a vertex given in tile coordinates to a relative normalized coordinate\r\n // relative to the tile\'s upper left corner\r\n // the extrusion vector.\r\n uniform highp mat4 u_transformMatrix;\r\n // the extrude matrix which is responsible for the \'anti-zoom\' as well as the rotation\r\n uniform highp mat4 u_extrudeMatrix;\r\n // u_normalized_origin is the tile\'s upper left corner given in normalized coordinates\r\n uniform highp vec2 u_normalized_origin;\r\n uniform lowp float u_opacity; // the layer\'s opacity\r\n uniform mediump float u_tileCoordRatio;\r\n uniform mediump float u_antialiasing;\r\n\r\n // the interpolated normal to the line. the information is packed into the two LSBs of the vertex coordinate\r\n varying mediump vec2 v_normal;\r\n // the accumulated distance along the line. We need this information in order to render the dashes.\r\n varying highp float v_accumulatedDistance;\r\n varying mediump float v_lineHalfWidth;\r\n varying lowp vec4 v_color;\r\n varying lowp float v_transparency;\r\n\r\n#ifdef SDF\r\n const float scale \x3d 1.0 / 15.5;\r\n#else\r\n const float scale \x3d 1.0 / 31.0;\r\n#endif\r\n\r\n\r\n#ifdef PATTERN\r\n uniform mediump vec2 u_mosaicSize;\r\n\r\n varying mediump vec4 v_tlbr; // normalized pattern coordinates [0, 1]\r\n varying mediump vec2 v_patternSize;\r\n#endif // PATTERN\r\n\r\n#ifdef ID\r\n varying highp vec4 v_id;\r\n#endif // ID\r\n\r\n // import the VV inputs and functions (they are #ifdefed, so if the proper #define is not set it will end-up being a no-op)\r\n $lineVVUniformsVS\r\n $lineVVFunctions\r\n\r\n void main()\r\n {\r\n // size VV block\r\n#if defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE)\r\n\r\n#ifdef VV_SIZE_MIN_MAX_VALUE\r\n mediump float lineHalfWidth \x3d 0.5 * getVVMinMaxSize(a_vv.x);\r\n#endif // VV_SIZE_MIN_MAX_VALUE\r\n\r\n#ifdef VV_SIZE_SCALE_STOPS\r\n mediump float lineHalfWidth \x3d 0.5 * u_vvSizeScaleStopsValue;\r\n#endif // VV_SIZE_SCALE_STOPS\r\n\r\n#ifdef VV_SIZE_FIELD_STOPS\r\n mediump float lineHalfWidth \x3d 0.5 * getVVStopsSize(a_vv.x);\r\n#endif // VV_SIZE_FIELD_STOPS\r\n\r\n#ifdef VV_SIZE_UNIT_VALUE\r\n mediump float lineHalfWidth \x3d 0.5 * getVVUnitValue(a_vv.x);\r\n#endif // VV_SIZE_UNIT_VALUE\r\n\r\n#else // no VV\r\n mediump float lineHalfWidth \x3d a_accumulatedDistanceAndHalfWidth.y * scale;\r\n#endif // defined(VV_SIZE_MIN_MAX_VALUE) || defined(VV_SIZE_SCALE_STOPS) || defined(VV_SIZE_FIELD_STOPS) || defined(VV_SIZE_UNIT_VALUE)\r\n\r\n#ifdef HIGHLIGHT\r\n // TODO: Decide what to do here. Do we want the\r\n // highlight of line features to be slighly larger\r\n // than the feature itself, when the line is too\r\n // thin?\r\n // lineHalfWidth \x3d max(lineHalfWidth, 3.0);\r\n#endif\r\n\r\n#ifdef VV_OPACITY\r\n v_transparency \x3d u_opacity * getVVOpacity(a_vv.z);\r\n#else\r\n v_transparency \x3d u_opacity;\r\n#endif // VV_OPACITY\r\n\r\n #ifdef VV_COLOR\r\n v_color \x3d getVVColor(a_vv.y);\r\n#else\r\n v_color \x3d a_color;\r\n#endif // VV_COLOR\r\n\r\n // make sure to clip the vertices in case that the width of the line is 0 (or negative)\r\n float z \x3d 2.0 * step(lineHalfWidth, 0.0);\r\n\r\n // add the antialiasing factor to the line width. Limit the line width to 0.5 pixels (otherwise it does not look good)\r\n lineHalfWidth \x3d max(lineHalfWidth, 0.5) + u_antialiasing;\r\n\r\n v_lineHalfWidth \x3d lineHalfWidth;\r\n\r\n // calculate the relative distance from the centerline to the edge of the line. Since offset is given in integers (for the\r\n // sake of using less attribute memory, we need to scale it back to the original range of ~ 0: 1)\r\n mediump vec2 dist \x3d lineHalfWidth * a_offsetAndNormal.xy * scale;\r\n\r\n // transform the vertex\r\n gl_Position \x3d vec4(u_normalized_origin, 0.0, 0.0) + u_transformMatrix * vec4(a_pos, z, 1.0) + u_extrudeMatrix * vec4(dist, 0.0, 0.0);\r\n\r\n // the accumulated distance will be used to calculate the dashes (or the no-data...)\r\n v_accumulatedDistance \x3d a_accumulatedDistanceAndHalfWidth.x + dot(scale * a_segmentDirection.xy, dist / u_tileCoordRatio);\r\n v_normal \x3d a_offsetAndNormal.zw * scale;\r\n\r\n#ifdef PATTERN\r\n v_tlbr \x3d vec4(a_tlbr.x / u_mosaicSize.x, a_tlbr.y / u_mosaicSize.y, a_tlbr.z / u_mosaicSize.x, a_tlbr.w / u_mosaicSize.y);\r\n v_patternSize \x3d vec2(a_tlbr.z - a_tlbr.x, a_tlbr.w - a_tlbr.y);\r\n#endif // PATTERN\r\n\r\n#ifdef ID\r\n v_id \x3d a_id;\r\n#endif // ID\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3csnippet name\x3d"lineFS"\x3e\r\n \x3c![CDATA[\r\n precision lowp float;\r\n\r\n uniform lowp float u_blur;\r\n uniform mediump float u_antialiasing;\r\n\r\n varying mediump vec2 v_normal;\r\n varying highp float v_accumulatedDistance;\r\n varying mediump float v_lineHalfWidth;\r\n varying lowp vec4 v_color;\r\n varying lowp float v_transparency;\r\n\r\n#if defined(PATTERN) || defined(SDF)\r\n uniform sampler2D u_texture;\r\n\r\n varying mediump vec4 v_tlbr; // normalized pattern coordinates [0, 1]\r\n varying mediump vec2 v_patternSize;\r\n uniform mediump float u_zoomFactor;\r\n uniform mediump float u_tileCoordRatio;\r\n#endif // PATTERN\r\n\r\n#ifdef SDF\r\n const float sdfPatternHalfWidth \x3d 15.5; // YF: assumed that the width will be set to 32\r\n\r\n float rgba2float(vec4 rgba) {\r\n return dot(rgba, vec4(1.0/16777216.0, 1.0/65535.0, 1.0/256.0, 1.0));\r\n }\r\n#endif // SDF\r\n\r\n#ifdef ID\r\n varying highp vec4 v_id;\r\n#endif // ID\r\n\r\n void main()\r\n {\r\n // add an antialiasing factor as long as we are under two pixels\r\n mediump float antialiasingFactor \x3d u_antialiasing * step(v_lineHalfWidth, 2.0);\r\n\r\n // dist represent the distance of the fragment from the line. 1.0 or -1.0 will be the values on the edge of the line,\r\n // and any value in between will be inside the line (the sign represent the direction - right or left).\r\n // since u_linewidth.s (half line width) is represented in pixels, dist is also given in pixels\r\n mediump float fragDist \x3d length(v_normal) * v_lineHalfWidth;\r\n\r\n // calculate the alpha given the difference between the line-width and the distance of the fragment from the center-line.\r\n lowp float alpha \x3d clamp((v_lineHalfWidth - fragDist - 0.5 * antialiasingFactor) / (u_blur + 2.0 * antialiasingFactor), 0.0, 1.0);\r\n\r\n#if defined(SDF)\r\n mediump float lineWidthRatio \x3d v_lineHalfWidth / sdfPatternHalfWidth;\r\n mediump float relativeTexX \x3d mod((u_zoomFactor * u_tileCoordRatio * v_accumulatedDistance + v_normal.x * v_lineHalfWidth) / (lineWidthRatio * v_patternSize.x), 1.0);\r\n mediump float relativeTexY \x3d 0.5 + 0.5 * v_normal.y;\r\n\r\n // claculate the actual texture coordinates by interpolating between the TL/BR pattern coordinates\r\n mediump vec2 texCoord \x3d mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\r\n\r\n // calculate the distance from the edge [-0.5, 0.5]\r\n mediump float d \x3d rgba2float(texture2D(u_texture, texCoord)) - 0.5;\r\n\r\n // the distance is a proportional to the line width\r\n float dist \x3d d * v_lineHalfWidth;\r\n\r\n lowp vec4 fillPixelColor \x3d v_transparency * alpha * clamp(0.5 - dist, 0.0, 1.0) * v_color;\r\n gl_FragColor \x3d fillPixelColor;\r\n#elif defined(PATTERN)\r\n // we need to calculate the relative portion of the line texture along the line given the accumulated distance along the line\r\n // The computed value should is anumber btween 0 and 1 which will later be used to interpolate btween the BR and TL values\r\n mediump float relativeTexX \x3d mod((u_zoomFactor * u_tileCoordRatio * v_accumulatedDistance + v_normal.x * v_lineHalfWidth) / v_patternSize.x, 1.0);\r\n\r\n // in order to calculate the texture coordinates prependicular to the line (Y axis), we use the interpolated normal values\r\n // which range from -1.0 to 1.0. On the line\'s centerline, the value of the interpolated normal is 0.0, however the relative\r\n // texture value shpould be 0.5 (given that at the bottom of the line, the texture coordinate must be equal to 0.0)\r\n // (TL) --------------------------- --\x3e left edge of line. Interpolatedf normal is 1.0\r\n // | -\x3e line-width / 2\r\n // - - - - - - - - - - - - - -\r\n // | -\x3e line-width / 2\r\n // ---------------------------- (BR)--\x3e right edge of line. Interpolatedf normal is -1.0\r\n\r\n mediump float relativeTexY \x3d 0.5 + (v_normal.y * v_lineHalfWidth / v_patternSize.y);\r\n\r\n // claculate the actual texture coordinates by interpolating between the TL/BR pattern coordinates\r\n mediump vec2 texCoord \x3d mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\r\n\r\n // get the color from the texture\r\n lowp vec4 color \x3d texture2D(u_texture, texCoord);\r\n\r\n gl_FragColor \x3d v_transparency * alpha * v_color * color;\r\n#else // solid line (no texture, no pattern)\r\n // output the fragment color\r\n gl_FragColor \x3d v_transparency * alpha * v_color;\r\n#endif // SDF\r\n\r\n#ifdef HIGHLIGHT\r\n gl_FragColor.a \x3d step(1.0 / 255.0, gl_FragColor.a);\r\n#endif // HIGHLIGHT\r\n\r\n #ifdef ID\r\n if (gl_FragColor.a \x3c 1.0 / 255.0) {\r\n discard;\r\n }\r\n gl_FragColor \x3d v_id;\r\n #endif // ID\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n\x3c/snippets\x3e\r\n',
"url:esri/views/2d/engine/webgl/shaders/hlShaders.xml":'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\r\n\x3c!--\r\n Highlight generation and rendering shaders.\r\n\r\n These shader sources are loaded by hlShaderSnippets.ts which in turn\r\n is used by HighlightRenderer to instantiate the programs needed for\r\n generating and rendering the highlights.\r\n\r\n These shaders are intended to be used with full screen quads.\r\n--\x3e\r\n\x3csnippets\x3e\r\n \x3c!--\r\n Vertex shader: texturedVS\r\n\r\n Identity vertex shader that outputs an untransformed 2-D vertex\r\n and passes its texture coordinates unchanged to the interpolator.\r\n --\x3e\r\n \x3csnippet name\x3d"texturedVS"\x3e\r\n \x3c![CDATA[\r\n // Vertex position.\r\n attribute mediump vec2 a_position;\r\n\r\n // Texture coordinates.\r\n attribute mediump vec2 a_texcoord;\r\n\r\n // Texture coordinates to be interpolated.\r\n varying mediump vec2 v_texcoord;\r\n\r\n void main(void) {\r\n // Pass the position unchanged.\r\n gl_Position \x3d vec4(a_position, 0.0, 1.0);\r\n\r\n // Pass the texture coordinates unchanged.\r\n v_texcoord \x3d a_texcoord;\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3c!--\r\n Fragment shader: blurFS\r\n\r\n A gaussian blur shader. It blurs the alpha channel of its input\r\n according to 4 different sigma and stores the results into the\r\n four channel of the target framebuffer.\r\n\r\n It is intended to be called twice; the first time to perform an\r\n horizontal blur, and a second time to perform a vertical blur.\r\n\r\n This shader is used to turn the highlight mask into a highlight\r\n map. The highlight map is an approximation of the signed distance\r\n field of the mask.\r\n --\x3e\r\n \x3csnippet name\x3d"blurFS"\x3e\r\n \x3c![CDATA[\r\n // Interpolated texture coordinates.\r\n varying mediump vec2 v_texcoord;\r\n\r\n // Blur direction information. There are two possible\r\n // configurations that the host code can use.\r\n // - [1, 0, 1/WIDTH, 0] Used when blurring horizontally. In this\r\n // case u_direction[0] \x3d 1 is expressed in pixel and is fed to\r\n // the gauss function to produce the value of the gaussian weight\r\n // for that pixel, while u_direction[2] \x3d 1/WIDTH is in texel units\r\n // and is used to sample the right texel from the texture map.\r\n // - [0, 1, 0, 1/HEIGHT] Used when blurring vertically. In this\r\n // case u_direction[1] \x3d 1 is expressed in pixel and is fed to\r\n // the gauss function to produce the value of the gaussian weight\r\n // for that pixel, while u_direction[3] \x3d 1/HEIGHT is in texel units\r\n // and is used to sample the right texel from the texture map.\r\n uniform mediump vec4 u_direction;\r\n\r\n // Source to destination channel selection matrix.\r\n uniform mediump mat4 u_channelSelector;\r\n\r\n // The highlight map is obtained by blurring the alpha channel of the highlight\r\n // mask accroding to these 4 values of the gaussian\'s sigma parameter.\r\n uniform mediump vec4 u_sigmas;\r\n\r\n // This is the highlight mask if we have not blurred horizontally yet, otherwise\r\n // it is the horizontally blurred highlight map and blurring it one more time\r\n // vertically will complete the process.\r\n uniform sampler2D u_texture;\r\n\r\n // The gaussian kernel. Note that it lacks the normalization constant, because\r\n // we want to store it unnormalized in the highlight map (i.e. having a peak\r\n // value of 1). Note also that we are using the SIMD (single instruction, multiple\r\n // data) capabilities of the GPU to compute four different gaussian kernels, one\r\n // for each sigma.\r\n mediump vec4 gauss(mediump vec2 dir) {\r\n return exp(-dot(dir, dir) / (2.0 * u_sigmas * u_sigmas));\r\n }\r\n\r\n mediump vec4 selectChannel(mediump vec4 sample) {\r\n return u_channelSelector * sample;\r\n }\r\n\r\n // Sample the input texture and accumulated its gaussian weighted value and the\r\n // total weight.\r\n void accumGauss(mediump float i, inout mediump vec4 tot, inout mediump vec4 weight) {\r\n // Computes the gaussian weights, one for each sigma.\r\n // Note that u_direction.xy is [1, 0] when blurring horizontally and [0, 1] when blurring vertically.\r\n mediump vec4 w \x3d gauss(i * u_direction.xy);\r\n\r\n // Accumumates the values.\r\n // Note that u_direction.xy is [1/WIDTH, 0] when blurring horizontally and [0, 1/HEIGHT] when blurring vertically.\r\n tot +\x3d selectChannel(texture2D(u_texture, v_texcoord + i * u_direction.zw)) * w;\r\n\r\n // Accumulates the weights.\r\n weight +\x3d w;\r\n }\r\n\r\n void main(void) {\r\n // Initialize accumulated values and weights to zero.\r\n mediump vec4 tot \x3d vec4(0.0, 0.0, 0.0, 0.0);\r\n mediump vec4 weight \x3d vec4(0.0, 0.0, 0.0, 0.0);\r\n\r\n // Accumulates enough samples. These will be taken\r\n // horizontally or vertically depending on the value\r\n // of u_direction.\r\n accumGauss(-5.0, tot, weight);\r\n accumGauss(-4.0, tot, weight);\r\n accumGauss(-3.0, tot, weight);\r\n accumGauss(-2.0, tot, weight);\r\n accumGauss(-1.0, tot, weight);\r\n accumGauss(0.0, tot, weight);\r\n accumGauss(1.0, tot, weight);\r\n accumGauss(2.0, tot, weight);\r\n accumGauss(3.0, tot, weight);\r\n accumGauss(4.0, tot, weight);\r\n accumGauss(5.0, tot, weight);\r\n\r\n // Compute blurred values.\r\n mediump vec4 rgba \x3d tot / weight;\r\n\r\n // Return the values. Note that each channel will contain\r\n // the result of a different blur operation, one for each\r\n // of the four chosen sigma.\r\n gl_FragColor \x3d vec4(rgba);\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\r\n \x3c!--\r\n Fragment shader: highlightFS\r\n\r\n Takes as input the highlight map, estimated the signed distance field,\r\n and shades the fragments according to their estimated distance from the\r\n edge of the highlighted feature.\r\n\r\n A shade texture is used to turn distance values into colors; the shade\r\n texture is basically a color gradient and is recomputed on the host\r\n every time that the user alters the highlight options.\r\n --\x3e\r\n \x3csnippet name\x3d"highlightFS"\x3e\r\n \x3c![CDATA[\r\n // Interpolated texture coordinates.\r\n varying mediump vec2 v_texcoord;\r\n\r\n // The highlight map. Each channel is a blurred\r\n // version of the alpha channel of the highlight mask.\r\n // - Channel 0 (red) corresponds to a gaussian blur with sigma \x3d u_sigmas[0];\r\n // - Channel 1 (green) corresponds to a gaussian blur with sigma \x3d u_sigmas[1];\r\n // - Channel 2 (blue) corresponds to a gaussian blur with sigma \x3d u_sigmas[2];\r\n // - Channel 3 (alpha) corresponds to a gaussian blur with sigma \x3d u_sigmas[3];\r\n // As of today, only channel 3 is used for distance estimation.\r\n // But the availability of different amounts of blur leaves the\r\n // door open to multi-scale approaches.\r\n uniform sampler2D u_texture;\r\n\r\n // The highlight map was obtained by blurring the alpha channel of the highlight\r\n // mask accroding to these 4 values of the gaussian\'s sigma parameter.\r\n uniform mediump vec4 u_sigmas;\r\n\r\n // A 1-D texture used to shade the highlight.\r\n uniform sampler2D u_shade;\r\n\r\n // The 1-D shade texture is spreaded between u_minMaxDistance[0] and u_minMaxDistance[1].\r\n uniform mediump vec2 u_minMaxDistance;\r\n\r\n // Signed distance estimation.\r\n mediump float distance() {\r\n // Use the largest sigma and the corresponding distance value stored in the\r\n // last channel of the highlight map.\r\n mediump float sigma \x3d u_sigmas[3];\r\n mediump float y \x3d texture2D(u_texture, v_texcoord)[3];\r\n\r\n // Estimates the distance by linearization and local inversion around\r\n // the inflection point. The inflection point is in x \x3d 0.\r\n const mediump float y0 \x3d 0.5; // Value of the convolution at the inflection point.\r\n mediump float m0 \x3d 1.0 / (sqrt(2.0 * 3.1415) * sigma); // Slope of the convolution at the inflection point.\r\n mediump float d \x3d (y - y0) / m0; // Inversion of a local linearization.\r\n\r\n // Return the estimated distance.\r\n return d;\r\n }\r\n\r\n // Shading based on estimated distance.\r\n mediump vec4 shade(mediump float d) {\r\n // Maps the sampled distance from the [A, D] range (see HighlightRenderer::setHighlightOptions) to [0, 1].\r\n mediump float mappedDistance \x3d (d - u_minMaxDistance.x) / (u_minMaxDistance.y - u_minMaxDistance.x);\r\n\r\n // Force to [0, 1]; it should not be necessary because the shade texture uses the CLAMP address mode, so\r\n // this should happen anyway internally to the sampler, but in practice it is needed to avoid weird\r\n // banding artifacts.\r\n // We don\'t really know if we need this or not.\r\n mappedDistance \x3d clamp(mappedDistance, 0.0, 1.0);\r\n\r\n // Sample the 1-D shade texture on its center line (i.e. on t\x3d0.5).\r\n return texture2D(u_shade, vec2(mappedDistance, 0.5));\r\n }\r\n\r\n void main(void) {\r\n // Estimate the distance.\r\n mediump float d \x3d distance();\r\n\r\n // Shade the distance.\r\n gl_FragColor \x3d shade(d);\r\n }\r\n ]]\x3e\r\n \x3c/snippet\x3e\r\n\x3c/snippets\x3e\r\n',
"url:esri/views/2d/engine/webgl/shaders/heatmap.vs.glsl":"attribute vec2 a_pos;\r\nattribute vec2 a_tex;\r\n\r\nuniform mediump vec2 u_minmax;\r\n\r\nvarying mediump vec2 v_uv;\r\nvarying mediump float v_slope;\r\n\r\nvoid main(void) {\r\n gl_Position \x3d vec4(a_pos, 0.0, 1.0);\r\n v_uv \x3d a_tex;\r\n v_slope \x3d 1.0 / (u_minmax.y - u_minmax.x);\r\n}\r\n","url:esri/views/2d/engine/webgl/shaders/heatmap.fs.glsl":"\tprecision mediump float;\r\n\r\n\tuniform lowp sampler2D u_texture;\r\n\tuniform lowp float u_opacity;\r\n\tuniform mediump vec2 u_minmax;\r\n\tuniform lowp sampler2D u_gradient;\r\n\r\n\tvarying mediump vec2 v_uv;\r\n varying mediump float v_slope;\r\n\r\n\tvec4 getColor(float intensity) {\r\n\t float normalizedIntensity \x3d clamp((intensity - u_minmax.x) * v_slope, 0.0, 1.0);\r\n\r\n\t\treturn texture2D(u_gradient, vec2(0.5, normalizedIntensity));\r\n }\r\n\r\n\tvoid main() {\r\n\t// sample the intnsity value\r\n\t\tlowp vec4 color \x3d texture2D(u_texture, v_uv);\r\n\r\n // interpolate the color from the ramp using the intensity value\r\n\t\tgl_FragColor \x3d getColor(color.r) * u_opacity;\r\n\t}\r\n",
"*now":function(A){A(['dojo/i18n!*preload*esri/views/nls/MapView*["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}});
define("require exports ../core/tsSupport/declareExtendsHelper ../core/tsSupport/decorateHelper dojo/promise/all ../core/accessorSupport/decorators ../core/HandleRegistry ../core/promiseUtils ../core/workers ./MapViewBase ./DOMContainer ../geometry/ScreenPoint ./ui/2d/DefaultUI2D ./2d/engine/Stage ./2d/layers/support/GraphicsView2D ./2d/input/MapViewInputManager ./2d/navigation/MapViewNavigation ./2d/support/HighlightOptions ./BreakpointsOwner ./support/screenshotUtils".split(" "),function(A,t,g,
a,d,f,m,l,p,r,q,v,x,w,B,E,D,F,H,I){p.initialize();return function(p){function q(a){a=p.call(this,a)||this;a._graphicsView=null;a._mapViewHandles=new m;a._stage=null;a.highlightOptions=new F;a.inputManager=new E({view:a});a.navigation=null;a.ui=null;a.rendering=!1;return a}g(q,p);Object.defineProperty(q.prototype,"interacting",{get:function(){return this.navigation&&this.navigation.interacting||!1},enumerable:!0,configurable:!0});q.prototype.hitTest=function(a,f){if(!this._setup)return null;var g;
g=null!=a&&a.x?a:new v({x:a,y:f});var l=this.toMap(g);a=[this._graphicsView];a.push.apply(a,this.allLayerViews.toArray().reverse());return d(a.map(function(a){return a&&a.hitTest?a.hitTest(g.x,g.y):null})).then(function(a){return{screenPoint:g,results:a.filter(function(a){return null!=a}).map(function(a){return{mapPoint:l,graphic:a}})}})};q.prototype.takeScreenshot=function(a){if(!this._setup)return l.reject("Map view cannot be used before it is ready");a=I.adjustScreenshotSettings(a,this);return this._stage.takeScreenshot(a)};
q.prototype.on=function(a,d,f){var g=this.inputManager&&this.inputManager.viewEvents.register(a,d,f);return g?g:this.inherited(arguments)};q.prototype.destroyLayerViews=function(){this.inherited(arguments);this._stage&&(this._stage.destroy(),this._stage=null)};q.prototype._startup=function(){var a=this;this.inherited(arguments);var d=new w(this.surface),f=new B({view:this,graphics:this.graphics}),g=new D({view:this,animationManager:this.animationManager});this._stage=d;this._graphicsView=f;this._set("navigation",
g);this._mapViewHandles.add([this.allLayerViews.on("change",function(){return a._updateStageChildren()}),d.on("post-render",function(){return a._set("rendering",a.allLayerViews.some(function(a){return!0===a.rendering}))}),this.watch("stationary",function(a){return d.stationary=a},!0),this.watch("state.viewpoint",function(f){return d.state=a.state},!0)]);d.state=this.state;this._updateStageChildren()};q.prototype._tearDown=function(){this._setup&&(this._graphicsView.destroy(),this._mapViewHandles.removeAll(),
this._stage.destroy(),this.navigation.destroy(),this._graphicsView=this._stage=null,this._set("navigation",null),this.inherited(arguments))};q.prototype._updateStageChildren=function(){var a=this;this._stage.removeAllChildren();this.allLayerViews.filter(function(a){return null!=a.container}).forEach(function(d,f){a._stage.addChildAt(d.container,f)});this._stage.addChild(this._graphicsView.container)};a([f.property({readOnly:!0})],q.prototype,"inputManager",void 0);a([f.property({readOnly:!0})],q.prototype,
"navigation",void 0);a([f.property({dependsOn:["navigation.interacting"],type:Boolean})],q.prototype,"interacting",null);a([f.property({type:x})],q.prototype,"ui",void 0);a([f.property({readOnly:!0})],q.prototype,"rendering",void 0);return q=a([f.subclass("esri.views.MapView")],q)}(f.declared(r,q,H))});