graphdb-workbench 2.6.0-TR2 → 2.6.0-TR4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{0.4ddeb8379f96458f632e.bundle.js → 0.5f1b5e33a31c05350a72.bundle.js} +3 -3
- package/dist/1.6ba3e28b9b4b642300fe.bundle.js +1 -0
- package/dist/10.7a954fa524508f924ea8.bundle.js +1 -0
- package/dist/100.e09a45ba7733d3f50f97.bundle.js +1 -0
- package/dist/101.2656607d514fc4345fc3.bundle.js +1 -0
- package/dist/102.8cc964a8d3ac2ef2f90e.bundle.js +1 -0
- package/dist/103.9c7973ad7f8ce2f11e78.bundle.js +1 -0
- package/dist/104.e6ad2811d5cc02d317ce.bundle.js +1 -0
- package/dist/105.2aab4d1ff8d48fd9a0e5.bundle.js +1 -0
- package/dist/106.1d84ba4fb58233c70b5f.bundle.js +1 -0
- package/dist/107.004c7e29105a3d91f27a.bundle.js +1 -0
- package/dist/108.92fea609136e5e1e1a3b.bundle.js +1 -0
- package/dist/109.6b98d503b616f3fea1b6.bundle.js +1 -0
- package/dist/{9.abf23c64b5f041197641.bundle.js → 11.6f4f05cb1b45c8ca798c.bundle.js} +1 -1
- package/dist/110.dc0034768fd2d3ef4638.bundle.js +1 -0
- package/dist/111.282988adca97232acec7.bundle.js +1 -0
- package/dist/112.e191daa3dc15d7c9a1a9.bundle.js +1 -0
- package/dist/113.c90dac98105ee5b64a85.bundle.js +1 -0
- package/dist/114.545ce491619381e7eb57.bundle.js +1 -0
- package/dist/115.e9160d3c1a248492a1b3.bundle.js +1 -0
- package/dist/116.3760af306087055a70d4.bundle.js +1 -0
- package/dist/117.fa51a50fbdba28579fcc.bundle.js +1 -0
- package/dist/118.1ae41a3e82e6f98358b7.bundle.js +1 -0
- package/dist/119.ed723ad680ad64d6de58.bundle.js +1 -0
- package/dist/12.53fd491a90fff7972b19.bundle.js +1 -0
- package/dist/120.5e0d46d02ecd32a1c4eb.bundle.js +1 -0
- package/dist/{102.a98125e7cbe44cf536e2.bundle.js → 121.e1e5b1869a08d50ce3dc.bundle.js} +1 -1
- package/dist/122.f029ace9a9451dbf7991.bundle.js +1 -0
- package/dist/123.b1cb2777b6136d77b9ad.bundle.js +1 -0
- package/dist/{105.097830cf884ff7d82859.bundle.js → 124.263ab6a6608eb4351d48.bundle.js} +1 -1
- package/dist/125.ec3cb0375b4f4ca0d6c5.bundle.js +1 -0
- package/dist/126.8766ff18efa5d74459af.bundle.js +1 -0
- package/dist/127.c7563cc904bb18fd858d.bundle.js +1 -0
- package/dist/128.e023ff0a622b2183eb57.bundle.js +1 -0
- package/dist/129.497914fe762bb598c924.bundle.js +1 -0
- package/dist/{7.14f008aaac190939acd3.bundle.js → 13.7dd3612cbfc8b016d7d2.bundle.js} +1 -1
- package/dist/130.2a7c6644bdafc0e23c94.bundle.js +1 -0
- package/dist/131.6ea2125da4fe20c0a47c.bundle.js +1 -0
- package/dist/{113.94c8128e0dc2ff349d42.bundle.js → 132.a444984cf21cee5d1cd6.bundle.js} +1 -1
- package/dist/133.61f35db7e212dbffad09.bundle.js +1 -0
- package/dist/{115.8f90e89fb972eacc5c33.bundle.js → 134.ac20acf15edeb4d589dc.bundle.js} +1 -1
- package/dist/{116.dd7d9db80081251674c2.bundle.js → 135.6604ea676862f13a0e33.bundle.js} +1 -1
- package/dist/{117.4d04f878d3c445436ca8.bundle.js → 136.4d9a7910c4bc2a181f33.bundle.js} +1 -1
- package/dist/{118.617f073c1c06392bd6c0.bundle.js → 137.1c0ff181821302630f43.bundle.js} +1 -1
- package/dist/138.b35739e1f2189c0d43de.bundle.js +1 -0
- package/dist/139.35cc42f6c70b0799456e.bundle.js +1 -0
- package/dist/{12.398d835e04b0488b2ed8.bundle.js → 14.7778c265468da1f9c498.bundle.js} +1 -1
- package/dist/140.b04e20ed91a24992f52e.bundle.js +1 -0
- package/dist/141.cd91db4bb786aa426836.bundle.js +1 -0
- package/dist/142.58c8cce402d6b5038d1d.bundle.js +1 -0
- package/dist/143.591ad716c4d4d86cafac.bundle.js +1 -0
- package/dist/{119.19ee7b3ae143f817c5b1.bundle.js → 144.afb8b89d9b02ab2f3d2c.bundle.js} +1 -1
- package/dist/{120.b944d5e63424d4307fc8.bundle.js → 145.cd9bfc5c2f1b0c758df1.bundle.js} +1 -1
- package/dist/{121.3a8954e4c885c56a9817.bundle.js → 146.a5dfb3771b822f12fc6f.bundle.js} +1 -1
- package/dist/{122.71a8cf0330504672fffc.bundle.js → 147.cbf5792673713ae582c5.bundle.js} +1 -1
- package/dist/148.a4d85363d27776f9c42f.bundle.js +1 -0
- package/dist/149.f52ba4a577ed53b641e7.bundle.js +1 -0
- package/dist/{13.def661d2d5c02515c46c.bundle.js → 15.88445930954ec37aba1c.bundle.js} +1 -1
- package/dist/150.c48daac2c9bedabdc074.bundle.js +1 -0
- package/dist/151.665ed526bce9248c62ff.bundle.js +1 -0
- package/dist/152.0529f881e8c109c515bc.bundle.js +1 -0
- package/dist/153.bfdae29e3676a22b3899.bundle.js +1 -0
- package/dist/154.c80d395f9ddb9db3fdc2.bundle.js +1 -0
- package/dist/155.00f4c819fdbcabf8ade6.bundle.js +1 -0
- package/dist/156.9c3f446385fc380875ac.bundle.js +1 -0
- package/dist/157.936027284db212e3a462.bundle.js +1 -0
- package/dist/158.487dc3950da8737008f2.bundle.js +1 -0
- package/dist/159.08f09afd3b6ec80af945.bundle.js +1 -0
- package/dist/16.328119c249164b5d48a3.bundle.js +110 -0
- package/dist/160.bcef3b210ba904cb442f.bundle.js +1 -0
- package/dist/161.7c3592a1b551320c887e.bundle.js +1 -0
- package/dist/162.44ae620bb9273a216889.bundle.js +1 -0
- package/dist/163.a836c50a1caf6e688763.bundle.js +1 -0
- package/dist/164.a3cd2119085fc63b613f.bundle.js +1 -0
- package/dist/165.2be17fc70641d9345c13.bundle.js +1 -0
- package/dist/166.e99dff94f36f0a7a2d5b.bundle.js +1 -0
- package/dist/167.c7040572f3a5ee9e1a9d.bundle.js +1 -0
- package/dist/168.a13a343eaefaea2f9867.bundle.js +1 -0
- package/dist/169.a14cd158007884f819c3.bundle.js +1 -0
- package/dist/17.c7c0a1b0e7f46b4e6cf0.bundle.js +1 -0
- package/dist/170.cb0763fa197a50e5d00e.bundle.js +1 -0
- package/dist/171.1db60ab0f74aa7b4f8ea.bundle.js +1 -0
- package/dist/172.031f224151cb2b8c3c33.bundle.js +1 -0
- package/dist/173.1c921f1705893fc8be75.bundle.js +1 -0
- package/dist/174.e4fd9a841a11d36698e1.bundle.js +1 -0
- package/dist/175.2b4f8c3b8f13629318b4.bundle.js +1 -0
- package/dist/176.03120eace9d5e155e3c6.bundle.js +1 -0
- package/dist/177.60dd2b354799ee876657.bundle.js +1 -0
- package/dist/178.96636a676a76cf17b63a.bundle.js +1 -0
- package/dist/179.4d9a54dd4c3820022a66.bundle.js +1 -0
- package/dist/18.a73222e6b4423507d3bc.bundle.js +1 -0
- package/dist/180.dc3f7c8ed45c7c4eb47e.bundle.js +1 -0
- package/dist/181.7d585b36f0150d689264.bundle.js +1 -0
- package/dist/182.67cde9f960c2e9705616.bundle.js +1 -0
- package/dist/183.ed295dbf8743b2312b68.bundle.js +1 -0
- package/dist/184.8c114b08afe0807b4cf3.bundle.js +1 -0
- package/dist/185.71d20ad26911c858494c.bundle.js +1 -0
- package/dist/186.ff7e5bc1150e1c46b375.bundle.js +1 -0
- package/dist/187.f084d24e6d3a0d55596f.bundle.js +1 -0
- package/dist/188.849825471f786b19a4b1.bundle.js +1 -0
- package/dist/189.4b877c9145d5deede7f0.bundle.js +1 -0
- package/dist/19.5a03e3fd92a1c3887465.bundle.js +1 -0
- package/dist/190.7d68ac2c31d36c8dd4dd.bundle.js +1 -0
- package/dist/191.35d6da44c9247af751af.bundle.js +1 -0
- package/dist/192.958f700e12eec5a3f40a.bundle.js +1 -0
- package/dist/193.4388346291d7a6a4cf09.bundle.js +1 -0
- package/dist/194.7e1d98268ac12116c289.bundle.js +1 -0
- package/dist/195.4e1b03c6de5de6d99334.bundle.js +1 -0
- package/dist/{125.abd9c932b04bf1918f0a.bundle.js → 196.d9bd07285b0970ff9598.bundle.js} +1 -1
- package/dist/{126.3beb08441d05b3056596.bundle.js → 197.2cdab99070cae1059d9f.bundle.js} +1 -1
- package/dist/{127.90d1975083eef3d4a715.bundle.js → 198.dc55af62ebc92cb46fd3.bundle.js} +1 -1
- package/dist/{128.544f1a82e19dd245c7de.bundle.js → 199.4073d59df6a7155a679c.bundle.js} +1 -1
- package/dist/{2.78b4e53269171c9c08a5.bundle.js → 2.d13a535a218e6f07b1e5.bundle.js} +1 -1
- package/dist/20.ba7138bcab31fcb3cdaf.bundle.js +1 -0
- package/dist/{129.64ec11449e0c734500c2.bundle.js → 200.2a4e8186b7cb014964be.bundle.js} +1 -1
- package/dist/{130.50cab19d9a05679b290f.bundle.js → 201.d2027b231eb1a1af7168.bundle.js} +1 -1
- package/dist/{131.4868fc3a837277c30273.bundle.js → 202.bb7a081f375914165e3e.bundle.js} +1 -1
- package/dist/{132.7eda30b601ebb4631b38.bundle.js → 203.a75437fdd3cffc5fff50.bundle.js} +1 -1
- package/dist/{133.f87e1685dd5ed920f9b5.bundle.js → 204.a27a4df1ec4f1ccc1578.bundle.js} +1 -1
- package/dist/{134.8998ff724a077ecff2ce.bundle.js → 205.644f574675d0161227fe.bundle.js} +1 -1
- package/dist/{135.5efd7db8f7bf674d66d4.bundle.js → 206.b19795573658cccf497f.bundle.js} +1 -1
- package/dist/{137.8262ca9736e9818284cd.bundle.js → 207.e4b3c54143046974ab7f.bundle.js} +1 -1
- package/dist/208.85c3ac648e5b95a526b3.bundle.js +1 -0
- package/dist/{139.97ee12e7a3c05be03456.bundle.js → 209.88840e52b63296089aaf.bundle.js} +1 -1
- package/dist/21.d1d80098fccd3eb66034.bundle.js +1 -0
- package/dist/{140.f76f2bc779661b218a98.bundle.js → 210.5c3066eff8bb81e7e5a9.bundle.js} +1 -1
- package/dist/{141.4981056237955a34b2e2.bundle.js → 211.fc89c197a1f81122bfbe.bundle.js} +1 -1
- package/dist/{142.4d60c1795eed3a9570f9.bundle.js → 212.256e6a0642d4e87b4aea.bundle.js} +1 -1
- package/dist/{143.b7057852f7859cf39e75.bundle.js → 213.f7870cbe2f9f3fc790fd.bundle.js} +1 -1
- package/dist/214.143568a91d7b1f7b0bb3.bundle.js +1 -0
- package/dist/215.fc9273b618e443bba601.bundle.js +1 -0
- package/dist/216.1288ee1e5c7cf4c20661.bundle.js +1 -0
- package/dist/{146.29a91af34c64ed2fe1e3.bundle.js → 217.62b151a69b8ab53c2260.bundle.js} +1 -1
- package/dist/{147.54016549674d35bc2869.bundle.js → 218.b3a503dba2093bf065e7.bundle.js} +1 -1
- package/dist/{148.9042ca5db63f1ab3fb40.bundle.js → 219.dc8ff321109d04ca8b91.bundle.js} +1 -1
- package/dist/22.d2476a921e5196ce5dcb.bundle.js +1 -0
- package/dist/220.693cea0c668013332b88.bundle.js +1 -0
- package/dist/{150.4db7163e83efe461fc24.bundle.js → 221.fbf9069ca134942a7e4c.bundle.js} +1 -1
- package/dist/{151.a3d78e05b8802fb4db40.bundle.js → 222.d604ba0c0442d0323dad.bundle.js} +1 -1
- package/dist/{152.2e1aa910a68f0086825b.bundle.js → 223.f33630c395a2c31b3e94.bundle.js} +1 -1
- package/dist/224.77b0ad5065fffba5102d.bundle.js +1 -0
- package/dist/{154.5938248b52830d0a80a2.bundle.js → 225.dabdb3854ce04878031f.bundle.js} +1 -1
- package/dist/{156.bbcaf52acb0cecbc6257.bundle.js → 226.e3e39b40a5ace678710a.bundle.js} +1 -1
- package/dist/227.6919d5516050d6e352cb.bundle.js +1 -0
- package/dist/228.2e377aa403bab3d04635.bundle.js +1 -0
- package/dist/{157.51181d03518519f84b5e.bundle.js → 229.db057ff7134cb8fed23c.bundle.js} +1 -1
- package/dist/23.93de422a3a0025fd9385.bundle.js +1 -0
- package/dist/{159.10457cbb053c1315d93a.bundle.js → 230.dc48d50cc009afc5c8c6.bundle.js} +1 -1
- package/dist/{160.c46bfdf09357a4c62a53.bundle.js → 231.857805bd2bdcdd6a653b.bundle.js} +1 -1
- package/dist/{161.0f35ee11981f0ea0455f.bundle.js → 232.944ebb92bc9b070005cd.bundle.js} +1 -1
- package/dist/233.b8ec8da1b33d60686df4.bundle.js +1 -0
- package/dist/{163.38565d40ac5f71d1c875.bundle.js → 234.6ee64c15583417457230.bundle.js} +1 -1
- package/dist/235.5ffaae464cad8ebd8ee3.bundle.js +1 -0
- package/dist/236.c5ae5e541bb63039397a.bundle.js +1 -0
- package/dist/237.e6edd9f669174ae97dcf.bundle.js +1 -0
- package/dist/24.575d99b06bdff6b83e0a.bundle.js +1 -0
- package/dist/243.182efe1845e708084230.bundle.js +1 -0
- package/dist/244.f56ce6f5a75434de3222.bundle.js +1 -0
- package/dist/245.c8f1dcefaa5c4d4b7496.bundle.js +1 -0
- package/dist/246.37338ad1c311d64cb520.bundle.js +1 -0
- package/dist/247.ff113901838d77a152e4.bundle.js +1 -0
- package/dist/{168.2d4b5a75da5430c73efc.bundle.js → 248.656160a19736cf63b165.bundle.js} +1 -1
- package/dist/{169.6897f56896e3664e8b53.bundle.js → 249.230ae2d77cafb21c7fe6.bundle.js} +1 -1
- package/dist/25.0e455083d848eba034ba.bundle.js +1 -0
- package/dist/{170.d5c0d475c5b6ad84ef77.bundle.js → 250.5e4e4035e16324e2c58b.bundle.js} +1 -1
- package/dist/{171.60cdc91b2bf682a20911.bundle.js → 251.cf5f09ab05ccdc5ffba3.bundle.js} +1 -1
- package/dist/{172.1fb9ead3e508a7cfa5f3.bundle.js → 252.f675f5099ab5fd1bf9e0.bundle.js} +1 -1
- package/dist/{173.95602c81a2692624a015.bundle.js → 253.921c5a70d2753afbe746.bundle.js} +1 -1
- package/dist/{174.aac1982e67b5ca1731c1.bundle.js → 254.e95001fb730d861afecd.bundle.js} +1 -1
- package/dist/{175.5e49a28397900168f816.bundle.js → 255.33c11f13d210dba7720d.bundle.js} +1 -1
- package/dist/{176.2e6d1a9f4eac4fdd8422.bundle.js → 256.8ce4d7faa7f384a48263.bundle.js} +1 -1
- package/dist/{177.3b6aabf3c4db8519ea74.bundle.js → 257.92dcc3d64f8c124723ea.bundle.js} +1 -1
- package/dist/{178.e10370553beb5c6bb839.bundle.js → 258.436f80812661e1fc5789.bundle.js} +1 -1
- package/dist/{179.784cbd536b8e636c1272.bundle.js → 259.75847449092232561f6a.bundle.js} +1 -1
- package/dist/26.b1da7f0c5d9f6a8b45e1.bundle.js +1 -0
- package/dist/{180.d37db50f3ce1b3a04a65.bundle.js → 260.90f3b9e01680de256e45.bundle.js} +1 -1
- package/dist/261.992810e17fbb018cd141.bundle.js +1 -0
- package/dist/{182.e8fe148e90fcd334b9b9.bundle.js → 262.f1318af980aa08db02e3.bundle.js} +1 -1
- package/dist/{183.a086e00d4dc3c7855611.bundle.js → 263.c1181a1b9bcbbc89effd.bundle.js} +1 -1
- package/dist/264.57b489ea8a516de1aad2.bundle.js +1 -0
- package/dist/{184.ff8a39692d0ff666c9e6.bundle.js → 265.4f5df746682f76e6a91c.bundle.js} +1 -1
- package/dist/{185.8b9f0b866e848f8a1aac.bundle.js → 266.e39e430979d839a8e6fa.bundle.js} +1 -1
- package/dist/{186.798880846274da7033da.bundle.js → 267.644f64178fddc1a4045e.bundle.js} +1 -1
- package/dist/{187.eb92a35d38294bc21703.bundle.js → 268.34f0f2c5a505b03650e1.bundle.js} +1 -1
- package/dist/{188.641582484af80415d29a.bundle.js → 269.c67b053dd5e464197f26.bundle.js} +1 -1
- package/dist/27.2e432a640fdf79f09545.bundle.js +1 -0
- package/dist/{189.7ccbb0ef67513ae7001a.bundle.js → 270.136edae2538a1df200c7.bundle.js} +1 -1
- package/dist/{190.a3609218c5d8e873a46f.bundle.js → 271.1d2d4dc93fba7aa3fbee.bundle.js} +1 -1
- package/dist/272.8e67e96b54a6443cae49.bundle.js +1 -0
- package/dist/{191.4c817606bf66c16d9ad1.bundle.js → 273.1caaac740140d1241d54.bundle.js} +1 -1
- package/dist/{192.21f366a1ea7e6905f120.bundle.js → 274.c929ff583266b43ccd36.bundle.js} +1 -1
- package/dist/{193.4d40b788bd7ddcf16788.bundle.js → 275.2bc762563a129399e2b8.bundle.js} +1 -1
- package/dist/{194.0170093f1daf20e82b5f.bundle.js → 276.c8745d23b2f3f8b983fa.bundle.js} +1 -1
- package/dist/{195.d7d8af61458f9416878f.bundle.js → 277.6cfe9ad98b53fbb03ab3.bundle.js} +1 -1
- package/dist/{196.6e6b7589cd1342a0b2b5.bundle.js → 278.bd673b7fce6d8129823b.bundle.js} +1 -1
- package/dist/{197.c071fa1fe9e081a3b053.bundle.js → 279.5fb678a23dd02205300e.bundle.js} +1 -1
- package/dist/{19.c2a5c3e7a49a4acba486.bundle.js → 28.e54a41f01b158ac520b5.bundle.js} +2 -2
- package/dist/{198.3c5ca9ac5a745b4b23a1.bundle.js → 280.780f18c981aa09942626.bundle.js} +1 -1
- package/dist/{199.00ac5221a334189ea09a.bundle.js → 281.994b81d8b3cce7f97ec2.bundle.js} +1 -1
- package/dist/{200.aa3f4dcf9cf98409dbf5.bundle.js → 282.171a2f9a12198884ba61.bundle.js} +1 -1
- package/dist/{201.ec71ced13a1fefb48ac2.bundle.js → 283.f006a6a4c121569385d4.bundle.js} +1 -1
- package/dist/{202.20e71b18f57e7d234ff0.bundle.js → 284.b9fe63fc01016e3ed798.bundle.js} +1 -1
- package/dist/{203.0219c2ba2d4fe4881af2.bundle.js → 285.6cfe76d2e3e24b3467ae.bundle.js} +1 -1
- package/dist/{204.cc169603e18b84e7e65b.bundle.js → 286.30e4d90c0a9b89b3e5be.bundle.js} +1 -1
- package/dist/{205.99fb3c89cd9b9183ddbf.bundle.js → 287.cf9bd1e3a94830088245.bundle.js} +1 -1
- package/dist/{206.43b04d2170165e13353c.bundle.js → 288.c467b167b40f4a10d39e.bundle.js} +1 -1
- package/dist/{207.798c195e1d7d3f301131.bundle.js → 289.96d6e7d6998db1d1080b.bundle.js} +1 -1
- package/dist/29.0f2f8b4f69d7815fadcf.bundle.js +1 -0
- package/dist/{208.34f042066a757f4fd8c0.bundle.js → 290.9a99af7fd593690c90fa.bundle.js} +1 -1
- package/dist/{209.288844c6a42ff4d5685a.bundle.js → 291.3a2f9ccfa9975038ce83.bundle.js} +1 -1
- package/dist/{210.1ac38e393ca959703d4b.bundle.js → 292.172b81645bcd635ad80e.bundle.js} +1 -1
- package/dist/{211.d2721b9785e609e2f817.bundle.js → 293.973d9b58cb79f5e4e94f.bundle.js} +1 -1
- package/dist/{212.b6b19c939f21132b451c.bundle.js → 294.3fb8a87dcb7aa220ff3f.bundle.js} +1 -1
- package/dist/{213.5a5116f764e6357e53ab.bundle.js → 295.2997c8719a72eaee80c7.bundle.js} +1 -1
- package/dist/{214.a2640be51c42d820bb83.bundle.js → 296.566437f96b8b5aa0c62a.bundle.js} +1 -1
- package/dist/{215.209396a71f130477e2b3.bundle.js → 297.3e59d4d7dc09772f6177.bundle.js} +1 -1
- package/dist/{216.16e2e982acc750b4045a.bundle.js → 298.a0ae528113932abe692e.bundle.js} +1 -1
- package/dist/{217.8540eb1d1a0946e72dbf.bundle.js → 299.b719b4b2a75ce2f7674c.bundle.js} +1 -1
- package/dist/3.c736443b56b5fb6f29ec.bundle.js +1 -0
- package/dist/30.d0d8bf39ce9f83c46dfd.bundle.js +1 -0
- package/dist/{218.ef33580c82d20f39f75f.bundle.js → 300.582490f8db581a51fe6e.bundle.js} +1 -1
- package/dist/{219.1652bc940cdd0088dc18.bundle.js → 301.0576f45a60e624e7507f.bundle.js} +1 -1
- package/dist/{220.f8f9c348b1fc0cc72bd6.bundle.js → 302.ceb05e0aa83ba79135d7.bundle.js} +1 -1
- package/dist/303.49fefc138bbd68f4a355.bundle.js +1 -0
- package/dist/304.2d899863d8bb1232d141.bundle.js +1 -0
- package/dist/305.4da3a81b15410c48934d.bundle.js +1 -0
- package/dist/306.43e6dfece2605bf3f79b.bundle.js +1 -0
- package/dist/307.9533ee476c1866d56451.bundle.js +1 -0
- package/dist/308.d5accfd825132a88e82d.bundle.js +1 -0
- package/dist/31.bf6e531ebbe0235718ce.bundle.js +1 -0
- package/dist/{21.8209c5bb8d6226be6ea6.bundle.js → 32.2f5c96f67e9d4c32e6f3.bundle.js} +1 -1
- package/dist/33.90735b9bcd901bf44e1c.bundle.js +1 -0
- package/dist/34.635e6a168de3b0174eeb.bundle.js +1 -0
- package/dist/35.e04378b45bbdfa131d98.bundle.js +1 -0
- package/dist/36.d96e17d83d4752476e16.bundle.js +1 -0
- package/dist/{23.e3de3e200d80d72afe02.bundle.js → 37.a40f2fcf214b2b96e371.bundle.js} +2 -2
- package/dist/38.48080b348f63ba8f4ad4.bundle.js +1 -0
- package/dist/{26.7ddc010c3aa4c7a3f0eb.bundle.js → 39.bf8f4fbf015fe01fa24a.bundle.js} +2 -2
- package/dist/4.a438aa20cfc5e9cd6f8c.bundle.js +1 -0
- package/dist/40.82a5e4c8cd82c76c1355.bundle.js +1 -0
- package/dist/41.01a3548eed371a09d702.bundle.js +1 -0
- package/dist/42.8b5ae3618e37ba7b72c9.bundle.js +1 -0
- package/dist/{31.ce2be87bd69611496fdf.bundle.js → 43.5b8955e01782d77bc775.bundle.js} +1 -1
- package/dist/44.ffdf1b329a24409c6e6d.bundle.js +1 -0
- package/dist/45.f5193eaaf474dbf3e26d.bundle.js +1 -0
- package/dist/46.5a34ff160c46bb4ebcec.bundle.js +1 -0
- package/dist/47.ce5ad4829480b310e790.bundle.js +1 -0
- package/dist/48.d14732d09b294fa847a2.bundle.js +1 -0
- package/dist/49.c0285d548bd94449b7d2.bundle.js +1 -0
- package/dist/5.f1823be4f3579a220bdf.bundle.js +108 -0
- package/dist/50.92440c928adc48294108.bundle.js +1 -0
- package/dist/51.2968215bdb14340916ca.bundle.js +1 -0
- package/dist/52.8fb71910598723085b05.bundle.js +1 -0
- package/dist/{37.15eb38b5e7c67604d2df.bundle.js → 53.bcb78bc0df12338fa738.bundle.js} +1 -1
- package/dist/54.e9be41394905d26fbea5.bundle.js +1 -0
- package/dist/{39.5ca9fa51ec3c63459317.bundle.js → 55.62b7952fb6ad1511ce07.bundle.js} +1 -1
- package/dist/56.c472ed0a80241eb91e29.bundle.js +1 -0
- package/dist/57.d104fac7fbd8824e34c1.bundle.js +1 -0
- package/dist/58.d6a91681cd03133587d1.bundle.js +1 -0
- package/dist/59.8b99107d23b4095c1e5f.bundle.js +1 -0
- package/dist/6.a90c2df4ecda875aff6d.bundle.js +1 -0
- package/dist/60.863872114e3fd4c8566c.bundle.js +1 -0
- package/dist/61.dd64c0d9b4b2f20c12f2.bundle.js +1 -0
- package/dist/62.8846387fe45df1e440da.bundle.js +1 -0
- package/dist/63.a71c8952f951bdd19651.bundle.js +1 -0
- package/dist/64.cf5ad553a076abc1c4a1.bundle.js +1 -0
- package/dist/{49.0707795b3b6e40387da8.bundle.js → 65.bd6f122f523aae2db58b.bundle.js} +1 -1
- package/dist/{51.4f3e41ab41b59f359e84.bundle.js → 66.a5f341e8b9ed06cbc5df.bundle.js} +1 -1
- package/dist/67.a225c1beb42b7c2f0f31.bundle.js +1 -0
- package/dist/68.6af160e2b717c9094790.bundle.js +1 -0
- package/dist/69.aacbefaf3103810878da.bundle.js +1 -0
- package/dist/7.d3744d9d3c3c7455c148.bundle.js +1 -0
- package/dist/70.54e1052edd89e22cc5b4.bundle.js +1 -0
- package/dist/71.02dd2e8ad16e0c73444a.bundle.js +1 -0
- package/dist/72.f3d3863586e73ba2bd62.bundle.js +1 -0
- package/dist/{53.0e96b9739e67da831aeb.bundle.js → 73.802102129aef35957f70.bundle.js} +1 -1
- package/dist/{54.220668833b7f4732d146.bundle.js → 74.b189890410fdcc19aa3d.bundle.js} +1 -1
- package/dist/{56.d0fe2e2f05bb3e45c0b7.bundle.js → 75.1fae7dd8ee7c1cf24eb1.bundle.js} +1 -1
- package/dist/{57.f3097d895908a5c14d56.bundle.js → 76.003015a59d3053553694.bundle.js} +1 -1
- package/dist/{58.ff2b52ebb6d6bb67b9f6.bundle.js → 77.3bc82195cce3eb202d24.bundle.js} +1 -1
- package/dist/78.ba35235dd437b413e4ba.bundle.js +1 -0
- package/dist/79.78b4b86b15158f47da15.bundle.js +1 -0
- package/dist/8.d796cc7c30d86cae3d7f.bundle.js +2 -0
- package/dist/80.76a1deced00097baf585.bundle.js +1 -0
- package/dist/81.92ea771b4875f048e576.bundle.js +1 -0
- package/dist/82.f5137b34aa6fde685bdf.bundle.js +1 -0
- package/dist/{64.fdd90fedc8a5dc3cacaf.bundle.js → 83.241e1d4ee006d39cf5eb.bundle.js} +1 -1
- package/dist/84.d571fdfb70724b8b0461.bundle.js +1 -0
- package/dist/85.99decaec91ea21c1defc.bundle.js +1 -0
- package/dist/{68.05bba948c414a1e21c8f.bundle.js → 86.785ec60af81c236c3138.bundle.js} +1 -1
- package/dist/{69.1255e8072e739c4b3486.bundle.js → 87.6f8ca8aac538eda82b30.bundle.js} +1 -1
- package/dist/{70.fe6fbd7331d2373c8a24.bundle.js → 88.9acf9f434d3ec166730e.bundle.js} +1 -1
- package/dist/89.b0376da36083971383c8.bundle.js +1 -0
- package/dist/9.20ef0d3df920d3a6442a.bundle.js +2 -0
- package/dist/{72.6e8d51e0d240af360ab5.bundle.js → 90.2a62bd3aeb6bc74bfbd3.bundle.js} +1 -1
- package/dist/91.ac5c261fbde103bdfecc.bundle.js +1 -0
- package/dist/{74.042e0bb0fcc0661d32b0.bundle.js → 92.948e0b858b18b5f20fb3.bundle.js} +1 -1
- package/dist/93.00ebc1cabda85b40b0f9.bundle.js +1 -0
- package/dist/94.69841b64ace9b31cf17d.bundle.js +1 -0
- package/dist/95.681b94ad354763d0056d.bundle.js +1 -0
- package/dist/{78.569dd71e4cc7ac3a4383.bundle.js → 96.61bdb0e7e66e9a002a85.bundle.js} +1 -1
- package/dist/97.2d6af115c8ad6845223c.bundle.js +1 -0
- package/dist/{80.8af0388db859fcc9fbf3.bundle.js → 98.1287cd1e098fc59ed236.bundle.js} +1 -1
- package/dist/99.b6bad60263a64505c12a.bundle.js +1 -0
- package/dist/bundle.bf41e89dbeef5fd3db5c.bundle.js +92 -0
- package/dist/css/bootstrap-graphdb-theme.css +68 -2
- package/dist/css/create-similarity-index.css +12 -0
- package/dist/css/explore.css +0 -3
- package/dist/css/graphs-config.css +13 -3
- package/dist/css/jdbc-create.css +8 -0
- package/dist/css/lib/ontotext-yasgui-web-component.css +402 -0
- package/dist/css/shepherd-custom.css +20 -4
- package/dist/css/similarity.css +0 -8
- package/dist/css/sparql-editor.css +53 -0
- package/dist/css/sparql-templates.css +3 -0
- package/dist/i18n/locale-en.json +26 -5
- package/dist/i18n/locale-fr.json +25 -4
- package/dist/index.html +4 -4
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
- package/dist/js/angular/core/directives/queryeditor/templates/query-editor.html +3 -0
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +18 -0
- package/dist/js/angular/export/templates/exportSettingsModal.html +57 -0
- package/dist/js/angular/security/templates/user.html +1 -1
- package/dist/license-checker.json +87 -17
- package/dist/main.575cd06a1b59f91fdfd3.bundle.js +1 -0
- package/dist/main.d146b6bf3b36c70d7eb4.css +1 -0
- package/dist/pages/aclmanagement.html +1 -1
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +245 -170
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +26 -17
- package/dist/pages/explore.html +74 -51
- package/dist/pages/export.html +20 -2
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +213 -281
- package/dist/pages/graphs-visualizations.html +10 -11
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +1 -1
- package/dist/pages/jdbc-create.html +162 -118
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +1 -1
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +69 -101
- package/dist/pages/sparql-editor.html +26 -0
- package/dist/pages/sparql-template-create.html +49 -29
- package/dist/pages/sparql-templates.html +1 -1
- package/dist/pages/sparql.html +3 -3
- package/dist/pages/webapi.html +2 -2
- package/dist/plugins.js +167 -87
- package/dist/polyfills-dom.f3553167ca74b8482e7c.bundle.js +19 -0
- package/dist/res/swagger/index.html +27 -27
- package/dist/{vendor.d1c629ceaacea40a5f4a.css → vendor.169ed6d7d226ea8551b7.css} +1 -1
- package/dist/{vendor.7b6ede99ef82acd3dcf5.bundle.js → vendor.874e22ec3e72d83a85af.bundle.js} +4 -4
- package/dist/vendors~polyfills-core-js.7655c7bc2ec063a2a881.bundle.js +1 -0
- package/package.json +4 -2
- package/dist/1.46d9ecd4119bac145f3b.bundle.js +0 -81
- package/dist/10.9b05de3fe8a117488185.bundle.js +0 -1
- package/dist/100.30b22eaf2bc647082625.bundle.js +0 -1
- package/dist/101.4093fce7d4115fcf21dc.bundle.js +0 -1
- package/dist/103.4d162f7df14c8d81157b.bundle.js +0 -1
- package/dist/104.f0696d49ede65b342317.bundle.js +0 -1
- package/dist/106.2e488f1a9b4b22ad4026.bundle.js +0 -1
- package/dist/107.0495c9673045f1f68bdf.bundle.js +0 -1
- package/dist/108.20ec9347815ab00c4f28.bundle.js +0 -1
- package/dist/109.9699fc25bc788fe01bb3.bundle.js +0 -1
- package/dist/11.0fc995ac096734b915c6.bundle.js +0 -1
- package/dist/110.f101a1762899931179a6.bundle.js +0 -1
- package/dist/111.782fffba201a2ef304d0.bundle.js +0 -1
- package/dist/112.529d6e279b6d0bbaff2e.bundle.js +0 -1
- package/dist/114.2fa7a38692c626887bfe.bundle.js +0 -1
- package/dist/123.c6957ecb441d8a09932a.bundle.js +0 -1
- package/dist/124.27e85a0284e2ebeb7d6e.bundle.js +0 -1
- package/dist/136.2b898a27e978ab15bc3e.bundle.js +0 -1
- package/dist/138.8c149cad49010a65b3ca.bundle.js +0 -1
- package/dist/14.1dfee181edb0d04c106b.bundle.js +0 -29
- package/dist/144.eb8b50eebf16a7196b12.bundle.js +0 -1
- package/dist/145.9281069e9e77978b640a.bundle.js +0 -1
- package/dist/149.3880824512c5fa745836.bundle.js +0 -1
- package/dist/15.9e572627540e9ccd1274.bundle.js +0 -1
- package/dist/153.7a64973115bdaec26406.bundle.js +0 -1
- package/dist/155.691eea60dddb31013b32.bundle.js +0 -1
- package/dist/158.640e412f6002ee1d7341.bundle.js +0 -1
- package/dist/16.942efd726d9ff25c0ed7.bundle.js +0 -1
- package/dist/162.fef28120701e7d200b01.bundle.js +0 -1
- package/dist/164.b2116f472aa847618aee.bundle.js +0 -1
- package/dist/17.a5217a46072ac762cb3b.bundle.js +0 -1
- package/dist/18.8351ac2380235200c997.bundle.js +0 -2
- package/dist/181.f307cabdc4ed7a10ff64.bundle.js +0 -1
- package/dist/20.a767f3f92d8510e602d4.bundle.js +0 -1
- package/dist/22.9d339503774f4f6c0a8b.bundle.js +0 -1
- package/dist/221.b18a92f0ba880edaebbf.bundle.js +0 -1
- package/dist/222.a52ebecd1d5201437ebe.bundle.js +0 -1
- package/dist/24.057349cb66120daf4c4e.bundle.js +0 -1
- package/dist/25.9299f9388d96ed4b97be.bundle.js +0 -1
- package/dist/27.5152c2a1f3b1369e21b0.bundle.js +0 -1
- package/dist/28.833c206dedf826927b2e.bundle.js +0 -1
- package/dist/29.bea28befc9ef8e1f184d.bundle.js +0 -1
- package/dist/3.cf89087c137e759ecd19.bundle.js +0 -27
- package/dist/30.030d90c9357b6a09a423.bundle.js +0 -1
- package/dist/32.6725d94946764db833b8.bundle.js +0 -1
- package/dist/33.4946380f783ad92bf587.bundle.js +0 -1
- package/dist/34.af22bc6d5ed2bcb72a09.bundle.js +0 -1
- package/dist/35.c6277b1733bb56ebb77f.bundle.js +0 -1
- package/dist/36.72e6e6001da4167c42fc.bundle.js +0 -1
- package/dist/38.fc172c7b0d24ab0f8a35.bundle.js +0 -1
- package/dist/4.17e90cc8791b3078f7f2.bundle.js +0 -1
- package/dist/40.309ec5212fd53fe696bb.bundle.js +0 -1
- package/dist/41.aba092368b9345fe062a.bundle.js +0 -1
- package/dist/42.3d78a3aa611c675962fb.bundle.js +0 -1
- package/dist/43.144a809e888a9f3e6035.bundle.js +0 -1
- package/dist/44.46c9e2d54a9f07d78368.bundle.js +0 -1
- package/dist/45.a916daee1f0c6873c890.bundle.js +0 -1
- package/dist/46.4f57238bd032edc81d6d.bundle.js +0 -1
- package/dist/47.19d84d51353da324399f.bundle.js +0 -1
- package/dist/48.5334aa76217b85ac729a.bundle.js +0 -1
- package/dist/5.7cfbc07050f137932ffe.bundle.js +0 -1
- package/dist/50.d8c0fe9c4a8bbf8cbf58.bundle.js +0 -1
- package/dist/52.ed08d9de32fbb03170a1.bundle.js +0 -1
- package/dist/55.917f9fc02948849b1185.bundle.js +0 -1
- package/dist/59.11001f666650393fdaf8.bundle.js +0 -1
- package/dist/6.c5eea752e1f541f494e8.bundle.js +0 -1
- package/dist/60.7e65a6c5670a1ac562e2.bundle.js +0 -1
- package/dist/61.3ba84cc3819eb17de234.bundle.js +0 -1
- package/dist/62.2d331d4634959f64f7ce.bundle.js +0 -1
- package/dist/63.96b16e7916f446e1a74d.bundle.js +0 -1
- package/dist/65.385dff0daed228cead67.bundle.js +0 -1
- package/dist/66.49324c26c968bb61453b.bundle.js +0 -1
- package/dist/67.cd23d15626be33cc84c7.bundle.js +0 -1
- package/dist/71.e9c3c5ccc70f443c97cf.bundle.js +0 -1
- package/dist/73.57e88cee0af3f67aee77.bundle.js +0 -1
- package/dist/75.c75a824264d0e67421ed.bundle.js +0 -1
- package/dist/76.2ad0f5373462bc70bebf.bundle.js +0 -1
- package/dist/77.303a075d21928354102c.bundle.js +0 -1
- package/dist/79.29d39a29721f936ae688.bundle.js +0 -1
- package/dist/8.1893fcb7fc2f0fc7c83e.bundle.js +0 -2
- package/dist/81.c378171b96d12cdf8bcc.bundle.js +0 -1
- package/dist/82.27bb51dfeb4898504e96.bundle.js +0 -1
- package/dist/83.a59d34bc50cf323af43d.bundle.js +0 -1
- package/dist/84.a4ee7bb5d3ed2e6ead5e.bundle.js +0 -1
- package/dist/85.1f1b07562fbf97ab3e11.bundle.js +0 -1
- package/dist/86.62f32aad4394438158a1.bundle.js +0 -1
- package/dist/87.7efe382329921dae6a63.bundle.js +0 -1
- package/dist/88.f442fbeb61fe955ce244.bundle.js +0 -1
- package/dist/89.560e5a053d8dcbaca38a.bundle.js +0 -1
- package/dist/90.3fedce156ebc83022f47.bundle.js +0 -1
- package/dist/91.08b1de35f973e0283974.bundle.js +0 -1
- package/dist/92.fcea4fdca795fa33f2fb.bundle.js +0 -1
- package/dist/93.420c7a3794d642e35e63.bundle.js +0 -1
- package/dist/94.cf5b0e70e34e60663eb5.bundle.js +0 -1
- package/dist/95.a6ad56ceb5d5a63c2b8d.bundle.js +0 -1
- package/dist/96.524be695eddce9b9905c.bundle.js +0 -1
- package/dist/97.7173fb835cc5b1ac4cda.bundle.js +0 -1
- package/dist/98.18b00fa95b6f5b1cf072.bundle.js +0 -1
- package/dist/99.a89c13f7abc4e0374809.bundle.js +0 -1
- package/dist/bundle.3b4bcf1d306742531790.bundle.js +0 -91
- package/dist/css/jdbc.css +0 -3
- package/dist/main.3ac2b4b19f56209c6467.css +0 -1
- package/dist/main.948c3b96766ce09e145b.bundle.js +0 -1
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[16,3,5,19,24,30,31,32,38,42,43,49,65,67,69,70,72,85,101,104,111,112,113,114,115,116,117,119,120,139,154,155,156,157,158,159,160,162,163,164,165,166,167,172,174,193,194,208,213,216,220,234,235,236,237],{105:function(e,t,n){"use strict";n.r(t),n.d(t,"mapGraphsConfigResponseToModel",(function(){return i})),n.d(t,"mapGraphConfigSampleToGraphConfig",(function(){return o})),n.d(t,"mapGraphConfigSamplesToGraphConfigs",(function(){return s}));var r=n(75);const i=e=>new r.GraphsConfig(e.id,e.name,e.startMode,e.owner,e.startQueryIncludeInferred,e.startQuerySameAs,e.startGraphQuery,e.startIRI,e.startIRILabel,e.expandQuery,e.resourceQuery,e.predicateLabelQuery,e.resourcePropertiesQuery,e.shared,e.description,e.hint),o=e=>new r.GraphsConfig(e.id,e.name,e.startMode,e.owner,e.startQueryIncludeInferred,e.startQuerySameAs,e.startGraphQuery,e.startIRI,e.startIRILabel,e.expandQuery,e.resourceQuery,e.predicateLabelQuery,e.resourcePropertiesQuery,e.shared,e.description,e.hint,e.startGraphQueryDescription,e.expandQueryDescription,e.resourceQueryDescription,e.predicateLabelQueryDescription,e.resourcePropertiesQueryDescription),s=e=>e.map(e=>o(e))},106:function(e,t,n){"use strict";n.r(t),n.d(t,"STATIC_RULESETS",(function(){return r})),n.d(t,"REPOSITORY_TYPES",(function(){return i})),n.d(t,"FILENAME_PATTERN",(function(){return o})),n.d(t,"NUMBER_PATTERN",(function(){return s}));const r=[{id:"empty",name:"No inference"},{id:"rdfs-optimized",name:"RDFS (Optimized)"},{id:"rdfs",name:"RDFS"},{id:"rdfsplus-optimized",name:"RDFS-Plus (Optimized)"},{id:"owl-horst-optimized",name:"OWL-Horst (Optimized)"},{id:"owl-horst",name:"OWL-Horst"},{id:"owl2-ql-optimized",name:"OWL2-QL (Optimized)"},{id:"owl2-ql",name:"OWL2-QL"},{id:"owl-max-optimized",name:"OWL-Max (Optimized)"},{id:"owl-max",name:"OWL-Max"},{id:"owl2-rl-optimized",name:"OWL2-RL (Optimized)"},{id:"owl2-rl",name:"OWL2-RL"}],i={graphdbRepo:"graphdb",free:"free",eeWorker:"worker",eeMaster:"master",ontop:"ontop",se:"se",fedx:"fedx"},o=new RegExp("^[a-zA-Z0-9-_]+$"),s=new RegExp("^[0-9]+$")},108:function(e,t){function n(e){const t=["en","fr"];let n;return{getTranslations:()=>(n||(n={},t.forEach(t=>n[t]=e.getTranslationTable(t))),n)}}angular.module("graphdb.framework.core.services.translation-service",[]).service("TranslationService",n),n.$inject=["$translate"]},109:function(e,t,n){"use strict";n.r(t);var r=n(72);angular.module("graphdb.framework.sparql-editor.share-query.service",[]).factory("ShareQueryLinkService",(function(){return{createShareSavedQueryLink:function(t,n){let i=`${e()}?${r.RouteConstants.savedQueryName}=${encodeURIComponent(t)}`;null!=n&&(i+=`&${r.RouteConstants.savedQueryOwner}=${encodeURIComponent(n)}`);return i},createShareQueryLink:function(t){return e()+"?"+$.param({name:t.name,query:t.body,infer:t.inference||!0,sameAs:t.sameAs||!0})}};function e(){return[location.protocol,"//",location.host,location.pathname].join("")}}))},110:function(e,t,n){"use strict";n.r(t),n.d(t,"toEventData",(function(){return d})),n.d(t,"toYasguiOutputModel",(function(){return f})),n.d(t,"downloadAsFile",(function(){return h}));var r=n(85),i=n(67),o=n(86),s=n(87),a=n(88),l=n(89),u=n(90),c=n(91),p=n(92);const d=e=>new r.EventData(e.detail.TYPE,e.detail.payload),f=e=>{const t=d(e);switch(t.TYPE){case i.EventDataType.DOWNLOAD_AS:return new l.DownloadAsEvent(t);case i.EventDataType.NOTIFICATION_MESSAGE:return new u.NotificationMessageEvent(t);case i.EventDataType.COUNT_QUERY:return new a.CountQueryRequestEvent(t);case i.EventDataType.COUNT_QUERY_RESPONSE:return new s.CountQueryResponseEvent(t);case i.EventDataType.QUERY:return new o.QueryRequestEvent(t);case i.EventDataType.QUERY_EXECUTED:return new c.QueryExecutedEvent(t);case i.EventDataType.SAVE_QUERY_OPENED:return new p.SaveQueryOpened(t);default:return t}},h=(e,t,n)=>{const r=document.createElement("a");r.setAttribute("href",`data:${t};charset=utf-8, + ${encodeURIComponent(n)}`),r.setAttribute("download",e),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)}},111:function(e,t,n){"use strict";n.r(t),n.d(t,"YasguiComponent",(function(){return i}));var r=n(14);n(61);class i{constructor(e=r.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor")){this.yasguiComponent=e}changeRenderMode(e){return this.yasguiComponent.changeRenderMode(e)}setQuery(e){return this.yasguiComponent.setQuery(e)}query(e){return this.yasguiComponent.query(e)}getQuery(){return this.yasguiComponent.getQuery()}isQueryValid(){return this.yasguiComponent.isQueryValid()}openTab(e){return this.yasguiComponent.openTab(e)}getQueryMode(){return this.yasguiComponent.getQueryMode()}getQueryType(){return this.yasguiComponent.getQueryType()}getEmbeddedResultAsJson(){return this.yasguiComponent.getEmbeddedResultAsJson()}getEmbeddedResultAsCSV(){return this.yasguiComponent.getEmbeddedResultAsCSV()}hideYasqeActionButton(e){return this.yasguiComponent.hideYasqeActionButton(e)}showYasqeActionButton(e){return this.yasguiComponent.showYasqeActionButton(e)}abortQuery(){return this.yasguiComponent.abortQuery()}resetYasrResults(){return this.yasguiComponent.resetResults()}}},112:function(e,t,n){"use strict";n.r(t),n.d(t,"KeyboardShortcutName",(function(){return r}));const r={TRIGGER_AUTOCOMPLETION:"trigger_autocompletion",DELETE_CURRENT_LINE:"delete_current_line",COMMENT_SELECTED_LINE:"comment_selected_line",COPY_LINE_DOWN:"copy_line_down",COPY_LINE_UP:"copy_line_up",AUTO_FORMAT_SELECTED_LINE:"auto_format_selected_line",INDENT_CURRENT_LINE_MORE:"indent_current_line_more",INDENT_CURRENT_LINE_LESS:"indent_current_line_less",EXECUTE_QUERY_OR_UPDATE:"execute_query_or_update",EXECUTE_EXPLAIN_PLAN_FOR_QUERY:"execute_explain_plan_for_query",EXECUTE_CHAT_GPT_EXPLAIN_PLAN_FOR_QUERY:"execute_chat_gpt_explain_plan_for_query",CREATE_TAB:"create_tab",CREATE_SAVE_QUERY:"create_save_query",SWITCH_NEXT_TAB:"switch_next_tab",SWITCH_PREVIOUS_TAB:"switch_previous_tab",CLOSES_ALL_TABS:"closes_all_tabs",FULL_SCREEN:"full_screen",ESC:"esc"}},113:function(e,t,n){"use strict";n.r(t),n.d(t,"removeSpecialChars",(function(){return r})),n.d(t,"toBoolean",(function(){return i}));const r=e=>e.replace(/[()']/g,""),i=e=>"string"==typeof e?"true"===e:Boolean(e)},115:function(e,t,n){"use strict";n.r(t);n(66),n(10),n(82);var r=n(440),i=n.n(r),o=n(441),s=n.n(o),a=n(0),l=n(123),u=n(409),c=n(124);function p(e,t,n,r,o,p,d,f,h,g,m,v,y,x,E,b){let C;return{restrict:"AE",scope:!1,templateUrl:"js/angular/core/directives/queryeditor/templates/query-editor.html",link:function(f,T,S){f.nostorage=S.hasOwnProperty("nostorage"),f.notabs=S.hasOwnProperty("notabs"),f.notoolbar=S.hasOwnProperty("notoolbar"),f.notoolbarSaved=S.hasOwnProperty("notoolbarSaved"),f.notoolbarCopy=S.hasOwnProperty("notoolbarCopy"),f.notoolbarInference=S.hasOwnProperty("notoolbarInference"),f.notoolbarSameAs=S.hasOwnProperty("notoolbarSameAs"),f.nostatus=S.hasOwnProperty("nostatus"),f.norun=S.hasOwnProperty("norun"),f.enableColumnResizingOnWindowWidth=S.hasOwnProperty("enableColumnResizingOnWindowWidth"),f.runButtonName="query.editor.run.btn",S.runButtonName&&(f.runButtonName=S.runButtonName);if(f.nocount="true"===S.nocount,f.sparqlQueryErrorInfo=void 0,f.fullErrorMessage=!1,f.queryEditorIsReady=!1,f.showFullErrorMessage=function(e){f.fullErrorMessage=e},S.callbackOnChange){const e=f[S.callbackOnChange];"function"==typeof e&&(C=e)}e((function(){!function(f){function T(){angular.element("#wb-sparql-saveQuery")[0].click()}function S(){f.runQuery(!1)}function w(){f.runQuery(!1,"explain")}function N(){f.runQuery(!1,"gpt")}function L(){if(f.tabs.length<2||!f.currentQuery.id||!f.isTabChangeOk(!1))return;let e=B(f.currentQuery.id);e=(e+1)%f.tabs.length;A(f.tabs[e].id)}function I(){if(f.tabs.length<2||!f.currentQuery.id||!f.isTabChangeOk(!1))return;let e=B(f.currentQuery.id);e--,-1===e&&(e=f.tabs.length-1);A(f.tabs[e].id)}function A(t){e((function(){let e=$('a[data-id = "'+t+'"]');0===e.length&&(e=$("a[data-id]").first()),e.tab("show")}),0)}f.changePagination=function(){f.runQuery(!0,f.explainRequested)},window.editor=i.a.fromTextArea(document.getElementById("query"),{persistent:null,value:"",indentUnit:4,createShareLink:null,cursorHeight:1,sparql:{showQueryButton:!1,acceptHeaderGraph:"application/x-graphdb-table-results+json, application/rdf+json;q=0.9, */*;q=0.8",acceptHeaderSelect:"application/x-sparqlstar-results+json, application/sparql-results+json;q=0.9, */*;q=0.8"},extraKeys:{"Ctrl-Enter":S,"Cmd-Enter":S,"Shift-Ctrl-Enter":w,"Shift-Cmd-Enter":w,"Ctrl-Alt-Enter":N,"Cmd-Alt-Enter":N,"Ctrl-Alt-T":f.addNewTab,"Cmd-Alt-T":f.addNewTab,"Ctrl-S":T,"Cmd-S":T,"Ctrl-Alt-Left":I,"Cmd-Alt-Left":I,"Ctrl-Alt-Right":L,"Cmd-Alt-Right":L},locale:E.getLanguage()}),window.editor.toastBuildIndex=function(){const e=Object(a.decodeHTML)(x.instant("explore.autocomplete.warning.msg"));n.warning("",`<div class="autocomplete-toast"><a href="autocomplete">${e}</a></div>`,{allowHtml:!0})},window.editor.toastError=function(e){n.error("Cannot execute autocomplete query. "+getError(e))},window.editor.on("update",(function(){angular.element(".parseErrorIcon").parent().css("z-index","10")})),window.editor.on("changes",(function(){angular.element(".CodeMirror-linenumbers").css("width","1px"),angular.element(".CodeMirror-sizer").css("margin-left","0px"),clearTimeout(f.changesTimeout);const e=!window.editor.queryValid;f.changesTimeout=setTimeout(C?C():function(){const t=B(f.currentQuery.id)+1;$('a[data-id = "'+t+'"]').toggleClass("query-has-error",e).attr("title",e?x.instant("query.editor.query.syntax.error"):"")},200),f.currentQuery.query=window.editor.getValue(),f.currentQuery.queryType=window.editor.getQueryType()})),$(".fullscreenToggleBtns").hide();const R=function(e){$(e.target).removeClass("fa-link").addClass("fa-check").blur(),setTimeout((function(){$(e.target).removeClass("fa-check").addClass("fa-link")}),1e3)};window.onbeforeunload=function(){f.nostorage||v.set(y.TABS_STATE,f.tabs),f.saveTab(f.currentQuery.id)};const O=i.a.executeQuery,D=i.a.getUrlArguments;function k(e,t,n){return{status:e,statusText:t,responseText:n}}let P,M;f.$on("$destroy",(function(){f.nostorage||v.set(y.TABS_STATE,f.tabs),i.a.executeQuery=O,i.a.getUrlArguments=D,f.saveTab(f.currentQuery.id)})),i.a.drawButtons=function(e){e.buttons=$("#yasqe_buttons_mocked")},i.a.getActiveRepository=function(){return r.getActiveRepository()},i.a.getUrlArguments=function(e,t){const n=D(e,t),r=window.editor.getQueryType();return"SELECT"!==r&&"CONSTRUCT"!==r&&"DESCRIBE"!==r||(n.push({name:"limit",value:f.currentTabConfig.pageSize+1}),f.currentTabConfig.offset=(f.currentTabConfig.page-1)*f.currentTabConfig.pageSize+1,n.push({name:"offset",value:f.currentTabConfig.offset-1})),!f.explainRequested||"SELECT"!==r&&"CONSTRUCT"!==r&&"DESCRIBE"!==r||(n.push({name:"explain",value:"true"}),n.push({name:"explainType",value:f.explainRequested})),n},i.a.executeQuery=function(e){if(M&&$(M.resultsContainer).length&&$(M.resultsContainer).empty(),e.options.sparql.headers["X-GraphDB-Catch"]=f.currentTabConfig.pageSize+"; throw",f.currentTrackAlias="query-editor-"+performance.now()+"-"+Date.now(),e.options.sparql.headers["X-GraphDB-Track-Alias"]=f.currentTrackAlias,e.options.sparql.headers["X-GraphDB-Repository-Location"]=r.getActiveRepositoryObject().location,e.options.sparql.headers["X-GraphDB-Repository"]=r.getActiveRepositoryObject().id,f.countTimeouted=!1,"query"===e.getQueryMode()?e.options.sparql.endpoint="repositories/"+r.getActiveRepository():"update"===e.getQueryMode()&&(e.options.sparql.endpoint="repositories/"+r.getActiveRepository()+"/statements"),e.options.sparql.args=[{name:"infer",value:f.currentQuery.inference},{name:"sameAs",value:f.currentQuery.sameAs}],f.currentTabConfig.customUpdateMessage="","update"!==window.editor.getQueryMode()){const t=f.currentTabConfig,n=f.executedQueryTab.id;return window.editor.options.sparql.handlers.countCallback=function(e,r,i){if(200===e.status){const o=f.tabs[B(n)];o&&(M.setResultsCount(e,r,i),t.allResultsCount=M.allCount,o.allResultsCount=M.allCount,t.allResultsCountExact=!0,o.allResultsCountExact=!0,f.saveTab(o.id))}else t.countTimeouted=!0},null!=f.currentQuery.outputType?M.options.output=f.currentQuery.outputType:M.options.output="table",f.currentTabConfig.queryType=window.editor.getQueryType(),f.queryStartTime=(new Date).getTime(),O(e,{setQueryLimit:function(e){return"CONSTRUCT"===f.currentTabConfig.queryType&&r.isActiveRepoOntopType()?window.editor.getValueWithoutComments():e}})}{const t=function(){f.currentTabConfig.queryType="UPDATE",g.getRepositorySize(r.getActiveRepository()).success((function(t){return f.repoSize=parseInt(t),f.queryStartTime=(new Date).getTime(),O(e,{})})).error((function(t){return n.warning(x.instant("query.editor.repo.size.error",{repo:r.getActiveRepository(),error:getError(t)})),f.queryStartTime=(new Date).getTime(),O(e,{})}))};m.checkConnector(window.editor.getValue()).then((function(e){if(e.data.command&&!e.data.hasSupport){f.currentTabConfig.queryType="ERROR",f.currentTabConfig.timeFinished=Date.now(),f.currentTabConfig.timeTook=(f.currentTabConfig.timeFinished-f.queryStartTime)/1e3;const t=x.instant("query.editor.inactive.plugin.warning.msg",{connectorName:e.data.connectorName,pluginName:e.data.pluginName}),n=k(-1,t,t);return M.results={getException:function(){return n}},f.setLoader(!1),void j({customError:n},"",null)}if("create"===e.data.command||"repair"===e.data.command){const t="repair"===e.data.command;t?(f.setLoader(!0,x.instant("query.editor.repairing.connector",{name:e.data.name})),f.currentTabConfig.customUpdateMessage={msg:"query.editor.repaired.connector",name:e.data.name}):(f.setLoader(!0,x.instant("query.editor.creating.connector",{name:e.data.name})),f.currentTabConfig.customUpdateMessage={msg:"created.connector",name:e.data.name});const n=f.$new(!0);n.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:t?x.instant("externalsync.repairing"):x.instant("externalsync.creating"),eta:"-",inline:!1,iri:e.data.iri,name:e.data.name,doneCallback:function(){P.dismiss("cancel")}},n.getHumanReadableSeconds=f.getHumanReadableSeconds,P=d.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:n})}else"drop"===e.data.command&&(f.setLoader(!0,x.instant("externalsync.delete.progress.msg",{name:e.data.name})),f.currentTabConfig.customUpdateMessage={msg:"externalsync.delete.success.msg",name:e.data.name});t()}),(function(){t()}))}};const F=i.a.getAjaxConfig;function j(e,t,n){e.getResponseHeader&&e.getResponseHeader("content-type")&&(e.contentType=e.getResponseHeader("content-type")),delete e.response;const r=B(f.executedQueryTab.id),i=f.tabs[r],o={queryType:f.currentTabConfig.queryType,yasrData:e,textStatus:t,jqXhrOrErrorString:n,page:f.currentTabConfig.page,pageSize:f.currentTabConfig.pageSize,allResultsCount:f.currentTabConfig.allResultsCount,allResultsCountExact:f.currentTabConfig.allResultsCountExact,resultsCount:f.currentTabConfig.resultsCount,offset:f.currentTabConfig.offset,timeTook:f.currentTabConfig.timeTook,timeFinished:f.currentTabConfig.timeFinished,sizeDelta:f.currentTabConfig.sizeDelta,customUpdateMessage:f.currentTabConfig.customUpdateMessage,errorMessage:f.currentTabConfig.errorMessage,warningMessage:f.currentTabConfig.warningMessage};"ERROR"!==f.currentTabConfig.queryType&&"UPDATE"!==f.currentTabConfig.queryType&&"ASK"!==f.currentTabConfig.queryType&&(o.outputType=f.yasr.options.output),angular.extend(f.currentQuery,o),angular.extend(i,o),f.nostorage||v.set(y.TABS_STATE,f.tabs),$('a[data-id = "'+f.executedQueryTab.id+'"]').tab("show")}i.a.getAjaxConfig=function(e,t){const n=F(e,t),r=h.getAuthToken();return r&&_.extend(n.headers,{Authorization:r}),n},f.copyToClipboardQuery=function(e,t){p.openCopyToClipboardModal(function(e,t){let n=[location.protocol,"//",location.host,location.pathname].join("");return e?(n=n+"?savedQueryName="+encodeURIComponent(e),null!=t&&(n+="&owner="+encodeURIComponent(t))):n=n+"?"+$.param({name:f.currentQuery.name,infer:f.currentQuery.inference,sameAs:f.currentQuery.sameAs,query:window.editor.getValue()}),n}(e,t))},f.copyToClipboardResult=function(e){p.openCopyToClipboardModal(e)},f.goToVisual=function(){const e={query:window.editor.getValue(),sameAs:f.currentQuery.sameAs,inference:f.currentQuery.inference};t.path("graphs-visualizations").search(e)},$("textarea").on("paste",(function(){e((function(){f.addKnownPrefixes()}),0)})),f.$on("language-changed",(function(e,t){M&&M.options&&(M.options.locale=t.locale,M.changeLanguage(t.locale)),window.editor.options.locale=t.locale,i.a.signal(window.editor,"language-changed")})),function(){f.$on("$destroy",(function(){M&&M.destroy()}));const t={getUsedPrefixes:{},persistency:!1,locale:E.getLanguage()};f.enableColumnResizingOnWindowWidth&&(t.pluginsOptions=l.YasrUtils.getYasrConfiguration()),M=s()(document.getElementById("yasr"),t),window.yasr=M,M.afterCopy=R,M.getQueryResultsAsFormat=function(e){const t="CONSTRUCT"===window.editor.getQueryType(),i={query:f.currentQuery.query,infer:f.currentQuery.inference,sameAs:f.currentQuery.sameAs,auth:h.getAuthToken()},o=e,s=["application/rdf+json","application/ld+json"].includes(e);if(window.editor.getValue()!==i.query&&n.warning(x.instant("query.editor.query.results.mismatch")),t&&s)g.downloadResultsAsFile(r.getActiveRepository(),i,o).then((function({data:e,filename:t}){Object(u.saveAs)(e,t)})).catch((function(e){e.data.text().then(t=>{431===e.status?n.error(e.statusText,x.instant("common.error")):n.error(t,x.instant("common.error"))})}));else{const t=$("#wb-download");t.attr("action","repositories/"+r.getActiveRepository()),$("#wb-download-query").val(i.query),$("#wb-download-infer").val(i.infer),$("#wb-download-sameAs").val(i.sameAs),i.auth&&$("#wb-auth-token").val(i.auth),$("#wb-download-accept").val(e),t.trigger("submit")}},window.editor.options.sparql.handlers.complete=function(t,i,o){function s(){j(t,i,o)}if(P&&P.dismiss("cancel"),null===window.editor)return void f.setLoader(!1);if(f.currentTabConfig.errorMessage=t.getResponseHeader("X-GraphDB-Error"),f.currentTabConfig.warningMessage=t.getResponseHeader("X-GraphDB-Warning"),M.currentQuery=f.currentQuery,f.currentTabConfig.timeFinished=Date.now(),f.currentTabConfig.timeTook=(f.currentTabConfig.timeFinished-f.queryStartTime)/1e3,t.status>=400)return t.responseText=t.responseText.replace(/^([^: ]+: )+/,""),f.currentTabConfig.queryType="ERROR",s(),f.setYasrResponse(t,i,o),void f.setLoader(!1);if(0===t.status){f.currentTabConfig.queryType="ERROR";const e=k(-1,x.instant("aborted.request.msg"),x.instant("aborted.request.no.results.msg"));return M.results={getException:function(){return e}},f.setLoader(!1),void j({customError:e},"",null)}let a;if(f.setLoader(!1),"update"===window.editor.getQueryMode())a=function(){g.getRepositorySize(r.getActiveRepository()).success((function(e){let t;void 0!==f.repoSize&&(t=Number(e)-f.repoSize),f.currentTabConfig.sizeDelta=t,s()})).error((function(e){n.warning(x.instant("query.editor.repo.size.error",{repo:r.getActiveRepository(),error:getError(e)})),f.currentTabConfig.sizeDelta=void 0,s()}))};else{if(200===t.status){const e=t.getResponseHeader("Content-Type");0!==e.indexOf("application/sparql-results+json")&&0!==e.indexOf("application/x-sparqlstar-results+json")&&0!==e.indexOf("application/x-graphdb-table-results+json")||t.responseJSON.results&&(f.currentTabConfig.resultsCount=t.responseJSON.results.bindings.length,t.responseJSON.results.bindings.length>f.currentTabConfig.pageSize&&(t.responseJSON.results.bindings.length=f.currentTabConfig.pageSize),f.currentTabConfig.allResultsCountExact||((f.nocount||f.countTimeouted||f.currentTabConfig.resultsCount<=f.currentTabConfig.pageSize)&&(t.status=204),f.currentTabConfig.allResultsCount=Math.max(f.currentTabConfig.allResultsCount,f.currentTabConfig.pageSize*(f.currentTabConfig.page-1)+f.currentTabConfig.resultsCount),f.currentTabConfig.resultsCount<=f.currentTabConfig.pageSize&&(f.currentTabConfig.allResultsCountExact=!0)))}f.setLoader(!0,x.instant("query.editor.render.results.msg"),null,!0),a=function(){f.setYasrResponse(t,i,o),s(),f.setLoader(!1)}}e((function(){a(),"CONSTRUCT"!==window.editor.getQueryType()?($(".yasr_btnGroup.nav.nav-tabs li a.disabled").removeClass("disabled").css("font-weight","400"),$(".yasr_btnGroup.nav.nav-tabs li.disabled a").addClass("disabled").css("font-weight","200"),"DESCRIBE"===window.editor.getQueryType()&&$(".yasr_btnGroup.nav.nav-tabs li a").removeClass("disabled").css("font-weight","400")):"CONSTRUCT"===window.editor.getQueryType()&&$(".yasr_btnGroup.nav.nav-tabs li a.disabled").removeClass("disabled").css("font-weight","400"),$("#yasr").css("padding","0"),$(".yasr_btnGroup li:nth-child(2)").hasClass("active")&&e((function(){$(".yasr_btnGroup li:nth-child(2) a").get(0).click()}),100),$("#wb-sparql-addNewTab").click((function(){$(".dataTables_filter").hide(),$(".resultsTable").hide()}))}),100)},window.editor.options.sparql.handlers.resetResults=function(){},f.yasr=M,f.setYasrResponse=function(e,t,n){e.responseJSON&&(e.response=e.responseJSON,e.responseText=void 0),window.yasr.plugins.table.options.highlightLiteralCellResult=G,M.setResponse(e,t,n),U()},f.$watch("yasr.options.output",(function(e){if(e&&"UPDATE"!==f.currentTabConfig.queryType&&"ASK"!==f.currentTabConfig.queryType){const t=f.tabs[B(f.currentQuery.id)];angular.isDefined(t)&&f.currentTabConfig.queryType&&t.outputType!==e&&(t.outputType=f.currentQuery.outputType=e,f.saveTab(t.id))}})),f.$watch("namespaces",(function(){f.namespaces&&(M&&M.options&&f.namespaces&&(M.options.getUsedPrefixes=f.namespaces),i.a.signal(window.editor,"namespacesChanged",f.namespaces))}))}();const U=()=>{const e=M.results.getException();f.sparqlQueryErrorInfo=e?new c.SparqlQueryErrorInfo(e.status,e.statusText,e.responseText):void 0};function G(){var e=M.results.getBindings(),t=M.results.getVariables(),n=e[0],r=t[0];if(1===t.length&&1===e.length&&"plan"===r&&n[r].value.includes("# NOTE: Optimization groups")){var o=document.getElementsByClassName("nonUri")[0];o.classList.add("cm-s-default"),o.setAttribute("id","highlighted_output");var s=o.innerText.substring(1,o.innerText.length-1);o.innerHTML="",i.a.runMode(s,"sparql11",document.getElementById("highlighted_output"))}}function B(e){for(let t=0;t<f.tabs.length;t++){if(f.tabs[t].id===e)return t}}function H(e){return angular.isDefined(e)&&"false"!==e}function q(e,n,r){const i=f.getExistingTabId(e),o=f.$on("tabLoaded",(function(){angular.isDefined(n)&&(f.currentQuery.inference=H(n)),angular.isDefined(r)&&(f.currentQuery.sameAs=H(r)),H(t.search().execute)&&("update"===window.editor.getQueryMode()?p.openSimpleModal({title:x.instant("confirm.execute"),message:Object(a.decodeHTML)(x.instant("query.editor.automatically.execute.update.warning")),warning:!0}).result.then((function(){f.runQuery(!1)})):f.runQuery(!1)),t.search({}),t.replace(),o()}));f.highlightNextTabChange=!0,angular.isDefined(i)?A(i):f.addNewTab(null,e.name,e.body)}function V(){if(t.search().savedQueryName)e=t.search().savedQueryName,r=t.search().owner,i=t.search().infer,s=t.search().sameAs,o.getSavedQuery(e,r).success((function(e){q(e,i,s)})).error((function(t){n.error(x.instant("query.editor.missing.saved.query.data.error",{savedQueryName:e,error:getError(t)}))}));else if(t.search().query){q({name:t.search().name,body:t.search().query},t.search().infer,t.search().sameAs)}else if(b.isActive())f.addNewTab();else{A(v.get(y.TABS_STATE_CURRENT_ID))}var e,r,i,s}function W(){f.getNamespaces(),i.a.signal(window.editor,"repositoryOrAuthorizationChanged",r.getActiveRepository(),h.getAuthToken()),V()}$(document).mouseup((function(e){const t=$("#sampleQueriesCollapse");!t.is(e.target)&&0===t.has(e.target).length&&f.showSampleQueries&&f.toggleSampleQueries()})),r.getActiveRepository()&&W();f.$on("repositoryIsSet",(function(){r.getActiveRepository()&&W()})),e((function(){angular.element(document).find(".CodeMirror textarea:first-child").focus()}),50)}(f),f.queryEditorIsReady=!0}),150)}}}angular.module("graphdb.framework.core.directives.queryeditor.queryeditor",["ngCookies","graphdb.framework.externalsync.controllers","graphdb.framework.rest.connectors.service","graphdb.framework.utils.localstorageadapter"]).directive("queryEditor",p),p.$inject=["$timeout","$location","toastr","$repositories","SparqlRestService","ModalService","$uibModal","$jwtAuth","AuthTokenService","RDF4JRepositoriesRestService","ConnectorsRestService","LocalStorageAdapter","LSKeys","$translate","$languageService","GuidesService"]},117:function(e,t){angular.module("graphdb.framework.rest.graphexplore.data.service",[]).factory("GraphDataRestService",n),n.$inject=["$http"];function n(e){return{getClassHierarchyData:function(t){return e.get("rest/class-hierarchy",{params:{graphURI:t}})},reloadClassHierarchy:function(t){return e.get("rest/class-hierarchy",{params:{doReload:!0,graphURI:t}})},getClassInstances:function(t){return e.get("rest/class-hierarchy/class-instances",{params:{targetUri:t}})},getDomainRangeData:function(t,n){return e.get("rest/domain-range",{params:{targetUri:t,collapsed:n}})},checkDomainRangeData:function(t){return e.head("rest/domain-range",{params:{targetUri:t}})},getRelationshipsData:function(t,n,r){return e.get("rest/dependencies/matrix",{params:{mode:n,classes:_.map(t,(function(e){return e.name})),graphURI:r}})},getRelationshipsClasses:function(t,n){return e.get("rest/dependencies/classes",{params:{mode:t,graphURI:n}})},getRelationshipsStatus:function(t){return e.get("rest/dependencies/status",{params:{graphURI:t}})},calculateRelationships:function(t){return e.get("rest/dependencies/update",{params:{graphURI:t}})},getPredicates:function(t,n,r){return e.get("rest/dependencies/predicates",{params:{from:t,to:n,mode:"all",graphURI:r}})},getInstanceNode:function(t){return e.get("rest/explore-graph/node",{params:t})},getInstanceNodeLinks:function(t){return e.get("rest/explore-graph/links",{params:t})},getProperties:function(t){return e.get("rest/explore-graph/properties",{params:t})},updateGraph:function(t){let n={headers:{"Content-Type":"application/json"}};return n=Object.assign(n,t),e.post("rest/explore-graph/graph",n)},getRdfsLabelAndComment:function(t,n,r){const i=r||{};return e({url:"rest/explore/details",method:"GET",params:_.extend(i,{uri:t,languages:n}),headers:{Accept:"application/json"}})}}}},123:function(e,t,n){"use strict";n.r(t),n.d(t,"YasrUtils",(function(){return r}));const r=function(){const e=function(){return{enableColumnResizingOnWindowWidth:768}};return{getYasrConfiguration:function(t){const n={table:e()};return angular.extend({},n,t)},getDefaultTablePluginConfiguration:e}}()},124:function(e,t,n){"use strict";n.r(t),n.d(t,"MAX_VISIBLE_ERROR_CHARACTERS",(function(){return r})),n.d(t,"SparqlQueryErrorInfo",(function(){return i}));const r=160;class i{constructor(e="",t="",n=""){n&&n.length>r&&(this.shortenErrorMessage=n.substring(0,r)),this.status=e,this.statusText=t,this.responseText=n}}},161:function(e,t){function n(e){return{initLazyList:function(t,n,r,i,o){return e((function(){const e=t+i-1,s=Math.max(0-i,e),a=Math.min(e+n-1,o.length);s>a?r([]):$.isArray(o)&&r(o.slice(s,a+1))}),100,!0)}}}angular.module("graphdb.framework.graphexplore.services.uiscroll",[]).factory("UiScrollService",n),n.$inject=["$timeout"]},162:function(e,t){angular.module("graphdb.framework.graphexplore.services.rdfsdetails",[]).factory("RdfsLabelCommentService",(function(){return{processAndFilterLabelAndComment:function(e){function t(e){const t={};for(let n in e)if(e.hasOwnProperty(n)){let r=n;n.indexOf(":")>-1&&(r=n,n=n.split(":")[1].toLowerCase()),t[n]=e[r]}return t}const n=e.results.bindings,r=[],i=[];_.each(n,(function(e){let n;angular.isUndefined(e.label)||(n=t(e.label),r.push(n)),angular.isUndefined(e.comment)||(n=t(e.comment),i.push(n))}));const o=function(e){return"en"===e.lang||"de"===e.lang},s=$.grep(r,o)[0],a=$.grep(i,o)[0],l=angular.isUndefined(s)?r.length>0?r[0].value:void 0:s.value,u=angular.isUndefined(a)?i.length>0?i[0].value:void 0:a.value;return{rdfsLabel:l,rdfsComment:u}}}}))},163:function(e,t){angular.module("graphdb.framework.rest.graphexplore.savedgraphs.service",[]).factory("SavedGraphsRestService",n),n.$inject=["$http"];function n(e){return{getSavedGraphs:function(){return e.get("rest/explore-graph/saved")},getSavedGraph:function(t){return e.get("rest/explore-graph/saved/"+encodeURIComponent(t))},editSavedGraph:function(t){return e.put("rest/explore-graph/saved/"+encodeURIComponent(t.id),t)},deleteSavedGraph:function(t){return e.delete("rest/explore-graph/saved/"+encodeURIComponent(t.id))},addNewSavedGraph:function(t){return e.post("rest/explore-graph/saved",t)}}}},164:function(e,t,n){"use strict";n.r(t);var r=n(105);angular.module("graphdb.framework.rest.graphconfig.service",[]).factory("GraphConfigRestService",i);function i(e){return{getGraphConfigs:function(){return e.get("rest/explore-graph/config")},getGraphConfigSamples:function(){return e.get("rest/explore-graph/samples")},loadGraphForConfig:function(t,n,r,i){return e.get(`rest/explore-graph/config/graph/${encodeURIComponent(t.id)}?includeInferred=${n}&linksLimit=${r}&sameAsState=${i}`)},getConfig:function(t){return e.get("rest/explore-graph/config/"+encodeURIComponent(t)).then(e=>Object(r.mapGraphsConfigResponseToModel)(e.data))},createGraphConfig:function(t){return e.post("rest/explore-graph/config",t)},updateGraphConfig:function(t){return console.log("rest update",t),e.put("rest/explore-graph/config/"+encodeURIComponent(t.id),t)},deleteGraphConfig:function(t){return e.delete("rest/explore-graph/config/"+encodeURIComponent(t.id))},validateQuery:function(t,n,r,i,o){return e({method:"POST",url:"rest/explore-graph/validate",data:{query:t,queryType:n,params:r,all:i,oneOf:o}})}}}i.$inject=["$http"]},165:function(e,t,n){"use strict";n.r(t);n(10);function r(e,t,n,r,i,o,s,a,l,u,c,p,d,f,h,g,m){e.classHierarchyData={},e.instancesObj={},e.instancesQueryObj={},e.instancesObj.items=[],e.instancesNotFiltered=[],e.isWarningShowed=!1,e.onopen=e.onclose=()=>angular.noop(),e.currentBrowserLimit=2e3,d.firefox?e.currentBrowserLimit=50:(d.safari||d.msie||d.msedge)&&(e.currentBrowserLimit=400);const v={};let y=0,x=0;t.key="",v.get=function(t,n,r){return l.initLazyList(t,n,r,y,e.instancesObj.items)};let E=allGraphs;const b=function(){if(e.getActiveRepository())return g.resolveGraphs(r.getActiveRepository()).success((function(t){e.graphsInRepo=t.results.bindings.length>1002?t.results.bindings.slice(0,1002):t.results.bindings,C()})).error((function(t){e.repositoryError=getError(t),s.error(getError(t),m.instant("graphexplore.error.getting.graphs"))}))},C=function(){const t=f.get("classHierarchy-selectedGraph-"+r.getActiveRepository());null!==t&&e.graphsInRepo.some(e=>e.contextID.uri===t.contextID.uri)?E=t:f.set("classHierarchy-selectedGraph-"+r.getActiveRepository(),E)};function T(t,n,r){e.classCountSlider.options&&e.classCountSlider.options.ceil!==n&&(e.classCountSlider={});var i;e.classCountSlider.value||(e.showExternalElements=!0,e.classCountSlider={value:n,options:{floor:1,ceil:n,vertical:!0,showSelectionBar:!0,onChange:function(){c(S,100,!0)}}},null===f.get(h.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE)&&n>e.currentBrowserLimit&&(i=e.currentBrowserLimit,d.chrome?s.warning(m.instant("graphexplore.disabling.animations",{classLimit:i}),m.instant("graphexplore.reducing.visual.effects")):s.warning(m.instant("graphexplore.browser.performance",{browser:d.name,classLimit:i}),m.instant("graphexplore.reducing.visual.effects"))));const o=f.get(h.CLASS_HIERARCHY_SWITCH_PREFIXES);null!=o&&"true"!==o&&(e.showExternalElements=!0),r?e.classCountSlider.value=r:n>=1500&&(e.classCountSlider.value=1500,s.warning(m.instant("graphexplore.class.count.slider",{count:1500}),m.instant("graphexplore.reducing.class.count"))),n>=25&&!window.ActiveXObject&&"ActiveXObject"in window&&!e.isWarningShowed&&(e.classCountSlider.value=25,e.isWarningShowed=!0,s.warning(m.instant("graphexplore.class.count.browser",{count:25}),m.instant("graphexplore.reducing.class.count"))),c((function(){e.$broadcast("reCalcViewDimensions")}),200),S();let a=0;$("rzslider").on("wheel",(function(t){t.preventDefault(),t.stopPropagation();const n=(new Date).getTime();if(!(n-a>100))return;a=n,t=t.originalEvent;let r=e.classCountSlider.value;t.deltaY<=-1?r+=1:t.deltaY>=1&&(r-=1),r!==e.classCountSlider.value&&r>=e.classCountSlider.options.floor&&r<=e.classCountSlider.options.ceil&&e.$apply((function(){e.classCountSlider.value=r,c(S,100,!0)}))}))}function S(){e.currentSliderValue=e.classCountSlider.value}function w(e){const t=e.data.fullName,r=e.data.name;a.checkDomainRangeData(t).success((function(e,i){204===i?s.warning(m.instant("graphexplore.no.domain.range",{name:r})):(f.set(h.CLASS_HIERARCHY_LAST_SELECTED_CLASS,n.hash()),n.hash("").path("domain-range-graph").search("uri",t).search("name",r))})).error((function(){s.error(m.instant("graphexplore.error.request.failed",{name:r}))}))}function N(){n.replace().hash("1"),e.instancesObj.items=[],e.showExternalElements=!1,e.showClassInfoPanel=!1,f.clearClassHieararchyState(),e.hidePrefixes="true"===f.get(h.CLASS_HIERARCHY_HIDE_PREFIXES),e.currentSliderValue=void 0,e.classHierarchyData={},t.$broadcast("angucomplete-alt:clearInput")}function L(){e.hasClassHierarchy()&&c((function(){$("#toolbar").removeClass("ng-hide")}),0)}t.$watch((function(){return t.key}),(function(){y=0,_.each(e.instancesObj.items,(function(e){t.key>e&&y++})),x++})),v.revision=function(){return x},e.adapterContainer={adapter:{remain:!0}},e.$on("goToDomainRangeGraphView",(function(e,t){w(t)})),e.$on("classCount",T),e.$on("repositoryIsSet",(function(){if(!i.isLicenseValid())return;if(I===r.getActiveRepository())return;I=r.getActiveRepository();if(e.repositoryError=null,!I)return;E=allGraphs,b().then(A)})),e.datasource=v,e.goToDomainRangeGraphView=w,e.toggleClassInfoSidePanel=function(){e.showClassInfoPanel=!e.showClassInfoPanel,t.$broadcast("sidePanelClosed")},e.getActiveRepositoryNoError=function(){if(!e.repositoryError)return r.getActiveRepository()},e.isSystemRepository=function(){return r.isSystemRepository()},e.confirmReloadClassHierarchy=function(){p.openSimpleModal({title:m.instant("confirm.operation"),message:m.instant("graphexplore.calculating.hierarchy"),warning:!0}).result.then((function(){N(),e.loader=!0,e.hierarchyError=!1,a.reloadClassHierarchy(E.contextID.uri).success((function(t){e.loader=!1,e.classHierarchyData=t,L(),T()})).error((function(t){e.loader=!1,e.hierarchyError=getError(t),s.error(getError(t),m.instant("graphexplore.error.rdf.class.request"))}))}))},e.focusOnRoot=function(){e.$broadcast("rootFocus")},e.copyToClipboard=function(e){p.openCopyToClipboardModal(e)},e.searchedClassCallback=function(e){if(e){const n={name:e.title};t.$broadcast("searchedClass",n)}},e.instancesQueryObj.query="",e.instancesFilterFunc=function(t){return t.resolvedUri.toLowerCase().indexOf(e.instancesQueryObj.query.toLowerCase())>=0},b(),e.$watch("instancesObj.items",(function(){e.instancesObj.items.length>0&&c((function(){e.adapterContainer.adapter.reload()}),30)})),e.$watch("selectedClass",(function(){e.showClassInfoPanel&&function(t){const n=t.data.fullName;let r=t.data.name;if(r===n){const e=r.lastIndexOf("#");r=r.substring(e+1)}e.encodedUri=encodeURIComponent(n);const i=encodeURIComponent("prefix onto:<http://www.ontotext.com/>\nselect ?s {\n ?s a <"+n+"> .\n}");e.viewInstancesUri="sparql?name="+r+"&infer=true&sameAs=false&query="+i+"&execute=true",a.getRdfsLabelAndComment(n).success((function(t){e.rdfsLabel=t.label,e.rdfsComment=t.comment,e.expanded=!1})).error((function(){s.error("Error getting rdfs:label and rdfs:comment")})),e.instancesQueryObj.query="",e.instancesLoader=!0,a.getClassInstances(n).success((function(t){e.instancesObj.items=[],_.each(t,(function(t,n){const r={};r.type=t.startsWith("<<")&&t.endsWith(">>")?"triple":"uri",r.absUri=encodeURIComponent(t),r.absUriNonEncoded=t,r.resolvedUri=n,e.instancesObj.items.push(r)})),e.instancesLoader=!1,e.instancesSearchPlaceholder=e.instancesObj.items.length<1e3?"Search class instances":"Search first 1000 class instances",e.instancesNotFiltered=e.instancesObj.items})).error((function(){s.error(m.instant("graphexplore.error.instances.request"))}))}(e.selectedClass)})),$(document).ready((function(){$(".prefix-toggle").click((function(){$(".tooltip").hide()}))}));let I=r.getActiveRepository();function A(){N(),!e.isSystemRepository()&&e.isLicenseValid()&&(e.hierarchyError=!1,e.loader=!0,a.getClassHierarchyData(E.contextID.uri).success((function(t,n){e.showExternalElements=!0,e.loader=!1,e.classHierarchyData=t,207===n&&s.warning(m.instant("graphexplore.update.diagram"),m.instant("graphexplore.repository.data.changed")),L()})).error((function(t){e.loader=!1,e.hierarchyError=getError(t),s.error(getError(t),m.instant("graphexplore.error.rdf.class.request"))})))}e.hasClassHierarchy=function(){return e.classHierarchyData.classCount&&e.getActiveRepositoryNoError()&&!e.isSystemRepository()},e.isLicenseValid=function(){return i.isLicenseValid()},e.chosenGraph=function(e){E=e,A(),f.set("classHierarchy-selectedGraph-"+r.getActiveRepository(),E)},e.getSelGraphValue=function(){return E.contextID.value},e.isAllGraphsSelected=function(){return"all.graphs.label"===e.getSelGraphValue()}}angular.module("graphdb.framework.graphexplore.controllers.class",["pageslide-directive","ngAnimate","ui.scroll.jqlite","ui.scroll","angucomplete-alt","rzSlider","toastr","graphdb.framework.utils.localstorageadapter"]).controller("RdfClassHierarchyCtlr",r),r.$inject=["$scope","$rootScope","$location","$repositories","$licenseService","$window","toastr","GraphDataRestService","UiScrollService","RdfsLabelCommentService","$timeout","ModalService","bowser","LocalStorageAdapter","LSKeys","RDF4JRepositoriesRestService","$translate"]},166:function(e,t,n){"use strict";n.r(t);n(10);function r(e,t,n,r,i,o,s,a,l,u,c,p,d){e.predicatesObj={},e.predicatesQueryObj={},e.predicatesObj.items=[],e.predicatesQueryObj.query="",e.predicatesListNotFiltered=[],e.predicatesSearchPlaceholder="Search predicates",e.onopen=e.onclose=()=>angular.noop();const f={};let h=0,g=0;n.key="",f.get=function(t,n,r){return u.initLazyList(t,n,r,h,e.predicatesObj.items)},n.$watch((function(){return n.key}),(function(){h=0,_.each(e.predicatesObj.items,(function(e){n.key>e&&h++})),g++})),f.revision=function(){return g},e.adapterContainer={adapter:{remain:!0}};const m=s.get(a.DOMAIN_RANGE_COLLAPSE_EDGES);function v(){const e=s.get(a.CLASS_HIERARCHY_LAST_SELECTED_CLASS);t.search("").hash(e).path("hierarchy")}e.collapseEdges=null===m||"true"===m,e.datasource=f,e.$on("reloadDomainRangeGraphView",(function(e,n){const r=n.objectPropClassUri,i=n.objectPropClassName;t.path("domain-range-graph").search("uri",r).search("name",i)})),e.$on("switchEdgeMode",(function(e,n){t.path("domain-range-graph").search("uri",n.uri).search("name",n.name).search("collapsed",n.collapsed)})),e.$on("repositoryIsSet",(function(){if(y===i.getActiveRepository())return;y=i.getActiveRepository();v()})),e.$on("changeCollapsedEdgesState",(function(t,n){e.collapseEdges=!n,s.set(a.DOMAIN_RANGE_COLLAPSE_EDGES,e.collapseEdges)})),e.goToClassHierarchyView=v,e.copyToClipboard=function(e){c.openCopyToClipboardModal(e)},e.toggleCollapseEdgesState=function(){e.collapseEdges=!e.collapseEdges,o.history.pushState({collapsed:e.collapseEdges},"domainRangePage",null)},e.predicatesListFilterFunc=function(t){return t.resolvedUri.toLowerCase().indexOf(e.predicatesQueryObj.query.toLowerCase())>=0},e.$watch("predicatesObj.items",(function(){e.predicatesObj.items>0&&r((function(){e.adapterContainer.adapter.reload()}),30)})),e.$watch("selectedPredicate",(function(){e.showPredicatesInfoPanel&&function(t){const n=t.target,r=t.source;e.encodedUri=encodeURIComponent(t.uri),e.sourceTargetObjectNodeUri=n.objectPropClassUri?n.objectPropClassUri:r.objectPropClassUri,e.encodedSourceTargetObjectNodeUri=encodeURIComponent(e.sourceTargetObjectNodeUri),e.sourceTargetObjectNodeName=n.objectPropClassName?n.objectPropClassName:r.objectPropClassName?r.objectPropClassName:"<i>Literal</i>",-1===e.sourceTargetObjectNodeName.indexOf("Literal")?l.getRdfsLabelAndComment(e.sourceTargetObjectNodeUri).success((function(t){e.rdfsLabel=t.label,e.rdfsComment=t.comment})).error((function(){p.error(d.instant("domain.range.error.get.label.comment"))})):(e.rdfsComment=void 0,e.rdfsLabel=void 0);e.predicatesObj.items=[],e.predicatesQueryObj.query="";const i=n.allEdges?n.allEdges:r.allEdges;_.each(i,(function(t){const n={};n.absUri=encodeURIComponent(t.uri),n.absUriNonEncoded=t.uri,n.resolvedUri=t.name,n.isImplicit=t.implicit,e.predicatesObj.items.push(n)})),e.predicatesListNotFiltered=e.predicatesObj.items}(e.selectedPredicate)})),$(document).ready((function(){$(".compact-mode-toggle").click((function(){$(".tooltip").hide()}))}));let y=i.getActiveRepository()}angular.module("graphdb.framework.graphexplore.controllers.domainrange",["ui.scroll.jqlite","ui.scroll","ngSanitize","graphdb.framework.utils.localstorageadapter"]).controller("DomainRangeGraphCtlr",r),r.$inject=["$scope","$location","$rootScope","$timeout","$repositories","$window","LocalStorageAdapter","LSKeys","GraphDataRestService","UiScrollService","ModalService","toastr","$translate"]},167:function(e,t,n){(function(e){const t="WAIT",n="NO_REPO",r="READY",i="IN_PROGRESS",o="ERROR",s={contextID:{type:"all",value:"all.graphs.label",uri:""}};function a(e){if(e<1e3)return e;const t=Math.floor(Math.log(e)/Math.log(1e3));let n=e/Math.pow(1e3,t);return n=n%1>1/Math.pow(1e3,t-1)?n.toFixed(2):n.toFixed(0),n+["K","M","G","T","P","H"][t-1]}function l(e,a,l,u,c,p,d,f,h,g,m){let v=null;e.status=l.getActiveRepository()?t:n;let y=s;const x=function(){g.resolveGraphs(l.getActiveRepository()).success((function(t){e.graphsInRepo=t.results.bindings.length>1002?t.results.bindings.slice(0,1002):t.results.bindings,E(),e.isSystemRepository()?"READY"!==e.status&&C():(e.status="WAIT",C(!0))})).error((function(t){e.repositoryError=getError(t),u.error(getError(t),m.instant("graphexplore.error.getting.graph"))}))},E=function(){const t=h.get("dependencies-selectedGraph-"+l.getActiveRepository());null!==t&&e.graphsInRepo.some(e=>e.contextID.uri===t.contextID.uri)?y=t:h.set("dependencies-selectedGraph-"+l.getActiveRepository(),y)},b=function(n){d3.select("#dependencies-chord").html(""),e.status=t,p.getRelationshipsData(n,e.direction,y.contextID.uri).success((function(t){e.dependenciesData={matrix:t.right,nodes:t.left,hasLinks:_.sum(_.map(t.right,(function(e){return _.sum(e)})))>0,direction:e.direction},e.status=r})).error((function(t){e.status=r,u.error(getError(t),m.instant("graphexplore.error.dependencies.count"))}))},C=function(n){(e.status!==r||n)&&(e.status=t,p.getRelationshipsStatus(y.contextID.uri).success((function(t){if(e.status=t,e.status===i){if(null!==v)return;v=c(C,2e3)}e.status===r&&(null!==v&&(c.cancel(v),v=null),p.getRelationshipsClasses(e.direction,y.contextID.uri).success((function(t,n){e.allClasses.items=_.filter(t,N),e.allNotFilteredClasses=t,e.selectedClasses=void 0,angular.isUndefined(e.selectedClasses)&&(e.selectedClasses=t.slice(0,10)),b(e.selectedClasses),207===n&&u.warning(m.instant("graphexplore.update.diagram"),m.instant("graphexplore.repository.data.changed"))}))),0===e.status.indexOf("ERROR;")&&(e.status=o,u.error(m.instant("graphexplore.error.dependencies.calc",{error:e.status.substring("ERROR;".length)})))})).error((function(t){e.status=o,u.error(getError(t),m.instant("graphexplore.error.dependencies.count.status"))})))};e.allClasses={},e.allClasses.items=[],e.allNotFilteredClasses=[],e.direction="all";const T={};let S=0,w=0;function N(t){return-1!==t.name.toLowerCase().indexOf(e.classQuery.query.toLowerCase())}a.key="",T.get=function(t,n,r){return d.initLazyList(t,n,r,S,e.allClasses.items)},a.$watch((function(){return a.key}),(function(){S=0,_.each(e.allClasses.items,(function(e){a.key>e&&S++})),w++})),T.revision=function(){return w},e.datasource=T,e.adapterContainer={adapter:{remain:!0}},e.classQuery={},e.classQuery.query="",e.classFilterFunc=N,e.$watch("allClasses.items",(function(){e.allClasses.items.length>0&&c((function(){e.adapterContainer.adapter.reload()}),30)})),e.$watch("direction",(function(){!l.getActiveRepository()||e.isSystemRepository()||l.isActiveRepoFedXType()||x()})),e.$on("$destroy",(function(){c.cancel(v)})),e.isLoading=function(){return e.status===i||e.status===t},e.confirmCalculateDependencies=function(){f.openSimpleModal({title:m.instant("confirm.operation"),message:m.instant("graphexplore.calculating.relationships"),warning:!0}).result.then((function(){e.calculateDependencies()}))},e.calculateDependencies=function(){e.status=t,e.selectedClasses=void 0,p.calculateRelationships(y.contextID.uri).success((function(t){0===t.indexOf("ERROR;")?u.error(m.instant("graphexplore.error.dependencies.calc",{error:e.status.substring("ERROR;".length)})):C()})).error((function(e){u.error(m.instant("graphexplore.error.could.not.force.count",{error:getError(e)}))}))},e.addClass=function(t){e.selectedClasses.push(t),b(e.selectedClasses)},e.removeClass=function(t){_.remove(e.selectedClasses,(function(e){return e.name===t.name})),b(e.selectedClasses)},e.showClass=function(t){e.classToShow=t},e.isClassByNameShown=function(t){return void 0!==_.find(e.selectedClasses,{name:t})},e.addClassByName=function(t){e.selectedClasses.push(_.find(e.allClasses.items,{name:t})),b(e.selectedClasses)},e.removeClassByName=function(t){_.remove(e.selectedClasses,(function(e){return e.name===t})),b(e.selectedClasses)},e.removeAllClasses=function(){e.selectedClasses=[],b(e.selectedClasses)},e.isSystemRepository=function(){return"SYSTEM"===l.getActiveRepository()};const L=e.$on("repositoryIsSet",(function(){e.classQuery={},e.classQuery.query="",e.repositoryError=null,y=s,l.getActiveRepository()&&!l.isActiveRepoFedXType()?x():e.status=n}));window.addEventListener("beforeunload",(function e(){L(),window.removeEventListener("beforeunload",e)})),e.selectGraph=function(e){y=e,C(!0),h.set("dependencies-selectedGraph-"+l.getActiveRepository(),y)},e.getSelectedGraphValue=function(){return y.contextID.value},e.isAllGraphsSelected=function(){return"all.graphs.label"===e.getSelectedGraphValue()}}Object.defineProperty(e,"allGraphs",{get:()=>s}),angular.module("graphdb.framework.graphexplore.controllers.dependencies",["ui.scroll.jqlite","ui.scroll","toastr","ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.utils.localstorageadapter"]).controller("DependenciesChordCtrl",l).config(["$uibTooltipProvider",function(e){e.options({appendToBody:!0})}]).filter("humanize",(function(){return a})),l.$inject=["$scope","$rootScope","$repositories","toastr","$timeout","GraphDataRestService","UiScrollService","ModalService","LocalStorageAdapter","RDF4JRepositoriesRestService","$translate"]}).call(this,n(11))},168:function(e,t,n){"use strict";n.r(t);n(7);var r=n(405),i=n(407),o=(n(10),n(106)),s=n(113);function a(e,t,n,a,l,u,c,p,d,f,h,g,m,v,y,x,E,b,C,T,S,w,N){e.languageChanged=!1,e.propertiesObj={},e.propertiesObj.items=[],e.propertiesQueryObj={},e.propertiesQueryObj.query="",e.propertiesSearchPlaceholder=w.instant("visual.search.instance.placeholder"),e.propertiesNotFiltered=[],e.searchVisible=!1,e.nodeSelected=!1,e.queryResultsMode=!1,e.embedded=f.search().embedded,e.openedNodeInfoPanel=void 0,e.invalidLimit=!1,e.INVALID_LINKS_MSG=w.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=w.instant("sidepanel.invalid.limit.links.tooltip"),e.datasource=void 0,e.adapterContainer={adapter:{remain:!0}},e.hasInitedRepository=!1,e.defaultSettings={linksLimit:20,includeInferred:!0,sameAsState:!0,languages:["en"],showLinksText:!0,preferredTypes:[],rejectedTypes:[],preferredPredicates:[],rejectedPredicates:["http://dbpedia.org/property/logo","http://dbpedia.org/property/hasPhotoCollection","http://dbpedia.org/property/website","http://dbpedia.org/property/homepage","http://dbpedia.org/ontology/thumbnail","http://xmlns.com/foaf/0.1/depiction","http://xmlns.com/foaf/0.1/homepage","http://xmlns.com/foaf/0.1/mbox","http://dbpedia.org/ontology/wikiPage*","http://dbpedia.org/property/wikiPage*","http://factforge.net/*"],preferredTypesOnly:!1,preferredPredicatesOnly:!1,includeSchema:!0},e.saveSettings=_.cloneDeep(e.defaultSettings),e.defaultGraphConfig={id:"default",name:"Easy graph",startMode:"search"},t.key="",e.onopen=e.onclose=()=>angular.noop(),e.goToHome=()=>{A(),f.url("graphs-visualizations")},e.shouldShowSettings=()=>e.configLoaded&&e.configLoaded.id===e.defaultGraphConfig.id,e.shouldDisableSameAs=()=>{const t=$("#sameAsCheck");return e.settings&&!e.settings.includeInferred&&t.prop("checked")&&(t.prop("checked",!1),e.settings.sameAsState=!1),e.settings&&!e.settings.includeInferred},e.propertiesFilterFunc=t=>t.key.toLowerCase().indexOf(e.propertiesQueryObj.query.toLowerCase())>=0,e.toggleMoreInfo=e=>{angular.element(e.currentTarget).parent().next().toggle(200),angular.element(e.currentTarget).children("span").toggleClass("icon-caret-down").toggleClass("icon-caret-up")},e.copyToClipboard=e=>{m.openCopyToClipboardModal(e)},e.resetSettings=()=>{e.settings=_.cloneDeep(e.defaultSettings),e.validateLinksLimit(),D()},e.changeLimit=t=>{let n=e.settings.linksLimit+t;n<1&&(n=1),n>1e3&&(n=1e3),e.settings.linksLimit=n},e.validateLinksLimit=()=>{e.invalidLimit=!o.NUMBER_PATTERN.test(e.settings.linksLimit)},e.showSettings=()=>{e.showInfoPanel=!0,e.showFilter=!0,e.showNodeInfo=!1,e.showPredicates=!1,e.saveSettings?e.settings=_.cloneDeep(e.saveSettings):e.settings=_.cloneDeep(e.defaultSettings),D()},e.updateSettings=()=>{e.invalidLimit?l.error(e.INVALID_LINKS_TOOLTIP,e.INVALID_LINKS_MSG):(e.saveSettings=e.settings,e.saveSettings.languages=_.map(e.saveSettings.languagesMap,(function(e){return e.text})),e.saveSettings.preferredTypes=_.map(e.saveSettings.preferredTypesMap,(function(e){return e.text})),e.saveSettings.rejectedTypes=_.map(e.saveSettings.rejectedTypesMap,(function(e){return e.text})),e.saveSettings.preferredPredicates=_.map(e.saveSettings.preferredPredicatesMap,(function(e){return e.text})),e.saveSettings.rejectedPredicates=_.map(e.saveSettings.rejectedPredicatesMap,(function(e){return e.text})),e.rootNodeIri?k(e.rootNodeIri):e.queryResultsMode&&f.search().query?M(f.search().query,f.search().sameAs,f.search().inference):"query"===e.configLoaded.startMode&&q(e.configLoaded),O(),e.showInfoPanel=!1,e.showFilter=!1,x.set(E.GRAPHS_VIZ,e.saveSettings))},e.getGraphConfigs=t=>{C.getGraphConfigs().success((function(n){e.graphConfigs=n,t&&t()})).error((function(e){l.error(getError(e),w.instant("graphexplore.error.graph.configs.short.msg"))}))},e.findConfigById=function(t){return t===e.defaultGraphConfig.id?e.defaultGraphConfig:$.grep(e.graphConfigs,(function(e){return e.id===t}))[0]},e.easyGraphSearch=t=>{e.configLoaded=e.defaultGraphConfig,e.openUri(t)},e.deleteConfig=t=>{m.openSimpleModal({title:w.instant("common.confirm"),message:w.instant("graphexplore.delete.graph",{configName:t.name}),warning:!0}).result.then((function(){C.deleteGraphConfig(t).success((function(){e.getGraphConfigs(),e.refreshSavedGraphs()})).error((function(e){l.error(getError(e),w.instant("graphexplore.error.cannot.delete.config"))}))}))},e.goToGraphConfig=e=>{I({config:e.id},{config:e}),A(),q(e)},e.replaceIRIWithPrefix=t=>{const n=e.namespaces,r=_.findLast(n,(function(e){return 0===t.indexOf(e.uri)}));return r?r.prefix+":"+t.substring(r.uri.length):t};const L=[];t.$on("$translateChangeSuccess",(function(){e.INVALID_LINKS_MSG=w.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=w.instant("sidepanel.invalid.limit.links.tooltip"),e.propertiesSearchPlaceholder=w.instant("visual.search.instance.placeholder")})),e.$on("autocompleteStatus",(function(){le()})),e.$on("repositoryIsSet",(function(t,n){n.newRepo&&(e.hasInitedRepository=!1),ae(n.newRepo),n.newRepo&&(A(),$(".graph-visualization svg").empty(),f.search().query&&(e.goToHome(),P()))}));L.push(t.$watch(()=>t.key,()=>{W=0,_.each(e.propertiesObj.items,(function(e){t.key>e&&W++})),z++}));L.push(e.$watch("propertiesObj.items",()=>{angular.isDefined(e.propertiesObj.items)&&e.propertiesObj.items.length>0&&u((function(){e.adapterContainer.adapter.reload()}),500)}));e.$on("$destroy",()=>{L.forEach(e=>e())});const I=(t,n)=>{e.embedded&&(t.embedded=!0),f.search(t),f.state(n)},A=()=>{e.searchVisible=!1,e.nodeSelected=!1,e.configLoaded=null,e.queryResultsMode=!1,e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=!1,e.numberOfPinnedNodes=0,Q={},X=0},R=()=>N.isActive()?e.defaultSettings:e.saveSettings,O=()=>{R().showLinksText?d3.selectAll("svg .link-wrapper text").style("display","block"):d3.selectAll("svg .link-wrapper text").style("display","none")},D=()=>{e.settings.languagesMap=_.map(e.settings.languages,(function(e){return{text:e}})),e.settings.preferredTypesMap=_.map(e.settings.preferredTypes,(function(e){return{text:e}})),e.settings.rejectedTypesMap=_.map(e.settings.rejectedTypes,(function(e){return{text:e}})),e.settings.preferredPredicatesMap=_.map(e.settings.preferredPredicates,(function(e){return{text:e}})),e.settings.rejectedPredicatesMap=_.map(e.settings.rejectedPredicates,(function(e){return{text:e}}))},k=()=>{e.rootNodeIri&&e.$broadcast("onRootNodeChange",e.rootNodeIri)},P=()=>{f.search().query?(e.searchVisible=!1,e.queryResultsMode=!0,M(f.search().query,f.search().sameAs,f.search().inference)):e.$on("onRootNodeChange",(function(t,n){e.loading=!0;const r=R();angular.isDefined(n)&&(e.rootNodeIri=n,T.getInstanceNode({iri:n,config:e.configLoaded?e.configLoaded.id:e.defaultGraphConfig.id,languages:e.shouldShowSettings()?r.languages:[],includeInferred:r.includeInferred,sameAsState:r.sameAsState}).then((function(t){e.nodeSelected=!0,e.searchVisible=!1,null===t.data.types&&(t.data.types="greyColor"),se=new oe;const n=se.addNode(t.data,te/2,ne/2);ee=Z,we(n,!0)})).catch((function(t){e.loading=!1,l.error(getError(t),w.instant("graphexplore.error.could.not.load.graph"))})))})),f.search().uri&&e.openUri(f.search().uri,!0),f.search().saved&&b.getSavedGraph(f.search().saved).success((function(t){e.loadSavedGraph(t)})).error((function(e){const t=getError(e);l.error(t,w.instant("graphexplore.error.could.not.open"))}))},M=(t,n,r)=>{const i=R(),o=void 0===n?i.sameAsState:!0===n,s=void 0===r?i.includeInferred:!0===r;e.loading=!0,T.updateGraph({query:t,linksLimit:i.linksLimit,languages:e.shouldShowSettings()?i.languages:[],includeInferred:s,sameAsState:o}).then((function(e){Te(e)}),(function(t){e.loading=!1,l.error(getError(t.data),w.instant("graphexplore.error.cannot.load.graph"))}))},F=(e,t)=>{const n=e.split(" ");return t?[n[0],n[1],n[2]].join(">"):[n[0],n[2]].join(">")},j=e=>[e.source.iri,e.target.iri].join(">"),U=e=>{if(e.isTriple){const t=document.getElementById(Object(s.removeSpecialChars)(F(e.iri)));if(t&&void 0!==t.__data__.x)return t.__data__.x}return e.x},G=e=>{if(e.isTriple){const t=document.getElementById(Object(s.removeSpecialChars)(F(e.iri)));if(t&&void 0!==t.__data__.y)return t.__data__.y}return e.y},B=e=>{const t=e.trim().split(" ");return`<<<${t[0]}> <${t[1]}> <${t[2]}>>>`},H=e=>{const t=e.source.isTriple?F(e.source.iri,!0):e.source.iri,n=e.target.isTriple?F(e.target.iri,!0):e.target.iri;return Object(s.removeSpecialChars)(`${t}>${n}>marker`)},q=t=>{e.configLoaded=t,"search"===t.startMode?e.searchVisible=!0:"node"===t.startMode&&t.startIRI?u((function(){e.openUri(t.startIRI,!0)}),0):"query"===t.startMode&&t.startGraphQuery&&(e.loading=!0,C.loadGraphForConfig(t,t.startQueryIncludeInferred,R().linksLimit,t.startQuerySameAs).then((function(e){Te(e)}),(function(t){e.loading=!1,l.error(getError(t),w.instant("graphexplore.error.graph.load"))})))},V=function(){var t,n;f.search().config?(t=f.search().config,n=P,t===e.defaultGraphConfig.id?q(e.defaultGraphConfig):C.getConfig(t).then(e=>{q(e),n()}).catch(e=>{l.error(getError(e),w.instant("graphexplore.error.could.not.load.config",{configId:t}))})):f.search().query||f.search().uri?(q(e.defaultGraphConfig),P()):P()};y.onpopstate=function(t){A(),t.state&&(t.state.config?(q(t.state.config),t.state.uri&&e.openUri(t.state.uri,!0)):t.state.savedGraph&&e.loadSavedGraph(t.state.savedGraph,!0))},e.embedded&&(f.search().query||f.search().uri||f.search().config||f.search().saved)&&(e.noGoHome=!0);let W=0,z=0,Q={},X=0;const Y=16,K=d3.zoom().scaleExtent([.5,10]);let J;const Z=d3.zoomIdentity.translate(0,-70).scale(1);K.on("zoom",(function(e){N.isActive()||(ee=e.transform,J.attr("transform",ee))}));let ee=Z;const te=1e3,ne=1e3;let re,ie;function oe(){this.nodes=[],this.links=[],this.tripleNodes=new Map,this.tripleLinksCopy=new Map,this.addNode=function(e,t,n){return e.x=t,e.y=n,this.nodes.push(e),e},this.computeConnectedness=function(){const e={},t={};_.each(this.links,(function(n){const r=n.source.iri,i=n.target.iri,o=_.min([r,i])+"|"+_.max([r,i]);t[o]||(t[o]=1,e[r]=(e[r]||0)+1,e[i]=(e[i]||0)+1)})),_.each(this.links,(function(t){e[t.source.iri]>1&&e[t.target.iri]>1?t.connectedness=Math.min(5,Math.max(e[t.source.iri],e[t.target.iri])-1):t.connectedness=0}))},this.addAndMatchLinks=function(e){const t=this.nodes;Array.prototype.push.apply(this.links,function(e,t){return _.map(e,(function(e){let n,r;n=e.isTripleSource?_e(e.source):_.find(t,(function(t){return t.iri===e.source})),r=e.isTripleTarget?_e(e.target):_.find(t,(function(t){return t.iri===e.target}));let i={source:n,target:r,predicates:e.predicates};if(e.isTripleSource||e.isTripleTarget){let e=`${i.source.isTriple?F(i.source.iri):i.source.iri}>${i.target.isTriple?F(i.target.iri):i.target.iri}`;if(se.tripleLinksCopy.has(e)){let t=se.tripleLinksCopy.get(e);return t[0].predicates.push(...i.predicates),t.push(i),se.tripleLinksCopy.set(e,t),null}se.tripleLinksCopy.set(e,[i])}return i}))}(e,t));for(let e of se.tripleLinksCopy.keys())1===se.tripleLinksCopy.get(e).length&&se.tripleLinksCopy.delete(e);this.links=this.links.filter(e=>null!==e),this.computeConnectedness()};const t=function(e,t){return n(e,t).length};function n(e,t){return _.filter(t,(function(t){return t.source.iri===e.iri||t.target.iri===e.iri}))}this.countLinks=t,this.linksTypes=function(e,t){const r=n(e,t),i=_.map(r,(function(t){return t.source.iri===e.iri?t.target.types:t.source.types}));return _.uniq(_.flatten(i))},this.linksPredicates=function(e,t){const r=n(e,t),i=_.map(r,(function(e){return e.predicates}));return _.uniq(_.flatten(i))},this.removeTriples=function(e){let t=[];this.tripleNodes.size>0&&e.forEach(e=>{this.tripleNodes.has(e)&&(this.tripleNodes.delete(e),this.links=_.reject(this.links,(function(n){let r=e.split(">"),i=F(n.source.iri),o=F(n.target.iri);if(i===e&&se.tripleNodes.delete(o)){let e=o.split(">");t.push({source:e[0],target:e[1]})}let s=i===e||o===e||n.source.iri===r[0]&&n.target.iri===r[1];return s&&(se.tripleLinksCopy.delete(`${i}>${o}`),se.tripleLinksCopy.delete(`${o}>${i}`)),s})))}),t.forEach(e=>{this.links=_.reject(this.links,(function(t){return t.source.iri===e.source&&t.target.iri===e.target}))})},this.removeNode=function(n){let r=[];this.links=_.reject(this.links,(function(e){let t=e.source.iri===n.iri||e.target.iri===n.iri;return t&&(e.target.isTriple&&r.push(F(e.target.iri)),e.source.isTriple||e.target.isTriple||r.push([e.source.iri,e.target.iri].join(">"))),t})),this.removeTriples(r);const i=this.links;this.nodes=_.reject(this.nodes,(function(e){return 0===t(e,i)})),0===this.nodes.length&&(e.nodeSelected=!1),this.computeConnectedness()},this.removeNodeLeafLinks=function(e){let r=[],i=this.links;this.links=_.reject(this.links,(function(o){let s=o.source.iri===e.iri&&1===t(o.target,i)&&!o.target.isTriple||o.target.iri===e.iri&&1===t(o.source,i)&&!o.source.isTriple;if(!s){let r;if(o.source.iri!==e.iri||2!==t(o.target,i)||o.target.isTriple?o.target.iri!==e.iri||2!==t(o.source,i)||o.source.isTriple||(r=n(o.source,i)):r=n(o.target,i),!r)return!1;s=(r[0].source.iri===e.iri||r[0].target.iri)&&(r[1].source.iri===e.iri||r[1].target.iri)}return s&&(o.target.isTriple&&r.push(F(o.target.iri)),o.source.isTriple||o.target.isTriple||r.push([o.source.iri,o.target.iri].join(">"))),s})),this.removeTriples(r),i=this.links,this.nodes=_.reject(this.nodes,(function(n){return 0===t(n,i)&&n.iri!==e.iri})),this.computeConnectedness()},this.addTriple=function(e,t,n){e.x=t,e.y=n,e.weight=0;let r=F(e.iri);if(this.tripleNodes.has(r)){let t=this.tripleNodes.get(r);t.push(e),this.tripleNodes.set(r,t)}else e.weight=10,this.tripleNodes.set(r,[e])},this.copyState=function(){const e=_.map(this.nodes,(function(e){return{iri:e.iri,isTriple:e.isTriple,size:e.size,labels:_.cloneDeep(e.labels),types:_.cloneDeep(e.types),rdfRank:e.rdfRank,x:e.x,y:e.y,fixed:e.fixed}})),t=JSON.stringify(Array.from(this.tripleNodes.entries())),n=JSON.stringify(Array.from(this.tripleLinksCopy.entries()));return{nodes:e,links:_.map(this.links,(function(e){return{source:e.source.iri,isTripleSource:e.source.isTriple,target:e.target.iri,isTripleTarget:e.target.isTriple,predicates:e.predicates}})),tripleNodes:t,tripleLinksCopy:n,colorIndex:X,type2color:Q,transform:ee}},this.restoreState=function(t){e.nodeSelected=!0,e.searchVisible=!1,this.nodes=_.cloneDeep(t.nodes),this.tripleNodes=t.tripleNodes?new Map(JSON.parse(t.tripleNodes)):new Map,this.links=[],this.addAndMatchLinks(t.links),this.tripleLinksCopy=t.tripleLinksCopy?new Map(JSON.parse(t.tripleLinksCopy)):new Map,_.each(this.nodes,(function(t){t.fixed&&e.numberOfPinnedNodes++})),angular.isDefined(t.colorIndex)&&angular.isDefined(t.type2color)&&(X=t.colorIndex,Q=_.cloneDeep(t.type2color)),angular.isDefined(t.transform)&&(ee=d3.zoomIdentity.translate(t.transform.x,t.transform.y).scale(t.transform.k)),ye()}}e.datasource={get:function(t,n,r){return g.initLazyList(t,n,r,W,e.propertiesObj.items)},revision:function(){return z}},d.when(h.getPrincipal()).then(t=>(t=>{const n=t.appSettings;e.defaultSettings.includeInferred=n.DEFAULT_INFERENCE,e.defaultSettings.sameAsState=n.DEFAULT_INFERENCE&&n.DEFAULT_SAMEAS,e.defaultSettings.includeSchema=n.DEFAULT_VIS_GRAPH_SCHEMA;const r=x.get(E.GRAPHS_VIZ);if(r&&"object"==typeof r)try{e.saveSettings=r,void 0===e.saveSettings.includeSchema&&(e.saveSettings.includeSchema=e.defaultSettings.includeSchema,e.saveSettings.rejectedPredicates=[...e.saveSettings.rejectedPredicates,...e.defaultSettings.rejectedPredicates].unique())}catch(t){e.saveSettings=_.cloneDeep(e.defaultSettings),x.set(E.GRAPHS_VIZ,e.saveSettings)}else e.saveSettings=_.cloneDeep(e.defaultSettings)})(t)),e.showInfoPanel=!1;let se=new oe;function ae(t){!n.getActiveRepository()||e.hasInitedRepository&&!t||(e.hasInitedRepository=!0,t||e.getGraphConfigs(V),e.getNamespacesPromise=S.getNamespaces(e.getActiveRepository()).success((function(t){const n=_.map(t.results.bindings,(function(e){return{uri:e.namespace.value,prefix:e.prefix.value}}));e.namespaces=_.sortBy(n,(function(e){return e.uri.length})),le()})).error((function(e){l.error(getError(e),w.instant("graphexplore.error.view.will.not.work"))})))}function le(){a.isLicenseValid()&&(e.getAutocompletePromise=p.checkAutocompleteStatus())}e.addedTag=function(t){return t.text.indexOf(":")<0?(l.warning(w.instant("graphexplore.absolute.prefixed.iri")),null):(t.text=function(e,t){if(!/^<?(http|urn).*>?/.test(e)){const n=e.split(":"),r=n[0],i=n[1];if(!angular.isUndefined(i)){const e=c.getNamespaceUriForPrefix(t,r);if(e)return e+i}}return e}(t.text,e.namespaces),e.pageslideExpanded=!0,t)},e.validateTag=function(e,t,n){if(e.text.indexOf(":")<0)return n?l.warning(w.instant("graphexplore.absolute.prefixed.iri.option"),t):l.warning(w.instant("graphexplore.absolute.prefixed.iri"),t),!1;const r=e.text.indexOf("*");if(r>=0){if(!n)return l.warning(w.instant("graphexplore.wildcards.not.allowed"),t),!1;if(r<e.text.length-1)return l.warning(w.instant("graphexplore.wildcards.last.char"),t),!1}return!0},e.getTagClass=function(e){return e.endsWith("*")?"tag-item-wildcard":null},e.getActiveRepository=function(){return n.getActiveRepository()},e.isLicenseValid=function(){return a.isLicenseValid()},ae();const ue=d3.scaleLinear().domain([0,9]).range(["hsl(0, 100%, 75%)","hsl(360, 90%, 82%)"]).interpolate(d3.interpolateHslLong),ce=d3.scaleLinear().domain([0,9]).range(["hsl(180, 50%, 75%)","hsl(540, 40%, 82%)"]).interpolate(d3.interpolateHslLong);e.getColor=function(e){angular.isUndefined(Q[e])&&(Q[e]=X,X++);const t=Q[e];return t>39?"#c2c2c2":t%2==0?ue(t/2):ce(t/2)};const pe=d3.forceX(te/2).strength(.005),de=d3.forceY(ne/2).strength(.005),fe=d3.forceSimulation().force("x",pe).force("y",de),he=d3.select(".main-container .graph-visualization").append("svg").attr("viewBox","0 0 "+te+" "+ne).attr("preserveAspectRatio","xMidYMid meet");he.append("rect").attr("width",10*te).attr("height",10*ne).attr("x",-(10*te-te)/2).attr("y",-(10*ne-ne)/2).style("fill","none").style("pointer-events","all").call(K).on("click",(function(e){e.stopPropagation(),Ne(),fe.stop()}));let ge=0,me=0;const ve=new function(){this.state=!1,this.setLoadingState=function(e){this.state=e},this.getLoadingState=function(){return this.state},this.init=function(e,t){d3.select(t).append("circle").attr("cx",(function(){return e.x})).attr("cy",(function(){return e.y})).attr("class","loader-container").attr("r",(function(){return e.size})).style("fill","fff").style("opacity","0.7"),d3.select(t).append("image").attr("xlink:href","js/angular/templates/loader/ot-loader.svg?v=2.6.0-TR4").attr("x",(function(){return e.x-e.size+5})).attr("y",(function(){return e.y-e.size})).attr("width",(function(){return 2*e.size})).attr("height",(function(){return 2*e.size})).attr("class","node-loader")}};function ye(t){d3.selectAll("svg g").remove(),d3.selectAll(".d3-tip").remove(),d3.selectAll(".menu-events").remove(),J=he.append("g").attr("class","nodes-container").attr("transform",(function(){return angular.isDefined(ee)&&!t?ee:""}));const n=Object(i.a)().attr("class","d3-tip").customPosition((function(){const e=re.getBoundingClientRect();return{top:e.bottom+10+"px",left:e.left-30+"px"}})).html((function(t){let n="";return t.fixed&&(n+='<i class="icon-pin"></i> '),t.types.length>0?n+=_.join(_.map(t.types,(function(t){return e.replaceIRIWithPrefix(t)}))," · "):n+="<i>No types</i>",n})),o=function(e){let t="";return t+=_.join(_.map(e.predicates,(function(t,n){if(0===n)return De(t);if(n<10)return" · "+De(t);if(10===n){const t=function(e){return e.predicates.length-10}(e),n=t>1?t+" predicates":t+" predicate";return" · "+w.instant("graphexplore.tip.text",{textToShow:n})}})),""),t};let a;const c=Object(i.a)().attr("class","d3-tip").customPosition((function(e){const t=a.getBoundingClientRect(),n=function(e){const t=o(e),n=document.createElement("canvas").getContext("2d");return n.font="13px Arial",e.predicates.length<10?n.measureText(t).width:n.measureText(t).width/2}(e);return{top:t.top-30+"px",left:t.left-30+"px",width:n+"px"}})).html((function(e){return o(e)}));const p=function(){u.cancel(void 0),u.cancel(ge),re=null,n.hide(),me=u((function(){Ne()}),500)};he.call(n);he.call(c);let d=he.selectAll(".link"),f=he.selectAll(".node");const h=d3.forceCollide(e=>e.size+5).strength(.5),g=d3.forceManyBody().strength(-300),m=d3.forceCenter(te/2,ne/2);fe.nodes(se.nodes).force("charge",g).force("collide",h).force("center",m).force("link",d3.forceLink(se.links).distance((function(e){return e.source.isTriple||e.target.isTriple?0:function(e){const t=$("<span></span>"),n=e.predicates[0].split("/"),r=n[n.length-1];t.addClass("predicate-text").text(r),$("body").append(t);const i=t.width()+2*e.source.size+2*e.target.size+50;return t.remove(),.75*i}(e)+30*e.connectedness}))),J.append("defs").selectAll("marker").data(se.links).enter().append("marker").attr("class","arrow-marker").attr("id",(function(e){return H(e)})).attr("viewBox","0 -5 10 10").attr("refX",(function(e){return e.target.isTriple?11:e.target.size+11})).attr("refY",0).attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M0,-5L10,0L0,5 L10,0 L0, -5"),d=J.selectAll(".link").data(se.links).enter().append("g").attr("class","link-wrapper").attr("id",(function(e){return Object(s.removeSpecialChars)(j(e))})).append("line").attr("class","link").style("stroke-width",1).style("fill","transparent").style("marker-end",(function(e){return`url(#${H(e)})`}));const v=J.selectAll(".link-wrapper").append("text").text((function(e){return Oe(e)})).attr("class",(function(e){return e.predicates.length>1||se.tripleNodes.has(j(e))?"predicates":"predicate"})).attr("dy","-0.5em").style("text-anchor","middle").style("display",R().showLinksText?"":"none").on("mouseover",(function(e,t){e.stopPropagation(),function(e,t){u.cancel(void 0);const n=a=e.target;u((function(){a===n&&t.predicates.length>1&&c.show(t,a)}),300)}(e,t)})).on("mouseout",(function(){u.cancel(void 0),a=null,c.hide()})).on("click",(function(t,n){t.stopPropagation(),function(t,n){Re();const r=j(n);if(1===n.predicates.length&&se.tripleNodes.has(r)){ie=null;const e=se.tripleNodes.get(r)[0];if(be(e,this,t.button)){const t={};t.iri=e.iri,t.pred=De(e.iri.split(" ")[1]),Ie(t)}return}!function(t){if(e.showNodeInfo=!1,e.showPredicates=t.predicates.length>1,e.showFilter=!1,e.showInfoPanel=!1,ie===t)return e.showNodeInfo=!1,e.showInfoPanel=!1,void(ie=null);ie=t,e.showPredicates&&(e.predicates=_.map(t.predicates,(function(e){const n=function(e,t){const n=j(t);return se.tripleNodes.has(n)?se.tripleNodes.get(n).findIndex(t=>t.iri.indexOf(e)>=0):-1}(e,t),r=n>-1;return{value:De(e),partOfTriple:r,linkId:r?j(t):"",nodeIndex:n}})),e.showInfoPanel=!0)}(n)}(t,n)}));let y,x=0,E=null,b=null;const C=function(t,n,r){let i=r||this.parentNode;Array.isArray(r)&&(i=r[n]);se.countLinks(t,se.links)<=R().linksLimit?we(t,!1,i):l.info(w.instant("graphexplore.increase.limit"),w.instant("graphexplore.node.at.max")),e.closeInfoPanel()};function T(e,t){let n,r,i,o,s=!0;if("down"===t)n=2*e.size,r=e.size/3,i=.8,o=.3;else if("down-fixed"===t)n=2*e.size,r=e.size,i=.8,o=.66;else if("up"===t)n=e.size/3,r=2*e.size,i=.3,o=.8;else{if("fixed"!==t)return;n=e.size,i=.66,s=!1}let a=J.selectAll(".node-wrapper").filter((function(t){return t===e})).append("text").text("").classed("icon-any pinned",!0).style("font-size",n+"px").attr("x",(function(e){return e.x})).attr("y",(function(e){return e.y})).attr("opacity",i);"fixed"!==t&&"down-fixed"!==t||(e.pin=a),s&&(a=a.transition().duration(1e3).style("font-size",(function(){return r+"px"})).attr("opacity",o),"down-fixed"!==t&&a.remove())}const S=d3.drag().subject((function(e){return e})).on("start",(function(e,t){if(N.isActive())return;0===e.sourceEvent.button&&(t.fixedBeforeDrag=t.fixed,t.isBeingDragged=!0,t.beginDragging=!0,Ne(),d3.select(this).classed("dragging",!0),fe.alphaTarget(.3).restart())})).on("drag",(function(t,n){n.isBeingDragged&&(n.fx=t.x,n.fy=t.y,n.fixed?n.beginDragging&&T(n,"fixed"):(e.numberOfPinnedNodes++,n.fixed=!0,T(n,"down-fixed")),n.pinWasFixed=!0,n.beginDragging=null)})).on("end",(function(e,t){t.isBeingDragged&&(t.pinWasFixed&&(t.pinWasFixed=null,d3.select(".pinned").remove()),t.isBeingDragged=!1,d3.select(this).classed("dragging",!1));fe.alphaTarget(0)}));f=J.selectAll(".node").data(se.nodes).enter().append("g").attr("class","node-wrapper").attr("id",(function(e){return e.iri})).append("circle").attr("class","node").attr("r",(function(e){return e.size})).style("fill",(function(t){return"greyColor"===t.types?"c2c2c2":e.getColor(t.types[0])})).on("mouseover",(function(t,r){r.isBeingDragged||(u.cancel(me),ge=u(()=>{(function(t,n){if(e.showInfoPanel)return!1;(Ee.closeIcon||Ee.expandIcon||Ee.focusIcon||Ee.copyURIIcon)&&Ee.removeIcons();if(fe.alpha()<.1)return Ee.initIcons(t,n.parentNode),fe.stop(),xe(),!0;return!1})(r,this)&&function(e,t){u.cancel(void 0);const r=re=t.target;u((function(){re===r&&n.show(e,re)}),300)}(r,t)},400))})).on("mouseout",p).on("click",(function(t,n){if(t.button&&0!==t.button)return;const r=this;if(E&&b===r)return u.cancel(E),E=null,void C(n,0,r.parentNode);b=r,p(),e.showPredicates=!1,N.isActive()||(u.cancel(E),E=u((function(){be(n,r,t),E=null}),540))})).on("touchstart",(e,t)=>function(e){x=0,y=u((function(){x<5&&Ce(e),y=null}),1e3)}(t)).on("touchmove",(function(){x++})).on("touchend",(function(){u.cancel(y),y=null})).on("contextmenu",(function(t,r){t.shiftKey||(t.preventDefault(),Ne(),e.closeInfoPanel(),r.fixed?(e.numberOfPinnedNodes--,r.fixed=!1,r.fx=null,r.fy=null,T(r,"up"),fe.alpha(1).restart()):(e.numberOfPinnedNodes++,r.fixed=!0,T(r,"down")),function(e){re&&n.show(e,re)}(r))})).on("gdb-expand-node",(e,t)=>C(t,0,e.srcElement.parentNode)).on("gdb-show-node-info",(e,t)=>Le(t)).call(S);const L=J.selectAll(".node-wrapper").append("foreignObject").style("pointer-events","none").attr("width",(function(e){return 2*e.size*1.75}));J.insert("g").attr("class","menu-events"),(e=>{e.each((function(e){e.fontSize=r.a.Text.calcFontSizeRaw(e.labels[0].label,e.size,Y,!0)})).attr("height",(function(e){return 3*e.fontSize})).append("xhtml:div").attr("class","node-label-body").style("font-size",(function(e){return e.fontSize+"px"})).append("xhtml:div").text((function(e){return e.labels[0].label})),u((function(){$(".node-label-body div").each((function(e,t){let n=t.textContent.substring(0,t.textContent.length-1);let r=0;for(;r<200&&(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)n=n.substring(0,n.length-1),t.textContent=n+"…",r++}))}),50)})(L),fe.on("tick",(function(){d.attr("x1",(function(e){return U(e.source)})).attr("y1",(function(e){return G(e.source)})).attr("x2",(function(e){return U(e.target)})).attr("y2",(function(e){return G(e.target)})),v.attr("x",(function(e){let t=U(e.source),n=U(e.target);return e.x=.5*(t+n)})).attr("y",(function(e){let t=G(e.source),n=G(e.target);return e.y=.5*(t+n)})).attr("transform",(function(e){return"rotate("+function(e,t){const n={x:U(e.source),y:G(e.source)},r={x:U(e.target),y:G(e.target)};if(t)return 180*Math.atan2(r.y-n.y,r.x-n.x)/Math.PI;{const e=180*Math.atan2(r.y-n.y,r.x-n.x)/Math.PI;return e<=90&&e>=-90?e:(e>0?-1:1)*(180-Math.abs(e))}}(e,e.direction)+", "+e.x+", "+e.y+")"})),f.attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})),J.select(".node-loader").attr("x",(function(e){return e.x-e.size+3})).attr("y",(function(e){return e.y-e.size})),J.select(".loader-container").attr("cx",(function(e){return e.x})).attr("cy",(function(e){return e.y})),L.attr("x",(function(e){return e.x-1.75*e.size})).attr("y",(function(e){return e.y-3*e.fontSize/2})),d3.select(".pinned").attr("x",(function(e){return e.x})).attr("y",(function(e){return e.y})),xe()})),angular.isDefined(ve)&&ve.setLoadingState(!1),e.loading&&(e.loading=!1),d3.selectAll(".link-wrapper").each((function(){const e=$(this).attr("id").split(">")[0],t=$(this).attr("id").split(">")[1];d3.selectAll(".link").each((function(n){const r=Object(s.removeSpecialChars)(n.source.iri),i=Object(s.removeSpecialChars)(n.target.iri);if(r===t&&i===e){let e=r;e+=">",e+=i;const t=document.createTextNode(" ⟶");document.getElementById(e).lastChild.appendChild(t),n.direction="double"}}))})),d3.selectAll(".d3-actions-tip").remove(),fe.alpha(.3).restart()}function xe(){t.d3alpha=fe.alpha()}const Ee=new function(){function n(e,t){return"translate("+(t.x-14+(t.size+15)*Math.cos(e*Math.PI/180-Math.PI/2))+","+(t.y-14+(t.size+15)*Math.sin(e*Math.PI/180-Math.PI/2))+")"}this.closeIcon=void 0,this.expandIcon=void 0,this.collapseIcon=void 0,this.focusIcon=void 0,this.copyURIIcon=void 0,this.actionsTip=void 0,this.removeIcons=function(){this.closeIcon.remove("g"),this.expandIcon&&this.expandIcon.remove("g"),this.collapseIcon&&this.collapseIcon.remove("g"),this.focusIcon.remove("g"),this.copyURIIcon.remove("g"),this.closeIcon=void 0,this.expandIcon=void 0,this.collapseIcon=void 0,this.focusIcon=void 0,this.copyURIIcon=void 0,this.expandedState=!1},this.expandedState=!1,this.initIcons=function(r,o){const s=Object(i.a)().attr("class","d3-tip d3-actions-tip").customPosition((function(e,t){const n=t.target.getBoundingClientRect();return{top:n.top-20+"px",left:n.right+10+"px"}})).html((function(e){return e}));he.call(s);r.isExpanded?(this.collapseIcon=d3.select(".menu-events").append("g").attr("class","collapse-icon").attr("name","collapse").attr("transform",(function(){return n(20,r)})),this.collapseIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.collapseIcon.append("path").attr("d","M22.67,12a.59.59,0,0,1-.53.65l-6.88.72H15.2a.59.59,0,0,1-.59-.65l.72-6.88A.58.58,0,0,1,16,5.33a.59.59,0,0,1,.53.65L16,11.11,21.3,5.79a.64.64,0,0,1,.91.91L16.89,12,22,11.49A.59.59,0,0,1,22.67,12ZM12.59,14.75l-6.75.85a.59.59,0,0,0-.51.66.58.58,0,0,0,.66.51l4.95-.62-5.2,5.2a.64.64,0,1,0,.91.91l5.2-5.2L11.23,22a.59.59,0,0,0,.51.66h.07a.59.59,0,0,0,.59-.52l.85-6.75a.59.59,0,0,0-.17-.49A.58.58,0,0,0,12.59,14.75Z").style("fill","var(--primary-color)"),this.collapseIcon.on("click",(function(){var e;(e=r).isExpanded=!1,se.removeNodeLeafLinks(e),ye()})).on("mouseover",(function(e){s.show(this.getAttribute("name"),e),u.cancel(ge),u.cancel(me)})).on("mouseout",(function(){s.hide(),me=u((function(){Ne()}),500)}))):(this.expandIcon=d3.select(".menu-events").append("g").attr("class","expand-icon").attr("name","expand").attr("transform",(function(){return n(20,r)})),this.expandIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.expandIcon.append("path").attr("d","M22.37,6.28l-.72,6.88a.59.59,0,0,1-.59.53H21a.59.59,0,0,1-.53-.65L21,7.9l-5.32,5.32a.64.64,0,0,1-.91-.91L20.1,7,15,7.53a.59.59,0,0,1-.12-1.18l6.88-.72a.59.59,0,0,1,.65.65ZM12.89,20.34,7.95,21l5.2-5.2a.64.64,0,0,0-.91-.91L7,20.05l.62-4.95A.59.59,0,0,0,6.48,15l-.85,6.75a.59.59,0,0,0,.59.67h.07L13,21.52a.59.59,0,1,0-.15-1.18Z").style("fill","var(--primary-color)"),this.expandIcon.on("click",(function(){we(r,!1,o)})).on("mouseover",(function(e){s.show(this.getAttribute("name"),e),u.cancel(me),u.cancel(ge)})).on("mouseout",(function(){s.hide(),me=u((function(){Ne()}),500)}))),this.focusIcon=d3.select(".menu-events").append("g").attr("class","focus-icon").attr("name","focus").attr("transform",(function(){return n(20,r)})),this.focusIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.focusIcon.append("path").attr("d","M14.2,23.81a9.8,9.8,0,1,1,6.93-2.87h0A9.74,9.74,0,0,1,14.2,23.81Zm0-18.17a8.37,8.37,0,1,0,5.92,14.29h0A8.37,8.37,0,0,0,14.2,5.64Zm1.42,6.95a2,2,0,1,0,0,2.85A2,2,0,0,0,15.62,12.59Z").style("fill","var(--primary-color)"),this.focusIcon.on("click",(function(){t.$broadcast("onRootNodeChange",r.iri)})).on("mouseover",(function(e){s.show(this.getAttribute("name"),e),u.cancel(me),u.cancel(ge)})).on("mouseout",(function(){s.hide(),me=u((function(){Ne()}),500)})),this.copyURIIcon=d3.select(".menu-events").append("g").attr("class","icon-link").attr("name","link").attr("transform",(function(){return n(20,r)})),this.copyURIIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.copyURIIcon.append("path").attr("d","M 13.457031 10.164062 C 13.648438 10.164062 13.820312 10.242188 13.941406 10.363281 L 15.492188 11.859375 C 15.984375 12.332031 16.292969 12.992188 16.292969 13.714844 C 16.292969 14.441406 15.984375 15.097656 15.492188 15.574219 L 10.394531 20.496094 C 9.902344 20.972656 9.222656 21.265625 8.472656 21.265625 C 7.71875 21.265625 7.039062 20.972656 6.546875 20.496094 L 4.996094 19 C 4.507812 18.523438 4.203125 17.867188 4.203125 17.144531 C 4.203125 16.421875 4.507812 15.765625 4.996094 15.289062 L 7.542969 12.824219 C 7.667969 12.707031 7.84375 12.628906 8.035156 12.628906 C 8.417969 12.628906 8.726562 12.929688 8.726562 13.300781 C 8.726562 13.484375 8.648438 13.652344 8.523438 13.773438 L 5.976562 16.234375 C 5.738281 16.46875 5.589844 16.792969 5.589844 17.148438 C 5.589844 17.503906 5.738281 17.824219 5.976562 18.058594 L 7.527344 19.566406 C 7.773438 19.792969 8.105469 19.929688 8.472656 19.929688 C 8.835938 19.929688 9.167969 19.792969 9.414062 19.566406 L 14.511719 14.644531 C 14.753906 14.410156 14.90625 14.089844 14.90625 13.730469 C 14.90625 13.375 14.753906 13.054688 14.511719 12.820312 L 12.964844 11.324219 C 12.839844 11.203125 12.761719 11.039062 12.761719 10.855469 C 12.761719 10.488281 13.070312 10.1875 13.449219 10.1875 Z M 17.082031 3.976562 C 17.082031 3.976562 17.085938 3.976562 17.085938 3.976562 C 17.824219 3.976562 18.492188 4.261719 18.980469 4.722656 L 20.535156 6.203125 C 21.042969 6.679688 21.355469 7.34375 21.355469 8.082031 C 21.355469 8.792969 21.058594 9.441406 20.582031 9.914062 L 18.0625 12.402344 C 17.9375 12.527344 17.761719 12.605469 17.566406 12.605469 C 17.183594 12.605469 16.875 12.304688 16.875 11.9375 C 16.875 11.753906 16.949219 11.589844 17.070312 11.46875 L 19.605469 8.984375 C 19.847656 8.75 19.996094 8.429688 19.996094 8.070312 C 19.996094 7.714844 19.847656 7.394531 19.605469 7.160156 L 18.019531 5.667969 C 17.773438 5.445312 17.4375 5.304688 17.070312 5.300781 C 16.703125 5.304688 16.367188 5.453125 16.128906 5.691406 L 11.085938 10.667969 C 10.84375 10.898438 10.695312 11.222656 10.695312 11.578125 C 10.695312 11.933594 10.84375 12.257812 11.085938 12.488281 L 12.675781 13.980469 C 12.804688 14.101562 12.882812 14.273438 12.882812 14.457031 C 12.882812 14.828125 12.574219 15.128906 12.191406 15.128906 C 12.003906 15.128906 11.832031 15.054688 11.707031 14.9375 L 10.140625 13.457031 C 9.636719 12.980469 9.324219 12.316406 9.324219 11.582031 C 9.324219 10.863281 9.621094 10.214844 10.101562 9.742188 L 15.140625 4.765625 C 15.625 4.285156 16.304688 3.980469 17.054688 3.976562 Z M 17.082031 3.976562").style("fill","var(--primary-color)"),this.copyURIIcon.on("click",(function(){e.copyToClipboard(r.iri),Ne(),s.hide()})).on("mouseover",(function(e){s.show("<div style='text-align: center;'><b>Copy to ClipBoard</b><br>"+r.iri+"</div>",e),u.cancel(me),u.cancel(ge)})).on("mouseout",(function(){s.hide(),me=u((function(){Ne()}),500)})),this.closeIcon=d3.select(".menu-events").append("g").attr("class","close-icon").attr("name","remove").attr("transform",(function(){return n(20,r)})),this.closeIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.closeIcon.append("path").attr("d","M14.94,14l5.87-5.87a.66.66,0,1,0-.94-.94L14,13.06,8.13,7.19a.66.66,0,0,0-.94.94L13.06,14,7.19,19.87a.66.66,0,1,0,.94.94L14,14.94l5.87,5.87a.66.66,0,1,0,.94-.94Z").style("fill","var(--primary-color)"),this.closeIcon.on("click",(function(){Ce(r)})).on("mouseover",(function(e){s.show(this.getAttribute("name"),e),u.cancel(me),u.cancel(ge)})).on("mouseout",(function(){s.hide(),me=u((function(){Ne()}),500)})),this.animateMenu(r)},this.animateMenu=function(e){const t=d3.easeSin;let r=0;let i=20;this.expandIcon&&this.expandIcon.transition().duration(100).style("opacity",1).ease(t).attr("transform",(function(){return n(i,e)})).delay(r+=35),this.collapseIcon&&this.collapseIcon.transition().duration(100).style("opacity",1).ease(t).attr("transform",(function(){return n(i,e)})).delay(r+=35),this.copyURIIcon.transition().duration(100).style("opacity",1).ease(t).attr("transform",(function(){return i+=30,n(i,e)})).delay(r+=35),this.focusIcon.transition().duration(100).style("opacity",1).ease(t).attr("transform",(function(){return i+=30,n(i,e)})).delay(r+=35),this.closeIcon.transition().duration(100).style("opacity",1).ease(t).attr("transform",(function(){return i+=30,n(i,e)})).delay(r+=35),this.expandedState=!0}};function be(n,r,i){return e.showInfoPanel=!1,e.showPredicates=!1,e.showNodeInfo=!1,i.shiftKey&&(i.ctrlKey||i.metaKey)?(t.$broadcast("onRootNodeChange",n.iri),!1):i.ctrlKey||i.metaKey?(Ce(n),!1):void 0!==e.openedNodeInfoPanel&&e.openedNodeInfoPanel===n?(e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,!1):(Le(n),!0)}function Ce(e){se.removeNode(e),ye()}function Te(t){!function(t){e.nodeSelected=!0,null===t.data.types&&(t.data.types="greyColor"),se=new oe,ee=Z}(t),Se(t)}function Se(t,n,r){let i=t.data;i=_.filter(i,(function(e){return-1===_.findIndex(se.links,(function(t){return e.source===t.source.iri&&e.target===t.target.iri}))}));const o=[],s=se.tripleLinksCopy.values();for(let e=0;e<se.tripleLinksCopy.size;e++){s.next().value.forEach(e=>{o.push(e)})}i=_.filter(i,(function(e){return-1===_.findIndex(o,(function(t){return e.source===t.source.iri&&e.target===t.target.iri}))})),i=_.filter(i,(function(e){return e.source!==e.target}));const a=((e,t)=>{const n=t.map(t=>t[e]);return t.filter((t,r)=>n.indexOf(t[e])===r)})("iri",_.union(_.flatten(_.map(t.data,(function(e){return[{iri:e.source,isTriple:e.isTripleSource},{iri:e.target,isTriple:e.isTripleTarget}]}))))),u=_.map(se.nodes,(function(e){return{iri:e.iri,isTriple:Boolean(e.isTriple)}})),c=se.tripleNodes.values();for(let e=0;e<se.tripleNodes.size;e++){c.next().value.forEach(e=>{u.push({iri:e.iri,isTriple:e.isTriple})})}const p=_.reject(a,(function(e){return _.some(u,e)}));if(0===p.length)(r||0===i.length)&&l.info(w.instant("graphexplore.error.node.connections")),se.addAndMatchLinks(i),ye();else{const t=[],r=[],o=R();_.forEach(p,(function(n,i){t.push(T.getInstanceNode({iri:n.isTriple?B(n.iri):n.iri,config:e.configLoaded.id,languages:e.shouldShowSettings()?o.languages:[],includeInferred:o.includeInferred,sameAsState:o.sameAsState}).then((function(e){r[i]=e.data})))})),d.all(t).then((function(){_.forEach(r,(function(e,t){const i=2*Math.PI*t/r.length,o=(n?n.x:0)+Math.cos(i)*ne/3,s=(n?n.y:0)+Math.sin(i)*ne/3;e.isTriple?se.addTriple(e,o,s):se.addNode(e,o,s)})),se.addAndMatchLinks(i),n&&(n.isExpanded=!0),ye()}))}}function we(t,n,r){if(ve.getLoadingState())return;ve.init(t,r);const i=R(),o=t.iri;T.getInstanceNodeLinks({iri:o,linksLimit:i.linksLimit,includeInferred:i.includeInferred,config:e.configLoaded.id,preferredTypes:e.shouldShowSettings()?i.preferredTypes:[],rejectedTypes:e.shouldShowSettings()?i.rejectedTypes:[],preferredPredicates:e.shouldShowSettings()?i.preferredPredicates:[],rejectedPredicates:e.shouldShowSettings()?i.rejectedPredicates:[],preferredTypesOnly:e.shouldShowSettings()?i.preferredTypesOnly:[],preferredPredicatesOnly:e.shouldShowSettings()?i.preferredPredicatesOnly:[],languages:e.shouldShowSettings()?i.languages:[],sameAsState:i.sameAsState,includeSchema:i.includeSchema}).then((function(e){Se(e,t,n)}),(function(t){const n=getError(t.data);l.error(n,w.instant("graphexplore.error.exploring.node")),e.loading=!1,ve.setLoadingState(!1)}))}function Ne(){angular.isDefined(Ee)&&Ee.expandedState&&Ee.removeIcons()}function Le(t){fe.stop(),e.openedNodeInfoPanel=t,e.showNodeInfo=!0,e.showFilter=!1,e.showPredicates=!1,e.nodeLabels=t.labels,e.nodeTypes=t.types,e.rdfRank=t.rdfRank,e.nodeIri=t.iri,e.resourceType=t.isTriple?"triple":"uri",e.encodedIri=t.isTriple?encodeURIComponent(B(t.iri)):encodeURIComponent(t.iri),e.showInfoPanel=!0,e.rdfsLabel=t.labels[0].label,e.rdfsComment=t.comment,e.expanded=!1,e.propertiesQueryObj.query="",e.dataNodeKeysQuery="";const n=R();T.getProperties({iri:t.isTriple?B(t.iri):t.iri,config:e.configLoaded.id,languages:e.shouldShowSettings()?n.languages:[],includeInferred:n.includeInferred,sameAsState:n.sameAsState,rejectedPredicates:e.shouldShowSettings()?n.rejectedPredicates:[]}).then((function(t){e.data=_.mapKeys(t.data,(function(t,n){return e.replaceIRIWithPrefix(n)})),e.propertiesObj.items=[],_.forEach(e.data,(function(t,n){e.propertiesObj.items.push({key:n,value:t})})),e.nodeImage=void 0,e.propertiesNotFiltered=e.propertiesObj.items;const n=_.find(e.propertiesObj.items,(function(e){return"image"===e.key}));n&&(e.nodeImage=n.value[0].v),e.propertiesObj.items=_.reject(e.propertiesObj.items,(function(e){return"image"===e.key})),e.propertiesNotFiltered=e.propertiesObj.items}),(function(e){l.warning(getError(e.data),"Error")}))}function Ie(e){Ae("predicate","var(--primary-color-dark)",e),Ae("predicates","var(--primary-color-dark)",e);const t=document.getElementsByClassName("link");t&&_.each(t,(function(t){const n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--primary-color-dark)",t.style.strokeWidth=4)}));const n=document.getElementsByClassName("arrow-marker");n&&_.each(n,(function(t){const n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--primary-color-dark)",t.__data__.target.isTriple||t.setAttribute("refX","23"))}))}function Ae(e,t,n){const r=document.getElementsByClassName(e);r&&_.each(r,(function(e){const r=e.__data__;n?((r.source.iri.indexOf(n.iri)>=0||r.target.iri.indexOf(n.iri)>=0)&&(e.style.fill=t),F(n.iri)===j(r)&&(e.textContent=n.pred,e.style.fill=t),n.oppLinkIRI&&n.oppLinkIRI===j(r)&&(e.textContent=n.oppTriplePred,e.style.fill=t)):(e.style.fill=t,e.textContent=Oe(r))}))}function Re(){_.each(e.predicates,(function(e){const t=document.getElementById(e.linkId+e.nodeIndex);t&&(t.style.fontWeight="normal")}));const t=document.getElementsByClassName("link");t&&_.each(t,(function(e){e.style.stroke="#999",e.style.strokeWidth=1})),Ae("predicate",""),Ae("predicates","");const n=document.getElementsByClassName("arrow-marker");n&&_.each(n,(function(e){e.style.stroke="#999",e.__data__.target.isTriple||e.setAttribute("refX","59")}))}function _e(e){const t=F(e);if(se.tripleNodes.has(t))return se.tripleNodes.get(t).find(t=>t.iri===e)}function Oe(e){return e.predicates.length>1?e.predicates.length+" predicates":De(e.predicates[0])}function De(t){const n=e.replaceIRIWithPrefix(t);return n.length===t.length?t.split("/")[t.split("/").length-1]:n}e.toggleSidePanel=function(){e.pageslideExpanded=!e.pageslideExpanded},e.closeInfoPanel=function(){e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,e.predicates=[],ie=null,u((function(){e.showInfoPanel=!1}))},e.clickLink=function(t){if(se.tripleNodes.has(t.linkId)){Re();const n=se.tripleNodes.get(t.linkId)[t.nodeIndex];Le(n),e.showPredicates=!0;const r=document.getElementById(t.linkId+t.nodeIndex);r&&(r.style.fontWeight="bold");const i={},o=se.tripleLinksCopy.values();for(let e=0;e<se.tripleLinksCopy.size;e++){const e=o.next().value;e.length>1&&e.every(t=>t.source.iri===n.iri?(i.iri=e[0].source.iri,t.target.isTriple&&(i.oppLinkIRI=F(t.target.iri),i.oppTriplePred=De(t.target.iri.split(" ")[1])),i.pred=De(n.iri.split(" ")[1]),1===t.predicates.length&&(i.linkPred=t.predicates[0]),!1):t.target.iri!==n.iri||(i.iri=e[0].target.iri,t.source.isTriple&&(i.oppLinkIRI=F(t.source.iri),i.oppTriplePred=De(t.source.iri.split(" ")[1])),i.pred=De(n.iri.split(" ")[1]),1===t.predicates.length&&(i.linkPred=t.predicates[0]),!1))}i.iri||(i.iri=n.iri,i.pred=De(n.iri.split(" ")[1])),Ie(i)}},e.splitPredicate=function(e){return e.split("/")[e.split("/").length-1]},e.getActiveRepository=function(){return n.getActiveRepository()},e.isLoadingLocation=function(){return n.isLoadingLocation()},e.hasActiveLocation=function(){return n.hasActiveLocation()},e.rotate=function(e){Ne();const t=10*(e?1:-1)*Math.PI/180,n=Math.cos(t),r=Math.sin(t),i=te/2,o=ne/2;d3.selectAll(".node-wrapper").each((function(e){e.x=i+(n*(e.x-i)+r*(e.y-o)),e.y=o+(-r*(e.x-i)+n*(e.y-o)),e.fixed&&(e.fx=e.x,e.fy=e.y)})),fe.alpha(1).restart()},e.openUri=function(t,n){if(!n){const n={};e.configLoaded.id!==e.defaultGraphConfig.id&&(n.config=e.configLoaded.id),n.uri=t,I(n,{uri:t,config:e.configLoaded})}e.$broadcast("onRootNodeChange",t)},e.saveOrUpdateGraph=function(){const t=JSON.stringify(se.copyState()),n={id:e.lastSavedGraphId,name:e.lastSavedGraphName,data:t,shared:e.shared};n.id?e.saveGraphModal("update",n):e.saveGraphModal("new",n)},e.renameSavedGraph=function(t){e.saveGraphModal("rename",{id:t.id,name:t.name,config:t.config,shared:t.shared})};const ke=function(t){b.editSavedGraph(t).success((function(){e.lastSavedGraphName=t.name,e.shared=t.shared,e.refreshSavedGraphs(),l.success(w.instant("graphexplore.saved.graph.was.edited",{name:t.name}))})).error((function(e){const t=getError(e);l.error(t,w.instant("graphexplore.error.cannot.edit"))}))};e.saveGraphModal=function(t,n,r){v.open({templateUrl:"js/angular/graphexplore/templates/modal/save-graph.html",controller:"SaveGraphModalCtrl",resolve:{data:function(){return{mode:t,graph:n,graphExists:r,shared:n.shared}}}}).result.then((function(t){if(t.restart)e.saveGraphModal(t.mode,t.graph,!1);else switch(t.mode){case"new":!function(t){e.configLoaded&&(t.config=e.configLoaded.id),b.addNewSavedGraph(t).success((function(n,r,i){e.lastSavedGraphName=t.name,e.lastSavedGraphId=i()["x-saved-graph-id"],e.shared=t.shared,e.refreshSavedGraphs(),l.success(w.instant("graphexplore.saved.graph",{name:t.name}))})).error((function(n,r){if(422===r)e.saveGraphModal("new",t,!0);else{const e=getError(n);l.error(e,w.instant("graphexplore.error.cannot.create.graph"))}}))}(t.graph);break;case"update":case"rename":ke(t.graph)}}))},e.refreshSavedGraphs=function(){b.getSavedGraphs().success((function(t){e.savedGraphs=t})).error((function(e){const t=getError(e);l.error(t,w.instant("graphexplore.error.getting.saved.graphs"))}))},e.loadSavedGraph=function(t,n){t.owner?(e.lastSavedGraphName=t.name,e.lastSavedGraphId=t.id,e.shared=t.shared,e.configLoaded=e.findConfigById(t.config)):(e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=t.shared),e.configLoaded||(e.configLoaded=e.defaultGraphConfig),f.url("?saved="+t.id),se.restoreState(JSON.parse(t.data)),n||I({saved:t.id},{savedGraph:t})},e.copyToClipboardSavedGraph=function(t){const n=[location.protocol,"//",location.host,location.pathname,"?saved=",t.id].join("");e.copyToClipboard(n)},e.deleteSavedGraph=function(t){m.openSimpleModal({title:w.instant("common.confirm"),message:w.instant("graphexplore.confirm.delete.graph",{graphName:t.name}),warning:!0}).result.then((function(){!function(t){b.deleteSavedGraph(t).success((function(){e.refreshSavedGraphs(),l.success(w.instant("graphexplore.saved.graph.was.deleted",{name:t.name}))})).error((function(e){const t=getError(e);l.error(t,w.instant("graphexplore.error.cannot.delete"))}))}(t)}))},e.openIRI=function(t,n){return n.shiftKey?e.$broadcast("onRootNodeChange",t):window.open(t,"_blank"),!1},e.togglePinAllNodes=function(){Ne();const t=angular.isUndefined(e.numberOfPinnedNodes)||e.numberOfPinnedNodes<=0;e.numberOfPinnedNodes=0,d3.selectAll(".node").each((function(n){n.fixed=t,t?(e.numberOfPinnedNodes++,n.fx=n.x,n.fy=n.y):(n.fx=null,n.fy=null)})),fe.alpha(1).restart()},$("body").on("keydown",(function(t){!N.isActive()&&"input"!==t.target.nodeName&&e.nodeSelected&&(37===t.keyCode?e.rotate(!0):39===t.keyCode&&e.rotate(!1))})),e.getLiteralFromPropValue=function(e){return e.substring(e.indexOf(":")+1)}}function l(e,t,n,r){switch(e.mode=n.mode,e.graph=_.cloneDeep(n.graph),e.graphExists=n.graphExists,e.mode){case"new":e.title=r.instant("graphexplore.create.new.graph"),e.okButtonText=r.instant("common.create.btn");break;case"update":e.title=r.instant("graphexplore.update"),e.okButtonText=r.instant("common.save.btn");break;case"rename":e.title=r.instant("graphexplore.rename"),e.okButtonText=r.instant("common.save.btn")}e.ok=function(){e.form.$valid&&t.close({graph:e.graph,mode:e.mode})},e.saveNew=function(){e.graph.name=e.graph.name+" (new)",t.close({graph:e.graph,mode:"new",restart:!0})},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.graphexplore.controllers.graphviz",["ui.scroll.jqlite","ui.scroll","toastr","ui.bootstrap","ngTagsInput","graphdb.framework.utils.localstorageadapter"]).controller("GraphsVisualizationsCtrl",a).controller("SaveGraphModalCtrl",l).config(["$uibTooltipProvider",function(e){e.options({appendToBody:!0})}]),a.$inject=["$scope","$rootScope","$repositories","$licenseService","toastr","$timeout","ClassInstanceDetailsService","AutocompleteRestService","$q","$location","$jwtAuth","UiScrollService","ModalService","$uibModal","$window","LocalStorageAdapter","LSKeys","SavedGraphsRestService","GraphConfigRestService","GraphDataRestService","RDF4JRepositoriesRestService","$translate","GuidesService"],l.$inject=["$scope","$uibModalInstance","data","$translate"]},169:function(e,t,n){"use strict";n.r(t);n(64),n(10);var r=n(63),i=n(61),o=n(14),s=n(75),a=n(105);function l(e,t,n,l,u,c,p,d,f,h,g,m,v,y,x,E){let b;e.newConfig=new s.GraphsConfig,e.revertConfig=void 0,e.page=1,e.totalPages=5,e.helpHidden=1===v.get(y.HIDE_GRAPH_CONFIG_HELP),e.isUpdate=!1,e.shared=!1,e.canEditActiveRepo=e.canWriteActiveRepo(),e.samples=[],e.tabConfig={inference:e.newConfig.startQueryIncludeInferred,sameAs:e.newConfig.startQuerySameAs},e.getAutocompletePromise=void 0,e.getNamespacesPromise=void 0,e.tabsViewModel=[{page:1,label:x.instant("starting.point.label"),type:"startGraphQuery"},{page:2,label:x.instant("graph.expansion"),type:"expandQuery"},{page:3,label:x.instant("node.basics"),type:"resourceQuery"},{page:4,label:x.instant("edge.basics"),type:"predicateLabelQuery"},{page:5,label:x.instant("node.extra"),type:"resourcePropertiesQuery"}];const C=h.configName,T=u.getActiveRepository();e.toggleHelp=t=>{void 0===t&&(t=v.get(y.HIDE_GRAPH_CONFIG_HELP)),1!==t?(v.set(y.HIDE_GRAPH_CONFIG_HELP,1),e.helpHidden=!0):(v.set(y.HIDE_GRAPH_CONFIG_HELP,0),e.helpHidden=!1)},e.fixedVisualCallback=(t,n)=>{e.newConfig.startIRI=t,e.newConfig.startIRILabel=n,b=!0},e.isDefaultGraph=e=>e.isDefaultGraph(),e.isUserGraph=e=>!e.isDefaultGraph(),e.getSampleName=(e,t)=>{if(!e)return"";const n=e.getPropertyDescription(t);return n||(e.id?"Copy of "+e.name:e.name)},e.createGraphConfig=e=>{d.createGraphConfig(e).success((async function(){await g.showToastMessageWithDelay("graphexplore.saved.new.config"),n.url("graphs-visualizations")})).error((function(e){l.error(getError(e),x.instant("graphexplore.error.could.not.create"))}))},e.updateGraphConfig=e=>{d.updateGraphConfig(e).success((async function(){await g.showToastMessageWithDelay("graphexplore.saved.config"),n.url("graphs-visualizations")})).error((function(e){l.error(getError(e),x.instant("graphexplore.error.could.not.save"))}))},e.goToPage=t=>{e.page!==t&&R(()=>{e.showEditor(),e.page=t})},e.goToPreviousPage=()=>{e.page>1&&e.goToPage(e.page-1),M()&&(b=!1)},e.goToNextPage=()=>{P(),e.newConfig.isStartMode(s.StartMode.NODE)&&!b||e.goToPage(e.page+1)},e.saveGraphConfig=()=>{P(),M()&&!b||(e.newConfig.startQueryIncludeInferred=e.tabConfig.inference,e.newConfig.startQuerySameAs=e.tabConfig.sameAs,R(()=>{e.newConfig.name?(e.queryEditorIsDirty=!1,e.isUpdate?e.updateGraphConfig(e.newConfig.toSavePayload()):e.createGraphConfig(e.newConfig.toSavePayload())):O(x.instant("graphexplore.provide.config.name"))}))},e.setQuery=async t=>{const n=t||" ";(await S()).setQuery(n),e.markDirty()},e.markDirty=async()=>{if(e.revertConfig){const t=e.revertConfig.getQueryType(e.page),n=await I();e.queryEditorIsDirty=t!==n}},e.showEditor=()=>{e.viewMode="yasr",A(),L()},e.showPreview=()=>{e.viewMode="editor",w()},e.revertEditor=()=>{e.setQuery(e.revertConfig.getQueryType(e.page)),e.queryEditorIsDirty=!1};const S=()=>o.YasguiComponentDirectiveUtil.getOntotextYasguiElementAsync("#query-editor"),w=async(t,n)=>{const r=await S(),i=await r.getQueryType();if(n&&"SELECT"!==i&&"CONSTRUCT"!==i&&"DESCRIBE"!==i)return void l.warning(x.instant("query.editor.warning.msg"));"update"!==await r.getQueryMode()?e.queryIsRunning||(e.viewMode="editor",N()):l.warning(x.instant("cannot.execute.update.error"))},N=async()=>{(await S()).query(i.RenderingMode.YASR)},L=async()=>(await S()).changeRenderMode(i.RenderingMode.YASQE),I=async()=>(await S()).getQuery(),A=async()=>(await S()).abortQuery(),R=async t=>{const n=await(async()=>{const t=await S();let n=await t.getQuery();return n=n.trim(),e.newConfig.updateModel(n,e.page)})();1===e.page?n.isStartMode(s.StartMode.NODE)&&!n.startIRI?O(x.instant("graphexplore.select.start.node")):n.isStartMode(s.StartMode.QUERY)&&!n.startGraphQuery?O(x.instant("graphexplore.provide.query")):n.isStartMode(s.StartMode.QUERY)?k(t,n.startGraphQuery,"graph"):t():2===e.page?k(t,n.expandQuery,"construct",["node"]):3===e.page?k(t,n.resourceQuery,"tuple",["node"],[],["type","label","comment","rank"]):4===e.page?k(t,n.predicateLabelQuery,"tuple",["edge"],["label"]):5===e.page&&k(t,n.resourcePropertiesQuery,"tuple",["node"],["property","value"])},_=()=>{e.tabConfig.inference=e.newConfig.startQueryIncludeInferred,e.tabConfig.sameAs=e.newConfig.startQuerySameAs,e.setQuery(e.newConfig.getQueryType(e.page))},O=e=>{l.warning(e)},D=()=>{e.getAutocompletePromise=f.checkAutocompleteStatus()},k=(e,t,n,r,i,o)=>{t?d.validateQuery(t,n,r,i,o).success(()=>{e()}).error(e=>{O(getError(e))}):e()},P=()=>{M()&&e.$broadcast("addStartFixedNodeAutomatically",{startIRI:e.newConfig.startIRI})},M=()=>1===e.page&&e.newConfig.isStartMode(s.StartMode.NODE),F=()=>{d.getGraphConfigSamples().success((function(t){e.samples=Object(a.mapGraphConfigSamplesToGraphConfigs)(t).filter(t=>!t.id||e.newConfig.id!==t.id||(e.revertConfig=t,!1))})).error((function(e){l.error(getError(e),x.instant("graphexplore.error.graph.configs"))})),D(),e.getNamespacesPromise=m.getNamespaces(e.getActiveRepository())},j={endpoint:()=>"/repositories/"+u.getActiveRepository(),showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showYasqeActionButtons:!1,yasqeActionButtons:[{name:"createSavedQuery",visible:!1},{name:"showSavedQueries",visible:!1},{name:"shareQuery",visible:!1},{name:"includeInferredStatements",visible:!1}],showQueryButton:!1,initialQuery:" ",componentId:"graphs-config",render:i.RenderingMode.YASQE,maxPersistentResponseSize:0,yasqeMode:r.YasqeMode.PROTECTED,infer:e.newConfig.startQueryIncludeInferred,sameAs:e.newConfig.startQuerySameAs},U=(t,n,r)=>{e.queryIsRunning=t},G=()=>{window.removeEventListener("beforeunload",B),H.forEach(e=>e())},B=t=>{e.queryEditorIsDirty&&(t.returnValue=!0)},H=[];H.push(e.$on("autocompleteStatus",D)),H.push(e.$on("$locationChangeStart",(t,r)=>{if(e.queryEditorIsDirty){t.preventDefault();((e,t,n,r)=>{E.openSimpleModal({title:e,message:t,warning:!0}).result.then((function(){angular.isFunction(n)&&n()}),(function(){angular.isFunction(r)&&r()}))})(x.instant("common.confirm"),x.instant("visual.config.warning.unsaved.changes"),()=>{G();const e=n.absUrl().length-n.url().length,t=r.substring(e);n.path(t)})}else G()})),H.push(e.$on("$destroy",G)),H.push(e.$watch(e.getActiveRepositoryObject,()=>{(e.newConfig.isStartMode(s.StartMode.QUERY)||e.page>1)&&(e.viewMode="yasr",A().then(L))})),window.addEventListener("beforeunload",B),e.$watch("newConfig.startMode",e=>{e===s.StartMode.QUERY&&_()}),e.$watch("page",t=>{(e.newConfig.isStartMode(s.StartMode.QUERY)||t>1)&&(e.showEditor(),_())}),u.getPrefixes(T).then(t=>(t=>{const n=e.$watch((function(){return e.getActiveRepositoryObject()}),(function(i){if(i){e.canEditActiveRepo=e.canWriteActiveRepo();const i=angular.extend({},j,{prefixes:t,yasqeMode:e.canWriteActiveRepo()?r.YasqeMode.WRITE:r.YasqeMode.PROTECTED});e.yasguiConfig=i,n()}}))})(t)).finally(()=>U(!1)),C?(e.isUpdate=!0,d.getConfig(C).then((function(t){e.newConfig=t,F()})).catch(e=>{l.error(getError(e),x.instant("created.connector",{name:C}))})):(e.isUpdate=!1,F()),e.getActiveRepository()&&(U(!0,x.instant("common.refreshing.namespaces"),x.instant("common.extra.message")),u.getPrefixes(u.getActiveRepository()).then(t=>{e.namespaces=t}).catch((function(t){e.repositoryError=getError(t)})).finally((function(){U(!1)})))}angular.module("graphdb.framework.graphexplore.controllers.graphviz.config",["graphdb.framework.utils.notifications","graphdb.framework.utils.localstorageadapter"]).controller("GraphConfigCtrl",l),l.$inject=["$scope","$timeout","$location","toastr","$repositories","SparqlRestService","$filter","GraphConfigRestService","AutocompleteRestService","$routeParams","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate","ModalService"]},170:function(e,t,n){"use strict";n.r(t);var r=n(407),i=n(437),o=n(405),s=n(406);n(10);function a(e,t,n,a,l,u,c,p,d,f,h,g,m){return{restrict:"AE",template:'<div id="classChart"></div>',scope:{classHierarchyData:"=",flattenedClassNames:"=",selectedClass:"=",currentSliderValue:"=",showClassInfoPanel:"=",showExternalElements:"=",hidePrefixes:"=",currentBrowserLimit:"="},link:function(c,v,y){!function(c,v){var y,x,E=d3.pack().size([780,780]),b=d3.scaleLinear().domain([0,4]).range(["hsl(19, 70%, 90%)","hsl(19, 70%, 50%)"]).interpolate(d3.interpolateHcl),C=d3.select("#classChart").insert("svg:svg","h2").attr("viewBox","0 0 800 800").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null);function T(){return C.append("svg:g").attrs({id:"main-group",transform:"translate(400,400)"})}function S(){return"true"===h.get(g.CLASS_HIERARCHY_HIDE_PREFIXES)}function w(){var e=s.a.Export.getCSSRules("css/rdf-class-hierarchy-labels.css?v=2.6.0-TR4");d3.selectAll("#main-group").append("defs"),$("defs").append('<style type="text/css"><![CDATA['+e+"]]></style>"),d3.selectAll("g").style("opacity",1);var t=s.a.Export.generateBase64ImageSource("#classChart svg");d3.select(this).attrs({href:t,download:"class-hierarchy-"+u.getActiveRepository()+".svg"})}c.hidePrefixes=S();var N,L,I=T();if(!c.classHierarchyData.classCount&&u.getActiveRepository()&&!u.isSystemRepository()){e.loader=!0,e.hierarchyError=!1;const t=h.get("classHierarchy-selectedGraph-"+u.getActiveRepository());n.getClassHierarchyData(null!==t?t.contextID.uri:"").success((function(t,n,r){e.loader=!1,207===n&&p.warning(m.instant("graphexplore.update.diagram"),m.instant("graphexplore.repository.data.changed")),c.classHierarchyData=t,d3.select("#download-svg").on("mouseover",w)})).error((function(t){e.loader=!1,e.hierarchyError=getError(t),p.error(m.instant("graphexplore.error.request.failed",{name:f,error:getError(t)}))}))}var A,R,O,D,k,P,M,F={};function j(n,s,u,p){R&&R(),O&&O(),d3.selectAll("#main-group").remove(),I=T(),i.a.SingleChild.addPlaceholders(n,!0),(x=d3.hierarchy(n)).sum((function(e){return e.size})),A=u||x,E(x);var h,g=x.descendants();A.isInFocusTransitive=!0,i.a.SingleChild.removePlaceholders(g),i.a.SingleChild.centerNodes(g),i.a.SingleChild.makePositionsRelativeToZero(g),y||(y=Object(r.a)().attr("class","d3-tip").customPosition((function(e,t){return{top:"inherit",bottom:a.innerHeight-t.clientY+"px",right:a.innerWidth-t.clientX+"px"}})).html((function(e){return e.data.name})),C.call(y));var m=I.selectAll("circle").data(g).enter().append("g");s.doFade&&m.each((function(e){o.a.Transition.fadeIn(d3.select(this),550)}));var v,S=[],w=m.append("circle").attr("class",(function(e){return e.data.role})).attr("guide-selector",(function(e){return"class-"+e.data.name})).style("fill",(function(e){return e.children?b(e.depth):"#E0D0D0"})).each((function(e){if(e.circle=d3.select(this),e.data.name!==f){var t=e.data.name;S.push({name:t}),F[[t]]=e,e.circle.classed("rdf-class",!0),e.circle.on("mouseover",(function(t){s.noPrefixes||e.textHidden?y.show(e,t):y.hide(e)})),e.circle.on("mouseout",y.hide)}})).on("gdb-focus",(e,t)=>L(t)).on("gdb-zoom",(e,t)=>V(t));function D(e){d3.selectAll(".selected").classed("selected",e.selected=!1),e.circle.classed("selected",e.selected=!0),v=e}function k(){c.showClassInfoPanel=!1}S&&(S=_.uniqBy(S,"name"),c.flattenedClassNames=S);var P=o.a.Click.delayDblClick();d3.selectAll(".parent, .topLevelParent, .child, .root").call(P),L=function(e){V(e),e.data.name===f?(k(),d3.selectAll(".selected").classed("selected",!1)):(D(e),c.selectedClass=v,c.showClassInfoPanel=!0,c.$on("sidePanelClosed",(function(t){d3.selectAll(".selected").classed("selected",e.selected=!1)})))},P.on("click",(function(e,t){t.data.id&&a.history.pushState({id:t.data.id},"classHierarchyPage"+t.data.id,"hierarchy#"+t.data.id),y.hide(),L(t)})),P.on("dblclick",(function(t,r){r!==n&&(y.hide(),D(r),e.$broadcast("goToDomainRangeGraphView",v,A),t.stopPropagation())}));var M=0;C.on("wheel",(function(e){y.hide(),e.preventDefault(),e.stopPropagation();var t=(new Date).getTime();if(t-M>100){M=t;var n="";e.deltaY<=-1?n="in":e.deltaY>=1&&(n="out");var r=e.target.__data__;if(r||(r=A),"in"===n){if(r!==A){for(;r.parent&&!r.parent.isInFocusTransitive;)r=r.parent;r.depth<A.depth&&(r=A)}if(r===A&&r.children){for(var i=r.children[0],o=1;o<r.children.length;o++)r.children[o].sortingRank>i.sortingRank&&(i=r.children[o]);i.children&&(r=i)}else r.children||(r=r.parent);V(r,!0)}else"out"===n&&(r=A.parent)&&V(r,!0);A.data.name===f&&a.history.replaceState({id:1},"classHierarchyPage1","hierarchy#1"),U()}}));var j=I.selectAll("text").data(g).enter().append("text").attr("class",(function(e){return e.children&&e.children.length?"label":"label child-label"})).each((function(e){e.textSel=d3.select(this)}));s.noPrefixes?(j.each((function(e){var t=e.data.name.indexOf(":");e.data.name.indexOf("http://")>-1?e.noPrefixName=e.data.name:t>-1&&(e.noPrefixName=e.data.name.substring(t+1))})),j.style("font-size",(function(e){return o.a.Text.calcFontSize(e.noPrefixName,e.r)})).text((function(e){return o.a.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r/3)}))):j.style("font-size",(function(e){return o.a.Text.calcFontSize(e.data.name,e.r)})).text((function(e){return o.a.Text.getTextWithElipsisIfNeeded(e.data.name,e.r/3)})),j.style("display",(function(e){return e.parent&&e.parent.data===A.data?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,null):(e.textHidden=!0,"none")})),s.doFade&&!s.keepPrevState&&j.each((function(e){o.a.Transition.fadeIn(d3.select(this),550)})),N=function(){function e(e){e&&w.each((function(t){+e===t.data.id&&L(t)}))}var n=t.hash();a.onpopstate=function(t){t.state&&e(t.state.id)},e(n)};var G=I.selectAll("circle, text");function B(e,t){var n=800/e[2];h=e,G.attr("transform",(function(t){return"translate("+(t.x-e[0])*n+","+(t.y-e[1])*n+")"})),w.attr("r",(function(e){return e.r*n})),t&&j.each((function(e){e.data.fullName!==A.data.topLevelParentUri&&A.data.topLevelParentUri!==f||(e.textSel.style("display","none"),A.children&&A.children.length?_.each(A.children,(function(e){e.textSel.style("display","inline")})):A.textSel.style("display","inline"),A.parent&&_.each(A.parent.children,(function(e){e.data.name!==A.data.name&&e.textSel.style("display","inline")})))})),j.style("font-size",(function(e){return s.noPrefixes?o.a.Text.calcFontSize(e.noPrefixName,e.r*n):o.a.Text.calcFontSize(e.data.name,e.r*n)})).text((function(e){return s.noPrefixes?o.a.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r*n/3):o.a.Text.getTextWithElipsisIfNeeded(e.data.name,e.r*n/3)}))}function H(e){var t=2*e+20;return 2*e/t<.3&&(t=2*e+2),t}function q(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,this.style.display=""):(e.textHidden=!0,this.style.display="none")}function V(e,t){if(l((function(){c.showExternalElements=e.data.name===f})),A!==e&&(e.data.id&&a.history.replaceState({id:e.data.id},"classHierarchyPage"+e.data.id,"hierarchy#"+e.data.id),e.children||(e=e.parent,A!==e))){if(t&&(k(),d3.selectAll(".selected").classed("selected",!1)),A.parent)for(var n=A;n;)n.isInFocusTransitive=!1,n=n.parent;for(n=e;n;)n.isInFocusTransitive=!!n.children,n=n.parent;if(2*(A=e).r/(2*A.r+20)<.3||c.currentSliderValue>c.currentBrowserLimit)B([A.x,A.y,H(A.r)]),j.each((function(e){q.call(this,e)}));else d3.transition().duration(d).tween("zoom",(function(e){var t=d3.interpolateZoom(h,[A.x,A.y,H(A.r)]);return function(e){B(t(e))}})).selectAll("text").each(q)}}B([A.x,A.y,H(A.r)],p),R=c.$on("rootFocus",(function(){a.history.pushState({id:1},"classHierarchyPage1","hierarchy#1"),L(x)})),O=c.$on("classSearch",(function(e){L(e)}))}function U(){const t=c.classHierarchyData.classCount;let n=h.get(g.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);(!n||n>t)&&(n=t,h.set(g.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,n)),e.$broadcast("classCount",t,n)}window.addEventListener("resize",U),window.addEventListener("beforeunload",(function e(){window.removeEventListener("resize",U),window.removeEventListener("beforeunload",e)})),c.$watch("classHierarchyData",(function(){D&&D(),k&&k(),P&&P(),M&&M();var e=S();if(c.classHierarchyData.classCount){U();var t=_.cloneDeep(c.classHierarchyData);var n,r,i=function(e){return e.descendants().sort((function(e,t){return e.data.sortingRank>t.data.sortingRank?-1:e.data.sortingRank<t.data.sortingRank||e.data.depth>t.data.depth?1:e.data.depth<t.data.depth?-1:0}))}(d3.hierarchy(t));function o(e,t){const i={keepPrevState:!0,noPrefixes:S()};r=i.noPrefixes,j(n||e,i,A,!0),l((function(){h.set(g.CLASS_HIERARCHY_SWITCH_PREFIXES,t),N()}),70)}function s(e,i,s){if(!e)return;h.set(g.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,e),n={name:f,children:[]};const a=new Set;for(let t=1;t<=e;t++)a.add(i[t].data.id),i[t].parent===i[0]&&n.children.push(i[t].data);if(function e(t){if(!t.children)return;const n=[];for(const e of t.children)a.has(e.id)&&n.push($.extend({},e));t.children=n;for(const n of t.children)e(n)}(n),s){r=angular.isUndefined(r)?S():r;j(n,{noPrefixes:r})}else o(t)}var a,u=h.get(g.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);if(u)s(u,i);else{var p={doFade:!0,keepPrevState:!0,noPrefixes:S()};j(t,p),N()}D=c.$watch("hidePrefixes",(function(n){angular.isUndefined(n)||e?e=void 0:l((function(){!function(e){angular.isUndefined(e)||h.set(g.CLASS_HIERARCHY_HIDE_PREFIXES,e)}(n),o(t,!0)}),50)}),!0),k=c.$watch("currentSliderValue",(function(e){s(e,i,!0)}),!0),M=c.$on("onEnterKeypressSearchAction",(function(e){a&&L(a)})),P=c.$on("searchedClass",(function(e,t){(a=F[t.name])&&L(a)}))}}),!0)}(c)}}}angular.module("graphdb.framework.graphexplore.directives.class",["graphdb.framework.graphexplore.controllers.class","graphdb.framework.utils.localstorageadapter"]).constant("ZOOM_DURATION",500).constant("ROOT_OBJ_NAME","RDF Class Hierarchy").directive("rdfClassHierarchy",a),a.$inject=["$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","$licenseService","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys","$translate"]},171:function(e,t,n){"use strict";n.r(t);var r=n(406),i=n(405);n(10);function o(e,t,n,o,s,a,l,u,c,p,d,f,h){return{restrict:"AE",template:'<div id="domain-range"></div>',scope:{showPredicatesInfoPanel:"=",selectedPredicate:"=",collapseEdges:"="},link:function(p){const d=u((function(){!function(p){var d=d3.select("#domain-range").append("svg").attr("viewBox","0 0 1200 600").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null),g=d3.forceSimulation(),m=d3.drag().subject((function(e){return e})).on("start",(function(e,t){g.stop(),t.fx=e.x,t.fy=e.y,d3.select(this).classed("selected",!0)})).on("end",(function(e,t){t.fx=null,t.fy=null,d3.select(this).classed("selected",!1),b?(g.alpha(.2).restart(),b=!1):g.restart()})).on("drag",(function(e,t){b=!0,g.alphaTarget(0).restart(),t.fx=e.x,t.fy=e.y})),v=d.append("defs");v.append("marker").attrs({id:"arrow",viewBox:"0 -5 10 10",refX:10,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:f}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),v.append("marker").attrs({id:"collapsed-arrow",viewBox:"0 -5 10 10",refX:9,refY:0,markerUnits:"strokeWidth",markerWidth:4,markerHeight:4,orient:"auto",fill:f}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),v.append("marker").attrs({id:"arrow-loop",viewBox:"0 -5 10 10",refX:7,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:f}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),d3.select("#download-svg").on("mouseover",(function(){var e=r.a.Export.getCSSRules("css/domain-range-graph.css?v=2.6.0-TR4");$("defs").append('<style type="text/css"><![CDATA['+e+"]]></style>");var t=r.a.Export.generateBase64ImageSource("#domain-range svg");d3.select(this).attrs({href:t,download:"domain-range-graph-"+n.getActiveRepository()+".svg"})})),function(){var e=d3.select(".legend-container").append("svg").attr("viewBox","0 0 "+1200/7+" "+1200/7*1.2).attr("preserveAspectRatio","xMidYMid meet");e.append("rect").attrs({width:1200/7,height:1200/7*1.2}).style("fill","rgba(235, 235, 235, 0.9)");var t=16+1200/18/2.5,n=t+1200/90;e.append("circle").attrs({class:"legend-class-node",cx:(16+t)/2,cy:30,r:1200/18/4.5}),e.append("text").attrs({x:n,y:30+1200/370}).style("font-size",1200/90/1.1+"px").text("main class node"),e.append("circle").attrs({class:"legend-object-node",cx:(16+t)/2,cy:70,r:1200/110/1.25}),e.append("text").attrs({x:n,y:30+1200/370+40}).style("font-size",1200/90/1.1+"px").text("class node"),e.append("circle").attrs({class:"legend-datatype-node",cx:(16+t)/2,cy:70+1200/45,r:1200/110/2}),e.append("text").attrs({x:n,y:99.90990990990991}).style("font-size",1200/90/1.1+"px").text("datatype node"),e.append("line").attrs({class:"property-arrow",x1:16,y1:123.33333333333334,x2:t,y2:123.33333333333334}).style("stroke-width",1.2).attr("marker-end","url("+s.absUrl()+"#arrow)"),e.append("text").attrs({x:n,y:126.57657657657658}).style("font-size",1200/90/1.1+"px").text("explicit property"),e.append("line").attrs({class:"implicit-property-arrow",x1:16,y1:150,x2:t,y2:150}).style("stroke-width",1.2).attr("marker-end","url("+s.absUrl()+"#arrow)"),e.append("text").attrs({x:n,y:150+1200/370}).style("font-size",1200/90/1.1+"px").text("implicit property"),e.append("line").attrs({class:"collapsed-property-arrow",x1:16,y1:150+1200/45,x2:t,y2:150+1200/45}).style("stroke-width",2).attr("marker-end","url("+s.absUrl()+"#collapsed-arrow)"),e.append("text").attrs({x:n,y:179.9099099099099}).style("font-size",1200/90/1.1+"px").text("collapsed property")}();var y=s.search().uri,x=s.search().name;const E=s.search().collapsed;(function(e,t){o.getDomainRangeData(e,t).success((function(e,t,n){p.domainRangeGraphData=e})).error((function(e){c.error("Request for "+x+" failed!")}))})(y,E),$(window).on("popstate",(function(){a.set(l.DOMAIN_RANGE_WENT_BACK,!0)})),t.onpopstate=function(t){t.state&&e.$broadcast("changeCollapsedEdgesState",t.state.collapsed)},p.$watch("collapseEdges",(function(){angular.isUndefined(p.collapseEdges)||(a.set(l.DOMAIN_RANGE_COLLAPSE_EDGES,p.collapseEdges),"true"!==a.get(l.DOMAIN_RANGE_WENT_BACK)&&function(t){e.$broadcast("switchEdgeMode",{uri:y,name:x,collapsed:t})}(p.collapseEdges),a.remove(l.DOMAIN_RANGE_WENT_BACK))})),p.$watch("domainRangeGraphData",(function(){if(p.domainRangeGraphData){var n=_.cloneDeep(p.domainRangeGraphData);const D=n.nodes,k=n.links;g.nodes(D).force("x",d3.forceX(600)).force("y",d3.forceY(300)).force("charge",d3.forceManyBody().strength(-800)).force("link",d3.forceLink(k).distance(1200/3.5));var r=d.selectAll(".link").data(k).enter().append("g");function o(e){e.style("stroke",f),e.style("stroke-width",2),e.attr("marker-end","url("+s.absUrl()+"#collapsed-arrow)")}var a,l,c=0;r.each((function(e){if(e.objectPropNodeClassUri!==y)a=r.append("line").attrs({class:"link","marker-end":"url("+s.absUrl()+"#arrow)"}).style("stroke-width",1.2).each((function(e){switch(e.propertyType){case"objectLeft":e.targetRadius=1200/18;break;case"objectRight":e.targetRadius=1200/110;break;case"datatype":e.targetRadius=1200/110/2;break;default:e.targetRadius=0}var t=d3.select(this);e.targetNodeEdgeCount>1?o(t):e.implicit&&t.style("stroke-dasharray","3, 3")}));else{if(angular.isUndefined(l)){l=d3.select(this).append("path").attrs({d:"M 0 0 A "+1200/18/2+" "+1200/18/2+" 0 1 1 0 "+1200/18/2,class:"loop-link",fill:"none","marker-end":"url("+s.absUrl()+"#arrow-loop)"}).style("stroke-width",1.2)}(c+=e.targetNodeEdgeCount)>1&&o(d3.select(".loop-link"))}}));var v={};function E(){$.isEmptyObject(v)||(v.text.style("fill","black"),v.background.style("fill","#f0f0f0"))}function b(e,t){E(),v.text=d3.select(this),v.background=d3.select(this.previousSibling),v.text.style("fill","white"),v.background.style("fill",f),u((function(){p.showPredicatesInfoPanel=!0,p.selectedPredicate=t})),e.stopPropagation()}$("document").ready((function(){$("#domain-range").bind("click",E)}));var C=r.append("text").attr("class",(function(e){return e.objectPropNodeClassUri===y?"loop-link-property-name":"property-name"})).attr("dx",(function(e){return 1200/18/2*("objectLeft"===e.propertyType?1:-1)})).style("text-anchor",(function(e){return"objectLeft"===e.propertyType?"end":"start"})).style("font-size",1200/90).text((function(e){return e.targetNodeEdgeCount>1?e.targetNodeEdgeCount+" predicates":e.name}));C.each((function(e){var n=d3.select(this);/\d\spredicates/.test(n.text())?n.style("font-weight","bold").on("click",b):n.on("click",(function(e,n){t.open("resource?uri="+encodeURIComponent(n.uri),"_blank")}))}));var T=r.append("rect").attr("class",(function(e){return e.objectPropNodeClassUri!==y?"link-background":"loop-link-background"})).attr("width",(function(e){return e.calculatedWidth=this.previousSibling.getBBox().width,e.calculatedWidth+4})).attr("height",(function(e){return e.calculatedHeight=this.previousSibling.getBBox().height,e.calculatedHeight+2})).attr("transform",(function(e){var t=2-1200/18/2*("objectLeft"===e.propertyType?1:-1);return"objectLeft"===e.propertyType&&(t+=e.calculatedWidth),"translate(-"+t+",-"+(2+e.calculatedHeight/2)+")"})).on("click",(function(e){e.stopPropagation()})),S=d.selectAll(".node").data(D).enter().append("g"),w=S.filter((function(e){return e.objectPropClassUri!==y})).append("circle").each((function(e){var t=d3.select(this);"main"===e.classPosition?t.attrs({class:"class-node",r:1200/18}).attr("marker-end","url("+s.absUrl()+"#loop-link)"):null===e.objectPropClassName?t.attrs({class:"datatype-node",r:1200/110/2}):t.attrs({class:"object-prop-node",r:1200/110})})).call(m);d3.selectAll(".object-prop-node").on("dblclick",(function(t,n,r){p.$apply((function(){e.$broadcast("reloadDomainRangeGraphView",n,r)}))})),S.filter((function(e){return e.objectPropClassName&&e.objectPropClassUri!==y})).append("text").attr("class",(function(e){return e.classPosition+"-class-label"})).style("font-size",1200/90).text((function(e){return e.objectPropClassName})).on("click",(function(e,n){t.open("resource?uri="+encodeURIComponent(n.objectPropClassUri),"_blank")}));var N=S.select("text");d.select(".class-node").each((function(){d3.select(this.parentNode).append("text").attr("class","rdf-class-label").style("font-size",(function(e){return i.a.Text.calcFontSize(x,1200/18)})).text(x).on("click",(function(){t.open("resource?uri="+encodeURIComponent(y),"_blank")}))}));var L=d.select(".class-node + text"),I=d3.select(".class-node"),A=d3.selectAll(".loop-link-background"),R=d3.selectAll(".loop-link-property-name");if(C=d3.selectAll(".property-name"),!angular.isUndefined(l)){var O=[];A.each((function(e,t){d3.select(this);O.push({idx:t,width:e.calculatedWidth,height:e.calculatedHeight})}))}g.on("tick",(function(e){var t=8*g.alpha();function n(e){var t=e.x+1200/18*2,n=e.y-1200/18/1.9;var r=[];A.each((function(i,o){r.push(i),o<h?function(r,i){var o=$.grep(O,(function(e){return e.idx==i}));i>0&&(t+=parseFloat(i*(o[0].height/(i/1.4)))),r.attrs({transform:"rotate(270, "+e.x+","+e.y+") translate("+t+","+n+")",width:o[0].height,height:o[0].width})}(d3.select(this),o):d3.select(this).remove()})),function(e){var t;d3.select(".view-more-preds-label").style("font-weight","bold").each((function(n){n.target.allEdges=e,t=this.getComputedTextLength()})).on("click",b),d3.select(".view-more-preds-rect").attr("height",t+4)}(r)}a.filter((function(e){return e.objectPropNodeClassUri!==y})).attr("x1",(function(e){return e.source.x})).attr("y1",(function(e){return e.source.y})).attr("x2",(function(e){return e.targetX})).attr("y2",(function(e){return e.targetY})).each((function(e){!function(e){"objectLeft"===e.propertyType?(e.source.x-=8*t,e.source.y-=t/9):(e.target.x+=8*t,e.target.y-=t/9)}(e);var n=Math.atan2(e.target.y-e.source.y,e.target.x-e.source.x);e.targetX=e.target.x-Math.cos(n)*e.targetRadius,e.targetY=e.target.y-Math.sin(n)*e.targetRadius})),w.each((function(e){"main"!==e.classPosition||angular.isUndefined(l)||(!function(e){var t=e.x+64,n=e.y-1200/18/5.7-5;l.attr("transform","rotate(270, "+e.x+","+e.y+") translate("+t+","+n+")")}(e),function(e){function t(t,n){var r=$.grep(O,(function(e){return e.idx==n})),i=0;n>0&&(i=parseFloat(2*n*(r[0].height/1.4)));var o=e.x,s=e.y-1200/18*2.1-i;t.attrs({x:o,y:s}).moveToFront()}R.each((function(e,n){var r=d3.select(this),i=R.size()-h;i<0?t(r,n):(0==n&&!p.collapseEdges&&i>1&&(!function(e,t,n){e.classed("view-more-preds-label",!0).text(n+" predicates more ..."),null!==this.nextSibling&&t.classed("view-more-preds-rect",!0)}(r,d3.select(this.nextSibling),i),t(r,n)),n<h?t(r,n):r.remove())}))}(e),n(e)),e.objectPropClassUri!==y&&d3.select(this).attr("cx",(function(e){return"main"===e.classPosition?function(e){!window.ActiveXObject&&"ActiveXObject"in window&&(Math.log10=function(e){return Math.log(e)/Math.LN10});var t=I.attr("cx")-600,n=.5*Math.log10(Math.abs(t));return e.x+=t>0?-n:n,e.x}(e):e.x})).attr("cy",(function(e){return e.y}))})),L.attr("x",(function(e){return e.x})).attr("y",(function(e){return e.y})).moveToFront(),T.filter((function(e){return e.objectPropNodeClassUri!==y})).attr("x",(function(e){return e.target.x>e.source.x?e.source.x+(e.target.x-e.source.x)/2:e.target.x+(e.source.x-e.target.x)/2})).attr("y",(function(e){return e.target.y>e.source.y?e.source.y+(e.target.y-e.source.y)/2:e.target.y+(e.source.y-e.target.y)/2})).moveToFront(),C.attr("x",(function(e){return e.target.x>e.source.x?e.source.x+(e.target.x-e.source.x)/2:e.target.x+(e.source.x-e.target.x)/2})).attr("y",(function(e){return e.target.y>e.source.y?e.source.y+(e.target.y-e.source.y)/2:e.target.y+(e.source.y-e.target.y)/2})).moveToFront(),N.attr("x",(function(e){return"right"===e.classPosition?e.x+1200/110*1.2:e.x-1200/110*1.2})).attr("y",(function(e){return e.y})).moveToFront()}))}}));let b=!1}(p)}),50);p.$on("$destroy",(function(){u.cancel(d)}))}}}angular.module("graphdb.framework.graphexplore.directives.domainrange",["graphdb.framework.graphexplore.controllers.domainrange","graphdb.framework.utils.localstorageadapter"]).constant("ONTO_RED","var(--primary-color)").constant("ONTO_GREEN","var(--tertiary-color)").constant("ONTO_BLUE","var(--secondary-color)").constant("NON_COLLAPSED_REFLEXIVE_LINK_LIMIT",6).directive("domainRangeGraph",o),o.$inject=["$rootScope","$window","$repositories","GraphDataRestService","$location","LocalStorageAdapter","LSKeys","$timeout","toastr","ONTO_RED","ONTO_GREEN","ONTO_BLUE","NON_COLLAPSED_REFLEXIVE_LINK_LIMIT"]},172:function(e,t){function n(e,t){return{restrict:"A",scope:{},templateUrl:"js/angular/graphexplore/templates/systemRepoWarningTemplate.html",link:function(n){n.isSystemRepository=function(){return"SYSTEM"===e.getActiveRepository()},n.hasPermission=function(){return t.hasPermission()}}}}angular.module("graphdb.framework.graphexplore.directives.sysrepo",["graphdb.framework.graphexplore.controllers.class"]).directive("systemRepoWarning",n),n.$inject=["$repositories","$rootScope"]},173:function(e,t){function n(e){return{restrict:"AE",scope:{rdfsLabel:"=",rdfsComment:"=",expanded:"=",alwaysExpanded:"="},templateUrl:"js/angular/graphexplore/templates/rdfsCommentLabelTemplate.html",link:function(t,n){t.stringLimit=e,t.scrollToTop=function(){n[0].getElementsByClassName("rdfs-comment")[0].scrollTop=0},t.checkCommentLength=function(){return n[0].getElementsByClassName("rdfs-comment-text")[0].innerText.length<e},t.equalHeights=function(){const e=n[0].getElementsByClassName("rdfs-comment-text")[0].innerHeight;e<250&&t.expanded&&(n[0].getElementsByClassName("rdfs-comment")[0].innerHeight=e)},t.toggleFullComment=function(){t.expanded=!t.expanded},t.$watch("expanded || alwaysExpanded",(function(n){t.stringLimit=n?t.rdfsComment.length:e}))}}}angular.module("graphdb.framework.graphexplore.directives.rdfsdetails",[]).directive("rdfsCommentLabel",n).constant("SHORT_COMMENT_LENGTH",100),n.$inject=["SHORT_COMMENT_LENGTH"]},174:function(e,t,n){"use strict";n.r(t);var r=n(406);n(117);function i(e,t){return{restrict:"A",template:'<div id="dependencies-chord"></div>',scope:{dependenciesData:"="},link:function(n){n.$watch("dependenciesData",(function(){if(n.dependenciesData){const i=n.dependenciesData;!function(i,o){if(function(){let e=!0;for(const t of i){if(t.some(e=>0!==e)){e=!1;break}}return e}())return;const s=d3.scaleOrdinal(d3.schemeCategory10),a=d3.select("body").append("div").attr("class","tooltip").style("opacity",0);d3.select("body").on("click",(function(){a.style("opacity",0)}));const l=Math.min(800,800)/2.8,u=l-24,c=d3.arc().innerRadius(u).outerRadius(l),p=d3.chord().padAngle(.04).sortSubgroups(d3.descending).sortChords(d3.ascending),d=d3.ribbon().radius(u),f=d3.select("#dependencies-chord").append("svg").attr("viewBox","0 0 800 800").attr("preserveAspectRatio","xMidYMid meet").style("font","10px sans-serif").append("g").attr("id","circle").attr("transform","translate(400,400)");f.append("circle").attr("r",l).style("fill","none");const h=p(i),g=f.selectAll(".group").data(h.groups).enter().append("g").attr("class","group").on("mouseover",(function(){const e=g.nodes().indexOf(this);m.classed("fade",(function(t){return t.source.index!==e&&t.target.index!==e}))}));g.append("title").text((function(e,t){return o[t]})),g.append("path").attr("id",(function(e,t){return"group"+t})).attr("d",c).style("fill",(function(e,t){return s(t)})),g.append("text").each((function(e){e.angle=(e.startAngle+e.endAngle)/2})).attr("dy",".35em").attr("transform",(function(e){return"rotate("+(180*e.angle/Math.PI-90)+")translate("+(u+26)+")"+(e.angle>Math.PI?"rotate(180)":"")})).style("text-anchor",(function(e){return e.angle>Math.PI?"end":null})).text((function(e){return o[e.index]}));const m=f.selectAll(".chord").data(h).enter().append("path").attr("class","chord").style("fill",(function(e){return s(e.target.index)})).style("fill-opacity",".67").style("stroke","#000").style("stroke-width",".25px").style("cursor","pointer").attr("d",d);m.on("mouseover",(function(){d3.select(this).style("fill-opacity","1")})),m.on("mouseout",(function(){d3.select(this).style("fill-opacity",".67")})),m.on("click",(function(e,r){const i=o[r.source.index],s=o[r.target.index],l=e.pageX,u=e.pageY;t.getPredicates(i,s,n.selectedGraph&&n.selectedGraph.contextID.uri).success((function(e){let t="<div class='dependencies-tooltip'>"+("<div class='row'>"+i+" <i class='fa fa-exchange'></i> "+s+"</div>")+_.map(e.slice(0,10),(function(e){const t=" <i class='fa fa-long-arrow-"+("out"===e.direction?"right":"left")+"'></i>";return"<div class='row'>"+e.predicate+" : "+e.weight+t+" </div>"})).join("");e.length>10?t=t+"<div class='pull-right'>And "+(e.length-10).toString()+" more...</div></div>":t+="</div>",a.html(t).style("left",l+"px").style("top",u+"px")})),a.transition().duration(200).style("opacity",1)})),d3.select("#circle").on("mouseleave",(function(){f.selectAll(".chord").classed("fade",!1)})),d3.select("#download-svg").on("mouseover",(function(){const t=r.a.Export.generateBase64ImageSource(".dependencies-chord svg");d3.select(this).attrs({href:t,download:"dependencies-"+e.getActiveRepository()+".svg"})}))}(i.matrix,i.nodes,i.direction)}}))}}}angular.module("graphdb.framework.graphexplore.directives.dependencies",["graphdb.framework.graphexplore.controllers.dependencies","graphdb.framework.rest.graphexplore.data.service"]).directive("dependenciesChord",i),i.$inject=["$repositories","GraphDataRestService"]},175:function(e,t){function n(){return{restrict:"AE",scope:{filterQueryObj:"=",filterFunction:"&",listItemsObj:"=",listItemsNotFiltered:"=",searchPlaceholder:"@"},templateUrl:"js/angular/graphexplore/templates/listItemsSearchFilterTemplate.html",link:function(e){e.filterFunction=e.filterFunction(),e.$watch("filterQueryObj.query",(function(){var t,n,r,i;e.listItemsObj.items=(t=e.filterQueryObj.query,n=e.listItemsObj.items,r=e.listItemsNotFiltered,i=e.filterFunction,t.length>0?_.filter(r,i):n.length!==r.length?r:n)}))}}}angular.module("graphdb.framework.graphexplore.directives.searchfilter",[]).directive("listItemsSearchFilter",n),n.$inject=[]},176:function(e,t){function n(e,t){return{restrict:"AE",scope:{searchData:"=",searchFields:"@",titleField:"@",searchPlaceholder:"@",initialValue:"=",searchedObjCallback:"&"},templateUrl:"js/angular/graphexplore/templates/searchIconInputTemplate.html",link:function(n,r){n.searchedObjCallback=n.searchedObjCallback(),n.performSearchActionOnEnter=function(){e.$broadcast("onEnterKeypressSearchAction")},n.showInput=function(){$("#selectGraphDropdown").hide(),r.find("#search_input #search_input_value")[0].value="",r.find(".search-icon").addClass("animated bounceOut").css("z-index","-1"),r.find("#search_input .angucomplete-holder").css("display","block"),t((function(){r.find("#search_input .angucomplete-holder").css("width","250px").css("left","-215px"),t((function(){r.find(".close-icon").css("display","block").addClass("animated bounceIn").css("z-index","3"),r.find("#search_input #search_input_value").focus()}),200)}),1)},n.hideInput=function(){r.find("#search_input #search_input_value")[0].value="",r.find("#search_input .angucomplete-holder").css("width","0px").css("left","35px"),t((function(){r.find("#search_input .angucomplete-holder").css("display","none"),$("#selectGraphDropdown").show()}),250),r.find(".close-icon").addClass("animated bounceOut").removeClass("bounceOut").css("z-index","-1").css("display","none").click((function(){$(".tooltip").hide()})),t((function(){r.find(".search-icon").css("display","inline-block").removeClass("bounceOut").addClass("bounceIn").css("z-index","3")}),200)}}}}angular.module("graphdb.framework.graphexplore.directives.searchcontrols",[]).directive("searchIconInput",n),n.$inject=["$rootScope","$timeout"]},225:function(e,t,n){"use strict";n.r(t);n(7),n(31),n(25),n(24),n(615),n(616),n(397),n(407),n(454),n(617),n(618),n(423),n(405),n(437),n(406),n(117),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(168),n(169),n(170),n(171),n(172),n(173),n(174),n(175),n(176),n(81),n(115),n(83);angular.module("graphdb.framework.graphexplore",["graphdb.framework.core.controllers","graphdb.framework.core.directives","graphdb.framework.rest.graphexplore.data.service","graphdb.framework.graphexplore.services.uiscroll","graphdb.framework.graphexplore.services.rdfsdetails","graphdb.framework.rest.graphexplore.savedgraphs.service","graphdb.framework.rest.graphconfig.service","graphdb.framework.graphexplore.controllers.class","graphdb.framework.graphexplore.controllers.domainrange","graphdb.framework.graphexplore.controllers.dependencies","graphdb.framework.graphexplore.controllers.graphviz","graphdb.framework.graphexplore.controllers.graphviz.config","graphdb.framework.graphexplore.directives.sysrepo","graphdb.framework.graphexplore.directives.rdfsdetails","graphdb.framework.graphexplore.directives.searchfilter","graphdb.framework.graphexplore.directives.class","graphdb.framework.graphexplore.directives.domainrange","graphdb.framework.graphexplore.directives.dependencies","graphdb.framework.graphexplore.directives.searchcontrols","graphdb.framework.core.directives.queryeditor.controllers","graphdb.framework.core.directives.queryeditor.queryeditor","graphdb.framework.core.directives.yasgui-component"])},397:function(e,t,n){var r,i;r=[n(402)],void 0===(i=function(){function e(e,t){return e.each((function(){var e=t.apply(this,arguments),n=select(this);for(var r in e)n.attr(r,e[r])}))}function t(e,t){for(var n in t)e.attr(n,t[n]);return e}return"undefined"==typeof d3&&(d3=n(402)),d3.selection.prototype.attrs=function(n){return("function"==typeof n?e:t)(this,n)},d3.selection.prototype.moveToFront=function(){return this.each((function(){d3.select(this.parentNode.appendChild(this))}))},d3.selection.prototype.moveToBack=function(){return this.each((function(){const e=this.parentNode.firstChild;e&&this.parentNode.insertBefore(this,e)}))},d3}.apply(t,r))||(e.exports=i)},405:function(e,t,n){"use strict";n(397);var r=r||{};r.Text=function(){function e(e,t,n,r){n=n||10;var i=t/3;return"string"==typeof e?(i*=10/(e.substring(0,t/3).length+1.5),i+=1,e.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(i*=.6),i<n&&(i=n),Math.round(i)):(i<n&&(i=n),Math.round(i))}return{calcFontSizeRaw:e,calcFontSize:function(t,n,r,i){return e(t,n,r)+"px"},getTextWithElipsisIfNeeded:function(e,t){return"string"==typeof e&&e.length>t?e.substring(0,t-3)+"...":e}}}(),r.Transition={fadeIn:function(e,t){e.style("opacity",0).transition().duration(t).style("opacity",1)},fadeOut:function(e,t){e.style("opacity",1).transition().duration(t).style("opacity",0)}},r.Click=function(){const e=function(e,n){let r,i=1,o=arguments.length;for(;++i<o;)r=arguments[i],e[r]=t(e,n,n[r]);return e};function t(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}return{delayDblClick:function(){var t=d3.dispatch("click","dblclick");return e((function(e){var n,r=null;e.on("mousedown",(function(){n=d3.pointer(document.body),+new Date})),e.on("mouseup",(function(e,i){var o,s,a;(s=n,a=d3.pointer(document.body),Math.sqrt(Math.pow(s[0]-a[0],2),Math.pow(s[1]-a[1],2))>5)||(r?(window.clearTimeout(r),r=null,t.call("dblclick",e,e,i)):r=window.setTimeout((o=e,function(){t.call("click",o,o,i),r=null}),250))}))}),t,"on")}}}(),t.a=r},406:function(e,t,n){"use strict";n(397);var r=r||{};r.Export={getCSSRules:function(e){const t=$('link[href="'+e+'"]')[0].sheet.rules;let n="";return _.each(t,(function(e){n+=e.cssText})),n},generateBase64ImageSource:function(e){e||(e="svg");const t=d3.selectAll(e).attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").node().parentNode.innerHTML;return"data:image/svg+xml;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(t)))}},t.a=r},407:function(e,t,n){"use strict";t.a=function(){var e=function(){return"n"},t=function(){return[0,0]},n=function(){return" "},r=p(),i=null,o=null,s=null,a=null;function l(e){var t;i="svg"===(t=(t=e).node()).tagName.toLowerCase()?t:t.ownerSVGElement,o=i.createSVGPoint(),document.body.appendChild(r)}l.show=function(){var r=Array.prototype.slice.call(arguments);r[r.length-1]instanceof SVGElement&&(s=r.pop());var i,o=n.apply(this,r),p=t.apply(this,r),f=e.apply(this,r),h=d(),g=c.length,m=document.documentElement.scrollTop||document.body.scrollTop,v=document.documentElement.scrollLeft||document.body.scrollLeft,y=a.apply(this,r);for(h.html(o).style("opacity",1).style("pointer-events","all");g--;)h.classed(c[g],!1);const x=r.filter(e=>e instanceof Event);return i=u.get(f).apply(this,x),y?Object.keys(y).forEach((function(e){h.style(e,y[e])})):h.classed(f,!0).style("top",i.top+p[0]+m+"px").style("left",i.left+p[1]+v+"px"),l},l.hide=function(){return d().style("opacity",0).style("pointer-events","none"),l},l.attr=function(e,t){if(arguments.length<2&&"string"==typeof e)return d().attr(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(d(),n),l},l.style=function(e,t){if(arguments.length<2&&"string"==typeof e)return d().style(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(d(),n),l},l.direction=function(t){return arguments.length?(e=null==t?t:h(t),l):e},l.offset=function(e){return arguments.length?(t=null==e?e:h(e),l):t},l.html=function(e){return arguments.length?(n=null==e?e:h(e),l):n},l.customPosition=function(e){return arguments.length?(a=null==e?e:h(e),l):a},l.destroy=function(){return r&&(d().remove(),r=null),l};var u=new Map(Object.entries({n:function(e){var t=f(e);return{top:t.n.y-r.offsetHeight,left:t.n.x-r.offsetWidth/2}},s:function(e){var t=f(e);return{top:t.s.y,left:t.s.x-r.offsetWidth/2}},e:function(e){var t=f(e);return{top:t.e.y-r.offsetHeight/2,left:t.e.x}},w:function(e){var t=f(e);return{top:t.w.y-r.offsetHeight/2,left:t.w.x-r.offsetWidth}},nw:function(e){var t=f(e);return{top:t.nw.y-r.offsetHeight,left:t.nw.x-r.offsetWidth}},ne:function(e){var t=f(e);return{top:t.ne.y-r.offsetHeight,left:t.ne.x}},sw:function(e){var t=f(e);return{top:t.sw.y,left:t.sw.x-r.offsetWidth}},se:function(e){var t=f(e);return{top:t.se.y,left:t.e.x}}})),c=u.keys();function p(){var e=d3.select(document.createElement("div"));return e.style("position","absolute").style("top",0).style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),e.node()}function d(){return null===r&&(r=p(),document.body.appendChild(r)),d3.select(r)}function f(e){for(var t=s||e.target;void 0===t.getScreenCTM&&"undefined"===t.parentNode;)t=t.parentNode;var n={},r=t.getScreenCTM(),i=t.getBBox(),a=i.width,l=i.height,u=i.x,c=i.y;return o.x=u,o.y=c,n.nw=o.matrixTransform(r),o.x+=a,n.ne=o.matrixTransform(r),o.y+=l,n.se=o.matrixTransform(r),o.x-=a,n.sw=o.matrixTransform(r),o.y-=l/2,n.w=o.matrixTransform(r),o.x+=a,n.e=o.matrixTransform(r),o.x-=a/2,o.y-=l/2,n.n=o.matrixTransform(r),o.y+=l,n.s=o.matrixTransform(r),n}function h(e){return"function"==typeof e?e:function(){return e}}return l}},409:function(e,t,n){var r,i=i||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),i=e.webkitRequestFileSystem,o=e.requestFileSystem||i||e.mozRequestFileSystem,s=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},a=0,l=function(t){var r=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};e.chrome?r():setTimeout(r,500)},u=function(e,t,n){for(var r=(t=[].concat(t)).length;r--;){var i=e["on"+t[r]];if("function"==typeof i)try{i.call(e,n||e)}catch(e){s(e)}}},c=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e},p=function(t,s){t=c(t);var p,d,f,h=this,g=t.type,m=!1,v=function(){u(h,"writestart progress write writeend".split(" "))},y=function(){(!m&&p||(p=n().createObjectURL(t)),d)?d.location.href=p:null==e.open(p,"_blank")&&"undefined"!=typeof safari&&(e.location.href=p);h.readyState=h.DONE,v(),l(p)},x=function(e){return function(){if(h.readyState!==h.DONE)return e.apply(this,arguments)}},E={create:!0,exclusive:!1};if(h.readyState=h.INIT,s||(s="download"),r)return p=n().createObjectURL(t),r.href=p,r.download=s,void setTimeout((function(){!function(e){var t=new MouseEvent("click");e.dispatchEvent(t)}(r),v(),l(p),h.readyState=h.DONE}));e.chrome&&g&&"application/octet-stream"!==g&&(f=t.slice||t.webkitSlice,t=f.call(t,0,t.size,"application/octet-stream"),m=!0),i&&"download"!==s&&(s+=".download"),("application/octet-stream"===g||i)&&(d=e),o?(a+=t.size,o(e.TEMPORARY,a,x((function(e){e.root.getDirectory("saved",E,x((function(e){var n=function(){e.getFile(s,E,x((function(e){e.createWriter(x((function(n){n.onwriteend=function(t){d.location.href=e.toURL(),h.readyState=h.DONE,u(h,"writeend",t),l(e)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&y()},"writestart progress write abort".split(" ").forEach((function(e){n["on"+e]=h["on"+e]})),n.write(t),h.abort=function(){n.abort(),h.readyState=h.DONE},h.readyState=h.WRITING})),y)})),y)};e.getFile(s,{create:!1},x((function(e){e.remove(),n()})),x((function(e){e.code===e.NOT_FOUND_ERR?n():y()})))})),y)})),y)):y()},d=p.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t){return navigator.msSaveOrOpenBlob(c(e),t)}:(d.abort=function(){this.readyState=this.DONE,u(this,"abort")},d.readyState=d.INIT=0,d.WRITING=1,d.DONE=2,d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null,function(e,t){return new p(e,t)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);
|
|
2
|
+
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */e.exports?e.exports.saveAs=i:null!==n(404)&&null!=n(401)&&(void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r))},437:function(e,t,n){"use strict";var r=r||{};r.SingleChild={addPlaceholders:function e(t,n){if(t.children){for(var r=0;r<t.children.length;r++)e(t.children[r]);if(1===t.children.length){var i=1.2*t.size;n&&(i=.1*t.children[0].size),t.children.push({name:"placeholder",size:i})}}},removePlaceholders:function e(t){for(var n=t.length-1;n>=0;n--){var r=t[n];"placeholder"===r.data.name?t.splice(n,1):r.children&&e(r.children)}},centerNodes:function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.children&&1===n.children.length){var r=n.x-n.children[0].x;n.children[0].x+=r,i(n.children[0],r)}}function i(e,t){if(e.children)for(var n=0;n<e.children.length;n++)e.children[n].x+=t,i(e.children[n],t)}},makePositionsRelativeToZero:function(e){for(var t=e[0].x,n=e[0].y,r=0;r<e.length;r++){var i=e[r];i.x-=t,i.y-=n}}},t.a=r},440:function(module,exports,__webpack_require__){(function(global){var require,require,f;f=function(){var define,module,exports;return function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){if(!a&&"function"==typeof require&&require)return require(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[s]={exports:{}};t[s][0].call(u.exports,(function(e){return i(t[s][1][e]||e)}),u,u.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){"use strict";var r=e("jquery");r.deparam=function(e,t){var n={},i={true:!0,false:!1,null:null};return r.each(e.replace(/\+/g," ").split("&"),(function(e,o){var s,a=o.split("="),l=decodeURIComponent(a[0]),u=n,c=0,p=l.split("]["),d=p.length-1;if(/\[/.test(p[0])&&/\]$/.test(p[d])?(p[d]=p[d].replace(/\]$/,""),d=(p=p.shift().split("[").concat(p)).length-1):d=0,2===a.length)if(s=decodeURIComponent(a[1]),t&&(s=s&&!isNaN(s)?+s:"undefined"===s?void 0:void 0!==i[s]?i[s]:s),d)for(;c<=d;c++)u=u[l=""===p[c]?u.length:p[c]]=c<d?u[l]||(p[c+1]&&isNaN(p[c+1])?{}:[]):s;else r.isArray(n[l])?n[l].push(s):void 0!==n[l]?n[l]=[n[l],s]:n[l]=s;else l&&(n[l]=t?void 0:"")})),n}},{jquery:16}],2:[function(e,t,n){t.exports={table:{"*[&&,valueLogical]":{"&&":["[&&,valueLogical]","*[&&,valueLogical]"],AS:[],")":[],",":[],"||":[],";":[]},"*[,,expression]":{",":["[,,expression]","*[,,expression]"],")":[]},"*[,,objectPath]":{",":["[,,objectPath]","*[,,objectPath]"],".":[],";":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[,,object]":{",":["[,,object]","*[,,object]"],".":[],";":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"*[/,pathEltOrInverse]":{"/":["[/,pathEltOrInverse]","*[/,pathEltOrInverse]"],"|":[],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"*[;,?[or([verbPath,verbSimple]),objectList]]":{";":["[;,?[or([verbPath,verbSimple]),objectList]]","*[;,?[or([verbPath,verbSimple]),objectList]]"],".":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"*[UNION,groupGraphPattern]":{UNION:["[UNION,groupGraphPattern]","*[UNION,groupGraphPattern]"],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],".":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[graphPatternNotTriples,?.,?triplesBlock]":{"{":["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],OPTIONAL:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],MINUS:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],GRAPH:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],SERVICE:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],FILTER:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],BIND:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],VALUES:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],"}":[]},"*[quadsNotTriples,?.,?triplesTemplate]":{GRAPH:["[quadsNotTriples,?.,?triplesTemplate]","*[quadsNotTriples,?.,?triplesTemplate]"],"}":[]},"*[|,pathOneInPropertySet]":{"|":["[|,pathOneInPropertySet]","*[|,pathOneInPropertySet]"],")":[]},"*[|,pathSequence]":{"|":["[|,pathSequence]","*[|,pathSequence]"],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"*[||,conditionalAndExpression]":{"||":["[||,conditionalAndExpression]","*[||,conditionalAndExpression]"],AS:[],")":[],",":[],";":[]},"*dataBlockValue":{UNDEF:["dataBlockValue","*dataBlockValue"],IRI_REF:["dataBlockValue","*dataBlockValue"],TRUE:["dataBlockValue","*dataBlockValue"],FALSE:["dataBlockValue","*dataBlockValue"],"<<":["dataBlockValue","*dataBlockValue"],PNAME_LN:["dataBlockValue","*dataBlockValue"],PNAME_NS:["dataBlockValue","*dataBlockValue"],STRING_LITERAL1:["dataBlockValue","*dataBlockValue"],STRING_LITERAL2:["dataBlockValue","*dataBlockValue"],STRING_LITERAL_LONG1:["dataBlockValue","*dataBlockValue"],STRING_LITERAL_LONG2:["dataBlockValue","*dataBlockValue"],INTEGER:["dataBlockValue","*dataBlockValue"],DECIMAL:["dataBlockValue","*dataBlockValue"],DOUBLE:["dataBlockValue","*dataBlockValue"],INTEGER_POSITIVE:["dataBlockValue","*dataBlockValue"],DECIMAL_POSITIVE:["dataBlockValue","*dataBlockValue"],DOUBLE_POSITIVE:["dataBlockValue","*dataBlockValue"],INTEGER_NEGATIVE:["dataBlockValue","*dataBlockValue"],DECIMAL_NEGATIVE:["dataBlockValue","*dataBlockValue"],DOUBLE_NEGATIVE:["dataBlockValue","*dataBlockValue"],"}":[],")":[]},"*datasetClause":{FROM:["datasetClause","*datasetClause"],WHERE:[],"{":[]},"*describeDatasetClause":{FROM:["describeDatasetClause","*describeDatasetClause"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],WHERE:[],"{":[],VALUES:[],$:[]},"*graphNode":{"(":["graphNode","*graphNode"],"[":["graphNode","*graphNode"],VAR1:["graphNode","*graphNode"],VAR2:["graphNode","*graphNode"],NIL:["graphNode","*graphNode"],IRI_REF:["graphNode","*graphNode"],TRUE:["graphNode","*graphNode"],FALSE:["graphNode","*graphNode"],BLANK_NODE_LABEL:["graphNode","*graphNode"],ANON:["graphNode","*graphNode"],"<<":["graphNode","*graphNode"],PNAME_LN:["graphNode","*graphNode"],PNAME_NS:["graphNode","*graphNode"],STRING_LITERAL1:["graphNode","*graphNode"],STRING_LITERAL2:["graphNode","*graphNode"],STRING_LITERAL_LONG1:["graphNode","*graphNode"],STRING_LITERAL_LONG2:["graphNode","*graphNode"],INTEGER:["graphNode","*graphNode"],DECIMAL:["graphNode","*graphNode"],DOUBLE:["graphNode","*graphNode"],INTEGER_POSITIVE:["graphNode","*graphNode"],DECIMAL_POSITIVE:["graphNode","*graphNode"],DOUBLE_POSITIVE:["graphNode","*graphNode"],INTEGER_NEGATIVE:["graphNode","*graphNode"],DECIMAL_NEGATIVE:["graphNode","*graphNode"],DOUBLE_NEGATIVE:["graphNode","*graphNode"],")":[]},"*graphNodePath":{"(":["graphNodePath","*graphNodePath"],"[":["graphNodePath","*graphNodePath"],VAR1:["graphNodePath","*graphNodePath"],VAR2:["graphNodePath","*graphNodePath"],NIL:["graphNodePath","*graphNodePath"],IRI_REF:["graphNodePath","*graphNodePath"],TRUE:["graphNodePath","*graphNodePath"],FALSE:["graphNodePath","*graphNodePath"],BLANK_NODE_LABEL:["graphNodePath","*graphNodePath"],ANON:["graphNodePath","*graphNodePath"],"<<":["graphNodePath","*graphNodePath"],PNAME_LN:["graphNodePath","*graphNodePath"],PNAME_NS:["graphNodePath","*graphNodePath"],STRING_LITERAL1:["graphNodePath","*graphNodePath"],STRING_LITERAL2:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath","*graphNodePath"],INTEGER:["graphNodePath","*graphNodePath"],DECIMAL:["graphNodePath","*graphNodePath"],DOUBLE:["graphNodePath","*graphNodePath"],INTEGER_POSITIVE:["graphNodePath","*graphNodePath"],DECIMAL_POSITIVE:["graphNodePath","*graphNodePath"],DOUBLE_POSITIVE:["graphNodePath","*graphNodePath"],INTEGER_NEGATIVE:["graphNodePath","*graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath","*graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath","*graphNodePath"],")":[]},"*groupCondition":{"(":["groupCondition","*groupCondition"],STR:["groupCondition","*groupCondition"],LANG:["groupCondition","*groupCondition"],LANGMATCHES:["groupCondition","*groupCondition"],DATATYPE:["groupCondition","*groupCondition"],BOUND:["groupCondition","*groupCondition"],IRI:["groupCondition","*groupCondition"],URI:["groupCondition","*groupCondition"],BNODE:["groupCondition","*groupCondition"],RAND:["groupCondition","*groupCondition"],ABS:["groupCondition","*groupCondition"],CEIL:["groupCondition","*groupCondition"],FLOOR:["groupCondition","*groupCondition"],ROUND:["groupCondition","*groupCondition"],CONCAT:["groupCondition","*groupCondition"],STRLEN:["groupCondition","*groupCondition"],UCASE:["groupCondition","*groupCondition"],LCASE:["groupCondition","*groupCondition"],ENCODE_FOR_URI:["groupCondition","*groupCondition"],CONTAINS:["groupCondition","*groupCondition"],STRSTARTS:["groupCondition","*groupCondition"],STRENDS:["groupCondition","*groupCondition"],STRBEFORE:["groupCondition","*groupCondition"],STRAFTER:["groupCondition","*groupCondition"],YEAR:["groupCondition","*groupCondition"],MONTH:["groupCondition","*groupCondition"],DAY:["groupCondition","*groupCondition"],HOURS:["groupCondition","*groupCondition"],MINUTES:["groupCondition","*groupCondition"],SECONDS:["groupCondition","*groupCondition"],TIMEZONE:["groupCondition","*groupCondition"],TZ:["groupCondition","*groupCondition"],NOW:["groupCondition","*groupCondition"],UUID:["groupCondition","*groupCondition"],STRUUID:["groupCondition","*groupCondition"],MD5:["groupCondition","*groupCondition"],SHA1:["groupCondition","*groupCondition"],SHA256:["groupCondition","*groupCondition"],SHA384:["groupCondition","*groupCondition"],SHA512:["groupCondition","*groupCondition"],COALESCE:["groupCondition","*groupCondition"],IF:["groupCondition","*groupCondition"],STRLANG:["groupCondition","*groupCondition"],STRDT:["groupCondition","*groupCondition"],SAMETERM:["groupCondition","*groupCondition"],ISIRI:["groupCondition","*groupCondition"],ISURI:["groupCondition","*groupCondition"],ISBLANK:["groupCondition","*groupCondition"],ISLITERAL:["groupCondition","*groupCondition"],ISNUMERIC:["groupCondition","*groupCondition"],VAR1:["groupCondition","*groupCondition"],VAR2:["groupCondition","*groupCondition"],SUBSTR:["groupCondition","*groupCondition"],REPLACE:["groupCondition","*groupCondition"],REGEX:["groupCondition","*groupCondition"],EXISTS:["groupCondition","*groupCondition"],NOT:["groupCondition","*groupCondition"],IRI_REF:["groupCondition","*groupCondition"],PNAME_LN:["groupCondition","*groupCondition"],PNAME_NS:["groupCondition","*groupCondition"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],HAVING:[],$:[],"}":[]},"*havingCondition":{"(":["havingCondition","*havingCondition"],STR:["havingCondition","*havingCondition"],LANG:["havingCondition","*havingCondition"],LANGMATCHES:["havingCondition","*havingCondition"],DATATYPE:["havingCondition","*havingCondition"],BOUND:["havingCondition","*havingCondition"],IRI:["havingCondition","*havingCondition"],URI:["havingCondition","*havingCondition"],BNODE:["havingCondition","*havingCondition"],RAND:["havingCondition","*havingCondition"],ABS:["havingCondition","*havingCondition"],CEIL:["havingCondition","*havingCondition"],FLOOR:["havingCondition","*havingCondition"],ROUND:["havingCondition","*havingCondition"],CONCAT:["havingCondition","*havingCondition"],STRLEN:["havingCondition","*havingCondition"],UCASE:["havingCondition","*havingCondition"],LCASE:["havingCondition","*havingCondition"],ENCODE_FOR_URI:["havingCondition","*havingCondition"],CONTAINS:["havingCondition","*havingCondition"],STRSTARTS:["havingCondition","*havingCondition"],STRENDS:["havingCondition","*havingCondition"],STRBEFORE:["havingCondition","*havingCondition"],STRAFTER:["havingCondition","*havingCondition"],YEAR:["havingCondition","*havingCondition"],MONTH:["havingCondition","*havingCondition"],DAY:["havingCondition","*havingCondition"],HOURS:["havingCondition","*havingCondition"],MINUTES:["havingCondition","*havingCondition"],SECONDS:["havingCondition","*havingCondition"],TIMEZONE:["havingCondition","*havingCondition"],TZ:["havingCondition","*havingCondition"],NOW:["havingCondition","*havingCondition"],UUID:["havingCondition","*havingCondition"],STRUUID:["havingCondition","*havingCondition"],MD5:["havingCondition","*havingCondition"],SHA1:["havingCondition","*havingCondition"],SHA256:["havingCondition","*havingCondition"],SHA384:["havingCondition","*havingCondition"],SHA512:["havingCondition","*havingCondition"],COALESCE:["havingCondition","*havingCondition"],IF:["havingCondition","*havingCondition"],STRLANG:["havingCondition","*havingCondition"],STRDT:["havingCondition","*havingCondition"],SAMETERM:["havingCondition","*havingCondition"],ISIRI:["havingCondition","*havingCondition"],ISURI:["havingCondition","*havingCondition"],ISBLANK:["havingCondition","*havingCondition"],ISLITERAL:["havingCondition","*havingCondition"],ISNUMERIC:["havingCondition","*havingCondition"],SUBSTR:["havingCondition","*havingCondition"],REPLACE:["havingCondition","*havingCondition"],REGEX:["havingCondition","*havingCondition"],EXISTS:["havingCondition","*havingCondition"],NOT:["havingCondition","*havingCondition"],IRI_REF:["havingCondition","*havingCondition"],PNAME_LN:["havingCondition","*havingCondition"],PNAME_NS:["havingCondition","*havingCondition"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],$:[],"}":[]},"*or([[(,*dataBlockValue,)],NIL])":{"(":["or([[(,*dataBlockValue,)],NIL])","*or([[(,*dataBlockValue,)],NIL])"],NIL:["or([[(,*dataBlockValue,)],NIL])","*or([[(,*dataBlockValue,)],NIL])"],"}":[]},"*or([[*,unaryExpression],[/,unaryExpression]])":{"*":["or([[*,unaryExpression],[/,unaryExpression]])","*or([[*,unaryExpression],[/,unaryExpression]])"],"/":["or([[*,unaryExpression],[/,unaryExpression]])","*or([[*,unaryExpression],[/,unaryExpression]])"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],";":[]},"*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])":{"+":["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"-":["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],";":[]},"*or([baseDecl,prefixDecl])":{BASE:["or([baseDecl,prefixDecl])","*or([baseDecl,prefixDecl])"],PREFIX:["or([baseDecl,prefixDecl])","*or([baseDecl,prefixDecl])"],$:[],CONSTRUCT:[],DESCRIBE:[],ASK:[],INSERT:[],DELETE:[],SELECT:[],LOAD:[],CLEAR:[],DROP:[],ADD:[],MOVE:[],COPY:[],CREATE:[],WITH:[]},"*or([var,[(,expression,AS,var,)]])":{"(":["or([var,[(,expression,AS,var,)]])","*or([var,[(,expression,AS,var,)]])"],VAR1:["or([var,[(,expression,AS,var,)]])","*or([var,[(,expression,AS,var,)]])"],VAR2:["or([var,[(,expression,AS,var,)]])","*or([var,[(,expression,AS,var,)]])"],WHERE:[],"{":[],FROM:[]},"*or([varOrIRIref,embeddedTriple])":{"<<":["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],VAR1:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],VAR2:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],IRI_REF:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],PNAME_LN:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],PNAME_NS:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],WHERE:[],"{":[],FROM:[],VALUES:[],$:[]},"*orderCondition":{ASC:["orderCondition","*orderCondition"],DESC:["orderCondition","*orderCondition"],VAR1:["orderCondition","*orderCondition"],VAR2:["orderCondition","*orderCondition"],"(":["orderCondition","*orderCondition"],STR:["orderCondition","*orderCondition"],LANG:["orderCondition","*orderCondition"],LANGMATCHES:["orderCondition","*orderCondition"],DATATYPE:["orderCondition","*orderCondition"],BOUND:["orderCondition","*orderCondition"],IRI:["orderCondition","*orderCondition"],URI:["orderCondition","*orderCondition"],BNODE:["orderCondition","*orderCondition"],RAND:["orderCondition","*orderCondition"],ABS:["orderCondition","*orderCondition"],CEIL:["orderCondition","*orderCondition"],FLOOR:["orderCondition","*orderCondition"],ROUND:["orderCondition","*orderCondition"],CONCAT:["orderCondition","*orderCondition"],STRLEN:["orderCondition","*orderCondition"],UCASE:["orderCondition","*orderCondition"],LCASE:["orderCondition","*orderCondition"],ENCODE_FOR_URI:["orderCondition","*orderCondition"],CONTAINS:["orderCondition","*orderCondition"],STRSTARTS:["orderCondition","*orderCondition"],STRENDS:["orderCondition","*orderCondition"],STRBEFORE:["orderCondition","*orderCondition"],STRAFTER:["orderCondition","*orderCondition"],YEAR:["orderCondition","*orderCondition"],MONTH:["orderCondition","*orderCondition"],DAY:["orderCondition","*orderCondition"],HOURS:["orderCondition","*orderCondition"],MINUTES:["orderCondition","*orderCondition"],SECONDS:["orderCondition","*orderCondition"],TIMEZONE:["orderCondition","*orderCondition"],TZ:["orderCondition","*orderCondition"],NOW:["orderCondition","*orderCondition"],UUID:["orderCondition","*orderCondition"],STRUUID:["orderCondition","*orderCondition"],MD5:["orderCondition","*orderCondition"],SHA1:["orderCondition","*orderCondition"],SHA256:["orderCondition","*orderCondition"],SHA384:["orderCondition","*orderCondition"],SHA512:["orderCondition","*orderCondition"],COALESCE:["orderCondition","*orderCondition"],IF:["orderCondition","*orderCondition"],STRLANG:["orderCondition","*orderCondition"],STRDT:["orderCondition","*orderCondition"],SAMETERM:["orderCondition","*orderCondition"],ISIRI:["orderCondition","*orderCondition"],ISURI:["orderCondition","*orderCondition"],ISBLANK:["orderCondition","*orderCondition"],ISLITERAL:["orderCondition","*orderCondition"],ISNUMERIC:["orderCondition","*orderCondition"],SUBSTR:["orderCondition","*orderCondition"],REPLACE:["orderCondition","*orderCondition"],REGEX:["orderCondition","*orderCondition"],EXISTS:["orderCondition","*orderCondition"],NOT:["orderCondition","*orderCondition"],IRI_REF:["orderCondition","*orderCondition"],PNAME_LN:["orderCondition","*orderCondition"],PNAME_NS:["orderCondition","*orderCondition"],VALUES:[],LIMIT:[],OFFSET:[],$:[],"}":[]},"*usingClause":{USING:["usingClause","*usingClause"],WHERE:[]},"*var":{VAR1:["var","*var"],VAR2:["var","*var"],")":[]},"+graphNode":{"(":["graphNode","*graphNode"],"[":["graphNode","*graphNode"],VAR1:["graphNode","*graphNode"],VAR2:["graphNode","*graphNode"],NIL:["graphNode","*graphNode"],IRI_REF:["graphNode","*graphNode"],TRUE:["graphNode","*graphNode"],FALSE:["graphNode","*graphNode"],BLANK_NODE_LABEL:["graphNode","*graphNode"],ANON:["graphNode","*graphNode"],"<<":["graphNode","*graphNode"],PNAME_LN:["graphNode","*graphNode"],PNAME_NS:["graphNode","*graphNode"],STRING_LITERAL1:["graphNode","*graphNode"],STRING_LITERAL2:["graphNode","*graphNode"],STRING_LITERAL_LONG1:["graphNode","*graphNode"],STRING_LITERAL_LONG2:["graphNode","*graphNode"],INTEGER:["graphNode","*graphNode"],DECIMAL:["graphNode","*graphNode"],DOUBLE:["graphNode","*graphNode"],INTEGER_POSITIVE:["graphNode","*graphNode"],DECIMAL_POSITIVE:["graphNode","*graphNode"],DOUBLE_POSITIVE:["graphNode","*graphNode"],INTEGER_NEGATIVE:["graphNode","*graphNode"],DECIMAL_NEGATIVE:["graphNode","*graphNode"],DOUBLE_NEGATIVE:["graphNode","*graphNode"]},"+graphNodePath":{"(":["graphNodePath","*graphNodePath"],"[":["graphNodePath","*graphNodePath"],VAR1:["graphNodePath","*graphNodePath"],VAR2:["graphNodePath","*graphNodePath"],NIL:["graphNodePath","*graphNodePath"],IRI_REF:["graphNodePath","*graphNodePath"],TRUE:["graphNodePath","*graphNodePath"],FALSE:["graphNodePath","*graphNodePath"],BLANK_NODE_LABEL:["graphNodePath","*graphNodePath"],ANON:["graphNodePath","*graphNodePath"],"<<":["graphNodePath","*graphNodePath"],PNAME_LN:["graphNodePath","*graphNodePath"],PNAME_NS:["graphNodePath","*graphNodePath"],STRING_LITERAL1:["graphNodePath","*graphNodePath"],STRING_LITERAL2:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath","*graphNodePath"],INTEGER:["graphNodePath","*graphNodePath"],DECIMAL:["graphNodePath","*graphNodePath"],DOUBLE:["graphNodePath","*graphNodePath"],INTEGER_POSITIVE:["graphNodePath","*graphNodePath"],DECIMAL_POSITIVE:["graphNodePath","*graphNodePath"],DOUBLE_POSITIVE:["graphNodePath","*graphNodePath"],INTEGER_NEGATIVE:["graphNodePath","*graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath","*graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath","*graphNodePath"]},"+groupCondition":{"(":["groupCondition","*groupCondition"],STR:["groupCondition","*groupCondition"],LANG:["groupCondition","*groupCondition"],LANGMATCHES:["groupCondition","*groupCondition"],DATATYPE:["groupCondition","*groupCondition"],BOUND:["groupCondition","*groupCondition"],IRI:["groupCondition","*groupCondition"],URI:["groupCondition","*groupCondition"],BNODE:["groupCondition","*groupCondition"],RAND:["groupCondition","*groupCondition"],ABS:["groupCondition","*groupCondition"],CEIL:["groupCondition","*groupCondition"],FLOOR:["groupCondition","*groupCondition"],ROUND:["groupCondition","*groupCondition"],CONCAT:["groupCondition","*groupCondition"],STRLEN:["groupCondition","*groupCondition"],UCASE:["groupCondition","*groupCondition"],LCASE:["groupCondition","*groupCondition"],ENCODE_FOR_URI:["groupCondition","*groupCondition"],CONTAINS:["groupCondition","*groupCondition"],STRSTARTS:["groupCondition","*groupCondition"],STRENDS:["groupCondition","*groupCondition"],STRBEFORE:["groupCondition","*groupCondition"],STRAFTER:["groupCondition","*groupCondition"],YEAR:["groupCondition","*groupCondition"],MONTH:["groupCondition","*groupCondition"],DAY:["groupCondition","*groupCondition"],HOURS:["groupCondition","*groupCondition"],MINUTES:["groupCondition","*groupCondition"],SECONDS:["groupCondition","*groupCondition"],TIMEZONE:["groupCondition","*groupCondition"],TZ:["groupCondition","*groupCondition"],NOW:["groupCondition","*groupCondition"],UUID:["groupCondition","*groupCondition"],STRUUID:["groupCondition","*groupCondition"],MD5:["groupCondition","*groupCondition"],SHA1:["groupCondition","*groupCondition"],SHA256:["groupCondition","*groupCondition"],SHA384:["groupCondition","*groupCondition"],SHA512:["groupCondition","*groupCondition"],COALESCE:["groupCondition","*groupCondition"],IF:["groupCondition","*groupCondition"],STRLANG:["groupCondition","*groupCondition"],STRDT:["groupCondition","*groupCondition"],SAMETERM:["groupCondition","*groupCondition"],ISIRI:["groupCondition","*groupCondition"],ISURI:["groupCondition","*groupCondition"],ISBLANK:["groupCondition","*groupCondition"],ISLITERAL:["groupCondition","*groupCondition"],ISNUMERIC:["groupCondition","*groupCondition"],VAR1:["groupCondition","*groupCondition"],VAR2:["groupCondition","*groupCondition"],SUBSTR:["groupCondition","*groupCondition"],REPLACE:["groupCondition","*groupCondition"],REGEX:["groupCondition","*groupCondition"],EXISTS:["groupCondition","*groupCondition"],NOT:["groupCondition","*groupCondition"],IRI_REF:["groupCondition","*groupCondition"],PNAME_LN:["groupCondition","*groupCondition"],PNAME_NS:["groupCondition","*groupCondition"]},"+havingCondition":{"(":["havingCondition","*havingCondition"],STR:["havingCondition","*havingCondition"],LANG:["havingCondition","*havingCondition"],LANGMATCHES:["havingCondition","*havingCondition"],DATATYPE:["havingCondition","*havingCondition"],BOUND:["havingCondition","*havingCondition"],IRI:["havingCondition","*havingCondition"],URI:["havingCondition","*havingCondition"],BNODE:["havingCondition","*havingCondition"],RAND:["havingCondition","*havingCondition"],ABS:["havingCondition","*havingCondition"],CEIL:["havingCondition","*havingCondition"],FLOOR:["havingCondition","*havingCondition"],ROUND:["havingCondition","*havingCondition"],CONCAT:["havingCondition","*havingCondition"],STRLEN:["havingCondition","*havingCondition"],UCASE:["havingCondition","*havingCondition"],LCASE:["havingCondition","*havingCondition"],ENCODE_FOR_URI:["havingCondition","*havingCondition"],CONTAINS:["havingCondition","*havingCondition"],STRSTARTS:["havingCondition","*havingCondition"],STRENDS:["havingCondition","*havingCondition"],STRBEFORE:["havingCondition","*havingCondition"],STRAFTER:["havingCondition","*havingCondition"],YEAR:["havingCondition","*havingCondition"],MONTH:["havingCondition","*havingCondition"],DAY:["havingCondition","*havingCondition"],HOURS:["havingCondition","*havingCondition"],MINUTES:["havingCondition","*havingCondition"],SECONDS:["havingCondition","*havingCondition"],TIMEZONE:["havingCondition","*havingCondition"],TZ:["havingCondition","*havingCondition"],NOW:["havingCondition","*havingCondition"],UUID:["havingCondition","*havingCondition"],STRUUID:["havingCondition","*havingCondition"],MD5:["havingCondition","*havingCondition"],SHA1:["havingCondition","*havingCondition"],SHA256:["havingCondition","*havingCondition"],SHA384:["havingCondition","*havingCondition"],SHA512:["havingCondition","*havingCondition"],COALESCE:["havingCondition","*havingCondition"],IF:["havingCondition","*havingCondition"],STRLANG:["havingCondition","*havingCondition"],STRDT:["havingCondition","*havingCondition"],SAMETERM:["havingCondition","*havingCondition"],ISIRI:["havingCondition","*havingCondition"],ISURI:["havingCondition","*havingCondition"],ISBLANK:["havingCondition","*havingCondition"],ISLITERAL:["havingCondition","*havingCondition"],ISNUMERIC:["havingCondition","*havingCondition"],SUBSTR:["havingCondition","*havingCondition"],REPLACE:["havingCondition","*havingCondition"],REGEX:["havingCondition","*havingCondition"],EXISTS:["havingCondition","*havingCondition"],NOT:["havingCondition","*havingCondition"],IRI_REF:["havingCondition","*havingCondition"],PNAME_LN:["havingCondition","*havingCondition"],PNAME_NS:["havingCondition","*havingCondition"]},"+or([var,[(,expression,AS,var,)]])":{"(":["or([var,[(,expression,AS,var,)]])","*or([var,[(,expression,AS,var,)]])"],VAR1:["or([var,[(,expression,AS,var,)]])","*or([var,[(,expression,AS,var,)]])"],VAR2:["or([var,[(,expression,AS,var,)]])","*or([var,[(,expression,AS,var,)]])"]},"+or([varOrIRIref,embeddedTriple])":{"<<":["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],VAR1:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],VAR2:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],IRI_REF:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],PNAME_LN:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"],PNAME_NS:["or([varOrIRIref,embeddedTriple])","*or([varOrIRIref,embeddedTriple])"]},"+orderCondition":{ASC:["orderCondition","*orderCondition"],DESC:["orderCondition","*orderCondition"],VAR1:["orderCondition","*orderCondition"],VAR2:["orderCondition","*orderCondition"],"(":["orderCondition","*orderCondition"],STR:["orderCondition","*orderCondition"],LANG:["orderCondition","*orderCondition"],LANGMATCHES:["orderCondition","*orderCondition"],DATATYPE:["orderCondition","*orderCondition"],BOUND:["orderCondition","*orderCondition"],IRI:["orderCondition","*orderCondition"],URI:["orderCondition","*orderCondition"],BNODE:["orderCondition","*orderCondition"],RAND:["orderCondition","*orderCondition"],ABS:["orderCondition","*orderCondition"],CEIL:["orderCondition","*orderCondition"],FLOOR:["orderCondition","*orderCondition"],ROUND:["orderCondition","*orderCondition"],CONCAT:["orderCondition","*orderCondition"],STRLEN:["orderCondition","*orderCondition"],UCASE:["orderCondition","*orderCondition"],LCASE:["orderCondition","*orderCondition"],ENCODE_FOR_URI:["orderCondition","*orderCondition"],CONTAINS:["orderCondition","*orderCondition"],STRSTARTS:["orderCondition","*orderCondition"],STRENDS:["orderCondition","*orderCondition"],STRBEFORE:["orderCondition","*orderCondition"],STRAFTER:["orderCondition","*orderCondition"],YEAR:["orderCondition","*orderCondition"],MONTH:["orderCondition","*orderCondition"],DAY:["orderCondition","*orderCondition"],HOURS:["orderCondition","*orderCondition"],MINUTES:["orderCondition","*orderCondition"],SECONDS:["orderCondition","*orderCondition"],TIMEZONE:["orderCondition","*orderCondition"],TZ:["orderCondition","*orderCondition"],NOW:["orderCondition","*orderCondition"],UUID:["orderCondition","*orderCondition"],STRUUID:["orderCondition","*orderCondition"],MD5:["orderCondition","*orderCondition"],SHA1:["orderCondition","*orderCondition"],SHA256:["orderCondition","*orderCondition"],SHA384:["orderCondition","*orderCondition"],SHA512:["orderCondition","*orderCondition"],COALESCE:["orderCondition","*orderCondition"],IF:["orderCondition","*orderCondition"],STRLANG:["orderCondition","*orderCondition"],STRDT:["orderCondition","*orderCondition"],SAMETERM:["orderCondition","*orderCondition"],ISIRI:["orderCondition","*orderCondition"],ISURI:["orderCondition","*orderCondition"],ISBLANK:["orderCondition","*orderCondition"],ISLITERAL:["orderCondition","*orderCondition"],ISNUMERIC:["orderCondition","*orderCondition"],SUBSTR:["orderCondition","*orderCondition"],REPLACE:["orderCondition","*orderCondition"],REGEX:["orderCondition","*orderCondition"],EXISTS:["orderCondition","*orderCondition"],NOT:["orderCondition","*orderCondition"],IRI_REF:["orderCondition","*orderCondition"],PNAME_LN:["orderCondition","*orderCondition"],PNAME_NS:["orderCondition","*orderCondition"]},"?.":{".":["."],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?DISTINCT":{DISTINCT:["DISTINCT"],"!":[],"+":[],"-":[],VAR1:[],VAR2:[],"(":[],STR:[],LANG:[],LANGMATCHES:[],DATATYPE:[],BOUND:[],IRI:[],URI:[],BNODE:[],RAND:[],ABS:[],CEIL:[],FLOOR:[],ROUND:[],CONCAT:[],STRLEN:[],UCASE:[],LCASE:[],ENCODE_FOR_URI:[],CONTAINS:[],STRSTARTS:[],STRENDS:[],STRBEFORE:[],STRAFTER:[],YEAR:[],MONTH:[],DAY:[],HOURS:[],MINUTES:[],SECONDS:[],TIMEZONE:[],TZ:[],NOW:[],UUID:[],STRUUID:[],MD5:[],SHA1:[],SHA256:[],SHA384:[],SHA512:[],COALESCE:[],IF:[],STRLANG:[],STRDT:[],SAMETERM:[],ISIRI:[],ISURI:[],ISBLANK:[],ISLITERAL:[],ISNUMERIC:[],TRUE:[],FALSE:[],"<<":[],COUNT:[],SUM:[],MIN:[],MAX:[],AVG:[],SAMPLE:[],GROUP_CONCAT:[],SUBSTR:[],REPLACE:[],REGEX:[],EXISTS:[],NOT:[],IRI_REF:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],PNAME_LN:[],PNAME_NS:[],"*":[]},"?GRAPH":{GRAPH:["GRAPH"],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT":{SILENT:["SILENT"],VAR1:[],VAR2:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT_1":{SILENT:["SILENT"],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT_2":{SILENT:["SILENT"],GRAPH:[],DEFAULT:[],NAMED:[],ALL:[]},"?SILENT_3":{SILENT:["SILENT"],GRAPH:[]},"?SILENT_4":{SILENT:["SILENT"],DEFAULT:[],GRAPH:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?WHERE":{WHERE:["WHERE"],"{":[]},"?[,,expression]":{",":["[,,expression]"],")":[]},"?[.,?constructTriples]":{".":["[.,?constructTriples]"],"}":[]},"?[.,?triplesBlock]":{".":["[.,?triplesBlock]"],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?[.,?triplesTemplate]":{".":["[.,?triplesTemplate]"],"}":[],GRAPH:[]},"?[;,SEPARATOR,=,string]":{";":["[;,SEPARATOR,=,string]"],")":[]},"?[;,update]":{";":["[;,update]"],$:[]},"?[AS,var]":{AS:["[AS,var]"],")":[]},"?[INTO,graphRef]":{INTO:["[INTO,graphRef]"],";":[],$:[]},"?[or([verbPath,verbSimple]),objectList]":{VAR1:["[or([verbPath,verbSimple]),objectList]"],VAR2:["[or([verbPath,verbSimple]),objectList]"],"^":["[or([verbPath,verbSimple]),objectList]"],a:["[or([verbPath,verbSimple]),objectList]"],"!":["[or([verbPath,verbSimple]),objectList]"],"(":["[or([verbPath,verbSimple]),objectList]"],IRI_REF:["[or([verbPath,verbSimple]),objectList]"],PNAME_LN:["[or([verbPath,verbSimple]),objectList]"],PNAME_NS:["[or([verbPath,verbSimple]),objectList]"],";":[],".":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"?[pathOneInPropertySet,*[|,pathOneInPropertySet]]":{a:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],"^":["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],IRI_REF:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],PNAME_LN:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],PNAME_NS:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],")":[]},"?[update1,?[;,update]]":{INSERT:["[update1,?[;,update]]"],DELETE:["[update1,?[;,update]]"],LOAD:["[update1,?[;,update]]"],CLEAR:["[update1,?[;,update]]"],DROP:["[update1,?[;,update]]"],ADD:["[update1,?[;,update]]"],MOVE:["[update1,?[;,update]]"],COPY:["[update1,?[;,update]]"],CREATE:["[update1,?[;,update]]"],WITH:["[update1,?[;,update]]"],$:[]},"?argList":{NIL:["argList"],"(":["argList"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],"*":[],"/":[],";":[]},"?constructTriples":{VAR1:["constructTriples"],VAR2:["constructTriples"],NIL:["constructTriples"],"(":["constructTriples"],"[":["constructTriples"],IRI_REF:["constructTriples"],TRUE:["constructTriples"],FALSE:["constructTriples"],BLANK_NODE_LABEL:["constructTriples"],ANON:["constructTriples"],"<<":["constructTriples"],PNAME_LN:["constructTriples"],PNAME_NS:["constructTriples"],STRING_LITERAL1:["constructTriples"],STRING_LITERAL2:["constructTriples"],STRING_LITERAL_LONG1:["constructTriples"],STRING_LITERAL_LONG2:["constructTriples"],INTEGER:["constructTriples"],DECIMAL:["constructTriples"],DOUBLE:["constructTriples"],INTEGER_POSITIVE:["constructTriples"],DECIMAL_POSITIVE:["constructTriples"],DOUBLE_POSITIVE:["constructTriples"],INTEGER_NEGATIVE:["constructTriples"],DECIMAL_NEGATIVE:["constructTriples"],DOUBLE_NEGATIVE:["constructTriples"],"}":[]},"?groupClause":{GROUP:["groupClause"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],HAVING:[],$:[],"}":[]},"?havingClause":{HAVING:["havingClause"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],$:[],"}":[]},"?insertClause":{INSERT:["insertClause"],WHERE:[],USING:[]},"?limitClause":{LIMIT:["limitClause"],VALUES:[],$:[],"}":[]},"?limitOffsetClauses":{LIMIT:["limitOffsetClauses"],OFFSET:["limitOffsetClauses"],VALUES:[],$:[],"}":[]},"?offsetClause":{OFFSET:["offsetClause"],VALUES:[],$:[],"}":[]},"?or([DISTINCT,REDUCED])":{DISTINCT:["or([DISTINCT,REDUCED])"],REDUCED:["or([DISTINCT,REDUCED])"],"*":[],"(":[],VAR1:[],VAR2:[]},"?or([LANGTAG,[^^,iriRef]])":{LANGTAG:["or([LANGTAG,[^^,iriRef]])"],"^^":["or([LANGTAG,[^^,iriRef]])"],UNDEF:[],IRI_REF:[],TRUE:[],FALSE:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],VAR1:[],VAR2:[],"^":[],a:[],"!":[],"(":[],".":[],";":[],",":[],AS:[],")":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],"*":[],"/":[],"}":[],">>":[],"[":[],NIL:[],BLANK_NODE_LABEL:[],ANON:[],"]":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"?or([[*,unaryExpression],[/,unaryExpression]])":{"*":["or([[*,unaryExpression],[/,unaryExpression]])"],"/":["or([[*,unaryExpression],[/,unaryExpression]])"],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],";":[]},"?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])":{"=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"!=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],">":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],">=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IN:["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOT:["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],AS:[],")":[],",":[],"||":[],"&&":[],";":[]},"?orderClause":{ORDER:["orderClause"],VALUES:[],LIMIT:[],OFFSET:[],$:[],"}":[]},"?pathMod":{"*":["pathMod"],"?":["pathMod"],"+":["pathMod"],"{":["pathMod"],"|":[],"/":[],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"?triplesBlock":{VAR1:["triplesBlock"],VAR2:["triplesBlock"],NIL:["triplesBlock"],"(":["triplesBlock"],"[":["triplesBlock"],IRI_REF:["triplesBlock"],TRUE:["triplesBlock"],FALSE:["triplesBlock"],BLANK_NODE_LABEL:["triplesBlock"],ANON:["triplesBlock"],"<<":["triplesBlock"],PNAME_LN:["triplesBlock"],PNAME_NS:["triplesBlock"],STRING_LITERAL1:["triplesBlock"],STRING_LITERAL2:["triplesBlock"],STRING_LITERAL_LONG1:["triplesBlock"],STRING_LITERAL_LONG2:["triplesBlock"],INTEGER:["triplesBlock"],DECIMAL:["triplesBlock"],DOUBLE:["triplesBlock"],INTEGER_POSITIVE:["triplesBlock"],DECIMAL_POSITIVE:["triplesBlock"],DOUBLE_POSITIVE:["triplesBlock"],INTEGER_NEGATIVE:["triplesBlock"],DECIMAL_NEGATIVE:["triplesBlock"],DOUBLE_NEGATIVE:["triplesBlock"],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?triplesTemplate":{VAR1:["triplesTemplate"],VAR2:["triplesTemplate"],NIL:["triplesTemplate"],"(":["triplesTemplate"],"[":["triplesTemplate"],IRI_REF:["triplesTemplate"],TRUE:["triplesTemplate"],FALSE:["triplesTemplate"],BLANK_NODE_LABEL:["triplesTemplate"],ANON:["triplesTemplate"],"<<":["triplesTemplate"],PNAME_LN:["triplesTemplate"],PNAME_NS:["triplesTemplate"],STRING_LITERAL1:["triplesTemplate"],STRING_LITERAL2:["triplesTemplate"],STRING_LITERAL_LONG1:["triplesTemplate"],STRING_LITERAL_LONG2:["triplesTemplate"],INTEGER:["triplesTemplate"],DECIMAL:["triplesTemplate"],DOUBLE:["triplesTemplate"],INTEGER_POSITIVE:["triplesTemplate"],DECIMAL_POSITIVE:["triplesTemplate"],DOUBLE_POSITIVE:["triplesTemplate"],INTEGER_NEGATIVE:["triplesTemplate"],DECIMAL_NEGATIVE:["triplesTemplate"],DOUBLE_NEGATIVE:["triplesTemplate"],"}":[],GRAPH:[]},"?whereClause":{WHERE:["whereClause"],"{":["whereClause"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],VALUES:[],$:[]},"[!=,numericExpression]":{"!=":["!=","numericExpression"]},"[&&,valueLogical]":{"&&":["&&","valueLogical"]},"[(,*dataBlockValue,)]":{"(":["(","*dataBlockValue",")"]},"[(,*var,)]":{"(":["(","*var",")"]},"[(,expression,)]":{"(":["(","expression",")"]},"[(,expression,AS,var,)]":{"(":["(","expression","AS","var",")"]},"[*,unaryExpression]":{"*":["*","unaryExpression"]},"[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]":{WHERE:["*datasetClause","WHERE","{","?triplesTemplate","}","solutionModifier"],FROM:["*datasetClause","WHERE","{","?triplesTemplate","}","solutionModifier"]},"[+,multiplicativeExpression]":{"+":["+","multiplicativeExpression"]},"[,,expression]":{",":[",","expression"]},"[,,integer,}]":{",":[",","integer","}"]},"[,,objectPath]":{",":[",","objectPath"]},"[,,object]":{",":[",","object"]},"[,,or([},[integer,}]])]":{",":[",","or([},[integer,}]])"]},"[-,multiplicativeExpression]":{"-":["-","multiplicativeExpression"]},"[.,?constructTriples]":{".":[".","?constructTriples"]},"[.,?triplesBlock]":{".":[".","?triplesBlock"]},"[.,?triplesTemplate]":{".":[".","?triplesTemplate"]},"[/,pathEltOrInverse]":{"/":["/","pathEltOrInverse"]},"[/,unaryExpression]":{"/":["/","unaryExpression"]},"[;,?[or([verbPath,verbSimple]),objectList]]":{";":[";","?[or([verbPath,verbSimple]),objectList]"]},"[;,SEPARATOR,=,string]":{";":[";","SEPARATOR","=","string"]},"[;,update]":{";":[";","update"]},"[<,numericExpression]":{"<":["<","numericExpression"]},"[<=,numericExpression]":{"<=":["<=","numericExpression"]},"[=,numericExpression]":{"=":["=","numericExpression"]},"[>,numericExpression]":{">":[">","numericExpression"]},"[>=,numericExpression]":{">=":[">=","numericExpression"]},"[AS,var]":{AS:["AS","var"]},"[IN,expressionList]":{IN:["IN","expressionList"]},"[INTO,graphRef]":{INTO:["INTO","graphRef"]},"[NAMED,iriRef]":{NAMED:["NAMED","iriRef"]},"[NOT,IN,expressionList]":{NOT:["NOT","IN","expressionList"]},"[UNION,groupGraphPattern]":{UNION:["UNION","groupGraphPattern"]},"[^^,iriRef]":{"^^":["^^","iriRef"]},"[constructTemplate,*datasetClause,whereClause,solutionModifier]":{"{":["constructTemplate","*datasetClause","whereClause","solutionModifier"]},"[deleteClause,?insertClause]":{DELETE:["deleteClause","?insertClause"]},"[graphPatternNotTriples,?.,?triplesBlock]":{"{":["graphPatternNotTriples","?.","?triplesBlock"],OPTIONAL:["graphPatternNotTriples","?.","?triplesBlock"],MINUS:["graphPatternNotTriples","?.","?triplesBlock"],GRAPH:["graphPatternNotTriples","?.","?triplesBlock"],SERVICE:["graphPatternNotTriples","?.","?triplesBlock"],FILTER:["graphPatternNotTriples","?.","?triplesBlock"],BIND:["graphPatternNotTriples","?.","?triplesBlock"],VALUES:["graphPatternNotTriples","?.","?triplesBlock"]},"[integer,or([[,,or([},[integer,}]])],}])]":{INTEGER:["integer","or([[,,or([},[integer,}]])],}])"]},"[integer,}]":{INTEGER:["integer","}"]},"[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]":{INTEGER_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"]},"[or([verbPath,verbSimple]),objectList]":{VAR1:["or([verbPath,verbSimple])","objectList"],VAR2:["or([verbPath,verbSimple])","objectList"],"^":["or([verbPath,verbSimple])","objectList"],a:["or([verbPath,verbSimple])","objectList"],"!":["or([verbPath,verbSimple])","objectList"],"(":["or([verbPath,verbSimple])","objectList"],IRI_REF:["or([verbPath,verbSimple])","objectList"],PNAME_LN:["or([verbPath,verbSimple])","objectList"],PNAME_NS:["or([verbPath,verbSimple])","objectList"]},"[pathOneInPropertySet,*[|,pathOneInPropertySet]]":{a:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],"^":["pathOneInPropertySet","*[|,pathOneInPropertySet]"],IRI_REF:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],PNAME_LN:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],PNAME_NS:["pathOneInPropertySet","*[|,pathOneInPropertySet]"]},"[quadsNotTriples,?.,?triplesTemplate]":{GRAPH:["quadsNotTriples","?.","?triplesTemplate"]},"[update1,?[;,update]]":{INSERT:["update1","?[;,update]"],DELETE:["update1","?[;,update]"],LOAD:["update1","?[;,update]"],CLEAR:["update1","?[;,update]"],DROP:["update1","?[;,update]"],ADD:["update1","?[;,update]"],MOVE:["update1","?[;,update]"],COPY:["update1","?[;,update]"],CREATE:["update1","?[;,update]"],WITH:["update1","?[;,update]"]},"[|,pathOneInPropertySet]":{"|":["|","pathOneInPropertySet"]},"[|,pathSequence]":{"|":["|","pathSequence"]},"[||,conditionalAndExpression]":{"||":["||","conditionalAndExpression"]},add:{ADD:["ADD","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},additiveExpression:{"!":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"+":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"-":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],VAR1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],VAR2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"(":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LANG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LANGMATCHES:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DATATYPE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],BOUND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IRI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],URI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],BNODE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],RAND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ABS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CEIL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],FLOOR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ROUND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CONCAT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRLEN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],UCASE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LCASE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ENCODE_FOR_URI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CONTAINS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRSTARTS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRENDS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRBEFORE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRAFTER:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],YEAR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MONTH:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DAY:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],HOURS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MINUTES:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SECONDS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TIMEZONE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TZ:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],NOW:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],UUID:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRUUID:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MD5:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA256:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA384:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA512:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],COALESCE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IF:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRLANG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRDT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SAMETERM:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISIRI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISURI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISBLANK:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISLITERAL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISNUMERIC:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TRUE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],FALSE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"<<":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],COUNT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SUM:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MIN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MAX:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],AVG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SAMPLE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],GROUP_CONCAT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SUBSTR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],REPLACE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],REGEX:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],EXISTS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],NOT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IRI_REF:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL_LONG1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL_LONG2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],PNAME_LN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],PNAME_NS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"]},aggregate:{COUNT:["COUNT","(","?DISTINCT","or([*,expression])",")"],SUM:["SUM","(","?DISTINCT","expression",")"],MIN:["MIN","(","?DISTINCT","expression",")"],MAX:["MAX","(","?DISTINCT","expression",")"],AVG:["AVG","(","?DISTINCT","expression",")"],SAMPLE:["SAMPLE","(","?DISTINCT","expression",")"],GROUP_CONCAT:["GROUP_CONCAT","(","?DISTINCT","expression","?[;,SEPARATOR,=,string]",")"]},allowBnodes:{"}":[]},allowVars:{"}":[],UNDEF:[],IRI_REF:[],TRUE:[],FALSE:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],")":[]},argList:{NIL:["NIL"],"(":["(","?DISTINCT","expression","*[,,expression]",")"]},askQuery:{ASK:["ASK","*datasetClause","whereClause","solutionModifier"]},baseDecl:{BASE:["BASE","IRI_REF"]},bind:{BIND:["BIND","(","expression","AS","var",")"]},blankNode:{BLANK_NODE_LABEL:["BLANK_NODE_LABEL"],ANON:["ANON"]},blankNodePropertyList:{"[":["[","propertyListNotEmpty","]"]},blankNodePropertyListPath:{"[":["[","propertyListPathNotEmpty","]"]},booleanLiteral:{TRUE:["TRUE"],FALSE:["FALSE"]},brackettedExpression:{"(":["(","expression",")"]},builtInCall:{STR:["STR","(","expression",")"],LANG:["LANG","(","expression",")"],LANGMATCHES:["LANGMATCHES","(","expression",",","expression",")"],DATATYPE:["DATATYPE","(","expression",")"],BOUND:["BOUND","(","var",")"],IRI:["IRI","(","expression",")"],URI:["URI","(","expression",")"],BNODE:["BNODE","or([[(,expression,)],NIL])"],RAND:["RAND","NIL"],ABS:["ABS","(","expression",")"],CEIL:["CEIL","(","expression",")"],FLOOR:["FLOOR","(","expression",")"],ROUND:["ROUND","(","expression",")"],CONCAT:["CONCAT","expressionList"],SUBSTR:["substringExpression"],STRLEN:["STRLEN","(","expression",")"],REPLACE:["strReplaceExpression"],UCASE:["UCASE","(","expression",")"],LCASE:["LCASE","(","expression",")"],ENCODE_FOR_URI:["ENCODE_FOR_URI","(","expression",")"],CONTAINS:["CONTAINS","(","expression",",","expression",")"],STRSTARTS:["STRSTARTS","(","expression",",","expression",")"],STRENDS:["STRENDS","(","expression",",","expression",")"],STRBEFORE:["STRBEFORE","(","expression",",","expression",")"],STRAFTER:["STRAFTER","(","expression",",","expression",")"],YEAR:["YEAR","(","expression",")"],MONTH:["MONTH","(","expression",")"],DAY:["DAY","(","expression",")"],HOURS:["HOURS","(","expression",")"],MINUTES:["MINUTES","(","expression",")"],SECONDS:["SECONDS","(","expression",")"],TIMEZONE:["TIMEZONE","(","expression",")"],TZ:["TZ","(","expression",")"],NOW:["NOW","NIL"],UUID:["UUID","NIL"],STRUUID:["STRUUID","NIL"],MD5:["MD5","(","expression",")"],SHA1:["SHA1","(","expression",")"],SHA256:["SHA256","(","expression",")"],SHA384:["SHA384","(","expression",")"],SHA512:["SHA512","(","expression",")"],COALESCE:["COALESCE","expressionList"],IF:["IF","(","expression",",","expression",",","expression",")"],STRLANG:["STRLANG","(","expression",",","expression",")"],STRDT:["STRDT","(","expression",",","expression",")"],SAMETERM:["SAMETERM","(","expression",",","expression",")"],ISIRI:["ISIRI","(","expression",")"],ISURI:["ISURI","(","expression",")"],ISBLANK:["ISBLANK","(","expression",")"],ISLITERAL:["ISLITERAL","(","expression",")"],ISNUMERIC:["ISNUMERIC","(","expression",")"],REGEX:["regexExpression"],EXISTS:["existsFunc"],NOT:["notExistsFunc"]},clear:{CLEAR:["CLEAR","?SILENT_2","graphRefAll"]},collection:{"(":["(","+graphNode",")"]},collectionPath:{"(":["(","+graphNodePath",")"]},conditionalAndExpression:{"!":["valueLogical","*[&&,valueLogical]"],"+":["valueLogical","*[&&,valueLogical]"],"-":["valueLogical","*[&&,valueLogical]"],VAR1:["valueLogical","*[&&,valueLogical]"],VAR2:["valueLogical","*[&&,valueLogical]"],"(":["valueLogical","*[&&,valueLogical]"],STR:["valueLogical","*[&&,valueLogical]"],LANG:["valueLogical","*[&&,valueLogical]"],LANGMATCHES:["valueLogical","*[&&,valueLogical]"],DATATYPE:["valueLogical","*[&&,valueLogical]"],BOUND:["valueLogical","*[&&,valueLogical]"],IRI:["valueLogical","*[&&,valueLogical]"],URI:["valueLogical","*[&&,valueLogical]"],BNODE:["valueLogical","*[&&,valueLogical]"],RAND:["valueLogical","*[&&,valueLogical]"],ABS:["valueLogical","*[&&,valueLogical]"],CEIL:["valueLogical","*[&&,valueLogical]"],FLOOR:["valueLogical","*[&&,valueLogical]"],ROUND:["valueLogical","*[&&,valueLogical]"],CONCAT:["valueLogical","*[&&,valueLogical]"],STRLEN:["valueLogical","*[&&,valueLogical]"],UCASE:["valueLogical","*[&&,valueLogical]"],LCASE:["valueLogical","*[&&,valueLogical]"],ENCODE_FOR_URI:["valueLogical","*[&&,valueLogical]"],CONTAINS:["valueLogical","*[&&,valueLogical]"],STRSTARTS:["valueLogical","*[&&,valueLogical]"],STRENDS:["valueLogical","*[&&,valueLogical]"],STRBEFORE:["valueLogical","*[&&,valueLogical]"],STRAFTER:["valueLogical","*[&&,valueLogical]"],YEAR:["valueLogical","*[&&,valueLogical]"],MONTH:["valueLogical","*[&&,valueLogical]"],DAY:["valueLogical","*[&&,valueLogical]"],HOURS:["valueLogical","*[&&,valueLogical]"],MINUTES:["valueLogical","*[&&,valueLogical]"],SECONDS:["valueLogical","*[&&,valueLogical]"],TIMEZONE:["valueLogical","*[&&,valueLogical]"],TZ:["valueLogical","*[&&,valueLogical]"],NOW:["valueLogical","*[&&,valueLogical]"],UUID:["valueLogical","*[&&,valueLogical]"],STRUUID:["valueLogical","*[&&,valueLogical]"],MD5:["valueLogical","*[&&,valueLogical]"],SHA1:["valueLogical","*[&&,valueLogical]"],SHA256:["valueLogical","*[&&,valueLogical]"],SHA384:["valueLogical","*[&&,valueLogical]"],SHA512:["valueLogical","*[&&,valueLogical]"],COALESCE:["valueLogical","*[&&,valueLogical]"],IF:["valueLogical","*[&&,valueLogical]"],STRLANG:["valueLogical","*[&&,valueLogical]"],STRDT:["valueLogical","*[&&,valueLogical]"],SAMETERM:["valueLogical","*[&&,valueLogical]"],ISIRI:["valueLogical","*[&&,valueLogical]"],ISURI:["valueLogical","*[&&,valueLogical]"],ISBLANK:["valueLogical","*[&&,valueLogical]"],ISLITERAL:["valueLogical","*[&&,valueLogical]"],ISNUMERIC:["valueLogical","*[&&,valueLogical]"],TRUE:["valueLogical","*[&&,valueLogical]"],FALSE:["valueLogical","*[&&,valueLogical]"],"<<":["valueLogical","*[&&,valueLogical]"],COUNT:["valueLogical","*[&&,valueLogical]"],SUM:["valueLogical","*[&&,valueLogical]"],MIN:["valueLogical","*[&&,valueLogical]"],MAX:["valueLogical","*[&&,valueLogical]"],AVG:["valueLogical","*[&&,valueLogical]"],SAMPLE:["valueLogical","*[&&,valueLogical]"],GROUP_CONCAT:["valueLogical","*[&&,valueLogical]"],SUBSTR:["valueLogical","*[&&,valueLogical]"],REPLACE:["valueLogical","*[&&,valueLogical]"],REGEX:["valueLogical","*[&&,valueLogical]"],EXISTS:["valueLogical","*[&&,valueLogical]"],NOT:["valueLogical","*[&&,valueLogical]"],IRI_REF:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL1:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL2:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL_LONG1:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL_LONG2:["valueLogical","*[&&,valueLogical]"],INTEGER:["valueLogical","*[&&,valueLogical]"],DECIMAL:["valueLogical","*[&&,valueLogical]"],DOUBLE:["valueLogical","*[&&,valueLogical]"],INTEGER_POSITIVE:["valueLogical","*[&&,valueLogical]"],DECIMAL_POSITIVE:["valueLogical","*[&&,valueLogical]"],DOUBLE_POSITIVE:["valueLogical","*[&&,valueLogical]"],INTEGER_NEGATIVE:["valueLogical","*[&&,valueLogical]"],DECIMAL_NEGATIVE:["valueLogical","*[&&,valueLogical]"],DOUBLE_NEGATIVE:["valueLogical","*[&&,valueLogical]"],PNAME_LN:["valueLogical","*[&&,valueLogical]"],PNAME_NS:["valueLogical","*[&&,valueLogical]"]},conditionalOrExpression:{"!":["conditionalAndExpression","*[||,conditionalAndExpression]"],"+":["conditionalAndExpression","*[||,conditionalAndExpression]"],"-":["conditionalAndExpression","*[||,conditionalAndExpression]"],VAR1:["conditionalAndExpression","*[||,conditionalAndExpression]"],VAR2:["conditionalAndExpression","*[||,conditionalAndExpression]"],"(":["conditionalAndExpression","*[||,conditionalAndExpression]"],STR:["conditionalAndExpression","*[||,conditionalAndExpression]"],LANG:["conditionalAndExpression","*[||,conditionalAndExpression]"],LANGMATCHES:["conditionalAndExpression","*[||,conditionalAndExpression]"],DATATYPE:["conditionalAndExpression","*[||,conditionalAndExpression]"],BOUND:["conditionalAndExpression","*[||,conditionalAndExpression]"],IRI:["conditionalAndExpression","*[||,conditionalAndExpression]"],URI:["conditionalAndExpression","*[||,conditionalAndExpression]"],BNODE:["conditionalAndExpression","*[||,conditionalAndExpression]"],RAND:["conditionalAndExpression","*[||,conditionalAndExpression]"],ABS:["conditionalAndExpression","*[||,conditionalAndExpression]"],CEIL:["conditionalAndExpression","*[||,conditionalAndExpression]"],FLOOR:["conditionalAndExpression","*[||,conditionalAndExpression]"],ROUND:["conditionalAndExpression","*[||,conditionalAndExpression]"],CONCAT:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRLEN:["conditionalAndExpression","*[||,conditionalAndExpression]"],UCASE:["conditionalAndExpression","*[||,conditionalAndExpression]"],LCASE:["conditionalAndExpression","*[||,conditionalAndExpression]"],ENCODE_FOR_URI:["conditionalAndExpression","*[||,conditionalAndExpression]"],CONTAINS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRSTARTS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRENDS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRBEFORE:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRAFTER:["conditionalAndExpression","*[||,conditionalAndExpression]"],YEAR:["conditionalAndExpression","*[||,conditionalAndExpression]"],MONTH:["conditionalAndExpression","*[||,conditionalAndExpression]"],DAY:["conditionalAndExpression","*[||,conditionalAndExpression]"],HOURS:["conditionalAndExpression","*[||,conditionalAndExpression]"],MINUTES:["conditionalAndExpression","*[||,conditionalAndExpression]"],SECONDS:["conditionalAndExpression","*[||,conditionalAndExpression]"],TIMEZONE:["conditionalAndExpression","*[||,conditionalAndExpression]"],TZ:["conditionalAndExpression","*[||,conditionalAndExpression]"],NOW:["conditionalAndExpression","*[||,conditionalAndExpression]"],UUID:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRUUID:["conditionalAndExpression","*[||,conditionalAndExpression]"],MD5:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA1:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA256:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA384:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA512:["conditionalAndExpression","*[||,conditionalAndExpression]"],COALESCE:["conditionalAndExpression","*[||,conditionalAndExpression]"],IF:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRLANG:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRDT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SAMETERM:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISIRI:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISURI:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISBLANK:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISLITERAL:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISNUMERIC:["conditionalAndExpression","*[||,conditionalAndExpression]"],TRUE:["conditionalAndExpression","*[||,conditionalAndExpression]"],FALSE:["conditionalAndExpression","*[||,conditionalAndExpression]"],"<<":["conditionalAndExpression","*[||,conditionalAndExpression]"],COUNT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SUM:["conditionalAndExpression","*[||,conditionalAndExpression]"],MIN:["conditionalAndExpression","*[||,conditionalAndExpression]"],MAX:["conditionalAndExpression","*[||,conditionalAndExpression]"],AVG:["conditionalAndExpression","*[||,conditionalAndExpression]"],SAMPLE:["conditionalAndExpression","*[||,conditionalAndExpression]"],GROUP_CONCAT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SUBSTR:["conditionalAndExpression","*[||,conditionalAndExpression]"],REPLACE:["conditionalAndExpression","*[||,conditionalAndExpression]"],REGEX:["conditionalAndExpression","*[||,conditionalAndExpression]"],EXISTS:["conditionalAndExpression","*[||,conditionalAndExpression]"],NOT:["conditionalAndExpression","*[||,conditionalAndExpression]"],IRI_REF:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL1:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL2:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL_LONG1:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL_LONG2:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],PNAME_LN:["conditionalAndExpression","*[||,conditionalAndExpression]"],PNAME_NS:["conditionalAndExpression","*[||,conditionalAndExpression]"]},constraint:{"(":["brackettedExpression"],STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],STRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["functionCall"],PNAME_LN:["functionCall"],PNAME_NS:["functionCall"]},constructQuery:{CONSTRUCT:["CONSTRUCT","or([[constructTemplate,*datasetClause,whereClause,solutionModifier],[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]])"]},constructTemplate:{"{":["{","?constructTriples","}"]},constructTriples:{VAR1:["triplesSameSubject","?[.,?constructTriples]"],VAR2:["triplesSameSubject","?[.,?constructTriples]"],NIL:["triplesSameSubject","?[.,?constructTriples]"],"(":["triplesSameSubject","?[.,?constructTriples]"],"[":["triplesSameSubject","?[.,?constructTriples]"],IRI_REF:["triplesSameSubject","?[.,?constructTriples]"],TRUE:["triplesSameSubject","?[.,?constructTriples]"],FALSE:["triplesSameSubject","?[.,?constructTriples]"],BLANK_NODE_LABEL:["triplesSameSubject","?[.,?constructTriples]"],ANON:["triplesSameSubject","?[.,?constructTriples]"],"<<":["triplesSameSubject","?[.,?constructTriples]"],PNAME_LN:["triplesSameSubject","?[.,?constructTriples]"],PNAME_NS:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL1:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL2:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL_LONG1:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL_LONG2:["triplesSameSubject","?[.,?constructTriples]"],INTEGER:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE:["triplesSameSubject","?[.,?constructTriples]"],INTEGER_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],INTEGER_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"]},copy:{COPY:["COPY","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},create:{CREATE:["CREATE","?SILENT_3","graphRef"]},dataBlock:{NIL:["or([inlineDataOneVar,inlineDataFull])"],"(":["or([inlineDataOneVar,inlineDataFull])"],VAR1:["or([inlineDataOneVar,inlineDataFull])"],VAR2:["or([inlineDataOneVar,inlineDataFull])"]},dataBlockValue:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERAL2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],"<<":["disallowVars","embeddedTriple","allowVars"],UNDEF:["UNDEF"]},datasetClause:{FROM:["FROM","or([defaultGraphClause,namedGraphClause])"]},defaultGraphClause:{IRI_REF:["sourceSelector"],PNAME_LN:["sourceSelector"],PNAME_NS:["sourceSelector"]},delete1:{DATA:["DATA","quadDataNoBnodes"],WHERE:["WHERE","quadPatternNoBnodes"],"{":["quadPatternNoBnodes","?insertClause","*usingClause","WHERE","groupGraphPattern"]},deleteClause:{DELETE:["DELETE","quadPattern"]},describeDatasetClause:{FROM:["FROM","or([defaultGraphClause,namedGraphClause])"]},describeQuery:{DESCRIBE:["DESCRIBE","or([+or([varOrIRIref,embeddedTriple]),*])","*describeDatasetClause","?whereClause","solutionModifier"]},disallowBnodes:{"}":[],GRAPH:[],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},disallowVars:{"}":[],GRAPH:[],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],"<<":[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},drop:{DROP:["DROP","?SILENT_2","graphRefAll"]},embeddedTriple:{"<<":["<<","varOrTerm","verb","varOrTerm",">>"]},existsFunc:{EXISTS:["EXISTS","groupGraphPattern"]},expression:{"!":["conditionalOrExpression"],"+":["conditionalOrExpression"],"-":["conditionalOrExpression"],VAR1:["conditionalOrExpression"],VAR2:["conditionalOrExpression"],"(":["conditionalOrExpression"],STR:["conditionalOrExpression"],LANG:["conditionalOrExpression"],LANGMATCHES:["conditionalOrExpression"],DATATYPE:["conditionalOrExpression"],BOUND:["conditionalOrExpression"],IRI:["conditionalOrExpression"],URI:["conditionalOrExpression"],BNODE:["conditionalOrExpression"],RAND:["conditionalOrExpression"],ABS:["conditionalOrExpression"],CEIL:["conditionalOrExpression"],FLOOR:["conditionalOrExpression"],ROUND:["conditionalOrExpression"],CONCAT:["conditionalOrExpression"],STRLEN:["conditionalOrExpression"],UCASE:["conditionalOrExpression"],LCASE:["conditionalOrExpression"],ENCODE_FOR_URI:["conditionalOrExpression"],CONTAINS:["conditionalOrExpression"],STRSTARTS:["conditionalOrExpression"],STRENDS:["conditionalOrExpression"],STRBEFORE:["conditionalOrExpression"],STRAFTER:["conditionalOrExpression"],YEAR:["conditionalOrExpression"],MONTH:["conditionalOrExpression"],DAY:["conditionalOrExpression"],HOURS:["conditionalOrExpression"],MINUTES:["conditionalOrExpression"],SECONDS:["conditionalOrExpression"],TIMEZONE:["conditionalOrExpression"],TZ:["conditionalOrExpression"],NOW:["conditionalOrExpression"],UUID:["conditionalOrExpression"],STRUUID:["conditionalOrExpression"],MD5:["conditionalOrExpression"],SHA1:["conditionalOrExpression"],SHA256:["conditionalOrExpression"],SHA384:["conditionalOrExpression"],SHA512:["conditionalOrExpression"],COALESCE:["conditionalOrExpression"],IF:["conditionalOrExpression"],STRLANG:["conditionalOrExpression"],STRDT:["conditionalOrExpression"],SAMETERM:["conditionalOrExpression"],ISIRI:["conditionalOrExpression"],ISURI:["conditionalOrExpression"],ISBLANK:["conditionalOrExpression"],ISLITERAL:["conditionalOrExpression"],ISNUMERIC:["conditionalOrExpression"],TRUE:["conditionalOrExpression"],FALSE:["conditionalOrExpression"],"<<":["conditionalOrExpression"],COUNT:["conditionalOrExpression"],SUM:["conditionalOrExpression"],MIN:["conditionalOrExpression"],MAX:["conditionalOrExpression"],AVG:["conditionalOrExpression"],SAMPLE:["conditionalOrExpression"],GROUP_CONCAT:["conditionalOrExpression"],SUBSTR:["conditionalOrExpression"],REPLACE:["conditionalOrExpression"],REGEX:["conditionalOrExpression"],EXISTS:["conditionalOrExpression"],NOT:["conditionalOrExpression"],IRI_REF:["conditionalOrExpression"],STRING_LITERAL1:["conditionalOrExpression"],STRING_LITERAL2:["conditionalOrExpression"],STRING_LITERAL_LONG1:["conditionalOrExpression"],STRING_LITERAL_LONG2:["conditionalOrExpression"],INTEGER:["conditionalOrExpression"],DECIMAL:["conditionalOrExpression"],DOUBLE:["conditionalOrExpression"],INTEGER_POSITIVE:["conditionalOrExpression"],DECIMAL_POSITIVE:["conditionalOrExpression"],DOUBLE_POSITIVE:["conditionalOrExpression"],INTEGER_NEGATIVE:["conditionalOrExpression"],DECIMAL_NEGATIVE:["conditionalOrExpression"],DOUBLE_NEGATIVE:["conditionalOrExpression"],PNAME_LN:["conditionalOrExpression"],PNAME_NS:["conditionalOrExpression"]},expressionList:{NIL:["NIL"],"(":["(","expression","*[,,expression]",")"]},filter:{FILTER:["FILTER","constraint"]},functionCall:{IRI_REF:["iriRef","argList"],PNAME_LN:["iriRef","argList"],PNAME_NS:["iriRef","argList"]},graphGraphPattern:{GRAPH:["GRAPH","varOrIRIref","groupGraphPattern"]},graphNode:{VAR1:["varOrTerm"],VAR2:["varOrTerm"],NIL:["varOrTerm"],IRI_REF:["varOrTerm"],TRUE:["varOrTerm"],FALSE:["varOrTerm"],BLANK_NODE_LABEL:["varOrTerm"],ANON:["varOrTerm"],"<<":["varOrTerm"],PNAME_LN:["varOrTerm"],PNAME_NS:["varOrTerm"],STRING_LITERAL1:["varOrTerm"],STRING_LITERAL2:["varOrTerm"],STRING_LITERAL_LONG1:["varOrTerm"],STRING_LITERAL_LONG2:["varOrTerm"],INTEGER:["varOrTerm"],DECIMAL:["varOrTerm"],DOUBLE:["varOrTerm"],INTEGER_POSITIVE:["varOrTerm"],DECIMAL_POSITIVE:["varOrTerm"],DOUBLE_POSITIVE:["varOrTerm"],INTEGER_NEGATIVE:["varOrTerm"],DECIMAL_NEGATIVE:["varOrTerm"],DOUBLE_NEGATIVE:["varOrTerm"],"(":["triplesNode"],"[":["triplesNode"]},graphNodePath:{VAR1:["varOrTerm"],VAR2:["varOrTerm"],NIL:["varOrTerm"],IRI_REF:["varOrTerm"],TRUE:["varOrTerm"],FALSE:["varOrTerm"],BLANK_NODE_LABEL:["varOrTerm"],ANON:["varOrTerm"],"<<":["varOrTerm"],PNAME_LN:["varOrTerm"],PNAME_NS:["varOrTerm"],STRING_LITERAL1:["varOrTerm"],STRING_LITERAL2:["varOrTerm"],STRING_LITERAL_LONG1:["varOrTerm"],STRING_LITERAL_LONG2:["varOrTerm"],INTEGER:["varOrTerm"],DECIMAL:["varOrTerm"],DOUBLE:["varOrTerm"],INTEGER_POSITIVE:["varOrTerm"],DECIMAL_POSITIVE:["varOrTerm"],DOUBLE_POSITIVE:["varOrTerm"],INTEGER_NEGATIVE:["varOrTerm"],DECIMAL_NEGATIVE:["varOrTerm"],DOUBLE_NEGATIVE:["varOrTerm"],"(":["triplesNodePath"],"[":["triplesNodePath"]},graphOrDefault:{DEFAULT:["DEFAULT"],IRI_REF:["?GRAPH","iriRef"],PNAME_LN:["?GRAPH","iriRef"],PNAME_NS:["?GRAPH","iriRef"],GRAPH:["?GRAPH","iriRef"]},graphPatternNotTriples:{"{":["groupOrUnionGraphPattern"],OPTIONAL:["optionalGraphPattern"],MINUS:["minusGraphPattern"],GRAPH:["graphGraphPattern"],SERVICE:["serviceGraphPattern"],FILTER:["filter"],BIND:["bind"],VALUES:["inlineData"]},graphRef:{GRAPH:["GRAPH","iriRef"]},graphRefAll:{GRAPH:["graphRef"],DEFAULT:["DEFAULT"],NAMED:["NAMED"],ALL:["ALL"]},graphTerm:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERAL2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],BLANK_NODE_LABEL:["blankNode"],ANON:["blankNode"],"<<":["embeddedTriple"],NIL:["NIL"]},groupClause:{GROUP:["GROUP","BY","+groupCondition"]},groupCondition:{STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],STRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["functionCall"],PNAME_LN:["functionCall"],PNAME_NS:["functionCall"],"(":["(","expression","?[AS,var]",")"],VAR1:["var"],VAR2:["var"]},groupGraphPattern:{"{":["{","or([subSelect,groupGraphPatternSub])","}"]},groupGraphPatternSub:{"{":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],OPTIONAL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],MINUS:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],GRAPH:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],SERVICE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],FILTER:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],BIND:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],VALUES:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],VAR1:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],VAR2:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],NIL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"(":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"[":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],IRI_REF:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],TRUE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],FALSE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],BLANK_NODE_LABEL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],ANON:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"<<":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],PNAME_LN:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],PNAME_NS:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL1:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL2:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL_LONG1:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL_LONG2:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],INTEGER:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DECIMAL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DOUBLE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],INTEGER_POSITIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DECIMAL_POSITIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DOUBLE_POSITIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],INTEGER_NEGATIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DECIMAL_NEGATIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DOUBLE_NEGATIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"}":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"]},groupOrUnionGraphPattern:{"{":["groupGraphPattern","*[UNION,groupGraphPattern]"]},havingClause:{HAVING:["HAVING","+havingCondition"]},havingCondition:{"(":["constraint"],STR:["constraint"],LANG:["constraint"],LANGMATCHES:["constraint"],DATATYPE:["constraint"],BOUND:["constraint"],IRI:["constraint"],URI:["constraint"],BNODE:["constraint"],RAND:["constraint"],ABS:["constraint"],CEIL:["constraint"],FLOOR:["constraint"],ROUND:["constraint"],CONCAT:["constraint"],STRLEN:["constraint"],UCASE:["constraint"],LCASE:["constraint"],ENCODE_FOR_URI:["constraint"],CONTAINS:["constraint"],STRSTARTS:["constraint"],STRENDS:["constraint"],STRBEFORE:["constraint"],STRAFTER:["constraint"],YEAR:["constraint"],MONTH:["constraint"],DAY:["constraint"],HOURS:["constraint"],MINUTES:["constraint"],SECONDS:["constraint"],TIMEZONE:["constraint"],TZ:["constraint"],NOW:["constraint"],UUID:["constraint"],STRUUID:["constraint"],MD5:["constraint"],SHA1:["constraint"],SHA256:["constraint"],SHA384:["constraint"],SHA512:["constraint"],COALESCE:["constraint"],IF:["constraint"],STRLANG:["constraint"],STRDT:["constraint"],SAMETERM:["constraint"],ISIRI:["constraint"],ISURI:["constraint"],ISBLANK:["constraint"],ISLITERAL:["constraint"],ISNUMERIC:["constraint"],SUBSTR:["constraint"],REPLACE:["constraint"],REGEX:["constraint"],EXISTS:["constraint"],NOT:["constraint"],IRI_REF:["constraint"],PNAME_LN:["constraint"],PNAME_NS:["constraint"]},inlineData:{VALUES:["VALUES","dataBlock"]},inlineDataFull:{NIL:["or([NIL,[(,*var,)]])","{","*or([[(,*dataBlockValue,)],NIL])","}"],"(":["or([NIL,[(,*var,)]])","{","*or([[(,*dataBlockValue,)],NIL])","}"]},inlineDataOneVar:{VAR1:["var","{","*dataBlockValue","}"],VAR2:["var","{","*dataBlockValue","}"]},insert1:{DATA:["DATA","quadData"],"{":["quadPattern","*usingClause","WHERE","groupGraphPattern"]},insertClause:{INSERT:["INSERT","quadPattern"]},integer:{INTEGER:["INTEGER"]},iriRef:{IRI_REF:["IRI_REF"],PNAME_LN:["prefixedName"],PNAME_NS:["prefixedName"]},iriRefOrFunction:{IRI_REF:["iriRef","?argList"],PNAME_LN:["iriRef","?argList"],PNAME_NS:["iriRef","?argList"]},limitClause:{LIMIT:["LIMIT","INTEGER"]},limitOffsetClauses:{LIMIT:["limitClause","?offsetClause"],OFFSET:["offsetClause","?limitClause"]},load:{LOAD:["LOAD","?SILENT_1","iriRef","?[INTO,graphRef]"]},minusGraphPattern:{MINUS:["MINUS","groupGraphPattern"]},modify:{WITH:["WITH","iriRef","or([[deleteClause,?insertClause],insertClause])","*usingClause","WHERE","groupGraphPattern"]},move:{MOVE:["MOVE","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},multiplicativeExpression:{"!":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"+":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"-":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],VAR1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],VAR2:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"(":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],LANG:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],LANGMATCHES:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DATATYPE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],BOUND:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],IRI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],URI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],BNODE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],RAND:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ABS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],CEIL:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],FLOOR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ROUND:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],CONCAT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRLEN:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],UCASE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],LCASE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ENCODE_FOR_URI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],CONTAINS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRSTARTS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRENDS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRBEFORE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRAFTER:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],YEAR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MONTH:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DAY:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],HOURS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MINUTES:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SECONDS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],TIMEZONE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],TZ:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],NOW:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],UUID:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRUUID:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MD5:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA256:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA384:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA512:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],COALESCE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],IF:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRLANG:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRDT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SAMETERM:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISIRI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISURI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISBLANK:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISLITERAL:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISNUMERIC:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],TRUE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],FALSE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"<<":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],COUNT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SUM:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MIN:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MAX:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],AVG:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SAMPLE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],GROUP_CONCAT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SUBSTR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],REPLACE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],REGEX:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],EXISTS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],NOT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],IRI_REF:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL2:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL_LONG1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL_LONG2:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_POSITIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_POSITIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_POSITIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_NEGATIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_NEGATIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_NEGATIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],PNAME_LN:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],PNAME_NS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"]},namedGraphClause:{NAMED:["NAMED","sourceSelector"]},notExistsFunc:{NOT:["NOT","EXISTS","groupGraphPattern"]},numericExpression:{"!":["additiveExpression"],"+":["additiveExpression"],"-":["additiveExpression"],VAR1:["additiveExpression"],VAR2:["additiveExpression"],"(":["additiveExpression"],STR:["additiveExpression"],LANG:["additiveExpression"],LANGMATCHES:["additiveExpression"],DATATYPE:["additiveExpression"],BOUND:["additiveExpression"],IRI:["additiveExpression"],URI:["additiveExpression"],BNODE:["additiveExpression"],RAND:["additiveExpression"],ABS:["additiveExpression"],CEIL:["additiveExpression"],FLOOR:["additiveExpression"],ROUND:["additiveExpression"],CONCAT:["additiveExpression"],STRLEN:["additiveExpression"],UCASE:["additiveExpression"],LCASE:["additiveExpression"],ENCODE_FOR_URI:["additiveExpression"],CONTAINS:["additiveExpression"],STRSTARTS:["additiveExpression"],STRENDS:["additiveExpression"],STRBEFORE:["additiveExpression"],STRAFTER:["additiveExpression"],YEAR:["additiveExpression"],MONTH:["additiveExpression"],DAY:["additiveExpression"],HOURS:["additiveExpression"],MINUTES:["additiveExpression"],SECONDS:["additiveExpression"],TIMEZONE:["additiveExpression"],TZ:["additiveExpression"],NOW:["additiveExpression"],UUID:["additiveExpression"],STRUUID:["additiveExpression"],MD5:["additiveExpression"],SHA1:["additiveExpression"],SHA256:["additiveExpression"],SHA384:["additiveExpression"],SHA512:["additiveExpression"],COALESCE:["additiveExpression"],IF:["additiveExpression"],STRLANG:["additiveExpression"],STRDT:["additiveExpression"],SAMETERM:["additiveExpression"],ISIRI:["additiveExpression"],ISURI:["additiveExpression"],ISBLANK:["additiveExpression"],ISLITERAL:["additiveExpression"],ISNUMERIC:["additiveExpression"],TRUE:["additiveExpression"],FALSE:["additiveExpression"],"<<":["additiveExpression"],COUNT:["additiveExpression"],SUM:["additiveExpression"],MIN:["additiveExpression"],MAX:["additiveExpression"],AVG:["additiveExpression"],SAMPLE:["additiveExpression"],GROUP_CONCAT:["additiveExpression"],SUBSTR:["additiveExpression"],REPLACE:["additiveExpression"],REGEX:["additiveExpression"],EXISTS:["additiveExpression"],NOT:["additiveExpression"],IRI_REF:["additiveExpression"],STRING_LITERAL1:["additiveExpression"],STRING_LITERAL2:["additiveExpression"],STRING_LITERAL_LONG1:["additiveExpression"],STRING_LITERAL_LONG2:["additiveExpression"],INTEGER:["additiveExpression"],DECIMAL:["additiveExpression"],DOUBLE:["additiveExpression"],INTEGER_POSITIVE:["additiveExpression"],DECIMAL_POSITIVE:["additiveExpression"],DOUBLE_POSITIVE:["additiveExpression"],INTEGER_NEGATIVE:["additiveExpression"],DECIMAL_NEGATIVE:["additiveExpression"],DOUBLE_NEGATIVE:["additiveExpression"],PNAME_LN:["additiveExpression"],PNAME_NS:["additiveExpression"]},numericLiteral:{INTEGER:["numericLiteralUnsigned"],DECIMAL:["numericLiteralUnsigned"],DOUBLE:["numericLiteralUnsigned"],INTEGER_POSITIVE:["numericLiteralPositive"],DECIMAL_POSITIVE:["numericLiteralPositive"],DOUBLE_POSITIVE:["numericLiteralPositive"],INTEGER_NEGATIVE:["numericLiteralNegative"],DECIMAL_NEGATIVE:["numericLiteralNegative"],DOUBLE_NEGATIVE:["numericLiteralNegative"]},numericLiteralNegative:{INTEGER_NEGATIVE:["INTEGER_NEGATIVE"],DECIMAL_NEGATIVE:["DECIMAL_NEGATIVE"],DOUBLE_NEGATIVE:["DOUBLE_NEGATIVE"]},numericLiteralPositive:{INTEGER_POSITIVE:["INTEGER_POSITIVE"],DECIMAL_POSITIVE:["DECIMAL_POSITIVE"],DOUBLE_POSITIVE:["DOUBLE_POSITIVE"]},numericLiteralUnsigned:{INTEGER:["INTEGER"],DECIMAL:["DECIMAL"],DOUBLE:["DOUBLE"]},object:{"(":["graphNode"],"[":["graphNode"],VAR1:["graphNode"],VAR2:["graphNode"],NIL:["graphNode"],IRI_REF:["graphNode"],TRUE:["graphNode"],FALSE:["graphNode"],BLANK_NODE_LABEL:["graphNode"],ANON:["graphNode"],"<<":["graphNode"],PNAME_LN:["graphNode"],PNAME_NS:["graphNode"],STRING_LITERAL1:["graphNode"],STRING_LITERAL2:["graphNode"],STRING_LITERAL_LONG1:["graphNode"],STRING_LITERAL_LONG2:["graphNode"],INTEGER:["graphNode"],DECIMAL:["graphNode"],DOUBLE:["graphNode"],INTEGER_POSITIVE:["graphNode"],DECIMAL_POSITIVE:["graphNode"],DOUBLE_POSITIVE:["graphNode"],INTEGER_NEGATIVE:["graphNode"],DECIMAL_NEGATIVE:["graphNode"],DOUBLE_NEGATIVE:["graphNode"]},objectList:{"(":["object","*[,,object]"],"[":["object","*[,,object]"],VAR1:["object","*[,,object]"],VAR2:["object","*[,,object]"],NIL:["object","*[,,object]"],IRI_REF:["object","*[,,object]"],TRUE:["object","*[,,object]"],FALSE:["object","*[,,object]"],BLANK_NODE_LABEL:["object","*[,,object]"],ANON:["object","*[,,object]"],"<<":["object","*[,,object]"],PNAME_LN:["object","*[,,object]"],PNAME_NS:["object","*[,,object]"],STRING_LITERAL1:["object","*[,,object]"],STRING_LITERAL2:["object","*[,,object]"],STRING_LITERAL_LONG1:["object","*[,,object]"],STRING_LITERAL_LONG2:["object","*[,,object]"],INTEGER:["object","*[,,object]"],DECIMAL:["object","*[,,object]"],DOUBLE:["object","*[,,object]"],INTEGER_POSITIVE:["object","*[,,object]"],DECIMAL_POSITIVE:["object","*[,,object]"],DOUBLE_POSITIVE:["object","*[,,object]"],INTEGER_NEGATIVE:["object","*[,,object]"],DECIMAL_NEGATIVE:["object","*[,,object]"],DOUBLE_NEGATIVE:["object","*[,,object]"]},objectListPath:{"(":["objectPath","*[,,objectPath]"],"[":["objectPath","*[,,objectPath]"],VAR1:["objectPath","*[,,objectPath]"],VAR2:["objectPath","*[,,objectPath]"],NIL:["objectPath","*[,,objectPath]"],IRI_REF:["objectPath","*[,,objectPath]"],TRUE:["objectPath","*[,,objectPath]"],FALSE:["objectPath","*[,,objectPath]"],BLANK_NODE_LABEL:["objectPath","*[,,objectPath]"],ANON:["objectPath","*[,,objectPath]"],"<<":["objectPath","*[,,objectPath]"],PNAME_LN:["objectPath","*[,,objectPath]"],PNAME_NS:["objectPath","*[,,objectPath]"],STRING_LITERAL1:["objectPath","*[,,objectPath]"],STRING_LITERAL2:["objectPath","*[,,objectPath]"],STRING_LITERAL_LONG1:["objectPath","*[,,objectPath]"],STRING_LITERAL_LONG2:["objectPath","*[,,objectPath]"],INTEGER:["objectPath","*[,,objectPath]"],DECIMAL:["objectPath","*[,,objectPath]"],DOUBLE:["objectPath","*[,,objectPath]"],INTEGER_POSITIVE:["objectPath","*[,,objectPath]"],DECIMAL_POSITIVE:["objectPath","*[,,objectPath]"],DOUBLE_POSITIVE:["objectPath","*[,,objectPath]"],INTEGER_NEGATIVE:["objectPath","*[,,objectPath]"],DECIMAL_NEGATIVE:["objectPath","*[,,objectPath]"],DOUBLE_NEGATIVE:["objectPath","*[,,objectPath]"]},objectPath:{"(":["graphNodePath"],"[":["graphNodePath"],VAR1:["graphNodePath"],VAR2:["graphNodePath"],NIL:["graphNodePath"],IRI_REF:["graphNodePath"],TRUE:["graphNodePath"],FALSE:["graphNodePath"],BLANK_NODE_LABEL:["graphNodePath"],ANON:["graphNodePath"],"<<":["graphNodePath"],PNAME_LN:["graphNodePath"],PNAME_NS:["graphNodePath"],STRING_LITERAL1:["graphNodePath"],STRING_LITERAL2:["graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath"],INTEGER:["graphNodePath"],DECIMAL:["graphNodePath"],DOUBLE:["graphNodePath"],INTEGER_POSITIVE:["graphNodePath"],DECIMAL_POSITIVE:["graphNodePath"],DOUBLE_POSITIVE:["graphNodePath"],INTEGER_NEGATIVE:["graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath"]},offsetClause:{OFFSET:["OFFSET","INTEGER"]},optionalGraphPattern:{OPTIONAL:["OPTIONAL","groupGraphPattern"]},"or([*,expression])":{"*":["*"],"!":["expression"],"+":["expression"],"-":["expression"],VAR1:["expression"],VAR2:["expression"],"(":["expression"],STR:["expression"],LANG:["expression"],LANGMATCHES:["expression"],DATATYPE:["expression"],BOUND:["expression"],IRI:["expression"],URI:["expression"],BNODE:["expression"],RAND:["expression"],ABS:["expression"],CEIL:["expression"],FLOOR:["expression"],ROUND:["expression"],CONCAT:["expression"],STRLEN:["expression"],UCASE:["expression"],LCASE:["expression"],ENCODE_FOR_URI:["expression"],CONTAINS:["expression"],STRSTARTS:["expression"],STRENDS:["expression"],STRBEFORE:["expression"],STRAFTER:["expression"],YEAR:["expression"],MONTH:["expression"],DAY:["expression"],HOURS:["expression"],MINUTES:["expression"],SECONDS:["expression"],TIMEZONE:["expression"],TZ:["expression"],NOW:["expression"],UUID:["expression"],STRUUID:["expression"],MD5:["expression"],SHA1:["expression"],SHA256:["expression"],SHA384:["expression"],SHA512:["expression"],COALESCE:["expression"],IF:["expression"],STRLANG:["expression"],STRDT:["expression"],SAMETERM:["expression"],ISIRI:["expression"],ISURI:["expression"],ISBLANK:["expression"],ISLITERAL:["expression"],ISNUMERIC:["expression"],TRUE:["expression"],FALSE:["expression"],"<<":["expression"],COUNT:["expression"],SUM:["expression"],MIN:["expression"],MAX:["expression"],AVG:["expression"],SAMPLE:["expression"],GROUP_CONCAT:["expression"],SUBSTR:["expression"],REPLACE:["expression"],REGEX:["expression"],EXISTS:["expression"],NOT:["expression"],IRI_REF:["expression"],STRING_LITERAL1:["expression"],STRING_LITERAL2:["expression"],STRING_LITERAL_LONG1:["expression"],STRING_LITERAL_LONG2:["expression"],INTEGER:["expression"],DECIMAL:["expression"],DOUBLE:["expression"],INTEGER_POSITIVE:["expression"],DECIMAL_POSITIVE:["expression"],DOUBLE_POSITIVE:["expression"],INTEGER_NEGATIVE:["expression"],DECIMAL_NEGATIVE:["expression"],DOUBLE_NEGATIVE:["expression"],PNAME_LN:["expression"],PNAME_NS:["expression"]},"or([+or([var,[(,expression,AS,var,)]]),*])":{"(":["+or([var,[(,expression,AS,var,)]])"],VAR1:["+or([var,[(,expression,AS,var,)]])"],VAR2:["+or([var,[(,expression,AS,var,)]])"],"*":["*"]},"or([+or([varOrIRIref,embeddedTriple]),*])":{"<<":["+or([varOrIRIref,embeddedTriple])"],VAR1:["+or([varOrIRIref,embeddedTriple])"],VAR2:["+or([varOrIRIref,embeddedTriple])"],IRI_REF:["+or([varOrIRIref,embeddedTriple])"],PNAME_LN:["+or([varOrIRIref,embeddedTriple])"],PNAME_NS:["+or([varOrIRIref,embeddedTriple])"],"*":["*"]},"or([ASC,DESC])":{ASC:["ASC"],DESC:["DESC"]},"or([DISTINCT,REDUCED])":{DISTINCT:["DISTINCT"],REDUCED:["REDUCED"]},"or([LANGTAG,[^^,iriRef]])":{LANGTAG:["LANGTAG"],"^^":["[^^,iriRef]"]},"or([NIL,[(,*var,)]])":{NIL:["NIL"],"(":["[(,*var,)]"]},"or([[(,*dataBlockValue,)],NIL])":{"(":["[(,*dataBlockValue,)]"],NIL:["NIL"]},"or([[(,expression,)],NIL])":{"(":["[(,expression,)]"],NIL:["NIL"]},"or([[*,unaryExpression],[/,unaryExpression]])":{"*":["[*,unaryExpression]"],"/":["[/,unaryExpression]"]},"or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])":{"+":["[+,multiplicativeExpression]"],"-":["[-,multiplicativeExpression]"],INTEGER_POSITIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DECIMAL_POSITIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DOUBLE_POSITIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],INTEGER_NEGATIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DECIMAL_NEGATIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DOUBLE_NEGATIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"]},"or([[,,or([},[integer,}]])],}])":{",":["[,,or([},[integer,}]])]"],"}":["}"]},"or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])":{"=":["[=,numericExpression]"],"!=":["[!=,numericExpression]"],"<":["[<,numericExpression]"],">":["[>,numericExpression]"],"<=":["[<=,numericExpression]"],">=":["[>=,numericExpression]"],IN:["[IN,expressionList]"],NOT:["[NOT,IN,expressionList]"]},"or([[constructTemplate,*datasetClause,whereClause,solutionModifier],[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]])":{"{":["[constructTemplate,*datasetClause,whereClause,solutionModifier]"],WHERE:["[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]"],FROM:["[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]"]},"or([[deleteClause,?insertClause],insertClause])":{DELETE:["[deleteClause,?insertClause]"],INSERT:["insertClause"]},"or([[integer,or([[,,or([},[integer,}]])],}])],[,,integer,}]])":{INTEGER:["[integer,or([[,,or([},[integer,}]])],}])]"],",":["[,,integer,}]"]},"or([baseDecl,prefixDecl])":{BASE:["baseDecl"],PREFIX:["prefixDecl"]},"or([defaultGraphClause,namedGraphClause])":{IRI_REF:["defaultGraphClause"],PNAME_LN:["defaultGraphClause"],PNAME_NS:["defaultGraphClause"],NAMED:["namedGraphClause"]},"or([inlineDataOneVar,inlineDataFull])":{VAR1:["inlineDataOneVar"],VAR2:["inlineDataOneVar"],NIL:["inlineDataFull"],"(":["inlineDataFull"]},"or([iriRef,[NAMED,iriRef]])":{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],NAMED:["[NAMED,iriRef]"]},"or([iriRef,a])":{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],a:["a"]},"or([numericLiteralPositive,numericLiteralNegative])":{INTEGER_POSITIVE:["numericLiteralPositive"],DECIMAL_POSITIVE:["numericLiteralPositive"],DOUBLE_POSITIVE:["numericLiteralPositive"],INTEGER_NEGATIVE:["numericLiteralNegative"],DECIMAL_NEGATIVE:["numericLiteralNegative"],DOUBLE_NEGATIVE:["numericLiteralNegative"]},"or([queryAll,updateAll])":{CONSTRUCT:["queryAll"],DESCRIBE:["queryAll"],ASK:["queryAll"],SELECT:["queryAll"],INSERT:["updateAll"],DELETE:["updateAll"],LOAD:["updateAll"],CLEAR:["updateAll"],DROP:["updateAll"],ADD:["updateAll"],MOVE:["updateAll"],COPY:["updateAll"],CREATE:["updateAll"],WITH:["updateAll"],$:["updateAll"]},"or([selectQuery,constructQuery,describeQuery,askQuery])":{SELECT:["selectQuery"],CONSTRUCT:["constructQuery"],DESCRIBE:["describeQuery"],ASK:["askQuery"]},"or([subSelect,groupGraphPatternSub])":{SELECT:["subSelect"],"{":["groupGraphPatternSub"],OPTIONAL:["groupGraphPatternSub"],MINUS:["groupGraphPatternSub"],GRAPH:["groupGraphPatternSub"],SERVICE:["groupGraphPatternSub"],FILTER:["groupGraphPatternSub"],BIND:["groupGraphPatternSub"],VALUES:["groupGraphPatternSub"],VAR1:["groupGraphPatternSub"],VAR2:["groupGraphPatternSub"],NIL:["groupGraphPatternSub"],"(":["groupGraphPatternSub"],"[":["groupGraphPatternSub"],IRI_REF:["groupGraphPatternSub"],TRUE:["groupGraphPatternSub"],FALSE:["groupGraphPatternSub"],BLANK_NODE_LABEL:["groupGraphPatternSub"],ANON:["groupGraphPatternSub"],"<<":["groupGraphPatternSub"],PNAME_LN:["groupGraphPatternSub"],PNAME_NS:["groupGraphPatternSub"],STRING_LITERAL1:["groupGraphPatternSub"],STRING_LITERAL2:["groupGraphPatternSub"],STRING_LITERAL_LONG1:["groupGraphPatternSub"],STRING_LITERAL_LONG2:["groupGraphPatternSub"],INTEGER:["groupGraphPatternSub"],DECIMAL:["groupGraphPatternSub"],DOUBLE:["groupGraphPatternSub"],INTEGER_POSITIVE:["groupGraphPatternSub"],DECIMAL_POSITIVE:["groupGraphPatternSub"],DOUBLE_POSITIVE:["groupGraphPatternSub"],INTEGER_NEGATIVE:["groupGraphPatternSub"],DECIMAL_NEGATIVE:["groupGraphPatternSub"],DOUBLE_NEGATIVE:["groupGraphPatternSub"],"}":["groupGraphPatternSub"]},"or([var,[(,expression,AS,var,)]])":{VAR1:["var"],VAR2:["var"],"(":["[(,expression,AS,var,)]"]},"or([varOrIRIref,embeddedTriple])":{VAR1:["varOrIRIref"],VAR2:["varOrIRIref"],IRI_REF:["varOrIRIref"],PNAME_LN:["varOrIRIref"],PNAME_NS:["varOrIRIref"],"<<":["embeddedTriple"]},"or([verbPath,verbSimple])":{"^":["verbPath"],a:["verbPath"],"!":["verbPath"],"(":["verbPath"],IRI_REF:["verbPath"],PNAME_LN:["verbPath"],PNAME_NS:["verbPath"],VAR1:["verbSimple"],VAR2:["verbSimple"]},"or([},[integer,}]])":{"}":["}"],INTEGER:["[integer,}]"]},orderClause:{ORDER:["ORDER","BY","+orderCondition"]},orderCondition:{ASC:["or([ASC,DESC])","brackettedExpression"],DESC:["or([ASC,DESC])","brackettedExpression"],"(":["constraint"],STR:["constraint"],LANG:["constraint"],LANGMATCHES:["constraint"],DATATYPE:["constraint"],BOUND:["constraint"],IRI:["constraint"],URI:["constraint"],BNODE:["constraint"],RAND:["constraint"],ABS:["constraint"],CEIL:["constraint"],FLOOR:["constraint"],ROUND:["constraint"],CONCAT:["constraint"],STRLEN:["constraint"],UCASE:["constraint"],LCASE:["constraint"],ENCODE_FOR_URI:["constraint"],CONTAINS:["constraint"],STRSTARTS:["constraint"],STRENDS:["constraint"],STRBEFORE:["constraint"],STRAFTER:["constraint"],YEAR:["constraint"],MONTH:["constraint"],DAY:["constraint"],HOURS:["constraint"],MINUTES:["constraint"],SECONDS:["constraint"],TIMEZONE:["constraint"],TZ:["constraint"],NOW:["constraint"],UUID:["constraint"],STRUUID:["constraint"],MD5:["constraint"],SHA1:["constraint"],SHA256:["constraint"],SHA384:["constraint"],SHA512:["constraint"],COALESCE:["constraint"],IF:["constraint"],STRLANG:["constraint"],STRDT:["constraint"],SAMETERM:["constraint"],ISIRI:["constraint"],ISURI:["constraint"],ISBLANK:["constraint"],ISLITERAL:["constraint"],ISNUMERIC:["constraint"],SUBSTR:["constraint"],REPLACE:["constraint"],REGEX:["constraint"],EXISTS:["constraint"],NOT:["constraint"],IRI_REF:["constraint"],PNAME_LN:["constraint"],PNAME_NS:["constraint"],VAR1:["var"],VAR2:["var"]},path:{"^":["pathAlternative"],a:["pathAlternative"],"!":["pathAlternative"],"(":["pathAlternative"],IRI_REF:["pathAlternative"],PNAME_LN:["pathAlternative"],PNAME_NS:["pathAlternative"]},pathAlternative:{"^":["pathSequence","*[|,pathSequence]"],a:["pathSequence","*[|,pathSequence]"],"!":["pathSequence","*[|,pathSequence]"],"(":["pathSequence","*[|,pathSequence]"],IRI_REF:["pathSequence","*[|,pathSequence]"],PNAME_LN:["pathSequence","*[|,pathSequence]"],PNAME_NS:["pathSequence","*[|,pathSequence]"]},pathElt:{a:["pathPrimary","?pathMod"],"!":["pathPrimary","?pathMod"],"(":["pathPrimary","?pathMod"],IRI_REF:["pathPrimary","?pathMod"],PNAME_LN:["pathPrimary","?pathMod"],PNAME_NS:["pathPrimary","?pathMod"]},pathEltOrInverse:{a:["pathElt"],"!":["pathElt"],"(":["pathElt"],IRI_REF:["pathElt"],PNAME_LN:["pathElt"],PNAME_NS:["pathElt"],"^":["^","pathElt"]},pathMod:{"*":["*"],"?":["?"],"+":["+"],"{":["{","or([[integer,or([[,,or([},[integer,}]])],}])],[,,integer,}]])"]},pathNegatedPropertySet:{a:["pathOneInPropertySet"],"^":["pathOneInPropertySet"],IRI_REF:["pathOneInPropertySet"],PNAME_LN:["pathOneInPropertySet"],PNAME_NS:["pathOneInPropertySet"],"(":["(","?[pathOneInPropertySet,*[|,pathOneInPropertySet]]",")"]},pathOneInPropertySet:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],a:["a"],"^":["^","or([iriRef,a])"]},pathPrimary:{IRI_REF:["storeProperty","iriRef"],PNAME_LN:["storeProperty","iriRef"],PNAME_NS:["storeProperty","iriRef"],a:["storeProperty","a"],"!":["!","pathNegatedPropertySet"],"(":["(","path",")"]},pathSequence:{"^":["pathEltOrInverse","*[/,pathEltOrInverse]"],a:["pathEltOrInverse","*[/,pathEltOrInverse]"],"!":["pathEltOrInverse","*[/,pathEltOrInverse]"],"(":["pathEltOrInverse","*[/,pathEltOrInverse]"],IRI_REF:["pathEltOrInverse","*[/,pathEltOrInverse]"],PNAME_LN:["pathEltOrInverse","*[/,pathEltOrInverse]"],PNAME_NS:["pathEltOrInverse","*[/,pathEltOrInverse]"]},prefixDecl:{PREFIX:["PREFIX","PNAME_NS","IRI_REF"]},prefixedName:{PNAME_LN:["PNAME_LN"],PNAME_NS:["PNAME_NS"]},primaryExpression:{"(":["brackettedExpression"],STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],STRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["iriRefOrFunction"],PNAME_LN:["iriRefOrFunction"],PNAME_NS:["iriRefOrFunction"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERAL2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],"<<":["embeddedTriple"],VAR1:["var"],VAR2:["var"],COUNT:["aggregate"],SUM:["aggregate"],MIN:["aggregate"],MAX:["aggregate"],AVG:["aggregate"],SAMPLE:["aggregate"],GROUP_CONCAT:["aggregate"]},prologue:{BASE:["*or([baseDecl,prefixDecl])"],PREFIX:["*or([baseDecl,prefixDecl])"],$:["*or([baseDecl,prefixDecl])"],CONSTRUCT:["*or([baseDecl,prefixDecl])"],DESCRIBE:["*or([baseDecl,prefixDecl])"],ASK:["*or([baseDecl,prefixDecl])"],INSERT:["*or([baseDecl,prefixDecl])"],DELETE:["*or([baseDecl,prefixDecl])"],SELECT:["*or([baseDecl,prefixDecl])"],LOAD:["*or([baseDecl,prefixDecl])"],CLEAR:["*or([baseDecl,prefixDecl])"],DROP:["*or([baseDecl,prefixDecl])"],ADD:["*or([baseDecl,prefixDecl])"],MOVE:["*or([baseDecl,prefixDecl])"],COPY:["*or([baseDecl,prefixDecl])"],CREATE:["*or([baseDecl,prefixDecl])"],WITH:["*or([baseDecl,prefixDecl])"]},propertyList:{VAR1:["propertyListNotEmpty"],VAR2:["propertyListNotEmpty"],"^":["propertyListNotEmpty"],a:["propertyListNotEmpty"],"!":["propertyListNotEmpty"],"(":["propertyListNotEmpty"],IRI_REF:["propertyListNotEmpty"],PNAME_LN:["propertyListNotEmpty"],PNAME_NS:["propertyListNotEmpty"],".":[],"}":[],GRAPH:[]},propertyListNotEmpty:{VAR1:["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],VAR2:["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],"^":["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],a:["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],"!":["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],"(":["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],IRI_REF:["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],PNAME_LN:["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"],PNAME_NS:["or([verbPath,verbSimple])","objectList","*[;,?[or([verbPath,verbSimple]),objectList]]"]},propertyListPath:{VAR1:["propertyListNotEmpty"],VAR2:["propertyListNotEmpty"],"^":["propertyListNotEmpty"],a:["propertyListNotEmpty"],"!":["propertyListNotEmpty"],"(":["propertyListNotEmpty"],IRI_REF:["propertyListNotEmpty"],PNAME_LN:["propertyListNotEmpty"],PNAME_NS:["propertyListNotEmpty"],".":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},propertyListPathNotEmpty:{VAR1:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],VAR2:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],"^":["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],a:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],"!":["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],"(":["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],IRI_REF:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],PNAME_LN:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],PNAME_NS:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"]},quadData:{"{":["{","disallowVars","quads","allowVars","}"]},quadDataNoBnodes:{"{":["{","disallowBnodes","disallowVars","quads","allowVars","allowBnodes","}"]},quadPattern:{"{":["{","quads","}"]},quadPatternNoBnodes:{"{":["{","disallowBnodes","quads","allowBnodes","}"]},quads:{GRAPH:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],VAR1:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],VAR2:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],NIL:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"(":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"[":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],IRI_REF:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],TRUE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],FALSE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],BLANK_NODE_LABEL:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],ANON:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"<<":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],PNAME_LN:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],PNAME_NS:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL1:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL2:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL_LONG1:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL_LONG2:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],INTEGER:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DECIMAL:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DOUBLE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],INTEGER_POSITIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DECIMAL_POSITIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DOUBLE_POSITIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],INTEGER_NEGATIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DECIMAL_NEGATIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DOUBLE_NEGATIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"}":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"]},quadsNotTriples:{GRAPH:["GRAPH","varOrIRIref","{","?triplesTemplate","}"]},queryAll:{CONSTRUCT:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"],DESCRIBE:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"],ASK:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"],SELECT:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"]},rdfLiteral:{STRING_LITERAL1:["string","?or([LANGTAG,[^^,iriRef]])"],STRING_LITERAL2:["string","?or([LANGTAG,[^^,iriRef]])"],STRING_LITERAL_LONG1:["string","?or([LANGTAG,[^^,iriRef]])"],STRING_LITERAL_LONG2:["string","?or([LANGTAG,[^^,iriRef]])"]},regexExpression:{REGEX:["REGEX","(","expression",",","expression","?[,,expression]",")"]},relationalExpression:{"!":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"+":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"-":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],VAR1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],VAR2:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"(":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],LANG:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],LANGMATCHES:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DATATYPE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],BOUND:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IRI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],URI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],BNODE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],RAND:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ABS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],CEIL:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],FLOOR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ROUND:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],CONCAT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRLEN:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],UCASE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],LCASE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ENCODE_FOR_URI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],CONTAINS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRSTARTS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRENDS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRBEFORE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRAFTER:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],YEAR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MONTH:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DAY:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],HOURS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MINUTES:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SECONDS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],TIMEZONE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],TZ:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOW:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],UUID:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRUUID:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MD5:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA256:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA384:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA512:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],COALESCE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IF:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRLANG:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRDT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SAMETERM:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISIRI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISURI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISBLANK:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISLITERAL:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISNUMERIC:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],TRUE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],FALSE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<<":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],COUNT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SUM:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MIN:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MAX:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],AVG:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SAMPLE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],GROUP_CONCAT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SUBSTR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],REPLACE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],REGEX:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],EXISTS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IRI_REF:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL2:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL_LONG1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL_LONG2:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],INTEGER:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DECIMAL:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DOUBLE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],INTEGER_POSITIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DECIMAL_POSITIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DOUBLE_POSITIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],INTEGER_NEGATIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DECIMAL_NEGATIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DOUBLE_NEGATIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],PNAME_LN:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],PNAME_NS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"]},selectClause:{SELECT:["SELECT","?or([DISTINCT,REDUCED])","or([+or([var,[(,expression,AS,var,)]]),*])"]},selectQuery:{SELECT:["selectClause","*datasetClause","whereClause","solutionModifier"]},serviceGraphPattern:{SERVICE:["SERVICE","?SILENT","varOrIRIref","groupGraphPattern"]},solutionModifier:{LIMIT:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],OFFSET:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],ORDER:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],HAVING:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],GROUP:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],VALUES:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],$:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],"}":["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"]},sourceSelector:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"]},sparql11:{$:["prologue","or([queryAll,updateAll])","$"],CONSTRUCT:["prologue","or([queryAll,updateAll])","$"],DESCRIBE:["prologue","or([queryAll,updateAll])","$"],ASK:["prologue","or([queryAll,updateAll])","$"],INSERT:["prologue","or([queryAll,updateAll])","$"],DELETE:["prologue","or([queryAll,updateAll])","$"],SELECT:["prologue","or([queryAll,updateAll])","$"],LOAD:["prologue","or([queryAll,updateAll])","$"],CLEAR:["prologue","or([queryAll,updateAll])","$"],DROP:["prologue","or([queryAll,updateAll])","$"],ADD:["prologue","or([queryAll,updateAll])","$"],MOVE:["prologue","or([queryAll,updateAll])","$"],COPY:["prologue","or([queryAll,updateAll])","$"],CREATE:["prologue","or([queryAll,updateAll])","$"],WITH:["prologue","or([queryAll,updateAll])","$"],BASE:["prologue","or([queryAll,updateAll])","$"],PREFIX:["prologue","or([queryAll,updateAll])","$"]},storeProperty:{VAR1:[],VAR2:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[],a:[]},strReplaceExpression:{REPLACE:["REPLACE","(","expression",",","expression",",","expression","?[,,expression]",")"]},string:{STRING_LITERAL1:["STRING_LITERAL1"],STRING_LITERAL2:["STRING_LITERAL2"],STRING_LITERAL_LONG1:["STRING_LITERAL_LONG1"],STRING_LITERAL_LONG2:["STRING_LITERAL_LONG2"]},subSelect:{SELECT:["selectClause","whereClause","solutionModifier","valuesClause"]},substringExpression:{SUBSTR:["SUBSTR","(","expression",",","expression","?[,,expression]",")"]},triplesBlock:{VAR1:["triplesSameSubjectPath","?[.,?triplesBlock]"],VAR2:["triplesSameSubjectPath","?[.,?triplesBlock]"],NIL:["triplesSameSubjectPath","?[.,?triplesBlock]"],"(":["triplesSameSubjectPath","?[.,?triplesBlock]"],"[":["triplesSameSubjectPath","?[.,?triplesBlock]"],IRI_REF:["triplesSameSubjectPath","?[.,?triplesBlock]"],TRUE:["triplesSameSubjectPath","?[.,?triplesBlock]"],FALSE:["triplesSameSubjectPath","?[.,?triplesBlock]"],BLANK_NODE_LABEL:["triplesSameSubjectPath","?[.,?triplesBlock]"],ANON:["triplesSameSubjectPath","?[.,?triplesBlock]"],"<<":["triplesSameSubjectPath","?[.,?triplesBlock]"],PNAME_LN:["triplesSameSubjectPath","?[.,?triplesBlock]"],PNAME_NS:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL1:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL2:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL_LONG1:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL_LONG2:["triplesSameSubjectPath","?[.,?triplesBlock]"],INTEGER:["triplesSameSubjectPath","?[.,?triplesBlock]"],DECIMAL:["triplesSameSubjectPath","?[.,?triplesBlock]"],DOUBLE:["triplesSameSubjectPath","?[.,?triplesBlock]"],INTEGER_POSITIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DECIMAL_POSITIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DOUBLE_POSITIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],INTEGER_NEGATIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DECIMAL_NEGATIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DOUBLE_NEGATIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"]},triplesNode:{"(":["collection"],"[":["blankNodePropertyList"]},triplesNodePath:{"(":["collectionPath"],"[":["blankNodePropertyListPath"]},triplesSameSubject:{VAR1:["varOrTerm","propertyListNotEmpty"],VAR2:["varOrTerm","propertyListNotEmpty"],NIL:["varOrTerm","propertyListNotEmpty"],IRI_REF:["varOrTerm","propertyListNotEmpty"],TRUE:["varOrTerm","propertyListNotEmpty"],FALSE:["varOrTerm","propertyListNotEmpty"],BLANK_NODE_LABEL:["varOrTerm","propertyListNotEmpty"],ANON:["varOrTerm","propertyListNotEmpty"],"<<":["varOrTerm","propertyListNotEmpty"],PNAME_LN:["varOrTerm","propertyListNotEmpty"],PNAME_NS:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL1:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL2:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL_LONG1:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL_LONG2:["varOrTerm","propertyListNotEmpty"],INTEGER:["varOrTerm","propertyListNotEmpty"],DECIMAL:["varOrTerm","propertyListNotEmpty"],DOUBLE:["varOrTerm","propertyListNotEmpty"],INTEGER_POSITIVE:["varOrTerm","propertyListNotEmpty"],DECIMAL_POSITIVE:["varOrTerm","propertyListNotEmpty"],DOUBLE_POSITIVE:["varOrTerm","propertyListNotEmpty"],INTEGER_NEGATIVE:["varOrTerm","propertyListNotEmpty"],DECIMAL_NEGATIVE:["varOrTerm","propertyListNotEmpty"],DOUBLE_NEGATIVE:["varOrTerm","propertyListNotEmpty"],"(":["triplesNode","propertyList"],"[":["triplesNode","propertyList"]},triplesSameSubjectPath:{VAR1:["varOrTerm","propertyListPathNotEmpty"],VAR2:["varOrTerm","propertyListPathNotEmpty"],NIL:["varOrTerm","propertyListPathNotEmpty"],IRI_REF:["varOrTerm","propertyListPathNotEmpty"],TRUE:["varOrTerm","propertyListPathNotEmpty"],FALSE:["varOrTerm","propertyListPathNotEmpty"],BLANK_NODE_LABEL:["varOrTerm","propertyListPathNotEmpty"],ANON:["varOrTerm","propertyListPathNotEmpty"],"<<":["varOrTerm","propertyListPathNotEmpty"],PNAME_LN:["varOrTerm","propertyListPathNotEmpty"],PNAME_NS:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL1:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL2:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL_LONG1:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL_LONG2:["varOrTerm","propertyListPathNotEmpty"],INTEGER:["varOrTerm","propertyListPathNotEmpty"],DECIMAL:["varOrTerm","propertyListPathNotEmpty"],DOUBLE:["varOrTerm","propertyListPathNotEmpty"],INTEGER_POSITIVE:["varOrTerm","propertyListPathNotEmpty"],DECIMAL_POSITIVE:["varOrTerm","propertyListPathNotEmpty"],DOUBLE_POSITIVE:["varOrTerm","propertyListPathNotEmpty"],INTEGER_NEGATIVE:["varOrTerm","propertyListPathNotEmpty"],DECIMAL_NEGATIVE:["varOrTerm","propertyListPathNotEmpty"],DOUBLE_NEGATIVE:["varOrTerm","propertyListPathNotEmpty"],"(":["triplesNodePath","propertyListPath"],"[":["triplesNodePath","propertyListPath"]},triplesTemplate:{VAR1:["triplesSameSubject","?[.,?triplesTemplate]"],VAR2:["triplesSameSubject","?[.,?triplesTemplate]"],NIL:["triplesSameSubject","?[.,?triplesTemplate]"],"(":["triplesSameSubject","?[.,?triplesTemplate]"],"[":["triplesSameSubject","?[.,?triplesTemplate]"],IRI_REF:["triplesSameSubject","?[.,?triplesTemplate]"],TRUE:["triplesSameSubject","?[.,?triplesTemplate]"],FALSE:["triplesSameSubject","?[.,?triplesTemplate]"],BLANK_NODE_LABEL:["triplesSameSubject","?[.,?triplesTemplate]"],ANON:["triplesSameSubject","?[.,?triplesTemplate]"],"<<":["triplesSameSubject","?[.,?triplesTemplate]"],PNAME_LN:["triplesSameSubject","?[.,?triplesTemplate]"],PNAME_NS:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL1:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL2:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL_LONG1:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL_LONG2:["triplesSameSubject","?[.,?triplesTemplate]"],INTEGER:["triplesSameSubject","?[.,?triplesTemplate]"],DECIMAL:["triplesSameSubject","?[.,?triplesTemplate]"],DOUBLE:["triplesSameSubject","?[.,?triplesTemplate]"],INTEGER_POSITIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DECIMAL_POSITIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DOUBLE_POSITIVE:["triplesSameSubject","?[.,?triplesTemplate]"],INTEGER_NEGATIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DECIMAL_NEGATIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DOUBLE_NEGATIVE:["triplesSameSubject","?[.,?triplesTemplate]"]},unaryExpression:{"!":["!","primaryExpression"],"+":["+","primaryExpression"],"-":["-","primaryExpression"],VAR1:["primaryExpression"],VAR2:["primaryExpression"],"(":["primaryExpression"],STR:["primaryExpression"],LANG:["primaryExpression"],LANGMATCHES:["primaryExpression"],DATATYPE:["primaryExpression"],BOUND:["primaryExpression"],IRI:["primaryExpression"],URI:["primaryExpression"],BNODE:["primaryExpression"],RAND:["primaryExpression"],ABS:["primaryExpression"],CEIL:["primaryExpression"],FLOOR:["primaryExpression"],ROUND:["primaryExpression"],CONCAT:["primaryExpression"],STRLEN:["primaryExpression"],UCASE:["primaryExpression"],LCASE:["primaryExpression"],ENCODE_FOR_URI:["primaryExpression"],CONTAINS:["primaryExpression"],STRSTARTS:["primaryExpression"],STRENDS:["primaryExpression"],STRBEFORE:["primaryExpression"],STRAFTER:["primaryExpression"],YEAR:["primaryExpression"],MONTH:["primaryExpression"],DAY:["primaryExpression"],HOURS:["primaryExpression"],MINUTES:["primaryExpression"],SECONDS:["primaryExpression"],TIMEZONE:["primaryExpression"],TZ:["primaryExpression"],NOW:["primaryExpression"],UUID:["primaryExpression"],STRUUID:["primaryExpression"],MD5:["primaryExpression"],SHA1:["primaryExpression"],SHA256:["primaryExpression"],SHA384:["primaryExpression"],SHA512:["primaryExpression"],COALESCE:["primaryExpression"],IF:["primaryExpression"],STRLANG:["primaryExpression"],STRDT:["primaryExpression"],SAMETERM:["primaryExpression"],ISIRI:["primaryExpression"],ISURI:["primaryExpression"],ISBLANK:["primaryExpression"],ISLITERAL:["primaryExpression"],ISNUMERIC:["primaryExpression"],TRUE:["primaryExpression"],FALSE:["primaryExpression"],"<<":["primaryExpression"],COUNT:["primaryExpression"],SUM:["primaryExpression"],MIN:["primaryExpression"],MAX:["primaryExpression"],AVG:["primaryExpression"],SAMPLE:["primaryExpression"],GROUP_CONCAT:["primaryExpression"],SUBSTR:["primaryExpression"],REPLACE:["primaryExpression"],REGEX:["primaryExpression"],EXISTS:["primaryExpression"],NOT:["primaryExpression"],IRI_REF:["primaryExpression"],STRING_LITERAL1:["primaryExpression"],STRING_LITERAL2:["primaryExpression"],STRING_LITERAL_LONG1:["primaryExpression"],STRING_LITERAL_LONG2:["primaryExpression"],INTEGER:["primaryExpression"],DECIMAL:["primaryExpression"],DOUBLE:["primaryExpression"],INTEGER_POSITIVE:["primaryExpression"],DECIMAL_POSITIVE:["primaryExpression"],DOUBLE_POSITIVE:["primaryExpression"],INTEGER_NEGATIVE:["primaryExpression"],DECIMAL_NEGATIVE:["primaryExpression"],DOUBLE_NEGATIVE:["primaryExpression"],PNAME_LN:["primaryExpression"],PNAME_NS:["primaryExpression"]},update:{INSERT:["prologue","?[update1,?[;,update]]"],DELETE:["prologue","?[update1,?[;,update]]"],LOAD:["prologue","?[update1,?[;,update]]"],CLEAR:["prologue","?[update1,?[;,update]]"],DROP:["prologue","?[update1,?[;,update]]"],ADD:["prologue","?[update1,?[;,update]]"],MOVE:["prologue","?[update1,?[;,update]]"],COPY:["prologue","?[update1,?[;,update]]"],CREATE:["prologue","?[update1,?[;,update]]"],WITH:["prologue","?[update1,?[;,update]]"],BASE:["prologue","?[update1,?[;,update]]"],PREFIX:["prologue","?[update1,?[;,update]]"],$:["prologue","?[update1,?[;,update]]"]},update1:{LOAD:["load"],CLEAR:["clear"],DROP:["drop"],ADD:["add"],MOVE:["move"],COPY:["copy"],CREATE:["create"],INSERT:["INSERT","insert1"],DELETE:["DELETE","delete1"],WITH:["modify"]},updateAll:{INSERT:["?[update1,?[;,update]]"],DELETE:["?[update1,?[;,update]]"],LOAD:["?[update1,?[;,update]]"],CLEAR:["?[update1,?[;,update]]"],DROP:["?[update1,?[;,update]]"],ADD:["?[update1,?[;,update]]"],MOVE:["?[update1,?[;,update]]"],COPY:["?[update1,?[;,update]]"],CREATE:["?[update1,?[;,update]]"],WITH:["?[update1,?[;,update]]"],$:["?[update1,?[;,update]]"]},usingClause:{USING:["USING","or([iriRef,[NAMED,iriRef]])"]},valueLogical:{"!":["relationalExpression"],"+":["relationalExpression"],"-":["relationalExpression"],VAR1:["relationalExpression"],VAR2:["relationalExpression"],"(":["relationalExpression"],STR:["relationalExpression"],LANG:["relationalExpression"],LANGMATCHES:["relationalExpression"],DATATYPE:["relationalExpression"],BOUND:["relationalExpression"],IRI:["relationalExpression"],URI:["relationalExpression"],BNODE:["relationalExpression"],RAND:["relationalExpression"],ABS:["relationalExpression"],CEIL:["relationalExpression"],FLOOR:["relationalExpression"],ROUND:["relationalExpression"],CONCAT:["relationalExpression"],STRLEN:["relationalExpression"],UCASE:["relationalExpression"],LCASE:["relationalExpression"],ENCODE_FOR_URI:["relationalExpression"],CONTAINS:["relationalExpression"],STRSTARTS:["relationalExpression"],STRENDS:["relationalExpression"],STRBEFORE:["relationalExpression"],STRAFTER:["relationalExpression"],YEAR:["relationalExpression"],MONTH:["relationalExpression"],DAY:["relationalExpression"],HOURS:["relationalExpression"],MINUTES:["relationalExpression"],SECONDS:["relationalExpression"],TIMEZONE:["relationalExpression"],TZ:["relationalExpression"],NOW:["relationalExpression"],UUID:["relationalExpression"],STRUUID:["relationalExpression"],MD5:["relationalExpression"],SHA1:["relationalExpression"],SHA256:["relationalExpression"],SHA384:["relationalExpression"],SHA512:["relationalExpression"],COALESCE:["relationalExpression"],IF:["relationalExpression"],STRLANG:["relationalExpression"],STRDT:["relationalExpression"],SAMETERM:["relationalExpression"],ISIRI:["relationalExpression"],ISURI:["relationalExpression"],ISBLANK:["relationalExpression"],ISLITERAL:["relationalExpression"],ISNUMERIC:["relationalExpression"],TRUE:["relationalExpression"],FALSE:["relationalExpression"],"<<":["relationalExpression"],COUNT:["relationalExpression"],SUM:["relationalExpression"],MIN:["relationalExpression"],MAX:["relationalExpression"],AVG:["relationalExpression"],SAMPLE:["relationalExpression"],GROUP_CONCAT:["relationalExpression"],SUBSTR:["relationalExpression"],REPLACE:["relationalExpression"],REGEX:["relationalExpression"],EXISTS:["relationalExpression"],NOT:["relationalExpression"],IRI_REF:["relationalExpression"],STRING_LITERAL1:["relationalExpression"],STRING_LITERAL2:["relationalExpression"],STRING_LITERAL_LONG1:["relationalExpression"],STRING_LITERAL_LONG2:["relationalExpression"],INTEGER:["relationalExpression"],DECIMAL:["relationalExpression"],DOUBLE:["relationalExpression"],INTEGER_POSITIVE:["relationalExpression"],DECIMAL_POSITIVE:["relationalExpression"],DOUBLE_POSITIVE:["relationalExpression"],INTEGER_NEGATIVE:["relationalExpression"],DECIMAL_NEGATIVE:["relationalExpression"],DOUBLE_NEGATIVE:["relationalExpression"],PNAME_LN:["relationalExpression"],PNAME_NS:["relationalExpression"]},valuesClause:{VALUES:["VALUES","dataBlock"],$:[],"}":[]},var:{VAR1:["VAR1"],VAR2:["VAR2"]},varOrIRIref:{VAR1:["var"],VAR2:["var"],IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"]},varOrTerm:{VAR1:["var"],VAR2:["var"],NIL:["graphTerm"],IRI_REF:["graphTerm"],TRUE:["graphTerm"],FALSE:["graphTerm"],BLANK_NODE_LABEL:["graphTerm"],ANON:["graphTerm"],"<<":["graphTerm"],PNAME_LN:["graphTerm"],PNAME_NS:["graphTerm"],STRING_LITERAL1:["graphTerm"],STRING_LITERAL2:["graphTerm"],STRING_LITERAL_LONG1:["graphTerm"],STRING_LITERAL_LONG2:["graphTerm"],INTEGER:["graphTerm"],DECIMAL:["graphTerm"],DOUBLE:["graphTerm"],INTEGER_POSITIVE:["graphTerm"],DECIMAL_POSITIVE:["graphTerm"],DOUBLE_POSITIVE:["graphTerm"],INTEGER_NEGATIVE:["graphTerm"],DECIMAL_NEGATIVE:["graphTerm"],DOUBLE_NEGATIVE:["graphTerm"]},verb:{VAR1:["storeProperty","varOrIRIref"],VAR2:["storeProperty","varOrIRIref"],IRI_REF:["storeProperty","varOrIRIref"],PNAME_LN:["storeProperty","varOrIRIref"],PNAME_NS:["storeProperty","varOrIRIref"],a:["storeProperty","a"]},verbPath:{"^":["path"],a:["path"],"!":["path"],"(":["path"],IRI_REF:["path"],PNAME_LN:["path"],PNAME_NS:["path"]},verbSimple:{VAR1:["var"],VAR2:["var"]},whereClause:{"{":["?WHERE","groupGraphPattern"],WHERE:["?WHERE","groupGraphPattern"]}},keywords:/^(GROUP_CONCAT|DATATYPE|BASE|PREFIX|SELECT|CONSTRUCT|DESCRIBE|ASK|FROM|NAMED|ORDER|BY|LIMIT|ASC|DESC|OFFSET|DISTINCT|REDUCED|WHERE|GRAPH|OPTIONAL|UNION|FILTER|GROUP|HAVING|AS|VALUES|LOAD|CLEAR|DROP|CREATE|MOVE|COPY|SILENT|INSERT|DELETE|DATA|WITH|TO|USING|NAMED|MINUS|BIND|LANGMATCHES|LANG|BOUND|SAMETERM|ISIRI|ISURI|ISBLANK|ISLITERAL|REGEX|TRUE|FALSE|UNDEF|ADD|DEFAULT|ALL|SERVICE|INTO|IN|NOT|IRI|URI|BNODE|RAND|ABS|CEIL|FLOOR|ROUND|CONCAT|STRLEN|UCASE|LCASE|ENCODE_FOR_URI|CONTAINS|STRSTARTS|STRENDS|STRBEFORE|STRAFTER|YEAR|MONTH|DAY|HOURS|MINUTES|SECONDS|TIMEZONE|TZ|NOW|UUID|STRUUID|MD5|SHA1|SHA256|SHA384|SHA512|COALESCE|IF|STRLANG|STRDT|ISNUMERIC|SUBSTR|REPLACE|EXISTS|COUNT|SUM|MIN|MAX|AVG|SAMPLE|SEPARATOR|STR|<<|>>)/i,punct:/^(\*|a|\.|\{|\}|,|\(|\)|;|\[|\]|\|\||&&|=|!=|!|<=|>=|<|>|\+|-|\/|\^\^|\?|\||\^)/,startSymbol:"sparql11",acceptEmpty:!0}},{}],3:[function(e,t,n){"use strict";var r=e("codemirror");r.defineMode("sparql11",(function(t,n){t.indentUnit;var r=e("./_tokenizer-table.js"),i=r.table,o="[0-9A-Fa-f]",s="(([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD])(((([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]))|\\.)*(([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])))?)?:",a="[eE][\\+-]?[0-9]+",l="(([0-9]+\\.[0-9]*)|(\\.[0-9]+))",u="(([0-9]+\\.[0-9]*"+a+")|(\\.[0-9]+"+a+")|([0-9]+"+a+"))",c="\\\\[tbnrf\\\\\"']",p=o+"{4}",d="(\\\\u"+p+"|\\\\U00(10|0"+o+")"+p+")",f={SINGLE:{CAT:"STRING_LITERAL_LONG1",QUOTES:"'''",CONTENTS:"(('|'')?([^'\\\\]|"+c+"|"+d+"))*"},DOUBLE:{CAT:"STRING_LITERAL_LONG2",QUOTES:'"""',CONTENTS:'(("|"")?([^"\\\\]|'+c+"|"+d+"))*"}};for(var h in f)f[h].COMPLETE=f[h].QUOTES+f[h].CONTENTS+f[h].QUOTES;var g={};for(var h in f)g[h]={complete:{name:"STRING_LITERAL_LONG_"+h,regex:new RegExp("^"+f[h].COMPLETE),style:"string"},contents:{name:"STRING_LITERAL_LONG_"+h,regex:new RegExp("^"+f[h].CONTENTS),style:"string"},closing:{name:"STRING_LITERAL_LONG_"+h,regex:new RegExp("^"+f[h].CONTENTS+f[h].QUOTES),style:"string"},quotes:{name:"STRING_LITERAL_LONG_QUOTES_"+h,regex:new RegExp("^"+f[h].QUOTES),style:"string"}};var m="[\\x20\\x09\\x0D\\x0A]",v="#([^\\n\\r]*[\\n\\r]|[^\\n\\r]*$)",y=[{name:"WS",regex:new RegExp("^"+m+"+"),style:"ws"},{name:"COMMENT",regex:new RegExp("^"+v),style:"comment"},{name:"IRI_REF",regex:new RegExp("^<[^<>\"'|{}^\\\0- ]*>"),style:"variable-3"},{name:"VAR1",regex:new RegExp("^\\?([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|[0-9])([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])*"),style:"atom"},{name:"VAR2",regex:new RegExp("^\\$([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|[0-9])([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])*"),style:"atom"},{name:"LANGTAG",regex:new RegExp("^@[a-zA-Z]+(-[a-zA-Z0-9]+)*"),style:"meta"},{name:"DOUBLE",regex:new RegExp("^"+u),style:"number"},{name:"DECIMAL",regex:new RegExp("^"+l),style:"number"},{name:"INTEGER",regex:new RegExp("^[0-9]+"),style:"number"},{name:"DOUBLE_POSITIVE",regex:new RegExp("^\\+(([0-9]+\\.[0-9]*[eE][\\+-]?[0-9]+)|(\\.[0-9]+[eE][\\+-]?[0-9]+)|([0-9]+[eE][\\+-]?[0-9]+))"),style:"number"},{name:"DECIMAL_POSITIVE",regex:new RegExp("^\\+(([0-9]+\\.[0-9]*)|(\\.[0-9]+))"),style:"number"},{name:"INTEGER_POSITIVE",regex:new RegExp("^\\+[0-9]+"),style:"number"},{name:"DOUBLE_NEGATIVE",regex:new RegExp("^-(([0-9]+\\.[0-9]*[eE][\\+-]?[0-9]+)|(\\.[0-9]+[eE][\\+-]?[0-9]+)|([0-9]+[eE][\\+-]?[0-9]+))"),style:"number"},{name:"DECIMAL_NEGATIVE",regex:new RegExp("^-(([0-9]+\\.[0-9]*)|(\\.[0-9]+))"),style:"number"},{name:"INTEGER_NEGATIVE",regex:new RegExp("^-[0-9]+"),style:"number"},{name:"STRING_LITERAL1",regex:new RegExp("^'(([^\\x27\\x5C\\x0A\\x0D])|\\\\[tbnrf\\\\\"']|(\\\\u[0-9A-Fa-f]{4}|\\\\U00(10|0[0-9A-Fa-f])[0-9A-Fa-f]{4}))*'"),style:"string"},{name:"STRING_LITERAL2",regex:new RegExp('^"(([^\\x22\\x5C\\x0A\\x0D])|\\\\[tbnrf\\\\"\']|(\\\\u[0-9A-Fa-f]{4}|\\\\U00(10|0[0-9A-Fa-f])[0-9A-Fa-f]{4}))*"'),style:"string"},{name:"NIL",regex:new RegExp("^\\(([\\x20\\x09\\x0D\\x0A]|(#([^\\n\\r]*[\\n\\r]|[^\\n\\r]*$)))*\\)"),style:"punc"},{name:"ANON",regex:new RegExp("^\\[([\\x20\\x09\\x0D\\x0A]|(#([^\\n\\r]*[\\n\\r]|[^\\n\\r]*$)))*\\]"),style:"punc"},{name:"PNAME_LN",regex:new RegExp("^(([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD])(((([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]))|\\.)*(([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])))?)?:([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|:|[0-9]|((%[0-9A-Fa-f][0-9A-Fa-f])|(\\\\[_~\\.\\-!\\$&'\\(\\)\\*\\+,;=/\\?#@%])))((([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])|\\.|:|((%[0-9A-Fa-f][0-9A-Fa-f])|(\\\\[_~\\.\\-!\\$&'\\(\\)\\*\\+,;=/\\?#@%])))*(([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])|:|((%[0-9A-Fa-f][0-9A-Fa-f])|(\\\\[_~\\.\\-!\\$&'\\(\\)\\*\\+,;=/\\?#@%]))))?"),style:"string-2"},{name:"PNAME_NS",regex:new RegExp("^"+s),style:"string-2"},{name:"BLANK_NODE_LABEL",regex:new RegExp("^_:([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|[0-9])((([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])|\\.)*([A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|_|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]))?"),style:"string-2"}];function x(e){var t=[],n=i[e];if(null!=n)for(var r in n)t.push(r.toString());else t.push(e);return t}function E(e,t){function n(){var n=e.column();t.errorStartPos=n,t.errorEndPos=n+a.text.length}function o(e){"disallowVars"==e?t.allowVars=!1:"allowVars"==e?t.allowVars=!0:"disallowBnodes"==e?t.allowBnodes=!1:"allowBnodes"==e?t.allowBnodes=!0:"storeProperty"==e&&(t.storeProperty=!0)}function s(e){return(t.allowVars||"var"!=e)&&(t.allowBnodes||"blankNode"!=e&&"blankNodePropertyList"!=e&&"blankNodePropertyListPath"!=e)}0==e.pos&&(t.possibleCurrent=t.possibleNext);var a=function(){var n=null;if(t.inLiteral){var i=!1;if((n=e.match(g[t.inLiteral].contents.regex,!0,!1))&&0==n[0].length&&(n=e.match(g[t.inLiteral].closing.regex,!0,!1),i=!0),n&&n[0].length>0){var o={quotePos:i?"end":"content",cat:f[t.inLiteral].CAT,style:g[t.inLiteral].complete.style,text:n[0],start:e.start};return i&&(t.inLiteral=!1),o}}for(var s in g){var a;if(n=e.match(g[s].quotes.regex,!0,!1))return t.inLiteral?(t.inLiteral=!1,a="end"):(t.inLiteral=s,a="start"),{cat:f[s].CAT,style:g[s].quotes.style,text:n[0],quotePos:a,start:e.start}}for(var l=0;l<y.length;++l)if(n=e.match(y[l].regex,!0,!1))return{cat:y[l].name,style:y[l].style,text:n[0],start:e.start};return(n=e.match(r.keywords,!0,!1))?{cat:e.current().toUpperCase(),style:"keyword",text:n[0],start:e.start}:(n=e.match(r.punct,!0,!1))?{cat:e.current(),style:"punc",text:n[0],start:e.start}:{cat:"<invalid_token>",style:"error",text:(n=e.match(/^.[A-Za-z0-9]*/,!0,!1))[0],start:e.start}}();if("<invalid_token>"==a.cat)return 1==t.OK&&(t.OK=!1,n()),t.complete=!1,a.style;if("WS"==a.cat||"COMMENT"==a.cat||a.quotePos&&"end"!=a.quotePos)return t.possibleCurrent=t.possibleNext,a.style;var l,u,c=!1,p=a.cat;if(!a.quotePos||"end"==a.quotePos)for(;t.stack.length>0&&p&&t.OK&&!c;)if(l=t.stack.pop(),i[l]){var d=i[l][p];if(null!=d&&s(l)){for(var h=d.length-1;h>=0;--h)t.stack.push(d[h]);o(l)}else t.OK=!1,t.complete=!1,n(),t.stack.push(l)}else if(l==p){c=!0,u=l,null==t.queryType&&("SELECT"!=u&&"CONSTRUCT"!=u&&"ASK"!=u&&"DESCRIBE"!=u&&"INSERT"!=u&&"DELETE"!=u&&"LOAD"!=u&&"CLEAR"!=u&&"CREATE"!=u&&"DROP"!=u&&"COPY"!=u&&"MOVE"!=u&&"ADD"!=u||(t.queryType=u));for(var m=!0,v=t.stack.length;v>0;--v){var E=i[t.stack[v-1]];E&&E.$||(m=!1)}t.complete=m,t.storeProperty&&"punc"!=p.cat&&(t.lastProperty=a.text,t.storeProperty=!1)}else t.OK=!1,t.complete=!1,n();return!c&&t.OK&&(t.OK=!1,t.complete=!1,n()),t.possibleCurrent.indexOf("a")>=0&&(t.lastPredicateOffset=a.start),t.possibleCurrent=t.possibleNext,t.possibleNext=x(t.stack[t.stack.length-1]),a.style}var b={"*[,, object]":3,"*[(,),object]":3,"*[(,),objectPath]":3,"*[/,pathEltOrInverse]":2,object:2,objectPath:2,objectList:2,objectListPath:2,storeProperty:2,pathMod:2,"?pathMod":2,propertyListNotEmpty:1,propertyList:1,propertyListPath:1,propertyListPathNotEmpty:1,"?[verb,objectList]":1},C={"}":1,"]":0,")":1,"{":-1,"(":-1};return{token:E,startState:function(e){return{tokenize:E,OK:!0,complete:r.acceptEmpty,errorStartPos:null,errorEndPos:null,queryType:null,possibleCurrent:x(r.startSymbol),possibleNext:x(r.startSymbol),allowVars:!0,allowBnodes:!0,storeProperty:!1,lastProperty:"",inLiteral:!1,stack:[r.startSymbol],lastPredicateOffset:t.indentUnit}},indent:function(e,n){if(e.inLiteral)return 0;if(e.stack.length&&"?[or([verbPath,verbSimple]),objectList]"==e.stack[e.stack.length-1])return e.lastPredicateOffset;var r=0,i=e.stack.length-1;if(/^[\}\]\)]/.test(n)){for(var o=n.substr(0,1);i>=0;--i)if(e.stack[i]==o){--i;break}}else(s=b[e.stack[i]])&&(r+=s,--i);for(;i>=0;--i){var s;(s=C[e.stack[i]])&&(r+=s)}return r*t.indentUnit},electricChars:"}])"}})),r.defineMIME("application/x-sparql-query","sparql11")},{"./_tokenizer-table.js":2,codemirror:15}],4:[function(e,t,n){var r=t.exports=function(){this.words=0,this.prefixes=0,this.children=[]};r.prototype={insert:function(e,t){if(0!=e.length){var n,i=this;void 0===t&&(t=0),t!==e.length?(i.prefixes++,n=e[t],void 0===i.children[n]&&(i.children[n]=new r),i.children[n].insert(e,t+1)):i.words++}},remove:function(e,t){if(0!=e.length){var n,r=this;void 0===t&&(t=0),void 0!==r&&(t!==e.length?(r.prefixes--,n=e[t],r.children[n].remove(e,t+1)):r.words--)}},update:function(e,t){0!=e.length&&0!=t.length&&(this.remove(e),this.insert(t))},countWord:function(e,t){if(0==e.length)return 0;var n,r,i=0;return void 0===t&&(t=0),t===e.length?this.words:(n=e[t],void 0!==(r=this.children[n])&&(i=r.countWord(e,t+1)),i)},countPrefix:function(e,t){if(0==e.length)return 0;var n,r=0;if(void 0===t&&(t=0),t===e.length)return this.prefixes;var i=e[t];return void 0!==(n=this.children[i])&&(r=n.countPrefix(e,t+1)),r},find:function(e){return 0!=e.length&&this.countWord(e)>0},getAllWords:function(e){var t,n,r=this,i=[];if(void 0===e&&(e=""),void 0===r)return[];for(t in r.words>0&&i.push(e),r.children)n=r.children[t],i=i.concat(n.getAllWords(e+t));return i},autoComplete:function(e,t){var n,r;return 0==e.length?void 0===t?this.getAllWords(e):[]:(void 0===t&&(t=0),n=e[t],void 0===(r=this.children[n])?[]:t===e.length-1?r.getAllWords(e):r.autoComplete(e,t+1))}}},{}],5:[function(e,t,n){var r;r=function(e){"use strict";e.defineOption("fullScreen",!1,(function(t,n,r){r==e.Init&&(r=!1),!r!=!n&&(n?function(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}(t):function(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width,t.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),e.refresh()}(t))}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],6:[function(e,t,n){var r;r=function(e){var t={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(o),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(o))}));for(var i=t.pairs+"`",o={Backspace:function(t){var i=l(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),s=t.listSelections(),a=0;a<s.length;a++){if(!s[a].empty())return e.Pass;var u=c(t,s[a].head);if(!u||o.indexOf(u)%2!=0)return e.Pass}for(a=s.length-1;a>=0;a--){var p=s[a].head;t.replaceRange("",n(p.line,p.ch-1),n(p.line,p.ch+1),"+delete")}},Enter:function(t){var n=l(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return e.Pass;var a=c(t,o[s].head);if(!a||i.indexOf(a)%2!=0)return e.Pass}t.operation((function(){t.replaceSelection("\n\n",null),t.execCommand("goCharLeft"),o=t.listSelections();for(var e=0;e<o.length;e++){var n=o[e].head.line;t.indentLine(n,null,!0),t.indentLine(n+1,null,!0)}}))}},s=0;s<i.length;s++)o["'"+i.charAt(s)+"'"]=a(i.charAt(s));function a(t){return function(i){return function(t,i){var o=l(t);if(!o||t.getOption("disableInput"))return e.Pass;var s=r(o,"pairs"),a=s.indexOf(i);if(-1==a)return e.Pass;for(var c,d=r(o,"triples"),f=s.charAt(a+1)==i,h=t.listSelections(),g=a%2==0,m=0;m<h.length;m++){var v,y=h[m],x=y.head,E=t.getRange(x,n(x.line,x.ch+1));if(g&&!y.empty())v="surround";else if(!f&&g||E!=i)if(f&&x.ch>1&&d.indexOf(i)>=0&&t.getRange(n(x.line,x.ch-2),x)==i+i&&(x.ch<=2||t.getRange(n(x.line,x.ch-3),n(x.line,x.ch-2))!=i))v="addFour";else if(f){if(e.isWordChar(E)||!p(t,x,i))return e.Pass;v="both"}else{if(!g||t.getLine(x.line).length!=x.ch&&!u(E,s)&&!/\s/.test(E))return e.Pass;v="both"}else v=d.indexOf(i)>=0&&t.getRange(x,n(x.line,x.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=v)return e.Pass}else c=v}var b=a%2?s.charAt(a-1):i,C=a%2?i:s.charAt(a+1);t.operation((function(){if("skip"==c)t.execCommand("goCharRight");else if("skipThree"==c)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==c){var i=t.getSelections();for(r=0;r<i.length;r++)i[r]=b+i[r]+C;for(t.replaceSelections(i,"around"),i=t.listSelections().slice(),r=0;r<i.length;r++)i[r]=(o=i[r],s=void 0,s=e.cmpPos(o.anchor,o.head)>0,{anchor:new n(o.anchor.line,o.anchor.ch+(s?-1:1)),head:new n(o.head.line,o.head.ch+(s?1:-1))});t.setSelections(i)}else"both"==c?(t.replaceSelection(b+C,null),t.triggerElectric(b+C),t.execCommand("goCharLeft")):"addFour"==c&&(t.replaceSelection(b+b+b+b,"before"),t.execCommand("goCharRight"));var o,s}))}(i,t)}}function l(e){var t=e.state.closeBrackets;return t?e.getModeAt(e.getCursor()).closeBrackets||t:null}function u(e,t){var n=t.lastIndexOf(e);return n>-1&&n%2==1}function c(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function p(t,n,r){var i=t.getLine(n.line),o=t.getTokenAt(n);if(/\bstring2?\b/.test(o.type))return!1;var s=new e.StringStream(i.slice(0,n.ch)+r+i.slice(n.ch),4);for(s.pos=s.start=o.start;;){var a=t.getMode().token(s,o.state);if(s.pos>=n.ch+1)return/\bstring2?\b/.test(a);s.start=s.pos}}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],7:[function(e,t,n){var r;r=function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function i(e,t,i,s){var a=e.getLineHandle(t.line),l=t.ch-1,u=l>=0&&r[a.text.charAt(l)]||r[a.text.charAt(++l)];if(!u)return null;var c=">"==u.charAt(1)?1:-1;if(i&&c>0!=(l==t.ch))return null;var p=e.getTokenTypeAt(n(t.line,l+1)),d=o(e,n(t.line,l+(c>0?1:0)),c,p||null,s);return null==d?null:{from:n(t.line,l),to:d&&d.pos,match:d&&d.ch==u.charAt(0),forward:c>0}}function o(e,t,i,o,s){for(var a=s&&s.maxScanLineLength||1e4,l=s&&s.maxScanLines||1e3,u=[],c=s&&s.bracketRegex?s.bracketRegex:/[(){}[\]]/,p=i>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),d=t.line;d!=p;d+=i){var f=e.getLine(d);if(f){var h=i>0?0:f.length-1,g=i>0?f.length:-1;if(!(f.length>a))for(d==t.line&&(h=t.ch-(i<0?1:0));h!=g;h+=i){var m=f.charAt(h);if(c.test(m)&&(void 0===o||e.getTokenTypeAt(n(d,h+1))==o))if(">"==r[m].charAt(1)==i>0)u.push(m);else{if(!u.length)return{pos:n(d,h),ch:m};u.pop()}}}}return d-i!=(i>0?e.lastLine():e.firstLine())&&null}function s(e,r,o){for(var s=e.state.matchBrackets.maxHighlightLineLength||1e3,a=[],l=e.listSelections(),u=0;u<l.length;u++){var c=l[u].empty()&&i(e,l[u].head,!1,o);if(c&&e.getLine(c.from.line).length<=s){var p=c.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";a.push(e.markText(c.from,n(c.from.line,c.from.ch+1),{className:p})),c.to&&e.getLine(c.to.line).length<=s&&a.push(e.markText(c.to,n(c.to.line,c.to.ch+1),{className:p}))}}if(a.length){t&&e.state.focused&&e.focus();var d=function(){e.operation((function(){for(var e=0;e<a.length;e++)a[e].clear()}))};if(!r)return d;setTimeout(d,800)}}var a=null;function l(e){e.operation((function(){a&&(a(),a=null),a=s(e,!1,e.state.matchBrackets)}))}e.defineOption("matchBrackets",!1,(function(t,n,r){r&&r!=e.Init&&t.off("cursorActivity",l),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",l))})),e.defineExtension("matchBrackets",(function(){s(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,n){return i(this,e,t,n)})),e.defineExtension("scanForBracket",(function(e,t,n,r){return o(this,e,t,n,r)}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],8:[function(e,t,n){var r;r=function(e){"use strict";e.registerHelper("fold","brace",(function(t,n){var r,i=n.line,o=t.getLine(i);function s(s){for(var a=n.ch,l=0;;){var u=a<=0?-1:o.lastIndexOf(s,a-1);if(-1!=u){if(1==l&&u<n.ch)break;if(r=t.getTokenTypeAt(e.Pos(i,u+1)),!/^(comment|string)/.test(r))return u+1;a=u-1}else{if(1==l)break;l=1,a=o.length}}}var a="{",l="}",u=s("{");if(null==u&&(a="[",l="]",u=s("[")),null!=u){var c,p,d=1,f=t.lastLine();e:for(var h=i;h<=f;++h)for(var g=t.getLine(h),m=h==i?u:0;;){var v=g.indexOf(a,m),y=g.indexOf(l,m);if(v<0&&(v=g.length),y<0&&(y=g.length),(m=Math.min(v,y))==g.length)break;if(t.getTokenTypeAt(e.Pos(h,m+1))==r)if(m==v)++d;else if(!--d){c=h,p=m;break e}++m}if(null!=c&&(i!=c||p!=u))return{from:e.Pos(i,u),to:e.Pos(c,p)}}})),e.registerHelper("fold","import",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);i<=o;++i){var s=t.getLine(i).indexOf(";");if(-1!=s)return{startCh:r.end,end:e.Pos(i,s)}}}var i,o=n.line,s=r(o);if(!s||r(o-1)||(i=r(o-2))&&i.end.line==o-1)return null;for(var a=s.end;;){var l=r(a.line+1);if(null==l)break;a=l.end}return{from:t.clipPos(e.Pos(o,s.startCh+1)),to:a}})),e.registerHelper("fold","include",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var i=n.line,o=r(i);if(null==o||null!=r(i-1))return null;for(var s=i;null!=r(s+1);)++s;return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(s))}}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],9:[function(e,t,n){var r;r=function(e){"use strict";function t(t,n,i,o){if(i&&i.call){var s=i;i=null}else s=r(t,i,"rangeFinder");"number"==typeof n&&(n=e.Pos(n,0));var a=r(t,i,"minFoldSize");function l(e){var r=s(t,n);if(!r||r.to.line-r.from.line<a)return null;for(var i=t.findMarksAt(r.from),l=0;l<i.length;++l)if(i[l].__isFold&&"fold"!==o){if(!e)return null;r.cleared=!0,i[l].clear()}return r}var u=l(!0);if(r(t,i,"scanUp"))for(;!u&&n.line>t.firstLine();)n=e.Pos(n.line-1,0),u=l(!1);if(u&&!u.cleared&&"unfold"!==o){var c=function(e,t){var n=r(e,t,"widget");if("string"==typeof n){var i=document.createTextNode(n);(n=document.createElement("span")).appendChild(i),n.className="CodeMirror-foldmarker"}return n}(t,i);e.on(c,"mousedown",(function(t){p.clear(),e.e_preventDefault(t)}));var p=t.markText(u.from,u.to,{replacedWith:c,clearOnEnter:r(t,i,"clearOnEnter"),__isFold:!0});p.on("clear",(function(n,r){e.signal(t,"unfold",t,n,r)})),e.signal(t,"fold",t,u.from,u.to)}}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",(function(e,n,r){t(this,e,n,r)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0})),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")},e.commands.foldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),null,"fold")}))},e.commands.unfoldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),null,"unfold")}))},e.registerHelper("fold","combine",(function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}})),e.registerHelper("fold","auto",(function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}}));var n={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function r(e,t,r){if(t&&void 0!==t[r])return t[r];var i=e.options.foldOptions;return i&&void 0!==i[r]?i[r]:n[r]}e.defineOption("foldOptions",null),e.defineExtension("foldOption",(function(e,t){return r(this,e,t)}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],10:[function(e,t,n){var r;r=function(e){"use strict";e.defineOption("foldGutter",!1,(function(t,r,i){var o;i&&i!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",a),t.off("change",l),t.off("viewportChange",u),t.off("fold",c),t.off("unfold",c),t.off("swapDoc",l)),r&&(t.state.foldGutter=new n((!0===(o=r)&&(o={}),null==o.gutter&&(o.gutter="CodeMirror-foldgutter"),null==o.indicatorOpen&&(o.indicatorOpen="CodeMirror-foldgutter-open"),null==o.indicatorFolded&&(o.indicatorFolded="CodeMirror-foldgutter-folded"),o)),s(t),t.on("gutterClick",a),t.on("change",l),t.on("viewportChange",u),t.on("fold",c),t.on("unfold",c),t.on("swapDoc",l))}));var t=e.Pos;function n(e){this.options=e,this.from=this.to=0}function r(e,n){for(var r=e.findMarks(t(n,0),t(n+1,0)),i=0;i<r.length;++i)if(r[i].__isFold&&r[i].find().from.line==n)return r[i]}function i(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function o(e,n,o){var s=e.state.foldGutter.options,a=n,l=e.foldOption(s,"minFoldSize"),u=e.foldOption(s,"rangeFinder");e.eachLine(n,o,(function(n){var o=null;if(r(e,a))o=i(s.indicatorFolded);else{var c=t(a,0),p=u&&u(e,c);p&&p.to.line-p.from.line>=l&&(o=i(s.indicatorOpen))}e.setGutterMarker(n,s.gutter,o),++a}))}function s(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation((function(){o(e,t.from,t.to)})),n.from=t.from,n.to=t.to)}function a(e,n,i){var o=e.state.foldGutter;if(o){var s=o.options;if(i==s.gutter){var a=r(e,n);a?a.clear():e.foldCode(t(n,0),s.rangeFinder)}}}function l(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){s(e)}),n.foldOnChangeTimeSpan||600)}}function u(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?s(e):e.operation((function(){n.from<t.from&&(o(e,n.from,t.from),t.from=n.from),n.to>t.to&&(o(e,t.to,n.to),t.to=n.to)}))}),n.updateViewportTimeSpan||400)}}function c(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r<n.to&&o(e,r,r+1)}}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror"),e("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],r):r(CodeMirror)},{"../../lib/codemirror":15,"./foldcode":9}],11:[function(e,t,n){var r;r=function(e){"use strict";var t=e.Pos,n="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r=new RegExp("<(/?)(["+n+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function i(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?r.from:e.firstLine(),this.max=r?r.to-1:e.lastLine()}function o(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function s(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function a(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function l(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(s(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(a(e))continue;return}if(o(e,t+1)){r.lastIndex=t,e.ch=t;var n=r.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function c(e){for(;;){r.lastIndex=e.ch;var t=r.exec(e.text);if(!t){if(s(e))continue;return}if(o(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function p(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(a(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function d(e,n){for(var r=[];;){var i,o=c(e),s=e.line,a=e.ch-(o?o[0].length:0);if(!o||!(i=l(e)))return;if("selfClose"!=i)if(o[1]){for(var u=r.length-1;u>=0;--u)if(r[u]==o[2]){r.length=u;break}if(u<0&&(!n||n==o[2]))return{tag:o[2],from:t(s,a),to:t(e.line,e.ch)}}else r.push(o[2])}}function f(e,n){for(var r=[];;){var i=p(e);if(!i)return;if("selfClose"!=i){var o=e.line,s=e.ch,a=u(e);if(!a)return;if(a[1])r.push(a[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==a[2]){r.length=l;break}if(l<0&&(!n||n==a[2]))return{tag:a[2],from:t(e.line,e.ch),to:t(o,s)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,n){for(var r=new i(e,n.line,0);;){var o,s=c(r);if(!s||r.line!=n.line||!(o=l(r)))return;if(!s[1]&&"selfClose"!=o){var a=t(r.line,r.ch),u=d(r,s[2]);return u&&{from:a,to:u.from}}}})),e.findMatchingTag=function(e,n,r){var o=new i(e,n.line,n.ch,r);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=l(o),a=s&&t(o.line,o.ch),c=s&&u(o);if(s&&c&&(h=n,!(((p=o).line-h.line||p.ch-h.ch)>0))){var p,h,g={from:t(o.line,o.ch),to:a,tag:c[2]};return"selfClose"==s?{open:g,close:null,at:"open"}:c[1]?{open:f(o,c[2]),close:g,at:"close"}:{open:g,close:d(o=new i(e,a.line,a.ch,r),c[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n){for(var r=new i(e,t.line,t.ch,n);;){var o=f(r);if(!o)break;var s=d(new i(e,t.line,t.ch,n),o.tag);if(s)return{open:o,close:s}}},e.scanForClosingTag=function(e,t,n,r){return d(new i(e,t.line,t.ch,r?{from:0,to:r}:null),n)}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],12:[function(e,t,n){var r;r=function(e){"use strict";function t(e,t){this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)},e.defineExtension("showHint",(function(n){n=function(e,t,n){var r=e.options.hintOptions,i={};for(var o in l)i[o]=l[o];if(r)for(var o in r)void 0!==r[o]&&(i[o]=r[o]);if(n)for(var o in n)void 0!==n[o]&&(i[o]=n[o]);return i.hint.resolve&&(i.hint=i.hint.resolve(e,t)),i}(this,this.getCursor("start"),n);var r=this.listSelections();if(!(r.length>1)){if(this.somethingSelected()){if(!n.hint.supportsSelection)return;for(var i=0;i<r.length;i++)if(r[i].head.line!=r[i].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var o=this.state.completionActive=new t(this,n);o.options.hint&&(e.signal(this,"startCompletion",this),o.update(!0))}}));var n=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},r=window.cancelAnimationFrame||clearTimeout;function i(e){return"string"==typeof e?e:e.text}function o(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function s(t,n){this.completion=t,this.data=n,this.picked=!1;var r=this,s=t.cm,a=this.hints=document.createElement("ul");a.className="CodeMirror-hints",this.selectedHint=n.selectedHint||0;for(var l=n.list,u=0;u<l.length;++u){var c=a.appendChild(document.createElement("li")),p=l[u],d="CodeMirror-hint"+(u!=this.selectedHint?"":" CodeMirror-hint-active");null!=p.className&&(d=p.className+" "+d),c.className=d,p.render?p.render(c,n,p):c.appendChild(document.createTextNode(p.displayText||i(p))),c.hintId=u}var f=s.cursorCoords(t.options.alignWithWord?n.from:null),h=f.left,g=f.bottom,m=!0;a.style.left=h+"px",a.style.top=g+"px";var v=window.innerWidth||Math.max(document.body.offsetWidth,document.documentElement.offsetWidth),y=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(t.options.container||document.body).appendChild(a);var x=a.getBoundingClientRect(),E=x.bottom-y,b=a.scrollHeight>a.clientHeight+1,C=s.getScrollInfo();if(E>0){var T=x.bottom-x.top;if(f.top-(f.bottom-x.top)-T>0)a.style.top=(g=f.top-T)+"px",m=!1;else if(T>y){a.style.height=y-5+"px",a.style.top=(g=f.bottom-x.top)+"px";var S=s.getCursor();n.from.ch!=S.ch&&(f=s.cursorCoords(S),a.style.left=(h=f.left)+"px",x=a.getBoundingClientRect())}}var w,N=x.right-v;if(N>0&&(x.right-x.left>v&&(a.style.width=v-5+"px",N-=x.right-x.left-v),a.style.left=(h=f.left-N)+"px"),b)for(var L=a.firstChild;L;L=L.nextSibling)L.style.paddingRight=s.display.nativeBarWidth+"px";return s.addKeyMap(this.keyMap=function(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close},r=e.options.customKeys,i=r?{}:n;function o(e,r){var o;o="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,i[e]=o}if(r)for(var s in r)r.hasOwnProperty(s)&&o(s,r[s]);var a=e.options.extraKeys;if(a)for(var s in a)a.hasOwnProperty(s)&&o(s,a[s]);return i}(t,{moveFocus:function(e,t){r.changeActive(r.selectedHint+e,t)},setFocus:function(e){r.changeActive(e)},menuSize:function(){return r.screenAmount()},length:l.length,close:function(){t.close()},pick:function(){r.pick()},data:n})),t.options.closeOnUnfocus&&(s.on("blur",this.onBlur=function(){w=setTimeout((function(){t.close()}),100)}),s.on("focus",this.onFocus=function(){clearTimeout(w)})),s.on("scroll",this.onScroll=function(){var e=s.getScrollInfo(),n=s.getWrapperElement().getBoundingClientRect(),r=g+C.top-e.top,i=r-(window.pageYOffset||(document.documentElement||document.body).scrollTop);if(m||(i+=a.offsetHeight),i<=n.top||i>=n.bottom)return t.close();a.style.top=r+"px",a.style.left=h+C.left-e.left+"px"}),e.on(a,"dblclick",(function(e){var t=o(a,e.target||e.srcElement);t&&null!=t.hintId&&(r.changeActive(t.hintId),r.pick())})),e.on(a,"click",(function(e){var n=o(a,e.target||e.srcElement);n&&null!=n.hintId&&(r.changeActive(n.hintId),t.options.completeOnSingleClick&&r.pick())})),e.on(a,"mousedown",(function(){setTimeout((function(){s.focus()}),20)})),e.signal(n,"select",l[0],a.firstChild),!0}function a(e,t,n,r){if(e.async)e(t,r,n);else{var i=e(t,n);i&&i.then?i.then(r):r(i)}}t.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n];r.hint?r.hint(this.cm,t,r):this.cm.replaceRange(i(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),this.close()},cursorActivity:function(){this.debounce&&(r(this.debounce),this.debounce=0);var e=this.cm.getCursor(),t=this.cm.getLine(e.line);if(e.line!=this.startPos.line||t.length-e.ch!=this.startLen-this.startPos.ch||e.ch<this.startPos.ch||this.cm.somethingSelected()||e.ch&&this.options.closeCharacters.test(t.charAt(e.ch-1)))this.close();else{var i=this;this.debounce=n((function(){i.update()})),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;a(this.options.hint,this.cm,this.options,(function(r){t.tick==n&&t.finishUpdate(r,e)}))}},finishUpdate:function(t,n){this.data&&e.signal(this.data,"update");var r,i,o=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),t&&this.data&&(r=this.data,i=t,e.cmpPos(i.from,r.from)>0&&r.to.ch-r.from.ch!=i.to.ch-i.from.ch)||(this.data=t,t&&t.list.length&&(o&&1==t.list.length?this.pick(t,0):(this.widget=new s(this,t),e.signal(t,"shown"))))}},s.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm;this.completion.options.closeOnUnfocus&&(e.off("blur",this.onBlur),e.off("focus",this.onFocus)),e.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,n){if(t>=this.data.list.length?t=n?this.data.list.length-1:0:t<0&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var r=this.hints.childNodes[this.selectedHint];r.className=r.className.replace(" CodeMirror-hint-active",""),(r=this.hints.childNodes[this.selectedHint=t]).className+=" CodeMirror-hint-active",r.offsetTop<this.hints.scrollTop?this.hints.scrollTop=r.offsetTop-3:r.offsetTop+r.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=r.offsetTop+r.offsetHeight-this.hints.clientHeight+3),e.signal(this.data,"select",this.data.list[this.selectedHint],r)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},e.registerHelper("hint","auto",{resolve:function(t,n){var r,i=t.getHelpers(n,"hint");if(i.length){var o=function(e,t,n){var r=function(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}(e,i);!function i(o){if(o==r.length)return t(null);a(r[o],e,n,(function(e){e&&e.list.length>0?t(e):i(o+1)}))}(0)};return o.async=!0,o.supportsSelection=!0,o}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}}),e.registerHelper("hint","fromList",(function(t,n){var r=t.getCursor(),i=t.getTokenAt(r),o=e.Pos(r.line,i.end);if(i.string&&/\w/.test(i.string[i.string.length-1]))var s=i.string,a=e.Pos(r.line,i.start);else s="",a=o;for(var l=[],u=0;u<n.words.length;u++){var c=n.words[u];c.slice(0,s.length)==s&&l.push(c)}if(l.length)return{list:l,from:a,to:o}})),e.commands.autocomplete=e.showHint;var l={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],13:[function(e,t,n){var r;r=function(e){"use strict";e.runMode=function(t,n,r,i){var o=e.getMode(e.defaults,n),s=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<9);if(r.appendChild){var a=i&&i.tabSize||e.defaults.tabSize,l=r,u=0;l.innerHTML="",r=function(e,t){if("\n"==e)return l.appendChild(document.createTextNode(s?"\r":e)),void(u=0);for(var n="",r=0;;){var i=e.indexOf("\t",r);if(-1==i){n+=e.slice(r),u+=e.length-r;break}u+=i-r,n+=e.slice(r,i);var o=a-u%a;u+=o;for(var c=0;c<o;++c)n+=" ";r=i+1}if(t){var p=l.appendChild(document.createElement("span"));p.className="cm-"+t.replace(/ +/g," cm-"),p.appendChild(document.createTextNode(n))}else l.appendChild(document.createTextNode(n))}}for(var c=e.splitLines(t),p=i&&i.state||e.startState(o),d=0,f=c.length;d<f;++d){d&&r("\n");var h=new e.StringStream(c[d]);for(!h.string&&o.blankLine&&o.blankLine(p);!h.eol();){var g=o.token(h,p);r(h.current(),g,d,h.start,p),h.start=h.pos}}}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],14:[function(e,t,n){var r;r=function(e){"use strict";var t=e.Pos;function n(e,n,i,o){if(this.atOccurrence=!1,this.doc=e,null==o&&"string"==typeof n&&(o=!1),i=i?e.clipPos(i):t(0,0),this.pos={from:i,to:i},"string"!=typeof n)n.global||(n=new RegExp(n.source,n.ignoreCase?"ig":"g")),this.matches=function(r,i){if(r){n.lastIndex=0;for(var o=e.getLine(i.line).slice(0,i.ch),s=0;;){n.lastIndex=s;var a=n.exec(o);if(!a)break;if(u=(l=a).index,(s=l.index+(l[0].length||1))==o.length)break}(c=l&&l[0].length||0)||(0==u&&0==o.length?l=void 0:u!=e.getLine(i.line).length&&c++)}else{n.lastIndex=i.ch,o=e.getLine(i.line);var l,u,c=(l=n.exec(o))&&l[0].length||0;(u=l&&l.index)+c==o.length||c||(c=1)}if(l&&c)return{from:t(i.line,u),to:t(i.line,u+c),match:l}};else{var s=n;o&&(n=n.toLowerCase());var a=o?function(e){return e.toLowerCase()}:function(e){return e},l=n.split("\n");if(1==l.length)n.length?this.matches=function(i,o){if(i){var l=e.getLine(o.line).slice(0,o.ch);if((c=(u=a(l)).lastIndexOf(n))>-1)return c=r(l,u,c),{from:t(o.line,c),to:t(o.line,c+s.length)}}else{var u,c;if(l=e.getLine(o.line).slice(o.ch),(c=(u=a(l)).indexOf(n))>-1)return c=r(l,u,c)+o.ch,{from:t(o.line,c),to:t(o.line,c+s.length)}}}:this.matches=function(){};else{var u=s.split("\n");this.matches=function(n,r){var i,o=l.length-1;if(n){if(r.line-(l.length-1)<e.firstLine())return;if(a(e.getLine(r.line).slice(0,u[o].length))!=l[l.length-1])return;for(var s=t(r.line,u[o].length),c=r.line-1,p=o-1;p>=1;--p,--c)if(l[p]!=a(e.getLine(c)))return;var d=(i=e.getLine(c)).length-u[0].length;if(a(i.slice(d))!=l[0])return;return{from:t(c,d),to:s}}if(!(r.line+(l.length-1)>e.lastLine())&&(d=(i=e.getLine(r.line)).length-u[0].length,a(i.slice(d))==l[0])){var f=t(r.line,d);for(c=r.line+1,p=1;p<o;++p,++c)if(l[p]!=a(e.getLine(c)))return;if(a(e.getLine(c).slice(0,u[o].length))==l[o])return{from:f,to:t(c,u[o].length)}}}}}}function r(e,t,n){if(e.length==t.length)return n;for(var r=Math.min(n,e.length);;){var i=e.slice(0,r).toLowerCase().length;if(i<n)++r;else{if(!(i>n))return r;--r}}}n.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){var n=this,r=this.doc.clipPos(e?this.pos.from:this.pos.to);function i(e){var r=t(e,0);return n.pos={from:r,to:r},n.atOccurrence=!1,!1}for(;;){if(this.pos=this.matches(e,r))return this.atOccurrence=!0,this.pos.match||!0;if(e){if(!r.line)return i(0);r=t(r.line-1,this.doc.getLine(r.line-1).length)}else{var o=this.doc.lineCount();if(r.line==o-1)return i(o);r=t(r.line+1,0)}}},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(n,r){if(this.atOccurrence){var i=e.splitLines(n);this.doc.replaceRange(i,this.pos.from,this.pos.to,r),this.pos.to=t(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,r){return new n(this.doc,e,t,r)})),e.defineDocExtension("getSearchCursor",(function(e,t,r){return new n(this,e,t,r)})),e.defineExtension("selectMatches",(function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor("from"),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":15}],15:[function(e,t,n){!function(e){if("object"==typeof n&&"object"==typeof t)t.exports=e();else{if("function"==typeof define&&define.amd)return define([],e);(this||window).CodeMirror=e()}}((function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=r||i,s=o&&(r?document.documentMode||6:i[1]),a=/WebKit\//.test(e),l=a&&/Qt\/\d+\.\d+/.test(e),u=/Chrome\//.test(e),c=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),f=/PhantomJS/.test(e),h=/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=h||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),m=h||/Mac/.test(t),v=/\bCrOS\b/.test(e),y=/win/i.test(t),x=c&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(c=!1,a=!0);var E=m&&(l||c&&(null==x||x<12.11)),b=n||o&&s>=9,C=!1,T=!1;function S(e,t){if(!(this instanceof S))return new S(e,t);this.options=t=t?Co(t):{},Co(er,t,!1),M(t);var n=t.value;"string"==typeof n&&(n=new vi(n,t.mode,null,t.lineSeparator)),this.doc=n;var r=new S.inputStyles[t.inputStyle](this),i=this.display=new w(e,n,r);i.wrapper.CodeMirror=this,O(this),R(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),t.autofocus&&!g&&i.input.focus(),G(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new co,keySeq:null,specialChars:null};var l=this;for(var u in o&&s<11&&setTimeout((function(){l.display.input.reset(!0)}),20),function(e){var t=e.display;$i(t.scroller,"mousedown",Yt(e,pn)),$i(t.scroller,"dblclick",o&&s<11?Yt(e,(function(t){if(!to(e,t)){var n=cn(e,t);if(n&&!fn(e,t)&&!un(e.display,t)){Bi(t);var r=e.findWordAt(n);Be(e.doc,r.anchor,r.head)}}})):function(t){to(e,t)||Bi(t)}),b||$i(t.scroller,"contextmenu",(function(t){Dn(e,t)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function a(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}$i(t.scroller,"touchstart",(function(i){if(!to(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)){clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),$i(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),$i(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!un(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,s=e.coordsChar(t.activeTouch,"page");o=!r.prev||a(r,r.prev)?new De(s,s):!r.prev.prev||a(r,r.prev.prev)?e.findWordAt(s):new De(fe(s.line,0),Fe(e.doc,fe(s.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Bi(n)}i()})),$i(t.scroller,"touchcancel",i),$i(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(vn(e,t.scroller.scrollTop),yn(e,t.scroller.scrollLeft,!0),Ki(e,"scroll",e))})),$i(t.scroller,"mousewheel",(function(t){Cn(e,t)})),$i(t.scroller,"DOMMouseScroll",(function(t){Cn(e,t)})),$i(t.wrapper,"scroll",(function(){t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){to(e,t)||Vi(t)},over:function(t){to(e,t)||(function(e,t){var n=cn(e,t);if(n){var r=document.createDocumentFragment();nt(e,n,r),e.display.dragCursor||(e.display.dragCursor=_o("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Do(e.display.dragCursor,r)}}(e,t),Vi(t))},start:function(t){!function(e,t){if(o&&(!e.state.draggingText||+new Date-hn<100))Vi(t);else if(!to(e,t)&&!un(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=_o("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",c&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),c&&n.parentNode.removeChild(n)}}(e,t)},drop:Yt(e,gn),leave:function(t){to(e,t)||mn(e)}};var l=t.input.getField();$i(l,"keyup",(function(t){An.call(e,t)})),$i(l,"keydown",Yt(e,In)),$i(l,"keypress",Yt(e,Rn)),$i(l,"focus",To(_n,e)),$i(l,"blur",To(On,e))}(this),function(){var e;qo||($i(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Go(ln)}),100))})),$i(window,"blur",(function(){Go(On)})),qo=!0)}(),Ht(this),this.curOp.forceUpdate=!0,bi(this,n),t.autofocus&&!g||l.hasFocus()?setTimeout(To(_n,this),20):On(this),tr)tr.hasOwnProperty(u)&&tr[u](this,t[u],rr);W(this),t.finishInit&&t.finishInit(this);for(var d=0;d<ar.length;++d)ar[d](this);qt(this),a&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(i.lineDiv).textRendering&&(i.lineDiv.style.textRendering="auto")}function w(e,t,r){var i=this;this.input=r,i.scrollbarFiller=_o("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=_o("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=_o("div",null,"CodeMirror-code"),i.selectionDiv=_o("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=_o("div",null,"CodeMirror-cursors"),i.measure=_o("div",null,"CodeMirror-measure"),i.lineMeasure=_o("div",null,"CodeMirror-measure"),i.lineSpace=_o("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none"),i.mover=_o("div",[_o("div",[i.lineSpace],"CodeMirror-lines")],null,"position: relative"),i.sizer=_o("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=_o("div",null,null,"position: absolute; height: "+oo+"px; width: 1px;"),i.gutters=_o("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=_o("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=_o("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),o&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),a||n&&g||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,r.init(i)}function N(e){e.doc.mode=S.getMode(e.options,e.doc.modeOption),L(e)}function L(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.frontier=e.doc.first,ot(e,100),e.state.modeGen++,e.curOp&&tn(e)}function I(e){var t=Mt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Ft(e.display)-3);return function(i){if(qr(e.doc,i))return 0;var o=0;if(i.widgets)for(var s=0;s<i.widgets.length;s++)i.widgets[s].height&&(o+=i.widgets[s].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function A(e){var t=e.doc,n=I(e);t.iter((function(e){var t=n(e);t!=e.height&&wi(e,t)}))}function R(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),wt(e)}function _(e){O(e),tn(e),setTimeout((function(){V(e)}),20)}function O(e){var t=e.display.gutters,n=e.options.gutters;Oo(t);for(var r=0;r<n.length;++r){var i=n[r],o=t.appendChild(_o("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=r?"":"none",D(e)}function D(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function k(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Fr(r);)r=(i=t.find(0,!0)).from.line,n+=i.from.ch-i.to.ch;for(r=e;t=jr(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch,n+=(r=i.to.line).text.length-i.to.ch}return n}function P(e){var t=e.display,n=e.doc;t.maxLine=Ci(n,n.first),t.maxLineLength=k(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=k(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}function M(e){var t=yo(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function F(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+ut(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+pt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function j(e,t,n){this.cm=n;var r=this.vert=_o("div",[_o("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=_o("div",[_o("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),$i(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),$i(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function U(){}function G(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Fo(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new S.scrollbarModel[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),$i(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?yn(e,t):vn(e,t)}),e),e.display.scrollbars.addClass&&jo(e.display.wrapper,e.display.scrollbars.addClass)}function B(e,t){t||(t=F(e));var n=e.display.barWidth,r=e.display.barHeight;H(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Z(e),H(e,F(e)),n=e.display.barWidth,r=e.display.barHeight}function H(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function q(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-lt(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=Li(t,r),s=Li(t,i);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;a<o?(o=a,s=Li(t,Ii(Ci(t,a))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=s&&(o=Li(t,Ii(Ci(t,l))-e.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function V(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=$(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",s=0;s<n.length;s++)if(!n[s].hidden){e.options.fixedGutter&&n[s].gutter&&(n[s].gutter.style.left=o);var a=n[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function W(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=z(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(_o("div",[_o("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,s=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-s)+1,r.lineNumWidth=r.lineNumInnerWidth+s,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",D(e),!0}return!1}function z(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function $(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Q(e,t,n){var r=e.display;this.viewport=t,this.visible=q(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=dt(e),this.force=n,this.dims=te(e),this.events=[]}function X(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return rn(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==an(e))return!1;W(e)&&(rn(e),t.dims=te(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),s=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>s&&n.viewTo-s<20&&(s=Math.min(i,n.viewTo)),T&&(o=Br(e.doc,o),s=Hr(e.doc,s));var l=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=en(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=en(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(on(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(en(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,on(e,n)))),r.viewTo=n}(e,o,s),n.viewOffset=Ii(Ci(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=an(e);if(!l&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Po();return u>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,s=o.firstChild;function l(t){var n=t.nextSibling;return a&&m&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,p=0;p<u.length;p++){var d=u[p];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;s!=d.node;)s=l(s);var f=i&&null!=t&&t<=c&&d.lineNumber;d.changes&&(yo(d.changes,"gutter")>-1&&(f=!1),ne(e,d,c,n)),f&&(Oo(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(z(e.options,c)))),s=d.node.nextSibling}else{var h=ue(e,d,c,n);o.insertBefore(h,s)}c+=d.size}for(;s;)s=l(s)}(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,c&&Po()!=c&&c.offsetHeight&&c.focus(),Oo(n.cursorDiv),Oo(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ot(e,400)),n.updateLineNumbers=null,!0}function Y(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=dt(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+ut(e.display)-ft(e),n.top)}),t.visible=q(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&X(e,t);r=!1){Z(e);var i=F(e);et(e),B(e,i),J(e,i)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function K(e,t){var n=new Q(e,t);if(X(e,n)){Z(e),Y(e,n);var r=F(e);et(e),B(e,r),J(e,r),n.finish()}}function J(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+pt(e)+"px"}function Z(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i,a=t.view[r];if(!a.hidden){if(o&&s<8){var l=a.node.offsetTop+a.node.offsetHeight;i=l-n,n=l}else{var u=a.node.getBoundingClientRect();i=u.bottom-u.top}var c=a.line.height-i;if(i<2&&(i=Mt(t)),(c>.001||c<-.001)&&(wi(a.line,i),ee(a.line),a.rest))for(var p=0;p<a.rest.length;p++)ee(a.rest[p])}}}function ee(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.parentNode.offsetHeight}function te(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,s=0;o;o=o.nextSibling,++s)n[e.options.gutters[s]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[s]]=o.clientWidth;return{fixedPos:$(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ne(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?oe(e,t):"gutter"==o?ae(e,t,n,r):"class"==o?se(t):"widget"==o&&le(e,t,r)}t.changes=null}function re(e){return e.node==e.text&&(e.node=_o("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),o&&s<8&&(e.node.style.zIndex=2)),e.node}function ie(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):ai(e,t)}function oe(e,t){var n=t.text.className,r=ie(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,se(t)):n&&(t.text.className=n)}function se(e){!function(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=re(e);e.background=n.insertBefore(_o("div",null,t),n.firstChild)}}(e),e.line.wrapClass?re(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function ae(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=re(t);t.gutterBackground=_o("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){i=re(t);var s=t.gutter=_o("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),i.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(_o("div",z(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a<e.options.gutters.length;++a){var l=e.options.gutters[a],u=o.hasOwnProperty(l)&&o[l];u&&s.appendChild(_o("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[l]+"px; width: "+r.gutterWidth[l]+"px"))}}}function le(e,t,n){t.alignable&&(t.alignable=null);for(var r=t.node.firstChild;r;r=i){var i=r.nextSibling;"CodeMirror-linewidget"==r.className&&t.node.removeChild(r)}ce(e,t,n)}function ue(e,t,n,r){var i=ie(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),se(t),ae(e,t,n,r),ce(e,t,r),t.node}function ce(e,t,n){if(pe(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)pe(e,t.rest[r],t,n,!1)}function pe(e,t,n,r,i){if(t.widgets)for(var o=re(n),s=0,a=t.widgets;s<a.length;++s){var l=a[s],u=_o("div",[l.node],"CodeMirror-linewidget");l.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),de(l,u,n,r),e.display.input.setUneditable(u),i&&l.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),Zi(l,"redraw")}}function de(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}j.prototype=Co({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=m&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new co,this.disableVert=new co},enableZeroWidthBar:function(e,t){e.style.pointerEvents="auto",t.set(1e3,(function n(){var r=e.getBoundingClientRect();document.elementFromPoint(r.left+1,r.bottom-1)!=e?e.style.pointerEvents="none":t.set(1e3,n)}))},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},j.prototype),U.prototype=Co({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},U.prototype),S.scrollbarModel={native:j,null:U},Q.prototype.signal=function(e,t){ro(e,t)&&this.events.push(arguments)},Q.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ki.apply(null,this.events[e])};var fe=S.Pos=function(e,t){if(!(this instanceof fe))return new fe(e,t);this.line=e,this.ch=t},he=S.cmpPos=function(e,t){return e.line-t.line||e.ch-t.ch};function ge(e){return fe(e.line,e.ch)}function me(e,t){return he(e,t)<0?t:e}function ve(e,t){return he(e,t)<0?e:t}function ye(e){e.state.focused||(e.display.input.focus(),_n(e))}var xe=null;function Ee(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var s=e.state.pasteIncoming||"paste"==i,a=o.splitLines(t),l=null;if(s&&r.ranges.length>1)if(xe&&xe.text.join("\n")==t){if(r.ranges.length%xe.text.length==0){l=[];for(var u=0;u<xe.text.length;u++)l.push(o.splitLines(xe.text[u]))}}else a.length==r.ranges.length&&(l=xo(a,(function(e){return[e]})));for(u=r.ranges.length-1;u>=0;u--){var c=r.ranges[u],p=c.from(),d=c.to();c.empty()&&(n&&n>0?p=fe(p.line,p.ch-n):e.state.overwrite&&!s?d=fe(d.line,Math.min(Ci(o,d.line).text.length,d.ch+mo(a).length)):xe&&xe.lineWise&&xe.text.join("\n")==t&&(p=d=fe(p.line,0)));var f=e.curOp.updateInput,h={from:p,to:d,text:l?l[u%l.length]:a,origin:i||(s?"paste":e.state.cutIncoming?"cut":"+input")};Un(e.doc,h),Zi(e,"inputRead",e,h)}t&&!s&&Ce(e,t),$n(e),e.curOp.updateInput=f,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function be(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Xt(t,(function(){Ee(t,n,0,null,"paste")})),!0}function Ce(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),s=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){s=Xn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ci(e.doc,i.head.line).text.slice(0,i.head.ch))&&(s=Xn(e,i.head.line,"smart"));s&&Zi(e,"electricInput",e,i.head.line)}}}function Te(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:fe(i,0),head:fe(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Se(e){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck","false")}function we(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new co,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function Ne(){var e=_o("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=_o("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return a?e.style.width="1000px":e.setAttribute("wrap","off"),h&&(e.style.border="1px solid black"),Se(e),t}function Le(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new co,this.gracePeriod=!1}function Ie(e,t){var n=mt(e,t.line);if(!n||n.hidden)return null;var r=Ci(e.doc,t.line),i=ht(n,r,t.line),o=Ai(r),s="left";o&&(s=as(o,t.ch)%2?"right":"left");var a=bt(i.map,t.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Ae(e,t){return t&&(e.bad=!0),e}function Re(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Ae(e.clipPos(fe(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return _e(o,t,n)}}function _e(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!ko(r,t))return Ae(fe(Ni(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?mo(e.rest):e.line;return Ae(fe(Ni(o),o.text.length),i)}var s=3==t.nodeType?t:null,a=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));a.parentNode!=r;)a=a.parentNode;var l=e.measure,u=l.maps;function c(t,n,r){for(var i=-1;i<(u?u.length:0);i++)for(var o=i<0?l.map:u[i],s=0;s<o.length;s+=3){var a=o[s+2];if(a==t||a==n){var c=Ni(i<0?e.line:e.rest[i]),p=o[s]+r;return(r<0||a!=t)&&(p=o[s+(r?1:0)]),fe(c,p)}}}var p=c(s,a,n);if(p)return Ae(p,i);for(var d=a.nextSibling,f=s?s.nodeValue.length-n:0;d;d=d.nextSibling){if(p=c(d,d.firstChild,0))return Ae(fe(p.line,p.ch-f),i);f+=d.textContent.length}var h=a.previousSibling;for(f=n;h;h=h.previousSibling){if(p=c(h,h.firstChild,-1))return Ae(fe(p.line,p.ch+f),i);f+=d.textContent.length}}function Oe(e,t){this.ranges=e,this.primIndex=t}function De(e,t){this.anchor=e,this.head=t}function ke(e,t){var n=e[t];e.sort((function(e,t){return he(e.from(),t.from())})),t=yo(e,n);for(var r=1;r<e.length;r++){var i=e[r],o=e[r-1];if(he(o.to(),i.from())>=0){var s=ve(o.from(),i.from()),a=me(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new De(l?a:s,l?s:a))}}return new Oe(e,t)}function Pe(e,t){return new Oe([new De(e,t||e)],0)}function Me(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Fe(e,t){if(t.line<e.first)return fe(e.first,0);var n=e.first+e.size-1;return t.line>n?fe(n,Ci(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?fe(e.line,t):n<0?fe(e.line,0):e}(t,Ci(e,t.line).text.length)}function je(e,t){return t>=e.first&&t<e.first+e.size}function Ue(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=Fe(e,t[r]);return n}function Ge(e,t,n,r){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(r){var o=he(n,i)<0;o!=he(r,i)<0?(i=n,n=r):o!=he(n,r)<0&&(n=r)}return new De(i,n)}return new De(r||n,n)}function Be(e,t,n,r){ze(e,new Oe([Ge(e,e.sel.primary(),t,n)],0),r)}function He(e,t,n){for(var r=[],i=0;i<e.sel.ranges.length;i++)r[i]=Ge(e,e.sel.ranges[i],t[i],null);ze(e,ke(r,e.sel.primIndex),n)}function qe(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,ze(e,ke(i,e.sel.primIndex),r)}function Ve(e,t,n,r){ze(e,Pe(t,n),r)}function We(e,t,n){var r=e.history.done,i=mo(r);i&&i.ranges?(r[r.length-1]=t,$e(e,t,n)):ze(e,t,n)}function ze(e,t,n){$e(e,t,n),function(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,mo(i.done),t))?i.done[i.done.length-1]=t:ki(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Oi(i.undone)}(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function $e(e,t,n){(ro(e,"beforeSelectionChange")||e.cm&&ro(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new De(Fe(e,t[n].anchor),Fe(e,t[n].head))},origin:n&&n.origin};return Ki(e,"beforeSelectionChange",e,r),e.cm&&Ki(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?ke(r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(he(t.primary().head,e.sel.primary().head)<0?-1:1);Qe(e,Ye(e,t,r,!0)),n&&!1===n.scroll||!e.cm||$n(e.cm)}function Qe(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,no(e.cm)),Zi(e,"cursorActivity",e))}function Xe(e){Qe(e,Ye(e,e.sel,null,!1))}function Ye(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var s=t.ranges[o],a=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=Je(e,s.anchor,a&&a.anchor,n,r),u=Je(e,s.head,a&&a.head,n,r);(i||l!=s.anchor||u!=s.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new De(l,u))}return i?ke(i,t.primIndex):t}function Ke(e,t,n,r,i){var o=Ci(e,t.line);if(o.markedSpans)for(var s=0;s<o.markedSpans.length;++s){var a=o.markedSpans[s],l=a.marker;if((null==a.from||(l.inclusiveLeft?a.from<=t.ch:a.from<t.ch))&&(null==a.to||(l.inclusiveRight?a.to>=t.ch:a.to>t.ch))){if(i&&(Ki(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var u,c=l.find(r<0?1:-1);if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(c=Ze(e,c,-r,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=he(c,n))&&(r<0?u<0:u>0))return Ke(e,c,t,r,i)}var p=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(p=Ze(e,p,r,p.line==t.line?o:null)),p?Ke(e,p,t,r,i):null}}return t}function Je(e,t,n,r,i){var o=r||1,s=Ke(e,t,n,o,i)||!i&&Ke(e,t,n,o,!0)||Ke(e,t,n,-o,i)||!i&&Ke(e,t,n,-o,!0);return s||(e.cantEdit=!0,fe(e.first,0))}function Ze(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?Fe(e,fe(t.line-1)):null:n>0&&t.ch==(r||Ci(e,t.line)).text.length?t.line<e.first+e.size-1?fe(t.line+1,0):null:new fe(t.line,t.ch+n)}function et(e){e.display.input.showSelection(e.display.input.prepareSelection())}function tt(e,t){for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),s=0;s<n.sel.ranges.length;s++)if(!1!==t||s!=n.sel.primIndex){var a=n.sel.ranges[s];if(!(a.from().line>=e.display.viewTo||a.to().line<e.display.viewFrom)){var l=a.empty();(l||e.options.showCursorWhenSelecting)&&nt(e,a.head,i),l||rt(e,a,o)}}return r}function nt(e,t,n){var r=_t(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(_o("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(_o("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function rt(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),s=ct(e.display),a=s.left,l=Math.max(r.sizerWidth,dt(e)-r.sizer.offsetLeft)-s.right;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(_o("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?l-e:n)+"px; height: "+(r-t)+"px"))}function c(t,n,r){var o,s,c=Ci(i,t),p=c.text.length;function d(n,r){return Rt(e,fe(t,n),"div",c,r)}return function(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;o<e.length;++o){var s=e[o];(s.from<n&&s.to>t||t==n&&s.to==t)&&(r(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}(Ai(c),n||0,null==r?p:r,(function(e,t,i){var c,f,h,g=d(e,"left");if(e==t)c=g,f=h=g.left;else{if(c=d(t-1,"right"),"rtl"==i){var m=g;g=c,c=m}f=g.left,h=c.right}null==n&&0==e&&(f=a),c.top-g.top>3&&(u(f,g.top,null,g.bottom),f=a,g.bottom<c.top&&u(f,g.bottom,null,c.top)),null==r&&t==p&&(h=l),(!o||g.top<o.top||g.top==o.top&&g.left<o.left)&&(o=g),(!s||c.bottom>s.bottom||c.bottom==s.bottom&&c.right>s.right)&&(s=c),f<a+1&&(f=a),u(f,c.top,h-f,c.bottom)})),{start:o,end:s}}var p=t.from(),d=t.to();if(p.line==d.line)c(p.line,p.ch,d.ch);else{var f=Ci(i,p.line),h=Ci(i,d.line),g=Gr(f)==Gr(h),m=c(p.line,p.ch,g?f.text.length+1:null).end,v=c(d.line,g?0:null,d.ch).start;g&&(m.top<v.top-2?(u(m.right,m.top,null,m.bottom),u(a,v.top,v.left,v.bottom)):u(m.right,m.top,v.left-m.right,m.bottom)),m.bottom<v.top&&u(a,m.bottom,null,v.top)}n.appendChild(o)}function it(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ot(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,To(st,e))}function st(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ur(t.mode,at(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(t.frontier>=e.display.viewFrom){var s=o.styles,a=o.text.length>e.options.maxHighlightLength,l=ti(e,o,a?ur(t.mode,r):r,!0);o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var p=!s||s.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),d=0;!p&&d<s.length;++d)p=s[d]!=o.styles[d];p&&i.push(t.frontier),o.stateAfter=a?r:ur(t.mode,r)}else o.text.length<=e.options.maxHighlightLength&&ri(e,o.text,r),o.stateAfter=t.frontier%5==0?ur(t.mode,r):null;if(++t.frontier,+new Date>n)return ot(e,e.options.workDelay),!0})),i.length&&Xt(e,(function(){for(var t=0;t<i.length;t++)nn(e,i[t],"text")}))}}function at(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=function(e,t,n){for(var r,i,o=e.doc,s=n?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>s;--a){if(a<=o.first)return o.first;var l=Ci(o,a-1);if(l.stateAfter&&(!n||a<=o.frontier))return a;var u=po(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=a-1,r=u)}return i}(e,t,n),s=o>r.first&&Ci(r,o-1).stateAfter;return s=s?ur(r.mode,s):cr(r.mode),r.iter(o,t,(function(n){ri(e,n.text,s);var a=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;n.stateAfter=a?ur(r.mode,s):null,++o})),n&&(r.frontier=o),s}function lt(e){return e.lineSpace.offsetTop}function ut(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function ct(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Do(e.measure,_o("pre","x")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function pt(e){return oo-e.display.nativeBarWidth}function dt(e){return e.display.scroller.clientWidth-pt(e)-e.display.barWidth}function ft(e){return e.display.scroller.clientHeight-pt(e)-e.display.barHeight}function ht(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(r=0;r<e.rest.length;r++)if(Ni(e.rest[r])>n)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function gt(e,t,n,r){return yt(e,vt(e,t),n,r)}function mt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[on(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function vt(e,t){var n=Ni(t),r=mt(e,n);r&&!r.text?r=null:r&&r.changes&&(ne(e,r,n,te(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=Ni(t=Gr(t)),r=e.display.externalMeasured=new Zt(e.doc,t,n);r.lineN=n;var i=r.built=ai(e,r);return r.text=i.pre,Do(e.display.lineMeasure,i.pre),r}(e,t));var i=ht(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function yt(e,t,n,r,i){t.before&&(n=-1);var a,l=n+(r||"");return t.cache.hasOwnProperty(l)?a=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&dt(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var s=t.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],u=s[a+1];Math.abs(l.bottom-u.bottom)>2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(a=function(e,t,n,r){var i,a=bt(t.map,n,r),l=a.node,u=a.start,c=a.end,p=a.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;u&&Ro(t.line.text.charAt(a.coverStart+u));)--u;for(;a.coverStart+c<a.coverEnd&&Ro(t.line.text.charAt(a.coverStart+c));)++c;if((i=o&&s<9&&0==u&&c==a.coverEnd-a.coverStart?l.parentNode.getBoundingClientRect():Ct(Io(l,u,c).getClientRects(),r)).left||i.right||0==u)break;c=u,u-=1,p="right"}o&&s<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Jo)return Jo;var t=Do(e,_o("span","x")),n=t.getBoundingClientRect(),r=Io(t,0,1).getBoundingClientRect();return Jo=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var f;u>0&&(p=r="right"),i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(o&&s<9&&!u&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+Ft(e.display),top:h.top,bottom:h.bottom}:Et}var g=i.top-t.rect.top,m=i.bottom-t.rect.top,v=(g+m)/2,y=t.view.measure.heights;for(d=0;d<y.length-1&&!(v<y[d]);d++);var x=d?y[d-1]:0,E=y[d],b={left:("right"==p?i.right:i.left)-t.rect.left,right:("left"==p?i.left:i.right)-t.rect.left,top:x,bottom:E};return i.left||i.right||(b.bogus=!0),e.options.singleCursorHeightPerLine||(b.rtop=g,b.rbottom=m),b}(e,t,n,r)).bogus||(t.cache[l]=a)),{left:a.left,right:a.right,top:i?a.rtop:a.top,bottom:i?a.rbottom:a.bottom}}we.prototype=Co({init:function(e){var t=this,n=this.cm,r=this.wrapper=Ne(),i=this.textarea=r.firstChild;function a(e){if(!to(n,e)){if(n.somethingSelected())xe={lineWise:!1,text:n.getSelections()},t.inaccurateSelection&&(t.prevInput="",t.inaccurateSelection=!1,i.value=xe.text.join("\n"),vo(i));else{if(!n.options.lineWiseCopyCut)return;var r=Te(n);xe={lineWise:!0,text:r.text},"cut"==e.type?n.setSelections(r.ranges,null,ao):(t.prevInput="",i.value=r.text.join("\n"),vo(i))}"cut"==e.type&&(n.state.cutIncoming=!0)}}e.wrapper.insertBefore(r,e.wrapper.firstChild),h&&(i.style.width="0px"),$i(i,"input",(function(){o&&s>=9&&t.hasSelection&&(t.hasSelection=null),t.poll()})),$i(i,"paste",(function(e){to(n,e)||be(e,n)||(n.state.pasteIncoming=!0,t.fastPoll())})),$i(i,"cut",a),$i(i,"copy",a),$i(e.scroller,"paste",(function(r){un(e,r)||to(n,r)||(n.state.pasteIncoming=!0,t.focus())})),$i(e.lineSpace,"selectstart",(function(t){un(e,t)||Bi(t)})),$i(i,"compositionstart",(function(){var e=n.getCursor("from");t.composing&&t.composing.range.clear(),t.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),$i(i,"compositionend",(function(){t.composing&&(t.poll(),t.composing.range.clear(),t.composing=null)}))},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=tt(e);if(e.options.moveInputWithCursor){var i=_t(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),s=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+s.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+s.left-o.left))}return r},showSelection:function(e){var t=this.cm.display;Do(t.cursorDiv,e.cursors),Do(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var a=i.sel.primary(),l=(t=Ko&&(a.to().line-a.from().line>100||(n=r.getSelection()).length>1e3))?"-":n||r.getSelection();this.textarea.value=l,r.state.focused&&vo(this.textarea),o&&s>=9&&(this.hasSelection=l)}else e||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!g||Po()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},fastPoll:function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||Yo(t)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===r||m&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n=""),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(n.length,r.length);a<l&&n.charCodeAt(a)==r.charCodeAt(a);)++a;var u=this;return Xt(e,(function(){Ee(e,r.slice(a),n.length-a,null,u.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=u.prevInput="":u.prevInput=r,u.composing&&(u.composing.range.clear(),u.composing.range=e.markText(u.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){var t=this,n=t.cm,r=n.display,i=t.textarea,l=cn(n,e),u=r.scroller.scrollTop;if(l&&!c){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(l)&&Yt(n,ze)(n.doc,Pe(l),ao);var p=i.style.cssText,d=t.wrapper.style.cssText;t.wrapper.style.cssText="position: absolute";var f=t.wrapper.getBoundingClientRect();if(i.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px; z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",a)var h=window.scrollY;if(r.input.focus(),a&&window.scrollTo(null,h),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=!0,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&s>=9&&m(),b){Vi(e);var g=function(){Yi(window,"mouseup",g),setTimeout(v,20)};$i(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=i.selectionStart){var e=n.somethingSelected(),o=""+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=p,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=i.selectionStart){(!o||o&&s<9)&&m();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?Yt(n,pr.selectAll)(n):e++<10?r.detectingSelectAll=setTimeout(a,500):r.input.reset()};r.detectingSelectAll=setTimeout(a,200)}}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Eo,needsContentAttribute:!1},we.prototype),Le.prototype=Co({init:function(e){var t=this,n=t.cm,r=t.div=e.lineDiv;function i(e){if(!to(n,e)){if(n.somethingSelected())xe={lineWise:!1,text:n.getSelections()},"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=Te(n);xe={lineWise:!0,text:t.text},"cut"==e.type&&n.operation((function(){n.setSelections(t.ranges,0,ao),n.replaceSelection("",null,"cut")}))}if(e.clipboardData&&!h)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",xe.text.join("\n"));else{var r=Ne(),i=r.firstChild;n.display.lineSpace.insertBefore(r,n.display.lineSpace.firstChild),i.value=xe.text.join("\n");var o=document.activeElement;vo(i),setTimeout((function(){n.display.lineSpace.removeChild(r),o.focus()}),50)}}}Se(r),$i(r,"paste",(function(e){to(n,e)||be(e,n)})),$i(r,"compositionstart",(function(e){var r=e.data;if(t.composing={sel:n.doc.sel,data:r,startData:r},r){var i=n.doc.sel.primary(),o=n.getLine(i.head.line).indexOf(r,Math.max(0,i.head.ch-r.length));o>-1&&o<=i.head.ch&&(t.composing.sel=Pe(fe(i.head.line,o),fe(i.head.line,o+r.length)))}})),$i(r,"compositionupdate",(function(e){t.composing.data=e.data})),$i(r,"compositionend",(function(e){var n=t.composing;n&&(e.data==n.startData||/\u200b/.test(e.data)||(n.data=e.data),setTimeout((function(){n.handled||t.applyComposition(n),t.composing==n&&(t.composing=null)}),50))})),$i(r,"touchstart",(function(){t.forceCompositionEnd()})),$i(r,"input",(function(){t.composing||!n.isReadOnly()&&t.pollContent()||Xt(t.cm,(function(){tn(n)}))})),$i(r,"copy",i),$i(r,"cut",i)},prepareSelection:function(){var e=tt(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),r=Re(this.cm,e.anchorNode,e.anchorOffset),i=Re(this.cm,e.focusNode,e.focusOffset);if(!r||r.bad||!i||i.bad||0!=he(ve(r,i),t.from())||0!=he(me(r,i),t.to())){var o=Ie(this.cm,t.from()),s=Ie(this.cm,t.to());if(o||s){var a=this.cm.display.view,l=e.rangeCount&&e.getRangeAt(0);if(o){if(!s){var u=a[a.length-1].measure,c=u.maps?u.maps[u.maps.length-1]:u.map;s={node:c[c.length-1],offset:c[c.length-2]-c[c.length-3]}}}else o={node:a[0].measure.map[2],offset:0};try{var p=Io(o.node,o.offset,s.offset,s.node)}catch(e){}p&&(!n&&this.cm.state.focused?(e.collapse(o.node,o.offset),p.collapsed||e.addRange(p)):(e.removeAllRanges(),e.addRange(p)),l&&null==e.anchorNode?e.addRange(l):n&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){e.cm.curOp.selectionChanged=!0}))}),20)},showMultipleSelections:function(e){Do(this.cm.display.cursorDiv,e.cursors),Do(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return ko(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){var e=this;this.selectionInEditor()?this.pollSelection():Xt(this.cm,(function(){e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}))},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=Re(t,e.anchorNode,e.anchorOffset),r=Re(t,e.focusNode,e.focusOffset);n&&r&&Xt(t,(function(){ze(t.doc,Pe(n,r),ao),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}},pollContent:function(){var e,t=this.cm,n=t.display,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(i.line<n.viewFrom||o.line>n.viewTo-1)return!1;if(i.line==n.viewFrom||0==(e=on(t,i.line)))var s=Ni(n.view[0].line),a=n.view[0].node;else s=Ni(n.view[e].line),a=n.view[e-1].node.nextSibling;var l=on(t,o.line);if(l==n.view.length-1)var u=n.viewTo-1,c=n.lineDiv.lastChild;else u=Ni(n.view[l+1].line)-1,c=n.view[l+1].node.previousSibling;for(var p=t.doc.splitLines(function(e,t,n,r,i){var o="",s=!1,a=e.doc.lineSeparator();function l(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(o+=n);var u,c=t.getAttribute("cm-marker");if(c){var p=e.findMarks(fe(r,0),fe(i+1,0),(h=+c,function(e){return e.id==h}));return void(p.length&&(u=p[0].find())&&(o+=Ti(e.doc,u.from,u.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;for(var d=0;d<t.childNodes.length;d++)l(t.childNodes[d]);/^(pre|div|p)$/i.test(t.nodeName)&&(s=!0)}else if(3==t.nodeType){var f=t.nodeValue;if(!f)return;s&&(o+=a,s=!1),o+=f}var h}for(;l(t),t!=n;)t=t.nextSibling;return o}(t,a,c,s,u)),d=Ti(t.doc,fe(s,0),fe(u,Ci(t.doc,u).text.length));p.length>1&&d.length>1;)if(mo(p)==mo(d))p.pop(),d.pop(),u--;else{if(p[0]!=d[0])break;p.shift(),d.shift(),s++}for(var f=0,h=0,g=p[0],m=d[0],v=Math.min(g.length,m.length);f<v&&g.charCodeAt(f)==m.charCodeAt(f);)++f;for(var y=mo(p),x=mo(d),E=Math.min(y.length-(1==p.length?f:0),x.length-(1==d.length?f:0));h<E&&y.charCodeAt(y.length-h-1)==x.charCodeAt(x.length-h-1);)++h;p[p.length-1]=y.slice(0,y.length-h),p[0]=p[0].slice(f);var b=fe(s,f),C=fe(u,d.length?mo(d).length-h:0);return p.length>1||p[0]||he(b,C)?(Vn(t.doc,p,b,C,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?Yt(this.cm,tn)(this.cm):e.data&&e.data!=e.startData&&Yt(this.cm,Ee)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||Yt(this.cm,Ee)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Eo,resetPosition:Eo,needsContentAttribute:!0},Le.prototype),S.inputStyles={textarea:we,contenteditable:Le},Oe.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(0!=he(n.anchor,r.anchor)||0!=he(n.head,r.head))return!1}return!0},deepCopy:function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new De(ge(this.ranges[t].anchor),ge(this.ranges[t].head));return new Oe(e,this.primIndex)},somethingSelected:function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},contains:function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(he(t,r.from())>=0&&he(e,r.to())<=0)return n}return-1}},De.prototype={from:function(){return ve(this.anchor,this.head)},to:function(){return me(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var xt,Et={left:0,right:0,top:0,bottom:0};function bt(e,t,n){for(var r,i,o,s,a=0;a<e.length;a+=3){var l=e[a],u=e[a+1];if(t<l?(i=0,o=1,s="left"):t<u?o=1+(i=t-l):(a==e.length-3||t==u&&e[a+3]>t)&&(i=(o=u-l)-1,t>=u&&(s="right")),null!=i){if(r=e[a+2],l==u&&n==(r.insertLeft?"left":"right")&&(s=n),"left"==n&&0==i)for(;a&&e[a-2]==e[a-3]&&e[a-1].insertLeft;)r=e[2+(a-=3)],s="left";if("right"==n&&i==u-l)for(;a<e.length-3&&e[a+3]==e[a+4]&&!e[a+5].insertLeft;)r=e[(a+=3)+2],s="right";break}}return{node:r,start:i,end:o,collapse:s,coverStart:l,coverEnd:u}}function Ct(e,t){var n=Et;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(r=e.length-1;r>=0&&(n=e[r]).left==n.right;r--);return n}function Tt(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function St(e){e.display.externalMeasure=null,Oo(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Tt(e.display.view[t])}function wt(e){St(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Nt(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Lt(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function It(e,t,n,r){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var o=$r(t.widgets[i]);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var s=Ii(t);if("local"==r?s+=lt(e.display):s-=e.display.viewOffset,"page"==r||"window"==r){var a=e.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==r?0:Lt());var l=a.left+("window"==r?0:Nt());n.left+=l,n.right+=l}return n.top+=s,n.bottom+=s,n}function At(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=Nt(),i-=Lt();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var s=e.display.lineSpace.getBoundingClientRect();return{left:r-s.left,top:i-s.top}}function Rt(e,t,n,r,i){return r||(r=Ci(e.doc,t.line)),It(e,r,gt(e,r,t.ch,i),n)}function _t(e,t,n,r,i,o){function s(t,s){var a=yt(e,i,t,s?"right":"left",o);return s?a.left=a.right:a.right=a.left,It(e,r,a,n)}function a(e,t){var n=l[t],r=n.level%2;return e==es(n)&&t&&n.level<l[t-1].level?(e=ts(n=l[--t])-(n.level%2?0:1),r=!0):e==ts(n)&&t<l.length-1&&n.level<l[t+1].level&&(e=es(n=l[++t])-n.level%2,r=!1),r&&e==n.to&&e>n.from?s(e-1):s(e,r)}r=r||Ci(e.doc,t.line),i||(i=vt(e,r));var l=Ai(r),u=t.ch;if(!l)return s(u);var c=a(u,as(l,u));return null!=Qo&&(c.other=a(u,Qo)),c}function Ot(e,t){var n=0;t=Fe(e.doc,t),e.options.lineWrapping||(n=Ft(e.display)*t.ch);var r=Ci(e.doc,t.line),i=Ii(r)+lt(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Dt(e,t,n,r){var i=fe(e,t);return i.xRel=r,n&&(i.outside=!0),i}function kt(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Dt(r.first,0,!0,-1);var i=Li(r,n),o=r.first+r.size-1;if(i>o)return Dt(r.first+r.size-1,Ci(r,o).text.length,!0,1);t<0&&(t=0);for(var s=Ci(r,i);;){var a=Pt(e,s,i,t,n),l=jr(s),u=l&&l.find(0,!0);if(!l||!(a.ch>u.from.ch||a.ch==u.from.ch&&a.xRel>0))return a;i=Ni(s=u.to.line)}}function Pt(e,t,n,r,i){var o=i-Ii(t),s=!1,a=2*e.display.wrapper.clientWidth,l=vt(e,t);function u(r){var i=_t(e,fe(n,r),"line",t,l);return s=!0,o>i.bottom?i.left-a:o<i.top?i.left+a:(s=!1,i.left)}var c=Ai(t),p=t.text.length,d=ns(t),f=rs(t),h=u(d),g=s,m=u(f),v=s;if(r>m)return Dt(n,f,v,1);for(;;){if(c?f==d||f==us(t,d,1):f-d<=1){var y=r<h||r-h<=m-r?d:f,x=y==d?g:v,E=r-(y==d?h:m);if(v&&!c&&!/\s/.test(t.text.charAt(y))&&E>0&&y<t.text.length&&l.view.measure.heights.length>1){var b=yt(e,l,y,"right");o<=b.bottom&&o>=b.top&&Math.abs(r-b.right)<E&&(x=!1,y++,E=r-b.right)}for(;Ro(t.text.charAt(y));)++y;return Dt(n,y,x,E<-1?-1:E>1?1:0)}var C=Math.ceil(p/2),T=d+C;if(c){T=d;for(var S=0;S<C;++S)T=us(t,T,1)}var w=u(T);w>r?(f=T,m=w,(v=s)&&(m+=1e3),p=C):(d=T,h=w,g=s,p-=C)}}function Mt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==xt){xt=_o("pre");for(var t=0;t<49;++t)xt.appendChild(document.createTextNode("x")),xt.appendChild(_o("br"));xt.appendChild(document.createTextNode("x"))}Do(e.measure,xt);var n=xt.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Oo(e.measure),n||1}function Ft(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=_o("span","xxxxxxxxxx"),n=_o("pre",[t]);Do(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}var jt,Ut,Gt=null,Bt=0;function Ht(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Bt},Gt?Gt.ops.push(e.curOp):e.curOp.ownsGroup=Gt={ops:[e.curOp],delayedCallbacks:[]}}function qt(e){var t=e.curOp.ownsGroup;if(t)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(t)}finally{Gt=null;for(var n=0;n<t.ops.length;n++)t.ops[n].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Vt(t[n]);for(n=0;n<t.length;n++)Wt(t[n]);for(n=0;n<t.length;n++)zt(t[n]);for(n=0;n<t.length;n++)$t(t[n]);for(n=0;n<t.length;n++)Qt(t[n])}(t)}}function Vt(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=pt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=pt(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&P(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Q(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Wt(e){e.updatedDisplay=e.mustUpdate&&X(e.cm,e.update)}function zt(e){var t=e.cm,n=t.display;e.updatedDisplay&&Z(t),e.barMeasure=F(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=gt(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+pt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-dt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection(e.focus))}function $t(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&yn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==Po()&&(!document.hasFocus||document.hasFocus());e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&B(t,e.barMeasure),e.updatedDisplay&&J(t,e.barMeasure),e.selectionChanged&&it(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&ye(e.cm)}function Qt(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&Y(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null==e.scrollTop||n.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(r.scrollTop=Math.max(0,Math.min(n.scroller.scrollHeight-n.scroller.clientHeight,e.scrollTop)),n.scrollbars.setScrollTop(r.scrollTop),n.scroller.scrollTop=r.scrollTop),null==e.scrollLeft||n.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(r.scrollLeft=Math.max(0,Math.min(n.scroller.scrollWidth-n.scroller.clientWidth,e.scrollLeft)),n.scrollbars.setScrollLeft(r.scrollLeft),n.scroller.scrollLeft=r.scrollLeft,V(t)),e.scrollToPos){var i=function(e,t,n,r){null==r&&(r=0);for(var i=0;i<5;i++){var o=!1,s=_t(e,t),a=n&&n!=t?_t(e,n):s,l=Wn(e,Math.min(s.left,a.left),Math.min(s.top,a.top)-r,Math.max(s.left,a.left),Math.max(s.bottom,a.bottom)+r),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop&&(vn(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(yn(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return s}(t,Fe(r,e.scrollToPos.from),Fe(r,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&function(e,t){if(!to(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!f){var o=_o("div","",null,"position: absolute; top: "+(t.top-n.viewOffset-lt(e.display))+"px; height: "+(t.bottom-t.top+pt(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,i)}var o=e.maybeHiddenMarkers,s=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||Ki(o[a],"hide");if(s)for(a=0;a<s.length;++a)s[a].lines.length&&Ki(s[a],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ki(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Xt(e,t){if(e.curOp)return t();Ht(e);try{return t()}finally{qt(e)}}function Yt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ht(e);try{return t.apply(e,arguments)}finally{qt(e)}}}function Kt(e){return function(){if(this.curOp)return e.apply(this,arguments);Ht(this);try{return e.apply(this,arguments)}finally{qt(this)}}}function Jt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ht(t);try{return e.apply(this,arguments)}finally{qt(t)}}}function Zt(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=jr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?Ni(mo(this.rest))-n+1:1,this.node=this.text=null,this.hidden=qr(e,t)}function en(e,t,n){for(var r,i=[],o=t;o<n;o=r){var s=new Zt(e.doc,Ci(e.doc,o),o);r=o+s.size,i.push(s)}return i}function tn(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)T&&Br(e.doc,t)<i.viewTo&&rn(e);else if(n<=i.viewFrom)T&&Hr(e.doc,n+r)>i.viewFrom?rn(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)rn(e);else if(t<=i.viewFrom)(o=sn(e,n,n+r,1))?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):rn(e);else if(n>=i.viewTo){var o;(o=sn(e,t,t,-1))?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):rn(e)}else{var s=sn(e,t,t,-1),a=sn(e,n,n+r,1);s&&a?(i.view=i.view.slice(0,s.index).concat(en(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=r):rn(e)}var l=i.externalMeasured;l&&(n<l.lineN?l.lineN+=r:t<l.lineN+l.size&&(i.externalMeasured=null))}function nn(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[on(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==yo(s,n)&&s.push(n)}}}function rn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function on(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function sn(e,t,n,r){var i,o=on(e,t),s=e.display.view;if(!T||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=0,l=e.display.viewFrom;a<o;a++)l+=s[a].size;if(l!=t){if(r>0){if(o==s.length-1)return null;i=l+s[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;Br(e.doc,n)!=n;){if(o==(r<0?0:s.length-1))return null;n+=r*s[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function an(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function ln(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function un(e,t){for(var n=Wi(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function cn(e,t,n,r){var i=e.display;if(!n&&"true"==Wi(t).getAttribute("cm-not-content"))return null;var o,s,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,s=t.clientY-a.top}catch(t){return null}var l,u=kt(e,o,s);if(r&&1==u.xRel&&(l=Ci(e.doc,u.line).text).length==u.ch){var c=po(l,l.length,e.options.tabSize)-l.length;u=fe(u.line,Math.max(0,Math.round((o-ct(e.display).left)/Ft(e.display))-c))}return u}function pn(e){var t=this,n=t.display;if(!(to(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.shift=e.shiftKey,un(n,e))a||(n.scroller.draggable=!1,setTimeout((function(){n.scroller.draggable=!0}),100));else if(!fn(t,e)){var r=cn(t,e);switch(window.focus(),zi(e)){case 1:t.state.selectingText?t.state.selectingText(e):r?function(e,t,n){o?setTimeout(To(ye,e),0):e.curOp.focus=Po();var r,i=+new Date;Ut&&Ut.time>i-400&&0==he(Ut.pos,n)?r="triple":jt&&jt.time>i-400&&0==he(jt.pos,n)?(r="double",Ut={time:i,pos:n}):(r="single",jt={time:i,pos:n});var l,u=e.doc.sel,c=m?t.metaKey:t.ctrlKey;e.options.dragDrop&&Vo&&!e.isReadOnly()&&"single"==r&&(l=u.contains(n))>-1&&(he((l=u.ranges[l]).from(),n)<0||n.xRel>0)&&(he(l.to(),n)>0||n.xRel<0)?function(e,t,n,r){var i=e.display,l=+new Date,u=Yt(e,(function(c){a&&(i.scroller.draggable=!1),e.state.draggingText=!1,Yi(document,"mouseup",u),Yi(i.scroller,"drop",u),Math.abs(t.clientX-c.clientX)+Math.abs(t.clientY-c.clientY)<10&&(Bi(c),!r&&+new Date-200<l&&Be(e.doc,n),a||o&&9==s?setTimeout((function(){document.body.focus(),i.input.focus()}),20):i.input.focus())}));a&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=m?t.altKey:t.ctrlKey,i.scroller.dragDrop&&i.scroller.dragDrop(),$i(document,"mouseup",u),$i(i.scroller,"drop",u)}(e,t,n,c):function(e,t,n,r,i){var o=e.display,s=e.doc;Bi(t);var a,l,u=s.sel,c=u.ranges;if(i&&!t.shiftKey?(l=s.sel.contains(n),a=l>-1?c[l]:new De(n,n)):(a=s.sel.primary(),l=s.sel.primIndex),v?t.shiftKey&&t.metaKey:t.altKey)r="rect",i||(a=new De(n,n)),n=cn(e,t,!0,!0),l=-1;else if("double"==r){var p=e.findWordAt(n);a=e.display.shift||s.extend?Ge(s,a,p.anchor,p.head):p}else if("triple"==r){var d=new De(fe(n.line,0),Fe(s,fe(n.line+1,0)));a=e.display.shift||s.extend?Ge(s,a,d.anchor,d.head):d}else a=Ge(s,a,n);i?-1==l?(l=c.length,ze(s,ke(c.concat([a]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"single"==r&&!t.shiftKey?(ze(s,ke(c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=s.sel):qe(s,l,a,lo):(l=0,ze(s,new Oe([a],0),lo),u=s.sel);var f=n,h=o.wrapper.getBoundingClientRect(),g=0;function m(t){var i=++g,c=cn(e,t,!0,"rect"==r);if(c)if(0!=he(c,f)){e.curOp.focus=Po(),function(t){if(0!=he(f,t))if(f=t,"rect"==r){for(var i=[],o=e.options.tabSize,c=po(Ci(s,n.line).text,n.ch,o),p=po(Ci(s,t.line).text,t.ch,o),d=Math.min(c,p),h=Math.max(c,p),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var v=Ci(s,g).text,y=fo(v,d,o);d==h?i.push(new De(fe(g,y),fe(g,y))):v.length>y&&i.push(new De(fe(g,y),fe(g,fo(v,h,o))))}i.length||i.push(new De(n,n)),ze(s,ke(u.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x=a,E=x.anchor,b=t;if("single"!=r){if("double"==r)var C=e.findWordAt(t);else C=new De(fe(t.line,0),Fe(s,fe(t.line+1,0)));he(C.anchor,E)>0?(b=C.head,E=ve(x.from(),C.anchor)):(b=C.anchor,E=me(x.to(),C.head))}(i=u.ranges.slice(0))[l]=new De(Fe(s,E),b),ze(s,ke(i,l),lo)}}(c);var p=q(o,s);(c.line>=p.to||c.line<p.from)&&setTimeout(Yt(e,(function(){g==i&&m(t)})),150)}else{var d=t.clientY<h.top?-20:t.clientY>h.bottom?20:0;d&&setTimeout(Yt(e,(function(){g==i&&(o.scroller.scrollTop+=d,m(t))})),50)}}function y(t){e.state.selectingText=!1,g=1/0,Bi(t),o.input.focus(),Yi(document,"mousemove",x),Yi(document,"mouseup",E),s.history.lastSelOrigin=null}var x=Yt(e,(function(e){zi(e)?m(e):y(e)})),E=Yt(e,y);e.state.selectingText=E,$i(document,"mousemove",x),$i(document,"mouseup",E)}(e,t,n,r,c)}(t,e,r):Wi(e)==n.scroller&&Bi(e);break;case 2:a&&(t.state.lastMiddleDown=+new Date),r&&Be(t.doc,r),setTimeout((function(){n.input.focus()}),20),Bi(e);break;case 3:b?Dn(t,e):function(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,On(e))}),100)}(t)}}}function dn(e,t,n,r){try{var i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Bi(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!ro(e,n))return qi(t);o-=a.top-s.viewOffset;for(var l=0;l<e.options.gutters.length;++l){var u=s.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=i){var c=Li(e.doc,o),p=e.options.gutters[l];return Ki(e,n,e,c,p,t),qi(t)}}}function fn(e,t){return dn(e,t,"gutterClick",!0)}var hn=0;function gn(e){var t=this;if(mn(t),!to(t,e)&&!un(t.display,e)){Bi(e),o&&(hn=+new Date);var n=cn(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,s=Array(i),a=0,l=function(e,r){if(!t.options.allowDropFileTypes||-1!=yo(t.options.allowDropFileTypes,e.type)){var o=new FileReader;o.onload=Yt(t,(function(){var e=o.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),s[r]=e,++a==i){var l={from:n=Fe(t.doc,n),to:n,text:t.doc.splitLines(s.join(t.doc.lineSeparator())),origin:"paste"};Un(t.doc,l),We(t.doc,Pe(n,kn(l)))}})),o.readAsText(e)}},u=0;u<i;++u)l(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){t.display.input.focus()}),20);try{if(s=e.dataTransfer.getData("Text")){if(t.state.draggingText&&!t.state.draggingText.copy)var c=t.listSelections();if($e(t.doc,Pe(n,n)),c)for(u=0;u<c.length;++u)Vn(t.doc,"",c[u].anchor,c[u].head,"drag");t.replaceSelection(s,"around","paste"),t.display.input.focus()}}catch(e){}}}}function mn(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function vn(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,n||K(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),n&&K(e),ot(e,100))}function yn(e,t,n){(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,V(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}var xn=0,En=null;o?En=-.53:n?En=15:u?En=-.7:p&&(En=-1/3);var bn=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};function Cn(e,t){var r=bn(t),i=r.x,o=r.y,s=e.display,l=s.scroller,u=l.scrollWidth>l.clientWidth,p=l.scrollHeight>l.clientHeight;if(i&&u||o&&p){if(o&&m&&a)e:for(var d=t.target,f=s.view;d!=l;d=d.parentNode)for(var h=0;h<f.length;h++)if(f[h].node==d){e.display.currentWheelTarget=d;break e}if(i&&!n&&!c&&null!=En)return o&&p&&vn(e,Math.max(0,Math.min(l.scrollTop+o*En,l.scrollHeight-l.clientHeight))),yn(e,Math.max(0,Math.min(l.scrollLeft+i*En,l.scrollWidth-l.clientWidth))),(!o||o&&p)&&Bi(t),void(s.wheelStartX=null);if(o&&null!=En){var g=o*En,v=e.doc.scrollTop,y=v+s.wrapper.clientHeight;g<0?v=Math.max(0,v+g-50):y=Math.min(e.doc.height,y+g+50),K(e,{top:v,bottom:y})}xn<20&&(null==s.wheelStartX?(s.wheelStartX=l.scrollLeft,s.wheelStartY=l.scrollTop,s.wheelDX=i,s.wheelDY=o,setTimeout((function(){if(null!=s.wheelStartX){var e=l.scrollLeft-s.wheelStartX,t=l.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(En=(En*xn+n)/(xn+1),++xn)}}),200)):(s.wheelDX+=i,s.wheelDY+=o))}}function Tn(e,t,n){if("string"==typeof t&&!(t=pr[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=so}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}S.wheelEventPixels=function(e){var t=bn(e);return t.x*=En,t.y*=En,t};var Sn=new co;function wn(e,t,n,r){var i=e.state.keySeq;if(i){if(gr(t))return"handled";Sn.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),t=i+" "+t}var o=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=hr(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&hr(t,e.options.extraKeys,n,e)||hr(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&Zi(e,"keyHandled",e,t,n),"handled"!=o&&"multi"!=o||(Bi(n),it(e)),i&&!o&&/\'$/.test(t)?(Bi(n),!0):!!o}function Nn(e,t){var n=mr(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?wn(e,"Shift-"+n,t,(function(t){return Tn(e,t,!0)}))||wn(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return Tn(e,t)})):wn(e,n,t,(function(t){return Tn(e,t)})))}var Ln=null;function In(e){var t=this;if(t.curOp.focus=Po(),!to(t,e)){o&&s<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=Nn(t,e);c&&(Ln=r?n:null,r||88!=n||Ko||!(m?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(Fo(t,"CodeMirror-crosshair"),Yi(document,"keyup",n),Yi(document,"mouseover",n))}jo(t,"CodeMirror-crosshair"),$i(document,"keyup",n),$i(document,"mouseover",n)}(t)}}function An(e){16==e.keyCode&&(this.doc.sel.shift=!1),to(this,e)}function Rn(e){var t=this;if(!(un(t.display,e)||to(t,e)||e.ctrlKey&&!e.altKey||m&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(c&&n==Ln)return Ln=null,void Bi(e);c&&(!e.which||e.which<10)&&Nn(t,e)||function(e,t,n){return wn(e,"'"+n+"'",t,(function(t){return Tn(e,t,!0)}))}(t,e,String.fromCharCode(null==r?n:r))||t.display.input.onKeyPress(e)}}function _n(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ki(e,"focus",e),e.state.focused=!0,jo(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),a&&setTimeout((function(){e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),it(e))}function On(e){e.state.delayingBlurEvent||(e.state.focused&&(Ki(e,"blur",e),e.state.focused=!1,Fo(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Dn(e,t){un(e.display,t)||function(e,t){return!!ro(e,"gutterContextMenu")&&dn(e,t,"gutterContextMenu",!1)}(e,t)||to(e,t,"contextmenu")||e.display.input.onContextMenu(t)}var kn=S.changeEnd=function(e){return e.text?fe(e.from.line+e.text.length-1,mo(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};function Pn(e,t){if(he(e,t.from)<0)return e;if(he(e,t.to)<=0)return kn(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=kn(t).ch-t.to.ch),fe(n,r)}function Mn(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new De(Pn(i.anchor,t),Pn(i.head,t)))}return ke(n,e.sel.primIndex)}function Fn(e,t,n){return e.line==t.line?fe(n.line,e.ch-t.ch+n.ch):fe(n.line+(e.line-t.line),e.ch)}function jn(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return n&&(r.update=function(t,n,r,i){t&&(this.from=Fe(e,t)),n&&(this.to=Fe(e,n)),r&&(this.text=r),void 0!==i&&(this.origin=i)}),Ki(e,"beforeChange",e,r),e.cm&&Ki(e.cm,"beforeChange",e.cm,r),r.canceled?null:{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Un(e,t,n){if(e.cm){if(!e.cm.curOp)return Yt(e.cm,Un)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(ro(e,"beforeChange")||e.cm&&ro(e.cm,"beforeChange"))||(t=jn(e,t,!0))){var r=C&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=yo(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var s=r[o],a=s.find(0),l=0;l<i.length;++l){var u=i[l];if(!(he(u.to,a.from)<0||he(u.from,a.to)>0)){var c=[l,1],p=he(u.from,a.from),d=he(u.to,a.to);(p<0||!s.inclusiveLeft&&!p)&&c.push({from:u.from,to:a.from}),(d>0||!s.inclusiveRight&&!d)&&c.push({from:a.to,to:u.to}),i.splice.apply(i,c),l+=c.length-1}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Gn(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else Gn(e,t)}}function Gn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=he(t.from,t.to)){var n=Mn(e,t);Di(e,t,n,e.cm?e.cm.curOp.id:NaN),qn(e,t,n,Ir(e,t));var r=[];Ei(e,(function(e,n){n||-1!=yo(r,e.history)||(Gi(e.history,t),r.push(e.history)),qn(e,t,null,Ir(e,t))}))}}function Bn(e,t,n){if(!e.cm||!e.cm.state.suppressEdits||n){for(var r,i=e.history,o=e.sel,s="undo"==t?i.done:i.undone,a="undo"==t?i.undone:i.done,l=0;l<s.length&&(r=s[l],n?!r.ranges||r.equals(e.sel):r.ranges);l++);if(l!=s.length){for(i.lastOrigin=i.lastSelOrigin=null;(r=s.pop()).ranges;){if(ki(r,a),n&&!r.equals(e.sel))return void ze(e,r,{clearRedo:!1});o=r}var u=[];ki(o,a),a.push({changes:u,generation:i.generation}),i.generation=r.generation||++i.maxGeneration;var c=ro(e,"beforeChange")||e.cm&&ro(e.cm,"beforeChange");for(l=r.changes.length-1;l>=0;--l){var p=r.changes[l];if(p.origin=t,c&&!jn(e,p,!1))return void(s.length=0);u.push(_i(e,p));var d=l?Mn(e,p):mo(s);qn(e,p,d,Rr(e,p)),!l&&e.cm&&e.cm.scrollIntoView({from:p.from,to:kn(p)});var f=[];Ei(e,(function(e,t){t||-1!=yo(f,e.history)||(Gi(e.history,p),f.push(e.history)),qn(e,p,null,Rr(e,p))}))}}}}function Hn(e,t){if(0!=t&&(e.first+=t,e.sel=new Oe(xo(e.sel.ranges,(function(e){return new De(fe(e.anchor.line+t,e.anchor.ch),fe(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){tn(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)nn(e.cm,r,"gutter")}}function qn(e,t,n,r){if(e.cm&&!e.cm.curOp)return Yt(e.cm,qn)(e,t,n,r);if(t.to.line<e.first)Hn(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Hn(e,i),t={from:fe(e.first,0),to:fe(t.to.line+i,t.to.ch),text:[mo(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:fe(o,Ci(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ti(e,t.from,t.to),n||(n=Mn(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,s=t.to,a=!1,l=o.line;e.options.lineWrapping||(l=Ni(Gr(Ci(r,o.line))),r.iter(l,s.line+1,(function(e){if(e==i.maxLine)return a=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&no(e),fi(r,t,n,I(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=k(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)})),a&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,o.line),ot(e,400);var u=t.text.length-(s.line-o.line)-1;t.full?tn(e):o.line!=s.line||1!=t.text.length||di(e.doc,t)?tn(e,o.line,s.line+1,u):nn(e,o.line,"text");var c=ro(e,"changes"),p=ro(e,"change");if(p||c){var d={from:o,to:s,text:t.text,removed:t.removed,origin:t.origin};p&&Zi(e,"change",e,d),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}(e.cm,t,r):fi(e,t,r),$e(e,n,ao)}}function Vn(e,t,n,r,i){if(r||(r=n),he(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),Un(e,{from:n,to:r,text:t,origin:i})}function Wn(e,t,n,r,i){var o=e.display,s=Mt(e.display);n<0&&(n=0);var a=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=ft(e),u={};i-n>l&&(i=n+l);var c=e.doc.height+ut(o),p=n<s,d=i>c-s;if(n<a)u.scrollTop=p?0:n;else if(i>a+l){var f=Math.min(n,(d?c:i)-l);f!=a&&(u.scrollTop=f)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=dt(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),m=r-t>g;return m&&(r=t+g),t<10?u.scrollLeft=0:t<h?u.scrollLeft=Math.max(0,t-(m?0:10)):r>g+h-3&&(u.scrollLeft=r+(m?0:10)-g),u}function zn(e,t,n){null==t&&null==n||Qn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function $n(e){Qn(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?fe(t.line,t.ch-1):t,r=fe(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function Qn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Ot(e,t.from),r=Ot(e,t.to),i=Wn(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Xn(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=at(e,t):n="prev");var s=e.options.tabSize,a=Ci(o,t),l=po(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&((u=o.mode.indent(i,a.text.slice(c.length),a.text))==so||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?po(Ci(o,t-1).text,null,s):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var p="",d=0;if(e.options.indentWithTabs)for(var f=Math.floor(u/s);f;--f)d+=s,p+="\t";if(d<u&&(p+=go(u-d)),p!=c)return Vn(o,p,fe(t,0),fe(t,c.length),"+input"),a.stateAfter=null,!0;for(f=0;f<o.sel.ranges.length;f++){var h=o.sel.ranges[f];if(h.head.line==t&&h.head.ch<c.length){qe(o,f,new De(d=fe(t,c.length),d));break}}}function Yn(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Ci(e,Me(e,t)):i=Ni(t),null==i?null:(r(o,i)&&e.cm&&nn(e.cm,i,n),o)}function Kn(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&he(o.from,mo(r).to)<=0;){var s=r.pop();if(he(s.from,o.from)<0){o.from=s.from;break}}r.push(o)}Xt(e,(function(){for(var t=r.length-1;t>=0;t--)Vn(e.doc,"",r[t].from,r[t].to,"+delete");$n(e)}))}function Jn(e,t,n,r,i){var o=t.line,s=t.ch,a=n,l=Ci(e,o);function u(t){var r,a=(i?us:cs)(l,s,n,!0);if(null==a){if(t||(r=o+n)<e.first||r>=e.first+e.size||(o=r,!(l=Ci(e,r))))return!1;s=i?(n<0?rs:ns)(l):n<0?l.text.length:0}else s=a;return!0}if("char"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var c=null,p="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||u(!f);f=!1){var h=l.text.charAt(s)||"\n",g=No(h,d)?"w":p&&"\n"==h?"n":!p||/\s/.test(h)?null:"p";if(!p||f||g||(g="s"),c&&c!=g){n<0&&(n=1,u());break}if(g&&(c=g),n>0&&!u(!f))break}var m=Je(e,fe(o,s),t,a,!0);return he(t,m)||(m.hitSide=!0),m}function Zn(e,t,n,r){var i,o=e.doc,s=t.left;if("page"==r){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(a-(n<0?1.5:.5)*Mt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var l=kt(e,s,i);if(!l.outside)break;if(n<0?i<=0:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}S.prototype={constructor:S,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];n[e]==t&&"mode"!=e||(n[e]=t,tr.hasOwnProperty(e)&&Yt(this,tr[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](vr(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Kt((function(e,t){var n=e.token?e:S.getMode(this.options,e);if(n.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:n,modeSpec:e,opaque:t&&t.opaque}),this.state.modeGen++,tn(this)})),removeOverlay:Kt((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void tn(this)}})),indentLine:Kt((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),je(this.doc,e)&&Xn(this,e,t,n)})),indentSelection:Kt((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Xn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&$n(this));else{var o=i.from(),s=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l<n;++l)Xn(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&qe(this.doc,r,new De(o,u[r].to()),ao)}}})),getTokenAt:function(e,t){return Zr(this,e,t)},getLineTokens:function(e,t){return Zr(this,fe(e),t,!0)},getTokenTypeAt:function(e){e=Fe(this.doc,e);var t,n=ni(this,Ci(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var s=r+i>>1;if((s?n[2*s-1]:0)>=o)i=s;else{if(!(n[2*s+1]<o)){t=n[2*s+2];break}r=s+1}}var a=t?t.indexOf("cm-overlay "):-1;return a<0?t:0==a?null:t.slice(0,a-1)},getModeAt:function(e){var t=this.doc.mode;return t.innerMode?S.innerMode(t,this.getTokenAt(e).state).mode:t},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!lr.hasOwnProperty(t))return n;var r=lr[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var s=r[i[t][o]];s&&n.push(s)}else i.helperType&&r[i.helperType]?n.push(r[i.helperType]):r[i.name]&&n.push(r[i.name]);for(o=0;o<r._global.length;o++){var a=r._global[o];a.pred(i,this)&&-1==yo(n,a.val)&&n.push(a.val)}return n},getStateAfter:function(e,t){var n=this.doc;return at(this,(e=Me(n,null==e?n.first+n.size-1:e))+1,t)},cursorCoords:function(e,t){var n=this.doc.sel.primary();return _t(this,null==e?n.head:"object"==typeof e?Fe(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Rt(this,Fe(this.doc,e),t||"page")},coordsChar:function(e,t){return kt(this,(e=At(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=At(this,{top:e,left:0},t||"page").top,Li(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var n,r=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,r=!0),n=Ci(this.doc,e)}else n=e;return It(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-Ii(n):0)},defaultTextHeight:function(){return Mt(this.display)},defaultCharWidth:function(){return Ft(this.display)},setGutterMarker:Kt((function(e,t,n){return Yn(this.doc,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Lo(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:Kt((function(e){var t=this,n=t.doc,r=n.first;n.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,nn(t,r,"gutter"),Lo(n.gutterMarkers)&&(n.gutterMarkers=null)),++r}))})),lineInfo:function(e){if("number"==typeof e){if(!je(this.doc,e))return null;var t=e;if(!(e=Ci(this.doc,e)))return null}else if(null==(t=Ni(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,s,a,l,u,c,p=this.display,d=(e=_t(this,Fe(this.doc,e))).bottom,f=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),p.sizer.appendChild(t),"over"==r)d=e.top;else if("above"==r||"near"==r){var h=Math.max(p.wrapper.clientHeight,this.doc.height),g=Math.max(p.sizer.clientWidth,p.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?d=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(d=e.bottom),f+t.offsetWidth>g&&(f=g-t.offsetWidth)}t.style.top=d+"px",t.style.left=t.style.right="","right"==i?(f=p.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?f=0:"middle"==i&&(f=(p.sizer.clientWidth-t.offsetWidth)/2),t.style.left=f+"px"),n&&(o=this,s=f,a=d,l=f+t.offsetWidth,u=d+t.offsetHeight,null!=(c=Wn(o,s,a,l,u)).scrollTop&&vn(o,c.scrollTop),null!=c.scrollLeft&&yn(o,c.scrollLeft))},triggerOnKeyDown:Kt(In),triggerOnKeyPress:Kt(Rn),triggerOnKeyUp:An,execCommand:function(e){if(pr.hasOwnProperty(e))return pr[e].call(null,this)},triggerElectric:Kt((function(e){Ce(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=0,s=Fe(this.doc,e);o<t&&!(s=Jn(this.doc,s,i,n,r)).hitSide;++o);return s},moveH:Kt((function(e,t){var n=this;n.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Jn(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),uo)})),deleteH:Kt((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Kn(this,(function(n){var i=Jn(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var s=0,a=Fe(this.doc,e);s<t;++s){var l=_t(this,a,"div");if(null==o?o=l.left:l.left=o,(a=Zn(this,l,i,n)).hitSide)break}return a},moveV:Kt((function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(s){if(o)return e<0?s.from():s.to();var a=_t(n,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),i.push(a.left);var l=Zn(n,a,e,t);return"page"==t&&s==r.sel.primary()&&zn(n,null,Rt(n,l,"div").top-a.top),l}),uo),i.length)for(var s=0;s<r.sel.ranges.length;s++)r.sel.ranges[s].goalColumn=i[s]})),findWordAt:function(e){var t=Ci(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");(e.xRel<0||r==t.length)&&n?--n:++r;for(var o=t.charAt(n),s=No(o,i)?function(e){return No(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!No(e)};n>0&&s(t.charAt(n-1));)--n;for(;r<t.length&&s(t.charAt(r));)++r}return new De(fe(e.line,n),fe(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?jo(this.display.cursorDiv,"CodeMirror-overwrite"):Fo(this.display.cursorDiv,"CodeMirror-overwrite"),Ki(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Po()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Kt((function(e,t){null==e&&null==t||Qn(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-pt(this)-this.display.barHeight,width:e.scrollWidth-pt(this)-this.display.barWidth,clientHeight:ft(this),clientWidth:dt(this)}},scrollIntoView:Kt((function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:fe(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)Qn(this),this.curOp.scrollToPos=e;else{var n=Wn(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(n.scrollLeft,n.scrollTop)}})),setSize:Kt((function(e,t){var n=this;function r(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}null!=e&&(n.display.wrapper.style.width=r(e)),null!=t&&(n.display.wrapper.style.height=r(t)),n.options.lineWrapping&&St(this);var i=n.display.viewFrom;n.doc.iter(i,n.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){nn(n,i,"widget");break}++i})),n.curOp.forceUpdate=!0,Ki(n,"refresh",this)})),operation:function(e){return Xt(this,e)},refresh:Kt((function(){var e=this.display.cachedTextHeight;tn(this),this.curOp.forceUpdate=!0,wt(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),D(this),(null==e||Math.abs(e-Mt(this.display))>.5)&&A(this),Ki(this,"refresh",this)})),swapDoc:Kt((function(e){var t=this.doc;return t.cm=null,bi(this,e),wt(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Zi(this,"swapDoc",this,t),t})),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},io(S);var er=S.defaults={},tr=S.optionHandlers={};function nr(e,t,n,r){S.defaults[e]=t,n&&(tr[e]=r?function(e,t,r){r!=rr&&n(e,t,r)}:n)}var rr=S.Init={toString:function(){return"CodeMirror.Init"}};nr("value","",(function(e,t){e.setValue(t)}),!0),nr("mode",null,(function(e,t){e.doc.modeOption=t,N(e)}),!0),nr("indentUnit",2,N,!0),nr("indentWithTabs",!1),nr("smartIndent",!0),nr("tabSize",4,(function(e){L(e),wt(e),tn(e)}),!0),nr("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(fe(r,o))}r++}));for(var i=n.length-1;i>=0;i--)Vn(e.doc,t,n[i],fe(n[i].line,n[i].ch+t.length))}})),nr("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=S.Init&&e.refresh()})),nr("specialCharPlaceholder",(function(e){var t=_o("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}),(function(e){e.refresh()}),!0),nr("electricChars",!0),nr("inputStyle",g?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),nr("rtlMoveVisually",!y),nr("wholeLineUpdateBefore",!0),nr("theme","default",(function(e){R(e),_(e)}),!0),nr("keyMap","default",(function(e,t,n){var r=vr(t),i=n!=S.Init&&vr(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),nr("extraKeys",null),nr("lineWrapping",!1,(function(e){e.options.lineWrapping?(jo(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Fo(e.display.wrapper,"CodeMirror-wrap"),P(e)),A(e),tn(e),wt(e),setTimeout((function(){B(e)}),100)}),!0),nr("gutters",[],(function(e){M(e.options),_(e)}),!0),nr("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?$(e.display)+"px":"0",e.refresh()}),!0),nr("coverGutterNextToScrollbar",!1,(function(e){B(e)}),!0),nr("scrollbarStyle","native",(function(e){G(e),B(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),nr("lineNumbers",!1,(function(e){M(e.options),_(e)}),!0),nr("firstLineNumber",1,_,!0),nr("lineNumberFormatter",(function(e){return e}),_,!0),nr("showCursorWhenSelecting",!1,et,!0),nr("resetSelectionOnContextMenu",!0),nr("lineWiseCopyCut",!0),nr("readOnly",!1,(function(e,t){"nocursor"==t?(On(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)})),nr("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),nr("dragDrop",!0,(function(e,t,n){if(!t!=!(n&&n!=S.Init)){var r=e.display.dragFunctions,i=t?$i:Yi;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}})),nr("allowDropFileTypes",null),nr("cursorBlinkRate",530),nr("cursorScrollMargin",0),nr("cursorHeight",1,et,!0),nr("singleCursorHeightPerLine",!0,et,!0),nr("workTime",100),nr("workDelay",100),nr("flattenSpans",!0,L,!0),nr("addModeClass",!1,L,!0),nr("pollInterval",100),nr("undoDepth",200,(function(e,t){e.doc.history.undoDepth=t})),nr("historyEventDelay",1250),nr("viewportMargin",10,(function(e){e.refresh()}),!0),nr("maxHighlightLength",1e4,L,!0),nr("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),nr("tabindex",null,(function(e,t){e.display.input.getField().tabIndex=t||""})),nr("autofocus",null);var ir=S.modes={},or=S.mimeModes={};S.defineMode=function(e,t){S.defaults.mode||"null"==e||(S.defaults.mode=e),arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ir[e]=t},S.defineMIME=function(e,t){or[e]=t},S.resolveMode=function(e){if("string"==typeof e&&or.hasOwnProperty(e))e=or[e];else if(e&&"string"==typeof e.name&&or.hasOwnProperty(e.name)){var t=or[e.name];"string"==typeof t&&(t={name:t}),(e=bo(t,e)).name=t.name}else if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return S.resolveMode("application/xml");return"string"==typeof e?{name:e}:e||{name:"null"}},S.getMode=function(e,t){t=S.resolveMode(t);var n=ir[t.name];if(!n)return S.getMode(e,"text/plain");var r=n(e,t);if(sr.hasOwnProperty(t.name)){var i=sr[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r},S.defineMode("null",(function(){return{token:function(e){e.skipToEnd()}}})),S.defineMIME("text/plain","null");var sr=S.modeExtensions={};S.extendMode=function(e,t){Co(t,sr.hasOwnProperty(e)?sr[e]:sr[e]={})},S.defineExtension=function(e,t){S.prototype[e]=t},S.defineDocExtension=function(e,t){vi.prototype[e]=t},S.defineOption=nr;var ar=[];S.defineInitHook=function(e){ar.push(e)};var lr=S.helpers={};S.registerHelper=function(e,t,n){lr.hasOwnProperty(e)||(lr[e]=S[e]={_global:[]}),lr[e][t]=n},S.registerGlobalHelper=function(e,t,n,r){S.registerHelper(e,t,r),lr[e]._global.push({pred:n,val:r})};var ur=S.copyState=function(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},cr=S.startState=function(e,t,n){return!e.startState||e.startState(t,n)};S.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var pr=S.commands={selectAll:function(e){e.setSelection(fe(e.firstLine(),0),fe(e.lastLine()),ao)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ao)},killLine:function(e){Kn(e,(function(t){if(t.empty()){var n=Ci(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:fe(t.head.line+1,0)}:{from:t.head,to:fe(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){Kn(e,(function(t){return{from:fe(t.from().line,0),to:Fe(e.doc,fe(t.to().line+1,0))}}))},delLineLeft:function(e){Kn(e,(function(e){return{from:fe(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){Kn(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){Kn(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){e.undo()},redo:function(e){e.redo()},undoSelection:function(e){e.undoSelection()},redoSelection:function(e){e.redoSelection()},goDocStart:function(e){e.extendSelection(fe(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(fe(e.lastLine()))},goLineStart:function(e){e.extendSelectionsBy((function(t){return is(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){e.extendSelectionsBy((function(t){return os(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){e.extendSelectionsBy((function(t){return function(e,t){for(var n,r=Ci(e.doc,t);n=jr(r);)r=n.find(1,!0).line,t=null;var i=Ai(r),o=i?i[0].level%2?ns(r):rs(r):r.text.length;return fe(null==t?Ni(r):t,o)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){e.extendSelectionsBy((function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),uo)},goLineLeft:function(e){e.extendSelectionsBy((function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),uo)},goLineLeftSmart:function(e){e.extendSelectionsBy((function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?os(e,t.head):r}),uo)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),s=po(e.getLine(o.line),o.ch,r);t.push(go(r-s%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){Xt(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){var i=t[r].head,o=Ci(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new fe(i.line,i.ch-1)),i.ch>0)i=new fe(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),fe(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var s=Ci(e.doc,i.line-1).text;s&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),fe(i.line-1,s.length-1),fe(i.line,1),"+transpose")}n.push(new De(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){Xt(e,(function(){for(var t=e.listSelections().length,n=0;n<t;n++){var r=e.listSelections()[n];e.replaceRange(e.doc.lineSeparator(),r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0)}$n(e)}))},openLine:function(e){e.replaceSelection("\n","start")},toggleOverwrite:function(e){e.toggleOverwrite()}},dr=S.keyMap={};function fr(e){for(var t,n,r,i,o=e.split(/-(?!$)/),s=(e=o[o.length-1],0);s<o.length-1;s++){var a=o[s];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))t=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else{if(!/^s(hift)$/i.test(a))throw new Error("Unrecognized modifier name: "+a);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}dr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},dr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},dr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},dr.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},dr.default=m?dr.macDefault:dr.pcDefault,S.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=xo(n.split(" "),fr),o=0;o<i.length;o++){var s,a;o==i.length-1?(a=i.join(" "),s=r):(a=i.slice(0,o+1).join(" "),s="...");var l=t[a];if(l){if(l!=s)throw new Error("Inconsistent bindings for "+a)}else t[a]=s}delete e[n]}for(var u in t)e[u]=t[u];return e};var hr=S.lookupKey=function(e,t,n,r){var i=(t=vr(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return hr(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var s=hr(e,t.fallthrough[o],n,r);if(s)return s}}},gr=S.isModifierKey=function(e){var t="string"==typeof e?e:Zo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t},mr=S.keyName=function(e,t){if(c&&34==e.keyCode&&e.char)return!1;var n=Zo[e.keyCode],r=n;return null!=r&&!e.altGraphKey&&(e.altKey&&"Alt"!=n&&(r="Alt-"+r),(E?e.metaKey:e.ctrlKey)&&"Ctrl"!=n&&(r="Ctrl-"+r),(E?e.ctrlKey:e.metaKey)&&"Cmd"!=n&&(r="Cmd-"+r),!t&&e.shiftKey&&"Shift"!=n&&(r="Shift-"+r),r)};function vr(e){return"string"==typeof e?dr[e]:e}S.fromTextArea=function(e,t){if((t=t?Co(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=Po();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=a.getValue()}if(e.form&&($i(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var i=e.form,o=i.submit;try{var s=i.submit=function(){r(),i.submit=o,i.submit(),i.submit=s}}catch(e){}}t.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(Yi(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=o))}},e.style.display="none";var a=S((function(t){e.parentNode.insertBefore(t,e.nextSibling)}),t);return a};var yr=S.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};yr.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var n=t==e;else n=t&&(e.test?e.test(t):e(t));if(n)return++this.pos,t},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=po(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?po(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return po(this.string,null,this.tabSize)-(this.lineStart?po(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var xr=0,Er=S.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++xr};function br(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,i){(r=Co(r)).shared=!1;var o=[br(e,t,n,r,i)],s=o[0],a=r.widgetNode;return Ei(e,(function(e){a&&(r.widgetNode=a.cloneNode(!0)),o.push(br(e,Fe(e,t),Fe(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;s=mo(o)})),new Cr(o,s)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Yt(e.cm,br)(e,t,n,r,i);var o=new Er(e,i),s=he(t,n);if(r&&Co(r,o,!1),s>0||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=_o("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Ur(e,t.line,t,n,o)||t.line!=n.line&&Ur(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");T=!0}o.addToHistory&&Di(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,l=t.line,u=e.cm;if(e.iter(l,n.line+1,(function(e){u&&o.collapsed&&!u.options.lineWrapping&&Gr(e)==u.display.maxLine&&(a=!0),o.collapsed&&l!=t.line&&wi(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new wr(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){qr(e,t)&&wi(t,0)})),o.clearOnEnter&&$i(o,"beforeCursorEnter",(function(){o.clear()})),o.readOnly&&(C=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++xr,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)tn(u,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)nn(u,c,"text");o.atomic&&Xe(u.doc),Zi(u,"markerAdded",u,o)}return o}io(Er),Er.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ht(e),ro(this,"clear")){var n=this.find();n&&Zi(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var s=this.lines[o],a=Nr(s.markedSpans,this);e&&!this.collapsed?nn(e,Ni(s),"text"):e&&(null!=a.to&&(i=Ni(s)),null!=a.from&&(r=Ni(s))),s.markedSpans=Lr(s.markedSpans,a),null==a.from&&this.collapsed&&!qr(this.doc,s)&&e&&wi(s,Mt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(o=0;o<this.lines.length;++o){var l=Gr(this.lines[o]),u=k(l);u>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&tn(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Xe(e.doc)),e&&Zi(e,"markerCleared",e,this),t&&qt(e),this.parent&&this.parent.clear()}},Er.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],s=Nr(o.markedSpans,this);if(null!=s.from&&(n=fe(t?o:Ni(o),s.from),-1==e))return n;if(null!=s.to&&(r=fe(t?o:Ni(o),s.to),1==e))return r}return n&&{from:n,to:r}},Er.prototype.changed=function(){var e=this.find(-1,!0),t=this,n=this.doc.cm;e&&n&&Xt(n,(function(){var r=e.line,i=Ni(e.line),o=mt(n,i);if(o&&(Tt(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!qr(t.doc,r)&&null!=t.height){var s=t.height;t.height=null;var a=$r(t)-s;a&&wi(r,r.height+a)}}))},Er.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=yo(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Er.prototype.detachLine=function(e){if(this.lines.splice(yo(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},xr=0;var Cr=S.SharedTextMarker=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Tr(e){return e.findMarks(fe(e.first,0),e.clipPos(fe(e.lastLine())),(function(e){return e.parent}))}function Sr(e){for(var t=0;t<e.length;t++){var n=e[t],r=[n.primary.doc];Ei(n.primary.doc,(function(e){r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==yo(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}}}function wr(e,t,n){this.marker=e,this.from=t,this.to=n}function Nr(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Lr(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Ir(e,t){if(t.full)return null;var n=je(e,t.from.line)&&Ci(e,t.from.line).markedSpans,r=je(e,t.to.line)&&Ci(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,s=0==he(t.from,t.to),a=function(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],s=o.marker;if(null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==s.type&&(!n||!o.marker.insertLeft)){var a=null==o.to||(s.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new wr(s,o.from,a?null:o.to))}}return r}(n,i,s),l=function(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],s=o.marker;if(null==o.to||(s.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var a=null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new wr(s,a?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,s),u=1==t.text.length,c=mo(t.text).length+(u?i:0);if(a)for(var p=0;p<a.length;++p)null==(d=a[p]).to&&((f=Nr(l,d.marker))?u&&(d.to=null==f.to?null:f.to+c):d.to=i);if(l)for(p=0;p<l.length;++p){var d,f;null!=(d=l[p]).to&&(d.to+=c),null==d.from?(f=Nr(a,d.marker))||(d.from=c,u&&(a||(a=[])).push(d)):(d.from+=c,u&&(a||(a=[])).push(d))}a&&(a=Ar(a)),l&&l!=a&&(l=Ar(l));var h=[a];if(!u){var g,m=t.text.length-2;if(m>0&&a)for(p=0;p<a.length;++p)null==a[p].to&&(g||(g=[])).push(new wr(a[p].marker,null,null));for(p=0;p<m;++p)h.push(g);h.push(l)}return h}function Ar(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Rr(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=0,i=[];r<t.text.length;++r)i.push(Mi(n[r]));return i}(e,t),r=Ir(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],s=r[i];if(o&&s)e:for(var a=0;a<s.length;++a){for(var l=s[a],u=0;u<o.length;++u)if(o[u].marker==l.marker)continue e;o.push(l)}else s&&(n[i]=s)}return n}function _r(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Or(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Dr(e){return e.inclusiveLeft?-1:0}function kr(e){return e.inclusiveRight?1:0}function Pr(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=he(r.from,i.from)||Dr(e)-Dr(t);if(o)return-o;var s=he(r.to,i.to)||kr(e)-kr(t);return s||t.id-e.id}function Mr(e,t){var n,r=T&&e.markedSpans;if(r)for(var i,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Pr(n,i.marker)<0)&&(n=i.marker);return n}function Fr(e){return Mr(e,!0)}function jr(e){return Mr(e,!1)}function Ur(e,t,n,r,i){var o=Ci(e,t),s=T&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var u=l.marker.find(0),c=he(u.from,n)||Dr(l.marker)-Dr(i),p=he(u.to,r)||kr(l.marker)-kr(i);if(!(c>=0&&p<=0||c<=0&&p>=0)&&(c<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?he(u.to,n)>=0:he(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?he(u.from,r)<=0:he(u.from,r)<0)))return!0}}}function Gr(e){for(var t;t=Fr(e);)e=t.find(-1,!0).line;return e}function Br(e,t){var n=Ci(e,t),r=Gr(n);return n==r?t:Ni(r)}function Hr(e,t){if(t>e.lastLine())return t;var n,r=Ci(e,t);if(!qr(e,r))return t;for(;n=jr(r);)r=n.find(1,!0).line;return Ni(r)+1}function qr(e,t){var n=T&&t.markedSpans;if(n)for(var r,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Vr(e,t,r))return!0}}function Vr(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Vr(e,r.line,Nr(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Vr(e,t,i))return!0}io(Cr),Cr.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Zi(this,"clear")}},Cr.prototype.find=function(e,t){return this.primary.find(e,t)};var Wr=S.LineWidget=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function zr(e,t,n){Ii(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&zn(e,null,n)}function $r(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!ko(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),Do(t.display.measure,_o("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}io(Wr),Wr.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Ni(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=$r(this);wi(n,Math.max(0,n.height-o)),e&&Xt(e,(function(){zr(e,n,-o),nn(e,r,"widget")}))}},Wr.prototype.changed=function(){var e=this.height,t=this.doc.cm,n=this.line;this.height=null;var r=$r(this)-e;r&&(wi(n,n.height+r),t&&Xt(t,(function(){t.curOp.forceUpdate=!0,zr(t,n,r)})))};var Qr=S.Line=function(e,t,n){this.text=e,Or(this,t),this.height=n?n(this):1};function Xr(e){e.parent=null,_r(e)}function Yr(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Kr(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=S.innerMode(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Jr(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=S.innerMode(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function Zr(e,t,n,r){function i(e){return{start:p.start,end:p.pos,string:p.current(),type:o||null,state:e?ur(s.mode,c):c}}var o,s=e.doc,a=s.mode;t=Fe(s,t);var l,u=Ci(s,t.line),c=at(e,t.line,n),p=new yr(u.text,e.options.tabSize);for(r&&(l=[]);(r||p.pos<t.ch)&&!p.eol();)p.start=p.pos,o=Jr(a,p,c),r&&l.push(i(!0));return r?l:i()}function ei(e,t,n,r,i,o,s){var a=n.flattenSpans;null==a&&(a=e.options.flattenSpans);var l,u=0,c=null,p=new yr(t,e.options.tabSize),d=e.options.addModeClass&&[null];for(""==t&&Yr(Kr(n,r),o);!p.eol();){if(p.pos>e.options.maxHighlightLength?(a=!1,s&&ri(e,t,r,p.pos),p.pos=t.length,l=null):l=Yr(Jr(n,p,r,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||c!=l){for(;u<p.start;)i(u=Math.min(p.start,u+5e4),c);c=l}p.start=p.pos}for(;u<p.pos;){var h=Math.min(p.pos,u+5e4);i(h,c),u=h}}function ti(e,t,n,r){var i=[e.state.modeGen],o={};ei(e,t.text,e.doc.mode,n,(function(e,t){i.push(e,t)}),o,r);for(var s=0;s<e.state.overlays.length;++s){var a=e.state.overlays[s],l=1,u=0;ei(e,t.text,a.mode,!0,(function(e,t){for(var n=l;u<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}}),o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function ni(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=at(e,Ni(t)),i=ti(e,t,t.text.length>e.options.maxHighlightLength?ur(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function ri(e,t,n,r){var i=e.doc.mode,o=new yr(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&Kr(i,n);!o.eol();)Jr(i,o,n),o.start=o.pos}io(Qr),Qr.prototype.lineNo=function(){return Ni(this)};var ii={},oi={};function si(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?oi:ii;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function ai(e,t){var n=_o("span",null,null,a?"padding-right: .1px":null),r={pre:_o("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(o||a)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var s,l=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=li,zo(e.display.measure)&&(s=Ai(l))&&(r.addToken=ui(r.addToken,s)),r.map=[],pi(l,r,ni(e,l,t!=e.display.externalMeasured&&Ni(l))),l.styleClasses&&(l.styleClasses.bgClass&&(r.bgClass=Uo(l.styleClasses.bgClass,r.bgClass||"")),l.styleClasses.textClass&&(r.textClass=Uo(l.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Wo(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(a){var u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ki(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Uo(r.pre.className,r.textClass||"")),r}function li(e,t,n,r,i,a,l){if(t){var u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}(t,e.trailingSpace):t,c=e.cm.state.specialChars,p=!1;if(c.test(t)){y=document.createDocumentFragment();for(var d=0;;){c.lastIndex=d;var f=c.exec(t),h=f?f.index-d:t.length-d;if(h){var g=document.createTextNode(u.slice(d,d+h));o&&s<9?y.appendChild(_o("span",[g])):y.appendChild(g),e.map.push(e.pos,e.pos+h,g),e.col+=h,e.pos+=h}if(!f)break;if(d+=h+1,"\t"==f[0]){var m=e.cm.options.tabSize,v=m-e.col%m;(g=y.appendChild(_o("span",go(v),"cm-tab"))).setAttribute("role","presentation"),g.setAttribute("cm-text","\t"),e.col+=v}else"\r"==f[0]||"\n"==f[0]?((g=y.appendChild(_o("span","\r"==f[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",f[0]),e.col+=1):((g=e.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),o&&s<9?y.appendChild(_o("span",[g])):y.appendChild(g),e.col+=1);e.map.push(e.pos,e.pos+1,g),e.pos++}}else{e.col+=t.length;var y=document.createTextNode(u);e.map.push(e.pos,e.pos+t.length,y),o&&s<9&&(p=!0),e.pos+=t.length}if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||p||l){var x=n||"";r&&(x+=r),i&&(x+=i);var E=_o("span",[y],x,l);return a&&(E.title=a),e.content.appendChild(E)}e.content.appendChild(y)}}function ui(e,t){return function(n,r,i,o,s,a,l){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,c=u+r.length;;){for(var p=0;p<t.length;p++){var d=t[p];if(d.to>u&&d.from<=u)break}if(d.to>=c)return e(n,r,i,o,s,a,l);e(n,r.slice(0,d.to-u),i,o,null,a,l),o=null,r=r.slice(d.to-u),u=d.to}}}function ci(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function pi(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var s,a,l,u,c,p,d,f=i.length,h=0,g=(w=1,""),m=0;;){if(m==h){l=u=c=p=a="",d=null,m=1/0;for(var v,y=[],x=0;x<r.length;++x){var E=r[x],b=E.marker;"bookmark"==b.type&&E.from==h&&b.widgetNode?y.push(b):E.from<=h&&(null==E.to||E.to>h||b.collapsed&&E.to==h&&E.from==h)?(null!=E.to&&E.to!=h&&m>E.to&&(m=E.to,u=""),b.className&&(l+=" "+b.className),b.css&&(a=(a?a+";":"")+b.css),b.startStyle&&E.from==h&&(c+=" "+b.startStyle),b.endStyle&&E.to==m&&(v||(v=[])).push(b.endStyle,E.to),b.title&&!p&&(p=b.title),b.collapsed&&(!d||Pr(d.marker,b)<0)&&(d=E)):E.from>h&&m>E.from&&(m=E.from)}if(v)for(x=0;x<v.length;x+=2)v[x+1]==m&&(u+=" "+v[x]);if(!d||d.from==h)for(x=0;x<y.length;++x)ci(t,0,y[x]);if(d&&(d.from||0)==h){if(ci(t,(null==d.to?f+1:d.to)-h,d.marker,null==d.from),null==d.to)return;d.to==h&&(d=!1)}}if(h>=f)break;for(var C=Math.min(f,m);;){if(g){var T=h+g.length;if(!d){var S=T>C?g.slice(0,C-h):g;t.addToken(t,S,s?s+l:l,c,h+S.length==m?u:"",p,a)}if(T>=C){g=g.slice(C-h),h=C;break}h=T,c=""}g=i.slice(o,o=n[w++]),s=si(n[w++],t.cm.options)}}else for(var w=1;w<n.length;w+=2)t.addToken(t,i.slice(o,o=n[w]),si(n[w+1],t.cm.options))}function di(e,t){return 0==t.from.ch&&0==t.to.ch&&""==mo(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function fi(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),_r(e),Or(e,n);var i=r?r(e):1;i!=e.height&&wi(e,i)}(e,n,i,r),Zi(e,"change",e,t)}function s(e,t){for(var n=e,o=[];n<t;++n)o.push(new Qr(u[n],i(n),r));return o}var a=t.from,l=t.to,u=t.text,c=Ci(e,a.line),p=Ci(e,l.line),d=mo(u),f=i(u.length-1),h=l.line-a.line;if(t.full)e.insert(0,s(0,u.length)),e.remove(u.length,e.size-u.length);else if(di(e,t)){var g=s(0,u.length-1);o(p,p.text,f),h&&e.remove(a.line,h),g.length&&e.insert(a.line,g)}else c==p?1==u.length?o(c,c.text.slice(0,a.ch)+d+c.text.slice(l.ch),f):((g=s(1,u.length-1)).push(new Qr(d+c.text.slice(l.ch),f,r)),o(c,c.text.slice(0,a.ch)+u[0],i(0)),e.insert(a.line+1,g)):1==u.length?(o(c,c.text.slice(0,a.ch)+u[0]+p.text.slice(l.ch),i(0)),e.remove(a.line+1,h)):(o(c,c.text.slice(0,a.ch)+u[0],i(0)),o(p,d+p.text.slice(l.ch),f),g=s(1,u.length-1),h>1&&e.remove(a.line+1,h-1),e.insert(a.line+1,g));Zi(e,"change",e,t)}function hi(e){this.lines=e,this.parent=null;for(var t=0,n=0;t<e.length;++t)e[t].parent=this,n+=e[t].height;this.height=n}function gi(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}hi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,Xr(i),Zi(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},gi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),s=r.height;if(r.removeInner(e,o),this.height-=s-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof hi))){var a=[];this.collapse(a),this.children=[new hi(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var s=i.lines.length%25+25,a=s;a<i.lines.length;){var l=new hi(i.lines.slice(a,a+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,s),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new gi(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=yo(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new gi(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var s=Math.min(t,o-e);if(i.iterN(e,s,n))return!0;if(0==(t-=s))break;e=0}else e-=o}}};var mi=0,vi=S.Doc=function(e,t,n,r){if(!(this instanceof vi))return new vi(e,t,n,r);null==n&&(n=0),gi.call(this,[new hi([new Qr("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var i=fe(n,0);this.sel=Pe(i),this.history=new Ri(null),this.id=++mi,this.modeOption=t,this.lineSep=r,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),fi(this,{from:i,to:i,text:e}),ze(this,Pe(i),ao)};vi.prototype=bo(gi.prototype,{constructor:vi,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Si(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Jt((function(e){var t=fe(this.first,0),n=this.first+this.size-1;Un(this,{from:t,to:fe(n,Ci(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),ze(this,Pe(t))})),replaceRange:function(e,t,n,r){Vn(this,e,t=Fe(this,t),n=n?Fe(this,n):t,r)},getRange:function(e,t,n){var r=Ti(this,Fe(this,e),Fe(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(je(this,e))return Ci(this,e)},getLineNumber:function(e){return Ni(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ci(this,e)),Gr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Fe(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Jt((function(e,t,n){Ve(this,Fe(this,"number"==typeof e?fe(e,t||0):e),null,n)})),setSelection:Jt((function(e,t,n){Ve(this,Fe(this,e),Fe(this,t||e),n)})),extendSelection:Jt((function(e,t,n){Be(this,Fe(this,e),t&&Fe(this,t),n)})),extendSelections:Jt((function(e,t){He(this,Ue(this,e),t)})),extendSelectionsBy:Jt((function(e,t){He(this,Ue(this,xo(this.sel.ranges,e)),t)})),setSelections:Jt((function(e,t,n){if(e.length){for(var r=0,i=[];r<e.length;r++)i[r]=new De(Fe(this,e[r].anchor),Fe(this,e[r].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),ze(this,ke(i,t),n)}})),addSelection:Jt((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new De(Fe(this,e),Fe(this,t||e))),ze(this,ke(r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=Ti(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Ti(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Jt((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var s=i.ranges[o];r[o]={from:s.from(),to:s.to(),text:this.splitLines(e[o]),origin:n}}var a=t&&"end"!=t&&function(e,t,n){for(var r=[],i=fe(e.first,0),o=i,s=0;s<t.length;s++){var a=t[s],l=Fn(a.from,i,o),u=Fn(kn(a),i,o);if(i=a.to,o=u,"around"==n){var c=e.sel.ranges[s],p=he(c.head,c.anchor)<0;r[s]=new De(p?u:l,p?l:u)}else r[s]=new De(l,l)}return new Oe(r,e.sel.primIndex)}(this,r,t);for(o=r.length-1;o>=0;o--)Un(this,r[o]);a?We(this,a):this.cm&&$n(this.cm)})),undo:Jt((function(){Bn(this,"undo")})),redo:Jt((function(){Bn(this,"redo")})),undoSelection:Jt((function(){Bn(this,"undo",!0)})),redoSelection:Jt((function(){Bn(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(r=0;r<e.undone.length;r++)e.undone[r].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new Ri(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Fi(this.history.done),undone:Fi(this.history.undone)}},setHistory:function(e){var t=this.history=new Ri(this.history.maxGeneration);t.done=Fi(e.done.slice(0),null,!0),t.undone=Fi(e.undone.slice(0),null,!0)},addLineClass:Jt((function(e,t,n){return Yn(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(Mo(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:Jt((function(e,t,n){return Yn(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(Mo(n));if(!o)return!1;var s=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&s!=i.length?" ":"")+i.slice(s)||null}return!0}))})),addLineWidget:Jt((function(e,t,n){return function(e,t,n,r){var i=new Wr(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Yn(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!qr(e,t)){var r=Ii(t)<e.scrollTop;wi(t,t.height+$r(i)),r&&zn(o,null,i.height),o.curOp.forceUpdate=!0}return!0})),i}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return br(this,Fe(this,e),Fe(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return br(this,e=Fe(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Ci(this,(e=Fe(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Fe(this,e),t=Fe(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var s=o.markedSpans;if(s)for(var a=0;a<s.length;a++){var l=s[a];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),Fe(this,fe(n,t))},indexFromPos:function(e){var t=(e=Fe(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new vi(Si(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new vi(Si(this,t,n),e.mode||this.modeOption,t,this.lineSep);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),s=e.clipPos(i.to);if(he(o,s)){var a=br(e,o,s,r.primary,r.primary.type);r.markers.push(a),a.parent=r}}}(r,Tr(this)),r},unlinkDoc:function(e){if(e instanceof S&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Sr(Tr(this));break}if(e.history==this.history){var n=[e.id];Ei(e,(function(e){n.push(e.id)}),!0),e.history=new Ri(null),e.history.done=Fi(this.history.done,n),e.history.undone=Fi(this.history.undone,n)}},iterLinkedDocs:function(e){Ei(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Xo(e)},lineSeparator:function(){return this.lineSep||"\n"}}),vi.prototype.eachLine=vi.prototype.iter;var yi="iter insert remove copy getEditor constructor".split(" ");for(var xi in vi.prototype)vi.prototype.hasOwnProperty(xi)&&yo(yi,xi)<0&&(S.prototype[xi]=function(e){return function(){return e.apply(this.doc,arguments)}}(vi.prototype[xi]));function Ei(e,t,n){!function e(r,i,o){if(r.linked)for(var s=0;s<r.linked.length;++s){var a=r.linked[s];if(a.doc!=i){var l=o&&a.sharedHist;n&&!l||(t(a.doc,l),e(a.doc,r,l))}}}(e,null,!0)}function bi(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,A(e),N(e),e.options.lineWrapping||P(e),e.options.mode=t.modeOption,tn(e)}function Ci(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Ti(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function Si(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function wi(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Ni(e){if(null==e.parent)return null;for(var t=e.parent,n=yo(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Li(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(r=0;r<e.lines.length;++r){var s=e.lines[r].height;if(t<s)break;t-=s}return n+r}function Ii(e){for(var t=0,n=(e=Gr(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(r=0;r<o.children.length;++r){var s=o.children[r];if(s==n)break;t+=s.height}return t}function Ai(e){var t=e.order;return null==t&&(t=e.order=ps(e.text)),t}function Ri(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function _i(e,t){var n={from:ge(t.from),to:kn(t),text:Ti(e,t.from,t.to)};return Pi(e,n,t.from.line,t.to.line+1),Ei(e,(function(e){Pi(e,n,t.from.line,t.to.line+1)}),!0),n}function Oi(e){for(;e.length&&mo(e).ranges;)e.pop()}function Di(e,t,n,r){var i=e.history;i.undone.length=0;var o,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Oi(e.done),mo(e.done)):e.done.length&&!mo(e.done).ranges?mo(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),mo(e.done)):void 0}(i,i.lastOp==r))){var a=mo(o.changes);0==he(t.from,t.to)&&0==he(t.from,a.to)?a.to=kn(t):o.changes.push(_i(e,t))}else{var l=mo(i.done);for(l&&l.ranges||ki(e.sel,i.done),o={changes:[_i(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ki(e,"historyAdded")}function ki(e,t){var n=mo(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Pi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Mi(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Fi(e,t,n){for(var r=0,i=[];r<e.length;++r){var o=e[r];if(o.ranges)i.push(n?Oe.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];i.push({changes:a});for(var l=0;l<s.length;++l){var u,c=s[l];if(a.push({from:c.from,to:c.to,text:c.text}),t)for(var p in c)(u=p.match(/^spans_(\d+)$/))&&yo(t,Number(u[1]))>-1&&(mo(a)[p]=c[p],delete c[p])}}}return i}function ji(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Ui(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],s=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var a=0;a<o.ranges.length;a++)ji(o.ranges[a].anchor,t,n,r),ji(o.ranges[a].head,t,n,r)}else{for(a=0;a<o.changes.length;++a){var l=o.changes[a];if(n<l.from.line)l.from=fe(l.from.line+r,l.from.ch),l.to=fe(l.to.line+r,l.to.ch);else if(t<=l.to.line){s=!1;break}}s||(e.splice(0,i+1),i=0)}}}function Gi(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;Ui(e.done,n,r,i),Ui(e.undone,n,r,i)}io(vi);var Bi=S.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},Hi=S.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0};function qi(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}var Vi=S.e_stop=function(e){Bi(e),Hi(e)};function Wi(e){return e.target||e.srcElement}function zi(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),m&&e.ctrlKey&&1==t&&(t=3),t}var $i=S.on=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});(r[t]||(r[t]=[])).push(n)}},Qi=[];function Xi(e,t,n){var r=e._handlers&&e._handlers[t];return n?r&&r.length>0?r.slice():Qi:r||Qi}var Yi=S.off=function(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else for(var r=Xi(e,t,!1),i=0;i<r.length;++i)if(r[i]==n){r.splice(i,1);break}},Ki=S.signal=function(e,t){var n=Xi(e,t,!0);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)},Ji=null;function Zi(e,t){var n=Xi(e,t,!1);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);Gt?r=Gt.delayedCallbacks:Ji?r=Ji:(r=Ji=[],setTimeout(eo,0));for(var o=0;o<n.length;++o)r.push(s(n[o]))}function s(e){return function(){e.apply(null,i)}}}function eo(){var e=Ji;Ji=null;for(var t=0;t<e.length;++t)e[t]()}function to(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ki(e,n||t.type,e,t),qi(t)||t.codemirrorIgnore}function no(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==yo(n,t[r])&&n.push(t[r])}function ro(e,t){return Xi(e,t).length>0}function io(e){e.prototype.on=function(e,t){$i(this,e,t)},e.prototype.off=function(e,t){Yi(this,e,t)}}var oo=30,so=S.Pass={toString:function(){return"CodeMirror.Pass"}},ao={scroll:!1},lo={origin:"*mouse"},uo={origin:"+move"};function co(){this.id=null}co.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var po=S.countColumn=function(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,s=i||0;;){var a=e.indexOf("\t",o);if(a<0||a>=t)return s+(t-o);s+=a-o,s+=n-s%n,o=a+1}},fo=S.findColumn=function(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var s=o-r;if(o==e.length||i+s>=t)return r+Math.min(s,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}},ho=[""];function go(e){for(;ho.length<=e;)ho.push(mo(ho)+" ");return ho[e]}function mo(e){return e[e.length-1]}var vo=function(e){e.select()};function yo(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function xo(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Eo(){}function bo(e,t){var n;return Object.create?n=Object.create(e):(Eo.prototype=e,n=new Eo),t&&Co(t,n),n}function Co(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function To(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}h?vo=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(vo=function(e){try{e.select()}catch(e){}});var So=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,wo=S.isWordChar=function(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||So.test(e))};function No(e,t){return t?!!(t.source.indexOf("\\w")>-1&&wo(e))||t.test(e):wo(e)}function Lo(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Io,Ao=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Ro(e){return e.charCodeAt(0)>=768&&Ao.test(e)}function _o(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function Oo(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Do(e,t){return Oo(e).appendChild(t)}Io=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var ko=S.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)};function Po(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Mo(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}o&&s<11&&(Po=function(){try{return document.activeElement}catch(e){return document.body}});var Fo=S.rmClass=function(e,t){var n=e.className,r=Mo(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},jo=S.addClass=function(e,t){var n=e.className;Mo(t).test(n)||(e.className+=(n?" ":"")+t)};function Uo(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!Mo(n[r]).test(t)&&(t+=" "+n[r]);return t}function Go(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&e(r)}}var Bo,Ho,qo=!1,Vo=function(){if(o&&s<9)return!1;var e=_o("div");return"draggable"in e||"dragDrop"in e}();function Wo(e){if(null==Bo){var t=_o("span","");Do(e,_o("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Bo=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&s<8))}var n=Bo?_o("span",""):_o("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function zo(e){if(null!=Ho)return Ho;var t=Do(e,document.createTextNode("AخA")),n=Io(t,0,1).getBoundingClientRect(),r=Io(t,1,2).getBoundingClientRect();return Oo(e),!(!n||n.left==n.right)&&(Ho=r.right-n.right<3)}var $o,Qo,Xo=S.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),s=o.indexOf("\r");-1!=s?(n.push(o.slice(0,s)),t+=s+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Yo=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ko="oncopy"in($o=_o("div"))||($o.setAttribute("oncopy","return;"),"function"==typeof $o.oncopy),Jo=null,Zo=S.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};function es(e){return e.level%2?e.to:e.from}function ts(e){return e.level%2?e.from:e.to}function ns(e){var t=Ai(e);return t?es(t[0]):0}function rs(e){var t=Ai(e);return t?ts(mo(t)):e.text.length}function is(e,t){var n=Ci(e.doc,t),r=Gr(n);r!=n&&(t=Ni(r));var i=Ai(r),o=i?i[0].level%2?rs(r):ns(r):0;return fe(t,o)}function os(e,t){var n=is(e,t.line),r=Ci(e.doc,n.line),i=Ai(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),s=t.line==n.line&&t.ch<=o&&t.ch;return fe(n.line,s?0:o)}return n}function ss(e,t,n){var r=e[0].level;return t==r||n!=r&&t<n}function as(e,t){Qo=null;for(var n,r=0;r<e.length;++r){var i=e[r];if(i.from<t&&i.to>t)return r;if(i.from==t||i.to==t){if(null!=n)return ss(e,i.level,e[n].level)?(i.from!=i.to&&(Qo=n),r):(i.from!=i.to&&(Qo=r),n);n=r}}return n}function ls(e,t,n,r){if(!r)return t+n;do{t+=n}while(t>0&&Ro(e.text.charAt(t)));return t}function us(e,t,n,r){var i=Ai(e);if(!i)return cs(e,t,n,r);for(var o=as(i,t),s=i[o],a=ls(e,t,s.level%2?-n:n,r);;){if(a>s.from&&a<s.to)return a;if(a==s.from||a==s.to)return as(i,a)==o?a:n>0==(s=i[o+=n]).level%2?s.to:s.from;if(!(s=i[o+=n]))return null;a=n>0==s.level%2?ls(e,s.to,-1,r):ls(e,s.from,1,r)}}function cs(e,t,n,r){var i=t+n;if(r)for(;i>0&&Ro(e.text.charAt(i));)i+=n;return i<0||i>e.text.length?null:i}!function(){for(var e=0;e<10;e++)Zo[e+48]=Zo[e+96]=String(e);for(e=65;e<=90;e++)Zo[e]=String.fromCharCode(e);for(e=1;e<=12;e++)Zo[e+111]=Zo[e+63235]="F"+e}();var ps=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(s){if(!e.test(s))return!1;for(var a,l=s.length,u=[],c=0;c<l;++c)u.push(m=(a=s.charCodeAt(c))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(a):1424<=a&&a<=1524?"R":1536<=a&&a<=1773?"rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm".charAt(a-1536):1774<=a&&a<=2220?"r":8192<=a&&a<=8203?"w":8204==a?"b":"L");c=0;for(var p="L";c<l;++c)"m"==(m=u[c])?u[c]=p:p=m;c=0;for(var d="L";c<l;++c)"1"==(m=u[c])&&"r"==d?u[c]="n":n.test(m)&&(d=m,"r"==m&&(u[c]="R"));for(c=1,p=u[0];c<l-1;++c)"+"==(m=u[c])&&"1"==p&&"1"==u[c+1]?u[c]="1":","!=m||p!=u[c+1]||"1"!=p&&"n"!=p||(u[c]=p),p=m;for(c=0;c<l;++c)if(","==(m=u[c]))u[c]="N";else if("%"==m){for(var f=c+1;f<l&&"%"==u[f];++f);for(var h=c&&"!"==u[c-1]||f<l&&"1"==u[f]?"1":"N",g=c;g<f;++g)u[g]=h;c=f-1}for(c=0,d="L";c<l;++c){var m=u[c];"L"==d&&"1"==m?u[c]="L":n.test(m)&&(d=m)}for(c=0;c<l;++c)if(t.test(u[c])){for(f=c+1;f<l&&t.test(u[f]);++f);var v="L"==(c?u[c-1]:"L"),y="L"==(f<l?u[f]:"L");for(h=v||y?"L":"R",g=c;g<f;++g)u[g]=h;c=f-1}var x,E=[];for(c=0;c<l;)if(r.test(u[c])){var b=c;for(++c;c<l&&r.test(u[c]);++c);E.push(new o(0,b,c))}else{var C=c,T=E.length;for(++c;c<l&&"L"!=u[c];++c);for(g=C;g<c;)if(i.test(u[g])){C<g&&E.splice(T,0,new o(1,C,g));var S=g;for(++g;g<c&&i.test(u[g]);++g);E.splice(T,0,new o(2,S,g)),C=g}else++g;C<c&&E.splice(T,0,new o(1,C,c))}return 1==E[0].level&&(x=s.match(/^\s+/))&&(E[0].from=x[0].length,E.unshift(new o(0,0,x[0].length))),1==mo(E).level&&(x=s.match(/\s+$/))&&(mo(E).to-=x[0].length,E.push(new o(0,l-x[0].length,l))),2==E[0].level&&E.unshift(new o(1,E[0].to,E[0].to)),E[0].level!=mo(E).level&&E.push(new o(E[0].level,l,l)),E}}();return S.version="5.17.0",S}))},{}],16:[function(e,t,n){
|
|
3
|
+
/*!
|
|
4
|
+
* jQuery JavaScript Library v2.2.4
|
|
5
|
+
* http://jquery.com/
|
|
6
|
+
*
|
|
7
|
+
* Includes Sizzle.js
|
|
8
|
+
* http://sizzlejs.com/
|
|
9
|
+
*
|
|
10
|
+
* Copyright jQuery Foundation and other contributors
|
|
11
|
+
* Released under the MIT license
|
|
12
|
+
* http://jquery.org/license
|
|
13
|
+
*
|
|
14
|
+
* Date: 2016-05-20T17:23Z
|
|
15
|
+
*/
|
|
16
|
+
!function(e,n){"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(e)}("undefined"!=typeof window?window:this,(function(e,t){var n=[],r=e.document,i=n.slice,o=n.concat,s=n.push,a=n.indexOf,l={},u=l.toString,c=l.hasOwnProperty,p={},d=function(e,t){return new d.fn.init(e,t)},f=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,h=/^-ms-/,g=/-([\da-z])/gi,m=function(e,t){return t.toUpperCase()};function v(e){var t=!!e&&"length"in e&&e.length,n=d.type(e);return"function"!==n&&!d.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}d.fn=d.prototype={jquery:"2.2.4",constructor:d,selector:"",length:0,toArray:function(){return i.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:i.call(this)},pushStack:function(e){var t=d.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return d.each(this,e)},map:function(e){return this.pushStack(d.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},d.extend=d.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,l=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||d.isFunction(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],s!==(r=e[t])&&(u&&r&&(d.isPlainObject(r)||(i=d.isArray(r)))?(i?(i=!1,o=n&&d.isArray(n)?n:[]):o=n&&d.isPlainObject(n)?n:{},s[t]=d.extend(u,o,r)):void 0!==r&&(s[t]=r));return s},d.extend({expando:"jQuery"+("2.2.4"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===d.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=e&&e.toString();return!d.isArray(e)&&t-parseFloat(t)+1>=0},isPlainObject:function(e){var t;if("object"!==d.type(e)||e.nodeType||d.isWindow(e))return!1;if(e.constructor&&!c.call(e,"constructor")&&!c.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||c.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[u.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;(e=d.trim(e))&&(1===e.indexOf("use strict")?((t=r.createElement("script")).text=e,r.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(h,"ms-").replace(g,m)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(v(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(f,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(v(Object(e))?d.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:a.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,s=!n;i<o;i++)!t(e[i],i)!==s&&r.push(e[i]);return r},map:function(e,t,n){var r,i,s=0,a=[];if(v(e))for(r=e.length;s<r;s++)null!=(i=t(e[s],s,n))&&a.push(i);else for(s in e)null!=(i=t(e[s],s,n))&&a.push(i);return o.apply([],a)},guid:1,proxy:function(e,t){var n,r,o;if("string"==typeof t&&(n=e[t],t=e,e=n),d.isFunction(e))return r=i.call(arguments,2),(o=function(){return e.apply(t||this,r.concat(i.call(arguments)))}).guid=e.guid=e.guid||d.guid++,o},now:Date.now,support:p}),"function"==typeof Symbol&&(d.fn[Symbol.iterator]=n[Symbol.iterator]),d.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){l["[object "+t+"]"]=t.toLowerCase()}));var y=
|
|
17
|
+
/*!
|
|
18
|
+
* Sizzle CSS Selector Engine v2.2.1
|
|
19
|
+
* http://sizzlejs.com/
|
|
20
|
+
*
|
|
21
|
+
* Copyright jQuery Foundation and other contributors
|
|
22
|
+
* Released under the MIT license
|
|
23
|
+
* http://jquery.org/license
|
|
24
|
+
*
|
|
25
|
+
* Date: 2015-10-17
|
|
26
|
+
*/
|
|
27
|
+
function(e){var t,n,r,i,o,s,a,l,u,c,p,d,f,h,g,m,v,y,x,E="sizzle"+1*new Date,b=e.document,C=0,T=0,S=ie(),w=ie(),N=ie(),L=function(e,t){return e===t&&(p=!0),0},I={}.hasOwnProperty,A=[],R=A.pop,_=A.push,O=A.push,D=A.slice,k=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",j="\\["+M+"*("+F+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+M+"*\\]",U=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+j+")*)|.*)\\)|)",G=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),H=new RegExp("^"+M+"*,"+M+"*"),q=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),V=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),W=new RegExp(U),z=new RegExp("^"+F+"$"),$={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+U),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=/'|\\/g,ee=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),te=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},ne=function(){d()};try{O.apply(A=D.call(b.childNodes),b.childNodes),A[b.childNodes.length].nodeType}catch(e){O={apply:A.length?function(e,t){_.apply(e,D.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function re(e,t,r,i){var o,a,u,c,p,h,v,y,C=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:b)!==f&&d(t),t=t||f,g)){if(11!==T&&(h=K.exec(e)))if(o=h[1]){if(9===T){if(!(u=t.getElementById(o)))return r;if(u.id===o)return r.push(u),r}else if(C&&(u=C.getElementById(o))&&x(t,u)&&u.id===o)return r.push(u),r}else{if(h[2])return O.apply(r,t.getElementsByTagName(e)),r;if((o=h[3])&&n.getElementsByClassName&&t.getElementsByClassName)return O.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!N[e+" "]&&(!m||!m.test(e))){if(1!==T)C=t,y=e;else if("object"!==t.nodeName.toLowerCase()){for((c=t.getAttribute("id"))?c=c.replace(Z,"\\$&"):t.setAttribute("id",c=E),a=(v=s(e)).length,p=z.test(c)?"#"+c:"[id='"+c+"']";a--;)v[a]=p+" "+he(v[a]);y=v.join(","),C=J.test(e)&&de(t.parentNode)||t}if(y)try{return O.apply(r,C.querySelectorAll(y)),r}catch(e){}finally{c===E&&t.removeAttribute("id")}}}return l(e.replace(B,"$1"),t,r,i)}function ie(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function oe(e){return e[E]=!0,e}function se(e){var t=f.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ae(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function le(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function ue(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function ce(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pe(e){return oe((function(t){return t=+t,oe((function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))}))}))}function de(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=re.support={},o=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},d=re.setDocument=function(e){var t,i,s=e?e.ownerDocument||e:b;return s!==f&&9===s.nodeType&&s.documentElement?(h=(f=s).documentElement,g=!o(f),(i=f.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ne,!1):i.attachEvent&&i.attachEvent("onunload",ne)),n.attributes=se((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=se((function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Y.test(f.getElementsByClassName),n.getById=se((function(e){return h.appendChild(e).id=E,!f.getElementsByName||!f.getElementsByName(E).length})),n.getById?(r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}},r.filter.ID=function(e){var t=e.replace(ee,te);return function(e){return e.getAttribute("id")===t}}):(delete r.find.ID,r.filter.ID=function(e){var t=e.replace(ee,te);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=Y.test(f.querySelectorAll))&&(se((function(e){h.appendChild(e).innerHTML="<a id='"+E+"'></a><select id='"+E+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+E+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+E+"+*").length||m.push(".#.+[+~]")})),se((function(e){var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+M+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=Y.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&se((function(e){n.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),v.push("!=",U)})),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=Y.test(h.compareDocumentPosition),x=t||Y.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},L=t?function(e,t){if(e===t)return p=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===f||e.ownerDocument===b&&x(b,e)?-1:t===f||t.ownerDocument===b&&x(b,t)?1:c?k(c,e)-k(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return p=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!i||!o)return e===f?-1:t===f?1:i?-1:o?1:c?k(c,e)-k(c,t):0;if(i===o)return le(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[r]===a[r];)r++;return r?le(s[r],a[r]):s[r]===b?-1:a[r]===b?1:0},f):f},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&d(e),t=t.replace(V,"='$1']"),n.matchesSelector&&g&&!N[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return re(t,f,null,[e]).length>0},re.contains=function(e,t){return(e.ownerDocument||e)!==f&&d(e),x(e,t)},re.attr=function(e,t){(e.ownerDocument||e)!==f&&d(e);var i=r.attrHandle[t.toLowerCase()],o=i&&I.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},re.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},re.uniqueSort=function(e){var t,r=[],i=0,o=0;if(p=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(L),p){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=re.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=re.selectors={cacheLength:50,createPseudo:oe,match:$,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ee,te),e[3]=(e[3]||e[4]||e[5]||"").replace(ee,te),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||re.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&re.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return $.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&W.test(n)&&(t=s(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ee,te).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&S(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=re.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(G," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,d,f,h,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!l&&!a,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?m.firstChild:m.lastChild],s&&y){for(x=(f=(u=(c=(p=(d=m)[E]||(d[E]={}))[d.uniqueID]||(p[d.uniqueID]={}))[e]||[])[0]===C&&u[1])&&u[2],d=f&&m.childNodes[f];d=++f&&d&&d[g]||(x=f=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[C,f,x];break}}else if(y&&(x=f=(u=(c=(p=(d=t)[E]||(d[E]={}))[d.uniqueID]||(p[d.uniqueID]={}))[e]||[])[0]===C&&u[1]),!1===x)for(;(d=++f&&d&&d[g]||(x=f=0)||h.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++x||(y&&((c=(p=d[E]||(d[E]={}))[d.uniqueID]||(p[d.uniqueID]={}))[e]=[C,x]),d!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||re.error("unsupported pseudo: "+e);return i[E]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?oe((function(e,n){for(var r,o=i(e,t),s=o.length;s--;)e[r=k(e,o[s])]=!(n[r]=o[s])})):function(e){return i(e,0,n)}):i}},pseudos:{not:oe((function(e){var t=[],n=[],r=a(e.replace(B,"$1"));return r[E]?oe((function(e,t,n,i){for(var o,s=r(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:oe((function(e){return function(t){return re(e,t).length>0}})),contains:oe((function(e){return e=e.replace(ee,te),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}})),lang:oe((function(e){return z.test(e||"")||re.error("unsupported lang: "+e),e=e.replace(ee,te).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:pe((function(){return[0]})),last:pe((function(e,t){return[t-1]})),eq:pe((function(e,t,n){return[n<0?n+t:n]})),even:pe((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:pe((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:pe((function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e})),gt:pe((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=ue(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=ce(t);function fe(){}function he(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function ge(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=T++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,s){var a,l,u,c=[C,o];if(s){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,s))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if((a=(l=(u=t[E]||(t[E]={}))[t.uniqueID]||(u[t.uniqueID]={}))[r])&&a[0]===C&&a[1]===o)return c[2]=a[2];if(l[r]=c,c[2]=e(t,n,s))return!0}}}function me(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function ve(e,t,n,r,i){for(var o,s=[],a=0,l=e.length,u=null!=t;a<l;a++)(o=e[a])&&(n&&!n(o,r,i)||(s.push(o),u&&t.push(a)));return s}function ye(e,t,n,r,i,o){return r&&!r[E]&&(r=ye(r)),i&&!i[E]&&(i=ye(i,o)),oe((function(o,s,a,l){var u,c,p,d=[],f=[],h=s.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)re(e,t[r],n);return n}(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:ve(g,d,e,a,l),v=n?i||(o?e:h||r)?[]:s:m;if(n&&n(m,v,a,l),r)for(u=ve(v,f),r(u,[],a,l),c=u.length;c--;)(p=u[c])&&(v[f[c]]=!(m[f[c]]=p));if(o){if(i||e){if(i){for(u=[],c=v.length;c--;)(p=v[c])&&u.push(m[c]=p);i(null,v=[],u,l)}for(c=v.length;c--;)(p=v[c])&&(u=i?k(o,p):d[c])>-1&&(o[u]=!(s[u]=p))}}else v=ve(v===s?v.splice(h,v.length):v),i?i(null,s,v,l):O.apply(s,v)}))}function xe(e){for(var t,n,i,o=e.length,s=r.relative[e[0].type],a=s||r.relative[" "],l=s?1:0,c=ge((function(e){return e===t}),a,!0),p=ge((function(e){return k(t,e)>-1}),a,!0),d=[function(e,n,r){var i=!s&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r));return t=null,i}];l<o;l++)if(n=r.relative[e[l].type])d=[ge(me(d),n)];else{if((n=r.filter[e[l].type].apply(null,e[l].matches))[E]){for(i=++l;i<o&&!r.relative[e[i].type];i++);return ye(l>1&&me(d),l>1&&he(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(B,"$1"),n,l<i&&xe(e.slice(l,i)),i<o&&xe(e=e.slice(i)),i<o&&he(e))}d.push(n)}return me(d)}return fe.prototype=r.filters=r.pseudos,r.setFilters=new fe,s=re.tokenize=function(e,t){var n,i,o,s,a,l,u,c=w[e+" "];if(c)return t?0:c.slice(0);for(a=e,l=[],u=r.preFilter;a;){for(s in n&&!(i=H.exec(a))||(i&&(a=a.slice(i[0].length)||a),l.push(o=[])),n=!1,(i=q.exec(a))&&(n=i.shift(),o.push({value:n,type:i[0].replace(B," ")}),a=a.slice(n.length)),r.filter)!(i=$[s].exec(a))||u[s]&&!(i=u[s](i))||(n=i.shift(),o.push({value:n,type:s,matches:i}),a=a.slice(n.length));if(!n)break}return t?a.length:a?re.error(e):w(e,l).slice(0)},a=re.compile=function(e,t){var n,i=[],o=[],a=N[e+" "];if(!a){for(t||(t=s(e)),n=t.length;n--;)(a=xe(t[n]))[E]?i.push(a):o.push(a);(a=N(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,s,a,l,c){var p,h,m,v=0,y="0",x=o&&[],E=[],b=u,T=o||i&&r.find.TAG("*",c),S=C+=null==b?1:Math.random()||.1,w=T.length;for(c&&(u=s===f||s||c);y!==w&&null!=(p=T[y]);y++){if(i&&p){for(h=0,s||p.ownerDocument===f||(d(p),a=!g);m=e[h++];)if(m(p,s||f,a)){l.push(p);break}c&&(C=S)}n&&((p=!m&&p)&&v--,o&&x.push(p))}if(v+=y,n&&y!==v){for(h=0;m=t[h++];)m(x,E,s,a);if(o){if(v>0)for(;y--;)x[y]||E[y]||(E[y]=R.call(l));E=ve(E)}O.apply(l,E),c&&!o&&E.length>0&&v+t.length>1&&re.uniqueSort(l)}return c&&(C=S,u=b),x};return n?oe(o):o}(o,i))).selector=e}return a},l=re.select=function(e,t,i,o){var l,u,c,p,d,f="function"==typeof e&&e,h=!o&&s(e=f.selector||e);if(i=i||[],1===h.length){if((u=h[0]=h[0].slice(0)).length>2&&"ID"===(c=u[0]).type&&n.getById&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(ee,te),t)||[])[0]))return i;f&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(l=$.needsContext.test(e)?0:u.length;l--&&(c=u[l],!r.relative[p=c.type]);)if((d=r.find[p])&&(o=d(c.matches[0].replace(ee,te),J.test(u[0].type)&&de(t.parentNode)||t))){if(u.splice(l,1),!(e=o.length&&he(u)))return O.apply(i,o),i;break}}return(f||a(e,h))(o,t,!g,i,!t||J.test(e)&&de(t.parentNode)||t),i},n.sortStable=E.split("").sort(L).join("")===E,n.detectDuplicates=!!p,d(),n.sortDetached=se((function(e){return 1&e.compareDocumentPosition(f.createElement("div"))})),se((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||ae("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&se((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||ae("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),se((function(e){return null==e.getAttribute("disabled")}))||ae(P,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),re}(e);d.find=y,d.expr=y.selectors,d.expr[":"]=d.expr.pseudos,d.uniqueSort=d.unique=y.uniqueSort,d.text=y.getText,d.isXMLDoc=y.isXML,d.contains=y.contains;var x=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&d(e).is(n))break;r.push(e)}return r},E=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},b=d.expr.match.needsContext,C=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,T=/^.[^:#\[\.,]*$/;function S(e,t,n){if(d.isFunction(t))return d.grep(e,(function(e,r){return!!t.call(e,r,e)!==n}));if(t.nodeType)return d.grep(e,(function(e){return e===t!==n}));if("string"==typeof t){if(T.test(t))return d.filter(t,e,n);t=d.filter(t,e)}return d.grep(e,(function(e){return a.call(t,e)>-1!==n}))}d.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?d.find.matchesSelector(r,e)?[r]:[]:d.find.matches(e,d.grep(t,(function(e){return 1===e.nodeType})))},d.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(d(e).filter((function(){for(t=0;t<n;t++)if(d.contains(i[t],this))return!0})));for(t=0;t<n;t++)d.find(e,i[t],r);return(r=this.pushStack(n>1?d.unique(r):r)).selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(S(this,e||[],!1))},not:function(e){return this.pushStack(S(this,e||[],!0))},is:function(e){return!!S(this,"string"==typeof e&&b.test(e)?d(e):e||[],!1).length}});var w,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(d.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||w,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:N.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof d?t[0]:t,d.merge(this,d.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),C.test(i[1])&&d.isPlainObject(t))for(i in t)d.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&o.parentNode&&(this.length=1,this[0]=o),this.context=r,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):d.isFunction(e)?void 0!==n.ready?n.ready(e):e(d):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),d.makeArray(e,this))}).prototype=d.fn,w=d(r);var L=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}d.fn.extend({has:function(e){var t=d(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(d.contains(this,t[e]))return!0}))},closest:function(e,t){for(var n,r=0,i=this.length,o=[],s=b.test(e)||"string"!=typeof e?d(e,t||this.context):0;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&d.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?d.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?a.call(d(e),this[0]):a.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(d.uniqueSort(d.merge(this.get(),d(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),d.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x(e,"parentNode")},parentsUntil:function(e,t,n){return x(e,"parentNode",n)},next:function(e){return A(e,"nextSibling")},prev:function(e){return A(e,"previousSibling")},nextAll:function(e){return x(e,"nextSibling")},prevAll:function(e){return x(e,"previousSibling")},nextUntil:function(e,t,n){return x(e,"nextSibling",n)},prevUntil:function(e,t,n){return x(e,"previousSibling",n)},siblings:function(e){return E((e.parentNode||{}).firstChild,e)},children:function(e){return E(e.firstChild)},contents:function(e){return e.contentDocument||d.merge([],e.childNodes)}},(function(e,t){d.fn[e]=function(n,r){var i=d.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=d.filter(r,i)),this.length>1&&(I[e]||d.uniqueSort(i),L.test(e)&&i.reverse()),this.pushStack(i)}}));var R,_=/\S+/g;function O(){r.removeEventListener("DOMContentLoaded",O),e.removeEventListener("load",O),d.ready()}d.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return d.each(e.match(_)||[],(function(e,n){t[n]=!0})),t}(e):d.extend({},e);var t,n,r,i,o=[],s=[],a=-1,l=function(){for(i=e.once,r=t=!0;s.length;a=-1)for(n=s.shift();++a<o.length;)!1===o[a].apply(n[0],n[1])&&e.stopOnFalse&&(a=o.length,n=!1);e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},u={add:function(){return o&&(n&&!t&&(a=o.length-1,s.push(n)),function t(n){d.each(n,(function(n,r){d.isFunction(r)?e.unique&&u.has(r)||o.push(r):r&&r.length&&"string"!==d.type(r)&&t(r)}))}(arguments),n&&!t&&l()),this},remove:function(){return d.each(arguments,(function(e,t){for(var n;(n=d.inArray(t,o,n))>-1;)o.splice(n,1),n<=a&&a--})),this},has:function(e){return e?d.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},d.extend({Deferred:function(e){var t=[["resolve","done",d.Callbacks("once memory"),"resolved"],["reject","fail",d.Callbacks("once memory"),"rejected"],["notify","progress",d.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return d.Deferred((function(n){d.each(t,(function(t,o){var s=d.isFunction(e[t])&&e[t];i[o[1]]((function(){var e=s&&s.apply(this,arguments);e&&d.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,s?[e]:arguments)}))})),e=null})).promise()},promise:function(e){return null!=e?d.extend(e,r):r}},i={};return r.pipe=r.then,d.each(t,(function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add((function(){n=a}),t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith})),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,o=0,s=i.call(arguments),a=s.length,l=1!==a||e&&d.isFunction(e.promise)?a:0,u=1===l?e:d.Deferred(),c=function(e,n,r){return function(o){n[e]=this,r[e]=arguments.length>1?i.call(arguments):o,r===t?u.notifyWith(n,r):--l||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);o<a;o++)s[o]&&d.isFunction(s[o].promise)?s[o].promise().progress(c(o,n,t)).done(c(o,r,s)).fail(u.reject):--l;return l||u.resolveWith(r,s),u.promise()}}),d.fn.ready=function(e){return d.ready.promise().done(e),this},d.extend({isReady:!1,readyWait:1,holdReady:function(e){e?d.readyWait++:d.ready(!0)},ready:function(e){(!0===e?--d.readyWait:d.isReady)||(d.isReady=!0,!0!==e&&--d.readyWait>0||(R.resolveWith(r,[d]),d.fn.triggerHandler&&(d(r).triggerHandler("ready"),d(r).off("ready"))))}}),d.ready.promise=function(t){return R||(R=d.Deferred(),"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(d.ready):(r.addEventListener("DOMContentLoaded",O),e.addEventListener("load",O))),R.promise(t)},d.ready.promise();var D=function(e,t,n,r,i,o,s){var a=0,l=e.length,u=null==n;if("object"===d.type(n))for(a in i=!0,n)D(e,t,a,n[a],!0,o,s);else if(void 0!==r&&(i=!0,d.isFunction(r)||(s=!0),u&&(s?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(d(e),n)})),t))for(;a<l;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:u?t.call(e):l?t(e[0],n):o},k=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function P(){this.expando=d.expando+P.uid++}P.uid=1,P.prototype={register:function(e,t){var n=t||{};return e.nodeType?e[this.expando]=n:Object.defineProperty(e,this.expando,{value:n,writable:!0,configurable:!0}),e[this.expando]},cache:function(e){if(!k(e))return{};var t=e[this.expando];return t||(t={},k(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[t]=n;else for(r in t)i[r]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?void 0!==(r=this.get(e,t))?r:this.get(e,d.camelCase(t)):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,i,o=e[this.expando];if(void 0!==o){if(void 0===t)this.register(e);else{d.isArray(t)?r=t.concat(t.map(d.camelCase)):(i=d.camelCase(t),r=t in o?[t,i]:(r=i)in o?[r]:r.match(_)||[]),n=r.length;for(;n--;)delete o[r[n]]}(void 0===t||d.isEmptyObject(o))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!d.isEmptyObject(t)}};var M=new P,F=new P,j=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,U=/[A-Z]/g;function G(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(U,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:j.test(n)?d.parseJSON(n):n)}catch(e){}F.set(e,t,n)}else n=void 0;return n}d.extend({hasData:function(e){return F.hasData(e)||M.hasData(e)},data:function(e,t,n){return F.access(e,t,n)},removeData:function(e,t){F.remove(e,t)},_data:function(e,t,n){return M.access(e,t,n)},_removeData:function(e,t){M.remove(e,t)}}),d.fn.extend({data:function(e,t){var n,r,i,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(i=F.get(o),1===o.nodeType&&!M.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(r=s[n].name).indexOf("data-")&&(r=d.camelCase(r.slice(5)),G(o,r,i[r]));M.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){F.set(this,e)})):D(this,(function(t){var n,r;if(o&&void 0===t)return void 0!==(n=F.get(o,e)||F.get(o,e.replace(U,"-$&").toLowerCase()))?n:(r=d.camelCase(e),void 0!==(n=F.get(o,r))||void 0!==(n=G(o,r,void 0))?n:void 0);r=d.camelCase(e),this.each((function(){var n=F.get(this,r);F.set(this,r,t),e.indexOf("-")>-1&&void 0!==n&&F.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){F.remove(this,e)}))}}),d.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=M.get(e,t),n&&(!r||d.isArray(n)?r=M.access(e,t,d.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=d.queue(e,t),r=n.length,i=n.shift(),o=d._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){d.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return M.get(e,n)||M.access(e,n,{empty:d.Callbacks("once memory").add((function(){M.remove(e,[t+"queue",n])}))})}}),d.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?d.queue(this[0],e):void 0===t?this:this.each((function(){var n=d.queue(this,e,t);d._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&d.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){d.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=d.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=M.get(o[s],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var B=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,H=new RegExp("^(?:([+-])=|)("+B+")([a-z%]*)$","i"),q=["Top","Right","Bottom","Left"],V=function(e,t){return e=t||e,"none"===d.css(e,"display")||!d.contains(e.ownerDocument,e)};function W(e,t,n,r){var i,o=1,s=20,a=r?function(){return r.cur()}:function(){return d.css(e,t,"")},l=a(),u=n&&n[3]||(d.cssNumber[t]?"":"px"),c=(d.cssNumber[t]||"px"!==u&&+l)&&H.exec(d.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do{c/=o=o||".5",d.style(e,t,c+u)}while(o!==(o=a()/l)&&1!==o&&--s)}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}var z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,Q=/^$|\/(?:java|ecma)script/i,X={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Y(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&d.nodeName(e,t)?d.merge([e],n):n}function K(e,t){for(var n=0,r=e.length;n<r;n++)M.set(e[n],"globalEval",!t||M.get(t[n],"globalEval"))}X.optgroup=X.option,X.tbody=X.tfoot=X.colgroup=X.caption=X.thead,X.th=X.td;var J,Z,ee=/<|&#?\w+;/;function te(e,t,n,r,i){for(var o,s,a,l,u,c,p=t.createDocumentFragment(),f=[],h=0,g=e.length;h<g;h++)if((o=e[h])||0===o)if("object"===d.type(o))d.merge(f,o.nodeType?[o]:o);else if(ee.test(o)){for(s=s||p.appendChild(t.createElement("div")),a=($.exec(o)||["",""])[1].toLowerCase(),l=X[a]||X._default,s.innerHTML=l[1]+d.htmlPrefilter(o)+l[2],c=l[0];c--;)s=s.lastChild;d.merge(f,s.childNodes),(s=p.firstChild).textContent=""}else f.push(t.createTextNode(o));for(p.textContent="",h=0;o=f[h++];)if(r&&d.inArray(o,r)>-1)i&&i.push(o);else if(u=d.contains(o.ownerDocument,o),s=Y(p.appendChild(o),"script"),u&&K(s),n)for(c=0;o=s[c++];)Q.test(o.type||"")&&n.push(o);return p}J=r.createDocumentFragment().appendChild(r.createElement("div")),(Z=r.createElement("input")).setAttribute("type","radio"),Z.setAttribute("checked","checked"),Z.setAttribute("name","t"),J.appendChild(Z),p.checkClone=J.cloneNode(!0).cloneNode(!0).lastChild.checked,J.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!J.cloneNode(!0).lastChild.defaultValue;var ne=/^key/,re=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ie=/^([^.]*)(?:\.(.+)|)/;function oe(){return!0}function se(){return!1}function ae(){try{return r.activeElement}catch(e){}}function le(e,t,n,r,i,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)le(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=se;else if(!i)return e;return 1===o&&(s=i,(i=function(e){return d().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=d.guid++)),e.each((function(){d.event.add(this,t,i,r,n)}))}d.event={global:{},add:function(e,t,n,r,i){var o,s,a,l,u,c,p,f,h,g,m,v=M.get(e);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),n.guid||(n.guid=d.guid++),(l=v.events)||(l=v.events={}),(s=v.handle)||(s=v.handle=function(t){return void 0!==d&&d.event.triggered!==t.type?d.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(_)||[""]).length;u--;)h=m=(a=ie.exec(t[u])||[])[1],g=(a[2]||"").split(".").sort(),h&&(p=d.event.special[h]||{},h=(i?p.delegateType:p.bindType)||h,p=d.event.special[h]||{},c=d.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&d.expr.match.needsContext.test(i),namespace:g.join(".")},o),(f=l[h])||((f=l[h]=[]).delegateCount=0,p.setup&&!1!==p.setup.call(e,r,g,s)||e.addEventListener&&e.addEventListener(h,s)),p.add&&(p.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,c):f.push(c),d.event.global[h]=!0)},remove:function(e,t,n,r,i){var o,s,a,l,u,c,p,f,h,g,m,v=M.hasData(e)&&M.get(e);if(v&&(l=v.events)){for(u=(t=(t||"").match(_)||[""]).length;u--;)if(h=m=(a=ie.exec(t[u])||[])[1],g=(a[2]||"").split(".").sort(),h){for(p=d.event.special[h]||{},f=l[h=(r?p.delegateType:p.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;o--;)c=f[o],!i&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,p.remove&&p.remove.call(e,c));s&&!f.length&&(p.teardown&&!1!==p.teardown.call(e,g,v.handle)||d.removeEvent(e,h,v.handle),delete l[h])}else for(h in l)d.event.remove(e,h+t[u],n,r,!0);d.isEmptyObject(l)&&M.remove(e,"handle events")}},dispatch:function(e){e=d.event.fix(e);var t,n,r,o,s,a=[],l=i.call(arguments),u=(M.get(this,"events")||{})[e.type]||[],c=d.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(a=d.event.handlers.call(this,e,u),t=0;(o=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,n=0;(s=o.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(s.namespace)||(e.handleObj=s,e.data=s.data,void 0!==(r=((d.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,l))&&!1===(e.result=r)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,l=e.target;if(a&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(r=[],n=0;n<a;n++)void 0===r[i=(o=t[n]).selector+" "]&&(r[i]=o.needsContext?d(i,this).index(l)>-1:d.find(i,this,null,[l]).length),r[i]&&r.push(o);r.length&&s.push({elem:l,handlers:r})}return a<t.length&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,o,s=t.button;return null==e.pageX&&null!=t.clientX&&(i=(n=e.target.ownerDocument||r).documentElement,o=n.body,e.pageX=t.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),e.which||void 0===s||(e.which=1&s?1:2&s?3:4&s?2:0),e}},fix:function(e){if(e[d.expando])return e;var t,n,i,o=e.type,s=e,a=this.fixHooks[o];for(a||(this.fixHooks[o]=a=re.test(o)?this.mouseHooks:ne.test(o)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new d.Event(s),t=i.length;t--;)e[n=i[t]]=s[n];return e.target||(e.target=r),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,s):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ae()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===ae()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&d.nodeName(this,"input"))return this.click(),!1},_default:function(e){return d.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},d.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},d.Event=function(e,t){if(!(this instanceof d.Event))return new d.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?oe:se):this.type=e,t&&d.extend(this,t),this.timeStamp=e&&e.timeStamp||d.now(),this[d.expando]=!0},d.Event.prototype={constructor:d.Event,isDefaultPrevented:se,isPropagationStopped:se,isImmediatePropagationStopped:se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=oe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=oe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=oe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},d.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){d.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||d.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),d.fn.extend({on:function(e,t,n,r){return le(this,e,t,n,r)},one:function(e,t,n,r){return le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,d(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=se),this.each((function(){d.event.remove(this,e,n,t)}))}});var ue=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ce=/<script|<style|<link/i,pe=/checked\s*(?:[^=]|=\s*.checked.)/i,de=/^true\/(.*)/,fe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function he(e,t){return d.nodeName(e,"table")&&d.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ge(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function me(e){var t=de.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function ve(e,t){var n,r,i,o,s,a,l,u;if(1===t.nodeType){if(M.hasData(e)&&(o=M.access(e),s=M.set(t,o),u=o.events))for(i in delete s.handle,s.events={},u)for(n=0,r=u[i].length;n<r;n++)d.event.add(t,i,u[i][n]);F.hasData(e)&&(a=F.access(e),l=d.extend({},a),F.set(t,l))}}function ye(e,t,n,r){t=o.apply([],t);var i,s,a,l,u,c,f=0,h=e.length,g=h-1,m=t[0],v=d.isFunction(m);if(v||h>1&&"string"==typeof m&&!p.checkClone&&pe.test(m))return e.each((function(i){var o=e.eq(i);v&&(t[0]=m.call(this,i,o.html())),ye(o,t,n,r)}));if(h&&(s=(i=te(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=s),s||r)){for(l=(a=d.map(Y(i,"script"),ge)).length;f<h;f++)u=i,f!==g&&(u=d.clone(u,!0,!0),l&&d.merge(a,Y(u,"script"))),n.call(e[f],u,f);if(l)for(c=a[a.length-1].ownerDocument,d.map(a,me),f=0;f<l;f++)u=a[f],Q.test(u.type||"")&&!M.access(u,"globalEval")&&d.contains(c,u)&&(u.src?d._evalUrl&&d._evalUrl(u.src):d.globalEval(u.textContent.replace(fe,"")))}return e}function xe(e,t,n){for(var r,i=t?d.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||d.cleanData(Y(r)),r.parentNode&&(n&&d.contains(r.ownerDocument,r)&&K(Y(r,"script")),r.parentNode.removeChild(r));return e}d.extend({htmlPrefilter:function(e){return e.replace(ue,"<$1></$2>")},clone:function(e,t,n){var r,i,o,s,a,l,u,c=e.cloneNode(!0),f=d.contains(e.ownerDocument,e);if(!(p.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||d.isXMLDoc(e)))for(s=Y(c),r=0,i=(o=Y(e)).length;r<i;r++)a=o[r],l=s[r],u=void 0,"input"===(u=l.nodeName.toLowerCase())&&z.test(a.type)?l.checked=a.checked:"input"!==u&&"textarea"!==u||(l.defaultValue=a.defaultValue);if(t)if(n)for(o=o||Y(e),s=s||Y(c),r=0,i=o.length;r<i;r++)ve(o[r],s[r]);else ve(e,c);return(s=Y(c,"script")).length>0&&K(s,!f&&Y(e,"script")),c},cleanData:function(e){for(var t,n,r,i=d.event.special,o=0;void 0!==(n=e[o]);o++)if(k(n)){if(t=n[M.expando]){if(t.events)for(r in t.events)i[r]?d.event.remove(n,r):d.removeEvent(n,r,t.handle);n[M.expando]=void 0}n[F.expando]&&(n[F.expando]=void 0)}}}),d.fn.extend({domManip:ye,detach:function(e){return xe(this,e,!0)},remove:function(e){return xe(this,e)},text:function(e){return D(this,(function(e){return void 0===e?d.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return ye(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||he(this,e).appendChild(e)}))},prepend:function(){return ye(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=he(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return ye(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return ye(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(d.cleanData(Y(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return d.clone(this,e,t)}))},html:function(e){return D(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ce.test(e)&&!X[($.exec(e)||["",""])[1].toLowerCase()]){e=d.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(d.cleanData(Y(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return ye(this,arguments,(function(t){var n=this.parentNode;d.inArray(this,e)<0&&(d.cleanData(Y(this)),n&&n.replaceChild(t,this))}),e)}}),d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){d.fn[e]=function(e){for(var n,r=[],i=d(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),d(i[a])[t](n),s.apply(r,n.get());return this.pushStack(r)}}));var Ee,be={HTML:"block",BODY:"block"};function Ce(e,t){var n=d(t.createElement(e)).appendTo(t.body),r=d.css(n[0],"display");return n.detach(),r}function Te(e){var t=r,n=be[e];return n||("none"!==(n=Ce(e,t))&&n||((t=(Ee=(Ee||d("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentDocument).write(),t.close(),n=Ce(e,t),Ee.detach()),be[e]=n),n}var Se=/^margin/,we=new RegExp("^("+B+")(?!px)[a-z%]+$","i"),Ne=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Le=function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=s[o];return i},Ie=r.documentElement;function Ae(e,t,n){var r,i,o,s,a=e.style;return""!==(s=(n=n||Ne(e))?n.getPropertyValue(t)||n[t]:void 0)&&void 0!==s||d.contains(e.ownerDocument,e)||(s=d.style(e,t)),n&&!p.pixelMarginRight()&&we.test(s)&&Se.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o),void 0!==s?s+"":s}function Re(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){var t,n,i,o,s=r.createElement("div"),a=r.createElement("div");function l(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Ie.appendChild(s);var r=e.getComputedStyle(a);t="1%"!==r.top,o="2px"===r.marginLeft,n="4px"===r.width,a.style.marginRight="50%",i="4px"===r.marginRight,Ie.removeChild(s)}a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===a.style.backgroundClip,s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",s.appendChild(a),d.extend(p,{pixelPosition:function(){return l(),t},boxSizingReliable:function(){return null==n&&l(),n},pixelMarginRight:function(){return null==n&&l(),i},reliableMarginLeft:function(){return null==n&&l(),o},reliableMarginRight:function(){var t,n=a.appendChild(r.createElement("div"));return n.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",a.style.width="1px",Ie.appendChild(s),t=!parseFloat(e.getComputedStyle(n).marginRight),Ie.removeChild(s),a.removeChild(n),t}}))}();var _e=/^(none|table(?!-c[ea]).+)/,Oe={position:"absolute",visibility:"hidden",display:"block"},De={letterSpacing:"0",fontWeight:"400"},ke=["Webkit","O","Moz","ms"],Pe=r.createElement("div").style;function Me(e){if(e in Pe)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=ke.length;n--;)if((e=ke[n]+t)in Pe)return e}function Fe(e,t,n){var r=H.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function je(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;o<4;o+=2)"margin"===n&&(s+=d.css(e,n+q[o],!0,i)),r?("content"===n&&(s-=d.css(e,"padding"+q[o],!0,i)),"margin"!==n&&(s-=d.css(e,"border"+q[o]+"Width",!0,i))):(s+=d.css(e,"padding"+q[o],!0,i),"padding"!==n&&(s+=d.css(e,"border"+q[o]+"Width",!0,i)));return s}function Ue(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Ne(e),s="border-box"===d.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(((i=Ae(e,t,o))<0||null==i)&&(i=e.style[t]),we.test(i))return i;r=s&&(p.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+je(e,t,n||(s?"border":"content"),r,o)+"px"}function Ge(e,t){for(var n,r,i,o=[],s=0,a=e.length;s<a;s++)(r=e[s]).style&&(o[s]=M.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&V(r)&&(o[s]=M.access(r,"olddisplay",Te(r.nodeName)))):(i=V(r),"none"===n&&i||M.set(r,"olddisplay",i?n:d.css(r,"display"))));for(s=0;s<a;s++)(r=e[s]).style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}function Be(e,t,n,r,i){return new Be.prototype.init(e,t,n,r,i)}d.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ae(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=d.camelCase(t),l=e.style;if(t=d.cssProps[a]||(d.cssProps[a]=Me(a)||a),s=d.cssHooks[t]||d.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=H.exec(n))&&i[1]&&(n=W(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(d.cssNumber[a]?"":"px")),p.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(l[t]=n))}},css:function(e,t,n,r){var i,o,s,a=d.camelCase(t);return t=d.cssProps[a]||(d.cssProps[a]=Me(a)||a),(s=d.cssHooks[t]||d.cssHooks[a])&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=Ae(e,t,r)),"normal"===i&&t in De&&(i=De[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),d.each(["height","width"],(function(e,t){d.cssHooks[t]={get:function(e,n,r){if(n)return _e.test(d.css(e,"display"))&&0===e.offsetWidth?Le(e,Oe,(function(){return Ue(e,t,r)})):Ue(e,t,r)},set:function(e,n,r){var i,o=r&&Ne(e),s=r&&je(e,t,r,"border-box"===d.css(e,"boxSizing",!1,o),o);return s&&(i=H.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=d.css(e,t)),Fe(0,n,s)}}})),d.cssHooks.marginLeft=Re(p.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ae(e,"marginLeft"))||e.getBoundingClientRect().left-Le(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),d.cssHooks.marginRight=Re(p.reliableMarginRight,(function(e,t){if(t)return Le(e,{display:"inline-block"},Ae,[e,"marginRight"])})),d.each({margin:"",padding:"",border:"Width"},(function(e,t){d.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+q[r]+t]=o[r]||o[r-2]||o[0];return i}},Se.test(e)||(d.cssHooks[e+t].set=Fe)})),d.fn.extend({css:function(e,t){return D(this,(function(e,t,n){var r,i,o={},s=0;if(d.isArray(t)){for(r=Ne(e),i=t.length;s<i;s++)o[t[s]]=d.css(e,t[s],!1,r);return o}return void 0!==n?d.style(e,t,n):d.css(e,t)}),e,t,arguments.length>1)},show:function(){return Ge(this,!0)},hide:function(){return Ge(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){V(this)?d(this).show():d(this).hide()}))}}),d.Tween=Be,Be.prototype={constructor:Be,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||d.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(d.cssNumber[n]?"":"px")},cur:function(){var e=Be.propHooks[this.prop];return e&&e.get?e.get(this):Be.propHooks._default.get(this)},run:function(e){var t,n=Be.propHooks[this.prop];return this.options.duration?this.pos=t=d.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Be.propHooks._default.set(this),this}},Be.prototype.init.prototype=Be.prototype,Be.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=d.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){d.fx.step[e.prop]?d.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[d.cssProps[e.prop]]&&!d.cssHooks[e.prop]?e.elem[e.prop]=e.now:d.style(e.elem,e.prop,e.now+e.unit)}}},Be.propHooks.scrollTop=Be.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},d.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},d.fx=Be.prototype.init,d.fx.step={};var He,qe,Ve=/^(?:toggle|show|hide)$/,We=/queueHooks$/;function ze(){return e.setTimeout((function(){He=void 0})),He=d.now()}function $e(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=q[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function Qe(e,t,n){for(var r,i=(Xe.tweeners[t]||[]).concat(Xe.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,t,e))return r}function Xe(e,t,n){var r,i,o=0,s=Xe.prefilters.length,a=d.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var t=He||ze(),n=Math.max(0,u.startTime+u.duration-t),r=1-(n/u.duration||0),o=0,s=u.tweens.length;o<s;o++)u.tweens[o].run(r);return a.notifyWith(e,[u,r,n]),r<1&&s?n:(a.resolveWith(e,[u]),!1)},u=a.promise({elem:e,props:d.extend({},t),opts:d.extend(!0,{specialEasing:{},easing:d.easing._default},n),originalProperties:t,originalOptions:n,startTime:He||ze(),duration:n.duration,tweens:[],createTween:function(t,n){var r=d.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)u.tweens[n].run(1);return t?(a.notifyWith(e,[u,1,0]),a.resolveWith(e,[u,t])):a.rejectWith(e,[u,t]),this}}),c=u.props;for(function(e,t){var n,r,i,o,s;for(n in e)if(i=t[r=d.camelCase(n)],o=e[n],d.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(s=d.cssHooks[r])&&"expand"in s)for(n in o=s.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,u.opts.specialEasing);o<s;o++)if(r=Xe.prefilters[o].call(u,e,c,u.opts))return d.isFunction(r.stop)&&(d._queueHooks(u.elem,u.opts.queue).stop=d.proxy(r.stop,r)),r;return d.map(c,Qe,u),d.isFunction(u.opts.start)&&u.opts.start.call(e,u),d.fx.timer(d.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}d.Animation=d.extend(Xe,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return W(n.elem,e,H.exec(t),n),n}]},tweener:function(e,t){d.isFunction(e)?(t=e,e=["*"]):e=e.match(_);for(var n,r=0,i=e.length;r<i;r++)n=e[r],Xe.tweeners[n]=Xe.tweeners[n]||[],Xe.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,s,a,l,u,c=this,p={},f=e.style,h=e.nodeType&&V(e),g=M.get(e,"fxshow");for(r in n.queue||(null==(a=d._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,c.always((function(){c.always((function(){a.unqueued--,d.queue(e,"fx").length||a.empty.fire()}))}))),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],"inline"===("none"===(u=d.css(e,"display"))?M.get(e,"olddisplay")||Te(e.nodeName):u)&&"none"===d.css(e,"float")&&(f.display="inline-block")),n.overflow&&(f.overflow="hidden",c.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),t)if(i=t[r],Ve.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(h?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;h=!0}p[r]=g&&g[r]||d.style(e,r)}else u=void 0;if(d.isEmptyObject(p))"inline"===("none"===u?Te(e.nodeName):u)&&(f.display=u);else for(r in g?"hidden"in g&&(h=g.hidden):g=M.access(e,"fxshow",{}),o&&(g.hidden=!h),h?d(e).show():c.done((function(){d(e).hide()})),c.done((function(){var t;for(t in M.remove(e,"fxshow"),p)d.style(e,t,p[t])})),p)s=Qe(h?g[r]:0,r,c),r in g||(g[r]=s.start,h&&(s.end=s.start,s.start="width"===r||"height"===r?1:0))}],prefilter:function(e,t){t?Xe.prefilters.unshift(e):Xe.prefilters.push(e)}}),d.speed=function(e,t,n){var r=e&&"object"==typeof e?d.extend({},e):{complete:n||!n&&t||d.isFunction(e)&&e,duration:e,easing:n&&t||t&&!d.isFunction(t)&&t};return r.duration=d.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in d.fx.speeds?d.fx.speeds[r.duration]:d.fx.speeds._default,null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){d.isFunction(r.old)&&r.old.call(this),r.queue&&d.dequeue(this,r.queue)},r},d.fn.extend({fadeTo:function(e,t,n,r){return this.filter(V).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=d.isEmptyObject(e),o=d.speed(t,n,r),s=function(){var t=Xe(this,d.extend({},e),o);(i||M.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=d.timers,s=M.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&We.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||d.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=M.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=d.timers,s=r?r.length:0;for(n.finish=!0,d.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),d.each(["toggle","show","hide"],(function(e,t){var n=d.fn[t];d.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate($e(t,!0),e,r,i)}})),d.each({slideDown:$e("show"),slideUp:$e("hide"),slideToggle:$e("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){d.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),d.timers=[],d.fx.tick=function(){var e,t=0,n=d.timers;for(He=d.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||d.fx.stop(),He=void 0},d.fx.timer=function(e){d.timers.push(e),e()?d.fx.start():d.timers.pop()},d.fx.interval=13,d.fx.start=function(){qe||(qe=e.setInterval(d.fx.tick,d.fx.interval))},d.fx.stop=function(){e.clearInterval(qe),qe=null},d.fx.speeds={slow:600,fast:200,_default:400},d.fn.delay=function(t,n){return t=d.fx&&d.fx.speeds[t]||t,n=n||"fx",this.queue(n,(function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}}))},function(){var e=r.createElement("input"),t=r.createElement("select"),n=t.appendChild(r.createElement("option"));e.type="checkbox",p.checkOn=""!==e.value,p.optSelected=n.selected,t.disabled=!0,p.optDisabled=!n.disabled,(e=r.createElement("input")).value="t",e.type="radio",p.radioValue="t"===e.value}();var Ye,Ke=d.expr.attrHandle;d.fn.extend({attr:function(e,t){return D(this,d.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){d.removeAttr(this,e)}))}}),d.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?d.prop(e,t,n):(1===o&&d.isXMLDoc(e)||(t=t.toLowerCase(),i=d.attrHooks[t]||(d.expr.match.bool.test(t)?Ye:void 0)),void 0!==n?null===n?void d.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=d.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!p.radioValue&&"radio"===t&&d.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(_);if(o&&1===e.nodeType)for(;n=o[i++];)r=d.propFix[n]||n,d.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),Ye={set:function(e,t,n){return!1===t?d.removeAttr(e,n):e.setAttribute(n,n),n}},d.each(d.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=Ke[t]||d.find.attr;Ke[t]=function(e,t,r){var i,o;return r||(o=Ke[t],Ke[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,Ke[t]=o),i}}));var Je=/^(?:input|select|textarea|button)$/i,Ze=/^(?:a|area)$/i;d.fn.extend({prop:function(e,t){return D(this,d.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[d.propFix[e]||e]}))}}),d.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&d.isXMLDoc(e)||(t=d.propFix[t]||t,i=d.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=d.find.attr(e,"tabindex");return t?parseInt(t,10):Je.test(e.nodeName)||Ze.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),p.optSelected||(d.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),d.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){d.propFix[this.toLowerCase()]=this}));var et=/[\t\r\n\f]/g;function tt(e){return e.getAttribute&&e.getAttribute("class")||""}d.fn.extend({addClass:function(e){var t,n,r,i,o,s,a,l=0;if(d.isFunction(e))return this.each((function(t){d(this).addClass(e.call(this,t,tt(this)))}));if("string"==typeof e&&e)for(t=e.match(_)||[];n=this[l++];)if(i=tt(n),r=1===n.nodeType&&(" "+i+" ").replace(et," ")){for(s=0;o=t[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=d.trim(r))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,o,s,a,l=0;if(d.isFunction(e))return this.each((function(t){d(this).removeClass(e.call(this,t,tt(this)))}));if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(_)||[];n=this[l++];)if(i=tt(n),r=1===n.nodeType&&(" "+i+" ").replace(et," ")){for(s=0;o=t[s++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(a=d.trim(r))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):d.isFunction(e)?this.each((function(n){d(this).toggleClass(e.call(this,n,tt(this),t),t)})):this.each((function(){var t,r,i,o;if("string"===n)for(r=0,i=d(this),o=e.match(_)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=tt(this))&&M.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":M.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+tt(n)+" ").replace(et," ").indexOf(t)>-1)return!0;return!1}});var nt=/\r/g,rt=/[\x20\t\r\n\f]+/g;d.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=d.isFunction(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,d(this).val()):e)?i="":"number"==typeof i?i+="":d.isArray(i)&&(i=d.map(i,(function(e){return null==e?"":e+""}))),(t=d.valHooks[this.type]||d.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=d.valHooks[i.type]||d.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(nt,""):null==n?"":n:void 0}}),d.extend({valHooks:{option:{get:function(e){var t=d.find.attr(e,"value");return null!=t?t:d.trim(d.text(e)).replace(rt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,s=o?null:[],a=o?i+1:r.length,l=i<0?a:o?i:0;l<a;l++)if(((n=r[l]).selected||l===i)&&(p.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!d.nodeName(n.parentNode,"optgroup"))){if(t=d(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=d.makeArray(t),s=i.length;s--;)((r=i[s]).selected=d.inArray(d.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),d.each(["radio","checkbox"],(function(){d.valHooks[this]={set:function(e,t){if(d.isArray(t))return e.checked=d.inArray(d(e).val(),t)>-1}},p.checkOn||(d.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var it=/^(?:focusinfocus|focusoutblur)$/;d.extend(d.event,{trigger:function(t,n,i,o){var s,a,l,u,p,f,h,g=[i||r],m=c.call(t,"type")?t.type:t,v=c.call(t,"namespace")?t.namespace.split("."):[];if(a=l=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!it.test(m+d.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),p=m.indexOf(":")<0&&"on"+m,(t=t[d.expando]?t:new d.Event(m,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:d.makeArray(n,[t]),h=d.event.special[m]||{},o||!h.trigger||!1!==h.trigger.apply(i,n))){if(!o&&!h.noBubble&&!d.isWindow(i)){for(u=h.delegateType||m,it.test(u+m)||(a=a.parentNode);a;a=a.parentNode)g.push(a),l=a;l===(i.ownerDocument||r)&&g.push(l.defaultView||l.parentWindow||e)}for(s=0;(a=g[s++])&&!t.isPropagationStopped();)t.type=s>1?u:h.bindType||m,(f=(M.get(a,"events")||{})[t.type]&&M.get(a,"handle"))&&f.apply(a,n),(f=p&&a[p])&&f.apply&&k(a)&&(t.result=f.apply(a,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(g.pop(),n)||!k(i)||p&&d.isFunction(i[m])&&!d.isWindow(i)&&((l=i[p])&&(i[p]=null),d.event.triggered=m,i[m](),d.event.triggered=void 0,l&&(i[p]=l)),t.result}},simulate:function(e,t,n){var r=d.extend(new d.Event,n,{type:e,isSimulated:!0});d.event.trigger(r,null,t)}}),d.fn.extend({trigger:function(e,t){return this.each((function(){d.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return d.event.trigger(e,t,n,!0)}}),d.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),(function(e,t){d.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}})),d.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),p.focusin="onfocusin"in e,p.focusin||d.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){d.event.simulate(t,e.target,d.event.fix(e))};d.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=M.access(r,t);i||r.addEventListener(e,n,!0),M.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=M.access(r,t)-1;i?M.access(r,t,i):(r.removeEventListener(e,n,!0),M.remove(r,t))}}}));var ot=e.location,st=d.now(),at=/\?/;d.parseJSON=function(e){return JSON.parse(e+"")},d.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||d.error("Invalid XML: "+t),n};var lt=/#.*$/,ut=/([?&])_=[^&]*/,ct=/^(.*?):[ \t]*([^\r\n]*)$/gm,pt=/^(?:GET|HEAD)$/,dt=/^\/\//,ft={},ht={},gt="*/".concat("*"),mt=r.createElement("a");function vt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(_)||[];if(d.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function yt(e,t,n,r){var i={},o=e===ht;function s(a){var l;return i[a]=!0,d.each(e[a]||[],(function(e,a){var u=a(t,n,r);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),s(u),!1)})),l}return s(t.dataTypes[0])||!i["*"]&&s("*")}function xt(e,t){var n,r,i=d.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&d.extend(!0,e,r),e}mt.href=ot.href,d.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ot.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ot.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":gt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?xt(xt(e,d.ajaxSettings),t):xt(d.ajaxSettings,e)},ajaxPrefilter:vt(ft),ajaxTransport:vt(ht),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,s,a,l,u,c,p,f=d.ajaxSetup({},n),h=f.context||f,g=f.context&&(h.nodeType||h.jquery)?d(h):d.event,m=d.Deferred(),v=d.Callbacks("once memory"),y=f.statusCode||{},x={},E={},b=0,C="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!a)for(a={};t=ct.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=E[n]=E[n]||e,x[e]=t),this},overrideMimeType:function(e){return b||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||C;return i&&i.abort(t),S(0,t),this}};if(m.promise(T).complete=v.add,T.success=T.done,T.error=T.fail,f.url=((t||f.url||ot.href)+"").replace(lt,"").replace(dt,ot.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=d.trim(f.dataType||"*").toLowerCase().match(_)||[""],null==f.crossDomain){u=r.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=mt.protocol+"//"+mt.host!=u.protocol+"//"+u.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=d.param(f.data,f.traditional)),yt(ft,f,n,T),2===b)return T;for(p in(c=d.event&&f.global)&&0==d.active++&&d.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!pt.test(f.type),o=f.url,f.hasContent||(f.data&&(o=f.url+=(at.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=ut.test(o)?o.replace(ut,"$1_="+st++):o+(at.test(o)?"&":"?")+"_="+st++)),f.ifModified&&(d.lastModified[o]&&T.setRequestHeader("If-Modified-Since",d.lastModified[o]),d.etag[o]&&T.setRequestHeader("If-None-Match",d.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+gt+"; q=0.01":""):f.accepts["*"]),f.headers)T.setRequestHeader(p,f.headers[p]);if(f.beforeSend&&(!1===f.beforeSend.call(h,T,f)||2===b))return T.abort();for(p in C="abort",{success:1,error:1,complete:1})T[p](f[p]);if(i=yt(ht,f,n,T)){if(T.readyState=1,c&&g.trigger("ajaxSend",[T,f]),2===b)return T;f.async&&f.timeout>0&&(l=e.setTimeout((function(){T.abort("timeout")}),f.timeout));try{b=1,i.send(x,S)}catch(e){if(!(b<2))throw e;S(-1,e)}}else S(-1,"No Transport");function S(t,n,r,a){var u,p,x,E,C,S=n;2!==b&&(b=2,l&&e.clearTimeout(l),i=void 0,s=a||"",T.readyState=t>0?4:0,u=t>=200&&t<300||304===t,r&&(E=function(e,t,n){for(var r,i,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}(f,T,r)),E=function(e,t,n,r){var i,o,s,a,l,u={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)u[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=u[l+" "+o]||u["* "+o]))for(i in u)if((a=i.split(" "))[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[i]:!0!==u[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(f,E,T,u),u?(f.ifModified&&((C=T.getResponseHeader("Last-Modified"))&&(d.lastModified[o]=C),(C=T.getResponseHeader("etag"))&&(d.etag[o]=C)),204===t||"HEAD"===f.type?S="nocontent":304===t?S="notmodified":(S=E.state,p=E.data,u=!(x=E.error))):(x=S,!t&&S||(S="error",t<0&&(t=0))),T.status=t,T.statusText=(n||S)+"",u?m.resolveWith(h,[p,S,T]):m.rejectWith(h,[T,S,x]),T.statusCode(y),y=void 0,c&&g.trigger(u?"ajaxSuccess":"ajaxError",[T,f,u?p:x]),v.fireWith(h,[T,S]),c&&(g.trigger("ajaxComplete",[T,f]),--d.active||d.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return d.get(e,t,n,"json")},getScript:function(e,t){return d.get(e,void 0,t,"script")}}),d.each(["get","post"],(function(e,t){d[t]=function(e,n,r,i){return d.isFunction(n)&&(i=i||r,r=n,n=void 0),d.ajax(d.extend({url:e,type:t,dataType:i,data:n,success:r},d.isPlainObject(e)&&e))}})),d._evalUrl=function(e){return d.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},d.fn.extend({wrapAll:function(e){var t;return d.isFunction(e)?this.each((function(t){d(this).wrapAll(e.call(this,t))})):(this[0]&&(t=d(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this)},wrapInner:function(e){return d.isFunction(e)?this.each((function(t){d(this).wrapInner(e.call(this,t))})):this.each((function(){var t=d(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=d.isFunction(e);return this.each((function(n){d(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(){return this.parent().each((function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)})).end()}}),d.expr.filters.hidden=function(e){return!d.expr.filters.visible(e)},d.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var Et=/%20/g,bt=/\[\]$/,Ct=/\r?\n/g,Tt=/^(?:submit|button|image|reset|file)$/i,St=/^(?:input|select|textarea|keygen)/i;function wt(e,t,n,r){var i;if(d.isArray(t))d.each(t,(function(t,i){n||bt.test(e)?r(e,i):wt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==d.type(t))r(e,t);else for(i in t)wt(e+"["+i+"]",t[i],n,r)}d.param=function(e,t){var n,r=[],i=function(e,t){t=d.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=d.ajaxSettings&&d.ajaxSettings.traditional),d.isArray(e)||e.jquery&&!d.isPlainObject(e))d.each(e,(function(){i(this.name,this.value)}));else for(n in e)wt(n,e[n],t,i);return r.join("&").replace(Et,"+")},d.fn.extend({serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=d.prop(this,"elements");return e?d.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!d(this).is(":disabled")&&St.test(this.nodeName)&&!Tt.test(e)&&(this.checked||!z.test(e))})).map((function(e,t){var n=d(this).val();return null==n?null:d.isArray(n)?d.map(n,(function(e){return{name:t.name,value:e.replace(Ct,"\r\n")}})):{name:t.name,value:n.replace(Ct,"\r\n")}})).get()}}),d.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Nt={0:200,1223:204},Lt=d.ajaxSettings.xhr();p.cors=!!Lt&&"withCredentials"in Lt,p.ajax=Lt=!!Lt,d.ajaxTransport((function(t){var n,r;if(p.cors||Lt&&!t.crossDomain)return{send:function(i,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);n=function(e){return function(){n&&(n=r=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Nt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),r=a.onerror=n("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout((function(){n&&r()}))},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}})),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return d.globalEval(e),e}}}),d.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),d.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain)return{send:function(i,o){t=d("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),r.head.appendChild(t[0])},abort:function(){n&&n()}}}));var It=[],At=/(=)\?(?=&|$)|\?\?/;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=It.pop()||d.expando+"_"+st++;return this[e]=!0,e}}),d.ajaxPrefilter("json jsonp",(function(t,n,r){var i,o,s,a=!1!==t.jsonp&&(At.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&At.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=d.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(At,"$1"+i):!1!==t.jsonp&&(t.url+=(at.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||d.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){s=arguments},r.always((function(){void 0===o?d(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,It.push(i)),s&&d.isFunction(o)&&o(s[0]),s=o=void 0})),"script"})),d.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||r;var i=C.exec(e),o=!n&&[];return i?[t.createElement(i[1])]:(i=te([e],t,o),o&&o.length&&d(o).remove(),d.merge([],i.childNodes))};var Rt=d.fn.load;function _t(e){return d.isWindow(e)?e:9===e.nodeType&&e.defaultView}d.fn.load=function(e,t,n){if("string"!=typeof e&&Rt)return Rt.apply(this,arguments);var r,i,o,s=this,a=e.indexOf(" ");return a>-1&&(r=d.trim(e.slice(a)),e=e.slice(0,a)),d.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),s.length>0&&d.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,s.html(r?d("<div>").append(d.parseHTML(e)).find(r):e)})).always(n&&function(e,t){s.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},d.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){d.fn[t]=function(e){return this.on(t,e)}})),d.expr.filters.animated=function(e){return d.grep(d.timers,(function(t){return e===t.elem})).length},d.offset={setOffset:function(e,t,n){var r,i,o,s,a,l,u=d.css(e,"position"),c=d(e),p={};"static"===u&&(e.style.position="relative"),a=c.offset(),o=d.css(e,"top"),l=d.css(e,"left"),("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1?(s=(r=c.position()).top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(l)||0),d.isFunction(t)&&(t=t.call(e,n,d.extend({},a))),null!=t.top&&(p.top=t.top-a.top+s),null!=t.left&&(p.left=t.left-a.left+i),"using"in t?t.using.call(e,p):c.css(p)}},d.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){d.offset.setOffset(this,e,t)}));var t,n,r=this[0],i={top:0,left:0},o=r&&r.ownerDocument;return o?(t=o.documentElement,d.contains(t,r)?(i=r.getBoundingClientRect(),n=_t(o),{top:i.top+n.pageYOffset-t.clientTop,left:i.left+n.pageXOffset-t.clientLeft}):i):void 0},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===d.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),d.nodeName(e[0],"html")||(r=e.offset()),r.top+=d.css(e[0],"borderTopWidth",!0),r.left+=d.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-d.css(n,"marginTop",!0),left:t.left-r.left-d.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===d.css(e,"position");)e=e.offsetParent;return e||Ie}))}}),d.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;d.fn[e]=function(r){return D(this,(function(e,r,i){var o=_t(e);if(void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),d.each(["top","left"],(function(e,t){d.cssHooks[t]=Re(p.pixelPosition,(function(e,n){if(n)return n=Ae(e,t),we.test(n)?d(e).position()[t]+"px":n}))})),d.each({Height:"height",Width:"width"},(function(e,t){d.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){d.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(!0===r||!0===i?"margin":"border");return D(this,(function(t,n,r){var i;return d.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?d.css(t,n,s):d.style(t,n,r,s)}),t,o?r:void 0,o,null)}}))})),d.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},size:function(){return this.length}}),d.fn.andSelf=d.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],(function(){return d}));var Ot=e.jQuery,Dt=e.$;return d.noConflict=function(t){return e.$===d&&(e.$=Dt),t&&e.jQuery===d&&(e.jQuery=Ot),d},t||(e.jQuery=e.$=d),d}))},{}],17:[function(e,t,n){var r=e("../src/store-engine"),i=e("../storages/all"),o=[e("../plugins/json2")];t.exports=r.createStore(i,o)},{"../plugins/json2":18,"../src/store-engine":20,"../storages/all":22}],18:[function(e,t,n){t.exports=function(){return e("./lib/json2"),{}}},{"./lib/json2":19}],19:[function(require,module,exports){"object"!=typeof JSON&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,(function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function str(e,t){var n,r,i,o,s,a=gap,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,s=[],"[object Array]"===Object.prototype.toString.apply(l)){for(o=l.length,n=0;n<o;n+=1)s[n]=str(n,l)||"null";return i=0===s.length?"[]":gap?"[\n"+gap+s.join(",\n"+gap)+"\n"+a+"]":"["+s.join(",")+"]",gap=a,i}if(rep&&"object"==typeof rep)for(o=rep.length,n=0;n<o;n+=1)"string"==typeof rep[n]&&(i=str(r=rep[n],l))&&s.push(quote(r)+(gap?": ":":")+i);else for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(i=str(r,l))&&s.push(quote(r)+(gap?": ":":")+i);return i=0===s.length?"{}":gap?"{\n"+gap+s.join(",\n"+gap)+"\n"+a+"}":"{"+s.join(",")+"}",gap=a,i}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;r<n;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(e,t){var n,r,i=e[t];if(i&&"object"==typeof i)for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(void 0!==(r=walk(i,n))?i[n]=r:delete i[n]);return reviver.call(e,t,i)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},{}],20:[function(e,t,n){var r=e("./util"),i=r.slice,o=r.pluck,s=r.each,a=r.bind,l=r.create,u=r.isList,c=r.isFunction,p=r.isObject;t.exports={createStore:f};var d={version:"2.0.12",enabled:!1,get:function(e,t){var n=this.storage.read(this._namespacePrefix+e);return this._deserialize(n,t)},set:function(e,t){return void 0===t?this.remove(e):(this.storage.write(this._namespacePrefix+e,this._serialize(t)),t)},remove:function(e){this.storage.remove(this._namespacePrefix+e)},each:function(e){var t=this;this.storage.each((function(n,r){e.call(t,t._deserialize(n),(r||"").replace(t._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(e){return this._namespacePrefix=="__storejs_"+e+"_"},createStore:function(){return f.apply(this,arguments)},addPlugin:function(e){this._addPlugin(e)},namespace:function(e){return f(this.storage,this.plugins,e)}};function f(e,t,n){n||(n=""),e&&!u(e)&&(e=[e]),t&&!u(t)&&(t=[t]);var r=n?"__storejs_"+n+"_":"",f=n?new RegExp("^"+r):null;if(!/^[a-zA-Z0-9_\-]*$/.test(n))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var h=l({_namespacePrefix:r,_namespaceRegexp:f,_testStorage:function(e){try{var t="__storejs__test__";e.write(t,t);var n=e.read(t)===t;return e.remove(t),n}catch(e){return!1}},_assignPluginFnProp:function(e,t){var n=this[t];this[t]=function(){var t=i(arguments,0),r=this;function o(){if(n)return s(arguments,(function(e,n){t[n]=e})),n.apply(r,t)}var a=[o].concat(t);return e.apply(r,a)}},_serialize:function(e){return JSON.stringify(e)},_deserialize:function(e,t){if(!e)return t;var n="";try{n=JSON.parse(e)}catch(t){n=e}return void 0!==n?n:t},_addStorage:function(e){this.enabled||this._testStorage(e)&&(this.storage=e,this.enabled=!0)},_addPlugin:function(e){var t=this;if(u(e))s(e,(function(e){t._addPlugin(e)}));else if(!o(this.plugins,(function(t){return e===t}))){if(this.plugins.push(e),!c(e))throw new Error("Plugins must be function values that return objects");var n=e.call(this);if(!p(n))throw new Error("Plugins must return an object of function properties");s(n,(function(n,r){if(!c(n))throw new Error("Bad plugin property: "+r+" from plugin "+e.name+". Plugins should only return functions.");t._assignPluginFnProp(n,r)}))}},addStorage:function(e){!function(){var e="undefined"==typeof console?null:console;if(e){var t=e.warn?e.warn:e.log;t.apply(e,arguments)}}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(e)}},d,{plugins:[]});return h.raw={},s(h,(function(e,t){c(e)&&(h.raw[t]=a(h,e))})),s(e,(function(e){h._addStorage(e)})),s(t,(function(e){h._addPlugin(e)})),h}},{"./util":21}],21:[function(e,t,n){(function(e){(function(){var n=Object.assign?Object.assign:function(e,t,n,r){for(var i=1;i<arguments.length;i++)a(Object(arguments[i]),(function(t,n){e[n]=t}));return e},r=function(){if(Object.create)return function(e,t,r,i){var o=s(arguments,1);return n.apply(this,[Object.create(e)].concat(o))};{function e(){}return function(t,r,i,o){var a=s(arguments,1);return e.prototype=t,n.apply(this,[new e].concat(a))}}}(),i=String.prototype.trim?function(e){return String.prototype.trim.call(e)}:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},o="undefined"!=typeof window?window:e;function s(e,t){return Array.prototype.slice.call(e,t||0)}function a(e,t){l(e,(function(e,n){return t(e,n),!1}))}function l(e,t){if(u(e)){for(var n=0;n<e.length;n++)if(t(e[n],n))return e[n]}else for(var r in e)if(e.hasOwnProperty(r)&&t(e[r],r))return e[r]}function u(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}t.exports={assign:n,create:r,trim:i,bind:function(e,t){return function(){return t.apply(e,Array.prototype.slice.call(arguments,0))}},slice:s,each:a,map:function(e,t){var n=u(e)?[]:{};return l(e,(function(e,r){return n[r]=t(e,r),!1})),n},pluck:l,isList:u,isFunction:function(e){return e&&"[object Function]"==={}.toString.call(e)},isObject:function(e){return e&&"[object Object]"==={}.toString.call(e)},Global:o}}).call(this)}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],22:[function(e,t,n){t.exports=[e("./localStorage"),e("./oldFF-globalStorage"),e("./oldIE-userDataStorage"),e("./cookieStorage"),e("./sessionStorage"),e("./memoryStorage")]},{"./cookieStorage":23,"./localStorage":24,"./memoryStorage":25,"./oldFF-globalStorage":26,"./oldIE-userDataStorage":27,"./sessionStorage":28}],23:[function(e,t,n){var r=e("../src/util"),i=r.Global,o=r.trim;t.exports={name:"cookieStorage",read:function(e){if(!e||!u(e))return null;var t="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(s.cookie.replace(new RegExp(t),"$1"))},write:function(e,t){e&&(s.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")},each:a,remove:l,clearAll:function(){a((function(e,t){l(t)}))}};var s=i.document;function a(e){for(var t=s.cookie.split(/; ?/g),n=t.length-1;n>=0;n--)if(o(t[n])){var r=t[n].split("="),i=unescape(r[0]);e(unescape(r[1]),i)}}function l(e){e&&u(e)&&(s.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function u(e){return new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(s.cookie)}},{"../src/util":21}],24:[function(e,t,n){var r=e("../src/util").Global;function i(){return r.localStorage}function o(e){return i().getItem(e)}t.exports={name:"localStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var n=i().key(t);e(o(n),n)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},{"../src/util":21}],25:[function(e,t,n){t.exports={name:"memoryStorage",read:function(e){return r[e]},write:function(e,t){r[e]=t},each:function(e){for(var t in r)r.hasOwnProperty(t)&&e(r[t],t)},remove:function(e){delete r[e]},clearAll:function(e){r={}}};var r={}},{}],26:[function(e,t,n){var r=e("../src/util").Global;t.exports={name:"oldFF-globalStorage",read:function(e){return i[e]},write:function(e,t){i[e]=t},each:o,remove:function(e){return i.removeItem(e)},clearAll:function(){o((function(e,t){delete i[e]}))}};var i=r.globalStorage;function o(e){for(var t=i.length-1;t>=0;t--){var n=i.key(t);e(i[n],n)}}},{"../src/util":21}],27:[function(e,t,n){var r=e("../src/util").Global;t.exports={name:"oldIE-userDataStorage",write:function(e,t){if(!s){var n=l(e);o((function(e){e.setAttribute(n,t),e.save("storejs")}))}},read:function(e){if(!s){var t=l(e),n=null;return o((function(e){n=e.getAttribute(t)})),n}},each:function(e){o((function(t){for(var n=t.XMLDocument.documentElement.attributes,r=n.length-1;r>=0;r--){var i=n[r];e(t.getAttribute(i.name),i.name)}}))},remove:function(e){var t=l(e);o((function(e){e.removeAttribute(t),e.save("storejs")}))},clearAll:function(){o((function(e){var t=e.XMLDocument.documentElement.attributes;e.load("storejs");for(var n=t.length-1;n>=0;n--)e.removeAttribute(t[n].name);e.save("storejs")}))}};var i=r.document,o=function(){if(!i||!i.documentElement||!i.documentElement.addBehavior)return null;var e,t,n;try{(t=new ActiveXObject("htmlfile")).open(),t.write('<script>document.w=window<\/script><iframe src="/favicon.ico"></iframe>'),t.close(),e=t.w.frames[0].document,n=e.createElement("div")}catch(t){n=i.createElement("div"),e=i.body}return function(t){var r=[].slice.call(arguments,0);r.unshift(n),e.appendChild(n),n.addBehavior("#default#userData"),n.load("storejs"),t.apply(this,r),e.removeChild(n)}}(),s=(r.navigator?r.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./),a=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function l(e){return e.replace(/^\d/,"___$&").replace(a,"___")}},{"../src/util":21}],28:[function(e,t,n){var r=e("../src/util").Global;function i(){return r.sessionStorage}function o(e){return i().getItem(e)}t.exports={name:"sessionStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var n=i().key(t);e(o(n),n)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},{"../src/util":21}],29:[function(e,t,n){t.exports={_args:[[{raw:"yasgui-utils@^1.6.0",scope:null,escapedName:"yasgui-utils",name:"yasgui-utils",rawSpec:"^1.6.0",spec:">=1.6.0 <2.0.0",type:"range"},"/home/sava/IntellijProjects/YASQE-Ontotext"]],_from:"yasgui-utils@>=1.6.0 <2.0.0",_id:"yasgui-utils@1.6.7",_inCache:!0,_location:"/yasgui-utils",_nodeVersion:"7.10.0",_npmOperationalInternal:{host:"s3://npm-registry-packages",tmp:"tmp/yasgui-utils-1.6.7.tgz_1495459781202_0.06725964159704745"},_npmUser:{name:"laurens.rietveld",email:"laurens.rietveld@gmail.com"},_npmVersion:"4.2.0",_phantomChildren:{},_requested:{raw:"yasgui-utils@^1.6.0",scope:null,escapedName:"yasgui-utils",name:"yasgui-utils",rawSpec:"^1.6.0",spec:">=1.6.0 <2.0.0",type:"range"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/yasgui-utils/-/yasgui-utils-1.6.7.tgz",_shasum:"2bcfc5a315688de3ae6057883d9ae342b205f267",_shrinkwrap:null,_spec:"yasgui-utils@^1.6.0",_where:"/home/sava/IntellijProjects/YASQE-Ontotext",author:{name:"Laurens Rietveld"},bugs:{url:"https://github.com/YASGUI/Utils/issues"},dependencies:{store:"^2.0.4"},description:"Utils for YASGUI libs",devDependencies:{},directories:{},dist:{shasum:"2bcfc5a315688de3ae6057883d9ae342b205f267",tarball:"https://registry.npmjs.org/yasgui-utils/-/yasgui-utils-1.6.7.tgz"},gitHead:"6031b1cb732d390b29cd5376dceb9a9d665bbd11",homepage:"https://github.com/YASGUI/Utils",licenses:[{type:"MIT",url:"http://yasgui.github.io/license.txt"}],main:"src/main.js",maintainers:[{name:"laurens.rietveld",email:"laurens.rietveld@gmail.com"}],name:"yasgui-utils",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/YASGUI/Utils.git"},scripts:{},version:"1.6.7"}},{}],30:[function(e,t,n){window.console=window.console||{log:function(){}},t.exports={storage:e("./storage.js"),svg:e("./svg.js"),version:{"yasgui-utils":e("../package.json").version},nestedExists:function(e){for(var t=Array.prototype.slice.call(arguments,1),n=0;n<t.length;n++){if(!e||!e.hasOwnProperty(t[n]))return!1;e=e[t[n]]}return!0}}},{"../package.json":29,"./storage.js":31,"./svg.js":32}],31:[function(e,t,n){var r=e("store"),i={day:function(){return 864e5},month:function(){i.day()},year:function(){i.month()}},o=t.exports={set:function(e,t,n,o){if(r.enabled&&e&&void 0!==t){"string"==typeof n&&(n=i[n]()),t.documentElement&&(t=(new XMLSerializer).serializeToString(t.documentElement));try{r.set(e,{val:t,exp:n,time:(new Date).getTime()})}catch(e){if(e.quotaExceeded=function(e){var t=!1;if(e)if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t}(e),!e.quotaExceeded||!o)throw e;o(e)}}},remove:function(e){r.enabled&&e&&r.remove(e)},removeAll:function(e){r.enabled&&(e?"function"==typeof e&&r.each((function(t,n){e(n,t)&&o.remove(n)})):r.clearAll())},get:function(e){if(!r.enabled)return null;if(e){var t=r.get(e);return t?t.exp&&(new Date).getTime()-t.time>t.exp?null:t.val:null}return null}}},{store:17}],32:[function(e,t,n){t.exports={draw:function(e,n){if(e){var r=t.exports.getElement(n);r&&(e.append?e.append(r):e.appendChild(r))}},getElement:function(e){if(e&&0==e.indexOf("<svg")){var t=(new DOMParser).parseFromString(e,"text/xml").documentElement,n=document.createElement("div");return n.className="svgImg",n.appendChild(t),n}return!1}}},{}],33:[function(e,t,n){t.exports={name:"yasgui-yasqe",description:"Yet Another SPARQL Query Editor",version:"2.10.5",main:"src/main.js",license:"MIT",author:"Laurens Rietveld",homepage:"http://yasqe.yasgui.org",scripts:{dev:"gulp serve",build:"gulp",patch:"gulp patch",minor:"gulp minor",major:"gulp major"},devDependencies:{"gulp-bump":"^2.2.0","gulp-connect":"^4.2.0","gulp-embedlr":"^0.5.2","gulp-git":"^1.10.0","gulp-livereload":"^3.8.1","gulp-tag-version":"^1.3.0",watchify:"^3.7.0"},bugs:"https://github.com/YASGUI/YASQE/issues/",keywords:["JavaScript","SPARQL","Editor","Semantic Web","Linked Data"],maintainers:[{name:"Laurens Rietveld",email:"laurens.rietveld@gmail.com",web:"http://laurensrietveld.nl"}],repository:{type:"git",url:"https://github.com/YASGUI/YASQE.git"},dependencies:{"bootstrap-sass":"~3.3.1",browserify:"^13.1.0","browserify-transform-tools":"^1.6.0",codemirror:"5.17.0",exorcist:"^0.4.0",gulp:"~3.9.0","gulp-autoprefixer":"^3.1.0","gulp-concat":"^2.6.0","gulp-cssimport":"^3.1.0","gulp-cssnano":"^2.1.2","gulp-filter":"^4.0.0","gulp-jsvalidate":"^2.1.0","gulp-notify":"^2.2.0","gulp-rename":"^1.2.2","gulp-sass":"^2.2.0","gulp-sourcemaps":"^1.6.0","gulp-streamify":"1.0.2","gulp-uglify":"~0.2.1",jquery:"^2.2.4","require-dir":"^0.3.0","run-sequence":"^1.2.2","vinyl-buffer":"^1.0.0","vinyl-source-stream":"~1.1.0","vinyl-transform":"1.0.0","yasgui-utils":"^1.6.0"},optionalShim:{codemirror:{require:"codemirror",global:"CodeMirror"},jquery:{require:"jquery",global:"jQuery"},"../../lib/codemirror":{require:"codemirror",global:"CodeMirror"}}}},{}],34:[function(e,t,n){"use strict";var r=e("jquery"),i=e("../utils.js"),o=e("yasgui-utils"),s=e("../../lib/trie.js");e("../main.js"),t.exports=function(t,n){var l={},u={},c={},p=!1;n.translate=e("../translate.js")(n),n.on("cursorActivity",(function(e,t){d(!0)})),n.on("keyHandled",(function(e,t,n){"Esc"===t&&(p=!1)})),n.on("change",(function(e,t,n){void 0!==n&&" "==n.text&&(p=!1);var i=[];for(var o in l)l[o].is(":visible")&&i.push(l[o]);if(i.length>0){var s=r(e.getWrapperElement()).find(".CodeMirror-vscrollbar"),a=0;s.is(":visible")&&(a=s.outerWidth()),i.forEach((function(e){e.css("right",a)}))}}));var d=function(e){if(!n.somethingSelected()){n.fromAutoShow=e;var i=function(r){if(e&&!p)return!1;if(e&&!r.autoShow)return!1;e||(p=!0);var i={closeCharacters:/(?=a)b/,completeSingle:!1};return!r.bulk&&r.async&&(i.async=!0),t.showHint(n,(function(e,t){return f(r,t)}),i),!0};for(var o in u)if(-1!=r.inArray(o,n.options.autocompleters)){var s=u[o];if(s.isValidCompletionPosition)if(s.isValidCompletionPosition()){if((!s.callbacks||!s.callbacks.validPosition||!1!==s.callbacks.validPosition(n,s))&&i(s))break}else s.callbacks&&s.callbacks.invalidPosition&&s.callbacks.invalidPosition(n,s)}}},f=function(e,t){var r=n.getCompleteToken();if(e.preProcessToken&&(r=e.preProcessToken(r)),r){if(e.bulk||!e.async)return function(t){var n=t.autocompletionString||t.string,r=[];if(c[e.name])r=c[e.name].autoComplete(n);else if("function"==typeof e.get&&0==e.async)r=e.get(n);else if("object"==typeof e.get)for(var i=n.length,o=0;o<e.get.length;o++){var s=e.get[o];s.slice(0,i)==n&&r.push(s)}return g(r,e,t)}(r);e.get(r,(function(n){t(g(n,e,r))}))}},h=function(e,t,n){return e.replace(new RegExp(t,"g"),n)},g=function(e,i,o){for(var s,l=[],u=0;u<e.length;u++){var c=e[u];if(c.value){var d=c.value,f=c.description;if("prefix"===c.type?d+=":":i.postProcessToken&&(d=i.postProcessToken(o,d)),(!d.startsWith("<")||!d.endsWith(">"))&&d.indexOf(":")>0){var g=d.indexOf(":");d=d.substring(0,g+1)+((s=d.substring(g+1)).trim().startsWith("<")&&s.trim().endsWith(">")?s:(s=encodeURIComponent(s),s=h(s,"[*]","%2a"),s=h(s,"[!]","%21"),s=h(s,"[(]","%28"),s=h(s,"[)]","%29"),s=h(s,"[~]","%7e"),s=h(s,"[']","%27")))}l.push({text:d,displayText:f,hint:function(e,t,n){p=!1,a(e,t,n)},render:function(e,t,n){r(e).append(n.displayText)}})}}var m=n.getCursor(),v={completionToken:o.string,list:l,from:{line:m.line,ch:o.start},to:{line:m.line,ch:o.end}};if(i.callbacks)for(var y in i.callbacks)i.callbacks[y]&&t.on(v,y,i.callbacks[y]);return v};return{init:function(e,t){var r=u[e]=new t(n,e);if(r.name=e,r.bulk){var a=function(e){e&&e instanceof Array&&e.length>0&&function(e,t){c[e.name]=new s;for(var r=0;r<t.length;r++)c[e.name].insert(t[r]);var a=i.getPersistencyId(n,e.persistent);a&&o.storage.set(a,t,"month")}(r,e)};if(r.get instanceof Array)a(r.get);else{var l=null,p=i.getPersistencyId(n,r.persistent);p&&(l=o.storage.get(p)),l&&l.length>0?a(l):r.get instanceof Function&&(r.async?r.get(null,a):a(r.get()))}}},completers:u,notifications:{getEl:function(e){return r(l[e.name])},show:function(e,t){t.autoshow||(l[t.name]||(l[t.name]=r("<div class='completionNotification'></div>")),r("#keyboardShortcuts").hide(),l[t.name].show().text(e.translate("yasqe.autocompleterBase.message")).appendTo(r(e.getWrapperElement())))},hide:function(e,t){l[t.name]&&(l[t.name].hide(),r("#keyboardShortcuts").show())}},autoComplete:d,getTrie:function(e){return"string"==typeof e?c[e]:c[e.name]}}};var a=function(e,t,n){n.text!=e.getTokenAt(e.getCursor()).string&&e.replaceRange(n.text,t.from,t.to)}},{"../../lib/trie.js":4,"../main.js":48,"../translate.js":54,"../utils.js":55,jquery:16,"yasgui-utils":30}],35:[function(e,t,n){"use strict";e("jquery"),t.exports=function(n,r){return{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(n)},get:function(t,r){return e("./utils").fetchFromLov(n,this,t,r)},preProcessToken:function(e){return t.exports.preProcessToken(n,e)},postProcessToken:function(e,r){return t.exports.postProcessToken(n,e,r)},async:!0,bulk:!1,autoShow:!1,persistent:r,callbacks:{validPosition:n.autocompleters.notifications.show,invalidPosition:n.autocompleters.notifications.hide}}},t.exports.isValidCompletionPosition=function(e){var t=e.getCompleteToken();if(0==t.string.indexOf("?"))return!1;var n=e.getCursor(),r=e.getPreviousNonWsToken(n.line,t);return"a"==r.string||"rdf:type"==r.string||"rdfs:domain"==r.string||"rdfs:range"==r.string},t.exports.preProcessToken=function(t,n){return e("./utils.js").preprocessResourceTokenForCompletion(t,n)},t.exports.postProcessToken=function(t,n,r){return e("./utils.js").postprocessResourceTokenForCompletion(t,n,r)}},{"./utils":40,"./utils.js":40,jquery:16}],36:[function(e,t,n){"use strict";var r,i,o=e("jquery");t.exports=function(e,n){return e.on("repositoryOrAuthorizationChanged",(function(e,t){i=e,r=t})),{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(e)},get:function(n,r){return t.exports.fetchAutocomplete(e,n,r)},preProcessToken:function(n){return t.exports.preProcessToken(e,n)},postProcessToken:function(n,r){return t.exports.postProcessToken(e,n,r)},async:!0,bulk:!1,autoShow:!0,persistent:n,callbacks:{validPosition:e.autocompleters.notifications.show,invalidPosition:e.autocompleters.notifications.hide}}},t.exports.fetchAutocomplete=function(e,t,n){if(i&&"SYSTEM"!==i){if(!t||!t.string||0===t.string.trim().length)return!1;var s;s=t.tokenPrefix?t.tokenPrefixUri+";"+t.string.substring(t.tokenPrefix.length):t.autocompletionString.startsWith("http://")?t.autocompletionString+";":t.autocompletionString;var a={"X-GraphDB-Repository":i};r&&(a.Authorization=r),o.get({url:"rest/autocomplete/query",data:{q:s},success:function(t,r,i){204!==i.status||e.fromAutoShow?t&&n(t.suggestions):e.toastBuildIndex()},dataType:"json",headers:a}).fail((function(t){e.fromAutoShow||e.toastError(t)}))}},t.exports.isValidCompletionPosition=function(e){var t=e.getCursor();if(e.getTokenAt(t),0==e.getLine(t.line).toUpperCase().trim().indexOf("PREFIX"))return!1;var n=e.getCompleteToken();return-1!=o.inArray("IRI_REF",n.state.possibleCurrent)&&0!=n.string.length&&0!=n.string.indexOf("?")},t.exports.preProcessToken=function(t,n){return e("./utils.js").preprocessResourceTokenForCompletion(t,n)},t.exports.postProcessToken=function(t,n,r){return e("./utils.js").postprocessResourceTokenForCompletion(t,n,r)}},{"./utils.js":40,jquery:16}],37:[function(e,t,n){"use strict";var r=e("jquery");t.exports=function(n,r){return{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(n)},get:function(t,r){return e("./utils").fetchFromLov(n,this,t,r)},preProcessToken:function(e){return t.exports.preProcessToken(n,e)},postProcessToken:function(e,r){return t.exports.postProcessToken(n,e,r)},async:!0,bulk:!1,autoShow:!1,persistent:r,callbacks:{validPosition:n.autocompleters.notifications.show,invalidPosition:n.autocompleters.notifications.hide}}},t.exports.isValidCompletionPosition=function(e){var t=e.getCompleteToken();if(0==t.string.length)return!1;if(0==t.string.indexOf("?"))return!1;if(r.inArray("a",t.state.possibleCurrent)>=0)return!0;var n=e.getCursor();return"rdfs:subPropertyOf"==e.getPreviousNonWsToken(n.line,t).string},t.exports.preProcessToken=function(t,n){return e("./utils.js").preprocessResourceTokenForCompletion(t,n)},t.exports.postProcessToken=function(t,n,r){return e("./utils.js").postprocessResourceTokenForCompletion(t,n,r)}},{"./utils":40,"./utils.js":40,jquery:16}],38:[function(e,t,n){"use strict";var r,i=e("jquery"),o=(e("./utils"),{"string-2":"prefixed",atom:"var"});t.exports=function(e,n){return e.on("change",(function(){t.exports.appendPrefixIfNeeded(e,n)})),e.on("namespacesChanged",(function(n){t.exports.updateNamespaces(e,n)})),{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(e)},get:function(e,t){r=t},preProcessToken:function(n){return t.exports.preprocessPrefixTokenForCompletion(e,n)},async:!0,bulk:!0,autoShow:!0,persistent:null}},t.exports.isValidCompletionPosition=function(e){var t=e.getCursor(),n=e.getTokenAt(t);if(e.getLine(t.line).length>t.ch)return!1;if("ws"!=n.type&&(n=e.getCompleteToken()),0==!n.string.indexOf("a")&&-1==i.inArray("PNAME_NS",n.state.possibleCurrent))return!1;var r=e.getPreviousNonWsToken(t.line,n);return!(!r||"PREFIX"!=r.string.toUpperCase())},t.exports.preprocessPrefixTokenForCompletion=function(e,t){var n=e.getPreviousNonWsToken(e.getCursor().line,t);return n&&n.string&&":"==n.string.slice(-1)&&(t={start:n.start,end:t.end,string:n.string+" "+t.string,state:t.state}),t},t.exports.appendPrefixIfNeeded=function(e,t){if(e.autocompleters.getTrie(t)&&e.options.autocompleters&&-1!=e.options.autocompleters.indexOf(t)){var n=e.getCursor(),r=e.getTokenAt(n);if("prefixed"==o[r.type]){var i=r.string.indexOf(":");if(-1!==i){var s=e.getPreviousNonWsToken(n.line,r).string.toUpperCase(),a=e.getTokenAt({line:n.line,ch:r.start});if("PREFIX"!=s&&("ws"==a.type||null==a.type)){var l=r.string.substring(0,i+1);if(null==e.getPrefixesFromQuery()[l.slice(0,-1)]){var u=e.autocompleters.getTrie(t).autoComplete(l);u.length>0&&e.addPrefixes(u[0])}}}}}},t.exports.updateNamespaces=function(e,t){var n=!1,o=i.map(t,(function(e,t){return"onto"===t&&(n=!0),t+": <"+e+">"}));n||o.push("onto: <http://www.ontotext.com/>"),o.sort(),r(o)}},{"./utils":40,jquery:16}],39:[function(e,t,n){t.exports=function(e,t){return{isValidCompletionPosition:function(){var t=e.getTokenAt(e.getCursor());return"ws"!=t.type&&(t=e.getCompleteToken()).string.length>1},get:function(e,t){for(var n=["COUNT","SUM","MIN","MAX","AVG","SAMPLE","STR","LANG","LANGMATCHES","DATATYPE","BOUND","IRI","URI","BNODE","RAND","ABS","CEIL","FLOOR","ROUND","CONCAT","SUBSTR","STRLEN","REPLACE","UCASE","LCASE","ENCODE_FOR_URI","CONTAINS","STRSTARTS","STRENDS","STRBEFORE","STRAFTER","YEAR","MONTH","DAY","HOURS","MINUTES","SECONDS","TIMEZONE","TZ","NOW","UUID","STRUUID","MD5","SHA1","SHA256","SHA384","SHA512","COALESCE","IF","STRLANG","STRDT","sameTerm","isIRI","isURI","isBLANK","isLITERAL","isNUMERIC","REGEX","EXISTS","FILTER"],r=[],i=0;i<n.length;i++){var o=n[i],s=o.toLowerCase(),a=e.toLowerCase();0===s.indexOf(a)&&r.push(o+"(")}return r.sort(),r},preProcessToken:null,postProcessToken:null,async:!1,bulk:!1,autoShow:!0,persistent:null,handlers:{validPosition:null,invalidPosition:null,shown:null,select:null,pick:null,close:null}}}},{}],40:[function(e,t,n){"use strict";var r=e("jquery"),i=(e("./utils.js"),e("yasgui-utils")),o=0===window.location.protocol.indexOf("http")?"//":"http://";t.exports={fetchFromLov:function(t,n,s,a){if(!s||!s.string||0==s.string.trim().length)return t.autocompleters.notifications.getEl(n).empty().append(t.translate("yasqe.utils.message1")),!1;var l={q:s.autocompletionString,page:1};"classes"==n.name?l.type="class":l.type="property";var u=[],c="",p=function(){c=o+"lov.okfn.org/dataset/lov/api/v2/autocomplete/terms?"+r.param(l)};p();var d=function(){r.get(c,(function(e){for(var i=0;i<e.results.length;i++)r.isArray(e.results[i].uri)&&e.results[i].uri.length>0?u.push(e.results[i].uri[0]):u.push(e.results[i].uri);u.length<e.total_results&&u.length<50?(l.page++,p(),d()):(u.length>0?t.autocompleters.notifications.hide(t,n):t.autocompleters.notifications.getEl(n).text(t.translate("yasqe.utils.message2")),a(u))})).fail((function(e,r,i){t.autocompleters.notifications.getEl(n).empty().append(t.translate("yasqe.utils.message3"))}))};t.autocompleters.notifications.getEl(n).empty().append(r("<span>Fetchting autocompletions </span>")).append(r(i.svg.getElement(e("../imgs.js").loader)).addClass("notificationLoader")),d()},preprocessResourceTokenForCompletion:function(t,n){var r=t.getPrefixesFromQuery();if(0==!n.string.indexOf("<")&&(n.tokenPrefix=n.string.substring(0,n.string.indexOf(":")+1),null!=r[n.tokenPrefix.slice(0,-1)]&&(n.tokenPrefixUri=r[n.tokenPrefix.slice(0,-1)])),t.translate=e("../translate.js")(t),n.autocompletionString=n.string.trim(),0==!n.string.indexOf("<")&&n.string.indexOf(":")>-1)for(var i in r)if(0==n.string.indexOf(i)){n.autocompletionString=r[i],n.autocompletionString+=n.string.substring(i.length+1);break}return 0==n.autocompletionString.indexOf("<")&&(n.autocompletionString=n.autocompletionString.substring(1)),-1!==n.autocompletionString.indexOf(">",n.length-1)&&(n.autocompletionString=n.autocompletionString.substring(0,n.autocompletionString.length-1)),n},postprocessResourceTokenForCompletion:function(e,t,n){if(t.tokenPrefix&&t.autocompletionString&&t.tokenPrefixUri)n=t.tokenPrefix+n.substring(t.tokenPrefixUri.length);else{var r=e.getPrefixesFromQuery(),i=_.filter(_.values(r),(function(e){return n.startsWith(e)}));if(i.length>0){var o=_.findKey(r,(function(e){return e===i[0]}));n=o+":"+n.substring(r[o].length)}else{if(0===n.indexOf("<b>"+t.string))return n;if(n.startsWith("<<")&&n.endsWith(">>"))return n;n="<"+n+">"}}return n}}},{"../imgs.js":47,"../translate.js":54,"./utils.js":40,jquery:16,"yasgui-utils":30}],41:[function(e,t,n){"use strict";var r=e("jquery");t.exports=function(e){return{isValidCompletionPosition:function(){var t=e.getTokenAt(e.getCursor());return!("ws"==t.type||!(t=e.getCompleteToken(t))||0!=t.string.indexOf("?"))},get:function(t){if(0==t.trim().length)return[];var n={};r(e.getWrapperElement()).find(".cm-atom").each((function(){var e=this.innerHTML;if(0==e.indexOf("?")){var i=r(this).next();if(i.attr("class")&&i.attr("class").indexOf("cm-atom")>=0&&(e+=i.text()),e.length<=1)return;if(0!==e.indexOf(t))return;if(e==t)return;n[e]=!0}}));var i=[];for(var o in n)i.push(o);return i.sort(),i},async:!1,bulk:!1,autoShow:!0}}},{jquery:16}],42:[function(e,t,n){var r=e("./sparql.js"),i=e("jquery"),o=function(e){return"'"+e+"'"};t.exports={createCurlString:function(e,t){var n=r.getAjaxConfig(e,t),s=n.url;0!==n.url.indexOf("http")&&(s=window.location.protocol+"//"+window.location.host,0===n.url.indexOf("/")?s+=n.url:s+=window.location.pathname+n.url);var a=["curl",s,"-X",e.options.sparql.requestMethod];for(var l in"POST"==e.options.sparql.requestMethod&&a.push("--data "+o(i.param(n.data))),n.headers)a.push("-H "+o(l+": "+n.headers[l]));return a.join(" ")}}},{"./sparql.js":51,jquery:16}],43:[function(e,t,n){var r=e("jquery"),i=e("./main.js");i.defaults=r.extend(!0,{},i.defaults,{mode:"sparql11",value:"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nSELECT * WHERE {\n ?sub ?pred ?obj .\n} \nLIMIT 10",highlightSelectionMatches:{showToken:/\w/},tabMode:"indent",autoCloseBrackets:!0,lineNumbers:!0,lineWrapping:!0,backdrop:!1,foldGutter:{rangeFinder:new i.fold.combine(i.fold.brace,i.fold.prefix)},collapsePrefixesOnLoad:!1,gutters:["gutterErrorBar","CodeMirror-linenumbers","CodeMirror-foldgutter"],matchBrackets:!0,fixedGutter:!0,syntaxErrorCheck:!0,extraKeys:{"Alt-Enter":i.autoComplete,"Ctrl-Space":i.autoComplete,"Cmd-Space":i.autoComplete,"Ctrl-D":i.deleteLine,"Ctrl-K":i.deleteLine,"Cmd-D":i.deleteLine,"Cmd-K":i.deleteLine,"Ctrl-/":i.commentLines,"Cmd-/":i.commentLines,"Ctrl-Alt-Down":i.copyLineDown,"Ctrl-Alt-Up":i.copyLineUp,"Cmd-Alt-Down":i.copyLineDown,"Cmd-Alt-Up":i.copyLineUp,"Shift-Ctrl-F":i.doAutoFormat,"Shift-Cmd-F":i.doAutoFormat,"Ctrl-]":i.indentMore,"Cmd-]":i.indentMore,"Ctrl-[":i.indentLess,"Cmd-[":i.indentLess,"Ctrl-S":i.storeQuery,"Cmd-S":i.storeQuery,"Ctrl-Enter":i.executeQuery,"Cmd-Enter":i.executeQuery,F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}},cursorHeight:.9,createShareLink:i.createShareLink,createShortLink:null,consumeShareLink:i.consumeShareLink,persistent:function(e){return"yasqe_"+r(e.getWrapperElement()).closest("[id]").attr("id")+"_queryVal"},sparql:{queryName:function(e){return e.getQueryMode()},showQueryButton:!1,endpoint:"http://dbpedia.org/sparql",requestMethod:"POST",acceptHeaderGraph:"text/turtle,*/*;q=0.9",acceptHeaderSelect:"application/sparql-results+json,*/*;q=0.9",acceptHeaderUpdate:"text/plain,*/*;q=0.9",namedGraphs:[],defaultGraphs:[],args:[],headers:{},getQueryForAjax:null,callbacks:{beforeSend:null,complete:null,error:null,success:null},handlers:{}}})},{"./main.js":48,jquery:16}],44:[function(e,t,n){t.exports=e("./main.js")},{"./main.js":48}],45:[function(e,t,n){t.exports={"yasqe.invalid.line":"This line is invalid. Expected: ","yasqe.btn.title.fullscreen":"Set editor full screen","yasqe.btn.title.normalsize":"Set editor to normal size","yasqe.btn.title.share":"Share your query","yasqe.btn.lbl.curl":"CURL","yasqe.btn.lbl.shorten":"Shorten","yasqe.autocompleterBase.message":"Press Alt+Enter to autocomplete","yasqe.utils.message1":"Nothing to autocomplete yet!","yasqe.utils.message2":"0 matches found...","yasqe.utils.message3":"Failed fetching suggestions.."}},{}],46:[function(e,t,n){t.exports={"yasqe.invalid.line":"Cette ligne n'est pas valide. Attendu:","yasqe.btn.title.fullscreen":"Configurer l'éditeur en plein écran","yasqe.btn.title.normalsize":"Configurer l'éditeur à la taille normale","yasqe.btn.title.share":"Partagez votre requête","yasqe.btn.lbl.curl":"CURL","yasqe.btn.lbl.shorten":"Raccourcir","yasqe.autocompleterBase.message":"Appuyez sur Alt+Enter pour l'autocomplétion.","yasqe.utils.message1":"Rien à autocompléter encore !","yasqe.utils.message2":"0 correspondances trouvées ...","yasqe.utils.message3":"Échec de la récupération des suggestions..."}},{}],47:[function(e,t,n){"use strict";t.exports={query:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 80 80" enable-background="new 0 0 80 80" xml:space="preserve"><g ></g><g >\t<path d="M64.622,2.411H14.995c-6.627,0-12,5.373-12,12v49.897c0,6.627,5.373,12,12,12h49.627c6.627,0,12-5.373,12-12V14.411 C76.622,7.783,71.249,2.411,64.622,2.411z M24.125,63.906V15.093L61,39.168L24.125,63.906z"/></g></svg>',queryInvalid:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 73.627 73.897" enable-background="new 0 0 80 80" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="warning.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" inkscape:zoom="3.1936344" inkscape:cx="36.8135" inkscape:cy="36.9485" inkscape:window-x="2625" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" /><g transform="translate(-2.995,-2.411)" /><g transform="translate(-2.995,-2.411)" ><path d="M 64.622,2.411 H 14.995 c -6.627,0 -12,5.373 -12,12 v 49.897 c 0,6.627 5.373,12 12,12 h 49.627 c 6.627,0 12,-5.373 12,-12 V 14.411 c 0,-6.628 -5.373,-12 -12,-12 z M 24.125,63.906 V 15.093 L 61,39.168 24.125,63.906 z" inkscape:connector-curvature="0" /></g><path d="M 66.129381,65.903784 H 49.769875 c -1.64721,0 -2.889385,-0.581146 -3.498678,-1.63595 -0.609293,-1.055608 -0.491079,-2.422161 0.332391,-3.848223 l 8.179753,-14.167069 c 0.822934,-1.42633 1.9477,-2.211737 3.166018,-2.211737 1.218319,0 2.343086,0.785407 3.166019,2.211737 l 8.179751,14.167069 c 0.823472,1.426062 0.941686,2.792615 0.33239,3.848223 -0.609023,1.054804 -1.851197,1.63595 -3.498138,1.63595 z M 59.618815,60.91766 c 0,-0.850276 -0.68944,-1.539719 -1.539717,-1.539719 -0.850276,0 -1.539718,0.689443 -1.539718,1.539719 0,0.850277 0.689442,1.539718 1.539718,1.539718 0.850277,0 1.539717,-0.689441 1.539717,-1.539718 z m 0.04155,-9.265919 c 0,-0.873061 -0.707939,-1.580998 -1.580999,-1.580998 -0.873061,0 -1.580999,0.707937 -1.580999,1.580998 l 0.373403,5.610965 h 0.0051 c 0.05415,0.619747 0.568548,1.10761 1.202504,1.10761 0.586239,0 1.075443,-0.415756 1.188563,-0.968489 0.0092,-0.04476 0.0099,-0.09248 0.01392,-0.138854 h 0.01072 l 0.367776,-5.611232 z" inkscape:connector-curvature="0" style="fill:#aa8800" /></svg>',download:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" xml:space="preserve"><g ></g><g >\t<path fill-rule="evenodd" fill="#000000" d="M88,84v-2c0-2.961-0.859-4-4-4H16c-2.961,0-4,0.98-4,4v2c0,3.102,1.039,4,4,4h68 C87.02,88,88,87.039,88,84z M58,12H42c-5,0-6,0.941-6,6v22H16l34,34l34-34H64V18C64,12.941,62.939,12,58,12z"/></g></svg>',share:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve"><path d="M36.764,50c0,0.308-0.07,0.598-0.088,0.905l32.247,16.119c2.76-2.338,6.293-3.797,10.195-3.797 C87.89,63.228,95,70.338,95,79.109C95,87.89,87.89,95,79.118,95c-8.78,0-15.882-7.11-15.882-15.891c0-0.316,0.07-0.598,0.088-0.905 L31.077,62.085c-2.769,2.329-6.293,3.788-10.195,3.788C12.11,65.873,5,58.771,5,50c0-8.78,7.11-15.891,15.882-15.891 c3.902,0,7.427,1.468,10.195,3.797l32.247-16.119c-0.018-0.308-0.088-0.598-0.088-0.914C63.236,12.11,70.338,5,79.118,5 C87.89,5,95,12.11,95,20.873c0,8.78-7.11,15.891-15.882,15.891c-3.911,0-7.436-1.468-10.195-3.806L36.676,49.086 C36.693,49.394,36.764,49.684,36.764,50z"/></svg>',warning:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" viewBox="0 0 66.399998 66.399998" enable-background="new 0 0 69.3 69.3" xml:space="preserve" height="100%" width="100%" inkscape:version="0.48.4 r9939" ><g transform="translate(-1.5,-1.5)" style="fill:#ff0000"><path d="M 34.7,1.5 C 16.4,1.5 1.5,16.4 1.5,34.7 1.5,53 16.4,67.9 34.7,67.9 53,67.9 67.9,53 67.9,34.7 67.9,16.4 53,1.5 34.7,1.5 z m 0,59.4 C 20.2,60.9 8.5,49.1 8.5,34.7 8.5,20.2 20.3,8.5 34.7,8.5 c 14.4,0 26.2,11.8 26.2,26.2 0,14.4 -11.8,26.2 -26.2,26.2 z" inkscape:connector-curvature="0" style="fill:#ff0000" /><path d="m 34.6,47.1 c -1.4,0 -2.5,0.5 -3.5,1.5 -0.9,1 -1.4,2.2 -1.4,3.6 0,1.6 0.5,2.8 1.5,3.8 1,0.9 2.1,1.3 3.4,1.3 1.3,0 2.4,-0.5 3.4,-1.4 1,-0.9 1.5,-2.2 1.5,-3.7 0,-1.4 -0.5,-2.6 -1.4,-3.6 -0.9,-1 -2.1,-1.5 -3.5,-1.5 z" inkscape:connector-curvature="0" style="fill:#ff0000" /><path d="m 34.8,13.9 c -1.5,0 -2.8,0.5 -3.7,1.6 -0.9,1 -1.4,2.4 -1.4,4.2 0,1.1 0.1,2.9 0.2,5.6 l 0.8,13.1 c 0.2,1.8 0.4,3.2 0.9,4.1 0.5,1.2 1.5,1.8 2.9,1.8 1.3,0 2.3,-0.7 2.9,-1.9 0.5,-1 0.7,-2.3 0.9,-4 L 39.4,25 c 0.1,-1.3 0.2,-2.5 0.2,-3.8 0,-2.2 -0.3,-3.9 -0.8,-5.1 -0.5,-1 -1.6,-2.2 -4,-2.2 z" inkscape:connector-curvature="0" style="fill:#ff0000" /></g></svg>',fullscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="0" inkscape:current-layer="Layer_1" /><path d="m -7.962963,-10 v 38.889 l 16.667,-16.667 16.667,16.667 5.555,-5.555 -16.667,-16.667 16.667,-16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 92.037037,-10 v 38.889 l -16.667,-16.667 -16.666,16.667 -5.556,-5.555 16.666,-16.667 -16.666,-16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M -7.962963,90 V 51.111 l 16.667,16.666 16.667,-16.666 5.555,5.556 -16.667,16.666 16.667,16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M 92.037037,90 V 51.111 l -16.667,16.666 -16.666,-16.666 -5.556,5.556 16.666,16.666 -16.666,16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>',smallscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="Layer_1" /><path d="m 30.926037,28.889 0,-38.889 -16.667,16.667 -16.667,-16.667 -5.555,5.555 16.667,16.667 -16.667,16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,28.889 0,-38.889 16.667,16.667 16.666,-16.667 5.556,5.555 -16.666,16.667 16.666,16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 30.926037,51.111 0,38.889 -16.667,-16.666 -16.667,16.666 -5.555,-5.556 16.667,-16.666 -16.667,-16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,51.111 0,38.889 16.667,-16.666 16.666,16.666 5.556,-5.556 -16.666,-16.666 16.666,-16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>'}},{}],48:[function(e,t,n){"use strict";window.console=window.console||{log:function(){}};var r=e("jquery"),i=e("codemirror"),o=e("./utils.js"),s=e("yasgui-utils"),a=e("./imgs.js");e("../lib/deparam.js"),e("codemirror/addon/fold/foldcode.js"),e("codemirror/addon/fold/foldgutter.js"),e("codemirror/addon/fold/xml-fold.js"),e("codemirror/addon/fold/brace-fold.js"),e("./prefixFold.js"),e("codemirror/addon/hint/show-hint.js"),e("codemirror/addon/search/searchcursor.js"),e("codemirror/addon/edit/matchbrackets.js"),e("codemirror/addon/runmode/runmode.js"),e("codemirror/addon/display/fullscreen.js"),e("../lib/grammar/tokenizer.js"),e("codemirror/addon/edit/closebrackets.js");var l=t.exports=function(e,t){var n=r("<div>",{class:"yasqe"}).appendTo(r(e));t=u(t);var o=c(i(n[0],t));return f(o),o},u=function(e){return r.extend(!0,{},l.defaults,e)},c=function(t){t.translate=e("./translate.js")(t),t.autocompleters=e("./autocompleters/autocompleterBase.js")(l,t),t.options.autocompleters&&t.options.autocompleters.forEach((function(e){l.Autocompleters[e]&&t.autocompleters.init(e,l.Autocompleters[e])})),t.lastQueryDuration=null,t.getCompleteToken=function(n,r){return e("./tokenUtils.js").getCompleteToken(t,n,r)},t.getPreviousNonWsToken=function(n,r){return e("./tokenUtils.js").getPreviousNonWsToken(t,n,r)},t.getNextNonWsToken=function(n,r){return e("./tokenUtils.js").getNextNonWsToken(t,n,r)},t.collapsePrefixes=function(n){void 0===n&&(n=!0),t.foldCode(e("./prefixFold.js").findFirstPrefixLine(t),l.fold.prefix,n?"fold":"unfold")};var n=null,i=null;return t.setBackdrop=function(e){(t.options.backdrop||0===t.options.backdrop||"0"===t.options.backdrop)&&(null===i&&1==(i=+t.options.backdrop)&&(i=400),n||(n=r("<div>",{class:"backdrop"}).click((function(){r(this).hide()})).insertAfter(r(t.getWrapperElement()))),e?n.show(i):n.hide(i))},t.query=function(e){l.executeQuery(t,e)},t.getUrlArguments=function(e){return l.getUrlArguments(t,e)},t.getPrefixesFromQuery=function(){return e("./prefixUtils.js").getPrefixesFromQuery(t)},t.addPrefixes=function(n){return e("./prefixUtils.js").addPrefixes(t,n)},t.removePrefixes=function(n){return e("./prefixUtils.js").removePrefixes(t,n)},t.getValueWithoutComments=function(){var e="";return l.runMode(t.getValue(),"sparql11",(function(t,n){"comment"!=n&&(e+=t)})),e},t.getQueryType=function(){return t.queryType},t.getQueryMode=function(){var e=t.getQueryType();return"INSERT"==e||"DELETE"==e||"LOAD"==e||"CLEAR"==e||"CREATE"==e||"DROP"==e||"COPY"==e||"MOVE"==e||"ADD"==e?"update":"query"},t.setCheckSyntaxErrors=function(e){t.options.syntaxErrorCheck=e,m(t)},t.enableCompleter=function(e){p(t.options,e),l.Autocompleters[e]&&t.autocompleters.init(e,l.Autocompleters[e])},t.disableCompleter=function(e){d(t.options,e)},t},p=function(e,t){e.autocompleters||(e.autocompleters=[]),e.autocompleters.push(t)},d=function(e,t){if("object"==typeof e.autocompleters){var n=r.inArray(t,e.autocompleters);n>=0&&(e.autocompleters.splice(n,1),d(e,t))}},f=function(e){var t=o.getPersistencyId(e,e.options.persistent);if(t){var n=s.storage.get(t);n&&e.setValue(n)}l.drawButtons(e),e.on("blur",(function(e,t){l.storeQuery(e)})),e.on("change",(function(e,t){m(e),l.updateQueryButton(e),l.positionButtons(e)})),e.on("changes",(function(){m(e),l.updateQueryButton(e),l.positionButtons(e)})),e.on("language-changed",(function(){m(e),l.drawButtons(e),l.autoComplete(e)})),e.on("cursorActivity",(function(e,t){g(e)})),e.prevQueryValid=!1,m(e),l.positionButtons(e),r(e.getWrapperElement()).on("mouseenter",".cm-atom",(function(){var t=r(this).text();r(e.getWrapperElement()).find(".cm-atom").filter((function(){return r(this).text()===t})).addClass("matchingVar")})).on("mouseleave",".cm-atom",(function(){r(e.getWrapperElement()).find(".matchingVar").removeClass("matchingVar")})),e.options.consumeShareLink&&(e.options.consumeShareLink(e,h()),window.addEventListener("hashchange",(function(){e.options.consumeShareLink(e,h())}))),e.options.collapsePrefixesOnLoad&&e.collapsePrefixes(!0)},h=function(){var e=null;return window.location.hash.length>1&&(e=r.deparam(location.href.split("#")[1])),e&&"query"in e||!(window.location.search.length>1)||(e=r.deparam(window.location.search.substring(1))),e},g=function(e){e.cursor=r(".CodeMirror-cursor"),e.buttons&&e.buttons.is(":visible")&&e.cursor.length>0&&(o.elementsOverlap(e.cursor,e.buttons)?e.buttons.find("svg").attr("opacity","0.2"):e.buttons.find("svg").attr("opacity","1.0"))},m=function(t,n){t.queryValid=!0,t.clearGutter("gutterErrorBar");for(var i=null,o=0;o<t.lineCount();++o){var l=!1;if(t.prevQueryValid||(l=!0),i=t.getTokenAt({line:o,ch:t.getLine(o).length},l).state,t.queryType=i.queryType,0==i.OK){if(!t.options.syntaxErrorCheck)return void r(t.getWrapperElement).find(".sp-error").css("color","black");var u=s.svg.getElement(a.warning);i.possibleCurrent&&i.possibleCurrent.length>0&&e("./tooltip")(t,u,(function(){var e=[];return i.possibleCurrent.forEach((function(t){e.push("<strong style='text-decoration:underline'>"+r("<div/>").text(t).html()+"</strong>")})),t.translate("yasqe.invalid.line")+e.join(", ")})),u.style.marginTop="2px",u.style.marginLeft="2px",u.className="parseErrorIcon",t.setGutterMarker(o,"gutterErrorBar",u),t.queryValid=!1;break}}if(t.prevQueryValid=t.queryValid,n&&null!=i&&null!=i.stack){var c=i.stack,p=i.stack.length;(p>1||1==p&&"solutionModifier"!=c[0]&&"?limitOffsetClauses"!=c[0]&&"?offsetClause"!=c[0])&&(t.queryValid=!1)}};r.extend(l,i),l.Autocompleters={},l.registerAutocompleter=function(e,t){l.Autocompleters[e]=t,p(l.defaults,e)},l.autoComplete=function(e){e.autocompleters.autoComplete(!1)},l.registerAutocompleter("sesame-prefixes",e("./autocompleters/sesame-prefixes.js")),l.registerAutocompleter("localNames",e("./autocompleters/localNames.js")),l.registerAutocompleter("properties",e("./autocompleters/properties.js")),l.registerAutocompleter("classes",e("./autocompleters/classes.js")),l.registerAutocompleter("standard",e("./autocompleters/standard.js")),l.registerAutocompleter("variables",e("./autocompleters/variables.js")),l.positionButtons=function(e){var t=r(e.getWrapperElement()).find(".CodeMirror-vscrollbar"),n=0;t.is(":visible")&&(n=t.outerWidth()),e.buttons.is(":visible")&&e.buttons.css("right",n+4)},l.createShareLink=function(e){var t={};return window.location.hash.length>1&&(t=r.deparam(window.location.hash.substring(1))),t.query=e.getValue(),t},l.getAsCurl=function(t,n){return e("./curl.js").createCurlString(t,n)},l.consumeShareLink=function(e,t){t&&t.query&&e.setValue(t.query)},l.drawButtons=function(e){if(e.buttons=r("<div class='yasqe_buttons'></div>").appendTo(r(e.getWrapperElement())),e.options.createShareLink){var t=r(s.svg.getElement(a.share));t.click((function(n){n.stopPropagation();var i=r("<div class='yasqe_sharePopup'></div>").appendTo(e.buttons);r("html").click((function(){i&&i.remove()})),i.click((function(e){e.stopPropagation()}));var o=r("<input>").val(location.protocol+"//"+location.host+location.pathname+location.search+"#"+r.param(e.options.createShareLink(e)));if(o.focus((function(){var e=r(this);e.select(),e.mouseup((function(){return e.unbind("mouseup"),!1}))})),i.empty().append(r("<div>",{class:"inputWrapper"}).append(o)),e.options.createShortLink){i.addClass("enableShort");const t=e.translate("yasqe.btn.lbl.shorten");r("<button>"+t+"</button>").addClass("yasqe_btn yasqe_btn-sm yasqe_btn-primary").click((function(){r(this).parent().find("button").attr("disabled","disabled"),e.options.createShortLink(o.val(),(function(e,t){e?(o.remove(),i.find(".inputWrapper").append(r("<span>",{class:"shortlinkErr"}).text(e))):o.val(t).focus()}))})).appendTo(i)}const s=e.translate("yasqe.btn.lbl.curl");r("<button>"+s+"</button>").addClass("yasqe_btn yasqe_btn-sm yasqe_btn-primary").click((function(){r(this).parent().find("button").attr("disabled","disabled"),o.val(l.getAsCurl(e)).focus()})).appendTo(i);var a=t.position();i.css("top",a.top+t.outerHeight()+parseInt(i.css("padding-top"))+"px").css("left",a.left+t.outerWidth()-i.outerWidth()+"px"),o.focus()})).addClass("yasqe_share").attr("title",e.translate("yasqe.btn.title.share")).appendTo(e.buttons)}var n=r("<div>",{class:"fullscreenToggleBtns"}).append(r(s.svg.getElement(a.fullscreen)).addClass("yasqe_fullscreenBtn").attr("title",e.translate("yasqe.btn.title.fullscreen")).click((function(){e.setOption("fullScreen",!0)}))).append(r(s.svg.getElement(a.smallscreen)).addClass("yasqe_smallscreenBtn").attr("title",e.translate("yasqe.btn.title.normalsize")).click((function(){e.setOption("fullScreen",!1)})));e.buttons.append(n),e.options.sparql.showQueryButton&&(r("<div>",{class:"yasqe_queryButton"}).click((function(){r(this).hasClass("query_busy")?(e.xhr&&e.xhr.abort(),l.updateQueryButton(e)):e.query()})).appendTo(e.buttons),l.updateQueryButton(e))};var v={busy:"loader",valid:"query",error:"queryInvalid"};l.updateQueryButton=function(e,t){var n=r(e.getWrapperElement()).find(".yasqe_queryButton");0!=n.length&&(t||(t="valid",!1===e.queryValid&&(t="error")),t!=e.queryStatus&&(n.empty().removeClass((function(e,t){return t.split(" ").filter((function(e){return 0==e.indexOf("query_")})).join(" ")})),"busy"==t?(n.append(r("<div>",{class:"loader"})),e.queryStatus=t):"valid"!=t&&"error"!=t||(n.addClass("query_"+t),s.svg.draw(n,a[v[t]]),e.queryStatus=t)))},l.fromTextArea=function(e,t){t=u(t),r("<div>",{class:"yasqe"}).insertBefore(r(e)).append(r(e));var n=c(i.fromTextArea(e,t));return f(n),n},l.storeQuery=function(e){var t=o.getPersistencyId(e,e.options.persistent);t&&s.storage.set(t,e.getValue(),"month")},l.commentLines=function(e){for(var t=e.getCursor(!0).line,n=e.getCursor(!1).line,r=Math.min(t,n),i=Math.max(t,n),o=!0,s=r;s<=i;s++){var a=e.getLine(s);if(0==a.length||"#"!=a.substring(0,1)){o=!1;break}}for(s=r;s<=i;s++)o?e.replaceRange("",{line:s,ch:0},{line:s,ch:1}):e.replaceRange("#",{line:s,ch:0})},l.copyLineUp=function(e){var t=e.getCursor(),n=e.lineCount();e.replaceRange("\n",{line:n-1,ch:e.getLine(n-1).length});for(var r=n;r>t.line;r--){var i=e.getLine(r-1);e.replaceRange(i,{line:r,ch:0},{line:r,ch:e.getLine(r).length})}},l.copyLineDown=function(e){l.copyLineUp(e);var t=e.getCursor();t.line++,e.setCursor(t)},l.doAutoFormat=function(e){if(e.somethingSelected()){var t={line:e.getCursor(!1).line,ch:e.getSelection().length};y(e,e.getCursor(!0),t)}else{var n=e.lineCount(),r=e.getTextArea().value.length;y(e,{line:0,ch:0},{line:n,ch:r})}};var y=function(e,t,n){var r=e.indexFromPos(t),i=e.indexFromPos(n),o=x(e.getValue(),r,i);e.operation((function(){e.replaceRange(o,t,n);for(var i=e.posFromIndex(r).line,s=e.posFromIndex(r+o.length).line,a=i;a<=s;a++)e.indentLine(a,"smart")}))},x=function(e,t,n){e=e.substring(t,n);var o=[["keyword","ws","prefixed","ws","uri"],["keyword","ws","uri"]],s=["{",".",";"],a=["}"],l="",u="",c=[];return i.runMode(e,"sparql11",(function(e,t){c.push(t);var n=function(e,t){for(var n=0;n<o.length;n++)if(c.valueOf().toString()==o[n].valueOf().toString())return 1;for(n=0;n<s.length;n++)if(e==s[n])return 1;for(n=0;n<a.length;n++)if(""!=r.trim(u)&&e==a[n])return-1;return 0}(e);0!=n?(1==n?(l+=e+"\n",u=""):(l+="\n"+e,u=e),c=[]):(u+=e,l+=e),1==c.length&&"sp-ws"==c[0]&&(c=[])})),r.trim(l.replace(/\n\s*\n/g,"\n"))};e("./sparql.js"),e("./defaults.js"),l.$=r,l.version={CodeMirror:i.version,YASQE:e("../package.json").version,jquery:r.fn.jquery,"yasgui-utils":s.version}},{"../lib/deparam.js":1,"../lib/grammar/tokenizer.js":3,"../package.json":33,"./autocompleters/autocompleterBase.js":34,"./autocompleters/classes.js":35,"./autocompleters/localNames.js":36,"./autocompleters/properties.js":37,"./autocompleters/sesame-prefixes.js":38,"./autocompleters/standard.js":39,"./autocompleters/variables.js":41,"./curl.js":42,"./defaults.js":43,"./imgs.js":47,"./prefixFold.js":49,"./prefixUtils.js":50,"./sparql.js":51,"./tokenUtils.js":52,"./tooltip":53,"./translate.js":54,"./utils.js":55,codemirror:15,"codemirror/addon/display/fullscreen.js":5,"codemirror/addon/edit/closebrackets.js":6,"codemirror/addon/edit/matchbrackets.js":7,"codemirror/addon/fold/brace-fold.js":8,"codemirror/addon/fold/foldcode.js":9,"codemirror/addon/fold/foldgutter.js":10,"codemirror/addon/fold/xml-fold.js":11,"codemirror/addon/hint/show-hint.js":12,"codemirror/addon/runmode/runmode.js":13,"codemirror/addon/search/searchcursor.js":14,jquery:16,"yasgui-utils":30}],49:[function(e,t,n){var r=e("codemirror"),i=e("./tokenUtils.js");function o(e,t,n,i){if(!i||!("#"===i.charAt(0)||i.startsWith('"')&&i.endsWith('"'))){n||(n=0),i||(i=e.getLine(t));for(var o=(i=i.toUpperCase()).length+1,s=n,a=0;;){var l=i.indexOf("PREFIX",s);if(l===o)return;if(o=l,-1!=l){if(1==a&&l<n)break;if(i.length-l>"PREFIX".length&&":"===i.charAt(l+"PREFIX".length))return;if(l>0&&":"===i.charAt(l-1))return;var u=e.getTokenTypeAt(r.Pos(t,l+1));if(!/^(comment|string)/.test(u))return l+1;s=l-1}else{if(1==a)break;a=1,s=i.length}}}}t.exports={findFirstPrefixLine:function(e){for(var t=e.lastLine(),n=0;n<=t;++n)if(o(e,n)>=0)return n}},r.registerHelper("fold","prefix",(function(e,t){if(t){var n=t.line,s=e.getLine(n),a=function(t,n){var o=e.getTokenAt(r.Pos(t,n+1));if(!o||"keyword"!=o.type)return-1;var s=i.getNextNonWsToken(e,t,o.end+1);if(!s||"string-2"!=s.type)return-1;var a=i.getNextNonWsToken(e,t,s.end+1);return a&&"variable-3"==a.type?a.end:-1};if(!function(){for(var t=!1,r=n-1;r>=0;r--)if(e.getLine(r).toUpperCase().indexOf("PREFIX")>=0){t=!0;break}return t}()){var l=o(e,n,t.ch,s);if(null!=l){for(var u,c=!1,p=e.lastLine(),d=a(n,l),f=n,h=n;h<=p&&!c;++h)for(var g=e.getLine(h),m=h==n?l+1:0;;){!c&&g.indexOf("{")>=0&&(c=!0);var v=g.toUpperCase().indexOf("PREFIX",m);if(!(v>=0))break;(u=a(h,v))>0&&(f=h,m=d=u),m++}return{from:r.Pos(n,l+"PREFIX".length),to:r.Pos(f,d)}}}}}))},{"./tokenUtils.js":52,codemirror:15}],50:[function(e,t,n){"use strict";var r=function(e,t){for(var n=null,r=0,o=e.lineCount(),s=0;s<o;s++){var a=e.getNextNonWsToken(s);null==a||"PREFIX"!=a.string&&"BASE"!=a.string||(n=a,r=s)}if(null==n)e.replaceRange("PREFIX "+t+"\n",{line:0,ch:0});else{var l=i(e,r);e.replaceRange("\n"+l+"PREFIX "+t,{line:r})}e.collapsePrefixes(!1)},i=function(e,t,n){null==n&&(n=1);var r=e.getTokenAt({line:t,ch:n});return null==r||null==r||"ws"!=r.type?"":r.string+i(e,t,r.end+1)};t.exports={addPrefixes:function(e,t){var n=e.getPrefixesFromQuery();if("string"==typeof t)r(e,t);else for(var i in t)i in n||r(e,i+": <"+t[i]+">");e.collapsePrefixes(!1)},getPrefixesFromQuery:function(e){for(var t={},n=!0,r=function(i,s){if(n){s||(s=1);var a=e.getNextNonWsToken(o,s);if(a)if(-1==a.state.possibleCurrent.indexOf("PREFIX")&&-1==a.state.possibleNext.indexOf("PREFIX")&&(n=!1),"PREFIX"==a.string.toUpperCase()){var l=e.getNextNonWsToken(o,a.end+1);if(l){var u=e.getNextNonWsToken(o,l.end+1);if(u){var c=u.string;0==c.indexOf("<")&&(c=c.substring(1)),">"==c.slice(-1)&&(c=c.substring(0,c.length-1)),t[l.string.slice(0,-1)]=c,r(i,u.end+1)}else r(i,l.end+1)}else r(i,a.end+1)}else r(i,a.end+1)}},i=e.lineCount(),o=0;o<i&&n;o++)r(o);return t},removePrefixes:function(e,t){for(var n in t)e.setValue(e.getValue().replace(new RegExp("PREFIX\\s*"+n+":\\s*"+("<"+t[n]+">").replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"\\s*","ig"),""));e.collapsePrefixes(!1)}}},{}],51:[function(e,t,n){"use strict";var r=e("jquery"),i=e("./utils.js"),o=e("./main.js");o.getAjaxConfig=function(t,n){var i="function"==typeof n?n:null,a="object"==typeof n?n:{};if(t.options.sparql&&(a=r.extend({},t.options.sparql,a)),a.handlers&&r.extend(!0,a.callbacks,a.handlers),a.endpoint&&0!=a.endpoint.length){var l={url:"function"==typeof a.endpoint?a.endpoint(t):a.endpoint,type:"function"==typeof a.requestMethod?a.requestMethod(t):a.requestMethod,headers:{Accept:s(t,a)}};a.xhrFields&&(l.xhrFields=a.xhrFields);var u=!1;if(a.callbacks)for(var c in a.callbacks)a.callbacks[c]&&(u=!0,l[c]=a.callbacks[c]);if("GET"===l.type){var p=!0;r.each(t.getUrlArguments(a),(function(e,t){l.url+=(p?"?":"&")+t.name+"="+encodeURIComponent(t.value),p=!1}))}else l.data=t.getUrlArguments(a),a.setQueryLimit&&"function"==typeof a.setQueryLimit&&l.data.forEach((function(e){"query"==e.name&&(e.value=a.setQueryLimit(e.value))}));if(u||i){i&&(l.complete=i),a.headers&&!r.isEmptyObject(a.headers)&&r.extend(l.headers,a.headers);var d=new Date,f=[function(){e("./main.js").signal(t,"queryFinish",arguments)},function(){t.lastQueryDuration=new Date-d,o.updateQueryButton(t),t.setBackdrop(!1)}];return l.complete&&(f.push(l.complete),f.push((function(e,t,n){var i={};r.extend(!0,i,l),"update"===window.editor.getQueryMode()&&"ASK"===window.editor.getQueryType()||a.callbacks.countCallback&&"function"==typeof a.callbacks.countCallback&&(i.data=i.data.filter((function(e){return"offset"!==e.name&&"limit"!==e.name})),i.data.push({name:"count",value:"1"}),i.complete=a.callbacks.countCallback),window.editor&&200===e.status&&r.ajax(i)}))),l.complete=f,l}}},o.executeQuery=function(e,t){o.signal(e,"query",e,t),o.updateQueryButton(e,"busy"),e.setBackdrop(!0),e.xhr=r.ajax(o.getAjaxConfig(e,t))},o.getUrlArguments=function(e,t){var n=e.getQueryMode(),o=[{name:i.getString(e,e.options.sparql.queryName),value:t.getQueryForAjax?t.getQueryForAjax(e):e.getValue()}];if(t.namedGraphs&&t.namedGraphs.length>0)for(var s="query"==n?"named-graph-uri":"using-named-graph-uri ",a=0;a<t.namedGraphs.length;a++)o.push({name:s,value:t.namedGraphs[a]});if(t.defaultGraphs&&t.defaultGraphs.length>0)for(s="query"==n?"default-graph-uri":"using-graph-uri ",a=0;a<t.defaultGraphs.length;a++)o.push({name:s,value:t.defaultGraphs[a]});return t.args&&t.args.length>0&&r.merge(o,t.args),o};var s=function(e,t){var n=null;if(!t.acceptHeader||t.acceptHeaderGraph||t.acceptHeaderSelect||t.acceptHeaderUpdate)if("update"==e.getQueryMode())n="function"==typeof t.acceptHeader?t.acceptHeaderUpdate(e):t.acceptHeaderUpdate;else{var r=e.getQueryType();n="DESCRIBE"==r||"CONSTRUCT"==r?"function"==typeof t.acceptHeaderGraph?t.acceptHeaderGraph(e):t.acceptHeaderGraph:"function"==typeof t.acceptHeaderSelect?t.acceptHeaderSelect(e):t.acceptHeaderSelect}else n="function"==typeof t.acceptHeader?t.acceptHeader(e):t.acceptHeader;return n};t.exports={getAjaxConfig:o.getAjaxConfig}},{"./main.js":48,"./utils.js":55,jquery:16}],52:[function(e,t,n){"use strict";var r=function(e,t,n){n||(n=e.getCursor()),t||(t=e.getTokenAt(n));var i=e.getTokenAt({line:n.line,ch:t.start});return null!=i.type&&"ws"!=i.type&&"punc"!=i.type&&null!=t.type&&"ws"!=t.type?(t.start=i.start,t.string=i.string+t.string,r(e,t,{line:n.line,ch:i.start})):null!=t.type&&"ws"==t.type?(t.start=t.start+1,t.string=t.string.substring(1),t):t},i=function(e,t,n){var r=e.getTokenAt({line:t,ch:n.start});return null!=r&&"ws"==r.type&&(r=i(e,t,r)),r},o=function(e,t,n){null==n&&(n=1);var r=e.getTokenAt({line:t,ch:n});return null==r||null==r||r.end<n?null:"ws"==r.type?o(e,t,r.end+1):r};t.exports={getPreviousNonWsToken:i,getCompleteToken:r,getNextNonWsToken:o}},{}],53:[function(e,t,n){"use strict";var r=e("jquery");e("./utils.js"),t.exports=function(e,t,n){var i;(t=r(t)).hover((function(){"function"==typeof n&&(n=n()),i=r("<div>").addClass("yasqe_tooltip").html(n).appendTo(t),o()}),(function(){r(".yasqe_tooltip").remove()}));var o=function(){r(e.getWrapperElement()).offset().top>=i.offset().top&&(i.css("bottom","auto"),i.css("top","26px"))}}},{"./utils.js":55,jquery:16}],54:[function(e,t,n){const r={en:e("./i18n/locale-en"),fr:e("./i18n/locale-fr")};var i="en",o=function(e){const t=i;if(!r||!r[t])return console.warn("Missing locale file for ["+t+"]"),e;let n=r[t][e];return n||(n=r.en[e]),n};t.exports=function(e){return e.on("language-changed",(function(){i=e.options.locale})),e.options.locale&&(i=e.options.locale),o}},{"./i18n/locale-en":45,"./i18n/locale-fr":46}],55:[function(e,t,n){"use strict";var r=e("jquery"),i=function(){function e(e){var t,n,i;return t=r(e).offset(),n=r(e).width(),i=r(e).height(),[[t.left,t.left+n],[t.top,t.top+i]]}function t(e,t){var n,r;return n=e[0]<t[0]?e:t,r=e[0]<t[0]?t:e,n[1]>r[0]||n[0]===r[0]}return function(n,r){var i=e(n),o=e(r);return t(i[0],o[0])&&t(i[1],o[1])}}();t.exports={keyExists:function(e,t){var n=!1;try{void 0!==e[t]&&(n=!0)}catch(e){}return n},getPersistencyId:function(e,t){var n=null;return t&&(n="string"==typeof t?t:t(e)),n},elementsOverlap:i,getString:function(e,t){return"function"==typeof t?t(e):t}}},{jquery:16}]},{},[44])(44)},module.exports=f()}).call(this,__webpack_require__(11))},441:function(module,exports,__webpack_require__){(function(global){var require,require,e;e=function(){var define,module,exports;return function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){if(!a&&"function"==typeof require&&require)return require(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[s]={exports:{}};t[s][0].call(u.exports,(function(e){var n=t[s][1][e];return i(n||e)}),u,u.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){t.exports=e("./main.js")},{"./main.js":54}],2:[function(e,t,n){
|
|
28
|
+
/*! DataTables 1.10.2
|
|
29
|
+
* ©2008-2014 SpryMedia Ltd - datatables.net/license
|
|
30
|
+
*/
|
|
31
|
+
!function(t,r,i){!function(t){"use strict";"function"==typeof define&&define.amd?define("datatables",["jquery"],t):"object"==typeof n?t(e("jquery")):jQuery&&!jQuery.fn.dataTable&&t(jQuery)}((function(e){"use strict";var n,i,o,s,a,l={},u=/[\r\n]/g,c=/<.*?>/g,p=/^[\w\+\-]/,d=/[\w\+\-]$/,f=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),h=/[',$£€¥%\u2009\u202F]/g,g=function(e){return!e||!0===e||"-"===e},m=function(e){var t=parseInt(e,10);return!isNaN(t)&&isFinite(e)?t:null},v=function(e,t){return l[t]||(l[t]=new RegExp(Ce(t),"g")),"string"==typeof e?e.replace(/\./g,"").replace(l[t],"."):e},y=function(e,t,n){var r="string"==typeof e;return t&&r&&(e=v(e,t)),n&&r&&(e=e.replace(h,"")),g(e)||!isNaN(parseFloat(e))&&isFinite(e)},x=function(e,t,n){return!!g(e)||function(e){return g(e)||"string"==typeof e}(e)&&!!y(T(e),t,n)||null},E=function(e,t,n){var r=[],i=0,o=e.length;if(void 0!==n)for(;i<o;i++)e[i]&&e[i][t]&&r.push(e[i][t][n]);else for(;i<o;i++)e[i]&&r.push(e[i][t]);return r},b=function(e,t,n,r){var i=[],o=0,s=t.length;if(void 0!==r)for(;o<s;o++)i.push(e[t[o]][n][r]);else for(;o<s;o++)i.push(e[t[o]][n]);return i},C=function(e,t){var n,r=[];void 0===t?(t=0,n=e):(n=t,t=e);for(var i=t;i<n;i++)r.push(i);return r},T=function(e){return e.replace(c,"")},S=function(e){var t,n,r,i=[],o=e.length,s=0;e:for(n=0;n<o;n++){for(t=e[n],r=0;r<s;r++)if(i[r]===t)continue e;i.push(t),s++}return i};function w(t){var n,r,i={};e.each(t,(function(e,o){(n=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(n[1]+" ")&&(r=e.replace(n[0],n[2].toLowerCase()),i[r]=e,"o"===n[1]&&w(t[e]))})),t._hungarianMap=i}function N(t,n,r){var i;t._hungarianMap||w(t),e.each(n,(function(o,s){void 0===(i=t._hungarianMap[o])||!r&&void 0!==n[i]||("o"===i.charAt(0)?(n[i]||(n[i]={}),e.extend(!0,n[i],n[o]),N(t[i],n[i],r)):n[i]=n[o])}))}function L(e){var t=n.defaults.oLanguage,r=e.sZeroRecords;!e.sEmptyTable&&r&&"yasr.empty.table"===t.sEmptyTable&&pt(e,e,"sZeroRecords","sEmptyTable"),!e.sLoadingRecords&&r&&"yasr.loading.label"===t.sLoadingRecords&&pt(e,e,"sZeroRecords","sLoadingRecords"),e.sInfoThousands&&(e.sThousands=e.sInfoThousands);var i=e.sDecimal;i&&Mt(i)}var I=function(e,t,n){void 0!==e[t]&&(e[n]=e[t])};function A(e){I(e,"ordering","bSort"),I(e,"orderMulti","bSortMulti"),I(e,"orderClasses","bSortClasses"),I(e,"orderCellsTop","bSortCellsTop"),I(e,"order","aaSorting"),I(e,"orderFixed","aaSortingFixed"),I(e,"paging","bPaginate"),I(e,"pagingType","sPaginationType"),I(e,"pageLength","iDisplayLength"),I(e,"searching","bFilter");var t=e.aoSearchCols;if(t)for(var r=0,i=t.length;r<i;r++)t[r]&&N(n.models.oSearch,t[r])}function R(e){I(e,"orderable","bSortable"),I(e,"orderData","aDataSort"),I(e,"orderSequence","asSorting"),I(e,"orderDataType","sortDataType")}function _(t){var n=t.oBrowser,r=e("<div/>").css({position:"absolute",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(e("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(e('<div class="test"/>').css({width:"100%",height:10}))).appendTo("body"),i=r.find(".test");n.bScrollOversize=100===i[0].offsetWidth,n.bScrollbarLeft=1!==i.offset().left,r.remove()}function O(e,t,n,r,i,o){var s,a=r,l=!1;for(void 0!==n&&(s=n,l=!0);a!==i;)e.hasOwnProperty(a)&&(s=l?t(s,e[a],a,e):e[a],l=!0,a+=o);return s}function D(t,i){var o=n.defaults.column,s=t.aoColumns.length,a=e.extend({},n.models.oColumn,o,{nTh:i||r.createElement("th"),sTitle:o.sTitle?o.sTitle:i?i.innerHTML:"",aDataSort:o.aDataSort?o.aDataSort:[s],mData:o.mData?o.mData:s,idx:s});t.aoColumns.push(a);var l=t.aoPreSearchCols;l[s]=e.extend({},n.models.oSearch,l[s]),k(t,s,null)}function k(t,r,i){var o=t.aoColumns[r],s=t.oClasses,a=e(o.nTh);if(!o.sWidthOrig){o.sWidthOrig=a.attr("width")||null;var l=(a.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);l&&(o.sWidthOrig=l[1])}null!=i&&(R(i),N(n.defaults.column,i),void 0===i.mDataProp||i.mData||(i.mData=i.mDataProp),i.sType&&(o._sManualType=i.sType),i.className&&!i.sClass&&(i.sClass=i.className),e.extend(o,i),pt(o,i,"sWidth","sWidthOrig"),"number"==typeof i.iDataSort&&(o.aDataSort=[i.iDataSort]),pt(o,i,"aDataSort"));var u=o.mData,c=X(u),p=o.mRender?X(o.mRender):null,d=function(e){return"string"==typeof e&&-1!==e.indexOf("@")};o._bAttrSrc=e.isPlainObject(u)&&(d(u.sort)||d(u.type)||d(u.filter)),o.fnGetData=function(e,t,n){var r=c(e,t,void 0,n);return p&&t?p(r,t,e,n):r},o.fnSetData=function(e,t,n){return Y(u)(e,t,n)},t.oFeatures.bSort||(o.bSortable=!1,a.addClass(s.sSortableNone));var f=-1!==e.inArray("asc",o.asSorting),h=-1!==e.inArray("desc",o.asSorting);o.bSortable&&(f||h)?f&&!h?(o.sSortingClass=s.sSortableAsc,o.sSortingClassJUI=s.sSortJUIAscAllowed):!f&&h?(o.sSortingClass=s.sSortableDesc,o.sSortingClassJUI=s.sSortJUIDescAllowed):(o.sSortingClass=s.sSortable,o.sSortingClassJUI=s.sSortJUI):(o.sSortingClass=s.sSortableNone,o.sSortingClassJUI="")}function P(e){if(!1!==e.oFeatures.bAutoWidth){var t=e.aoColumns;qe(e);for(var n=0,r=t.length;n<r;n++)t[n].nTh.style.width=t[n].sWidth}var i=e.oScroll;""===i.sY&&""===i.sX||Ge(e),gt(e,null,"column-sizing",[e])}function M(e,t){var n=U(e,"bVisible");return"number"==typeof n[t]?n[t]:null}function F(t,n){var r=U(t,"bVisible"),i=e.inArray(n,r);return-1!==i?i:null}function j(e){return U(e,"bVisible").length}function U(t,n){var r=[];return e.map(t.aoColumns,(function(e,t){e[n]&&r.push(t)})),r}function G(e){var t,r,i,o,s,a,l,u,c,p=e.aoColumns,d=e.aoData,f=n.ext.type.detect;for(t=0,r=p.length;t<r;t++)if(c=[],!(l=p[t]).sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){for(i=0,o=f.length;i<o;i++){for(s=0,a=d.length;s<a&&(void 0===c[s]&&(c[s]=V(e,s,t,"type")),(u=f[i](c[s],e))&&"html"!==u);s++);if(u){l.sType=u;break}}l.sType||(l.sType="string")}}function B(t,n,r,i){var o,s,a,l,u,c,p,d=t.aoColumns;if(n)for(o=n.length-1;o>=0;o--){var f=void 0!==(p=n[o]).targets?p.targets:p.aTargets;for(e.isArray(f)||(f=[f]),a=0,l=f.length;a<l;a++)if("number"==typeof f[a]&&f[a]>=0){for(;d.length<=f[a];)D(t);i(f[a],p)}else if("number"==typeof f[a]&&f[a]<0)i(d.length+f[a],p);else if("string"==typeof f[a])for(u=0,c=d.length;u<c;u++)("_all"==f[a]||e(d[u].nTh).hasClass(f[a]))&&i(u,p)}if(r)for(o=0,s=r.length;o<s;o++)i(o,r[o])}function H(t,r,i,o){var s=t.aoData.length,a=e.extend(!0,{},n.models.oRow,{src:i?"dom":"data"});a._aData=r,t.aoData.push(a);for(var l=t.aoColumns,u=0,c=l.length;u<c;u++)i&&W(t,s,u,V(t,s,u)),l[u].sType=null;return t.aiDisplayMaster.push(s),!i&&t.oFeatures.bDeferRender||ne(t,s,i,o),s}function q(t,n){var r;return n instanceof e||(n=e(n)),n.map((function(e,n){return r=te(t,n),H(t,r.data,n,r.cells)}))}function V(e,t,n,r){var i=e.iDraw,o=e.aoColumns[n],s=e.aoData[t]._aData,a=o.sDefaultContent,l=o.fnGetData(s,r,{settings:e,row:t,col:n});if(void 0===l)return e.iDrawError!=i&&null===a&&(ct(e,0,"Requested unknown parameter "+("function"==typeof o.mData?"{function}":"'"+o.mData+"'")+" for row "+t,4),e.iDrawError=i),a;if(l!==s&&null!==l||null===a){if("function"==typeof l)return l.call(s)}else l=a;return null===l&&"display"==r?"":l}function W(e,t,n,r){var i=e.aoColumns[n],o=e.aoData[t]._aData;i.fnSetData(o,r,{settings:e,row:t,col:n})}var z=/\[.*?\]$/,$=/\(\)$/;function Q(t){return e.map(t.match(/(\\.|[^\.])+/g),(function(e){return e.replace(/\\./g,".")}))}function X(t){if(e.isPlainObject(t)){var n={};return e.each(t,(function(e,t){t&&(n[e]=X(t))})),function(e,t,r,i){var o=n[t]||n._;return void 0!==o?o(e,t,r,i):e}}if(null===t)return function(e){return e};if("function"==typeof t)return function(e,n,r,i){return t(e,n,r,i)};if("string"!=typeof t||-1===t.indexOf(".")&&-1===t.indexOf("[")&&-1===t.indexOf("("))return function(e,n){return e[t]};var r=function(e,t,n){var i,o,s,a;if(""!==n)for(var l=Q(n),u=0,c=l.length;u<c;u++){if(i=l[u].match(z),o=l[u].match($),i){l[u]=l[u].replace(z,""),""!==l[u]&&(e=e[l[u]]),s=[],l.splice(0,u+1),a=l.join(".");for(var p=0,d=e.length;p<d;p++)s.push(r(e[p],t,a));var f=i[0].substring(1,i[0].length-1);e=""===f?s:s.join(f);break}if(o)l[u]=l[u].replace($,""),e=e[l[u]]();else{if(null===e||void 0===e[l[u]])return;e=e[l[u]]}}return e};return function(e,n){return r(e,n,t)}}function Y(t){if(e.isPlainObject(t))return Y(t._);if(null===t)return function(){};if("function"==typeof t)return function(e,n,r){t(e,"set",n,r)};if("string"!=typeof t||-1===t.indexOf(".")&&-1===t.indexOf("[")&&-1===t.indexOf("("))return function(e,n){e[t]=n};var n=function(e,t,r){for(var i,o,s,a,l,u=Q(r),c=u[u.length-1],p=0,d=u.length-1;p<d;p++){if(o=u[p].match(z),s=u[p].match($),o){u[p]=u[p].replace(z,""),e[u[p]]=[],(i=u.slice()).splice(0,p+1),l=i.join(".");for(var f=0,h=t.length;f<h;f++)n(a={},t[f],l),e[u[p]].push(a);return}s&&(u[p]=u[p].replace($,""),e=e[u[p]](t)),null!==e[u[p]]&&void 0!==e[u[p]]||(e[u[p]]={}),e=e[u[p]]}c.match($)?e=e[c.replace($,"")](t):e[c.replace(z,"")]=t};return function(e,r){return n(e,r,t)}}function K(e){return E(e.aoData,"_aData")}function J(e){e.aoData.length=0,e.aiDisplayMaster.length=0,e.aiDisplay.length=0}function Z(e,t,n){for(var r=-1,i=0,o=e.length;i<o;i++)e[i]==t?r=i:e[i]>t&&e[i]--;-1!=r&&void 0===n&&e.splice(r,1)}function ee(e,t,n,r){var i,o,s=e.aoData[t];if("dom"!==n&&(n&&"auto"!==n||"dom"!==s.src)){var a,l=s.anCells;if(l)for(i=0,o=l.length;i<o;i++){for(a=l[i];a.childNodes.length;)a.removeChild(a.firstChild);l[i].innerHTML=V(e,t,i,"display")}}else s._aData=te(e,s).data;s._aSortData=null,s._aFilterData=null;var u=e.aoColumns;if(void 0!==r)u[r].sType=null;else for(i=0,o=u.length;i<o;i++)u[i].sType=null;re(s)}function te(t,n){var r,i,o,s,a=[],l=[],u=n.firstChild,c=0,p=t.aoColumns,d=function(e,t,n){if("string"==typeof e){var r=e.indexOf("@");if(-1!==r){var i=e.substring(r+1);o["@"+i]=n.getAttribute(i)}}},f=function(t){i=p[c],s=e.trim(t.innerHTML),i&&i._bAttrSrc?(o={display:s},d(i.mData.sort,0,t),d(i.mData.type,0,t),d(i.mData.filter,0,t),a.push(o)):a.push(s),c++};if(u)for(;u;)"TD"!=(r=u.nodeName.toUpperCase())&&"TH"!=r||(f(u),l.push(u)),u=u.nextSibling;else for(var h=0,g=(l=n.anCells).length;h<g;h++)f(l[h]);return{data:a,cells:l}}function ne(e,t,n,i){var o,s,a,l,u,c=e.aoData[t],p=c._aData,d=[];if(null===c.nTr){for(o=n||r.createElement("tr"),c.nTr=o,c.anCells=d,o._DT_RowIndex=t,re(c),l=0,u=e.aoColumns.length;l<u;l++)a=e.aoColumns[l],s=n?i[l]:r.createElement(a.sCellType),d.push(s),n&&!a.mRender&&a.mData===l||(s.innerHTML=V(e,t,l,"display")),a.sClass&&(s.className+=" "+a.sClass),a.bVisible&&!n?o.appendChild(s):!a.bVisible&&n&&s.parentNode.removeChild(s),a.fnCreatedCell&&a.fnCreatedCell.call(e.oInstance,s,V(e,t,l),p,t,l);gt(e,"aoRowCreatedCallback",null,[o,p,t])}c.nTr.setAttribute("role","row")}function re(t){var n=t.nTr,r=t._aData;if(n){if(r.DT_RowId&&(n.id=r.DT_RowId),r.DT_RowClass){var i=r.DT_RowClass.split(" ");t.__rowc=t.__rowc?S(t.__rowc.concat(i)):i,e(n).removeClass(t.__rowc.join(" ")).addClass(r.DT_RowClass)}r.DT_RowData&&e(n).data(r.DT_RowData)}}function ie(t){var n,r,i,o,s,a=t.nTHead,l=t.nTFoot,u=0===e("th, td",a).length,c=t.oClasses,p=t.aoColumns;for(u&&(o=e("<tr/>").appendTo(a)),n=0,r=p.length;n<r;n++)s=p[n],i=e(s.nTh).addClass(s.sClass),u&&i.appendTo(o),t.oFeatures.bSort&&(i.addClass(s.sSortingClass),!1!==s.bSortable&&(i.attr("tabindex",t.iTabIndex).attr("aria-controls",t.sTableId),it(t,s.nTh,n))),s.sTitle!=i.html()&&i.html(s.sTitle),vt(t,"header")(t,i,s,c);if(u&&ue(t.aoHeader,a),e(a).find(">tr").attr("role","row"),e(a).find(">tr>th, >tr>td").addClass(c.sHeaderTH),e(l).find(">tr>th, >tr>td").addClass(c.sFooterTH),null!==l){var d=t.aoFooter[0];for(n=0,r=d.length;n<r;n++)(s=p[n]).nTf=d[n].cell,s.sClass&&e(s.nTf).addClass(s.sClass)}}function oe(t,n,r){var i,o,s,a,l,u,c,p,d,f=[],h=[],g=t.aoColumns.length;if(n){for(void 0===r&&(r=!1),i=0,o=n.length;i<o;i++){for(f[i]=n[i].slice(),f[i].nTr=n[i].nTr,s=g-1;s>=0;s--)t.aoColumns[s].bVisible||r||f[i].splice(s,1);h.push([])}for(i=0,o=f.length;i<o;i++){if(c=f[i].nTr)for(;u=c.firstChild;)c.removeChild(u);for(s=0,a=f[i].length;s<a;s++)if(p=1,d=1,void 0===h[i][s]){for(c.appendChild(f[i][s].cell),h[i][s]=1;void 0!==f[i+p]&&f[i][s].cell==f[i+p][s].cell;)h[i+p][s]=1,p++;for(;void 0!==f[i][s+d]&&f[i][s].cell==f[i][s+d].cell;){for(l=0;l<p;l++)h[i+l][s+d]=1;d++}e(f[i][s].cell).attr("rowspan",p).attr("colspan",d)}}}}function se(t){var n=gt(t,"aoPreDrawCallback","preDraw",[t]);if(-1===e.inArray(!1,n)){var r=[],i=0,o=t.asStripeClasses,s=o.length,a=(t.aoOpenRows.length,t.oLanguage),l=t.iInitDisplayStart,u="ssp"==yt(t),c=t.aiDisplay;t.bDrawing=!0,void 0!==l&&-1!==l&&(t._iDisplayStart=u?l:l>=t.fnRecordsDisplay()?0:l,t.iInitDisplayStart=-1);var p=t._iDisplayStart,d=t.fnDisplayEnd();if(t.bDeferLoading)t.bDeferLoading=!1,t.iDraw++,je(t,!1);else if(u){if(!t.bDestroying&&!de(t))return}else t.iDraw++;if(0!==c.length)for(var f=u?0:p,h=u?t.aoData.length:d,g=f;g<h;g++){var m=c[g],v=t.aoData[m];null===v.nTr&&ne(t,m);var y=v.nTr;if(0!==s){var x=o[i%s];v._sRowStripe!=x&&(e(y).removeClass(v._sRowStripe).addClass(x),v._sRowStripe=x)}gt(t,"aoRowCallback",null,[y,v._aData,i,g]),r.push(y),i++}else{var E=a.sZeroRecords;1==t.iDraw&&"ajax"==yt(t)?E=a.sLoadingRecords:a.sEmptyTable&&0===t.fnRecordsTotal()&&(E=a.sEmptyTable),r[0]=e("<tr/>",{class:s?o[0]:""}).append(e("<td />",{valign:"top",colSpan:j(t),class:t.oClasses.sRowEmpty}).html(t.translate(E)))[0]}gt(t,"aoHeaderCallback","header",[e(t.nTHead).children("tr")[0],K(t),p,d,c]),gt(t,"aoFooterCallback","footer",[e(t.nTFoot).children("tr")[0],K(t),p,d,c]);var b=e(t.nTBody);b.children().detach(),b.append(e(r)),gt(t,"aoDrawCallback","draw",[t]),t.bSorted=!1,t.bFiltered=!1,t.bDrawing=!1}else je(t,!1)}function ae(e,t){var n=e.oFeatures,r=n.bSort,i=n.bFilter;r&&Je(e),i?ve(e,e.oPreviousSearch):e.aiDisplay=e.aiDisplayMaster.slice(),!0!==t&&(e._iDisplayStart=0),e._drawHold=t,se(e),e._drawHold=!1}function le(t){var r=t.oClasses,i=e(t.nTable),o=e("<div/>").insertBefore(i),s=t.oFeatures,a=e("<div/>",{id:t.sTableId+"_wrapper",class:r.sWrapper+(t.nTFoot?"":" "+r.sNoFooter)});t.nHolding=o[0],t.nTableWrapper=a[0],t.nTableReinsertBefore=t.nTable.nextSibling;for(var l,u,c,p,d,f,h=t.sDom.split(""),g=0;g<h.length;g++){if(l=null,"<"==(u=h[g])){if(c=e("<div/>")[0],"'"==(p=h[g+1])||'"'==p){for(d="",f=2;h[g+f]!=p;)d+=h[g+f],f++;if("H"==d?d=r.sJUIHeader:"F"==d&&(d=r.sJUIFooter),-1!=d.indexOf(".")){var m=d.split(".");c.id=m[0].substr(1,m[0].length-1),c.className=m[1]}else"#"==d.charAt(0)?c.id=d.substr(1,d.length-1):c.className=d;g+=f}a.append(c),a=e(c)}else if(">"==u)a=a.parent();else if("l"==u&&s.bPaginate&&s.bLengthChange)l=ke(t);else if("f"==u&&s.bFilter)l=me(t);else if("r"==u&&s.bProcessing)l=Fe(t);else if("t"==u)l=Ue(t);else if("i"==u&&s.bInfo)l=Ie(t);else if("p"==u&&s.bPaginate)l=Pe(t);else if(0!==n.ext.feature.length)for(var v=n.ext.feature,y=0,x=v.length;y<x;y++)if(u==v[y].cFeature){l=v[y].fnInit(t);break}if(l){var E=t.aanFeatures;E[u]||(E[u]=[]),E[u].push(l),a.append(l)}}o.replaceWith(a)}function ue(t,n){var r,i,o,s,a,l,u,c,p,d,f=e(n).children("tr"),h=function(e,t,n){for(var r=e[t];r[n];)n++;return n};for(t.splice(0,t.length),o=0,l=f.length;o<l;o++)t.push([]);for(o=0,l=f.length;o<l;o++)for(i=(r=f[o]).firstChild;i;){if("TD"==i.nodeName.toUpperCase()||"TH"==i.nodeName.toUpperCase())for(c=(c=1*i.getAttribute("colspan"))&&0!==c&&1!==c?c:1,p=(p=1*i.getAttribute("rowspan"))&&0!==p&&1!==p?p:1,u=h(t,o,0),d=1===c,a=0;a<c;a++)for(s=0;s<p;s++)t[o+s][u+a]={cell:i,unique:d},t[o+s].nTr=r;i=i.nextSibling}}function ce(e,t,n){var r=[];n||(n=e.aoHeader,t&&ue(n=[],t));for(var i=0,o=n.length;i<o;i++)for(var s=0,a=n[i].length;s<a;s++)!n[i][s].unique||r[s]&&e.bSortCellsTop||(r[s]=n[i][s].cell);return r}function pe(t,n,r){if(gt(t,"aoServerParams","serverParams",[n]),n&&e.isArray(n)){var i={},o=/(.*?)\[\]$/;e.each(n,(function(e,t){var n=t.name.match(o);if(n){var r=n[0];i[r]||(i[r]=[]),i[r].push(t.value)}else i[t.name]=t.value})),n=i}var s,a=t.ajax,l=t.oInstance;if(e.isPlainObject(a)&&a.data){s=a.data;var u=e.isFunction(s)?s(n):s;n=e.isFunction(s)&&u?u:e.extend(!0,n,u),delete a.data}var c={data:n,success:function(e){var n=e.error||e.sError;n&&t.oApi._fnLog(t,0,n),t.json=e,gt(t,null,"xhr",[t,e]),r(e)},dataType:"json",cache:!1,type:t.sServerMethod,error:function(e,n,r){var i=t.oApi._fnLog;"parsererror"==n?i(t,0,"Invalid JSON response",1):4===e.readyState&&i(t,0,"Ajax error",7),je(t,!1)}};t.oAjaxData=n,gt(t,null,"preXhr",[t,n]),t.fnServerData?t.fnServerData.call(l,t.sAjaxSource,e.map(n,(function(e,t){return{name:t,value:e}})),r,t):t.sAjaxSource||"string"==typeof a?t.jqXHR=e.ajax(e.extend(c,{url:a||t.sAjaxSource})):e.isFunction(a)?t.jqXHR=a.call(l,n,r,t):(t.jqXHR=e.ajax(e.extend(c,a)),a.data=s)}function de(e){return!e.bAjaxDataGet||(e.iDraw++,je(e,!0),pe(e,fe(e),(function(t){he(e,t)})),!1)}function fe(t){var r,i,o,s,a=t.aoColumns,l=a.length,u=t.oFeatures,c=t.oPreviousSearch,p=t.aoPreSearchCols,d=[],f=Ke(t),h=t._iDisplayStart,g=!1!==u.bPaginate?t._iDisplayLength:-1,m=function(e,t){d.push({name:e,value:t})};m("sEcho",t.iDraw),m("iColumns",l),m("sColumns",E(a,"sName").join(",")),m("iDisplayStart",h),m("iDisplayLength",g);var v={draw:t.iDraw,columns:[],order:[],start:h,length:g,search:{value:c.sSearch,regex:c.bRegex}};for(r=0;r<l;r++)o=a[r],s=p[r],i="function"==typeof o.mData?"function":o.mData,v.columns.push({data:i,name:o.sName,searchable:o.bSearchable,orderable:o.bSortable,search:{value:s.sSearch,regex:s.bRegex}}),m("mDataProp_"+r,i),u.bFilter&&(m("sSearch_"+r,s.sSearch),m("bRegex_"+r,s.bRegex),m("bSearchable_"+r,o.bSearchable)),u.bSort&&m("bSortable_"+r,o.bSortable);u.bFilter&&(m("sSearch",c.sSearch),m("bRegex",c.bRegex)),u.bSort&&(e.each(f,(function(e,t){v.order.push({column:t.col,dir:t.dir}),m("iSortCol_"+e,t.col),m("sSortDir_"+e,t.dir)})),m("iSortingCols",f.length));var y=n.ext.legacy.ajax;return null===y?t.sAjaxSource?d:v:y?d:v}function he(e,t){var n=function(e,n){return void 0!==t[e]?t[e]:t[n]},r=n("sEcho","draw"),i=n("iTotalRecords","recordsTotal"),o=n("iTotalDisplayRecords","recordsFiltered");if(r){if(1*r<e.iDraw)return;e.iDraw=1*r}J(e),e._iRecordsTotal=parseInt(i,10),e._iRecordsDisplay=parseInt(o,10);for(var s=ge(e,t),a=0,l=s.length;a<l;a++)H(e,s[a]);e.aiDisplay=e.aiDisplayMaster.slice(),e.bAjaxDataGet=!1,se(e),e._bInitComplete||Oe(e,t),e.bAjaxDataGet=!0,je(e,!1)}function ge(t,n){var r=e.isPlainObject(t.ajax)&&void 0!==t.ajax.dataSrc?t.ajax.dataSrc:t.sAjaxDataProp;return"data"===r?n.aaData||n[r]:""!==r?X(r)(n):n}function me(t){var n=t.oClasses,i=t.sTableId,o=t.oLanguage,s=t.oPreviousSearch,a=t.aanFeatures,l='<input type="search" class="'+n.sFilterInput+'"/>',u=o.sSearch;u=u.match(/_INPUT_/)?u.replace("_INPUT_",l):u+l;var c=e("<div/>",{id:a.f?null:i+"_filter",class:n.sFilter}).append(e("<label/>").append(u)),p=function(){a.f;var e=this.value?this.value:"";e!=s.sSearch&&(ve(t,{sSearch:e,bRegex:s.bRegex,bSmart:s.bSmart,bCaseInsensitive:s.bCaseInsensitive}),t._iDisplayStart=0,se(t))},d=e("input",c).val(s.sSearch).attr("placeholder",o.sSearchPlaceholder).bind("keyup.DT search.DT input.DT paste.DT cut.DT","ssp"===yt(t)?Ve(p,400):p).bind("keypress.DT",(function(e){if(13==e.keyCode)return!1})).attr("aria-controls",i);return e(t.nTable).on("search.dt.DT",(function(e,n){if(t===n)try{d[0]!==r.activeElement&&d.val(s.sSearch)}catch(e){}})),c[0]}function ve(e,t,n){var r=e.oPreviousSearch,i=e.aoPreSearchCols,o=function(e){r.sSearch=e.sSearch,r.bRegex=e.bRegex,r.bSmart=e.bSmart,r.bCaseInsensitive=e.bCaseInsensitive},s=function(e){return void 0!==e.bEscapeRegex?!e.bEscapeRegex:e.bRegex};if(G(e),"ssp"!=yt(e)){Ee(e,t.sSearch,n,s(t),t.bSmart,t.bCaseInsensitive),o(t);for(var a=0;a<i.length;a++)xe(e,i[a].sSearch,a,s(i[a]),i[a].bSmart,i[a].bCaseInsensitive);ye(e)}else o(t);e.bFiltered=!0,gt(e,null,"search",[e])}function ye(e){for(var t,r,i=n.ext.search,o=e.aiDisplay,s=0,a=i.length;s<a;s++){for(var l=[],u=0,c=o.length;u<c;u++)r=o[u],t=e.aoData[r],i[s](e,t._aFilterData,r,t._aData,u)&&l.push(r);o.length=0,o.push.apply(o,l)}}function xe(e,t,n,r,i,o){if(""!==t)for(var s,a=e.aiDisplay,l=be(t,r,i,o),u=a.length-1;u>=0;u--)s=e.aoData[a[u]]._aFilterData[n],l.test(s)||a.splice(u,1)}function Ee(e,t,r,i,o,s){var a,l,u,c=be(t,i,o,s),p=e.oPreviousSearch.sSearch,d=e.aiDisplayMaster;if(0!==n.ext.search.length&&(r=!0),l=we(e),t.length<=0)e.aiDisplay=d.slice();else for((l||r||p.length>t.length||0!==t.indexOf(p)||e.bSorted)&&(e.aiDisplay=d.slice()),u=(a=e.aiDisplay).length-1;u>=0;u--)c.test(e.aoData[a[u]]._sFilterRow)||a.splice(u,1)}function be(t,n,r,i){if(t=n?t:Ce(t),r){var o=e.map(t.match(/"[^"]+"|[^ ]+/g)||"",(function(e){return'"'===e.charAt(0)?e.match(/^"(.*)"$/)[1]:e}));t="^(?=.*?"+o.join(")(?=.*?")+").*$"}return new RegExp(t,i?"i":"")}function Ce(e){return e.replace(f,"\\$1")}var Te=e("<div>")[0],Se=void 0!==Te.textContent;function we(e){var t,r,i,o,s,a,l,u,c=e.aoColumns,p=n.ext.type.search,d=!1;for(r=0,o=e.aoData.length;r<o;r++)if(!(u=e.aoData[r])._aFilterData){for(a=[],i=0,s=c.length;i<s;i++)(t=c[i]).bSearchable?(l=V(e,r,i,"filter"),p[t.sType]&&(l=p[t.sType](l)),null===l&&(l=""),"string"!=typeof l&&l.toString&&(l=l.toString())):l="",l.indexOf&&-1!==l.indexOf("&")&&(Te.innerHTML=l,l=Se?Te.textContent:Te.innerText),l.replace&&(l=l.replace(/[\r\n]/g,"")),a.push(l);u._aFilterData=a,u._sFilterRow=a.join(" "),d=!0}return d}function Ne(e){return{search:e.sSearch,smart:e.bSmart,regex:e.bRegex,caseInsensitive:e.bCaseInsensitive}}function Le(e){return{sSearch:e.search,bSmart:e.smart,bRegex:e.regex,bCaseInsensitive:e.caseInsensitive}}function Ie(t){var n=t.sTableId,r=t.aanFeatures.i,i=e("<div/>",{class:t.oClasses.sInfo,id:r?null:n+"_info"});return r||(t.aoDrawCallback.push({fn:Ae,sName:"information"}),i.attr("role","status").attr("aria-live","polite"),e(t.nTable).attr("aria-describedby",n+"_info")),i[0]}function Ae(t){var n=t.aanFeatures.i;if(0!==n.length){var r=t.oLanguage,i=t._iDisplayStart+1,o=t.fnDisplayEnd(),s=t.fnRecordsTotal(),a=t.fnRecordsDisplay(),l=a?r.sInfo:r.sInfoEmpty;a!==s&&(l+=" "+r.sInfoFiltered),l=Re(t,l+=r.sInfoPostFix);var u=r.fnInfoCallback;null!==u&&(l=u.call(t.oInstance,t,i,o,s,a,l)),e(n).html(l)}}function Re(e,t){var n=e.fnFormatNumber,r=e._iDisplayStart+1,i=e._iDisplayLength,o=e.fnRecordsDisplay(),s=-1===i;return t.replace(/_START_/g,n.call(e,r)).replace(/_END_/g,n.call(e,e.fnDisplayEnd())).replace(/_MAX_/g,n.call(e,e.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(e,o)).replace(/_PAGE_/g,n.call(e,s?1:Math.ceil(r/i))).replace(/_PAGES_/g,n.call(e,s?1:Math.ceil(o/i)))}function _e(e){var t,n,r,i=e.iInitDisplayStart,o=e.aoColumns,s=e.oFeatures;if(e.bInitialised){for(le(e),ie(e),oe(e,e.aoHeader),oe(e,e.aoFooter),je(e,!0),s.bAutoWidth&&qe(e),t=0,n=o.length;t<n;t++)(r=o[t]).sWidth&&(r.nTh.style.width=Xe(r.sWidth));ae(e);var a=yt(e);"ssp"!=a&&("ajax"==a?pe(e,[],(function(n){var r=ge(e,n);for(t=0;t<r.length;t++)H(e,r[t]);e.iInitDisplayStart=i,ae(e),je(e,!1),Oe(e,n)})):(je(e,!1),Oe(e)))}else setTimeout((function(){_e(e)}),200)}function Oe(e,t){e._bInitComplete=!0,t&&P(e),gt(e,"aoInitComplete","init",[e,t])}function De(e,t){var n=parseInt(t,10);e._iDisplayLength=n,mt(e),gt(e,null,"length",[e,n])}function ke(t){for(var n=t.oClasses,r=t.sTableId,i=t.aLengthMenu,o=e.isArray(i[0]),s=o?i[0]:i,a=o?i[1]:i,l=e("<select/>",{name:r+"_length","aria-controls":r,class:n.sLengthSelect}),u=0,c=s.length;u<c;u++)l[0][u]=new Option(a[u],s[u]);var p=e("<div><label/></div>").addClass(n.sLength);return t.aanFeatures.l||(p[0].id=r+"_length"),p.children().append(t.oLanguage.sLengthMenu.replace("_MENU_",l[0].outerHTML)),e("select",p).val(t._iDisplayLength).bind("change.DT",(function(n){De(t,e(this).val()),se(t)})),e(t.nTable).bind("length.dt.DT",(function(n,r,i){t===r&&e("select",p).val(i)})),p[0]}function Pe(t){var r=t.sPaginationType,i=n.ext.pager[r],o="function"==typeof i,s=function(e){se(e)},a=e("<div/>").addClass(t.oClasses.sPaging+r)[0],l=t.aanFeatures;return o||i.fnInit(t,a,s),l.p||(a.id=t.sTableId+"_paginate",t.aoDrawCallback.push({fn:function(e){if(o){var t,n,r=e._iDisplayStart,a=e._iDisplayLength,u=e.fnRecordsDisplay(),c=-1===a,p=c?0:Math.ceil(r/a),d=c?1:Math.ceil(u/a),f=i(p,d);for(t=0,n=l.p.length;t<n;t++)vt(e,"pageButton")(e,l.p[t],t,f,p,d)}else i.fnUpdate(e,s)},sName:"pagination"})),a}function Me(e,t,n){var r=e._iDisplayStart,i=e._iDisplayLength,o=e.fnRecordsDisplay();0===o||-1===i?r=0:"number"==typeof t?(r=t*i)>o&&(r=0):"first"==t?r=0:"previous"==t?(r=i>=0?r-i:0)<0&&(r=0):"next"==t?r+i<o&&(r+=i):"last"==t?r=Math.floor((o-1)/i)*i:ct(e,0,"Unknown paging action: "+t,5);var s=e._iDisplayStart!==r;return e._iDisplayStart=r,s&&(gt(e,null,"page",[e]),n&&se(e)),s}function Fe(t){return e("<div/>",{id:t.aanFeatures.r?null:t.sTableId+"_processing",class:t.oClasses.sProcessing}).html(t.oLanguage.sProcessing).insertBefore(t.nTable)[0]}function je(t,n){t.oFeatures.bProcessing&&e(t.aanFeatures.r).css("display",n?"block":"none"),gt(t,null,"processing",[t,n])}function Ue(t){var n=e(t.nTable);n.attr("role","grid");var r=t.oScroll;if(""===r.sX&&""===r.sY)return t.nTable;var i=r.sX,o=r.sY,s=t.oClasses,a=n.children("caption"),l=a.length?a[0]._captionSide:null,u=e(n[0].cloneNode(!1)),c=e(n[0].cloneNode(!1)),p=n.children("tfoot"),d="<div/>",f=function(e){return e?Xe(e):null};r.sX&&"100%"===n.attr("width")&&n.removeAttr("width"),p.length||(p=null);var h=e(d,{class:s.sScrollWrapper}).append(e(d,{class:s.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:i?f(i):"100%"}).append(e(d,{class:s.sScrollHeadInner}).css({"box-sizing":"content-box",width:r.sXInner||"100%"}).append(u.removeAttr("id").css("margin-left",0).append(n.children("thead")))).append("top"===l?a:null)).append(e(d,{class:s.sScrollBody}).css({overflow:"auto",height:f(o),width:f(i)}).append(n));p&&h.append(e(d,{class:s.sScrollFoot}).css({overflow:"hidden",border:0,width:i?f(i):"100%"}).append(e(d,{class:s.sScrollFootInner}).append(c.removeAttr("id").css("margin-left",0).append(n.children("tfoot")))).append("bottom"===l?a:null));var g=h.children(),m=g[0],v=g[1],y=p?g[2]:null;return i&&e(v).scroll((function(e){var t=this.scrollLeft;m.scrollLeft=t,p&&(y.scrollLeft=t)})),t.nScrollHead=m,t.nScrollBody=v,t.nScrollFoot=y,t.aoDrawCallback.push({fn:Ge,sName:"scrolling"}),h[0]}function Ge(t){var n,r,i,o,s,a,l,u,c,p=t.oScroll,d=p.sX,f=p.sXInner,h=p.sY,g=p.iBarWidth,m=e(t.nScrollHead),v=m[0].style,y=m.children("div"),x=y[0].style,E=y.children("table"),b=t.nScrollBody,C=e(b),T=b.style,S=e(t.nScrollFoot).children("div"),w=S.children("table"),N=e(t.nTHead),L=e(t.nTable),I=L[0],A=I.style,R=t.nTFoot?e(t.nTFoot):null,_=t.oBrowser,O=_.bScrollOversize,D=[],k=[],P=[],F=function(e){var t=e.style;t.paddingTop="0",t.paddingBottom="0",t.borderTopWidth="0",t.borderBottomWidth="0",t.height=0};if(L.children("thead, tfoot").remove(),s=N.clone().prependTo(L),n=N.find("tr"),i=s.find("tr"),s.find("th, td").removeAttr("tabindex"),R&&(a=R.clone().prependTo(L),r=R.find("tr"),o=a.find("tr")),d||(T.width="100%",m[0].style.width="100%"),e.each(ce(t,s),(function(e,n){l=M(t,e),n.style.width=t.aoColumns[l].sWidth})),R&&Be((function(e){e.style.width=""}),o),p.bCollapse&&""!==h&&(T.height=C[0].offsetHeight+N[0].offsetHeight+"px"),c=L.outerWidth(),""===d?(A.width="100%",O&&(L.find("tbody").height()>b.offsetHeight||"scroll"==C.css("overflow-y"))&&(A.width=Xe(L.outerWidth()-g))):""!==f?A.width=Xe(f):c==C.width()&&C.height()<L.height()?(A.width=Xe(c-g),L.outerWidth()>c-g&&(A.width=Xe(c))):A.width=Xe(c),c=L.outerWidth(),Be(F,i),Be((function(t){P.push(t.innerHTML),D.push(Xe(e(t).css("width")))}),i),Be((function(e,t){e.style.width=D[t]}),n),e(i).height(0),R&&(Be(F,o),Be((function(t){k.push(Xe(e(t).css("width")))}),o),Be((function(e,t){e.style.width=k[t]}),r),e(o).height(0)),Be((function(e,t){e.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+P[t]+"</div>",e.style.width=D[t]}),i),R&&Be((function(e,t){e.innerHTML="",e.style.width=k[t]}),o),L.outerWidth()<c?(u=b.scrollHeight>b.offsetHeight||"scroll"==C.css("overflow-y")?c+g:c,O&&(b.scrollHeight>b.offsetHeight||"scroll"==C.css("overflow-y"))&&(A.width=Xe(u-g)),""!==d&&""===f||ct(t,1,"Possible column misalignment",6)):u="100%",T.width=Xe(u),v.width=Xe(u),R&&(t.nScrollFoot.style.width=Xe(u)),h||O&&(T.height=Xe(I.offsetHeight+g)),h&&p.bCollapse){T.height=Xe(h);var j=d&&I.offsetWidth>b.offsetWidth?g:0;I.offsetHeight<b.offsetHeight&&(T.height=Xe(I.offsetHeight+j))}var U=L.outerWidth();E[0].style.width=Xe(U),x.width=Xe(U);var G=L.height()>b.clientHeight||"scroll"==C.css("overflow-y"),B="padding"+(_.bScrollbarLeft?"Left":"Right");x[B]=G?g+"px":"0px",R&&(w[0].style.width=Xe(U),S[0].style.width=Xe(U),S[0].style[B]=G?g+"px":"0px"),C.scroll(),!t.bSorted&&!t.bFiltered||t._drawHold||(b.scrollTop=0)}function Be(e,t,n){for(var r,i,o=0,s=0,a=t.length;s<a;){for(r=t[s].firstChild,i=n?n[s].firstChild:null;r;)1===r.nodeType&&(n?e(r,i,o):e(r,o),o++),r=r.nextSibling,i=n?i.nextSibling:null;s++}}var He=/<.*?>/g;function qe(n){var r,i,o,s,a,l=n.nTable,u=n.aoColumns,c=n.oScroll,p=c.sY,d=c.sX,f=c.sXInner,h=u.length,g=U(n,"bVisible"),m=e("th",n.nTHead),v=l.getAttribute("width"),y=l.parentNode,x=!1;for(r=0;r<g.length;r++)null!==(i=u[g[r]]).sWidth&&(i.sWidth=We(i.sWidthOrig,y),x=!0);if(x||d||p||h!=j(n)||h!=m.length){var E=e(l).clone().empty().css("visibility","hidden").removeAttr("id").append(e(n.nTHead).clone(!1)).append(e(n.nTFoot).clone(!1)).append(e("<tbody><tr/></tbody>"));E.find("tfoot th, tfoot td").css("width","");var b=E.find("tbody tr");for(m=ce(n,E.find("thead")[0]),r=0;r<g.length;r++)i=u[g[r]],m[r].style.width=null!==i.sWidthOrig&&""!==i.sWidthOrig?Xe(i.sWidthOrig):"";if(n.aoData.length)for(r=0;r<g.length;r++)i=u[o=g[r]],e($e(n,o)).clone(!1).append(i.sContentPadding).appendTo(b);if(E.appendTo(y),d&&f?E.width(f):d?(E.css("width","auto"),E.width()<y.offsetWidth&&E.width(y.offsetWidth)):p?E.width(y.offsetWidth):v&&E.width(v),ze(n,E[0]),d){var C=0;for(r=0;r<g.length;r++)i=u[g[r]],a=e(m[r]).outerWidth(),C+=null===i.sWidthOrig?a:parseInt(i.sWidth,10)+a-e(m[r]).width();E.width(Xe(C)),l.style.width=Xe(C)}for(r=0;r<g.length;r++)i=u[g[r]],(s=e(m[r]).width())&&(i.sWidth=Xe(s));l.style.width=Xe(E.css("width")),E.remove()}else for(r=0;r<h;r++)u[r].sWidth=Xe(m.eq(r).width());v&&(l.style.width=Xe(v)),!v&&!d||n._reszEvt||(e(t).bind("resize.DT-"+n.sInstance,Ve((function(){P(n)}))),n._reszEvt=!0)}function Ve(e,t){var n,r,i=t||200;return function(){var t=this,o=+new Date,s=arguments;n&&o<n+i?(clearTimeout(r),r=setTimeout((function(){n=void 0,e.apply(t,s)}),i)):n?(n=o,e.apply(t,s)):n=o}}function We(t,n){if(!t)return 0;var i=e("<div/>").css("width",Xe(t)).appendTo(n||r.body),o=i[0].offsetWidth;return i.remove(),o}function ze(t,n){var r=t.oScroll;if(r.sX||r.sY){var i=r.sX?0:r.iBarWidth;n.style.width=Xe(e(n).outerWidth()-i)}}function $e(t,n){var r=Qe(t,n);if(r<0)return null;var i=t.aoData[r];return i.nTr?i.anCells[n]:e("<td/>").html(V(t,r,n,"display"))[0]}function Qe(e,t){for(var n,r=-1,i=-1,o=0,s=e.aoData.length;o<s;o++)(n=(n=V(e,o,t,"display")+"").replace(He,"")).length>r&&(r=n.length,i=o);return i}function Xe(e){return null===e?"0px":"number"==typeof e?e<0?"0px":e+"px":e.match(/\d$/)?e+"px":e}function Ye(){if(!n.__scrollbarWidth){var t=e("<p/>").css({width:"100%",height:200,padding:0})[0],r=e("<div/>").css({position:"absolute",top:0,left:0,width:200,height:150,padding:0,overflow:"hidden",visibility:"hidden"}).append(t).appendTo("body"),i=t.offsetWidth;r.css("overflow","scroll");var o=t.offsetWidth;i===o&&(o=r[0].clientWidth),r.remove(),n.__scrollbarWidth=i-o}return n.__scrollbarWidth}function Ke(t){var r,i,o,s,a,l,u,c=[],p=t.aoColumns,d=t.aaSortingFixed,f=e.isPlainObject(d),h=[],g=function(t){t.length&&!e.isArray(t[0])?h.push(t):h.push.apply(h,t)};for(e.isArray(d)&&g(d),f&&d.pre&&g(d.pre),g(t.aaSorting),f&&d.post&&g(d.post),r=0;r<h.length;r++)for(i=0,o=(s=p[u=h[r][0]].aDataSort).length;i<o;i++)l=p[a=s[i]].sType||"string",c.push({src:u,col:a,dir:h[r][1],index:h[r][2],type:l,formatter:n.ext.type.order[l+"-pre"]});return c}function Je(e){var t,r,i,o,s,a=[],l=n.ext.type.order,u=e.aoData,c=(e.aoColumns,0),p=e.aiDisplayMaster;for(G(e),t=0,r=(s=Ke(e)).length;t<r;t++)(o=s[t]).formatter&&c++,st(e,o.col);if("ssp"!=yt(e)&&0!==s.length){for(t=0,i=p.length;t<i;t++)a[p[t]]=t;c===s.length?p.sort((function(e,t){var n,r,i,o,l,c,p,d,f,h=s.length,g=u[e]._aSortData,m=u[t]._aSortData;for(i=0;i<h;i++)if(n=g[(l=s[i]).col],r=m[l.col],c=u[e].anCells[l.col].firstChild.firstChild.className,p=u[t].anCells[l.col].firstChild.firstChild.className,d=u[e].anCells[l.col].firstChild.firstChild.lastChild.innerHTML,f=u[t].anCells[l.col].firstChild.firstChild.lastChild.innerHTML,0!==(o="uri"!==c&&void 0!==d&&"uri"!==p&&void 0!==f?et(Ze(d),Ze(f),tt(n),tt(r)):n<r?-1:n>r?1:0))return"asc"===l.dir?o:-o;return(n=a[e])<(r=a[t])?-1:n>r?1:0})):p.sort((function(e,t){var n,r,i,o,c,p=s.length,d=u[e]._aSortData,f=u[t]._aSortData;for(i=0;i<p;i++)if(n=d[(c=s[i]).col],r=f[c.col],0!==(o=(l[c.type+"-"+c.dir]||l["string-"+c.dir])(n,r)))return o;return(n=a[e])<(r=a[t])?-1:n>r?1:0}))}e.bSorted=!0}function Ze(e){switch(e){case"^^xsd:float":case"^^xsd:double":case"^^xsd:byte":case"^^xsd:short":case"^^xsd:int":case"^^xsd:integer":case"^^xsd:long":case"^^xsd:decimal":case"^^xsd:unsignedByte":case"^^xsd:unsignedInt":case"^^xsd:unsignedLong":case"^^xsd:unsignedShort":case"^^xsd:negativeInteger":case"^^xsd:nonNegativeInteger":case"^^xsd:positiveInteger":case"^^xsd:nonPositiveInteger":case"^^xsd:gDay":case"^^xsd:gMonth":case"^^xsd:gMonthDay":case"^^xsd:gYear":case"^^xsd:gYearMonth":return"num";case"^^xsd:date":case"^^xsd:dateTime":case"^^xsd:time":return"date";default:return"str"}}function et(e,t,n,r){switch(e.concat(t)){case"numnum":var i=new Number(n),o=new Number(r);return i<o?-1:i>o?1:0;case"datedate":var s=new Date(n),a=new Date(r);return s<a?-1:s>a?1:0;case"strnum":return 1;case"numstr":return-1;case"datenum":return 1;case"numdate":case"datestr":return-1;case"strdate":return 1;case"strstr":return n<r?-1:n>r?1:0}}function tt(e){return e.slice(1,e.lastIndexOf('"'))}function nt(e){for(var t,n,r=e.aoColumns,i=Ke(e),o=e.oLanguage.oAria,s=0,a=r.length;s<a;s++){var l=r[s],u=l.asSorting,c=l.sTitle.replace(/<.*?>/g,""),p=l.nTh;p.removeAttribute("aria-sort"),l.bSortable?(i.length>0&&i[0].col==s?(p.setAttribute("aria-sort","asc"==i[0].dir?"ascending":"descending"),n=u[i[0].index+1]||u[0]):n=u[0],t=c+("asc"===n?o.sSortAscending:o.sSortDescending)):t=c,p.setAttribute("aria-label",t)}}function rt(t,n,r,i){var o,s=t.aoColumns[n],a=t.aaSorting,l=s.asSorting,u=function(t){var n=t._idx;return void 0===n&&(n=e.inArray(t[1],l)),n+1>=l.length?0:n+1};if("number"==typeof a[0]&&(a=t.aaSorting=[a]),r&&t.oFeatures.bSortMulti){var c=e.inArray(n,E(a,"0"));-1!==c?(o=u(a[c]),a[c][1]=l[o],a[c]._idx=o):(a.push([n,l[0],0]),a[a.length-1]._idx=0)}else a.length&&a[0][0]==n?(o=u(a[0]),a.length=1,a[0][1]=l[o],a[0]._idx=o):(a.length=0,a.push([n,l[0]]),a[0]._idx=0);ae(t),"function"==typeof i&&i(t)}function it(e,t,n,r){var i=e.aoColumns[n];ft(t,{},(function(t){!1!==i.bSortable&&(e.oFeatures.bProcessing?(je(e,!0),setTimeout((function(){rt(e,n,t.shiftKey,r),"ssp"!==yt(e)&&je(e,!1)}),0)):rt(e,n,t.shiftKey,r))}))}function ot(t){var n,r,i,o=t.aLastSort,s=t.oClasses.sSortColumn,a=Ke(t),l=t.oFeatures;if(l.bSort&&l.bSortClasses){for(n=0,r=o.length;n<r;n++)i=o[n].src,e(E(t.aoData,"anCells",i)).removeClass(s+(n<2?n+1:3));for(n=0,r=a.length;n<r;n++)i=a[n].src,e(E(t.aoData,"anCells",i)).addClass(s+(n<2?n+1:3))}t.aLastSort=a}function st(e,t){var r,i,o,s=e.aoColumns[t],a=n.ext.order[s.sSortDataType];a&&(r=a.call(e.oInstance,e,t,F(e,t)));for(var l=n.ext.type.order[s.sType+"-pre"],u=0,c=e.aoData.length;u<c;u++)(i=e.aoData[u])._aSortData||(i._aSortData=[]),i._aSortData[t]&&!a||(o=a?r[u]:V(e,u,t,"sort"),i._aSortData[t]=l?l(o):o)}function at(t){if(t.oFeatures.bStateSave&&!t.bDestroying){var n={time:+new Date,start:t._iDisplayStart,length:t._iDisplayLength,order:e.extend(!0,[],t.aaSorting),search:Ne(t.oPreviousSearch),columns:e.map(t.aoColumns,(function(e,n){return{visible:e.bVisible,search:Ne(t.aoPreSearchCols[n])}}))};gt(t,"aoStateSaveParams","stateSaveParams",[t,n]),t.oSavedState=n,t.fnStateSaveCallback.call(t.oInstance,t,n)}}function lt(t,n){var r,i,o=t.aoColumns;if(t.oFeatures.bStateSave){var s=t.fnStateLoadCallback.call(t.oInstance,t);if(s&&s.time){var a=gt(t,"aoStateLoadParams","stateLoadParams",[t,s]);if(-1===e.inArray(!1,a)){var l=t.iStateDuration;if(!(l>0&&s.time<+new Date-1e3*l)&&o.length===s.columns.length){for(t.oLoadedState=e.extend(!0,{},s),t._iDisplayStart=s.start,t.iInitDisplayStart=s.start,t._iDisplayLength=s.length,t.aaSorting=[],e.each(s.order,(function(e,n){t.aaSorting.push(n[0]>=o.length?[0,n[1]]:n)})),e.extend(t.oPreviousSearch,Le(s.search)),r=0,i=s.columns.length;r<i;r++){var u=s.columns[r];o[r].bVisible=u.visible,e.extend(t.aoPreSearchCols[r],Le(u.search))}gt(t,"aoStateLoaded","stateLoaded",[t,s])}}}}}function ut(t){var r=n.settings,i=e.inArray(t,E(r,"nTable"));return-1!==i?r[i]:null}function ct(e,r,i,o){if(i="DataTables warning: "+(null!==e?"table id="+e.sTableId+" - ":"")+i,o&&(i+=". For more information about this error, please see http://datatables.net/tn/"+o),r)t.console&&console.log&&console.log(i);else{var s=n.ext;if("alert"!=(s.sErrMode||s.errMode))throw new Error(i);alert(i)}}function pt(t,n,r,i){e.isArray(r)?e.each(r,(function(r,i){e.isArray(i)?pt(t,n,i[0],i[1]):pt(t,n,i)})):(void 0===i&&(i=r),void 0!==n[r]&&(t[i]=n[r]))}function dt(t,n,r){var i;for(var o in n)n.hasOwnProperty(o)&&(i=n[o],e.isPlainObject(i)?(e.isPlainObject(t[o])||(t[o]={}),e.extend(!0,t[o],i)):r&&"data"!==o&&"aaData"!==o&&e.isArray(i)?t[o]=i.slice():t[o]=i);return t}function ft(t,n,r){e(t).bind("click.DT",n,(function(e){t.blur(),r(e)})).bind("keypress.DT",n,(function(e){13===e.which&&(e.preventDefault(),r(e))})).bind("selectstart.DT",(function(){return!1}))}function ht(e,t,n,r){n&&e[t].push({fn:n,sName:r})}function gt(t,n,r,i){var o=[];return n&&(o=e.map(t[n].slice().reverse(),(function(e,n){return e.fn.apply(t.oInstance,i)}))),null!==r&&e(t.nTable).trigger(r+".dt",i),o}function mt(e){var t=e._iDisplayStart,n=e.fnDisplayEnd(),r=e._iDisplayLength;n===e.fnRecordsDisplay()&&(t=n-r),(-1===r||t<0)&&(t=0),e._iDisplayStart=t}function vt(t,r){var i=t.renderer,o=n.ext.renderer[r];return e.isPlainObject(i)&&i[r]?o[i[r]]||o._:"string"==typeof i&&o[i]||o._}function yt(e){return e.oFeatures.bServerSide?"ssp":e.ajax||e.sAjaxSource?"ajax":"dom"}n=function(t){this.$=function(e,t){return this.api(!0).$(e,t)},this._=function(e,t){return this.api(!0).rows(e,t).data()},this.api=function(e){return new o(e?ut(this[i.iApiIndex]):this)},this.fnAddData=function(t,n){var r=this.api(!0),i=e.isArray(t)&&(e.isArray(t[0])||e.isPlainObject(t[0]))?r.rows.add(t):r.row.add(t);return(void 0===n||n)&&r.draw(),i.flatten().toArray()},this.fnAdjustColumnSizing=function(e){var t=this.api(!0).columns.adjust(),n=t.settings()[0],r=n.oScroll;void 0===e||e?t.draw(!1):""===r.sX&&""===r.sY||Ge(n)},this.fnClearTable=function(e){var t=this.api(!0).clear();(void 0===e||e)&&t.draw()},this.fnClose=function(e){this.api(!0).row(e).child.hide()},this.fnDeleteRow=function(e,t,n){var r=this.api(!0),i=r.rows(e),o=i.settings()[0],s=o.aoData[i[0][0]];return i.remove(),t&&t.call(this,o,s),(void 0===n||n)&&r.draw(),s},this.fnDestroy=function(e){this.api(!0).destroy(e)},this.fnDraw=function(e){this.api(!0).draw(!e)},this.fnFilter=function(e,t,n,r,i,o){var s=this.api(!0);null==t?s.search(e,n,r,o):s.column(t).search(e,n,r,o),s.draw()},this.fnGetData=function(e,t){var n=this.api(!0);if(void 0!==e){var r=e.nodeName?e.nodeName.toLowerCase():"";return void 0!==t||"td"==r||"th"==r?n.cell(e,t).data():n.row(e).data()||null}return n.data().toArray()},this.fnGetNodes=function(e){var t=this.api(!0);return void 0!==e?t.row(e).node():t.rows().nodes().flatten().toArray()},this.fnGetPosition=function(e){var t=this.api(!0),n=e.nodeName.toUpperCase();if("TR"==n)return t.row(e).index();if("TD"==n||"TH"==n){var r=t.cell(e).index();return[r.row,r.columnVisible,r.column]}return null},this.fnIsOpen=function(e){return this.api(!0).row(e).child.isShown()},this.fnOpen=function(e,t,n){return this.api(!0).row(e).child(t,n).show().child()[0]},this.fnPageChange=function(e,t){var n=this.api(!0).page(e);(void 0===t||t)&&n.draw(!1)},this.fnSetColumnVis=function(e,t,n){var r=this.api(!0).column(e).visible(t);(void 0===n||n)&&r.columns.adjust().draw()},this.fnSettings=function(){return ut(this[i.iApiIndex])},this.fnSort=function(e){this.api(!0).order(e).draw()},this.fnSortListener=function(e,t,n){this.api(!0).order.listener(e,t,n)},this.fnUpdate=function(e,t,n,r,i){var o=this.api(!0);return null==n?o.row(t).data(e):o.cell(t,n).data(e),(void 0===i||i)&&o.columns.adjust(),(void 0===r||r)&&o.draw(),0},this.fnVersionCheck=i.fnVersionCheck;var r=this,s=void 0===t,a=this.length;for(var l in s&&(t={}),this.oApi=this.internal=i.internal,n.ext.internal)l&&(this[l]=Ft(l));return this.each((function(){var i,o=a>1?dt({},t,!0):t,l=0,u=this.getAttribute("id"),c=!1,p=n.defaults;if("table"==this.nodeName.toLowerCase()){A(p),R(p.column),N(p,p,!0),N(p.column,p.column,!0),N(p,o);var d=n.settings;for(l=0,i=d.length;l<i;l++){if(d[l].nTable==this){var f=void 0!==o.bRetrieve?o.bRetrieve:p.bRetrieve,h=void 0!==o.bDestroy?o.bDestroy:p.bDestroy;if(s||f)return d[l].oInstance;if(h){d[l].oInstance.fnDestroy();break}return void ct(d[l],0,"Cannot reinitialise DataTable",3)}if(d[l].sTableId==this.id){d.splice(l,1);break}}null!==u&&""!==u||(u="DataTables_Table_"+n.ext._unique++,this.id=u);var g=e.extend(!0,{},n.models.oSettings,{nTable:this,oApi:r.internal,oInit:o,sDestroyWidth:e(this)[0].style.width,sInstance:u,sTableId:u});d.push(g),g.oInstance=1===r.length?r:e(this).dataTable(),A(o),o.oLanguage&&L(o.oLanguage),o.aLengthMenu&&!o.iDisplayLength&&(o.iDisplayLength=e.isArray(o.aLengthMenu[0])?o.aLengthMenu[0][0]:o.aLengthMenu[0]),o=dt(e.extend(!0,{},p),o),pt(g.oFeatures,o,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),pt(g,o,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"],["bJQueryUI","bJUI"]]),pt(g.oScroll,o,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),pt(g.oLanguage,o,"fnInfoCallback"),ht(g,"aoDrawCallback",o.fnDrawCallback,"user"),ht(g,"aoServerParams",o.fnServerParams,"user"),ht(g,"aoStateSaveParams",o.fnStateSaveParams,"user"),ht(g,"aoStateLoadParams",o.fnStateLoadParams,"user"),ht(g,"aoStateLoaded",o.fnStateLoaded,"user"),ht(g,"aoRowCallback",o.fnRowCallback,"user"),ht(g,"aoRowCreatedCallback",o.fnCreatedRow,"user"),ht(g,"aoHeaderCallback",o.fnHeaderCallback,"user"),ht(g,"aoFooterCallback",o.fnFooterCallback,"user"),ht(g,"aoInitComplete",o.fnInitComplete,"user"),ht(g,"aoPreDrawCallback",o.fnPreDrawCallback,"user");var m=g.oClasses;if(g.translate=t.translate,o.bJQueryUI?(e.extend(m,n.ext.oJUIClasses,o.oClasses),o.sDom===p.sDom&&"lfrtip"===p.sDom&&(g.sDom='<"H"lfr>t<"F"ip>'),g.renderer?e.isPlainObject(g.renderer)&&!g.renderer.header&&(g.renderer.header="jqueryui"):g.renderer="jqueryui"):e.extend(m,n.ext.classes,o.oClasses),e(this).addClass(m.sTable),""===g.oScroll.sX&&""===g.oScroll.sY||(g.oScroll.iBarWidth=Ye()),!0===g.oScroll.sX&&(g.oScroll.sX="100%"),void 0===g.iInitDisplayStart&&(g.iInitDisplayStart=o.iDisplayStart,g._iDisplayStart=o.iDisplayStart),null!==o.iDeferLoading){g.bDeferLoading=!0;var v=e.isArray(o.iDeferLoading);g._iRecordsDisplay=v?o.iDeferLoading[0]:o.iDeferLoading,g._iRecordsTotal=v?o.iDeferLoading[1]:o.iDeferLoading}""!==o.oLanguage.sUrl?(g.oLanguage.sUrl=o.oLanguage.sUrl,e.getJSON(g.oLanguage.sUrl,null,(function(t){L(t),N(p.oLanguage,t),e.extend(!0,g.oLanguage,o.oLanguage,t),_e(g)})),c=!0):e.extend(!0,g.oLanguage,o.oLanguage),null===o.asStripeClasses&&(g.asStripeClasses=[m.sStripeOdd,m.sStripeEven]);var y=g.asStripeClasses,x=e("tbody tr:eq(0)",this);-1!==e.inArray(!0,e.map(y,(function(e,t){return x.hasClass(e)})))&&(e("tbody tr",this).removeClass(y.join(" ")),g.asDestroyStripes=y.slice());var E,b=[],C=this.getElementsByTagName("thead");if(0!==C.length&&(ue(g.aoHeader,C[0]),b=ce(g)),null===o.aoColumns)for(E=[],l=0,i=b.length;l<i;l++)E.push(null);else E=o.aoColumns;for(l=0,i=E.length;l<i;l++)D(g,b?b[l]:null);if(B(g,o.aoColumnDefs,E,(function(e,t){k(g,e,t)})),x.length){var T=function(e,t){return e.getAttribute("data-"+t)?t:null};e.each(te(g,x[0]).cells,(function(e,t){var n=g.aoColumns[e];if(n.mData===e){var r=T(t,"sort")||T(t,"order"),i=T(t,"filter")||T(t,"search");null===r&&null===i||(n.mData={_:e+".display",sort:null!==r?e+".@data-"+r:void 0,type:null!==r?e+".@data-"+r:void 0,filter:null!==i?e+".@data-"+i:void 0},k(g,e))}}))}var S=g.oFeatures;if(o.bStateSave&&(S.bStateSave=!0,lt(g),ht(g,"aoDrawCallback",at,"state_save")),void 0===o.aaSorting){var w=g.aaSorting;for(l=0,i=w.length;l<i;l++)w[l][1]=g.aoColumns[l].asSorting[0]}ot(g),S.bSort&&ht(g,"aoDrawCallback",(function(){if(g.bSorted){var t=Ke(g),n={};e.each(t,(function(e,t){n[t.src]=t.dir})),gt(g,null,"order",[g,t,n]),nt(g)}})),ht(g,"aoDrawCallback",(function(){(g.bSorted||"ssp"===yt(g)||S.bDeferRender)&&ot(g)}),"sc"),_(g);var I=e(this).children("caption").each((function(){this._captionSide=e(this).css("caption-side")})),O=e(this).children("thead");0===O.length&&(O=e("<thead/>").appendTo(this)),g.nTHead=O[0];var P=e(this).children("tbody");0===P.length&&(P=e("<tbody/>").appendTo(this)),g.nTBody=P[0];var M=e(this).children("tfoot");if(0===M.length&&I.length>0&&(""!==g.oScroll.sX||""!==g.oScroll.sY)&&(M=e("<tfoot/>").appendTo(this)),0===M.length||0===M.children().length?e(this).addClass(m.sNoFooter):M.length>0&&(g.nTFoot=M[0],ue(g.aoFooter,g.nTFoot)),o.aaData)for(l=0;l<o.aaData.length;l++)H(g,o.aaData[l]);else(g.bDeferLoading||"dom"==yt(g))&&q(g,e(g.nTBody).children("tr"));g.aiDisplay=g.aiDisplayMaster.slice(),g.bInitialised=!0,!1===c&&_e(g)}else ct(null,0,"Non-table node initialisation ("+this.nodeName+")",2)})),r=null,this};var xt=[],Et=Array.prototype;o=function(t,r){if(!this instanceof o)throw"DT API must be constructed as a new object";var i=[],s=function(t){var r=function(t){var r,i,o=n.settings,s=e.map(o,(function(e,t){return e.nTable}));return t?t.nTable&&t.oApi?[t]:t.nodeName&&"table"===t.nodeName.toLowerCase()?-1!==(r=e.inArray(t,s))?[o[r]]:null:t&&"function"==typeof t.settings?t.settings().toArray():("string"==typeof t?i=e(t):t instanceof e&&(i=t),i?i.map((function(t){return-1!==(r=e.inArray(this,s))?o[r]:null})).toArray():void 0):[]}(t);r&&i.push.apply(i,r)};if(e.isArray(t))for(var a=0,l=t.length;a<l;a++)s(t[a]);else s(t);this.context=S(i),r&&this.push.apply(this,r.toArray?r.toArray():r),this.selector={rows:null,cols:null,opts:null},o.extend(this,this,xt)},n.Api=o,o.prototype={concat:Et.concat,context:[],each:function(e){for(var t=0,n=this.length;t<n;t++)e.call(this,this[t],t,this);return this},eq:function(e){var t=this.context;return t.length>e?new o(t[e],this[e]):null},filter:function(e){var t=[];if(Et.filter)t=Et.filter.call(this,e,this);else for(var n=0,r=this.length;n<r;n++)e.call(this,this[n],n,this)&&t.push(this[n]);return new o(this.context,t)},flatten:function(){var e=[];return new o(this.context,e.concat.apply(e,this.toArray()))},join:Et.join,indexOf:Et.indexOf||function(e,t){for(var n=t||0,r=this.length;n<r;n++)if(this[n]===e)return n;return-1},iterator:function(e,t,n){var r,i,s,a,l,u,c,p,d=[],f=this.context,h=this.selector;for("string"==typeof e&&(n=t,t=e,e=!1),i=0,s=f.length;i<s;i++)if("table"===t)void 0!==(r=n(f[i],i))&&d.push(r);else if("columns"===t||"rows"===t)void 0!==(r=n(f[i],this[i],i))&&d.push(r);else if("column"===t||"column-rows"===t||"row"===t||"cell"===t)for(c=this[i],"column-rows"===t&&(u=wt(f[i],h.opts)),a=0,l=c.length;a<l;a++)p=c[a],void 0!==(r="cell"===t?n(f[i],p.row,p.column,i,a):n(f[i],p,i,a,u))&&d.push(r);if(d.length){var g=new o(f,e?d.concat.apply([],d):d),m=g.selector;return m.rows=h.rows,m.cols=h.cols,m.opts=h.opts,g}return this},lastIndexOf:Et.lastIndexOf||function(e,t){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(e){var t=[];if(Et.map)t=Et.map.call(this,e,this);else for(var n=0,r=this.length;n<r;n++)t.push(e.call(this,this[n],n));return new o(this.context,t)},pluck:function(e){return this.map((function(t){return t[e]}))},pop:Et.pop,push:Et.push,reduce:Et.reduce||function(e,t){return O(this,e,t,0,this.length,1)},reduceRight:Et.reduceRight||function(e,t){return O(this,e,t,this.length-1,-1,-1)},reverse:Et.reverse,selector:null,shift:Et.shift,sort:Et.sort,splice:Et.splice,toArray:function(){return Et.slice.call(this)},to$:function(){return e(this)},toJQuery:function(){return e(this)},unique:function(){return new o(this.context,S(this))},unshift:Et.unshift},o.extend=function(t,n,r){if(n&&(n instanceof o||n.__dt_wrapper)){var i,s,a,l=function(e,t,n){return function(){var r=t.apply(e,arguments);return o.extend(r,r,n.methodExt),r}};for(i=0,s=r.length;i<s;i++)n[(a=r[i]).name]="function"==typeof a.val?l(t,a.val,a):e.isPlainObject(a.val)?{}:a.val,n[a.name].__dt_wrapper=!0,o.extend(t,n[a.name],a.propExt)}},o.register=s=function(t,n){if(e.isArray(t))for(var r=0,i=t.length;r<i;r++)o.register(t[r],n);else{var s,a,l,u,c=t.split("."),p=xt,d=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n].name===t)return e[n];return null};for(s=0,a=c.length;s<a;s++){var f=d(p,l=(u=-1!==c[s].indexOf("()"))?c[s].replace("()",""):c[s]);f||(f={name:l,val:{},methodExt:[],propExt:[]},p.push(f)),s===a-1?f.val=n:p=u?f.methodExt:f.propExt}}},o.registerPlural=a=function(t,n,r){o.register(t,r),o.register(n,(function(){var t=r.apply(this,arguments);return t===this?this:t instanceof o?t.length?e.isArray(t[0])?new o(t.context,t[0]):t[0]:void 0:t}))},s("tables()",(function(t){return t?new o(function(t,n){if("number"==typeof t)return[n[t]];var r=e.map(n,(function(e,t){return e.nTable}));return e(r).filter(t).map((function(t){var i=e.inArray(this,r);return n[i]})).toArray()}(t,this.context)):this})),s("table()",(function(e){var t=this.tables(e),n=t.context;return n.length?new o(n[0]):t})),a("tables().nodes()","table().node()",(function(){return this.iterator("table",(function(e){return e.nTable}))})),a("tables().body()","table().body()",(function(){return this.iterator("table",(function(e){return e.nTBody}))})),a("tables().header()","table().header()",(function(){return this.iterator("table",(function(e){return e.nTHead}))})),a("tables().footer()","table().footer()",(function(){return this.iterator("table",(function(e){return e.nTFoot}))})),a("tables().containers()","table().container()",(function(){return this.iterator("table",(function(e){return e.nTableWrapper}))})),s("draw()",(function(e){return this.iterator("table",(function(t){ae(t,!1===e)}))})),s("page()",(function(e){return void 0===e?this.page.info().page:this.iterator("table",(function(t){Me(t,e)}))})),s("page.info()",(function(e){if(0!==this.context.length){var t=this.context[0],n=t._iDisplayStart,r=t._iDisplayLength,i=t.fnRecordsDisplay(),o=-1===r;return{page:o?0:Math.floor(n/r),pages:o?1:Math.ceil(i/r),start:n,end:t.fnDisplayEnd(),length:r,recordsTotal:t.fnRecordsTotal(),recordsDisplay:i}}})),s("page.len()",(function(e){return void 0===e?0!==this.context.length?this.context[0]._iDisplayLength:void 0:this.iterator("table",(function(t){De(t,e)}))}));var bt=function(e,t,n){if("ssp"==yt(e)?ae(e,t):(je(e,!0),pe(e,[],(function(n){J(e);for(var r=ge(e,n),i=0,o=r.length;i<o;i++)H(e,r[i]);ae(e,t),je(e,!1)}))),n){var r=new o(e);r.one("draw",(function(){n(r.ajax.json())}))}};s("ajax.json()",(function(){var e=this.context;if(e.length>0)return e[0].json})),s("ajax.params()",(function(){var e=this.context;if(e.length>0)return e[0].oAjaxData})),s("ajax.reload()",(function(e,t){return this.iterator("table",(function(n){bt(n,!1===t,e)}))})),s("ajax.url()",(function(t){var n=this.context;if(void 0===t){if(0===n.length)return;return(n=n[0]).ajax?e.isPlainObject(n.ajax)?n.ajax.url:n.ajax:n.sAjaxSource}return this.iterator("table",(function(n){e.isPlainObject(n.ajax)?n.ajax.url=t:n.ajax=t}))})),s("ajax.url().load()",(function(e,t){return this.iterator("table",(function(n){bt(n,!1===t,e)}))}));var Ct=function(t,n){var r,i,o,s,a,l,u=[];for(t&&"string"!=typeof t&&void 0!==t.length||(t=[t]),o=0,s=t.length;o<s;o++)for(a=0,l=(i=t[o]&&t[o].split?t[o].split(","):[t[o]]).length;a<l;a++)(r=n("string"==typeof i[a]?e.trim(i[a]):i[a]))&&r.length&&u.push.apply(u,r);return u},Tt=function(e){return e||(e={}),e.filter&&!e.search&&(e.search=e.filter),{search:e.search||"none",order:e.order||"current",page:e.page||"all"}},St=function(e){for(var t=0,n=e.length;t<n;t++)if(e[t].length>0)return e[0]=e[t],e.length=1,e.context=[e.context[t]],e;return e.length=0,e},wt=function(t,n){var r,i,o,s=[],a=t.aiDisplay,l=t.aiDisplayMaster,u=n.search,c=n.order,p=n.page;if("ssp"==yt(t))return"removed"===u?[]:C(0,l.length);if("current"==p)for(r=t._iDisplayStart,i=t.fnDisplayEnd();r<i;r++)s.push(a[r]);else if("current"==c||"applied"==c)s="none"==u?l.slice():"applied"==u?a.slice():e.map(l,(function(t,n){return-1===e.inArray(t,a)?t:null}));else if("index"==c||"original"==c)for(r=0,i=t.aoData.length;r<i;r++)("none"==u||-1===(o=e.inArray(r,a))&&"removed"==u||o>=0&&"applied"==u)&&s.push(r);return s};s("rows()",(function(t,n){void 0===t?t="":e.isPlainObject(t)&&(n=t,t=""),n=Tt(n);var r=this.iterator("table",(function(r){return function(t,n,r){return Ct(n,(function(n){var i=m(n);if(null!==i&&!r)return[i];var o=wt(t,r);if(null!==i&&-1!==e.inArray(i,o))return[i];if(!n)return o;for(var s=[],a=0,l=o.length;a<l;a++)s.push(t.aoData[o[a]].nTr);return n.nodeName&&-1!==e.inArray(n,s)?[n._DT_RowIndex]:e(s).filter(n).map((function(){return this._DT_RowIndex})).toArray()}))}(r,t,n)}));return r.selector.rows=t,r.selector.opts=n,r})),s("rows().nodes()",(function(){return this.iterator("row",(function(e,t){return e.aoData[t].nTr||void 0}))})),s("rows().data()",(function(){return this.iterator(!0,"rows",(function(e,t){return b(e.aoData,t,"_aData")}))})),a("rows().cache()","row().cache()",(function(e){return this.iterator("row",(function(t,n){var r=t.aoData[n];return"search"===e?r._aFilterData:r._aSortData}))})),a("rows().invalidate()","row().invalidate()",(function(e){return this.iterator("row",(function(t,n){ee(t,n,e)}))})),a("rows().indexes()","row().index()",(function(){return this.iterator("row",(function(e,t){return t}))})),a("rows().remove()","row().remove()",(function(){var t=this;return this.iterator("row",(function(n,r,i){var o=n.aoData;o.splice(r,1);for(var s=0,a=o.length;s<a;s++)null!==o[s].nTr&&(o[s].nTr._DT_RowIndex=s);e.inArray(r,n.aiDisplay),Z(n.aiDisplayMaster,r),Z(n.aiDisplay,r),Z(t[i],r,!1),mt(n)}))})),s("rows.add()",(function(e){var t=this.iterator("table",(function(t){var n,r,i,o=[];for(r=0,i=e.length;r<i;r++)(n=e[r]).nodeName&&"TR"===n.nodeName.toUpperCase()?o.push(q(t,n)[0]):o.push(H(t,n));return o})),n=this.rows(-1);return n.pop(),n.push.apply(n,t.toArray()),n})),s("row()",(function(e,t){return St(this.rows(e,t))})),s("row().data()",(function(e){var t=this.context;return void 0===e?t.length&&this.length?t[0].aoData[this[0]]._aData:void 0:(t[0].aoData[this[0]]._aData=e,ee(t[0],this[0],"data"),this)})),s("row().node()",(function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]].nTr||null})),s("row.add()",(function(t){t instanceof e&&t.length&&(t=t[0]);var n=this.iterator("table",(function(e){return t.nodeName&&"TR"===t.nodeName.toUpperCase()?q(e,t)[0]:H(e,t)}));return this.row(n[0])}));var Nt=function(e){var t=e.context;if(t.length&&e.length){var n=t[0].aoData[e[0]];n._details&&(n._details.remove(),n._detailsShow=void 0,n._details=void 0)}},Lt=function(e,t){var n=e.context;if(n.length&&e.length){var r=n[0].aoData[e[0]];r._details&&(r._detailsShow=t,t?r._details.insertAfter(r.nTr):r._details.detach(),It(n[0]))}},It=function(e){var t=new o(e),n=e.aoData;t.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details"),E(n,"_details").length>0&&(t.on("draw.dt.DT_details",(function(r,i){e===i&&t.rows({page:"current"}).eq(0).each((function(e){var t=n[e];t._detailsShow&&t._details.insertAfter(t.nTr)}))})),t.on("column-visibility.dt.DT_details",(function(t,r,i,o){if(e===r)for(var s,a=j(r),l=0,u=n.length;l<u;l++)(s=n[l])._details&&s._details.children("td[colspan]").attr("colspan",a)})),t.on("destroy.dt.DT_details",(function(t,r){if(e===r)for(var i=0,o=n.length;i<o;i++)n[i]._details&&Nt(n[i])})))};s("row().child()",(function(t,n){var r=this.context;return void 0===t?r.length&&this.length?r[0].aoData[this[0]]._details:void 0:(!0===t?this.child.show():!1===t?Nt(this):r.length&&this.length&&function(t,n,r,i){var o=[],s=function(n,r){if(n.nodeName&&"tr"===n.nodeName.toLowerCase())o.push(n);else{var i=e("<tr><td/></tr>").addClass(r);e("td",i).addClass(r).html(n)[0].colSpan=j(t),o.push(i[0])}};if(e.isArray(r)||r instanceof e)for(var a=0,l=r.length;a<l;a++)s(r[a],i);else s(r,i);n._details&&n._details.remove(),n._details=e(o),n._detailsShow&&n._details.insertAfter(n.nTr)}(r[0],r[0].aoData[this[0]],t,n),this)})),s(["row().child.show()","row().child().show()"],(function(e){return Lt(this,!0),this})),s(["row().child.hide()","row().child().hide()"],(function(){return Lt(this,!1),this})),s(["row().child.remove()","row().child().remove()"],(function(){return Nt(this),this})),s("row().child.isShown()",(function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]]._detailsShow||!1}));var At,Rt,_t,Ot=/^(.+):(name|visIdx|visible)$/;s("columns()",(function(t,n){void 0===t?t="":e.isPlainObject(t)&&(n=t,t=""),n=Tt(n);var r=this.iterator("table",(function(n){return function(t,n,r){var i=t.aoColumns,o=E(i,"sName"),s=E(i,"nTh");return Ct(n,(function(n){var r=m(n);if(""===n)return C(i.length);if(null!==r)return[r>=0?r:i.length+r];var a="string"==typeof n?n.match(Ot):"";if(!a)return e(s).filter(n).map((function(){return e.inArray(this,s)})).toArray();switch(a[2]){case"visIdx":case"visible":var l=parseInt(a[1],10);if(l<0){var u=e.map(i,(function(e,t){return e.bVisible?t:null}));return[u[u.length+l]]}return[M(t,l)];case"name":return e.map(o,(function(e,t){return e===a[1]?t:null}))}}))}(n,t)}));return r.selector.cols=t,r.selector.opts=n,r})),a("columns().header()","column().header()",(function(e,t){return this.iterator("column",(function(e,t){return e.aoColumns[t].nTh}))})),a("columns().footer()","column().footer()",(function(e,t){return this.iterator("column",(function(e,t){return e.aoColumns[t].nTf}))})),a("columns().data()","column().data()",(function(){return this.iterator("column-rows",(function(e,t,n,r,i){for(var o=[],s=0,a=i.length;s<a;s++)o.push(V(e,i[s],t,""));return o}))})),a("columns().cache()","column().cache()",(function(e){return this.iterator("column-rows",(function(t,n,r,i,o){return b(t.aoData,o,"search"===e?"_aFilterData":"_aSortData",n)}))})),a("columns().nodes()","column().nodes()",(function(){return this.iterator("column-rows",(function(e,t,n,r,i){return b(e.aoData,i,"anCells",t)}))})),a("columns().visible()","column().visible()",(function(t,n){return this.iterator("column",(function(r,i){return void 0===t?r.aoColumns[i].bVisible:function(t,n,r,i){var o,s,a,l,u=t.aoColumns,c=u[n],p=t.aoData;if(void 0===r)return c.bVisible;if(c.bVisible!==r){if(r){var d=e.inArray(!0,E(u,"bVisible"),n+1);for(s=0,a=p.length;s<a;s++)l=p[s].nTr,o=p[s].anCells,l&&l.insertBefore(o[n],o[d]||null)}else e(E(t.aoData,"anCells",n)).detach();c.bVisible=r,oe(t,t.aoHeader),oe(t,t.aoFooter),(void 0===i||i)&&(P(t),(t.oScroll.sX||t.oScroll.sY)&&Ge(t)),gt(t,null,"column-visibility",[t,n,r]),at(t)}}(r,i,t,n)}))})),a("columns().indexes()","column().index()",(function(e){return this.iterator("column",(function(t,n){return"visible"===e?F(t,n):n}))})),s("columns.adjust()",(function(){return this.iterator("table",(function(e){P(e)}))})),s("column.index()",(function(e,t){if(0!==this.context.length){var n=this.context[0];if("fromVisible"===e||"toData"===e)return M(n,t);if("fromData"===e||"toVisible"===e)return F(n,t)}})),s("column()",(function(e,t){return St(this.columns(e,t))})),s("cells()",(function(t,n,r){if(e.isPlainObject(t)&&(void 0!==typeof t.row?(r=n,n=null):(r=t,t=null)),e.isPlainObject(n)&&(r=n,n=null),null==n)return this.iterator("table",(function(n){return function(t,n,r){var i,o,s,a,l,u=t.aoData,c=wt(t,r),p=b(u,c,"anCells"),d=e([].concat.apply([],p)),f=t.aoColumns.length;return Ct(n,(function(t){if(null==t){for(o=[],s=0,a=c.length;s<a;s++)for(i=c[s],l=0;l<f;l++)o.push({row:i,column:l});return o}return e.isPlainObject(t)?[t]:d.filter(t).map((function(t,n){return{row:i=n.parentNode._DT_RowIndex,column:e.inArray(n,u[i].anCells)}})).toArray()}))}(n,t,Tt(r))}));var i,o,s,a,l,u=this.columns(n,r),c=this.rows(t,r),p=this.iterator("table",(function(e,t){for(i=[],o=0,s=c[t].length;o<s;o++)for(a=0,l=u[t].length;a<l;a++)i.push({row:c[t][o],column:u[t][a]});return i}));return e.extend(p.selector,{cols:n,rows:t,opts:r}),p})),a("cells().nodes()","cell().node()",(function(){return this.iterator("cell",(function(e,t,n){return e.aoData[t].anCells[n]}))})),s("cells().data()",(function(){return this.iterator("cell",(function(e,t,n){return V(e,t,n)}))})),a("cells().cache()","cell().cache()",(function(e){return e="search"===e?"_aFilterData":"_aSortData",this.iterator("cell",(function(t,n,r){return t.aoData[n][e][r]}))})),a("cells().indexes()","cell().index()",(function(){return this.iterator("cell",(function(e,t,n){return{row:t,column:n,columnVisible:F(e,n)}}))})),s(["cells().invalidate()","cell().invalidate()"],(function(e){var t=this.selector;return this.rows(t.rows,t.opts).invalidate(e),this})),s("cell()",(function(e,t,n){return St(this.cells(e,t,n))})),s("cell().data()",(function(e){var t=this.context,n=this[0];return void 0===e?t.length&&n.length?V(t[0],n[0].row,n[0].column):void 0:(W(t[0],n[0].row,n[0].column,e),ee(t[0],n[0].row,"data",n[0].column),this)})),s("order()",(function(t,n){var r=this.context;return void 0===t?0!==r.length?r[0].aaSorting:void 0:("number"==typeof t?t=[[t,n]]:e.isArray(t[0])||(t=Array.prototype.slice.call(arguments)),this.iterator("table",(function(e){e.aaSorting=t.slice()})))})),s("order.listener()",(function(e,t,n){return this.iterator("table",(function(r){it(r,e,t,n)}))})),s(["columns().order()","column().order()"],(function(t){var n=this;return this.iterator("table",(function(r,i){var o=[];e.each(n[i],(function(e,n){o.push([n,t])})),r.aaSorting=o}))})),s("search()",(function(t,n,r,i){var o=this.context;return void 0===t?0!==o.length?o[0].oPreviousSearch.sSearch:void 0:this.iterator("table",(function(o){o.oFeatures.bFilter&&ve(o,e.extend({},o.oPreviousSearch,{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===r||r,bCaseInsensitive:null===i||i}),1)}))})),a("columns().search()","column().search()",(function(t,n,r,i){return this.iterator("column",(function(o,s){var a=o.aoPreSearchCols;if(void 0===t)return a[s].sSearch;o.oFeatures.bFilter&&(e.extend(a[s],{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===r||r,bCaseInsensitive:null===i||i}),ve(o,o.oPreviousSearch,1))}))})),s("state()",(function(){return this.context.length?this.context[0].oSavedState:null})),s("state.clear()",(function(){return this.iterator("table",(function(e){e.fnStateSaveCallback.call(e.oInstance,e,{})}))})),s("state.loaded()",(function(){return this.context.length?this.context[0].oLoadedState:null})),s("state.save()",(function(){return this.iterator("table",(function(e){at(e)}))})),n.versionCheck=n.fnVersionCheck=function(e){for(var t,r,i=n.version.split("."),o=e.split("."),s=0,a=o.length;s<a;s++)if((t=parseInt(i[s],10)||0)!==(r=parseInt(o[s],10)||0))return t>r;return!0},n.isDataTable=n.fnIsDataTable=function(t){var r=e(t).get(0),i=!1;return e.each(n.settings,(function(e,t){t.nTable!==r&&t.nScrollHead!==r&&t.nScrollFoot!==r||(i=!0)})),i},n.tables=n.fnTables=function(t){return jQuery.map(n.settings,(function(n){if(!t||t&&e(n.nTable).is(":visible"))return n.nTable}))},n.camelToHungarian=N,s("$()",(function(t,n){var r=this.rows(n).nodes(),i=e(r);return e([].concat(i.filter(t).toArray(),i.find(t).toArray()))})),e.each(["on","one","off"],(function(t,n){s(n+"()",(function(){var t=Array.prototype.slice.call(arguments);t[0].match(/\.dt\b/)||(t[0]+=".dt");var r=e(this.tables().nodes());return r[n].apply(r,t),this}))})),s("clear()",(function(){return this.iterator("table",(function(e){J(e)}))})),s("settings()",(function(){return new o(this.context,this.context)})),s("data()",(function(){return this.iterator("table",(function(e){return E(e.aoData,"_aData")})).flatten()})),s("destroy()",(function(r){return r=r||!1,this.iterator("table",(function(i){var s,a=i.nTableWrapper.parentNode,l=i.oClasses,u=i.nTable,c=i.nTBody,p=i.nTHead,d=i.nTFoot,f=e(u),h=e(c),g=e(i.nTableWrapper),m=e.map(i.aoData,(function(e){return e.nTr}));i.bDestroying=!0,gt(i,"aoDestroyCallback","destroy",[i]),r||new o(i).columns().visible(!0),g.unbind(".DT").find(":not(tbody *)").unbind(".DT"),e(t).unbind(".DT-"+i.sInstance),u!=p.parentNode&&(f.children("thead").detach(),f.append(p)),d&&u!=d.parentNode&&(f.children("tfoot").detach(),f.append(d)),f.detach(),g.detach(),i.aaSorting=[],i.aaSortingFixed=[],ot(i),e(m).removeClass(i.asStripeClasses.join(" ")),e("th, td",p).removeClass(l.sSortable+" "+l.sSortableAsc+" "+l.sSortableDesc+" "+l.sSortableNone),i.bJUI&&(e("th span."+l.sSortIcon+", td span."+l.sSortIcon,p).detach(),e("th, td",p).each((function(){var t=e("div."+l.sSortJUIWrapper,this);e(this).append(t.contents()),t.detach()}))),!r&&a&&a.insertBefore(u,i.nTableReinsertBefore),h.children().detach(),h.append(m),f.css("width",i.sDestroyWidth).removeClass(l.sTable),(s=i.asDestroyStripes.length)&&h.children().each((function(t){e(this).addClass(i.asDestroyStripes[t%s])}));var v=e.inArray(i,n.settings);-1!==v&&n.settings.splice(v,1)}))})),n.version="1.10.2",n.settings=[],n.models={},n.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0},n.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null},n.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},n.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(e){try{return JSON.parse((-1===e.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+e.sInstance+"_"+location.pathname))}catch(e){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(e,t){try{(-1===e.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+e.sInstance+"_"+location.pathname,JSON.stringify(t))}catch(e){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"yasr.empty.table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"yasr.loading.label",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:e.extend({},n.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null},w(n.defaults),n.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},w(n.defaults.column),n.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:void 0,oAjaxData:void 0,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==yt(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==yt(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var e=this._iDisplayLength,t=this._iDisplayStart,n=t+e,r=this.aiDisplay.length,i=this.oFeatures,o=i.bPaginate;return i.bServerSide?!1===o||-1===e?t+r:Math.min(t+e,this._iRecordsDisplay):!o||n>r||-1===e?r:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{}},n.ext=i={classes:{},errMode:"alert",feature:[],search:[],internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:n.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:n.version},e.extend(i,{afnFiltering:i.search,aTypes:i.type.detect,ofnSearch:i.type.search,oSort:i.type.order,afnSortData:i.order,aoFeatures:i.feature,oApi:i.internal,oStdClasses:i.classes,oPagination:i.pager}),e.extend(n.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""}),At="ui-state-default",Rt="css_right ui-icon ui-icon-",_t="fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix",e.extend(n.ext.oJUIClasses,n.ext.classes,{sPageButton:"fg-button ui-button "+At,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:At+" sorting_asc",sSortDesc:At+" sorting_desc",sSortable:At+" sorting",sSortableAsc:At+" sorting_asc_disabled",sSortableDesc:At+" sorting_desc_disabled",sSortableNone:At+" sorting_disabled",sSortJUIAsc:Rt+"triangle-1-n",sSortJUIDesc:Rt+"triangle-1-s",sSortJUI:Rt+"carat-2-n-s",sSortJUIAscAllowed:Rt+"carat-1-n",sSortJUIDescAllowed:Rt+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+At,sScrollFoot:"dataTables_scrollFoot "+At,sHeaderTH:At,sFooterTH:At,sJUIHeader:_t+" ui-corner-tl ui-corner-tr",sJUIFooter:_t+" ui-corner-bl ui-corner-br"});var Dt=n.ext.pager;function kt(e,t){var n=[],r=Dt.numbers_length,i=Math.floor(r/2);return t<=r?n=C(0,t):e<=i?((n=C(0,r-2)).push("ellipsis"),n.push(t-1)):e>=t-1-i?((n=C(t-(r-2),t)).splice(0,0,"ellipsis"),n.splice(0,0,0)):((n=C(e-1,e+2)).push("ellipsis"),n.push(t-1),n.splice(0,0,"ellipsis"),n.splice(0,0,0)),n.DT_el="span",n}e.extend(Dt,{simple:function(e,t){return["previous","next"]},full:function(e,t){return["first","previous","next","last"]},simple_numbers:function(e,t){return["previous",kt(e,t),"next"]},full_numbers:function(e,t){return["first","previous",kt(e,t),"next","last"]},_numbers:kt,numbers_length:7}),e.extend(!0,n.ext.renderer,{pageButton:{_:function(t,n,i,o,s,a){var l,u,c=t.oClasses,p=t.oLanguage.oPaginate,d=0,f=function(n,r){var o,h,g,m=function(e){Me(t,e.data.action,!0)};for(o=0,h=r.length;o<h;o++)if(g=r[o],e.isArray(g)){var v=e("<"+(g.DT_el||"div")+"/>").appendTo(n);f(v,g)}else{switch(l="",u="",g){case"ellipsis":n.append("<span>…</span>");break;case"first":l=p.sFirst,u=g+(s>0?"":" "+c.sPageButtonDisabled);break;case"previous":l=p.sPrevious,u=g+(s>0?"":" "+c.sPageButtonDisabled);break;case"next":l=p.sNext,u=g+(s<a-1?"":" "+c.sPageButtonDisabled);break;case"last":l=p.sLast,u=g+(s<a-1?"":" "+c.sPageButtonDisabled);break;default:l=g+1,u=s===g?c.sPageButtonActive:""}l&&(ft(e("<a>",{class:c.sPageButton+" "+u,"aria-controls":t.sTableId,"data-dt-idx":d,tabindex:t.iTabIndex,id:0===i&&"string"==typeof g?t.sTableId+"_"+g:null}).html(l).appendTo(n),{action:g},m),d++)}};try{var h=e(r.activeElement).data("dt-idx");f(e(n).empty(),o),null!==h&&e(n).find("[data-dt-idx="+h+"]").focus()}catch(e){}}}});var Pt=function(e,t,n,r){return e&&"-"!==e?(t&&(e=v(e,t)),e.replace&&(n&&(e=e.replace(n,"")),r&&(e=e.replace(r,""))),1*e):-1/0};function Mt(t){e.each({num:function(e){return Pt(e,t)},"num-fmt":function(e){return Pt(e,t,h)},"html-num":function(e){return Pt(e,t,c)},"html-num-fmt":function(e){return Pt(e,t,c,h)}},(function(e,n){i.type.order[e+t+"-pre"]=n}))}function Ft(e){return function(){var t=[ut(this[n.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return n.ext.internal[e].apply(this,t)}}return e.extend(i.type.order,{"date-pre":function(e){return Date.parse(e)||0},"html-pre":function(e){return g(e)?"":e.replace?e.replace(/<.*?>/g,"").toLowerCase():e+""},"string-pre":function(e){return g(e)?"":"string"==typeof e?e.toLowerCase():e.toString?e.toString():""},"string-asc":function(e,t){return e<t?-1:e>t?1:0},"string-desc":function(e,t){return e<t?1:e>t?-1:0}}),Mt(""),e.extend(n.ext.type.detect,[function(e,t){var n=t.oLanguage.sDecimal;return y(e,n)?"num"+n:null},function(e,t){if(e&&(!p.test(e)||!d.test(e)))return null;var n=Date.parse(e);return null!==n&&!isNaN(n)||g(e)?"date":null},function(e,t){var n=t.oLanguage.sDecimal;return y(e,n,!0)?"num-fmt"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return x(e,n)?"html-num"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return x(e,n,!0)?"html-num-fmt"+n:null},function(e,t){return g(e)||"string"==typeof e&&-1!==e.indexOf("<")?"html":null}]),e.extend(n.ext.type.search,{html:function(e){return g(e)?e:"string"==typeof e?e.replace(u," ").replace(c,""):""},string:function(e){return g(e)?e:"string"==typeof e?e.replace(u," "):e}}),e.extend(!0,n.ext.renderer,{header:{_:function(t,n,r,i){e(t.nTable).on("order.dt.DT",(function(e,o,s,a){if(t===o){var l=r.idx;n.removeClass(r.sSortingClass+" "+i.sSortAsc+" "+i.sSortDesc).addClass("asc"==a[l]?i.sSortAsc:"desc"==a[l]?i.sSortDesc:r.sSortingClass)}}))},jqueryui:function(t,n,r,i){var o=r.idx;e("<div/>").addClass(i.sSortJUIWrapper).append(n.contents()).append(e("<span/>").addClass(i.sSortIcon+" "+r.sSortingClassJUI)).appendTo(n),e(t.nTable).on("order.dt.DT",(function(e,s,a,l){t===s&&(n.removeClass(i.sSortAsc+" "+i.sSortDesc).addClass("asc"==l[o]?i.sSortAsc:"desc"==l[o]?i.sSortDesc:r.sSortingClass),n.find("span."+i.sSortIcon).removeClass(i.sSortJUIAsc+" "+i.sSortJUIDesc+" "+i.sSortJUI+" "+i.sSortJUIAscAllowed+" "+i.sSortJUIDescAllowed).addClass("asc"==l[o]?i.sSortJUIAsc:"desc"==l[o]?i.sSortJUIDesc:r.sSortingClassJUI))}))}}}),n.render={number:function(e,t,n,r){return{display:function(i){var o=i<0?"-":"";i=Math.abs(parseFloat(i));var s=parseInt(i,10),a=n?t+(i-s).toFixed(n).substring(2):"";return o+(r||"")+s.toString().replace(/\B(?=(\d{3})+(?!\d))/g,e)+a}}}},e.extend(n.ext.internal,{_fnExternApiFunc:Ft,_fnBuildAjax:pe,_fnAjaxUpdate:de,_fnAjaxParameters:fe,_fnAjaxUpdateDraw:he,_fnAjaxDataSrc:ge,_fnAddColumn:D,_fnColumnOptions:k,_fnAdjustColumnSizing:P,_fnVisibleToColumnIndex:M,_fnColumnIndexToVisible:F,_fnVisbleColumns:j,_fnGetColumns:U,_fnColumnTypes:G,_fnApplyColumnDefs:B,_fnHungarianMap:w,_fnCamelToHungarian:N,_fnLanguageCompat:L,_fnBrowserDetect:_,_fnAddData:H,_fnAddTr:q,_fnNodeToDataIndex:function(e,t){return void 0!==t._DT_RowIndex?t._DT_RowIndex:null},_fnNodeToColumnIndex:function(t,n,r){return e.inArray(r,t.aoData[n].anCells)},_fnGetCellData:V,_fnSetCellData:W,_fnSplitObjNotation:Q,_fnGetObjectDataFn:X,_fnSetObjectDataFn:Y,_fnGetDataMaster:K,_fnClearTable:J,_fnDeleteIndex:Z,_fnInvalidateRow:ee,_fnGetRowElements:te,_fnCreateTr:ne,_fnBuildHead:ie,_fnDrawHead:oe,_fnDraw:se,_fnReDraw:ae,_fnAddOptionsHtml:le,_fnDetectHeader:ue,_fnGetUniqueThs:ce,_fnFeatureHtmlFilter:me,_fnFilterComplete:ve,_fnFilterCustom:ye,_fnFilterColumn:xe,_fnFilter:Ee,_fnFilterCreateSearch:be,_fnEscapeRegex:Ce,_fnFilterData:we,_fnFeatureHtmlInfo:Ie,_fnUpdateInfo:Ae,_fnInfoMacros:Re,_fnInitialise:_e,_fnInitComplete:Oe,_fnLengthChange:De,_fnFeatureHtmlLength:ke,_fnFeatureHtmlPaginate:Pe,_fnPageChange:Me,_fnFeatureHtmlProcessing:Fe,_fnProcessingDisplay:je,_fnFeatureHtmlTable:Ue,_fnScrollDraw:Ge,_fnApplyToChildren:Be,_fnCalculateColumnWidths:qe,_fnThrottle:Ve,_fnConvertToWidth:We,_fnScrollingWidthAdjust:ze,_fnGetWidestNode:$e,_fnGetMaxLenString:Qe,_fnStringToCss:Xe,_fnScrollBarWidth:Ye,_fnSortFlatten:Ke,_fnSort:Je,_fnSortAria:nt,_fnSortListener:rt,_fnSortAttachListener:it,_fnSortingClasses:ot,_fnSortData:st,_fnSaveState:at,_fnLoadState:lt,_fnSettingsFromNode:ut,_fnLog:ct,_fnMap:pt,_fnBindAction:ft,_fnCallbackReg:ht,_fnCallbackFire:gt,_fnLengthOverflow:mt,_fnRenderer:vt,_fnDataSource:yt,_fnRowAttributes:re,_fnCalculateEnd:function(){}}),e.fn.dataTable=n,e.fn.dataTableSettings=n.settings,e.fn.dataTableExt=n.ext,e.fn.DataTable=function(t){return e(this).dataTable(t).api()},e.each(n,(function(t,n){e.fn.DataTable[t]=n})),e.fn.dataTable}))}(window,document)},{jquery:18}],3:[function(e,t,n){var r,i=e("jquery"),o=i(document),s=i("head"),a=null,l=[],u=0,c="px",p="JColResizer",d=parseInt,f=Math,h=navigator.userAgent.indexOf("Trident/4.0")>0;try{r=sessionStorage}catch(e){}s.append("<style type='text/css'> .JColResizer{table-layout:fixed;} .JColResizer td, .JColResizer th{overflow:hidden;padding-left:0!important; padding-right:0!important;} .JCLRgrips{ height:0px; position:relative;} .JCLRgrip{margin-left:-5px; position:absolute; z-index:5; } .JCLRgrip .JColResizer{position:absolute;background-color:red;filter:alpha(opacity=1);opacity:0;width:10px;height:100%;top:0px} .JCLRLastGrip{position:absolute; width:1px; } .JCLRgripDrag{ border-left:1px dotted black;\t}</style>");var g=function(e){var t=e.attr("id");(e=l[t])&&e.is("table")&&(e.removeClass(p).gc.remove(),delete l[t])},m=function(e){var t=e.find(">thead>tr>th,>thead>tr>td");t.length||(t=e.find(">tbody>tr:first>th,>tr:first>th,>tbody>tr:first>td, >tr:first>td")),e.cg=e.find("col"),e.ln=t.length,e.p&&r&&r[e.id]&&v(e,t),t.each((function(t){var n=i(this),r=i(e.gc.append('<div class="JCLRgrip"></div>')[0].lastChild);r.t=e,r.i=t,r.c=n,n.w=n.width(),e.g.push(r),e.c.push(n),t<e.ln-1?r.bind("touchstart mousedown",C).append(e.opt.gripInnerHtml).append('<div class="'+p+'" style="cursor:'+e.opt.hoverCursor+'"></div>'):r.addClass("JCLRLastGrip").removeClass("JCLRgrip"),r.data(p,{i:t,t:e.attr("id")})})),e.cg.removeAttr("width"),y(e),e.find("td, th").not(t).not("table th, table td").each((function(){i(this).removeAttr("width")}))},v=function(e,t){var n,i=0,o=0,s=[];if(t){if(e.cg.removeAttr("width"),e.opt.flush)return void(r[e.id]="");for(n=r[e.id].split(";");o<e.ln;o++)s.push(100*n[o]/n[e.ln]+"%"),t.eq(o).css("width",s[o]);for(o=0;o<e.ln;o++)e.cg.eq(o).css("width",s[o])}else{for(r[e.id]="";o<e.c.length;o++)n=e.c[o].width(),r[e.id]+=n+";",i+=n;r[e.id]+=i}},y=function(e){e.gc.width(e.w);for(var t=0;t<e.ln;t++){var n=e.c[t];e.g[t].css({left:n.offset().left-e.offset().left+n.outerWidth(!1)+e.cs/2+c,height:e.opt.headerOnly?e.c[0].outerHeight(!1):e.outerHeight(!1)})}},x=function(e,t,n){var r=a.x-a.l,i=e.c[t],o=e.c[t+1],s=i.w+r,l=o.w-r;i.width(s+c),o.width(l+c),e.cg.eq(t).width(s+c),e.cg.eq(t+1).width(l+c),n&&(i.w=s,o.w=l)},E=function(e){if(a){var t=a.t;if(e.originalEvent.touches)var n=e.originalEvent.touches[0].pageX-a.ox+a.l;else n=e.pageX-a.ox+a.l;var r=t.opt.minWidth,i=a.i,o=1.5*t.cs+r+t.b,s=i==t.ln-1?t.w-o:t.g[i+1].position().left-t.cs-r,l=i?t.g[i-1].position().left+t.cs+r:o;if(n=f.max(l,f.min(s,n)),a.x=n,a.css("left",n+c),t.opt.liveDrag){x(t,i),y(t);var u=t.opt.onDrag;u&&(e.currentTarget=t[0],u(e))}return!1}},b=function(e){if(o.unbind("touchend."+p+" mouseup."+p).unbind("touchmove."+p+" mousemove."+p),i("head :last-child").remove(),a){a.removeClass(a.t.opt.draggingClass);var t=a.t,n=t.opt.onResize;a.x&&(x(t,a.i,!0),y(t),n&&(e.currentTarget=t[0],n(e))),t.p&&r&&v(t),a=null}},C=function(e){var t=i(this).data(p),n=l[t.t],r=n.g[t.i];if(e.originalEvent.touches?r.ox=e.originalEvent.touches[0].pageX:r.ox=e.pageX,r.l=r.position().left,o.bind("touchmove."+p+" mousemove."+p,E).bind("touchend."+p+" mouseup."+p,b),s.append("<style type='text/css'>*{cursor:"+n.opt.dragCursor+"!important}</style>"),r.addClass(n.opt.draggingClass),a=r,n.c[t.i].l)for(var u,c=0;c<n.ln;c++)(u=n.c[c]).l=!1,u.w=u.width();return!1};i(window).bind("resize."+p,(function(){for(e in l){var e=l[e];e.removeClass(p),e.w!=e.width()&&(e.w=e.width()),y(e.addClass(p))}})),i.fn.extend({colResizable:function(e){return e=i.extend({draggingClass:"JCLRgripDrag",gripInnerHtml:"",liveDrag:!1,minWidth:15,headerOnly:!1,hoverCursor:"e-resize",dragCursor:"e-resize",postbackSafe:!1,flush:!1,marginLeft:null,marginRight:null,disable:!1,onDrag:null,onResize:null},e),this.each((function(){!function(e,t){var n=i(e);if(t.disable)return g(n);var r=n.id=n.attr("id")||p+u++;n.p=t.postbackSafe,n.is("table")&&!l[r]&&(n.addClass(p).attr("id",r).before('<div class="JCLRgrips"/>'),n.opt=t,n.g=[],n.c=[],n.w=n.width(),n.gc=n.prev(),t.marginLeft&&n.gc.css("marginLeft",t.marginLeft),t.marginRight&&n.gc.css("marginRight",t.marginRight),n.cs=d(h?e.cellSpacing||e.currentStyle.borderSpacing:n.css("border-spacing"))||2,n.b=d(h?e.border||e.currentStyle.borderLeftWidth:n.css("border-left-width"))||1,l[r]=n,setTimeout((function(){n.w=n.width(),m(n)}),0))}(this,e)}))}})},{jquery:18}],4:[function(e,t,n){RegExp.escape=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};var r=e("jquery");r.csv={defaults:{separator:",",delimiter:'"',headers:!0},hooks:{castToScalar:function(e,t){if(isNaN(e))return e;if(/\./.test(e))return parseFloat(e);var n=parseInt(e);return isNaN(n)?null:n}},parsers:{parse:function(e,t){var n=t.separator,r=t.delimiter;t.state.rowNum||(t.state.rowNum=1),t.state.colNum||(t.state.colNum=1);var i=[],o=[],s=0,a="",l=!1;function u(){if(s=0,a="",t.start&&t.state.rowNum<t.start)return o=[],t.state.rowNum++,void(t.state.colNum=1);if(void 0===t.onParseEntry)i.push(o);else{var e=t.onParseEntry(o,t.state);!1!==e&&i.push(e)}o=[],t.end&&t.state.rowNum>=t.end&&(l=!0),t.state.rowNum++,t.state.colNum=1}function c(){if(void 0===t.onParseValue)o.push(a);else{var e=t.onParseValue(a,t.state);!1!==e&&o.push(e)}a="",s=0,t.state.colNum++}var p=RegExp.escape(n),d=RegExp.escape(r),f=/(D|S|\n|\r|[^DS\r\n]+)/,h=f.source;return h=(h=h.replace(/S/g,p)).replace(/D/g,d),f=RegExp(h,"gm"),e.replace(f,(function(e){if(!l)switch(s){case 0:if(e===n){a+="",c();break}if(e===r){s=1;break}if("\n"===e){c(),u();break}if(/^\r$/.test(e))break;a+=e,s=3;break;case 1:if(e===r){s=2;break}a+=e,s=1;break;case 2:if(e===r){a+=e,s=1;break}if(e===n){c();break}if("\n"===e){c(),u();break}if(/^\r$/.test(e))break;throw new Error("CSVDataError: Illegal State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");case 3:if(e===n){c();break}if("\n"===e){c(),u();break}if(/^\r$/.test(e))break;if(e===r)throw new Error("CSVDataError: Illegal Quote [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");throw new Error("CSVDataError: Illegal Data [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");default:throw new Error("CSVDataError: Unknown State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]")}})),0!==o.length&&(c(),u()),i},splitLines:function(e,t){var n=t.separator,r=t.delimiter;t.state.rowNum||(t.state.rowNum=1);var i=[],o=0,s="",a=!1;function l(){if(o=0,t.start&&t.state.rowNum<t.start)return s="",void t.state.rowNum++;if(void 0===t.onParseEntry)i.push(s);else{var e=t.onParseEntry(s,t.state);!1!==e&&i.push(e)}s="",t.end&&t.state.rowNum>=t.end&&(a=!0),t.state.rowNum++}var u=RegExp.escape(n),c=RegExp.escape(r),p=/(D|S|\n|\r|[^DS\r\n]+)/,d=p.source;return d=(d=d.replace(/S/g,u)).replace(/D/g,c),p=RegExp(d,"gm"),e.replace(p,(function(e){if(!a)switch(o){case 0:if(e===n){s+=e,o=0;break}if(e===r){s+=e,o=1;break}if("\n"===e){l();break}if(/^\r$/.test(e))break;s+=e,o=3;break;case 1:if(e===r){s+=e,o=2;break}s+=e,o=1;break;case 2:var i=s.substr(s.length-1);if(e===r&&i===r){s+=e,o=1;break}if(e===n){s+=e,o=0;break}if("\n"===e){l();break}if("\r"===e)break;throw new Error("CSVDataError: Illegal state [Row:"+t.state.rowNum+"]");case 3:if(e===n){s+=e,o=0;break}if("\n"===e){l();break}if("\r"===e)break;if(e===r)throw new Error("CSVDataError: Illegal quote [Row:"+t.state.rowNum+"]");throw new Error("CSVDataError: Illegal state [Row:"+t.state.rowNum+"]");default:throw new Error("CSVDataError: Unknown state [Row:"+t.state.rowNum+"]")}})),""!==s&&l(),i},parseEntry:function(e,t){var n=t.separator,r=t.delimiter;t.state.rowNum||(t.state.rowNum=1),t.state.colNum||(t.state.colNum=1);var i=[],o=0,s="";function a(){if(void 0===t.onParseValue)i.push(s);else{var e=t.onParseValue(s,t.state);!1!==e&&i.push(e)}s="",o=0,t.state.colNum++}if(!t.match){var l=RegExp.escape(n),u=RegExp.escape(r),c=/(D|S|\n|\r|[^DS\r\n]+)/.source;c=(c=c.replace(/S/g,l)).replace(/D/g,u),t.match=RegExp(c,"gm")}return e.replace(t.match,(function(e){switch(o){case 0:if(e===n){s+="",a();break}if(e===r){o=1;break}if("\n"===e||"\r"===e)break;s+=e,o=3;break;case 1:if(e===r){o=2;break}s+=e,o=1;break;case 2:if(e===r){s+=e,o=1;break}if(e===n){a();break}if("\n"===e||"\r"===e)break;throw new Error("CSVDataError: Illegal State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");case 3:if(e===n){a();break}if("\n"===e||"\r"===e)break;if(e===r)throw new Error("CSVDataError: Illegal Quote [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");throw new Error("CSVDataError: Illegal Data [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");default:throw new Error("CSVDataError: Unknown State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]")}})),a(),i}},toArray:function(e,t,n){t=void 0!==t?t:{};var i={};i.callback=void 0!==n&&"function"==typeof n&&n,i.separator="separator"in t?t.separator:r.csv.defaults.separator,i.delimiter="delimiter"in t?t.delimiter:r.csv.defaults.delimiter;var o=void 0!==t.state?t.state:{},s=(t={delimiter:i.delimiter,separator:i.separator,onParseEntry:t.onParseEntry,onParseValue:t.onParseValue,state:o},r.csv.parsers.parseEntry(e,t));if(!i.callback)return s;i.callback("",s)},toArrays:function(e,t,n){t=void 0!==t?t:{};var i,o={};if(o.callback=void 0!==n&&"function"==typeof n&&n,o.separator="separator"in t?t.separator:r.csv.defaults.separator,o.delimiter="delimiter"in t?t.delimiter:r.csv.defaults.delimiter,t={delimiter:o.delimiter,separator:o.separator,onParseEntry:t.onParseEntry,onParseValue:t.onParseValue,start:t.start,end:t.end,state:{rowNum:1,colNum:1}},i=r.csv.parsers.parse(e,t),!o.callback)return i;o.callback("",i)},toObjects:function(e,t,n){t=void 0!==t?t:{};var i={};i.callback=void 0!==n&&"function"==typeof n&&n,i.separator="separator"in t?t.separator:r.csv.defaults.separator,i.delimiter="delimiter"in t?t.delimiter:r.csv.defaults.delimiter,i.headers="headers"in t?t.headers:r.csv.defaults.headers,t.start="start"in t?t.start:1,i.headers&&t.start++,t.end&&i.headers&&t.end++;var o=[],s=(t={delimiter:i.delimiter,separator:i.separator,onParseEntry:t.onParseEntry,onParseValue:t.onParseValue,start:t.start,end:t.end,state:{rowNum:1,colNum:1},match:!1},{delimiter:i.delimiter,separator:i.separator,start:1,end:1,state:{rowNum:1,colNum:1}}),a=r.csv.parsers.splitLines(e,s),l=r.csv.toArray(a[0],t),u=r.csv.parsers.splitLines(e,t);t.state.colNum=1,t.state.rowNum=l?2:1;for(var c=0,p=u.length;c<p;c++){var d=r.csv.toArray(u[c],t),f={};for(var h in l)f[l[h]]=d[h];o.push(f),t.state.rowNum++}if(!i.callback)return o;i.callback("",o)},fromArrays:function(e,t,n){t=void 0!==t?t:{};var o={};if(o.callback=void 0!==n&&"function"==typeof n&&n,o.separator="separator"in t?t.separator:r.csv.defaults.separator,o.delimiter="delimiter"in t?t.delimiter:r.csv.defaults.delimiter,o.escaper="escaper"in t?t.escaper:r.csv.defaults.escaper,o.experimental="experimental"in t&&t.experimental,!o.experimental)throw new Error("not implemented");var s=[];for(i in e)s.push(e[i]);if(!o.callback)return s;o.callback("",s)},fromObjects2CSV:function(e,t,n){t=void 0!==t?t:{};var o={};if(o.callback=void 0!==n&&"function"==typeof n&&n,o.separator="separator"in t?t.separator:r.csv.defaults.separator,o.delimiter="delimiter"in t?t.delimiter:r.csv.defaults.delimiter,o.experimental="experimental"in t&&t.experimental,!o.experimental)throw new Error("not implemented");var s=[];for(i in e)s.push(arrays[i]);if(!o.callback)return s;o.callback("",s)}},r.csvEntry2Array=r.csv.toArray,r.csv2Array=r.csv.toArrays,r.csv2Dictionary=r.csv.toObjects},{jquery:18}],5:[function(e,t,n){var r;r=function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function i(e,t,i,s){var a=e.getLineHandle(t.line),l=t.ch-1,u=l>=0&&r[a.text.charAt(l)]||r[a.text.charAt(++l)];if(!u)return null;var c=">"==u.charAt(1)?1:-1;if(i&&c>0!=(l==t.ch))return null;var p=e.getTokenTypeAt(n(t.line,l+1)),d=o(e,n(t.line,l+(c>0?1:0)),c,p||null,s);return null==d?null:{from:n(t.line,l),to:d&&d.pos,match:d&&d.ch==u.charAt(0),forward:c>0}}function o(e,t,i,o,s){for(var a=s&&s.maxScanLineLength||1e4,l=s&&s.maxScanLines||1e3,u=[],c=s&&s.bracketRegex?s.bracketRegex:/[(){}[\]]/,p=i>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),d=t.line;d!=p;d+=i){var f=e.getLine(d);if(f){var h=i>0?0:f.length-1,g=i>0?f.length:-1;if(!(f.length>a))for(d==t.line&&(h=t.ch-(i<0?1:0));h!=g;h+=i){var m=f.charAt(h);if(c.test(m)&&(void 0===o||e.getTokenTypeAt(n(d,h+1))==o))if(">"==r[m].charAt(1)==i>0)u.push(m);else{if(!u.length)return{pos:n(d,h),ch:m};u.pop()}}}}return d-i!=(i>0?e.lastLine():e.firstLine())&&null}function s(e,r,o){for(var s=e.state.matchBrackets.maxHighlightLineLength||1e3,a=[],l=e.listSelections(),u=0;u<l.length;u++){var c=l[u].empty()&&i(e,l[u].head,!1,o);if(c&&e.getLine(c.from.line).length<=s){var p=c.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";a.push(e.markText(c.from,n(c.from.line,c.from.ch+1),{className:p})),c.to&&e.getLine(c.to.line).length<=s&&a.push(e.markText(c.to,n(c.to.line,c.to.ch+1),{className:p}))}}if(a.length){t&&e.state.focused&&e.display.input.focus();var d=function(){e.operation((function(){for(var e=0;e<a.length;e++)a[e].clear()}))};if(!r)return d;setTimeout(d,800)}}var a=null;function l(e){e.operation((function(){a&&(a(),a=null),a=s(e,!1,e.state.matchBrackets)}))}e.defineOption("matchBrackets",!1,(function(t,n,r){r&&r!=e.Init&&t.off("cursorActivity",l),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",l))})),e.defineExtension("matchBrackets",(function(){s(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,n){return i(this,e,t,n)})),e.defineExtension("scanForBracket",(function(e,t,n,r){return o(this,e,t,n,r)}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],6:[function(e,t,n){var r;r=function(e){"use strict";e.registerHelper("fold","brace",(function(t,n){var r,i=n.line,o=t.getLine(i);function s(s){for(var a=n.ch,l=0;;){var u=a<=0?-1:o.lastIndexOf(s,a-1);if(-1!=u){if(1==l&&u<n.ch)break;if(r=t.getTokenTypeAt(e.Pos(i,u+1)),!/^(comment|string)/.test(r))return u+1;a=u-1}else{if(1==l)break;l=1,a=o.length}}}var a,l="{",u="}";if(null==(a=s("{"))&&(l="[",u="]",a=s("[")),null!=a){var c,p,d=1,f=t.lastLine();e:for(var h=i;h<=f;++h)for(var g=t.getLine(h),m=h==i?a:0;;){var v=g.indexOf(l,m),y=g.indexOf(u,m);if(v<0&&(v=g.length),y<0&&(y=g.length),(m=Math.min(v,y))==g.length)break;if(t.getTokenTypeAt(e.Pos(h,m+1))==r)if(m==v)++d;else if(!--d){c=h,p=m;break e}++m}if(null!=c&&(i!=c||p!=a))return{from:e.Pos(i,a),to:e.Pos(c,p)}}})),e.registerHelper("fold","import",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);i<=o;++i){var s=t.getLine(i).indexOf(";");if(-1!=s)return{startCh:r.end,end:e.Pos(i,s)}}}var i,o=r(n=n.line);if(!o||r(n-1)||(i=r(n-2))&&i.end.line==n-1)return null;for(var s=o.end;;){var a=r(s.line+1);if(null==a)break;s=a.end}return{from:t.clipPos(e.Pos(n,o.startCh+1)),to:s}})),e.registerHelper("fold","include",(function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var i=r(n=n.line);if(null==i||null!=r(n-1))return null;for(var o=n;null!=r(o+1);)++o;return{from:e.Pos(n,i+1),to:t.clipPos(e.Pos(o))}}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],7:[function(e,t,n){var r;r=function(e){"use strict";function t(t,n,i,o){if(i&&i.call){var s=i;i=null}else s=r(t,i,"rangeFinder");"number"==typeof n&&(n=e.Pos(n,0));var a=r(t,i,"minFoldSize");function l(e){var r=s(t,n);if(!r||r.to.line-r.from.line<a)return null;for(var i=t.findMarksAt(r.from),l=0;l<i.length;++l)if(i[l].__isFold&&"fold"!==o){if(!e)return null;r.cleared=!0,i[l].clear()}return r}var u=l(!0);if(r(t,i,"scanUp"))for(;!u&&n.line>t.firstLine();)n=e.Pos(n.line-1,0),u=l(!1);if(u&&!u.cleared&&"unfold"!==o){var c=function(e,t){var n=r(e,t,"widget");if("string"==typeof n){var i=document.createTextNode(n);(n=document.createElement("span")).appendChild(i),n.className="CodeMirror-foldmarker"}return n}(t,i);e.on(c,"mousedown",(function(t){p.clear(),e.e_preventDefault(t)}));var p=t.markText(u.from,u.to,{replacedWith:c,clearOnEnter:!0,__isFold:!0});p.on("clear",(function(n,r){e.signal(t,"unfold",t,n,r)})),e.signal(t,"fold",t,u.from,u.to)}}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",(function(e,n,r){t(this,e,n,r)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0})),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")},e.commands.foldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),null,"fold")}))},e.commands.unfoldAll=function(t){t.operation((function(){for(var n=t.firstLine(),r=t.lastLine();n<=r;n++)t.foldCode(e.Pos(n,0),null,"unfold")}))},e.registerHelper("fold","combine",(function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}})),e.registerHelper("fold","auto",(function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}}));var n={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1};function r(e,t,r){if(t&&void 0!==t[r])return t[r];var i=e.options.foldOptions;return i&&void 0!==i[r]?i[r]:n[r]}e.defineOption("foldOptions",null),e.defineExtension("foldOption",(function(e,t){return r(this,e,t)}))},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],8:[function(e,t,n){var r;r=function(e){"use strict";e.defineOption("foldGutter",!1,(function(t,r,i){var c;i&&i!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",s),t.off("change",a),t.off("viewportChange",l),t.off("fold",u),t.off("unfold",u),t.off("swapDoc",o)),r&&(t.state.foldGutter=new n((!0===(c=r)&&(c={}),null==c.gutter&&(c.gutter="CodeMirror-foldgutter"),null==c.indicatorOpen&&(c.indicatorOpen="CodeMirror-foldgutter-open"),null==c.indicatorFolded&&(c.indicatorFolded="CodeMirror-foldgutter-folded"),c)),o(t),t.on("gutterClick",s),t.on("change",a),t.on("viewportChange",l),t.on("fold",u),t.on("unfold",u),t.on("swapDoc",o))}));var t=e.Pos;function n(e){this.options=e,this.from=this.to=0}function r(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function i(e,n,i){var o=e.state.foldGutter.options,s=n,a=e.foldOption(o,"minFoldSize"),l=e.foldOption(o,"rangeFinder");e.eachLine(n,i,(function(n){var i=null;if(function(e,n){for(var r=e.findMarksAt(t(n)),i=0;i<r.length;++i)if(r[i].__isFold&&r[i].find().from.line==n)return!0}(e,s))i=r(o.indicatorFolded);else{var u=t(s,0),c=l&&l(e,u);c&&c.to.line-c.from.line>=a&&(i=r(o.indicatorOpen))}e.setGutterMarker(n,o.gutter,i),++s}))}function o(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation((function(){i(e,t.from,t.to)})),n.from=t.from,n.to=t.to)}function s(e,n,r){var i=e.state.foldGutter;if(i){var o=i.options;r==o.gutter&&e.foldCode(t(n,0),o.rangeFinder)}}function a(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){o(e)}),n.foldOnChangeTimeSpan||600)}}function l(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?o(e):e.operation((function(){n.from<t.from&&(i(e,n.from,t.from),t.from=n.from),n.to>t.to&&(i(e,t.to,n.to),t.to=n.to)}))}),n.updateViewportTimeSpan||400)}}function u(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&r<n.to&&i(e,r,r+1)}}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror"),e("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],r):r(CodeMirror)},{"../../lib/codemirror":10,"./foldcode":7}],9:[function(e,t,n){var r;r=function(e){"use strict";var t=e.Pos,n="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r=new RegExp("<(/?)(["+n+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function i(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?r.from:e.firstLine(),this.max=r?r.to-1:e.lastLine()}function o(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function s(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function a(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function l(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(s(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(a(e))continue;return}if(o(e,t+1)){r.lastIndex=t,e.ch=t;var n=r.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function c(e){for(;;){r.lastIndex=e.ch;var t=r.exec(e.text);if(!t){if(s(e))continue;return}if(o(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function p(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(a(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function d(e,n){for(var r=[];;){var i,o=c(e),s=e.line,a=e.ch-(o?o[0].length:0);if(!o||!(i=l(e)))return;if("selfClose"!=i)if(o[1]){for(var u=r.length-1;u>=0;--u)if(r[u]==o[2]){r.length=u;break}if(u<0&&(!n||n==o[2]))return{tag:o[2],from:t(s,a),to:t(e.line,e.ch)}}else r.push(o[2])}}function f(e,n){for(var r=[];;){var i=p(e);if(!i)return;if("selfClose"!=i){var o=e.line,s=e.ch,a=u(e);if(!a)return;if(a[1])r.push(a[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==a[2]){r.length=l;break}if(l<0&&(!n||n==a[2]))return{tag:a[2],from:t(e.line,e.ch),to:t(o,s)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,n){for(var r=new i(e,n.line,0);;){var o,s=c(r);if(!s||r.line!=n.line||!(o=l(r)))return;if(!s[1]&&"selfClose"!=o){n=t(r.line,r.ch);var a=d(r,s[2]);return a&&{from:n,to:a.from}}}})),e.findMatchingTag=function(e,n,r){var o=new i(e,n.line,n.ch,r);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=l(o),a=s&&t(o.line,o.ch),c=s&&u(o);if(s&&c&&(h=n,!(((p=o).line-h.line||p.ch-h.ch)>0))){var p,h,g={from:t(o.line,o.ch),to:a,tag:c[2]};return"selfClose"==s?{open:g,close:null,at:"open"}:c[1]?{open:f(o,c[2]),close:g,at:"close"}:{open:g,close:d(o=new i(e,a.line,a.ch,r),c[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n){for(var r=new i(e,t.line,t.ch,n);;){var o=f(r);if(!o)break;var s=d(new i(e,t.line,t.ch,n),o.tag);if(s)return{open:o,close:s}}},e.scanForClosingTag=function(e,t,n,r){return d(new i(e,t.line,t.ch,r?{from:0,to:r}:null),n)}},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],10:[function(e,t,n){!function(e){if("object"==typeof n&&"object"==typeof t)t.exports=e();else{if("function"==typeof define&&define.amd)return define([],e);this.CodeMirror=e()}}((function(){"use strict";var e=/gecko\/\d/i.test(navigator.userAgent),t=/MSIE \d/.test(navigator.userAgent),n=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),r=t||n,i=r&&(t?document.documentMode||6:n[1]),o=/WebKit\//.test(navigator.userAgent),s=o&&/Qt\/\d+\.\d+/.test(navigator.userAgent),a=/Chrome\//.test(navigator.userAgent),l=/Opera\//.test(navigator.userAgent),u=/Apple Computer/.test(navigator.vendor),c=/KHTML\//.test(navigator.userAgent),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),d=/PhantomJS/.test(navigator.userAgent),f=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),h=f||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),g=f||/Mac/.test(navigator.platform),m=/win/i.test(navigator.platform),v=l&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);v&&(v=Number(v[1])),v&&v>=15&&(l=!1,o=!0);var y=g&&(s||l&&(null==v||v<12.11)),x=e||r&&i>=9,E=!1,b=!1;function C(e,t){if(!(this instanceof C))return new C(e,t);this.options=t=t?oo(t):{},oo(Gn,t,!1),k(t);var n=t.value;"string"==typeof n&&(n=new ii(n,t.mode)),this.doc=n;var s=this.display=new T(e,n);for(var a in s.wrapper.CodeMirror=this,R(this),I(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),t.autofocus&&!h&&Wt(this),j(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new Xi,keySeq:null},r&&i<11&&setTimeout(so(Vt,this,!0),20),function(e){var t=e.display;function n(t){Gi(e,t)||_i(t)}function s(n){if(e.somethingSelected())Ht=e.getSelections(),t.inaccurateSelection&&(t.prevInput="",t.inaccurateSelection=!1,t.input.value=Ht.join("\n"),to(t.input));else{for(var r=[],i=[],o=0;o<e.doc.sel.ranges.length;o++){var s=e.doc.sel.ranges[o].head.line,a={anchor:pe(s,0),head:pe(s+1,0)};i.push(a),r.push(e.getRange(a.anchor,a.head))}"cut"==n.type?e.setSelections(i,null,zi):(t.prevInput="",t.input.value=r.join("\n"),to(t.input)),Ht=r}"cut"==n.type&&(e.state.cutIncoming=!0)}ki(t.scroller,"mousedown",Lt(e,Kt)),ki(t.scroller,"dblclick",r&&i<11?Lt(e,(function(t){if(!Gi(e,t)){var n=Yt(e,t);if(n&&!Zt(e,t)&&!Xt(e.display,t)){Ii(t);var r=e.findWordAt(n);Se(e.doc,r.anchor,r.head)}}})):function(t){Gi(e,t)||Ii(t)}),ki(t.lineSpace,"selectstart",(function(e){Xt(t,e)||Ii(e)})),x||ki(t.scroller,"contextmenu",(function(t){xn(e,t)})),ki(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(nn(e,t.scroller.scrollTop),rn(e,t.scroller.scrollLeft,!0),Mi(e,"scroll",e))})),ki(t.scroller,"mousewheel",(function(t){ln(e,t)})),ki(t.scroller,"DOMMouseScroll",(function(t){ln(e,t)})),ki(t.wrapper,"scroll",(function(){t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),ki(t.input,"keyup",(function(t){gn.call(e,t)})),ki(t.input,"input",(function(){r&&i>=9&&e.display.inputHasSelection&&(e.display.inputHasSelection=null),qt(e)})),ki(t.input,"keydown",Lt(e,hn)),ki(t.input,"keypress",Lt(e,mn)),ki(t.input,"focus",so(vn,e)),ki(t.input,"blur",so(yn,e)),e.options.dragDrop&&(ki(t.scroller,"dragstart",(function(t){!function(e,t){if(r&&(!e.state.draggingText||+new Date-en<100))_i(t);else if(!Gi(e,t)&&!Xt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.setDragImage&&!u)){var n=go("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",l&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),l&&n.parentNode.removeChild(n)}}(e,t)})),ki(t.scroller,"dragenter",n),ki(t.scroller,"dragover",n),ki(t.scroller,"drop",Lt(e,tn))),ki(t.scroller,"paste",(function(n){Xt(t,n)||(e.state.pasteIncoming=!0,Wt(e),Ut(e))})),ki(t.input,"paste",(function(){if(o&&!e.state.fakedLastChar&&!(new Date-e.state.lastMiddleDown<200)){var n=t.input.selectionStart,r=t.input.selectionEnd;t.input.value+="$",t.input.selectionEnd=r,t.input.selectionStart=n,e.state.fakedLastChar=!0}e.state.pasteIncoming=!0,Ut(e)})),ki(t.input,"cut",s),ki(t.input,"copy",s),c&&ki(t.sizer,"mouseup",(function(){xo()==t.input&&t.input.blur(),Wt(e)}))}(this),function(){var e;Lo||(ki(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,So(Qt)}),100))})),ki(window,"blur",(function(){So(yn)})),Lo=!0)}(),xt(this),this.curOp.forceUpdate=!0,li(this,n),t.autofocus&&!h||xo()==s.input?setTimeout(so(vn,this),20):yn(this),Bn)Bn.hasOwnProperty(a)&&Bn[a](this,t[a],qn);q(this),t.finishInit&&t.finishInit(this);for(var p=0;p<$n.length;++p)$n[p](this);Et(this),o&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(s.lineDiv).textRendering&&(s.lineDiv.style.textRendering="auto")}function T(e,t){var n=this,s=n.input=go("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");o?s.style.width="1000px":s.setAttribute("wrap","off"),f&&(s.style.border="1px solid black"),s.setAttribute("autocorrect","off"),s.setAttribute("autocapitalize","off"),s.setAttribute("spellcheck","false"),n.inputDiv=go("div",[s],null,"overflow: hidden; position: relative; width: 3px; height: 0px;"),n.scrollbarFiller=go("div",null,"CodeMirror-scrollbar-filler"),n.scrollbarFiller.setAttribute("not-content","true"),n.gutterFiller=go("div",null,"CodeMirror-gutter-filler"),n.gutterFiller.setAttribute("not-content","true"),n.lineDiv=go("div",null,"CodeMirror-code"),n.selectionDiv=go("div",null,null,"position: relative; z-index: 1"),n.cursorDiv=go("div",null,"CodeMirror-cursors"),n.measure=go("div",null,"CodeMirror-measure"),n.lineMeasure=go("div",null,"CodeMirror-measure"),n.lineSpace=go("div",[n.measure,n.lineMeasure,n.selectionDiv,n.cursorDiv,n.lineDiv],null,"position: relative; outline: none"),n.mover=go("div",[go("div",[n.lineSpace],"CodeMirror-lines")],null,"position: relative"),n.sizer=go("div",[n.mover],"CodeMirror-sizer"),n.sizerWidth=null,n.heightForcer=go("div",null,null,"position: absolute; height: "+Vi+"px; width: 1px;"),n.gutters=go("div",null,"CodeMirror-gutters"),n.lineGutter=null,n.scroller=go("div",[n.sizer,n.heightForcer,n.gutters],"CodeMirror-scroll"),n.scroller.setAttribute("tabIndex","-1"),n.wrapper=go("div",[n.inputDiv,n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror"),r&&i<8&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),f&&(s.style.width="0px"),o||(n.scroller.draggable=!0),c&&(n.inputDiv.style.height="1px",n.inputDiv.style.position="absolute"),e&&(e.appendChild?e.appendChild(n.wrapper):e(n.wrapper)),n.viewFrom=n.viewTo=t.first,n.reportedViewFrom=n.reportedViewTo=t.first,n.view=[],n.renderedView=null,n.externalMeasured=null,n.viewOffset=0,n.lastWrapHeight=n.lastWrapWidth=0,n.updateLineNumbers=null,n.nativeBarWidth=n.barHeight=n.barWidth=0,n.scrollbarsClipped=!1,n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null,n.prevInput="",n.alignWidgets=!1,n.pollingFast=!1,n.poll=new Xi,n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.inaccurateSelection=!1,n.maxLine=null,n.maxLineLength=0,n.maxLineChanged=!1,n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null,n.shift=!1,n.selForContextMenu=null}function S(e){e.doc.mode=C.getMode(e.options,e.doc.modeOption),w(e)}function w(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.frontier=e.doc.first,Be(e,100),e.state.modeGen++,e.curOp&&Ot(e)}function N(e){var t=gt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/mt(e.display)-3);return function(i){if(Ar(e.doc,i))return 0;var o=0;if(i.widgets)for(var s=0;s<i.widgets.length;s++)i.widgets[s].height&&(o+=i.widgets[s].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function L(e){var t=e.doc,n=N(e);t.iter((function(e){var t=n(e);t!=e.height&&di(e,t)}))}function I(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),it(e)}function A(e){R(e),Ot(e),setTimeout((function(){H(e)}),20)}function R(e){var t=e.display.gutters,n=e.options.gutters;mo(t);for(var r=0;r<n.length;++r){var i=n[r],o=t.appendChild(go("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=r?"":"none",_(e)}function _(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function O(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Tr(r);)r=(i=t.find(0,!0)).from.line,n+=i.from.ch-i.to.ch;for(r=e;t=Sr(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch,n+=(r=i.to.line).text.length-i.to.ch}return n}function D(e){var t=e.display,n=e.doc;t.maxLine=ui(n,n.first),t.maxLineLength=O(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=O(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}function k(e){var t=no(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function P(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+We(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+$e(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function M(e,t,n){this.cm=n;var o=this.vert=go("div",[go("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),s=this.horiz=go("div",[go("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(o),e(s),ki(o,"scroll",(function(){o.clientHeight&&t(o.scrollTop,"vertical")})),ki(s,"scroll",(function(){s.clientWidth&&t(s.scrollLeft,"horizontal")})),this.checkedOverlay=!1,r&&i<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function F(){}function j(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&bo(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new C.scrollbarModel[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ki(t,"mousedown",(function(){e.state.focused&&setTimeout(so(Wt,e),0)})),t.setAttribute("not-content","true")}),(function(t,n){"horizontal"==n?rn(e,t):nn(e,t)}),e),e.display.scrollbars.addClass&&Co(e.display.wrapper,e.display.scrollbars.addClass)}function U(e,t){t||(t=P(e));var n=e.display.barWidth,r=e.display.barHeight;G(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&K(e),G(e,P(e)),n=e.display.barWidth,r=e.display.barHeight}function G(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function B(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Ve(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=hi(t,r),s=hi(t,i);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;a<o?(o=a,s=hi(t,gi(ui(t,a))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=s&&(o=hi(t,gi(ui(t,l))-e.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function H(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=W(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",s=0;s<n.length;s++)if(!n[s].hidden){e.options.fixedGutter&&n[s].gutter&&(n[s].gutter.style.left=o);var a=n[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function q(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=V(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(go("div",[go("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,s=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-s),r.lineNumWidth=r.lineNumInnerWidth+s,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",_(e),!0}return!1}function V(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function W(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function z(e,t,n){var r=e.display;this.viewport=t,this.visible=B(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Qe(e),this.force=n,this.dims=Z(e),this.events=[]}function $(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return kt(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Ft(e))return!1;q(e)&&(kt(e),t.dims=Z(e));var i=r.first+r.size,s=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<s&&s-n.viewFrom<20&&(s=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),b&&(s=Lr(e.doc,s),a=Ir(e.doc,a));var l=s!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=_t(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=_t(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Pt(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(_t(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Pt(e,n)))),r.viewTo=n}(e,s,a),n.viewOffset=gi(ui(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=Ft(e);if(!l&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=xo();return u>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,s=r.lineDiv,a=s.firstChild;function l(t){var n=t.nextSibling;return o&&g&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,p=0;p<u.length;p++){var d=u[p];if(d.hidden);else if(d.node){for(;a!=d.node;)a=l(a);var f=i&&null!=t&&t<=c&&d.lineNumber;d.changes&&(no(d.changes,"gutter")>-1&&(f=!1),ee(e,d,c,n)),f&&(mo(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(V(e.options,c)))),a=d.node.nextSibling}else{var h=ae(e,d,c,n);s.insertBefore(h,a)}c+=d.size}for(;a;)a=l(a)}(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,c&&xo()!=c&&c.offsetHeight&&c.focus(),mo(n.cursorDiv),mo(n.selectionDiv),n.gutters.style.height=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Be(e,400)),n.updateLineNumbers=null,!0}function Q(e,t){t.force;for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Qe(e));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+We(e.display)-Xe(e),n.top)}),t.visible=B(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!$(e,t))break;K(e);var i=P(e);Fe(e),Y(e,i),U(e,i)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function X(e,t){var n=new z(e,t);if($(e,n)){K(e),Q(e,n);var r=P(e);Fe(e),Y(e,r),U(e,r),n.finish()}}function Y(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var n=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=n+"px",e.display.gutters.style.height=Math.max(n+$e(e),t.clientHeight)+"px"}function K(e){for(var t=e.display,n=t.lineDiv.offsetTop,o=0;o<t.view.length;o++){var s,a=t.view[o];if(!a.hidden){if(r&&i<8){var l=a.node.offsetTop+a.node.offsetHeight;s=l-n,n=l}else{var u=a.node.getBoundingClientRect();s=u.bottom-u.top}var c=a.line.height-s;if(s<2&&(s=gt(t)),(c>.001||c<-.001)&&(di(a.line,s),J(a.line),a.rest))for(var p=0;p<a.rest.length;p++)J(a.rest[p])}}}function J(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.offsetHeight}function Z(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,s=0;o;o=o.nextSibling,++s)n[e.options.gutters[s]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[s]]=o.clientWidth;return{fixedPos:W(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ee(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?re(e,t):"gutter"==o?oe(e,t,n,r):"class"==o?ie(t):"widget"==o&&se(t,r)}t.changes=null}function te(e){return e.node==e.text&&(e.node=go("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),r&&i<8&&(e.node.style.zIndex=2)),e.node}function ne(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):$r(e,t)}function re(e,t){var n=t.text.className,r=ne(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,ie(t)):n&&(t.text.className=n)}function ie(e){!function(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=te(e);e.background=n.insertBefore(go("div",null,t),n.firstChild)}}(e),e.line.wrapClass?te(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function oe(e,t,n,r){t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null);var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var o=te(t),s=t.gutter=o.insertBefore(go("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),t.text);if(t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(go("div",V(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var a=0;a<e.options.gutters.length;++a){var l=e.options.gutters[a],u=i.hasOwnProperty(l)&&i[l];u&&s.appendChild(go("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[l]+"px; width: "+r.gutterWidth[l]+"px"))}}}function se(e,t){e.alignable&&(e.alignable=null);for(var n=e.node.firstChild;n;n=r){var r=n.nextSibling;"CodeMirror-linewidget"==n.className&&e.node.removeChild(n)}le(e,t)}function ae(e,t,n,r){var i=ne(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),ie(t),oe(e,t,n,r),le(t,r),t.node}function le(e,t){if(ue(e.line,e,t,!0),e.rest)for(var n=0;n<e.rest.length;n++)ue(e.rest[n],e,t,!1)}function ue(e,t,n,r){if(e.widgets)for(var i=te(t),o=0,s=e.widgets;o<s.length;++o){var a=s[o],l=go("div",[a.node],"CodeMirror-linewidget");a.handleMouseEvents||l.setAttribute("cm-ignore-events","true"),ce(a,l,t,n),r&&a.above?i.insertBefore(l,t.gutter||t.text):i.appendChild(l),ji(a,"redraw")}}function ce(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}M.prototype=oo({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&e.clientHeight>0&&(0==r&&this.overlayHack(),this.checkedOverlay=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e)},overlayHack:function(){var e=g&&!p?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=e;var t=this,n=function(e){Oi(e)!=t.vert&&Oi(e)!=t.horiz&&Lt(t.cm,Kt)(e)};ki(this.vert,"mousedown",n),ki(this.horiz,"mousedown",n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},M.prototype),F.prototype=oo({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},F.prototype),C.scrollbarModel={native:M,null:F},z.prototype.signal=function(e,t){Hi(e,t)&&this.events.push(arguments)},z.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Mi.apply(null,this.events[e])};var pe=C.Pos=function(e,t){if(!(this instanceof pe))return new pe(e,t);this.line=e,this.ch=t},de=C.cmpPos=function(e,t){return e.line-t.line||e.ch-t.ch};function fe(e){return pe(e.line,e.ch)}function he(e,t){return de(e,t)<0?t:e}function ge(e,t){return de(e,t)<0?e:t}function me(e,t){this.ranges=e,this.primIndex=t}function ve(e,t){this.anchor=e,this.head=t}function ye(e,t){var n=e[t];e.sort((function(e,t){return de(e.from(),t.from())})),t=no(e,n);for(var r=1;r<e.length;r++){var i=e[r],o=e[r-1];if(de(o.to(),i.from())>=0){var s=ge(o.from(),i.from()),a=he(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new ve(l?a:s,l?s:a))}}return new me(e,t)}function xe(e,t){return new me([new ve(e,t||e)],0)}function Ee(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function be(e,t){if(t.line<e.first)return pe(e.first,0);var n=e.first+e.size-1;return t.line>n?pe(n,ui(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?pe(e.line,t):n<0?pe(e.line,0):e}(t,ui(e,t.line).text.length)}function Ce(e,t){return t>=e.first&&t<e.first+e.size}function Te(e,t,n,r){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(r){var o=de(n,i)<0;o!=de(r,i)<0?(i=n,n=r):o!=de(n,r)<0&&(n=r)}return new ve(i,n)}return new ve(r||n,n)}function Se(e,t,n,r){Ae(e,new me([Te(e,e.sel.primary(),t,n)],0),r)}function we(e,t,n){for(var r=[],i=0;i<e.sel.ranges.length;i++)r[i]=Te(e,e.sel.ranges[i],t[i],null);Ae(e,ye(r,e.sel.primIndex),n)}function Ne(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Ae(e,ye(i,e.sel.primIndex),r)}function Le(e,t,n,r){Ae(e,xe(t,n),r)}function Ie(e,t,n){var r=e.history.done,i=eo(r);i&&i.ranges?(r[r.length-1]=t,Re(e,t,n)):Ae(e,t,n)}function Ae(e,t,n){Re(e,t,n),function(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,eo(i.done),t))?i.done[i.done.length-1]=t:bi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&xi(i.undone)}(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Re(e,t,n){(Hi(e,"beforeSelectionChange")||e.cm&&Hi(e.cm,"beforeSelectionChange"))&&(t=function(e,t){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new ve(be(e,t[n].anchor),be(e,t[n].head))}};return Mi(e,"beforeSelectionChange",e,n),e.cm&&Mi(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?ye(n.ranges,n.ranges.length-1):t}(e,t));var r=n&&n.bias||(de(t.primary().head,e.sel.primary().head)<0?-1:1);_e(e,De(e,t,r,!0)),n&&!1===n.scroll||!e.cm||Dn(e.cm)}function _e(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Bi(e.cm)),ji(e,"cursorActivity",e))}function Oe(e){_e(e,De(e,e.sel,null,!1))}function De(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var s=t.ranges[o],a=ke(e,s.anchor,n,r),l=ke(e,s.head,n,r);(i||a!=s.anchor||l!=s.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new ve(a,l))}return i?ye(i,t.primIndex):t}function ke(e,t,n,r){var i=!1,o=t,s=n||1;e.cantEdit=!1;e:for(;;){var a=ui(e,o.line);if(a.markedSpans)for(var l=0;l<a.markedSpans.length;++l){var u=a.markedSpans[l],c=u.marker;if((null==u.from||(c.inclusiveLeft?u.from<=o.ch:u.from<o.ch))&&(null==u.to||(c.inclusiveRight?u.to>=o.ch:u.to>o.ch))){if(r&&(Mi(c,"beforeCursorEnter"),c.explicitlyCleared)){if(a.markedSpans){--l;continue}break}if(!c.atomic)continue;var p=c.find(s<0?-1:1);if(0==de(p,o)&&(p.ch+=s,p.ch<0?p=p.line>e.first?be(e,pe(p.line-1)):null:p.ch>a.text.length&&(p=p.line<e.first+e.size-1?pe(p.line+1,0):null),!p)){if(i)return r?(e.cantEdit=!0,pe(e.first,0)):ke(e,t,n,!0);i=!0,p=t,s=-s}o=p;continue e}}return o}}function Pe(e){for(var t=e.display,n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),s=0;s<n.sel.ranges.length;s++){var a=n.sel.ranges[s],l=a.empty();(l||e.options.showCursorWhenSelecting)&&je(e,a,i),l||Ue(e,a,o)}if(e.options.moveInputWithCursor){var u=ct(e,n.sel.primary().head,"div"),c=t.wrapper.getBoundingClientRect(),p=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,u.top+p.top-c.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,u.left+p.left-c.left))}return r}function Me(e,t){vo(e.display.cursorDiv,t.cursors),vo(e.display.selectionDiv,t.selection),null!=t.teTop&&(e.display.inputDiv.style.top=t.teTop+"px",e.display.inputDiv.style.left=t.teLeft+"px")}function Fe(e){Me(e,Pe(e))}function je(e,t,n){var r=ct(e,t.head,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(go("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(go("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Ue(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),s=ze(e.display),a=s.left,l=Math.max(r.sizerWidth,Qe(e)-r.sizer.offsetLeft)-s.right;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(go("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?l-e:n)+"px; height: "+(r-t)+"px"))}function c(t,n,r){var o,s,c=ui(i,t),p=c.text.length;function d(n,r){return ut(e,pe(t,n),"div",c,r)}return function(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;o<e.length;++o){var s=e[o];(s.from<n&&s.to>t||t==n&&s.to==t)&&(r(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}(mi(c),n||0,null==r?p:r,(function(e,t,i){var c,f,h,g=d(e,"left");if(e==t)c=g,f=h=g.left;else{if(c=d(t-1,"right"),"rtl"==i){var m=g;g=c,c=m}f=g.left,h=c.right}null==n&&0==e&&(f=a),c.top-g.top>3&&(u(f,g.top,null,g.bottom),f=a,g.bottom<c.top&&u(f,g.bottom,null,c.top)),null==r&&t==p&&(h=l),(!o||g.top<o.top||g.top==o.top&&g.left<o.left)&&(o=g),(!s||c.bottom>s.bottom||c.bottom==s.bottom&&c.right>s.right)&&(s=c),f<a+1&&(f=a),u(f,c.top,h-f,c.bottom)})),{start:o,end:s}}var p=t.from(),d=t.to();if(p.line==d.line)c(p.line,p.ch,d.ch);else{var f=ui(i,p.line),h=ui(i,d.line),g=Nr(f)==Nr(h),m=c(p.line,p.ch,g?f.text.length+1:null).end,v=c(d.line,g?0:null,d.ch).start;g&&(m.top<v.top-2?(u(m.right,m.top,null,m.bottom),u(a,v.top,v.left,v.bottom)):u(m.right,m.top,v.left-m.right,m.bottom)),m.bottom<v.top&&u(a,m.bottom,null,v.top)}n.appendChild(o)}function Ge(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Be(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,so(He,e))}function He(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Xn(t.mode,qe(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(t.frontier>=e.display.viewFrom){var s=o.styles,a=Br(e,o,r,!0);o.styles=a.styles;var l=o.styleClasses,u=a.classes;u?o.styleClasses=u:l&&(o.styleClasses=null);for(var c=!s||s.length!=o.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),p=0;!c&&p<s.length;++p)c=s[p]!=o.styles[p];c&&i.push(t.frontier),o.stateAfter=Xn(t.mode,r)}else qr(e,o.text,r),o.stateAfter=t.frontier%5==0?Xn(t.mode,r):null;if(++t.frontier,+new Date>n)return Be(e,e.options.workDelay),!0})),i.length&&Nt(e,(function(){for(var t=0;t<i.length;t++)Dt(e,i[t],"text")}))}}function qe(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=function(e,t,n){for(var r,i,o=e.doc,s=n?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>s;--a){if(a<=o.first)return o.first;var l=ui(o,a-1);if(l.stateAfter&&(!n||a<=o.frontier))return a;var u=Yi(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=a-1,r=u)}return i}(e,t,n),s=o>r.first&&ui(r,o-1).stateAfter;return s=s?Xn(r.mode,s):Yn(r.mode),r.iter(o,t,(function(n){qr(e,n.text,s);var a=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;n.stateAfter=a?Xn(r.mode,s):null,++o})),n&&(r.frontier=o),s}function Ve(e){return e.lineSpace.offsetTop}function We(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function ze(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=vo(e.measure,go("pre","x")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function $e(e){return Vi-e.display.nativeBarWidth}function Qe(e){return e.display.scroller.clientWidth-$e(e)-e.display.barWidth}function Xe(e){return e.display.scroller.clientHeight-$e(e)-e.display.barHeight}function Ye(e,t,n,r){return Ze(e,Je(e,t),n,r)}function Ke(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Pt(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Je(e,t){var n=fi(t),r=Ke(e,n);r&&!r.text?r=null:r&&r.changes&&ee(e,r,n,Z(e)),r||(r=function(e,t){var n=fi(t=Nr(t)),r=e.display.externalMeasured=new Rt(e.doc,t,n);r.lineN=n;var i=r.built=$r(e,r);return r.text=i.pre,vo(e.display.lineMeasure,i.pre),r}(e,t));var i=function(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(r=0;r<e.rest.length;r++)if(fi(e.rest[r])>n)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Ze(e,t,n,o,s){t.before&&(n=-1);var a,l=n+(o||"");return t.cache.hasOwnProperty(l)?a=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&Qe(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var s=t.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],u=s[a+1];Math.abs(l.bottom-u.bottom)>2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(a=function(e,t,n,o){for(var s,a,l,u,c,p=t.map,d=0;d<p.length;d+=3){var f=p[d],h=p[d+1];if(n<f?(a=0,l=1,u="left"):n<h?l=1+(a=n-f):(d==p.length-3||n==h&&p[d+3]>n)&&(a=(l=h-f)-1,n>=h&&(u="right")),null!=a){if(s=p[d+2],f==h&&o==(s.insertLeft?"left":"right")&&(u=o),"left"==o&&0==a)for(;d&&p[d-2]==p[d-3]&&p[d-1].insertLeft;)s=p[2+(d-=3)],u="left";if("right"==o&&a==h-f)for(;d<p.length-3&&p[d+3]==p[d+4]&&!p[d+5].insertLeft;)s=p[(d+=3)+2],u="right";break}}if(3==s.nodeType){for(d=0;d<4;d++){for(;a&&ho(t.line.text.charAt(f+a));)--a;for(;f+l<h&&ho(t.line.text.charAt(f+l));)++l;if(r&&i<9&&0==a&&l==h-f)c=s.parentNode.getBoundingClientRect();else if(r&&e.options.lineWrapping){var g=po(s,a,l).getClientRects();c=g.length?g["right"==o?g.length-1:0]:tt}else c=po(s,a,l).getBoundingClientRect()||tt;if(c.left||c.right||0==a)break;l=a,a-=1,u="right"}r&&i<11&&(c=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Mo)return Mo;var t=vo(e,go("span","x")),n=t.getBoundingClientRect(),r=po(t,0,1).getBoundingClientRect();return Mo=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,c))}else a>0&&(u=o="right"),c=e.options.lineWrapping&&(g=s.getClientRects()).length>1?g["right"==o?g.length-1:0]:s.getBoundingClientRect();if(r&&i<9&&!a&&(!c||!c.left&&!c.right)){var m=s.parentNode.getClientRects()[0];c=m?{left:m.left,right:m.left+mt(e.display),top:m.top,bottom:m.bottom}:tt}var v=c.top-t.rect.top,y=c.bottom-t.rect.top,x=(v+y)/2,E=t.view.measure.heights;for(d=0;d<E.length-1&&!(x<E[d]);d++);var b=d?E[d-1]:0,C=E[d],T={left:("right"==u?c.right:c.left)-t.rect.left,right:("left"==u?c.left:c.right)-t.rect.left,top:b,bottom:C};return c.left||c.right||(T.bogus=!0),e.options.singleCursorHeightPerLine||(T.rtop=v,T.rbottom=y),T}(e,t,n,o)).bogus||(t.cache[l]=a)),{left:a.left,right:a.right,top:s?a.rtop:a.top,bottom:s?a.rbottom:a.bottom}}me.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(0!=de(n.anchor,r.anchor)||0!=de(n.head,r.head))return!1}return!0},deepCopy:function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new ve(fe(this.ranges[t].anchor),fe(this.ranges[t].head));return new me(e,this.primIndex)},somethingSelected:function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},contains:function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(de(t,r.from())>=0&&de(e,r.to())<=0)return n}return-1}},ve.prototype={from:function(){return ge(this.anchor,this.head)},to:function(){return he(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var et,tt={left:0,right:0,top:0,bottom:0};function nt(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function rt(e){e.display.externalMeasure=null,mo(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)nt(e.display.view[t])}function it(e){rt(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ot(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function st(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function at(e,t,n,r){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var o=Dr(t.widgets[i]);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var s=gi(t);if("local"==r?s+=Ve(e.display):s-=e.display.viewOffset,"page"==r||"window"==r){var a=e.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==r?0:st());var l=a.left+("window"==r?0:ot());n.left+=l,n.right+=l}return n.top+=s,n.bottom+=s,n}function lt(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=ot(),i-=st();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var s=e.display.lineSpace.getBoundingClientRect();return{left:r-s.left,top:i-s.top}}function ut(e,t,n,r,i){return r||(r=ui(e.doc,t.line)),at(e,r,Ye(e,r,t.ch,i),n)}function ct(e,t,n,r,i,o){function s(t,s){var a=Ze(e,i,t,s?"right":"left",o);return s?a.left=a.right:a.right=a.left,at(e,r,a,n)}function a(e,t){var n=l[t],r=n.level%2;return e==jo(n)&&t&&n.level<l[t-1].level?(e=Uo(n=l[--t])-(n.level%2?0:1),r=!0):e==Uo(n)&&t<l.length-1&&n.level<l[t+1].level&&(e=jo(n=l[++t])-n.level%2,r=!1),r&&e==n.to&&e>n.from?s(e-1):s(e,r)}r=r||ui(e.doc,t.line),i||(i=Je(e,r));var l=mi(r),u=t.ch;if(!l)return s(u);var c=a(u,Wo(l,u));return null!=Oo&&(c.other=a(u,Oo)),c}function pt(e,t){var n=0;t=be(e.doc,t),e.options.lineWrapping||(n=mt(e.display)*t.ch);var r=ui(e.doc,t.line),i=gi(r)+Ve(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function dt(e,t,n,r){var i=pe(e,t);return i.xRel=r,n&&(i.outside=!0),i}function ft(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return dt(r.first,0,!0,-1);var i=hi(r,n),o=r.first+r.size-1;if(i>o)return dt(r.first+r.size-1,ui(r,o).text.length,!0,1);t<0&&(t=0);for(var s=ui(r,i);;){var a=ht(e,s,i,t,n),l=Sr(s),u=l&&l.find(0,!0);if(!l||!(a.ch>u.from.ch||a.ch==u.from.ch&&a.xRel>0))return a;i=fi(s=u.to.line)}}function ht(e,t,n,r,i){var o=i-gi(t),s=!1,a=2*e.display.wrapper.clientWidth,l=Je(e,t);function u(r){var i=ct(e,pe(n,r),"line",t,l);return s=!0,o>i.bottom?i.left-a:o<i.top?i.left+a:(s=!1,i.left)}var c=mi(t),p=t.text.length,d=Go(t),f=Bo(t),h=u(d),g=s,m=u(f),v=s;if(r>m)return dt(n,f,v,1);for(;;){if(c?f==d||f==$o(t,d,1):f-d<=1){for(var y=r<h||r-h<=m-r?d:f,x=r-(y==d?h:m);ho(t.text.charAt(y));)++y;return dt(n,y,y==d?g:v,x<-1?-1:x>1?1:0)}var E=Math.ceil(p/2),b=d+E;if(c){b=d;for(var C=0;C<E;++C)b=$o(t,b,1)}var T=u(b);T>r?(f=b,m=T,(v=s)&&(m+=1e3),p=E):(d=b,h=T,g=s,p-=E)}}function gt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==et){et=go("pre");for(var t=0;t<49;++t)et.appendChild(document.createTextNode("x")),et.appendChild(go("br"));et.appendChild(document.createTextNode("x"))}vo(e.measure,et);var n=et.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),mo(e.measure),n||1}function mt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=go("span","xxxxxxxxxx"),n=go("pre",[t]);vo(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}var vt=null,yt=0;function xt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,id:++yt},vt?vt.ops.push(e.curOp):e.curOp.ownsGroup=vt={ops:[e.curOp],delayedCallbacks:[]}}function Et(e){var t=e.curOp.ownsGroup;if(t)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n]();for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++](i.cm)}}while(n<t.length)}(t)}finally{vt=null;for(var n=0;n<t.ops.length;n++)t.ops[n].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)bt(t[n]);for(n=0;n<t.length;n++)Ct(t[n]);for(n=0;n<t.length;n++)Tt(t[n]);for(n=0;n<t.length;n++)St(t[n]);for(n=0;n<t.length;n++)wt(t[n])}(t)}}function bt(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=$e(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=$e(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&D(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new z(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ct(e){e.updatedDisplay=e.mustUpdate&&$(e.cm,e.update)}function Tt(e){var t=e.cm,n=t.display;e.updatedDisplay&&K(t),e.barMeasure=P(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ye(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+$e(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Qe(t))),(e.updatedDisplay||e.selectionChanged)&&(e.newSelectionNodes=Pe(t))}function St(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&rn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1),e.newSelectionNodes&&Me(t,e.newSelectionNodes),e.updatedDisplay&&Y(t,e.barMeasure),(e.updatedDisplay||e.startHeight!=t.doc.height)&&U(t,e.barMeasure),e.selectionChanged&&Ge(t),t.state.focused&&e.updateInput&&Vt(t,e.typing)}function wt(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&Q(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null==e.scrollTop||n.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(r.scrollTop=Math.max(0,Math.min(n.scroller.scrollHeight-n.scroller.clientHeight,e.scrollTop)),n.scrollbars.setScrollTop(r.scrollTop),n.scroller.scrollTop=r.scrollTop),null==e.scrollLeft||n.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(r.scrollLeft=Math.max(0,Math.min(n.scroller.scrollWidth-Qe(t),e.scrollLeft)),n.scrollbars.setScrollLeft(r.scrollLeft),n.scroller.scrollLeft=r.scrollLeft,H(t)),e.scrollToPos){var i=function(e,t,n,r){null==r&&(r=0);for(var i=0;i<5;i++){var o=!1,s=ct(e,t),a=n&&n!=t?ct(e,n):s,l=_n(e,Math.min(s.left,a.left),Math.min(s.top,a.top)-r,Math.max(s.left,a.left),Math.max(s.bottom,a.bottom)+r),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop&&(nn(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(rn(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return s}(t,be(r,e.scrollToPos.from),be(r,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&function(e,t){if(!Gi(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!d){var o=go("div","",null,"position: absolute; top: "+(t.top-n.viewOffset-Ve(e.display))+"px; height: "+(t.bottom-t.top+$e(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,i)}var o=e.maybeHiddenMarkers,s=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||Mi(o[a],"hide");if(s)for(a=0;a<s.length;++a)s[a].lines.length&&Mi(s[a],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Mi(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Nt(e,t){if(e.curOp)return t();xt(e);try{return t()}finally{Et(e)}}function Lt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);xt(e);try{return t.apply(e,arguments)}finally{Et(e)}}}function It(e){return function(){if(this.curOp)return e.apply(this,arguments);xt(this);try{return e.apply(this,arguments)}finally{Et(this)}}}function At(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);xt(t);try{return e.apply(this,arguments)}finally{Et(t)}}}function Rt(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Sr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?fi(eo(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ar(e,t)}function _t(e,t,n){for(var r,i=[],o=t;o<n;o=r){var s=new Rt(e.doc,ui(e.doc,o),o);r=o+s.size,i.push(s)}return i}function Ot(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)b&&Lr(e.doc,t)<i.viewTo&&kt(e);else if(n<=i.viewFrom)b&&Ir(e.doc,n+r)>i.viewFrom?kt(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)kt(e);else if(t<=i.viewFrom)(o=Mt(e,n,n+r,1))?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):kt(e);else if(n>=i.viewTo){var o;(o=Mt(e,t,t,-1))?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):kt(e)}else{var s=Mt(e,t,t,-1),a=Mt(e,n,n+r,1);s&&a?(i.view=i.view.slice(0,s.index).concat(_t(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=r):kt(e)}var l=i.externalMeasured;l&&(n<l.lineN?l.lineN+=r:t<l.lineN+l.size&&(i.externalMeasured=null))}function Dt(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Pt(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==no(s,n)&&s.push(n)}}}function kt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Pt(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function Mt(e,t,n,r){var i,o=Pt(e,t),s=e.display.view;if(!b||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=0,l=e.display.viewFrom;a<o;a++)l+=s[a].size;if(l!=t){if(r>0){if(o==s.length-1)return null;i=l+s[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;Lr(e.doc,n)!=n;){if(o==(r<0?0:s.length-1))return null;n+=r*s[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Ft(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function jt(e){e.display.pollingFast||e.display.poll.set(e.options.pollInterval,(function(){qt(e),e.state.focused&&jt(e)}))}function Ut(e){var t=!1;e.display.pollingFast=!0,e.display.poll.set(20,(function n(){qt(e)||t?(e.display.pollingFast=!1,jt(e)):(t=!0,e.display.poll.set(60,n))}))}var Gt,Bt,Ht=null;function qt(e){var t=e.display.input,n=e.display.prevInput,o=e.doc;if(!e.state.focused||ko(t)&&!n||$t(e)||e.options.disableInput||e.state.keySeq)return!1;e.state.pasteIncoming&&e.state.fakedLastChar&&(t.value=t.value.substring(0,t.value.length-1),e.state.fakedLastChar=!1);var s=t.value;if(s==n&&!e.somethingSelected())return!1;if(r&&i>=9&&e.display.inputHasSelection===s||g&&/[\uf700-\uf7ff]/.test(s))return Vt(e),!1;var a=!e.curOp;a&&xt(e),e.display.shift=!1,8203!=s.charCodeAt(0)||o.sel!=e.display.selForContextMenu||n||(n="");for(var l=0,u=Math.min(n.length,s.length);l<u&&n.charCodeAt(l)==s.charCodeAt(l);)++l;var c=s.slice(l),p=Do(c),d=null;e.state.pasteIncoming&&o.sel.ranges.length>1&&(Ht&&Ht.join("\n")==c?d=o.sel.ranges.length%Ht.length==0&&ro(Ht,Do):p.length==o.sel.ranges.length&&(d=ro(p,(function(e){return[e]}))));for(var f=o.sel.ranges.length-1;f>=0;f--){var h=o.sel.ranges[f],m=h.from(),v=h.to();l<n.length?m=pe(m.line,m.ch-(n.length-l)):e.state.overwrite&&h.empty()&&!e.state.pasteIncoming&&(v=pe(v.line,Math.min(ui(o,v.line).text.length,v.ch+eo(p).length)));var y=e.curOp.updateInput,x={from:m,to:v,text:d?d[f%d.length]:p,origin:e.state.pasteIncoming?"paste":e.state.cutIncoming?"cut":"+input"};if(wn(e.doc,x),ji(e,"inputRead",e,x),c&&!e.state.pasteIncoming&&e.options.electricChars&&e.options.smartIndent&&h.head.ch<100&&(!f||o.sel.ranges[f-1].head.line!=h.head.line)){var E=e.getModeAt(h.head),b=En(x);if(E.electricChars){for(var C=0;C<E.electricChars.length;C++)if(c.indexOf(E.electricChars.charAt(C))>-1){Pn(e,b.line,"smart");break}}else E.electricInput&&E.electricInput.test(ui(o,b.line).text.slice(0,b.ch))&&Pn(e,b.line,"smart")}}return Dn(e),e.curOp.updateInput=y,e.curOp.typing=!0,s.length>1e3||s.indexOf("\n")>-1?t.value=e.display.prevInput="":e.display.prevInput=s,a&&Et(e),e.state.pasteIncoming=e.state.cutIncoming=!1,!0}function Vt(e,t){if(!e.display.contextMenuPending){var n,o,s=e.doc;if(e.somethingSelected()){e.display.prevInput="";var a=s.sel.primary(),l=(n=Po&&(a.to().line-a.from().line>100||(o=e.getSelection()).length>1e3))?"-":o||e.getSelection();e.display.input.value=l,e.state.focused&&to(e.display.input),r&&i>=9&&(e.display.inputHasSelection=l)}else t||(e.display.prevInput=e.display.input.value="",r&&i>=9&&(e.display.inputHasSelection=null));e.display.inaccurateSelection=n}}function Wt(e){if("nocursor"!=e.options.readOnly&&(!h||xo()!=e.display.input))try{e.display.input.focus()}catch(e){}}function zt(e){e.state.focused||(Wt(e),vn(e))}function $t(e){return e.options.readOnly||e.doc.cantEdit}function Qt(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Xt(e,t){for(var n=Oi(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Yt(e,t,n,r){var i=e.display;if(!n&&"true"==Oi(t).getAttribute("not-content"))return null;var o,s,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,s=t.clientY-a.top}catch(t){return null}var l,u=ft(e,o,s);if(r&&1==u.xRel&&(l=ui(e.doc,u.line).text).length==u.ch){var c=Yi(l,l.length,e.options.tabSize)-l.length;u=pe(u.line,Math.max(0,Math.round((o-ze(e.display).left)/mt(e.display))-c))}return u}function Kt(e){if(!Gi(this,e)){var t=this,n=t.display;if(n.shift=e.shiftKey,Xt(n,e))o||(n.scroller.draggable=!1,setTimeout((function(){n.scroller.draggable=!0}),100));else if(!Zt(t,e)){var s=Yt(t,e);switch(window.focus(),Di(e)){case 1:s?function(e,t,n){setTimeout(so(zt,e),0);var s,a=+new Date;Bt&&Bt.time>a-400&&0==de(Bt.pos,n)?s="triple":Gt&&Gt.time>a-400&&0==de(Gt.pos,n)?(s="double",Bt={time:a,pos:n}):(s="single",Gt={time:a,pos:n});var l,u=e.doc.sel,c=g?t.metaKey:t.ctrlKey;e.options.dragDrop&&Io&&!$t(e)&&"single"==s&&(l=u.contains(n))>-1&&!u.ranges[l].empty()?function(e,t,n,s){var a=e.display,l=Lt(e,(function(u){o&&(a.scroller.draggable=!1),e.state.draggingText=!1,Pi(document,"mouseup",l),Pi(a.scroller,"drop",l),Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)<10&&(Ii(u),s||Se(e.doc,n),Wt(e),r&&9==i&&setTimeout((function(){document.body.focus(),Wt(e)}),20))}));o&&(a.scroller.draggable=!0),e.state.draggingText=l,a.scroller.dragDrop&&a.scroller.dragDrop(),ki(document,"mouseup",l),ki(a.scroller,"drop",l)}(e,t,n,c):function(e,t,n,r,i){var o=e.display,s=e.doc;Ii(t);var a,l,u=s.sel,c=u.ranges;if(i&&!t.shiftKey?(l=s.sel.contains(n),a=l>-1?c[l]:new ve(n,n)):a=s.sel.primary(),t.altKey)r="rect",i||(a=new ve(n,n)),n=Yt(e,t,!0,!0),l=-1;else if("double"==r){var p=e.findWordAt(n);a=e.display.shift||s.extend?Te(s,a,p.anchor,p.head):p}else if("triple"==r){var d=new ve(pe(n.line,0),be(s,pe(n.line+1,0)));a=e.display.shift||s.extend?Te(s,a,d.anchor,d.head):d}else a=Te(s,a,n);i?-1==l?(l=c.length,Ae(s,ye(c.concat([a]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"single"==r?(Ae(s,ye(c.slice(0,l).concat(c.slice(l+1)),0)),u=s.sel):Ne(s,l,a,$i):(l=0,Ae(s,new me([a],0),$i),u=s.sel);var f=n,h=o.wrapper.getBoundingClientRect(),g=0;function m(t){var i=++g,c=Yt(e,t,!0,"rect"==r);if(c)if(0!=de(c,f)){zt(e),function(t){if(0!=de(f,t))if(f=t,"rect"==r){for(var i=[],o=e.options.tabSize,c=Yi(ui(s,n.line).text,n.ch,o),p=Yi(ui(s,t.line).text,t.ch,o),d=Math.min(c,p),h=Math.max(c,p),g=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=m;g++){var v=ui(s,g).text,y=Ki(v,d,o);d==h?i.push(new ve(pe(g,y),pe(g,y))):v.length>y&&i.push(new ve(pe(g,y),pe(g,Ki(v,h,o))))}i.length||i.push(new ve(n,n)),Ae(s,ye(u.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x=a,E=x.anchor,b=t;if("single"!=r){if("double"==r)var C=e.findWordAt(t);else C=new ve(pe(t.line,0),be(s,pe(t.line+1,0)));de(C.anchor,E)>0?(b=C.head,E=ge(x.from(),C.anchor)):(b=C.anchor,E=he(x.to(),C.head))}(i=u.ranges.slice(0))[l]=new ve(be(s,E),b),Ae(s,ye(i,l),$i)}}(c);var p=B(o,s);(c.line>=p.to||c.line<p.from)&&setTimeout(Lt(e,(function(){g==i&&m(t)})),150)}else{var d=t.clientY<h.top?-20:t.clientY>h.bottom?20:0;d&&setTimeout(Lt(e,(function(){g==i&&(o.scroller.scrollTop+=d,m(t))})),50)}}function v(t){g=1/0,Ii(t),Wt(e),Pi(document,"mousemove",y),Pi(document,"mouseup",x),s.history.lastSelOrigin=null}var y=Lt(e,(function(e){Di(e)?m(e):v(e)})),x=Lt(e,v);ki(document,"mousemove",y),ki(document,"mouseup",x)}(e,t,n,s,c)}(t,e,s):Oi(e)==n.scroller&&Ii(e);break;case 2:o&&(t.state.lastMiddleDown=+new Date),s&&Se(t.doc,s),setTimeout(so(Wt,t),20),Ii(e);break;case 3:x&&xn(t,e)}}}}function Jt(e,t,n,r,i){try{var o=t.clientX,s=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Ii(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(s>l.bottom||!Hi(e,n))return Ri(t);s-=l.top-a.viewOffset;for(var u=0;u<e.options.gutters.length;++u){var c=a.gutters.childNodes[u];if(c&&c.getBoundingClientRect().right>=o)return i(e,n,e,hi(e.doc,s),e.options.gutters[u],t),Ri(t)}}function Zt(e,t){return Jt(e,t,"gutterClick",!0,ji)}var en=0;function tn(e){var t=this;if(!Gi(t,e)&&!Xt(t.display,e)){Ii(e),r&&(en=+new Date);var n=Yt(t,e,!0),i=e.dataTransfer.files;if(n&&!$t(t))if(i&&i.length&&window.FileReader&&window.File)for(var o=i.length,s=Array(o),a=0,l=function(e,r){var i=new FileReader;i.onload=Lt(t,(function(){if(s[r]=i.result,++a==o){var e={from:n=be(t.doc,n),to:n,text:Do(s.join("\n")),origin:"paste"};wn(t.doc,e),Ie(t.doc,xe(n,En(e)))}})),i.readAsText(e)},u=0;u<o;++u)l(i[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(so(Wt,t),20);try{if(s=e.dataTransfer.getData("Text")){if(t.state.draggingText&&!(g?e.metaKey:e.ctrlKey))var c=t.listSelections();if(Re(t.doc,xe(n,n)),c)for(u=0;u<c.length;++u)Rn(t.doc,"",c[u].anchor,c[u].head,"drag");t.replaceSelection(s,"around","paste"),Wt(t)}}catch(e){}}}}function nn(t,n){Math.abs(t.doc.scrollTop-n)<2||(t.doc.scrollTop=n,e||X(t,{top:n}),t.display.scroller.scrollTop!=n&&(t.display.scroller.scrollTop=n),t.display.scrollbars.setScrollTop(n),e&&X(t),Be(t,100))}function rn(e,t,n){(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,H(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}var on=0,sn=null;r?sn=-.53:e?sn=15:a?sn=-.7:u&&(sn=-1/3);var an=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};function ln(t,n){var r=an(n),i=r.x,s=r.y,a=t.display,u=a.scroller;if(i&&u.scrollWidth>u.clientWidth||s&&u.scrollHeight>u.clientHeight){if(s&&g&&o)e:for(var c=n.target,p=a.view;c!=u;c=c.parentNode)for(var d=0;d<p.length;d++)if(p[d].node==c){t.display.currentWheelTarget=c;break e}if(i&&!e&&!l&&null!=sn)return s&&nn(t,Math.max(0,Math.min(u.scrollTop+s*sn,u.scrollHeight-u.clientHeight))),rn(t,Math.max(0,Math.min(u.scrollLeft+i*sn,u.scrollWidth-u.clientWidth))),Ii(n),void(a.wheelStartX=null);if(s&&null!=sn){var f=s*sn,h=t.doc.scrollTop,m=h+a.wrapper.clientHeight;f<0?h=Math.max(0,h+f-50):m=Math.min(t.doc.height,m+f+50),X(t,{top:h,bottom:m})}on<20&&(null==a.wheelStartX?(a.wheelStartX=u.scrollLeft,a.wheelStartY=u.scrollTop,a.wheelDX=i,a.wheelDY=s,setTimeout((function(){if(null!=a.wheelStartX){var e=u.scrollLeft-a.wheelStartX,t=u.scrollTop-a.wheelStartY,n=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(sn=(sn*on+n)/(on+1),++on)}}),200)):(a.wheelDX+=i,a.wheelDY+=s))}}function un(e,t,n){if("string"==typeof t&&!(t=Kn[t]))return!1;e.display.pollingFast&&qt(e)&&(e.display.pollingFast=!1);var r=e.display.shift,i=!1;try{$t(e)&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Wi}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}C.wheelEventPixels=function(e){var t=an(e);return t.x*=sn,t.y*=sn,t};var cn=new Xi;function pn(e,t,n,r){var i=e.state.keySeq;if(i){if(tr(t))return"handled";cn.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,Vt(e))})),t=i+" "+t}var o=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=er(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&er(t,e.options.extraKeys,n,e)||er(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&ji(e,"keyHandled",e,t,n),"handled"!=o&&"multi"!=o||(Ii(n),Ge(e)),i&&!o&&/\'$/.test(t)?(Ii(n),!0):!!o}function dn(e,t){var n=nr(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?pn(e,"Shift-"+n,t,(function(t){return un(e,t,!0)}))||pn(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return un(e,t)})):pn(e,n,t,(function(t){return un(e,t)})))}var fn=null;function hn(e){var t=this;if(zt(t),!Gi(t,e)){r&&i<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var o=dn(t,e);l&&(fn=o?n:null,o||88!=n||Po||!(g?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(bo(t,"CodeMirror-crosshair"),Pi(document,"keyup",n),Pi(document,"mouseover",n))}Co(t,"CodeMirror-crosshair"),ki(document,"keyup",n),ki(document,"mouseover",n)}(t)}}function gn(e){16==e.keyCode&&(this.doc.sel.shift=!1),Gi(this,e)}function mn(e){var t=this;if(!(Gi(t,e)||e.ctrlKey&&!e.altKey||g&&e.metaKey)){var n=e.keyCode,o=e.charCode;if(l&&n==fn)return fn=null,void Ii(e);(l&&(!e.which||e.which<10)||c)&&dn(t,e)||function(e,t,n){return pn(e,"'"+n+"'",t,(function(t){return un(e,t,!0)}))}(t,e,String.fromCharCode(null==o?n:o))||(r&&i>=9&&(t.display.inputHasSelection=null),Ut(t))}}function vn(e){"nocursor"!=e.options.readOnly&&(e.state.focused||(Mi(e,"focus",e),e.state.focused=!0,Co(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(Vt(e),o&&setTimeout(so(Vt,e,!0),0))),jt(e),Ge(e))}function yn(e){e.state.focused&&(Mi(e,"blur",e),e.state.focused=!1,bo(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150)}function xn(e,t){if(!Gi(e,t,"contextmenu")){var n=e.display;if(!Xt(n,t)&&!function(e,t){return!!Hi(e,"gutterContextMenu")&&Jt(e,t,"gutterContextMenu",!1,Mi)}(e,t)){var s=Yt(e,t),a=n.scroller.scrollTop;if(s&&!l){e.options.resetSelectionOnContextMenu&&-1==e.doc.sel.contains(s)&&Lt(e,Ae)(e.doc,xe(s),zi);var u=n.input.style.cssText;if(n.inputDiv.style.position="absolute",n.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(t.clientY-5)+"px; left: "+(t.clientX-5)+"px; z-index: 1000; background: "+(r?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",o)var c=window.scrollY;if(Wt(e),o&&window.scrollTo(null,c),Vt(e),e.somethingSelected()||(n.input.value=n.prevInput=" "),n.contextMenuPending=!0,n.selForContextMenu=e.doc.sel,clearTimeout(n.detectingSelectAll),r&&i>=9&&d(),x){_i(t);var p=function(){Pi(window,"mouseup",p),setTimeout(f,20)};ki(window,"mouseup",p)}else setTimeout(f,50)}}}function d(){if(null!=n.input.selectionStart){var t=e.somethingSelected(),r=n.input.value=""+(t?n.input.value:"");n.prevInput=t?"":"",n.input.selectionStart=1,n.input.selectionEnd=r.length,n.selForContextMenu=e.doc.sel}}function f(){if(n.contextMenuPending=!1,n.inputDiv.style.position="relative",n.input.style.cssText=u,r&&i<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=a),jt(e),null!=n.input.selectionStart){(!r||r&&i<9)&&d();var t=0,o=function(){n.selForContextMenu==e.doc.sel&&0==n.input.selectionStart?Lt(e,Kn.selectAll)(e):t++<10?n.detectingSelectAll=setTimeout(o,500):Vt(e)};n.detectingSelectAll=setTimeout(o,200)}}}var En=C.changeEnd=function(e){return e.text?pe(e.from.line+e.text.length-1,eo(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};function bn(e,t){if(de(e,t.from)<0)return e;if(de(e,t.to)<=0)return En(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=En(t).ch-t.to.ch),pe(n,r)}function Cn(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new ve(bn(i.anchor,t),bn(i.head,t)))}return ye(n,e.sel.primIndex)}function Tn(e,t,n){return e.line==t.line?pe(n.line,e.ch-t.ch+n.ch):pe(n.line+(e.line-t.line),e.ch)}function Sn(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return n&&(r.update=function(t,n,r,i){t&&(this.from=be(e,t)),n&&(this.to=be(e,n)),r&&(this.text=r),void 0!==i&&(this.origin=i)}),Mi(e,"beforeChange",e,r),e.cm&&Mi(e.cm,"beforeChange",e.cm,r),r.canceled?null:{from:r.from,to:r.to,text:r.text,origin:r.origin}}function wn(e,t,n){if(e.cm){if(!e.cm.curOp)return Lt(e.cm,wn)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(Hi(e,"beforeChange")||e.cm&&Hi(e.cm,"beforeChange"))||(t=Sn(e,t,!0))){var r=E&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=no(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var s=r[o],a=s.find(0),l=0;l<i.length;++l){var u=i[l];if(!(de(u.to,a.from)<0||de(u.from,a.to)>0)){var c=[l,1],p=de(u.from,a.from),d=de(u.to,a.to);(p<0||!s.inclusiveLeft&&!p)&&c.push({from:u.from,to:a.from}),(d>0||!s.inclusiveRight&&!d)&&c.push({from:a.to,to:u.to}),i.splice.apply(i,c),l+=c.length-1}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Nn(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else Nn(e,t)}}function Nn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=de(t.from,t.to)){var n=Cn(e,t);Ei(e,t,n,e.cm?e.cm.curOp.id:NaN),An(e,t,n,hr(e,t));var r=[];ai(e,(function(e,n){n||-1!=no(r,e.history)||(Li(e.history,t),r.push(e.history)),An(e,t,null,hr(e,t))}))}}function Ln(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,s="undo"==t?i.done:i.undone,a="undo"==t?i.undone:i.done,l=0;l<s.length&&(r=s[l],n?!r.ranges||r.equals(e.sel):r.ranges);l++);if(l!=s.length){for(i.lastOrigin=i.lastSelOrigin=null;(r=s.pop()).ranges;){if(bi(r,a),n&&!r.equals(e.sel))return void Ae(e,r,{clearRedo:!1});o=r}var u=[];bi(o,a),a.push({changes:u,generation:i.generation}),i.generation=r.generation||++i.maxGeneration;var c=Hi(e,"beforeChange")||e.cm&&Hi(e.cm,"beforeChange");for(l=r.changes.length-1;l>=0;--l){var p=r.changes[l];if(p.origin=t,c&&!Sn(e,p,!1))return void(s.length=0);u.push(yi(e,p));var d=l?Cn(e,p):eo(s);An(e,p,d,mr(e,p)),!l&&e.cm&&e.cm.scrollIntoView({from:p.from,to:En(p)});var f=[];ai(e,(function(e,t){t||-1!=no(f,e.history)||(Li(e.history,p),f.push(e.history)),An(e,p,null,mr(e,p))}))}}}}function In(e,t){if(0!=t&&(e.first+=t,e.sel=new me(ro(e.sel.ranges,(function(e){return new ve(pe(e.anchor.line+t,e.anchor.ch),pe(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Ot(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Dt(e.cm,r,"gutter")}}function An(e,t,n,r){if(e.cm&&!e.cm.curOp)return Lt(e.cm,An)(e,t,n,r);if(t.to.line<e.first)In(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);In(e,i),t={from:pe(e.first,0),to:pe(t.to.line+i,t.to.ch),text:[eo(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:pe(o,ui(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ci(e,t.from,t.to),n||(n=Cn(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,s=t.to,a=!1,l=o.line;e.options.lineWrapping||(l=fi(Nr(ui(r,o.line))),r.iter(l,s.line+1,(function(e){if(e==i.maxLine)return a=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&Bi(e),ei(r,t,n,N(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=O(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)})),a&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,o.line),Be(e,400);var u=t.text.length-(s.line-o.line)-1;t.full?Ot(e):o.line!=s.line||1!=t.text.length||Zr(e.doc,t)?Ot(e,o.line,s.line+1,u):Dt(e,o.line,"text");var c=Hi(e,"changes"),p=Hi(e,"change");if(p||c){var d={from:o,to:s,text:t.text,removed:t.removed,origin:t.origin};p&&ji(e,"change",e,d),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}(e.cm,t,r):ei(e,t,r),Re(e,n,zi)}}function Rn(e,t,n,r,i){if(r||(r=n),de(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=Do(t)),wn(e,{from:n,to:r,text:t,origin:i})}function _n(e,t,n,r,i){var o=e.display,s=gt(e.display);n<0&&(n=0);var a=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=Xe(e),u={};i-n>l&&(i=n+l);var c=e.doc.height+We(o),p=n<s,d=i>c-s;if(n<a)u.scrollTop=p?0:n;else if(i>a+l){var f=Math.min(n,(d?c:i)-l);f!=a&&(u.scrollTop=f)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=Qe(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),m=r-t>g;return m&&(r=t+g),t<10?u.scrollLeft=0:t<h?u.scrollLeft=Math.max(0,t-(m?0:10)):r>g+h-3&&(u.scrollLeft=r+(m?0:10)-g),u}function On(e,t,n){null==t&&null==n||kn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Dn(e){kn(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?pe(t.line,t.ch-1):t,r=pe(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function kn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=pt(e,t.from),r=pt(e,t.to),i=_n(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Pn(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=qe(e,t):n="prev");var s=e.options.tabSize,a=ui(o,t),l=Yi(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&((u=o.mode.indent(i,a.text.slice(c.length),a.text))==Wi||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?Yi(ui(o,t-1).text,null,s):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var p="",d=0;if(e.options.indentWithTabs)for(var f=Math.floor(u/s);f;--f)d+=s,p+="\t";if(d<u&&(p+=Zi(u-d)),p!=c)Rn(o,p,pe(t,0),pe(t,c.length),"+input");else for(f=0;f<o.sel.ranges.length;f++){var h=o.sel.ranges[f];if(h.head.line==t&&h.head.ch<c.length){Ne(o,f,new ve(d=pe(t,c.length),d));break}}a.stateAfter=null}function Mn(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=ui(e,Ee(e,t)):i=fi(t),null==i?null:(r(o,i)&&e.cm&&Dt(e.cm,i,n),o)}function Fn(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&de(o.from,eo(r).to)<=0;){var s=r.pop();if(de(s.from,o.from)<0){o.from=s.from;break}}r.push(o)}Nt(e,(function(){for(var t=r.length-1;t>=0;t--)Rn(e.doc,"",r[t].from,r[t].to,"+delete");Dn(e)}))}function jn(e,t,n,r,i){var o=t.line,s=t.ch,a=n,l=ui(e,o),u=!0;function c(t){var r,a=(i?$o:Qo)(l,s,n,!0);if(null==a){if(t||!((r=o+n)<e.first||r>=e.first+e.size?u=!1:(o=r,l=ui(e,r))))return u=!1;s=i?(n<0?Bo:Go)(l):n<0?l.text.length:0}else s=a;return!0}if("char"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var p=null,d="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||c(!h);h=!1){var g=l.text.charAt(s)||"\n",m=uo(g,f)?"w":d&&"\n"==g?"n":!d||/\s/.test(g)?null:"p";if(!d||h||m||(m="s"),p&&p!=m){n<0&&(n=1,c());break}if(m&&(p=m),n>0&&!c(!h))break}var v=ke(e,pe(o,s),a,!0);return u||(v.hitSide=!0),v}function Un(e,t,n,r){var i,o=e.doc,s=t.left;if("page"==r){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(a-(n<0?1.5:.5)*gt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var l=ft(e,s,i);if(!l.outside)break;if(n<0?i<=0:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}C.prototype={constructor:C,focus:function(){window.focus(),Wt(this),Ut(this)},setOption:function(e,t){var n=this.options,r=n[e];n[e]==t&&"mode"!=e||(n[e]=t,Bn.hasOwnProperty(e)&&Lt(this,Bn[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](rr(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:It((function(e,t){var n=e.token?e:C.getMode(this.options,e);if(n.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:n,modeSpec:e,opaque:t&&t.opaque}),this.state.modeGen++,Ot(this)})),removeOverlay:It((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void Ot(this)}})),indentLine:It((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Ce(this.doc,e)&&Pn(this,e,t,n)})),indentSelection:It((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Pn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Dn(this));else{var o=i.from(),s=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l<n;++l)Pn(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&Ne(this.doc,r,new ve(o,u[r].to()),zi)}}})),getTokenAt:function(e,t){return Ur(this,e,t)},getLineTokens:function(e,t){return Ur(this,pe(e),t,!0)},getTokenTypeAt:function(e){e=be(this.doc,e);var t,n=Hr(this,ui(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var s=r+i>>1;if((s?n[2*s-1]:0)>=o)i=s;else{if(!(n[2*s+1]<o)){t=n[2*s+2];break}r=s+1}}var a=t?t.indexOf("cm-overlay "):-1;return a<0?t:0==a?null:t.slice(0,a-1)},getModeAt:function(e){var t=this.doc.mode;return t.innerMode?C.innerMode(t,this.getTokenAt(e).state).mode:t},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!Qn.hasOwnProperty(t))return Qn;var r=Qn[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var s=r[i[t][o]];s&&n.push(s)}else i.helperType&&r[i.helperType]?n.push(r[i.helperType]):r[i.name]&&n.push(r[i.name]);for(o=0;o<r._global.length;o++){var a=r._global[o];a.pred(i,this)&&-1==no(n,a.val)&&n.push(a.val)}return n},getStateAfter:function(e,t){var n=this.doc;return qe(this,(e=Ee(n,null==e?n.first+n.size-1:e))+1,t)},cursorCoords:function(e,t){var n=this.doc.sel.primary();return ct(this,null==e?n.head:"object"==typeof e?be(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return ut(this,be(this.doc,e),t||"page")},coordsChar:function(e,t){return ft(this,(e=lt(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=lt(this,{top:e,left:0},t||"page").top,hi(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var n=!1,r=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>r&&(e=r,n=!0);var i=ui(this.doc,e);return at(this,i,{top:0,left:0},t||"page").top+(n?this.doc.height-gi(i):0)},defaultTextHeight:function(){return gt(this.display)},defaultCharWidth:function(){return mt(this.display)},setGutterMarker:It((function(e,t,n){return Mn(this.doc,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&co(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:It((function(e){var t=this,n=t.doc,r=n.first;n.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Dt(t,r,"gutter"),co(n.gutterMarkers)&&(n.gutterMarkers=null)),++r}))})),addLineWidget:It((function(e,t,n){return function(e,t,n,r){var i=new _r(e,n,r);return i.noHScroll&&(e.display.alignWidgets=!0),Mn(e.doc,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,!Ar(e.doc,t)){var r=gi(t)<e.doc.scrollTop;di(t,t.height+Dr(i)),r&&On(e,null,i.height),e.curOp.forceUpdate=!0}return!0})),i}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},lineInfo:function(e){if("number"==typeof e){if(!Ce(this.doc,e))return null;var t=e;if(!(e=ui(this.doc,e)))return null}else if(null==(t=fi(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,s,a,l,u,c,p=this.display,d=(e=ct(this,be(this.doc,e))).bottom,f=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),p.sizer.appendChild(t),"over"==r)d=e.top;else if("above"==r||"near"==r){var h=Math.max(p.wrapper.clientHeight,this.doc.height),g=Math.max(p.sizer.clientWidth,p.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?d=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(d=e.bottom),f+t.offsetWidth>g&&(f=g-t.offsetWidth)}t.style.top=d+"px",t.style.left=t.style.right="","right"==i?(f=p.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?f=0:"middle"==i&&(f=(p.sizer.clientWidth-t.offsetWidth)/2),t.style.left=f+"px"),n&&(o=this,s=f,a=d,l=f+t.offsetWidth,u=d+t.offsetHeight,null!=(c=_n(o,s,a,l,u)).scrollTop&&nn(o,c.scrollTop),null!=c.scrollLeft&&rn(o,c.scrollLeft))},triggerOnKeyDown:It(hn),triggerOnKeyPress:It(mn),triggerOnKeyUp:gn,execCommand:function(e){if(Kn.hasOwnProperty(e))return Kn[e](this)},findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=0,s=be(this.doc,e);o<t&&!(s=jn(this.doc,s,i,n,r)).hitSide;++o);return s},moveH:It((function(e,t){var n=this;n.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?jn(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),Qi)})),deleteH:It((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Fn(this,(function(n){var i=jn(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var s=0,a=be(this.doc,e);s<t;++s){var l=ct(this,a,"div");if(null==o?o=l.left:l.left=o,(a=Un(this,l,i,n)).hitSide)break}return a},moveV:It((function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(s){if(o)return e<0?s.from():s.to();var a=ct(n,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),i.push(a.left);var l=Un(n,a,e,t);return"page"==t&&s==r.sel.primary()&&On(n,null,ut(n,l,"div").top-a.top),l}),Qi),i.length)for(var s=0;s<r.sel.ranges.length;s++)r.sel.ranges[s].goalColumn=i[s]})),findWordAt:function(e){var t=ui(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");(e.xRel<0||r==t.length)&&n?--n:++r;for(var o=t.charAt(n),s=uo(o,i)?function(e){return uo(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!uo(e)};n>0&&s(t.charAt(n-1));)--n;for(;r<t.length&&s(t.charAt(r));)++r}return new ve(pe(e.line,n),pe(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Co(this.display.cursorDiv,"CodeMirror-overwrite"):bo(this.display.cursorDiv,"CodeMirror-overwrite"),Mi(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return xo()==this.display.input},scrollTo:It((function(e,t){null==e&&null==t||kn(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-$e(this)-this.display.barHeight,width:e.scrollWidth-$e(this)-this.display.barWidth,clientHeight:Xe(this),clientWidth:Qe(this)}},scrollIntoView:It((function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:pe(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)kn(this),this.curOp.scrollToPos=e;else{var n=_n(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(n.scrollLeft,n.scrollTop)}})),setSize:It((function(e,t){var n=this;function r(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}null!=e&&(n.display.wrapper.style.width=r(e)),null!=t&&(n.display.wrapper.style.height=r(t)),n.options.lineWrapping&&rt(this);var i=n.display.viewFrom;n.doc.iter(i,n.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Dt(n,i,"widget");break}++i})),n.curOp.forceUpdate=!0,Mi(n,"refresh",this)})),operation:function(e){return Nt(this,e)},refresh:It((function(){var e=this.display.cachedTextHeight;Ot(this),this.curOp.forceUpdate=!0,it(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),_(this),(null==e||Math.abs(e-gt(this.display))>.5)&&L(this),Mi(this,"refresh",this)})),swapDoc:It((function(e){var t=this.doc;return t.cm=null,li(this,e),it(this),Vt(this),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ji(this,"swapDoc",this,t),t})),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},qi(C);var Gn=C.defaults={},Bn=C.optionHandlers={};function Hn(e,t,n,r){C.defaults[e]=t,n&&(Bn[e]=r?function(e,t,r){r!=qn&&n(e,t,r)}:n)}var qn=C.Init={toString:function(){return"CodeMirror.Init"}};Hn("value","",(function(e,t){e.setValue(t)}),!0),Hn("mode",null,(function(e,t){e.doc.modeOption=t,S(e)}),!0),Hn("indentUnit",2,S,!0),Hn("indentWithTabs",!1),Hn("smartIndent",!0),Hn("tabSize",4,(function(e){w(e),it(e),Ot(e)}),!0),Hn("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,(function(e,t){e.options.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),e.refresh()}),!0),Hn("specialCharPlaceholder",(function(e){var t=go("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}),(function(e){e.refresh()}),!0),Hn("electricChars",!0),Hn("rtlMoveVisually",!m),Hn("wholeLineUpdateBefore",!0),Hn("theme","default",(function(e){I(e),A(e)}),!0),Hn("keyMap","default",(function(e,t,n){var r=rr(t),i=n!=C.Init&&rr(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),Hn("extraKeys",null),Hn("lineWrapping",!1,(function(e){e.options.lineWrapping?(Co(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(bo(e.display.wrapper,"CodeMirror-wrap"),D(e)),L(e),Ot(e),it(e),setTimeout((function(){U(e)}),100)}),!0),Hn("gutters",[],(function(e){k(e.options),A(e)}),!0),Hn("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?W(e.display)+"px":"0",e.refresh()}),!0),Hn("coverGutterNextToScrollbar",!1,(function(e){U(e)}),!0),Hn("scrollbarStyle","native",(function(e){j(e),U(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),Hn("lineNumbers",!1,(function(e){k(e.options),A(e)}),!0),Hn("firstLineNumber",1,A,!0),Hn("lineNumberFormatter",(function(e){return e}),A,!0),Hn("showCursorWhenSelecting",!1,Fe,!0),Hn("resetSelectionOnContextMenu",!0),Hn("readOnly",!1,(function(e,t){"nocursor"==t?(yn(e),e.display.input.blur(),e.display.disabled=!0):(e.display.disabled=!1,t||Vt(e))})),Hn("disableInput",!1,(function(e,t){t||Vt(e)}),!0),Hn("dragDrop",!0),Hn("cursorBlinkRate",530),Hn("cursorScrollMargin",0),Hn("cursorHeight",1,Fe,!0),Hn("singleCursorHeightPerLine",!0,Fe,!0),Hn("workTime",100),Hn("workDelay",100),Hn("flattenSpans",!0,w,!0),Hn("addModeClass",!1,w,!0),Hn("pollInterval",100),Hn("undoDepth",200,(function(e,t){e.doc.history.undoDepth=t})),Hn("historyEventDelay",1250),Hn("viewportMargin",10,(function(e){e.refresh()}),!0),Hn("maxHighlightLength",1e4,w,!0),Hn("moveInputWithCursor",!0,(function(e,t){t||(e.display.inputDiv.style.top=e.display.inputDiv.style.left=0)})),Hn("tabindex",null,(function(e,t){e.display.input.tabIndex=t||""})),Hn("autofocus",null);var Vn=C.modes={},Wn=C.mimeModes={};C.defineMode=function(e,t){C.defaults.mode||"null"==e||(C.defaults.mode=e),arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Vn[e]=t},C.defineMIME=function(e,t){Wn[e]=t},C.resolveMode=function(e){if("string"==typeof e&&Wn.hasOwnProperty(e))e=Wn[e];else if(e&&"string"==typeof e.name&&Wn.hasOwnProperty(e.name)){var t=Wn[e.name];"string"==typeof t&&(t={name:t}),(e=io(t,e)).name=t.name}else if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return C.resolveMode("application/xml");return"string"==typeof e?{name:e}:e||{name:"null"}},C.getMode=function(e,t){t=C.resolveMode(t);var n=Vn[t.name];if(!n)return C.getMode(e,"text/plain");var r=n(e,t);if(zn.hasOwnProperty(t.name)){var i=zn[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r},C.defineMode("null",(function(){return{token:function(e){e.skipToEnd()}}})),C.defineMIME("text/plain","null");var zn=C.modeExtensions={};C.extendMode=function(e,t){oo(t,zn.hasOwnProperty(e)?zn[e]:zn[e]={})},C.defineExtension=function(e,t){C.prototype[e]=t},C.defineDocExtension=function(e,t){ii.prototype[e]=t},C.defineOption=Hn;var $n=[];C.defineInitHook=function(e){$n.push(e)};var Qn=C.helpers={};C.registerHelper=function(e,t,n){Qn.hasOwnProperty(e)||(Qn[e]=C[e]={_global:[]}),Qn[e][t]=n},C.registerGlobalHelper=function(e,t,n,r){C.registerHelper(e,t,r),Qn[e]._global.push({pred:n,val:r})};var Xn=C.copyState=function(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},Yn=C.startState=function(e,t,n){return!e.startState||e.startState(t,n)};C.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var Kn=C.commands={selectAll:function(e){e.setSelection(pe(e.firstLine(),0),pe(e.lastLine()),zi)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),zi)},killLine:function(e){Fn(e,(function(t){if(t.empty()){var n=ui(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:pe(t.head.line+1,0)}:{from:t.head,to:pe(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){Fn(e,(function(t){return{from:pe(t.from().line,0),to:be(e.doc,pe(t.to().line+1,0))}}))},delLineLeft:function(e){Fn(e,(function(e){return{from:pe(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){Fn(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){Fn(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){e.undo()},redo:function(e){e.redo()},undoSelection:function(e){e.undoSelection()},redoSelection:function(e){e.redoSelection()},goDocStart:function(e){e.extendSelection(pe(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(pe(e.lastLine()))},goLineStart:function(e){e.extendSelectionsBy((function(t){return Ho(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){e.extendSelectionsBy((function(t){return qo(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){e.extendSelectionsBy((function(t){return function(e,t){for(var n,r=ui(e.doc,t);n=Sr(r);)r=n.find(1,!0).line,t=null;var i=mi(r),o=i?i[0].level%2?Go(r):Bo(r):r.text.length;return pe(null==t?fi(r):t,o)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){e.extendSelectionsBy((function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),Qi)},goLineLeft:function(e){e.extendSelectionsBy((function(t){var n=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),Qi)},goLineLeftSmart:function(e){e.extendSelectionsBy((function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?qo(e,t.head):r}),Qi)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),s=Yi(e.getLine(o.line),o.ch,r);t.push(new Array(r-s%r+1).join(" "))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){Nt(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){var i=t[r].head,o=ui(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new pe(i.line,i.ch-1)),i.ch>0)i=new pe(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),pe(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var s=ui(e.doc,i.line-1).text;s&&e.replaceRange(o.charAt(0)+"\n"+s.charAt(s.length-1),pe(i.line-1,s.length-1),pe(i.line,1),"+transpose")}n.push(new ve(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){Nt(e,(function(){for(var t=e.listSelections().length,n=0;n<t;n++){var r=e.listSelections()[n];e.replaceRange("\n",r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0),Dn(e)}}))},toggleOverwrite:function(e){e.toggleOverwrite()}},Jn=C.keyMap={};function Zn(e){for(var t,n,r,i,o=e.split(/-(?!$)/),s=(e=o[o.length-1],0);s<o.length-1;s++){var a=o[s];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))t=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else{if(!/^s(hift)$/i.test(a))throw new Error("Unrecognized modifier name: "+a);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}Jn.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Jn.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Jn.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},Jn.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Jn.default=g?Jn.macDefault:Jn.pcDefault,C.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=ro(n.split(" "),Zn),o=0;o<i.length;o++){var s,a;o==i.length-1?(a=n,s=r):(a=i.slice(0,o+1).join(" "),s="...");var l=t[a];if(l){if(l!=s)throw new Error("Inconsistent bindings for "+a)}else t[a]=s}delete e[n]}for(var u in t)e[u]=t[u];return e};var er=C.lookupKey=function(e,t,n,r){var i=(t=rr(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return er(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var s=er(e,t.fallthrough[o],n,r);if(s)return s}}},tr=C.isModifierKey=function(e){var t="string"==typeof e?e:Fo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t},nr=C.keyName=function(e,t){if(l&&34==e.keyCode&&e.char)return!1;var n=Fo[e.keyCode],r=n;return null!=r&&!e.altGraphKey&&(e.altKey&&"Alt"!=n&&(r="Alt-"+r),(y?e.metaKey:e.ctrlKey)&&"Ctrl"!=n&&(r="Ctrl-"+r),(y?e.ctrlKey:e.metaKey)&&"Cmd"!=n&&(r="Cmd-"+r),!t&&e.shiftKey&&"Shift"!=n&&(r="Shift-"+r),r)};function rr(e){return"string"==typeof e?Jn[e]:e}C.fromTextArea=function(e,t){if((t=t?oo(t):{}).value=e.value,!t.tabindex&&e.tabindex&&(t.tabindex=e.tabindex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=xo();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=a.getValue()}if(e.form&&(ki(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var i=e.form,o=i.submit;try{var s=i.submit=function(){r(),i.submit=o,i.submit(),i.submit=s}}catch(e){}}t.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(Pi(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=o))}},e.style.display="none";var a=C((function(t){e.parentNode.insertBefore(t,e.nextSibling)}),t);return a};var ir=C.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};ir.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var n=t==e;else n=t&&(e.test?e.test(t):e(t));if(n)return++this.pos,t},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Yi(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Yi(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return Yi(this.string,null,this.tabSize)-(this.lineStart?Yi(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var or=C.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e};qi(or),or.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&xt(e),Hi(this,"clear")){var n=this.find();n&&ji(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var s=this.lines[o],a=dr(s.markedSpans,this);e&&!this.collapsed?Dt(e,fi(s),"text"):e&&(null!=a.to&&(i=fi(s)),null!=a.from&&(r=fi(s))),s.markedSpans=fr(s.markedSpans,a),null==a.from&&this.collapsed&&!Ar(this.doc,s)&&e&&di(s,gt(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(o=0;o<this.lines.length;++o){var l=Nr(this.lines[o]),u=O(l);u>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Ot(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Oe(e.doc)),e&&ji(e,"markerCleared",e,this),t&&Et(e),this.parent&&this.parent.clear()}},or.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],s=dr(o.markedSpans,this);if(null!=s.from&&(n=pe(t?o:fi(o),s.from),-1==e))return n;if(null!=s.to&&(r=pe(t?o:fi(o),s.to),1==e))return r}return n&&{from:n,to:r}},or.prototype.changed=function(){var e=this.find(-1,!0),t=this,n=this.doc.cm;e&&n&&Nt(n,(function(){var r=e.line,i=fi(e.line),o=Ke(n,i);if(o&&(nt(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Ar(t.doc,r)&&null!=t.height){var s=t.height;t.height=null;var a=Dr(t)-s;a&&di(r,r.height+a)}}))},or.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=no(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},or.prototype.detachLine=function(e){if(this.lines.splice(no(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}};var sr=0;function ar(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,i){(r=oo(r)).shared=!1;var o=[ar(e,t,n,r,i)],s=o[0],a=r.widgetNode;return ai(e,(function(e){a&&(r.widgetNode=a.cloneNode(!0)),o.push(ar(e,be(e,t),be(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;s=eo(o)})),new lr(o,s)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Lt(e.cm,ar)(e,t,n,r,i);var o=new or(e,i),s=de(t,n);if(r&&oo(r,o,!1),s>0||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=go("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(wr(e,t.line,t,n,o)||t.line!=n.line&&wr(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");b=!0}o.addToHistory&&Ei(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,l=t.line,u=e.cm;if(e.iter(l,n.line+1,(function(e){u&&o.collapsed&&!u.options.lineWrapping&&Nr(e)==u.display.maxLine&&(a=!0),o.collapsed&&l!=t.line&&di(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new pr(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){Ar(e,t)&&di(t,0)})),o.clearOnEnter&&ki(o,"beforeCursorEnter",(function(){o.clear()})),o.readOnly&&(E=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++sr,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)Ot(u,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)Dt(u,c,"text");o.atomic&&Oe(u.doc),ji(u,"markerAdded",u,o)}return o}var lr=C.SharedTextMarker=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function ur(e){return e.findMarks(pe(e.first,0),e.clipPos(pe(e.lastLine())),(function(e){return e.parent}))}function cr(e){for(var t=0;t<e.length;t++){var n=e[t],r=[n.primary.doc];ai(n.primary.doc,(function(e){r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==no(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}}}function pr(e,t,n){this.marker=e,this.from=t,this.to=n}function dr(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function fr(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function hr(e,t){if(t.full)return null;var n=Ce(e,t.from.line)&&ui(e,t.from.line).markedSpans,r=Ce(e,t.to.line)&&ui(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,s=0==de(t.from,t.to),a=function(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],s=o.marker;if(null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==s.type&&(!n||!o.marker.insertLeft)){var a=null==o.to||(s.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new pr(s,o.from,a?null:o.to))}}return r}(n,i,s),l=function(e,t,n){if(e)for(var r,i=0;i<e.length;++i){var o=e[i],s=o.marker;if(null==o.to||(s.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var a=null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new pr(s,a?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,s),u=1==t.text.length,c=eo(t.text).length+(u?i:0);if(a)for(var p=0;p<a.length;++p)null==(d=a[p]).to&&((f=dr(l,d.marker))?u&&(d.to=null==f.to?null:f.to+c):d.to=i);if(l)for(p=0;p<l.length;++p){var d,f;null!=(d=l[p]).to&&(d.to+=c),null==d.from?(f=dr(a,d.marker))||(d.from=c,u&&(a||(a=[])).push(d)):(d.from+=c,u&&(a||(a=[])).push(d))}a&&(a=gr(a)),l&&l!=a&&(l=gr(l));var h=[a];if(!u){var g,m=t.text.length-2;if(m>0&&a)for(p=0;p<a.length;++p)null==a[p].to&&(g||(g=[])).push(new pr(a[p].marker,null,null));for(p=0;p<m;++p)h.push(g);h.push(l)}return h}function gr(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function mr(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=0,i=[];r<t.text.length;++r)i.push(Ti(n[r]));return i}(e,t),r=hr(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],s=r[i];if(o&&s)e:for(var a=0;a<s.length;++a){for(var l=s[a],u=0;u<o.length;++u)if(o[u].marker==l.marker)continue e;o.push(l)}else s&&(n[i]=s)}return n}function vr(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function yr(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function xr(e){return e.inclusiveLeft?-1:0}function Er(e){return e.inclusiveRight?1:0}function br(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=de(r.from,i.from)||xr(e)-xr(t);if(o)return-o;var s=de(r.to,i.to)||Er(e)-Er(t);return s||t.id-e.id}function Cr(e,t){var n,r=b&&e.markedSpans;if(r)for(var i,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||br(n,i.marker)<0)&&(n=i.marker);return n}function Tr(e){return Cr(e,!0)}function Sr(e){return Cr(e,!1)}function wr(e,t,n,r,i){var o=ui(e,t),s=b&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var u=l.marker.find(0),c=de(u.from,n)||xr(l.marker)-xr(i),p=de(u.to,r)||Er(l.marker)-Er(i);if(!(c>=0&&p<=0||c<=0&&p>=0)&&(c<=0&&(de(u.to,n)>0||l.marker.inclusiveRight&&i.inclusiveLeft)||c>=0&&(de(u.from,r)<0||l.marker.inclusiveLeft&&i.inclusiveRight)))return!0}}}function Nr(e){for(var t;t=Tr(e);)e=t.find(-1,!0).line;return e}function Lr(e,t){var n=ui(e,t),r=Nr(n);return n==r?t:fi(r)}function Ir(e,t){if(t>e.lastLine())return t;var n,r=ui(e,t);if(!Ar(e,r))return t;for(;n=Sr(r);)r=n.find(1,!0).line;return fi(r)+1}function Ar(e,t){var n=b&&t.markedSpans;if(n)for(var r,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Rr(e,t,r))return!0}}function Rr(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Rr(e,r.line,dr(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Rr(e,t,i))return!0}qi(lr),lr.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ji(this,"clear")}},lr.prototype.find=function(e,t){return this.primary.find(e,t)};var _r=C.LineWidget=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.cm=e,this.node=t};function Or(e,t,n){gi(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&On(e,null,n)}function Dr(e){if(null!=e.height)return e.height;if(!yo(document.body,e.node)){var t="position: relative;";e.coverGutter&&(t+="margin-left: -"+e.cm.display.gutters.offsetWidth+"px;"),e.noHScroll&&(t+="width: "+e.cm.display.wrapper.clientWidth+"px;"),vo(e.cm.display.measure,go("div",[e.node],null,t))}return e.height=e.node.offsetHeight}qi(_r),_r.prototype.clear=function(){var e=this.cm,t=this.line.widgets,n=this.line,r=fi(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Dr(this);Nt(e,(function(){Or(e,n,-o),Dt(e,r,"widget"),di(n,Math.max(0,n.height-o))}))}},_r.prototype.changed=function(){var e=this.height,t=this.cm,n=this.line;this.height=null;var r=Dr(this)-e;r&&Nt(t,(function(){t.curOp.forceUpdate=!0,Or(t,n,r),di(n,n.height+r)}))};var kr=C.Line=function(e,t,n){this.text=e,yr(this,t),this.height=n?n(this):1};function Pr(e){e.parent=null,vr(e)}function Mr(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Fr(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=C.innerMode(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function jr(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=C.innerMode(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function Ur(e,t,n,r){function i(e){return{start:p.start,end:p.pos,string:p.current(),type:o||null,state:e?Xn(s.mode,c):c}}var o,s=e.doc,a=s.mode;t=be(s,t);var l,u=ui(s,t.line),c=qe(e,t.line,n),p=new ir(u.text,e.options.tabSize);for(r&&(l=[]);(r||p.pos<t.ch)&&!p.eol();)p.start=p.pos,o=jr(a,p,c),r&&l.push(i(!0));return r?l:i()}function Gr(e,t,n,r,i,o,s){var a=n.flattenSpans;null==a&&(a=e.options.flattenSpans);var l,u=0,c=null,p=new ir(t,e.options.tabSize),d=e.options.addModeClass&&[null];for(""==t&&Mr(Fr(n,r),o);!p.eol();){if(p.pos>e.options.maxHighlightLength?(a=!1,s&&qr(e,t,r,p.pos),p.pos=t.length,l=null):l=Mr(jr(n,p,r,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||c!=l){for(;u<p.start;)i(u=Math.min(p.start,u+5e4),c);c=l}p.start=p.pos}for(;u<p.pos;){var h=Math.min(p.pos,u+5e4);i(h,c),u=h}}function Br(e,t,n,r){var i=[e.state.modeGen],o={};Gr(e,t.text,e.doc.mode,n,(function(e,t){i.push(e,t)}),o,r);for(var s=0;s<e.state.overlays.length;++s){var a=e.state.overlays[s],l=1,u=0;Gr(e,t.text,a.mode,!0,(function(e,t){for(var n=l;u<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}}),o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Hr(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Br(e,t,t.stateAfter=qe(e,fi(t)));t.styles=r.styles,r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function qr(e,t,n,r){var i=e.doc.mode,o=new ir(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&Fr(i,n);!o.eol()&&o.pos<=e.options.maxHighlightLength;)jr(i,o,n),o.start=o.pos}qi(kr),kr.prototype.lineNo=function(){return fi(this)};var Vr={},Wr={};function zr(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Wr:Vr;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function $r(e,t){var n=go("span",null,null,o?"padding-right: .1px":null),i={pre:go("pre",[n]),content:n,col:0,pos:0,cm:e};t.measure={};for(var s=0;s<=(t.rest?t.rest.length:0);s++){var a,l=s?t.rest[s-1]:t.line;i.pos=0,i.addToken=Qr,(r||o)&&e.getOption("lineWrapping")&&(i.addToken=Xr(i.addToken)),Ro(e.display.measure)&&(a=mi(l))&&(i.addToken=Yr(i.addToken,a)),i.map=[],Jr(l,i,Hr(e,l,t!=e.display.externalMeasured&&fi(l))),l.styleClasses&&(l.styleClasses.bgClass&&(i.bgClass=To(l.styleClasses.bgClass,i.bgClass||"")),l.styleClasses.textClass&&(i.textClass=To(l.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Ao(e.display.measure))),0==s?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return o&&/\bcm-tab\b/.test(i.content.lastChild.className)&&(i.content.className="cm-tab-wrap-hack"),Mi(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=To(i.pre.className,i.textClass||"")),i}function Qr(e,t,n,o,s,a,l){if(t){var u=e.cm.options.specialChars,c=!1;if(u.test(t)){v=document.createDocumentFragment();for(var p=0;;){u.lastIndex=p;var d=u.exec(t),f=d?d.index-p:t.length-p;if(f){var h=document.createTextNode(t.slice(p,p+f));r&&i<9?v.appendChild(go("span",[h])):v.appendChild(h),e.map.push(e.pos,e.pos+f,h),e.col+=f,e.pos+=f}if(!d)break;if(p+=f+1,"\t"==d[0]){var g=e.cm.options.tabSize,m=g-e.col%g;(h=v.appendChild(go("span",Zi(m),"cm-tab"))).setAttribute("role","presentation"),e.col+=m}else h=e.cm.options.specialCharPlaceholder(d[0]),r&&i<9?v.appendChild(go("span",[h])):v.appendChild(h),e.col+=1;e.map.push(e.pos,e.pos+1,h),e.pos++}}else{e.col+=t.length;var v=document.createTextNode(t);e.map.push(e.pos,e.pos+t.length,v),r&&i<9&&(c=!0),e.pos+=t.length}if(n||o||s||c||l){var y=n||"";o&&(y+=o),s&&(y+=s);var x=go("span",[v],y,l);return a&&(x.title=a),e.content.appendChild(x)}e.content.appendChild(v)}}function Xr(e){function t(e){for(var t=" ",n=0;n<e.length-2;++n)t+=n%2?" ":" ";return t+=" "}return function(n,r,i,o,s,a){e(n,r.replace(/ {3,}/g,t),i,o,s,a)}}function Yr(e,t){return function(n,r,i,o,s,a){i=i?i+" cm-force-border":"cm-force-border";for(var l=n.pos,u=l+r.length;;){for(var c=0;c<t.length;c++){var p=t[c];if(p.to>l&&p.from<=l)break}if(p.to>=u)return e(n,r,i,o,s,a);e(n,r.slice(0,p.to-l),i,o,null,a),o=null,r=r.slice(p.to-l),l=p.to}}}function Kr(e,t,n,r){var i=!r&&n.widgetNode;i&&(e.map.push(e.pos,e.pos+t,i),e.content.appendChild(i)),e.pos+=t}function Jr(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var s,a,l,u,c,p,d,f=i.length,h=0,g=(S=1,""),m=0;;){if(m==h){l=u=c=p=a="",d=null,m=1/0;for(var v=[],y=0;y<r.length;++y){var x=r[y],E=x.marker;x.from<=h&&(null==x.to||x.to>h)?(null!=x.to&&m>x.to&&(m=x.to,u=""),E.className&&(l+=" "+E.className),E.css&&(a=E.css),E.startStyle&&x.from==h&&(c+=" "+E.startStyle),E.endStyle&&x.to==m&&(u+=" "+E.endStyle),E.title&&!p&&(p=E.title),E.collapsed&&(!d||br(d.marker,E)<0)&&(d=x)):x.from>h&&m>x.from&&(m=x.from),"bookmark"==E.type&&x.from==h&&E.widgetNode&&v.push(E)}if(d&&(d.from||0)==h&&(Kr(t,(null==d.to?f+1:d.to)-h,d.marker,null==d.from),null==d.to))return;if(!d&&v.length)for(y=0;y<v.length;++y)Kr(t,0,v[y])}if(h>=f)break;for(var b=Math.min(f,m);;){if(g){var C=h+g.length;if(!d){var T=C>b?g.slice(0,b-h):g;t.addToken(t,T,s?s+l:l,c,h+T.length==m?u:"",p,a)}if(C>=b){g=g.slice(b-h),h=b;break}h=C,c=""}g=i.slice(o,o=n[S++]),s=zr(n[S++],t.cm.options)}}else for(var S=1;S<n.length;S+=2)t.addToken(t,i.slice(o,o=n[S]),zr(n[S+1],t.cm.options))}function Zr(e,t){return 0==t.from.ch&&0==t.to.ch&&""==eo(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ei(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),vr(e),yr(e,n);var i=r?r(e):1;i!=e.height&&di(e,i)}(e,n,i,r),ji(e,"change",e,t)}function s(e,t){for(var n=e,o=[];n<t;++n)o.push(new kr(u[n],i(n),r));return o}var a=t.from,l=t.to,u=t.text,c=ui(e,a.line),p=ui(e,l.line),d=eo(u),f=i(u.length-1),h=l.line-a.line;if(t.full)e.insert(0,s(0,u.length)),e.remove(u.length,e.size-u.length);else if(Zr(e,t)){var g=s(0,u.length-1);o(p,p.text,f),h&&e.remove(a.line,h),g.length&&e.insert(a.line,g)}else c==p?1==u.length?o(c,c.text.slice(0,a.ch)+d+c.text.slice(l.ch),f):((g=s(1,u.length-1)).push(new kr(d+c.text.slice(l.ch),f,r)),o(c,c.text.slice(0,a.ch)+u[0],i(0)),e.insert(a.line+1,g)):1==u.length?(o(c,c.text.slice(0,a.ch)+u[0]+p.text.slice(l.ch),i(0)),e.remove(a.line+1,h)):(o(c,c.text.slice(0,a.ch)+u[0],i(0)),o(p,d+p.text.slice(l.ch),f),g=s(1,u.length-1),h>1&&e.remove(a.line+1,h-1),e.insert(a.line+1,g));ji(e,"change",e,t)}function ti(e){this.lines=e,this.parent=null;for(var t=0,n=0;t<e.length;++t)e[t].parent=this,n+=e[t].height;this.height=n}function ni(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}ti.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,Pr(i),ji(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},ni.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),s=r.height;if(r.removeInner(e,o),this.height-=s-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ti))){var a=[];this.collapse(a),this.children=[new ti(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var s=new ti(i.lines.splice(i.lines.length-25,25));i.height-=s.height,this.children.splice(r+1,0,s),s.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new ni(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=no(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new ni(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var s=Math.min(t,o-e);if(i.iterN(e,s,n))return!0;if(0==(t-=s))break;e=0}else e-=o}}};var ri=0,ii=C.Doc=function(e,t,n){if(!(this instanceof ii))return new ii(e,t,n);null==n&&(n=0),ni.call(this,[new ti([new kr("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var r=pe(n,0);this.sel=xe(r),this.history=new vi(null),this.id=++ri,this.modeOption=t,"string"==typeof e&&(e=Do(e)),ei(this,{from:r,to:r,text:e}),Ae(this,xe(r),zi)};ii.prototype=io(ni.prototype,{constructor:ii,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=pi(this,this.first,this.first+this.size);return!1===e?t:t.join(e||"\n")},setValue:At((function(e){var t=pe(this.first,0),n=this.first+this.size-1;wn(this,{from:t,to:pe(n,ui(this,n).text.length),text:Do(e),origin:"setValue",full:!0},!0),Ae(this,xe(t))})),replaceRange:function(e,t,n,r){Rn(this,e,t=be(this,t),n=n?be(this,n):t,r)},getRange:function(e,t,n){var r=ci(this,be(this,e),be(this,t));return!1===n?r:r.join(n||"\n")},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Ce(this,e))return ui(this,e)},getLineNumber:function(e){return fi(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=ui(this,e)),Nr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return be(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:At((function(e,t,n){Le(this,be(this,"number"==typeof e?pe(e,t||0):e),null,n)})),setSelection:At((function(e,t,n){Le(this,be(this,e),be(this,t||e),n)})),extendSelection:At((function(e,t,n){Se(this,be(this,e),t&&be(this,t),n)})),extendSelections:At((function(e,t){we(this,function(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=be(e,t[r]);return n}(this,e))})),extendSelectionsBy:At((function(e,t){we(this,ro(this.sel.ranges,e),t)})),setSelections:At((function(e,t,n){if(e.length){for(var r=0,i=[];r<e.length;r++)i[r]=new ve(be(this,e[r].anchor),be(this,e[r].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Ae(this,ye(i,t),n)}})),addSelection:At((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new ve(be(this,e),be(this,t||e))),Ae(this,ye(r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=ci(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||"\n")},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=ci(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||"\n")),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:At((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var s=i.ranges[o];r[o]={from:s.from(),to:s.to(),text:Do(e[o]),origin:n}}var a=t&&"end"!=t&&function(e,t,n){for(var r=[],i=pe(e.first,0),o=i,s=0;s<t.length;s++){var a=t[s],l=Tn(a.from,i,o),u=Tn(En(a),i,o);if(i=a.to,o=u,"around"==n){var c=e.sel.ranges[s],p=de(c.head,c.anchor)<0;r[s]=new ve(p?u:l,p?l:u)}else r[s]=new ve(l,l)}return new me(r,e.sel.primIndex)}(this,r,t);for(o=r.length-1;o>=0;o--)wn(this,r[o]);a?Ie(this,a):this.cm&&Dn(this.cm)})),undo:At((function(){Ln(this,"undo")})),redo:At((function(){Ln(this,"redo")})),undoSelection:At((function(){Ln(this,"undo",!0)})),redoSelection:At((function(){Ln(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(r=0;r<e.undone.length;r++)e.undone[r].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){this.history=new vi(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Si(this.history.done),undone:Si(this.history.undone)}},setHistory:function(e){var t=this.history=new vi(this.history.maxGeneration);t.done=Si(e.done.slice(0),null,!0),t.undone=Si(e.undone.slice(0),null,!0)},addLineClass:At((function(e,t,n){return Mn(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(Eo(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:At((function(e,t,n){return Mn(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(Eo(n));if(!o)return!1;var s=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&s!=i.length?" ":"")+i.slice(s)||null}return!0}))})),markText:function(e,t,n){return ar(this,be(this,e),be(this,t),n,"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared};return ar(this,e=be(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=ui(this,(e=be(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=be(this,e),t=be(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var s=o.markedSpans;if(s)for(var a=0;a<s.length;a++){var l=s[a];i==e.line&&e.ch>l.to||null==l.from&&i!=e.line||i==t.line&&l.from>t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first;return this.iter((function(r){var i=r.text.length+1;if(i>e)return t=e,!0;e-=i,++n})),be(this,pe(n,t))},indexFromPos:function(e){var t=(e=be(this,e)).ch;return e.line<this.first||e.ch<0?0:(this.iter(this.first,e.line,(function(e){t+=e.text.length+1})),t)},copy:function(e){var t=new ii(pi(this,this.first,this.first+this.size),this.modeOption,this.first);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new ii(pi(this,t,n),e.mode||this.modeOption,t);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),s=e.clipPos(i.to);if(de(o,s)){var a=ar(e,o,s,r.primary,r.primary.type);r.markers.push(a),a.parent=r}}}(r,ur(this)),r},unlinkDoc:function(e){if(e instanceof C&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),cr(ur(this));break}if(e.history==this.history){var n=[e.id];ai(e,(function(e){n.push(e.id)}),!0),e.history=new vi(null),e.history.done=Si(this.history.done,n),e.history.undone=Si(this.history.undone,n)}},iterLinkedDocs:function(e){ai(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm}}),ii.prototype.eachLine=ii.prototype.iter;var oi="iter insert remove copy getEditor".split(" ");for(var si in ii.prototype)ii.prototype.hasOwnProperty(si)&&no(oi,si)<0&&(C.prototype[si]=function(e){return function(){return e.apply(this.doc,arguments)}}(ii.prototype[si]));function ai(e,t,n){!function e(r,i,o){if(r.linked)for(var s=0;s<r.linked.length;++s){var a=r.linked[s];if(a.doc!=i){var l=o&&a.sharedHist;n&&!l||(t(a.doc,l),e(a.doc,r,l))}}}(e,null,!0)}function li(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,L(e),S(e),e.options.lineWrapping||D(e),e.options.mode=t.modeOption,Ot(e)}function ui(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function ci(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function pi(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function di(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function fi(e){if(null==e.parent)return null;for(var t=e.parent,n=no(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function hi(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(r=0;r<e.lines.length;++r){var s=e.lines[r].height;if(t<s)break;t-=s}return n+r}function gi(e){for(var t=0,n=(e=Nr(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(r=0;r<o.children.length;++r){var s=o.children[r];if(s==n)break;t+=s.height}return t}function mi(e){var t=e.order;return null==t&&(t=e.order=Xo(e.text)),t}function vi(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function yi(e,t){var n={from:fe(t.from),to:En(t),text:ci(e,t.from,t.to)};return Ci(e,n,t.from.line,t.to.line+1),ai(e,(function(e){Ci(e,n,t.from.line,t.to.line+1)}),!0),n}function xi(e){for(;e.length&&eo(e).ranges;)e.pop()}function Ei(e,t,n,r){var i=e.history;i.undone.length=0;var o,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(xi(e.done),eo(e.done)):e.done.length&&!eo(e.done).ranges?eo(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),eo(e.done)):void 0}(i,i.lastOp==r))){var a=eo(o.changes);0==de(t.from,t.to)&&0==de(t.from,a.to)?a.to=En(t):o.changes.push(yi(e,t))}else{var l=eo(i.done);for(l&&l.ranges||bi(e.sel,i.done),o={changes:[yi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Mi(e,"historyAdded")}function bi(e,t){var n=eo(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Ci(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Ti(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Si(e,t,n){for(var r=0,i=[];r<e.length;++r){var o=e[r];if(o.ranges)i.push(n?me.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];i.push({changes:a});for(var l=0;l<s.length;++l){var u,c=s[l];if(a.push({from:c.from,to:c.to,text:c.text}),t)for(var p in c)(u=p.match(/^spans_(\d+)$/))&&no(t,Number(u[1]))>-1&&(eo(a)[p]=c[p],delete c[p])}}}return i}function wi(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Ni(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],s=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var a=0;a<o.ranges.length;a++)wi(o.ranges[a].anchor,t,n,r),wi(o.ranges[a].head,t,n,r)}else{for(a=0;a<o.changes.length;++a){var l=o.changes[a];if(n<l.from.line)l.from=pe(l.from.line+r,l.from.ch),l.to=pe(l.to.line+r,l.to.ch);else if(t<=l.to.line){s=!1;break}}s||(e.splice(0,i+1),i=0)}}}function Li(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;Ni(e.done,n,r,i),Ni(e.undone,n,r,i)}qi(ii);var Ii=C.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},Ai=C.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0};function Ri(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}var _i=C.e_stop=function(e){Ii(e),Ai(e)};function Oi(e){return e.target||e.srcElement}function Di(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),g&&e.ctrlKey&&1==t&&(t=3),t}var ki=C.on=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});(r[t]||(r[t]=[])).push(n)}},Pi=C.off=function(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers&&e._handlers[t];if(!r)return;for(var i=0;i<r.length;++i)if(r[i]==n){r.splice(i,1);break}}},Mi=C.signal=function(e,t){var n=e._handlers&&e._handlers[t];if(n)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)},Fi=null;function ji(e,t){var n=e._handlers&&e._handlers[t];if(n){var r,i=Array.prototype.slice.call(arguments,2);vt?r=vt.delayedCallbacks:Fi?r=Fi:(r=Fi=[],setTimeout(Ui,0));for(var o=0;o<n.length;++o)r.push(s(n[o]))}function s(e){return function(){e.apply(null,i)}}}function Ui(){var e=Fi;Fi=null;for(var t=0;t<e.length;++t)e[t]()}function Gi(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Mi(e,n||t.type,e,t),Ri(t)||t.codemirrorIgnore}function Bi(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==no(n,t[r])&&n.push(t[r])}function Hi(e,t){var n=e._handlers&&e._handlers[t];return n&&n.length>0}function qi(e){e.prototype.on=function(e,t){ki(this,e,t)},e.prototype.off=function(e,t){Pi(this,e,t)}}var Vi=30,Wi=C.Pass={toString:function(){return"CodeMirror.Pass"}},zi={scroll:!1},$i={origin:"*mouse"},Qi={origin:"+move"};function Xi(){this.id=null}Xi.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Yi=C.countColumn=function(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,s=i||0;;){var a=e.indexOf("\t",o);if(a<0||a>=t)return s+(t-o);s+=a-o,s+=n-s%n,o=a+1}};function Ki(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var s=o-r;if(o==e.length||i+s>=t)return r+Math.min(s,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var Ji=[""];function Zi(e){for(;Ji.length<=e;)Ji.push(eo(Ji)+" ");return Ji[e]}function eo(e){return e[e.length-1]}var to=function(e){e.select()};function no(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}function ro(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function io(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&oo(t,n),n}function oo(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function so(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}f?to=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:r&&(to=function(e){try{e.select()}catch(e){}});var ao=/[\u00df\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,lo=C.isWordChar=function(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||ao.test(e))};function uo(e,t){return t?!!(t.source.indexOf("\\w")>-1&&lo(e))||t.test(e):lo(e)}function co(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var po,fo=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ho(e){return e.charCodeAt(0)>=768&&fo.test(e)}function go(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function mo(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function vo(e,t){return mo(e).appendChild(t)}po=document.createRange?function(e,t,n){var r=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var yo=C.contains=function(e,t){if(e.contains)return e.contains(t);for(;t=t.parentNode;)if(11==t.nodeType&&(t=t.host),t==e)return!0};function xo(){return document.activeElement}function Eo(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}r&&i<11&&(xo=function(){try{return document.activeElement}catch(e){return document.body}});var bo=C.rmClass=function(e,t){var n=e.className,r=Eo(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},Co=C.addClass=function(e,t){var n=e.className;Eo(t).test(n)||(e.className+=(n?" ":"")+t)};function To(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!Eo(n[r]).test(t)&&(t+=" "+n[r]);return t}function So(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),n=0;n<t.length;n++){var r=t[n].CodeMirror;r&&e(r)}}var wo,No,Lo=!1,Io=function(){if(r&&i<9)return!1;var e=go("div");return"draggable"in e||"dragDrop"in e}();function Ao(e){if(null==wo){var t=go("span","");vo(e,go("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(wo=t.offsetWidth<=1&&t.offsetHeight>2&&!(r&&i<8))}return wo?go("span",""):go("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px")}function Ro(e){if(null!=No)return No;var t=vo(e,document.createTextNode("AخA")),n=po(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=po(t,1,2).getBoundingClientRect();return No=r.right-n.right<3}var _o,Oo,Do=C.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),s=o.indexOf("\r");-1!=s?(n.push(o.slice(0,s)),t+=s+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ko=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Po="oncopy"in(_o=go("div"))||(_o.setAttribute("oncopy","return;"),"function"==typeof _o.oncopy),Mo=null,Fo={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};function jo(e){return e.level%2?e.to:e.from}function Uo(e){return e.level%2?e.from:e.to}function Go(e){var t=mi(e);return t?jo(t[0]):0}function Bo(e){var t=mi(e);return t?Uo(eo(t)):e.text.length}function Ho(e,t){var n=ui(e.doc,t),r=Nr(n);r!=n&&(t=fi(r));var i=mi(r),o=i?i[0].level%2?Bo(r):Go(r):0;return pe(t,o)}function qo(e,t){var n=Ho(e,t.line),r=ui(e.doc,n.line),i=mi(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),s=t.line==n.line&&t.ch<=o&&t.ch;return pe(n.line,s?0:o)}return n}function Vo(e,t,n){var r=e[0].level;return t==r||n!=r&&t<n}function Wo(e,t){Oo=null;for(var n,r=0;r<e.length;++r){var i=e[r];if(i.from<t&&i.to>t)return r;if(i.from==t||i.to==t){if(null!=n)return Vo(e,i.level,e[n].level)?(i.from!=i.to&&(Oo=n),r):(i.from!=i.to&&(Oo=r),n);n=r}}return n}function zo(e,t,n,r){if(!r)return t+n;do{t+=n}while(t>0&&ho(e.text.charAt(t)));return t}function $o(e,t,n,r){var i=mi(e);if(!i)return Qo(e,t,n,r);for(var o=Wo(i,t),s=i[o],a=zo(e,t,s.level%2?-n:n,r);;){if(a>s.from&&a<s.to)return a;if(a==s.from||a==s.to)return Wo(i,a)==o?a:n>0==(s=i[o+=n]).level%2?s.to:s.from;if(!(s=i[o+=n]))return null;a=n>0==s.level%2?zo(e,s.to,-1,r):zo(e,s.from,1,r)}}function Qo(e,t,n,r){var i=t+n;if(r)for(;i>0&&ho(e.text.charAt(i));)i+=n;return i<0||i>e.text.length?null:i}C.keyNames=Fo,function(){for(var e=0;e<10;e++)Fo[e+48]=Fo[e+96]=String(e);for(e=65;e<=90;e++)Fo[e]=String.fromCharCode(e);for(e=1;e<=12;e++)Fo[e+111]=Fo[e+63235]="F"+e}();var Xo=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(s){if(!e.test(s))return!1;for(var a,l=s.length,u=[],c=0;c<l;++c)u.push(m=(a=s.charCodeAt(c))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(a):1424<=a&&a<=1524?"R":1536<=a&&a<=1773?"rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm".charAt(a-1536):1774<=a&&a<=2220?"r":8192<=a&&a<=8203?"w":8204==a?"b":"L");c=0;for(var p="L";c<l;++c)"m"==(m=u[c])?u[c]=p:p=m;c=0;for(var d="L";c<l;++c)"1"==(m=u[c])&&"r"==d?u[c]="n":n.test(m)&&(d=m,"r"==m&&(u[c]="R"));for(c=1,p=u[0];c<l-1;++c)"+"==(m=u[c])&&"1"==p&&"1"==u[c+1]?u[c]="1":","!=m||p!=u[c+1]||"1"!=p&&"n"!=p||(u[c]=p),p=m;for(c=0;c<l;++c)if(","==(m=u[c]))u[c]="N";else if("%"==m){for(var f=c+1;f<l&&"%"==u[f];++f);for(var h=c&&"!"==u[c-1]||f<l&&"1"==u[f]?"1":"N",g=c;g<f;++g)u[g]=h;c=f-1}for(c=0,d="L";c<l;++c){var m=u[c];"L"==d&&"1"==m?u[c]="L":n.test(m)&&(d=m)}for(c=0;c<l;++c)if(t.test(u[c])){for(f=c+1;f<l&&t.test(u[f]);++f);var v="L"==(c?u[c-1]:"L"),y="L"==(f<l?u[f]:"L");for(h=v||y?"L":"R",g=c;g<f;++g)u[g]=h;c=f-1}var x,E=[];for(c=0;c<l;)if(r.test(u[c])){var b=c;for(++c;c<l&&r.test(u[c]);++c);E.push(new o(0,b,c))}else{var C=c,T=E.length;for(++c;c<l&&"L"!=u[c];++c);for(g=C;g<c;)if(i.test(u[g])){C<g&&E.splice(T,0,new o(1,C,g));var S=g;for(++g;g<c&&i.test(u[g]);++g);E.splice(T,0,new o(2,S,g)),C=g}else++g;C<c&&E.splice(T,0,new o(1,C,c))}return 1==E[0].level&&(x=s.match(/^\s+/))&&(E[0].from=x[0].length,E.unshift(new o(0,0,x[0].length))),1==eo(E).level&&(x=s.match(/\s+$/))&&(eo(E).to-=x[0].length,E.push(new o(0,l-x[0].length,l))),E[0].level!=eo(E).level&&E.push(new o(E[0].level,l,l)),E}}();return C.version="4.13.0",C}))},{}],11:[function(e,t,n){var r;r=function(e){"use strict";e.defineMode("javascript",(function(t,n){var r,i,o=t.indentUnit,s=n.statementIndent,a=n.jsonld,l=n.json||a,u=n.typescript,c=n.wordCharacters||/[\w$\xa1-\uffff]/,p=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},s={if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:r,break:r,continue:r,new:r,delete:r,throw:r,debugger:r,var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),module:e("module"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r};if(u){var a={type:"variable",style:"variable-3"},l={interface:e("interface"),extends:e("extends"),constructor:e("constructor"),public:e("public"),private:e("private"),protected:e("protected"),static:e("static"),string:a,number:a,bool:a,any:a};for(var c in l)s[c]=l[c]}return s}(),d=/[+\-*&%=<>!?|~^]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function h(e,t,n){return r=e,i=n,t}function g(e,t){var n,r=e.next();if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){var r,i=!1;if(a&&"@"==e.peek()&&e.match(f))return t.tokenize=g,h("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(t.tokenize=g),h("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return h("number","number");if("."==r&&e.match(".."))return h("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return h(r);if("="==r&&e.eat(">"))return h("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),h("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),h("number","number");if("/"==r)return e.eat("*")?(t.tokenize=m,m(e,t)):e.eat("/")?(e.skipToEnd(),h("comment","comment")):"operator"==t.lastType||"keyword c"==t.lastType||"sof"==t.lastType||/^[\[{}\(,;:]$/.test(t.lastType)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),h("regexp","string-2")):(e.eatWhile(d),h("operator","operator",e.current()));if("`"==r)return t.tokenize=v,v(e,t);if("#"==r)return e.skipToEnd(),h("error","error");if(d.test(r))return e.eatWhile(d),h("operator","operator",e.current());if(c.test(r)){e.eatWhile(c);var i=e.current(),o=p.propertyIsEnumerable(i)&&p[i];return o&&"."!=t.lastType?h(o.type,o.style,i):h("variable","variable",i)}}function m(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=g;break}r="*"==n}return h("comment","comment")}function v(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}r=!r&&"\\"==n}return h("quasi","string-2",e.current())}function y(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){for(var r=0,i=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),a="([{}])".indexOf(s);if(a>=0&&a<3){if(!r){++o;break}if(0==--r)break}else if(a>=3&&a<6)++r;else if(c.test(s))i=!0;else{if(/["'\/]/.test(s))return;if(i&&!r){++o;break}}}i&&!r&&(t.fatArrowAt=o)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function E(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function b(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}var C={state:null,column:null,marked:null,cc:null};function T(){for(var e=arguments.length-1;e>=0;e--)C.cc.push(arguments[e])}function S(){return T.apply(null,arguments),!0}function w(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var r=C.state;if(r.context){if(C.marked="def",t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}var N={name:"this",next:{name:"arguments"}};function L(){C.state.context={prev:C.state.context,vars:C.state.localVars},C.state.localVars=N}function I(){C.state.localVars=C.state.context.vars,C.state.context=C.state.context.prev}function A(e,t){var n=function(){var n=C.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new E(r,C.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function R(){var e=C.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function _(e){return function t(n){return n==e?S():";"==e?T():S(t)}}function O(e,t){return"var"==e?S(A("vardef",t.length),ee,_(";"),R):"keyword a"==e?S(A("form"),D,O,R):"keyword b"==e?S(A("form"),O,R):"{"==e?S(A("}"),K,R):";"==e?S():"if"==e?("else"==C.state.lexical.info&&C.state.cc[C.state.cc.length-1]==R&&C.state.cc.pop()(),S(A("form"),D,O,R,oe)):"function"==e?S(pe):"for"==e?S(A("form"),se,O,R):"variable"==e?S(A("stat"),V):"switch"==e?S(A("form"),D,A("}","switch"),_("{"),K,R,R):"case"==e?S(D,_(":")):"default"==e?S(_(":")):"catch"==e?S(A("form"),L,_("("),de,_(")"),O,R,I):"module"==e?S(A("form"),L,ve,I,R):"class"==e?S(A("form"),fe,R):"export"==e?S(A("form"),ye,R):"import"==e?S(A("form"),xe,R):T(A("stat"),D,_(";"),R)}function D(e){return P(e,!1)}function k(e){return P(e,!0)}function P(e,t){if(C.state.fatArrowAt==C.stream.start){var n=t?q:H;if("("==e)return S(L,A(")"),X(te,")"),R,_("=>"),n,I);if("variable"==e)return T(L,te,_("=>"),n,I)}var r=t?U:j;return x.hasOwnProperty(e)?S(r):"function"==e?S(pe,r):"keyword c"==e?S(t?F:M):"("==e?S(A(")"),M,Se,_(")"),R,r):"operator"==e||"spread"==e?S(t?k:D):"["==e?S(A("]"),Ce,R,r):"{"==e?Y(z,"}",null,r):"quasi"==e?T(G,r):S()}function M(e){return e.match(/[;\}\)\],]/)?T():T(D)}function F(e){return e.match(/[;\}\)\],]/)?T():T(k)}function j(e,t){return","==e?S(D):U(e,t,!1)}function U(e,t,n){var r=0==n?j:U,i=0==n?D:k;return"=>"==e?S(L,n?q:H,I):"operator"==e?/\+\+|--/.test(t)?S(r):"?"==t?S(D,_(":"),i):S(i):"quasi"==e?T(G,r):";"!=e?"("==e?Y(k,")","call",r):"."==e?S(W,r):"["==e?S(A("]"),M,_("]"),R,r):void 0:void 0}function G(e,t){return"quasi"!=e?T():"${"!=t.slice(t.length-2)?S(G):S(D,B)}function B(e){if("}"==e)return C.marked="string-2",C.state.tokenize=v,S(G)}function H(e){return y(C.stream,C.state),T("{"==e?O:D)}function q(e){return y(C.stream,C.state),T("{"==e?O:k)}function V(e){return":"==e?S(R,O):T(j,_(";"),R)}function W(e){if("variable"==e)return C.marked="property",S()}function z(e,t){return"variable"==e||"keyword"==C.style?(C.marked="property",S("get"==t||"set"==t?$:Q)):"number"==e||"string"==e?(C.marked=a?"property":C.style+" property",S(Q)):"jsonld-keyword"==e?S(Q):"["==e?S(D,_("]"),Q):void 0}function $(e){return"variable"!=e?T(Q):(C.marked="property",S(pe))}function Q(e){return":"==e?S(k):"("==e?T(pe):void 0}function X(e,t){function n(r){if(","==r){var i=C.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),S(e,n)}return r==t?S():S(_(t))}return function(r){return r==t?S():T(e,n)}}function Y(e,t,n){for(var r=3;r<arguments.length;r++)C.cc.push(arguments[r]);return S(A(t,n),X(e,t),R)}function K(e){return"}"==e?S():T(O,K)}function J(e){if(u&&":"==e)return S(Z)}function Z(e){if("variable"==e)return C.marked="variable-3",S()}function ee(){return T(te,J,re,ie)}function te(e,t){return"variable"==e?(w(t),S()):"["==e?Y(te,"]"):"{"==e?Y(ne,"}"):void 0}function ne(e,t){return"variable"!=e||C.stream.match(/^\s*:/,!1)?("variable"==e&&(C.marked="property"),S(_(":"),te,re)):(w(t),S(re))}function re(e,t){if("="==t)return S(k)}function ie(e){if(","==e)return S(ee)}function oe(e,t){if("keyword b"==e&&"else"==t)return S(A("form","else"),O,R)}function se(e){if("("==e)return S(A(")"),ae,_(")"),R)}function ae(e){return"var"==e?S(ee,_(";"),ue):";"==e?S(ue):"variable"==e?S(le):T(D,_(";"),ue)}function le(e,t){return"in"==t||"of"==t?(C.marked="keyword",S(D)):S(j,ue)}function ue(e,t){return";"==e?S(ce):"in"==t||"of"==t?(C.marked="keyword",S(D)):T(D,_(";"),ce)}function ce(e){")"!=e&&S(D)}function pe(e,t){return"*"==t?(C.marked="keyword",S(pe)):"variable"==e?(w(t),S(pe)):"("==e?S(L,A(")"),X(de,")"),R,O,I):void 0}function de(e){return"spread"==e?S(de):T(te,J)}function fe(e,t){if("variable"==e)return w(t),S(he)}function he(e,t){return"extends"==t?S(D,he):"{"==e?S(A("}"),ge,R):void 0}function ge(e,t){return"variable"==e||"keyword"==C.style?(C.marked="property","get"==t||"set"==t?S(me,pe,ge):S(pe,ge)):"*"==t?(C.marked="keyword",S(ge)):";"==e?S(ge):"}"==e?S():void 0}function me(e){return"variable"!=e?T():(C.marked="property",S())}function ve(e,t){return"string"==e?S(O):"variable"==e?(w(t),S(be)):void 0}function ye(e,t){return"*"==t?(C.marked="keyword",S(be,_(";"))):"default"==t?(C.marked="keyword",S(D,_(";"))):T(O)}function xe(e){return"string"==e?S():T(Ee,be)}function Ee(e,t){return"{"==e?Y(Ee,"}"):("variable"==e&&w(t),S())}function be(e,t){if("from"==t)return C.marked="keyword",S(D)}function Ce(e){return"]"==e?S():T(k,Te)}function Te(e){return"for"==e?T(Se,_("]")):","==e?S(X(F,"]")):T(X(k,"]"))}function Se(e){return"for"==e?S(se,Se):"if"==e?S(D,Se):void 0}return R.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new E((e||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),y(e,t)),t.tokenize!=m&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",function(e,t,n,r,i){var o=e.cc;for(C.state=e,C.stream=i,C.marked=null,C.cc=o,C.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():l?D:O)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return C.marked?C.marked:"variable"==n&&b(e,r)?"variable-2":t}}(t,n,r,i,e))},indent:function(t,r){if(t.tokenize==m)return e.Pass;if(t.tokenize!=g)return 0;var i=r&&r.charAt(0),a=t.lexical;if(!/^\s*else\b/.test(r))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==R)a=a.prev;else if(u!=oe)break}"stat"==a.type&&"}"==i&&(a=a.prev),s&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var c=a.type,p=i==c;return"vardef"==c?a.indented+("operator"==t.lastType||","==t.lastType?a.info+1:0):"form"==c&&"{"==i?a.indented:"form"==c?a.indented+o:"stat"==c?a.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||d.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,r)?s||o:0):"switch"!=a.info||p||0==n.doubleIndentSwitch?a.align?a.column+(p?0:1):a.indented+(p?0:o):a.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",lineComment:l?null:"//",fold:"brace",helperType:l?"json":"javascript",jsonldMode:a,jsonMode:l}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],12:[function(e,t,n){var r;r=function(e){"use strict";e.defineMode("xml",(function(t,n){var r=t.indentUnit,i=n.multilineTagIndentFactor||1,o=n.multilineTagIndentPastTag;null==o&&(o=!0);var s,a,l=n.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1},u=n.alignCDATA;function c(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(d("atom","]]>")):null:e.match("--")?n(d("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=c;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=d("meta","?>"),"meta"):(s=e.eat("/")?"closeTag":"openTag",t.tokenize=p,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function p(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=c,s=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return s="equals",null;if("<"==i){t.tokenize=c,t.state=m,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=p;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function d(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=c;break}n.next()}return e}}function f(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function h(e){e.context&&(e.context=e.context.prev)}function g(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;h(e)}}function m(e,t,n){return"openTag"==e?(n.tagStart=t.column(),v):"closeTag"==e?y:m}function v(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",b):(a="error",v)}function y(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==r?(a="tag",x):(a="tag error",E)}return a="error",E}function x(e,t,n){return"endTag"!=e?(a="error",x):(h(n),m)}function E(e,t,n){return a="error",x(e,0,n)}function b(e,t,n){if("word"==e)return a="attribute",C;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?g(n,r):(g(n,r),n.context=new f(n,r,i==n.indented)),m}return a="error",b}function C(e,t,n){return"equals"==e?T:(l.allowMissing||(a="error"),b(e,0,n))}function T(e,t,n){return"string"==e?S:"word"==e&&l.allowUnquoted?(a="string",b):(a="error",b(e,0,n))}function S(e,t,n){return"string"==e?S:b(e,0,n)}return{startState:function(){return{tokenize:c,state:m,indented:0,tagName:null,tagStart:null,context:null}},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;s=null;var n=t.tokenize(e,t);return(n||s)&&"comment"!=n&&(a=null,t.state=t.state(s||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,s){var a=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+r;if(a&&a.noIndent)return e.Pass;if(t.tokenize!=p&&t.tokenize!=c)return s?s.match(/^(\s*)/)[0].length:0;if(t.tagName)return o?t.tagStart+t.tagName.length+2:t.tagStart+r*i;if(u&&/<!\[CDATA\[/.test(n))return 0;var d=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(d&&d[1])for(;a;){if(a.tagName==d[2]){a=a.prev;break}if(!l.implicitlyClosed.hasOwnProperty(a.tagName))break;a=a.prev}else if(d)for(;a;){var f=l.contextGrabbers[a.tagName];if(!f||!f.hasOwnProperty(d[2]))break;a=a.prev}for(;a&&!a.startOfLine;)a=a.prev;return a?a.indent+r:0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:n.htmlMode?"html":"xml",helperType:n.htmlMode?"html":"xml"}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})},"object"==typeof n&&"object"==typeof t?r(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)},{"../../lib/codemirror":10}],13:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,a,l,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(s(n=this._events[e]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,a=new Array(r-1),l=1;l<r;l++)a[l-1]=arguments[l];n.apply(this,a)}else if(o(n)){for(r=arguments.length,a=new Array(r-1),l=1;l<r;l++)a[l-1]=arguments[l];for(r=(u=n.slice()).length,l=0;l<r;l++)u[l].apply(this,a)}return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,s,a;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(n=this._events[e]).length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(a=s;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(n=this._events[e]))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.listenerCount=function(e,t){return e._events&&e._events[t]?i(e._events[t])?1:e._events[t].length:0}},{}],14:[function(e,t,n){
|
|
32
|
+
/*!
|
|
33
|
+
* jQuery UI Core 1.10.4
|
|
34
|
+
* http://jqueryui.com
|
|
35
|
+
*
|
|
36
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
|
37
|
+
* Released under the MIT license.
|
|
38
|
+
* http://jquery.org/license
|
|
39
|
+
*
|
|
40
|
+
* http://api.jqueryui.com/category/ui-core/
|
|
41
|
+
*/
|
|
42
|
+
!function(e,t){var n,r,i=0,o=/^ui-id-\d+$/;function s(t,n){var r,i,o,s=t.nodeName.toLowerCase();return"area"===s?(i=(r=t.parentNode).name,!(!t.href||!i||"map"!==r.nodeName.toLowerCase())&&!!(o=e("img[usemap=#"+i+"]")[0])&&a(o)):(/input|select|textarea|button|object/.test(s)?!t.disabled:"a"===s&&t.href||n)&&a(t)}function a(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter((function(){return"hidden"===e.css(this,"visibility")})).length}e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:(n=e.fn.focus,function(t,r){return"number"==typeof t?this.each((function(){var n=this;setTimeout((function(){e(n).focus(),r&&r.call(n)}),t)})):n.apply(this,arguments)}),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter((function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))})).eq(0):this.parents().filter((function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))})).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var n,r,i=e(this[0]);i.length&&i[0]!==document;){if(("absolute"===(n=i.css("position"))||"relative"===n||"fixed"===n)&&(r=parseInt(i.css("zIndex"),10),!isNaN(r)&&0!==r))return r;i=i.parent()}return 0},uniqueId:function(){return this.each((function(){this.id||(this.id="ui-id-"+ ++i)}))},removeUniqueId:function(){return this.each((function(){o.test(this.id)&&e(this).removeAttr("id")}))}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo((function(t){return function(n){return!!e.data(n,t)}})):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return s(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),r=isNaN(n);return(r||n>=0)&&s(t,!r)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],(function(t,n){var r="Width"===n?["Left","Right"]:["Top","Bottom"],i=n.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};function s(t,n,i,o){return e.each(r,(function(){n-=parseFloat(e.css(t,"padding"+this))||0,i&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0),o&&(n-=parseFloat(e.css(t,"margin"+this))||0)})),n}e.fn["inner"+n]=function(t){return void 0===t?o["inner"+n].call(this):this.each((function(){e(this).css(i,s(this,t)+"px")}))},e.fn["outer"+n]=function(t,r){return"number"!=typeof t?o["outer"+n].call(this,t):this.each((function(){e(this).css(i,s(this,t,!0,r)+"px")}))}})),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=(r=e.fn.removeData,function(t){return arguments.length?r.call(this,e.camelCase(t)):r.call(this)})),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",(function(e){e.preventDefault()}))},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,n,r){var i,o=e.ui[t].prototype;for(i in r)o.plugins[i]=o.plugins[i]||[],o.plugins[i].push([n,r[i]])},call:function(e,t,n){var r,i=e.plugins[t];if(i&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(r=0;r<i.length;r++)e.options[i[r][0]]&&i[r][1].apply(e.element,n)}},hasScroll:function(t,n){if("hidden"===e(t).css("overflow"))return!1;var r,i=n&&"left"===n?"scrollLeft":"scrollTop";return t[i]>0||(t[i]=1,r=t[i]>0,t[i]=0,r)}})}(e("jquery"))},{jquery:18}],15:[function(e,t,n){var r=e("jquery");e("./widget"),
|
|
43
|
+
/*!
|
|
44
|
+
* jQuery UI Mouse 1.10.4
|
|
45
|
+
* http://jqueryui.com
|
|
46
|
+
*
|
|
47
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
|
48
|
+
* Released under the MIT license.
|
|
49
|
+
* http://jquery.org/license
|
|
50
|
+
*
|
|
51
|
+
* http://api.jqueryui.com/mouse/
|
|
52
|
+
*
|
|
53
|
+
* Depends:
|
|
54
|
+
* jquery.ui.widget.js
|
|
55
|
+
*/
|
|
56
|
+
function(e,t){var n=!1;e(document).mouseup((function(){n=!1})),e.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,(function(e){return t._mouseDown(e)})).bind("click."+this.widgetName,(function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent"))return e.removeData(n.target,t.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!n){this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var r=this,i=1===t.which,o=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&e(t.target).closest(this.options.cancel).length;return!(i&&!o&&this._mouseCapture(t)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){r.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return r._mouseMove(e)},this._mouseUpDelegate=function(e){return r._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),n=!0,0)))}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(r)},{"./widget":17,jquery:18}],16:[function(e,t,n){var r=e("jquery");e("./core"),e("./mouse"),e("./widget"),
|
|
57
|
+
/*!
|
|
58
|
+
* jQuery UI Sortable 1.10.4
|
|
59
|
+
* http://jqueryui.com
|
|
60
|
+
*
|
|
61
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
|
62
|
+
* Released under the MIT license.
|
|
63
|
+
* http://jquery.org/license
|
|
64
|
+
*
|
|
65
|
+
* http://api.jqueryui.com/sortable/
|
|
66
|
+
*
|
|
67
|
+
* Depends:
|
|
68
|
+
* jquery.ui.core.js
|
|
69
|
+
* jquery.ui.mouse.js
|
|
70
|
+
* jquery.ui.widget.js
|
|
71
|
+
*/
|
|
72
|
+
function(e,t){function n(e,t,n){return e>t&&e<t+n}function r(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))}e.widget("ui.sortable",e.ui.mouse,{version:"1.10.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=!!this.items.length&&("x"===e.axis||r(this.items[0].item)),this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,n){"disabled"===t?(this.options[t]=n,this.widget().toggleClass("ui-sortable-disabled",!!n)):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,n){var r=null,i=!1,o=this;return!(this.reverting||this.options.disabled||"static"===this.options.type||(this._refreshItems(t),e(t.target).parents().each((function(){if(e.data(this,o.widgetName+"-item")===o)return r=e(this),!1})),e.data(t.target,o.widgetName+"-item")===o&&(r=e(t.target)),!r||this.options.handle&&!n&&(e(this.options.handle,r).find("*").addBack().each((function(){this===t.target&&(i=!0)})),!i)||(this.currentItem=r,this._removeCurrentsFromItems(),0)))},_mouseStart:function(t,n,r){var i,o,s=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",s.cursor),this.storedStylesheet=e("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(o)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!r)for(i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var n,r,i,o,s=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(t.pageY-e(document).scrollTop()<s.scrollSensitivity?a=e(document).scrollTop(e(document).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<s.scrollSensitivity&&(a=e(document).scrollTop(e(document).scrollTop()+s.scrollSpeed)),t.pageX-e(document).scrollLeft()<s.scrollSensitivity?a=e(document).scrollLeft(e(document).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<s.scrollSensitivity&&(a=e(document).scrollLeft(e(document).scrollLeft()+s.scrollSpeed))),!1!==a&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),n=this.items.length-1;n>=0;n--)if(i=(r=this.items[n]).item[0],(o=this._intersectsWithPointer(r))&&r.instance===this.currentContainer&&!(i===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===i||e.contains(this.placeholder[0],i)||"semi-dynamic"===this.options.type&&e.contains(this.element[0],i))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(r))break;this._rearrange(t,r),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var r=this,i=this.placeholder.offset(),o=this.options.axis,s={};o&&"x"!==o||(s.left=i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(s.top=i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(s,parseInt(this.options.revert,10)||500,(function(){r._clear(t)}))}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},e(n).each((function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))})),!r.length&&t.key&&r.push(t.key+"="),r.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];return t=t||{},n.each((function(){r.push(e(t.item||this).attr(t.attribute||"id")||"")})),r},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,o=e.left,s=o+e.width,a=e.top,l=a+e.height,u=this.offset.click.top,c=this.offset.click.left,p="x"===this.options.axis||r+u>a&&r+u<l,d="y"===this.options.axis||t+c>o&&t+c<s,f=p&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?f:o<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<s&&a<r+this.helperProportions.height/2&&i-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var t="x"===this.options.axis||n(this.positionAbs.top+this.offset.click.top,e.top,e.height),r="y"===this.options.axis||n(this.positionAbs.left+this.offset.click.left,e.left,e.width),i=t&&r,o=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return!!i&&(this.floating?s&&"right"===s||"down"===o?2:1:o&&("down"===o?2:1))},_intersectsWithSides:function(e){var t=n(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),r=n(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),i=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&r||"left"===o&&!r:i&&("down"===i&&t||"up"===i&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var n,r,i,o,s=[],a=[],l=this._connectWith();if(l&&t)for(n=l.length-1;n>=0;n--)for(r=(i=e(l[n])).length-1;r>=0;r--)(o=e.data(i[r],this.widgetFullName))&&o!==this&&!o.options.disabled&&a.push([e.isFunction(o.options.items)?o.options.items.call(o.element):e(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);function u(){s.push(this)}for(a.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=a.length-1;n>=0;n--)a[n][0].each(u);return e(s)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,(function(e){for(var n=0;n<t.length;n++)if(t[n]===e.item[0])return!1;return!0}))},_refreshItems:function(t){this.items=[],this.containers=[this];var n,r,i,o,s,a,l,u,c=this.items,p=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(n=d.length-1;n>=0;n--)for(r=(i=e(d[n])).length-1;r>=0;r--)(o=e.data(i[r],this.widgetFullName))&&o!==this&&!o.options.disabled&&(p.push([e.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):e(o.options.items,o.element),o]),this.containers.push(o));for(n=p.length-1;n>=0;n--)for(s=p[n][1],r=0,u=(a=p[n][0]).length;r<u;r++)(l=e(a[r])).data(this.widgetName+"-item",s),c.push({item:l,instance:s,width:0,height:0,left:0,top:0})},refreshPositions:function(t){var n,r,i,o;for(this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),n=this.items.length-1;n>=0;n--)(r=this.items[n]).instance!==this.currentContainer&&this.currentContainer&&r.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?e(this.options.toleranceElement,r.item):r.item,t||(r.width=i.outerWidth(),r.height=i.outerHeight()),o=i.offset(),r.left=o.left,r.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)o=this.containers[n].element.offset(),this.containers[n].containerCache.left=o.left,this.containers[n].containerCache.top=o.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(t){var n,r=(t=t||this).options;r.placeholder&&r.placeholder.constructor!==String||(n=r.placeholder,r.placeholder={element:function(){var r=t.currentItem[0].nodeName.toLowerCase(),i=e("<"+r+">",t.document[0]).addClass(n||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===r?t.currentItem.children().each((function(){e("<td> </td>",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)})):"img"===r&&i.attr("src",t.currentItem.attr("src")),n||i.css("visibility","hidden"),i},update:function(e,i){n&&!r.forcePlaceholderSize||(i.height()||i.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),i.width()||i.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(r.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),r.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var i,o,s,a,l,u,c,p,d,f,h=null,g=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(h&&e.contains(this.containers[i].element[0],h.element[0]))continue;h=this.containers[i],g=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(h)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",t,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(s=1e4,a=null,l=(f=h.floating||r(this.currentItem))?"left":"top",u=f?"width":"height",c=this.positionAbs[l]+this.offset.click[l],o=this.items.length-1;o>=0;o--)e.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(f&&!n(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height)||(p=this.items[o].item.offset()[l],d=!1,Math.abs(p-c)>Math.abs(p+this.items[o][u]-c)&&(d=!0,p+=this.items[o][u]),Math.abs(p-c)<s&&(s=Math.abs(p-c),a=this.items[o],this.direction=d?"up":"down")));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;a?this._rearrange(t,a,null,!0):this._rearrange(t,null,this.containers[g].element,!0),this._trigger("change",t,this._uiHash()),this.containers[g]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",t,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return r.parents("body").length||e("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(r[0]),r[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),r[0].style.width&&!n.forceHelperSize||r.width(this.currentItem.width()),r[0].style.height&&!n.forceHelperSize||r.height(this.currentItem.height()),r},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,r,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"===i.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"===i.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(t=e(i.containment)[0],n=e(i.containment).offset(),r="hidden"!==e(t).css("overflow"),this.containment=[n.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,n.left+(r?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(r?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,n){n||(n=this.position);var r="absolute"===t?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(i[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:i.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:i.scrollLeft())*r}},_generatePosition:function(t){var n,r,i=this.options,o=t.pageX,s=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),i.grid&&(n=this.originalPageY+Math.round((s-this.originalPageY)/i.grid[1])*i.grid[1],s=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-i.grid[1]:n+i.grid[1]:n,r=this.originalPageX+Math.round((o-this.originalPageX)/i.grid[0])*i.grid[0],o=this.containment?r-this.offset.click.left>=this.containment[0]&&r-this.offset.click.left<=this.containment[2]?r:r-this.offset.click.left>=this.containment[0]?r-i.grid[0]:r+i.grid[0]:r)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,n,r){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var i=this.counter;this._delay((function(){i===this.counter&&this.refreshPositions(!r)}))},_clear:function(e,t){this.reverting=!1;var n,r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();function i(e,t,n){return function(r){n._trigger(e,r,t._uiHash(t))}}for(this.fromOutside&&!t&&r.push((function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||r.push((function(e){this._trigger("update",e,this._uiHash())})),this!==this.currentContainer&&(t||(r.push((function(e){this._trigger("remove",e,this._uiHash())})),r.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)t||r.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(r.push(i("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!t){for(this._trigger("beforeStop",e,this._uiHash()),n=0;n<r.length;n++)r[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!1}if(t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!t){for(n=0;n<r.length;n++)r[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){!1===e.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}})}(r)},{"./core":14,"./mouse":15,"./widget":17,jquery:18}],17:[function(e,t,n){
|
|
73
|
+
/*!
|
|
74
|
+
* jQuery UI Widget 1.10.4
|
|
75
|
+
* http://jqueryui.com
|
|
76
|
+
*
|
|
77
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
|
78
|
+
* Released under the MIT license.
|
|
79
|
+
* http://jquery.org/license
|
|
80
|
+
*
|
|
81
|
+
* http://api.jqueryui.com/jQuery.widget/
|
|
82
|
+
*/
|
|
83
|
+
!function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n,r=0;null!=(n=t[r]);r++)try{e(n).triggerHandler("remove")}catch(e){}i(t)},e.widget=function(t,n,r){var i,o,s,a,l={},u=t.split(".")[0];t=t.split(".")[1],i=u+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[u]=e[u]||{},o=e[u][t],s=e[u][t]=function(e,t){if(!this._createWidget)return new s(e,t);arguments.length&&this._createWidget(e,t)},e.extend(s,o,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),(a=new n).options=e.widget.extend({},a.options),e.each(r,(function(t,r){var i,o;e.isFunction(r)?l[t]=(i=function(){return n.prototype[t].apply(this,arguments)},o=function(e){return n.prototype[t].apply(this,e)},function(){var e,t=this._super,n=this._superApply;return this._super=i,this._superApply=o,e=r.apply(this,arguments),this._super=t,this._superApply=n,e}):l[t]=r})),s.prototype=e.widget.extend(a,{widgetEventPrefix:o&&a.widgetEventPrefix||t},l,{constructor:s,namespace:u,widgetName:t,widgetFullName:i}),o?(e.each(o._childConstructors,(function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,s,n._proto)})),delete o._childConstructors):n._childConstructors.push(s),e.widget.bridge(t,s)},e.widget.extend=function(t){for(var n,i,o=r.call(arguments,1),s=0,a=o.length;s<a;s++)for(n in o[s])i=o[s][n],o[s].hasOwnProperty(n)&&void 0!==i&&(e.isPlainObject(i)?t[n]=e.isPlainObject(t[n])?e.widget.extend({},t[n],i):e.widget.extend({},i):t[n]=i);return t},e.widget.bridge=function(t,n){var i=n.prototype.widgetFullName||t;e.fn[t]=function(o){var s="string"==typeof o,a=r.call(arguments,1),l=this;return o=!s&&a.length?e.widget.extend.apply(null,[o].concat(a)):o,s?this.each((function(){var n,r=e.data(this,i);return r?e.isFunction(r[o])&&"_"!==o.charAt(0)?(n=r[o].apply(r,a))!==r&&void 0!==n?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0:e.error("no such method '"+o+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+o+"'")})):this.each((function(){var t=e.data(this,i);t?t.option(o||{})._init():e.data(this,i,new n(o,this))})),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var r,i,o,s=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(s={},r=t.split("."),t=r.shift(),r.length){for(i=s[t]=e.widget.extend({},this.options[t]),o=0;o<r.length-1;o++)i[r[o]]=i[r[o]]||{},i=i[r[o]];if(t=r.pop(),1===arguments.length)return void 0===i[t]?null:i[t];i[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=n}return this._setOptions(s),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,n,r){var i,o=this;"boolean"!=typeof t&&(r=n,n=t,t=!1),r?(n=i=e(n),this.bindings=this.bindings.add(n)):(r=n,n=this.element,i=this.widget()),e.each(r,(function(r,s){function a(){if(t||!0!==o.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof s?o[s]:s).apply(o,arguments)}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||e.guid++);var l=r.match(/^(\w+)\s*(.*)$/),u=l[1]+o.eventNamespace,c=l[2];c?i.delegate(c,u,a):n.bind(u,a)}))},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){var n=this;return setTimeout((function(){return("string"==typeof e?n[e]:e).apply(n,arguments)}),t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,r){var i,o,s=this.options[t];if(r=r||{},(n=e.Event(n)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(i in o)i in n||(n[i]=o[i]);return this.element.trigger(n,r),!(e.isFunction(s)&&!1===s.apply(this.element[0],[n].concat(r))||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},(function(t,n){e.Widget.prototype["_"+t]=function(r,i,o){"string"==typeof i&&(i={effect:i});var s,a=i?!0===i||"number"==typeof i?n:i.effect||n:t;"number"==typeof(i=i||{})&&(i={duration:i}),s=!e.isEmptyObject(i),i.complete=o,i.delay&&r.delay(i.delay),s&&e.effects&&e.effects.effect[a]?r[t](i):a!==t&&r[a]?r[a](i.duration,i.easing,o):r.queue((function(n){e(this)[t](),o&&o.call(r[0]),n()}))}}))}(e("jquery"))},{jquery:18}],18:[function(e,t,n){
|
|
84
|
+
/*!
|
|
85
|
+
* jQuery JavaScript Library v1.11.0
|
|
86
|
+
* http://jquery.com/
|
|
87
|
+
*
|
|
88
|
+
* Includes Sizzle.js
|
|
89
|
+
* http://sizzlejs.com/
|
|
90
|
+
*
|
|
91
|
+
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
|
|
92
|
+
* Released under the MIT license
|
|
93
|
+
* http://jquery.org/license
|
|
94
|
+
*
|
|
95
|
+
* Date: 2014-01-23T21:02Z
|
|
96
|
+
*/
|
|
97
|
+
!function(e,n){"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(e)}("undefined"!=typeof window?window:this,(function(e,t){var n=[],r=n.slice,i=n.concat,o=n.push,s=n.indexOf,a={},l=a.toString,u=a.hasOwnProperty,c="".trim,p={},d=function(e,t){return new d.fn.init(e,t)},f=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,h=/^-ms-/,g=/-([\da-z])/gi,m=function(e,t){return t.toUpperCase()};function v(e){var t=e.length,n=d.type(e);return"function"!==n&&!d.isWindow(e)&&(!(1!==e.nodeType||!t)||"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}d.fn=d.prototype={jquery:"1.11.0",constructor:d,selector:"",length:0,toArray:function(){return r.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:r.call(this)},pushStack:function(e){var t=d.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return d.each(this,e,t)},map:function(e){return this.pushStack(d.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:o,sort:n.sort,splice:n.splice},d.extend=d.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,l=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||d.isFunction(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(i=arguments[a]))for(r in i)e=s[r],s!==(n=i[r])&&(u&&n&&(d.isPlainObject(n)||(t=d.isArray(n)))?(t?(t=!1,o=e&&d.isArray(e)?e:[]):o=e&&d.isPlainObject(e)?e:{},s[r]=d.extend(u,o,n)):void 0!==n&&(s[r]=n));return s},d.extend({expando:"jQuery"+("1.11.0"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===d.type(e)},isArray:Array.isArray||function(e){return"array"===d.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return e-parseFloat(e)>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==d.type(e)||e.nodeType||d.isWindow(e))return!1;try{if(e.constructor&&!u.call(e,"constructor")&&!u.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(p.ownLast)for(t in e)return u.call(e,t);for(t in e);return void 0===t||u.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?a[l.call(e)]||"object":typeof e},globalEval:function(t){t&&d.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(h,"ms-").replace(g,m)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r=0,i=e.length,o=v(e);if(n){if(o)for(;r<i&&!1!==t.apply(e[r],n);r++);else for(r in e)if(!1===t.apply(e[r],n))break}else if(o)for(;r<i&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:c&&!c.call("\ufeff ")?function(e){return null==e?"":c.call(e)}:function(e){return null==e?"":(e+"").replace(f,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(v(Object(e))?d.merge(n,"string"==typeof e?[e]:e):o.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(s)return s.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;)e[i++]=t[r++];if(n!=n)for(;void 0!==t[r];)e[i++]=t[r++];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,s=!n;i<o;i++)!t(e[i],i)!==s&&r.push(e[i]);return r},map:function(e,t,n){var r,o=0,s=e.length,a=[];if(v(e))for(;o<s;o++)null!=(r=t(e[o],o,n))&&a.push(r);else for(o in e)null!=(r=t(e[o],o,n))&&a.push(r);return i.apply([],a)},guid:1,proxy:function(e,t){var n,i,o;if("string"==typeof t&&(o=e[t],t=e,e=o),d.isFunction(e))return n=r.call(arguments,2),(i=function(){return e.apply(t||this,n.concat(r.call(arguments)))}).guid=e.guid=e.guid||d.guid++,i},now:function(){return+new Date},support:p}),d.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),(function(e,t){a["[object "+t+"]"]=t.toLowerCase()}));var y=
|
|
98
|
+
/*!
|
|
99
|
+
* Sizzle CSS Selector Engine v1.10.16
|
|
100
|
+
* http://sizzlejs.com/
|
|
101
|
+
*
|
|
102
|
+
* Copyright 2013 jQuery Foundation, Inc. and other contributors
|
|
103
|
+
* Released under the MIT license
|
|
104
|
+
* http://jquery.org/license
|
|
105
|
+
*
|
|
106
|
+
* Date: 2014-01-13
|
|
107
|
+
*/
|
|
108
|
+
function(e){var t,n,r,i,o,s,a,l,u,c,p,d,f,h,g,m,v,y="sizzle"+-new Date,x=e.document,E=0,b=0,C=te(),T=te(),S=te(),w=function(e,t){return e===t&&(u=!0),0},N={}.hasOwnProperty,L=[],I=L.pop,A=L.push,R=L.push,_=L.slice,O=L.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},D="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",k="[\\x20\\t\\r\\n\\f]",P="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=P.replace("w","w#"),F="\\["+k+"*("+P+")"+k+"*(?:([*^$|!~]?=)"+k+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+k+"*\\]",j=":("+P+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+F.replace(3,8)+")*)|.*)\\)|)",U=new RegExp("^"+k+"+|((?:^|[^\\\\])(?:\\\\.)*)"+k+"+$","g"),G=new RegExp("^"+k+"*,"+k+"*"),B=new RegExp("^"+k+"*([>+~]|"+k+")"+k+"*"),H=new RegExp("="+k+"*([^\\]'\"]*?)"+k+"*\\]","g"),q=new RegExp(j),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P.replace("w","w*")+")"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+j),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+k+"*(even|odd|(([+-]|)(\\d*)n|)"+k+"*(?:([+-]|)"+k+"*(\\d+)|))"+k+"*\\)|)","i"),bool:new RegExp("^(?:"+D+")$","i"),needsContext:new RegExp("^"+k+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+k+"*((?:-\\d)?\\d*)"+k+"*\\)|)(?=[^-]|$)","i")},z=/^(?:input|select|textarea|button)$/i,$=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Y=/[+~]/,K=/'|\\/g,J=new RegExp("\\\\([\\da-f]{1,6}"+k+"?|("+k+")|.)","ig"),Z=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{R.apply(L=_.call(x.childNodes),x.childNodes),L[x.childNodes.length].nodeType}catch(e){R={apply:L.length?function(e,t){A.apply(e,_.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function ee(e,t,i,o){var a,l,u,d,g,m,E,b,C,T;if((t?t.ownerDocument||t:x)!==p&&c(t),i=i||[],!e||"string"!=typeof e)return i;if(1!==(d=(t=t||p).nodeType)&&9!==d)return[];if(f&&!o){if(a=X.exec(e))if(u=a[1]){if(9===d){if(!(l=t.getElementById(u))||!l.parentNode)return i;if(l.id===u)return i.push(l),i}else if(t.ownerDocument&&(l=t.ownerDocument.getElementById(u))&&v(t,l)&&l.id===u)return i.push(l),i}else{if(a[2])return R.apply(i,t.getElementsByTagName(e)),i;if((u=a[3])&&n.getElementsByClassName&&t.getElementsByClassName)return R.apply(i,t.getElementsByClassName(u)),i}if(n.qsa&&(!h||!h.test(e))){if(b=E=y,C=t,T=9===d&&e,1===d&&"object"!==t.nodeName.toLowerCase()){for(m=pe(e),(E=t.getAttribute("id"))?b=E.replace(K,"\\$&"):t.setAttribute("id",b),b="[id='"+b+"'] ",g=m.length;g--;)m[g]=b+de(m[g]);C=Y.test(e)&&ue(t.parentNode)||t,T=m.join(",")}if(T)try{return R.apply(i,C.querySelectorAll(T)),i}catch(e){}finally{E||t.removeAttribute("id")}}}return function(e,t,i,o){var a,l,u,c,p,d=pe(e);if(!o&&1===d.length){if((l=d[0]=d[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&n.getById&&9===t.nodeType&&f&&r.relative[l[1].type]){if(!(t=(r.find.ID(u.matches[0].replace(J,Z),t)||[])[0]))return i;e=e.slice(l.shift().value.length)}for(a=W.needsContext.test(e)?0:l.length;a--&&(u=l[a],!r.relative[c=u.type]);)if((p=r.find[c])&&(o=p(u.matches[0].replace(J,Z),Y.test(l[0].type)&&ue(t.parentNode)||t))){if(l.splice(a,1),!(e=o.length&&de(l)))return R.apply(i,o),i;break}}return s(e,d)(o,t,!f,i,Y.test(e)&&ue(t.parentNode)||t),i}(e.replace(U,"$1"),t,i,o)}function te(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ne(e){return e[y]=!0,e}function re(e){var t=p.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ie(e,t){for(var n=e.split("|"),i=e.length;i--;)r.attrHandle[n[i]]=t}function oe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function se(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function ae(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function le(e){return ne((function(t){return t=+t,ne((function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))}))}))}function ue(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ee.support={},o=ee.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},c=ee.setDocument=function(e){var t,i=e?e.ownerDocument||e:x,s=i.defaultView;return i!==p&&9===i.nodeType&&i.documentElement?(p=i,d=i.documentElement,f=!o(i),s&&s!==s.top&&(s.addEventListener?s.addEventListener("unload",(function(){c()}),!1):s.attachEvent&&s.attachEvent("onunload",(function(){c()}))),n.attributes=re((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=re((function(e){return e.appendChild(i.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(i.getElementsByClassName)&&re((function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length})),n.getById=re((function(e){return d.appendChild(e).id=y,!i.getElementsByName||!i.getElementsByName(y).length})),n.getById?(r.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},r.filter.ID=function(e){var t=e.replace(J,Z);return function(e){return e.getAttribute("id")===t}}):(delete r.find.ID,r.filter.ID=function(e){var t=e.replace(J,Z);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),r.find.TAG=n.getElementsByTagName?function(e,t){if(void 0!==t.getElementsByTagName)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&f)return t.getElementsByClassName(e)},g=[],h=[],(n.qsa=Q.test(i.querySelectorAll))&&(re((function(e){e.innerHTML="<select t=''><option selected=''></option></select>",e.querySelectorAll("[t^='']").length&&h.push("[*^$]="+k+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||h.push("\\["+k+"*(?:value|"+D+")"),e.querySelectorAll(":checked").length||h.push(":checked")})),re((function(e){var t=i.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&h.push("name"+k+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")}))),(n.matchesSelector=Q.test(m=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&re((function(e){n.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",j)})),h=h.length&&new RegExp(h.join("|")),g=g.length&&new RegExp(g.join("|")),t=Q.test(d.compareDocumentPosition),v=t||Q.test(d.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},w=t?function(e,t){if(e===t)return u=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===i||e.ownerDocument===x&&v(x,e)?-1:t===i||t.ownerDocument===x&&v(x,t)?1:l?O.call(l,e)-O.call(l,t):0:4&r?-1:1)}:function(e,t){if(e===t)return u=!0,0;var n,r=0,o=e.parentNode,s=t.parentNode,a=[e],c=[t];if(!o||!s)return e===i?-1:t===i?1:o?-1:s?1:l?O.call(l,e)-O.call(l,t):0;if(o===s)return oe(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;a[r]===c[r];)r++;return r?oe(a[r],c[r]):a[r]===x?-1:c[r]===x?1:0},i):p},ee.matches=function(e,t){return ee(e,null,null,t)},ee.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(H,"='$1']"),n.matchesSelector&&f&&(!g||!g.test(t))&&(!h||!h.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return ee(t,p,null,[e]).length>0},ee.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),v(e,t)},ee.attr=function(e,t){(e.ownerDocument||e)!==p&&c(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!f):void 0;return void 0!==o?o:n.attributes||!f?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ee.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ee.uniqueSort=function(e){var t,r=[],i=0,o=0;if(u=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(w),u){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return l=null,e},i=ee.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=ee.selectors={cacheLength:50,createPseudo:ne,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(J,Z),e[3]=(e[4]||e[5]||"").replace(J,Z),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ee.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ee.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return W.CHILD.test(e[0])?null:(e[3]&&void 0!==e[4]?e[2]=e[4]:n&&q.test(n)&&(t=pe(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(J,Z).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=new RegExp("(^|"+k+")"+e+"("+k+"|$)"))&&C(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=ee.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,d,f,h,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),x=!l&&!a;if(m){if(o){for(;g;){for(p=t;p=p[g];)if(a?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?m.firstChild:m.lastChild],s&&x){for(f=(u=(c=m[y]||(m[y]={}))[e]||[])[0]===E&&u[1],d=u[0]===E&&u[2],p=f&&m.childNodes[f];p=++f&&p&&p[g]||(d=f=0)||h.pop();)if(1===p.nodeType&&++d&&p===t){c[e]=[E,f,d];break}}else if(x&&(u=(t[y]||(t[y]={}))[e])&&u[0]===E)d=u[1];else for(;(p=++f&&p&&p[g]||(d=f=0)||h.pop())&&((a?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++d||(x&&((p[y]||(p[y]={}))[e]=[E,d]),p!==t)););return(d-=i)===r||d%r==0&&d/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ee.error("unsupported pseudo: "+e);return i[y]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ne((function(e,n){for(var r,o=i(e,t),s=o.length;s--;)e[r=O.call(e,o[s])]=!(n[r]=o[s])})):function(e){return i(e,0,n)}):i}},pseudos:{not:ne((function(e){var t=[],n=[],r=s(e.replace(U,"$1"));return r[y]?ne((function(e,t,n,i){for(var o,s=r(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}})),has:ne((function(e){return function(t){return ee(e,t).length>0}})),contains:ne((function(e){return function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}})),lang:ne((function(e){return V.test(e||"")||ee.error("unsupported lang: "+e),e=e.replace(J,Z).toLowerCase(),function(t){var n;do{if(n=f?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return $.test(e.nodeName)},input:function(e){return z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:le((function(){return[0]})),last:le((function(e,t){return[t-1]})),eq:le((function(e,t,n){return[n<0?n+t:n]})),even:le((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:le((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:le((function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e})),gt:le((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=se(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=ae(t);function ce(){}function pe(e,t){var n,i,o,s,a,l,u,c=T[e+" "];if(c)return t?0:c.slice(0);for(a=e,l=[],u=r.preFilter;a;){for(s in n&&!(i=G.exec(a))||(i&&(a=a.slice(i[0].length)||a),l.push(o=[])),n=!1,(i=B.exec(a))&&(n=i.shift(),o.push({value:n,type:i[0].replace(U," ")}),a=a.slice(n.length)),r.filter)!(i=W[s].exec(a))||u[s]&&!(i=u[s](i))||(n=i.shift(),o.push({value:n,type:s,matches:i}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ee.error(e):T(e,l).slice(0)}function de(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function fe(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=b++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,s){var a,l,u=[E,o];if(s){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,s))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if((a=(l=t[y]||(t[y]={}))[r])&&a[0]===E&&a[1]===o)return u[2]=a[2];if(l[r]=u,u[2]=e(t,n,s))return!0}}}function he(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function ge(e,t,n,r,i){for(var o,s=[],a=0,l=e.length,u=null!=t;a<l;a++)(o=e[a])&&(n&&!n(o,r,i)||(s.push(o),u&&t.push(a)));return s}function me(e,t,n,r,i,o){return r&&!r[y]&&(r=me(r)),i&&!i[y]&&(i=me(i,o)),ne((function(o,s,a,l){var u,c,p,d=[],f=[],h=s.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)ee(e,t[r],n);return n}(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:ge(g,d,e,a,l),v=n?i||(o?e:h||r)?[]:s:m;if(n&&n(m,v,a,l),r)for(u=ge(v,f),r(u,[],a,l),c=u.length;c--;)(p=u[c])&&(v[f[c]]=!(m[f[c]]=p));if(o){if(i||e){if(i){for(u=[],c=v.length;c--;)(p=v[c])&&u.push(m[c]=p);i(null,v=[],u,l)}for(c=v.length;c--;)(p=v[c])&&(u=i?O.call(o,p):d[c])>-1&&(o[u]=!(s[u]=p))}}else v=ge(v===s?v.splice(h,v.length):v),i?i(null,s,v,l):R.apply(s,v)}))}function ve(e){for(var t,n,i,o=e.length,s=r.relative[e[0].type],l=s||r.relative[" "],u=s?1:0,c=fe((function(e){return e===t}),l,!0),p=fe((function(e){return O.call(t,e)>-1}),l,!0),d=[function(e,n,r){return!s&&(r||n!==a)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];u<o;u++)if(n=r.relative[e[u].type])d=[fe(he(d),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[y]){for(i=++u;i<o&&!r.relative[e[i].type];i++);return me(u>1&&he(d),u>1&&de(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(U,"$1"),n,u<i&&ve(e.slice(u,i)),i<o&&ve(e=e.slice(i)),i<o&&de(e))}d.push(n)}return he(d)}return ce.prototype=r.filters=r.pseudos,r.setFilters=new ce,s=ee.compile=function(e,t){var n,i=[],o=[],s=S[e+" "];if(!s){for(t||(t=pe(e)),n=t.length;n--;)(s=ve(t[n]))[y]?i.push(s):o.push(s);s=S(e,function(e,t){var n=t.length>0,i=e.length>0,o=function(o,s,l,u,c){var d,f,h,g=0,m="0",v=o&&[],y=[],x=a,b=o||i&&r.find.TAG("*",c),C=E+=null==x?1:Math.random()||.1,T=b.length;for(c&&(a=s!==p&&s);m!==T&&null!=(d=b[m]);m++){if(i&&d){for(f=0;h=e[f++];)if(h(d,s,l)){u.push(d);break}c&&(E=C)}n&&((d=!h&&d)&&g--,o&&v.push(d))}if(g+=m,n&&m!==g){for(f=0;h=t[f++];)h(v,y,s,l);if(o){if(g>0)for(;m--;)v[m]||y[m]||(y[m]=I.call(u));y=ge(y)}R.apply(u,y),c&&!o&&y.length>0&&g+t.length>1&&ee.uniqueSort(u)}return c&&(E=C,a=x),v};return n?ne(o):o}(o,i))}return s},n.sortStable=y.split("").sort(w).join("")===y,n.detectDuplicates=!!u,c(),n.sortDetached=re((function(e){return 1&e.compareDocumentPosition(p.createElement("div"))})),re((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||ie("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&re((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||ie("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),re((function(e){return null==e.getAttribute("disabled")}))||ie(D,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),ee}(e);d.find=y,d.expr=y.selectors,d.expr[":"]=d.expr.pseudos,d.unique=y.uniqueSort,d.text=y.getText,d.isXMLDoc=y.isXML,d.contains=y.contains;var x=d.expr.match.needsContext,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,b=/^.[^:#\[\.,]*$/;function C(e,t,n){if(d.isFunction(t))return d.grep(e,(function(e,r){return!!t.call(e,r,e)!==n}));if(t.nodeType)return d.grep(e,(function(e){return e===t!==n}));if("string"==typeof t){if(b.test(t))return d.filter(t,e,n);t=d.filter(t,e)}return d.grep(e,(function(e){return d.inArray(e,t)>=0!==n}))}d.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?d.find.matchesSelector(r,e)?[r]:[]:d.find.matches(e,d.grep(t,(function(e){return 1===e.nodeType})))},d.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(d(e).filter((function(){for(t=0;t<i;t++)if(d.contains(r[t],this))return!0})));for(t=0;t<i;t++)d.find(e,r[t],n);return(n=this.pushStack(i>1?d.unique(n):n)).selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(C(this,e||[],!1))},not:function(e){return this.pushStack(C(this,e||[],!0))},is:function(e){return!!C(this,"string"==typeof e&&x.test(e)?d(e):e||[],!1).length}});var T,S=e.document,w=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(d.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:w.exec(e))||!n[1]&&t)return!t||t.jquery?(t||T).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof d?t[0]:t,d.merge(this,d.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),E.test(n[1])&&d.isPlainObject(t))for(n in t)d.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if((r=S.getElementById(n[2]))&&r.parentNode){if(r.id!==n[2])return T.find(e);this.length=1,this[0]=r}return this.context=S,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):d.isFunction(e)?void 0!==T.ready?T.ready(e):e(d):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),d.makeArray(e,this))}).prototype=d.fn,T=d(S);var N=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function I(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}d.extend({dir:function(e,t,n){for(var r=[],i=e[t];i&&9!==i.nodeType&&(void 0===n||1!==i.nodeType||!d(i).is(n));)1===i.nodeType&&r.push(i),i=i[t];return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),d.fn.extend({has:function(e){var t,n=d(e,this),r=n.length;return this.filter((function(){for(t=0;t<r;t++)if(d.contains(this,n[t]))return!0}))},closest:function(e,t){for(var n,r=0,i=this.length,o=[],s=x.test(e)||"string"!=typeof e?d(e,t||this.context):0;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&d.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?d.unique(o):o)},index:function(e){return e?"string"==typeof e?d.inArray(this[0],d(e)):d.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(d.unique(d.merge(this.get(),d(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),d.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return d.dir(e,"parentNode")},parentsUntil:function(e,t,n){return d.dir(e,"parentNode",n)},next:function(e){return I(e,"nextSibling")},prev:function(e){return I(e,"previousSibling")},nextAll:function(e){return d.dir(e,"nextSibling")},prevAll:function(e){return d.dir(e,"previousSibling")},nextUntil:function(e,t,n){return d.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return d.dir(e,"previousSibling",n)},siblings:function(e){return d.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return d.sibling(e.firstChild)},contents:function(e){return d.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:d.merge([],e.childNodes)}},(function(e,t){d.fn[e]=function(n,r){var i=d.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=d.filter(r,i)),this.length>1&&(L[e]||(i=d.unique(i)),N.test(e)&&(i=i.reverse())),this.pushStack(i)}}));var A,R,_=/\S+/g,O={};function D(){S.addEventListener?(S.removeEventListener("DOMContentLoaded",k,!1),e.removeEventListener("load",k,!1)):(S.detachEvent("onreadystatechange",k),e.detachEvent("onload",k))}function k(){(S.addEventListener||"load"===event.type||"complete"===S.readyState)&&(D(),d.ready())}for(R in d.Callbacks=function(e){e="string"==typeof e?O[e]||function(e){var t=O[e]={};return d.each(e.match(_)||[],(function(e,n){t[n]=!0})),t}(e):d.extend({},e);var t,n,r,i,o,s,a=[],l=!e.once&&[],u=function(p){for(n=e.memory&&p,r=!0,o=s||0,s=0,i=a.length,t=!0;a&&o<i;o++)if(!1===a[o].apply(p[0],p[1])&&e.stopOnFalse){n=!1;break}t=!1,a&&(l?l.length&&u(l.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var r=a.length;!function t(n){d.each(n,(function(n,r){var i=d.type(r);"function"===i?e.unique&&c.has(r)||a.push(r):r&&r.length&&"string"!==i&&t(r)}))}(arguments),t?i=a.length:n&&(s=r,u(n))}return this},remove:function(){return a&&d.each(arguments,(function(e,n){for(var r;(r=d.inArray(n,a,r))>-1;)a.splice(r,1),t&&(r<=i&&i--,r<=o&&o--)})),this},has:function(e){return e?d.inArray(e,a)>-1:!(!a||!a.length)},empty:function(){return a=[],i=0,this},disable:function(){return a=l=n=void 0,this},disabled:function(){return!a},lock:function(){return l=void 0,n||c.disable(),this},locked:function(){return!l},fireWith:function(e,n){return!a||r&&!l||(n=[e,(n=n||[]).slice?n.slice():n],t?l.push(n):u(n)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},d.extend({Deferred:function(e){var t=[["resolve","done",d.Callbacks("once memory"),"resolved"],["reject","fail",d.Callbacks("once memory"),"rejected"],["notify","progress",d.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return d.Deferred((function(n){d.each(t,(function(t,o){var s=d.isFunction(e[t])&&e[t];i[o[1]]((function(){var e=s&&s.apply(this,arguments);e&&d.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,s?[e]:arguments)}))})),e=null})).promise()},promise:function(e){return null!=e?d.extend(e,r):r}},i={};return r.pipe=r.then,d.each(t,(function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add((function(){n=a}),t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith})),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,i,o=0,s=r.call(arguments),a=s.length,l=1!==a||e&&d.isFunction(e.promise)?a:0,u=1===l?e:d.Deferred(),c=function(e,n,i){return function(o){n[e]=this,i[e]=arguments.length>1?r.call(arguments):o,i===t?u.notifyWith(n,i):--l||u.resolveWith(n,i)}};if(a>1)for(t=new Array(a),n=new Array(a),i=new Array(a);o<a;o++)s[o]&&d.isFunction(s[o].promise)?s[o].promise().done(c(o,i,s)).fail(u.reject).progress(c(o,n,t)):--l;return l||u.resolveWith(i,s),u.promise()}}),d.fn.ready=function(e){return d.ready.promise().done(e),this},d.extend({isReady:!1,readyWait:1,holdReady:function(e){e?d.readyWait++:d.ready(!0)},ready:function(e){if(!(!0===e?--d.readyWait:d.isReady)){if(!S.body)return setTimeout(d.ready);d.isReady=!0,!0!==e&&--d.readyWait>0||(A.resolveWith(S,[d]),d.fn.trigger&&d(S).trigger("ready").off("ready"))}}}),d.ready.promise=function(t){if(!A)if(A=d.Deferred(),"complete"===S.readyState)setTimeout(d.ready);else if(S.addEventListener)S.addEventListener("DOMContentLoaded",k,!1),e.addEventListener("load",k,!1);else{S.attachEvent("onreadystatechange",k),e.attachEvent("onload",k);var n=!1;try{n=null==e.frameElement&&S.documentElement}catch(e){}n&&n.doScroll&&function e(){if(!d.isReady){try{n.doScroll("left")}catch(t){return setTimeout(e,50)}D(),d.ready()}}()}return A.promise(t)},d(p))break;p.ownLast="0"!==R,p.inlineBlockNeedsLayout=!1,d((function(){var e,t,n=S.getElementsByTagName("body")[0];n&&((e=S.createElement("div")).style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",t=S.createElement("div"),n.appendChild(e).appendChild(t),void 0!==t.style.zoom&&(t.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(p.inlineBlockNeedsLayout=3===t.offsetWidth)&&(n.style.zoom=1)),n.removeChild(e),e=t=null)})),function(){var e=S.createElement("div");if(null==p.deleteExpando){p.deleteExpando=!0;try{delete e.test}catch(e){p.deleteExpando=!1}}e=null}(),d.acceptData=function(e){var t=d.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)};var P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,M=/([A-Z])/g;function F(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(M,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:P.test(n)?d.parseJSON(n):n)}catch(e){}d.data(e,t,n)}else n=void 0}return n}function j(e){var t;for(t in e)if(("data"!==t||!d.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function U(e,t,r,i){if(d.acceptData(e)){var o,s,a=d.expando,l=e.nodeType,u=l?d.cache:e,c=l?e[a]:e[a]&&a;if(c&&u[c]&&(i||u[c].data)||void 0!==r||"string"!=typeof t)return c||(c=l?e[a]=n.pop()||d.guid++:a),u[c]||(u[c]=l?{}:{toJSON:d.noop}),"object"!=typeof t&&"function"!=typeof t||(i?u[c]=d.extend(u[c],t):u[c].data=d.extend(u[c].data,t)),s=u[c],i||(s.data||(s.data={}),s=s.data),void 0!==r&&(s[d.camelCase(t)]=r),"string"==typeof t?null==(o=s[t])&&(o=s[d.camelCase(t)]):o=s,o}}function G(e,t,n){if(d.acceptData(e)){var r,i,o=e.nodeType,s=o?d.cache:e,a=o?e[d.expando]:d.expando;if(s[a]){if(t&&(r=n?s[a]:s[a].data)){i=(t=d.isArray(t)?t.concat(d.map(t,d.camelCase)):t in r||(t=d.camelCase(t))in r?[t]:t.split(" ")).length;for(;i--;)delete r[t[i]];if(n?!j(r):!d.isEmptyObject(r))return}(n||(delete s[a].data,j(s[a])))&&(o?d.cleanData([e],!0):p.deleteExpando||s!=s.window?delete s[a]:s[a]=null)}}}d.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?d.cache[e[d.expando]]:e[d.expando])&&!j(e)},data:function(e,t,n){return U(e,t,n)},removeData:function(e,t){return G(e,t)},_data:function(e,t,n){return U(e,t,n,!0)},_removeData:function(e,t){return G(e,t,!0)}}),d.fn.extend({data:function(e,t){var n,r,i,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(i=d.data(o),1===o.nodeType&&!d._data(o,"parsedAttrs"))){for(n=s.length;n--;)0===(r=s[n].name).indexOf("data-")&&F(o,r=d.camelCase(r.slice(5)),i[r]);d._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each((function(){d.data(this,e)})):arguments.length>1?this.each((function(){d.data(this,e,t)})):o?F(o,e,d.data(o,e)):void 0},removeData:function(e){return this.each((function(){d.removeData(this,e)}))}}),d.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=d._data(e,t),n&&(!r||d.isArray(n)?r=d._data(e,t,d.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=d.queue(e,t),r=n.length,i=n.shift(),o=d._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){d.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return d._data(e,n)||d._data(e,n,{empty:d.Callbacks("once memory").add((function(){d._removeData(e,t+"queue"),d._removeData(e,n)}))})}}),d.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?d.queue(this[0],e):void 0===t?this:this.each((function(){var n=d.queue(this,e,t);d._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&d.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){d.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=d.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=d._data(o[s],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var B=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,H=["Top","Right","Bottom","Left"],q=function(e,t){return e=t||e,"none"===d.css(e,"display")||!d.contains(e.ownerDocument,e)},V=d.access=function(e,t,n,r,i,o,s){var a=0,l=e.length,u=null==n;if("object"===d.type(n))for(a in i=!0,n)d.access(e,t,a,n[a],!0,o,s);else if(void 0!==r&&(i=!0,d.isFunction(r)||(s=!0),u&&(s?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(d(e),n)})),t))for(;a<l;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:u?t.call(e):l?t(e[0],n):o},W=/^(?:checkbox|radio)$/i;!function(){var e=S.createDocumentFragment(),t=S.createElement("div"),n=S.createElement("input");if(t.setAttribute("className","t"),t.innerHTML=" <link/><table></table><a href='/a'>a</a>",p.leadingWhitespace=3===t.firstChild.nodeType,p.tbody=!t.getElementsByTagName("tbody").length,p.htmlSerialize=!!t.getElementsByTagName("link").length,p.html5Clone="<:nav></:nav>"!==S.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,e.appendChild(n),p.appendChecked=n.checked,t.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,e.appendChild(t),t.innerHTML="<input type='radio' checked='checked' name='t'/>",p.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,p.noCloneEvent=!0,t.attachEvent&&(t.attachEvent("onclick",(function(){p.noCloneEvent=!1})),t.cloneNode(!0).click()),null==p.deleteExpando){p.deleteExpando=!0;try{delete t.test}catch(e){p.deleteExpando=!1}}e=t=n=null}(),function(){var t,n,r=S.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})n="on"+t,(p[t+"Bubbles"]=n in e)||(r.setAttribute(n,"t"),p[t+"Bubbles"]=!1===r.attributes[n].expando);r=null}();var z=/^(?:input|select|textarea)$/i,$=/^key/,Q=/^(?:mouse|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function K(){return!0}function J(){return!1}function Z(){try{return S.activeElement}catch(e){}}function ee(e){var t=te.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}d.event={global:{},add:function(e,t,n,r,i){var o,s,a,l,u,c,p,f,h,g,m,v=d._data(e);if(v){for(n.handler&&(n=(l=n).handler,i=l.selector),n.guid||(n.guid=d.guid++),(s=v.events)||(s=v.events={}),(c=v.handle)||((c=v.handle=function(e){return void 0===d||e&&d.event.triggered===e.type?void 0:d.event.dispatch.apply(c.elem,arguments)}).elem=e),a=(t=(t||"").match(_)||[""]).length;a--;)h=m=(o=Y.exec(t[a])||[])[1],g=(o[2]||"").split(".").sort(),h&&(u=d.event.special[h]||{},h=(i?u.delegateType:u.bindType)||h,u=d.event.special[h]||{},p=d.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&d.expr.match.needsContext.test(i),namespace:g.join(".")},l),(f=s[h])||((f=s[h]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(e,r,g,c)||(e.addEventListener?e.addEventListener(h,c,!1):e.attachEvent&&e.attachEvent("on"+h,c))),u.add&&(u.add.call(e,p),p.handler.guid||(p.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,p):f.push(p),d.event.global[h]=!0);e=null}},remove:function(e,t,n,r,i){var o,s,a,l,u,c,p,f,h,g,m,v=d.hasData(e)&&d._data(e);if(v&&(c=v.events)){for(u=(t=(t||"").match(_)||[""]).length;u--;)if(h=m=(a=Y.exec(t[u])||[])[1],g=(a[2]||"").split(".").sort(),h){for(p=d.event.special[h]||{},f=c[h=(r?p.delegateType:p.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;o--;)s=f[o],!i&&m!==s.origType||n&&n.guid!==s.guid||a&&!a.test(s.namespace)||r&&r!==s.selector&&("**"!==r||!s.selector)||(f.splice(o,1),s.selector&&f.delegateCount--,p.remove&&p.remove.call(e,s));l&&!f.length&&(p.teardown&&!1!==p.teardown.call(e,g,v.handle)||d.removeEvent(e,h,v.handle),delete c[h])}else for(h in c)d.event.remove(e,h+t[u],n,r,!0);d.isEmptyObject(c)&&(delete v.handle,d._removeData(e,"events"))}},trigger:function(t,n,r,i){var o,s,a,l,c,p,f,h=[r||S],g=u.call(t,"type")?t.type:t,m=u.call(t,"namespace")?t.namespace.split("."):[];if(a=p=r=r||S,3!==r.nodeType&&8!==r.nodeType&&!X.test(g+d.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),s=g.indexOf(":")<0&&"on"+g,(t=t[d.expando]?t:new d.Event(g,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=m.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:d.makeArray(n,[t]),c=d.event.special[g]||{},i||!c.trigger||!1!==c.trigger.apply(r,n))){if(!i&&!c.noBubble&&!d.isWindow(r)){for(l=c.delegateType||g,X.test(l+g)||(a=a.parentNode);a;a=a.parentNode)h.push(a),p=a;p===(r.ownerDocument||S)&&h.push(p.defaultView||p.parentWindow||e)}for(f=0;(a=h[f++])&&!t.isPropagationStopped();)t.type=f>1?l:c.bindType||g,(o=(d._data(a,"events")||{})[t.type]&&d._data(a,"handle"))&&o.apply(a,n),(o=s&&a[s])&&o.apply&&d.acceptData(a)&&(t.result=o.apply(a,n),!1===t.result&&t.preventDefault());if(t.type=g,!i&&!t.isDefaultPrevented()&&(!c._default||!1===c._default.apply(h.pop(),n))&&d.acceptData(r)&&s&&r[g]&&!d.isWindow(r)){(p=r[s])&&(r[s]=null),d.event.triggered=g;try{r[g]()}catch(e){}d.event.triggered=void 0,p&&(r[s]=p)}return t.result}},dispatch:function(e){e=d.event.fix(e);var t,n,i,o,s,a=[],l=r.call(arguments),u=(d._data(this,"events")||{})[e.type]||[],c=d.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(a=d.event.handlers.call(this,e,u),t=0;(o=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,s=0;(i=o.handlers[s++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(i.namespace)||(e.handleObj=i,e.data=i.data,void 0!==(n=((d.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l))&&!1===(e.result=n)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,l=e.target;if(a&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(i=[],o=0;o<a;o++)void 0===i[n=(r=t[o]).selector+" "]&&(i[n]=r.needsContext?d(n,this).index(l)>=0:d.find(n,this,null,[l]).length),i[n]&&i.push(r);i.length&&s.push({elem:l,handlers:i})}return a<t.length&&s.push({elem:this,handlers:t.slice(a)}),s},fix:function(e){if(e[d.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];for(s||(this.fixHooks[i]=s=Q.test(i)?this.mouseHooks:$.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new d.Event(o),t=r.length;t--;)e[n=r[t]]=o[n];return e.target||(e.target=o.srcElement||S),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,o=t.button,s=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=(r=e.target.ownerDocument||S).documentElement,n=r.body,e.pageX=t.clientX+(i&&i.scrollLeft||n&&n.scrollLeft||0)-(i&&i.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||n&&n.scrollTop||0)-(i&&i.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?t.toElement:s),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Z()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){if(this===Z()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(d.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return this.click(),!1},_default:function(e){return d.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=d.extend(new d.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?d.event.trigger(i,null,t):d.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},d.removeEvent=S.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(void 0===e[r]&&(e[r]=null),e.detachEvent(r,n))},d.Event=function(e,t){if(!(this instanceof d.Event))return new d.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&(!1===e.returnValue||e.getPreventDefault&&e.getPreventDefault())?K:J):this.type=e,t&&d.extend(this,t),this.timeStamp=e&&e.timeStamp||d.now(),this[d.expando]=!0},d.Event.prototype={isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=K,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=K,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()}},d.each({mouseenter:"mouseover",mouseleave:"mouseout"},(function(e,t){d.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||d.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),p.submitBubbles||(d.event.special.submit={setup:function(){if(d.nodeName(this,"form"))return!1;d.event.add(this,"click._submit keypress._submit",(function(e){var t=e.target,n=d.nodeName(t,"input")||d.nodeName(t,"button")?t.form:void 0;n&&!d._data(n,"submitBubbles")&&(d.event.add(n,"submit._submit",(function(e){e._submit_bubble=!0})),d._data(n,"submitBubbles",!0))}))},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&d.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(d.nodeName(this,"form"))return!1;d.event.remove(this,"._submit")}}),p.changeBubbles||(d.event.special.change={setup:function(){if(z.test(this.nodeName))return"checkbox"!==this.type&&"radio"!==this.type||(d.event.add(this,"propertychange._change",(function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)})),d.event.add(this,"click._change",(function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),d.event.simulate("change",this,e,!0)}))),!1;d.event.add(this,"beforeactivate._change",(function(e){var t=e.target;z.test(t.nodeName)&&!d._data(t,"changeBubbles")&&(d.event.add(t,"change._change",(function(e){!this.parentNode||e.isSimulated||e.isTrigger||d.event.simulate("change",this.parentNode,e,!0)})),d._data(t,"changeBubbles",!0))}))},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return e.handleObj.handler.apply(this,arguments)},teardown:function(){return d.event.remove(this,"._change"),!z.test(this.nodeName)}}),p.focusinBubbles||d.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){d.event.simulate(t,e.target,d.event.fix(e),!0)};d.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=d._data(r,t);i||r.addEventListener(e,n,!0),d._data(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=d._data(r,t)-1;i?d._data(r,t,i):(r.removeEventListener(e,n,!0),d._removeData(r,t))}}})),d.fn.extend({on:function(e,t,n,r,i){var o,s;if("object"==typeof e){for(o in"string"!=typeof t&&(n=n||t,t=void 0),e)this.on(o,t,n,e[o],i);return this}if(null==n&&null==r?(r=t,n=t=void 0):null==r&&("string"==typeof t?(r=n,n=void 0):(r=n,n=t,t=void 0)),!1===r)r=J;else if(!r)return this;return 1===i&&(s=r,(r=function(e){return d().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=d.guid++)),this.each((function(){d.event.add(this,e,r,n,t)}))},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,d(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=J),this.each((function(){d.event.remove(this,e,n,t)}))},trigger:function(e,t){return this.each((function(){d.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return d.event.trigger(e,t,n,!0)}});var te="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ne=/ jQuery\d+="(?:null|\d+)"/g,re=new RegExp("<(?:"+te+")[\\s/>]","i"),ie=/^\s+/,oe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,se=/<([\w:]+)/,ae=/<tbody/i,le=/<|&#?\w+;/,ue=/<(?:script|style|link)/i,ce=/checked\s*(?:[^=]|=\s*.checked.)/i,pe=/^$|\/(?:java|ecma)script/i,de=/^true\/(.*)/,fe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,he={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:p.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},ge=ee(S).appendChild(S.createElement("div"));function me(e,t){var n,r,i=0,o=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||d.nodeName(r,t)?o.push(r):d.merge(o,me(r,t));return void 0===t||t&&d.nodeName(e,t)?d.merge([e],o):o}function ve(e){W.test(e.type)&&(e.defaultChecked=e.checked)}function ye(e,t){return d.nodeName(e,"table")&&d.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function xe(e){return e.type=(null!==d.find.attr(e,"type"))+"/"+e.type,e}function Ee(e){var t=de.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function be(e,t){for(var n,r=0;null!=(n=e[r]);r++)d._data(n,"globalEval",!t||d._data(t[r],"globalEval"))}function Ce(e,t){if(1===t.nodeType&&d.hasData(e)){var n,r,i,o=d._data(e),s=d._data(t,o),a=o.events;if(a)for(n in delete s.handle,s.events={},a)for(r=0,i=a[n].length;r<i;r++)d.event.add(t,n,a[n][r]);s.data&&(s.data=d.extend({},s.data))}}function Te(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!p.noCloneEvent&&t[d.expando]){for(r in(i=d._data(t)).events)d.removeEvent(t,r,i.handle);t.removeAttribute(d.expando)}"script"===n&&t.text!==e.text?(xe(t).text=e.text,Ee(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),p.html5Clone&&e.innerHTML&&!d.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&W.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}he.optgroup=he.option,he.tbody=he.tfoot=he.colgroup=he.caption=he.thead,he.th=he.td,d.extend({clone:function(e,t,n){var r,i,o,s,a,l=d.contains(e.ownerDocument,e);if(p.html5Clone||d.isXMLDoc(e)||!re.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(ge.innerHTML=e.outerHTML,ge.removeChild(o=ge.firstChild)),!(p.noCloneEvent&&p.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||d.isXMLDoc(e)))for(r=me(o),a=me(e),s=0;null!=(i=a[s]);++s)r[s]&&Te(i,r[s]);if(t)if(n)for(a=a||me(e),r=r||me(o),s=0;null!=(i=a[s]);s++)Ce(i,r[s]);else Ce(e,o);return(r=me(o,"script")).length>0&&be(r,!l&&me(e,"script")),r=a=i=null,o},buildFragment:function(e,t,n,r){for(var i,o,s,a,l,u,c,f=e.length,h=ee(t),g=[],m=0;m<f;m++)if((o=e[m])||0===o)if("object"===d.type(o))d.merge(g,o.nodeType?[o]:o);else if(le.test(o)){for(a=a||h.appendChild(t.createElement("div")),l=(se.exec(o)||["",""])[1].toLowerCase(),c=he[l]||he._default,a.innerHTML=c[1]+o.replace(oe,"<$1></$2>")+c[2],i=c[0];i--;)a=a.lastChild;if(!p.leadingWhitespace&&ie.test(o)&&g.push(t.createTextNode(ie.exec(o)[0])),!p.tbody)for(i=(o="table"!==l||ae.test(o)?"<table>"!==c[1]||ae.test(o)?0:a:a.firstChild)&&o.childNodes.length;i--;)d.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u);for(d.merge(g,a.childNodes),a.textContent="";a.firstChild;)a.removeChild(a.firstChild);a=h.lastChild}else g.push(t.createTextNode(o));for(a&&h.removeChild(a),p.appendChecked||d.grep(me(g,"input"),ve),m=0;o=g[m++];)if((!r||-1===d.inArray(o,r))&&(s=d.contains(o.ownerDocument,o),a=me(h.appendChild(o),"script"),s&&be(a),n))for(i=0;o=a[i++];)pe.test(o.type||"")&&n.push(o);return a=null,h},cleanData:function(e,t){for(var r,i,o,s,a=0,l=d.expando,u=d.cache,c=p.deleteExpando,f=d.event.special;null!=(r=e[a]);a++)if((t||d.acceptData(r))&&(s=(o=r[l])&&u[o])){if(s.events)for(i in s.events)f[i]?d.event.remove(r,i):d.removeEvent(r,i,s.handle);u[o]&&(delete u[o],c?delete r[l]:void 0!==r.removeAttribute?r.removeAttribute(l):r[l]=null,n.push(o))}}}),d.fn.extend({text:function(e){return V(this,(function(e){return void 0===e?d.text(this):this.empty().append((this[0]&&this[0].ownerDocument||S).createTextNode(e))}),null,e,arguments.length)},append:function(){return this.domManip(arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||ye(this,e).appendChild(e)}))},prepend:function(){return this.domManip(arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ye(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return this.domManip(arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return this.domManip(arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},remove:function(e,t){for(var n,r=e?d.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||d.cleanData(me(n)),n.parentNode&&(t&&d.contains(n.ownerDocument,n)&&be(me(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&d.cleanData(me(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&d.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return d.clone(this,e,t)}))},html:function(e){return V(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(ne,""):void 0;if("string"==typeof e&&!ue.test(e)&&(p.htmlSerialize||!re.test(e))&&(p.leadingWhitespace||!ie.test(e))&&!he[(se.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(oe,"<$1></$2>");try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(d.cleanData(me(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,(function(t){e=this.parentNode,d.cleanData(me(this)),e&&e.replaceChild(t,this)})),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=i.apply([],e);var n,r,o,s,a,l,u=0,c=this.length,f=this,h=c-1,g=e[0],m=d.isFunction(g);if(m||c>1&&"string"==typeof g&&!p.checkClone&&ce.test(g))return this.each((function(n){var r=f.eq(n);m&&(e[0]=g.call(this,n,r.html())),r.domManip(e,t)}));if(c&&(n=(l=d.buildFragment(e,this[0].ownerDocument,!1,this)).firstChild,1===l.childNodes.length&&(l=n),n)){for(o=(s=d.map(me(l,"script"),xe)).length;u<c;u++)r=l,u!==h&&(r=d.clone(r,!0,!0),o&&d.merge(s,me(r,"script"))),t.call(this[u],r,u);if(o)for(a=s[s.length-1].ownerDocument,d.map(s,Ee),u=0;u<o;u++)r=s[u],pe.test(r.type||"")&&!d._data(r,"globalEval")&&d.contains(a,r)&&(r.src?d._evalUrl&&d._evalUrl(r.src):d.globalEval((r.text||r.textContent||r.innerHTML||"").replace(fe,"")));l=n=null}return this}}),d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){d.fn[e]=function(e){for(var n,r=0,i=[],s=d(e),a=s.length-1;r<=a;r++)n=r===a?this:this.clone(!0),d(s[r])[t](n),o.apply(i,n.get());return this.pushStack(i)}}));var Se,we,Ne,Le,Ie={};function Ae(t,n){var r=d(n.createElement(t)).appendTo(n.body),i=e.getDefaultComputedStyle?e.getDefaultComputedStyle(r[0]).display:d.css(r[0],"display");return r.detach(),i}function Re(e){var t=S,n=Ie[e];return n||("none"!==(n=Ae(e,t))&&n||((t=((Se=(Se||d("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentWindow||Se[0].contentDocument).document).write(),t.close(),n=Ae(e,t),Se.detach()),Ie[e]=n),n}(Le=S.createElement("div")).innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",(we=Le.getElementsByTagName("a")[0]).style.cssText="float:left;opacity:.5",p.opacity=/^0.5/.test(we.style.opacity),p.cssFloat=!!we.style.cssFloat,Le.style.backgroundClip="content-box",Le.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===Le.style.backgroundClip,we=Le=null,p.shrinkWrapBlocks=function(){var e,t,n;if(null==Ne){if(!(e=S.getElementsByTagName("body")[0]))return;t=S.createElement("div"),n=S.createElement("div"),e.appendChild(t).appendChild(n),Ne=!1,void 0!==n.style.zoom&&(n.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0;width:1px;padding:1px;zoom:1",n.innerHTML="<div></div>",n.firstChild.style.width="5px",Ne=3!==n.offsetWidth),e.removeChild(t),e=t=n=null}return Ne};var _e,Oe,De=/^margin/,ke=new RegExp("^("+B+")(?!px)[a-z%]+$","i"),Pe=/^(top|right|bottom|left)$/;function Me(e,t){return{get:function(){var n=e();if(null!=n){if(!n)return(this.get=t).apply(this,arguments);delete this.get}}}}e.getComputedStyle?(_e=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)},Oe=function(e,t,n){var r,i,o,s,a=e.style;return s=(n=n||_e(e))?n.getPropertyValue(t)||n[t]:void 0,n&&(""!==s||d.contains(e.ownerDocument,e)||(s=d.style(e,t)),ke.test(s)&&De.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0===s?s:s+""}):S.documentElement.currentStyle&&(_e=function(e){return e.currentStyle},Oe=function(e,t,n){var r,i,o,s,a=e.style;return null==(s=(n=n||_e(e))?n[t]:void 0)&&a&&a[t]&&(s=a[t]),ke.test(s)&&!Pe.test(t)&&(r=a.left,(o=(i=e.runtimeStyle)&&i.left)&&(i.left=e.currentStyle.left),a.left="fontSize"===t?"1em":s,s=a.pixelLeft+"px",a.left=r,o&&(i.left=o)),void 0===s?s:s+""||"auto"}),function(){var t,n,r,i,o,s,a=S.createElement("div"),l="border:0;width:0;height:0;position:absolute;top:0;left:-9999px";function u(){var t,n,a=S.getElementsByTagName("body")[0];a&&(t=S.createElement("div"),n=S.createElement("div"),t.style.cssText=l,a.appendChild(t).appendChild(n),n.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",d.swap(a,null!=a.style.zoom?{zoom:1}:{},(function(){r=4===n.offsetWidth})),i=!0,o=!1,s=!0,e.getComputedStyle&&(o="1%"!==(e.getComputedStyle(n,null)||{}).top,i="4px"===(e.getComputedStyle(n,null)||{width:"4px"}).width),a.removeChild(t),n=a=null)}a.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",(t=a.getElementsByTagName("a")[0]).style.cssText="float:left;opacity:.5",p.opacity=/^0.5/.test(t.style.opacity),p.cssFloat=!!t.style.cssFloat,a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===a.style.backgroundClip,t=a=null,d.extend(p,{reliableHiddenOffsets:function(){if(null!=n)return n;var e,t,r,i=S.createElement("div"),o=S.getElementsByTagName("body")[0];return o?(i.setAttribute("className","t"),i.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",(e=S.createElement("div")).style.cssText=l,o.appendChild(e).appendChild(i),i.innerHTML="<table><tr><td></td><td>t</td></tr></table>",(t=i.getElementsByTagName("td"))[0].style.cssText="padding:0;margin:0;border:0;display:none",r=0===t[0].offsetHeight,t[0].style.display="",t[1].style.display="none",n=r&&0===t[0].offsetHeight,o.removeChild(e),i=o=null,n):void 0},boxSizing:function(){return null==r&&u(),r},boxSizingReliable:function(){return null==i&&u(),i},pixelPosition:function(){return null==o&&u(),o},reliableMarginRight:function(){var t,n,r,i;if(null==s&&e.getComputedStyle){if(!(t=S.getElementsByTagName("body")[0]))return;n=S.createElement("div"),r=S.createElement("div"),n.style.cssText=l,t.appendChild(n).appendChild(r),(i=r.appendChild(S.createElement("div"))).style.cssText=r.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0",i.style.marginRight=i.style.width="0",r.style.width="1px",s=!parseFloat((e.getComputedStyle(i,null)||{}).marginRight),t.removeChild(n)}return s}})}(),d.swap=function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=s[o];return i};var Fe=/alpha\([^)]*\)/i,je=/opacity\s*=\s*([^)]*)/,Ue=/^(none|table(?!-c[ea]).+)/,Ge=new RegExp("^("+B+")(.*)$","i"),Be=new RegExp("^([+-])=("+B+")","i"),He={position:"absolute",visibility:"hidden",display:"block"},qe={letterSpacing:0,fontWeight:400},Ve=["Webkit","O","Moz","ms"];function We(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Ve.length;i--;)if((t=Ve[i]+n)in e)return t;return r}function ze(e,t){for(var n,r,i,o=[],s=0,a=e.length;s<a;s++)(r=e[s]).style&&(o[s]=d._data(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&q(r)&&(o[s]=d._data(r,"olddisplay",Re(r.nodeName)))):o[s]||(i=q(r),(n&&"none"!==n||!i)&&d._data(r,"olddisplay",i?n:d.css(r,"display"))));for(s=0;s<a;s++)(r=e[s]).style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}function $e(e,t,n){var r=Ge.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function Qe(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;o<4;o+=2)"margin"===n&&(s+=d.css(e,n+H[o],!0,i)),r?("content"===n&&(s-=d.css(e,"padding"+H[o],!0,i)),"margin"!==n&&(s-=d.css(e,"border"+H[o]+"Width",!0,i))):(s+=d.css(e,"padding"+H[o],!0,i),"padding"!==n&&(s+=d.css(e,"border"+H[o]+"Width",!0,i)));return s}function Xe(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=_e(e),s=p.boxSizing()&&"border-box"===d.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(((i=Oe(e,t,o))<0||null==i)&&(i=e.style[t]),ke.test(i))return i;r=s&&(p.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+Qe(e,t,n||(s?"border":"content"),r,o)+"px"}function Ye(e,t,n,r,i){return new Ye.prototype.init(e,t,n,r,i)}d.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Oe(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:p.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=d.camelCase(t),l=e.style;if(t=d.cssProps[a]||(d.cssProps[a]=We(l,a)),s=d.cssHooks[t]||d.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:l[t];if("string"==(o=typeof n)&&(i=Be.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(d.css(e,t)),o="number"),null!=n&&n==n&&("number"!==o||d.cssNumber[a]||(n+="px"),p.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!s||!("set"in s)||void 0!==(n=s.set(e,n,r))))try{l[t]="",l[t]=n}catch(e){}}},css:function(e,t,n,r){var i,o,s,a=d.camelCase(t);return t=d.cssProps[a]||(d.cssProps[a]=We(e.style,a)),(s=d.cssHooks[t]||d.cssHooks[a])&&"get"in s&&(o=s.get(e,!0,n)),void 0===o&&(o=Oe(e,t,r)),"normal"===o&&t in qe&&(o=qe[t]),""===n||n?(i=parseFloat(o),!0===n||d.isNumeric(i)?i||0:o):o}}),d.each(["height","width"],(function(e,t){d.cssHooks[t]={get:function(e,n,r){if(n)return 0===e.offsetWidth&&Ue.test(d.css(e,"display"))?d.swap(e,He,(function(){return Xe(e,t,r)})):Xe(e,t,r)},set:function(e,n,r){var i=r&&_e(e);return $e(0,n,r?Qe(e,t,r,p.boxSizing()&&"border-box"===d.css(e,"boxSizing",!1,i),i):0)}}})),p.opacity||(d.cssHooks.opacity={get:function(e,t){return je.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=d.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===d.trim(o.replace(Fe,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=Fe.test(o)?o.replace(Fe,i):o+" "+i)}}),d.cssHooks.marginRight=Me(p.reliableMarginRight,(function(e,t){if(t)return d.swap(e,{display:"inline-block"},Oe,[e,"marginRight"])})),d.each({margin:"",padding:"",border:"Width"},(function(e,t){d.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+H[r]+t]=o[r]||o[r-2]||o[0];return i}},De.test(e)||(d.cssHooks[e+t].set=$e)})),d.fn.extend({css:function(e,t){return V(this,(function(e,t,n){var r,i,o={},s=0;if(d.isArray(t)){for(r=_e(e),i=t.length;s<i;s++)o[t[s]]=d.css(e,t[s],!1,r);return o}return void 0!==n?d.style(e,t,n):d.css(e,t)}),e,t,arguments.length>1)},show:function(){return ze(this,!0)},hide:function(){return ze(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){q(this)?d(this).show():d(this).hide()}))}}),d.Tween=Ye,Ye.prototype={constructor:Ye,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(d.cssNumber[n]?"":"px")},cur:function(){var e=Ye.propHooks[this.prop];return e&&e.get?e.get(this):Ye.propHooks._default.get(this)},run:function(e){var t,n=Ye.propHooks[this.prop];return this.options.duration?this.pos=t=d.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ye.propHooks._default.set(this),this}},Ye.prototype.init.prototype=Ye.prototype,Ye.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=d.css(e.elem,e.prop,""))&&"auto"!==t?t:0:e.elem[e.prop]},set:function(e){d.fx.step[e.prop]?d.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[d.cssProps[e.prop]]||d.cssHooks[e.prop])?d.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Ye.propHooks.scrollTop=Ye.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},d.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},d.fx=Ye.prototype.init,d.fx.step={};var Ke,Je,Ze=/^(?:toggle|show|hide)$/,et=new RegExp("^(?:([+-])=|)("+B+")([a-z%]*)$","i"),tt=/queueHooks$/,nt=[function(e,t,n){var r,i,o,s,a,l,u,c,f=this,h={},g=e.style,m=e.nodeType&&q(e),v=d._data(e,"fxshow");for(r in n.queue||(null==(a=d._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,f.always((function(){f.always((function(){a.unqueued--,d.queue(e,"fx").length||a.empty.fire()}))}))),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[g.overflow,g.overflowX,g.overflowY],u=d.css(e,"display"),c=Re(e.nodeName),"none"===u&&(u=c),"inline"===u&&"none"===d.css(e,"float")&&(p.inlineBlockNeedsLayout&&"inline"!==c?g.zoom=1:g.display="inline-block")),n.overflow&&(g.overflow="hidden",p.shrinkWrapBlocks()||f.always((function(){g.overflow=n.overflow[0],g.overflowX=n.overflow[1],g.overflowY=n.overflow[2]}))),t)if(i=t[r],Ze.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;m=!0}h[r]=v&&v[r]||d.style(e,r)}if(!d.isEmptyObject(h))for(r in v?"hidden"in v&&(m=v.hidden):v=d._data(e,"fxshow",{}),o&&(v.hidden=!m),m?d(e).show():f.done((function(){d(e).hide()})),f.done((function(){var t;for(t in d._removeData(e,"fxshow"),h)d.style(e,t,h[t])})),h)s=st(m?v[r]:0,r,f),r in v||(v[r]=s.start,m&&(s.end=s.start,s.start="width"===r||"height"===r?1:0))}],rt={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=et.exec(t),o=i&&i[3]||(d.cssNumber[e]?"":"px"),s=(d.cssNumber[e]||"px"!==o&&+r)&&et.exec(d.css(n.elem,e)),a=1,l=20;if(s&&s[3]!==o){o=o||s[3],i=i||[],s=+r||1;do{s/=a=a||".5",d.style(n.elem,e,s+o)}while(a!==(a=n.cur()/r)&&1!==a&&--l)}return i&&(s=n.start=+s||+r||0,n.unit=o,n.end=i[1]?s+(i[1]+1)*i[2]:+i[2]),n}]};function it(){return setTimeout((function(){Ke=void 0})),Ke=d.now()}function ot(e,t){var n,r={height:e},i=0;for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=H[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function st(e,t,n){for(var r,i=(rt[t]||[]).concat(rt["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,t,e))return r}function at(e,t,n){var r,i,o=0,s=nt.length,a=d.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var t=Ke||it(),n=Math.max(0,u.startTime+u.duration-t),r=1-(n/u.duration||0),o=0,s=u.tweens.length;o<s;o++)u.tweens[o].run(r);return a.notifyWith(e,[u,r,n]),r<1&&s?n:(a.resolveWith(e,[u]),!1)},u=a.promise({elem:e,props:d.extend({},t),opts:d.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Ke||it(),duration:n.duration,tweens:[],createTween:function(t,n){var r=d.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)u.tweens[n].run(1);return t?a.resolveWith(e,[u,t]):a.rejectWith(e,[u,t]),this}}),c=u.props;for(function(e,t){var n,r,i,o,s;for(n in e)if(i=t[r=d.camelCase(n)],o=e[n],d.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(s=d.cssHooks[r])&&"expand"in s)for(n in o=s.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,u.opts.specialEasing);o<s;o++)if(r=nt[o].call(u,e,c,u.opts))return r;return d.map(c,st,u),d.isFunction(u.opts.start)&&u.opts.start.call(e,u),d.fx.timer(d.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}d.Animation=d.extend(at,{tweener:function(e,t){d.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;r<i;r++)n=e[r],rt[n]=rt[n]||[],rt[n].unshift(t)},prefilter:function(e,t){t?nt.unshift(e):nt.push(e)}}),d.speed=function(e,t,n){var r=e&&"object"==typeof e?d.extend({},e):{complete:n||!n&&t||d.isFunction(e)&&e,duration:e,easing:n&&t||t&&!d.isFunction(t)&&t};return r.duration=d.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in d.fx.speeds?d.fx.speeds[r.duration]:d.fx.speeds._default,null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){d.isFunction(r.old)&&r.old.call(this),r.queue&&d.dequeue(this,r.queue)},r},d.fn.extend({fadeTo:function(e,t,n,r){return this.filter(q).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=d.isEmptyObject(e),o=d.speed(t,n,r),s=function(){var t=at(this,d.extend({},e),o);(i||d._data(this,"finish"))&&t.stop(!0)};return s.finish=s,i||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=d.timers,s=d._data(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&tt.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||d.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=d._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=d.timers,s=r?r.length:0;for(n.finish=!0,d.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),d.each(["toggle","show","hide"],(function(e,t){var n=d.fn[t];d.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ot(t,!0),e,r,i)}})),d.each({slideDown:ot("show"),slideUp:ot("hide"),slideToggle:ot("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){d.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),d.timers=[],d.fx.tick=function(){var e,t=d.timers,n=0;for(Ke=d.now();n<t.length;n++)(e=t[n])()||t[n]!==e||t.splice(n--,1);t.length||d.fx.stop(),Ke=void 0},d.fx.timer=function(e){d.timers.push(e),e()?d.fx.start():d.timers.pop()},d.fx.interval=13,d.fx.start=function(){Je||(Je=setInterval(d.fx.tick,d.fx.interval))},d.fx.stop=function(){clearInterval(Je),Je=null},d.fx.speeds={slow:600,fast:200,_default:400},d.fn.delay=function(e,t){return e=d.fx&&d.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}}))},function(){var e,t,n,r,i=S.createElement("div");i.setAttribute("className","t"),i.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=i.getElementsByTagName("a")[0],r=(n=S.createElement("select")).appendChild(S.createElement("option")),t=i.getElementsByTagName("input")[0],e.style.cssText="top:1px",p.getSetAttribute="t"!==i.className,p.style=/top/.test(e.getAttribute("style")),p.hrefNormalized="/a"===e.getAttribute("href"),p.checkOn=!!t.value,p.optSelected=r.selected,p.enctype=!!S.createElement("form").enctype,n.disabled=!0,p.optDisabled=!r.disabled,(t=S.createElement("input")).setAttribute("value",""),p.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),p.radioValue="t"===t.value,e=t=n=r=i=null}();var lt=/\r/g;d.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=d.isFunction(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,d(this).val()):e)?i="":"number"==typeof i?i+="":d.isArray(i)&&(i=d.map(i,(function(e){return null==e?"":e+""}))),(t=d.valHooks[this.type]||d.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=d.valHooks[i.type]||d.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(lt,""):null==n?"":n:void 0}}),d.extend({valHooks:{option:{get:function(e){var t=d.find.attr(e,"value");return null!=t?t:d.text(e)}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,s=o?null:[],a=o?i+1:r.length,l=i<0?a:o?i:0;l<a;l++)if(((n=r[l]).selected||l===i)&&(p.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!d.nodeName(n.parentNode,"optgroup"))){if(t=d(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=d.makeArray(t),s=i.length;s--;)if(r=i[s],d.inArray(d.valHooks.option.get(r),o)>=0)try{r.selected=n=!0}catch(e){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),d.each(["radio","checkbox"],(function(){d.valHooks[this]={set:function(e,t){if(d.isArray(t))return e.checked=d.inArray(d(e).val(),t)>=0}},p.checkOn||(d.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var ut,ct,pt=d.expr.attrHandle,dt=/^(?:checked|selected)$/i,ft=p.getSetAttribute,ht=p.input;d.fn.extend({attr:function(e,t){return V(this,d.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){d.removeAttr(this,e)}))}}),d.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?d.prop(e,t,n):(1===o&&d.isXMLDoc(e)||(t=t.toLowerCase(),r=d.attrHooks[t]||(d.expr.match.bool.test(t)?ct:ut)),void 0===n?r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=d.find.attr(e,t))?void 0:i:null!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):void d.removeAttr(e,t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(_);if(o&&1===e.nodeType)for(;n=o[i++];)r=d.propFix[n]||n,d.expr.match.bool.test(n)?ht&&ft||!dt.test(n)?e[r]=!1:e[d.camelCase("default-"+n)]=e[r]=!1:d.attr(e,n,""),e.removeAttribute(ft?n:r)},attrHooks:{type:{set:function(e,t){if(!p.radioValue&&"radio"===t&&d.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),ct={set:function(e,t,n){return!1===t?d.removeAttr(e,n):ht&&ft||!dt.test(n)?e.setAttribute(!ft&&d.propFix[n]||n,n):e[d.camelCase("default-"+n)]=e[n]=!0,n}},d.each(d.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=pt[t]||d.find.attr;pt[t]=ht&&ft||!dt.test(t)?function(e,t,r){var i,o;return r||(o=pt[t],pt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,pt[t]=o),i}:function(e,t,n){if(!n)return e[d.camelCase("default-"+t)]?t.toLowerCase():null}})),ht&&ft||(d.attrHooks.value={set:function(e,t,n){if(!d.nodeName(e,"input"))return ut&&ut.set(e,t,n);e.defaultValue=t}}),ft||(ut={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},pt.id=pt.name=pt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},d.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:ut.set},d.attrHooks.contenteditable={set:function(e,t,n){ut.set(e,""!==t&&t,n)}},d.each(["width","height"],(function(e,t){d.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}}))),p.style||(d.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var gt=/^(?:input|select|textarea|button|object)$/i,mt=/^(?:a|area)$/i;d.fn.extend({prop:function(e,t){return V(this,d.prop,e,t,arguments.length>1)},removeProp:function(e){return e=d.propFix[e]||e,this.each((function(){try{this[e]=void 0,delete this[e]}catch(e){}}))}}),d.extend({propFix:{for:"htmlFor",class:"className"},prop:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return(1!==o||!d.isXMLDoc(e))&&(t=d.propFix[t]||t,i=d.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=d.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||mt.test(e.nodeName)&&e.href?0:-1}}}}),p.hrefNormalized||d.each(["href","src"],(function(e,t){d.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),p.optSelected||(d.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),d.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){d.propFix[this.toLowerCase()]=this})),p.enctype||(d.propFix.enctype="encoding");var vt=/[\t\r\n\f]/g;d.fn.extend({addClass:function(e){var t,n,r,i,o,s,a=0,l=this.length,u="string"==typeof e&&e;if(d.isFunction(e))return this.each((function(t){d(this).addClass(e.call(this,t,this.className))}));if(u)for(t=(e||"").match(_)||[];a<l;a++)if(r=1===(n=this[a]).nodeType&&(n.className?(" "+n.className+" ").replace(vt," "):" ")){for(o=0;i=t[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");s=d.trim(r),n.className!==s&&(n.className=s)}return this},removeClass:function(e){var t,n,r,i,o,s,a=0,l=this.length,u=0===arguments.length||"string"==typeof e&&e;if(d.isFunction(e))return this.each((function(t){d(this).removeClass(e.call(this,t,this.className))}));if(u)for(t=(e||"").match(_)||[];a<l;a++)if(r=1===(n=this[a]).nodeType&&(n.className?(" "+n.className+" ").replace(vt," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");s=e?d.trim(r):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):d.isFunction(e)?this.each((function(n){d(this).toggleClass(e.call(this,n,this.className,t),t)})):this.each((function(){if("string"===n)for(var t,r=0,i=d(this),o=e.match(_)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else"undefined"!==n&&"boolean"!==n||(this.className&&d._data(this,"__className__",this.className),this.className=this.className||!1===e?"":d._data(this,"__className__")||"")}))},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;n<r;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(vt," ").indexOf(t)>=0)return!0;return!1}}),d.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),(function(e,t){d.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}})),d.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var yt=d.now(),xt=/\?/,Et=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;d.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=d.trim(t+"");return i&&!d.trim(i.replace(Et,(function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")})))?Function("return "+i)():d.error("Invalid JSON: "+t)},d.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{e.DOMParser?n=(new DOMParser).parseFromString(t,"text/xml"):((n=new ActiveXObject("Microsoft.XMLDOM")).async="false",n.loadXML(t))}catch(e){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||d.error("Invalid XML: "+t),n};var bt,Ct,Tt=/#.*$/,St=/([?&])_=[^&]*/,wt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nt=/^(?:GET|HEAD)$/,Lt=/^\/\//,It=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,At={},Rt={},_t="*/".concat("*");try{Ct=location.href}catch(e){(Ct=S.createElement("a")).href="",Ct=Ct.href}function Ot(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(_)||[];if(d.isFunction(n))for(;r=o[i++];)"+"===r.charAt(0)?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Dt(e,t,n,r){var i={},o=e===Rt;function s(a){var l;return i[a]=!0,d.each(e[a]||[],(function(e,a){var u=a(t,n,r);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),s(u),!1)})),l}return s(t.dataTypes[0])||!i["*"]&&s("*")}function kt(e,t){var n,r,i=d.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((i[r]?e:n||(n={}))[r]=t[r]);return n&&d.extend(!0,e,n),e}bt=It.exec(Ct.toLowerCase())||[],d.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":_t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?kt(kt(e,d.ajaxSettings),t):kt(d.ajaxSettings,e)},ajaxPrefilter:Ot(At),ajaxTransport:Ot(Rt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r,i,o,s,a,l,u,c=d.ajaxSetup({},t),p=c.context||c,f=c.context&&(p.nodeType||p.jquery)?d(p):d.event,h=d.Deferred(),g=d.Callbacks("once memory"),m=c.statusCode||{},v={},y={},x=0,E="canceled",b={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!u)for(u={};t=wt.exec(o);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return x||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(x<2)for(t in e)m[t]=[m[t],e[t]];else b.always(e[b.status]);return this},abort:function(e){var t=e||E;return l&&l.abort(t),C(0,t),this}};if(h.promise(b).complete=g.add,b.success=b.done,b.error=b.fail,c.url=((e||c.url||Ct)+"").replace(Tt,"").replace(Lt,bt[1]+"//"),c.type=t.method||t.type||c.method||c.type,c.dataTypes=d.trim(c.dataType||"*").toLowerCase().match(_)||[""],null==c.crossDomain&&(n=It.exec(c.url.toLowerCase()),c.crossDomain=!(!n||n[1]===bt[1]&&n[2]===bt[2]&&(n[3]||("http:"===n[1]?"80":"443"))===(bt[3]||("http:"===bt[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=d.param(c.data,c.traditional)),Dt(At,c,t,b),2===x)return b;for(r in(a=c.global)&&0==d.active++&&d.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Nt.test(c.type),i=c.url,c.hasContent||(c.data&&(i=c.url+=(xt.test(i)?"&":"?")+c.data,delete c.data),!1===c.cache&&(c.url=St.test(i)?i.replace(St,"$1_="+yt++):i+(xt.test(i)?"&":"?")+"_="+yt++)),c.ifModified&&(d.lastModified[i]&&b.setRequestHeader("If-Modified-Since",d.lastModified[i]),d.etag[i]&&b.setRequestHeader("If-None-Match",d.etag[i])),(c.data&&c.hasContent&&!1!==c.contentType||t.contentType)&&b.setRequestHeader("Content-Type",c.contentType),b.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+_t+"; q=0.01":""):c.accepts["*"]),c.headers)b.setRequestHeader(r,c.headers[r]);if(c.beforeSend&&(!1===c.beforeSend.call(p,b,c)||2===x))return b.abort();for(r in E="abort",{success:1,error:1,complete:1})b[r](c[r]);if(l=Dt(Rt,c,t,b)){b.readyState=1,a&&f.trigger("ajaxSend",[b,c]),c.async&&c.timeout>0&&(s=setTimeout((function(){b.abort("timeout")}),c.timeout));try{x=1,l.send(v,C)}catch(e){if(!(x<2))throw e;C(-1,e)}}else C(-1,"No Transport");function C(e,t,n,r){var u,v,y,E,C,T=t;2!==x&&(x=2,s&&clearTimeout(s),l=void 0,o=r||"",b.readyState=e>0?4:0,u=e>=200&&e<300||304===e,n&&(E=function(e,t,n){for(var r,i,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){l.unshift(s);break}if(l[0]in n)o=l[0];else{for(s in n){if(!l[0]||e.converters[s+" "+l[0]]){o=s;break}r||(r=s)}o=o||r}if(o)return o!==l[0]&&l.unshift(o),n[o]}(c,b,n)),E=function(e,t,n,r){var i,o,s,a,l,u={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)u[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=u[l+" "+o]||u["* "+o]))for(i in u)if((a=i.split(" "))[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[i]:!0!==u[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(c,E,b,u),u?(c.ifModified&&((C=b.getResponseHeader("Last-Modified"))&&(d.lastModified[i]=C),(C=b.getResponseHeader("etag"))&&(d.etag[i]=C)),204===e||"HEAD"===c.type?T="nocontent":304===e?T="notmodified":(T=E.state,v=E.data,u=!(y=E.error))):(y=T,!e&&T||(T="error",e<0&&(e=0))),b.status=e,b.statusText=(t||T)+"",u?h.resolveWith(p,[v,T,b]):h.rejectWith(p,[b,T,y]),b.statusCode(m),m=void 0,a&&f.trigger(u?"ajaxSuccess":"ajaxError",[b,c,u?v:y]),g.fireWith(p,[b,T]),a&&(f.trigger("ajaxComplete",[b,c]),--d.active||d.event.trigger("ajaxStop")))}return b},getJSON:function(e,t,n){return d.get(e,t,n,"json")},getScript:function(e,t){return d.get(e,void 0,t,"script")}}),d.each(["get","post"],(function(e,t){d[t]=function(e,n,r,i){return d.isFunction(n)&&(i=i||r,r=n,n=void 0),d.ajax({url:e,type:t,dataType:i,data:n,success:r})}})),d.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){d.fn[t]=function(e){return this.on(t,e)}})),d._evalUrl=function(e){return d.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},d.fn.extend({wrapAll:function(e){if(d.isFunction(e))return this.each((function(t){d(this).wrapAll(e.call(this,t))}));if(this[0]){var t=d(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e})).append(this)}return this},wrapInner:function(e){return d.isFunction(e)?this.each((function(t){d(this).wrapInner(e.call(this,t))})):this.each((function(){var t=d(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=d.isFunction(e);return this.each((function(n){d(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(){return this.parent().each((function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)})).end()}}),d.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!p.reliableHiddenOffsets()&&"none"===(e.style&&e.style.display||d.css(e,"display"))},d.expr.filters.visible=function(e){return!d.expr.filters.hidden(e)};var Pt=/%20/g,Mt=/\[\]$/,Ft=/\r?\n/g,jt=/^(?:submit|button|image|reset|file)$/i,Ut=/^(?:input|select|textarea|keygen)/i;function Gt(e,t,n,r){var i;if(d.isArray(t))d.each(t,(function(t,i){n||Mt.test(e)?r(e,i):Gt(e+"["+("object"==typeof i?t:"")+"]",i,n,r)}));else if(n||"object"!==d.type(t))r(e,t);else for(i in t)Gt(e+"["+i+"]",t[i],n,r)}d.param=function(e,t){var n,r=[],i=function(e,t){t=d.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=d.ajaxSettings&&d.ajaxSettings.traditional),d.isArray(e)||e.jquery&&!d.isPlainObject(e))d.each(e,(function(){i(this.name,this.value)}));else for(n in e)Gt(n,e[n],t,i);return r.join("&").replace(Pt,"+")},d.fn.extend({serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=d.prop(this,"elements");return e?d.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!d(this).is(":disabled")&&Ut.test(this.nodeName)&&!jt.test(e)&&(this.checked||!W.test(e))})).map((function(e,t){var n=d(this).val();return null==n?null:d.isArray(n)?d.map(n,(function(e){return{name:t.name,value:e.replace(Ft,"\r\n")}})):{name:t.name,value:n.replace(Ft,"\r\n")}})).get()}}),d.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Vt()||function(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}()}:Vt;var Bt=0,Ht={},qt=d.ajaxSettings.xhr();function Vt(){try{return new e.XMLHttpRequest}catch(e){}}e.ActiveXObject&&d(e).on("unload",(function(){for(var e in Ht)Ht[e](void 0,!0)})),p.cors=!!qt&&"withCredentials"in qt,(qt=p.ajax=!!qt)&&d.ajaxTransport((function(e){var t;if(!e.crossDomain||p.cors)return{send:function(n,r){var i,o=e.xhr(),s=++Bt;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];for(i in e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),n)void 0!==n[i]&&o.setRequestHeader(i,n[i]+"");o.send(e.hasContent&&e.data||null),t=function(n,i){var a,l,u;if(t&&(i||4===o.readyState))if(delete Ht[s],t=void 0,o.onreadystatechange=d.noop,i)4!==o.readyState&&o.abort();else{u={},a=o.status,"string"==typeof o.responseText&&(u.text=o.responseText);try{l=o.statusText}catch(e){l=""}a||!e.isLocal||e.crossDomain?1223===a&&(a=204):a=u.text?200:404}u&&r(a,l,u,o.getAllResponseHeaders())},e.async?4===o.readyState?setTimeout(t):o.onreadystatechange=Ht[s]=t:t()},abort:function(){t&&t(void 0,!0)}}})),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return d.globalEval(e),e}}}),d.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)})),d.ajaxTransport("script",(function(e){if(e.crossDomain){var t,n=S.head||d("head")[0]||S.documentElement;return{send:function(r,i){(t=S.createElement("script")).async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}}));var Wt=[],zt=/(=)\?(?=&|$)|\?\?/;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Wt.pop()||d.expando+"_"+yt++;return this[e]=!0,e}}),d.ajaxPrefilter("json jsonp",(function(t,n,r){var i,o,s,a=!1!==t.jsonp&&(zt.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&zt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=d.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(zt,"$1"+i):!1!==t.jsonp&&(t.url+=(xt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||d.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){s=arguments},r.always((function(){e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Wt.push(i)),s&&d.isFunction(o)&&o(s[0]),s=o=void 0})),"script"})),d.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||S;var r=E.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=d.buildFragment([e],t,i),i&&i.length&&d(i).remove(),d.merge([],r.childNodes))};var $t=d.fn.load;d.fn.load=function(e,t,n){if("string"!=typeof e&&$t)return $t.apply(this,arguments);var r,i,o,s=this,a=e.indexOf(" ");return a>=0&&(r=e.slice(a,e.length),e=e.slice(0,a)),d.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),s.length>0&&d.ajax({url:e,type:o,dataType:"html",data:t}).done((function(e){i=arguments,s.html(r?d("<div>").append(d.parseHTML(e)).find(r):e)})).complete(n&&function(e,t){s.each(n,i||[e.responseText,t,e])}),this},d.expr.filters.animated=function(e){return d.grep(d.timers,(function(t){return e===t.elem})).length};var Qt=e.document.documentElement;function Xt(e){return d.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}d.offset={setOffset:function(e,t,n){var r,i,o,s,a,l,u=d.css(e,"position"),c=d(e),p={};"static"===u&&(e.style.position="relative"),a=c.offset(),o=d.css(e,"top"),l=d.css(e,"left"),("absolute"===u||"fixed"===u)&&d.inArray("auto",[o,l])>-1?(s=(r=c.position()).top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(l)||0),d.isFunction(t)&&(t=t.call(e,n,a)),null!=t.top&&(p.top=t.top-a.top+s),null!=t.left&&(p.left=t.left-a.left+i),"using"in t?t.using.call(e,p):c.css(p)}},d.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){d.offset.setOffset(this,e,t)}));var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;return o?(t=o.documentElement,d.contains(t,i)?(void 0!==i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=Xt(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r):void 0},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===d.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),d.nodeName(e[0],"html")||(n=e.offset()),n.top+=d.css(e[0],"borderTopWidth",!0),n.left+=d.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-d.css(r,"marginTop",!0),left:t.left-n.left-d.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent||Qt;e&&!d.nodeName(e,"html")&&"static"===d.css(e,"position");)e=e.offsetParent;return e||Qt}))}}),d.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n=/Y/.test(t);d.fn[e]=function(r){return V(this,(function(e,r,i){var o=Xt(e);if(void 0===i)return o?t in o?o[t]:o.document.documentElement[r]:e[r];o?o.scrollTo(n?d(o).scrollLeft():i,n?i:d(o).scrollTop()):e[r]=i}),e,r,arguments.length,null)}})),d.each(["top","left"],(function(e,t){d.cssHooks[t]=Me(p.pixelPosition,(function(e,n){if(n)return n=Oe(e,t),ke.test(n)?d(e).position()[t]+"px":n}))})),d.each({Height:"height",Width:"width"},(function(e,t){d.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){d.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(!0===r||!0===i?"margin":"border");return V(this,(function(t,n,r){var i;return d.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?d.css(t,n,s):d.style(t,n,r,s)}),t,o?r:void 0,o,null)}}))})),d.fn.size=function(){return this.length},d.fn.andSelf=d.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],(function(){return d}));var Yt=e.jQuery,Kt=e.$;return d.noConflict=function(t){return e.$===d&&(e.$=Kt),t&&e.jQuery===d&&(e.jQuery=Yt),d},void 0===t&&(e.jQuery=e.$=d),d}))},{}],19:[function(e,t,n){(function(e){(function(){var r,i,o="Expected a function",s="__lodash_placeholder__",a="[object Arguments]",l="[object Array]",u="[object Boolean]",c="[object Date]",p="[object Error]",d="[object Function]",f="[object Number]",h="[object Object]",g="[object RegExp]",m="[object String]",v="[object Float32Array]",y="[object Float64Array]",x="[object Int8Array]",E="[object Int16Array]",b="[object Int32Array]",C="[object Uint8Array]",T="[object Uint16Array]",S="[object Uint32Array]",w=/\b__p \+= '';/g,N=/\b(__p \+=) '' \+/g,L=/(__e\(.*?\)|\b__t\)) \+\n'';/g,I=/&(?:amp|lt|gt|quot|#39|#96);/g,A=/[&<>"'`]/g,R=RegExp(I.source),_=RegExp(A.source),O=/<%-([\s\S]+?)%>/g,D=/<%([\s\S]+?)%>/g,k=/<%=([\s\S]+?)%>/g,P=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,M=/^\w*$/,F=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,j=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,U=RegExp(j.source),G=/[\u0300-\u036f\ufe20-\ufe23]/g,B=/\\(\\)?/g,H=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,q=/\w*$/,V=/^0[xX]/,W=/^\[object .+?Constructor\]$/,z=/^\d+$/,$=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Q=/($^)/,X=/['\n\r\u2028\u2029\\]/g,Y=(r="[A-Z\\xc0-\\xd6\\xd8-\\xde]",i="[a-z\\xdf-\\xf6\\xf8-\\xff]+",RegExp(r+"+(?="+r+i+")|"+r+"?"+i+"|"+r+"+|[0-9]+","g")),K=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],J=-1,Z={};Z[v]=Z[y]=Z[x]=Z[E]=Z[b]=Z[C]=Z["[object Uint8ClampedArray]"]=Z[T]=Z[S]=!0,Z[a]=Z[l]=Z["[object ArrayBuffer]"]=Z[u]=Z[c]=Z[p]=Z[d]=Z["[object Map]"]=Z[f]=Z[h]=Z[g]=Z["[object Set]"]=Z[m]=Z["[object WeakMap]"]=!1;var ee={};ee[a]=ee[l]=ee["[object ArrayBuffer]"]=ee[u]=ee[c]=ee[v]=ee[y]=ee[x]=ee[E]=ee[b]=ee[f]=ee[h]=ee[g]=ee[m]=ee[C]=ee["[object Uint8ClampedArray]"]=ee[T]=ee[S]=!0,ee[p]=ee[d]=ee["[object Map]"]=ee["[object Set]"]=ee["[object WeakMap]"]=!1;var te={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},ne={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},re={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},ie={function:!0,object:!0},oe={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=ie[typeof n]&&n&&!n.nodeType&&n,le=ie[typeof t]&&t&&!t.nodeType&&t,ue=ae&&le&&"object"==typeof e&&e&&e.Object&&e,ce=ie[typeof self]&&self&&self.Object&&self,pe=ie[typeof window]&&window&&window.Object&&window,de=le&&le.exports===ae&&ae,fe=ue||pe!==(this&&this.window)&&pe||ce||this;function he(e,t){if(e!==t){var n=null===e,r=void 0===e,i=e==e,o=null===t,s=void 0===t,a=t==t;if(e>t&&!o||!i||n&&!s&&a||r&&a)return 1;if(e<t&&!n||!a||o&&!r&&i||s&&i)return-1}return 0}function ge(e,t,n){for(var r=e.length,i=n?r:-1;n?i--:++i<r;)if(t(e[i],i,e))return i;return-1}function me(e,t,n){if(t!=t)return Ne(e,n);for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function ve(e){return"function"==typeof e||!1}function ye(e){return null==e?"":e+""}function xe(e,t){for(var n=-1,r=e.length;++n<r&&t.indexOf(e.charAt(n))>-1;);return n}function Ee(e,t){for(var n=e.length;n--&&t.indexOf(e.charAt(n))>-1;);return n}function be(e,t){return he(e.criteria,t.criteria)||e.index-t.index}function Ce(e){return te[e]}function Te(e){return ne[e]}function Se(e,t,n){return t?e=oe[e]:n&&(e=se[e]),"\\"+e}function we(e){return"\\"+se[e]}function Ne(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i<r;){var o=e[i];if(o!=o)return i}return-1}function Le(e){return!!e&&"object"==typeof e}function Ie(e){return e<=160&&e>=9&&e<=13||32==e||160==e||5760==e||6158==e||e>=8192&&(e<=8202||8232==e||8233==e||8239==e||8287==e||12288==e||65279==e)}function Ae(e,t){for(var n=-1,r=e.length,i=-1,o=[];++n<r;)e[n]===t&&(e[n]=s,o[++i]=n);return o}function Re(e){for(var t=-1,n=e.length;++t<n&&Ie(e.charCodeAt(t)););return t}function _e(e){for(var t=e.length;t--&&Ie(e.charCodeAt(t)););return t}function Oe(e){return re[e]}var De=function e(t){var n=(t=t?De.defaults(fe.Object(),t,De.pick(fe,K)):fe).Array,r=t.Date,i=t.Error,te=t.Function,ne=t.Math,re=t.Number,ie=t.Object,oe=t.RegExp,se=t.String,ae=t.TypeError,le=n.prototype,ue=ie.prototype,ce=se.prototype,pe=te.prototype.toString,de=ue.hasOwnProperty,Ie=0,ke=ue.toString,Pe=fe._,Me=oe("^"+pe.call(de).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=t.ArrayBuffer,je=t.clearTimeout,Ue=t.parseFloat,Ge=ne.pow,Be=ue.propertyIsEnumerable,He=Jn(t,"Set"),qe=t.setTimeout,Ve=le.splice,We=t.Uint8Array,ze=Jn(t,"WeakMap"),$e=ne.ceil,Qe=Jn(ie,"create"),Xe=ne.floor,Ye=Jn(n,"isArray"),Ke=t.isFinite,Je=Jn(ie,"keys"),Ze=ne.max,et=ne.min,tt=Jn(r,"now"),nt=t.parseInt,rt=ne.random,it=re.NEGATIVE_INFINITY,ot=re.POSITIVE_INFINITY,st=ze&&new ze,at={};function lt(e){if(Le(e)&&!Li(e)&&!(e instanceof pt)){if(e instanceof ct)return e;if(de.call(e,"__chain__")&&de.call(e,"__wrapped__"))return vr(e)}return new ct(e)}function ut(){}function ct(e,t,n){this.__wrapped__=e,this.__actions__=n||[],this.__chain__=!!t}function pt(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ot,this.__views__=[]}function dt(){this.__data__={}}function ft(e){var t=e?e.length:0;for(this.data={hash:Qe(null),set:new He};t--;)this.push(e[t])}function ht(e,t){var n=e.data;return("string"==typeof t||_i(t)?n.set.has(t):n.hash[t])?0:-1}function gt(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function mt(e,t){for(var n=-1,r=e.length;++n<r&&!1!==t(e[n],n,e););return e}function vt(e,t){for(var n=-1,r=e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function yt(e,t){for(var n=-1,r=e.length,i=-1,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[++i]=s)}return o}function xt(e,t){for(var r=-1,i=e.length,o=n(i);++r<i;)o[r]=t(e[r],r,e);return o}function Et(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function bt(e,t,n,r){var i=-1,o=e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Ct(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Tt(e,t,n,r){return void 0!==e&&de.call(r,n)?e:t}function St(e,t,n){for(var r=-1,i=Ji(t),o=i.length;++r<o;){var s=i[r],a=e[s],l=n(a,t[s],s,e,t);((l==l?l!==a:a==a)||void 0===a&&!(s in e))&&(e[s]=l)}return e}function wt(e,t){return null==t?e:Lt(t,Ji(t),e)}function Nt(e,t){for(var r=-1,i=null==e,o=!i&&er(e),s=o?e.length:0,a=t.length,l=n(a);++r<a;){var u=t[r];l[r]=o?tr(u,s)?e[u]:void 0:i?void 0:e[u]}return l}function Lt(e,t,n){n||(n={});for(var r=-1,i=t.length;++r<i;){var o=t[r];n[o]=e[o]}return n}function It(e,t,n){var r=typeof e;return"function"==r?void 0===t?e:fn(e,t,n):null==e?xo:"object"==r?Xt(e):void 0===t?wo(e):Yt(e,t)}function At(e,t,n,r,i,o,s){var l;if(n&&(l=i?n(e,r,i):n(e)),void 0!==l)return l;if(!_i(e))return e;var p=Li(e);if(p){if(l=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&de.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return gt(e,l)}else{var w=ke.call(e),N=w==d;if(w!=h&&w!=a&&(!N||i))return ee[w]?function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return hn(e);case u:case c:return new r(+e);case v:case y:case x:case E:case b:case C:case"[object Uint8ClampedArray]":case T:case S:var i=e.buffer;return new r(n?hn(i):i,e.byteOffset,e.length);case f:case m:return new r(e);case g:var o=new r(e.source,q.exec(e));o.lastIndex=e.lastIndex}return o}(e,w,t):i?e:{};if(l=function(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=ie),new t}(N?{}:e),!t)return wt(l,e)}o||(o=[]),s||(s=[]);for(var L=o.length;L--;)if(o[L]==e)return s[L];return o.push(e),s.push(l),(p?mt:Ht)(e,(function(r,i){l[i]=At(r,t,n,i,e,o,s)})),l}lt.support={},lt.templateSettings={escape:O,evaluate:D,interpolate:k,variable:"",imports:{_:lt}};var Rt=function(){function e(){}return function(t){if(_i(t)){e.prototype=t;var n=new e;e.prototype=void 0}return n||{}}}();function _t(e,t,n){if("function"!=typeof e)throw new ae(o);return qe((function(){e.apply(void 0,n)}),t)}function Ot(e,t){var n=e?e.length:0,r=[];if(!n)return r;var i=-1,o=Xn(),s=o==me,a=s&&t.length>=200?bn(t):null,l=t.length;a&&(o=ht,s=!1,t=a);e:for(;++i<n;){var u=e[i];if(s&&u==u){for(var c=l;c--;)if(t[c]===u)continue e;r.push(u)}else o(t,u,0)<0&&r.push(u)}return r}var Dt=xn(Ht),kt=xn(qt,!0);function Pt(e,t){var n=!0;return Dt(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function Mt(e,t){var n=[];return Dt(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function Ft(e,t,n,r){var i;return n(e,(function(e,n,o){if(t(e,n,o))return i=r?n:e,!1})),i}function jt(e,t,n,r){r||(r=[]);for(var i=-1,o=e.length;++i<o;){var s=e[i];Le(s)&&er(s)&&(n||Li(s)||Ni(s))?t?jt(s,t,n,r):Et(r,s):n||(r[r.length]=s)}return r}var Ut=En(),Gt=En(!0);function Bt(e,t){return Ut(e,t,Zi)}function Ht(e,t){return Ut(e,t,Ji)}function qt(e,t){return Gt(e,t,Ji)}function Vt(e,t){for(var n=-1,r=t.length,i=-1,o=[];++n<r;){var s=t[n];Ri(e[s])&&(o[++i]=s)}return o}function Wt(e,t,n){if(null!=e){void 0!==n&&n in gr(e)&&(t=[n]);for(var r=0,i=t.length;null!=e&&r<i;)e=e[t[r++]];return r&&r==i?e:void 0}}function zt(e,t,n,r,i,o){return e===t||(null==e||null==t||!_i(e)&&!Le(t)?e!=e&&t!=t:function(e,t,n,r,i,o,s){var d=Li(e),v=Li(t),y=l,x=l;d||((y=ke.call(e))==a?y=h:y!=h&&(d=Fi(e))),v||((x=ke.call(t))==a?x=h:x!=h&&(v=Fi(t)));var E=y==h,b=x==h,C=y==x;if(C&&!d&&!E)return function(e,t,n){switch(n){case u:case c:return+e==+t;case p:return e.name==t.name&&e.message==t.message;case f:return e!=+e?t!=+t:e==+t;case g:case m:return e==t+""}return!1}(e,t,y);if(!i){var T=E&&de.call(e,"__wrapped__"),S=b&&de.call(t,"__wrapped__");if(T||S)return n(T?e.value():e,S?t.value():t,r,i,o,s)}if(!C)return!1;o||(o=[]),s||(s=[]);for(var w=o.length;w--;)if(o[w]==e)return s[w]==t;o.push(e),s.push(t);var N=(d?Vn:Wn)(e,t,n,r,i,o,s);return o.pop(),s.pop(),N}(e,t,zt,n,r,i,o))}function $t(e,t,n){var r=t.length,i=r,o=!n;if(null==e)return!i;for(e=gr(e);r--;){var s=t[r];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++r<i;){var a=(s=t[r])[0],l=e[a],u=s[1];if(o&&s[2]){if(void 0===l&&!(a in e))return!1}else{var c=n?n(l,u,a):void 0;if(!(void 0===c?zt(u,l,n,!0):c))return!1}}return!0}function Qt(e,t){var r=-1,i=er(e)?n(e.length):[];return Dt(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Xt(e){var t=Kn(e);if(1==t.length&&t[0][2]){var n=t[0][0],r=t[0][1];return function(e){return null!=e&&e[n]===r&&(void 0!==r||n in gr(e))}}return function(e){return $t(e,t)}}function Yt(e,t){var n=Li(e),r=rr(e)&&sr(t),i=e+"";return e=mr(e),function(o){if(null==o)return!1;var s=i;if(o=gr(o),(n||!r)&&!(s in o)){if(null==(o=1==e.length?o:Wt(o,nn(e,0,-1))))return!1;s=Nr(e),o=gr(o)}return o[s]===t?void 0!==t||s in o:zt(t,o[s],void 0,!0)}}function Kt(e){return function(t){return null==t?void 0:t[e]}}function Jt(e,t){for(var n=e?t.length:0;n--;){var r=t[n];if(r!=i&&tr(r)){var i=r;Ve.call(e,r,1)}}return e}function Zt(e,t){return e+Xe(rt()*(t-e+1))}function en(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}var tn=st?function(e,t){return st.set(e,t),e}:xo;function nn(e,t,r){var i=-1,o=e.length;(t=null==t?0:+t||0)<0&&(t=-t>o?0:o+t),(r=void 0===r||r>o?o:+r||0)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function rn(e,t){var n;return Dt(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function on(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function sn(e,t,n){var r=zn(),i=-1;return t=xt(t,(function(e){return r(e)})),on(Qt(e,(function(e){return{criteria:xt(t,(function(t){return t(e)})),index:++i,value:e}})),(function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var l=he(i[r],o[r]);if(l){if(r>=a)return l;var u=n[r];return l*("asc"===u||!0===u?1:-1)}}return e.index-t.index}(e,t,n)}))}function an(e,t){var n=-1,r=Xn(),i=e.length,o=r==me,s=o&&i>=200,a=s?bn():null,l=[];a?(r=ht,o=!1):(s=!1,a=t?[]:l);e:for(;++n<i;){var u=e[n],c=t?t(u,n,e):u;if(o&&u==u){for(var p=a.length;p--;)if(a[p]===c)continue e;t&&a.push(c),l.push(u)}else r(a,c,0)<0&&((t||s)&&a.push(c),l.push(u))}return l}function ln(e,t){for(var r=-1,i=t.length,o=n(i);++r<i;)o[r]=e[t[r]];return o}function un(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?nn(e,r?0:o,r?o+1:i):nn(e,r?o+1:0,r?i:o)}function cn(e,t){var n=e;n instanceof pt&&(n=n.value());for(var r=-1,i=t.length;++r<i;){var o=t[r];n=o.func.apply(o.thisArg,Et([n],o.args))}return n}function pn(e,t,n){var r=0,i=e?e.length:r;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=e[o];(n?s<=t:s<t)&&null!==s?r=o+1:i=o}return i}return dn(e,t,xo,n)}function dn(e,t,n,r){t=n(t);for(var i=0,o=e?e.length:0,s=t!=t,a=null===t,l=void 0===t;i<o;){var u=Xe((i+o)/2),c=n(e[u]),p=void 0!==c,d=c==c;if(s)var f=d||r;else f=a?d&&p&&(r||null!=c):l?d&&(r||p):null!=c&&(r?c<=t:c<t);f?i=u+1:o=u}return et(o,4294967294)}function fn(e,t,n){if("function"!=typeof e)return xo;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)};case 5:return function(n,r,i,o,s){return e.call(t,n,r,i,o,s)}}return function(){return e.apply(t,arguments)}}function hn(e){var t=new Fe(e.byteLength);return new We(t).set(new We(e)),t}function gn(e,t,r){for(var i=r.length,o=-1,s=Ze(e.length-i,0),a=-1,l=t.length,u=n(l+s);++a<l;)u[a]=t[a];for(;++o<i;)u[r[o]]=e[o];for(;s--;)u[a++]=e[o++];return u}function mn(e,t,r){for(var i=-1,o=r.length,s=-1,a=Ze(e.length-o,0),l=-1,u=t.length,c=n(a+u);++s<a;)c[s]=e[s];for(var p=s;++l<u;)c[p+l]=t[l];for(;++i<o;)c[p+r[i]]=e[s++];return c}function vn(e,t){return function(n,r,i){var o=t?t():{};if(r=zn(r,i,3),Li(n))for(var s=-1,a=n.length;++s<a;){var l=n[s];e(o,l,r(l,s,n),n)}else Dt(n,(function(t,n,i){e(o,t,r(t,n,i),i)}));return o}}function yn(e){return Si((function(t,n){var r=-1,i=null==t?0:n.length,o=i>2?n[i-2]:void 0,s=i>2?n[2]:void 0,a=i>1?n[i-1]:void 0;for("function"==typeof o?(o=fn(o,a,5),i-=2):i-=(o="function"==typeof a?a:void 0)?1:0,s&&nr(n[0],n[1],s)&&(o=i<3?void 0:o,i=1);++r<i;){var l=n[r];l&&e(t,l,o)}return t}))}function xn(e,t){return function(n,r){var i=n?Yn(n):0;if(!or(i))return e(n,r);for(var o=t?i:-1,s=gr(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function En(e){return function(t,n,r){for(var i=gr(t),o=r(t),s=o.length,a=e?s:-1;e?a--:++a<s;){var l=o[a];if(!1===n(i[l],l,i))break}return t}}function bn(e){return Qe&&He?new ft(e):null}function Cn(e){return function(t){for(var n=-1,r=mo(ao(t)),i=r.length,o="";++n<i;)o=e(o,r[n],n);return o}}function Tn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Rt(e.prototype),r=e.apply(n,t);return _i(r)?r:n}}function Sn(e){return function t(n,r,i){i&&nr(n,r,i)&&(r=void 0);var o=qn(n,e,void 0,void 0,void 0,void 0,void 0,r);return o.placeholder=t.placeholder,o}}function wn(e,t){return Si((function(n){var r=n[0];return null==r?r:(n.push(t),e.apply(void 0,n))}))}function Nn(e,t){return function(n,r,i){if(i&&nr(n,r,i)&&(r=void 0),1==(r=zn(r,i,3)).length){var o=function(e,t,n,r){for(var i=-1,o=e.length,s=r,a=s;++i<o;){var l=e[i],u=+t(l);n(u,s)&&(s=u,a=l)}return a}(n=Li(n)?n:hr(n),r,e,t);if(!n.length||o!==t)return o}return function(e,t,n,r){var i=r,o=i;return Dt(e,(function(e,s,a){var l=+t(e,s,a);(n(l,i)||l===r&&l===o)&&(i=l,o=e)})),o}(n,r,e,t)}}function Ln(e,t){return function(n,r,i){if(r=zn(r,i,3),Li(n)){var o=ge(n,r,t);return o>-1?n[o]:void 0}return Ft(n,r,e)}}function In(e){return function(t,n,r){return t&&t.length?ge(t,n=zn(n,r,3),e):-1}}function An(e){return function(t,n,r){return Ft(t,n=zn(n,r,3),e,!0)}}function Rn(e){return function(){for(var t,r=arguments.length,i=e?r:-1,s=0,a=n(r);e?i--:++i<r;){var l=a[s++]=arguments[i];if("function"!=typeof l)throw new ae(o);!t&&ct.prototype.thru&&"wrapper"==Qn(l)&&(t=new ct([],!0))}for(i=t?-1:r;++i<r;){var u=Qn(l=a[i]),c="wrapper"==u?$n(l):void 0;t=c&&ir(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?t[Qn(c[0])].apply(t,c[3]):1==l.length&&ir(l)?t[u]():t.thru(l)}return function(){var e=arguments,n=e[0];if(t&&1==e.length&&Li(n)&&n.length>=200)return t.plant(n).value();for(var i=0,o=r?a[i].apply(this,e):n;++i<r;)o=a[i].call(this,o);return o}}}function _n(e,t){return function(n,r,i){return"function"==typeof r&&void 0===i&&Li(n)?e(n,r):t(n,fn(r,i,3))}}function On(e){return function(t,n,r){return"function"==typeof n&&void 0===r||(n=fn(n,r,3)),e(t,n,Zi)}}function Dn(e){return function(t,n,r){return"function"==typeof n&&void 0===r||(n=fn(n,r,3)),e(t,n)}}function kn(e){return function(t,n,r){var i={};return n=zn(n,r,3),Ht(t,(function(t,r,o){var s=n(t,r,o);t=e?t:s,i[r=e?s:r]=t})),i}}function Pn(e){return function(t,n,r){return t=ye(t),(e?t:"")+Un(t,n,r)+(e?"":t)}}function Mn(e){var t=Si((function(n,r){var i=Ae(r,t.placeholder);return qn(n,e,void 0,r,i)}));return t}function Fn(e,t){return function(n,r,i,o){var s=arguments.length<3;return"function"==typeof r&&void 0===o&&Li(n)?e(n,r,i,s):en(n,zn(r,o,4),i,s,t)}}function jn(e,t,r,i,o,s,a,l,u,c){var p=128&t,d=1&t,f=2&t,h=8&t,g=4&t,m=16&t,v=f?void 0:Tn(e);return function y(){for(var x=arguments.length,E=x,b=n(x);E--;)b[E]=arguments[E];if(i&&(b=gn(b,i,o)),s&&(b=mn(b,s,a)),h||m){var C=y.placeholder,T=Ae(b,C);if((x-=T.length)<c){var S=l?gt(l):void 0,w=Ze(c-x,0),N=h?T:void 0,L=h?void 0:T,I=h?b:void 0,A=h?void 0:b;t|=h?32:64,t&=~(h?64:32),g||(t&=-4);var R=[e,t,r,I,N,A,L,S,u,w],_=jn.apply(void 0,R);return ir(e)&&dr(_,R),_.placeholder=C,_}}var O=d?r:this,D=f?O[e]:e;return l&&(b=ur(b,l)),p&&u<b.length&&(b.length=u),this&&this!==fe&&this instanceof y&&(D=v||Tn(e)),D.apply(O,b)}}function Un(e,t,n){var r=e.length;if(r>=(t=+t)||!Ke(t))return"";var i=t-r;return po(n=null==n?" ":n+"",$e(i/n.length)).slice(0,i)}function Gn(e,t,r,i){var o=1&t,s=Tn(e);return function t(){for(var a=-1,l=arguments.length,u=-1,c=i.length,p=n(c+l);++u<c;)p[u]=i[u];for(;l--;)p[u++]=arguments[++a];var d=this&&this!==fe&&this instanceof t?s:e;return d.apply(o?r:this,p)}}function Bn(e){var t=ne[e];return function(e,n){return(n=void 0===n?0:+n||0)?(n=Ge(10,n),t(e*n)/n):t(e)}}function Hn(e){return function(t,n,r,i){var o=zn(r);return null==r&&o===It?pn(t,n,e):dn(t,n,o(r,i,1),e)}}function qn(e,t,n,r,i,a,l,u){var c=2&t;if(!c&&"function"!=typeof e)throw new ae(o);var p=r?r.length:0;if(p||(t&=-97,r=i=void 0),p-=i?i.length:0,64&t){var d=r,f=i;r=i=void 0}var h=c?void 0:$n(e),g=[e,t,n,r,i,d,f,a,l,u];if(h&&(function(e,t){var n=e[1],r=t[1],i=n|r,o=i<128,a=128==r&&8==n||128==r&&256==n&&e[7].length<=t[8]||384==r&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var l=t[3];if(l){var u=e[3];e[3]=u?gn(u,l,t[4]):gt(l),e[4]=u?Ae(e[3],s):gt(t[4])}(l=t[5])&&(u=e[5],e[5]=u?mn(u,l,t[6]):gt(l),e[6]=u?Ae(e[5],s):gt(t[6])),(l=t[7])&&(e[7]=gt(l)),128&r&&(e[8]=null==e[8]?t[8]:et(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(g,h),t=g[1],u=g[9]),g[9]=null==u?c?0:e.length:Ze(u-p,0)||0,1==t)var m=function(e,t){var n=Tn(e);return function r(){var i=this&&this!==fe&&this instanceof r?n:e;return i.apply(t,arguments)}}(g[0],g[2]);else m=32!=t&&33!=t||g[4].length?jn.apply(void 0,g):Gn.apply(void 0,g);return(h?tn:dr)(m,g)}function Vn(e,t,n,r,i,o,s){var a=-1,l=e.length,u=t.length;if(l!=u&&!(i&&u>l))return!1;for(;++a<l;){var c=e[a],p=t[a],d=r?r(i?p:c,i?c:p,a):void 0;if(void 0!==d){if(d)continue;return!1}if(i){if(!Ct(t,(function(e){return c===e||n(c,e,r,i,o,s)})))return!1}else if(c!==p&&!n(c,p,r,i,o,s))return!1}return!0}function Wn(e,t,n,r,i,o,s){var a=Ji(e),l=a.length;if(l!=Ji(t).length&&!i)return!1;for(var u=l;u--;){var c=a[u];if(!(i?c in t:de.call(t,c)))return!1}for(var p=i;++u<l;){var d=e[c=a[u]],f=t[c],h=r?r(i?f:d,i?d:f,c):void 0;if(!(void 0===h?n(d,f,r,i,o,s):h))return!1;p||(p="constructor"==c)}if(!p){var g=e.constructor,m=t.constructor;if(g!=m&&"constructor"in e&&"constructor"in t&&!("function"==typeof g&&g instanceof g&&"function"==typeof m&&m instanceof m))return!1}return!0}function zn(e,t,n){var r=lt.callback||yo;return r=r===yo?It:r,n?r(e,t,n):r}var $n=st?function(e){return st.get(e)}:So;function Qn(e){for(var t=e.name,n=at[t],r=n?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Xn(e,t,n){var r=lt.indexOf||Sr;return r=r===Sr?me:r,e?r(e,t,n):r}var Yn=Kt("length");function Kn(e){for(var t=ro(e),n=t.length;n--;)t[n][2]=sr(t[n][1]);return t}function Jn(e,t){var n=null==e?void 0:e[t];return Oi(n)?n:void 0}function Zn(e,t,n){null==e||rr(t,e)||(e=1==(t=mr(t)).length?e:Wt(e,nn(t,0,-1)),t=Nr(t));var r=null==e?e:e[t];return null==r?void 0:r.apply(e,n)}function er(e){return null!=e&&or(Yn(e))}function tr(e,t){return t=null==t?9007199254740991:t,(e="number"==typeof e||z.test(e)?+e:-1)>-1&&e%1==0&&e<t}function nr(e,t,n){if(!_i(n))return!1;var r=typeof t;if("number"==r?er(n)&&tr(t,n.length):"string"==r&&t in n){var i=n[t];return e==e?e===i:i!=i}return!1}function rr(e,t){var n=typeof e;return!!("string"==n&&M.test(e)||"number"==n)||!Li(e)&&(!P.test(e)||null!=t&&e in gr(t))}function ir(e){var t=Qn(e);if(!(t in pt.prototype))return!1;var n=lt[t];if(e===n)return!0;var r=$n(n);return!!r&&e===r[0]}function or(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function sr(e){return e==e&&!_i(e)}function ar(e,t){e=gr(e);for(var n=-1,r=t.length,i={};++n<r;){var o=t[n];o in e&&(i[o]=e[o])}return i}function lr(e,t){var n={};return Bt(e,(function(e,r,i){t(e,r,i)&&(n[r]=e)})),n}function ur(e,t){for(var n=e.length,r=et(t.length,n),i=gt(e);r--;){var o=t[r];e[r]=tr(o,n)?i[o]:void 0}return e}var cr,pr,dr=(cr=0,pr=0,function(e,t){var n=ai(),r=16-(n-pr);if(pr=n,r>0){if(++cr>=150)return e}else cr=0;return tn(e,t)});function fr(e){for(var t=Zi(e),n=t.length,r=n&&e.length,i=!!r&&or(r)&&(Li(e)||Ni(e)),o=-1,s=[];++o<n;){var a=t[o];(i&&tr(a,r)||de.call(e,a))&&s.push(a)}return s}function hr(e){return null==e?[]:er(e)?_i(e)?e:ie(e):oo(e)}function gr(e){return _i(e)?e:ie(e)}function mr(e){if(Li(e))return e;var t=[];return ye(e).replace(F,(function(e,n,r,i){t.push(r?i.replace(B,"$1"):n||e)})),t}function vr(e){return e instanceof pt?e.clone():new ct(e.__wrapped__,e.__chain__,gt(e.__actions__))}var yr=Si((function(e,t){return Le(e)&&er(e)?Ot(e,jt(t,!1,!0)):[]}));function xr(e,t,n){return e&&e.length?((n?nr(e,t,n):null==t)&&(t=1),nn(e,t<0?0:t)):[]}function Er(e,t,n){var r=e?e.length:0;return r?((n?nr(e,t,n):null==t)&&(t=1),nn(e,0,(t=r-(+t||0))<0?0:t)):[]}var br=In(),Cr=In(!0);function Tr(e){return e?e[0]:void 0}function Sr(e,t,n){var r=e?e.length:0;if(!r)return-1;if("number"==typeof n)n=n<0?Ze(r+n,0):n;else if(n){var i=pn(e,t);return i<r&&(t==t?t===e[i]:e[i]!=e[i])?i:-1}return me(e,t,n||0)}var wr=Si((function(e){for(var t=e.length,r=t,i=n(p),o=Xn(),s=o==me,a=[];r--;){var l=e[r]=er(l=e[r])?l:[];i[r]=s&&l.length>=120?bn(r&&l):null}var u=e[0],c=-1,p=u?u.length:0,d=i[0];e:for(;++c<p;)if(l=u[c],(d?ht(d,l):o(a,l,0))<0){for(r=t;--r;){var f=i[r];if((f?ht(f,l):o(e[r],l,0))<0)continue e}d&&d.push(l),a.push(l)}return a}));function Nr(e){var t=e?e.length:0;return t?e[t-1]:void 0}var Lr=Si((function(e,t){var n=Nt(e,t=jt(t));return Jt(e,t.sort(he)),n}));function Ir(e){return xr(e,1)}var Ar=Hn(),Rr=Hn(!0),_r=Si((function(e){return an(jt(e,!1,!0))}));function Or(e,t,n,r){if(!e||!e.length)return[];null!=t&&"boolean"!=typeof t&&(n=nr(e,t,r=n)?void 0:t,t=!1);var i=zn();return null==n&&i===It||(n=i(n,r,3)),t&&Xn()==me?function(e,t){for(var n,r=-1,i=e.length,o=-1,s=[];++r<i;){var a=e[r],l=t?t(a,r,e):a;r&&n===l||(n=l,s[++o]=a)}return s}(e,n):an(e,n)}function Dr(e){if(!e||!e.length)return[];var t=-1,r=0;e=yt(e,(function(e){if(er(e))return r=Ze(e.length,r),!0}));for(var i=n(r);++t<r;)i[t]=xt(e,Kt(t));return i}function kr(e,t,n){if(!e||!e.length)return[];var r=Dr(e);return null==t?r:(t=fn(t,n,4),xt(r,(function(e){return bt(e,t,void 0,!0)})))}var Pr=Si((function(e,t){return er(e)?Ot(e,t):[]})),Mr=Si(Dr);function Fr(e,t){var n=-1,r=e?e.length:0,i={};for(!r||t||Li(e[0])||(t=[]);++n<r;){var o=e[n];t?i[o]=t[n]:o&&(i[o[0]]=o[1])}return i}var jr=Si((function(e){var t=e.length,n=t>2?e[t-2]:void 0,r=t>1?e[t-1]:void 0;return t>2&&"function"==typeof n?t-=2:(n=t>1&&"function"==typeof r?(--t,r):void 0,r=void 0),e.length=t,kr(e,n,r)}));function Ur(e){var t=lt(e);return t.__chain__=!0,t}function Gr(e,t,n){return t.call(n,e)}var Br=Si((function(e){return e=jt(e),this.thru((function(t){return function(e,t){for(var r=-1,i=e.length,o=-1,s=t.length,a=n(i+s);++r<i;)a[r]=e[r];for(;++o<s;)a[r++]=t[o];return a}(Li(t)?t:[gr(t)],e)}))})),Hr=Si((function(e,t){return Nt(e,jt(t))})),qr=vn((function(e,t,n){de.call(e,n)?++e[n]:e[n]=1}));function Vr(e,t,n){var r=Li(e)?vt:Pt;return n&&nr(e,t,n)&&(t=void 0),"function"==typeof t&&void 0===n||(t=zn(t,n,3)),r(e,t)}function Wr(e,t,n){return(Li(e)?yt:Mt)(e,t=zn(t,n,3))}var zr=Ln(Dt),$r=Ln(kt,!0),Qr=_n(mt,Dt),Xr=_n((function(e,t){for(var n=e.length;n--&&!1!==t(e[n],n,e););return e}),kt),Yr=vn((function(e,t,n){de.call(e,n)?e[n].push(t):e[n]=[t]}));function Kr(e,t,n,r){var i=e?Yn(e):0;return or(i)||(i=(e=oo(e)).length),n="number"!=typeof n||r&&nr(t,n,r)?0:n<0?Ze(i+n,0):n||0,"string"==typeof e||!Li(e)&&Mi(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Xn(e,t,n)>-1}var Jr=vn((function(e,t,n){e[n]=t})),Zr=Si((function(e,t,r){var i=-1,o="function"==typeof t,s=rr(t),a=er(e)?n(e.length):[];return Dt(e,(function(e){var n=o?t:s&&null!=e?e[t]:void 0;a[++i]=n?n.apply(e,r):Zn(e,t,r)})),a}));function ei(e,t,n){return(Li(e)?xt:Qt)(e,t=zn(t,n,3))}var ti=vn((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),ni=Fn(bt,Dt),ri=Fn((function(e,t,n,r){var i=e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}),kt);function ii(e,t,n){if(n?nr(e,t,n):null==t)return(r=(e=hr(e)).length)>0?e[Zt(0,r-1)]:void 0;var r,i=-1,o=Ui(e),s=(r=o.length)-1;for(t=et(t<0?0:+t||0,r);++i<t;){var a=Zt(i,s),l=o[a];o[a]=o[i],o[i]=l}return o.length=t,o}function oi(e,t,n){var r=Li(e)?Ct:rn;return n&&nr(e,t,n)&&(t=void 0),"function"==typeof t&&void 0===n||(t=zn(t,n,3)),r(e,t)}var si=Si((function(e,t){if(null==e)return[];var n=t[2];return n&&nr(t[0],t[1],n)&&(t.length=1),sn(e,jt(t),[])})),ai=tt||function(){return(new r).getTime()};function li(e,t){var n;if("function"!=typeof t){if("function"!=typeof e)throw new ae(o);var r=e;e=t,t=r}return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ui=Si((function(e,t,n){var r=1;if(n.length){var i=Ae(n,ui.placeholder);r|=32}return qn(e,r,t,n,i)})),ci=Si((function(e,t){for(var n=-1,r=(t=t.length?jt(t):Ki(e)).length;++n<r;){var i=t[n];e[i]=qn(e[i],1,e)}return e})),pi=Si((function(e,t,n){var r=3;if(n.length){var i=Ae(n,pi.placeholder);r|=32}return qn(t,r,e,n,i)})),di=Sn(8),fi=Sn(16);function hi(e,t,n){var r,i,s,a,l,u,c,p=0,d=!1,f=!0;if("function"!=typeof e)throw new ae(o);if(t=t<0?0:+t||0,!0===n){var h=!0;f=!1}else _i(n)&&(h=!!n.leading,d="maxWait"in n&&Ze(+n.maxWait||0,t),f="trailing"in n?!!n.trailing:f);function g(t,n){n&&je(n),i=u=c=void 0,t&&(p=ai(),s=e.apply(l,r),u||i||(r=l=void 0))}function m(){var e=t-(ai()-a);e<=0||e>t?g(c,i):u=qe(m,e)}function v(){g(f,u)}function y(){if(r=arguments,a=ai(),l=this,c=f&&(u||!h),!1===d)var n=h&&!u;else{i||h||(p=a);var o=d-(a-p),g=o<=0||o>d;g?(i&&(i=je(i)),p=a,s=e.apply(l,r)):i||(i=qe(v,o))}return g&&u?u=je(u):u||t===d||(u=qe(m,t)),n&&(g=!0,s=e.apply(l,r)),!g||u||i||(r=l=void 0),s}return y.cancel=function(){u&&je(u),i&&je(i),p=0,i=u=c=void 0},y}var gi=Si((function(e,t){return _t(e,1,t)})),mi=Si((function(e,t,n){return _t(e,t,n)})),vi=Rn(),yi=Rn(!0);function xi(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new ae(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s),s};return n.cache=new xi.Cache,n}var Ei=Si((function(e,t){if(t=jt(t),"function"!=typeof e||!vt(t,ve))throw new ae(o);var n=t.length;return Si((function(r){for(var i=et(r.length,n);i--;)r[i]=t[i](r[i]);return e.apply(this,r)}))})),bi=Mn(32),Ci=Mn(64),Ti=Si((function(e,t){return qn(e,256,void 0,void 0,void 0,jt(t))}));function Si(e,t){if("function"!=typeof e)throw new ae(o);return t=Ze(void 0===t?e.length-1:+t||0,0),function(){for(var r=arguments,i=-1,o=Ze(r.length-t,0),s=n(o);++i<o;)s[i]=r[t+i];switch(t){case 0:return e.call(this,s);case 1:return e.call(this,r[0],s);case 2:return e.call(this,r[0],r[1],s)}var a=n(t+1);for(i=-1;++i<t;)a[i]=r[i];return a[t]=s,e.apply(this,a)}}function wi(e,t){return e>t}function Ni(e){return Le(e)&&er(e)&&de.call(e,"callee")&&!Be.call(e,"callee")}var Li=Ye||function(e){return Le(e)&&or(e.length)&&ke.call(e)==l};function Ii(e,t,n,r){var i=(n="function"==typeof n?fn(n,r,3):void 0)?n(e,t):void 0;return void 0===i?zt(e,t,n):!!i}function Ai(e){return Le(e)&&"string"==typeof e.message&&ke.call(e)==p}function Ri(e){return _i(e)&&ke.call(e)==d}function _i(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Oi(e){return null!=e&&(Ri(e)?Me.test(pe.call(e)):Le(e)&&W.test(e))}function Di(e){return"number"==typeof e||Le(e)&&ke.call(e)==f}function ki(e){var t,n;return!(!Le(e)||ke.call(e)!=h||Ni(e)||!(de.call(e,"constructor")||"function"!=typeof(t=e.constructor)||t instanceof t))&&(Bt(e,(function(e,t){n=t})),void 0===n||de.call(e,n))}function Pi(e){return _i(e)&&ke.call(e)==g}function Mi(e){return"string"==typeof e||Le(e)&&ke.call(e)==m}function Fi(e){return Le(e)&&or(e.length)&&!!Z[ke.call(e)]}function ji(e,t){return e<t}function Ui(e){var t=e?Yn(e):0;return or(t)?t?gt(e):[]:oo(e)}function Gi(e){return Lt(e,Zi(e))}var Bi=yn((function e(t,n,r,i,o){if(!_i(t))return t;var s=er(n)&&(Li(n)||Fi(n)),a=s?void 0:Ji(n);return mt(a||n,(function(l,u){if(a&&(l=n[u=l]),Le(l))i||(i=[]),o||(o=[]),function(e,t,n,r,i,o,s){for(var a=o.length,l=t[n];a--;)if(o[a]==l)return void(e[n]=s[a]);var u=e[n],c=i?i(u,l,n,e,t):void 0,p=void 0===c;p&&(c=l,er(l)&&(Li(l)||Fi(l))?c=Li(u)?u:er(u)?gt(u):[]:ki(l)||Ni(l)?c=Ni(u)?Gi(u):ki(u)?u:{}:p=!1),o.push(l),s.push(c),p?e[n]=r(c,l,i,o,s):(c==c?c!==u:u==u)&&(e[n]=c)}(t,n,u,e,r,i,o);else{var c=t[u],p=r?r(c,l,u,t,n):void 0,d=void 0===p;d&&(p=l),void 0===p&&(!s||u in t)||!d&&(p==p?p===c:c!=c)||(t[u]=p)}})),t})),Hi=yn((function(e,t,n){return n?St(e,t,n):wt(e,t)})),qi=wn(Hi,(function(e,t){return void 0===e?t:e})),Vi=wn(Bi,(function e(t,n){return void 0===t?n:Bi(t,n,e)})),Wi=An(Ht),zi=An(qt),$i=On(Ut),Qi=On(Gt),Xi=Dn(Ht),Yi=Dn(qt);function Ki(e){return Vt(e,Zi(e))}var Ji=Je?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&er(e)?fr(e):_i(e)?Je(e):[]}:fr;function Zi(e){if(null==e)return[];_i(e)||(e=ie(e));var t=e.length;t=t&&or(t)&&(Li(e)||Ni(e))&&t||0;for(var r=e.constructor,i=-1,o="function"==typeof r&&r.prototype===e,s=n(t),a=t>0;++i<t;)s[i]=i+"";for(var l in e)a&&tr(l,t)||"constructor"==l&&(o||!de.call(e,l))||s.push(l);return s}var eo=kn(!0),to=kn(),no=Si((function(e,t){if(null==e)return{};if("function"!=typeof t[0])return t=xt(jt(t),se),ar(e,Ot(Zi(e),t));var n=fn(t[0],t[1],3);return lr(e,(function(e,t,r){return!n(e,t,r)}))}));function ro(e){e=gr(e);for(var t=-1,r=Ji(e),i=r.length,o=n(i);++t<i;){var s=r[t];o[t]=[s,e[s]]}return o}var io=Si((function(e,t){return null==e?{}:"function"==typeof t[0]?lr(e,fn(t[0],t[1],3)):ar(e,jt(t))}));function oo(e){return ln(e,Ji(e))}var so=Cn((function(e,t,n){return t=t.toLowerCase(),e+(n?t.charAt(0).toUpperCase()+t.slice(1):t)}));function ao(e){return(e=ye(e))&&e.replace($,Ce).replace(G,"")}var lo=Cn((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),uo=Pn(),co=Pn(!0);function po(e,t){var n="";if(e=ye(e),(t=+t)<1||!e||!Ke(t))return n;do{t%2&&(n+=e),t=Xe(t/2),e+=e}while(t);return n}var fo=Cn((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),ho=Cn((function(e,t,n){return e+(n?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}));function go(e,t,n){var r=e;return(e=ye(e))?(n?nr(r,t,n):null==t)?e.slice(Re(e),_e(e)+1):(t+="",e.slice(xe(e,t),Ee(e,t)+1)):e}function mo(e,t,n){return n&&nr(e,t,n)&&(t=void 0),(e=ye(e)).match(t||Y)||[]}var vo=Si((function(e,t){try{return e.apply(void 0,t)}catch(e){return Ai(e)?e:new i(e)}}));function yo(e,t,n){return n&&nr(e,t,n)&&(t=void 0),Le(e)?Eo(e):It(e,t)}function xo(e){return e}function Eo(e){return Xt(At(e,!0))}var bo=Si((function(e,t){return function(n){return Zn(n,e,t)}})),Co=Si((function(e,t){return function(n){return Zn(e,n,t)}}));function To(e,t,n){if(null==n){var r=_i(t),i=r?Ji(t):void 0,o=i&&i.length?Vt(t,i):void 0;(o?o.length:r)||(o=!1,n=t,t=e,e=this)}o||(o=Vt(t,Ji(t)));var s=!0,a=-1,l=Ri(e),u=o.length;!1===n?s=!1:_i(n)&&"chain"in n&&(s=n.chain);for(;++a<u;){var c=o[a],p=t[c];e[c]=p,l&&(e.prototype[c]=function(t){return function(){var n=this.__chain__;if(s||n){var r=e(this.__wrapped__),i=r.__actions__=gt(this.__actions__);return i.push({func:t,args:arguments,thisArg:e}),r.__chain__=n,r}return t.apply(e,Et([this.value()],arguments))}}(p))}return e}function So(){}function wo(e){return rr(e)?Kt(e):function(e){var t=e+"";return e=mr(e),function(n){return Wt(n,e,t)}}(e)}var No,Lo=Bn("ceil"),Io=Bn("floor"),Ao=Nn(wi,it),Ro=Nn(ji,ot),_o=Bn("round");return lt.prototype=ut.prototype,ct.prototype=Rt(ut.prototype),ct.prototype.constructor=ct,pt.prototype=Rt(ut.prototype),pt.prototype.constructor=pt,dt.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},dt.prototype.get=function(e){return"__proto__"==e?void 0:this.__data__[e]},dt.prototype.has=function(e){return"__proto__"!=e&&de.call(this.__data__,e)},dt.prototype.set=function(e,t){return"__proto__"!=e&&(this.__data__[e]=t),this},ft.prototype.push=function(e){var t=this.data;"string"==typeof e||_i(e)?t.set.add(e):t.hash[e]=!0},xi.Cache=dt,lt.after=function(e,t){if("function"!=typeof t){if("function"!=typeof e)throw new ae(o);var n=e;e=t,t=n}return e=Ke(e=+e)?e:0,function(){if(--e<1)return t.apply(this,arguments)}},lt.ary=function(e,t,n){return n&&nr(e,t,n)&&(t=void 0),qn(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:Ze(+t||0,0))},lt.assign=Hi,lt.at=Hr,lt.before=li,lt.bind=ui,lt.bindAll=ci,lt.bindKey=pi,lt.callback=yo,lt.chain=Ur,lt.chunk=function(e,t,r){t=(r?nr(e,t,r):null==t)?1:Ze(Xe(t)||1,1);for(var i=0,o=e?e.length:0,s=-1,a=n($e(o/t));i<o;)a[++s]=nn(e,i,i+=t);return a},lt.compact=function(e){for(var t=-1,n=e?e.length:0,r=-1,i=[];++t<n;){var o=e[t];o&&(i[++r]=o)}return i},lt.constant=function(e){return function(){return e}},lt.countBy=qr,lt.create=function(e,t,n){var r=Rt(e);return n&&nr(e,t,n)&&(t=void 0),t?wt(r,t):r},lt.curry=di,lt.curryRight=fi,lt.debounce=hi,lt.defaults=qi,lt.defaultsDeep=Vi,lt.defer=gi,lt.delay=mi,lt.difference=yr,lt.drop=xr,lt.dropRight=Er,lt.dropRightWhile=function(e,t,n){return e&&e.length?un(e,zn(t,n,3),!0,!0):[]},lt.dropWhile=function(e,t,n){return e&&e.length?un(e,zn(t,n,3),!0):[]},lt.fill=function(e,t,n,r){var i=e?e.length:0;return i?(n&&"number"!=typeof n&&nr(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=null==n?0:+n||0)<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:+r||0)<0&&(r+=i),i=n>r?0:r>>>0,n>>>=0;n<i;)e[n++]=t;return e}(e,t,n,r)):[]},lt.filter=Wr,lt.flatten=function(e,t,n){var r=e?e.length:0;return n&&nr(e,t,n)&&(t=!1),r?jt(e,t):[]},lt.flattenDeep=function(e){return e&&e.length?jt(e,!0):[]},lt.flow=vi,lt.flowRight=yi,lt.forEach=Qr,lt.forEachRight=Xr,lt.forIn=$i,lt.forInRight=Qi,lt.forOwn=Xi,lt.forOwnRight=Yi,lt.functions=Ki,lt.groupBy=Yr,lt.indexBy=Jr,lt.initial=function(e){return Er(e,1)},lt.intersection=wr,lt.invert=function(e,t,n){n&&nr(e,t,n)&&(t=void 0);for(var r=-1,i=Ji(e),o=i.length,s={};++r<o;){var a=i[r],l=e[a];t?de.call(s,l)?s[l].push(a):s[l]=[a]:s[l]=a}return s},lt.invoke=Zr,lt.keys=Ji,lt.keysIn=Zi,lt.map=ei,lt.mapKeys=eo,lt.mapValues=to,lt.matches=Eo,lt.matchesProperty=function(e,t){return Yt(e,At(t,!0))},lt.memoize=xi,lt.merge=Bi,lt.method=bo,lt.methodOf=Co,lt.mixin=To,lt.modArgs=Ei,lt.negate=function(e){if("function"!=typeof e)throw new ae(o);return function(){return!e.apply(this,arguments)}},lt.omit=no,lt.once=function(e){return li(2,e)},lt.pairs=ro,lt.partial=bi,lt.partialRight=Ci,lt.partition=ti,lt.pick=io,lt.pluck=function(e,t){return ei(e,wo(t))},lt.property=wo,lt.propertyOf=function(e){return function(t){return Wt(e,mr(t),t+"")}},lt.pull=function(){var e=arguments,t=e[0];if(!t||!t.length)return t;for(var n=0,r=Xn(),i=e.length;++n<i;)for(var o=0,s=e[n];(o=r(t,s,o))>-1;)Ve.call(t,o,1);return t},lt.pullAt=Lr,lt.range=function(e,t,r){r&&nr(e,t,r)&&(t=r=void 0),e=+e||0,null==t?(t=e,e=0):t=+t||0;for(var i=-1,o=Ze($e((t-e)/((r=null==r?1:+r||0)||1)),0),s=n(o);++i<o;)s[i]=e,e+=r;return s},lt.rearg=Ti,lt.reject=function(e,t,n){var r=Li(e)?yt:Mt;return t=zn(t,n,3),r(e,(function(e,n,r){return!t(e,n,r)}))},lt.remove=function(e,t,n){var r=[];if(!e||!e.length)return r;var i=-1,o=[],s=e.length;for(t=zn(t,n,3);++i<s;){var a=e[i];t(a,i,e)&&(r.push(a),o.push(i))}return Jt(e,o),r},lt.rest=Ir,lt.restParam=Si,lt.set=function(e,t,n){if(null==e)return e;for(var r=t+"",i=-1,o=(t=null!=e[r]||rr(t,e)?[r]:mr(t)).length,s=o-1,a=e;null!=a&&++i<o;){var l=t[i];_i(a)&&(i==s?a[l]=n:null==a[l]&&(a[l]=tr(t[i+1])?[]:{})),a=a[l]}return e},lt.shuffle=function(e){return ii(e,ot)},lt.slice=function(e,t,n){var r=e?e.length:0;return r?(n&&"number"!=typeof n&&nr(e,t,n)&&(t=0,n=r),nn(e,t,n)):[]},lt.sortBy=function(e,t,n){if(null==e)return[];n&&nr(e,t,n)&&(t=void 0);var r=-1;return t=zn(t,n,3),on(Qt(e,(function(e,n,i){return{criteria:t(e,n,i),index:++r,value:e}})),be)},lt.sortByAll=si,lt.sortByOrder=function(e,t,n,r){return null==e?[]:(r&&nr(t,n,r)&&(n=void 0),Li(t)||(t=null==t?[]:[t]),Li(n)||(n=null==n?[]:[n]),sn(e,t,n))},lt.spread=function(e){if("function"!=typeof e)throw new ae(o);return function(t){return e.apply(this,t)}},lt.take=function(e,t,n){return e&&e.length?((n?nr(e,t,n):null==t)&&(t=1),nn(e,0,t<0?0:t)):[]},lt.takeRight=function(e,t,n){var r=e?e.length:0;return r?((n?nr(e,t,n):null==t)&&(t=1),nn(e,(t=r-(+t||0))<0?0:t)):[]},lt.takeRightWhile=function(e,t,n){return e&&e.length?un(e,zn(t,n,3),!1,!0):[]},lt.takeWhile=function(e,t,n){return e&&e.length?un(e,zn(t,n,3)):[]},lt.tap=function(e,t,n){return t.call(n,e),e},lt.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ae(o);return!1===n?r=!1:_i(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),hi(e,t,{leading:r,maxWait:+t,trailing:i})},lt.thru=Gr,lt.times=function(e,t,r){if((e=Xe(e))<1||!Ke(e))return[];var i=-1,o=n(et(e,4294967295));for(t=fn(t,r,1);++i<e;)i<4294967295?o[i]=t(i):t(i);return o},lt.toArray=Ui,lt.toPlainObject=Gi,lt.transform=function(e,t,n,r){var i=Li(e)||Fi(e);if(t=zn(t,r,4),null==n)if(i||_i(e)){var o=e.constructor;n=i?Li(e)?new o:[]:Rt(Ri(o)?o.prototype:void 0)}else n={};return(i?mt:Ht)(e,(function(e,r,i){return t(n,e,r,i)})),n},lt.union=_r,lt.uniq=Or,lt.unzip=Dr,lt.unzipWith=kr,lt.values=oo,lt.valuesIn=function(e){return ln(e,Zi(e))},lt.where=function(e,t){return Wr(e,Xt(t))},lt.without=Pr,lt.wrap=function(e,t){return qn(t=null==t?xo:t,32,void 0,[e],[])},lt.xor=function(){for(var e=-1,t=arguments.length;++e<t;){var n=arguments[e];if(er(n))var r=r?Et(Ot(r,n),Ot(n,r)):n}return r?an(r):[]},lt.zip=Mr,lt.zipObject=Fr,lt.zipWith=jr,lt.backflow=yi,lt.collect=ei,lt.compose=yi,lt.each=Qr,lt.eachRight=Xr,lt.extend=Hi,lt.iteratee=yo,lt.methods=Ki,lt.object=Fr,lt.select=Wr,lt.tail=Ir,lt.unique=Or,To(lt,lt),lt.add=function(e,t){return(+e||0)+(+t||0)},lt.attempt=vo,lt.camelCase=so,lt.capitalize=function(e){return(e=ye(e))&&e.charAt(0).toUpperCase()+e.slice(1)},lt.ceil=Lo,lt.clone=function(e,t,n,r){return t&&"boolean"!=typeof t&&nr(e,t,n)?t=!1:"function"==typeof t&&(r=n,n=t,t=!1),"function"==typeof n?At(e,t,fn(n,r,1)):At(e,t)},lt.cloneDeep=function(e,t,n){return"function"==typeof t?At(e,!0,fn(t,n,1)):At(e,!0)},lt.deburr=ao,lt.endsWith=function(e,t,n){t+="";var r=(e=ye(e)).length;return n=void 0===n?r:et(n<0?0:+n||0,r),(n-=t.length)>=0&&e.indexOf(t,n)==n},lt.escape=function(e){return(e=ye(e))&&_.test(e)?e.replace(A,Te):e},lt.escapeRegExp=function(e){return(e=ye(e))&&U.test(e)?e.replace(j,Se):e||"(?:)"},lt.every=Vr,lt.find=zr,lt.findIndex=br,lt.findKey=Wi,lt.findLast=$r,lt.findLastIndex=Cr,lt.findLastKey=zi,lt.findWhere=function(e,t){return zr(e,Xt(t))},lt.first=Tr,lt.floor=Io,lt.get=function(e,t,n){var r=null==e?void 0:Wt(e,mr(t),t+"");return void 0===r?n:r},lt.gt=wi,lt.gte=function(e,t){return e>=t},lt.has=function(e,t){if(null==e)return!1;var n=de.call(e,t);if(!n&&!rr(t)){if(null==(e=1==(t=mr(t)).length?e:Wt(e,nn(t,0,-1))))return!1;t=Nr(t),n=de.call(e,t)}return n||or(e.length)&&tr(t,e.length)&&(Li(e)||Ni(e))},lt.identity=xo,lt.includes=Kr,lt.indexOf=Sr,lt.inRange=function(e,t,n){return t=+t||0,void 0===n?(n=t,t=0):n=+n||0,e>=et(t,n)&&e<Ze(t,n)},lt.isArguments=Ni,lt.isArray=Li,lt.isBoolean=function(e){return!0===e||!1===e||Le(e)&&ke.call(e)==u},lt.isDate=function(e){return Le(e)&&ke.call(e)==c},lt.isElement=function(e){return!!e&&1===e.nodeType&&Le(e)&&!ki(e)},lt.isEmpty=function(e){return null==e||(er(e)&&(Li(e)||Mi(e)||Ni(e)||Le(e)&&Ri(e.splice))?!e.length:!Ji(e).length)},lt.isEqual=Ii,lt.isError=Ai,lt.isFinite=function(e){return"number"==typeof e&&Ke(e)},lt.isFunction=Ri,lt.isMatch=function(e,t,n,r){return n="function"==typeof n?fn(n,r,3):void 0,$t(e,Kn(t),n)},lt.isNaN=function(e){return Di(e)&&e!=+e},lt.isNative=Oi,lt.isNull=function(e){return null===e},lt.isNumber=Di,lt.isObject=_i,lt.isPlainObject=ki,lt.isRegExp=Pi,lt.isString=Mi,lt.isTypedArray=Fi,lt.isUndefined=function(e){return void 0===e},lt.kebabCase=lo,lt.last=Nr,lt.lastIndexOf=function(e,t,n){var r=e?e.length:0;if(!r)return-1;var i=r;if("number"==typeof n)i=(n<0?Ze(r+n,0):et(n||0,r-1))+1;else if(n){var o=e[i=pn(e,t,!0)-1];return(t==t?t===o:o!=o)?i:-1}if(t!=t)return Ne(e,i,!0);for(;i--;)if(e[i]===t)return i;return-1},lt.lt=ji,lt.lte=function(e,t){return e<=t},lt.max=Ao,lt.min=Ro,lt.noConflict=function(){return fe._=Pe,this},lt.noop=So,lt.now=ai,lt.pad=function(e,t,n){t=+t;var r=(e=ye(e)).length;if(r>=t||!Ke(t))return e;var i=(t-r)/2,o=Xe(i);return(n=Un("",$e(i),n)).slice(0,o)+e+n},lt.padLeft=uo,lt.padRight=co,lt.parseInt=function(e,t,n){return(n?nr(e,t,n):null==t)?t=0:t&&(t=+t),e=go(e),nt(e,t||(V.test(e)?16:10))},lt.random=function(e,t,n){n&&nr(e,t,n)&&(t=n=void 0);var r=null==e,i=null==t;if(null==n&&(i&&"boolean"==typeof e?(n=e,e=1):"boolean"==typeof t&&(n=t,i=!0)),r&&i&&(t=1,i=!1),e=+e||0,i?(t=e,e=0):t=+t||0,n||e%1||t%1){var o=rt();return et(e+o*(t-e+Ue("1e-"+((o+"").length-1))),t)}return Zt(e,t)},lt.reduce=ni,lt.reduceRight=ri,lt.repeat=po,lt.result=function(e,t,n){var r=null==e?void 0:e[t];return void 0===r&&(null==e||rr(t,e)||(r=null==(e=1==(t=mr(t)).length?e:Wt(e,nn(t,0,-1)))?void 0:e[Nr(t)]),r=void 0===r?n:r),Ri(r)?r.call(e):r},lt.round=_o,lt.runInContext=e,lt.size=function(e){var t=e?Yn(e):0;return or(t)?t:Ji(e).length},lt.snakeCase=fo,lt.some=oi,lt.sortedIndex=Ar,lt.sortedLastIndex=Rr,lt.startCase=ho,lt.startsWith=function(e,t,n){return e=ye(e),n=null==n?0:et(n<0?0:+n||0,e.length),e.lastIndexOf(t,n)==n},lt.sum=function(e,t,n){return n&&nr(e,t,n)&&(t=void 0),1==(t=zn(t,n,3)).length?function(e,t){for(var n=e.length,r=0;n--;)r+=+t(e[n])||0;return r}(Li(e)?e:hr(e),t):function(e,t){var n=0;return Dt(e,(function(e,r,i){n+=+t(e,r,i)||0})),n}(e,t)},lt.template=function(e,t,n){var r=lt.templateSettings;n&&nr(e,t,n)&&(t=n=void 0),e=ye(e),t=St(wt({},n||t),r,Tt);var i,o,s=St(wt({},t.imports),r.imports,Tt),a=Ji(s),l=ln(s,a),u=0,c=t.interpolate||Q,p="__p += '",d=oe((t.escape||Q).source+"|"+c.source+"|"+(c===k?H:Q).source+"|"+(t.evaluate||Q).source+"|$","g"),f="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++J+"]")+"\n";e.replace(d,(function(t,n,r,s,a,l){return r||(r=s),p+=e.slice(u,l).replace(X,we),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),a&&(o=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),p+="';\n";var h=t.variable;h||(p="with (obj) {\n"+p+"\n}\n"),p=(o?p.replace(w,""):p).replace(N,"$1").replace(L,"$1;"),p="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=vo((function(){return te(a,f+"return "+p).apply(void 0,l)}));if(g.source=p,Ai(g))throw g;return g},lt.trim=go,lt.trimLeft=function(e,t,n){var r=e;return(e=ye(e))?(n?nr(r,t,n):null==t)?e.slice(Re(e)):e.slice(xe(e,t+"")):e},lt.trimRight=function(e,t,n){var r=e;return(e=ye(e))?(n?nr(r,t,n):null==t)?e.slice(0,_e(e)+1):e.slice(0,Ee(e,t+"")+1):e},lt.trunc=function(e,t,n){n&&nr(e,t,n)&&(t=void 0);var r=30,i="...";if(null!=t)if(_i(t)){var o="separator"in t?t.separator:o;r="length"in t?+t.length||0:r,i="omission"in t?ye(t.omission):i}else r=+t||0;if(r>=(e=ye(e)).length)return e;var s=r-i.length;if(s<1)return i;var a=e.slice(0,s);if(null==o)return a+i;if(Pi(o)){if(e.slice(s).search(o)){var l,u,c=e.slice(0,s);for(o.global||(o=oe(o.source,(q.exec(o)||"")+"g")),o.lastIndex=0;l=o.exec(c);)u=l.index;a=a.slice(0,null==u?s:u)}}else if(e.indexOf(o,s)!=s){var p=a.lastIndexOf(o);p>-1&&(a=a.slice(0,p))}return a+i},lt.unescape=function(e){return(e=ye(e))&&R.test(e)?e.replace(I,Oe):e},lt.uniqueId=function(e){var t=++Ie;return ye(e)+t},lt.words=mo,lt.all=Vr,lt.any=oi,lt.contains=Kr,lt.eq=Ii,lt.detect=zr,lt.foldl=ni,lt.foldr=ri,lt.head=Tr,lt.include=Kr,lt.inject=ni,To(lt,(No={},Ht(lt,(function(e,t){lt.prototype[t]||(No[t]=e)})),No),!1),lt.sample=ii,lt.prototype.sample=function(e){return this.__chain__||null!=e?this.thru((function(t){return ii(t,e)})):ii(this.value())},lt.VERSION="3.10.1",mt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){lt[e].placeholder=lt})),mt(["drop","take"],(function(e,t){pt.prototype[e]=function(n){var r=this.__filtered__;if(r&&!t)return new pt(this);n=null==n?1:Ze(Xe(n)||0,0);var i=this.clone();return r?i.__takeCount__=et(i.__takeCount__,n):i.__views__.push({size:n,type:e+(i.__dir__<0?"Right":"")}),i},pt.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),mt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=2!=n;pt.prototype[e]=function(e,t){var i=this.clone();return i.__iteratees__.push({iteratee:zn(e,t,1),type:n}),i.__filtered__=i.__filtered__||r,i}})),mt(["first","last"],(function(e,t){var n="take"+(t?"Right":"");pt.prototype[e]=function(){return this[n](1).value()[0]}})),mt(["initial","rest"],(function(e,t){var n="drop"+(t?"":"Right");pt.prototype[e]=function(){return this.__filtered__?new pt(this):this[n](1)}})),mt(["pluck","where"],(function(e,t){var n=t?"filter":"map",r=t?Xt:wo;pt.prototype[e]=function(e){return this[n](r(e))}})),pt.prototype.compact=function(){return this.filter(xo)},pt.prototype.reject=function(e,t){return e=zn(e,t,1),this.filter((function(t){return!e(t)}))},pt.prototype.slice=function(e,t){e=null==e?0:+e||0;var n=this;return n.__filtered__&&(e>0||t<0)?new pt(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=+t||0)<0?n.dropRight(-t):n.take(t-e)),n)},pt.prototype.takeRightWhile=function(e,t){return this.reverse().takeWhile(e,t).reverse()},pt.prototype.toArray=function(){return this.take(ot)},Ht(pt.prototype,(function(e,t){var n=/^(?:filter|map|reject)|While$/.test(t),r=/^(?:first|last)$/.test(t),i=lt[r?"take"+("last"==t?"Right":""):t];i&&(lt.prototype[t]=function(){var t=r?[1]:arguments,o=this.__chain__,s=this.__wrapped__,a=!!this.__actions__.length,l=s instanceof pt,u=t[0],c=l||Li(s);c&&n&&"function"==typeof u&&1!=u.length&&(l=c=!1);var p=function(e){return r&&o?i(e,1)[0]:i.apply(void 0,Et([e],t))},d={func:Gr,args:[p],thisArg:void 0},f=l&&!a;if(r&&!o)return f?((s=s.clone()).__actions__.push(d),e.call(s)):i.call(void 0,this.value())[0];if(!r&&c){s=f?s:new pt(this);var h=e.apply(s,t);return h.__actions__.push(d),new ct(h,o)}return this.thru(p)})})),mt(["join","pop","push","replace","shift","sort","splice","split","unshift"],(function(e){var t=(/^(?:replace|split)$/.test(e)?ce:le)[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:join|pop|replace|shift)$/.test(e);lt.prototype[e]=function(){var e=arguments;return r&&!this.__chain__?t.apply(this.value(),e):this[n]((function(n){return t.apply(n,e)}))}})),Ht(pt.prototype,(function(e,t){var n=lt[t];if(n){var r=n.name;(at[r]||(at[r]=[])).push({name:t,func:n})}})),at[jn(void 0,2).name]=[{name:"wrapper",func:void 0}],pt.prototype.clone=function(){var e=new pt(this.__wrapped__);return e.__actions__=gt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=gt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=gt(this.__views__),e},pt.prototype.reverse=function(){if(this.__filtered__){var e=new pt(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},pt.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Li(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=et(t,e+s);break;case"takeRight":e=Ze(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,l=a-s,u=r?a:s-1,c=this.__iteratees__,p=c.length,d=0,f=et(l,this.__takeCount__);if(!n||i<200||i==l&&f==l)return cn(r&&n?e.reverse():e,this.__actions__);var h=[];e:for(;l--&&d<f;){for(var g=-1,m=e[u+=t];++g<p;){var v=c[g],y=v.iteratee,x=v.type,E=y(m);if(2==x)m=E;else if(!E){if(1==x)continue e;break e}}h[d++]=m}return h},lt.prototype.chain=function(){return Ur(this)},lt.prototype.commit=function(){return new ct(this.value(),this.__chain__)},lt.prototype.concat=Br,lt.prototype.plant=function(e){for(var t,n=this;n instanceof ut;){var r=vr(n);t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},lt.prototype.reverse=function(){var e=this.__wrapped__,t=function(e){return n&&n.__dir__<0?e:e.reverse()};if(e instanceof pt){var n=e;return this.__actions__.length&&(n=new pt(this)),(n=n.reverse()).__actions__.push({func:Gr,args:[t],thisArg:void 0}),new ct(n,this.__chain__)}return this.thru(t)},lt.prototype.toString=function(){return this.value()+""},lt.prototype.run=lt.prototype.toJSON=lt.prototype.valueOf=lt.prototype.value=function(){return cn(this.__wrapped__,this.__actions__)},lt.prototype.collect=lt.prototype.map,lt.prototype.head=lt.prototype.first,lt.prototype.select=lt.prototype.filter,lt.prototype.tail=lt.prototype.rest,lt}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(fe._=De,define((function(){return De}))):ae&&le?de?(le.exports=De)._=De:ae._=De:fe._=De}).call(this)}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],20:[function(e,t,n){(function(){var r;r=function(e){return e.pivotUtilities.d3_renderers={Treemap:function(t,n){var r,i,o,s,a,l,u,c,p,d,f,h,g;for(o={localeStrings:{},d3:{width:function(){return e(window).width()/1.4},height:function(){return e(window).height()/1.4}}},n=e.extend(o,n),c=e("<div>").css({width:"100%",height:"100%"}),d={name:"All",children:[]},r=function(e,t,n){var i,o,s,a,l,u;if(0!==t.length){for(null==e.children&&(e.children=[]),u=t.shift(),o=0,s=(l=e.children).length;o<s;o++)if((i=l[o]).name===u)return void r(i,t,n);return r(a={name:u},t,n),e.children.push(a)}e.value=n},a=0,l=(u=t.getRowKeys()).length;a<l;a++)p=u[a],null!=(h=t.getAggregator(p,[]).value())&&r(d,p,h);return i=d3.scale.category10(),g=n.d3.width(),s=n.d3.height(),f=d3.layout.treemap().size([g,s]).sticky(!0).value((function(e){return e.size})),d3.select(c[0]).append("div").style("position","relative").style("width",g+"px").style("height",s+"px").datum(d).selectAll(".node").data(f.padding([15,0,0,0]).value((function(e){return e.value})).nodes).enter().append("div").attr("class","node").style("background",(function(e){return null!=e.children?"lightgrey":i(e.name)})).text((function(e){return e.name})).call((function(){this.style("left",(function(e){return e.x+"px"})).style("top",(function(e){return e.y+"px"})).style("width",(function(e){return Math.max(0,e.dx-1)+"px"})).style("height",(function(e){return Math.max(0,e.dy-1)+"px"}))})),c}}},"object"==typeof n&&"object"==typeof t?r(e("jquery")):"function"==typeof define&&define.amd?define(["jquery"],r):r(jQuery)}).call(this)},{jquery:18}],21:[function(e,t,n){(function(){var r;r=function(e){var t;return t=function(t,n){return function(r,i){var o,s,a,l,u,c,p,d,f,h,g,m,v,y,x,E,b,C,T,S,w,N,L,I,A,R,_,O,D,k,P;if(d={localeStrings:{vs:"vs",by:"by"},gchart:{}},null==(s=(i=e.extend(!0,d,i)).gchart).width&&(s.width=window.innerWidth/1.4),null==(a=i.gchart).height&&(a.height=window.innerHeight/1.4),0===(I=r.getRowKeys()).length&&I.push([]),0===(u=r.getColKeys()).length&&u.push([]),f=r.aggregatorName,r.valAttrs.length&&(f+="("+r.valAttrs.join(", ")+")"),(v=function(){var e,t,n;for(n=[],e=0,t=I.length;e<t;e++)g=I[e],n.push(g.join("-"));return n}()).unshift(""),C=0,"ScatterChart"===t){for(P in c=[],S=r.tree)for(k in R=S[P])o=R[k],c.push([parseFloat(k),parseFloat(P),f+": \n"+o.format(o.value())]);(p=new google.visualization.DataTable).addColumn("number",r.colAttrs.join("-")),p.addColumn("number",r.rowAttrs.join("-")),p.addColumn({type:"string",role:"tooltip"}),p.addRows(c),m=r.colAttrs.join("-"),_=r.rowAttrs.join("-"),A=""}else{for(c=[v],y=0,E=u.length;y<E;y++){for(C+=(N=[(l=u[y]).join("-")])[0].length,x=0,b=I.length;x<b;x++)L=I[x],null!=(o=r.getAggregator(L,l)).value()?(O=o.value(),e.isNumeric(O)?O<1?N.push(parseFloat(O.toPrecision(3))):N.push(parseFloat(O.toFixed(3))):N.push(O)):N.push(null);c.push(N)}p=google.visualization.arrayToDataTable(c),A=_=f,""!==(m=r.colAttrs.join("-"))&&(A+=" "+i.localeStrings.vs+" "+m),""!==(h=r.rowAttrs.join("-"))&&(A+=" "+i.localeStrings.by+" "+h)}return T={title:A,hAxis:{title:m,slantedText:C>50},vAxis:{title:_},tooltip:{textStyle:{fontName:"Arial",fontSize:12}}},"ColumnChart"===t&&(T.vAxis.minValue=0),"ScatterChart"===t?(T.legend={position:"none"},T.chartArea={width:"80%",height:"80%"}):2===c[0].length&&""===c[0][1]&&(T.legend={position:"none"}),e.extend(T,i.gchart,n),w=e("<div>").css({width:"100%",height:"100%"}),(D=new google.visualization.ChartWrapper({dataTable:p,chartType:t,options:T})).draw(w[0]),w.bind("dblclick",(function(){var e;return e=new google.visualization.ChartEditor,google.visualization.events.addListener(e,"ok",(function(){return e.getChartWrapper().draw(w[0])})),e.openDialog(D)})),w}},e.pivotUtilities.gchart_renderers={"Line Chart":t("LineChart"),"Bar Chart":t("ColumnChart"),"Stacked Bar Chart":t("ColumnChart",{isStacked:!0}),"Area Chart":t("AreaChart",{isStacked:!0}),"Scatter Chart":t("ScatterChart")}},"object"==typeof n&&"object"==typeof t?r(e("jquery")):"function"==typeof define&&define.amd?define(["jquery"],r):r(jQuery)}).call(this)},{jquery:18}],22:[function(e,t,n){(function(){var r,i=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},o=[].slice,s=function(e,t){return function(){return e.apply(t,arguments)}},a={}.hasOwnProperty;r=function(e){var t,n,r,l,u,c,p,d,f,h,g,m,v,y,x,E,b,C,T;return n=function(e,t,n){var r,i,o,s;for(o=(i=(e+="").split("."))[0],s=i.length>1?n+i[1]:"",r=/(\d+)(\d{3})/;r.test(o);)o=o.replace(r,"$1"+t+"$2");return o+s},x=(g=function(t){var r;return r={digitsAfterDecimal:2,scaler:1,thousandsSep:",",decimalSep:".",prefix:"",suffix:"",showZero:!1},t=e.extend(r,t),function(e){var r;return isNaN(e)||!isFinite(e)?"":0!==e||t.showZero?(r=n((t.scaler*e).toFixed(t.digitsAfterDecimal),t.thousandsSep,t.decimalSep),""+t.prefix+r+t.suffix):""}})(),E=g({digitsAfterDecimal:0}),b=g({digitsAfterDecimal:1,scaler:100,suffix:"%"}),l={Count:(T=r={count:function(e){return null==e&&(e=E),function(){return function(t,n,r){return{count:0,push:function(){return this.count++},value:function(){return this.count},format:e}}}},countUnique:function(e){return null==e&&(e=E),function(t){var n;return n=t[0],function(t,r,o){return{uniq:[],push:function(e){var t;if(t=e[n],i.call(this.uniq,t)<0)return this.uniq.push(e[n])},value:function(){return this.uniq.length},format:e,numInputs:null!=n?0:1}}}},listUnique:function(e){return function(t){var n;return n=t[0],function(t,r,o){return{uniq:[],push:function(e){var t;if(t=e[n],i.call(this.uniq,t)<0)return this.uniq.push(e[n])},value:function(){return this.uniq.join(e)},format:function(e){return e},numInputs:null!=n?0:1}}}},sum:function(e){return null==e&&(e=x),function(t){var n;return n=t[0],function(t,r,i){return{sum:0,push:function(e){if(!isNaN(parseFloat(e[n])))return this.sum+=parseFloat(e[n])},value:function(){return this.sum},format:e,numInputs:null!=n?0:1}}}},min:function(e){return null==e&&(e=x),function(t){var n;return n=t[0],function(t,r,i){return{val:null,push:function(e){var t,r;if(r=parseFloat(e[n]),!isNaN(r))return this.val=Math.min(r,null!=(t=this.val)?t:r)},value:function(){return this.val},format:e,numInputs:null!=n?0:1}}}},max:function(e){return null==e&&(e=x),function(t){var n;return n=t[0],function(t,r,i){return{val:null,push:function(e){var t,r;if(r=parseFloat(e[n]),!isNaN(r))return this.val=Math.max(r,null!=(t=this.val)?t:r)},value:function(){return this.val},format:e,numInputs:null!=n?0:1}}}},average:function(e){return null==e&&(e=x),function(t){var n;return n=t[0],function(t,r,i){return{sum:0,len:0,push:function(e){if(!isNaN(parseFloat(e[n])))return this.sum+=parseFloat(e[n]),this.len++},value:function(){return this.sum/this.len},format:e,numInputs:null!=n?0:1}}}},sumOverSum:function(e){return null==e&&(e=x),function(t){var n,r;return r=t[0],n=t[1],function(t,i,o){return{sumNum:0,sumDenom:0,push:function(e){if(isNaN(parseFloat(e[r]))||(this.sumNum+=parseFloat(e[r])),!isNaN(parseFloat(e[n])))return this.sumDenom+=parseFloat(e[n])},value:function(){return this.sumNum/this.sumDenom},format:e,numInputs:null!=r&&null!=n?0:2}}}},sumOverSumBound80:function(e,t){return null==e&&(e=!0),null==t&&(t=x),function(n){var r,i;return i=n[0],r=n[1],function(n,o,s){return{sumNum:0,sumDenom:0,push:function(e){if(isNaN(parseFloat(e[i]))||(this.sumNum+=parseFloat(e[i])),!isNaN(parseFloat(e[r])))return this.sumDenom+=parseFloat(e[r])},value:function(){var t;return t=e?1:-1,(.821187207574908/this.sumDenom+this.sumNum/this.sumDenom+1.2815515655446004*t*Math.sqrt(.410593603787454/(this.sumDenom*this.sumDenom)+this.sumNum*(1-this.sumNum/this.sumDenom)/(this.sumDenom*this.sumDenom)))/(1+1.642374415149816/this.sumDenom)},format:t,numInputs:null!=i&&null!=r?0:2}}}},fractionOf:function(e,t,n){return null==t&&(t="total"),null==n&&(n=b),function(){var r;return r=1<=arguments.length?o.call(arguments,0):[],function(i,o,s){return{selector:{total:[[],[]],row:[o,[]],col:[[],s]}[t],inner:e.apply(null,r)(i,o,s),push:function(e){return this.inner.push(e)},format:n,value:function(){return this.inner.value()/i.getAggregator.apply(i,this.selector).inner.value()},numInputs:e.apply(null,r)().numInputs}}}}}).count(E),"Count Unique Values":T.countUnique(E),"List Unique Values":T.listUnique(", "),Sum:T.sum(x),"Integer Sum":T.sum(E),Average:T.average(x),Minimum:T.min(x),Maximum:T.max(x),"Sum over Sum":T.sumOverSum(x),"80% Upper Bound":T.sumOverSumBound80(!0,x),"80% Lower Bound":T.sumOverSumBound80(!1,x),"Sum as Fraction of Total":T.fractionOf(T.sum(),"total",b),"Sum as Fraction of Rows":T.fractionOf(T.sum(),"row",b),"Sum as Fraction of Columns":T.fractionOf(T.sum(),"col",b),"Count as Fraction of Total":T.fractionOf(T.count(),"total",b),"Count as Fraction of Rows":T.fractionOf(T.count(),"row",b),"Count as Fraction of Columns":T.fractionOf(T.count(),"col",b)},d={en:{aggregators:l,renderers:v={Table:function(e,t){return m(e,t)},"Table Barchart":function(t,n){return e(m(t,n)).barchart()},Heatmap:function(t,n){return e(m(t,n)).heatmap()},"Row Heatmap":function(t,n){return e(m(t,n)).heatmap("rowheatmap")},"Col Heatmap":function(t,n){return e(m(t,n)).heatmap("colheatmap")}},localeStrings:{renderError:"An error occurred rendering the PivotTable results.",computeError:"An error occurred computing the PivotTable results.",uiRenderError:"An error occurred rendering the PivotTable UI.",selectAll:"Select All",selectNone:"Select None",tooMany:"(too many to list)",filterResults:"Filter results",totals:"Totals",vs:"vs",by:"by"}}},f=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],u=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],C=function(e){return("0"+e).substr(-2,2)},c={bin:function(e,t){return function(n){return n[e]-n[e]%t}},dateFormat:function(e,t,n,r,i){var o;return null==n&&(n=!1),null==r&&(r=f),null==i&&(i=u),o=n?"UTC":"",function(n){var s;return s=new Date(Date.parse(n[e])),isNaN(s)?"":t.replace(/%(.)/g,(function(e,t){switch(t){case"y":return s["get"+o+"FullYear"]();case"m":return C(s["get"+o+"Month"]()+1);case"n":return r[s["get"+o+"Month"]()];case"d":return C(s["get"+o+"Date"]());case"w":return i[s["get"+o+"Day"]()];case"x":return s["get"+o+"Day"]();case"H":return C(s["get"+o+"Hours"]());case"M":return C(s["get"+o+"Minutes"]());case"S":return C(s["get"+o+"Seconds"]());default:return"%"+t}}))}}},h=function(e,t){var n,r,i,o,s,a,l;if(a=/(\d+)|(\D+)/g,s=/\d/,l=/^0/,"number"==typeof e||"number"==typeof t)return isNaN(e)?1:isNaN(t)?-1:e-t;if((n=String(e).toLowerCase())===(i=String(t).toLowerCase()))return 0;if(!s.test(n)||!s.test(i))return n>i?1:-1;for(n=n.match(a),i=i.match(a);n.length&&i.length;)if((r=n.shift())!==(o=i.shift()))return s.test(r)&&s.test(o)?r.replace(l,".0")-o.replace(l,".0"):r>o?1:-1;return n.length-i.length},y=function(e){var t,n,r;for(t in n={},e)r=e[t],n[r]=t;return function(e,t){return null!=n[e]&&null!=n[t]?n[e]-n[t]:null!=n[e]?-1:null!=n[t]?1:h(e,t)}},p=function(t,n){var r;return r=t(n),e.isFunction(r)?r:h},e.pivotUtilities={aggregatorTemplates:r,aggregators:l,renderers:v,derivers:c,locales:d,naturalSort:h,numberFormat:g,sortAs:y},t=function(){function t(e,n){var r;this.getAggregator=s(this.getAggregator,this),this.getRowKeys=s(this.getRowKeys,this),this.getColKeys=s(this.getColKeys,this),this.sortKeys=s(this.sortKeys,this),this.arrSort=s(this.arrSort,this),this.aggregator=n.aggregator,this.aggregatorName=n.aggregatorName,this.colAttrs=n.cols,this.rowAttrs=n.rows,this.valAttrs=n.vals,this.sorters=n.sorters,this.tree={},this.rowKeys=[],this.colKeys=[],this.rowTotals={},this.colTotals={},this.allTotal=this.aggregator(this,[],[]),this.sorted=!1,t.forEachRecord(e,n.derivedAttributes,(r=this,function(e){if(n.filter(e))return r.processRecord(e)}))}return t.forEachRecord=function(t,n,r){var i,o,s,l,u,c,p,d,f,h,g,m;if(i=e.isEmptyObject(n)?r:function(e){var t,i,o;for(t in n)o=n[t],e[t]=null!=(i=o(e))?i:e[t];return r(e)},e.isFunction(t))return t(i);if(e.isArray(t)){if(e.isArray(t[0])){for(s in h=[],t)if(a.call(t,s)&&(o=t[s],s>0)){for(l in d={},f=t[0])a.call(f,l)&&(u=f[l],d[u]=o[l]);h.push(i(d))}return h}for(g=[],c=0,p=t.length;c<p;c++)d=t[c],g.push(i(d));return g}if(t instanceof jQuery)return m=[],e("thead > tr > th",t).each((function(t){return m.push(e(this).text())})),e("tbody > tr",t).each((function(t){return d={},e("td",this).each((function(t){return d[m[t]]=e(this).html()})),i(d)}));throw new Error("unknown input format")},t.convertToArray=function(e){var n;return n=[],t.forEachRecord(e,{},(function(e){return n.push(e)})),n},t.prototype.arrSort=function(e){var t,n;return n=function(){var n,r,i;for(i=[],n=0,r=e.length;n<r;n++)t=e[n],i.push(p(this.sorters,t));return i}.call(this),function(e,t){var r,i;for(i in n)if(0!==(r=(0,n[i])(e[i],t[i])))return r;return 0}},t.prototype.sortKeys=function(){if(!this.sorted)return this.sorted=!0,this.rowKeys.sort(this.arrSort(this.rowAttrs)),this.colKeys.sort(this.arrSort(this.colAttrs))},t.prototype.getColKeys=function(){return this.sortKeys(),this.colKeys},t.prototype.getRowKeys=function(){return this.sortKeys(),this.rowKeys},t.prototype.processRecord=function(e){var t,n,r,i,o,s,a,l,u,c,p,d,f;for(t=[],d=[],i=0,o=(l=this.colAttrs).length;i<o;i++)f=l[i],t.push(null!=(u=e[f])?u:"null");for(a=0,s=(c=this.rowAttrs).length;a<s;a++)f=c[a],d.push(null!=(p=e[f])?p:"null");if(r=d.join(String.fromCharCode(0)),n=t.join(String.fromCharCode(0)),this.allTotal.push(e),0!==d.length&&(this.rowTotals[r]||(this.rowKeys.push(d),this.rowTotals[r]=this.aggregator(this,d,[])),this.rowTotals[r].push(e)),0!==t.length&&(this.colTotals[n]||(this.colKeys.push(t),this.colTotals[n]=this.aggregator(this,[],t)),this.colTotals[n].push(e)),0!==t.length&&0!==d.length)return this.tree[r]||(this.tree[r]={}),this.tree[r][n]||(this.tree[r][n]=this.aggregator(this,d,t)),this.tree[r][n].push(e)},t.prototype.getAggregator=function(e,t){var n,r,i;return i=e.join(String.fromCharCode(0)),r=t.join(String.fromCharCode(0)),null!=(n=0===e.length&&0===t.length?this.allTotal:0===e.length?this.colTotals[r]:0===t.length?this.rowTotals[i]:this.tree[i][r])?n:{value:function(){return null},format:function(){return""}}},t}(),m=function(t,n){var r,i,o,s,l,u,c,p,d,f,h,g,m,v,y,x,E,b,C,T,S;for(p in u={localeStrings:{totals:"Totals"}},n=e.extend(u,n),o=t.colAttrs,h=t.rowAttrs,m=t.getRowKeys(),l=t.getColKeys(),(f=document.createElement("table")).className="pvtTable",v=function(e,t,n){var r,i,o,s,a,l,u,c;if(0!==t){for(s=!0,c=r=0,a=n;0<=a?r<=a:r>=a;c=0<=a?++r:--r)e[t-1][c]!==e[t][c]&&(s=!1);if(s)return-1}for(i=0;t+i<e.length;){for(u=!1,c=o=0,l=n;0<=l?o<=l:o>=l;c=0<=l?++o:--o)e[t][c]!==e[t+i][c]&&(u=!0);if(u)break;i++}return i},o)if(a.call(o,p)){for(c in i=o[p],b=document.createElement("tr"),0===parseInt(p)&&0!==h.length&&((x=document.createElement("th")).setAttribute("colspan",h.length),x.setAttribute("rowspan",o.length),b.appendChild(x)),(x=document.createElement("th")).className="pvtAxisLabel",x.innerHTML=i,b.appendChild(x),l)a.call(l,c)&&(s=l[c],-1!==(S=v(l,parseInt(c),parseInt(p)))&&((x=document.createElement("th")).className="pvtColLabel",x.innerHTML=s[p],x.setAttribute("colspan",S),parseInt(p)===o.length-1&&0!==h.length&&x.setAttribute("rowspan",2),b.appendChild(x)));0===parseInt(p)&&((x=document.createElement("th")).className="pvtTotalLabel",x.innerHTML=n.localeStrings.totals,x.setAttribute("rowspan",o.length+(0===h.length?0:1)),b.appendChild(x)),f.appendChild(b)}if(0!==h.length){for(c in b=document.createElement("tr"),h)a.call(h,c)&&(d=h[c],(x=document.createElement("th")).className="pvtAxisLabel",x.innerHTML=d,b.appendChild(x));x=document.createElement("th"),0===o.length&&(x.className="pvtTotalLabel",x.innerHTML=n.localeStrings.totals),b.appendChild(x),f.appendChild(b)}for(c in m)if(a.call(m,c)){for(p in g=m[c],b=document.createElement("tr"),g)a.call(g,p)&&(C=g[p],-1!==(S=v(m,parseInt(c),parseInt(p)))&&((x=document.createElement("th")).className="pvtRowLabel",x.innerHTML=C,x.setAttribute("rowspan",S),parseInt(p)===h.length-1&&0!==o.length&&x.setAttribute("colspan",2),b.appendChild(x)));for(p in l)a.call(l,p)&&(s=l[p],T=(r=t.getAggregator(g,s)).value(),(y=document.createElement("td")).className="pvtVal row"+c+" col"+p,y.innerHTML=r.format(T),y.setAttribute("data-value",T),b.appendChild(y));T=(E=t.getAggregator(g,[])).value(),(y=document.createElement("td")).className="pvtTotal rowTotal",y.innerHTML=E.format(T),y.setAttribute("data-value",T),y.setAttribute("data-for","row"+c),b.appendChild(y),f.appendChild(b)}for(p in b=document.createElement("tr"),(x=document.createElement("th")).className="pvtTotalLabel",x.innerHTML=n.localeStrings.totals,x.setAttribute("colspan",h.length+(0===o.length?0:1)),b.appendChild(x),l)a.call(l,p)&&(s=l[p],T=(E=t.getAggregator([],s)).value(),(y=document.createElement("td")).className="pvtTotal colTotal",y.innerHTML=E.format(T),y.setAttribute("data-value",T),y.setAttribute("data-for","col"+p),b.appendChild(y));return T=(E=t.getAggregator([],[])).value(),(y=document.createElement("td")).className="pvtGrandTotal",y.innerHTML=E.format(T),y.setAttribute("data-value",T),b.appendChild(y),f.appendChild(b),f.setAttribute("data-numrows",m.length),f.setAttribute("data-numcols",l.length),f},e.fn.pivot=function(n,i){var o,s,a,l,u;o={cols:[],rows:[],vals:[],filter:function(){return!0},aggregator:r.count()(),aggregatorName:"Count",sorters:function(){},derivedAttributes:{},renderer:m,rendererOptions:null,localeStrings:d.en.localeStrings},i=e.extend(o,i),l=null;try{a=new t(n,i);try{l=i.renderer(a,i.rendererOptions)}catch(t){s=t,"undefined"!=typeof console&&null!==console&&console.error(s.stack),l=e("<span>").html(i.localeStrings.renderError)}}catch(t){s=t,"undefined"!=typeof console&&null!==console&&console.error(s.stack),l=e("<span>").html(i.localeStrings.computeError)}for(u=this[0];u.hasChildNodes();)u.removeChild(u.lastChild);return this.append(l)},e.fn.pivotUI=function(n,r,o,s){var l,u,c,f,g,m,v,y,x,E,b,C,T,S,w,N,L,I,A,R,_,O,D,k,P,M,F,j,U,G,B,H,q,V,W,z,$,Q,X,Y;null==o&&(o=!1),null==s&&(s="en"),null==d[s]&&(s="en"),m={derivedAttributes:{},aggregators:d[s].aggregators,renderers:d[s].renderers,hiddenAttributes:[],menuLimit:200,cols:[],rows:[],vals:[],exclusions:{},inclusions:{},unusedAttrsVertical:85,autoSortUnusedAttrs:!1,rendererOptions:{localeStrings:d[s].localeStrings},onRefresh:null,filter:function(){return!0},sorters:function(){},localeStrings:d[s].localeStrings},y=this.data("pivotUIOptions"),R=null==y||o?e.extend(m,r):y;try{for(f in n=t.convertToArray(n),q=function(){var e,t;for(C in t=[],e=n[0])a.call(e,C)&&t.push(C);return t}(),D=R.derivedAttributes)a.call(D,f)&&i.call(q,f)<0&&q.push(f);for(c={},T=0,S=q.length;T<S;T++)X=q[T],c[X]={};for(X in t.forEachRecord(n,R.derivedAttributes,(function(e){var t,n,r;for(C in n=[],e)a.call(e,C)&&(r=e[C],R.filter(e)&&(null==r&&(r="null"),null==(t=c[C])[r]&&(t[r]=0),n.push(c[C][r]++)));return n})),z=e("<table>",{class:"pvtUi"}).attr("cellpadding",5),B=e("<td>"),G=e("<select>").addClass("pvtRenderer").appendTo(B).bind("change",(function(){return j()})),k=R.renderers)a.call(k,X)&&e("<option>").val(X).html(X).appendTo(G);if(g=e("<td>").addClass("pvtAxisContainer pvtUnused"),H=function(){var e,t,n;for(n=[],t=0,e=q.length;t<e;t++)f=q[t],i.call(R.hiddenAttributes,f)<0&&n.push(f);return n}(),Q=!1,$="auto"===R.unusedAttrsVertical?120:parseInt(R.unusedAttrsVertical),!isNaN($)){for(u=0,I=0,w=H.length;I<w;I++)u+=H[I].length;Q=u>$}for(E in!0===R.unusedAttrsVertical||Q?g.addClass("pvtVertList"):g.addClass("pvtHorizList"),x=function(t){var n,r,o,s,a,l,u,d,f,h,m,v,y,x,b;if(u=function(){var e;for(C in e=[],c[t])e.push(C);return e}(),l=!1,(b=e("<div>").addClass("pvtFilterBox").hide()).append(e("<h4>").text(t+" ("+u.length+")")),u.length>R.menuLimit)b.append(e("<p>").html(R.localeStrings.tooMany));else for((r=e("<p>").appendTo(b)).append(e("<button>",{type:"button"}).html(R.localeStrings.selectAll).bind("click",(function(){return b.find("input:visible").prop("checked",!0)}))),r.append(e("<button>",{type:"button"}).html(R.localeStrings.selectNone).bind("click",(function(){return b.find("input:visible").prop("checked",!1)}))),r.append(e("<br>")),r.append(e("<input>",{type:"text",placeholder:R.localeStrings.filterResults,class:"pvtSearch"}).bind("keyup",(function(){var t;return t=e(this).val().toLowerCase(),b.find(".pvtCheckContainer p").each((function(){return-1!==e(this).text().toLowerCase().indexOf(t)?e(this).show():e(this).hide()}))}))),o=e("<div>").addClass("pvtCheckContainer").appendTo(b),f=0,d=(h=u.sort(p(R.sorters,t))).length;f<d;f++)C=h[f],x=c[t][C],s=e("<label>"),a=!1,R.inclusions[t]?a=i.call(R.inclusions[t],C)<0:R.exclusions[t]&&(a=i.call(R.exclusions[t],C)>=0),l||(l=a),e("<input>").attr("type","checkbox").addClass("pvtFilter").attr("checked",!a).data("filter",[t,C]).appendTo(s),s.append(e("<span>").html(C)),s.append(e("<span>").text(" ("+x+")")),o.append(e("<p>").append(s));return y=function(){return b.find("[type='checkbox']").length-b.find("[type='checkbox']:checked").length>0?n.addClass("pvtFilteredAttribute"):n.removeClass("pvtFilteredAttribute"),u.length>R.menuLimit?b.toggle():b.toggle(0,j)},e("<p>").appendTo(b).append(e("<button>",{type:"button"}).text("OK").bind("click",y)),m=function(t){var n,r,i;return n=(i=e(t.currentTarget).position()).left,r=i.top,b.css({left:n+10,top:r+10}).toggle(),b.find(".pvtSearch").val(""),b.find(".pvtCheckContainer p").show()},v=e("<span>").addClass("pvtTriangle").html(" ▾").bind("click",m),n=e("<li>").addClass("axis_"+E).append(e("<span>").addClass("pvtAttr").text(t).data("attrName",t).append(v)),l&&n.addClass("pvtFilteredAttribute"),g.append(n).append(b),n.bind("dblclick",m)},H)a.call(H,E)&&x(f=H[E]);for(X in V=e("<tr>").appendTo(z),l=e("<select>").addClass("pvtAggregator").bind("change",(function(){return j()})),P=R.aggregators)a.call(P,X)&&l.append(e("<option>").val(X).html(X));for(e("<td>").addClass("pvtVals").appendTo(V).append(l).append(e("<br>")),e("<td>").addClass("pvtAxisContainer pvtHorizList pvtCols").appendTo(V),(W=e("<tr>").appendTo(z)).append(e("<td>").addClass("pvtAxisContainer pvtRows").attr("valign","top")),_=e("<td>").attr("valign","top").addClass("pvtRendererArea").appendTo(W),!0===R.unusedAttrsVertical||Q?(z.find("tr:nth-child(1)").prepend(B),z.find("tr:nth-child(2)").prepend(g)):z.prepend(e("<tr>").append(B).append(g)),this.html(z),M=R.cols,A=0,N=M.length;A<N;A++)X=M[A],this.find(".pvtCols").append(this.find(".axis_"+e.inArray(X,H)));for(F=R.rows,O=0,L=F.length;O<L;O++)X=F[O],this.find(".pvtRows").append(this.find(".axis_"+e.inArray(X,H)));null!=R.aggregatorName&&this.find(".pvtAggregator").val(R.aggregatorName),null!=R.rendererName&&this.find(".pvtRenderer").val(R.rendererName),b=!0,Y=this,U=function(){var t,r,o,s,a,u,c,p,d,f,g,m,v,y,x;if(m={derivedAttributes:R.derivedAttributes,localeStrings:R.localeStrings,rendererOptions:R.rendererOptions,sorters:R.sorters,cols:[],rows:[]},u=null!=(d=R.aggregators[l.val()]([])().numInputs)?d:0,x=[],Y.find(".pvtRows li span.pvtAttr").each((function(){return m.rows.push(e(this).data("attrName"))})),Y.find(".pvtCols li span.pvtAttr").each((function(){return m.cols.push(e(this).data("attrName"))})),Y.find(".pvtVals select.pvtAttrDropdown").each((function(){return 0===u?e(this).remove():(u--,""!==e(this).val()?x.push(e(this).val()):void 0)})),0!==u)for(p=Y.find(".pvtVals"),X=g=0,f=u;0<=f?g<f:g>f;X=0<=f?++g:--g){for(a=e("<select>").addClass("pvtAttrDropdown").append(e("<option>")).bind("change",(function(){return j()})),v=0,s=H.length;v<s;v++)t=H[v],a.append(e("<option>").val(t).text(t));p.append(a)}if(b&&(x=R.vals,E=0,Y.find(".pvtVals select.pvtAttrDropdown").each((function(){return e(this).val(x[E]),E++})),b=!1),m.aggregatorName=l.val(),m.vals=x,m.aggregator=R.aggregators[l.val()](x),m.renderer=R.renderers[G.val()],r={},Y.find("input.pvtFilter").not(":checked").each((function(){var t;return t=e(this).data("filter"),null!=r[t[0]]?r[t[0]].push(t[1]):r[t[0]]=[t[1]]})),o={},Y.find("input.pvtFilter:checked").each((function(){var t;if(t=e(this).data("filter"),null!=r[t[0]])return null!=o[t[0]]?o[t[0]].push(t[1]):o[t[0]]=[t[1]]})),m.filter=function(e){var t,n;if(!R.filter(e))return!1;for(C in r)if(t=r[C],n=""+e[C],i.call(t,n)>=0)return!1;return!0},_.pivot(n,m),c=e.extend(R,{cols:m.cols,rows:m.rows,vals:x,exclusions:r,inclusions:o,inclusionsInfo:o,aggregatorName:l.val(),rendererName:G.val()}),Y.data("pivotUIOptions",c),R.autoSortUnusedAttrs&&(y=Y.find("td.pvtUnused.pvtAxisContainer"),e(y).children("li").sort((function(t,n){return h(e(t).text(),e(n).text())})).appendTo(y)),_.css("opacity",1),null!=R.onRefresh)return R.onRefresh(c)},(j=function(){return _.css("opacity",.5),setTimeout(U,10)})(),this.find(".pvtAxisContainer").sortable({update:function(e,t){if(null==t.sender)return j()},connectWith:this.find(".pvtAxisContainer"),items:"li",placeholder:"pvtPlaceholder"})}catch(e){v=e,"undefined"!=typeof console&&null!==console&&console.error(v.stack),this.html(R.localeStrings.uiRenderError)}return this},e.fn.heatmap=function(t){var n,r,i,o,s,a,l,u,c,p,d;switch(null==t&&(t="heatmap"),u=this.data("numrows"),l=this.data("numcols"),n=function(e,t,n){var r;return r=function(){switch(e){case"red":return function(e){return"ff"+e+e};case"green":return function(e){return e+"ff"+e};case"blue":return function(e){return""+e+e+"ff"}}}(),function(e){var i;return 1===(i=(255-Math.round(255*(e-t)/(n-t))).toString(16).split(".")[0]).length&&(i=0+i),r(i)}},d=this,r=function(t,r){var i,o,s;return s=[],(o=function(n){return d.find(t).each((function(){var t;if(null!=(t=e(this).data("value"))&&isFinite(t))return n(t,e(this))}))})((function(e){return s.push(e)})),i=n(r,Math.min.apply(Math,s),Math.max.apply(Math,s)),o((function(e,t){return t.css("background-color","#"+i(e))}))},t){case"heatmap":r(".pvtVal","red");break;case"rowheatmap":for(i=s=0,c=u;0<=c?s<c:s>c;i=0<=c?++s:--s)r(".pvtVal.row"+i,"red");break;case"colheatmap":for(o=a=0,p=l;0<=p?a<p:a>p;o=0<=p?++a:--a)r(".pvtVal.col"+o,"red")}return r(".pvtTotal.rowTotal","red"),r(".pvtTotal.colTotal","red"),this},e.fn.barchart=function(){var t,n,r,i,o,s;for(i=this.data("numrows"),this.data("numcols"),s=this,t=function(t){var n,r,i,o;return o=[],(n=function(n){return s.find(t).each((function(){var t;if(null!=(t=e(this).data("value"))&&isFinite(t))return n(t,e(this))}))})((function(e){return o.push(e)})),r=Math.max.apply(Math,o),i=function(e){return 100*e/(1.4*r)},n((function(t,n){var r,o;return r=n.text(),(o=e("<div>").css({position:"relative",height:"55px"})).append(e("<div>").css({position:"absolute",bottom:0,left:0,right:0,height:i(t)+"%","background-color":"gray"})),o.append(e("<div>").text(r).css({position:"relative","padding-left":"5px","padding-right":"5px"})),n.css({padding:0,"padding-top":"5px","text-align":"center"}).html(o)}))},n=r=0,o=i;0<=o?r<o:r>o;n=0<=o?++r:--r)t(".pvtVal.row"+n);return t(".pvtTotal.colTotal"),this}},"object"==typeof n&&"object"==typeof t?r(e("jquery")):"function"==typeof define&&define.amd?define(["jquery"],r):r(jQuery)}).call(this)},{jquery:18}],23:[function(e,t,n){var r=e("../src/store-engine"),i=e("../storages/all"),o=[e("../plugins/json2")];t.exports=r.createStore(i,o)},{"../plugins/json2":24,"../src/store-engine":26,"../storages/all":28}],24:[function(e,t,n){t.exports=function(){return e("./lib/json2"),{}}},{"./lib/json2":25}],25:[function(require,module,exports){"object"!=typeof JSON&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,(function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function str(e,t){var n,r,i,o,s,a=gap,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,s=[],"[object Array]"===Object.prototype.toString.apply(l)){for(o=l.length,n=0;n<o;n+=1)s[n]=str(n,l)||"null";return i=0===s.length?"[]":gap?"[\n"+gap+s.join(",\n"+gap)+"\n"+a+"]":"["+s.join(",")+"]",gap=a,i}if(rep&&"object"==typeof rep)for(o=rep.length,n=0;n<o;n+=1)"string"==typeof rep[n]&&(i=str(r=rep[n],l))&&s.push(quote(r)+(gap?": ":":")+i);else for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(i=str(r,l))&&s.push(quote(r)+(gap?": ":":")+i);return i=0===s.length?"{}":gap?"{\n"+gap+s.join(",\n"+gap)+"\n"+a+"}":"{"+s.join(",")+"}",gap=a,i}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;r<n;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(e,t){var n,r,i=e[t];if(i&&"object"==typeof i)for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(void 0!==(r=walk(i,n))?i[n]=r:delete i[n]);return reviver.call(e,t,i)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},{}],26:[function(e,t,n){var r=e("./util"),i=r.slice,o=r.pluck,s=r.each,a=r.bind,l=r.create,u=r.isList,c=r.isFunction,p=r.isObject;t.exports={createStore:f};var d={version:"2.0.12",enabled:!1,get:function(e,t){var n=this.storage.read(this._namespacePrefix+e);return this._deserialize(n,t)},set:function(e,t){return void 0===t?this.remove(e):(this.storage.write(this._namespacePrefix+e,this._serialize(t)),t)},remove:function(e){this.storage.remove(this._namespacePrefix+e)},each:function(e){var t=this;this.storage.each((function(n,r){e.call(t,t._deserialize(n),(r||"").replace(t._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(e){return this._namespacePrefix=="__storejs_"+e+"_"},createStore:function(){return f.apply(this,arguments)},addPlugin:function(e){this._addPlugin(e)},namespace:function(e){return f(this.storage,this.plugins,e)}};function f(e,t,n){n||(n=""),e&&!u(e)&&(e=[e]),t&&!u(t)&&(t=[t]);var r=n?"__storejs_"+n+"_":"",f=n?new RegExp("^"+r):null;if(!/^[a-zA-Z0-9_\-]*$/.test(n))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var h=l({_namespacePrefix:r,_namespaceRegexp:f,_testStorage:function(e){try{var t="__storejs__test__";e.write(t,t);var n=e.read(t)===t;return e.remove(t),n}catch(e){return!1}},_assignPluginFnProp:function(e,t){var n=this[t];this[t]=function(){var t=i(arguments,0),r=this;function o(){if(n)return s(arguments,(function(e,n){t[n]=e})),n.apply(r,t)}var a=[o].concat(t);return e.apply(r,a)}},_serialize:function(e){return JSON.stringify(e)},_deserialize:function(e,t){if(!e)return t;var n="";try{n=JSON.parse(e)}catch(t){n=e}return void 0!==n?n:t},_addStorage:function(e){this.enabled||this._testStorage(e)&&(this.storage=e,this.enabled=!0)},_addPlugin:function(e){var t=this;if(u(e))s(e,(function(e){t._addPlugin(e)}));else if(!o(this.plugins,(function(t){return e===t}))){if(this.plugins.push(e),!c(e))throw new Error("Plugins must be function values that return objects");var n=e.call(this);if(!p(n))throw new Error("Plugins must return an object of function properties");s(n,(function(n,r){if(!c(n))throw new Error("Bad plugin property: "+r+" from plugin "+e.name+". Plugins should only return functions.");t._assignPluginFnProp(n,r)}))}},addStorage:function(e){!function(){var e="undefined"==typeof console?null:console;if(e){var t=e.warn?e.warn:e.log;t.apply(e,arguments)}}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(e)}},d,{plugins:[]});return h.raw={},s(h,(function(e,t){c(e)&&(h.raw[t]=a(h,e))})),s(e,(function(e){h._addStorage(e)})),s(t,(function(e){h._addPlugin(e)})),h}},{"./util":27}],27:[function(e,t,n){(function(e){var n=Object.assign?Object.assign:function(e,t,n,r){for(var i=1;i<arguments.length;i++)a(Object(arguments[i]),(function(t,n){e[n]=t}));return e},r=function(){if(Object.create)return function(e,t,r,i){var o=s(arguments,1);return n.apply(this,[Object.create(e)].concat(o))};{function e(){}return function(t,r,i,o){var a=s(arguments,1);return e.prototype=t,n.apply(this,[new e].concat(a))}}}(),i=String.prototype.trim?function(e){return String.prototype.trim.call(e)}:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},o="undefined"!=typeof window?window:e;function s(e,t){return Array.prototype.slice.call(e,t||0)}function a(e,t){l(e,(function(e,n){return t(e,n),!1}))}function l(e,t){if(u(e)){for(var n=0;n<e.length;n++)if(t(e[n],n))return e[n]}else for(var r in e)if(e.hasOwnProperty(r)&&t(e[r],r))return e[r]}function u(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}t.exports={assign:n,create:r,trim:i,bind:function(e,t){return function(){return t.apply(e,Array.prototype.slice.call(arguments,0))}},slice:s,each:a,map:function(e,t){var n=u(e)?[]:{};return l(e,(function(e,r){return n[r]=t(e,r),!1})),n},pluck:l,isList:u,isFunction:function(e){return e&&"[object Function]"==={}.toString.call(e)},isObject:function(e){return e&&"[object Object]"==={}.toString.call(e)},Global:o}}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],28:[function(e,t,n){t.exports=[e("./localStorage"),e("./oldFF-globalStorage"),e("./oldIE-userDataStorage"),e("./cookieStorage"),e("./sessionStorage"),e("./memoryStorage")]},{"./cookieStorage":29,"./localStorage":30,"./memoryStorage":31,"./oldFF-globalStorage":32,"./oldIE-userDataStorage":33,"./sessionStorage":34}],29:[function(e,t,n){var r=e("../src/util"),i=r.Global,o=r.trim;t.exports={name:"cookieStorage",read:function(e){if(!e||!u(e))return null;var t="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(s.cookie.replace(new RegExp(t),"$1"))},write:function(e,t){e&&(s.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")},each:a,remove:l,clearAll:function(){a((function(e,t){l(t)}))}};var s=i.document;function a(e){for(var t=s.cookie.split(/; ?/g),n=t.length-1;n>=0;n--)if(o(t[n])){var r=t[n].split("="),i=unescape(r[0]);e(unescape(r[1]),i)}}function l(e){e&&u(e)&&(s.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function u(e){return new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(s.cookie)}},{"../src/util":27}],30:[function(e,t,n){var r=e("../src/util").Global;function i(){return r.localStorage}function o(e){return i().getItem(e)}t.exports={name:"localStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var n=i().key(t);e(o(n),n)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},{"../src/util":27}],31:[function(e,t,n){t.exports={name:"memoryStorage",read:function(e){return r[e]},write:function(e,t){r[e]=t},each:function(e){for(var t in r)r.hasOwnProperty(t)&&e(r[t],t)},remove:function(e){delete r[e]},clearAll:function(e){r={}}};var r={}},{}],32:[function(e,t,n){var r=e("../src/util").Global;t.exports={name:"oldFF-globalStorage",read:function(e){return i[e]},write:function(e,t){i[e]=t},each:o,remove:function(e){return i.removeItem(e)},clearAll:function(){o((function(e,t){delete i[e]}))}};var i=r.globalStorage;function o(e){for(var t=i.length-1;t>=0;t--){var n=i.key(t);e(i[n],n)}}},{"../src/util":27}],33:[function(e,t,n){var r=e("../src/util").Global;t.exports={name:"oldIE-userDataStorage",write:function(e,t){if(!s){var n=l(e);o((function(e){e.setAttribute(n,t),e.save("storejs")}))}},read:function(e){if(!s){var t=l(e),n=null;return o((function(e){n=e.getAttribute(t)})),n}},each:function(e){o((function(t){for(var n=t.XMLDocument.documentElement.attributes,r=n.length-1;r>=0;r--){var i=n[r];e(t.getAttribute(i.name),i.name)}}))},remove:function(e){var t=l(e);o((function(e){e.removeAttribute(t),e.save("storejs")}))},clearAll:function(){o((function(e){var t=e.XMLDocument.documentElement.attributes;e.load("storejs");for(var n=t.length-1;n>=0;n--)e.removeAttribute(t[n].name);e.save("storejs")}))}};var i=r.document,o=function(){if(!i||!i.documentElement||!i.documentElement.addBehavior)return null;var e,t,n;try{(t=new ActiveXObject("htmlfile")).open(),t.write('<script>document.w=window<\/script><iframe src="/favicon.ico"></iframe>'),t.close(),e=t.w.frames[0].document,n=e.createElement("div")}catch(t){n=i.createElement("div"),e=i.body}return function(t){var r=[].slice.call(arguments,0);r.unshift(n),e.appendChild(n),n.addBehavior("#default#userData"),n.load("storejs"),t.apply(this,r),e.removeChild(n)}}(),s=(r.navigator?r.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./),a=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function l(e){return e.replace(/^\d/,"___$&").replace(a,"___")}},{"../src/util":27}],34:[function(e,t,n){var r=e("../src/util").Global;function i(){return r.sessionStorage}function o(e){return i().getItem(e)}t.exports={name:"sessionStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var n=i().key(t);e(o(n),n)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},{"../src/util":27}],35:[function(e,t,n){t.exports={_args:[[{raw:"yasgui-utils@^1.4.1",scope:null,escapedName:"yasgui-utils",name:"yasgui-utils",rawSpec:"^1.4.1",spec:">=1.4.1 <2.0.0",type:"range"},"/home/yordan/dev/ontotext/YASR-Ontotext"]],_from:"yasgui-utils@>=1.4.1 <2.0.0",_id:"yasgui-utils@1.6.7",_inCache:!0,_location:"/yasgui-utils",_nodeVersion:"7.10.0",_npmOperationalInternal:{host:"s3://npm-registry-packages",tmp:"tmp/yasgui-utils-1.6.7.tgz_1495459781202_0.06725964159704745"},_npmUser:{name:"laurens.rietveld",email:"laurens.rietveld@gmail.com"},_npmVersion:"4.2.0",_phantomChildren:{},_requested:{raw:"yasgui-utils@^1.4.1",scope:null,escapedName:"yasgui-utils",name:"yasgui-utils",rawSpec:"^1.4.1",spec:">=1.4.1 <2.0.0",type:"range"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/yasgui-utils/-/yasgui-utils-1.6.7.tgz",_shasum:"2bcfc5a315688de3ae6057883d9ae342b205f267",_shrinkwrap:null,_spec:"yasgui-utils@^1.4.1",_where:"/home/yordan/dev/ontotext/YASR-Ontotext",author:{name:"Laurens Rietveld"},bugs:{url:"https://github.com/YASGUI/Utils/issues"},dependencies:{store:"^2.0.4"},deprecated:"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",description:"Utils for YASGUI libs",devDependencies:{},directories:{},dist:{shasum:"2bcfc5a315688de3ae6057883d9ae342b205f267",tarball:"https://registry.npmjs.org/yasgui-utils/-/yasgui-utils-1.6.7.tgz",integrity:"sha512-w9BnalJg330lZhljHn0j6Ta6jyQTJL8nbhjyeDj4Z9PrX7GLrgcwq7CO7uP6Keq86L1XjpUgUU6JAmTlmkXj6w==",signatures:[{keyid:"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",sig:"MEUCIQChXn8SW+Xzp3hIj8sCOEzZO7ohF5kxjzHo5OmcJ1XO/wIgcBFbqGmN4Iyiw9ptQjoCz57rpREAGaXlYIf2o+zj68I="}]},gitHead:"6031b1cb732d390b29cd5376dceb9a9d665bbd11",homepage:"https://github.com/YASGUI/Utils",licenses:[{type:"MIT",url:"http://yasgui.github.io/license.txt"}],main:"src/main.js",maintainers:[{name:"laurens.rietveld",email:"laurens.rietveld@gmail.com"}],name:"yasgui-utils",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/YASGUI/Utils.git"},scripts:{},version:"1.6.7"}},{}],36:[function(e,t,n){window.console=window.console||{log:function(){}},t.exports={storage:e("./storage.js"),svg:e("./svg.js"),version:{"yasgui-utils":e("../package.json").version},nestedExists:function(e){for(var t=Array.prototype.slice.call(arguments,1),n=0;n<t.length;n++){if(!e||!e.hasOwnProperty(t[n]))return!1;e=e[t[n]]}return!0}}},{"../package.json":35,"./storage.js":37,"./svg.js":38}],37:[function(e,t,n){var r=e("store"),i={day:function(){return 864e5},month:function(){i.day()},year:function(){i.month()}},o=t.exports={set:function(e,t,n,o){if(r.enabled&&e&&void 0!==t){"string"==typeof n&&(n=i[n]()),t.documentElement&&(t=(new XMLSerializer).serializeToString(t.documentElement));try{r.set(e,{val:t,exp:n,time:(new Date).getTime()})}catch(e){if(e.quotaExceeded=function(e){var t=!1;if(e)if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t}(e),!e.quotaExceeded||!o)throw e;o(e)}}},remove:function(e){r.enabled&&e&&r.remove(e)},removeAll:function(e){r.enabled&&(e?"function"==typeof e&&r.each((function(t,n){e(n,t)&&o.remove(n)})):r.clearAll())},get:function(e){if(!r.enabled)return null;if(e){var t=r.get(e);return t?t.exp&&(new Date).getTime()-t.time>t.exp?null:t.val:null}return null}}},{store:23}],38:[function(e,t,n){t.exports={draw:function(e,n){if(e){var r=t.exports.getElement(n);r&&(e.append?e.append(r):e.appendChild(r))}},getElement:function(e){if(e&&0==e.indexOf("<svg")){var t=(new DOMParser).parseFromString(e,"text/xml").documentElement,n=document.createElement("div");return n.className="svgImg",n.appendChild(t),n}return!1}}},{}],39:[function(e,t,n){t.exports={name:"yasgui-yasr",description:"Yet Another SPARQL Resultset GUI",version:"2.4.12",main:"src/main.js",scripts:{dev:"gulp serve",build:"gulp"},licenses:[{type:"MIT",url:"http://yasr.yasgui.org/license.txt"}],author:"Laurens Rietveld",homepage:"http://yasr.yasgui.org",devDependencies:{browserify:"^6.1.0",gulp:"~3.9.0","gulp-bump":"^0.1.11","gulp-concat":"^2.4.1","gulp-connect":"^2.0.5","gulp-embedlr":"^0.5.2","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jsvalidate":"^0.2.0","gulp-livereload":"^1.3.1","gulp-minify-css":"0.3.11","gulp-notify":"^2.0.1","gulp-rename":"^1.2.0","gulp-streamify":"0.0.5","gulp-tag-version":"^1.1.0","gulp-uglify":"~0.2.1","require-dir":"^0.1.0","run-sequence":"^1.0.1","vinyl-buffer":"^1.0.0","vinyl-source-stream":"~0.1.1",watchify:"^0.6.4","gulp-sourcemaps":"^1.2.8",exorcist:"^0.1.6","vinyl-transform":"0.0.1","gulp-sass":"^2.2.0","bootstrap-sass":"~3.3.1","browserify-transform-tools":"^1.2.1","gulp-cssimport":"^1.3.1","gulp-html-replace":"^1.4.1","browserify-shim":"^3.8.1"},bugs:"https://github.com/YASGUI/YASR/issues/",keywords:["JavaScript","SPARQL","Editor","Semantic Web","Linked Data"],maintainers:[{name:"Laurens Rietveld",email:"laurens.rietveld@gmail.com",web:"http://laurensrietveld.nl"}],repository:{type:"git",url:"https://github.com/YASGUI/YASR.git"},dependencies:{jquery:"1.11.0",codemirror:"^4.7.0","yasgui-utils":"^1.4.1",pivottable:"^1.2.2","jquery-ui":"1.10.5",cytoscape:"^2.3.11",lodash:"^3.6.0"},"browserify-shim":{google:"global:google"},browserify:{transform:["browserify-shim"]},optionalShim:{codemirror:{require:"codemirror",global:"CodeMirror"},jquery:{require:"jquery",global:"jQuery"},"../../lib/codemirror":{require:"codemirror",global:"CodeMirror"},"../lib/DataTables/media/js/jquery.dataTables.js":{require:"datatables",global:"jQuery"},datatables:{require:"datatables",global:"jQuery"},"jquery-ui/sortable":{require:"jquery-ui/sortable",global:"jQuery"},pivottable:{require:"pivottable",global:"jQuery"}}}},{}],40:[function(e,t,n){"use strict";t.exports=function(e){var t=e.head.vars,n=e.results.bindings,r=function(e){for(var n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)?i(e[r].value):i("")}},i=function(e){e.replace('"','""'),o(e)&&(e='"'+e+'"'),s+=" "+e+" ,"},o=function(e){var t=!1;return e.match('[\\w|,|"]')&&(t=!0),t},s="";return function(){for(var e=0;e<t.length;e++)i(t[e]);s+="\n"}(),function(){for(var e=0;e<n.length;e++)r(n[e]),s+="\n"}(),s}},{}],41:[function(e,t,n){"use strict";var r=e("jquery");(t.exports=function(t){t.translate=e("./translate.js").translate;var n=r("<div class='booleanResult'></div>"),i={id:"boolean",name:null,hideFromSelection:!0,getPriority:1};return i.options=r.extend(!0,{},t.options.pluginsOptions?t.options.pluginsOptions[i.id]:{}),i.draw=function(){n.empty().appendTo(t.resultsContainer);var i=t.results.getBoolean(),o=null,s=null;!0===i?(o="check",s=t.translate("yasr.boolean.true")):!1===i?(o="cross",s=t.translate("yasr.boolean.false")):(n.width("140"),s=t.translate("yasr.boolean.no_boolean")),o&&e("yasgui-utils").svg.draw(n,e("./imgs.js")[o]),r("<span></span>").text(s).appendTo(n)},i.canHandleResults=function(){return t.results.getBoolean&&(!0===t.results.getBoolean()||0==t.results.getBoolean())},i}).version={"YASR-boolean":e("../package.json").version,jquery:r.fn.jquery}},{"../package.json":39,"./imgs.js":51,"./translate.js":65,jquery:18,"yasgui-utils":36}],42:[function(e,t,n){"use strict";var r=e("jquery");(t.exports=function(t){t.translate=e("./translate.js").translate;var n=r("<div class='booleanBootResult'></div>");const i={id:"booleanBootstrap",name:null,hideFromSelection:!0,getPriority:3};return i.options=r.extend(!0,{},t.options.pluginsOptions?t.options.pluginsOptions[i.id]:{}),i.draw=function(){n.empty().appendTo(t.resultsContainer);var e=t.results.getBoolean(),i=null;!0===e?i=r("<div class='boolRes alert alert-success no-icon'><span class='boolResTex'>"+t.translate("yasr.boolean.alert.yes")+"</span></div>"):!1===e?i=r("<div class='boolRes alert alert-danger no-icon'><span class='boolResTex'>"+t.translate("yasr.boolean.alert.no")+"</span></div>"):(n.width("140"),textVal=t.translate("yasr.boolean.no_boolean")),i.appendTo(n)},i.canHandleResults=function(){return t.results.getBoolean&&(!0===t.results.getBoolean()||0==t.results.getBoolean())},i}).version={"YASR-boolean":e("../package.json").version,jquery:r.fn.jquery}},{"../package.json":39,"./translate.js":65,jquery:18}],43:[function(e,t,n){"use strict";var r=e("jquery");t.exports={output:"table",useGoogleCharts:!0,outputPlugins:["table","error","boolean","rawResponse"],drawOutputSelector:!0,drawDownloadIcon:!0,getUsedPrefixes:null,persistency:{prefix:function(e){return"yasr_"+r(e.container).closest("[id]").attr("id")+"_"},outputSelector:function(e){return"selector"},results:{id:function(e){return"results_"+r(e.container).closest("[id]").attr("id")},key:"results",maxSize:1e5},translateHeaders:!1}}},{jquery:18}],44:[function(e,t,n){"use strict";var r=e("jquery"),i=t.exports=function(t){t.translate=e("./translate.js").translate;var n=r("<div class='errorResult'></div>");const o={id:"error",name:null,getPriority:20,hideFromSelection:!0},s=t.options.pluginsOptions?t.options.pluginsOptions[o.id]:{};var a=o.options=r.extend(!0,{},i.defaults,s),l=function(){var e=null;if(a.tryQueryLink){var n=a.tryQueryLink();e=r("<button>",{class:"yasr_btn yasr_tryQuery"}).text(t.translate("yasr.error.new_window")).click((function(){window.open(n,"_blank"),r(this).blur()}))}return e};return o.draw=function(){var e=t.results.getException();n.empty().appendTo(t.resultsContainer);var i=r("<div>",{class:"errorHeader"}).appendTo(n);if(0!==e.status){var o="Error";e.statusText&&e.statusText.length<100&&(o=e.statusText),o+=" (#"+e.status+")",i.append(r("<span>",{class:"exception"}).text(o)).append(l());var s=null;e.responseText?s=e.responseText:"string"==typeof e&&(s=e),s&&n.append(r("<pre>").text(s))}else i.append(l()),n.append(r("<div>",{class:"corsMessage"}).append(a.corsMessage))},o.canHandleResults=function(e){return e.results.getException()||!1},o};i.defaults={corsMessage:yasr.translate("yasr.error.no_response"),tryQueryLink:null}},{"./translate.js":65,jquery:18}],45:[function(e,t,n){t.exports={GoogleTypeException:function(t,n){let r=e("./translate.js").translate;this.foundTypes=t,this.varName=n,this.toString=function(){return r("yasr.exceptions.conflict",{key:"varName",value:this.varName})},this.toHtml=function(){return r("yasr.exceptions.conflict_render",{key:"varName",value:"<i>"+this.varName+"</i>"})}}}},{"./translate.js":65}],46:[function(e,t,n){"use strict";const{translate:r}=e("./translate");function i(){return r("yasr.download.as.label")}t.exports={getSelectSaveAsDropDown:function(){return'<div class="saveAsDropDown btn-group pull-right"><button id="saveAsBtn" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" type="button">'+i()+' </button><ul class="dropdown-menu" role="menu"><li><a class="format dropdown-item" data-accepts="application/sparql-results+json" href="#">JSON</a></li><li><a class="format dropdown-item" data-accepts="application/x-sparqlstar-results+json" href="#">JSON*</a></li><li><a class="format dropdown-item" data-accepts="application/sparql-results+xml" href="#">XML</a></li><li><a class="format dropdown-item" data-accepts="application/x-sparqlstar-results+xml" href="#">XML*</a></li><li><a class="format dropdown-item" data-accepts="text/csv" href="#">CSV</a></li><li><a class="format dropdown-item " data-accepts="text/tab-separated-values" href="#">TSV</a></li><li><a class="format dropdown-item " data-accepts="text/x-tab-separated-values-star" href="#">TSV*</a></li><li><a class="format dropdown-item" data-accepts="application/x-binary-rdf-results-table" href="#">Binary RDF Results</a></li></ul></div>'},getGraphSaveAsDropDown:function(){return'<div class="saveAsDropDown btn-group pull-right"><button id="saveAsBtn" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" type="button">'+i()+' </button><ul class="dropdown-menu" role="menu"><li><a class="format dropdown-item" data-accepts="application/rdf+json" href="#">JSON</a></li><li><a class="format dropdown-item" data-accepts="application/ld+json" href="#">JSON-LD</a></li><li><a class="format dropdown-item" data-accepts="application/x-ld+ndjson" href="#">NDJSON-LD</a></li><li><a class="format dropdown-item" data-accepts="application/rdf+xml" href="#">RDF-XML</a></li><li><a class="format dropdown-item" data-accepts="text/rdf+n3" href="#">N3</a></li><li><a class="format dropdown-item" data-accepts="text/plain" href="#">N-Triples</a></li><li><a class="format dropdown-item" data-accepts="text/x-nquads" href="#">N-Quads</a></li><li><a class="format dropdown-item" data-accepts="text/turtle" href="#">Turtle</a></li><li><a class="format dropdown-item" data-accepts="application/x-turtlestar" href="#">Turtle*</a></li><li><a class="format dropdown-item" data-accepts="application/trix" href="#">TriX</a></li><li><a class="format dropdown-item" data-accepts="application/x-trig" href="#">TriG</a></li><li><a class="format dropdown-item" data-accepts="application/x-trigstar" href="#">TriG*</a></li><li><a class="format dropdown-item" data-accepts="application/x-binary-rdf" href="#">Binary RDF</a></li></ul></div>'}}},{"./translate":65}],47:[function(e,t,n){(function(n){var r=e("events").EventEmitter,i=(e("jquery"),!1),o=!1,s=function(){let t=e("./translate.js").translate;r.call(this);var s=this;this.init=function(){if(o||("undefined"!=typeof window?window.google:void 0!==n&&n.google)||i)("undefined"!=typeof window?window.google:void 0!==n&&n.google)?s.emit("initDone"):o&&s.emit("initError");else{i=!0,a("https://google.com/jsapi",(function(){i=!1,s.emit("initDone")}));var e=+new Date,t=function(){("undefined"!=typeof window?window.google:void 0!==n&&n.google)||(+new Date-e>6e3?(o=!0,i=!1,s.emit("initError")):setTimeout(t,100))};t()}},this.googleLoad=function(){var e=function(){("undefined"!=typeof window?window.google:void 0!==n?n.google:null).load("visualization","1",{packages:["corechart","charteditor"],callback:function(){s.emit("done")}})};i?(s.once("initDone",e),s.once("initError",(function(){s.emit("error",t("yasr.gchartLoader.unable_to_load"))}))):("undefined"!=typeof window?window.google:void 0!==n&&n.google)?e():o?s.emit("error",t("yasr.gchartLoader.unable_to_load")):(s.once("initDone",e),s.once("initError",(function(){s.emit("error",t("yasr.gchartLoader.unable_to_load"))})))}},a=function(e,t){var n=document.createElement("script");n.type="text/javascript",n.readyState?n.onreadystatechange=function(){"loaded"!=n.readyState&&"complete"!=n.readyState||(n.onreadystatechange=null,t())}:n.onload=function(){t()},n.src=e,document.body.appendChild(n)};s.prototype=new r,t.exports=new s}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./translate.js":65,events:13,jquery:18}],48:[function(e,t,n){(function(n){"use strict";var r=e("jquery"),i=e("./utils.js"),o=e("yasgui-utils"),s=t.exports=function(t){t.translate=e("./translate.js").translate;var a=r.extend(!0,{},s.defaults),l=t.container.closest("[id]").attr("id");null==t.options.gchart&&(t.options.gchart={});var u=t.getPersistencyId("motionchart"),c=t.getPersistencyId("chartConfig");null==t.options.gchart.motionChartState&&(t.options.gchart.motionChartState=o.storage.get(u)),null==t.options.gchart.chartConfig&&(t.options.gchart.chartConfig=o.storage.get(c));var p=null,d=function(e){var r="undefined"!=typeof window?window.google:void 0!==n?n.google:null;p=new r.visualization.ChartEditor,r.visualization.events.addListener(p,"ok",(function(){var e,n,i,s,l,d,f,h;e=p.getChartWrapper(),i=e.getChartType,s="===",l={}.toString,d={}.hasOwnProperty,f=function(e,t){return d.call(e,t)},h=!0,function e(t,n,r){var i,o,a,u,c,p,d,g;if(null==t||null==n)return t===n;if(t.__placeholder__||n.__placeholder__)return!0;if(t===n)return 0!==t||1/t==1/n;if(i=l.call(t),l.call(n)!=i)return!1;switch(i){case"[object String]":return t==String(n);case"[object Number]":return t!=+t?n!=+n:0==t?1/t==1/n:t==+n;case"[object Date]":case"[object Boolean]":return+t==+n;case"[object RegExp]":return t.source==n.source&&t.global==n.global&&t.multiline==n.multiline&&t.ignoreCase==n.ignoreCase}if("object"!=typeof t||"object"!=typeof n)return!1;for(o=r.length;o--;)if(r[o]==t)return!0;if(r.push(t),a=0,u=!0,"[object Array]"==i){if(c=t.length,p=n.length,h){switch(s){case"===":u=c===p;break;case"<==":u=c<=p;break;case"<<=":u=c<p}a=c,h=!1}else u=c===p,a=c;if(u)for(;a--&&(u=a in t==a in n&&e(t[a],n[a],r)););}else{if("constructor"in t!="constructor"in n||t.constructor!=n.constructor)return!1;for(d in t)if(f(t,d)&&(a++,!(u=f(n,d)&&e(t[d],n[d],r))))break;if(u){for(d in g=0,n)f(n,d)&&++g;h?u="<<="===s?a<g:"<=="===s?a<=g:a===g:(h=!1,u=a===g)}}return r.pop(),u}(i,"MotionChart",[])||(t.options.gchart.motionChartState=e.n,o.storage.set(u,t.options.gchart.motionChartState),e.setOption("state",t.options.gchart.motionChartState),r.visualization.events.addListener(e,"ready",(function(){var n;n=e.getChart(),r.visualization.events.addListener(n,"statechange",(function(){t.options.gchart.motionChartState=n.getState(),o.storage.set(u,t.options.gchart.motionChartState)}))}))),n=e.getDataTable(),e.setDataTable(null),t.options.gchart.chartConfig=e.toJSON(),o.storage.set(c,t.options.gchart.chartConfig),e.setDataTable(n),e.setOption("width",a.width),e.setOption("height",a.height),e.draw(),t.updateHeader()})),e&&e()};return{name:"Google Chart",nameLabel:"yasr.gchart.chart_name",hideFromSelection:!1,priority:7,canHandleResults:function(e){var t,n;return null!=(t=e.results)&&(n=t.getVariables())&&n.length>0},getDownloadInfo:function(){if(!t.results)return null;var e=t.resultsContainer.find("svg");if(e.length>0)return{getContent:function(){return e[0].outerHTML?e[0].outerHTML:r("<div>").append(e.clone()).html()},filename:"queryResults.svg",contentType:"image/svg+xml",buttonTitle:t.translate("yasr.btn.title.svg")};var n=t.resultsContainer.find(".google-visualization-table-table");return n.length>0?{getContent:function(){return n.tableToCsv()},filename:"queryResults.csv",contentType:"text/csv",buttonTitle:t.translate("yasr.btn.title.csv")}:void 0},getEmbedHtml:function(){if(!t.results)return null;var e=t.resultsContainer.find("svg").clone().css("height","").css("width","");if(0==e.length)return null;var n=e[0].outerHTML;return n||(n=r("<div>").append(e.clone()).html()),'<div style="width: 800px; height: 600px;">\n'+n+"\n</div>"},draw:function(){var c=function(){if(t.resultsContainer=r(".yasr_results"),t.resultsContainer.empty(),t.options.output==s.defaults.persistencyId){var n=l+"_gchartWrapper",c=null;t.resultsContainer.append(r("<button>",{class:"openGchartBtn yasr_btn"}).text(t.translate("yasr.chart.config")).click((function(){p.openDialog(c)}))).append(r("<div>",{id:n,class:"gchartWrapper"}));var d=new google.visualization.DataTable,f=t.results.getAsJson();f.head.vars.forEach((function(n){var r="string";try{r=i.getGoogleTypeForBindings(f.results.bindings,n)}catch(n){if(!(n instanceof e("./exceptions.js").GoogleTypeException))throw n;t.warn(n.toHtml())}d.addColumn(r,n)}));var h=null;t.options.getUsedPrefixes&&(h="function"==typeof t.options.getUsedPrefixes?t.options.getUsedPrefixes(t):t.options.getUsedPrefixes),f.results.bindings.forEach((function(e){var t=[];f.head.vars.forEach((function(n,r){t.push(i.castGoogleType(e[n],h,d.getColumnType(r)))})),d.addRow(t)})),t.options.gchart.chartConfig?("MotionChart"===(c=new google.visualization.ChartWrapper(t.options.gchart.chartConfig)).getChartType()&&null!=t.options.gchart.motionChartState&&(c.setOption("state",t.options.gchart.motionChartState),google.visualization.events.addListener(c,"ready",(function(){var e;e=c.getChart(),google.visualization.events.addListener(e,"statechange",(function(){t.options.gchart.motionChartState=e.getState(),o.storage.set(u,t.options.gchart.motionChartState)}))}))),c.setDataTable(d)):c=new google.visualization.ChartWrapper({chartType:"Table",dataTable:d,containerId:n}),c.setOption("width",a.width),c.setOption("height",a.height),c.draw(),t.updateHeader()}};("undefined"!=typeof window?window.google:void 0!==n&&n.google)&&("undefined"!=typeof window?window.google:void 0!==n?n.google:null).visualization&&p?c():e("./gChartLoader.js").on("done",(function(){d(),c()})).on("error",(function(){console.log("errorrr")})).googleLoad()}}};s.defaults={height:"600px",width:"100%",persistencyId:"gchart"}}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./exceptions.js":45,"./gChartLoader.js":47,"./translate.js":65,"./utils.js":66,jquery:18,"yasgui-utils":36}],49:[function(e,t,n){t.exports={"yasr.table.filter":"Filter query results","yasr.table":"Table","yasr.graph.beta":"Graph(beta)","yasr.pivot.pivot_table":"Pivot Table","yasr.name.raw_response":"Raw Response","yasr.headers.columns":"Columns","yasr.headers.rows":"Rows","yasr.headers.variables":"Available Variables","yasr.headers.cells":"Cells","yasr.headers.labels.subject":"subject","yasr.headers.labels.object":"object","yasr.headers.labels.predicate":"predicate","yasr.headers.labels.context":"context","yasr.gchartLoader.unable_to_load":"Could not load google loader","yasr.gchart.chart_name":"Google Chart","yasr.exceptions.conflict":'Conflicting data types found for variable {{varName}}. Assuming all values of this variable are "string". To avoid this issue, cast the values in your SPARQL query to the intended xsd datatype',"yasr.exceptions.conflict_render":'Conflicting data types found for variable {{varName}}. Assuming all values of this variable are "string". As a result, several Google Charts will not render values of this particular variable. To avoid this issue, cast the values in your SPARQL query to the intended xsd datatype',"yasr.error.no_response":"Unable to get response from endpoint","yasr.error.new_window":"Try query in new browser window","yasr.boolean.alert.yes":"YES","yasr.boolean.alert.no":"NO","yasr.boolean.true":"True","yasr.boolean.false":"False","yasr.boolean.no_boolean":"Could not find boolean value in response","yasr.http.403":"You don't have permission to execute this query. Ask your admin for support.","yasr.btn.title.unsupported_download":"Download not supported for this result representation","yasr.btn.title.embed":"Save","yasr.btn.label.save":"Get HTML snippet to embed results on a web page","yasr.download.as.label":"Download as","yasr.btn.title.svg":"Download SVG Image","yasr.btn.title.csv":"Download as CSV","yasr.btn.title.raw":"Download raw response","yasr.copy.to.clipboard":"Copy to Clipboard","yasr.chart.config":"Chart Config","yasr.empty.table":"No data available in table","yasr.loading.label":"Loading..."}},{}],50:[function(e,t,n){t.exports={"yasr.table.filter":"Filtrer les résultats des requêtes","yasr.table":"Tableau","yasr.graph.beta":"Graphe(beta)","yasr.pivot.pivot_table":"Table de pivotement","yasr.name.raw_response":"Réponse brute","yasr.headers.columns":"Colonnes","yasr.headers.rows":"Lignes","yasr.headers.variables":"Variables disponibles","yasr.headers.cells":"Cellules","yasr.headers.labels.subject":"sujet","yasr.headers.labels.object":"objet","yasr.headers.labels.predicate":"prédicat","yasr.headers.labels.context":"contexte","yasr.gchartLoader.unable_to_load":"Impossible de charger le loader de google","yasr.gchart.chart_name":"Graphique Google","yasr.exceptions.conflict":'Des types de données contradictoires ont été trouvés pour la variable {{varName}}. On suppose que toutes les valeurs de cette variable sont "string". Pour éviter ce problème, convertissez les valeurs de votre requête SPARQL dans le type de données xsd prévu.',"yasr.exceptions.conflict_render":'Des types de données contradictoires ont été trouvés pour la variable {{varName}}. On suppose que toutes les valeurs de cette variable sont "string". Par conséquent, plusieurs graphiques Google ne rendent pas les valeurs de cette variable particulière. Pour éviter ce problème, convertissez les valeurs de votre requête SPARQL dans le type de données xsd prévu.',"yasr.error.no_response":"Impossible d'obtenir une réponse du point de terminaison","yasr.error.new_window":"Essayez la requête dans une nouvelle fenêtre du navigateur","yasr.boolean.alert.yes":"OUI","yasr.boolean.alert.no":"NON","yasr.boolean.true":"Vrai","yasr.boolean.false":"Faux","yasr.boolean.no_boolean":"Impossible de trouver une valeur booléenne en réponse","yasr.http.403":"Vous n'avez pas la permission d'exécuter cette requête. Demandez de l'aide à votre administrateur.","yasr.btn.title.unsupported_download":"Le téléchargement n'est pas pris en charge pour cette représentation de résultat","yasr.btn.title.embed":"Sauvegarder","yasr.btn.label.save":"Obtenir un extrait HTML pour intégrer les résultats dans une page web","yasr.download.as.label":"Téléchargement","yasr.btn.title.svg":"Télécharger l'image SVG","yasr.btn.title.csv":"Télécharger comme CSV","yasr.btn.title.raw":"Télécharger la réponse brute","yasr.copy.to.clipboard":"Copier dans le presse-papiers","yasr.chart.config":"Configuration du graphique","yasr.empty.table":"Aucune donnée disponible dans le tableau","yasr.loading.label":"Chargement..."}},{}],51:[function(e,t,n){"use strict";t.exports={cross:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><g>\t<path d="M83.288,88.13c-2.114,2.112-5.575,2.112-7.689,0L53.659,66.188c-2.114-2.112-5.573-2.112-7.687,0L24.251,87.907 c-2.113,2.114-5.571,2.114-7.686,0l-4.693-4.691c-2.114-2.114-2.114-5.573,0-7.688l21.719-21.721c2.113-2.114,2.113-5.573,0-7.686 L11.872,24.4c-2.114-2.113-2.114-5.571,0-7.686l4.842-4.842c2.113-2.114,5.571-2.114,7.686,0L46.12,33.591 c2.114,2.114,5.572,2.114,7.688,0l21.721-21.719c2.114-2.114,5.573-2.114,7.687,0l4.695,4.695c2.111,2.113,2.111,5.571-0.003,7.686 L66.188,45.973c-2.112,2.114-2.112,5.573,0,7.686L88.13,75.602c2.112,2.111,2.112,5.572,0,7.687L83.288,88.13z"/></g></svg>',check:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><path fill="#000000" d="M14.301,49.982l22.606,17.047L84.361,4.903c2.614-3.733,7.76-4.64,11.493-2.026l0.627,0.462 c3.732,2.614,4.64,7.758,2.025,11.492l-51.783,79.77c-1.955,2.791-3.896,3.762-7.301,3.988c-3.405,0.225-5.464-1.039-7.508-3.084 L2.447,61.814c-3.263-3.262-3.263-8.553,0-11.814l0.041-0.019C5.75,46.718,11.039,46.718,14.301,49.982z"/></svg>',unsorted:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 54.552711 113.78478" enable-background="new 0 0 100 100" xml:space="preserve"><g id="g5" transform="matrix(-0.70522156,-0.70898699,-0.70898699,0.70522156,97.988199,55.081205)"><path style="fill:#000000" inkscape:connector-curvature="0" id="path7" d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path style="fill:#000000" inkscape:connector-curvature="0" id="path7-9" d="m 8.8748339,52.571766 16.9382111,-0.222584 4.050851,-0.06665 15.719154,-0.222166 0.27778,-0.04246 0.43276,0.0017 0.41632,-0.06121 0.37532,-0.0611 0.47132,-0.119342 0.27767,-0.08206 0.55244,-0.198047 0.19707,-0.08043 0.61095,-0.259721 0.0988,-0.05825 0.019,-0.01914 0.59303,-0.356548 0.11787,-0.0788 0.49125,-0.337892 0.17994,-0.139779 0.37317,-0.336871 0.21862,-0.219786 0.31311,-0.31479 0.21993,-0.259387 c 0.92402,-1.126057 1.55249,-2.512251 1.78961,-4.016904 l 0.0573,-0.25754 0.0195,-0.374113 0.0179,-0.454719 0.0175,-0.05874 -0.0169,-0.258049 -0.0225,-0.493503 -0.0398,-0.355569 -0.0619,-0.414201 -0.098,-0.414812 -0.083,-0.353334 L 53.23955,41.1484 53.14185,40.850967 52.93977,40.377742 52.84157,40.161628 34.38021,4.2507375 C 33.211567,1.9401875 31.035446,0.48226552 28.639484,0.11316952 l -0.01843,-0.01834 -0.671963,-0.07882 -0.236871,0.0042 L 27.335984,-4.7826577e-7 27.220736,0.00379952 l -0.398804,0.0025 -0.313848,0.04043 -0.594474,0.07724 -0.09611,0.02147 C 23.424549,0.60716252 21.216017,2.1142355 20.013025,4.4296865 L 0.93967491,40.894479 c -2.08310801,3.997178 -0.588125,8.835482 3.35080799,10.819749 1.165535,0.613495 2.43199,0.88731 3.675026,0.864202 l 0.49845,-0.02325 0.410875,0.01658 z M 9.1502369,43.934401 9.0136999,43.910011 27.164145,9.2564625 44.70942,43.42818 l -14.765289,0.214677 -4.031106,0.0468 -16.7627881,0.244744 z" /></svg>',sortDesc:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 54.552711 113.78478" enable-background="new 0 0 100 100" xml:space="preserve"><g id="g5" transform="matrix(-0.70522156,-0.70898699,-0.70898699,0.70522156,97.988199,55.081205)"><path style="fill:#000000" inkscape:connector-curvature="0" id="path7" d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path style="fill:#000000" inkscape:connector-curvature="0" id="path9" d="m 27.813273,0.12823506 0.09753,0.02006 c 2.39093,0.458209 4.599455,1.96811104 5.80244,4.28639004 L 52.785897,40.894525 c 2.088044,4.002139 0.590949,8.836902 -3.348692,10.821875 -1.329078,0.688721 -2.766603,0.943695 -4.133174,0.841768 l -0.454018,0.02 L 27.910392,52.354171 23.855313,52.281851 8.14393,52.061827 7.862608,52.021477 7.429856,52.021738 7.014241,51.959818 6.638216,51.900838 6.164776,51.779369 5.889216,51.699439 5.338907,51.500691 5.139719,51.419551 4.545064,51.145023 4.430618,51.105123 4.410168,51.084563 3.817138,50.730843 3.693615,50.647783 3.207314,50.310611 3.028071,50.174369 2.652795,49.833957 2.433471,49.613462 2.140099,49.318523 1.901127,49.041407 C 0.97781,47.916059 0.347935,46.528448 0.11153,45.021676 L 0.05352,44.766255 0.05172,44.371683 0.01894,43.936017 0,43.877277 0.01836,43.62206 0.03666,43.122889 0.0765,42.765905 0.13912,42.352413 0.23568,41.940425 0.32288,41.588517 0.481021,41.151945 0.579391,40.853806 0.77369,40.381268 0.876097,40.162336 19.338869,4.2542801 c 1.172169,-2.308419 3.34759,-3.76846504 5.740829,-4.17716604 l 0.01975,0.01985 0.69605,-0.09573 0.218437,0.0225 0.490791,-0.02132 0.39809,0.0046 0.315972,0.03973 0.594462,0.08149 z" /></svg>',sortAsc:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 54.552711 113.78478" enable-background="new 0 0 100 100" xml:space="preserve"><g id="g5" transform="matrix(-0.70522156,0.70898699,-0.70898699,-0.70522156,97.988199,58.704807)"><path style="fill:#000000" inkscape:connector-curvature="0" id="path7" d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path style="fill:#000000" inkscape:connector-curvature="0" id="path9" d="m 27.813273,113.65778 0.09753,-0.0201 c 2.39093,-0.45821 4.599455,-1.96811 5.80244,-4.28639 L 52.785897,72.891487 c 2.088044,-4.002139 0.590949,-8.836902 -3.348692,-10.821875 -1.329078,-0.688721 -2.766603,-0.943695 -4.133174,-0.841768 l -0.454018,-0.02 -16.939621,0.223997 -4.055079,0.07232 -15.711383,0.220024 -0.281322,0.04035 -0.432752,-2.61e-4 -0.415615,0.06192 -0.376025,0.05898 -0.47344,0.121469 -0.27556,0.07993 -0.550309,0.198748 -0.199188,0.08114 -0.594655,0.274528 -0.114446,0.0399 -0.02045,0.02056 -0.59303,0.35372 -0.123523,0.08306 -0.486301,0.337172 -0.179243,0.136242 -0.375276,0.340412 -0.219324,0.220495 -0.293372,0.294939 -0.238972,0.277116 C 0.97781,65.869953 0.347935,67.257564 0.11153,68.764336 L 0.05352,69.019757 0.05172,69.414329 0.01894,69.849995 0,69.908735 l 0.01836,0.255217 0.0183,0.499171 0.03984,0.356984 0.06262,0.413492 0.09656,0.411988 0.0872,0.351908 0.158141,0.436572 0.09837,0.298139 0.194299,0.472538 0.102407,0.218932 18.462772,35.908054 c 1.172169,2.30842 3.34759,3.76847 5.740829,4.17717 l 0.01975,-0.0199 0.69605,0.0957 0.218437,-0.0225 0.490791,0.0213 0.39809,-0.005 0.315972,-0.0397 0.594462,-0.0815 z" /></svg>',download:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" xml:space="preserve"><g id="Captions"></g><g id="Your_Icon">\t<path fill-rule="evenodd" fill="#000000" d="M88,84v-2c0-2.961-0.859-4-4-4H16c-2.961,0-4,0.98-4,4v2c0,3.102,1.039,4,4,4h68 C87.02,88,88,87.039,88,84z M58,12H42c-5,0-6,0.941-6,6v22H16l34,34l34-34H64V18C64,12.941,62.939,12,58,12z"/></g></svg>',move:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_11656_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="753" inkscape:window-height="480" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="287" inkscape:window-y="249" inkscape:window-maximized="0" inkscape:current-layer="Layer_1" /><polygon points="33,83 50,100 67,83 54,83 54,17 67,17 50,0 33,17 46,17 46,83 " transform="translate(-7.962963,-10)" /><polygon points="83,67 100,50 83,33 83,46 17,46 17,33 0,50 17,67 17,54 83,54 " transform="translate(-7.962963,-10)" /></svg>',fullscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="0" inkscape:current-layer="Layer_1" /><path d="m -7.962963,-10 v 38.889 l 16.667,-16.667 16.667,16.667 5.555,-5.555 -16.667,-16.667 16.667,-16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 92.037037,-10 v 38.889 l -16.667,-16.667 -16.666,16.667 -5.556,-5.555 16.666,-16.667 -16.666,-16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M -7.962963,90 V 51.111 l 16.667,16.666 16.667,-16.666 5.555,5.556 -16.667,16.666 16.667,16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M 92.037037,90 V 51.111 l -16.667,16.666 -16.666,-16.666 -5.556,5.556 16.666,16.666 -16.666,16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>',smallscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="Layer_1" /><path d="m 30.926037,28.889 0,-38.889 -16.667,16.667 -16.667,-16.667 -5.555,5.555 16.667,16.667 -16.667,16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,28.889 0,-38.889 16.667,16.667 16.666,-16.667 5.556,5.555 -16.666,16.667 16.666,16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 30.926037,51.111 0,38.889 -16.667,-16.666 -16.667,16.666 -5.555,-5.556 16.667,-16.666 -16.667,-16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,51.111 0,38.889 16.667,-16.666 16.666,16.666 5.556,-5.556 -16.666,-16.666 16.666,-16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>'}},{}],52:[function(e,t,n){e("./tableToCsv.js")},{"./tableToCsv.js":53}],53:[function(e,t,n){"use strict";var r=e("jquery");r.fn.tableToCsv=function(e){var t="";e=r.extend({quote:'"',delimiter:",",lineBreak:"\n"},e);var n=function(n){n.replace(e.quote,e.quote+e.quote),function(t){var n=!1;return t.match("[\\w|"+e.delimiter+"|"+e.quote+"]")&&(n=!0),n}(n)&&(n=e.quote+n+e.quote),t+=" "+n+" "+e.delimiter},i=r(this),o={},s=0;return i.find("tr:first *").each((function(){r(this).attr("colspan")?s+=+r(this).attr("colspan"):s++})),i.find("tr").each((function(i,a){for(var l=r(a),u=[],c=0,p=0;p+c<s;p++)if(o[p])u.push(o[p].text),o[p].rowSpan--,o[p].rowSpan||delete o[p];else{var d=l.find(":nth-child("+(p+1)+")");console.log(d);var f=d.attr("colspan"),h=d.attr("rowspan");if(f&&!isNaN(f)){for(var g=0;g<f;g++)u.push(d.text());c+=f-1}else h&&!isNaN(h)?(o[p+c]={rowSpan:h-1,text:d.text()},u.push(d.text()),c++):u.push(d.text())}!function(r){r.forEach((function(e){n(e)})),t+=e.lineBreak}(u)})),t}},{jquery:18}],54:[function(e,t,n){"use strict";var r=e("jquery"),i=e("yasgui-utils");console=console||{log:function(){}},e("./jquery/extendJquery.js");var o=t.exports=function(t,n,s){var a={};a.options=r.extend(!0,{},o.defaults,n),a.container=r(t).find(".yasr"),a.header=r(t).find(".yasr_header"),a.resultsContainer=r(t).find(".yasr_results"),a.storage=i.storage,a.translationService=e("./translate.js"),a.translationService.setLanguage(a.options.locale),a.translate=a.translationService.translate,a.changeLanguage=function(e){a.translationService.setLanguage(e);let t=document.getElementById("saveAsBtn");t&&(t.innerText=a.translate("yasr.download.as.label"));let n=document.getElementById("yasrBtnGroup"),r=document.getElementById("yasrDownloadIcon");n&&n.remove(),r&&r.remove(),a.options.hideHeader||g(a),a.draw()};var l=null;for(var u in a.getPersistencyId=function(e){return null===l&&(l=!(!a.options.persistency||!a.options.persistency.prefix)&&("string"==typeof a.options.persistency.prefix?a.options.persistency.prefix:a.options.persistency.prefix(a))),l&&e?l+("string"==typeof e?e:e(a)):null},a.options.useGoogleCharts&&e("./gChartLoader.js").once("initError",(function(){a.options.useGoogleCharts=!1})).init(),a.plugins={},o.plugins)(a.options.useGoogleCharts||"gchart"!=u)&&(a.plugins[u]=new o.plugins[u](a));a.updateHeader=function(){var e=a.header.find(".yasr_downloadIcon").removeAttr("title"),t=a.header.find(".saveAsDropDown"),n=a.header.find(".yasr_embedBtn"),r=a.plugins[a.options.output];if(r){"Table"==r.name?(e.hide(),t.removeAttr("style")):(t.hide(),e.show());var i=r.getDownloadInfo?r.getDownloadInfo():null;i?(i.buttonTitle&&e.attr("title",i.buttonTitle),e.prop("disabled",!1),e.find("path").each((function(){this.style.fill="black"}))):(e.prop("disabled",!0).prop("title",a.translate("yasr.btn.title.unsupported_download")),e.find("path").each((function(){this.style.fill="gray"})));var o=null;r.getEmbedHtml&&(o=r.getEmbedHtml()),o&&o.length>0?n.show():n.hide()}},a.draw=function(e){if(a.updateHeader(),!a.results)return!1;e||(e=a.options.output);var t=null,n=-1,r=[];for(var i in a.plugins)if(a.plugins[i].canHandleResults(a)){var o=a.plugins[i].getPriority;"function"==typeof o&&(o=o(a)),null!=o&&null!=o&&o>n&&(n=o,t=i)}else r.push(i);return p(r),"table"==t&&a.plugins[t].canHandleResults(a)&&t!=e&&angular.isUndefined(e)?c(t):e in a.plugins&&a.plugins[e].canHandleResults(a)&&"booleanBootstrap"!=t?c(e):!!t&&c(t)};var c=function(e){return a.header.find(".yasr_btnGroup").find("li.active").removeClass("active"),r(a.resultsContainer).empty(),a.plugins[e].draw(),a.header.find(".yasr_btnGroup .select_"+e).parent().addClass("active"),!0},p=function(e){a.header.find(".yasr_btnGroup li").removeClass("disabled"),e.forEach((function(e){a.header.find(".yasr_btnGroup .select_"+e).parent().addClass("disabled")}))};a.somethingDrawn=function(){return!a.resultsContainer.is(":empty")},a.updateDownloadDropdown=function(){var t;if(window.editor){a.header.find(".saveAsDropDown").remove();var n=window.editor.getQueryType();"SELECT"==n&&(t=r(e("./extensions.js").getSelectSaveAsDropDown())),"CONSTRUCT"!=n&&"DESCRIBE"!=n||(t=r(e("./extensions.js").getGraphSaveAsDropDown())),t&&(t.find(".format").click((function(){a.getQueryResultsAsFormat(r(this).data("accepts"))})),a.header.append(t))}},a.setResultsCount=function(e,t,n){if(0==e.responseJSON&&(a.allCount=-1),(e.responseJSON||0==e.responseJSON)&&(a.allCount=-1,e.responseJSON["http://www.ontotext.com/"]&&(a.allCount=e.responseJSON["http://www.ontotext.com/"]["http://www.ontotext.com/"][0].value),r.isNumeric(e.responseJSON)&&(a.allCount=e.responseJSON),e.responseJSON.results&&e.responseJSON.results.bindings)){var i=e.responseJSON.results.bindings[0],o=e.responseJSON.head.vars,s=Object.keys(i).filter((function(e){return o.indexOf(e)>-1&&r.isNumeric(i[e].value)}));s.length>0&&(a.allCount=i[s[0]].value)}},a.setResponse=function(t,n,r){try{a.results=e("./parsers/wrapper.js")(t,n,r)}catch(e){a.results={getException:function(){return e}}}if(a.results.getAsJson().results&&(a.resultsCount=a.results.getAsJson().results.bindings.length),a.results.getAsJson()&&!a.options.hideHeader&&(a.header.show(),a.updateDownloadDropdown()),403==t.status&&(a.results.getException=function(){return{status:403,statusText:"Forbidden",responseText:a.translate("yasr.http.403")}}),a.draw(),a.options.persistency){var o=a.getPersistencyId(a.options.persistency.results.key);o&&(a.results.getOriginalResponseAsString&&a.results.getOriginalResponseAsString().length<a.options.persistency.results.maxSize?i.storage.set(o,a.results.getAsStoreObject(),"month"):i.storage.remove(o))}};var d=null,f=null;a.warn=function(e){d||(d=r("<div>",{class:"toggableWarning"}).prependTo(a.container).hide(),r("<span>",{class:"toggleWarning"}).html("×").click((function(){d.hide(400)})).appendTo(d),f=r("<span>",{class:"toggableMsg"}).appendTo(d)),f.empty(),e instanceof r?f.append(e):f.html(e),d.show(400)};var h=null,g=function(t){var n,o,s;t.options.drawOutputSelector&&(n=r('<ul id="yasrBtnGroup" class="yasr_btnGroup nav nav-tabs"></ul>'),r.each(t.plugins,(function(e,o){if(!o.hideFromSelection){var s=o.nameLabel?t.translate(o.nameLabel):e,a=r("<li class='nav-item'></li>");r("<a class='nav-link'></a>").text(s).addClass("select_"+e).click((function(){if(!r(this).parent().hasClass("disabled")){n.find("li.active").removeClass("active"),a.addClass("active"),t.options.output=e;var o=t.getPersistencyId(t.options.persistency.outputSelector);o&&i.storage.set(o,t.options.output,"month"),d&&d.hide(400),t.draw(e),t.updateHeader()}})).appendTo(a),a.appendTo(n),t.options.output==e&&a.addClass("active")}})),n.children().length>1&&t.header.append(n)),t.options.drawDownloadIcon&&function(){if(null===h){var e=window.URL||window.webkitURL||window.mozURL||window.msURL;h=e&&Blob}return h}()&&(o=t.translate("yasr.btn.label.save"),s=r("<button id='yasrDownloadIcon' class='btn btn-primary btn-sm yasr_downloadIcon pull-right'>"+o+"</button>").click((function(){var n=t.plugins[t.options.output];if(n&&n.getDownloadInfo){var i=n.getDownloadInfo(),o=function(e,t){var n=null,r=window.URL||window.webkitURL||window.mozURL||window.msURL;if(r&&Blob){var i=new Blob([e],{type:t});n=r.createObjectURL(i)}return n}(i.getContent(),i.contentType?i.contentType:"text/plain"),s=r("<a></a>",{href:o,download:i.filename});e("./utils.js").fireClick(s)}})),t.header.append(s))},m=a.getPersistencyId(a.options.persistency.outputSelector);if(m){var v=i.storage.get(m);v&&(a.options.output=v)}if(a.options.hideHeader||g(a),!s&&a.options.persistency&&a.options.persistency.results){var y,x=a.getPersistencyId(a.options.persistency.results.key);if(x&&(y=i.storage.get(x)),!y&&a.options.persistency.results.id){var E="string"==typeof a.options.persistency.results.id?a.options.persistency.results.id:a.options.persistency.results.id(a);E&&(y=i.storage.get(E))&&i.storage.remove(E)}y&&(r.isArray(y)?a.setResponse.apply(this,y):a.setResponse(y))}s&&a.setResponse(s),a.updateHeader();const b="resize."+(new Date).getTime();return r(window).on(b,a.draw),a.destroy=function(){r(window).off(b);for(const e in a.plugins)r.isFunction(e.destroy)&&e.destroy()},a};o.plugins={},o.registerOutput=function(e,t){o.plugins[e]=t},o.defaults=e("./defaults.js"),o.version={YASR:e("../package.json").version,jquery:r.fn.jquery,"yasgui-utils":e("yasgui-utils").version},o.utils=e("./utils.js"),o.$=r;try{o.registerOutput("boolean",e("./boolean.js"))}catch(e){}try{o.registerOutput("booleanBootstrap",e("./booleanBootstrap.js"))}catch(e){}try{o.registerOutput("table",e("./table.js"))}catch(e){}try{o.registerOutput("rawResponse",e("./rawResponse.js"))}catch(e){}try{o.registerOutput("error",e("./error.js"))}catch(e){}try{o.registerOutput("pivot",e("./pivot.js"))}catch(e){}try{o.registerOutput("gchart",e("./gchart.js"))}catch(e){}},{"../package.json":39,"./boolean.js":41,"./booleanBootstrap.js":42,"./defaults.js":43,"./error.js":44,"./extensions.js":46,"./gChartLoader.js":47,"./gchart.js":48,"./imgs.js":51,"./jquery/extendJquery.js":52,"./parsers/wrapper.js":60,"./pivot.js":62,"./rawResponse.js":63,"./table.js":64,"./translate.js":65,"./utils.js":66,jquery:18,"yasgui-utils":36}],55:[function(e,t,n){"use strict";e("jquery"),t.exports=function(t){return e("./dlv.js")(t,",")}},{"./dlv.js":56,jquery:18}],56:[function(e,t,n){"use strict";var r=e("jquery");e("../../lib/jquery.csv-0.71.js"),t.exports=function(e,t){var n={},i=r.csv.toArrays(e,{separator:t}),o=function(e){return 0==e.indexOf("http")?"uri":null};return 2==i.length&&1==i[0].length&&1==i[1].length&&"boolean"==i[0][0]&&("1"==i[1][0]||"0"==i[1][0])&&(n.boolean="1"==i[1][0],1)||i.length>0&&i[0].length>0&&(n.head={vars:i[0]},1)&&function(){if(i.length>1){n.results={bindings:[]};for(var e=1;e<i.length;e++){for(var t={},r=0;r<i[e].length;r++){var s=n.head.vars[r];if(s){var a=i[e][r],l=o(a);t[s]={value:a},l&&(t[s].type=l)}}n.results.bindings.push(t)}n.head={vars:i[0]}}}(),n}},{"../../lib/jquery.csv-0.71.js":4,jquery:18}],57:[function(e,t,n){"use strict";e("jquery");var r=e("lodash"),i=function(e){return"object"==typeof e?("bnode"==e.type&&(e.value=e.value.slice(2)),e):0==e.indexOf("_:")?{type:"bnode",value:e.slice(2)}:-1==e.indexOf(":")?{type:"bnode",value:e}:{type:"uri",value:e}};t.exports=function(e){if(e){var t,n="RESOURCE"==window.editor.getQueryType(),o=r.map(e,(function(e,t){return r.map(e,(function(e,o){return r.map(e,(function(e){return e.graphs?(n=!0,r.map(e.graphs,(function(n){return[i(t),i(o),i(e),i(n)]}))):[i(t),i(o),i(e)]}))}))})),s=r.reduce(o,(function(e,t){return e.concat(t)}),[]);return s=r.reduce(s,(function(e,t){return e.concat(t)}),[]),t=n?(s=r.reduce(s,(function(e,t){return e.concat(t)}),[])).map((function(e){return{subject:e[0],predicate:e[1],object:e[2],context:e[3]}})):s.map((function(e){return{subject:e[0],predicate:e[1],object:e[2]}})),{head:{vars:n?["subject","predicate","object","context"]:["subject","predicate","object"]},results:{bindings:t}}}return!1}},{jquery:18,lodash:19}],58:[function(e,t,n){"use strict";e("jquery"),t.exports=function(e){if("string"==typeof e)try{return JSON.parse(e)}catch(e){return!1}return"object"==typeof e&&e.constructor==={}.constructor&&e}},{jquery:18}],59:[function(e,t,n){"use strict";e("jquery"),t.exports=function(t){return e("./dlv.js")(t,"\t")}},{"./dlv.js":56,jquery:18}],60:[function(e,t,n){"use strict";e("jquery");var r=e("lodash");t.exports=function(t,n,i){var o={xml:e("./xml.js"),json:e("./json.js"),tsv:e("./tsv.js"),csv:e("./csv.js"),graphJson:e("./graphJson.js")},s=null,a=null,l=null,u=null,c=null,p=null,d=function(){return u?(l||(l=u),u):!1!==u&&!p&&(function(){if(s)if(s.indexOf("json")>-1){try{u=o.json(a,window.editor.getQueryType()),l=u,s.indexOf("application/rdf+json")>-1&&(u=o.graphJson(l))}catch(e){p=e}c="json"}else if(s.indexOf("xml")>-1){try{u=o.xml(a)}catch(e){p=e}c="xml"}else if(s.indexOf("csv")>-1){try{u=o.csv(a)}catch(e){p=e}c="csv"}else if(s.indexOf("tab-separated")>-1){try{u=o.tsv(a)}catch(e){p=e}c="tsv"}}(),u||function(){if(u=o.json(a))c="json";else try{(u=o.xml(a))&&(c="xml")}catch(e){}}(),u||(u=!1),u)},f=function(e){if(l.results&&l.results.bindings&&l.results.bindings.length>e){var t=jQuery.extend(!0,{},l);t.results.bindings=l.results.bindings.slice(0,e)}else{var n=r.keys(l).slice(0,e);t=r.pick(l,(function(e,t){return n.indexOf(t)>=0}))}return t},h=function(){var e="";return"string"==typeof a?e=a:"json"==c?e=JSON.stringify(a,void 0,2):"xml"==c&&(e=(new XMLSerializer).serializeToString(a)),e};return function(){if("object"==typeof t){if(t.exception?p=t.exception:null!=t.status&&(t.status>=300||0===t.status)&&(p={status:t.status},"string"==typeof i&&(p.errorString=i),t.responseText&&(p.responseText=t.responseText),t.statusText&&(p.statusText=t.statusText)),t.contentType)s=t.contentType.toLowerCase();else if(t.getResponseHeader&&t.getResponseHeader("content-type")){var e=t.getResponseHeader("content-type").trim().toLowerCase();e.length>0&&(s=e)}t.response?a=t.response:n||i||(a=t)}p||a||(a=t.responseText?t.responseText:t)}(),u=d(),{getAsStoreObject:function(){var e={};t.status?(e.status=t.status,e.responseText=t.responseText,e.statusText=t.statusText,e.contentType=s):e=t;var r=void 0;return"string"==typeof i&&(r=i),[e,n,r]},getRawJson:function(){return l},getAsJson:d,getOriginalResponse:function(){return a},getShortOriginalResponse:function(e){if("json"==c){var t=f(e);return JSON.stringify(t,void 0,2)}return h().slice(0,e)},getShortOriginalResponseAsJSON:f,getOriginalResponseAsString:h,getOriginalContentType:function(){return s},getVariables:function(){var e=d();return e&&"head"in e?e.head.vars:null},getBindings:function(){var e=d();return e&&"results"in e?e.results.bindings:null},getBoolean:function(){var e=d();return e&&"boolean"in e?e.boolean:null},getType:function(){return null==c&&d(),c},getException:function(){return p}}}},{"./csv.js":55,"./graphJson.js":57,"./json.js":58,"./tsv.js":59,"./xml.js":61,jquery:18,lodash:19}],61:[function(e,t,n){"use strict";var r=e("jquery");t.exports=function(e){var t=function(e){s.head={};for(var t=0;t<e.childNodes.length;t++){var n=e.childNodes[t];if("variable"==n.nodeName){s.head.vars||(s.head.vars=[]);var r=n.getAttribute("name");r&&s.head.vars.push(r)}}},n=function(e){s.results={},s.results.bindings=[];for(var t=0;t<e.childNodes.length;t++){for(var n=e.childNodes[t],r=null,i=0;i<n.childNodes.length;i++){var o=n.childNodes[i];if("binding"==o.nodeName){var a=o.getAttribute("name");if(a){(r=r||{})[a]={};for(var l=0;l<o.childNodes.length;l++){var u=o.childNodes[l],c=u.nodeName;if("#text"!=c){r[a].type=c,r[a].value=u.innerHTML;var p=u.getAttribute("datatype");p&&(r[a].datatype=p)}}}}}r&&s.results.bindings.push(r)}},i=function(e){"true"==e.innerHTML?s.boolean=!0:s.boolean=!1},o=null;if("string"==typeof e?o=r.parseXML(e):r.isXMLDoc(e)&&(o=e),e=null,!(o.childNodes.length>0))return null;e=o.childNodes[0];for(var s={},a=0;a<e.childNodes.length;a++){var l=e.childNodes[a];"head"==l.nodeName&&t(l),"results"==l.nodeName&&n(l),"boolean"==l.nodeName&&i(l)}return s}},{jquery:18}],62:[function(e,t,n){"use strict";var r=e("jquery"),i=e("./utils.js"),o=e("yasgui-utils"),s=e("./imgs.js");if(e("jquery-ui/sortable"),e("pivottable"),!r.fn.pivotUI)throw new Error("Pivot lib not loaded");var a=t.exports=function(t){t.translate=e("./translate.js").translate;var n={id:"pivot",name:"Pivot Table",nameLabel:"yasr.pivot.pivot_table",getPriority:4};const l=t.options.pluginsOptions?t.options.pluginsOptions[n.id]:{};var u,c=n.options=r.extend(!0,{},a.defaults,l);if(c.useD3Chart){try{d3&&e("../node_modules/pivottable/dist/d3_renderers.js")}catch(e){}r.pivotUtilities.d3_renderers&&r.extend(!0,r.pivotUtilities.renderers,r.pivotUtilities.d3_renderers)}var p=null,d=function(e){var n=function(){var e=t.results.getVariables();if(!c.mergeLabelsWithUris)return e;var n=[];return p="string"==typeof c.mergeLabelsWithUris?c.mergeLabelsWithUris:"Label",e.forEach((function(t){-1!==t.indexOf(p,t.length-p.length)&&e.indexOf(t.substring(0,t.length-p.length))>=0||n.push(t)})),n}(),r=null;t.options.getUsedPrefixes&&(r="function"==typeof t.options.getUsedPrefixes?t.options.getUsedPrefixes(t):t.options.getUsedPrefixes),t.results.getBindings().forEach((function(t){var o={};n.forEach((function(e){if(e in t){var n=t[e].value;p&&t[e+p]?n=t[e+p].value:"uri"==t[e].type&&(n=i.uriToPrefixed(r,n)),o[e]=n}else o[e]=null})),e(o)}))},f=t.getPersistencyId(c.persistencyId);return n.draw=function(){var n=function(){var e=r("<button>",{class:"openPivotGchart yasr_btn"}).text(t.translate("yasr.chart.config")).click((function(){u.find('div[dir="ltr"]').dblclick()})).appendTo(t.resultsContainer);u=r("<div>",{class:"pivotTable"}).appendTo(r(t.resultsContainer));var n,i=r.extend(!0,{},function(){var e=o.storage.get(f);if(e){var n=t.results.getVariables(),i=!0;e.cols.forEach((function(e){n.indexOf(e)<0&&(i=!1)})),i&&e.rows.forEach((function(e){n.indexOf(e)<0&&(i=!1)})),i||(e.cols=[],e.rows=[]),r.pivotUtilities.renderers[e.rendererName]||delete e.rendererName}else e={};return e}(),a.defaults.pivotTable);i.onRefresh=(n=i.onRefresh,function(r){!function(n){if(f){var r={cols:n.cols,rows:n.rows,rendererName:n.rendererName,aggregatorName:n.aggregatorName,vals:n.vals};o.storage.set(f,r,"month")}n.rendererName.toLowerCase().indexOf(" chart")>=0?e.show():e.hide(),t.updateHeader()}(r),n&&n(r)}),window.pivot=u.pivotUI(d,i);var l=r(o.svg.getElement(s.move));u.find(".pvtTriangle").replaceWith(l),r(".pvtCols").prepend(r("<div>",{class:"containerHeader"}).text(t.translate("yasr.headers.columns"))),r(".pvtRows").prepend(r("<div>",{class:"containerHeader"}).text(t.translate("yasr.headers.rows"))),r(".pvtUnused").prepend(r("<div>",{class:"containerHeader"}).text(t.translate("yasr.headers.variables"))),r(".pvtVals").prepend(r("<div>",{class:"containerHeader"}).text(t.translate("yasr.headers.cells"))),setTimeout(t.updateHeader,400)};t.options.useGoogleCharts&&c.useGoogleCharts&&!r.pivotUtilities.gchart_renderers?e("./gChartLoader.js").on("done",(function(){try{e("../node_modules/pivottable/dist/gchart_renderers.js"),r.extend(!0,r.pivotUtilities.renderers,r.pivotUtilities.gchart_renderers)}catch(e){c.useGoogleCharts=!1}n()})).on("error",(function(){console.log("could not load gchart"),c.useGoogleCharts=!1,n()})).googleLoad():n()},n.canHandleResults=function(){return t.results&&t.results.getVariables&&t.results.getVariables()&&t.results.getVariables().length>0},n.getDownloadInfo=function(){if(!t.results)return null;var e=t.resultsContainer.find(".pvtRendererArea svg");if(e.length>0)return{getContent:function(){return e[0].outerHTML?e[0].outerHTML:r("<div>").append(e.clone()).html()},filename:"queryResults.svg",contentType:"image/svg+xml",buttonTitle:t.translate("yasr.btn.title.svg")};var n=t.resultsContainer.find(".pvtRendererArea table");return n.length>0?{getContent:function(){return n.tableToCsv()},filename:"queryResults.csv",contentType:"text/csv",buttonTitle:t.translate("yasr.btn.title.csv")}:void 0},n.getEmbedHtml=function(){if(!t.results)return null;var e=t.resultsContainer.find(".pvtRendererArea svg").clone().css("height","").css("width","");if(0==e.length)return null;var n=e[0].outerHTML;return n||(n=r("<div>").append(e.clone()).html()),'<div style="width: 800px; height: 600px;">\n'+n+"\n</div>"},n};a.defaults={mergeLabelsWithUris:!1,useGoogleCharts:!0,useD3Chart:!0,persistencyId:"pivot",pivotTable:{}},a.version={"YASR-rawResponse":e("../package.json").version,jquery:r.fn.jquery}},{"../node_modules/pivottable/dist/d3_renderers.js":20,"../node_modules/pivottable/dist/gchart_renderers.js":21,"../package.json":39,"./gChartLoader.js":47,"./imgs.js":51,"./translate.js":65,"./utils.js":66,jquery:18,"jquery-ui/sortable":16,pivottable:22,"yasgui-utils":36}],63:[function(e,t,n){"use strict";var r=e("jquery"),i=e("codemirror");e("codemirror/addon/fold/foldcode.js"),e("codemirror/addon/fold/foldgutter.js"),e("codemirror/addon/fold/xml-fold.js"),e("codemirror/addon/fold/brace-fold.js"),e("codemirror/addon/edit/matchbrackets.js"),e("codemirror/mode/xml/xml.js"),e("codemirror/mode/javascript/javascript.js");var o=t.exports=function(t){t.translate=e("./translate.js").translate;const n={id:"rawResponse",name:"Raw Response",nameLabel:"yasr.name.raw_response",getPriority:2},s=t.options.pluginsOptions?t.options.pluginsOptions[n.id]:{};var a=n.options=r.extend(!0,{},o.defaults,s),l=null;return n.draw=function(){var e=a.CodeMirror;e.value=t.results.getShortOriginalResponse(a.limit);var n=t.results.getType();n&&("json"===n&&(n={name:"javascript",json:!0}),e.mode=n),(l=i(t.resultsContainer.get()[0],e)).on("fold",(function(){l.refresh()})),l.on("unfold",(function(){l.refresh()}))},n.canHandleResults=function(){if(!t.results)return!1;if(!t.results.getOriginalResponseAsString)return!1;var e=t.results.getOriginalResponseAsString();return!((!e||0===e.length)&&t.results.getException())},n.getDownloadInfo=function(){if(!t.results)return null;var e=t.results.getOriginalContentType(),n=t.results.getType();return{getContent:function(){return t.results.getOriginalResponseAsString()},filename:"queryResults"+(n?"."+n:""),contentType:e||"text/plain",buttonTitle:t.translate("yasr.btn.title.raw")}},n};o.defaults={CodeMirror:{readOnly:!0,lineNumbers:!0,lineWrapping:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]},limit:1e3},o.version={"YASR-rawResponse":e("../package.json").version,jquery:r.fn.jquery,CodeMirror:i.version}},{"../package.json":39,"./translate.js":65,codemirror:10,"codemirror/addon/edit/matchbrackets.js":5,"codemirror/addon/fold/brace-fold.js":6,"codemirror/addon/fold/foldcode.js":7,"codemirror/addon/fold/foldgutter.js":8,"codemirror/addon/fold/xml-fold.js":9,"codemirror/mode/javascript/javascript.js":11,"codemirror/mode/xml/xml.js":12,jquery:18}],64:[function(e,t,n){"use strict";var r=e("jquery"),i=e("yasgui-utils"),o=e("./utils.js"),s=(e("./imgs.js"),e("lodash"));e("../lib/DataTables/media/js/jquery.dataTables.js"),e("../lib/colResizable-1.4.js");var a=t.exports=function(t){t.translate=e("./translate.js").translate;var n=null,o={id:"table",name:"Table",nameLabel:"yasr.table",getPriority:10};const l=t.options.pluginsOptions?t.options.pluginsOptions[o.id]:{};var u=o.options=r.extend(!0,{},a.defaults,l),c=u.persistency?t.getPersistencyId(u.persistency.tableLength):null;t.getPersistencyId("eventId")||r(t.container).closest("[id]").attr("id");o.draw=function(){n=r('<table cellpadding="0" cellspacing="0" border="0" class="resultsTable table stripe hover table-bordered fixedCellWidth"></table>'),r(t.resultsContainer).html(n);var a=u.datatable;a.data=function(){var e=[],n=t.results.getBindings(),r=t.results.getVariables(),i=null;t.options.getUsedPrefixes&&(i="function"==typeof t.options.getUsedPrefixes?t.options.getUsedPrefixes(t):t.options.getUsedPrefixes),i=s.invert(i);for(var a=0;a<n.length;a++){var l=[];l.push("");for(var c=n[a],p=0;p<r.length;p++){var d=r[p];d in c&&u.getCellContent?l.push(u.getCellContent(t,o,c,d,{rowId:a,colId:p,usedPrefixes:i})):l.push("")}e.push(l)}return e}(),a.columns=u.getColumns(t,o);var l=i.storage.get(c);l&&(a.pageLength=l),a.translate=e("./translate.js").translate,n.DataTable(r.extend(!0,{},a)),p(),(!u.enableColumnResizingOnWindowWidth||u.enableColumnResizingOnWindowWidth<=r(window).width())&&((t.getPersistencyId("eventId")||r(t.container).closest("[id]").attr("id"),function(){var e;n.on("order.dt",(function(){p()})),c&&n.on("length.dt",(function(e,t,n){i.storage.set(c,n,"month")})),r.extend(!0,u.callbacks,u.handlers),n.delegate("td","click",(function(e){if(u.callbacks&&u.callbacks.onCellClick&&!1===u.callbacks.onCellClick(this,e))return!1})).delegate("td","mouseenter",(function(e){u.callbacks&&u.callbacks.onCellMouseEnter&&u.callbacks.onCellMouseEnter(this,e);var t=r(this);u.fetchTitlesFromPreflabel&&void 0===t.attr("title")&&0==t.text().trim().indexOf("http")&&d(t)})).delegate("td","mouseleave",(function(e){u.callbacks&&u.callbacks.onCellMouseLeave&&u.callbacks.onCellMouseLeave(this,e)})),e=angular.element(r("#yasr")[0]).scope(),r("td div .fa-link").on("click",(function(){var t=this.dataset.clipboardText;e.copyToClipboardResult(t)}))})(),n.colResizable()),n.find("thead").outerHeight(),r(t.resultsContainer).find(".JCLRgrip").height(n.find("thead").outerHeight()),t.header.outerHeight();var f=t.resultsContainer.find(".dataTables_filter label");r(f.contents().get(0)).remove(),f.find("input[type=search]").attr("placeholder",t.translate("yasr.table.filter")).addClass("form-control"),u.highlightLiteralCellResult()};var p=function(){for(var e in n.find(".sortIcons").remove(),{sorting:"unsorted",sorting_asc:"sortAsc",sorting_desc:"sortDesc"}){var t=r("<div class='sortIcons'></div>");"sorting"==e?t.append("<a class='fa fa-sort'></a>"):"sorting_asc"==e?t.append("<a class='fa fa-sort-alpha-asc'></a>"):"sorting_desc"==e&&t.append("<a class='fa fa-sort-alpha-desc'></a>"),n.find("th."+e).append(t)}};return o.canHandleResults=function(){return t.results&&t.results.getVariables&&t.results.getVariables()&&t.results.getVariables().length>0},o.getDownloadInfo=function(){return t.results?{getContent:function(){return e("./bindingsToCsv.js")(t.results.getAsJson())},filename:"queryResults.csv",contentType:"text/csv",buttonTitle:t.translate("yasr.btn.title.csv")}:null},o},l=function(e){return e.replace(/([_:](?![_:/-]))/g,"$1<wbr>").replace(/((?<!<)[/](?![_:/-]))/g,"$1<wbr>").replace(/((?<!@\p{L}*)[-](?![_:/-]))/gu,"$1<wbr>")},u=function(e,t,n,r){var i="",a=null;let d=r.translate("yasr.copy.to.clipboard");if("uri"===e.type){var f=null,h=e.value,g=h;if(t.usedPrefixes){var m=o.uriToPrefixWithLocalName(t.usedPrefixes,g);if(m){var v=m.localName;g=m.prefix+":"+v}}var y=window.location.origin+"/resource/";b=0===h.indexOf(y)&&h.length>y.length?h:"resource?uri="+encodeURIComponent(h),null!=n&&!0===n&&(b+="&context="+encodeURIComponent("http://rdf4j.org/schema/rdf4j#SHACLShapeGraph")),b=b.replace(/'/g,"'"),a="<a title='"+(h=h.replace(/'/g,"'"))+"' class='uri' href='"+b+"'>"+(C=s.escape(g),l(C)+"</a> <a class='fa fa-link share-result' data-clipboard-text='")+h+"' title='"+d+"' href='#'></a>",i=" class = 'uri-cell'"}else if("triple"===e.type){var x="<ul class='triple-list'><li>"+u(e.value.s,t,n,r)+"</li><li>"+u(e.value.p,t,n,r)+"</li><li>"+u(e.value.o,t,n,r)+"</li></ul>",E=c(r,e,!1),b="resource?triple="+encodeURIComponent(E).replace(/'/g,"'");a="<a title='"+(f=s.escape(E))+"' class='triple-link' href='"+b+"'>"+s.escape("<<")+"</a>"+x+"<a title='"+f+"' class='triple-link triple-link-end' href='"+b+"'>"+s.escape(">>")+"</a><a class='fa fa-link share-result' data-clipboard-text='"+E+"' title='"+d+"' href='#'></a>",i=" class = 'triple-cell'"}else a="<p class='nonUri' style='border: none; background-color: transparent; padding: 0; margin: 0'>"+p(r,e,!0)+"</p>",i=" class = 'literal-cell'";var C,T,S;return`<div ${i} lang="${T=e,S="xx",T["xml:lang"]?T["xml:lang"]:T.lang?T.lang:S}">${a}</div>`},c=function(e,t,n){return"uri"===t.type?"<"+t.value+">":"triple"===t.type?"<<"+c(e,t.value.s,n)+" "+c(e,t.value.p,n)+" "+c(e,t.value.o,n)+">>":p(e,t,n)},p=function(e,t,n){var r=o.escapeHtmlEntities(t.value),i="http://www.w3.org/2001/XMLSchema#";if("bnode"===t.type)return"_:"+r;if(t["xml:lang"])r='"'+r+(n?'"<sup>':'"')+"@"+t["xml:lang"]+(n?"</sup>":"");else if(t.lang)r='"'+r+(n?'"<sup>':'"@')+t.lang+(n?"</sup>":"");else if(t.datatype&&t.datatype!==i+"string"){var s=t.datatype;r='"'+r+(n?'"<sup>':'"')+"^^"+(s=0===s.indexOf(i)&&n?"xsd:"+s.substring(i.length):n?"<"+s+">":"<"+s+">")+(n?"</sup>":"")}return function(e){const t=function(e){return e.replace(/(\^\^)/g,"<wbr>$1")}(e);return l(t)}(0===r.indexOf('"')?r:'"'+r+'"')},d=function(e){var t=function(){e.attr("title","")};r.get("http://preflabel.org/api/v1/label/"+encodeURIComponent(e.text())+"?silent=true").success((function(n){"object"==typeof n&&n.label?e.attr("title",n.label):"string"==typeof n&&n.length>0?e.attr("title",n):t()})).fail(t)};a.defaults={getCellContent:function(e,t,n,r,i){var o=n[r],s=e.header.context.ownerDocument.URL.includes("http:%2F%2Frdf4j.org%2Fschema%2Frdf4j%23SHACLShapeGraph");return u(o,i,s,e)},highlightLiteralCellResult:function(){},persistency:{tableLength:"tableLength"},getColumns:function(e,t){var n=function(n){if(!t.options.mergeLabelsWithUris)return!0;var r="string"==typeof t.options.mergeLabelsWithUris?t.options.mergeLabelsWithUris:"Label";return!(-1!==n.indexOf(r,n.length-r.length)&&e.results.getVariables().indexOf(n.substring(0,n.length-r.length))>=0)},r=[];return r.push({title:""}),e.results.getVariables().forEach((function(t){var i=e.options.translateHeaders?e.translate("yasr.headers.labels."+t):t;r.push({title:"<span>"+i+"</span>",visible:n(t)})})),r},fetchTitlesFromPreflabel:!0,mergeLabelsWithUris:!1,callbacks:{onCellMouseEnter:null,onCellMouseLeave:null,onCellClick:null},datatable:{paginate:!1,info:!1,autoWidth:!1,order:[],pageLength:50,lengthMenu:[[10,50,100,1e3,-1],[10,50,100,1e3,"All"]],lengthChange:!0,drawCallback:function(e){for(var t=0;t<e.aiDisplay.length;t++)r("td:eq(0)",e.aoData[e.aiDisplay[t]].nTr).html(t+1);var n=!1;r(e.nTableWrapper).find(".paginate_button").each((function(){-1==r(this).attr("class").indexOf("current")&&-1==r(this).attr("class").indexOf("disabled")&&(n=!0)})),n?r(e.nTableWrapper).find(".dataTables_paginate").show():r(e.nTableWrapper).find(".dataTables_paginate").hide()},columnDefs:[{width:"32px",orderable:!1,targets:0}]}},a.version={"YASR-table":e("../package.json").version,jquery:r.fn.jquery,"jquery-datatables":r.fn.DataTable.version}},{"../lib/DataTables/media/js/jquery.dataTables.js":2,"../lib/colResizable-1.4.js":3,"../package.json":39,"./bindingsToCsv.js":40,"./imgs.js":51,"./translate.js":65,"./utils.js":66,jquery:18,lodash:19,"yasgui-utils":36}],65:[function(e,t,n){const r={en:e("./i18n/locale-en"),fr:e("./i18n/locale-fr")};var i="en";t.exports={setLanguage:function(e){i=e},translate:function(e,t){const n=i;if(!r||!r[n])return console.warn("Missing locale file for ["+n+"]"),e;let o=r[n][e];return o||(o=r.en[e]),t&&(o=o.replace(`{{${t.key}}}`,t.value)),o||(console.warn("Missing translation for ["+e+"] key in ["+n+"] locale"),e)}}},{"./i18n/locale-en":49,"./i18n/locale-fr":50}],66:[function(e,t,n){"use strict";var r=e("jquery"),i=(e("lodash"),e("./exceptions.js").GoogleTypeException);t.exports={escapeHtmlEntities:function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},uriToPrefixed:function(e,t){if(e)for(var n in e)if(0==t.indexOf(e[n])){t=n+":"+t.substring(e[n].length);break}return t},uriToPrefixWithLocalName:function(e,t){var n=Object.keys(e).filter((function(e){return 0==t.indexOf(e)}));if(n.length>0){var r=(n=n.sort((function(e,t){return e.length<t.length})))[0];return{prefix:e[r],localName:t.substring(r.length)}}return null},getGoogleTypeForBinding:function(e){if(null==e)return null;if(null==e.type||"typed-literal"!==e.type&&"literal"!==e.type)return"string";switch(e.datatype){case"http://www.w3.org/2001/XMLSchema#float":case"http://www.w3.org/2001/XMLSchema#decimal":case"http://www.w3.org/2001/XMLSchema#int":case"http://www.w3.org/2001/XMLSchema#integer":case"http://www.w3.org/2001/XMLSchema#long":case"http://www.w3.org/2001/XMLSchema#gYearMonth":case"http://www.w3.org/2001/XMLSchema#gYear":case"http://www.w3.org/2001/XMLSchema#gMonthDay":case"http://www.w3.org/2001/XMLSchema#gDay":case"http://www.w3.org/2001/XMLSchema#gMonth":return"number";case"http://www.w3.org/2001/XMLSchema#date":return"date";case"http://www.w3.org/2001/XMLSchema#dateTime":return"datetime";case"http://www.w3.org/2001/XMLSchema#time":return"timeofday";default:return"string"}},getGoogleTypeForBindings:function(e,n){var r={},o=0;if(e.forEach((function(e){var i=t.exports.getGoogleTypeForBinding(e[n]);null!=i&&(i in r||(r[i]=0,o++),r[i]++)})),0==o)return"string";if(1!=o)throw new i(r,n);for(var s in r)return s},castGoogleType:function(e,n,r){if(null==e)return null;if("string"==r||null==e.type||"typed-literal"!==e.type&&"literal"!==e.type)return"uri"==e.type?t.exports.uriToPrefixed(n,e.value):e.value;switch(e.datatype){case"http://www.w3.org/2001/XMLSchema#float":case"http://www.w3.org/2001/XMLSchema#decimal":case"http://www.w3.org/2001/XMLSchema#int":case"http://www.w3.org/2001/XMLSchema#integer":case"http://www.w3.org/2001/XMLSchema#long":case"http://www.w3.org/2001/XMLSchema#gYearMonth":case"http://www.w3.org/2001/XMLSchema#gYear":case"http://www.w3.org/2001/XMLSchema#gMonthDay":case"http://www.w3.org/2001/XMLSchema#gDay":case"http://www.w3.org/2001/XMLSchema#gMonth":return Number(e.value);case"http://www.w3.org/2001/XMLSchema#date":var i=o(e.value);if(i)return i;case"http://www.w3.org/2001/XMLSchema#dateTime":case"http://www.w3.org/2001/XMLSchema#time":return new Date(e.value);default:return e.value}},fireClick:function(e){e&&e.each((function(e,t){var n=r(t);if(document.dispatchEvent){var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,1,1,1,1,1,!1,!1,!1,!1,0,n[0]),n[0].dispatchEvent(i)}else document.fireEvent&&n[0].click()}))}};var o=function(e){var t=new Date(e.replace(/(\d)([\+-]\d{2}:\d{2})/,"$1Z$2"));return isNaN(t)?null:t}},{"./exceptions.js":45,jquery:18,lodash:19}]},{},[1])(1)},module.exports=e()}).call(this,__webpack_require__(11))},61:function(e,t,n){"use strict";n.r(t),n.d(t,"RenderingMode",(function(){return r}));const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},618:function(e,t){
|
|
109
|
+
/*! Copyright (c) 2014 Hidenari Nozaki and contributors | Licensed under the MIT license */
|
|
110
|
+
!function(e,t){"use strict";!function(e){e.module("angucomplete-alt",[]).directive("angucompleteAlt",["$q","$parse","$http","$sce","$timeout","$templateCache","$interpolate",function(e,t,n,r,i,o,s){function a(t,o,s,a){var l,u,c,p,d,f,h=o.find("input"),g=3,m=null,v="autocomplete-required",y=null,x=null,E=o[0].querySelector(".angucomplete-dropdown"),b=!1,C=null;function T(e,n){e&&("object"==typeof e?(t.searchStr=L(e),N({originalObject:e})):"string"==typeof e&&e.length>0?t.searchStr=e:console&&console.error&&console.error("Tried to set "+(n?"initial":"")+" value of angucomplete to",e,"which is an invalid value"),R(!0))}function S(e){C=null,t.hideResults(e),document.body.removeEventListener("click",S)}function w(e){return e.which?e.which:e.keyCode}function N(e){"function"==typeof t.selectedObject?t.selectedObject(e,t.selectedObjectData):t.selectedObject=e,R(!!e)}function L(e){return t.titleField.split(",").map((function(t){return I(e,t)})).join(" ")}function I(e,t){var n,r;if(t){n=t.split("."),r=e;for(var i=0;i<n.length;i++)r=r[n[i]]}else r=e;return r}function A(e,n){var i,o,s;if(s=new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),e)return e.match&&e.replace||(e=e.toString()),i=(o=e.match(s))?e.replace(s,'<span class="'+t.matchClass+'">'+o[0]+"</span>"):e,r.trustAsHtml(i)}function R(e){t.notEmpty=e,y=t.searchStr,t.fieldRequired&&a&&t.inputName&&a[t.inputName].$setValidity(v,e)}function _(e){!t.overrideSuggestions||t.selectedObject&&t.selectedObject.originalObject===t.searchStr||(e&&e.preventDefault(),i.cancel(m),F(),N({originalObject:t.searchStr}),t.clearSelected&&(t.searchStr=null),G())}function O(){return o[0].querySelectorAll(".angucomplete-row")[t.currentIndex]}function D(e){E.scrollTop=E.scrollTop+e}function k(){var e=t.results[t.currentIndex];t.matchClass?h.val(L(e.originalObject)):h.val(e.title)}function P(e){return function(n,r,i,o){r||i||o||!n.data||(n=n.data),t.searching=!1,q(I(u(n),t.remoteUrlDataField),e)}}function M(e,n,r,i){t.searching=!1,0!==n&&-1!==n&&(n||r||i||(n=e.status),t.remoteUrlErrorCallback?t.remoteUrlErrorCallback(e,n,r,i):console&&console.error&&console.error("http error"))}function F(){x&&x.resolve()}function j(r){var i={},o=t.remoteUrl+encodeURIComponent(r);t.remoteUrlRequestFormatter&&(i={params:t.remoteUrlRequestFormatter(r)},o=t.remoteUrl),t.remoteUrlRequestWithCredentials&&(i.withCredentials=!0),F(),x=e.defer(),i.timeout=x.promise,n.get(o,i).success(P(r)).error(M)}function U(n){F(),x=e.defer(),t.remoteApiHandler(n,x.promise).then(P(n)).catch(M)}function G(){t.showDropdown=!1,t.results=[],E&&(E.scrollTop=0)}function B(){t.showDropdown=p,t.currentIndex=t.focusFirst?0:-1,t.results=[]}function H(e){!e||e.length<g||(t.localData?t.$apply((function(){var n;n=void 0!==t.localSearch()?t.localSearch()(e,t.localData):function(e){var n,r,i,o,s=t.searchFields.split(","),a=[];for(void 0!==t.parseInput()&&(e=t.parseInput()(e)),n=0;n<t.localData.length;n++){for(r=!1,i=0;i<s.length;i++)o=I(t.localData[n],s[i])||"",r=r||o.toString().toLowerCase().indexOf(e.toString().toLowerCase())>=0;r&&(a[a.length]=t.localData[n])}return a}(e),t.searching=!1,q(n,e)})):t.remoteApiHandler?U(e):j(e))}function q(e,n){var r,i,o,s,a,l;if(e&&e.length>0)for(t.results=[],r=0;r<e.length;r++)t.titleField&&""!==t.titleField&&(s=a=L(e[r])),i="",t.descriptionField&&(i=l=I(e[r],t.descriptionField)),o="",t.imageField&&(o=I(e[r],t.imageField)),t.matchClass&&(a=A(s,n),l=A(i,n)),t.results[t.results.length]={title:a,description:l,image:o,originalObject:e[r]};else t.results=[];t.autoMatch&&1===t.results.length&&function(e,n,r){if(!r)return!1;for(var i in n)if(n[i].toLowerCase()===r.toLowerCase())return t.selectResult(e),!0;return!1}(t.results[0],{title:s,desc:i||""},t.searchStr)?t.showDropdown=!1:0!==t.results.length||d?t.showDropdown=!0:t.showDropdown=!1}function V(){t.localData?q(t.localData,""):t.remoteApiHandler?U(""):j("")}o.on("mousedown",(function(e){e.target.id?(C=e.target.id)===t.id+"_dropdown"&&document.body.addEventListener("click",S):C=e.target.className})),t.currentIndex=t.focusFirst?0:null,t.searching=!1,c=t.$watch("initialValue",(function(e){e&&(c(),T(e,!0))})),t.$watch("fieldRequired",(function(e,n){e!==n&&(e?y&&-1!==t.currentIndex?R(!0):R(!1):a[t.inputName].$setValidity(v,!0))})),t.$on("angucomplete-alt:clearInput",(function(e,n){n&&n!==t.id||(t.searchStr=null,N(),R(!1),G())})),t.$on("angucomplete-alt:changeInput",(function(e,n,r){n&&n===t.id&&T(r)})),t.onFocusHandler=function(){t.focusIn&&t.focusIn(),0!==g||t.searchStr&&0!==t.searchStr.length||(t.currentIndex=t.focusFirst?0:t.currentIndex,t.showDropdown=!0,V())},t.hideResults=function(){C&&(C===t.id+"_dropdown"||C.indexOf("angucomplete")>=0)?C=null:(l=i((function(){G(),t.$apply((function(){t.searchStr&&t.searchStr.length>0&&h.val(t.searchStr)}))}),200),F(),t.focusOut&&t.focusOut(),t.overrideSuggestions&&t.searchStr&&t.searchStr.length>0&&-1===t.currentIndex&&_())},t.resetHideResults=function(){l&&i.cancel(l)},t.hoverRow=function(e){t.currentIndex=e},t.selectResult=function(e){t.matchClass&&(e.title=L(e.originalObject),e.description=I(e.originalObject,t.descriptionField)),t.clearSelected?t.searchStr=null:t.searchStr=e.title,N(e),G()},t.inputChangeHandler=function(e){return e.length<g?(F(),G()):0===e.length&&0===g&&(t.searching=!1,V()),t.inputChanged&&(e=t.inputChanged(e)),e},t.fieldRequiredClass&&""!==t.fieldRequiredClass&&(v=t.fieldRequiredClass),t.minlength&&""!==t.minlength&&(g=parseInt(t.minlength,10)),t.pause||(t.pause=500),t.clearSelected||(t.clearSelected=!1),t.overrideSuggestions||(t.overrideSuggestions=!1),t.fieldRequired&&a&&(t.initialValue?R(!0):R(!1)),t.inputType=s.type?s.type:"text",t.textSearching=s.textSearching?s.textSearching:"Searching...",t.textNoResults=s.textNoResults?s.textNoResults:"No results found",p="false"!==t.textSearching,d="false"!==t.textNoResults,t.maxlength=s.maxlength?s.maxlength:524288,h.on("keydown",(function(e){var n=w(e),r=null,i=null;13===n&&t.results?(t.currentIndex>=0&&t.currentIndex<t.results.length?(e.preventDefault(),t.selectResult(t.results[t.currentIndex])):(_(e),G()),t.$apply()):40===n&&t.results?(e.preventDefault(),t.currentIndex+1<t.results.length&&t.showDropdown&&(t.$apply((function(){t.currentIndex++,k()})),b&&(r=O(),E.getBoundingClientRect().top+parseInt(getComputedStyle(E).maxHeight,10)<r.getBoundingClientRect().bottom&&D(function(e){var t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(r))))):38===n&&t.results?(e.preventDefault(),t.currentIndex>=1?(t.$apply((function(){t.currentIndex--,k()})),b&&(i=O().getBoundingClientRect().top-(E.getBoundingClientRect().top+parseInt(getComputedStyle(E).paddingTop,10)))<0&&D(i-1)):0===t.currentIndex&&t.$apply((function(){t.currentIndex=-1,h.val(t.searchStr)}))):9===n?t.results&&t.results.length>0&&t.showDropdown?-1===t.currentIndex&&t.overrideSuggestions?_():(-1===t.currentIndex&&(t.currentIndex=0),t.selectResult(t.results[t.currentIndex]),t.$digest()):t.searchStr&&t.searchStr.length>0&&_():27===n&&e.preventDefault()})),h.on("keyup",(function(e){var n=w(e);if(37!==n&&39!==n)if(38===n||13===n)e.preventDefault();else if(40===n)e.preventDefault(),!t.showDropdown&&t.searchStr&&t.searchStr.length>=g&&(B(),t.searching=!0,H(t.searchStr));else if(27===n)G(),t.$apply((function(){h.val(t.searchStr)}));else{if(0===g&&!t.searchStr)return;t.searchStr&&""!==t.searchStr?t.searchStr.length>=g&&(B(),m&&i.cancel(m),t.searching=!0,m=i((function(){H(t.searchStr)}),t.pause)):t.showDropdown=!1,y&&y!==t.searchStr&&!t.clearSelected&&t.$apply((function(){N()}))}})),f="remoteUrlResponseFormatter",u=function(e){return t[f]?t[f](e):e},i((function(){var e=getComputedStyle(E);b=e.maxHeight&&"auto"===e.overflowY}))}return o.put("/angucomplete-alt/index.html",'<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}"> <input id="{{id}}_value" name="{{inputName}}" tabindex="{{fieldTabindex}}" ng-class="{\'angucomplete-input-not-empty\': notEmpty}" ng-model="searchStr" ng-disabled="disableInput" type="{{inputType}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off" autocomplete="off" ng-change="inputChangeHandler(searchStr)"/> <div id="{{id}}_dropdown" class="angucomplete-dropdown" ng-show="showDropdown"> <div class="angucomplete-searching" ng-show="searching" ng-bind="textSearching"></div> <div class="angucomplete-searching" ng-show="!searching && (!results || results.length == 0)" ng-bind="textNoResults"></div> <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}"> <div ng-if="imageField" class="angucomplete-image-holder"> <img ng-if="result.image && result.image != \'\'" ng-src="{{result.image}}" class="angucomplete-image"/> <div ng-if="!result.image && result.image != \'\'" class="angucomplete-image-default"></div> </div> <div class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"></div> <div class="angucomplete-title" ng-if="!matchClass">{{ result.title }}</div> <div ng-if="matchClass && result.description && result.description != \'\'" class="angucomplete-description" ng-bind-html="result.description"></div> <div ng-if="!matchClass && result.description && result.description != \'\'" class="angucomplete-description">{{result.description}}</div> </div> </div></div>'),{restrict:"EA",require:"^?form",scope:{selectedObject:"=",selectedObjectData:"=",disableInput:"=",initialValue:"=",localData:"=",localSearch:"&",remoteUrlRequestFormatter:"=",remoteUrlRequestWithCredentials:"@",remoteUrlResponseFormatter:"=",remoteUrlErrorCallback:"=",remoteApiHandler:"=",id:"@",type:"@",placeholder:"@",textSearching:"@",textNoResults:"@",remoteUrl:"@",remoteUrlDataField:"@",titleField:"@",descriptionField:"@",imageField:"@",inputClass:"@",pause:"@",searchFields:"@",minlength:"@",matchClass:"@",clearSelected:"@",overrideSuggestions:"@",fieldRequired:"=",fieldRequiredClass:"@",inputChanged:"=",autoMatch:"@",focusOut:"&",focusIn:"&",fieldTabindex:"@",inputName:"@",focusFirst:"@",parseInput:"&"},templateUrl:function(e,t){return t.templateUrl||"/angucomplete-alt/index.html"},compile:function(e){var t=s.startSymbol(),n=s.endSymbol();if("{{"!==t||"}}"!==n){var r=e.html().replace(/\{\{/g,t).replace(/\}\}/g,n);e.html(r)}return a}}}])}(window.angular)}()},63:function(e,t,n){"use strict";n.r(t),n.d(t,"YasqeMode",(function(){return r}));const r={WRITE:"WRITE",READ:"READ",PROTECTED:"PROTECTED"}},64:function(e,t){function n(e,t){return{showToastMessageWithDelay:function(n){return new Promise(r=>{e.success(t.instant(n)),setTimeout(r,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",n),n.$inject=["toastr","$translate"]},66:function(e,t){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",n),n.$inject=["$http"];function n(e){return{getConnectors:function(){return e.get("rest/connectors")},initConnector:function(t){return e.get("rest/connectors/options?prefix="+t)},hasConnector:function(t){return e.get("rest/connectors/existing?prefix="+t)},checkConnector:function(t){return e.post("rest/connectors/check",t,{headers:{"Content-Type":"text/plain"}})}}}},67:function(e,t,n){"use strict";n.r(t),n.d(t,"EventDataType",(function(){return r}));const r={DOWNLOAD_AS:"downloadAs",NOTIFICATION_MESSAGE:"notificationMessage",QUERY:"query",COUNT_QUERY:"countQuery",COUNT_QUERY_RESPONSE:"countQueryResponse",QUERY_EXECUTED:"queryExecuted",SAVE_QUERY_OPENED:"saveQueryOpened"}},72:function(e,t,n){"use strict";n.r(t),n.d(t,"RouteConstants",(function(){return r}));const r={savedQueryName:"savedQueryName",savedQueryOwner:"owner",query:"query",name:"name",owner:"owner"}},73:function(e,t,n){"use strict";n.r(t),n.d(t,"TabQueryModel",(function(){return r}));class r{constructor(e,t,n,r=!0){this.queryName=e,this.query=t,this.owner=n,this.isPublic=r}}},74:function(e,t,n){"use strict";n.r(t),n.d(t,"QueryType",(function(){return r}));const r={SELECT:"SELECT",CONSTRUCT:"CONSTRUCT",ASK:"ASK",DESCRIBE:"DESCRIBE",INSERT:"INSERT",DELETE:"DELETE",LOAD:"LOAD",CLEAR:"CLEAR",CREATE:"CREATE",DROP:"DROP",COPY:"COPY",MOVE:"MOVE",ADD:"ADD"}},75:function(e,t,n){"use strict";n.r(t),n.d(t,"StartMode",(function(){return r})),n.d(t,"GraphsConfig",(function(){return i}));const r={QUERY:"query",NODE:"node",SEARCH:"search"};class i{constructor(e,t,n=r.SEARCH,i,o=!0,s=!0,a,l,u,c,p,d,f,h,g,m,v,y,x,E,b){this._id=e,this._name=t,this._startMode=n,this._owner=i,this._startQueryIncludeInferred=o,this._startQuerySameAs=s,this._startGraphQuery=a,this._startIRI=l,this._startIRILabel=u,this._expandQuery=c,this._resourceQuery=p,this._predicateLabelQuery=d,this._resourcePropertiesQuery=f,this._shared=h,this._description=g,this._hint=m,this._startGraphQueryDescription=v,this._expandQueryDescription=y,this._resourceQueryDescription=x,this._predicateLabelQueryDescription=E,this._resourcePropertiesQueryDescription=b}isStartMode(e){return this.startMode===e}isDefaultGraph(){return"Minimal"===this.name||"Advanced"===this.name}getPropertyDescription(e){return this[e+"Description"]}getQueryType(e){let t;return this.isStartMode(r.QUERY)&&1===e?t=this.startGraphQuery:2===e?t=this.expandQuery:3===e?t=this.resourceQuery:4===e?t=this.predicateLabelQuery:5===e&&(t=this.resourcePropertiesQuery),t||""}updateModel(e,t){return this.isStartMode(r.QUERY)&&1===t?this.startGraphQuery=e:2===t?this.expandQuery=e:3===t?this.resourceQuery=e:4===t?this.predicateLabelQuery=e:5===t&&(this.resourcePropertiesQuery=e),this}toSavePayload(){return{id:this.id,name:this.name,startMode:this.startMode,owner:this.owner,startQueryIncludeInferred:this.startQueryIncludeInferred,startQuerySameAs:this.startQuerySameAs,startGraphQuery:this.startGraphQuery,startIRI:this.startIRI,startIRILabel:this.startIRILabel,expandQuery:this.expandQuery,resourceQuery:this.resourceQuery,predicateLabelQuery:this.predicateLabelQuery,resourcePropertiesQuery:this.resourcePropertiesQuery,shared:this.shared,description:this.description,hint:this.hint}}get id(){return this._id}set id(e){this._id=e}get name(){return this._name}set name(e){this._name=e}get startMode(){return this._startMode}set startMode(e){this._startMode=e}get owner(){return this._owner}set owner(e){this._owner=e}get startQueryIncludeInferred(){return this._startQueryIncludeInferred}set startQueryIncludeInferred(e){this._startQueryIncludeInferred=e}get startQuerySameAs(){return this._startQuerySameAs}set startQuerySameAs(e){this._startQuerySameAs=e}get startGraphQuery(){return this._startGraphQuery}set startGraphQuery(e){this._startGraphQuery=e}get startIRI(){return this._startIRI}set startIRI(e){this._startIRI=e}get startIRILabel(){return this._startIRILabel}set startIRILabel(e){this._startIRILabel=e}get expandQuery(){return this._expandQuery}set expandQuery(e){this._expandQuery=e}get resourceQuery(){return this._resourceQuery}set resourceQuery(e){this._resourceQuery=e}get predicateLabelQuery(){return this._predicateLabelQuery}set predicateLabelQuery(e){this._predicateLabelQuery=e}get resourcePropertiesQuery(){return this._resourcePropertiesQuery}set resourcePropertiesQuery(e){this._resourcePropertiesQuery=e}get shared(){return this._shared}set shared(e){this._shared=e}get description(){return this._description}set description(e){this._description=e}get hint(){return this._hint}set hint(e){this._hint=e}get startGraphQueryDescription(){return this._startGraphQueryDescription}set startGraphQueryDescription(e){this._startGraphQueryDescription=e}get expandQueryDescription(){return this._expandQueryDescription}set expandQueryDescription(e){this._expandQueryDescription=e}get resourceQueryDescription(){return this._resourceQueryDescription}set resourceQueryDescription(e){this._resourceQueryDescription=e}get predicateLabelQueryDescription(){return this._predicateLabelQueryDescription}set predicateLabelQueryDescription(e){this._predicateLabelQueryDescription=e}get resourcePropertiesQueryDescription(){return this._resourcePropertiesQueryDescription}set resourcePropertiesQueryDescription(e){this._resourcePropertiesQueryDescription=e}}},81:function(e,t,n){"use strict";n.r(t);n(10),n(32);var r=n(0);function i(e,t,n,i,o,s,a,l,u,c,p,d,f,h,g){const m={id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:!0,sameAs:!0};let v,y;function x(t){!function(){if(i.isActiveRepoOntopType())return;const t=document.getElementById("sameAs");!t||e.currentQuery.inference||t.disabled?e.currentQuery.inference&&t.disabled&&(t.removeAttribute("disabled"),e.currentQuery.sameAs=v.appSettings.DEFAULT_SAMEAS):(t.disabled=!0,e.currentQuery.sameAs=!1)}(),e.tabs.forEach((function(n,r){n.id===t.id&&(e.tabs[r].query=t.query,i.isActiveRepoOntopType()||(e.tabs[r].inference=t.inference,e.tabs[r].sameAs=t.sameAs))})),f.set(h.TABS_STATE,e.tabs)}function E(t,n,r,i){const o=angular.element(document.getElementById("yasr-inner"));e.queryIsRunning=t,t?(e.queryStartTime=Date.now(),e.countTimeouted=!1,e.progressMessage=n,e.extraMessage=r,e.noLoaderTimer=i,o.addClass("hide")):(e.progressMessage="",e.extraMessage="",e.noLoaderTimer=!1,e.currentTrackAlias=null,e.abortRequested=!1,o.removeClass("hide")),null===e.$$phase&&e.$apply()}function b(n){function r(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}if(e.orientationViewMode){if("yasr"===e.viewMode){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px"}else e.noPadding={},document.querySelector(".CodeMirror-wrap").style.height="";document.getElementById("yasr").style.minHeight=""}else if(e.noPadding={paddingRight:15,paddingLeft:0},window.editor&&document.querySelector(".CodeMirror-wrap")){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px",document.getElementById("yasr").style.minHeight=e+"px"}else{let r;r=t(n?function(){e.fixSizesOnHorizontalViewModeSwitch(n)}:e.fixSizesOnHorizontalViewModeSwitch,100),e.$on("$destroy",(function(){t.cancel(r)}))}window.yasr&&window.yasr.container&&t((function(){window.yasr.container.resize()}),100)}function C(){b(!0)}function T(t,n){n.newRepo&&(e.tabsData=f.get(h.TABS_STATE),e.tabsData.forEach((function(e){e.yasrData=void 0,e.queryType=void 0,e.resultsCount=0,e.allResultsCount=0,e.sizeDelta=void 0})),f.set(h.TABS_STATE,e.tabsData),e.tabs=e.tabsData,e.currentQuery={},e.errorMessage=null,e.repositoryError=null)}function S(e){t((function(){$('a[data-id = "'+e+'"]').tab("show")}),0)}function w(r,o){if(e.executedQueryTab=e.currentQuery,o){if("SELECT"!==window.editor.getQueryType()&&"CONSTRUCT"!==window.editor.getQueryType()&&"DESCRIBE"!==window.editor.getQueryType())return void n.warning(g.instant("query.editor.warning.msg"));if(i.isActiveRepoOntopType())return void n.warning(g.instant("query.editor.virtual.repo.warning.msg"))}if(e.explainRequested=o,!e.queryIsRunning){if(r?e.currentTabConfig.resultsCount=0:e.resetCurrentTabConfig(),e.lastRunQueryMode=window.editor.getQueryMode(),"update"===e.lastRunQueryMode&&i.isActiveRepoOntopType())return void n.warning(g.instant("query.editor.virtual.repo.update.warning.msg"));if(E(!0,"update"===e.lastRunQueryMode?g.instant("query.editor.executing.update"):g.instant("query.editor.evaluating.query")),"none"!==e.viewMode){e.viewMode="none",e.orientationViewMode&&e.fixSizesOnHorizontalViewModeSwitch();const n=t(window.editor.query,500);e.$on("$destroy",(function(){t.cancel(n)}))}else window.editor.query()}}function N(t){let n=void 0;return e.tabsData.forEach((function(e){if(e.name===t.name&&e.query===t.body)return n=e.id,e})),n}function L(t){return function(n,r,i){e.savedQuery={name:n,query:r||window.editor.getValue(),shared:i},$(t).modal("show")}}function I(t){for(let n=0;n<e.tabsData.length;n++){if(e.tabsData[n].id===t)return n}}e.getPrincipal=function(){return c.getPrincipal().then(t=>{v=t,function(e,t){m.inference=t.appSettings.DEFAULT_INFERENCE,m.sameAs=t.appSettings.DEFAULT_SAMEAS,e.skipCountQuery=!t.appSettings.EXECUTE_COUNT,e.ignoreSharedQueries=t.appSettings.IGNORE_SHARED_QUERIES,e.tabsData=e.tabs=f.get(h.TABS_STATE)||[m],e.$watchCollection("[currentQuery.inference, currentQuery.sameAs]",(function(e,t,n){x(n.currentQuery)})),e.$on("repositoryIsSet",T)}(e,v)})},e.getPrincipal(),this.hint=document.createElement("span"),this.hint.innerHTML=g.instant("query.editor.autocomplete.hint"),this.hint.style.fontSize="12px",this.hint.style.color="gray",this.hint.style.backgroundColor="white",this.hint.style.position="absolute",this.hint.style.zIndex="3",this.hint.style.paddingLeft="12px",e.$watch((function(){return angular.element(".CodeMirror-hints").length}),e=>{if(e){const e=angular.element(".CodeMirror-hints")[0].getBoundingClientRect();document.body.appendChild(this.hint),this.hint.style.top=e.top-20+"px",this.hint.style.left=e.right-this.hint.offsetWidth-12+"px"}else this.hint&&this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint)}),e.resetCurrentTabConfig=function(){e.currentTabConfig={pageSize:1e3,page:1,allResultsCount:0,resultsCount:0}},e.queryExists=!1,e.resetCurrentTabConfig(),e.saveTab=function(t){const n=I(t);if(void 0===n)return{};const r=e.tabsData[n];return e.saveQueryToLocal(r),r},e.loadTab=function(n){e.tabsData=f.get(h.TABS_STATE)||[m];const r=I(n),o=e.tabsData[r];o.yasrData&&E(!0,g.instant("query.editor.render.results.msg"),null,!0);t((function(){""===e.currentQuery.query&&(e.currentQuery.query=" "),t((function(){window.editor.setValue(e.currentQuery.query),e.yasr.updateDownloadDropdown(),e.$broadcast("tabLoaded",e.currentQuery.id),e.yasr.options.output=o.outputType,o.yasrData&&(o.yasrData.customError?(e.yasr.results={getException:function(){return o.yasrData.customError}},E(!1)):t((function(){e.setYasrResponse(o.yasrData,o.textStatus,o.jqXhrOrErrorString),E(!1),$(".yasr_btnGroup li:nth-child(2)").hasClass("active")&&t((function(){$(".yasr_btnGroup li:nth-child(2) a").get(0).click()}),0)}),0))}),0)}),0),f.set(h.TABS_STATE_CURRENT_ID,n),e.currentQuery=o,t((function(){e.currentTabConfig={},e.currentTabConfig.queryType=o.queryType,e.currentTabConfig.resultsCount=o.resultsCount,e.currentTabConfig.offset=o.offset,e.currentTabConfig.allResultsCount=o.allResultsCount,e.currentTabConfig.allResultsCountExact=o.allResultsCountExact,e.currentTabConfig.page=o.page,e.currentTabConfig.pageSize=o.pageSize,e.currentTabConfig.timeFinished=o.timeFinished,e.currentTabConfig.timeTook=o.timeTook,e.currentTabConfig.sizeDelta=o.sizeDelta,e.currentTabConfig.customUpdateMessage=o.customUpdateMessage,e.currentTabConfig.errorMessage=o.errorMessage,e.currentTabConfig.warningMessage=o.warningMessage,e.$apply()}),0),$("#yasr").css("padding","0"),y||(y=setInterval(_,200));!function(){const t=i.isActiveRepoOntopType(),n=i.isActiveRepoFedXType();(function(e){const t=document.getElementById("sameAs"),n=document.getElementById("inference");t&&(t.disabled=!!e);n&&(n.disabled=!!e)})(t),e.nocount=!(!t&&!n)||!v.appSettings.EXECUTE_COUNT,t&&(e.currentQuery.inference=!0,e.currentQuery.sameAs=!0)}()},e.addNewTab=function(n,r,i){if(!O(!0))return;let o;o=r||i?{id:"1",name:r,query:i,inference:v.appSettings.DEFAULT_INFERENCE,sameAs:v.appSettings.DEFAULT_SAMEAS}:{id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:v.appSettings.DEFAULT_INFERENCE,sameAs:v.appSettings.DEFAULT_SAMEAS};A++;const s=""+A;e.tabsData=e.tabs;const a=o;a.id=s,e.tabsData.push(a),f.set(h.TABS_STATE_MAXID,A),f.set(h.TABS_STATE,e.tabsData);const l=Array.prototype.slice.call(arguments,1);t((function(){e.$apply(),S(s),n&&n.apply(this,l)}),0),e.tabs=e.tabsData},e.isTabChangeOk=O,e.runQuery=w,e.abortCurrentQuery=function(){d.deleteQuery(e.currentTrackAlias,i.getActiveRepository()).success((function(){e.abortRequested=!0}))},e.editQuery=function(t){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:g.instant("query.editor.edit.saved.query",{name:t.name}),query:t,edit:!0,okButtonText:g.instant("common.save.btn")}}}}).result.then((function(r){const i={name:r.name,body:r.body,shared:r.shared};t.name!==r.name?a.addNewSavedQuery(i).success((function(){e.deleteQueryHttp(t.name,!0)})).error((function(e){const t=getError(e);n.error(t,g.instant("query.editor.edit.saved.query.error"))})):a.editSavedQuery(i).success((function(){$("#editQueryContainer").modal("hide"),e.toggleSampleQueries(),n.success(g.instant("query.editor.edit.saved.query.success.msg",{name:t.name}))})).error((function(e){const t=getError(e);n.error(t,g.instant("query.editor.edit.saved.query.error"))}))}))},e.getNamespaces=function(){E(!0,g.instant("common.refreshing.namespaces"),g.instant("common.extra.message")),e.namespacesLoading=!0,p.getRepositoryNamespaces(i.getActiveRepository()).success((function(t){const n={};t.results.bindings.forEach((function(e){n[e.prefix.value]=e.namespace.value})),e.namespaces=n})).error((function(t){e.repositoryError=getError(t)})).finally((function(){E(!1),e.namespacesLoading=!1}))},e.changePagination=function(){w(!0,e.explainRequested)},e.toggleSampleQueries=function(){a.getSavedQueries().success((function(t){e.sampleQueries=t.filter(t=>!e.ignoreSharedQueries||t.owner!==e.principal.username)})).error((function(e){const t=getError(e);n.error(t,g.instant("query.editor.get.saved.queries.error"))}))},e.addKnownPrefixes=function(){a.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(e){angular.isDefined(window.editor)&&angular.isDefined(e)&&e!==window.editor.getValue()&&window.editor.setValue(e)})).error((function(e){const t=getError(e);return n.error(t,g.instant("common.add.known.prefixes.error")),!0}))},e.getExistingTabId=N,e.querySelected=function(t){const n=N(t);e.toggleSampleQueries(),e.isTabChangeOk(!1)&&(e.highlightNextTabChange=!0,angular.isDefined(n)?S(n):e.addNewTab(null,t.name,t.body))},e.deleteQuery=function(t){s.openSimpleModal({title:g.instant("common.confirm"),message:g.instant("query.editor.delete.saved.query.warning.msg",{savedQueryName:t}),warning:!0}).result.then((function(){e.deleteQueryHttp(t)}))},e.deleteQueryHttp=function(t,r){a.deleteSavedQuery(t).success((function(){e.toggleSampleQueries(),r||n.success(g.instant("query.editor.delete.saved.query.success.msg",{savedQueryName:t}))})).error((function(e){const t=getError(e);n.error(t,g.instant("query.editor.delete.saved.query.error"))}))},e.saveQuery=function(t,n){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:g.instant("query.editor.create.saved.query.msg"),query:{name:t.name,body:t.query,shared:t.shared},edit:!1,okButtonText:g.instant("common.create.btn"),queryExists:n,existingQueryErrMsg:Object(r.decodeHTML)(g.instant("query.sample.existing.query.warning",{name:t.name}))}}}}).result.then((function(t){e.saveQueryHttp(t)}),(function(){}))},e.saveQueryHttp=function(t){a.addNewSavedQuery(t).success((function(){n.success(g.instant("query.editor.save.saved.query.success.msg",{name:t.name}))})).error((function(r,i){const o=getError(r);n.error(o,g.instant("query.editor.create.saved.query.error"));let s=!1;409===i&&(s=!0),t.query=t.body,e.saveQuery(t,s)}))},e.saveQueryToLocal=x,e.setLoader=E,e.getLoaderMessage=function(){const t=(Date.now()-e.queryStartTime)/1e3;let n="",r="";e.noLoaderTimer||(n=e.getHumanReadableSeconds(t));r=e.progressMessage?g.instant("query.editor.progress.msg",{progressMessage:e.progressMessage,timeHuman:n}):g.instant("common.running.operation",{timeHuman:n});e.extraMessage&&t>10&&(r+=g.instant("query.editor.extra.msg",{extraMessage:e.extraMessage}));return r},e.fixSizesOnHorizontalViewModeSwitch=b,e.changeViewMode=function(){e.viewMode="none",e.orientationViewMode=!e.orientationViewMode,f.set(h.VIEW_MODE,e.orientationViewMode),b()},e.showHideEditor=C,e.focusQueryEditor=function(){angular.element(document).find(".editable-input").is(":focus")||angular.element(document).find(".CodeMirror textarea:first-child").focus()},e.orientationViewMode=!f.get(h.VIEW_MODE)||"true"===f.get(h.VIEW_MODE),e.viewMode="none",e.getActiveRepository=function(){return i.getActiveRepository()},e.getActiveRepositoryNoError=function(){if(!e.repositoryError)return i.getActiveRepository()},e.orientationViewMode||C(),window.onbeforeunload=function(){e.currentQuery&&e.saveTab(e.currentQuery.id),f.set(h.TABS_STATE,e.tabs)},e.$on("$destroy",(function(){e.currentQuery&&e.saveTab(e.currentQuery.id),f.set(h.TABS_STATE,e.tabs),clearInterval(y)})),e.$on("$destroy",(function(){clearInterval(y),window.editor=null,window.yasr=null}));let A=f.get(h.TABS_STATE_MAXID)||1;function R(e){return $(e).attr("data-id")}function _(){if(e.currentTabConfig.resultsCount>=0){const e=$(".saveAsDropDown");e.length>0&&!window.editor.queryValid?yasr.header.find(".saveAsDropDown").remove():0===e.length&&window.editor.queryValid&&yasr.updateDownloadDropdown()}}function O(t){return!(e.queryIsRunning&&!e.namespacesLoading)||(t?n.info(g.instant("query.editor.new.tab.running.query.warning.msg")):n.info(g.instant("query.editor.tab.switching.running.query.warning.msg")),!1)}e.highlightNextTabChange=!1,e.$on("tabAction",(function(n,r){r.relatedTarget&&(t.cancel(r.relatedTarget.timer),$(r.relatedTarget).css("color",""),e.saveTab(R(r.relatedTarget))),e.loadTab(R(r.target));const i=["var(--primary-color)","","var(--primary-color)"],o=[400,400,400];if(e.highlightNextTabChange){e.highlightNextTabChange=!1;let n=0;$(r.target).css("color",i[n]);const s=function(){n++,n<i.length?($(r.target).css("color",i[n]),r.target.timer=t(s,o[n])):$(r.target).css("color","")};t(s,o[n])}})),e.$on("deleteAllexeptSelected",(function(t,n){e.tabsData=n,e.tabs=n})),e.currentQuery={},e.savedQuery={},e.sampleQueries={},e.editQueryModal=L("#editQueryContainer"),e.deleteQueryModal=L("#confirmDeleteContainer"),e.saveQueryModal=L("#saveQueryContainer"),e.getResultsDescription=function(){let t;if(0===e.currentTabConfig.resultsCount)t="No results.";else{const n=(e.currentTabConfig.page-1)*e.currentTabConfig.pageSize+Math.min(e.currentTabConfig.resultsCount,e.currentTabConfig.pageSize);t=g.instant("query.editor.showing.results.from.msg")+l("currency")(e.currentTabConfig.offset,"",0)+g.instant("query.editor.to")+l("currency")(n,"",0),e.currentTabConfig.allResultsCount>0&&(t+=g.instant(e.currentTabConfig.allResultsCountExact?"query.editor.of":"query.editor.of.at.least"),t+=l("currency")(e.currentTabConfig.allResultsCount,"",0)),t+="."}return t},e.getUpdateDescription=function(){return e.currentTabConfig.customUpdateMessage?g.instant(e.currentTabConfig.customUpdateMessage.msg,{name:e.currentTabConfig.customUpdateMessage.name}):void 0===e.currentTabConfig.sizeDelta?"":e.currentTabConfig.sizeDelta<0?g.instant("yasr.removed.statements.result.msg",{sizeDelta:Math.abs(e.currentTabConfig.sizeDelta)}):e.currentTabConfig.sizeDelta>0?g.instant("yasr.added.statements.result.msg",{sizeDelta:e.currentTabConfig.sizeDelta}):g.instant("yasr.statements.no.change.msg")},e.getStaleWarningMessage=function(){const t=60*Math.round((Date.now()-e.currentTabConfig.timeFinished)/6e4);if(t>=3600)return g.instant("yasr.stale.result.msg",{secondsAgo:e.getHumanReadableSeconds(t)})};const D=function(){};angular.element(u).bind("resize",D),e.$on("$destroy",(function(){angular.element(u).unbind("resize",D)}))}function o(e,t,n,r){n.queryExists&&(e.queryExists=!0),e.query=_.cloneDeep(n.query),e.title=n.title,e.edit=n.edit,e.okButtonText=n.okButtonText,e.existingQueryErrMsg=r.trustAsHtml(n.existingQueryErrMsg),e.ok=function(){e.form.$valid&&t.close(e.query)},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.core.directives.queryeditor.controllers",["graphdb.framework.utils.localstorageadapter","graphdb.framework.rest.sparql.service"]).controller("QueryEditorCtrl",i).controller("QuerySampleModalCtrl",o),i.$inject=["$scope","$timeout","toastr","$repositories","$uibModal","ModalService","SparqlRestService","$filter","$window","$jwtAuth","RDF4JRepositoriesRestService","MonitoringRestService","LocalStorageAdapter","LSKeys","$translate"],o.$inject=["$scope","$uibModalInstance","data","$sce"]},82:function(e,t,n){"use strict";n.r(t);n(29),n(66);function r(e){const t=[];return Object.keys(e).forEach((function(n){t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]))})),t.join("&")}function i(e,t){return _.reduce(e,(function(e,n){if(""===n.key&&""===n.value);else{if(""===n.key)throw new Error(t.instant("externalsync.empty.value.key.error",{value:n.value}));if(e.hasOwnProperty(n.key))throw new Error(t.instant("externalsync.duplicate.key.error",{key:n.key}));e[n.key]=n.value}return e}),{})}function o(e,t){for(let r=0;r<t.length;r++){const i=t[r];if("StringArray"===i.__type)e[i.__name]||(e[i.__name]=[""]);else if("OptionArray"===i.__type)if(e[i.__name])for(let t=0;t<i.__childOptions.length;t++){const n=i.__childOptions[t];if("Boolean"===n.__type)for(let t=0;t<e[i.__name].length;t++){const r=e[i.__name][t];!r.hasOwnProperty([n.__name])&&angular.isDefined(n.__defaultValue)&&(r[n.__name]=n.__defaultValue)}}else{e[i.__name]=[];const t={};for(let e=0;e<i.__childOptions.length;e++){const n=i.__childOptions[e];"StringArray"===n.__type?t[n.__name]=[""]:t[n.__name]=angular.isUndefined(n.__defaultValue)?"":n.__defaultValue}e[i.__name].push(t)}else"Map"===i.__type?e[i.__name]?e[i.__name]=(n=e[i.__name],_.map(n,(function(e,t){return{key:t,value:e}}))):e[i.__name]=[]:"JsonString"===i.__type?!e[i.__name]||e[i.__name]instanceof String||"string"==typeof e[i.__name]||(e[i.__name]=angular.toJson(e[i.__name],2)):angular.isUndefined(e[i.__name])&&(e[i.__name]=angular.isUndefined(i.__defaultValue)?"":i.__defaultValue)}var n;return e}function s(e,t,n){return e.post("repositories/"+t,r({query:n}),{headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/sparql-results+json","X-GraphDB-Local-Consistency":"updating"}})}function a(e){return e.substring(0,e.length-1)+"/instance#"}function l(e,t,n,r,o){const s=function e(t,n){const r={};return _.each(n,(function(n){angular.isDefined(t[n.__name])&&("OptionArray"===n.__type?(r[n.__name]=[],_.each(t[n.__name],(function(t){r[n.__name].push(e(t,n.__childOptions))}))):r[n.__name]=_.cloneDeep(t[n.__name]))})),r}(n,r);for(let e=0;e<r.length;e++)try{"Map"===r[e].__type?s[r[e].__name]=i(s[r[e].__name],$translate):"JsonString"===r[e].__type&&(s[r[e].__name]=angular.fromJson(s[r[e].__name]))}catch(t){return o(r[e].__label,t.message),null}!function e(t){Array.isArray(t)&&(t=_.filter(t,(function(e){return null!==e&&(!e.trim||""!==e.trim())})));return Object.keys(t).forEach((function(n){""!==t[n]&&null!=t[n]||!1===t[n]?"object"==typeof t[n]&&(t[n]=e(t[n])):delete t[n]})),t}(s);let l="";l+="PREFIX :<"+t+">\n";return l+="PREFIX inst:<"+a(t)+">\n",l+="INSERT DATA {\n",l+="\tinst:"+e+" :createConnector '''\n",l+=angular.toJson(s,2),l+="\n''' .\n}\n",l=l.replace(/\\/g,"\\\\\\"),l}function u(e,t,n,i,u,c,p,d,f,h){function g(t){e.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:t?h.instant("externalsync.repairing"):h.instant("externalsync.creating"),waitOnRepairStartOnce:!!t,eta:"-",inline:!1,iri:null}}function m(t,n,r){return g(r),$.extend(e.beingBuiltConnector,{iri:a(t)+n,name:n,inline:!1,doneCallback:function(){e.beingBuiltConnector.modalInstance.dismiss("cancel")}}),e.beingBuiltConnector.modalInstance=i.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:e}),e.beingBuiltConnector.modalInstance}function v(t,i,o){const s=m(t.value,i.name,!1);d.addStatements(n.getActiveRepository(),r({update:i.query})).then((function(){f.getConnectors().then((function(){f.hasConnector(encodeURIComponent(t.value)).then((function(n){e.existing[t.key]=n.data}))})),u.success(h.instant("created.connector",{name:i.name}))}),(function(e){u.error(getError(e)),o()})).finally((function(){s.dismiss("cancel")}))}e.loader=!1,e.controllers=[],e.existing={},e.definitions={},e.getLoaderMessage=function(){const t=(Date.now()-e.loaderStartTime)/1e3,n=e.getHumanReadableSeconds(t);let r="";return r=e.progressMessage?e.progressMessage+"... "+n:h.instant("common.running.operation",{timeHuman:n}),e.extraMessage&&t>10&&(r+="\n"+e.extraMessage),r},e.setLoader=function(t,n,r){t?(e.loader=!0,e.loaderStartTime=Date.now(),e.progressMessage=n,e.extraMessage=r):(e.loader=!1,e.progressMessage="",e.extraMessage="")},e.initConnector=function(t){return f.initConnector(encodeURIComponent(t.value)).then((function(n){return e.definitions[t.key]=n.data,f.hasConnector(encodeURIComponent(t.value)).then((function(n){e.existing[t.key]=n.data}))}))},e.getConnectors=function(){e.isLicenseValid()&&e.canWriteActiveRepo()&&(e.setLoader(!0,h.instant("externalsync.fetching.connectors"),h.instant("common.extra.message")),f.getConnectors().then((function(r){e.connectors=Object.keys(r.data).map((function(e){return{key:e,value:r.data[e]}})),p.all(_.map(e.connectors,(function(t){return e.initConnector(t)}))).finally((function(){g();const r=function(e){const t=_.map(e,(function(e){return"<"+e.value+"connectorStatus>"})).join("|");return t?"SELECT ?connector ?status { ?connector "+t+" ?status }":null}(e.connectors);r?function(e){return s(t,n.getActiveRepository(),e)}(r).then((function(t){const n=function(e){if(e.bindings)for(let t=0;t<e.bindings.length;t++)try{const n=JSON.parse(e.bindings[t].status.value);if("BUILDING"===n.status)return{connector:e.bindings[t].connector.value,status:n}}catch(e){console.error(e)}return{}}(t.data.results);if(n.connector){const t=n.connector.split(/#/);t[0]=t[0].replace(/\/instance$/,"#"),r=t[0],i=t[1],g(),$.extend(e.beingBuiltConnector,{iri:a(r)+i,name:i,inline:!0,doneCallback:function(){e.beingBuiltConnector.inline=!1}})}var r,i})).finally((function(){e.setLoader(!1)})):e.setLoader(!1)}))})).catch((function(t){e.setLoader(!1),u.error(getError(t),h.instant("externalsync.could.not.get.connectors.error"))})),e.existing={})},e.getOptions=function(t){return e.definitions[t.key]},e.isEmpty=function(e){return angular.isObject(e)&&0===Object.keys(e).length},e.toPrettyJson=function(e){return angular.toJson(e,2)},e.$watch((function(){return n.getActiveRepository()}),e.getConnectors),e.$watch((function(){return n.getActiveLocation()}),e.getConnectors),e.copyConnector=function(t,n){let r;angular.isUndefined(n)||(r=_.cloneDeep(n),r.name=r.name+"-copy");i.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return t},values:function(){return angular.isUndefined(r)?{name:"",values:{}}:r},options:function(){return e.getOptions(t)}}}).result.then((function(n){v(t,n,(function(){n.skipConversion=!0,e.newConnector(t,n)}))}))},e.newConnector=function(t,n){i.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return t},values:function(){return angular.isUndefined(n)?{name:"",values:{}}:n},options:function(){return e.getOptions(t)}}}).result.then((function(n){v(t,n,(function(){n.skipConversion=!0,e.newConnector(t,n)}))}))},e.repair=function(t,i){c.openSimpleModal({title:h.instant("externalsync.confirm.repair"),message:h.instant("externalsync.repair.warning.msg"),warning:!0}).result.then((function(){const o=m(i.value,t.name,!0),s=(l=t.name,"PREFIX prefix:<"+(c=i.value)+">\nINSERT DATA {\n\t<"+a(c)+l+'> prefix:repairConnector ""\n}');var l,c;d.addStatements(n.getActiveRepository(),r({update:s})).then((function(){f.getConnectors().then((function(){f.hasConnector(encodeURIComponent(i.value)).then((function(t){e.existing[i.key]=t.data}))})),u.success(h.instant("externalsync.repair.success.msg",{name:t.name}))}),(function(e){u.error(getError(e))})).finally((function(){o.dismiss("cancel")}))}))},e.delete=function(t,o){const s=o.key.indexOf("Elastic")>=0||o.key.indexOf("Solr")>=0;i.open({templateUrl:"js/angular/externalsync/templates/deleteConnector.html",controller:"DeleteConnectorCtrl",resolve:{popoverMsg:function(){return s?h.instant("delete.connector.conditional",{type:o.key}):""}}}).result.then((function(i){e.setLoader(!0,h.instant("externalsync.delete.progress.msg",{name:t.name}),h.instant("externalsync.extra.message.warning"));const a=function(e,t,n){const r=t.substring(0,t.length-1)+"/instance#";return"PREFIX prefix:<"+t+">\nINSERT DATA {\n\t<"+r+e+'> prefix:dropConnector "'+(n?"force":"")+'"\n}'}(t.name,o.value,i);d.addStatements(n.getActiveRepository(),r({update:a})).then((function(){f.getConnectors().then((function(){f.hasConnector(encodeURIComponent(o.value)).then((function(t){e.existing[o.key]=t.data}))})),i?(u.success(h.instant("externalsync.delete.force.success.msg",{name:t.name})),s&&u.warning(h.instant("externalsync.delete.remote.warning",{key:o.key}))):u.success(h.instant("externalsync.delete.success.msg",{name:t.name}))}),(function(e){u.error(getError(e))})).finally((function(){e.setLoader(!1)}))}))},e.viewQuery=function(t,n){i.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){const r=e.getOptions(t);return l(n.name,t.value,o(n.values,r),r)}}})}}function c(e,t,n){e.force=!1,e.popoverMsg=n,e.ok=function(){t.close(e.force)},e.cancel=function(){t.dismiss()}}function p(e,t,n,r,i){function o(){return l(e.name,n.value,e.values,e.options,(function(e,t){i.error(t,e)}))}e.connector=n,e.addField=function(t,n){const r=_.cloneDeep(e.defaultValues[n][0]);e.values[n].splice(t+1,0,r)},e.addOption=function(e,t){t.splice(e+1,0,"")},e.deleteOption=function(e,t){t.splice(e,1)},e.addMapOption=function(e,t){t.splice(e+1,0,{key:"",value:""})},e.deleteMapOption=function(e,t){t.splice(e,1)},e.ok=function(){if(e.form.$valid){const n=o();n&&t.close({name:e.name,values:e.values,options:e.options,query:n})}},e.viewQuery=function(){const e=o();e&&r.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return e}}})},e.cancel=function(){t.dismiss("cancel")}}function d(e,t,n,r,i,s,a,l){angular.extend(this,t("ExtendNewConnectorCtrl",{$scope:e,$uibModalInstance:r,connector:i,$uibModal:s})),e.values=a.values,e.options=l,e.name=a.name,a.skipConversion||(e.values=o(e.values,e.options)),e.defaultValues=_.cloneDeep(e.values)}function f(e,t,n,r,i){function o(){const o=function(e){const t=e.replace(/\/instance#.+$/,"#connectorStatus");let n="";return n+="SELECT ?status {\n",n+="\t<"+e+"> <"+t+"> ?status",n+="\n}",n}(e.beingBuiltConnector.iri);e.beingBuiltConnector.iri=null,e.progressInterval=t((function(){(function(e){return s(n,r.getActiveRepository(),e)})(o).then((function(n){const r=function(e){if(e.bindings&&e.bindings.length>0)try{return JSON.parse(e.bindings[0].status.value)}catch(e){console.error(e)}return{}}(n.data.results);"BUILDING"===r.status?(e.beingBuiltConnector.status=r,e.beingBuiltConnector.percentDone=(100*r.processedEntities/r.estimatedEntities).toFixed(0),e.beingBuiltConnector.eta=e.getHumanReadableSeconds(r.etaSeconds),e.beingBuiltConnector.actionName=r.repair?i.instant("externalsync.repairing"):i.instant("externalsync.creating"),e.beingBuiltConnector.waitOnRepairStartOnce=!1):"BUILT"!==r.status||e.beingBuiltConnector.waitOnRepairStartOnce||(t.cancel(e.progressInterval),e.beingBuiltConnector.doneCallback&&e.beingBuiltConnector.doneCallback())}))}),1e3),e.$on("$destroy",(function(){t.cancel(e.progressInterval)}))}e.beingBuiltConnector=e.beingBuiltConnector||{},!e.beingBuiltConnector.inline&&e.beingBuiltConnector.iri&&o(),e.$watch("beingBuiltConnector.iri",(function(t){e.beingBuiltConnector.inline&&t&&o()}))}angular.module("graphdb.framework.externalsync.controllers",["graphdb.framework.rest.rdf4j.repositories.service","graphdb.framework.rest.connectors.service"]).controller("ConnectorsCtrl",u).controller("ExtendNewConnectorCtrl",p).controller("CreateConnectorCtrl",d).controller("CreateProgressCtrl",f).controller("DeleteConnectorCtrl",c).filter("ceil",(function(){return function(e){return Math.ceil(e)}})),u.$inject=["$scope","$http","$repositories","$uibModal","toastr","ModalService","$q","RDF4JRepositoriesRestService","ConnectorsRestService","$translate"],c.$inject=["$scope","$uibModalInstance","popoverMsg"],p.$inject=["$scope","$uibModalInstance","connector","$uibModal","toastr"],d.$inject=["$scope","$controller","$http","$uibModalInstance","connector","$uibModal","values","options"],f.$inject=["$scope","$interval","$http","$repositories","$translate"]},83:function(e,t,n){"use strict";n.r(t);n(108),n(109);var r=n(84),i=n(70),o=n(110),s=n(67),a=n(12),l=n(93),u=n(442),c=n(74),p=n(111),d=n(14),f=n(112);function h(e,t,n,h,g,m,v,y,x,E,b,C,T,S){return{restrict:"E",templateUrl:"js/angular/core/directives/yasgui-component/templates/yasgui-component.html",scope:{yasguiConfig:"=",afterInit:"&",queryChanged:"&"},link:(h,w,N)=>{h.classToApply=N.class||"";const L=new Map,I=h.yasguiConfig&&h.yasguiConfig.outputHandlers?new Map(h.yasguiConfig.outputHandlers):new Map;let A=void 0;h.getOntotextYasguiElements=()=>w.find("ontotext-yasgui"),h.getOntotextYasguiElement=()=>new p.YasguiComponent(h.getOntotextYasguiElements()[0]),h.createSavedQuery=e=>{const t=Object(r.queryPayloadFromEvent)(e);T.addNewSavedQuery(t).then(()=>H(t)).catch(G)},h.updateSavedQuery=e=>{const t=Object(r.queryPayloadFromEvent)(e);T.editSavedQuery(t).then(()=>B(t)).catch(G)},h.deleteSavedQuery=e=>{const t=Object(r.queryPayloadFromEvent)(e);T.deleteSavedQuery(t.name).then(()=>{y.success(n.instant("query.editor.delete.saved.query.success.msg",{savedQueryName:t.name}))}).catch(e=>{const t=getError(e);y.error(t,n.instant("query.editor.delete.saved.query.error"))})},h.shareSavedQuery=e=>{const t=Object(r.queryPayloadFromEvent)(e);h.savedQueryConfig={shareQueryLink:S.createShareSavedQueryLink(t.name,t.owner)}},h.shareQuery=e=>{const t=Object(r.queryPayloadFromEvent)(e);h.savedQueryConfig={shareQueryLink:S.createShareQueryLink(t)}},h.queryShareLinkCopied=()=>{y.success(n.instant("modal.ctr.copy.url.success"))},h.loadSavedQueries=()=>{T.getSavedQueries().then(e=>{const t=Object(r.savedQueriesResponseMapper)(e);h.savedQueryConfig={savedQueries:t}}).catch(e=>{const t=getError(e);y.error(t,n.instant("query.editor.get.saved.queries.error"))})},h.saveQueryOpened=e=>{d.YasguiComponentDirectiveUtil.highlightTabName(Object(o.toYasguiOutputModel)(e).getTab())},h.output=e=>{const t=Object(o.toYasguiOutputModel)(e);I.has(t.TYPE)&&I.get(t.TYPE)(t)};I.set(s.EventDataType.QUERY,e=>{const t=e.getPageNumber(),n=e.getPageSize();n&&t&&(e.setOffset((t-1)*(n-1)),e.setLimit(n)),e.setPageNumber(void 0),e.setPageSize(void 0)});I.set(s.EventDataType.COUNT_QUERY,e=>{e.setPageSize(void 0),e.setPageNumber(void 0),e.setCount(1)});I.set(s.EventDataType.COUNT_QUERY_RESPONSE,e=>{e.setTotalElements(F(e))});I.set(s.EventDataType.DOWNLOAD_AS,e=>{const t=L.get(e.pluginName);t&&t(e)});I.set(s.EventDataType.NOTIFICATION_MESSAGE,e=>{const t=y[e.messageType];Object(i.isFunction)(t)&&t(e.message)});L.set("extended_response",e=>{"application/sparql-results+json"===e.contentType?h.getOntotextYasguiElement().getEmbeddedResultAsJson().then(t=>{const n=JSON.stringify(t,null,"\t");Object(o.downloadAsFile)(M()+"_queryResults.json",e.contentType,n)}):"text/csv"===e.contentType&&h.getOntotextYasguiElement().getEmbeddedResultAsCSV().then(t=>{Object(o.downloadAsFile)(M()+"_queryResults.csv",e.contentType,t)})});L.set(l.YasrPluginName.EXTENDED_TABLE,e=>{const n=e.query,r=e.infer,i=e.sameAs,o=e.contentType,s=m.getAuthToken()||"";d.YasguiComponentDirectiveUtil.getOntotextYasguiElementAsync("#query-editor").then(e=>e.getQueryMode()).then(e=>{const a=t.resolveSparqlEndpoint(e),l=$("#wb-download");l.attr("action",a),$("#wb-download-query").val(n),$("#wb-download-infer").val(r),$("#wb-download-sameAs").val(i),$("#wb-auth-token").val(s),$("#wb-download-accept").val(o),l.submit()})});const R=[],_=()=>h.getOntotextYasguiElement().getQuery().then(e=>{A=JSON.stringify(e)});R.push(h.$watch("yasguiConfig",(n,r)=>{if(!h.ontotextYasguiConfig&&n||n&&!Object(u.isEqual)(n,r)){const r=t.isActiveRepoOntopType(),i={isVirtualRepository:r,infer:r||n.infer,immutableInfer:r,sameAs:r||n.sameAs,immutableSameAs:r,yasqeAutocomplete:{LocalNamesAutocompleter:t=>{const n=e.defer();return V(t,n)}},language:g.getLanguage(),i18n:x.getTranslations(),getRepositoryStatementsCount:W,onQueryAborted:z};if(angular.extend(i,U(),h.yasguiConfig),void 0===i.showQueryButton||i.showQueryButton){const e=i.keyboardShortcutConfiguration||{};e[f.KeyboardShortcutName.EXECUTE_EXPLAIN_PLAN_FOR_QUERY]=!0,e[f.KeyboardShortcutName.EXECUTE_CHAT_GPT_EXPLAIN_PLAN_FOR_QUERY]=!0,i.keyboardShortcutConfiguration=e}else{const e=i.keyboardShortcutConfiguration||{};e[f.KeyboardShortcutName.EXECUTE_QUERY_OR_UPDATE]=!1,e[f.KeyboardShortcutName.EXECUTE_EXPLAIN_PLAN_FOR_QUERY]=!1,e[f.KeyboardShortcutName.EXECUTE_CHAT_GPT_EXPLAIN_PLAN_FOR_QUERY]=!1,e[f.KeyboardShortcutName.CREATE_TAB]=!1,e[f.KeyboardShortcutName.CREATE_SAVE_QUERY]=!1,e[f.KeyboardShortcutName.SWITCH_NEXT_TAB]=!1,e[f.KeyboardShortcutName.SWITCH_PREVIOUS_TAB]=!1,e[f.KeyboardShortcutName.CLOSES_ALL_TABS]=!1,i.keyboardShortcutConfiguration=e}h.ontotextYasguiConfig=i,D(),_().then(()=>{angular.isFunction(h.afterInit)&&h.afterInit()})}}));const O=()=>{let e;const t=h.getOntotextYasguiElement();t.getQuery().then(t=>(e=JSON.stringify(t),e)).then(T.addKnownPrefixes).then(n=>{e=n.data,t.setQuery(e)}).then(()=>{P(JSON.stringify(e))}).catch(e=>{const t=getError(e);y.error(t,n.instant("common.add.known.prefixes.error"))})},D=()=>{const e=v((function(){const t=h.getOntotextYasguiElements();t&&(t.on("paste.sparqlQuery",".CodeMirror",O),t.on("keyup.sparqlQuery",".CodeMirror textarea",k),v.cancel(e))}))},k=e=>{h.getOntotextYasguiElement().getQuery().then(e=>{P(JSON.stringify(e))})},P=e=>{h.queryChanged(e),h.$emit("queryChanged",{dirty:A!==e})};R.push(h.$on("language-changed",(function(e,t){h.language=t.locale})));h.$on("$destroy",()=>{R.forEach(e=>e());const e=h.getOntotextYasguiElements();e.off("paste.sparqlQuery"),e.off("keyup.sparqlQuery")});const M=()=>{const e=new Date;return`${e.toLocaleDateString(h.language)}_${e.toLocaleTimeString(h.language)}`},F=e=>{if(e.isResponseNumber())return e.getResponseBody();if(e.isResponseArray()){const t=e.getResponseBody();if(t["http://www.ontotext.com/"])return t["http://www.ontotext.com/"]["http://www.ontotext.com/"][0].value}if(e.hasBindingResponse()){const t=e.getResponseBody();if(t){const e=t.results.bindings[0],n=t.head.vars,r=Object.keys(e).find((function(t){return n.indexOf(t)>-1&&!isNaN(e[t].value)}));if(r.length>0)return e[r].value}}},j=e=>{const n=e.getTab().getYasqe(),r={"Content-Type":"application/x-www-form-urlencoded","X-GraphDB-Local-Consistency":"updating","X-GraphDB-Catch":n.getPageSize()+"; throw","X-GraphDB-Track-Alias":`yasgui-component-${performance.now()}-${Date.now()}`,"X-GraphDB-Repository-Location":t.getActiveRepositoryObject().location,"X-Requested-With":"XMLHttpRequest"},i=m.getAuthToken();i&&(r.Authorization=i);const o=n.getQueryType();return a.QueryMode.UPDATE===n.getQueryMode()?r.Accept="text/plain,/;q=0.9":c.QueryType.CONSTRUCT===o||c.QueryType.DESCRIBE===o?r.Accept="application/x-graphdb-table-results+json, application/rdf+json;q=0.9, */*;q=0.8":r.Accept="application/x-sparqlstar-results+json, application/sparql-results+json;q=0.9, */*;q=0.8",r},U=()=>({showEditorTabs:!0,showToolbar:!0,componentId:"yasgui-component",headers:j,pageSize:1e3,maxPersistentResponseSize:5e5,showResultTabs:!0}),G=e=>{const t=getError(e),r=n.instant("query.editor.create.saved.query.error");y.error(t,r),h.savedQueryConfig=Object(i.merge)({},h.savedQueryConfig,{saveSuccess:!1,errorMessage:[r]})},B=e=>q(n.instant("query.editor.edit.saved.query.success.msg",{name:e.name})),H=e=>q(n.instant("query.editor.save.saved.query.success.msg",{name:e.name})),q=e=>{y.success(e),h.savedQueryConfig=Object(i.merge)({},h.savedQueryConfig,{saveSuccess:!0})},V=(e,t)=>E.getAutocompleteSuggestions(e,t.promise).then((function(e){return t=null,e.data})),W=()=>b.getRepositorySize(t.getActiveRepository()).then(e=>parseInt(e.data)).catch((function(e){const r={repo:t.getActiveRepository(),error:getError(e)};y.warning(n.instant("query.editor.repo.size.error",r))})),z=e=>{if(e){const t=e.url.substring(e.url.lastIndexOf("/")+1),n=e.header["X-GraphDB-Track-Alias"];return C.deleteQuery(n,t)}}}}}angular.module("graphdb.framework.core.directives.yasgui-component",["graphdb.framework.core.services.translation-service","graphdb.framework.sparql-editor.share-query.service"]).directive("yasguiComponent",h),h.$inject=["$q","$repositories","$translate","$location","$languageService","AuthTokenService","$interval","toastr","TranslationService","AutocompleteRestService","RDF4JRepositoriesRestService","MonitoringRestService","SparqlRestService","ShareQueryLinkService"]},84:function(e,t,n){"use strict";n.r(t),n.d(t,"buildQueryModel",(function(){return i})),n.d(t,"savedQueriesResponseMapper",(function(){return o})),n.d(t,"savedQueryResponseMapper",(function(){return s})),n.d(t,"queryPayloadFromEvent",(function(){return a}));var r=n(73);const i=(e,t,n,i)=>new r.TabQueryModel(t,e,n,i),o=e=>e&&e.data?e.data.map?e.data.map(e=>i(e.body,e.name,e.owner,e.shared)):[i(e.data.body,e.data.name,e.data.owner,e.data.shared)]:[],s=e=>{const t=o(e);return t.length?t[0]:null},a=e=>({name:e.detail.queryName,body:e.detail.query,shared:e.detail.isPublic})},85:function(e,t,n){"use strict";n.r(t),n.d(t,"EventData",(function(){return r}));class r{constructor(e,t){this.TYPE=e,this.payload=t}}},86:function(e,t,n){"use strict";n.r(t),n.d(t,"QueryRequestEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.query=e.payload.query,this.queryMode=e.payload.queryMode,this.queryType=e.payload.queryType,this.pageSize=e.payload.pageSize,this.request=e.payload.request}setPageSize(e){this.request._data.pageSize=e}getPageSize(){return this.request._data.pageSize?parseInt(this.request._data.pageSize):void 0}setPageNumber(e){this.request._data.pageNumber=e}getPageNumber(){return this.request._data.pageNumber?parseInt(this.request._data.pageNumber):void 0}setOffset(e){this.request._data.offset=e}setLimit(e){this.request._data.limit=e}}},87:function(e,t,n){"use strict";n.r(t),n.d(t,"CountQueryResponseEvent",(function(){return i}));var r=n(70);class i{constructor(e){this.TYPE=e.TYPE,this.response=e.payload.response}hasResponse(){return this.response&&this.response.body}getResponseBody(){if(this.hasResponse())return this.response.body}isResponseNumber(){return!!this.hasResponse()&&Object(r.isNumber)(this.response.body)}isResponseArray(){return!!this.hasResponse()&&Array.isArray(this.response.body)}getBindings(){if(this.hasResponse())return this.response.body.results.bindings}hasBindingResponse(){return!!this.hasResponse()&&this.response.body.results.bindings[0]}setTotalElements(e){this.response.body.totalElements=e}}},88:function(e,t,n){"use strict";n.r(t),n.d(t,"CountQueryRequestEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.query=e.payload.query,this.queryMode=e.payload.queryMode,this.queryType=e.payload.queryType,this.pageSize=e.payload.pageSize,this.request=e.payload.request}setPageSize(e){this.request._data.pageSize=e}setPageNumber(e){this.request._data.pageNumber=e}setCount(e){this.request._data.count=e}}},89:function(e,t,n){"use strict";n.r(t),n.d(t,"DownloadAsEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.contentType=e.payload.value,this.pluginName=e.payload.pluginName,this.query=e.payload.query,this.infer=e.payload.infer,this.sameAs=e.payload.sameAs}}},90:function(e,t,n){"use strict";n.r(t),n.d(t,"NotificationMessageEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.message=e.payload.message,this.code=e.payload.code,this.messageType=e.payload.messageType}}},91:function(e,t,n){"use strict";n.r(t),n.d(t,"QueryExecutedEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.duration=e.payload.duration,this.tabId=e.payload.tabId}}},92:function(e,t,n){"use strict";n.r(t),n.d(t,"SaveQueryOpened",(function(){return r}));class r{constructor(e){this.tab=e.payload.tab}getTab(){return this.tab}}},93:function(e,t,n){"use strict";n.r(t),n.d(t,"YasrPluginName",(function(){return r}));const r={EXTENDED_TABLE:"extended_table",RAW_RESPONSE:"response",TABLE:"table"}}}]);
|