Commit 4f42d5733034fb21ece46448aa2d67660ed3be23

Authored by 潘钊
1 parent af02e4e1

update

Showing 59 changed files with 1632 additions and 1380 deletions
src/main/java/com/bsth/data/BasicData.java
1 package com.bsth.data; 1 package com.bsth.data;
2 2
3 import com.bsth.Application; 3 import com.bsth.Application;
4 -import com.bsth.data.gpsdata.analyse.GeoCacheData; 4 +import com.bsth.data.gpsdata.arrival.GeoCacheData;
5 import com.bsth.entity.*; 5 import com.bsth.entity.*;
6 import com.bsth.entity.schedule.CarConfigInfo; 6 import com.bsth.entity.schedule.CarConfigInfo;
7 import com.bsth.repository.*; 7 import com.bsth.repository.*;
src/main/java/com/bsth/data/gpsdata/GpsEntity.java
1 package com.bsth.data.gpsdata; 1 package com.bsth.data.gpsdata;
2 2
3 -import com.bsth.data.gpsdata.analyse.StationRoute; 3 +import com.bsth.data.gpsdata.arrival.entity.StationRoute;
4 import com.fasterxml.jackson.annotation.JsonIgnore; 4 import com.fasterxml.jackson.annotation.JsonIgnore;
5 5
6 /** 6 /**
@@ -78,15 +78,15 @@ public class GpsEntity { @@ -78,15 +78,15 @@ public class GpsEntity {
78 private boolean sEPoint; 78 private boolean sEPoint;
79 */ 79 */
80 80
81 - /** 站内 */  
82 - private boolean instation; 81 + /** 0: 站外 1:站内 2:场内 */
  82 + private int instation;
83 83
84 /** 站点信息,站内时有值 */ 84 /** 站点信息,站内时有值 */
85 @JsonIgnore 85 @JsonIgnore
86 private StationRoute station; 86 private StationRoute station;
87 87
88 /** 状态 */ 88 /** 状态 */
89 - private String state2; 89 + private String signalState;
90 90
91 public Integer getCompanyCode() { 91 public Integer getCompanyCode() {
92 return companyCode; 92 return companyCode;
@@ -233,14 +233,6 @@ public class GpsEntity { @@ -233,14 +233,6 @@ public class GpsEntity {
233 this.version = version; 233 this.version = version;
234 } 234 }
235 235
236 - public boolean isInstation() {  
237 - return instation;  
238 - }  
239 -  
240 - public void setInstation(boolean instation) {  
241 - this.instation = instation;  
242 - }  
243 -  
244 public StationRoute getStation() { 236 public StationRoute getStation() {
245 return station; 237 return station;
246 } 238 }
@@ -257,11 +249,19 @@ public class GpsEntity { @@ -257,11 +249,19 @@ public class GpsEntity {
257 this.abnormal = abnormal; 249 this.abnormal = abnormal;
258 } 250 }
259 251
260 - public String getState2() {  
261 - return state2; 252 + public String getSignalState() {
  253 + return signalState;
262 } 254 }
263 255
264 - public void setState2(String state2) {  
265 - this.state2 = state2; 256 + public void setSignalState(String signalState) {
  257 + this.signalState = signalState;
  258 + }
  259 +
  260 + public int getInstation() {
  261 + return instation;
  262 + }
  263 +
  264 + public void setInstation(int instation) {
  265 + this.instation = instation;
266 } 266 }
267 } 267 }
src/main/java/com/bsth/data/gpsdata/GpsRealData.java
@@ -5,8 +5,7 @@ import com.alibaba.fastjson.JSONObject; @@ -5,8 +5,7 @@ import com.alibaba.fastjson.JSONObject;
5 import com.bsth.Application; 5 import com.bsth.Application;
6 import com.bsth.data.BasicData; 6 import com.bsth.data.BasicData;
7 import com.bsth.data.forecast.ForecastRealServer; 7 import com.bsth.data.forecast.ForecastRealServer;
8 -import com.bsth.data.gpsdata.analyse.GeoCacheData;  
9 -import com.bsth.data.gpsdata.analyse.GpsAnalyse; 8 +import com.bsth.data.gpsdata.arrival.GpsRealAnalyse;
10 import com.bsth.data.gpsdata.recovery.GpsDataRecovery; 9 import com.bsth.data.gpsdata.recovery.GpsDataRecovery;
11 import com.bsth.data.schedule.DayOfSchedule; 10 import com.bsth.data.schedule.DayOfSchedule;
12 import com.bsth.entity.realcontrol.ScheduleRealInfo; 11 import com.bsth.entity.realcontrol.ScheduleRealInfo;
@@ -30,259 +29,187 @@ import java.util.*; @@ -30,259 +29,187 @@ import java.util.*;
30 import java.util.concurrent.TimeUnit; 29 import java.util.concurrent.TimeUnit;
31 30
32 /** 31 /**
33 - * 32 + * @author PanZhao
34 * @ClassName: GpsRealData 33 * @ClassName: GpsRealData
35 * @Description: TODO(实时GPS数据集合) 34 * @Description: TODO(实时GPS数据集合)
36 - * @author PanZhao  
37 * @date 2016年8月12日 下午2:04:41 35 * @date 2016年8月12日 下午2:04:41
38 - *  
39 */ 36 */
40 @Component 37 @Component
41 -public class GpsRealData implements CommandLineRunner{  
42 -  
43 - static Logger logger = LoggerFactory.getLogger(GpsRealData.class);  
44 -  
45 - private static Map<String, GpsEntity> gpsMap;  
46 -  
47 - //按线路分组设备号  
48 - private static TreeMultimap<String, String> lineCode2Devices;  
49 -  
50 - // 网关数据接口地址  
51 - private static String url;  
52 -  
53 - @Autowired  
54 - GpsDataLoader gpsDataLoader;  
55 -  
56 - @Autowired  
57 - DayOfSchedule dayOfSchedule;  
58 -  
59 - @Autowired  
60 - ForecastRealServer forecastRealServer;  
61 -  
62 - /**  
63 - * 构造函数  
64 - */  
65 - public GpsRealData(){  
66 - gpsMap = new HashMap<>();  
67 - lineCode2Devices = TreeMultimap.create();  
68 - url = ConfigUtil.get("http.gps.real.url");  
69 - }  
70 -  
71 - @Override  
72 - public void run(String... arg0) throws Exception {  
73 - logger.info("gpsDataLoader,20,6");  
74 - Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 40, 6, TimeUnit.SECONDS);  
75 - }  
76 -  
77 - static final long CLEAR_DIFF = 1000 * 60 * 60 * 2;  
78 - public GpsEntity add(GpsEntity gps) {  
79 - String device = gps.getDeviceId();  
80 - GpsEntity old = gpsMap.get(device);  
81 -  
82 - //断线2个小时,清除缓存数据  
83 - if(gps.getTimestamp() - old.getTimestamp() > CLEAR_DIFF && gps.getNbbm() != null)  
84 - GeoCacheData.clear(gps.getNbbm());  
85 -  
86 - //分析gps  
87 - if(isAvailable(gps) && (old == null || old.getTimestamp() != gps.getTimestamp()))  
88 - GpsAnalyse.start(gps);  
89 -  
90 - if(!StringUtils.isEmpty(gps.getStopNo())){  
91 - //定时定距数据附带站点编码改变  
92 - if(null == old || !gps.getStopNo().equals(old.getStopNo())){  
93 - gps.setArrTime(gps.getTimestamp());  
94 - //预测到达终点时间  
95 - forecastRealServer.forecast(gps.getNbbm(), gps);  
96 - }  
97 - else{  
98 - gps.setArrTime(old.getArrTime());  
99 - //不预测, 重新计算终点时间  
100 - gps.setExpectStopTime(forecastRealServer.expectStopTime(gps.getNbbm()));  
101 - }  
102 - }  
103 -  
104 - gpsMap.put(device, gps);  
105 - if(StringUtils.isNotBlank(gps.getLineId()))  
106 - lineCode2Devices.put(gps.getLineId(), device);  
107 - return gps;  
108 - }  
109 -  
110 - public boolean isAvailable(GpsEntity gps){  
111 - return StringUtils.isNotEmpty(gps.getLineId()) &&  
112 - dayOfSchedule.getCurrSchDate().containsKey(gps.getLineId());  
113 - }  
114 -  
115 - /**  
116 - *  
117 - * @Title: get @Description: TODO(设备号获取GPS)  
118 - */  
119 - public GpsEntity get(String deviceId) {  
120 - return gpsMap.get(deviceId);  
121 - }  
122 -  
123 - /**  
124 - *  
125 - * @Title: get @Description: TODO(线路编码获取GPS集合) @throws  
126 - */  
127 - public List<GpsEntity> getByLine(String lineCode) {  
128 - NavigableSet<String> set = lineCode2Devices.get(lineCode);  
129 -  
130 - List<GpsEntity> rs = new ArrayList<>();  
131 - GpsEntity gps;  
132 - ScheduleRealInfo sch;  
133 - for(String device : set){  
134 - gps = gpsMap.get(device);  
135 - //过滤异常GPS数据  
136 - if(gps.isAbnormal())  
137 - continue;  
138 -  
139 - sch = dayOfSchedule.execPlanMap().get(gps.getNbbm());  
140 - if(null != sch)  
141 - gps.setSchId(sch.getId());  
142 - rs.add(gps);  
143 - }  
144 -  
145 - return rs;  
146 - }  
147 -  
148 - public List<GpsEntity> get(List<String> pArray){  
149 - List<GpsEntity> list = new ArrayList<>();  
150 -  
151 - for(String code : pArray)  
152 - list.addAll(getByLine(code));  
153 - return list;  
154 - }  
155 -  
156 - public Set<String> allDevices(){  
157 - return gpsMap.keySet();  
158 - }  
159 -  
160 - public GpsEntity findByDeviceId(String deviceId) {  
161 - return gpsMap.get(deviceId);  
162 - }  
163 -  
164 - public Collection<GpsEntity> all(){  
165 - return gpsMap.values();  
166 - }  
167 -  
168 - public void remove(String device){  
169 - gpsMap.remove(device);  
170 - }  
171 - @Component  
172 - public static class GpsDataLoader extends Thread{  
173 -  
174 - Logger logger = LoggerFactory.getLogger(GpsDataLoader.class);  
175 -  
176 - @Autowired  
177 - GpsRealData gpsRealData;  
178 -  
179 - @Override  
180 - public void run() {  
181 - try{  
182 - //如果正在恢复数据  
183 - if(GpsDataRecovery.run){  
184 - return;  
185 - }  
186 -  
187 - load();  
188 - }catch(Exception e){  
189 - logger.error("", e);  
190 - }  
191 - }  
192 -  
193 - public void load() throws Exception {  
194 - List<GpsEntity> list = new ArrayList<>();  
195 - CloseableHttpClient httpClient = null;  
196 - CloseableHttpResponse response = null;  
197 - try {  
198 - httpClient = HttpClients.createDefault();  
199 - HttpGet get = new HttpGet(url);  
200 -  
201 - response = httpClient.execute(get);  
202 -  
203 - HttpEntity entity = response.getEntity();  
204 - if (null != entity) {  
205 - // 返回数据量比较大,建议以流的形式读取  
206 - BufferedReader br = new BufferedReader(new InputStreamReader(entity.getContent()));  
207 - StringBuffer stringBuffer = new StringBuffer();  
208 - String str = "";  
209 - while ((str = br.readLine()) != null)  
210 - stringBuffer.append(str);  
211 -  
212 - JSONObject jsonObj = JSON.parseObject(stringBuffer.toString());  
213 -  
214 - if (jsonObj != null)  
215 - list = JSON.parseArray(jsonObj.getString("data"), GpsEntity.class);  
216 -  
217 - String nbbm;  
218 - for(GpsEntity gps : list){  
219 - //没有设备号  
220 - if(StringUtils.isBlank(gps.getDeviceId()))  
221 - continue;  
222 -  
223 - nbbm = BasicData.deviceId2NbbmMap.get(gps.getDeviceId());  
224 - if(StringUtils.isBlank(nbbm))  
225 - gps.setAbnormal(true);//标记为异常数据  
226 - else  
227 - gps.setNbbm(nbbm);  
228 -  
229 - gps.setStationName(BasicData.stationCode2NameMap.get(gps.getStopNo()));  
230 - gpsRealData.add(gps);  
231 -  
232 - //纠正走向  
233 - //correctUpdown(gps);  
234 - }  
235 - } else  
236 - logger.error("result is null");  
237 - } catch(Exception e){  
238 - logger.error("", e);  
239 - }  
240 - finally {  
241 - if (null != httpClient)  
242 - httpClient.close();  
243 - if(null != response)  
244 - response.close();  
245 - }  
246 - }  
247 -  
248 - /**  
249 - * 是否是起终点  
250 - * @param gps  
251 - * @return  
252 -  
253 - public boolean isSEPoint(GpsEntity gps){  
254 - String key = gps.getLineId()+"_"+gps.getUpDown()+"_"  
255 - ,stationCode;  
256 -  
257 - if(BasicData.lineSEPointMap.containsKey(key+"B")){  
258 - stationCode = BasicData.lineSEPointMap.get(key+"B");  
259 - if(gps.getStopNo().equals(stationCode)){  
260 - gps.setsEPoint(true);  
261 - return true;  
262 - }  
263 - }  
264 -  
265 - if(BasicData.lineSEPointMap.containsKey(key+"E")){  
266 - stationCode = BasicData.lineSEPointMap.get(key+"E");  
267 - if(gps.getStopNo().equals(stationCode)){  
268 - gps.setsEPoint(true);  
269 - return true;  
270 - }  
271 - }  
272 - return false;  
273 - }*/  
274 -  
275 - /**  
276 - * 纠正上下行  
277 - * @param gps  
278 -  
279 - public void correctUpdown(GpsEntity gps){  
280 - Integer updown=BasicData.lineStationUpDownMap.get(gps.getLineId()+"_"+gps.getStopNo());  
281 - if(updown != null && !updown.equals(gps.getUpDown()))  
282 - gps.setUpDown(updown);  
283 -  
284 - if(isSEPoint(gps))  
285 - return;  
286 - }*/  
287 - } 38 +public class GpsRealData implements CommandLineRunner {
  39 +
  40 + static Logger logger = LoggerFactory.getLogger(GpsRealData.class);
  41 +
  42 + private static Map<String, GpsEntity> gpsMap;
  43 +
  44 + //按线路分组设备号
  45 + private static TreeMultimap<String, String> lineCode2Devices;
  46 +
  47 + // 网关数据接口地址
  48 + private static String url;
  49 +
  50 + @Autowired
  51 + GpsDataLoader gpsDataLoader;
  52 +
  53 + @Autowired
  54 + DayOfSchedule dayOfSchedule;
  55 +
  56 + @Autowired
  57 + ForecastRealServer forecastRealServer;
  58 +
  59 + /**
  60 + * 构造函数
  61 + */
  62 + public GpsRealData() {
  63 + gpsMap = new HashMap<>();
  64 + lineCode2Devices = TreeMultimap.create();
  65 + url = ConfigUtil.get("http.gps.real.url");
  66 + }
  67 +
  68 + @Override
  69 + public void run(String... arg0) throws Exception {
  70 + logger.info("gpsDataLoader,40,6");
  71 + Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 40, 6, TimeUnit.SECONDS);
  72 + }
  73 +
  74 + public void put(GpsEntity gps) {
  75 + gpsMap.put(gps.getDeviceId(), gps);
  76 + }
  77 +
  78 + /**
  79 + * @Title: get @Description: TODO(设备号获取GPS)
  80 + */
  81 + public GpsEntity get(String deviceId) {
  82 + return gpsMap.get(deviceId);
  83 + }
  84 +
  85 + /**
  86 + * @Title: get @Description: TODO(线路编码获取GPS集合) @throws
  87 + */
  88 + public List<GpsEntity> getByLine(String lineCode) {
  89 + NavigableSet<String> set = lineCode2Devices.get(lineCode);
  90 +
  91 + List<GpsEntity> rs = new ArrayList<>();
  92 + GpsEntity gps;
  93 + ScheduleRealInfo sch;
  94 + for (String device : set) {
  95 + gps = gpsMap.get(device);
  96 + //过滤异常GPS数据
  97 + if (gps.isAbnormal())
  98 + continue;
  99 +
  100 + sch = dayOfSchedule.execPlanMap().get(gps.getNbbm());
  101 + if (null != sch)
  102 + gps.setSchId(sch.getId());
  103 + rs.add(gps);
  104 + }
  105 +
  106 + return rs;
  107 + }
  108 +
  109 + public List<GpsEntity> get(List<String> pArray) {
  110 + List<GpsEntity> list = new ArrayList<>();
  111 +
  112 + for (String code : pArray)
  113 + list.addAll(getByLine(code));
  114 + return list;
  115 + }
  116 +
  117 + public Set<String> allDevices() {
  118 + return gpsMap.keySet();
  119 + }
  120 +
  121 + public GpsEntity findByDeviceId(String deviceId) {
  122 + return gpsMap.get(deviceId);
  123 + }
  124 +
  125 + public Collection<GpsEntity> all() {
  126 + return gpsMap.values();
  127 + }
  128 +
  129 + public void remove(String device) {
  130 + gpsMap.remove(device);
  131 + }
  132 +
  133 + @Component
  134 + public static class GpsDataLoader extends Thread {
  135 +
  136 + Logger logger = LoggerFactory.getLogger(GpsDataLoader.class);
  137 +
  138 + @Autowired
  139 + GpsRealData gpsRealData;
  140 +
  141 + @Autowired
  142 + GpsRealAnalyse gpsRealAnalyse;
  143 +
  144 + @Override
  145 + public void run() {
  146 + try {
  147 + //如果正在恢复数据
  148 + if (GpsDataRecovery.run)
  149 + return;
  150 +
  151 + load();
  152 + } catch (Exception e) {
  153 + logger.error("", e);
  154 + }
  155 + }
  156 +
  157 + public void load() throws Exception {
  158 + List<GpsEntity> list = null;
  159 + List<GpsEntity> updateList = new ArrayList<>();
  160 + CloseableHttpClient httpClient = null;
  161 + CloseableHttpResponse response = null;
  162 + try {
  163 + httpClient = HttpClients.createDefault();
  164 + HttpGet get = new HttpGet(url);
  165 +
  166 + response = httpClient.execute(get);
  167 +
  168 + HttpEntity entity = response.getEntity();
  169 + if (null != entity) {
  170 + BufferedReader br = new BufferedReader(new InputStreamReader(entity.getContent()));
  171 + StringBuffer stringBuffer = new StringBuffer();
  172 + String str = "";
  173 + while ((str = br.readLine()) != null)
  174 + stringBuffer.append(str);
  175 +
  176 + JSONObject jsonObj = JSON.parseObject(stringBuffer.toString());
  177 +
  178 + if (jsonObj != null)
  179 + list = JSON.parseArray(jsonObj.getString("data"), GpsEntity.class);
  180 +
  181 + String nbbm;
  182 + GpsEntity old;
  183 + for (GpsEntity gps : list) {
  184 + //没有设备号
  185 + if (StringUtils.isBlank(gps.getDeviceId()))
  186 + continue;
  187 +
  188 + old = gpsMap.get(gps.getDeviceId());
  189 + if (old != null &&
  190 + old.getTimestamp() == gps.getTimestamp())
  191 + continue;
  192 +
  193 + nbbm = BasicData.deviceId2NbbmMap.get(gps.getDeviceId());
  194 + if (StringUtils.isBlank(nbbm))
  195 + gps.setAbnormal(true);//标记为异常数据
  196 + else
  197 + gps.setNbbm(nbbm);
  198 + //有更新的点位
  199 + updateList.add(gps);
  200 + }
  201 + //分析数据
  202 + gpsRealAnalyse.analyse(updateList);
  203 + } else
  204 + logger.error("real gps result is null");
  205 + } catch (Exception e) {
  206 + logger.error("", e);
  207 + } finally {
  208 + if (null != httpClient)
  209 + httpClient.close();
  210 + if (null != response)
  211 + response.close();
  212 + }
  213 + }
  214 + }
288 } 215 }
289 \ No newline at end of file 216 \ No newline at end of file
src/main/java/com/bsth/data/gpsdata/analyse/GpsAnalyse.java deleted 100644 → 0
1 -package com.bsth.data.gpsdata.analyse;  
2 -  
3 -import com.bsth.data.gpsdata.GpsEntity;  
4 -import com.bsth.data.gpsdata.analyse.components.GpsArrival;  
5 -import org.slf4j.Logger;  
6 -import org.slf4j.LoggerFactory;  
7 -  
8 -import java.util.concurrent.ExecutorService;  
9 -import java.util.concurrent.Executors;  
10 -  
11 -/**  
12 - * 分析gps状态信息  
13 - * Created by panzhao on 2016/12/23.  
14 - */  
15 -public class GpsAnalyse {  
16 -  
17 - static Logger logger = LoggerFactory.getLogger(GpsAnalyse.class);  
18 -  
19 - //线程池  
20 - static ExecutorService threadPool = Executors.newFixedThreadPool(50);  
21 -  
22 - public static void start(GpsEntity gps) {  
23 - threadPool.execute(new ArrivalMatchThread(gps));  
24 - }  
25 -  
26 - public static class ArrivalMatchThread implements Runnable {  
27 -  
28 - private GpsEntity gps;  
29 -  
30 - public ArrivalMatchThread(GpsEntity gps) {  
31 - this.gps = gps;  
32 - }  
33 -  
34 - @Override  
35 - public void run() {  
36 - GpsArrival.arrival(gps);  
37 - }  
38 - }  
39 -}  
40 \ No newline at end of file 0 \ No newline at end of file
src/main/java/com/bsth/data/gpsdata/analyse/components/GpsArrival.java deleted 100644 → 0
1 -package com.bsth.data.gpsdata.analyse.components;  
2 -  
3 -import com.bsth.data.LineConfigData;  
4 -import com.bsth.data.gpsdata.GpsEntity;  
5 -import com.bsth.data.gpsdata.analyse.CircleQueue;  
6 -import com.bsth.data.gpsdata.analyse.GeoCacheData;  
7 -import com.bsth.data.gpsdata.analyse.StationRoute;  
8 -import com.bsth.data.gpsdata.analyse.util.GeoUtils;  
9 -import com.bsth.data.schedule.DayOfSchedule;  
10 -import com.bsth.entity.realcontrol.LineConfig;  
11 -import com.bsth.entity.realcontrol.ScheduleRealInfo;  
12 -import com.bsth.service.directive.DirectiveService;  
13 -import com.bsth.websocket.handler.SendUtils;  
14 -import org.slf4j.Logger;  
15 -import org.slf4j.LoggerFactory;  
16 -import org.springframework.beans.BeansException;  
17 -import org.springframework.context.ApplicationContext;  
18 -import org.springframework.context.ApplicationContextAware;  
19 -import org.springframework.stereotype.Component;  
20 -  
21 -import java.util.List;  
22 -  
23 -/**  
24 - * gps 到离站判断  
25 - * Created by panzhao on 2016/12/24.  
26 - */  
27 -@Component  
28 -public class GpsArrival implements ApplicationContextAware {  
29 -  
30 - static Logger logger = LoggerFactory.getLogger(GpsArrival.class);  
31 -  
32 - static DayOfSchedule dayOfSchedule;  
33 - static LineConfigData lineConfigData;  
34 - static SendUtils sendUtils;  
35 - static DirectiveService directiveService;  
36 -  
37 - public static void arrival(GpsEntity gps) {  
38 -  
39 - if (gps.getLat() == 0 || gps.getLon() == 0) {  
40 - //logger.error("无效的gps");  
41 - return;  
42 - }  
43 -  
44 - Object task = DayOfSchedule.executeCurr(gps.getNbbm());  
45 - if (task == null)  
46 - return;  
47 - if (task.getClass().isAssignableFrom(ScheduleRealInfo.class)) {  
48 - ScheduleRealInfo sch = (ScheduleRealInfo) task;  
49 - //和班次同步走向  
50 - gps.setUpDown(Integer.parseInt(sch.getXlDir()));  
51 -  
52 - //出场  
53 - if (sch.getBcType().equals("out")) {  
54 - outCarpark(gps, sch);  
55 - } else if (sch.getBcType().equals("normal"))  
56 - normalInOut(gps, sch);  
57 - else if (sch.getBcType().equals("in")) {  
58 - inCarpark(gps, sch);  
59 - }  
60 - }  
61 -  
62 - GeoCacheData.putGps(gps);  
63 - }  
64 -  
65 - /**  
66 - * 正常班次  
67 - *  
68 - * @param gps  
69 - * @param sch  
70 - */  
71 - private static void normalInOut(GpsEntity gps, ScheduleRealInfo sch) {  
72 - CircleQueue<GpsEntity> queue = GeoCacheData.getGps(gps.getNbbm());  
73 - GpsEntity prev = null;  
74 - if (queue != null)  
75 - prev = queue.getTail();  
76 -  
77 - List<StationRoute> srs = GeoCacheData.getStationRoute(sch.getXlBm(), gps.getUpDown());  
78 - StationRoute station = GeoUtils.gpsInStation(gps, srs);  
79 -  
80 - if (station != null) {  
81 - //站内  
82 - gps.setStopNo(station.getCode());  
83 - gps.setInstation(true);  
84 - stationInside(gps, prev, sch);  
85 - } else {  
86 - //站外  
87 - stationOutside(gps, prev, sch);  
88 - }  
89 - }  
90 -  
91 - /**  
92 - * GPS在站点内  
93 - *  
94 - * @param gps  
95 - * @param prev  
96 - * @param sch  
97 - */  
98 - private static void stationInside(GpsEntity gps, GpsEntity prev, ScheduleRealInfo sch) {  
99 - if (prev == null)  
100 - return;  
101 -  
102 - if (gps.getStopNo().equals(sch.getZdzCode()) && sch.getZdsjActual() == null) {  
103 - //到终点站  
104 - arriveEnd(sch, gps);  
105 - return;  
106 - }  
107 -  
108 - //上一个点在站外  
109 - if (!prev.isInstation())  
110 - return;  
111 - //超过 (待发时间 + 90%的单程运送时间) 并且超过下一个班次的待发时间,还在起点站。默认烂一圈  
112 - if (prev.getStopNo().equals(gps.getStopNo())) {  
113 - if (gps.getStopNo().equals(sch.getQdzCode())  
114 - && gps.getTimestamp() > sch.getDfsjT() + (sch.getBcsj() * 60 * 1000 * 0.9)) {  
115 -  
116 - ScheduleRealInfo next = dayOfSchedule.next(sch);  
117 - if(gps.getTimestamp() > next.getDfsjT())  
118 - dayOfSchedule.addExecPlan(dayOfSchedule.next(next));  
119 - }  
120 - return;  
121 - }  
122 -  
123 - //发车  
124 - if (prev.getStopNo().equals(sch.getQdzCode())) {  
125 - busWillDepart(sch, gps);  
126 - return;  
127 - }  
128 -  
129 - if (gps.getUpDown() != prev.getUpDown())  
130 - return;  
131 -  
132 - //中途站  
133 - StationRoute prevStation = GeoCacheData.getStation(prev.getLineId(), prev.getUpDown(), prev.getStopNo());  
134 - StationRoute currStation = GeoCacheData.getStation(gps.getLineId(), gps.getUpDown(), gps.getStopNo());  
135 - if (currStation.getRouteSort() < prevStation.getRouteSort()) {  
136 - //开始下一个班次  
137 - finishPlan(sch);  
138 -  
139 - logger.info("路由反向。。。。。。:" + gps.getTimestamp());  
140 - //为班次补上实际时间  
141 - }  
142 - }  
143 -  
144 - /**  
145 - * GPS在站点外  
146 - *  
147 - * @param gps  
148 - * @param prev  
149 - * @param sch  
150 - */  
151 - private static void stationOutside(GpsEntity gps, GpsEntity prev, ScheduleRealInfo sch) {  
152 - if (prev == null)  
153 - return;  
154 -  
155 - gps.setStopNo(prev.getStopNo());  
156 - if (prev.isInstation() && prev.getStopNo().equals(sch.getQdzCode())) {  
157 - //发车  
158 - busWillDepart(sch, gps);  
159 - return;  
160 - }  
161 - }  
162 -  
163 - /**  
164 - * 公交车起点发出  
165 - */  
166 - final static long DRIFT_VAL_TIME = 1000 * 60 * 10;  
167 - //班次最大差值2小时  
168 - final static long MAX_DIFF = 1000 * 60 * 60 * 2;  
169 -  
170 - private static void busWillDepart(ScheduleRealInfo sch, GpsEntity gps) {  
171 - //实发时间不覆盖  
172 - if (sch.getFcsjActual() == null && Math.abs(gps.getTimestamp() - sch.getDfsjT()) < MAX_DIFF) {  
173 -  
174 - //提前10分钟以上发出,判断一下是否是漂移  
175 - /*if (sch.getDfsjT() - gps.getTimestamp() > DRIFT_VAL_TIME) {  
176 - ScheduleRealInfo schPrev = dayOfSchedule.prev(sch);  
177 - if (schPrev != null && schPrev.getZdsjActual() != null) {  
178 - //计划停站时间  
179 - long stopTimeJH = sch.getDfsjT() - schPrev.getZdsjT();  
180 - //实际停站时间  
181 - long actualStopTime = gps.getTimestamp() - schPrev.getZdsjActualTime();  
182 - *//*  
183 - 没停够计划百分之30的,算漂移  
184 - (这里出现的误判,由程序在车辆到中途站的时候进行补偿)  
185 - *//*  
186 - if (stopTimeJH * 0.3 > actualStopTime) {  
187 - logger.info("漂移.... 车辆:" + gps.getNbbm() + " ts: " + gps.getTimestamp());  
188 - return;  
189 - }  
190 - }  
191 - }*/  
192 -  
193 - LineConfig config = lineConfigData.get(sch.getXlBm());  
194 - if (config != null && config.getOutConfig() == 2) {  
195 - //出站既出场  
196 - ScheduleRealInfo schPrev = dayOfSchedule.prev(sch);  
197 - if (schPrev.getBcType().equals("out")) {  
198 - schPrev.setFcsjActualAll(gps.getTimestamp());  
199 - schPrev.setZdsjActualAll(gps.getTimestamp());  
200 - }  
201 - }  
202 -  
203 - sch.setFcsjActualAll(gps.getTimestamp());  
204 - //通知客户端  
205 - sendUtils.sendFcsj(sch);  
206 - //持久化  
207 - dayOfSchedule.save(sch);  
208 - logger.info("(站外)班次:" + sch.getDfsj() + "发车, 时间:" + sch.getFcsjActual());  
209 - }  
210 - }  
211 -  
212 - /**  
213 - * 公交车到达终点  
214 - *  
215 - * @param sch  
216 - * @param gps  
217 - */  
218 - private static void arriveEnd(ScheduleRealInfo sch, GpsEntity gps) {  
219 - if(Math.abs(gps.getTimestamp() - sch.getZdsjT()) >= MAX_DIFF)  
220 - return;  
221 -  
222 - sch.setZdsjActualAll(gps.getTimestamp());  
223 - ScheduleRealInfo next = finishPlan(sch);  
224 - //已完成班次数  
225 - int doneSum = dayOfSchedule.doneSum(sch.getClZbh());  
226 - //通知客户端  
227 - sendUtils.sendZdsj(sch, next, doneSum);  
228 - //持久化  
229 - dayOfSchedule.save(sch);  
230 - logger.info("班次:" + sch.getDfsj() + "到达终点, 时间:" + sch.getZdsjActual());  
231 -  
232 - if (next == null)  
233 - return;  
234 -  
235 - LineConfig config = lineConfigData.get(sch.getXlBm());  
236 - //进站既进场  
237 - if (next.getBcType().equals("in") &&  
238 - config != null && config.getOutConfig() == 2) {  
239 - next.setFcsjActualAll(gps.getTimestamp());  
240 - next.setZdsjActualAll(gps.getTimestamp());  
241 -  
242 - finishPlan(next);  
243 - } else {  
244 - //下发调度指令  
245 - directiveService.send60Dispatch(next, doneSum, "到站@系统");  
246 -  
247 - //套跑 -下发线路切换指令  
248 - /* if (!next.getXlBm().equals(sch.getXlBm()))  
249 - directiveService.lineChange(sch.getClZbh(), next.getXlBm(), "套跑@系统");*/  
250 - }  
251 -  
252 - //将gps转换为下一个班次走向的站内信号  
253 - int updown = Integer.parseInt(next.getXlDir());  
254 - List<StationRoute> srs = GeoCacheData.getStationRoute(next.getXlBm(), updown);  
255 - StationRoute station = GeoUtils.gpsInStation(gps, srs);  
256 - if (station != null) {  
257 - gps.setUpDown(updown);  
258 - gps.setStopNo(station.getCode());  
259 - }  
260 - }  
261 -  
262 - /**  
263 - * 出场班次  
264 - *  
265 - * @param gps  
266 - * @param sch  
267 - */  
268 - private static void outCarpark(GpsEntity gps, ScheduleRealInfo sch) {  
269 - CircleQueue<GpsEntity> queue = GeoCacheData.getGps(gps.getNbbm());  
270 - GpsEntity prev = null;  
271 - if (queue != null)  
272 - prev = queue.getTail();  
273 -  
274 - //是否在停车场内  
275 - String carpark = GeoUtils.gpsInCarpark(gps);  
276 - if (carpark != null && carpark.equals(sch.getQdzCode())) {  
277 - gps.setInstation(true);  
278 - gps.setStopNo(carpark);  
279 - return; // 还在场内  
280 - }  
281 -  
282 - List<StationRoute> srs = GeoCacheData.getStationRoute(sch.getXlBm(), gps.getUpDown());  
283 - StationRoute station = GeoUtils.gpsInStation(gps, srs);  
284 - //线路上 站点内  
285 - if (station != null) {  
286 - gps.setInstation(true);  
287 - gps.setStopNo(station.getCode());  
288 -  
289 - //上一个点附带的站点站标记  
290 - if (prev != null && prev.getStopNo() != null  
291 - && prev.getStopNo().equals(sch.getZdzCode()))  
292 - return;  
293 -  
294 - //到达终点  
295 - if (station.getCode().equals(sch.getZdzCode()))  
296 - arriveEnd(sch, gps);  
297 - }  
298 -  
299 - //上一个点在场内  
300 - if (prev != null && prev.isInstation() && prev.getStopNo().equals(sch.getQdzCode())) {  
301 - //当前点在场外  
302 - if (carpark == null) {  
303 - gps.setStopNo(prev.getStopNo());  
304 - //停车场发出  
305 - busWillDepart(sch, gps);  
306 - return;  
307 - }  
308 - }  
309 - }  
310 -  
311 -  
312 - /**  
313 - * 进场班次  
314 - *  
315 - * @param gps  
316 - * @param sch  
317 - */  
318 - private static void inCarpark(GpsEntity gps, ScheduleRealInfo sch) {  
319 - String carpark = GeoUtils.gpsInCarpark(gps);  
320 - if (carpark != null && carpark.equals(sch.getZdzCode())) {  
321 - //进场班次取第一个实际进场时间  
322 - if (sch.getZdsjActual() != null)  
323 - return;  
324 -  
325 - //进场  
326 - arriveEnd(sch, gps);  
327 - return;  
328 - }  
329 -  
330 - CircleQueue<GpsEntity> queue = GeoCacheData.getGps(gps.getNbbm());  
331 - if (queue == null)  
332 - return;  
333 - //上一个gps  
334 - GpsEntity prev = queue.getTail();  
335 -  
336 - if (carpark == null && prev.isInstation() && prev.getStopNo().equals(sch.getQdzCode())) {  
337 - gps.setStopNo(prev.getStopNo());  
338 - //进场班次发出  
339 - busWillDepart(sch, gps);  
340 - return;  
341 - }  
342 - }  
343 -  
344 - /**  
345 - * 完成班次 -返回下一个班次  
346 - *  
347 - * @param sch  
348 - */  
349 - private static ScheduleRealInfo finishPlan(ScheduleRealInfo sch) {  
350 - ScheduleRealInfo next = dayOfSchedule.next(sch);  
351 - if (next != null) {  
352 - next.setQdzArrDatesj(sch.getZdsjActual());  
353 - dayOfSchedule.addExecPlan(next);  
354 - }  
355 - return next;  
356 - }  
357 -  
358 - @Override  
359 - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {  
360 - dayOfSchedule = applicationContext.getBean(DayOfSchedule.class);  
361 - lineConfigData = applicationContext.getBean(LineConfigData.class);  
362 - sendUtils = applicationContext.getBean(SendUtils.class);  
363 - directiveService = applicationContext.getBean(DirectiveService.class);  
364 - }  
365 -}  
src/main/java/com/bsth/data/gpsdata/analyse/components/GpsStateCorrective.java deleted 100644 → 0
1 -package com.bsth.data.gpsdata.analyse.components;  
2 -  
3 -import com.bsth.data.gpsdata.GpsEntity;  
4 -import com.bsth.data.schedule.DayOfSchedule;  
5 -import com.bsth.entity.realcontrol.ScheduleRealInfo;  
6 -import com.vividsolutions.jts.geom.GeometryFactory;  
7 -import org.joda.time.format.DateTimeFormat;  
8 -import org.joda.time.format.DateTimeFormatter;  
9 -import org.slf4j.Logger;  
10 -import org.slf4j.LoggerFactory;  
11 -import org.springframework.beans.BeansException;  
12 -import org.springframework.context.ApplicationContext;  
13 -import org.springframework.context.ApplicationContextAware;  
14 -import org.springframework.stereotype.Component;  
15 -  
16 -/**  
17 - * GPS状态纠正  
18 - * Created by panzhao on 2016/12/23.  
19 - */  
20 -@Component  
21 -public class GpsStateCorrective implements ApplicationContextAware {  
22 -  
23 - static Logger logger = LoggerFactory.getLogger(GpsStateCorrective.class);  
24 -  
25 - static DayOfSchedule dayOfSchedule;  
26 -  
27 - private static GeometryFactory geometryFactory = new GeometryFactory();  
28 -  
29 - public static void correct(GpsEntity gps, ScheduleRealInfo sch){  
30 -/* int upDown = Integer.parseInt(sch.getXlDir());  
31 - gps.setUpDown(upDown);  
32 - List<StationRoute> srs = GeoCacheData.getStationRoute(sch.getXlBm(), upDown);  
33 -  
34 - Point point = geometryFactory.createPoint(new Coordinate(gps.getLat(), gps.getLon()));  
35 -  
36 - //之前的点位  
37 - CircleQueue<GpsEntity> queue = GeoCacheData.getGps(gps.getNbbm());  
38 - GpsEntity prev = null;  
39 - if(queue != null)  
40 - prev = queue.getTail();  
41 -  
42 - //线路上,站点间  
43 - StationRoute station = GeoUtils.pointInStation(point, srs);  
44 - //在站内  
45 - if(station != null){  
46 - gps.setStopNo(station.getCode());  
47 - gps.setInstation(true);  
48 - gps.setStation(station);  
49 -  
50 - if(prev != null && prev.getUpDown() == upDown){  
51 - StationRoute prevStation = GeoCacheData.getStation(prev.getLineId(), upDown, prev.getStopNo());  
52 -  
53 - //倒着开??  
54 - if(prevStation.getRouteSort() > station.getRouteSort()){  
55 - reversalHandle(gps, prev, sch);  
56 - }  
57 - }  
58 - }  
59 - else{  
60 - if(prev != null)  
61 - gps.setStopNo(prev.getStopNo());  
62 - }  
63 -  
64 - //是否在停车场内  
65 - Map<String, Polygon> carparkMap = GeoCacheData.tccMap;  
66 - Set<String> codes = carparkMap.keySet();  
67 - Polygon p;  
68 - for(String code : codes){  
69 - p = carparkMap.get(code);  
70 - //场内  
71 - if(p.contains(point)){  
72 - gps.setCarparkNo(code);  
73 - if(sch.getBcType().equals("out")){  
74 - gps.setInstation(true);  
75 - gps.setStopNo(code);  
76 - }  
77 - }  
78 - }*/  
79 - }  
80 -  
81 - private static DateTimeFormatter fmt = DateTimeFormat.forPattern("HH:mm");  
82 -  
83 - private static void reversalHandle(GpsEntity gps, GpsEntity prev, ScheduleRealInfo sch){  
84 - /*if(sch.getBcType().equals("out") && gps.getTimestamp() < sch.getZdsjT())  
85 - return;  
86 -  
87 - //先假设没到终点,直接开始了下一个班次  
88 - ScheduleRealInfo next = dayOfSchedule.next(sch);  
89 - String log = "倒着开??? nbbm: " + gps.getNbbm() + " 当前:" + gps.getStopNo() + " 上一站:" + prev.getStopNo() + " 当前班次:" + sch.getDfsj();  
90 - if(next != null){  
91 - dayOfSchedule.addExecPlan(next);  
92 -  
93 - log += (" 下一个班次:" + next.getDfsj());  
94 - }  
95 -  
96 - log += (" GPS时间:" + fmt.print(gps.getTimestamp()));  
97 -  
98 - logger.info(log);*/  
99 - }  
100 -  
101 - @Override  
102 - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {  
103 - dayOfSchedule = applicationContext.getBean(DayOfSchedule.class);  
104 - }  
105 -}  
src/main/java/com/bsth/data/gpsdata/analyse/GeoCacheData.java renamed to src/main/java/com/bsth/data/gpsdata/arrival/GeoCacheData.java
1 -package com.bsth.data.gpsdata.analyse; 1 +package com.bsth.data.gpsdata.arrival;
2 2
3 import com.bsth.data.gpsdata.GpsEntity; 3 import com.bsth.data.gpsdata.GpsEntity;
  4 +import com.bsth.data.gpsdata.arrival.entity.StationRoute;
  5 +import com.bsth.data.gpsdata.arrival.utils.CircleQueue;
  6 +import com.bsth.data.gpsdata.arrival.utils.StationRouteComp;
4 import com.google.common.collect.ArrayListMultimap; 7 import com.google.common.collect.ArrayListMultimap;
5 import com.vividsolutions.jts.geom.Coordinate; 8 import com.vividsolutions.jts.geom.Coordinate;
6 import com.vividsolutions.jts.geom.GeometryFactory; 9 import com.vividsolutions.jts.geom.GeometryFactory;
@@ -26,8 +29,8 @@ public class GeoCacheData { @@ -26,8 +29,8 @@ public class GeoCacheData {
26 29
27 static Logger logger = LoggerFactory.getLogger(GeoCacheData.class); 30 static Logger logger = LoggerFactory.getLogger(GeoCacheData.class);
28 31
29 - //每辆车缓存最后200条gps  
30 - private static final int CACHE_SIZE = 200; 32 + //每辆车缓存最后500条gps
  33 + private static final int CACHE_SIZE = 500;
31 private static Map<String, CircleQueue<GpsEntity>> gpsCacheMap = new HashMap<>(); 34 private static Map<String, CircleQueue<GpsEntity>> gpsCacheMap = new HashMap<>();
32 35
33 //线路路段走向 36 //线路路段走向
@@ -36,6 +39,9 @@ public class GeoCacheData { @@ -36,6 +39,9 @@ public class GeoCacheData {
36 //线路站点路由 39 //线路站点路由
37 private static ArrayListMultimap<String, StationRoute> stationCacheMap; 40 private static ArrayListMultimap<String, StationRoute> stationCacheMap;
38 41
  42 + //线路_上下行_站点编码 ——> 站点
  43 + private static Map<String, StationRoute> routeCodeMap;
  44 +
39 //停车场 45 //停车场
40 public static Map<String, Polygon> tccMap; 46 public static Map<String, Polygon> tccMap;
41 47
@@ -49,9 +55,9 @@ public class GeoCacheData { @@ -49,9 +55,9 @@ public class GeoCacheData {
49 public static void putGps(GpsEntity gps) { 55 public static void putGps(GpsEntity gps) {
50 CircleQueue<GpsEntity> queue = gpsCacheMap.get(gps.getNbbm()); 56 CircleQueue<GpsEntity> queue = gpsCacheMap.get(gps.getNbbm());
51 if (queue == null) { 57 if (queue == null) {
52 - //第一个点从站内开始  
53 - if (!gps.isInstation())  
54 - return; 58 + /*//第一个点从站内开始
  59 + if (gps.getInstation() == 0)
  60 + return;*/
55 61
56 queue = new CircleQueue<>(CACHE_SIZE); 62 queue = new CircleQueue<>(CACHE_SIZE);
57 gpsCacheMap.put(gps.getNbbm(), queue); 63 gpsCacheMap.put(gps.getNbbm(), queue);
@@ -69,6 +75,10 @@ public class GeoCacheData { @@ -69,6 +75,10 @@ public class GeoCacheData {
69 } 75 }
70 } 76 }
71 77
  78 + public static StationRoute getRouteCode(GpsEntity gps){
  79 + return routeCodeMap.get(gps.getLineId() + "_" + gps.getUpDown() + "_" + gps.getStopNo());
  80 + }
  81 +
72 public static List<StationRoute> getStationRoute(String lineCode, int directions) { 82 public static List<StationRoute> getStationRoute(String lineCode, int directions) {
73 return stationCacheMap.get(lineCode + "_" + directions); 83 return stationCacheMap.get(lineCode + "_" + directions);
74 } 84 }
@@ -91,7 +101,7 @@ public class GeoCacheData { @@ -91,7 +101,7 @@ public class GeoCacheData {
91 public void loadData() { 101 public void loadData() {
92 final GeometryFactory geometryFactory = new GeometryFactory(); 102 final GeometryFactory geometryFactory = new GeometryFactory();
93 //加载站点路由 103 //加载站点路由
94 - String sql = "select r.LINE_CODE,r.DIRECTIONS,r.STATION_CODE,r.STATION_MARK,s.SHAPES_TYPE,s.G_LONX,s.G_LATY,ST_AsText(s.G_POLYGON_GRID) as G_POLYGON_GRID,s.RADIUS, r.STATION_ROUTE_CODE from bsth_c_stationroute r left join bsth_c_station s on r.station=s.id where r.destroy=0 order by r.station_route_code"; 104 + String sql = "select r.LINE_CODE,r.DIRECTIONS,r.STATION_CODE,r.STATION_MARK,s.SHAPES_TYPE,s.G_LONX,s.G_LATY,ST_AsText(s.G_POLYGON_GRID) as G_POLYGON_GRID,s.RADIUS, r.STATION_ROUTE_CODE,s.STATION_NAME from bsth_c_stationroute r left join bsth_c_station s on r.station=s.id where r.destroy=0 order by r.station_route_code";
95 List<StationRoute> routeList = jdbcTemplate.query(sql, new RowMapper<StationRoute>() { 105 List<StationRoute> routeList = jdbcTemplate.query(sql, new RowMapper<StationRoute>() {
96 @Override 106 @Override
97 public StationRoute mapRow(ResultSet rs, int rowNum) throws SQLException { 107 public StationRoute mapRow(ResultSet rs, int rowNum) throws SQLException {
@@ -103,6 +113,7 @@ public class GeoCacheData { @@ -103,6 +113,7 @@ public class GeoCacheData {
103 sRoute.setRadius(rs.getFloat("RADIUS")); 113 sRoute.setRadius(rs.getFloat("RADIUS"));
104 sRoute.setRouteSort(rs.getInt("STATION_ROUTE_CODE")); 114 sRoute.setRouteSort(rs.getInt("STATION_ROUTE_CODE"));
105 sRoute.setMark(rs.getString("STATION_MARK")); 115 sRoute.setMark(rs.getString("STATION_MARK"));
  116 + sRoute.setName(rs.getString("STATION_NAME"));
106 117
107 String shapesType = rs.getString("SHAPES_TYPE"); 118 String shapesType = rs.getString("SHAPES_TYPE");
108 //多边形电子围栏 119 //多边形电子围栏
@@ -115,8 +126,11 @@ public class GeoCacheData { @@ -115,8 +126,11 @@ public class GeoCacheData {
115 //按线路和走向分组 126 //按线路和走向分组
116 if (routeList.size() > 0) { 127 if (routeList.size() > 0) {
117 ArrayListMultimap<String, StationRoute> tempMap = ArrayListMultimap.create(); 128 ArrayListMultimap<String, StationRoute> tempMap = ArrayListMultimap.create();
  129 + Map<String, StationRoute> codeMap = new HashMap<>(routeList.size());
118 for (StationRoute sr : routeList) { 130 for (StationRoute sr : routeList) {
119 tempMap.put(sr.getLineCode() + "_" + sr.getDirections(), sr); 131 tempMap.put(sr.getLineCode() + "_" + sr.getDirections(), sr);
  132 + //站点编码 ——> 和路由顺序对照
  133 + codeMap.put(sr.getLineCode() + "_" + sr.getDirections() + "_" + sr.getCode(), sr);
120 } 134 }
121 135
122 StationRouteComp srCom = new StationRouteComp(); 136 StationRouteComp srCom = new StationRouteComp();
@@ -128,6 +142,7 @@ public class GeoCacheData { @@ -128,6 +142,7 @@ public class GeoCacheData {
128 } 142 }
129 143
130 stationCacheMap = tempMap; 144 stationCacheMap = tempMap;
  145 + routeCodeMap = codeMap;
131 } 146 }
132 147
133 //加载停车场数据 148 //加载停车场数据
src/main/java/com/bsth/data/gpsdata/arrival/GpsRealAnalyse.java 0 → 100644
  1 +package com.bsth.data.gpsdata.arrival;
  2 +
  3 +import com.bsth.data.gpsdata.GpsEntity;
  4 +import com.bsth.data.gpsdata.arrival.handlers.*;
  5 +import com.bsth.data.gpsdata.arrival.utils.CircleQueue;
  6 +import org.slf4j.Logger;
  7 +import org.slf4j.LoggerFactory;
  8 +import org.springframework.beans.factory.annotation.Autowired;
  9 +import org.springframework.stereotype.Component;
  10 +
  11 +import java.util.List;
  12 +import java.util.concurrent.CountDownLatch;
  13 +import java.util.concurrent.ExecutorService;
  14 +import java.util.concurrent.Executors;
  15 +
  16 +/**
  17 + * gps 实时数据分析
  18 + * Created by panzhao on 2016/12/27.
  19 + */
  20 +@Component
  21 +public class GpsRealAnalyse {
  22 +
  23 + Logger logger = LoggerFactory.getLogger(this.getClass());
  24 +
  25 + @Autowired
  26 + OfflineSignalHandle offlineSignalHandle;
  27 + @Autowired
  28 + CorrectSignalHandle correctSignalHandle;
  29 + @Autowired
  30 + StationInsideHandle stationInsideHandle;
  31 + @Autowired
  32 + InOutStationSignalHandle inOutStationSignalHandle;
  33 + @Autowired
  34 + ReverseSignalHandle reverseSignalHandle;
  35 +
  36 + //50个线程
  37 + static ExecutorService threadPool = Executors.newFixedThreadPool(50);
  38 +
  39 + public void analyse(List<GpsEntity> list) {
  40 + CountDownLatch count = new CountDownLatch(list.size());
  41 +
  42 + for(GpsEntity gps : list)
  43 + threadPool.execute(new SignalHandleThread(gps, count));
  44 +
  45 + try {
  46 + //等待子线程结束
  47 + count.await();
  48 + } catch (InterruptedException e) {
  49 + logger.error("", e);
  50 + }
  51 + }
  52 +
  53 + public class SignalHandleThread implements Runnable {
  54 +
  55 + GpsEntity gps;
  56 + CountDownLatch count;
  57 +
  58 + SignalHandleThread(GpsEntity gps, CountDownLatch count) {
  59 + this.gps = gps;
  60 + this.count = count;
  61 + }
  62 +
  63 + @Override
  64 + public void run() {
  65 +
  66 + try {
  67 + CircleQueue<GpsEntity> prevs = GeoCacheData.getGps(gps.getNbbm());
  68 + //掉线处理
  69 + offlineSignalHandle.handle(gps, prevs);
  70 + //状态处理
  71 + if(!correctSignalHandle.handle(gps, prevs))
  72 + return;
  73 + //场,站内外判断
  74 + stationInsideHandle.handle(gps, prevs);
  75 + //反向处理
  76 + reverseSignalHandle.handle(gps, prevs);
  77 + //进出站动作处理
  78 + inOutStationSignalHandle.handle(gps, prevs);
  79 + GeoCacheData.putGps(gps);
  80 +
  81 + } catch (Exception e) {
  82 + logger.error("", e);
  83 + } finally {
  84 + count.countDown();
  85 + }
  86 + }
  87 + }
  88 +}
src/main/java/com/bsth/data/gpsdata/arrival/SignalHandle.java 0 → 100644
  1 +package com.bsth.data.gpsdata.arrival;
  2 +
  3 +import com.bsth.data.gpsdata.GpsEntity;
  4 +import com.bsth.data.gpsdata.arrival.utils.CircleQueue;
  5 +
  6 +/**
  7 + * Created by panzhao on 2016/12/27.
  8 + */
  9 +public abstract class SignalHandle {
  10 +
  11 + public abstract boolean handle(GpsEntity gps, CircleQueue<GpsEntity> prevs);
  12 +
  13 + protected boolean isNotEmpty(CircleQueue<GpsEntity> prevs) {
  14 + return prevs != null && prevs.size() > 0 && prevs.getTail() != null;
  15 + }
  16 +
  17 + /**
  18 + * 是不是异常信号
  19 + *
  20 + * @param gps
  21 + * @return
  22 + */
  23 + protected boolean isAbnormal(GpsEntity gps) {
  24 + return gps.getLat() == 0 || gps.getLon() == 0;
  25 + }
  26 +
  27 + /**
  28 + * 连续异常信号个数统计
  29 + *
  30 + * @param prevs
  31 + * @return
  32 + */
  33 + protected int abnormalCount(CircleQueue<GpsEntity> prevs) {
  34 + int count = 0;
  35 +
  36 + if (!isNotEmpty(prevs))
  37 + return count;
  38 +
  39 + GpsEntity[] array = (GpsEntity[]) prevs.getQueue();
  40 + GpsEntity gps;
  41 + for (int i = array.length - 1; i > 0; i--) {
  42 + gps = array[i];
  43 +
  44 + if (isAbnormal(gps))
  45 + count++;
  46 + else
  47 + break;
  48 + }
  49 +
  50 + return count;
  51 + }
  52 +
  53 + /**
  54 + * 车辆运行轨迹(最近20分钟)
  55 + * 0:上行 1:下行 -1:未知
  56 + *
  57 + * @param gps
  58 + * @return
  59 + */
  60 + protected int runTrack(GpsEntity gps, CircleQueue<GpsEntity> prevs) {
  61 + int rs = -1, count = 0;
  62 +
  63 + long et = gps.getTimestamp() - (1000 * 60 * 20);
  64 + Object[] array = prevs.getQueue();
  65 + GpsEntity prev;
  66 + for(Object obj : array){
  67 + prev = (GpsEntity) obj;
  68 + if(prev.getTimestamp() < et)
  69 + break;
  70 +
  71 +
  72 + }
  73 + //for()
  74 + return 0;
  75 + }
  76 +
  77 +}
src/main/java/com/bsth/data/gpsdata/arrival/entity/RouteReverse.java 0 → 100644
  1 +package com.bsth.data.gpsdata.arrival.entity;
  2 +
  3 +/** 路由反转
  4 + * Created by panzhao on 2016/12/28.
  5 + */
  6 +public class RouteReverse {
  7 +
  8 + //反转个数
  9 + private int count;
  10 +
  11 + //详细 1,2,3,2,1
  12 + private String detail;
  13 +
  14 + //掉头站点
  15 + private String turned;
  16 +
  17 + //开始时间
  18 + private long st;
  19 +
  20 + //掉头时间
  21 + private long zt;
  22 +
  23 + //结束时间
  24 + private long et;
  25 +
  26 + //是否闭合
  27 + private boolean close;
  28 +
  29 + public int getCount() {
  30 + return count;
  31 + }
  32 +
  33 + public void setCount(int count) {
  34 + this.count = count;
  35 + }
  36 +
  37 + public String getDetail() {
  38 + return detail;
  39 + }
  40 +
  41 + public void setDetail(String detail) {
  42 + this.detail = detail;
  43 + }
  44 +
  45 + public String getTurned() {
  46 + return turned;
  47 + }
  48 +
  49 + public void setTurned(String turned) {
  50 + this.turned = turned;
  51 + }
  52 +
  53 + public long getSt() {
  54 + return st;
  55 + }
  56 +
  57 + public void setSt(long st) {
  58 + this.st = st;
  59 + }
  60 +
  61 + public long getEt() {
  62 + return et;
  63 + }
  64 +
  65 + public void setEt(long et) {
  66 + this.et = et;
  67 + }
  68 +
  69 + public boolean isClose() {
  70 + return close;
  71 + }
  72 +
  73 + public void setClose(boolean close) {
  74 + this.close = close;
  75 + }
  76 +
  77 + public long getZt() {
  78 + return zt;
  79 + }
  80 +
  81 + public void setZt(long zt) {
  82 + this.zt = zt;
  83 + }
  84 +}
src/main/java/com/bsth/data/gpsdata/analyse/StationRoute.java renamed to src/main/java/com/bsth/data/gpsdata/arrival/entity/StationRoute.java
1 -package com.bsth.data.gpsdata.analyse;  
2 -  
3 -import com.vividsolutions.jts.geom.Point;  
4 -import com.vividsolutions.jts.geom.Polygon;  
5 -  
6 -/**  
7 - * Created by panzhao on 2016/12/23.  
8 - */  
9 -public class StationRoute {  
10 -  
11 - /**  
12 - * 线路编码  
13 - */  
14 - private String lineCode;  
15 -  
16 - /**  
17 - * 上下行  
18 - */  
19 - private int directions;  
20 -  
21 - /**  
22 - * 站点编码  
23 - */  
24 - private String code;  
25 -  
26 - /**  
27 - * 路由顺序  
28 - */  
29 - private int routeSort;  
30 -  
31 - /**  
32 - * 站点位置  
33 - */  
34 - private Point point;  
35 -  
36 - /**  
37 - * 圆形半径  
38 - */  
39 - private Float radius;  
40 -  
41 - /**  
42 - * 多边形电子围栏  
43 - */  
44 - private Polygon polygon;  
45 -  
46 - /**  
47 - * 站点标记  
48 - */  
49 - private String mark;  
50 -  
51 - /**  
52 - * 下一站  
53 - */  
54 - private StationRoute next;  
55 -  
56 - /**  
57 - * 上一站  
58 - */  
59 - private StationRoute prve;  
60 -  
61 - public String getCode() {  
62 - return code;  
63 - }  
64 -  
65 - public void setCode(String code) {  
66 - this.code = code;  
67 - }  
68 -  
69 - public int getRouteSort() {  
70 - return routeSort;  
71 - }  
72 -  
73 - public void setRouteSort(int routeSort) {  
74 - this.routeSort = routeSort;  
75 - }  
76 -  
77 - public Point getPoint() {  
78 - return point;  
79 - }  
80 -  
81 - public void setPoint(Point point) {  
82 - this.point = point;  
83 - }  
84 -  
85 - public Float getRadius() {  
86 - return radius;  
87 - }  
88 -  
89 - public void setRadius(Float radius) {  
90 - this.radius = radius;  
91 - }  
92 -  
93 - public Polygon getPolygon() {  
94 - return polygon;  
95 - }  
96 -  
97 - public void setPolygon(Polygon polygon) {  
98 - this.polygon = polygon;  
99 - }  
100 -  
101 - public String getLineCode() {  
102 - return lineCode;  
103 - }  
104 -  
105 - public void setLineCode(String lineCode) {  
106 - this.lineCode = lineCode;  
107 - }  
108 -  
109 - public int getDirections() {  
110 - return directions;  
111 - }  
112 -  
113 - public void setDirections(int directions) {  
114 - this.directions = directions;  
115 - }  
116 -  
117 - public StationRoute getNext() {  
118 - return next;  
119 - }  
120 -  
121 - public void setNext(StationRoute next) {  
122 - this.next = next;  
123 - }  
124 -  
125 - public StationRoute getPrve() {  
126 - return prve;  
127 - }  
128 -  
129 - public void setPrve(StationRoute prve) {  
130 - this.prve = prve;  
131 - }  
132 -  
133 - public String getMark() {  
134 - return mark;  
135 - }  
136 -  
137 - public void setMark(String mark) {  
138 - this.mark = mark;  
139 - }  
140 -}  
141 - 1 +package com.bsth.data.gpsdata.arrival.entity;
  2 +
  3 +import com.vividsolutions.jts.geom.Point;
  4 +import com.vividsolutions.jts.geom.Polygon;
  5 +
  6 +/**
  7 + * Created by panzhao on 2016/12/23.
  8 + */
  9 +public class StationRoute {
  10 +
  11 + /**
  12 + * 线路编码
  13 + */
  14 + private String lineCode;
  15 +
  16 + /**
  17 + * 上下行
  18 + */
  19 + private int directions;
  20 +
  21 + /**
  22 + * 站点编码
  23 + */
  24 + private String code;
  25 +
  26 + /**
  27 + * 路由顺序
  28 + */
  29 + private int routeSort;
  30 +
  31 + /**
  32 + * 站点位置
  33 + */
  34 + private Point point;
  35 +
  36 + /**
  37 + * 圆形半径
  38 + */
  39 + private Float radius;
  40 +
  41 + /**
  42 + * 多边形电子围栏
  43 + */
  44 + private Polygon polygon;
  45 +
  46 + /**
  47 + * 站点标记
  48 + */
  49 + private String mark;
  50 +
  51 + /**
  52 + * 下一站
  53 + */
  54 + private StationRoute next;
  55 +
  56 + /**
  57 + * 上一站
  58 + */
  59 + private StationRoute prve;
  60 +
  61 + private String name;
  62 +
  63 + public String getCode() {
  64 + return code;
  65 + }
  66 +
  67 + public void setCode(String code) {
  68 + this.code = code;
  69 + }
  70 +
  71 + public int getRouteSort() {
  72 + return routeSort;
  73 + }
  74 +
  75 + public void setRouteSort(int routeSort) {
  76 + this.routeSort = routeSort;
  77 + }
  78 +
  79 + public Point getPoint() {
  80 + return point;
  81 + }
  82 +
  83 + public void setPoint(Point point) {
  84 + this.point = point;
  85 + }
  86 +
  87 + public Float getRadius() {
  88 + return radius;
  89 + }
  90 +
  91 + public void setRadius(Float radius) {
  92 + this.radius = radius;
  93 + }
  94 +
  95 + public Polygon getPolygon() {
  96 + return polygon;
  97 + }
  98 +
  99 + public void setPolygon(Polygon polygon) {
  100 + this.polygon = polygon;
  101 + }
  102 +
  103 + public String getLineCode() {
  104 + return lineCode;
  105 + }
  106 +
  107 + public void setLineCode(String lineCode) {
  108 + this.lineCode = lineCode;
  109 + }
  110 +
  111 + public int getDirections() {
  112 + return directions;
  113 + }
  114 +
  115 + public void setDirections(int directions) {
  116 + this.directions = directions;
  117 + }
  118 +
  119 + public StationRoute getNext() {
  120 + return next;
  121 + }
  122 +
  123 + public void setNext(StationRoute next) {
  124 + this.next = next;
  125 + }
  126 +
  127 + public StationRoute getPrve() {
  128 + return prve;
  129 + }
  130 +
  131 + public void setPrve(StationRoute prve) {
  132 + this.prve = prve;
  133 + }
  134 +
  135 + public String getMark() {
  136 + return mark;
  137 + }
  138 +
  139 + public void setMark(String mark) {
  140 + this.mark = mark;
  141 + }
  142 +
  143 + public String getName() {
  144 + return name;
  145 + }
  146 +
  147 + public void setName(String name) {
  148 + this.name = name;
  149 + }
  150 +}
  151 +
src/main/java/com/bsth/data/gpsdata/arrival/handlers/CorrectSignalHandle.java 0 → 100644
  1 +package com.bsth.data.gpsdata.arrival.handlers;
  2 +
  3 +import com.bsth.data.gpsdata.GpsEntity;
  4 +import com.bsth.data.gpsdata.arrival.SignalHandle;
  5 +import com.bsth.data.gpsdata.arrival.utils.CircleQueue;
  6 +import com.bsth.data.schedule.DayOfSchedule;
  7 +import com.bsth.entity.realcontrol.ChildTaskPlan;
  8 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  9 +import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.stereotype.Component;
  11 +
  12 +/**
  13 + * 信号状态纠正
  14 + * Created by panzhao on 2016/12/27.
  15 + */
  16 +@Component
  17 +public class CorrectSignalHandle extends SignalHandle {
  18 +
  19 + @Autowired
  20 + DayOfSchedule dayOfSchedule;
  21 +
  22 + @Override
  23 + public boolean handle(GpsEntity gps, CircleQueue<GpsEntity> prevs) {
  24 + Object task = dayOfSchedule.executeCurr(gps.getNbbm());
  25 + if(task == null)
  26 + return false;
  27 + ScheduleRealInfo sch;
  28 +
  29 + //子任务
  30 + if(task.getClass().isAssignableFrom(ChildTaskPlan.class)){
  31 + ChildTaskPlan childTask = (ChildTaskPlan) task;
  32 + sch = childTask.getSchedule();
  33 + }
  34 + else
  35 + sch = (ScheduleRealInfo) task;
  36 +
  37 + int updown = Integer.parseInt(sch.getXlDir());
  38 + //走向
  39 + if(gps.getUpDown() != updown){
  40 + gps.setUpDown(updown);
  41 + gps.setState(0);
  42 + }
  43 +
  44 +
  45 + return true;
  46 + }
  47 +}
src/main/java/com/bsth/data/gpsdata/arrival/handlers/InOutStationSignalHandle.java 0 → 100644
  1 +package com.bsth.data.gpsdata.arrival.handlers;
  2 +
  3 +import com.bsth.data.LineConfigData;
  4 +import com.bsth.data.gpsdata.GpsEntity;
  5 +import com.bsth.data.gpsdata.arrival.GeoCacheData;
  6 +import com.bsth.data.gpsdata.arrival.SignalHandle;
  7 +import com.bsth.data.gpsdata.arrival.entity.StationRoute;
  8 +import com.bsth.data.gpsdata.arrival.utils.CircleQueue;
  9 +import com.bsth.data.gpsdata.arrival.utils.GeoUtils;
  10 +import com.bsth.data.schedule.DayOfSchedule;
  11 +import com.bsth.entity.realcontrol.LineConfig;
  12 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  13 +import com.bsth.service.directive.DirectiveService;
  14 +import com.bsth.websocket.handler.SendUtils;
  15 +import org.slf4j.Logger;
  16 +import org.slf4j.LoggerFactory;
  17 +import org.springframework.beans.factory.annotation.Autowired;
  18 +import org.springframework.stereotype.Component;
  19 +
  20 +import java.util.List;
  21 +
  22 +/**
  23 + * 进出站动作处理
  24 + * Created by panzhao on 2016/12/27.
  25 + */
  26 +@Component
  27 +public class InOutStationSignalHandle extends SignalHandle{
  28 +
  29 + Logger logger = LoggerFactory.getLogger(this.getClass());
  30 +
  31 + @Autowired
  32 + DayOfSchedule dayOfSchedule;
  33 +
  34 + @Autowired
  35 + LineConfigData lineConfigData;
  36 +
  37 + @Autowired
  38 + SendUtils sendUtils;
  39 +
  40 + @Autowired
  41 + DirectiveService directiveService;
  42 +
  43 + @Override
  44 + public boolean handle(GpsEntity gps, CircleQueue<GpsEntity> prevs) {
  45 +
  46 + if(isNotEmpty(prevs)){
  47 + GpsEntity prev = prevs.getTail();
  48 + if(isOutStation(gps, prev))
  49 + outStation(gps, prev);
  50 +
  51 +
  52 + if(isInStation(gps, prev))
  53 + inStation(gps, prev);
  54 + }
  55 +
  56 + return true;
  57 + }
  58 +
  59 + private boolean isOutStation(GpsEntity gps, GpsEntity prev){
  60 + //从站内到站外
  61 + if(prev.getInstation() > 0 && gps.getInstation() == 0)
  62 + return true;
  63 +
  64 + //从站内到另一个站内
  65 + if(prev.getInstation() > 0 && gps.getInstation() > 0
  66 + && !prev.getStopNo().equals(gps.getStopNo()))
  67 + return true;
  68 + return false;
  69 + }
  70 +
  71 + private boolean isInStation(GpsEntity gps, GpsEntity prev){
  72 + //从站外到站内
  73 + if(prev.getInstation() == 0 && gps.getInstation() > 0
  74 + /*&& !prev.getStopNo().equals(gps.getStopNo())*/){
  75 + return true;
  76 + }
  77 +
  78 + //从站内到另一个站内
  79 + if(prev.getInstation() > 0 && gps.getInstation() > 0
  80 + && !prev.getStopNo().equals(gps.getStopNo()))
  81 + return true;
  82 + return false;
  83 + }
  84 +
  85 + /**
  86 + * 出站
  87 + * @param gps 当前点
  88 + * @param prev 上一个点
  89 + */
  90 + private void outStation(GpsEntity gps, GpsEntity prev) {
  91 + ScheduleRealInfo sch = dayOfSchedule.executeCurr(gps.getNbbm());
  92 + String qdzCode = sch.getQdzCode();
  93 +
  94 +
  95 + //if(sch.getFcsjActual() != )
  96 +
  97 + //起点发车
  98 + if(qdzCode != null && prev.getStopNo().equals(qdzCode)
  99 + && !willDepart(gps, prev, sch)){
  100 +
  101 + sch.setFcsjActualAll(gps.getTimestamp());
  102 + //通知客户端
  103 + sendUtils.sendFcsj(sch);
  104 + //持久化
  105 + dayOfSchedule.save(sch);
  106 +
  107 + //出站既出场
  108 + outStationAndOutPark(sch);
  109 + logger.info("班次:" + sch.getDfsj() + "发车, 时间:" + sch.getFcsjActual());
  110 + }
  111 + }
  112 +
  113 + private void outStationAndOutPark(ScheduleRealInfo sch){
  114 + LineConfig config = lineConfigData.get(sch.getXlBm());
  115 + if (config != null && config.getOutConfig() == 2) {
  116 + //出站既出场
  117 + ScheduleRealInfo schPrev = dayOfSchedule.prev(sch);
  118 + if (schPrev != null && schPrev.getBcType().equals("out")) {
  119 + schPrev.setFcsjActualAll(sch.getFcsjActual());
  120 + schPrev.setZdsjActualAll(sch.getFcsjActual());
  121 + }
  122 + }
  123 + }
  124 +
  125 + /**
  126 + * 进站
  127 + * @param gps 当前点
  128 + * @param prev 上一个点
  129 + */
  130 + private void inStation(GpsEntity gps, GpsEntity prev){
  131 + ScheduleRealInfo sch = dayOfSchedule.executeCurr(gps.getNbbm());
  132 + String zdzCode = sch.getZdzCode();
  133 +
  134 + if(zdzCode != null && gps.getStopNo().equals(zdzCode)){
  135 +
  136 + sch.setZdsjActualAll(gps.getTimestamp());
  137 + //已完成班次数
  138 + int doneSum = dayOfSchedule.doneSum(sch.getClZbh());
  139 + ScheduleRealInfo next = dayOfSchedule.next(sch);
  140 + //通知客户端
  141 + sendUtils.sendZdsj(sch, next, doneSum);
  142 + //持久化
  143 + dayOfSchedule.save(sch);
  144 + //下发调度指令
  145 + //directiveService.send60Dispatch(next, doneSum, "到站@系统");
  146 +
  147 + //准备执行下一个班次
  148 + if (next != null) {
  149 + next.setQdzArrDatesj(sch.getZdsjActual());
  150 + dayOfSchedule.addExecPlan(next);
  151 +
  152 + //进站既进场
  153 + inStationAndInPark(sch, next);
  154 +
  155 + //将gps转换为下一个班次走向的站内信号
  156 + int updown = Integer.parseInt(next.getXlDir());
  157 + List<StationRoute> srs = GeoCacheData.getStationRoute(next.getXlBm(), updown);
  158 + StationRoute station = GeoUtils.gpsInStation(gps, srs);
  159 + if (station != null) {
  160 + gps.setUpDown(updown);
  161 + gps.setStopNo(station.getCode());
  162 + }
  163 + }
  164 + }
  165 + /* //如果出场班次计划终点时间5分钟后还未完成,检查一下车辆轨迹,是否已经在执行线路上班次
  166 + else if(sch.getBcType().equals("out")
  167 + && sch.getZdsj() != null
  168 + && gps.getTimestamp() - sch.getZdsjT() >= 1000 * 60 * 5){
  169 + logger.info("出场班次计划终点时间5分钟后还未完成");
  170 +
  171 + }*/
  172 + }
  173 +
  174 + /**
  175 + * 进站既进场
  176 + * @param sch
  177 + */
  178 + private void inStationAndInPark(ScheduleRealInfo sch, ScheduleRealInfo next){
  179 + LineConfig config = lineConfigData.get(sch.getXlBm());
  180 + if (next.getBcType().equals("in") &&
  181 + config != null && config.getOutConfig() == 2) {
  182 + next.setFcsjActualAll(sch.getZdsjActual());
  183 + next.setZdsjActualAll(sch.getZdsjActual());
  184 + }
  185 + }
  186 +
  187 + /**
  188 + * 发车漂移判定(这里出现的误判,由车辆到达中途站的时候补偿)
  189 + * @param gps
  190 + * @param prev
  191 + * @param task
  192 + * @return
  193 + */
  194 + private boolean willDepart(GpsEntity gps, GpsEntity prev, Object task){
  195 +
  196 +/* ScheduleRealInfo sch = (ScheduleRealInfo) task;
  197 + ScheduleRealInfo prevTask = dayOfSchedule.prev(sch);
  198 + if(prevTask == null || prevTask.getBcType().equals("out"))
  199 + return false;
  200 +
  201 + //计划停站时间
  202 + int stopTimePlan = (int) (sch.getDfsjT() - prevTask.getZdsjT());
  203 +
  204 + if(stopTimePlan < 1000 * 60 * 10)
  205 + return false;
  206 +
  207 + //实际停站时间
  208 + if(prevTask.getZdsjActual() != null){
  209 + int actualTime = (int) (gps.getTimestamp() - prevTask.getZdsjActualTime());
  210 +
  211 + if(actualTime < stopTimePlan * 0.8){
  212 + logger.info("漂移判定");
  213 +
  214 + return true;
  215 + }
  216 + }*/
  217 + return false;
  218 + }
  219 +}
src/main/java/com/bsth/data/gpsdata/arrival/handlers/OfflineSignalHandle.java 0 → 100644
  1 +package com.bsth.data.gpsdata.arrival.handlers;
  2 +
  3 +import com.bsth.data.gpsdata.GpsEntity;
  4 +import com.bsth.data.gpsdata.arrival.GeoCacheData;
  5 +import com.bsth.data.gpsdata.arrival.SignalHandle;
  6 +import com.bsth.data.gpsdata.arrival.utils.CircleQueue;
  7 +import org.springframework.stereotype.Component;
  8 +
  9 +/**
  10 + * 信号断线重连处理
  11 + * Created by panzhao on 2016/12/27.
  12 + */
  13 +@Component
  14 +public class OfflineSignalHandle extends SignalHandle{
  15 +
  16 + //断开3分钟,标记为重连信号
  17 + private final static int OFFLINE_TIME = 1000 * 60 * 3;
  18 +
  19 + //断开70分钟,之前的信号不再有参考价值
  20 + private final static int CLEAR_TIME = 1000 * 60 * 70;
  21 +
  22 + @Override
  23 + public boolean handle(GpsEntity gps, CircleQueue<GpsEntity> prevs) {
  24 + //异常信号不管
  25 + if(isAbnormal(gps)){
  26 + return true;
  27 + }
  28 +
  29 + if(isNotEmpty(prevs)){
  30 + GpsEntity prev = prevs.getTail();
  31 + int space = (int) (gps.getTimestamp() - prev.getTimestamp());
  32 + if(space > OFFLINE_TIME)
  33 + gps.setSignalState("reconnection");
  34 +
  35 + if(space > CLEAR_TIME){
  36 + //清理缓存的信号
  37 + GeoCacheData.clear(gps.getNbbm());
  38 + }
  39 + }
  40 + return true;
  41 + }
  42 +}
src/main/java/com/bsth/data/gpsdata/arrival/handlers/ReverseSignalHandle.java 0 → 100644
  1 +package com.bsth.data.gpsdata.arrival.handlers;
  2 +
  3 +import com.alibaba.fastjson.JSON;
  4 +import com.bsth.data.gpsdata.GpsEntity;
  5 +import com.bsth.data.gpsdata.arrival.GeoCacheData;
  6 +import com.bsth.data.gpsdata.arrival.SignalHandle;
  7 +import com.bsth.data.gpsdata.arrival.entity.RouteReverse;
  8 +import com.bsth.data.gpsdata.arrival.entity.StationRoute;
  9 +import com.bsth.data.gpsdata.arrival.utils.CircleQueue;
  10 +import com.bsth.data.schedule.DayOfSchedule;
  11 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  12 +import org.slf4j.Logger;
  13 +import org.slf4j.LoggerFactory;
  14 +import org.springframework.beans.factory.annotation.Autowired;
  15 +import org.springframework.stereotype.Component;
  16 +
  17 +/**
  18 + * 路由反向信号处理
  19 + * Created by panzhao on 2016/12/28.
  20 + */
  21 +@Component
  22 +public class ReverseSignalHandle extends SignalHandle {
  23 +
  24 + Logger logger = LoggerFactory.getLogger(this.getClass());
  25 +
  26 + @Autowired
  27 + DayOfSchedule dayOfSchedule;
  28 +
  29 + @Override
  30 + public boolean handle(GpsEntity gps, CircleQueue<GpsEntity> prevs) {
  31 + if (!isNotEmpty(prevs))
  32 + return false;
  33 +
  34 + GpsEntity prev = prevs.getTail();
  35 +
  36 + if (isReverse(gps, prev)) {
  37 + RouteReverse reverse = reverseSearch(prevs, gps);
  38 +
  39 + if (reverse.getCount() >= 2) {
  40 + //切换到下一个班次
  41 + ScheduleRealInfo sch = dayOfSchedule.executeCurr(gps.getNbbm());
  42 + if (sch.getBcType().equals("out") && sch.getZdsjT() != null && sch.getZdsjT() > gps.getTimestamp()) {
  43 + return false;
  44 + }
  45 + dayOfSchedule.addExecPlan(dayOfSchedule.next(sch));
  46 +
  47 + if (reverse.isClose()) {
  48 + logger.info("区间掉头,车辆:" + gps.getNbbm() + " -" + JSON.toJSONString(reverse));
  49 + }
  50 + }
  51 + }
  52 + return false;
  53 + }
  54 +
  55 + /**
  56 + * 搜索路由反向详细
  57 + *
  58 + * @param prevs
  59 + * @param gps
  60 + * @return
  61 + */
  62 + public RouteReverse reverseSearch(CircleQueue<GpsEntity> prevs, GpsEntity gps) {
  63 + RouteReverse routeReverse = new RouteReverse();
  64 + int count = 0;
  65 + String path = "";
  66 + String turned = null;
  67 +
  68 + //当前站点
  69 + StationRoute curr = GeoCacheData.getRouteCode(gps), sr;
  70 + GpsEntity prev;
  71 + Object[] array = prevs.getQueue();
  72 + for (int i = array.length - 1; i > 0; i--) {
  73 + prev = (GpsEntity) array[i];
  74 +
  75 + if(!prev.getUpDown().equals(gps.getUpDown()))
  76 + break;
  77 +
  78 + if (prev.getInstation() == 1) {
  79 + sr = GeoCacheData.getRouteCode(prev);
  80 +
  81 + if (sr.getRouteSort() > curr.getRouteSort()) {
  82 + path += (curr.getCode() + ",");
  83 + count++;
  84 + } else if (sr.getRouteSort() < curr.getRouteSort()) {
  85 + path += (curr.getCode() + ",");
  86 + //掉头点
  87 + if (turned == null)
  88 + turned = prev.getStopNo();
  89 +
  90 + //路径闭合
  91 + if (sr.getCode().equals(gps.getStopNo())) {
  92 + routeReverse.setClose(true);
  93 + path += sr.getCode();
  94 + break;
  95 + }
  96 + }
  97 +
  98 + curr = sr;
  99 + }
  100 + }
  101 +
  102 + routeReverse.setCount(count);
  103 + routeReverse.setDetail(path);
  104 + routeReverse.setTurned(turned);
  105 + return routeReverse;
  106 + }
  107 +
  108 + /**
  109 + * 是否反向
  110 + *
  111 + * @param gps
  112 + * @param prev
  113 + * @return
  114 + */
  115 + public boolean isReverse(GpsEntity gps, GpsEntity prev) {
  116 + if (gps.getInstation() == 1
  117 + &&
  118 + gps.getUpDown().equals(prev.getUpDown())
  119 + && !gps.getStopNo().equals(prev.getStopNo())) {
  120 +
  121 + StationRoute currStation = GeoCacheData.getRouteCode(gps);
  122 + StationRoute prevStation = GeoCacheData.getRouteCode(prev);
  123 +
  124 + if (currStation == null || prevStation == null)
  125 + return false;
  126 +
  127 + if (currStation.getRouteSort() < prevStation.getRouteSort())
  128 + return true;
  129 + }
  130 + return false;
  131 + }
  132 +}
src/main/java/com/bsth/data/gpsdata/arrival/handlers/StationInsideHandle.java 0 → 100644
  1 +package com.bsth.data.gpsdata.arrival.handlers;
  2 +
  3 +import com.bsth.data.gpsdata.GpsEntity;
  4 +import com.bsth.data.gpsdata.arrival.GeoCacheData;
  5 +import com.bsth.data.gpsdata.arrival.SignalHandle;
  6 +import com.bsth.data.gpsdata.arrival.entity.StationRoute;
  7 +import com.bsth.data.gpsdata.arrival.utils.CircleQueue;
  8 +import com.bsth.data.gpsdata.arrival.utils.GeoUtils;
  9 +import org.springframework.stereotype.Component;
  10 +
  11 +import java.util.List;
  12 +
  13 +/**
  14 + * 站内站外判定
  15 + * Created by panzhao on 2016/12/27.
  16 + */
  17 +@Component
  18 +public class StationInsideHandle extends SignalHandle {
  19 +
  20 +
  21 + @Override
  22 + public boolean handle(GpsEntity gps, CircleQueue<GpsEntity> prevs) {
  23 + //是否在场内
  24 + String parkCode = GeoUtils.gpsInCarpark(gps);
  25 + if (parkCode != null) {
  26 + gps.setInstation(2);
  27 + gps.setStopNo(parkCode);
  28 + }
  29 +
  30 + //是否在站内
  31 + List<StationRoute> srs = GeoCacheData.getStationRoute(gps.getLineId(), gps.getUpDown());
  32 + StationRoute station = GeoUtils.gpsInStation(gps, srs);
  33 + if (station != null) {
  34 + gps.setInstation(1);
  35 + gps.setStopNo(station.getCode());
  36 + gps.setStation(station);
  37 + }
  38 +
  39 + //在场,站外
  40 + if(gps.getInstation() == 0 && isNotEmpty(prevs)){
  41 + //继承上一个点的站点编码
  42 + GpsEntity prev = prevs.getTail();
  43 + gps.setStopNo(prev.getStopNo());
  44 + }
  45 +
  46 + return true;
  47 + }
  48 +}
src/main/java/com/bsth/data/gpsdata/analyse/CircleQueue.java renamed to src/main/java/com/bsth/data/gpsdata/arrival/utils/CircleQueue.java
1 -package com.bsth.data.gpsdata.analyse;  
2 -  
3 -import java.util.Arrays;  
4 -  
5 -/**  
6 - * 循环队列  
7 - * Created by panzhao on 2016/12/23.  
8 - */  
9 -public class CircleQueue<T> {  
10 -  
11 - /**  
12 - * (循环队列)数组的容量  
13 - */  
14 - public int capacity;  
15 -  
16 - /**  
17 - * 数组:保存循环队列的元素  
18 - */  
19 - public Object[] elementData;  
20 -  
21 - /**  
22 - * 队头(先进先出)  
23 - */  
24 - public int head = 0;  
25 -  
26 - /**  
27 - * 队尾  
28 - */  
29 - public int tail = 0;  
30 -  
31 - /**  
32 - * 以指定长度的数组来创建循环队列  
33 - *  
34 - * @param initSize  
35 - */  
36 - public CircleQueue(final int initSize) {  
37 - capacity = initSize;  
38 - elementData = new Object[capacity];  
39 - }  
40 -  
41 - /**  
42 - * 获取循环队列的大小(包含元素的个数)  
43 - */  
44 - public int size() {  
45 - if (isEmpty()) {  
46 - return 0;  
47 - } else if (isFull()) {  
48 - return capacity;  
49 - } else {  
50 - return tail + 1;  
51 - }  
52 - }  
53 -  
54 - /**  
55 - * 插入队尾一个元素  
56 - */  
57 - public void add(final T element) {  
58 - if (isEmpty()) {  
59 - elementData[0] = element;  
60 - } else if (isFull()) {  
61 - elementData[head] = element;  
62 - head++;  
63 - tail++;  
64 - head = head == capacity ? 0 : head;  
65 - tail = tail == capacity ? 0 : tail;  
66 - } else {  
67 - elementData[tail + 1] = element;  
68 - tail++;  
69 - }  
70 - }  
71 -  
72 - public boolean isEmpty() {  
73 - return tail == head && tail == 0 && elementData[tail] == null;  
74 - }  
75 -  
76 - public boolean isFull() {  
77 - return head != 0 && head - tail == 1 || head == 0 && tail == capacity - 1;  
78 - }  
79 -  
80 - public void clear() {  
81 - Arrays.fill(elementData, null);  
82 - head = 0;  
83 - tail = 0;  
84 - }  
85 -  
86 - /**  
87 - * @return 取 循环队列里的值(先进的index=0)  
88 - */  
89 - public Object[] getQueue() {  
90 - final Object[] elementDataSort = new Object[capacity];  
91 - final Object[] elementDataCopy = elementData.clone();  
92 - if (isEmpty()) {  
93 - } else if (isFull()) {  
94 - int indexMax = capacity;  
95 - int indexSort = 0;  
96 - for (int i = head; i < indexMax;) {  
97 - elementDataSort[indexSort] = elementDataCopy[i];  
98 - indexSort++;  
99 - i++;  
100 - if (i == capacity) {  
101 - i = 0;  
102 - indexMax = head;  
103 - }  
104 - }  
105 - } else {  
106 - for (int i = 0; i < tail; i++) {  
107 - elementDataSort[i] = elementDataCopy[i];  
108 - }  
109 - }  
110 - return elementDataSort;  
111 - }  
112 -  
113 - public T getTail(){  
114 - return elementData[tail] == null?null:(T)elementData[tail];  
115 - } 1 +package com.bsth.data.gpsdata.arrival.utils;
  2 +
  3 +import java.util.Arrays;
  4 +
  5 +/**
  6 + * 循环队列
  7 + * Created by panzhao on 2016/12/23.
  8 + */
  9 +public class CircleQueue<T> {
  10 +
  11 + /**
  12 + * (循环队列)数组的容量
  13 + */
  14 + public int capacity;
  15 +
  16 + /**
  17 + * 数组:保存循环队列的元素
  18 + */
  19 + public Object[] elementData;
  20 +
  21 + /**
  22 + * 头
  23 + */
  24 + public int head = 0;
  25 +
  26 + /**
  27 + * 尾
  28 + */
  29 + public int tail = 0;
  30 +
  31 + /**
  32 + * 以指定长度的数组来创建循环队列
  33 + *
  34 + * @param initSize
  35 + */
  36 + public CircleQueue(final int initSize) {
  37 + capacity = initSize;
  38 + elementData = new Object[capacity];
  39 + }
  40 +
  41 + /**
  42 + * 获取循环队列的大小
  43 + */
  44 + public int size() {
  45 + if (isEmpty()) {
  46 + return 0;
  47 + } else if (isFull()) {
  48 + return capacity;
  49 + } else {
  50 + return tail + 1;
  51 + }
  52 + }
  53 +
  54 + /**
  55 + * 插入队尾一个元素
  56 + */
  57 + public void add(final T element) {
  58 + if (isEmpty()) {
  59 + elementData[0] = element;
  60 + } else if (isFull()) {
  61 + elementData[head] = element;
  62 + head++;
  63 + tail++;
  64 + head = head == capacity ? 0 : head;
  65 + tail = tail == capacity ? 0 : tail;
  66 + } else {
  67 + elementData[tail + 1] = element;
  68 + tail++;
  69 + }
  70 + }
  71 +
  72 + public boolean isEmpty() {
  73 + return tail == head && tail == 0 && elementData[tail] == null;
  74 + }
  75 +
  76 + public boolean isFull() {
  77 + return head != 0 && head - tail == 1 || head == 0 && tail == capacity - 1;
  78 + }
  79 +
  80 + public void clear() {
  81 + Arrays.fill(elementData, null);
  82 + head = 0;
  83 + tail = 0;
  84 + }
  85 +
  86 + /**
  87 + * @return 取 循环队列里的值(先进的index=0)
  88 + */
  89 + public Object[] getQueue() {
  90 + final Object[] elementDataSort;
  91 + final Object[] elementDataCopy = elementData.clone();
  92 + if (isEmpty()) {
  93 + elementDataSort = new Object[0];
  94 + } else if (isFull()) {
  95 + elementDataSort = new Object[capacity];
  96 + int indexMax = capacity;
  97 + int indexSort = 0;
  98 + for (int i = head; i < indexMax;) {
  99 + elementDataSort[indexSort] = elementDataCopy[i];
  100 + indexSort++;
  101 + i++;
  102 + if (i == capacity) {
  103 + i = 0;
  104 + indexMax = head;
  105 + }
  106 + }
  107 + } else {
  108 + elementDataSort = new Object[tail];
  109 + for (int i = 0; i < tail; i++) {
  110 + elementDataSort[i] = elementDataCopy[i];
  111 + }
  112 + }
  113 + return elementDataSort;
  114 + }
  115 +
  116 + /**
  117 + * 取最后一个值
  118 + * @return
  119 + */
  120 + public T getTail(){
  121 + return elementData[tail] == null?null:(T)elementData[tail];
  122 + }
116 } 123 }
117 \ No newline at end of file 124 \ No newline at end of file
src/main/java/com/bsth/data/gpsdata/analyse/util/GeoUtils.java renamed to src/main/java/com/bsth/data/gpsdata/arrival/utils/GeoUtils.java
1 -package com.bsth.data.gpsdata.analyse.util;  
2 -  
3 -import com.bsth.data.gpsdata.GpsEntity;  
4 -import com.bsth.data.gpsdata.analyse.GeoCacheData;  
5 -import com.bsth.data.gpsdata.analyse.StationRoute;  
6 -import com.vividsolutions.jts.geom.Coordinate;  
7 -import com.vividsolutions.jts.geom.GeometryFactory;  
8 -import com.vividsolutions.jts.geom.Point;  
9 -import com.vividsolutions.jts.geom.Polygon;  
10 -  
11 -import java.util.List;  
12 -import java.util.Map;  
13 -import java.util.Set;  
14 -  
15 -/**  
16 - * Created by panzhao on 2016/12/23.  
17 - */  
18 -public class GeoUtils {  
19 -  
20 - private final static double EARTHRADIUS = 6378137;  
21 -  
22 - private static GeometryFactory geometryFactory = new GeometryFactory();  
23 - /**  
24 - * gps是否在路由上的某个站内  
25 - *  
26 - * @param gps  
27 - * @param srs  
28 - * @return  
29 - */  
30 - public static StationRoute gpsInStation(GpsEntity gps, List<StationRoute> srs) {  
31 - Point point = geometryFactory.createPoint(new Coordinate(gps.getLat(), gps.getLon()));  
32 - double min = -1, distance, distance2;  
33 - StationRoute stationRoute = null;  
34 -  
35 - for (StationRoute sr : srs) {  
36 - if (sr.getPolygon() == null) {  
37 - //圆形  
38 - distance = getDistance(sr.getPoint(), point);//sr.getPoint().distance(point);  
39 -  
40 - if (distance > sr.getRadius())  
41 - continue;  
42 -  
43 - if (min > distance || min == -1) {  
44 - min = distance;  
45 - stationRoute = sr;  
46 - }  
47 - } else {  
48 - //多边形  
49 - if (sr.getPolygon().contains(point)) {  
50 - stationRoute = sr;  
51 - break;  
52 - }  
53 - }  
54 - }  
55 - return stationRoute;  
56 - }  
57 -  
58 - public static double getDistance(Point p1, Point p2) {  
59 - double lng1 = getLoop(p1.getY(), -180, 180), lat1 = getRange(  
60 - p1.getX(), -74, 74);  
61 - double lng2 = getLoop(p2.getY(), -180, 180), lat2 = getRange(  
62 - p2.getX(), -74, 74);  
63 -  
64 - double x1, x2, y1, y2;  
65 - x1 = degreeToRad(lng1);  
66 - y1 = degreeToRad(lat1);  
67 - x2 = degreeToRad(lng2);  
68 - y2 = degreeToRad(lat2);  
69 - return EARTHRADIUS  
70 - * Math.acos((Math.sin(y1) * Math.sin(y2) + Math.cos(y1)  
71 - * Math.cos(y2) * Math.cos(x2 - x1)));  
72 - }  
73 -  
74 - private static double getLoop(double v, double a, double b) {  
75 - while (v > b) {  
76 - v -= b - a;  
77 - }  
78 - while (v < a) {  
79 - v += b - a;  
80 - }  
81 - return v;  
82 - }  
83 -  
84 - private static double getRange(double v, double a, double b) {  
85 - v = Math.min(Math.max(v, a), b);  
86 - return v;  
87 - }  
88 -  
89 - private static double degreeToRad(double degree) {  
90 - return Math.PI * degree / 180;  
91 - }  
92 -  
93 -  
94 - /**  
95 - * gps 是否在某个停车场内  
96 - * @param gps  
97 - * @return  
98 - */  
99 - public static String gpsInCarpark(GpsEntity gps){  
100 - Point point = geometryFactory.createPoint(new Coordinate(gps.getLat(), gps.getLon()));  
101 -  
102 - Map<String, Polygon> carparkMap = GeoCacheData.tccMap;  
103 - Set<String> codes = carparkMap.keySet();  
104 - Polygon polygon;  
105 - for(String code : codes){  
106 - polygon = carparkMap.get(code);  
107 - if(point.within(polygon)){  
108 - return code;  
109 - }  
110 - }  
111 - return null;  
112 - }  
113 -  
114 - /**  
115 - * 是否是有效的连续点  
116 - * @param prevGps  
117 - * @param gps  
118 - * @return  
119 - */  
120 - public static boolean overdue(GpsEntity prevGps, GpsEntity gps) {  
121 - return gps.getTimestamp() - prevGps.getTimestamp() < 120000;  
122 - }  
123 -} 1 +package com.bsth.data.gpsdata.arrival.utils;
  2 +
  3 +import com.bsth.data.gpsdata.GpsEntity;
  4 +import com.bsth.data.gpsdata.arrival.GeoCacheData;
  5 +import com.bsth.data.gpsdata.arrival.entity.StationRoute;
  6 +import com.vividsolutions.jts.geom.Coordinate;
  7 +import com.vividsolutions.jts.geom.GeometryFactory;
  8 +import com.vividsolutions.jts.geom.Point;
  9 +import com.vividsolutions.jts.geom.Polygon;
  10 +
  11 +import java.util.List;
  12 +import java.util.Map;
  13 +import java.util.Set;
  14 +
  15 +/**
  16 + * Created by panzhao on 2016/12/23.
  17 + */
  18 +public class GeoUtils {
  19 +
  20 + private final static double EARTHRADIUS = 6378137;
  21 +
  22 + private static GeometryFactory geometryFactory = new GeometryFactory();
  23 + /**
  24 + * gps是否在路由上的某个站内
  25 + *
  26 + * @param gps
  27 + * @param srs
  28 + * @return
  29 + */
  30 + public static StationRoute gpsInStation(GpsEntity gps, List<StationRoute> srs) {
  31 + Point point = geometryFactory.createPoint(new Coordinate(gps.getLat(), gps.getLon()));
  32 + double min = -1, distance, distance2;
  33 + StationRoute stationRoute = null;
  34 +
  35 + for (StationRoute sr : srs) {
  36 + if (sr.getPolygon() == null) {
  37 + //圆形
  38 + distance = getDistance(sr.getPoint(), point);//sr.getPoint().distance(point);
  39 +
  40 + if (distance > sr.getRadius())
  41 + continue;
  42 +
  43 + if (min > distance || min == -1) {
  44 + min = distance;
  45 + stationRoute = sr;
  46 + }
  47 + } else {
  48 + //多边形
  49 + if (sr.getPolygon().contains(point)) {
  50 + stationRoute = sr;
  51 + break;
  52 + }
  53 + }
  54 + }
  55 + return stationRoute;
  56 + }
  57 +
  58 + public static double getDistance(Point p1, Point p2) {
  59 + double lng1 = getLoop(p1.getY(), -180, 180), lat1 = getRange(
  60 + p1.getX(), -74, 74);
  61 + double lng2 = getLoop(p2.getY(), -180, 180), lat2 = getRange(
  62 + p2.getX(), -74, 74);
  63 +
  64 + double x1, x2, y1, y2;
  65 + x1 = degreeToRad(lng1);
  66 + y1 = degreeToRad(lat1);
  67 + x2 = degreeToRad(lng2);
  68 + y2 = degreeToRad(lat2);
  69 + return EARTHRADIUS
  70 + * Math.acos((Math.sin(y1) * Math.sin(y2) + Math.cos(y1)
  71 + * Math.cos(y2) * Math.cos(x2 - x1)));
  72 + }
  73 +
  74 + private static double getLoop(double v, double a, double b) {
  75 + while (v > b) {
  76 + v -= b - a;
  77 + }
  78 + while (v < a) {
  79 + v += b - a;
  80 + }
  81 + return v;
  82 + }
  83 +
  84 + private static double getRange(double v, double a, double b) {
  85 + v = Math.min(Math.max(v, a), b);
  86 + return v;
  87 + }
  88 +
  89 + private static double degreeToRad(double degree) {
  90 + return Math.PI * degree / 180;
  91 + }
  92 +
  93 +
  94 + /**
  95 + * gps 是否在某个停车场内
  96 + * @param gps
  97 + * @return
  98 + */
  99 + public static String gpsInCarpark(GpsEntity gps){
  100 + Point point = geometryFactory.createPoint(new Coordinate(gps.getLat(), gps.getLon()));
  101 +
  102 + Map<String, Polygon> carparkMap = GeoCacheData.tccMap;
  103 + Set<String> codes = carparkMap.keySet();
  104 + Polygon polygon;
  105 + for(String code : codes){
  106 + polygon = carparkMap.get(code);
  107 + if(point.within(polygon)){
  108 + return code;
  109 + }
  110 + }
  111 + return null;
  112 + }
  113 +
  114 + /**
  115 + * 是否是有效的连续点
  116 + * @param prevGps
  117 + * @param gps
  118 + * @return
  119 + */
  120 + public static boolean overdue(GpsEntity prevGps, GpsEntity gps) {
  121 + return gps.getTimestamp() - prevGps.getTimestamp() < 120000;
  122 + }
  123 +}
src/main/java/com/bsth/data/gpsdata/analyse/StationRouteComp.java renamed to src/main/java/com/bsth/data/gpsdata/arrival/utils/StationRouteComp.java
1 -package com.bsth.data.gpsdata.analyse;  
2 -  
3 -import java.util.Comparator;  
4 -  
5 -/**  
6 - * Created by panzhao on 2016/12/24.  
7 - */  
8 -public class StationRouteComp implements Comparator<StationRoute>{  
9 - @Override  
10 - public int compare(StationRoute s1, StationRoute s2) {  
11 - return s1.getRouteSort() - s2.getRouteSort();  
12 - }  
13 -} 1 +package com.bsth.data.gpsdata.arrival.utils;
  2 +
  3 +import com.bsth.data.gpsdata.arrival.entity.StationRoute;
  4 +
  5 +import java.util.Comparator;
  6 +
  7 +/**
  8 + * Created by panzhao on 2016/12/24.
  9 + */
  10 +public class StationRouteComp implements Comparator<StationRoute>{
  11 + @Override
  12 + public int compare(StationRoute s1, StationRoute s2) {
  13 + return s1.getRouteSort() - s2.getRouteSort();
  14 + }
  15 +}
src/main/java/com/bsth/data/gpsdata/recovery/GpsDataRecovery.java
@@ -2,13 +2,19 @@ package com.bsth.data.gpsdata.recovery; @@ -2,13 +2,19 @@ package com.bsth.data.gpsdata.recovery;
2 2
3 import com.bsth.data.BasicData; 3 import com.bsth.data.BasicData;
4 import com.bsth.data.gpsdata.GpsEntity; 4 import com.bsth.data.gpsdata.GpsEntity;
5 -import com.bsth.data.gpsdata.analyse.components.GpsArrival; 5 +import com.bsth.data.gpsdata.arrival.GeoCacheData;
  6 +import com.bsth.data.gpsdata.arrival.handlers.*;
  7 +import com.bsth.data.gpsdata.arrival.utils.CircleQueue;
6 import com.bsth.util.db.DBUtils_MS; 8 import com.bsth.util.db.DBUtils_MS;
7 import com.google.common.collect.ArrayListMultimap; 9 import com.google.common.collect.ArrayListMultimap;
8 import org.slf4j.Logger; 10 import org.slf4j.Logger;
9 import org.slf4j.LoggerFactory; 11 import org.slf4j.LoggerFactory;
  12 +import org.springframework.beans.BeansException;
  13 +import org.springframework.context.ApplicationContext;
  14 +import org.springframework.context.ApplicationContextAware;
10 import org.springframework.jdbc.core.JdbcTemplate; 15 import org.springframework.jdbc.core.JdbcTemplate;
11 import org.springframework.jdbc.core.RowMapper; 16 import org.springframework.jdbc.core.RowMapper;
  17 +import org.springframework.stereotype.Component;
12 18
13 import java.sql.ResultSet; 19 import java.sql.ResultSet;
14 import java.sql.SQLException; 20 import java.sql.SQLException;
@@ -18,20 +24,25 @@ import java.util.concurrent.ExecutorService; @@ -18,20 +24,25 @@ import java.util.concurrent.ExecutorService;
18 import java.util.concurrent.Executors; 24 import java.util.concurrent.Executors;
19 25
20 /** 26 /**
21 - * 数据恢复 27 + * gps数据恢复
22 * Created by panzhao on 2016/12/24. 28 * Created by panzhao on 2016/12/24.
23 */ 29 */
24 -public class GpsDataRecovery { 30 +@Component
  31 +public class GpsDataRecovery implements ApplicationContextAware{
25 32
26 static Logger logger = LoggerFactory.getLogger(GpsDataRecovery.class); 33 static Logger logger = LoggerFactory.getLogger(GpsDataRecovery.class);
27 34
28 public static boolean run; 35 public static boolean run;
29 36
30 - static ExecutorService threadPool = Executors.newFixedThreadPool(50); 37 + static ExecutorService threadPool = Executors.newFixedThreadPool(10);
31 38
32 - private static CountDownLatch count; 39 + static OfflineSignalHandle offlineSignalHandle;
  40 + static CorrectSignalHandle correctSignalHandle;
  41 + static StationInsideHandle stationInsideHandle;
  42 + static InOutStationSignalHandle inOutStationSignalHandle;
  43 + static ReverseSignalHandle reverseSignalHandle;
33 44
34 - public static void recovery() { 45 + public void recovery() {
35 List<GpsEntity> list = loadData(); 46 List<GpsEntity> list = loadData();
36 47
37 //按车辆分组数据 48 //按车辆分组数据
@@ -41,19 +52,20 @@ public class GpsDataRecovery { @@ -41,19 +52,20 @@ public class GpsDataRecovery {
41 listMap.put(gps.getNbbm(), gps); 52 listMap.put(gps.getNbbm(), gps);
42 } 53 }
43 54
44 - count = new CountDownLatch(listMap.keySet().size());  
45 55
46 Set<String> keys = listMap.keySet(); 56 Set<String> keys = listMap.keySet();
  57 +
  58 + CountDownLatch count = new CountDownLatch(keys.size());
  59 + GpsComp comp = new GpsComp();
47 for (String nbbm : keys) { 60 for (String nbbm : keys) {
48 - threadPool.execute(new RecoveryDataThread(listMap.get(nbbm), count));  
49 - /*if(nbbm.equals("W9H-003"))  
50 - new RecoveryDataThread(listMap.get(nbbm), count).run();*/ 61 + Collections.sort(listMap.get(nbbm), comp);
  62 + threadPool.execute(new RecoveryThread(listMap.get(nbbm), count));
51 } 63 }
  64 +
52 try { 65 try {
53 - //等待子线程结束  
54 count.await(); 66 count.await();
55 - logger.info("GPS 数据恢复完成....");  
56 run = false; 67 run = false;
  68 + logger.info("数据恢复完成....");
57 } catch (InterruptedException e) { 69 } catch (InterruptedException e) {
58 logger.error("", e); 70 logger.error("", e);
59 } 71 }
@@ -64,7 +76,7 @@ public class GpsDataRecovery { @@ -64,7 +76,7 @@ public class GpsDataRecovery {
64 * 76 *
65 * @return 77 * @return
66 */ 78 */
67 - public static List<GpsEntity> loadData() { 79 + public List<GpsEntity> loadData() {
68 Calendar calendar = Calendar.getInstance(); 80 Calendar calendar = Calendar.getInstance();
69 int dayOfYear = calendar.get(Calendar.DAY_OF_YEAR); 81 int dayOfYear = calendar.get(Calendar.DAY_OF_YEAR);
70 82
@@ -103,46 +115,58 @@ public class GpsDataRecovery { @@ -103,46 +115,58 @@ public class GpsDataRecovery {
103 return (((serviceState & 0x10000000) == 0x10000000) ? 1 : 0); 115 return (((serviceState & 0x10000000) == 0x10000000) ? 1 : 0);
104 } 116 }
105 117
106 - public static class RecoveryDataThread implements Runnable { 118 + @Override
  119 + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
  120 + offlineSignalHandle = applicationContext.getBean(OfflineSignalHandle.class);
  121 + correctSignalHandle = applicationContext.getBean(CorrectSignalHandle.class);
  122 + stationInsideHandle = applicationContext.getBean(StationInsideHandle.class);
  123 + inOutStationSignalHandle = applicationContext.getBean(InOutStationSignalHandle.class);
  124 + reverseSignalHandle = applicationContext.getBean(ReverseSignalHandle.class);
  125 + }
  126 +
  127 + public static class GpsComp implements Comparator<GpsEntity>{
107 128
  129 + @Override
  130 + public int compare(GpsEntity g1, GpsEntity g2) {
  131 + return g1.getTimestamp().compareTo(g2.getTimestamp());
  132 + }
  133 + }
  134 +
  135 + public static class RecoveryThread implements Runnable{
108 List<GpsEntity> list; 136 List<GpsEntity> list;
109 CountDownLatch count; 137 CountDownLatch count;
110 138
111 - public RecoveryDataThread(List<GpsEntity> list, CountDownLatch count) { 139 + RecoveryThread(List<GpsEntity> list, CountDownLatch count){
112 this.list = list; 140 this.list = list;
113 this.count = count; 141 this.count = count;
114 } 142 }
115 -  
116 @Override 143 @Override
117 public void run() { 144 public void run() {
118 try { 145 try {
119 - //排序  
120 - Collections.sort(list, new GpsComp());  
121 - //依次跑完gps  
122 - //int i = 0;  
123 - for(GpsEntity gps : list){  
124 - /* i++;  
125 - if(i == 4527){  
126 - System.out.println("aaa");  
127 - } 146 + //循环gps恢复数据
  147 + CircleQueue<GpsEntity> prevs;
128 148
129 - if(gps.getTimestamp() == 1482726071000L)  
130 - System.out.println("bbb");*/  
131 - GpsArrival.arrival(gps); 149 + for(GpsEntity gps : list){
  150 + prevs = GeoCacheData.getGps(gps.getNbbm());
  151 + //掉线处理
  152 + offlineSignalHandle.handle(gps, prevs);
  153 + //状态处理
  154 + if(!correctSignalHandle.handle(gps, prevs))
  155 + continue;
  156 + //场,站内外判断
  157 + stationInsideHandle.handle(gps, prevs);
  158 + //反向处理
  159 + reverseSignalHandle.handle(gps, prevs);
  160 + //进出站动作处理
  161 + inOutStationSignalHandle.handle(gps, prevs);
  162 + GeoCacheData.putGps(gps);
132 } 163 }
133 - } catch (Exception e) { 164 + }catch (Exception e){
134 logger.error("", e); 165 logger.error("", e);
135 - } finally { 166 + }
  167 + finally {
136 count.countDown(); 168 count.countDown();
137 } 169 }
138 } 170 }
139 } 171 }
140 -  
141 - public static class GpsComp implements Comparator<GpsEntity>{  
142 -  
143 - @Override  
144 - public int compare(GpsEntity g1, GpsEntity g2) {  
145 - return (int) (g1.getTimestamp() - g2.getTimestamp());  
146 - }  
147 - }  
148 } 172 }
149 \ No newline at end of file 173 \ No newline at end of file
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
@@ -119,6 +119,9 @@ public class DayOfSchedule implements CommandLineRunner { @@ -119,6 +119,9 @@ public class DayOfSchedule implements CommandLineRunner {
119 @Autowired 119 @Autowired
120 BasicData.BasicDataLoader dataLoader; 120 BasicData.BasicDataLoader dataLoader;
121 121
  122 + @Autowired
  123 + GpsDataRecovery gpsDataRecovery;
  124 +
122 private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"), fmtHHmm = DateTimeFormat.forPattern("HH:mm"); 125 private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"), fmtHHmm = DateTimeFormat.forPattern("HH:mm");
123 126
124 @Override 127 @Override
@@ -126,12 +129,12 @@ public class DayOfSchedule implements CommandLineRunner { @@ -126,12 +129,12 @@ public class DayOfSchedule implements CommandLineRunner {
126 //加载基础数据 129 //加载基础数据
127 dataLoader.loadAllData(); 130 dataLoader.loadAllData();
128 //从数据库恢复排班 131 //从数据库恢复排班
129 - //dataRecovery(); 132 + dataRecovery();
130 133
131 //翻班线程 134 //翻班线程
132 - Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); 135 +// Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
133 //入库 136 //入库
134 - Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 60, TimeUnit.SECONDS); 137 +// Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 60, TimeUnit.SECONDS);
135 //首班出场指令补发器 138 //首班出场指令补发器
136 // Application.mainServices.scheduleWithFixedDelay(firstScheduleCheckThread, 30, 240, TimeUnit.SECONDS); 139 // Application.mainServices.scheduleWithFixedDelay(firstScheduleCheckThread, 30, 240, TimeUnit.SECONDS);
137 //班次误点扫描 140 //班次误点扫描
@@ -160,7 +163,7 @@ public class DayOfSchedule implements CommandLineRunner { @@ -160,7 +163,7 @@ public class DayOfSchedule implements CommandLineRunner {
160 } 163 }
161 164
162 //恢复gps数据 165 //恢复gps数据
163 - GpsDataRecovery.recovery(); 166 + gpsDataRecovery.recovery();
164 } 167 }
165 168
166 public Map<String, String> getCurrSchDate() { 169 public Map<String, String> getCurrSchDate() {
@@ -706,7 +709,8 @@ public class DayOfSchedule implements CommandLineRunner { @@ -706,7 +709,8 @@ public class DayOfSchedule implements CommandLineRunner {
706 } 709 }
707 710
708 public void addExecPlan(ScheduleRealInfo sch) { 711 public void addExecPlan(ScheduleRealInfo sch) {
709 - carExecutePlanMap.put(sch.getClZbh(), sch); 712 + if(sch != null)
  713 + carExecutePlanMap.put(sch.getClZbh(), sch);
710 } 714 }
711 715
712 public void removeExecPlan(String clzbh) { 716 public void removeExecPlan(String clzbh) {
@@ -723,7 +727,7 @@ public class DayOfSchedule implements CommandLineRunner { @@ -723,7 +727,7 @@ public class DayOfSchedule implements CommandLineRunner {
723 * @param nbbm 727 * @param nbbm
724 * @return 728 * @return
725 */ 729 */
726 - public static ScheduleRealInfo executeCurr(String nbbm) { 730 + public ScheduleRealInfo executeCurr(String nbbm) {
727 return carExecutePlanMap.get(nbbm); 731 return carExecutePlanMap.get(nbbm);
728 } 732 }
729 733
@@ -763,6 +767,41 @@ public class DayOfSchedule implements CommandLineRunner { @@ -763,6 +767,41 @@ public class DayOfSchedule implements CommandLineRunner {
763 } 767 }
764 768
765 /** 769 /**
  770 + * 是否在执行首班出场
  771 + * @param nbbm
  772 + * @return
  773 + */
  774 + public boolean isExecFirstOut(String nbbm, long time){
  775 + try {
  776 + List<ScheduleRealInfo> list = nbbmScheduleMap.get(nbbm);
  777 + ScheduleRealInfo second = list.get(2),
  778 + first = executeCurr(nbbm);
  779 +
  780 + if(first.getBcType().equals("out")
  781 + && first.getDfsjT() < second.getDfsjT()
  782 + && doneSum(nbbm) == 0 && second.getDfsjT() > time)
  783 + return true;
  784 + } catch (Exception e) {
  785 + logger.error("", e);
  786 + }
  787 +
  788 + return false;
  789 + }
  790 +
  791 + /**
  792 + * 获取班次的计划停站时间
  793 + * @param sch
  794 + * @return
  795 +
  796 + public int stopTimePlan(Object task) {
  797 +
  798 + ScheduleRealInfo sch = prev((ScheduleRealInfo) task);
  799 +
  800 + sch.getzdsj
  801 + return -1;
  802 + }*/
  803 +
  804 + /**
766 * 805 *
767 * @Title: linkToSchPlan 806 * @Title: linkToSchPlan
768 * @Description: TODO(车辆关联到班次) 807 * @Description: TODO(车辆关联到班次)
src/main/java/com/bsth/entity/Cars.java
@@ -23,7 +23,7 @@ import java.util.Date; @@ -23,7 +23,7 @@ import java.util.Date;
23 23
24 @Entity 24 @Entity
25 @Table(name = "bsth_c_cars") 25 @Table(name = "bsth_c_cars")
26 -@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) 26 +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handlers","fieldHandler"})
27 public class Cars extends BEntity implements Serializable { 27 public class Cars extends BEntity implements Serializable {
28 28
29 /** 主键Id */ 29 /** 主键Id */
src/main/java/com/bsth/entity/Line.java
@@ -24,7 +24,7 @@ import java.util.Date; @@ -24,7 +24,7 @@ import java.util.Date;
24 24
25 @Entity 25 @Entity
26 @Table(name = "bsth_c_line") 26 @Table(name = "bsth_c_line")
27 -@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) 27 +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handlers","fieldHandler"})
28 public class Line implements Serializable { 28 public class Line implements Serializable {
29 29
30 @Id 30 @Id
src/main/java/com/bsth/entity/Personnel.java
@@ -21,7 +21,7 @@ import javax.persistence.*; @@ -21,7 +21,7 @@ import javax.persistence.*;
21 21
22 @Entity 22 @Entity
23 @Table(name = "bsth_c_personnel") 23 @Table(name = "bsth_c_personnel")
24 -@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) 24 +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handlers","fieldHandler"})
25 public class Personnel extends BEntity { 25 public class Personnel extends BEntity {
26 26
27 /** 主键Id */ 27 /** 主键Id */
src/main/java/com/bsth/entity/schedule/CarConfigInfo.java
@@ -19,7 +19,7 @@ import java.util.Date; @@ -19,7 +19,7 @@ import java.util.Date;
19 @NamedAttributeNode("cl") 19 @NamedAttributeNode("cl")
20 }) 20 })
21 }) 21 })
22 -@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) 22 +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handlers","fieldHandler"})
23 public class CarConfigInfo extends BEntity implements Serializable { 23 public class CarConfigInfo extends BEntity implements Serializable {
24 24
25 /** 主健Id */ 25 /** 主健Id */
src/main/java/com/bsth/entity/schedule/EmployeeConfigInfo.java
@@ -22,7 +22,7 @@ import java.io.Serializable; @@ -22,7 +22,7 @@ import java.io.Serializable;
22 @NamedAttributeNode("xl") 22 @NamedAttributeNode("xl")
23 }) 23 })
24 }) 24 })
25 -@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) 25 +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handlers","fieldHandler"})
26 public class EmployeeConfigInfo extends BEntity implements Serializable { 26 public class EmployeeConfigInfo extends BEntity implements Serializable {
27 27
28 /** 主键Id */ 28 /** 主键Id */
src/main/java/com/bsth/entity/schedule/GuideboardInfo.java
@@ -15,7 +15,7 @@ import javax.persistence.*; @@ -15,7 +15,7 @@ import javax.persistence.*;
15 @NamedAttributeNode("xl") 15 @NamedAttributeNode("xl")
16 }) 16 })
17 }) 17 })
18 -@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) 18 +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handlers","fieldHandler"})
19 public class GuideboardInfo extends BEntity { 19 public class GuideboardInfo extends BEntity {
20 20
21 /** 主键Id */ 21 /** 主键Id */
src/main/java/com/bsth/entity/sys/SysUser.java
@@ -9,7 +9,7 @@ import java.util.Set; @@ -9,7 +9,7 @@ import java.util.Set;
9 9
10 @Entity 10 @Entity
11 @Table(name = "bsth_c_sys_user") 11 @Table(name = "bsth_c_sys_user")
12 -@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) 12 +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handlers","fieldHandler"})
13 public class SysUser { 13 public class SysUser {
14 14
15 @Id 15 @Id
src/main/java/com/bsth/service/realcontrol/buffer/GetSchedulePlanThread.java
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 //import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; 20 //import com.bsth.repository.realcontrol.ScheduleRealInfoRepository;
21 //import com.bsth.repository.schedule.SchedulePlanInfoRepository; 21 //import com.bsth.repository.schedule.SchedulePlanInfoRepository;
22 //import com.bsth.util.BatchSaveUtils; 22 //import com.bsth.util.BatchSaveUtils;
23 -//import com.bsth.websocket.handler.RealControlSocketHandler; 23 +//import com.bsth.websocket.handlers.RealControlSocketHandler;
24 // 24 //
25 ///** 25 ///**
26 // * 26 // *
src/main/resources/static/assets/bower_components/angular-bootstrap/ui-bootstrap-tpls.js
@@ -2625,7 +2625,7 @@ angular.module(&#39;ui.bootstrap.dropdown&#39;, [&#39;ui.bootstrap.position&#39;]) @@ -2625,7 +2625,7 @@ angular.module(&#39;ui.bootstrap.dropdown&#39;, [&#39;ui.bootstrap.position&#39;])
2625 2625
2626 var closeDropdown = function(evt) { 2626 var closeDropdown = function(evt) {
2627 // This method may still be called during the same mouse event that 2627 // This method may still be called during the same mouse event that
2628 - // unbound this event handler. So check openScope before proceeding. 2628 + // unbound this event handlers. So check openScope before proceeding.
2629 if (!openScope) { return; } 2629 if (!openScope) { return; }
2630 2630
2631 if (evt && openScope.getAutoClose() === 'disabled') { return ; } 2631 if (evt && openScope.getAutoClose() === 'disabled') { return ; }
@@ -6982,7 +6982,7 @@ angular.module(&#39;ui.bootstrap.typeahead&#39;, [&#39;ui.bootstrap.position&#39;]) @@ -6982,7 +6982,7 @@ angular.module(&#39;ui.bootstrap.typeahead&#39;, [&#39;ui.bootstrap.position&#39;])
6982 selected = false; 6982 selected = false;
6983 }); 6983 });
6984 6984
6985 - // Keep reference to click handler to unbind it. 6985 + // Keep reference to click handlers to unbind it.
6986 var dismissClickHandler = function(evt) { 6986 var dismissClickHandler = function(evt) {
6987 // Issue #3973 6987 // Issue #3973
6988 // Firefox treats right click as a click on document 6988 // Firefox treats right click as a click on document
@@ -7490,7 +7490,7 @@ angular.module(&#39;ui.bootstrap.typeahead&#39;) @@ -7490,7 +7490,7 @@ angular.module(&#39;ui.bootstrap.typeahead&#39;)
7490 selected = false; 7490 selected = false;
7491 }); 7491 });
7492 7492
7493 - // Keep reference to click handler to unbind it. 7493 + // Keep reference to click handlers to unbind it.
7494 var dismissClickHandler = function(evt) { 7494 var dismissClickHandler = function(evt) {
7495 // Issue #3973 7495 // Issue #3973
7496 // Firefox treats right click as a click on document 7496 // Firefox treats right click as a click on document
src/main/resources/static/assets/bower_components/angular-bootstrap/ui-bootstrap.js
@@ -2624,7 +2624,7 @@ angular.module(&#39;ui.bootstrap.dropdown&#39;, [&#39;ui.bootstrap.position&#39;]) @@ -2624,7 +2624,7 @@ angular.module(&#39;ui.bootstrap.dropdown&#39;, [&#39;ui.bootstrap.position&#39;])
2624 2624
2625 var closeDropdown = function(evt) { 2625 var closeDropdown = function(evt) {
2626 // This method may still be called during the same mouse event that 2626 // This method may still be called during the same mouse event that
2627 - // unbound this event handler. So check openScope before proceeding. 2627 + // unbound this event handlers. So check openScope before proceeding.
2628 if (!openScope) { return; } 2628 if (!openScope) { return; }
2629 2629
2630 if (evt && openScope.getAutoClose() === 'disabled') { return ; } 2630 if (evt && openScope.getAutoClose() === 'disabled') { return ; }
@@ -6981,7 +6981,7 @@ angular.module(&#39;ui.bootstrap.typeahead&#39;, [&#39;ui.bootstrap.position&#39;]) @@ -6981,7 +6981,7 @@ angular.module(&#39;ui.bootstrap.typeahead&#39;, [&#39;ui.bootstrap.position&#39;])
6981 selected = false; 6981 selected = false;
6982 }); 6982 });
6983 6983
6984 - // Keep reference to click handler to unbind it. 6984 + // Keep reference to click handlers to unbind it.
6985 var dismissClickHandler = function(evt) { 6985 var dismissClickHandler = function(evt) {
6986 // Issue #3973 6986 // Issue #3973
6987 // Firefox treats right click as a click on document 6987 // Firefox treats right click as a click on document
@@ -7489,7 +7489,7 @@ angular.module(&#39;ui.bootstrap.typeahead&#39;) @@ -7489,7 +7489,7 @@ angular.module(&#39;ui.bootstrap.typeahead&#39;)
7489 selected = false; 7489 selected = false;
7490 }); 7490 });
7491 7491
7492 - // Keep reference to click handler to unbind it. 7492 + // Keep reference to click handlers to unbind it.
7493 var dismissClickHandler = function(evt) { 7493 var dismissClickHandler = function(evt) {
7494 // Issue #3973 7494 // Issue #3973
7495 // Firefox treats right click as a click on document 7495 // Firefox treats right click as a click on document
src/main/resources/static/assets/bower_components/angular-file-upload/src/services/FileDrop.js
@@ -47,7 +47,7 @@ export default (FileDirective) =&gt; { @@ -47,7 +47,7 @@ export default (FileDirective) =&gt; {
47 getFilters() { 47 getFilters() {
48 } 48 }
49 /** 49 /**
50 - * Event handler 50 + * Event handlers
51 */ 51 */
52 onDrop(event) { 52 onDrop(event) {
53 var transfer = this._getTransfer(event); 53 var transfer = this._getTransfer(event);
@@ -59,7 +59,7 @@ export default (FileDirective) =&gt; { @@ -59,7 +59,7 @@ export default (FileDirective) =&gt; {
59 this.uploader.addToQueue(transfer.files, options, filters); 59 this.uploader.addToQueue(transfer.files, options, filters);
60 } 60 }
61 /** 61 /**
62 - * Event handler 62 + * Event handlers
63 */ 63 */
64 onDragOver(event) { 64 onDragOver(event) {
65 var transfer = this._getTransfer(event); 65 var transfer = this._getTransfer(event);
@@ -69,7 +69,7 @@ export default (FileDirective) =&gt; { @@ -69,7 +69,7 @@ export default (FileDirective) =&gt; {
69 forEach(this.uploader._directives.over, this._addOverClass, this); 69 forEach(this.uploader._directives.over, this._addOverClass, this);
70 } 70 }
71 /** 71 /**
72 - * Event handler 72 + * Event handlers
73 */ 73 */
74 onDragLeave(event) { 74 onDragLeave(event) {
75 if(event.currentTarget === this.element[0]) return; 75 if(event.currentTarget === this.element[0]) return;
src/main/resources/static/assets/bower_components/angular-file-upload/src/services/FileSelect.js
@@ -56,7 +56,7 @@ export default (FileDirective) =&gt; { @@ -56,7 +56,7 @@ export default (FileDirective) =&gt; {
56 return !!this.element.attr('multiple'); 56 return !!this.element.attr('multiple');
57 } 57 }
58 /** 58 /**
59 - * Event handler 59 + * Event handlers
60 */ 60 */
61 onChange() { 61 onChange() {
62 var files = this.uploader.isHTML5 ? this.element[0].files : this.element[0]; 62 var files = this.uploader.isHTML5 ? this.element[0].files : this.element[0];
src/main/resources/static/assets/bower_components/angular-file-upload/src/services/FileUploader.js
@@ -526,7 +526,7 @@ export default (fileUploaderOptions, $rootScope, $http, $window, FileLikeObject, @@ -526,7 +526,7 @@ export default (fileUploaderOptions, $rootScope, $http, $window, FileLikeObject,
526 // Note that if non standard 4xx or 5xx error code returned 526 // Note that if non standard 4xx or 5xx error code returned
527 // from WS then response content can be accessed without error 527 // from WS then response content can be accessed without error
528 // but 'XHR' status becomes 200. In order to avoid confusion 528 // but 'XHR' status becomes 200. In order to avoid confusion
529 - // returning response via same 'success' event handler. 529 + // returning response via same 'success' event handlers.
530 530
531 // fixed angular.contents() for iframes 531 // fixed angular.contents() for iframes
532 html = iframe[0].contentDocument.body.innerHTML; 532 html = iframe[0].contentDocument.body.innerHTML;
src/main/resources/static/assets/bower_components/angular-mocks/angular-mocks.js
@@ -229,7 +229,7 @@ angular.mock.$ExceptionHandlerProvider = function() { @@ -229,7 +229,7 @@ angular.mock.$ExceptionHandlerProvider = function() {
229 * mode stores an array of errors in `$exceptionHandler.errors`, to allow later 229 * mode stores an array of errors in `$exceptionHandler.errors`, to allow later
230 * assertion of them. See {@link ngMock.$log#assertEmpty assertEmpty()} and 230 * assertion of them. See {@link ngMock.$log#assertEmpty assertEmpty()} and
231 * {@link ngMock.$log#reset reset()} 231 * {@link ngMock.$log#reset reset()}
232 - * - `rethrow`: If any errors are passed to the handler in tests, it typically means that there 232 + * - `rethrow`: If any errors are passed to the handlers in tests, it typically means that there
233 * is a bug in the application or test, so this mock will make these tests fail. 233 * is a bug in the application or test, so this mock will make these tests fail.
234 * For any implementations that expect exceptions to be thrown, the `rethrow` mode 234 * For any implementations that expect exceptions to be thrown, the `rethrow` mode
235 * will also maintain a log of thrown errors. 235 * will also maintain a log of thrown errors.
src/main/resources/static/assets/bower_components/angular-touch/angular-touch.js
@@ -277,10 +277,10 @@ ngTouch.directive(&#39;ngClick&#39;, [&#39;$parse&#39;, &#39;$timeout&#39;, &#39;$rootElement&#39;, @@ -277,10 +277,10 @@ ngTouch.directive(&#39;ngClick&#39;, [&#39;$parse&#39;, &#39;$timeout&#39;, &#39;$rootElement&#39;,
277 // - element's touchstart: Starts a touch 277 // - element's touchstart: Starts a touch
278 // (- touchcancel ends the touch, no click follows) 278 // (- touchcancel ends the touch, no click follows)
279 // - element's touchend: Determines if the tap is valid (didn't move too far away, didn't hold 279 // - element's touchend: Determines if the tap is valid (didn't move too far away, didn't hold
280 - // too long) and fires the user's tap handler. The touchend also calls preventGhostClick(). 280 + // too long) and fires the user's tap handlers. The touchend also calls preventGhostClick().
281 // - preventGhostClick() removes the allowable region the global touchstart created. 281 // - preventGhostClick() removes the allowable region the global touchstart created.
282 // - The browser generates a click event. 282 // - The browser generates a click event.
283 - // - The global click handler catches the click, and checks whether it was in an allowable region. 283 + // - The global click handlers catches the click, and checks whether it was in an allowable region.
284 // - If preventGhostClick was called, the region will have been removed, the click is busted. 284 // - If preventGhostClick was called, the region will have been removed, the click is busted.
285 // - If the region is still there, the click proceeds normally. Therefore clicks on links and 285 // - If the region is still there, the click proceeds normally. Therefore clicks on links and
286 // other elements without ngTap on them work normally. 286 // other elements without ngTap on them work normally.
@@ -313,7 +313,7 @@ ngTouch.directive(&#39;ngClick&#39;, [&#39;$parse&#39;, &#39;$timeout&#39;, &#39;$rootElement&#39;, @@ -313,7 +313,7 @@ ngTouch.directive(&#39;ngClick&#39;, [&#39;$parse&#39;, &#39;$timeout&#39;, &#39;$rootElement&#39;,
313 return false; // No allowable region; bust it. 313 return false; // No allowable region; bust it.
314 } 314 }
315 315
316 - // Global click handler that prevents the click if it's in a bustable zone and preventGhostClick 316 + // Global click handlers that prevents the click if it's in a bustable zone and preventGhostClick
317 // was called recently. 317 // was called recently.
318 function onClick(event) { 318 function onClick(event) {
319 if (Date.now() - lastPreventedTime > PREVENT_DURATION) { 319 if (Date.now() - lastPreventedTime > PREVENT_DURATION) {
@@ -359,7 +359,7 @@ ngTouch.directive(&#39;ngClick&#39;, [&#39;$parse&#39;, &#39;$timeout&#39;, &#39;$rootElement&#39;, @@ -359,7 +359,7 @@ ngTouch.directive(&#39;ngClick&#39;, [&#39;$parse&#39;, &#39;$timeout&#39;, &#39;$rootElement&#39;,
359 } 359 }
360 360
361 361
362 - // Global touchstart handler that creates an allowable region for a click event. 362 + // Global touchstart handlers that creates an allowable region for a click event.
363 // This allowable region can be removed by preventGhostClick if we want to bust it. 363 // This allowable region can be removed by preventGhostClick if we want to bust it.
364 function onTouchStart(event) { 364 function onTouchStart(event) {
365 var touches = event.touches && event.touches.length ? event.touches : [event]; 365 var touches = event.touches && event.touches.length ? event.touches : [event];
@@ -466,11 +466,11 @@ ngTouch.directive(&#39;ngClick&#39;, [&#39;$parse&#39;, &#39;$timeout&#39;, &#39;$rootElement&#39;, @@ -466,11 +466,11 @@ ngTouch.directive(&#39;ngClick&#39;, [&#39;$parse&#39;, &#39;$timeout&#39;, &#39;$rootElement&#39;,
466 // something else nearby. 466 // something else nearby.
467 element.onclick = function(event) { }; 467 element.onclick = function(event) { };
468 468
469 - // Actual click handler. 469 + // Actual click handlers.
470 // There are three different kinds of clicks, only two of which reach this point. 470 // There are three different kinds of clicks, only two of which reach this point.
471 // - On desktop browsers without touch events, their clicks will always come here. 471 // - On desktop browsers without touch events, their clicks will always come here.
472 // - On mobile browsers, the simulated "fast" click will call this. 472 // - On mobile browsers, the simulated "fast" click will call this.
473 - // - But the browser's follow-up slow click will be "busted" before it reaches this handler. 473 + // - But the browser's follow-up slow click will be "busted" before it reaches this handlers.
474 // Therefore it's safe to use this directive on both mobile and desktop. 474 // Therefore it's safe to use this directive on both mobile and desktop.
475 element.on('click', function(event, touchend) { 475 element.on('click', function(event, touchend) {
476 scope.$apply(function() { 476 scope.$apply(function() {
src/main/resources/static/assets/bower_components/angular-ui-router/README.md
@@ -81,7 +81,7 @@ The majority of UI-Router&#39;s power is in its ability to nest states &amp; views. @@ -81,7 +81,7 @@ The majority of UI-Router&#39;s power is in its ability to nest states &amp; views.
81 <div ui-view></div> 81 <div ui-view></div>
82 <!-- We'll also add some navigation: --> 82 <!-- We'll also add some navigation: -->
83 <a ui-sref="state1">State 1</a> 83 <a ui-sref="state1">State 1</a>
84 - <a ui-sref="state2">State 2</a> 84 + <a ui-sref="signalState">State 2</a>
85 </body> 85 </body>
86 ``` 86 ```
87 87
@@ -96,10 +96,10 @@ The majority of UI-Router&#39;s power is in its ability to nest states &amp; views. @@ -96,10 +96,10 @@ The majority of UI-Router&#39;s power is in its ability to nest states &amp; views.
96 <div ui-view></div> 96 <div ui-view></div>
97 ``` 97 ```
98 ```html 98 ```html
99 -<!-- partials/state2.html --> 99 +<!-- partials/signalState.html -->
100 <h1>State 2</h1> 100 <h1>State 2</h1>
101 <hr/> 101 <hr/>
102 -<a ui-sref="state2.list">Show List</a> 102 +<a ui-sref="signalState.list">Show List</a>
103 <div ui-view></div> 103 <div ui-view></div>
104 ``` 104 ```
105 105
@@ -116,7 +116,7 @@ The majority of UI-Router&#39;s power is in its ability to nest states &amp; views. @@ -116,7 +116,7 @@ The majority of UI-Router&#39;s power is in its ability to nest states &amp; views.
116 116
117 > 117 >
118 ```html 118 ```html
119 -<!-- partials/state2.list.html --> 119 +<!-- partials/signalState.list.html -->
120 <h3>List of State 2 Things</h3> 120 <h3>List of State 2 Things</h3>
121 <ul> 121 <ul>
122 <li ng-repeat="thing in things">{{ thing }}</li> 122 <li ng-repeat="thing in things">{{ thing }}</li>
@@ -146,13 +146,13 @@ myApp.config(function($stateProvider, $urlRouterProvider) { @@ -146,13 +146,13 @@ myApp.config(function($stateProvider, $urlRouterProvider) {
146 $scope.items = ["A", "List", "Of", "Items"]; 146 $scope.items = ["A", "List", "Of", "Items"];
147 } 147 }
148 }) 148 })
149 - .state('state2', {  
150 - url: "/state2",  
151 - templateUrl: "partials/state2.html" 149 + .state('signalState', {
  150 + url: "/signalState",
  151 + templateUrl: "partials/signalState.html"
152 }) 152 })
153 - .state('state2.list', { 153 + .state('signalState.list', {
154 url: "/list", 154 url: "/list",
155 - templateUrl: "partials/state2.list.html", 155 + templateUrl: "partials/signalState.list.html",
156 controller: function($scope) { 156 controller: function($scope) {
157 $scope.things = ["A", "Set", "Of", "Things"]; 157 $scope.things = ["A", "Set", "Of", "Things"];
158 } 158 }
src/main/resources/static/assets/bower_components/angular-ui-router/release/angular-ui-router.js
@@ -1843,14 +1843,14 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { @@ -1843,14 +1843,14 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
1843 * @methodOf ui.router.router.$urlRouterProvider 1843 * @methodOf ui.router.router.$urlRouterProvider
1844 * 1844 *
1845 * @description 1845 * @description
1846 - * Registers a handler for a given url matching. if handle is a string, it is 1846 + * Registers a handlers for a given url matching. if handle is a string, it is
1847 * treated as a redirect, and is interpolated according to the syntax of match 1847 * treated as a redirect, and is interpolated according to the syntax of match
1848 * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise). 1848 * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).
1849 * 1849 *
1850 - * If the handler is a function, it is injectable. It gets invoked if `$location` 1850 + * If the handlers is a function, it is injectable. It gets invoked if `$location`
1851 * matches. You have the option of inject the match object as `$match`. 1851 * matches. You have the option of inject the match object as `$match`.
1852 * 1852 *
1853 - * The handler can return 1853 + * The handlers can return
1854 * 1854 *
1855 * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter` 1855 * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`
1856 * will continue trying to find another one that matches. 1856 * will continue trying to find another one that matches.
@@ -1879,7 +1879,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { @@ -1879,7 +1879,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
1879 if (isString(what)) what = $urlMatcherFactory.compile(what); 1879 if (isString(what)) what = $urlMatcherFactory.compile(what);
1880 1880
1881 if (!handlerIsString && !isFunction(handler) && !isArray(handler)) 1881 if (!handlerIsString && !isFunction(handler) && !isArray(handler))
1882 - throw new Error("invalid 'handler' in when()"); 1882 + throw new Error("invalid 'handlers' in when()");
1883 1883
1884 var strategies = { 1884 var strategies = {
1885 matcher: function (what, handler) { 1885 matcher: function (what, handler) {
@@ -1928,7 +1928,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { @@ -1928,7 +1928,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
1928 * If you wish to customize the behavior of syncing the URL (for example, if you wish to 1928 * If you wish to customize the behavior of syncing the URL (for example, if you wish to
1929 * defer a transition but maintain the current URL), call this method at configuration time. 1929 * defer a transition but maintain the current URL), call this method at configuration time.
1930 * Then, at run time, call `$urlRouter.listen()` after you have configured your own 1930 * Then, at run time, call `$urlRouter.listen()` after you have configured your own
1931 - * `$locationChangeSuccess` event handler. 1931 + * `$locationChangeSuccess` event handlers.
1932 * 1932 *
1933 * @example 1933 * @example
1934 * <pre> 1934 * <pre>
@@ -1947,7 +1947,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { @@ -1947,7 +1947,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
1947 * // UserService is an example service for managing user state 1947 * // UserService is an example service for managing user state
1948 * if (UserService.isLoggedIn()) return; 1948 * if (UserService.isLoggedIn()) return;
1949 * 1949 *
1950 - * // Prevent $urlRouter's default handler from firing 1950 + * // Prevent $urlRouter's default handlers from firing
1951 * e.preventDefault(); 1951 * e.preventDefault();
1952 * 1952 *
1953 * UserService.handleLogin().then(function() { 1953 * UserService.handleLogin().then(function() {
@@ -2914,7 +2914,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) { @@ -2914,7 +2914,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
2914 return null; 2914 return null;
2915 } 2915 }
2916 2916
2917 - // Allow the handler to return a promise to defer state lookup retry 2917 + // Allow the handlers to return a promise to defer state lookup retry
2918 if (options.$retry) { 2918 if (options.$retry) {
2919 $urlRouter.update(); 2919 $urlRouter.update();
2920 return TransitionFailed; 2920 return TransitionFailed;
src/main/resources/static/assets/bower_components/angular-ui-router/release/angular-ui-router.min.js
@@ -4,4 +4,4 @@ @@ -4,4 +4,4 @@
4 * @link http://angular-ui.github.com/ 4 * @link http://angular-ui.github.com/
5 * @license MIT License, http://www.opensource.org/licenses/MIT 5 * @license MIT License, http://www.opensource.org/licenses/MIT
6 */ 6 */
7 -"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";function d(a,b){return N(new(N(function(){},{prototype:a})),b)}function e(a){return M(arguments,function(b){b!==a&&M(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}function f(a,b){var c=[];for(var d in a.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}return c}function g(a){if(Object.keys)return Object.keys(a);var b=[];return M(a,function(a,c){b.push(c)}),b}function h(a,b){if(Array.prototype.indexOf)return a.indexOf(b,Number(arguments[2])||0);var c=a.length>>>0,d=Number(arguments[2])||0;for(d=0>d?Math.ceil(d):Math.floor(d),0>d&&(d+=c);c>d;d++)if(d in a&&a[d]===b)return d;return-1}function i(a,b,c,d){var e,i=f(c,d),j={},k=[];for(var l in i)if(i[l].params&&(e=g(i[l].params),e.length))for(var m in e)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);return N({},j,b)}function j(a,b,c){if(!c){c=[];for(var d in a)c.push(d)}for(var e=0;e<c.length;e++){var f=c[e];if(a[f]!=b[f])return!1}return!0}function k(a,b){var c={};return M(a,function(a){c[a]=b[a]}),c}function l(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return M(c,function(c){c in a&&(b[c]=a[c])}),b}function m(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var d in a)-1==h(c,d)&&(b[d]=a[d]);return b}function n(a,b){var c=L(a),d=c?[]:{};return M(a,function(a,e){b(a,e)&&(d[c?d.length:e]=a)}),d}function o(a,b){var c=L(a)?[]:{};return M(a,function(a,d){c[d]=b(a,d)}),c}function p(a,b){var d=1,f=2,i={},j=[],k=i,l=N(a.when(i),{$$promises:i,$$values:i});this.study=function(i){function n(a,c){if(s[c]!==f){if(r.push(c),s[c]===d)throw r.splice(0,h(r,c)),new Error("Cyclic dependency: "+r.join(" -> "));if(s[c]=d,J(a))q.push(c,[function(){return b.get(a)}],j);else{var e=b.annotate(a);M(e,function(a){a!==c&&i.hasOwnProperty(a)&&n(i[a],a)}),q.push(c,a,e)}r.pop(),s[c]=f}}function o(a){return K(a)&&a.then&&a.$$promises}if(!K(i))throw new Error("'invocables' must be an object");var p=g(i||{}),q=[],r=[],s={};return M(i,n),i=r=s=null,function(d,f,g){function h(){--u||(v||e(t,f.$$values),r.$$values=t,r.$$promises=r.$$promises||!0,delete r.$$inheritedValues,n.resolve(t))}function i(a){r.$$failure=a,n.reject(a)}function j(c,e,f){function j(a){l.reject(a),i(a)}function k(){if(!H(r.$$failure))try{l.resolve(b.invoke(e,g,t)),l.promise.then(function(a){t[c]=a,h()},j)}catch(a){j(a)}}var l=a.defer(),m=0;M(f,function(a){s.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,s[a].then(function(b){t[a]=b,--m||k()},j))}),m||k(),s[c]=l.promise}if(o(d)&&g===c&&(g=f,f=d,d=null),d){if(!K(d))throw new Error("'locals' must be an object")}else d=k;if(f){if(!o(f))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else f=l;var n=a.defer(),r=n.promise,s=r.$$promises={},t=N({},d),u=1+q.length/3,v=!1;if(H(f.$$failure))return i(f.$$failure),r;f.$$inheritedValues&&e(t,m(f.$$inheritedValues,p)),N(s,f.$$promises),f.$$values?(v=e(t,m(f.$$values,p)),r.$$inheritedValues=m(f.$$values,p),h()):(f.$$inheritedValues&&(r.$$inheritedValues=m(f.$$inheritedValues,p)),f.then(h,i));for(var w=0,x=q.length;x>w;w+=3)d.hasOwnProperty(q[w])?h():j(q[w],q[w+1],q[w+2]);return r}},this.resolve=function(a,b,c,d){return this.study(a)(b,c,d)}}function q(a,b,c){this.fromConfig=function(a,b,c){return H(a.template)?this.fromString(a.template,b):H(a.templateUrl)?this.fromUrl(a.templateUrl,b):H(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){return I(a)?a(b):a},this.fromUrl=function(c,d){return I(c)&&(c=c(d)),null==c?null:a.get(c,{cache:b,headers:{Accept:"text/html"}}).then(function(a){return a.data})},this.fromProvider=function(a,b,d){return c.invoke(a,null,d||{params:b})}}function r(a,b,e){function f(b,c,d,e){if(q.push(b),o[b])return o[b];if(!/^\w+(-+\w+)*(?:\[\])?$/.test(b))throw new Error("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(p[b])throw new Error("Duplicate parameter name '"+b+"' in pattern '"+a+"'");return p[b]=new P.Param(b,c,d,e),p[b]}function g(a,b,c,d){var e=["",""],f=a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!b)return f;switch(c){case!1:e=["(",")"+(d?"?":"")];break;case!0:e=["?(",")?"];break;default:e=["("+c+"|",")?"]}return f+e[0]+b+e[1]}function h(e,f){var g,h,i,j,k;return g=e[2]||e[3],k=b.params[g],i=a.substring(m,e.index),h=f?e[4]:e[4]||("*"==e[1]?".*":null),j=P.type(h||"string")||d(P.type("string"),{pattern:new RegExp(h,b.caseInsensitive?"i":c)}),{id:g,regexp:h,segment:i,type:j,cfg:k}}b=N({params:{}},K(b)?b:{});var i,j=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,k=/([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l="^",m=0,n=this.segments=[],o=e?e.params:{},p=this.params=e?e.params.$$new():new P.ParamSet,q=[];this.source=a;for(var r,s,t;(i=j.exec(a))&&(r=h(i,!1),!(r.segment.indexOf("?")>=0));)s=f(r.id,r.type,r.cfg,"path"),l+=g(r.segment,s.type.pattern.source,s.squash,s.isOptional),n.push(r.segment),m=j.lastIndex;t=a.substring(m);var u=t.indexOf("?");if(u>=0){var v=this.sourceSearch=t.substring(u);if(t=t.substring(0,u),this.sourcePath=a.substring(0,m+u),v.length>0)for(m=0;i=k.exec(v);)r=h(i,!0),s=f(r.id,r.type,r.cfg,"search"),m=j.lastIndex}else this.sourcePath=a,this.sourceSearch="";l+=g(t)+(b.strict===!1?"/?":"")+"$",n.push(t),this.regexp=new RegExp(l,b.caseInsensitive?"i":c),this.prefix=n[0],this.$$paramNames=q}function s(a){N(this,a)}function t(){function a(a){return null!=a?a.toString().replace(/\//g,"%2F"):a}function e(a){return null!=a?a.toString().replace(/%2F/g,"/"):a}function f(){return{strict:p,caseInsensitive:m}}function i(a){return I(a)||L(a)&&I(a[a.length-1])}function j(){for(;w.length;){var a=w.shift();if(a.pattern)throw new Error("You cannot override a type's .pattern at runtime.");b.extend(u[a.name],l.invoke(a.def))}}function k(a){N(this,a||{})}P=this;var l,m=!1,p=!0,q=!1,u={},v=!0,w=[],x={string:{encode:a,decode:e,is:function(a){return null==a||!H(a)||"string"==typeof a},pattern:/[^/]*/},"int":{encode:a,decode:function(a){return parseInt(a,10)},is:function(a){return H(a)&&this.decode(a.toString())===a},pattern:/\d+/},bool:{encode:function(a){return a?1:0},decode:function(a){return 0!==parseInt(a,10)},is:function(a){return a===!0||a===!1},pattern:/0|1/},date:{encode:function(a){return this.is(a)?[a.getFullYear(),("0"+(a.getMonth()+1)).slice(-2),("0"+a.getDate()).slice(-2)].join("-"):c},decode:function(a){if(this.is(a))return a;var b=this.capture.exec(a);return b?new Date(b[1],b[2]-1,b[3]):c},is:function(a){return a instanceof Date&&!isNaN(a.valueOf())},equals:function(a,b){return this.is(a)&&this.is(b)&&a.toISOString()===b.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:b.toJson,decode:b.fromJson,is:b.isObject,equals:b.equals,pattern:/[^/]*/},any:{encode:b.identity,decode:b.identity,equals:b.equals,pattern:/.*/}};t.$$getDefaultValue=function(a){if(!i(a.value))return a.value;if(!l)throw new Error("Injectable functions cannot be called at configuration time");return l.invoke(a.value)},this.caseInsensitive=function(a){return H(a)&&(m=a),m},this.strictMode=function(a){return H(a)&&(p=a),p},this.defaultSquashPolicy=function(a){if(!H(a))return q;if(a!==!0&&a!==!1&&!J(a))throw new Error("Invalid squash policy: "+a+". Valid policies: false, true, arbitrary-string");return q=a,a},this.compile=function(a,b){return new r(a,N(f(),b))},this.isMatcher=function(a){if(!K(a))return!1;var b=!0;return M(r.prototype,function(c,d){I(c)&&(b=b&&H(a[d])&&I(a[d]))}),b},this.type=function(a,b,c){if(!H(b))return u[a];if(u.hasOwnProperty(a))throw new Error("A type named '"+a+"' has already been defined.");return u[a]=new s(N({name:a},b)),c&&(w.push({name:a,def:c}),v||j()),this},M(x,function(a,b){u[b]=new s(N({name:b},a))}),u=d(u,{}),this.$get=["$injector",function(a){return l=a,v=!1,j(),M(x,function(a,b){u[b]||(u[b]=new s(a))}),this}],this.Param=function(a,b,d,e){function f(a){var b=K(a)?g(a):[],c=-1===h(b,"value")&&-1===h(b,"type")&&-1===h(b,"squash")&&-1===h(b,"array");return c&&(a={value:a}),a.$$fn=i(a.value)?a.value:function(){return a.value},a}function j(b,c,d){if(b.type&&c)throw new Error("Param '"+a+"' has two type configurations.");return c?c:b.type?b.type instanceof s?b.type:new s(b.type):"config"===d?u.any:u.string}function k(){var b={array:"search"===e?"auto":!1},c=a.match(/\[\]$/)?{array:!0}:{};return N(b,c,d).array}function m(a,b){var c=a.squash;if(!b||c===!1)return!1;if(!H(c)||null==c)return q;if(c===!0||J(c))return c;throw new Error("Invalid squash policy: '"+c+"'. Valid policies: false, true, or arbitrary string")}function p(a,b,d,e){var f,g,i=[{from:"",to:d||b?c:""},{from:null,to:d||b?c:""}];return f=L(a.replace)?a.replace:[],J(e)&&f.push({from:e,to:c}),g=o(f,function(a){return a.from}),n(i,function(a){return-1===h(g,a.from)}).concat(f)}function r(){if(!l)throw new Error("Injectable functions cannot be called at configuration time");var a=l.invoke(d.$$fn);if(null!==a&&a!==c&&!w.type.is(a))throw new Error("Default value ("+a+") for parameter '"+w.id+"' is not an instance of Type ("+w.type.name+")");return a}function t(a){function b(a){return function(b){return b.from===a}}function c(a){var c=o(n(w.replace,b(a)),function(a){return a.to});return c.length?c[0]:a}return a=c(a),H(a)?w.type.$normalize(a):r()}function v(){return"{Param:"+a+" "+b+" squash: '"+z+"' optional: "+y+"}"}var w=this;d=f(d),b=j(d,b,e);var x=k();b=x?b.$asArray(x,"search"===e):b,"string"!==b.name||x||"path"!==e||d.value!==c||(d.value="");var y=d.value!==c,z=m(d,y),A=p(d,x,y,z);N(this,{id:a,type:b,location:e,array:x,squash:z,replace:A,isOptional:y,value:t,dynamic:c,config:d,toString:v})},k.prototype={$$new:function(){return d(this,N(new k,{$$parent:this}))},$$keys:function(){for(var a=[],b=[],c=this,d=g(k.prototype);c;)b.push(c),c=c.$$parent;return b.reverse(),M(b,function(b){M(g(b),function(b){-1===h(a,b)&&-1===h(d,b)&&a.push(b)})}),a},$$values:function(a){var b={},c=this;return M(c.$$keys(),function(d){b[d]=c[d].value(a&&a[d])}),b},$$equals:function(a,b){var c=!0,d=this;return M(d.$$keys(),function(e){var f=a&&a[e],g=b&&b[e];d[e].type.equals(f,g)||(c=!1)}),c},$$validates:function(a){var d,e,f,g,h,i=this.$$keys();for(d=0;d<i.length&&(e=this[i[d]],f=a[i[d]],f!==c&&null!==f||!e.isOptional);d++){if(g=e.type.$normalize(f),!e.type.is(g))return!1;if(h=e.type.encode(g),b.isString(h)&&!e.type.pattern.exec(h))return!1}return!0},$$parent:c},this.ParamSet=k}function u(a,d){function e(a){var b=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(a.source);return null!=b?b[1].replace(/\\(.)/g,"$1"):""}function f(a,b){return a.replace(/\$(\$|\d{1,2})/,function(a,c){return b["$"===c?0:Number(c)]})}function g(a,b,c){if(!c)return!1;var d=a.invoke(b,b,{$match:c});return H(d)?d:!0}function h(d,e,f,g){function h(a,b,c){return"/"===p?a:b?p.slice(0,-1)+a:c?p.slice(1)+a:a}function m(a){function b(a){var b=a(f,d);return b?(J(b)&&d.replace().url(b),!0):!1}if(!a||!a.defaultPrevented){o&&d.url()===o;o=c;var e,g=j.length;for(e=0;g>e;e++)if(b(j[e]))return;k&&b(k)}}function n(){return i=i||e.$on("$locationChangeSuccess",m)}var o,p=g.baseHref(),q=d.url();return l||n(),{sync:function(){m()},listen:function(){return n()},update:function(a){return a?void(q=d.url()):void(d.url()!==q&&(d.url(q),d.replace()))},push:function(a,b,e){var f=a.format(b||{});null!==f&&b&&b["#"]&&(f+="#"+b["#"]),d.url(f),o=e&&e.$$avoidResync?d.url():c,e&&e.replace&&d.replace()},href:function(c,e,f){if(!c.validates(e))return null;var g=a.html5Mode();b.isObject(g)&&(g=g.enabled);var i=c.format(e);if(f=f||{},g||null===i||(i="#"+a.hashPrefix()+i),null!==i&&e&&e["#"]&&(i+="#"+e["#"]),i=h(i,g,f.absolute),!f.absolute||!i)return i;var j=!g&&i?"/":"",k=d.port();return k=80===k||443===k?"":":"+k,[d.protocol(),"://",d.host(),k,j,i].join("")}}}var i,j=[],k=null,l=!1;this.rule=function(a){if(!I(a))throw new Error("'rule' must be a function");return j.push(a),this},this.otherwise=function(a){if(J(a)){var b=a;a=function(){return b}}else if(!I(a))throw new Error("'rule' must be a function");return k=a,this},this.when=function(a,b){var c,h=J(b);if(J(a)&&(a=d.compile(a)),!h&&!I(b)&&!L(b))throw new Error("invalid 'handler' in when()");var i={matcher:function(a,b){return h&&(c=d.compile(b),b=["$match",function(a){return c.format(a)}]),N(function(c,d){return g(c,b,a.exec(d.path(),d.search()))},{prefix:J(a.prefix)?a.prefix:""})},regex:function(a,b){if(a.global||a.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(c=b,b=["$match",function(a){return f(c,a)}]),N(function(c,d){return g(c,b,a.exec(d.path()))},{prefix:e(a)})}},j={matcher:d.isMatcher(a),regex:a instanceof RegExp};for(var k in j)if(j[k])return this.rule(i[k](a,b));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(a){a===c&&(a=!0),l=a},this.$get=h,h.$inject=["$location","$rootScope","$injector","$browser"]}function v(a,e){function f(a){return 0===a.indexOf(".")||0===a.indexOf("^")}function m(a,b){if(!a)return c;var d=J(a),e=d?a:a.name,g=f(e);if(g){if(!b)throw new Error("No reference point given for path '"+e+"'");b=m(b);for(var h=e.split("."),i=0,j=h.length,k=b;j>i;i++)if(""!==h[i]||0!==i){if("^"!==h[i])break;if(!k.parent)throw new Error("Path '"+e+"' not valid for state '"+b.name+"'");k=k.parent}else k=b;h=h.slice(i).join("."),e=k.name+(k.name&&h?".":"")+h}var l=z[e];return!l||!d&&(d||l!==a&&l.self!==a)?c:l}function n(a,b){A[a]||(A[a]=[]),A[a].push(b)}function p(a){for(var b=A[a]||[];b.length;)q(b.shift())}function q(b){b=d(b,{self:b,resolve:b.resolve||{},toString:function(){return this.name}});var c=b.name;if(!J(c)||c.indexOf("@")>=0)throw new Error("State must have a valid name");if(z.hasOwnProperty(c))throw new Error("State '"+c+"'' is already defined");var e=-1!==c.indexOf(".")?c.substring(0,c.lastIndexOf(".")):J(b.parent)?b.parent:K(b.parent)&&J(b.parent.name)?b.parent.name:"";if(e&&!z[e])return n(e,b.self);for(var f in C)I(C[f])&&(b[f]=C[f](b,C.$delegates[f]));return z[c]=b,!b[B]&&b.url&&a.when(b.url,["$match","$stateParams",function(a,c){y.$current.navigable==b&&j(a,c)||y.transitionTo(b,a,{inherit:!0,location:!1})}]),p(c),b}function r(a){return a.indexOf("*")>-1}function s(a){for(var b=a.split("."),c=y.$current.name.split("."),d=0,e=b.length;e>d;d++)"*"===b[d]&&(c[d]="*");return"**"===b[0]&&(c=c.slice(h(c,b[1])),c.unshift("**")),"**"===b[b.length-1]&&(c.splice(h(c,b[b.length-2])+1,Number.MAX_VALUE),c.push("**")),b.length!=c.length?!1:c.join("")===b.join("")}function t(a,b){return J(a)&&!H(b)?C[a]:I(b)&&J(a)?(C[a]&&!C.$delegates[a]&&(C.$delegates[a]=C[a]),C[a]=b,this):this}function u(a,b){return K(a)?b=a:b.name=a,q(b),this}function v(a,e,f,h,l,n,p,q,t){function u(b,c,d,f){var g=a.$broadcast("$stateNotFound",b,c,d);if(g.defaultPrevented)return p.update(),D;if(!g.retry)return null;if(f.$retry)return p.update(),E;var h=y.transition=e.when(g.retry);return h.then(function(){return h!==y.transition?A:(b.options.$retry=!0,y.transitionTo(b.to,b.toParams,b.options))},function(){return D}),p.update(),h}function v(a,c,d,g,i,j){function m(){var c=[];return M(a.views,function(d,e){var g=d.resolve&&d.resolve!==a.resolve?d.resolve:{};g.$template=[function(){return f.load(e,{view:d,locals:i.globals,params:n,notify:j.notify})||""}],c.push(l.resolve(g,i.globals,i.resolve,a).then(function(c){if(I(d.controllerProvider)||L(d.controllerProvider)){var f=b.extend({},g,i.globals);c.$$controller=h.invoke(d.controllerProvider,null,f)}else c.$$controller=d.controller;c.$$state=a,c.$$controllerAs=d.controllerAs,i[e]=c}))}),e.all(c).then(function(){return i.globals})}var n=d?c:k(a.params.$$keys(),c),o={$stateParams:n};i.resolve=l.resolve(a.resolve,o,i.resolve,a);var p=[i.resolve.then(function(a){i.globals=a})];return g&&p.push(g),e.all(p).then(m).then(function(a){return i})}var A=e.reject(new Error("transition superseded")),C=e.reject(new Error("transition prevented")),D=e.reject(new Error("transition aborted")),E=e.reject(new Error("transition failed"));return x.locals={resolve:null,globals:{$stateParams:{}}},y={params:{},current:x.self,$current:x,transition:null},y.reload=function(a){return y.transitionTo(y.current,n,{reload:a||!0,inherit:!1,notify:!0})},y.go=function(a,b,c){return y.transitionTo(a,b,N({inherit:!0,relative:y.$current},c))},y.transitionTo=function(b,c,f){c=c||{},f=N({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var g,j=y.$current,l=y.params,o=j.path,q=m(b,f.relative),r=c["#"];if(!H(q)){var s={to:b,toParams:c,options:f},t=u(s,j.self,l,f);if(t)return t;if(b=s.to,c=s.toParams,f=s.options,q=m(b,f.relative),!H(q)){if(!f.relative)throw new Error("No such state '"+b+"'");throw new Error("Could not resolve '"+b+"' from state '"+f.relative+"'")}}if(q[B])throw new Error("Cannot transition to abstract state '"+b+"'");if(f.inherit&&(c=i(n,c||{},y.$current,q)),!q.params.$$validates(c))return E;c=q.params.$$values(c),b=q;var z=b.path,D=0,F=z[D],G=x.locals,I=[];if(f.reload){if(J(f.reload)||K(f.reload)){if(K(f.reload)&&!f.reload.name)throw new Error("Invalid reload state object");var L=f.reload===!0?o[0]:m(f.reload);if(f.reload&&!L)throw new Error("No such reload state '"+(J(f.reload)?f.reload:f.reload.name)+"'");for(;F&&F===o[D]&&F!==L;)G=I[D]=F.locals,D++,F=z[D]}}else for(;F&&F===o[D]&&F.ownParams.$$equals(c,l);)G=I[D]=F.locals,D++,F=z[D];if(w(b,c,j,l,G,f))return r&&(c["#"]=r),y.params=c,O(y.params,n),f.location&&b.navigable&&b.navigable.url&&(p.push(b.navigable.url,c,{$$avoidResync:!0,replace:"replace"===f.location}),p.update(!0)),y.transition=null,e.when(y.current);if(c=k(b.params.$$keys(),c||{}),f.notify&&a.$broadcast("$stateChangeStart",b.self,c,j.self,l).defaultPrevented)return a.$broadcast("$stateChangeCancel",b.self,c,j.self,l),p.update(),C;for(var M=e.when(G),P=D;P<z.length;P++,F=z[P])G=I[P]=d(G),M=v(F,c,F===b,M,G,f);var Q=y.transition=M.then(function(){var d,e,g;if(y.transition!==Q)return A;for(d=o.length-1;d>=D;d--)g=o[d],g.self.onExit&&h.invoke(g.self.onExit,g.self,g.locals.globals),g.locals=null;for(d=D;d<z.length;d++)e=z[d],e.locals=I[d],e.self.onEnter&&h.invoke(e.self.onEnter,e.self,e.locals.globals);return r&&(c["#"]=r),y.transition!==Q?A:(y.$current=b,y.current=b.self,y.params=c,O(y.params,n),y.transition=null,f.location&&b.navigable&&p.push(b.navigable.url,b.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===f.location}),f.notify&&a.$broadcast("$stateChangeSuccess",b.self,c,j.self,l),p.update(!0),y.current)},function(d){return y.transition!==Q?A:(y.transition=null,g=a.$broadcast("$stateChangeError",b.self,c,j.self,l,d),g.defaultPrevented||p.update(),e.reject(d))});return Q},y.is=function(a,b,d){d=N({relative:y.$current},d||{});var e=m(a,d.relative);return H(e)?y.$current!==e?!1:b?j(e.params.$$values(b),n):!0:c},y.includes=function(a,b,d){if(d=N({relative:y.$current},d||{}),J(a)&&r(a)){if(!s(a))return!1;a=y.$current.name}var e=m(a,d.relative);return H(e)?H(y.$current.includes[e.name])?b?j(e.params.$$values(b),n,g(b)):!0:!1:c},y.href=function(a,b,d){d=N({lossy:!0,inherit:!0,absolute:!1,relative:y.$current},d||{});var e=m(a,d.relative);if(!H(e))return null;d.inherit&&(b=i(n,b||{},y.$current,e));var f=e&&d.lossy?e.navigable:e;return f&&f.url!==c&&null!==f.url?p.href(f.url,k(e.params.$$keys().concat("#"),b||{}),{absolute:d.absolute}):null},y.get=function(a,b){if(0===arguments.length)return o(g(z),function(a){return z[a].self});var c=m(a,b||y.$current);return c&&c.self?c.self:null},y}function w(a,b,c,d,e,f){function g(a,b,c){function d(b){return"search"!=a.params[b].location}var e=a.params.$$keys().filter(d),f=l.apply({},[a.params].concat(e)),g=new P.ParamSet(f);return g.$$equals(b,c)}return!f.reload&&a===c&&(e===c.locals||a.self.reloadOnSearch===!1&&g(c,d,b))?!0:void 0}var x,y,z={},A={},B="abstract",C={parent:function(a){if(H(a.parent)&&a.parent)return m(a.parent);var b=/^(.+)\.[^.]+$/.exec(a.name);return b?m(b[1]):x},data:function(a){return a.parent&&a.parent.data&&(a.data=a.self.data=N({},a.parent.data,a.data)),a.data},url:function(a){var b=a.url,c={params:a.params||{}};if(J(b))return"^"==b.charAt(0)?e.compile(b.substring(1),c):(a.parent.navigable||x).url.concat(b,c);if(!b||e.isMatcher(b))return b;throw new Error("Invalid url '"+b+"' in state '"+a+"'")},navigable:function(a){return a.url?a:a.parent?a.parent.navigable:null},ownParams:function(a){var b=a.url&&a.url.params||new P.ParamSet;return M(a.params||{},function(a,c){b[c]||(b[c]=new P.Param(c,null,a,"config"))}),b},params:function(a){return a.parent&&a.parent.params?N(a.parent.params.$$new(),a.ownParams):new P.ParamSet},views:function(a){var b={};return M(H(a.views)?a.views:{"":a},function(c,d){d.indexOf("@")<0&&(d+="@"+a.parent.name),b[d]=c}),b},path:function(a){return a.parent?a.parent.path.concat(a):[]},includes:function(a){var b=a.parent?N({},a.parent.includes):{};return b[a.name]=!0,b},$delegates:{}};x=q({name:"",url:"^",views:null,"abstract":!0}),x.navigable=null,this.decorator=t,this.state=u,this.$get=v,v.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function w(){function a(a,b){return{load:function(c,d){var e,f={template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}};return d=N(f,d),d.view&&(e=b.fromConfig(d.view,d.params,d.locals)),e&&d.notify&&a.$broadcast("$viewContentLoading",d),e}}}this.$get=a,a.$inject=["$rootScope","$templateFactory"]}function x(){var a=!1;this.useAnchorScroll=function(){a=!0},this.$get=["$anchorScroll","$timeout",function(b,c){return a?b:function(a){return c(function(){a[0].scrollIntoView()},0,!1)}}]}function y(a,c,d,e){function f(){return c.has?function(a){return c.has(a)?c.get(a):null}:function(a){try{return c.get(a)}catch(b){return null}}}function g(a,b){var c=function(){return{enter:function(a,b,c){b.after(a),c()},leave:function(a,b){a.remove(),b()}}};if(j)return{enter:function(a,b,c){var d=j.enter(a,null,b,c);d&&d.then&&d.then(c)},leave:function(a,b){var c=j.leave(a,b);c&&c.then&&c.then(b)}};if(i){var d=i&&i(b,a);return{enter:function(a,b,c){d.enter(a,null,b),c()},leave:function(a,b){d.leave(a),b()}}}return c()}var h=f(),i=h("$animator"),j=h("$animate"),k={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(c,f,h){return function(c,f,i){function j(){l&&(l.remove(),l=null),n&&(n.$destroy(),n=null),m&&(r.leave(m,function(){l=null}),l=m,m=null)}function k(g){var k,l=A(c,i,f,e),s=l&&a.$current&&a.$current.locals[l];if(g||s!==o){k=c.$new(),o=a.$current.locals[l];var t=h(k,function(a){r.enter(a,f,function(){n&&n.$emit("$viewContentAnimationEnded"),(b.isDefined(q)&&!q||c.$eval(q))&&d(a)}),j()});m=t,n=k,n.$emit("$viewContentLoaded"),n.$eval(p)}}var l,m,n,o,p=i.onload||"",q=i.autoscroll,r=g(i,c);c.$on("$stateChangeSuccess",function(){k(!1)}),c.$on("$viewContentLoading",function(){k(!1)}),k(!0)}}};return k}function z(a,b,c,d){return{restrict:"ECA",priority:-400,compile:function(e){var f=e.html();return function(e,g,h){var i=c.$current,j=A(e,h,g,d),k=i&&i.locals[j];if(k){g.data("$uiView",{name:j,state:k.$$state}),g.html(k.$template?k.$template:f);var l=a(g.contents());if(k.$$controller){k.$scope=e,k.$element=g;var m=b(k.$$controller,k);k.$$controllerAs&&(e[k.$$controllerAs]=m),g.data("$ngControllerController",m),g.children().data("$ngControllerController",m)}l(e)}}}}}function A(a,b,c,d){var e=d(b.uiView||b.name||"")(a),f=c.inheritedData("$uiView");return e.indexOf("@")>=0?e:e+"@"+(f?f.state.name:"")}function B(a,b){var c,d=a.match(/^\s*({[^}]*})\s*$/);if(d&&(a=b+"("+d[1]+")"),c=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!c||4!==c.length)throw new Error("Invalid state ref '"+a+"'");return{state:c[1],paramExpr:c[3]||null}}function C(a){var b=a.parent().inheritedData("$uiView");return b&&b.state&&b.state.name?b.state:void 0}function D(a,c){var d=["location","inherit","reload","absolute"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(e,f,g,h){var i=B(g.uiSref,a.current.name),j=null,k=C(f)||a.$current,l="[object SVGAnimatedString]"===Object.prototype.toString.call(f.prop("href"))?"xlink:href":"href",m=null,n="A"===f.prop("tagName").toUpperCase(),o="FORM"===f[0].nodeName,p=o?"action":l,q=!0,r={relative:k,inherit:!0},s=e.$eval(g.uiSrefOpts)||{};b.forEach(d,function(a){a in s&&(r[a]=s[a])});var t=function(c){if(c&&(j=b.copy(c)),q){m=a.href(i.state,j,r);var d=h[1]||h[0];return d&&d.$$addStateInfo(i.state,j),null===m?(q=!1,!1):void g.$set(p,m)}};i.paramExpr&&(e.$watch(i.paramExpr,function(a,b){a!==j&&t(a)},!0),j=b.copy(e.$eval(i.paramExpr))),t(),o||f.bind("click",function(b){var d=b.which||b.button;if(!(d>1||b.ctrlKey||b.metaKey||b.shiftKey||f.attr("target"))){var e=c(function(){a.go(i.state,j,r)});b.preventDefault();var g=n&&!m?1:0;b.preventDefault=function(){g--<=0&&c.cancel(e)}}})}}}function E(a,b,c){return{restrict:"A",controller:["$scope","$element","$attrs",function(b,d,e){function f(){g()?d.addClass(i):d.removeClass(i)}function g(){for(var a=0;a<j.length;a++)if(h(j[a].state,j[a].params))return!0;return!1}function h(b,c){return"undefined"!=typeof e.uiSrefActiveEq?a.is(b.name,c):a.includes(b.name,c)}var i,j=[];i=c(e.uiSrefActiveEq||e.uiSrefActive||"",!1)(b),this.$$addStateInfo=function(b,c){var e=a.get(b,C(d));j.push({state:e||{name:b},params:c}),f()},b.$on("$stateChangeSuccess",f)}]}}function F(a){var b=function(b){return a.is(b)};return b.$stateful=!0,b}function G(a){var b=function(b){return a.includes(b)};return b.$stateful=!0,b}var H=b.isDefined,I=b.isFunction,J=b.isString,K=b.isObject,L=b.isArray,M=b.forEach,N=b.extend,O=b.copy;b.module("ui.router.util",["ng"]),b.module("ui.router.router",["ui.router.util"]),b.module("ui.router.state",["ui.router.router","ui.router.util"]),b.module("ui.router",["ui.router.state"]),b.module("ui.router.compat",["ui.router"]),p.$inject=["$q","$injector"],b.module("ui.router.util").service("$resolve",p),q.$inject=["$http","$templateCache","$injector"],b.module("ui.router.util").service("$templateFactory",q);var P;r.prototype.concat=function(a,b){var c={caseInsensitive:P.caseInsensitive(),strict:P.strictMode(),squash:P.defaultSquashPolicy()};return new r(this.sourcePath+a+this.sourceSearch,N(c,b),this)},r.prototype.toString=function(){return this.source},r.prototype.exec=function(a,b){function c(a){function b(a){return a.split("").reverse().join("")}function c(a){return a.replace(/\\-/g,"-")}var d=b(a).split(/-(?!\\)/),e=o(d,b);return o(e,c).reverse()}var d=this.regexp.exec(a);if(!d)return null;b=b||{};var e,f,g,h=this.parameters(),i=h.length,j=this.segments.length-1,k={};if(j!==d.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");for(e=0;j>e;e++){g=h[e];var l=this.params[g],m=d[e+1];for(f=0;f<l.replace;f++)l.replace[f].from===m&&(m=l.replace[f].to);m&&l.array===!0&&(m=c(m)),k[g]=l.value(m)}for(;i>e;e++)g=h[e],k[g]=this.params[g].value(b[g]);return k},r.prototype.parameters=function(a){return H(a)?this.params[a]||null:this.$$paramNames},r.prototype.validates=function(a){return this.params.$$validates(a)},r.prototype.format=function(a){function b(a){return encodeURIComponent(a).replace(/-/g,function(a){return"%5C%"+a.charCodeAt(0).toString(16).toUpperCase()})}a=a||{};var c=this.segments,d=this.parameters(),e=this.params;if(!this.validates(a))return null;var f,g=!1,h=c.length-1,i=d.length,j=c[0];for(f=0;i>f;f++){var k=h>f,l=d[f],m=e[l],n=m.value(a[l]),p=m.isOptional&&m.type.equals(m.value(),n),q=p?m.squash:!1,r=m.type.encode(n);if(k){var s=c[f+1];if(q===!1)null!=r&&(j+=L(r)?o(r,b).join("-"):encodeURIComponent(r)),j+=s;else if(q===!0){var t=j.match(/\/$/)?/\/?(.*)/:/(.*)/;j+=s.match(t)[1]}else J(q)&&(j+=q+s)}else{if(null==r||p&&q!==!1)continue;L(r)||(r=[r]),r=o(r,encodeURIComponent).join("&"+l+"="),j+=(g?"&":"?")+(l+"="+r),g=!0}}return j},s.prototype.is=function(a,b){return!0},s.prototype.encode=function(a,b){return a},s.prototype.decode=function(a,b){return a},s.prototype.equals=function(a,b){return a==b},s.prototype.$subPattern=function(){var a=this.pattern.toString();return a.substr(1,a.length-2)},s.prototype.pattern=/.*/,s.prototype.toString=function(){return"{Type:"+this.name+"}"},s.prototype.$normalize=function(a){return this.is(a)?a:this.decode(a)},s.prototype.$asArray=function(a,b){function d(a,b){function d(a,b){return function(){return a[b].apply(a,arguments)}}function e(a){return L(a)?a:H(a)?[a]:[]}function f(a){switch(a.length){case 0:return c;case 1:return"auto"===b?a[0]:a;default:return a}}function g(a){return!a}function h(a,b){return function(c){c=e(c);var d=o(c,a);return b===!0?0===n(d,g).length:f(d)}}function i(a){return function(b,c){var d=e(b),f=e(c);if(d.length!==f.length)return!1;for(var g=0;g<d.length;g++)if(!a(d[g],f[g]))return!1;return!0}}this.encode=h(d(a,"encode")),this.decode=h(d(a,"decode")),this.is=h(d(a,"is"),!0),this.equals=i(d(a,"equals")),this.pattern=a.pattern,this.$normalize=h(d(a,"$normalize")),this.name=a.name,this.$arrayMode=b}if(!a)return this;if("auto"===a&&!b)throw new Error("'auto' array mode is for query parameters only");return new d(this,a)},b.module("ui.router.util").provider("$urlMatcherFactory",t),b.module("ui.router.util").run(["$urlMatcherFactory",function(a){}]),u.$inject=["$locationProvider","$urlMatcherFactoryProvider"],b.module("ui.router.router").provider("$urlRouter",u),v.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],b.module("ui.router.state").value("$stateParams",{}).provider("$state",v),w.$inject=[],b.module("ui.router.state").provider("$view",w),b.module("ui.router.state").provider("$uiViewScroll",x),y.$inject=["$state","$injector","$uiViewScroll","$interpolate"],z.$inject=["$compile","$controller","$state","$interpolate"],b.module("ui.router.state").directive("uiView",y),b.module("ui.router.state").directive("uiView",z),D.$inject=["$state","$timeout"],E.$inject=["$state","$stateParams","$interpolate"],b.module("ui.router.state").directive("uiSref",D).directive("uiSrefActive",E).directive("uiSrefActiveEq",E),F.$inject=["$state"],G.$inject=["$state"],b.module("ui.router.state").filter("isState",F).filter("includedByState",G)}(window,window.angular);  
8 \ No newline at end of file 7 \ No newline at end of file
  8 +"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";function d(a,b){return N(new(N(function(){},{prototype:a})),b)}function e(a){return M(arguments,function(b){b!==a&&M(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}function f(a,b){var c=[];for(var d in a.path){if(a.path[d]!==b.path[d])break;c.push(a.path[d])}return c}function g(a){if(Object.keys)return Object.keys(a);var b=[];return M(a,function(a,c){b.push(c)}),b}function h(a,b){if(Array.prototype.indexOf)return a.indexOf(b,Number(arguments[2])||0);var c=a.length>>>0,d=Number(arguments[2])||0;for(d=0>d?Math.ceil(d):Math.floor(d),0>d&&(d+=c);c>d;d++)if(d in a&&a[d]===b)return d;return-1}function i(a,b,c,d){var e,i=f(c,d),j={},k=[];for(var l in i)if(i[l].params&&(e=g(i[l].params),e.length))for(var m in e)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);return N({},j,b)}function j(a,b,c){if(!c){c=[];for(var d in a)c.push(d)}for(var e=0;e<c.length;e++){var f=c[e];if(a[f]!=b[f])return!1}return!0}function k(a,b){var c={};return M(a,function(a){c[a]=b[a]}),c}function l(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return M(c,function(c){c in a&&(b[c]=a[c])}),b}function m(a){var b={},c=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var d in a)-1==h(c,d)&&(b[d]=a[d]);return b}function n(a,b){var c=L(a),d=c?[]:{};return M(a,function(a,e){b(a,e)&&(d[c?d.length:e]=a)}),d}function o(a,b){var c=L(a)?[]:{};return M(a,function(a,d){c[d]=b(a,d)}),c}function p(a,b){var d=1,f=2,i={},j=[],k=i,l=N(a.when(i),{$$promises:i,$$values:i});this.study=function(i){function n(a,c){if(s[c]!==f){if(r.push(c),s[c]===d)throw r.splice(0,h(r,c)),new Error("Cyclic dependency: "+r.join(" -> "));if(s[c]=d,J(a))q.push(c,[function(){return b.get(a)}],j);else{var e=b.annotate(a);M(e,function(a){a!==c&&i.hasOwnProperty(a)&&n(i[a],a)}),q.push(c,a,e)}r.pop(),s[c]=f}}function o(a){return K(a)&&a.then&&a.$$promises}if(!K(i))throw new Error("'invocables' must be an object");var p=g(i||{}),q=[],r=[],s={};return M(i,n),i=r=s=null,function(d,f,g){function h(){--u||(v||e(t,f.$$values),r.$$values=t,r.$$promises=r.$$promises||!0,delete r.$$inheritedValues,n.resolve(t))}function i(a){r.$$failure=a,n.reject(a)}function j(c,e,f){function j(a){l.reject(a),i(a)}function k(){if(!H(r.$$failure))try{l.resolve(b.invoke(e,g,t)),l.promise.then(function(a){t[c]=a,h()},j)}catch(a){j(a)}}var l=a.defer(),m=0;M(f,function(a){s.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,s[a].then(function(b){t[a]=b,--m||k()},j))}),m||k(),s[c]=l.promise}if(o(d)&&g===c&&(g=f,f=d,d=null),d){if(!K(d))throw new Error("'locals' must be an object")}else d=k;if(f){if(!o(f))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else f=l;var n=a.defer(),r=n.promise,s=r.$$promises={},t=N({},d),u=1+q.length/3,v=!1;if(H(f.$$failure))return i(f.$$failure),r;f.$$inheritedValues&&e(t,m(f.$$inheritedValues,p)),N(s,f.$$promises),f.$$values?(v=e(t,m(f.$$values,p)),r.$$inheritedValues=m(f.$$values,p),h()):(f.$$inheritedValues&&(r.$$inheritedValues=m(f.$$inheritedValues,p)),f.then(h,i));for(var w=0,x=q.length;x>w;w+=3)d.hasOwnProperty(q[w])?h():j(q[w],q[w+1],q[w+2]);return r}},this.resolve=function(a,b,c,d){return this.study(a)(b,c,d)}}function q(a,b,c){this.fromConfig=function(a,b,c){return H(a.template)?this.fromString(a.template,b):H(a.templateUrl)?this.fromUrl(a.templateUrl,b):H(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){return I(a)?a(b):a},this.fromUrl=function(c,d){return I(c)&&(c=c(d)),null==c?null:a.get(c,{cache:b,headers:{Accept:"text/html"}}).then(function(a){return a.data})},this.fromProvider=function(a,b,d){return c.invoke(a,null,d||{params:b})}}function r(a,b,e){function f(b,c,d,e){if(q.push(b),o[b])return o[b];if(!/^\w+(-+\w+)*(?:\[\])?$/.test(b))throw new Error("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(p[b])throw new Error("Duplicate parameter name '"+b+"' in pattern '"+a+"'");return p[b]=new P.Param(b,c,d,e),p[b]}function g(a,b,c,d){var e=["",""],f=a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!b)return f;switch(c){case!1:e=["(",")"+(d?"?":"")];break;case!0:e=["?(",")?"];break;default:e=["("+c+"|",")?"]}return f+e[0]+b+e[1]}function h(e,f){var g,h,i,j,k;return g=e[2]||e[3],k=b.params[g],i=a.substring(m,e.index),h=f?e[4]:e[4]||("*"==e[1]?".*":null),j=P.type(h||"string")||d(P.type("string"),{pattern:new RegExp(h,b.caseInsensitive?"i":c)}),{id:g,regexp:h,segment:i,type:j,cfg:k}}b=N({params:{}},K(b)?b:{});var i,j=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,k=/([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l="^",m=0,n=this.segments=[],o=e?e.params:{},p=this.params=e?e.params.$$new():new P.ParamSet,q=[];this.source=a;for(var r,s,t;(i=j.exec(a))&&(r=h(i,!1),!(r.segment.indexOf("?")>=0));)s=f(r.id,r.type,r.cfg,"path"),l+=g(r.segment,s.type.pattern.source,s.squash,s.isOptional),n.push(r.segment),m=j.lastIndex;t=a.substring(m);var u=t.indexOf("?");if(u>=0){var v=this.sourceSearch=t.substring(u);if(t=t.substring(0,u),this.sourcePath=a.substring(0,m+u),v.length>0)for(m=0;i=k.exec(v);)r=h(i,!0),s=f(r.id,r.type,r.cfg,"search"),m=j.lastIndex}else this.sourcePath=a,this.sourceSearch="";l+=g(t)+(b.strict===!1?"/?":"")+"$",n.push(t),this.regexp=new RegExp(l,b.caseInsensitive?"i":c),this.prefix=n[0],this.$$paramNames=q}function s(a){N(this,a)}function t(){function a(a){return null!=a?a.toString().replace(/\//g,"%2F"):a}function e(a){return null!=a?a.toString().replace(/%2F/g,"/"):a}function f(){return{strict:p,caseInsensitive:m}}function i(a){return I(a)||L(a)&&I(a[a.length-1])}function j(){for(;w.length;){var a=w.shift();if(a.pattern)throw new Error("You cannot override a type's .pattern at runtime.");b.extend(u[a.name],l.invoke(a.def))}}function k(a){N(this,a||{})}P=this;var l,m=!1,p=!0,q=!1,u={},v=!0,w=[],x={string:{encode:a,decode:e,is:function(a){return null==a||!H(a)||"string"==typeof a},pattern:/[^/]*/},"int":{encode:a,decode:function(a){return parseInt(a,10)},is:function(a){return H(a)&&this.decode(a.toString())===a},pattern:/\d+/},bool:{encode:function(a){return a?1:0},decode:function(a){return 0!==parseInt(a,10)},is:function(a){return a===!0||a===!1},pattern:/0|1/},date:{encode:function(a){return this.is(a)?[a.getFullYear(),("0"+(a.getMonth()+1)).slice(-2),("0"+a.getDate()).slice(-2)].join("-"):c},decode:function(a){if(this.is(a))return a;var b=this.capture.exec(a);return b?new Date(b[1],b[2]-1,b[3]):c},is:function(a){return a instanceof Date&&!isNaN(a.valueOf())},equals:function(a,b){return this.is(a)&&this.is(b)&&a.toISOString()===b.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:b.toJson,decode:b.fromJson,is:b.isObject,equals:b.equals,pattern:/[^/]*/},any:{encode:b.identity,decode:b.identity,equals:b.equals,pattern:/.*/}};t.$$getDefaultValue=function(a){if(!i(a.value))return a.value;if(!l)throw new Error("Injectable functions cannot be called at configuration time");return l.invoke(a.value)},this.caseInsensitive=function(a){return H(a)&&(m=a),m},this.strictMode=function(a){return H(a)&&(p=a),p},this.defaultSquashPolicy=function(a){if(!H(a))return q;if(a!==!0&&a!==!1&&!J(a))throw new Error("Invalid squash policy: "+a+". Valid policies: false, true, arbitrary-string");return q=a,a},this.compile=function(a,b){return new r(a,N(f(),b))},this.isMatcher=function(a){if(!K(a))return!1;var b=!0;return M(r.prototype,function(c,d){I(c)&&(b=b&&H(a[d])&&I(a[d]))}),b},this.type=function(a,b,c){if(!H(b))return u[a];if(u.hasOwnProperty(a))throw new Error("A type named '"+a+"' has already been defined.");return u[a]=new s(N({name:a},b)),c&&(w.push({name:a,def:c}),v||j()),this},M(x,function(a,b){u[b]=new s(N({name:b},a))}),u=d(u,{}),this.$get=["$injector",function(a){return l=a,v=!1,j(),M(x,function(a,b){u[b]||(u[b]=new s(a))}),this}],this.Param=function(a,b,d,e){function f(a){var b=K(a)?g(a):[],c=-1===h(b,"value")&&-1===h(b,"type")&&-1===h(b,"squash")&&-1===h(b,"array");return c&&(a={value:a}),a.$$fn=i(a.value)?a.value:function(){return a.value},a}function j(b,c,d){if(b.type&&c)throw new Error("Param '"+a+"' has two type configurations.");return c?c:b.type?b.type instanceof s?b.type:new s(b.type):"config"===d?u.any:u.string}function k(){var b={array:"search"===e?"auto":!1},c=a.match(/\[\]$/)?{array:!0}:{};return N(b,c,d).array}function m(a,b){var c=a.squash;if(!b||c===!1)return!1;if(!H(c)||null==c)return q;if(c===!0||J(c))return c;throw new Error("Invalid squash policy: '"+c+"'. Valid policies: false, true, or arbitrary string")}function p(a,b,d,e){var f,g,i=[{from:"",to:d||b?c:""},{from:null,to:d||b?c:""}];return f=L(a.replace)?a.replace:[],J(e)&&f.push({from:e,to:c}),g=o(f,function(a){return a.from}),n(i,function(a){return-1===h(g,a.from)}).concat(f)}function r(){if(!l)throw new Error("Injectable functions cannot be called at configuration time");var a=l.invoke(d.$$fn);if(null!==a&&a!==c&&!w.type.is(a))throw new Error("Default value ("+a+") for parameter '"+w.id+"' is not an instance of Type ("+w.type.name+")");return a}function t(a){function b(a){return function(b){return b.from===a}}function c(a){var c=o(n(w.replace,b(a)),function(a){return a.to});return c.length?c[0]:a}return a=c(a),H(a)?w.type.$normalize(a):r()}function v(){return"{Param:"+a+" "+b+" squash: '"+z+"' optional: "+y+"}"}var w=this;d=f(d),b=j(d,b,e);var x=k();b=x?b.$asArray(x,"search"===e):b,"string"!==b.name||x||"path"!==e||d.value!==c||(d.value="");var y=d.value!==c,z=m(d,y),A=p(d,x,y,z);N(this,{id:a,type:b,location:e,array:x,squash:z,replace:A,isOptional:y,value:t,dynamic:c,config:d,toString:v})},k.prototype={$$new:function(){return d(this,N(new k,{$$parent:this}))},$$keys:function(){for(var a=[],b=[],c=this,d=g(k.prototype);c;)b.push(c),c=c.$$parent;return b.reverse(),M(b,function(b){M(g(b),function(b){-1===h(a,b)&&-1===h(d,b)&&a.push(b)})}),a},$$values:function(a){var b={},c=this;return M(c.$$keys(),function(d){b[d]=c[d].value(a&&a[d])}),b},$$equals:function(a,b){var c=!0,d=this;return M(d.$$keys(),function(e){var f=a&&a[e],g=b&&b[e];d[e].type.equals(f,g)||(c=!1)}),c},$$validates:function(a){var d,e,f,g,h,i=this.$$keys();for(d=0;d<i.length&&(e=this[i[d]],f=a[i[d]],f!==c&&null!==f||!e.isOptional);d++){if(g=e.type.$normalize(f),!e.type.is(g))return!1;if(h=e.type.encode(g),b.isString(h)&&!e.type.pattern.exec(h))return!1}return!0},$$parent:c},this.ParamSet=k}function u(a,d){function e(a){var b=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(a.source);return null!=b?b[1].replace(/\\(.)/g,"$1"):""}function f(a,b){return a.replace(/\$(\$|\d{1,2})/,function(a,c){return b["$"===c?0:Number(c)]})}function g(a,b,c){if(!c)return!1;var d=a.invoke(b,b,{$match:c});return H(d)?d:!0}function h(d,e,f,g){function h(a,b,c){return"/"===p?a:b?p.slice(0,-1)+a:c?p.slice(1)+a:a}function m(a){function b(a){var b=a(f,d);return b?(J(b)&&d.replace().url(b),!0):!1}if(!a||!a.defaultPrevented){o&&d.url()===o;o=c;var e,g=j.length;for(e=0;g>e;e++)if(b(j[e]))return;k&&b(k)}}function n(){return i=i||e.$on("$locationChangeSuccess",m)}var o,p=g.baseHref(),q=d.url();return l||n(),{sync:function(){m()},listen:function(){return n()},update:function(a){return a?void(q=d.url()):void(d.url()!==q&&(d.url(q),d.replace()))},push:function(a,b,e){var f=a.format(b||{});null!==f&&b&&b["#"]&&(f+="#"+b["#"]),d.url(f),o=e&&e.$$avoidResync?d.url():c,e&&e.replace&&d.replace()},href:function(c,e,f){if(!c.validates(e))return null;var g=a.html5Mode();b.isObject(g)&&(g=g.enabled);var i=c.format(e);if(f=f||{},g||null===i||(i="#"+a.hashPrefix()+i),null!==i&&e&&e["#"]&&(i+="#"+e["#"]),i=h(i,g,f.absolute),!f.absolute||!i)return i;var j=!g&&i?"/":"",k=d.port();return k=80===k||443===k?"":":"+k,[d.protocol(),"://",d.host(),k,j,i].join("")}}}var i,j=[],k=null,l=!1;this.rule=function(a){if(!I(a))throw new Error("'rule' must be a function");return j.push(a),this},this.otherwise=function(a){if(J(a)){var b=a;a=function(){return b}}else if(!I(a))throw new Error("'rule' must be a function");return k=a,this},this.when=function(a,b){var c,h=J(b);if(J(a)&&(a=d.compile(a)),!h&&!I(b)&&!L(b))throw new Error("invalid 'handlers' in when()");var i={matcher:function(a,b){return h&&(c=d.compile(b),b=["$match",function(a){return c.format(a)}]),N(function(c,d){return g(c,b,a.exec(d.path(),d.search()))},{prefix:J(a.prefix)?a.prefix:""})},regex:function(a,b){if(a.global||a.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(c=b,b=["$match",function(a){return f(c,a)}]),N(function(c,d){return g(c,b,a.exec(d.path()))},{prefix:e(a)})}},j={matcher:d.isMatcher(a),regex:a instanceof RegExp};for(var k in j)if(j[k])return this.rule(i[k](a,b));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(a){a===c&&(a=!0),l=a},this.$get=h,h.$inject=["$location","$rootScope","$injector","$browser"]}function v(a,e){function f(a){return 0===a.indexOf(".")||0===a.indexOf("^")}function m(a,b){if(!a)return c;var d=J(a),e=d?a:a.name,g=f(e);if(g){if(!b)throw new Error("No reference point given for path '"+e+"'");b=m(b);for(var h=e.split("."),i=0,j=h.length,k=b;j>i;i++)if(""!==h[i]||0!==i){if("^"!==h[i])break;if(!k.parent)throw new Error("Path '"+e+"' not valid for state '"+b.name+"'");k=k.parent}else k=b;h=h.slice(i).join("."),e=k.name+(k.name&&h?".":"")+h}var l=z[e];return!l||!d&&(d||l!==a&&l.self!==a)?c:l}function n(a,b){A[a]||(A[a]=[]),A[a].push(b)}function p(a){for(var b=A[a]||[];b.length;)q(b.shift())}function q(b){b=d(b,{self:b,resolve:b.resolve||{},toString:function(){return this.name}});var c=b.name;if(!J(c)||c.indexOf("@")>=0)throw new Error("State must have a valid name");if(z.hasOwnProperty(c))throw new Error("State '"+c+"'' is already defined");var e=-1!==c.indexOf(".")?c.substring(0,c.lastIndexOf(".")):J(b.parent)?b.parent:K(b.parent)&&J(b.parent.name)?b.parent.name:"";if(e&&!z[e])return n(e,b.self);for(var f in C)I(C[f])&&(b[f]=C[f](b,C.$delegates[f]));return z[c]=b,!b[B]&&b.url&&a.when(b.url,["$match","$stateParams",function(a,c){y.$current.navigable==b&&j(a,c)||y.transitionTo(b,a,{inherit:!0,location:!1})}]),p(c),b}function r(a){return a.indexOf("*")>-1}function s(a){for(var b=a.split("."),c=y.$current.name.split("."),d=0,e=b.length;e>d;d++)"*"===b[d]&&(c[d]="*");return"**"===b[0]&&(c=c.slice(h(c,b[1])),c.unshift("**")),"**"===b[b.length-1]&&(c.splice(h(c,b[b.length-2])+1,Number.MAX_VALUE),c.push("**")),b.length!=c.length?!1:c.join("")===b.join("")}function t(a,b){return J(a)&&!H(b)?C[a]:I(b)&&J(a)?(C[a]&&!C.$delegates[a]&&(C.$delegates[a]=C[a]),C[a]=b,this):this}function u(a,b){return K(a)?b=a:b.name=a,q(b),this}function v(a,e,f,h,l,n,p,q,t){function u(b,c,d,f){var g=a.$broadcast("$stateNotFound",b,c,d);if(g.defaultPrevented)return p.update(),D;if(!g.retry)return null;if(f.$retry)return p.update(),E;var h=y.transition=e.when(g.retry);return h.then(function(){return h!==y.transition?A:(b.options.$retry=!0,y.transitionTo(b.to,b.toParams,b.options))},function(){return D}),p.update(),h}function v(a,c,d,g,i,j){function m(){var c=[];return M(a.views,function(d,e){var g=d.resolve&&d.resolve!==a.resolve?d.resolve:{};g.$template=[function(){return f.load(e,{view:d,locals:i.globals,params:n,notify:j.notify})||""}],c.push(l.resolve(g,i.globals,i.resolve,a).then(function(c){if(I(d.controllerProvider)||L(d.controllerProvider)){var f=b.extend({},g,i.globals);c.$$controller=h.invoke(d.controllerProvider,null,f)}else c.$$controller=d.controller;c.$$state=a,c.$$controllerAs=d.controllerAs,i[e]=c}))}),e.all(c).then(function(){return i.globals})}var n=d?c:k(a.params.$$keys(),c),o={$stateParams:n};i.resolve=l.resolve(a.resolve,o,i.resolve,a);var p=[i.resolve.then(function(a){i.globals=a})];return g&&p.push(g),e.all(p).then(m).then(function(a){return i})}var A=e.reject(new Error("transition superseded")),C=e.reject(new Error("transition prevented")),D=e.reject(new Error("transition aborted")),E=e.reject(new Error("transition failed"));return x.locals={resolve:null,globals:{$stateParams:{}}},y={params:{},current:x.self,$current:x,transition:null},y.reload=function(a){return y.transitionTo(y.current,n,{reload:a||!0,inherit:!1,notify:!0})},y.go=function(a,b,c){return y.transitionTo(a,b,N({inherit:!0,relative:y.$current},c))},y.transitionTo=function(b,c,f){c=c||{},f=N({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var g,j=y.$current,l=y.params,o=j.path,q=m(b,f.relative),r=c["#"];if(!H(q)){var s={to:b,toParams:c,options:f},t=u(s,j.self,l,f);if(t)return t;if(b=s.to,c=s.toParams,f=s.options,q=m(b,f.relative),!H(q)){if(!f.relative)throw new Error("No such state '"+b+"'");throw new Error("Could not resolve '"+b+"' from state '"+f.relative+"'")}}if(q[B])throw new Error("Cannot transition to abstract state '"+b+"'");if(f.inherit&&(c=i(n,c||{},y.$current,q)),!q.params.$$validates(c))return E;c=q.params.$$values(c),b=q;var z=b.path,D=0,F=z[D],G=x.locals,I=[];if(f.reload){if(J(f.reload)||K(f.reload)){if(K(f.reload)&&!f.reload.name)throw new Error("Invalid reload state object");var L=f.reload===!0?o[0]:m(f.reload);if(f.reload&&!L)throw new Error("No such reload state '"+(J(f.reload)?f.reload:f.reload.name)+"'");for(;F&&F===o[D]&&F!==L;)G=I[D]=F.locals,D++,F=z[D]}}else for(;F&&F===o[D]&&F.ownParams.$$equals(c,l);)G=I[D]=F.locals,D++,F=z[D];if(w(b,c,j,l,G,f))return r&&(c["#"]=r),y.params=c,O(y.params,n),f.location&&b.navigable&&b.navigable.url&&(p.push(b.navigable.url,c,{$$avoidResync:!0,replace:"replace"===f.location}),p.update(!0)),y.transition=null,e.when(y.current);if(c=k(b.params.$$keys(),c||{}),f.notify&&a.$broadcast("$stateChangeStart",b.self,c,j.self,l).defaultPrevented)return a.$broadcast("$stateChangeCancel",b.self,c,j.self,l),p.update(),C;for(var M=e.when(G),P=D;P<z.length;P++,F=z[P])G=I[P]=d(G),M=v(F,c,F===b,M,G,f);var Q=y.transition=M.then(function(){var d,e,g;if(y.transition!==Q)return A;for(d=o.length-1;d>=D;d--)g=o[d],g.self.onExit&&h.invoke(g.self.onExit,g.self,g.locals.globals),g.locals=null;for(d=D;d<z.length;d++)e=z[d],e.locals=I[d],e.self.onEnter&&h.invoke(e.self.onEnter,e.self,e.locals.globals);return r&&(c["#"]=r),y.transition!==Q?A:(y.$current=b,y.current=b.self,y.params=c,O(y.params,n),y.transition=null,f.location&&b.navigable&&p.push(b.navigable.url,b.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===f.location}),f.notify&&a.$broadcast("$stateChangeSuccess",b.self,c,j.self,l),p.update(!0),y.current)},function(d){return y.transition!==Q?A:(y.transition=null,g=a.$broadcast("$stateChangeError",b.self,c,j.self,l,d),g.defaultPrevented||p.update(),e.reject(d))});return Q},y.is=function(a,b,d){d=N({relative:y.$current},d||{});var e=m(a,d.relative);return H(e)?y.$current!==e?!1:b?j(e.params.$$values(b),n):!0:c},y.includes=function(a,b,d){if(d=N({relative:y.$current},d||{}),J(a)&&r(a)){if(!s(a))return!1;a=y.$current.name}var e=m(a,d.relative);return H(e)?H(y.$current.includes[e.name])?b?j(e.params.$$values(b),n,g(b)):!0:!1:c},y.href=function(a,b,d){d=N({lossy:!0,inherit:!0,absolute:!1,relative:y.$current},d||{});var e=m(a,d.relative);if(!H(e))return null;d.inherit&&(b=i(n,b||{},y.$current,e));var f=e&&d.lossy?e.navigable:e;return f&&f.url!==c&&null!==f.url?p.href(f.url,k(e.params.$$keys().concat("#"),b||{}),{absolute:d.absolute}):null},y.get=function(a,b){if(0===arguments.length)return o(g(z),function(a){return z[a].self});var c=m(a,b||y.$current);return c&&c.self?c.self:null},y}function w(a,b,c,d,e,f){function g(a,b,c){function d(b){return"search"!=a.params[b].location}var e=a.params.$$keys().filter(d),f=l.apply({},[a.params].concat(e)),g=new P.ParamSet(f);return g.$$equals(b,c)}return!f.reload&&a===c&&(e===c.locals||a.self.reloadOnSearch===!1&&g(c,d,b))?!0:void 0}var x,y,z={},A={},B="abstract",C={parent:function(a){if(H(a.parent)&&a.parent)return m(a.parent);var b=/^(.+)\.[^.]+$/.exec(a.name);return b?m(b[1]):x},data:function(a){return a.parent&&a.parent.data&&(a.data=a.self.data=N({},a.parent.data,a.data)),a.data},url:function(a){var b=a.url,c={params:a.params||{}};if(J(b))return"^"==b.charAt(0)?e.compile(b.substring(1),c):(a.parent.navigable||x).url.concat(b,c);if(!b||e.isMatcher(b))return b;throw new Error("Invalid url '"+b+"' in state '"+a+"'")},navigable:function(a){return a.url?a:a.parent?a.parent.navigable:null},ownParams:function(a){var b=a.url&&a.url.params||new P.ParamSet;return M(a.params||{},function(a,c){b[c]||(b[c]=new P.Param(c,null,a,"config"))}),b},params:function(a){return a.parent&&a.parent.params?N(a.parent.params.$$new(),a.ownParams):new P.ParamSet},views:function(a){var b={};return M(H(a.views)?a.views:{"":a},function(c,d){d.indexOf("@")<0&&(d+="@"+a.parent.name),b[d]=c}),b},path:function(a){return a.parent?a.parent.path.concat(a):[]},includes:function(a){var b=a.parent?N({},a.parent.includes):{};return b[a.name]=!0,b},$delegates:{}};x=q({name:"",url:"^",views:null,"abstract":!0}),x.navigable=null,this.decorator=t,this.state=u,this.$get=v,v.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function w(){function a(a,b){return{load:function(c,d){var e,f={template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}};return d=N(f,d),d.view&&(e=b.fromConfig(d.view,d.params,d.locals)),e&&d.notify&&a.$broadcast("$viewContentLoading",d),e}}}this.$get=a,a.$inject=["$rootScope","$templateFactory"]}function x(){var a=!1;this.useAnchorScroll=function(){a=!0},this.$get=["$anchorScroll","$timeout",function(b,c){return a?b:function(a){return c(function(){a[0].scrollIntoView()},0,!1)}}]}function y(a,c,d,e){function f(){return c.has?function(a){return c.has(a)?c.get(a):null}:function(a){try{return c.get(a)}catch(b){return null}}}function g(a,b){var c=function(){return{enter:function(a,b,c){b.after(a),c()},leave:function(a,b){a.remove(),b()}}};if(j)return{enter:function(a,b,c){var d=j.enter(a,null,b,c);d&&d.then&&d.then(c)},leave:function(a,b){var c=j.leave(a,b);c&&c.then&&c.then(b)}};if(i){var d=i&&i(b,a);return{enter:function(a,b,c){d.enter(a,null,b),c()},leave:function(a,b){d.leave(a),b()}}}return c()}var h=f(),i=h("$animator"),j=h("$animate"),k={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(c,f,h){return function(c,f,i){function j(){l&&(l.remove(),l=null),n&&(n.$destroy(),n=null),m&&(r.leave(m,function(){l=null}),l=m,m=null)}function k(g){var k,l=A(c,i,f,e),s=l&&a.$current&&a.$current.locals[l];if(g||s!==o){k=c.$new(),o=a.$current.locals[l];var t=h(k,function(a){r.enter(a,f,function(){n&&n.$emit("$viewContentAnimationEnded"),(b.isDefined(q)&&!q||c.$eval(q))&&d(a)}),j()});m=t,n=k,n.$emit("$viewContentLoaded"),n.$eval(p)}}var l,m,n,o,p=i.onload||"",q=i.autoscroll,r=g(i,c);c.$on("$stateChangeSuccess",function(){k(!1)}),c.$on("$viewContentLoading",function(){k(!1)}),k(!0)}}};return k}function z(a,b,c,d){return{restrict:"ECA",priority:-400,compile:function(e){var f=e.html();return function(e,g,h){var i=c.$current,j=A(e,h,g,d),k=i&&i.locals[j];if(k){g.data("$uiView",{name:j,state:k.$$state}),g.html(k.$template?k.$template:f);var l=a(g.contents());if(k.$$controller){k.$scope=e,k.$element=g;var m=b(k.$$controller,k);k.$$controllerAs&&(e[k.$$controllerAs]=m),g.data("$ngControllerController",m),g.children().data("$ngControllerController",m)}l(e)}}}}}function A(a,b,c,d){var e=d(b.uiView||b.name||"")(a),f=c.inheritedData("$uiView");return e.indexOf("@")>=0?e:e+"@"+(f?f.state.name:"")}function B(a,b){var c,d=a.match(/^\s*({[^}]*})\s*$/);if(d&&(a=b+"("+d[1]+")"),c=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!c||4!==c.length)throw new Error("Invalid state ref '"+a+"'");return{state:c[1],paramExpr:c[3]||null}}function C(a){var b=a.parent().inheritedData("$uiView");return b&&b.state&&b.state.name?b.state:void 0}function D(a,c){var d=["location","inherit","reload","absolute"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(e,f,g,h){var i=B(g.uiSref,a.current.name),j=null,k=C(f)||a.$current,l="[object SVGAnimatedString]"===Object.prototype.toString.call(f.prop("href"))?"xlink:href":"href",m=null,n="A"===f.prop("tagName").toUpperCase(),o="FORM"===f[0].nodeName,p=o?"action":l,q=!0,r={relative:k,inherit:!0},s=e.$eval(g.uiSrefOpts)||{};b.forEach(d,function(a){a in s&&(r[a]=s[a])});var t=function(c){if(c&&(j=b.copy(c)),q){m=a.href(i.state,j,r);var d=h[1]||h[0];return d&&d.$$addStateInfo(i.state,j),null===m?(q=!1,!1):void g.$set(p,m)}};i.paramExpr&&(e.$watch(i.paramExpr,function(a,b){a!==j&&t(a)},!0),j=b.copy(e.$eval(i.paramExpr))),t(),o||f.bind("click",function(b){var d=b.which||b.button;if(!(d>1||b.ctrlKey||b.metaKey||b.shiftKey||f.attr("target"))){var e=c(function(){a.go(i.state,j,r)});b.preventDefault();var g=n&&!m?1:0;b.preventDefault=function(){g--<=0&&c.cancel(e)}}})}}}function E(a,b,c){return{restrict:"A",controller:["$scope","$element","$attrs",function(b,d,e){function f(){g()?d.addClass(i):d.removeClass(i)}function g(){for(var a=0;a<j.length;a++)if(h(j[a].state,j[a].params))return!0;return!1}function h(b,c){return"undefined"!=typeof e.uiSrefActiveEq?a.is(b.name,c):a.includes(b.name,c)}var i,j=[];i=c(e.uiSrefActiveEq||e.uiSrefActive||"",!1)(b),this.$$addStateInfo=function(b,c){var e=a.get(b,C(d));j.push({state:e||{name:b},params:c}),f()},b.$on("$stateChangeSuccess",f)}]}}function F(a){var b=function(b){return a.is(b)};return b.$stateful=!0,b}function G(a){var b=function(b){return a.includes(b)};return b.$stateful=!0,b}var H=b.isDefined,I=b.isFunction,J=b.isString,K=b.isObject,L=b.isArray,M=b.forEach,N=b.extend,O=b.copy;b.module("ui.router.util",["ng"]),b.module("ui.router.router",["ui.router.util"]),b.module("ui.router.state",["ui.router.router","ui.router.util"]),b.module("ui.router",["ui.router.state"]),b.module("ui.router.compat",["ui.router"]),p.$inject=["$q","$injector"],b.module("ui.router.util").service("$resolve",p),q.$inject=["$http","$templateCache","$injector"],b.module("ui.router.util").service("$templateFactory",q);var P;r.prototype.concat=function(a,b){var c={caseInsensitive:P.caseInsensitive(),strict:P.strictMode(),squash:P.defaultSquashPolicy()};return new r(this.sourcePath+a+this.sourceSearch,N(c,b),this)},r.prototype.toString=function(){return this.source},r.prototype.exec=function(a,b){function c(a){function b(a){return a.split("").reverse().join("")}function c(a){return a.replace(/\\-/g,"-")}var d=b(a).split(/-(?!\\)/),e=o(d,b);return o(e,c).reverse()}var d=this.regexp.exec(a);if(!d)return null;b=b||{};var e,f,g,h=this.parameters(),i=h.length,j=this.segments.length-1,k={};if(j!==d.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");for(e=0;j>e;e++){g=h[e];var l=this.params[g],m=d[e+1];for(f=0;f<l.replace;f++)l.replace[f].from===m&&(m=l.replace[f].to);m&&l.array===!0&&(m=c(m)),k[g]=l.value(m)}for(;i>e;e++)g=h[e],k[g]=this.params[g].value(b[g]);return k},r.prototype.parameters=function(a){return H(a)?this.params[a]||null:this.$$paramNames},r.prototype.validates=function(a){return this.params.$$validates(a)},r.prototype.format=function(a){function b(a){return encodeURIComponent(a).replace(/-/g,function(a){return"%5C%"+a.charCodeAt(0).toString(16).toUpperCase()})}a=a||{};var c=this.segments,d=this.parameters(),e=this.params;if(!this.validates(a))return null;var f,g=!1,h=c.length-1,i=d.length,j=c[0];for(f=0;i>f;f++){var k=h>f,l=d[f],m=e[l],n=m.value(a[l]),p=m.isOptional&&m.type.equals(m.value(),n),q=p?m.squash:!1,r=m.type.encode(n);if(k){var s=c[f+1];if(q===!1)null!=r&&(j+=L(r)?o(r,b).join("-"):encodeURIComponent(r)),j+=s;else if(q===!0){var t=j.match(/\/$/)?/\/?(.*)/:/(.*)/;j+=s.match(t)[1]}else J(q)&&(j+=q+s)}else{if(null==r||p&&q!==!1)continue;L(r)||(r=[r]),r=o(r,encodeURIComponent).join("&"+l+"="),j+=(g?"&":"?")+(l+"="+r),g=!0}}return j},s.prototype.is=function(a,b){return!0},s.prototype.encode=function(a,b){return a},s.prototype.decode=function(a,b){return a},s.prototype.equals=function(a,b){return a==b},s.prototype.$subPattern=function(){var a=this.pattern.toString();return a.substr(1,a.length-2)},s.prototype.pattern=/.*/,s.prototype.toString=function(){return"{Type:"+this.name+"}"},s.prototype.$normalize=function(a){return this.is(a)?a:this.decode(a)},s.prototype.$asArray=function(a,b){function d(a,b){function d(a,b){return function(){return a[b].apply(a,arguments)}}function e(a){return L(a)?a:H(a)?[a]:[]}function f(a){switch(a.length){case 0:return c;case 1:return"auto"===b?a[0]:a;default:return a}}function g(a){return!a}function h(a,b){return function(c){c=e(c);var d=o(c,a);return b===!0?0===n(d,g).length:f(d)}}function i(a){return function(b,c){var d=e(b),f=e(c);if(d.length!==f.length)return!1;for(var g=0;g<d.length;g++)if(!a(d[g],f[g]))return!1;return!0}}this.encode=h(d(a,"encode")),this.decode=h(d(a,"decode")),this.is=h(d(a,"is"),!0),this.equals=i(d(a,"equals")),this.pattern=a.pattern,this.$normalize=h(d(a,"$normalize")),this.name=a.name,this.$arrayMode=b}if(!a)return this;if("auto"===a&&!b)throw new Error("'auto' array mode is for query parameters only");return new d(this,a)},b.module("ui.router.util").provider("$urlMatcherFactory",t),b.module("ui.router.util").run(["$urlMatcherFactory",function(a){}]),u.$inject=["$locationProvider","$urlMatcherFactoryProvider"],b.module("ui.router.router").provider("$urlRouter",u),v.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],b.module("ui.router.state").value("$stateParams",{}).provider("$state",v),w.$inject=[],b.module("ui.router.state").provider("$view",w),b.module("ui.router.state").provider("$uiViewScroll",x),y.$inject=["$state","$injector","$uiViewScroll","$interpolate"],z.$inject=["$compile","$controller","$state","$interpolate"],b.module("ui.router.state").directive("uiView",y),b.module("ui.router.state").directive("uiView",z),D.$inject=["$state","$timeout"],E.$inject=["$state","$stateParams","$interpolate"],b.module("ui.router.state").directive("uiSref",D).directive("uiSrefActive",E).directive("uiSrefActiveEq",E),F.$inject=["$state"],G.$inject=["$state"],b.module("ui.router.state").filter("isState",F).filter("includedByState",G)}(window,window.angular);
9 \ No newline at end of file 9 \ No newline at end of file
src/main/resources/static/assets/bower_components/angular-ui-router/src/state.js
@@ -765,7 +765,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) { @@ -765,7 +765,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
765 return null; 765 return null;
766 } 766 }
767 767
768 - // Allow the handler to return a promise to defer state lookup retry 768 + // Allow the handlers to return a promise to defer state lookup retry
769 if (options.$retry) { 769 if (options.$retry) {
770 $urlRouter.update(); 770 $urlRouter.update();
771 return TransitionFailed; 771 return TransitionFailed;
src/main/resources/static/assets/bower_components/angular-ui-router/src/urlRouter.js
@@ -122,14 +122,14 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { @@ -122,14 +122,14 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
122 * @methodOf ui.router.router.$urlRouterProvider 122 * @methodOf ui.router.router.$urlRouterProvider
123 * 123 *
124 * @description 124 * @description
125 - * Registers a handler for a given url matching. if handle is a string, it is 125 + * Registers a handlers for a given url matching. if handle is a string, it is
126 * treated as a redirect, and is interpolated according to the syntax of match 126 * treated as a redirect, and is interpolated according to the syntax of match
127 * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise). 127 * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).
128 * 128 *
129 - * If the handler is a function, it is injectable. It gets invoked if `$location` 129 + * If the handlers is a function, it is injectable. It gets invoked if `$location`
130 * matches. You have the option of inject the match object as `$match`. 130 * matches. You have the option of inject the match object as `$match`.
131 * 131 *
132 - * The handler can return 132 + * The handlers can return
133 * 133 *
134 * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter` 134 * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`
135 * will continue trying to find another one that matches. 135 * will continue trying to find another one that matches.
@@ -158,7 +158,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { @@ -158,7 +158,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
158 if (isString(what)) what = $urlMatcherFactory.compile(what); 158 if (isString(what)) what = $urlMatcherFactory.compile(what);
159 159
160 if (!handlerIsString && !isFunction(handler) && !isArray(handler)) 160 if (!handlerIsString && !isFunction(handler) && !isArray(handler))
161 - throw new Error("invalid 'handler' in when()"); 161 + throw new Error("invalid 'handlers' in when()");
162 162
163 var strategies = { 163 var strategies = {
164 matcher: function (what, handler) { 164 matcher: function (what, handler) {
@@ -207,7 +207,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { @@ -207,7 +207,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
207 * If you wish to customize the behavior of syncing the URL (for example, if you wish to 207 * If you wish to customize the behavior of syncing the URL (for example, if you wish to
208 * defer a transition but maintain the current URL), call this method at configuration time. 208 * defer a transition but maintain the current URL), call this method at configuration time.
209 * Then, at run time, call `$urlRouter.listen()` after you have configured your own 209 * Then, at run time, call `$urlRouter.listen()` after you have configured your own
210 - * `$locationChangeSuccess` event handler. 210 + * `$locationChangeSuccess` event handlers.
211 * 211 *
212 * @example 212 * @example
213 * <pre> 213 * <pre>
@@ -226,7 +226,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) { @@ -226,7 +226,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
226 * // UserService is an example service for managing user state 226 * // UserService is an example service for managing user state
227 * if (UserService.isLoggedIn()) return; 227 * if (UserService.isLoggedIn()) return;
228 * 228 *
229 - * // Prevent $urlRouter's default handler from firing 229 + * // Prevent $urlRouter's default handlers from firing
230 * e.preventDefault(); 230 * e.preventDefault();
231 * 231 *
232 * UserService.handleLogin().then(function() { 232 * UserService.handleLogin().then(function() {
src/main/resources/static/assets/bower_components/angular/angular.js
@@ -3067,7 +3067,7 @@ function jqLiteDocumentLoaded(action, win) { @@ -3067,7 +3067,7 @@ function jqLiteDocumentLoaded(action, win) {
3067 // i.e. it will definitely not be in a $apply 3067 // i.e. it will definitely not be in a $apply
3068 win.setTimeout(action); 3068 win.setTimeout(action);
3069 } else { 3069 } else {
3070 - // No need to unbind this handler as load is only ever called once 3070 + // No need to unbind this handlers as load is only ever called once
3071 jqLite(win).on('load', action); 3071 jqLite(win).on('load', action);
3072 } 3072 }
3073 } 3073 }
@@ -3349,7 +3349,7 @@ function createEventHandler(element, events) { @@ -3349,7 +3349,7 @@ function createEventHandler(element, events) {
3349 return event.immediatePropagationStopped === true; 3349 return event.immediatePropagationStopped === true;
3350 }; 3350 };
3351 3351
3352 - // Some events have special handlers that wrap the real handler 3352 + // Some events have special handlers that wrap the real handlers
3353 var handlerWrapper = eventFns.specialHandlerWrapper || defaultHandlerWrapper; 3353 var handlerWrapper = eventFns.specialHandlerWrapper || defaultHandlerWrapper;
3354 3354
3355 // Copy event handlers in case event handlers array is modified during execution. 3355 // Copy event handlers in case event handlers array is modified during execution.
@@ -3379,7 +3379,7 @@ function specialMouseHandlerWrapper(target, event, handler) { @@ -3379,7 +3379,7 @@ function specialMouseHandlerWrapper(target, event, handler) {
3379 // Read about mouseenter and mouseleave: 3379 // Read about mouseenter and mouseleave:
3380 // http://www.quirksmode.org/js/events_mouse.html#link8 3380 // http://www.quirksmode.org/js/events_mouse.html#link8
3381 var related = event.relatedTarget; 3381 var related = event.relatedTarget;
3382 - // For mousenter/leave call the handler if related is outside the target. 3382 + // For mousenter/leave call the handlers if related is outside the target.
3383 // NB: No relatedTarget if the mouse left/entered the browser window 3383 // NB: No relatedTarget if the mouse left/entered the browser window
3384 if (!related || (related !== target && !jqLiteContains.call(target, related))) { 3384 if (!related || (related !== target && !jqLiteContains.call(target, related))) {
3385 handler.call(target, event); 3385 handler.call(target, event);
@@ -5992,7 +5992,7 @@ function Browser(window, document, $log, $sniffer) { @@ -5992,7 +5992,7 @@ function Browser(window, document, $log, $sniffer) {
5992 5992
5993 /** 5993 /**
5994 * @private 5994 * @private
5995 - * Remove popstate and hashchange handler from window. 5995 + * Remove popstate and hashchange handlers from window.
5996 * 5996 *
5997 * NOTE: this api is intended for use only by $rootScope. 5997 * NOTE: this api is intended for use only by $rootScope.
5998 */ 5998 */
@@ -12581,7 +12581,7 @@ function $LocationProvider() { @@ -12581,7 +12581,7 @@ function $LocationProvider() {
12581 defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl, 12581 defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,
12582 newState, oldState).defaultPrevented; 12582 newState, oldState).defaultPrevented;
12583 12583
12584 - // if the location was changed by a `$locationChangeStart` handler then stop 12584 + // if the location was changed by a `$locationChangeStart` handlers then stop
12585 // processing this location change 12585 // processing this location change
12586 if ($location.absUrl() !== newUrl) return; 12586 if ($location.absUrl() !== newUrl) return;
12587 12587
@@ -12615,7 +12615,7 @@ function $LocationProvider() { @@ -12615,7 +12615,7 @@ function $LocationProvider() {
12615 var defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl, 12615 var defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,
12616 $location.$$state, oldState).defaultPrevented; 12616 $location.$$state, oldState).defaultPrevented;
12617 12617
12618 - // if the location was changed by a `$locationChangeStart` handler then stop 12618 + // if the location was changed by a `$locationChangeStart` handlers then stop
12619 // processing this location change 12619 // processing this location change
12620 if ($location.absUrl() !== newUrl) return; 12620 if ($location.absUrl() !== newUrl) return;
12621 12621
@@ -16308,7 +16308,7 @@ function $RootScopeProvider() { @@ -16308,7 +16308,7 @@ function $RootScopeProvider() {
16308 * unrolling of the loop. 16308 * unrolling of the loop.
16309 * 16309 *
16310 * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope. 16310 * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.
16311 - * Application code can register a `$destroy` event handler that will give it a chance to 16311 + * Application code can register a `$destroy` event handlers that will give it a chance to
16312 * perform any necessary cleanup. 16312 * perform any necessary cleanup.
16313 * 16313 *
16314 * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to 16314 * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to
@@ -20994,7 +20994,7 @@ var formDirectiveFactory = function(isNgForm) { @@ -20994,7 +20994,7 @@ var formDirectiveFactory = function(isNgForm) {
20994 // action is not prevented. see #1238 20994 // action is not prevented. see #1238
20995 // 20995 //
20996 // IE 9 is not affected because it doesn't fire a submit event and try to do a full 20996 // IE 9 is not affected because it doesn't fire a submit event and try to do a full
20997 - // page reload if the form was destroyed by submission of the form via a click handler 20997 + // page reload if the form was destroyed by submission of the form via a click handlers
20998 // on a button in the form. Looks like an IE9 specific bug. 20998 // on a button in the form. Looks like an IE9 specific bug.
20999 var handleFormSubmission = function(event) { 20999 var handleFormSubmission = function(event) {
21000 scope.$apply(function() { 21000 scope.$apply(function() {
@@ -24084,7 +24084,7 @@ forEach( @@ -24084,7 +24084,7 @@ forEach(
24084 compile: function($element, attr) { 24084 compile: function($element, attr) {
24085 // We expose the powerful $event object on the scope that provides access to the Window, 24085 // We expose the powerful $event object on the scope that provides access to the Window,
24086 // etc. that isn't protected by the fast paths in $parse. We explicitly request better 24086 // etc. that isn't protected by the fast paths in $parse. We explicitly request better
24087 - // checks at the cost of speed since event handler expressions are not executed as 24087 + // checks at the cost of speed since event handlers expressions are not executed as
24088 // frequently as regular change detection. 24088 // frequently as regular change detection.
24089 var fn = $parse(attr[directiveName], /* interceptorFn */ null, /* expensiveChecks */ true); 24089 var fn = $parse(attr[directiveName], /* interceptorFn */ null, /* expensiveChecks */ true);
24090 return function ngEventHandler(scope, element) { 24090 return function ngEventHandler(scope, element) {
@@ -25893,7 +25893,7 @@ var NgModelController = [&#39;$scope&#39;, &#39;$exceptionHandler&#39;, &#39;$attrs&#39;, &#39;$element&#39;, &#39;$ @@ -25893,7 +25893,7 @@ var NgModelController = [&#39;$scope&#39;, &#39;$exceptionHandler&#39;, &#39;$attrs&#39;, &#39;$element&#39;, &#39;$
25893 * Update the view value. 25893 * Update the view value.
25894 * 25894 *
25895 * This method should be called when a control wants to change the view value; typically, 25895 * This method should be called when a control wants to change the view value; typically,
25896 - * this is done from within a DOM event handler. For example, the {@link ng.directive:input input} 25896 + * this is done from within a DOM event handlers. For example, the {@link ng.directive:input input}
25897 * directive calls it when the value of the input changes and {@link ng.directive:select select} 25897 * directive calls it when the value of the input changes and {@link ng.directive:select select}
25898 * calls it when an option is selected. 25898 * calls it when an option is selected.
25899 * 25899 *
@@ -26909,7 +26909,7 @@ var ngOptionsDirective = [&#39;$compile&#39;, &#39;$parse&#39;, function($compile, $parse) { @@ -26909,7 +26909,7 @@ var ngOptionsDirective = [&#39;$compile&#39;, &#39;$parse&#39;, function($compile, $parse) {
26909 getWatchables: $parse(valuesFn, function(optionValues) { 26909 getWatchables: $parse(valuesFn, function(optionValues) {
26910 // Create a collection of things that we would like to watch (watchedArray) 26910 // Create a collection of things that we would like to watch (watchedArray)
26911 // so that they can all be watched using a single $watchCollection 26911 // so that they can all be watched using a single $watchCollection
26912 - // that only runs the handler once if anything changes 26912 + // that only runs the handlers once if anything changes
26913 var watchedArray = []; 26913 var watchedArray = [];
26914 optionValues = optionValues || []; 26914 optionValues = optionValues || [];
26915 26915
src/main/resources/static/assets/bower_components/handsontable/dist/handsontable.full.js
@@ -30159,7 +30159,7 @@ if (typeof exports !== &quot;undefined&quot;) { @@ -30159,7 +30159,7 @@ if (typeof exports !== &quot;undefined&quot;) {
30159 return typeof elements.length !== "number" ? [ elements ] : elements; 30159 return typeof elements.length !== "number" ? [ elements ] : elements;
30160 }; 30160 };
30161 /** 30161 /**
30162 - * Add a `mouseover` handler function for a clipped element. 30162 + * Add a `mouseover` handlers function for a clipped element.
30163 * 30163 *
30164 * @returns `undefined` 30164 * @returns `undefined`
30165 * @private 30165 * @private
@@ -30199,7 +30199,7 @@ if (typeof exports !== &quot;undefined&quot;) { @@ -30199,7 +30199,7 @@ if (typeof exports !== &quot;undefined&quot;) {
30199 }; 30199 };
30200 }; 30200 };
30201 /** 30201 /**
30202 - * Remove a `mouseover` handler function for a clipped element. 30202 + * Remove a `mouseover` handlers function for a clipped element.
30203 * 30203 *
30204 * @returns `undefined` 30204 * @returns `undefined`
30205 * @private 30205 * @private
@@ -30240,7 +30240,7 @@ if (typeof exports !== &quot;undefined&quot;) { @@ -30240,7 +30240,7 @@ if (typeof exports !== &quot;undefined&quot;) {
30240 return _clientOn.apply(this, _args(arguments)); 30240 return _clientOn.apply(this, _args(arguments));
30241 }; 30241 };
30242 /** 30242 /**
30243 - * Unregister an event handler from the client. 30243 + * Unregister an event handlers from the client.
30244 * If no `listener` function/object is provided, it will unregister all handlers for the provided `eventType`. 30244 * If no `listener` function/object is provided, it will unregister all handlers for the provided `eventType`.
30245 * If no `eventType` is provided, it will unregister all handlers for every event type. 30245 * If no `eventType` is provided, it will unregister all handlers for every event type.
30246 * 30246 *
src/main/resources/static/assets/bower_components/handsontable/dist/zeroclipboard/ZeroClipboard.js
@@ -2353,7 +2353,7 @@ @@ -2353,7 +2353,7 @@
2353 return typeof elements.length !== "number" ? [ elements ] : elements; 2353 return typeof elements.length !== "number" ? [ elements ] : elements;
2354 }; 2354 };
2355 /** 2355 /**
2356 - * Add a `mouseover` handler function for a clipped element. 2356 + * Add a `mouseover` handlers function for a clipped element.
2357 * 2357 *
2358 * @returns `undefined` 2358 * @returns `undefined`
2359 * @private 2359 * @private
@@ -2393,7 +2393,7 @@ @@ -2393,7 +2393,7 @@
2393 }; 2393 };
2394 }; 2394 };
2395 /** 2395 /**
2396 - * Remove a `mouseover` handler function for a clipped element. 2396 + * Remove a `mouseover` handlers function for a clipped element.
2397 * 2397 *
2398 * @returns `undefined` 2398 * @returns `undefined`
2399 * @private 2399 * @private
@@ -2434,7 +2434,7 @@ @@ -2434,7 +2434,7 @@
2434 return _clientOn.apply(this, _args(arguments)); 2434 return _clientOn.apply(this, _args(arguments));
2435 }; 2435 };
2436 /** 2436 /**
2437 - * Unregister an event handler from the client. 2437 + * Unregister an event handlers from the client.
2438 * If no `listener` function/object is provided, it will unregister all handlers for the provided `eventType`. 2438 * If no `listener` function/object is provided, it will unregister all handlers for the provided `eventType`.
2439 * If no `eventType` is provided, it will unregister all handlers for every event type. 2439 * If no `eventType` is provided, it will unregister all handlers for every event type.
2440 * 2440 *
src/main/resources/static/assets/bower_components/zeroclipboard/dist/ZeroClipboard.js
@@ -2488,7 +2488,7 @@ @@ -2488,7 +2488,7 @@
2488 return typeof elements.length !== "number" ? [ elements ] : elements; 2488 return typeof elements.length !== "number" ? [ elements ] : elements;
2489 }; 2489 };
2490 /** 2490 /**
2491 - * Add a `mouseover` handler function for a clipped element. 2491 + * Add a `mouseover` handlers function for a clipped element.
2492 * 2492 *
2493 * @returns `undefined` 2493 * @returns `undefined`
2494 * @private 2494 * @private
@@ -2528,7 +2528,7 @@ @@ -2528,7 +2528,7 @@
2528 }; 2528 };
2529 }; 2529 };
2530 /** 2530 /**
2531 - * Remove a `mouseover` handler function for a clipped element. 2531 + * Remove a `mouseover` handlers function for a clipped element.
2532 * 2532 *
2533 * @returns `undefined` 2533 * @returns `undefined`
2534 * @private 2534 * @private
@@ -2569,7 +2569,7 @@ @@ -2569,7 +2569,7 @@
2569 return _clientOn.apply(this, _args(arguments)); 2569 return _clientOn.apply(this, _args(arguments));
2570 }; 2570 };
2571 /** 2571 /**
2572 - * Unregister an event handler from the client. 2572 + * Unregister an event handlers from the client.
2573 * If no `listener` function/object is provided, it will unregister all handlers for the provided `eventType`. 2573 * If no `listener` function/object is provided, it will unregister all handlers for the provided `eventType`.
2574 * If no `eventType` is provided, it will unregister all handlers for every event type. 2574 * If no `eventType` is provided, it will unregister all handlers for every event type.
2575 * 2575 *
src/main/resources/static/assets/js/angular.js
@@ -3067,7 +3067,7 @@ function jqLiteDocumentLoaded(action, win) { @@ -3067,7 +3067,7 @@ function jqLiteDocumentLoaded(action, win) {
3067 // i.e. it will definitely not be in a $apply 3067 // i.e. it will definitely not be in a $apply
3068 win.setTimeout(action); 3068 win.setTimeout(action);
3069 } else { 3069 } else {
3070 - // No need to unbind this handler as load is only ever called once 3070 + // No need to unbind this handlers as load is only ever called once
3071 jqLite(win).on('load', action); 3071 jqLite(win).on('load', action);
3072 } 3072 }
3073 } 3073 }
@@ -3349,7 +3349,7 @@ function createEventHandler(element, events) { @@ -3349,7 +3349,7 @@ function createEventHandler(element, events) {
3349 return event.immediatePropagationStopped === true; 3349 return event.immediatePropagationStopped === true;
3350 }; 3350 };
3351 3351
3352 - // Some events have special handlers that wrap the real handler 3352 + // Some events have special handlers that wrap the real handlers
3353 var handlerWrapper = eventFns.specialHandlerWrapper || defaultHandlerWrapper; 3353 var handlerWrapper = eventFns.specialHandlerWrapper || defaultHandlerWrapper;
3354 3354
3355 // Copy event handlers in case event handlers array is modified during execution. 3355 // Copy event handlers in case event handlers array is modified during execution.
@@ -3379,7 +3379,7 @@ function specialMouseHandlerWrapper(target, event, handler) { @@ -3379,7 +3379,7 @@ function specialMouseHandlerWrapper(target, event, handler) {
3379 // Read about mouseenter and mouseleave: 3379 // Read about mouseenter and mouseleave:
3380 // http://www.quirksmode.org/js/events_mouse.html#link8 3380 // http://www.quirksmode.org/js/events_mouse.html#link8
3381 var related = event.relatedTarget; 3381 var related = event.relatedTarget;
3382 - // For mousenter/leave call the handler if related is outside the target. 3382 + // For mousenter/leave call the handlers if related is outside the target.
3383 // NB: No relatedTarget if the mouse left/entered the browser window 3383 // NB: No relatedTarget if the mouse left/entered the browser window
3384 if (!related || (related !== target && !jqLiteContains.call(target, related))) { 3384 if (!related || (related !== target && !jqLiteContains.call(target, related))) {
3385 handler.call(target, event); 3385 handler.call(target, event);
@@ -5992,7 +5992,7 @@ function Browser(window, document, $log, $sniffer) { @@ -5992,7 +5992,7 @@ function Browser(window, document, $log, $sniffer) {
5992 5992
5993 /** 5993 /**
5994 * @private 5994 * @private
5995 - * Remove popstate and hashchange handler from window. 5995 + * Remove popstate and hashchange handlers from window.
5996 * 5996 *
5997 * NOTE: this api is intended for use only by $rootScope. 5997 * NOTE: this api is intended for use only by $rootScope.
5998 */ 5998 */
@@ -12581,7 +12581,7 @@ function $LocationProvider() { @@ -12581,7 +12581,7 @@ function $LocationProvider() {
12581 defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl, 12581 defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,
12582 newState, oldState).defaultPrevented; 12582 newState, oldState).defaultPrevented;
12583 12583
12584 - // if the location was changed by a `$locationChangeStart` handler then stop 12584 + // if the location was changed by a `$locationChangeStart` handlers then stop
12585 // processing this location change 12585 // processing this location change
12586 if ($location.absUrl() !== newUrl) return; 12586 if ($location.absUrl() !== newUrl) return;
12587 12587
@@ -12615,7 +12615,7 @@ function $LocationProvider() { @@ -12615,7 +12615,7 @@ function $LocationProvider() {
12615 var defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl, 12615 var defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,
12616 $location.$$state, oldState).defaultPrevented; 12616 $location.$$state, oldState).defaultPrevented;
12617 12617
12618 - // if the location was changed by a `$locationChangeStart` handler then stop 12618 + // if the location was changed by a `$locationChangeStart` handlers then stop
12619 // processing this location change 12619 // processing this location change
12620 if ($location.absUrl() !== newUrl) return; 12620 if ($location.absUrl() !== newUrl) return;
12621 12621
@@ -16308,7 +16308,7 @@ function $RootScopeProvider() { @@ -16308,7 +16308,7 @@ function $RootScopeProvider() {
16308 * unrolling of the loop. 16308 * unrolling of the loop.
16309 * 16309 *
16310 * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope. 16310 * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.
16311 - * Application code can register a `$destroy` event handler that will give it a chance to 16311 + * Application code can register a `$destroy` event handlers that will give it a chance to
16312 * perform any necessary cleanup. 16312 * perform any necessary cleanup.
16313 * 16313 *
16314 * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to 16314 * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to
@@ -20994,7 +20994,7 @@ var formDirectiveFactory = function(isNgForm) { @@ -20994,7 +20994,7 @@ var formDirectiveFactory = function(isNgForm) {
20994 // action is not prevented. see #1238 20994 // action is not prevented. see #1238
20995 // 20995 //
20996 // IE 9 is not affected because it doesn't fire a submit event and try to do a full 20996 // IE 9 is not affected because it doesn't fire a submit event and try to do a full
20997 - // page reload if the form was destroyed by submission of the form via a click handler 20997 + // page reload if the form was destroyed by submission of the form via a click handlers
20998 // on a button in the form. Looks like an IE9 specific bug. 20998 // on a button in the form. Looks like an IE9 specific bug.
20999 var handleFormSubmission = function(event) { 20999 var handleFormSubmission = function(event) {
21000 scope.$apply(function() { 21000 scope.$apply(function() {
@@ -24084,7 +24084,7 @@ forEach( @@ -24084,7 +24084,7 @@ forEach(
24084 compile: function($element, attr) { 24084 compile: function($element, attr) {
24085 // We expose the powerful $event object on the scope that provides access to the Window, 24085 // We expose the powerful $event object on the scope that provides access to the Window,
24086 // etc. that isn't protected by the fast paths in $parse. We explicitly request better 24086 // etc. that isn't protected by the fast paths in $parse. We explicitly request better
24087 - // checks at the cost of speed since event handler expressions are not executed as 24087 + // checks at the cost of speed since event handlers expressions are not executed as
24088 // frequently as regular change detection. 24088 // frequently as regular change detection.
24089 var fn = $parse(attr[directiveName], /* interceptorFn */ null, /* expensiveChecks */ true); 24089 var fn = $parse(attr[directiveName], /* interceptorFn */ null, /* expensiveChecks */ true);
24090 return function ngEventHandler(scope, element) { 24090 return function ngEventHandler(scope, element) {
@@ -25893,7 +25893,7 @@ var NgModelController = [&#39;$scope&#39;, &#39;$exceptionHandler&#39;, &#39;$attrs&#39;, &#39;$element&#39;, &#39;$ @@ -25893,7 +25893,7 @@ var NgModelController = [&#39;$scope&#39;, &#39;$exceptionHandler&#39;, &#39;$attrs&#39;, &#39;$element&#39;, &#39;$
25893 * Update the view value. 25893 * Update the view value.
25894 * 25894 *
25895 * This method should be called when a control wants to change the view value; typically, 25895 * This method should be called when a control wants to change the view value; typically,
25896 - * this is done from within a DOM event handler. For example, the {@link ng.directive:input input} 25896 + * this is done from within a DOM event handlers. For example, the {@link ng.directive:input input}
25897 * directive calls it when the value of the input changes and {@link ng.directive:select select} 25897 * directive calls it when the value of the input changes and {@link ng.directive:select select}
25898 * calls it when an option is selected. 25898 * calls it when an option is selected.
25899 * 25899 *
@@ -26909,7 +26909,7 @@ var ngOptionsDirective = [&#39;$compile&#39;, &#39;$parse&#39;, function($compile, $parse) { @@ -26909,7 +26909,7 @@ var ngOptionsDirective = [&#39;$compile&#39;, &#39;$parse&#39;, function($compile, $parse) {
26909 getWatchables: $parse(valuesFn, function(optionValues) { 26909 getWatchables: $parse(valuesFn, function(optionValues) {
26910 // Create a collection of things that we would like to watch (watchedArray) 26910 // Create a collection of things that we would like to watch (watchedArray)
26911 // so that they can all be watched using a single $watchCollection 26911 // so that they can all be watched using a single $watchCollection
26912 - // that only runs the handler once if anything changes 26912 + // that only runs the handlers once if anything changes
26913 var watchedArray = []; 26913 var watchedArray = [];
26914 optionValues = optionValues || []; 26914 optionValues = optionValues || [];
26915 26915
src/main/resources/static/assets/js/baidu/TextIconOverlay.js
@@ -15,11 +15,11 @@ var BMapLib = window.BMapLib = BMapLib || {}; @@ -15,11 +15,11 @@ var BMapLib = window.BMapLib = BMapLib || {};
15 15
16 (function () { 16 (function () {
17 17
18 - /**  
19 - * 声明baidu包  
20 - */ 18 + /**
  19 + * 声明baidu包
  20 + */
21 var T, 21 var T,
22 - baidu = T = baidu || {version: "1.3.8"}; 22 + baidu = T = baidu || {version: "1.3.8"};
23 23
24 (function (){ 24 (function (){
25 //提出guid,防止在与老版本Tangram混用时 25 //提出guid,防止在与老版本Tangram混用时
@@ -34,8 +34,8 @@ var BMapLib = window.BMapLib = BMapLib || {}; @@ -34,8 +34,8 @@ var BMapLib = window.BMapLib = BMapLib || {};
34 * @ignore 34 * @ignore
35 * @namespace baidu.dom 操作dom的方法。 35 * @namespace baidu.dom 操作dom的方法。
36 */ 36 */
37 - baidu.dom = baidu.dom || {};  
38 - 37 + baidu.dom = baidu.dom || {};
  38 +
39 39
40 /** 40 /**
41 * 从文档中获取指定的DOM元素 41 * 从文档中获取指定的DOM元素
@@ -581,7 +581,7 @@ var BMapLib = window.BMapLib = BMapLib || {}; @@ -581,7 +581,7 @@ var BMapLib = window.BMapLib = BMapLib || {};
581 581
582 /** 582 /**
583 * 注册对象的事件监听器。引入baidu.lang.Event后,Class的子类实例才会获得该方法。 583 * 注册对象的事件监听器。引入baidu.lang.Event后,Class的子类实例才会获得该方法。
584 - * @grammar obj.addEventListener(type, handler[, key]) 584 + * @grammar obj.addEventListener(type, handlers[, key])
585 * @param {string} type 自定义事件的名称 585 * @param {string} type 自定义事件的名称
586 * @param {Function} handler 自定义事件被触发时应该调用的回调函数 586 * @param {Function} handler 自定义事件被触发时应该调用的回调函数
587 * @param {string} [key] 为事件监听函数指定的名称,可在移除时使用。如果不提供,方法会默认为它生成一个全局唯一的key。 587 * @param {string} [key] 为事件监听函数指定的名称,可在移除时使用。如果不提供,方法会默认为它生成一个全局唯一的key。
@@ -613,7 +613,7 @@ var BMapLib = window.BMapLib = BMapLib || {}; @@ -613,7 +613,7 @@ var BMapLib = window.BMapLib = BMapLib || {};
613 613
614 /** 614 /**
615 * 移除对象的事件监听器。引入baidu.lang.Event后,Class的子类实例才会获得该方法。 615 * 移除对象的事件监听器。引入baidu.lang.Event后,Class的子类实例才会获得该方法。
616 - * @grammar obj.removeEventListener(type, handler) 616 + * @grammar obj.removeEventListener(type, handlers)
617 * @param {string} type 事件类型 617 * @param {string} type 事件类型
618 * @param {Function|string} handler 要移除的事件监听函数或者监听函数的key 618 * @param {Function|string} handler 要移除的事件监听函数或者监听函数的key
619 * @remark 如果第二个参数handler没有被绑定到对应的自定义事件中,什么也不做。 619 * @remark 如果第二个参数handler没有被绑定到对应的自定义事件中,什么也不做。
@@ -704,23 +704,23 @@ var BMapLib = window.BMapLib = BMapLib || {}; @@ -704,23 +704,23 @@ var BMapLib = window.BMapLib = BMapLib || {};
704 baidu.inherits = baidu.lang.inherits; 704 baidu.inherits = baidu.lang.inherits;
705 })(); 705 })();
706 706
707 -  
708 - /** 707 +
  708 + /**
709 709
710 - * 图片的路径 710 + * 图片的路径
711 711
712 * @private 712 * @private
713 - * @type {String} 713 + * @type {String}
714 714
715 */ 715 */
716 var _IMAGE_PATH = 'http://api.map.baidu.com/library/TextIconOverlay/1.2/src/images/m'; 716 var _IMAGE_PATH = 'http://api.map.baidu.com/library/TextIconOverlay/1.2/src/images/m';
717 717
718 - /** 718 + /**
719 719
720 - * 图片的后缀名 720 + * 图片的后缀名
721 721
722 * @private 722 * @private
723 - * @type {String} 723 + * @type {String}
724 724
725 */ 725 */
726 var _IMAGE_EXTENSION = 'png'; 726 var _IMAGE_EXTENSION = 'png';
@@ -930,72 +930,72 @@ var BMapLib = window.BMapLib = BMapLib || {}; @@ -930,72 +930,72 @@ var BMapLib = window.BMapLib = BMapLib || {};
930 }; 930 };
931 931
932 932
933 - /** 933 + /**
934 934
935 - * 当鼠标点击该覆盖物时会触发该事件 935 + * 当鼠标点击该覆盖物时会触发该事件
936 936
937 - * @name TextIconOverlay#click 937 + * @name TextIconOverlay#click
938 938
939 - * @event 939 + * @event
940 940
941 - * @param {Event Object} e 回调函数会返回event参数,包括以下返回值: 941 + * @param {Event Object} e 回调函数会返回event参数,包括以下返回值:
942 942
943 - * <br />"<b>type</b> : {String} 事件类型 943 + * <br />"<b>type</b> : {String} 事件类型
944 944
945 - * <br />"<b>target</b>:{BMapLib.TextIconOverlay} 事件目标 945 + * <br />"<b>target</b>:{BMapLib.TextIconOverlay} 事件目标
946 946
947 - * 947 + *
948 948
949 */ 949 */
950 950
951 - /** 951 + /**
952 952
953 - * 当鼠标进入该覆盖物区域时会触发该事件 953 + * 当鼠标进入该覆盖物区域时会触发该事件
954 954
955 - * @name TextIconOverlay#mouseover 955 + * @name TextIconOverlay#mouseover
956 956
957 * @event 957 * @event
958 - * @param {Event Object} e 回调函数会返回event参数,包括以下返回值: 958 + * @param {Event Object} e 回调函数会返回event参数,包括以下返回值:
959 959
960 - * <br />"<b>type</b> : {String} 事件类型 960 + * <br />"<b>type</b> : {String} 事件类型
961 961
962 - * <br />"<b>target</b>:{BMapLib.TextIconOverlay} 事件目标 962 + * <br />"<b>target</b>:{BMapLib.TextIconOverlay} 事件目标
963 963
964 - * <br />"<b>point</b> : {BMap.Point} 最新添加上的节点BMap.Point对象 964 + * <br />"<b>point</b> : {BMap.Point} 最新添加上的节点BMap.Point对象
965 965
966 - * <br />"<b>pixel</b>:{BMap.pixel} 最新添加上的节点BMap.Pixel对象 966 + * <br />"<b>pixel</b>:{BMap.pixel} 最新添加上的节点BMap.Pixel对象
967 967
968 - * 968 + *
969 969
970 - * @example <b>参考示例:</b><br /> 970 + * @example <b>参考示例:</b><br />
971 971
972 - * myTextIconOverlay.addEventListener("mouseover", function(e) { alert(e.point); }); 972 + * myTextIconOverlay.addEventListener("mouseover", function(e) { alert(e.point); });
973 973
974 */ 974 */
975 975
976 - /** 976 + /**
977 977
978 - * 当鼠标离开该覆盖物区域时会触发该事件 978 + * 当鼠标离开该覆盖物区域时会触发该事件
979 979
980 - * @name TextIconOverlay#mouseout 980 + * @name TextIconOverlay#mouseout
981 981
982 - * @event 982 + * @event
983 983
984 - * @param {Event Object} e 回调函数会返回event参数,包括以下返回值: 984 + * @param {Event Object} e 回调函数会返回event参数,包括以下返回值:
985 985
986 - * <br />"<b>type</b> : {String} 事件类型 986 + * <br />"<b>type</b> : {String} 事件类型
987 987
988 - * <br />"<b>target</b>:{BMapLib.TextIconOverlay} 事件目标 988 + * <br />"<b>target</b>:{BMapLib.TextIconOverlay} 事件目标
989 989
990 - * <br />"<b>point</b> : {BMap.Point} 最新添加上的节点BMap.Point对象 990 + * <br />"<b>point</b> : {BMap.Point} 最新添加上的节点BMap.Point对象
991 991
992 - * <br />"<b>pixel</b>:{BMap.pixel} 最新添加上的节点BMap.Pixel对象 992 + * <br />"<b>pixel</b>:{BMap.pixel} 最新添加上的节点BMap.Pixel对象
993 993
994 - * 994 + *
995 995
996 - * @example <b>参考示例:</b><br /> 996 + * @example <b>参考示例:</b><br />
997 997
998 - * myTextIconOverlay.addEventListener("mouseout", function(e) { alert(e.point); }); 998 + * myTextIconOverlay.addEventListener("mouseout", function(e) { alert(e.point); });
999 999
1000 */ 1000 */
1001 1001
src/main/resources/static/assets/js/eventproxy.js
@@ -326,7 +326,7 @@ @@ -326,7 +326,7 @@
326 EventProxy.prototype.assign = EventProxy.prototype.all; 326 EventProxy.prototype.assign = EventProxy.prototype.all;
327 327
328 /** 328 /**
329 - * Assign the only one 'error' event handler. 329 + * Assign the only one 'error' event handlers.
330 * @param {Function(err)} callback 330 * @param {Function(err)} callback
331 */ 331 */
332 EventProxy.prototype.fail = function (callback) { 332 EventProxy.prototype.fail = function (callback) {
@@ -334,7 +334,7 @@ @@ -334,7 +334,7 @@
334 334
335 that.once('error', function () { 335 that.once('error', function () {
336 that.unbind(); 336 that.unbind();
337 - // put all arguments to the error handler 337 + // put all arguments to the error handlers
338 // fail(function(err, args1, args2, ...){}) 338 // fail(function(err, args1, args2, ...){})
339 callback.apply(null, arguments); 339 callback.apply(null, arguments);
340 }); 340 });
@@ -444,7 +444,7 @@ @@ -444,7 +444,7 @@
444 that._after[group].index++; 444 that._after[group].index++;
445 return function (err, data) { 445 return function (err, data) {
446 if (err) { 446 if (err) {
447 - // put all arguments to the error handler 447 + // put all arguments to the error handlers
448 return that.emit.apply(that, ['error'].concat(SLICE.call(arguments))); 448 return that.emit.apply(that, ['error'].concat(SLICE.call(arguments)));
449 } 449 }
450 that.emit(group, { 450 that.emit(group, {
@@ -499,7 +499,7 @@ @@ -499,7 +499,7 @@
499 }; 499 };
500 500
501 /** 501 /**
502 - * Success callback wrapper, will handler err for you. 502 + * Success callback wrapper, will handlers err for you.
503 * 503 *
504 * ```js 504 * ```js
505 * fs.readFile('foo.txt', ep.done('content')); 505 * fs.readFile('foo.txt', ep.done('content'));
@@ -535,7 +535,7 @@ @@ -535,7 +535,7 @@
535 var that = this; 535 var that = this;
536 return function (err, data) { 536 return function (err, data) {
537 if (err) { 537 if (err) {
538 - // put all arguments to the error handler 538 + // put all arguments to the error handlers
539 return that.emit.apply(that, ['error'].concat(SLICE.call(arguments))); 539 return that.emit.apply(that, ['error'].concat(SLICE.call(arguments)));
540 } 540 }
541 541
@@ -552,7 +552,7 @@ @@ -552,7 +552,7 @@
552 // only replace the args when it really return a result 552 // only replace the args when it really return a result
553 return that.emit(handler, callback.apply(null, args)); 553 return that.emit(handler, callback.apply(null, args));
554 } else { 554 } else {
555 - // put all arguments to the done handler 555 + // put all arguments to the done handlers
556 //ep.done('some'); 556 //ep.done('some');
557 //ep.on('some', function(args1, args2, ...){}); 557 //ep.on('some', function(args1, args2, ...){});
558 return that.emit.apply(that, [handler].concat(args)); 558 return that.emit.apply(that, [handler].concat(args));
src/main/resources/static/assets/plugins/jquery.pjax.js
@@ -39,7 +39,7 @@ function fnPjax(selector, container, options) { @@ -39,7 +39,7 @@ function fnPjax(selector, container, options) {
39 }) 39 })
40 } 40 }
41 41
42 -// Public: pjax on click handler 42 +// Public: pjax on click handlers
43 // 43 //
44 // Exported as $.pjax.click. 44 // Exported as $.pjax.click.
45 // 45 //
@@ -100,7 +100,7 @@ function handleClick(event, container, options) { @@ -100,7 +100,7 @@ function handleClick(event, container, options) {
100 } 100 }
101 } 101 }
102 102
103 -// Public: pjax on form submit handler 103 +// Public: pjax on form submit handlers
104 // 104 //
105 // Exported as $.pjax.submit 105 // Exported as $.pjax.submit
106 // 106 //
@@ -422,7 +422,7 @@ if (&#39;state&#39; in window.history) { @@ -422,7 +422,7 @@ if (&#39;state&#39; in window.history) {
422 initialPop = false 422 initialPop = false
423 } 423 }
424 424
425 -// popstate handler takes care of the back and forward buttons 425 +// popstate handlers takes care of the back and forward buttons
426 // 426 //
427 // You probably shouldn't use pjax on pages with other pushState 427 // You probably shouldn't use pjax on pages with other pushState
428 // stuff yet. 428 // stuff yet.
src/main/resources/static/metronic_v4.5.4/layout4/scripts/demo.js
@@ -89,7 +89,7 @@ var Demo = function () { @@ -89,7 +89,7 @@ var Demo = function () {
89 } 89 }
90 90
91 if (lastSelectedLayout != layoutOption) { 91 if (lastSelectedLayout != layoutOption) {
92 - //layout changed, run responsive handler: 92 + //layout changed, run responsive handlers:
93 App.runResizeHandlers(); 93 App.runResizeHandlers();
94 } 94 }
95 lastSelectedLayout = layoutOption; 95 lastSelectedLayout = layoutOption;
src/main/resources/static/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.js
@@ -94,7 +94,7 @@ Editableform is linked with one of input types, e.g. &#39;text&#39;, &#39;select&#39; etc. @@ -94,7 +94,7 @@ Editableform is linked with one of input types, e.g. &#39;text&#39;, &#39;select&#39; etc.
94 this.input.autosubmit(); 94 this.input.autosubmit();
95 } 95 }
96 96
97 - //attach 'cancel' handler 97 + //attach 'cancel' handlers
98 this.$form.find('.editable-cancel').click($.proxy(this.cancel, this)); 98 this.$form.find('.editable-cancel').click($.proxy(this.cancel, this));
99 99
100 if(this.input.error) { 100 if(this.input.error) {
@@ -109,7 +109,7 @@ Editableform is linked with one of input types, e.g. &#39;text&#39;, &#39;select&#39; etc. @@ -109,7 +109,7 @@ Editableform is linked with one of input types, e.g. &#39;text&#39;, &#39;select&#39; etc.
109 this.$form.find('.editable-submit').removeAttr('disabled'); 109 this.$form.find('.editable-submit').removeAttr('disabled');
110 var value = (this.value === null || this.value === undefined || this.value === '') ? this.options.defaultValue : this.value; 110 var value = (this.value === null || this.value === undefined || this.value === '') ? this.options.defaultValue : this.value;
111 this.input.value2input(value); 111 this.input.value2input(value);
112 - //attach submit handler 112 + //attach submit handlers
113 this.$form.submit($.proxy(this.submit, this)); 113 this.$form.submit($.proxy(this.submit, this));
114 } 114 }
115 115
@@ -917,7 +917,7 @@ Applied as jQuery method. @@ -917,7 +917,7 @@ Applied as jQuery method.
917 this.destroy(); 917 this.destroy();
918 }, this)); 918 }, this));
919 919
920 - //attach document handler to close containers on click / escape 920 + //attach document handlers to close containers on click / escape
921 if(!$(document).data('editable-handlers-attached')) { 921 if(!$(document).data('editable-handlers-attached')) {
922 //close all on escape 922 //close all on escape
923 $(document).on('keyup.editable', function (e) { 923 $(document).on('keyup.editable', function (e) {
@@ -1509,7 +1509,7 @@ Makes editable any HTML element on the page. Applied as jQuery method. @@ -1509,7 +1509,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
1509 this.$element.addClass('editable-pre-wrapped'); 1509 this.$element.addClass('editable-pre-wrapped');
1510 } 1510 }
1511 1511
1512 - //attach handler activating editable. In disabled mode it just prevent default action (useful for links) 1512 + //attach handlers activating editable. In disabled mode it just prevent default action (useful for links)
1513 if(this.options.toggle !== 'manual') { 1513 if(this.options.toggle !== 'manual') {
1514 this.$element.addClass('editable-click'); 1514 this.$element.addClass('editable-click');
1515 this.$element.on(this.options.toggle + '.editable', $.proxy(function(e){ 1515 this.$element.on(this.options.toggle + '.editable', $.proxy(function(e){
@@ -1518,7 +1518,7 @@ Makes editable any HTML element on the page. Applied as jQuery method. @@ -1518,7 +1518,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
1518 e.preventDefault(); 1518 e.preventDefault();
1519 } 1519 }
1520 1520
1521 - //stop propagation not required because in document click handler it checks event target 1521 + //stop propagation not required because in document click handlers it checks event target
1522 //e.stopPropagation(); 1522 //e.stopPropagation();
1523 1523
1524 if(this.options.toggle === 'mouseenter') { 1524 if(this.options.toggle === 'mouseenter') {
@@ -2103,7 +2103,7 @@ Makes editable any HTML element on the page. Applied as jQuery method. @@ -2103,7 +2103,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
2103 /** 2103 /**
2104 How to toggle editable. Can be <code>click|dblclick|mouseenter|manual</code>. 2104 How to toggle editable. Can be <code>click|dblclick|mouseenter|manual</code>.
2105 When set to <code>manual</code> you should manually call <code>show/hide</code> methods of editable. 2105 When set to <code>manual</code> you should manually call <code>show/hide</code> methods of editable.
2106 - **Note**: if you call <code>show</code> or <code>toggle</code> inside **click** handler of some DOM element, 2106 + **Note**: if you call <code>show</code> or <code>toggle</code> inside **click** handlers of some DOM element,
2107 you need to apply <code>e.stopPropagation()</code> because containers are being closed on any click on document. 2107 you need to apply <code>e.stopPropagation()</code> because containers are being closed on any click on document.
2108 2108
2109 @example 2109 @example
@@ -2402,7 +2402,7 @@ To create your own input you can inherit from this class. @@ -2402,7 +2402,7 @@ To create your own input you can inherit from this class.
2402 }, 2402 },
2403 2403
2404 /** 2404 /**
2405 - attach handler to automatically submit form when value changed (useful when buttons not shown) 2405 + attach handlers to automatically submit form when value changed (useful when buttons not shown)
2406 **/ 2406 **/
2407 autosubmit: function() { 2407 autosubmit: function() {
2408 2408
src/main/resources/static/metronic_v4.5.4/plugins/bootstrap-editable/inputs-ext/address/address.js
@@ -144,7 +144,7 @@ $(function(){ @@ -144,7 +144,7 @@ $(function(){
144 }, 144 },
145 145
146 /** 146 /**
147 - Attaches handler to submit form in case of 'showbuttons=false' mode 147 + Attaches handlers to submit form in case of 'showbuttons=false' mode
148 148
149 @method autosubmit() 149 @method autosubmit()
150 **/ 150 **/
src/main/resources/static/metronic_v4.5.4/plugins/bootstrap-editable/inputs-ext/wysihtml5/bootstrap-wysihtml5-0.0.2/wysihtml5-0.3.0.js
@@ -8056,7 +8056,7 @@ wysihtml5.views.View = Base.extend( @@ -8056,7 +8056,7 @@ wysihtml5.views.View = Base.extend(
8056 this.element.innerHTML = this.textarea.getValue(true); 8056 this.element.innerHTML = this.textarea.getValue(true);
8057 this.enable(); 8057 this.enable();
8058 8058
8059 - // Make sure our selection handler is ready 8059 + // Make sure our selection handlers is ready
8060 this.selection = new wysihtml5.Selection(this.parent); 8060 this.selection = new wysihtml5.Selection(this.parent);
8061 8061
8062 // Make sure commands dispatcher is ready 8062 // Make sure commands dispatcher is ready
@@ -8469,7 +8469,7 @@ wysihtml5.views.View = Base.extend( @@ -8469,7 +8469,7 @@ wysihtml5.views.View = Base.extend(
8469 dom.observe(focusBlurElement, "focus", function() { 8469 dom.observe(focusBlurElement, "focus", function() {
8470 that.parent.fire("focus").fire("focus:composer"); 8470 that.parent.fire("focus").fire("focus:composer");
8471 8471
8472 - // Delay storing of state until all focus handler are fired 8472 + // Delay storing of state until all focus handlers are fired
8473 // especially the one which resets the placeholder 8473 // especially the one which resets the placeholder
8474 setTimeout(function() { state = that.getValue(); }, 0); 8474 setTimeout(function() { state = that.getValue(); }, 0);
8475 }); 8475 });
src/main/resources/static/metronic_v4.5.4/plugins/jquery-validation/js/jquery.validate.js
@@ -536,7 +536,7 @@ $.extend( $.validator, { @@ -536,7 +536,7 @@ $.extend( $.validator, {
536 $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || []) 536 $( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [])
537 .filter( ":visible" ) 537 .filter( ":visible" )
538 .focus() 538 .focus()
539 - // manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find 539 + // manually trigger focusin event; without it, focusin handlers isn't called, findLastActive won't have anything to find
540 .trigger( "focusin" ); 540 .trigger( "focusin" );
541 } catch ( e ) { 541 } catch ( e ) {
542 // ignore IE throwing errors when focusing hidden elements 542 // ignore IE throwing errors when focusing hidden elements
src/main/resources/static/metronic_v4.5.4/plugins/jstree/dist/jstree.js
@@ -4945,7 +4945,7 @@ @@ -4945,7 +4945,7 @@
4945 if(this.settings.checkbox.cascade.indexOf('up') !== -1) { 4945 if(this.settings.checkbox.cascade.indexOf('up') !== -1) {
4946 this.element 4946 this.element
4947 .on('delete_node.jstree', $.proxy(function (e, data) { 4947 .on('delete_node.jstree', $.proxy(function (e, data) {
4948 - // apply up (whole handler) 4948 + // apply up (whole handlers)
4949 var p = this.get_node(data.parent), 4949 var p = this.get_node(data.parent),
4950 m = this._model.data, 4950 m = this._model.data,
4951 i, j, c, tmp, t = this.settings.checkbox.tie_selection; 4951 i, j, c, tmp, t = this.settings.checkbox.tie_selection;
@@ -4969,7 +4969,7 @@ @@ -4969,7 +4969,7 @@
4969 } 4969 }
4970 }, this)) 4970 }, this))
4971 .on('move_node.jstree', $.proxy(function (e, data) { 4971 .on('move_node.jstree', $.proxy(function (e, data) {
4972 - // apply up (whole handler) 4972 + // apply up (whole handlers)
4973 var is_multi = data.is_multi, 4973 var is_multi = data.is_multi,
4974 old_par = data.old_parent, 4974 old_par = data.old_parent,
4975 new_par = this.get_node(data.parent), 4975 new_par = this.get_node(data.parent),
src/main/resources/static/metronic_v4.5.4/plugins/select2/js/select2.full.js
@@ -392,7 +392,7 @@ var requirejs, require, define; @@ -392,7 +392,7 @@ var requirejs, require, define;
392 //Support require(['a']) 392 //Support require(['a'])
393 callback = callback || function () {}; 393 callback = callback || function () {};
394 394
395 - //If relName is a function, it is an errback handler, 395 + //If relName is a function, it is an errback handlers,
396 //so remove it. 396 //so remove it.
397 if (typeof relName === 'function') { 397 if (typeof relName === 'function') {
398 relName = forceSync; 398 relName = forceSync;
src/main/resources/static/metronic_v4.5.4/plugins/select2/js/select2.js
@@ -392,7 +392,7 @@ var requirejs, require, define; @@ -392,7 +392,7 @@ var requirejs, require, define;
392 //Support require(['a']) 392 //Support require(['a'])
393 callback = callback || function () {}; 393 callback = callback || function () {};
394 394
395 - //If relName is a function, it is an errback handler, 395 + //If relName is a function, it is an errback handlers,
396 //so remove it. 396 //so remove it.
397 if (typeof relName === 'function') { 397 if (typeof relName === 'function') {
398 relName = forceSync; 398 relName = forceSync;
src/main/resources/static/real_control_v2/assets/echarts-3/echarts.js
No preview for this file type
src/main/resources/static/real_control_v2/css/line_schedule.css
@@ -976,19 +976,19 @@ dd.fcsjActualCell.tl-yzx div.last-sch-sunken span._badge { @@ -976,19 +976,19 @@ dd.fcsjActualCell.tl-yzx div.last-sch-sunken span._badge {
976 } 976 }
977 977
978 dd.fcsjActualCell div.last-sch-sunken span._badge{ 978 dd.fcsjActualCell div.last-sch-sunken span._badge{
979 - font-size: 12px;  
980 - border-radius: 0 7px 7px 0; 979 + font-size: 13px;
  980 + border-radius: 0 9px 9px 0;
981 padding-left: 0; 981 padding-left: 0;
982 - width: 79px; 982 + width: 81px;
983 display: inline-block; 983 display: inline-block;
984 - height: 22px;  
985 - line-height: 22px; 984 + height: 23px;
  985 + line-height: 23px;
986 box-shadow: 2px 0px 2px 0 rgba(0,0,0,0.16), 2px 0px 4px 0 rgba(0,0,0,0.12); 986 box-shadow: 2px 0px 2px 0 rgba(0,0,0,0.16), 2px 0px 4px 0 rgba(0,0,0,0.12);
987 vertical-align: top; 987 vertical-align: top;
988 margin-right: 3px; 988 margin-right: 3px;
989 margin-top: 1px; 989 margin-top: 1px;
990 margin-left: -7px; 990 margin-left: -7px;
991 - /*text-indent: 2px;*/ 991 + /* text-indent: 2px; */
992 border-left: 0; 992 border-left: 0;
993 /* transform: scale(.9); */ 993 /* transform: scale(.9); */
994 color: grey; 994 color: grey;