Browse Source

Server Date, Amount mismatch and Unique Id duplicate entry refund, unpkg source moved to local

master
kanimozhi 2 years ago
parent
commit
50e6b8813e
  1. 4
      pom.xml
  2. 2
      src/main/java/com/gcc/communityHall/configuration/WebSocketConfig.java
  3. 1
      src/main/java/com/gcc/communityHall/controller/CounterController.java
  4. 4
      src/main/java/com/gcc/communityHall/controller/UserAPIController.java
  5. 6
      src/main/java/com/gcc/communityHall/controller/UserController.java
  6. 26
      src/main/java/com/gcc/communityHall/entity/BookingCalendar.java
  7. 35
      src/main/java/com/gcc/communityHall/paymentService/controller/PaymentController.java
  8. 18
      src/main/java/com/gcc/communityHall/paymentService/scheduler/ERPScheduler.java
  9. 55
      src/main/java/com/gcc/communityHall/service/Impl/BookingServiceImpl.java
  10. 1
      src/main/java/com/gcc/communityHall/service/PaymentsService.java
  11. 68
      src/main/resources/static/files/assets/css/MarkerCluster.Default.css
  12. 14
      src/main/resources/static/files/assets/css/MarkerCluster.css
  13. 772
      src/main/resources/static/files/assets/css/leaflet.css
  14. 735
      src/main/resources/static/files/assets/css/swiper-bundle.min.css
  15. 435
      src/main/resources/static/files/assets/css/viewer.min.css
  16. 3618
      src/main/resources/static/files/assets/js/leaflet.js
  17. 589
      src/main/resources/static/files/assets/js/leaflet.markercluster.js
  18. 911
      src/main/resources/static/files/assets/js/viewer.min.js
  19. 2
      src/main/resources/templates/admin/adminpage.html
  20. 11
      src/main/resources/templates/fragments/head.html
  21. 5
      src/main/resources/templates/fragments/loginhead.html
  22. 5
      src/main/resources/templates/fragments/loginscript.html
  23. 13
      src/main/resources/templates/fragments/script.html
  24. 10
      src/main/resources/templates/user/communityHallList.html
  25. 76
      src/main/resources/templates/user/dashboard.html
  26. 37
      src/main/resources/templates/user/hallbookingform.html
  27. 30
      src/main/resources/templates/user/viewhallform.html
  28. 31
      src/main/resources/templates/user/viewhistory.html

4
pom.xml

@ -97,10 +97,6 @@
<scope>runtime</scope> <scope>runtime</scope>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>

2
src/main/java/com/gcc/communityHall/configuration/WebSocketConfig.java

@ -1,3 +1,4 @@
/*
package com.gcc.communityHall.configuration; package com.gcc.communityHall.configuration;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@ -24,3 +25,4 @@ public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
} }
} }
*/

1
src/main/java/com/gcc/communityHall/controller/CounterController.java

@ -58,6 +58,7 @@ public class CounterController {
@GetMapping(value = {"","/","/counterbooking"}) @GetMapping(value = {"","/","/counterbooking"})
public String viewcounter(Model model,HttpSession session) { public String viewcounter(Model model,HttpSession session) {
System.out.println("viewcounter");
String countername=(String) session.getAttribute("usertype"); String countername=(String) session.getAttribute("usertype");
model.addAttribute("countername", countername); model.addAttribute("countername", countername);
return "counter/counter-booking"; return "counter/counter-booking";

4
src/main/java/com/gcc/communityHall/controller/UserAPIController.java

@ -248,8 +248,8 @@ public class UserAPIController {
String generatedToken = "Welcome to GCC! Your OTP for GCC Community Centre is "+otp; String generatedToken = "Welcome to GCC! Your OTP for GCC Community Centre is "+otp;
String urlString = "https://tmegov.onex-aura.com/api/sms?key=pfTEYN6H&to="+mobileNo+"&from=GCCCRP&body=Welcome to GCC! Your OTP for GCC Community Centre booking is "+otp+"&entityid=1401572690000011081&templateid=1407172346444550398"; String urlString = "https://tmegov.onex-aura.com/api/sms?key=pfTEYN6H&to="+mobileNo+"&from=GCCCRP&body=Welcome to GCC! Your OTP for GCC Community Centre booking is "+otp+"&entityid=1401572690000011081&templateid=1407172346444550398";
System.out.println(urlString); System.out.println(urlString);
System.out.print("\n urlString---: "+urlString);
String bodyMessage = "";
System.out.println("\n urlString---: "+urlString);
String bodyMessage = ""+otp;
/*try { /*try {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
String Response = restTemplate.getForObject(urlString, String.class); String Response = restTemplate.getForObject(urlString, String.class);

6
src/main/java/com/gcc/communityHall/controller/UserController.java

@ -1,6 +1,7 @@
package com.gcc.communityHall.controller; package com.gcc.communityHall.controller;
import java.time.LocalDate;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
@ -84,6 +85,7 @@ public class UserController {
model.addAttribute("userName", userSession.getDispayName()); model.addAttribute("userName", userSession.getDispayName());
model.addAttribute("halls", halls); model.addAttribute("halls", halls);
model.addAttribute("hallnames", hallnames); model.addAttribute("hallnames", hallnames);
model.addAttribute("serverDate", LocalDate.now().toString()); //for server date
return "user/dashboard"; return "user/dashboard";
} }
@ -236,6 +238,8 @@ public class UserController {
@GetMapping("/hallbookingform") @GetMapping("/hallbookingform")
public String viewform(Model model) { public String viewform(Model model) {
String username = userSession.getDispayName(); String username = userSession.getDispayName();
System.out.println("serverDate....."+LocalDate.now().toString());
model.addAttribute("serverDate", LocalDate.now().toString()); //for server date
model.addAttribute("userName", username); model.addAttribute("userName", username);
return "user/hallbookingform"; return "user/hallbookingform";
} }
@ -270,6 +274,7 @@ public class UserController {
List<Map<String, Object>> bookingPast = bookingService.getAllBookingEventsByUserId(userId); List<Map<String, Object>> bookingPast = bookingService.getAllBookingEventsByUserId(userId);
model.addAttribute("userBookingspast", bookingPast); model.addAttribute("userBookingspast", bookingPast);
model.addAttribute("serverDate", LocalDate.now().toString()); //for server date
return "user/viewhistory"; return "user/viewhistory";
} }
@ -306,6 +311,7 @@ public class UserController {
public String viewhallform(Model model) { public String viewhallform(Model model) {
String username = userSession.getDispayName(); String username = userSession.getDispayName();
model.addAttribute("userName", username); model.addAttribute("userName", username);
model.addAttribute("serverDate", LocalDate.now().toString()); //for server date
return "user/viewhallform"; return "user/viewhallform";
} }

26
src/main/java/com/gcc/communityHall/entity/BookingCalendar.java

@ -2,10 +2,9 @@ package com.gcc.communityHall.entity;
import java.time.LocalDate; import java.time.LocalDate;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.*;
import org.hibernate.annotations.Formula;
@Entity @Entity
public class BookingCalendar { public class BookingCalendar {
@ -25,6 +24,9 @@ public class BookingCalendar {
private int hallId; private int hallId;
@Column(name = "unique_id", unique = true)
private String uniqueId;
public Integer getId() { public Integer getId() {
return id; return id;
} }
@ -33,10 +35,6 @@ public class BookingCalendar {
this.id = id; this.id = id;
} }
public LocalDate getBdate() { public LocalDate getBdate() {
return bdate; return bdate;
} }
@ -117,13 +115,21 @@ public class BookingCalendar {
this.is_blocked = is_blocked; this.is_blocked = is_blocked;
} }
public String getUnique_id() {
return uniqueId;
}
public void setUnique_id(String uniqueId) {
this.uniqueId = uniqueId;
}
public BookingCalendar() { public BookingCalendar() {
super(); super();
// TODO Auto-generated constructor stub // TODO Auto-generated constructor stub
} }
public BookingCalendar(Integer id, LocalDate bdate, boolean morningSlot, boolean eveningSlot, String bookingId_1, public BookingCalendar(Integer id, LocalDate bdate, boolean morningSlot, boolean eveningSlot, String bookingId_1,
String bookingId_2, boolean is_active, boolean is_delete, int is_booked, boolean is_blocked, int hallId) {
String bookingId_2, boolean is_active, boolean is_delete, int is_booked, boolean is_blocked, int hallId, String uniqueId) {
super(); super();
this.id = id; this.id = id;
this.bdate = bdate; this.bdate = bdate;
@ -136,7 +142,9 @@ public class BookingCalendar {
this.is_booked = is_booked; this.is_booked = is_booked;
this.is_blocked = is_blocked; this.is_blocked = is_blocked;
this.hallId = hallId; this.hallId = hallId;
this.uniqueId = uniqueId;
} }
} }

35
src/main/java/com/gcc/communityHall/paymentService/controller/PaymentController.java

@ -16,6 +16,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.gcc.communityHall.entity.*; import com.gcc.communityHall.entity.*;
import com.gcc.communityHall.others.AppConfig; import com.gcc.communityHall.others.AppConfig;
import com.gcc.communityHall.repository.ErpPostDataRepository; import com.gcc.communityHall.repository.ErpPostDataRepository;
import com.gcc.communityHall.service.PaymentsService;
import org.apache.tomcat.util.json.JSONParser; import org.apache.tomcat.util.json.JSONParser;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigurationPackage; import org.springframework.boot.autoconfigure.AutoConfigurationPackage;
@ -72,10 +73,14 @@ public class PaymentController {
@Autowired @Autowired
private ErpPostDataRepository erpPostDataRepository; private ErpPostDataRepository erpPostDataRepository;
@Autowired
private PaymentsService paymentsService;
@PostMapping(value = "/response") @PostMapping(value = "/response")
public String response(Model model, @RequestParam(required = false) String msg) throws NoSuchAlgorithmException { public String response(Model model, @RequestParam(required = false) String msg) throws NoSuchAlgorithmException {
String salt = this.paymentConfig.getEncryptionKey(); String salt = this.paymentConfig.getEncryptionKey();
String confirmToken = ""; String confirmToken = "";
@ -127,13 +132,36 @@ public class PaymentController {
bookingsDetails.setPayments(payment); bookingsDetails.setPayments(payment);
payment.setCdate(new Date()); payment.setCdate(new Date());
System.out.println("bookingsDetails.getAmountReceived().." + bookingsDetails.getAmountReceived());
System.out.println("amount: " + amount);
TransactionResponse save = transactionResRepo.save(response); TransactionResponse save = transactionResRepo.save(response);
if (bookingsDetails.getAmountReceived() != amount) { // Reject booking if the amount is incorrect
if(paymentService.generateToken(c).equals(confirmToken) && status.equals(res[0])){ if(paymentService.generateToken(c).equals(confirmToken) && status.equals(res[0])){
payment.setPaymentStatus("Success"); payment.setPaymentStatus("Success");
bookingsDetails.setPayments(payment); bookingsDetails.setPayments(payment);
paymentRepo.save(payment);
bookser.bookingFailure(bookingsDetails, 1);
}
model.addAttribute("bookingsDetails", bookingsDetails);
// bookser.updateBookingStatusById(bookingsDetails.getBookingId(), BookingStatus.PENDING, "Amount mismatch - Booking Not Confirmed");
return "redirect:/communityhall/user/acknowledgement?bookingId=" + bookingsDetails.getBookingId();
}
if (paymentService.generateToken(c).equals(confirmToken) && status.equals(res[0])) {
payment.setPaymentStatus("Success");
bookingsDetails.setPayments(payment);
try {
String confirmBooking = bookser.confirmBooking(response.getBookingId()); String confirmBooking = bookser.confirmBooking(response.getBookingId());
postDataToERP(payment, response); // post payment details to ERP
}catch (Exception e){
// return "redirect:/communityhall/user/acknowledgement?bookingId=" + bookingsDetails.getBookingId();
}
// postDataToERP(payment, response); // post payment details to ERP
// System.out.println("\n confirmBooking:- paymentController 111"+confirmBooking+"\n"); // System.out.println("\n confirmBooking:- paymentController 111"+confirmBooking+"\n");
// if(confirmBooking.equals("Booking confirmed successfully")) { // if(confirmBooking.equals("Booking confirmed successfully")) {
// //bookser.updateBookingStatusById(bookingsDetails.getBookingId(), BookingDetails.BookingStatus.APPROVED, "confirm"); // //bookser.updateBookingStatusById(bookingsDetails.getBookingId(), BookingDetails.BookingStatus.APPROVED, "confirm");
@ -149,6 +177,7 @@ public class PaymentController {
// } // }
} }
// System.out.println(response.toString()); // System.out.println(response.toString());
model.addAttribute("bookingsDetails", bookingsDetails); // Add single BookingDetails object model.addAttribute("bookingsDetails", bookingsDetails); // Add single BookingDetails object
//System.out.println(save.toString()); //System.out.println(save.toString());
@ -318,7 +347,7 @@ public class PaymentController {
} }
model.addAttribute("bookingsDetails", bookingsDetails); model.addAttribute("bookingsDetails", bookingsDetails);
extraPaymentsRepository.save(payment); extraPaymentsRepository.save(payment);
postEPDataToERP(payment, response); //post extra payments details to ERP
// postEPDataToERP(payment, response); //post extra payments details to ERP
return "redirect:/communityhall/user/collectionpendingacknowledgement?bookingId=" + bookingsDetails.getBookingId(); return "redirect:/communityhall/user/collectionpendingacknowledgement?bookingId=" + bookingsDetails.getBookingId();
} }

18
src/main/java/com/gcc/communityHall/paymentService/scheduler/ERPScheduler.java

@ -1,3 +1,4 @@
/*
package com.gcc.communityHall.paymentService.scheduler; package com.gcc.communityHall.paymentService.scheduler;
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.JsonNode;
@ -121,7 +122,9 @@ public class ERPScheduler {
String assesNo = LocalDate.now().getYear() + "/COMM/" + res.getBookingId(); String assesNo = LocalDate.now().getYear() + "/COMM/" + res.getBookingId();
Map<String, Object> data = new TreeMap<>(); Map<String, Object> data = new TreeMap<>();
/*static mandatory input to be sent */
*/
/*static mandatory input to be sent *//*
data.put("serviceId", "getOtherCollection"); data.put("serviceId", "getOtherCollection");
data.put("COLLECTION_TYPE", "Community Hall"); data.put("COLLECTION_TYPE", "Community Hall");
data.put("TOTALTRANSACTIONCODE", "450310000"); data.put("TOTALTRANSACTIONCODE", "450310000");
@ -144,7 +147,9 @@ public class ERPScheduler {
data.put("PARTYNAME", payment.getBookingDetails().getUsers().getName()); data.put("PARTYNAME", payment.getBookingDetails().getUsers().getName());
data.put("PARTYADDRESS", payment.getBookingDetails().getUsers().getStreet() + "," + payment.getBookingDetails().getUsers().getArea() + "," + payment.getBookingDetails().getUsers().getLocation() + "," + payment.getBookingDetails().getUsers().getPinCode()); data.put("PARTYADDRESS", payment.getBookingDetails().getUsers().getStreet() + "," + payment.getBookingDetails().getUsers().getArea() + "," + payment.getBookingDetails().getUsers().getLocation() + "," + payment.getBookingDetails().getUsers().getPinCode());
data.put("PARTYMOBILE", payment.getBookingDetails().getUsers().getMobileNo()); data.put("PARTYMOBILE", payment.getBookingDetails().getUsers().getMobileNo());
/* end */
*/
/* end *//*
System.out.println(data); System.out.println(data);
System.out.println(appConfig.getCommErpUrl()); System.out.println(appConfig.getCommErpUrl());
// ResponseEntity<String> stringResponseEntity = restTemplate.postForEntity(appConfig.getErpUrl(), data, String.class); // ResponseEntity<String> stringResponseEntity = restTemplate.postForEntity(appConfig.getErpUrl(), data, String.class);
@ -209,7 +214,9 @@ public class ERPScheduler {
String assesNo = LocalDate.now().getYear() + "/COMM/ED/" + res.getBookingId(); String assesNo = LocalDate.now().getYear() + "/COMM/ED/" + res.getBookingId();
Map<String, Object> data = new TreeMap<>(); Map<String, Object> data = new TreeMap<>();
/*static mandatory input to be sent */
*/
/*static mandatory input to be sent *//*
data.put("serviceId", "getOtherCollection"); data.put("serviceId", "getOtherCollection");
data.put("COLLECTION_TYPE", "Community Hall"); data.put("COLLECTION_TYPE", "Community Hall");
data.put("TOTALTRANSACTIONCODE", "450310000"); data.put("TOTALTRANSACTIONCODE", "450310000");
@ -234,7 +241,9 @@ public class ERPScheduler {
payment.getBookingDetails().getUsers().getArea() + "," + payment.getBookingDetails().getUsers().getLocation() + "," + payment.getBookingDetails().getUsers().getArea() + "," + payment.getBookingDetails().getUsers().getLocation() + "," +
payment.getBookingDetails().getUsers().getPinCode()); payment.getBookingDetails().getUsers().getPinCode());
data.put("PARTYMOBILE", payment.getBookingDetails().getUsers().getMobileNo()); data.put("PARTYMOBILE", payment.getBookingDetails().getUsers().getMobileNo());
/* end */
*/
/* end *//*
System.out.println(data); System.out.println(data);
System.out.println(appConfig.getCommErpUrl()); System.out.println(appConfig.getCommErpUrl());
// ResponseEntity<String> stringResponseEntity = restTemplate.postForEntity(appConfig.getErpUrl(), data, String.class); // ResponseEntity<String> stringResponseEntity = restTemplate.postForEntity(appConfig.getErpUrl(), data, String.class);
@ -289,3 +298,4 @@ public class ERPScheduler {
} }
} }
} }
*/

55
src/main/java/com/gcc/communityHall/service/Impl/BookingServiceImpl.java

@ -232,6 +232,7 @@ public class BookingServiceImpl implements BookingService {
for (LocalDate date = startDate; !date.isAfter(endDate); date = date.plusDays(1)) { for (LocalDate date = startDate; !date.isAfter(endDate); date = date.plusDays(1)) {
BookingCalendar bookingCalendar = bookingCalendarRepository.findByBdateAndHallId(date, hallId); BookingCalendar bookingCalendar = bookingCalendarRepository.findByBdateAndHallId(date, hallId);
if (bookingCalendar != null) { if (bookingCalendar != null) {
// System.out.println(bookingCalendar.toString()); // System.out.println(bookingCalendar.toString());
// System.out.println("date:-"+date ); // System.out.println("date:-"+date );
@ -264,11 +265,15 @@ public class BookingServiceImpl implements BookingService {
} }
} else { } else {
String uniqueId = date.format(DateTimeFormatter.ofPattern("yyyyMMdd")) + hallId;
System.out.println("uniqueId....." + uniqueId);
bookingCalendar = new BookingCalendar(); bookingCalendar = new BookingCalendar();
bookingCalendar.setBdate(date); bookingCalendar.setBdate(date);
bookingCalendar.setHallId(hallId); bookingCalendar.setHallId(hallId);
bookingCalendar.setIs_booked(0); bookingCalendar.setIs_booked(0);
bookingCalendar.setIs_active(true); bookingCalendar.setIs_active(true);
bookingCalendar.setUnique_id(uniqueId);
} }
// Mark the appropriate slot as booked based on starting and ending slots // Mark the appropriate slot as booked based on starting and ending slots
@ -317,8 +322,6 @@ public class BookingServiceImpl implements BookingService {
bookingCalendar.setBookingId_2(String.valueOf(bookingId)); bookingCalendar.setBookingId_2(String.valueOf(bookingId));
bookingCalendar.setIs_booked(bookingCalendar.getIs_booked() + 2); bookingCalendar.setIs_booked(bookingCalendar.getIs_booked() + 2);
} }
// System.out.println(i + "end:-"+bookingCalendar.toString()); // System.out.println(i + "end:-"+bookingCalendar.toString());
bookingCalendarRepository.save(bookingCalendar); bookingCalendarRepository.save(bookingCalendar);
i++; i++;
@ -347,7 +350,7 @@ public class BookingServiceImpl implements BookingService {
return "Booking confirmed successfully"; return "Booking confirmed successfully";
} }
} catch (Exception e) { } catch (Exception e) {
bookingFailure(bookingDetails);
bookingFailure(bookingDetails, 2);
// System.out.println(bookingDetails.getBookingStatus()+","+bookingDetails.getRefundStatus()+","+bookingDetails.getComments()); // System.out.println(bookingDetails.getBookingStatus()+","+bookingDetails.getRefundStatus()+","+bookingDetails.getComments());
return "redirect:/communityhall/user/acknowledgement?bookingId=" + bookingDetails.getBookingId(); return "redirect:/communityhall/user/acknowledgement?bookingId=" + bookingDetails.getBookingId();
} }
@ -473,14 +476,14 @@ public class BookingServiceImpl implements BookingService {
return "redirect:/communityhall/user/acknowledgement?bookingId=" + bookingDetails.getBookingId(); return "redirect:/communityhall/user/acknowledgement?bookingId=" + bookingDetails.getBookingId();
} catch (Exception e) { } catch (Exception e) {
bookingFailure(bookingDetails);
bookingFailure(bookingDetails, 2);
// System.out.println(bookingDetails.getBookingStatus()+","+bookingDetails.getRefundStatus()+","+bookingDetails.getComments()); // System.out.println(bookingDetails.getBookingStatus()+","+bookingDetails.getRefundStatus()+","+bookingDetails.getComments());
return "redirect:/communityhall/user/acknowledgement?bookingId=" + bookingDetails.getBookingId(); return "redirect:/communityhall/user/acknowledgement?bookingId=" + bookingDetails.getBookingId();
} }
} }
@Transactional(propagation = Propagation.REQUIRES_NEW)
/*@Transactional(propagation = Propagation.REQUIRES_NEW)
public String bookingFailure(BookingDetails bookingDetails) { public String bookingFailure(BookingDetails bookingDetails) {
// System.out.println("Booking Failure:-"+bookingDetails.getBookingId()); // System.out.println("Booking Failure:-"+bookingDetails.getBookingId());
bookingDetails.setBookingStatus(BookingStatus.REFUNDED); bookingDetails.setBookingStatus(BookingStatus.REFUNDED);
@ -507,6 +510,48 @@ public class BookingServiceImpl implements BookingService {
whatsappMsgServiceImpl.sendMsg(settlementrefundwhatsupmsg); whatsappMsgServiceImpl.sendMsg(settlementrefundwhatsupmsg);
whatsappMsgServiceImpl.sendSMS(settlementrefundurlString); whatsappMsgServiceImpl.sendSMS(settlementrefundurlString);
// }); // });
// thread.start();
return "Success";
}
} catch (Exception e) {
applicationLogService.saveLog(bookingDetails.getBookingId(), ApplicationLogs.logsOfMsg.ERROR.toString(), "Refund Error");
return "error";
}
}
return "error";
}*/
@Transactional(propagation = Propagation.REQUIRES_NEW)
public String bookingFailure(BookingDetails bookingDetails, int flag) {
// System.out.println("Booking Failure:-"+bookingDetails.getBookingId());
bookingDetails.setBookingStatus(BookingStatus.REFUNDED);
if (flag == 1) {
bookingDetails.setComments("Amount mismatch - Booking Not Confirmed");
} else {
bookingDetails.setComments("Slot occupied by other user,Amount paid will be refunded.");
}
bookingDetailsRepository.save(bookingDetails);
if (!(bookingDetails.getRefundStatus() == RefundStatus.COMPLETED) && !(bookingDetails.getRefundStatus() == RefundStatus.CLOSED)) {
// BookingDetails bd =updateBookingStatusById(bookingDetails.getBookingId(), BookingDetails.BookingStatus.REFUNDED, "slot occupied Refund will happen shortly");
applicationLogService.saveLog(bookingDetails.getBookingId(), ApplicationLogs.logsOfMsg.REFUNDED.toString(), "Refund will happen shortly");
try {
String refundedMsg = paymentGatewayService.refundTheAmount(bookingDetails.getBookingId(), bookingDetails.getUsers().getUserId());
//System.out.println("refundedMsg=="+refundedMsg);
if (refundedMsg.equals("Refunded")) {
//System.out.println("Refund completed........");
bookingDetails.setRefundStatus(BookingDetails.RefundStatus.COMPLETED);
bookingDetailsRepository.save(bookingDetails);
//System.out.println("refundStatus===="+bookingDetails.getRefundStatus());
long mobile = bookingDetails.getUsers().getMobileNo();
int bookingId = bookingDetails.getBookingId();
double refundAmt = bookingDetails.getAmountReceived();
// Thread thread = new Thread(() -> {
String settlementrefundsms = "Your refund amount of Rs. " + refundAmt + " for Booking ID " + bookingId + " has been initiated. The amount will be credited to your account within 3 to 15 days. Thanks for using the GCC Community Hall Booking System.";
String settlementrefundurlString = "https://tmegov.onex-aura.com/api/sms?key=pfTEYN6H&to=" + mobile + "&from=GCCCRP&body=" + settlementrefundsms + "&entityid=1401572690000011081&templateid=1407172346804951524";
String settlementrefundwhatsupmsg = "https://media.smsgupshup.com/GatewayAPI/rest?userid=2000233507&password=h2YjFNcJ&send_to=" + mobile + "&v=1.1&format=json&msg_type=TEXT&method=SENDMESSAGE&msg=Your+refund+of+Rs.+" + refundAmt + "+for+Booking+ID+" + bookingId + "+has+been+initiated.+%0AThe+amount+will+be+credited+to+your+account+within+3+to+15+days.";
whatsappMsgServiceImpl.sendMsg(settlementrefundwhatsupmsg);
whatsappMsgServiceImpl.sendSMS(settlementrefundurlString);
// });
// thread.start(); // thread.start();
return "Success"; return "Success";
} }

1
src/main/java/com/gcc/communityHall/service/PaymentsService.java

@ -10,4 +10,5 @@ public interface PaymentsService {
List<Payments> getPaymentsByZone(String zone); List<Payments> getPaymentsByZone(String zone);
List<PaymentsDTO> getAllPaymentDetails(); List<PaymentsDTO> getAllPaymentDetails();
} }

68
src/main/resources/static/files/assets/css/MarkerCluster.Default.css

@ -0,0 +1,68 @@
.marker-cluster-small {
background-color: rgba(181, 226, 140, 0.6);
}
.marker-cluster-small div {
background-color: rgba(110, 204, 57, 0.6);
}
.marker-cluster-medium {
background-color: rgba(241, 211, 87, 0.6);
}
.marker-cluster-medium div {
background-color: rgba(240, 194, 12, 0.6);
}
.marker-cluster-large {
background-color: rgba(253, 156, 115, 0.6);
}
.marker-cluster-large div {
background-color: rgba(241, 128, 23, 0.6);
}
/* IE 6-8 fallback colors */
.leaflet-oldie .marker-cluster-small {
background-color: rgb(181, 226, 140);
}
.leaflet-oldie .marker-cluster-small div {
background-color: rgb(110, 204, 57);
}
.leaflet-oldie .marker-cluster-medium {
background-color: rgb(241, 211, 87);
}
.leaflet-oldie .marker-cluster-medium div {
background-color: rgb(240, 194, 12);
}
.leaflet-oldie .marker-cluster-large {
background-color: rgb(253, 156, 115);
}
.leaflet-oldie .marker-cluster-large div {
background-color: rgb(241, 128, 23);
}
.marker-cluster {
background-clip: padding-box;
border-radius: 20px;
}
.marker-cluster div {
width: 30px;
height: 30px;
margin-left: 5px;
margin-top: 5px;
text-align: center;
border-radius: 15px;
font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
}
.marker-cluster span {
line-height: 30px;
}

14
src/main/resources/static/files/assets/css/MarkerCluster.css

@ -0,0 +1,14 @@
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {
-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;
-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;
-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;
transition: transform 0.3s ease-out, opacity 0.3s ease-in;
}
.leaflet-cluster-spider-leg {
/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */
-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;
-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;
-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;
transition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;
}

772
src/main/resources/static/files/assets/css/leaflet.css

@ -0,0 +1,772 @@
/* required styles */
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
position: absolute;
left: 0;
top: 0;
}
.leaflet-container {
overflow: hidden;
}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-user-drag: none;
}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
image-rendering: -webkit-optimize-contrast;
}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
width: 1600px;
height: 1600px;
-webkit-transform-origin: 0 0;
}
.leaflet-marker-icon,
.leaflet-marker-shadow {
display: block;
}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
max-width: none !important;
max-height: none !important;
}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
max-width: none !important;
max-height: none !important;
width: auto;
padding: 0;
}
.leaflet-container img.leaflet-tile {
/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
mix-blend-mode: plus-lighter;
}
.leaflet-container.leaflet-touch-zoom {
-ms-touch-action: pan-x pan-y;
touch-action: pan-x pan-y;
}
.leaflet-container.leaflet-touch-drag {
-ms-touch-action: pinch-zoom;
/* Fallback for FF which doesn't support pinch-zoom */
touch-action: none;
touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
-ms-touch-action: none;
touch-action: none;
}
.leaflet-container {
-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
filter: inherit;
visibility: hidden;
}
.leaflet-tile-loaded {
visibility: inherit;
}
.leaflet-zoom-box {
width: 0;
height: 0;
-moz-box-sizing: border-box;
box-sizing: border-box;
z-index: 800;
}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
-moz-user-select: none;
}
.leaflet-pane {
z-index: 400;
}
.leaflet-tile-pane {
z-index: 200;
}
.leaflet-overlay-pane {
z-index: 400;
}
.leaflet-shadow-pane {
z-index: 500;
}
.leaflet-marker-pane {
z-index: 600;
}
.leaflet-tooltip-pane {
z-index: 650;
}
.leaflet-popup-pane {
z-index: 700;
}
.leaflet-map-pane canvas {
z-index: 100;
}
.leaflet-map-pane svg {
z-index: 200;
}
.leaflet-vml-shape {
width: 1px;
height: 1px;
}
.lvml {
behavior: url(#default#VML);
display: inline-block;
position: absolute;
}
/* control positioning */
.leaflet-control {
position: relative;
z-index: 800;
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto;
}
.leaflet-top,
.leaflet-bottom {
position: absolute;
z-index: 1000;
pointer-events: none;
}
.leaflet-top {
top: 0;
}
.leaflet-right {
right: 0;
}
.leaflet-bottom {
bottom: 0;
}
.leaflet-left {
left: 0;
}
.leaflet-control {
float: left;
clear: both;
}
.leaflet-right .leaflet-control {
float: right;
}
.leaflet-top .leaflet-control {
margin-top: 10px;
}
.leaflet-bottom .leaflet-control {
margin-bottom: 10px;
}
.leaflet-left .leaflet-control {
margin-left: 10px;
}
.leaflet-right .leaflet-control {
margin-right: 10px;
}
/* zoom and fade animations */
.leaflet-fade-anim .leaflet-popup {
opacity: 0;
-webkit-transition: opacity 0.2s linear;
-moz-transition: opacity 0.2s linear;
transition: opacity 0.2s linear;
}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
opacity: 1;
}
.leaflet-zoom-animated {
-webkit-transform-origin: 0 0;
-ms-transform-origin: 0 0;
transform-origin: 0 0;
}
svg.leaflet-zoom-animated {
will-change: transform;
}
.leaflet-zoom-anim .leaflet-zoom-animated {
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1);
-moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1);
transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1);
}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
-webkit-transition: none;
-moz-transition: none;
transition: none;
}
.leaflet-zoom-anim .leaflet-zoom-hide {
visibility: hidden;
}
/* cursors */
.leaflet-interactive {
cursor: pointer;
}
.leaflet-grab {
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: grab;
}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
cursor: crosshair;
}
.leaflet-popup-pane,
.leaflet-control {
cursor: auto;
}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
cursor: move;
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: grabbing;
}
/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
pointer-events: none;
}
.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto;
}
/* visual tweaks */
.leaflet-container {
background: #ddd;
outline-offset: 1px;
}
.leaflet-container a {
color: #0078A8;
}
.leaflet-zoom-box {
border: 2px dotted #38f;
background: rgba(255, 255, 255, 0.5);
}
/* general typography */
.leaflet-container {
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
font-size: 12px;
font-size: 0.75rem;
line-height: 1.5;
}
/* general toolbar styles */
.leaflet-bar {
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65);
border-radius: 4px;
}
.leaflet-bar a {
background-color: #fff;
border-bottom: 1px solid #ccc;
width: 26px;
height: 26px;
line-height: 26px;
display: block;
text-align: center;
text-decoration: none;
color: black;
}
.leaflet-bar a,
.leaflet-control-layers-toggle {
background-position: 50% 50%;
background-repeat: no-repeat;
display: block;
}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
background-color: #f4f4f4;
}
.leaflet-bar a:first-child {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
.leaflet-bar a:last-child {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom: none;
}
.leaflet-bar a.leaflet-disabled {
cursor: default;
background-color: #f4f4f4;
color: #bbb;
}
.leaflet-touch .leaflet-bar a {
width: 30px;
height: 30px;
line-height: 30px;
}
.leaflet-touch .leaflet-bar a:first-child {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.leaflet-touch .leaflet-bar a:last-child {
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
}
/* zoom control */
.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
font: bold 18px 'Lucida Console', Monaco, monospace;
text-indent: 1px;
}
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
font-size: 22px;
}
/* layers control */
.leaflet-control-layers {
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
background: #fff;
border-radius: 5px;
}
.leaflet-control-layers-toggle {
background-image: url(images/layers.png);
width: 36px;
height: 36px;
}
.leaflet-retina .leaflet-control-layers-toggle {
background-image: url(images/layers-2x.png);
background-size: 26px 26px;
}
.leaflet-touch .leaflet-control-layers-toggle {
width: 44px;
height: 44px;
}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
display: none;
}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
display: block;
position: relative;
}
.leaflet-control-layers-expanded {
padding: 6px 10px 6px 6px;
color: #333;
background: #fff;
}
.leaflet-control-layers-scrollbar {
overflow-y: scroll;
overflow-x: hidden;
padding-right: 5px;
}
.leaflet-control-layers-selector {
margin-top: 2px;
position: relative;
top: 1px;
}
.leaflet-control-layers label {
display: block;
font-size: 13px;
font-size: 1.08333em;
}
.leaflet-control-layers-separator {
height: 0;
border-top: 1px solid #ddd;
margin: 5px -10px 5px -6px;
}
/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
background-image: url(images/marker-icon.png);
}
/* attribution and scale controls */
.leaflet-container .leaflet-control-attribution {
background: #fff;
background: rgba(255, 255, 255, 0.8);
margin: 0;
}
.leaflet-control-attribution,
.leaflet-control-scale-line {
padding: 0 5px;
color: #333;
line-height: 1.4;
}
.leaflet-control-attribution a {
text-decoration: none;
}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
text-decoration: underline;
}
.leaflet-attribution-flag {
display: inline !important;
vertical-align: baseline !important;
width: 1em;
height: 0.6669em;
}
.leaflet-left .leaflet-control-scale {
margin-left: 5px;
}
.leaflet-bottom .leaflet-control-scale {
margin-bottom: 5px;
}
.leaflet-control-scale-line {
border: 2px solid #777;
border-top: none;
line-height: 1.1;
padding: 2px 5px 1px;
white-space: nowrap;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: rgba(255, 255, 255, 0.8);
text-shadow: 1px 1px #fff;
}
.leaflet-control-scale-line:not(:first-child) {
border-top: 2px solid #777;
border-bottom: none;
margin-top: -2px;
}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
border-bottom: 2px solid #777;
}
.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
box-shadow: none;
}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
border: 2px solid rgba(0, 0, 0, 0.2);
background-clip: padding-box;
}
/* popup */
.leaflet-popup {
position: absolute;
text-align: center;
margin-bottom: 20px;
}
.leaflet-popup-content-wrapper {
padding: 1px;
text-align: left;
border-radius: 12px;
}
.leaflet-popup-content {
margin: 13px 24px 13px 20px;
line-height: 1.3;
font-size: 13px;
font-size: 1.08333em;
min-height: 1px;
}
.leaflet-popup-content p {
margin: 17px 0;
margin: 1.3em 0;
}
.leaflet-popup-tip-container {
width: 40px;
height: 20px;
position: absolute;
left: 50%;
margin-top: -1px;
margin-left: -20px;
overflow: hidden;
pointer-events: none;
}
.leaflet-popup-tip {
width: 17px;
height: 17px;
padding: 1px;
margin: -10px auto 0;
pointer-events: auto;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
background: white;
color: #333;
box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}
.leaflet-container a.leaflet-popup-close-button {
position: absolute;
top: 0;
right: 0;
border: none;
text-align: center;
width: 24px;
height: 24px;
font: 16px/24px Tahoma, Verdana, sans-serif;
color: #757575;
text-decoration: none;
background: transparent;
}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
color: #585858;
}
.leaflet-popup-scrolled {
overflow: auto;
}
.leaflet-oldie .leaflet-popup-content-wrapper {
-ms-zoom: 1;
}
.leaflet-oldie .leaflet-popup-tip {
width: 24px;
margin: 0 auto;
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
}
.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
border: 1px solid #999;
}
/* div icon */
.leaflet-div-icon {
background: #fff;
border: 1px solid #666;
}
/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
position: absolute;
padding: 6px;
background-color: #fff;
border: 1px solid #fff;
border-radius: 3px;
color: #222;
white-space: nowrap;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
pointer-events: none;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.leaflet-tooltip.leaflet-interactive {
cursor: pointer;
pointer-events: auto;
}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
position: absolute;
pointer-events: none;
border: 6px solid transparent;
background: transparent;
content: "";
}
/* Directions */
.leaflet-tooltip-bottom {
margin-top: 6px;
}
.leaflet-tooltip-top {
margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
left: 50%;
margin-left: -6px;
}
.leaflet-tooltip-top:before {
bottom: 0;
margin-bottom: -12px;
border-top-color: #fff;
}
.leaflet-tooltip-bottom:before {
top: 0;
margin-top: -12px;
margin-left: -6px;
border-bottom-color: #fff;
}
.leaflet-tooltip-left {
margin-left: -6px;
}
.leaflet-tooltip-right {
margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
top: 50%;
margin-top: -6px;
}
.leaflet-tooltip-left:before {
right: 0;
margin-right: -12px;
border-left-color: #fff;
}
.leaflet-tooltip-right:before {
left: 0;
margin-left: -12px;
border-right-color: #fff;
}
/* Printing */
@media print {
/* Prevent printers from removing background-images of controls. */
.leaflet-control {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
}

735
src/main/resources/static/files/assets/css/swiper-bundle.min.css

@ -0,0 +1,735 @@
/**
* Swiper 11.2.5
* Most modern mobile touch slider and framework with hardware accelerated transitions
* https://swiperjs.com
*
* Copyright 2014-2025 Vladimir Kharlampidi
*
* Released under the MIT License
*
* Released on: March 3, 2025
*/
@font-face {
font-family: swiper-icons;
src: url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA');
font-weight: 400;
font-style: normal
}
:root {
--swiper-theme-color: #007aff
}
:host {
position: relative;
display: block;
margin-left: auto;
margin-right: auto;
z-index: 1
}
.swiper {
margin-left: auto;
margin-right: auto;
position: relative;
overflow: hidden;
list-style: none;
padding: 0;
z-index: 1;
display: block
}
.swiper-vertical > .swiper-wrapper {
flex-direction: column
}
.swiper-wrapper {
position: relative;
width: 100%;
height: 100%;
z-index: 1;
display: flex;
transition-property: transform;
transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);
box-sizing: content-box
}
.swiper-android .swiper-slide, .swiper-ios .swiper-slide, .swiper-wrapper {
transform: translate3d(0px, 0, 0)
}
.swiper-horizontal {
touch-action: pan-y
}
.swiper-vertical {
touch-action: pan-x
}
.swiper-slide {
flex-shrink: 0;
width: 100%;
height: 100%;
position: relative;
transition-property: transform;
display: block
}
.swiper-slide-invisible-blank {
visibility: hidden
}
.swiper-autoheight, .swiper-autoheight .swiper-slide {
height: auto
}
.swiper-autoheight .swiper-wrapper {
align-items: flex-start;
transition-property: transform, height
}
.swiper-backface-hidden .swiper-slide {
transform: translateZ(0);
-webkit-backface-visibility: hidden;
backface-visibility: hidden
}
.swiper-3d.swiper-css-mode .swiper-wrapper {
perspective: 1200px
}
.swiper-3d .swiper-wrapper {
transform-style: preserve-3d
}
.swiper-3d {
perspective: 1200px
}
.swiper-3d .swiper-cube-shadow, .swiper-3d .swiper-slide {
transform-style: preserve-3d
}
.swiper-css-mode > .swiper-wrapper {
overflow: auto;
scrollbar-width: none;
-ms-overflow-style: none
}
.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {
display: none
}
.swiper-css-mode > .swiper-wrapper > .swiper-slide {
scroll-snap-align: start start
}
.swiper-css-mode.swiper-horizontal > .swiper-wrapper {
scroll-snap-type: x mandatory
}
.swiper-css-mode.swiper-vertical > .swiper-wrapper {
scroll-snap-type: y mandatory
}
.swiper-css-mode.swiper-free-mode > .swiper-wrapper {
scroll-snap-type: none
}
.swiper-css-mode.swiper-free-mode > .swiper-wrapper > .swiper-slide {
scroll-snap-align: none
}
.swiper-css-mode.swiper-centered > .swiper-wrapper::before {
content: '';
flex-shrink: 0;
order: 9999
}
.swiper-css-mode.swiper-centered > .swiper-wrapper > .swiper-slide {
scroll-snap-align: center center;
scroll-snap-stop: always
}
.swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {
margin-inline-start: var(--swiper-centered-offset-before)
}
.swiper-css-mode.swiper-centered.swiper-horizontal > .swiper-wrapper::before {
height: 100%;
min-height: 1px;
width: var(--swiper-centered-offset-after)
}
.swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {
margin-block-start: var(--swiper-centered-offset-before)
}
.swiper-css-mode.swiper-centered.swiper-vertical > .swiper-wrapper::before {
width: 100%;
min-width: 1px;
height: var(--swiper-centered-offset-after)
}
.swiper-3d .swiper-slide-shadow, .swiper-3d .swiper-slide-shadow-bottom, .swiper-3d .swiper-slide-shadow-left, .swiper-3d .swiper-slide-shadow-right, .swiper-3d .swiper-slide-shadow-top {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 10
}
.swiper-3d .swiper-slide-shadow {
background: rgba(0, 0, 0, .15)
}
.swiper-3d .swiper-slide-shadow-left {
background-image: linear-gradient(to left, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0))
}
.swiper-3d .swiper-slide-shadow-right {
background-image: linear-gradient(to right, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0))
}
.swiper-3d .swiper-slide-shadow-top {
background-image: linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0))
}
.swiper-3d .swiper-slide-shadow-bottom {
background-image: linear-gradient(to bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0))
}
.swiper-lazy-preloader {
width: 42px;
height: 42px;
position: absolute;
left: 50%;
top: 50%;
margin-left: -21px;
margin-top: -21px;
z-index: 10;
transform-origin: 50%;
box-sizing: border-box;
border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));
border-radius: 50%;
border-top-color: transparent
}
.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader, .swiper:not(.swiper-watch-progress) .swiper-lazy-preloader {
animation: swiper-preloader-spin 1s infinite linear
}
.swiper-lazy-preloader-white {
--swiper-preloader-color: #fff
}
.swiper-lazy-preloader-black {
--swiper-preloader-color: #000
}
@keyframes swiper-preloader-spin {
0% {
transform: rotate(0deg)
}
100% {
transform: rotate(360deg)
}
}
.swiper-virtual .swiper-slide {
-webkit-backface-visibility: hidden;
transform: translateZ(0)
}
.swiper-virtual.swiper-css-mode .swiper-wrapper::after {
content: '';
position: absolute;
left: 0;
top: 0;
pointer-events: none
}
.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after {
height: 1px;
width: var(--swiper-virtual-size)
}
.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after {
width: 1px;
height: var(--swiper-virtual-size)
}
:root {
--swiper-navigation-size: 44px
}
.swiper-button-next, .swiper-button-prev {
position: absolute;
top: var(--swiper-navigation-top-offset, 50%);
width: calc(var(--swiper-navigation-size) / 44 * 27);
height: var(--swiper-navigation-size);
margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
z-index: 10;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: var(--swiper-navigation-color, var(--swiper-theme-color))
}
.swiper-button-next.swiper-button-disabled, .swiper-button-prev.swiper-button-disabled {
opacity: .35;
cursor: auto;
pointer-events: none
}
.swiper-button-next.swiper-button-hidden, .swiper-button-prev.swiper-button-hidden {
opacity: 0;
cursor: auto;
pointer-events: none
}
.swiper-navigation-disabled .swiper-button-next, .swiper-navigation-disabled .swiper-button-prev {
display: none !important
}
.swiper-button-next svg, .swiper-button-prev svg {
width: 100%;
height: 100%;
object-fit: contain;
transform-origin: center
}
.swiper-rtl .swiper-button-next svg, .swiper-rtl .swiper-button-prev svg {
transform: rotate(180deg)
}
.swiper-button-prev, .swiper-rtl .swiper-button-next {
left: var(--swiper-navigation-sides-offset, 10px);
right: auto
}
.swiper-button-next, .swiper-rtl .swiper-button-prev {
right: var(--swiper-navigation-sides-offset, 10px);
left: auto
}
.swiper-button-lock {
display: none
}
.swiper-button-next:after, .swiper-button-prev:after {
font-family: swiper-icons;
font-size: var(--swiper-navigation-size);
text-transform: none !important;
letter-spacing: 0;
font-variant: initial;
line-height: 1
}
.swiper-button-prev:after, .swiper-rtl .swiper-button-next:after {
content: 'prev'
}
.swiper-button-next, .swiper-rtl .swiper-button-prev {
right: var(--swiper-navigation-sides-offset, 10px);
left: auto
}
.swiper-button-next:after, .swiper-rtl .swiper-button-prev:after {
content: 'next'
}
.swiper-pagination {
position: absolute;
text-align: center;
transition: .3s opacity;
transform: translate3d(0, 0, 0);
z-index: 10
}
.swiper-pagination.swiper-pagination-hidden {
opacity: 0
}
.swiper-pagination-disabled > .swiper-pagination, .swiper-pagination.swiper-pagination-disabled {
display: none !important
}
.swiper-horizontal > .swiper-pagination-bullets, .swiper-pagination-bullets.swiper-pagination-horizontal, .swiper-pagination-custom, .swiper-pagination-fraction {
bottom: var(--swiper-pagination-bottom, 8px);
top: var(--swiper-pagination-top, auto);
left: 0;
width: 100%
}
.swiper-pagination-bullets-dynamic {
overflow: hidden;
font-size: 0
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
transform: scale(.33);
position: relative
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {
transform: scale(1)
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {
transform: scale(1)
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {
transform: scale(.66)
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev {
transform: scale(.33)
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {
transform: scale(.66)
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {
transform: scale(.33)
}
.swiper-pagination-bullet {
width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));
height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));
display: inline-block;
border-radius: var(--swiper-pagination-bullet-border-radius, 50%);
background: var(--swiper-pagination-bullet-inactive-color, #000);
opacity: var(--swiper-pagination-bullet-inactive-opacity, .2)
}
button.swiper-pagination-bullet {
border: none;
margin: 0;
padding: 0;
box-shadow: none;
-webkit-appearance: none;
appearance: none
}
.swiper-pagination-clickable .swiper-pagination-bullet {
cursor: pointer
}
.swiper-pagination-bullet:only-child {
display: none !important
}
.swiper-pagination-bullet-active {
opacity: var(--swiper-pagination-bullet-opacity, 1);
background: var(--swiper-pagination-color, var(--swiper-theme-color))
}
.swiper-pagination-vertical.swiper-pagination-bullets, .swiper-vertical > .swiper-pagination-bullets {
right: var(--swiper-pagination-right, 8px);
left: var(--swiper-pagination-left, auto);
top: 50%;
transform: translate3d(0px, -50%, 0)
}
.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet, .swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet {
margin: var(--swiper-pagination-bullet-vertical-gap, 6px) 0;
display: block
}
.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic, .swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
top: 50%;
transform: translateY(-50%);
width: 8px
}
.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet, .swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
display: inline-block;
transition: .2s transform, .2s top
}
.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet, .swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {
margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px)
}
.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic, .swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
left: 50%;
transform: translateX(-50%);
white-space: nowrap
}
.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet, .swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
transition: .2s transform, .2s left
}
.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
transition: .2s transform, .2s right
}
.swiper-pagination-fraction {
color: var(--swiper-pagination-fraction-color, inherit)
}
.swiper-pagination-progressbar {
background: var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, .25));
position: absolute
}
.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
background: var(--swiper-pagination-color, var(--swiper-theme-color));
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
transform: scale(0);
transform-origin: left top
}
.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
transform-origin: right top
}
.swiper-horizontal > .swiper-pagination-progressbar, .swiper-pagination-progressbar.swiper-pagination-horizontal, .swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite, .swiper-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite {
width: 100%;
height: var(--swiper-pagination-progressbar-size, 4px);
left: 0;
top: 0
}
.swiper-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite, .swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite, .swiper-pagination-progressbar.swiper-pagination-vertical, .swiper-vertical > .swiper-pagination-progressbar {
width: var(--swiper-pagination-progressbar-size, 4px);
height: 100%;
left: 0;
top: 0
}
.swiper-pagination-lock {
display: none
}
.swiper-scrollbar {
border-radius: var(--swiper-scrollbar-border-radius, 10px);
position: relative;
touch-action: none;
background: var(--swiper-scrollbar-bg-color, rgba(0, 0, 0, .1))
}
.swiper-scrollbar-disabled > .swiper-scrollbar, .swiper-scrollbar.swiper-scrollbar-disabled {
display: none !important
}
.swiper-horizontal > .swiper-scrollbar, .swiper-scrollbar.swiper-scrollbar-horizontal {
position: absolute;
left: var(--swiper-scrollbar-sides-offset, 1%);
bottom: var(--swiper-scrollbar-bottom, 4px);
top: var(--swiper-scrollbar-top, auto);
z-index: 50;
height: var(--swiper-scrollbar-size, 4px);
width: calc(100% - 2 * var(--swiper-scrollbar-sides-offset, 1%))
}
.swiper-scrollbar.swiper-scrollbar-vertical, .swiper-vertical > .swiper-scrollbar {
position: absolute;
left: var(--swiper-scrollbar-left, auto);
right: var(--swiper-scrollbar-right, 4px);
top: var(--swiper-scrollbar-sides-offset, 1%);
z-index: 50;
width: var(--swiper-scrollbar-size, 4px);
height: calc(100% - 2 * var(--swiper-scrollbar-sides-offset, 1%))
}
.swiper-scrollbar-drag {
height: 100%;
width: 100%;
position: relative;
background: var(--swiper-scrollbar-drag-bg-color, rgba(0, 0, 0, .5));
border-radius: var(--swiper-scrollbar-border-radius, 10px);
left: 0;
top: 0
}
.swiper-scrollbar-cursor-drag {
cursor: move
}
.swiper-scrollbar-lock {
display: none
}
.swiper-zoom-container {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
text-align: center
}
.swiper-zoom-container > canvas, .swiper-zoom-container > img, .swiper-zoom-container > svg {
max-width: 100%;
max-height: 100%;
object-fit: contain
}
.swiper-slide-zoomed {
cursor: move;
touch-action: none
}
.swiper .swiper-notification {
position: absolute;
left: 0;
top: 0;
pointer-events: none;
opacity: 0;
z-index: -1000
}
.swiper-free-mode > .swiper-wrapper {
transition-timing-function: ease-out;
margin: 0 auto
}
.swiper-grid > .swiper-wrapper {
flex-wrap: wrap
}
.swiper-grid-column > .swiper-wrapper {
flex-wrap: wrap;
flex-direction: column
}
.swiper-fade.swiper-free-mode .swiper-slide {
transition-timing-function: ease-out
}
.swiper-fade .swiper-slide {
pointer-events: none;
transition-property: opacity
}
.swiper-fade .swiper-slide .swiper-slide {
pointer-events: none
}
.swiper-fade .swiper-slide-active {
pointer-events: auto
}
.swiper-fade .swiper-slide-active .swiper-slide-active {
pointer-events: auto
}
.swiper.swiper-cube {
overflow: visible
}
.swiper-cube .swiper-slide {
pointer-events: none;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
z-index: 1;
visibility: hidden;
transform-origin: 0 0;
width: 100%;
height: 100%
}
.swiper-cube .swiper-slide .swiper-slide {
pointer-events: none
}
.swiper-cube.swiper-rtl .swiper-slide {
transform-origin: 100% 0
}
.swiper-cube .swiper-slide-active, .swiper-cube .swiper-slide-active .swiper-slide-active {
pointer-events: auto
}
.swiper-cube .swiper-slide-active, .swiper-cube .swiper-slide-next, .swiper-cube .swiper-slide-prev {
pointer-events: auto;
visibility: visible
}
.swiper-cube .swiper-cube-shadow {
position: absolute;
left: 0;
bottom: 0px;
width: 100%;
height: 100%;
opacity: .6;
z-index: 0
}
.swiper-cube .swiper-cube-shadow:before {
content: '';
background: #000;
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
filter: blur(50px)
}
.swiper-cube .swiper-slide-next + .swiper-slide {
pointer-events: auto;
visibility: visible
}
.swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-bottom, .swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-left, .swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-right, .swiper-cube .swiper-slide-shadow-cube.swiper-slide-shadow-top {
z-index: 0;
-webkit-backface-visibility: hidden;
backface-visibility: hidden
}
.swiper.swiper-flip {
overflow: visible
}
.swiper-flip .swiper-slide {
pointer-events: none;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
z-index: 1
}
.swiper-flip .swiper-slide .swiper-slide {
pointer-events: none
}
.swiper-flip .swiper-slide-active, .swiper-flip .swiper-slide-active .swiper-slide-active {
pointer-events: auto
}
.swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-bottom, .swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-left, .swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-right, .swiper-flip .swiper-slide-shadow-flip.swiper-slide-shadow-top {
z-index: 0;
-webkit-backface-visibility: hidden;
backface-visibility: hidden
}
.swiper-creative .swiper-slide {
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
overflow: hidden;
transition-property: transform, opacity, height
}
.swiper.swiper-cards {
overflow: visible
}
.swiper-cards .swiper-slide {
transform-origin: center bottom;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
overflow: hidden
}

435
src/main/resources/static/files/assets/css/viewer.min.css

@ -0,0 +1,435 @@
/*!
* Viewer.js v1.11.7
* https://fengyuanchen.github.io/viewerjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2024-11-24T04:32:14.526Z
*/
.viewer-close:before, .viewer-flip-horizontal:before, .viewer-flip-vertical:before, .viewer-fullscreen-exit:before, .viewer-fullscreen:before, .viewer-next:before, .viewer-one-to-one:before, .viewer-play:before, .viewer-prev:before, .viewer-reset:before, .viewer-rotate-left:before, .viewer-rotate-right:before, .viewer-zoom-in:before, .viewer-zoom-out:before {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 560 40'%3E%3Cpath fill='%23fff' d='M49.6 17.9h20.2v3.9H49.6zm123.1 2 10.9-11 2.7 2.8-8.2 8.2 8.2 8.2-2.7 2.7-10.9-10.9zm94 0-10.8-11-2.7 2.8 8.1 8.2-8.1 8.2 2.7 2.7 10.8-10.9zM212 9.3l20.1 10.6L212 30.5V9.3zm161.5 4.6-7.2 6 7.2 5.9v-4h12.4v4l7.3-5.9-7.3-6v4h-12.4v-4zm40.2 12.3 5.9 7.2 5.9-7.2h-4V13.6h4l-5.9-7.3-5.9 7.3h4v12.6h-4zm35.9-16.5h6.3v2h-4.3V16h-2V9.7Zm14 0h6.2V16h-2v-4.3h-4.2v-2Zm6.2 14V30h-6.2v-2h4.2v-4.3h2Zm-14 6.3h-6.2v-6.3h2v4.4h4.3v2Zm-438 .1v-8.3H9.6v-3.9h8.2V9.7h3.9v8.2h8.1v3.9h-8.1v8.3h-3.9zM93.6 9.7h-5.8v3.9h2V30h3.8V9.7zm16.1 0h-5.8v3.9h1.9V30h3.9V9.7zm-11.9 4.1h3.9v3.9h-3.9zm0 8.2h3.9v3.9h-3.9zm244.6-11.7 7.2 5.9-7.2 6v-3.6c-5.4-.4-7.8.8-8.7 2.8-.8 1.7-1.8 4.9 2.8 8.2-6.3-2-7.5-6.9-6-11.3 1.6-4.4 8-5 11.9-4.9v-3.1Zm147.2 13.4h6.3V30h-2v-4.3h-4.3v-2zm14 6.3v-6.3h6.2v2h-4.3V30h-1.9zm6.2-14h-6.2V9.7h1.9V14h4.3v2zm-13.9 0h-6.3v-2h4.3V9.7h2V16zm33.3 12.5 8.6-8.6-8.6-8.7 1.9-1.9 8.6 8.7 8.6-8.7 1.9 1.9-8.6 8.7 8.6 8.6-1.9 2-8.6-8.7-8.6 8.7-1.9-2zM297 10.3l-7.1 5.9 7.2 6v-3.6c5.3-.4 7.7.8 8.7 2.8.8 1.7 1.7 4.9-2.9 8.2 6.3-2 7.5-6.9 6-11.3-1.6-4.4-7.9-5-11.8-4.9v-3.1Zm-157.3-.6c2.3 0 4.4.7 6 2l2.5-3 1.9 9.2h-9.3l2.6-3.1a6.2 6.2 0 0 0-9.9 5.1c0 3.4 2.8 6.3 6.2 6.3 2.8 0 5.1-1.9 6-4.4h4c-1 4.7-5 8.3-10 8.3a10 10 0 0 1-10-10.2 10 10 0 0 1 10-10.2Z'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-size: 280px;
color: transparent;
display: block;
font-size: 0;
height: 20px;
line-height: 0;
width: 20px
}
.viewer-zoom-in:before {
background-position: 0 0;
content: "Zoom In"
}
.viewer-zoom-out:before {
background-position: -20px 0;
content: "Zoom Out"
}
.viewer-one-to-one:before {
background-position: -40px 0;
content: "One to One"
}
.viewer-reset:before {
background-position: -60px 0;
content: "Reset"
}
.viewer-prev:before {
background-position: -80px 0;
content: "Previous"
}
.viewer-play:before {
background-position: -100px 0;
content: "Play"
}
.viewer-next:before {
background-position: -120px 0;
content: "Next"
}
.viewer-rotate-left:before {
background-position: -140px 0;
content: "Rotate Left"
}
.viewer-rotate-right:before {
background-position: -160px 0;
content: "Rotate Right"
}
.viewer-flip-horizontal:before {
background-position: -180px 0;
content: "Flip Horizontal"
}
.viewer-flip-vertical:before {
background-position: -200px 0;
content: "Flip Vertical"
}
.viewer-fullscreen:before {
background-position: -220px 0;
content: "Enter Full Screen"
}
.viewer-fullscreen-exit:before {
background-position: -240px 0;
content: "Exit Full Screen"
}
.viewer-close:before {
background-position: -260px 0;
content: "Close"
}
.viewer-container {
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
bottom: 0;
direction: ltr;
font-size: 0;
left: 0;
line-height: 0;
overflow: hidden;
position: absolute;
right: 0;
top: 0;
-ms-touch-action: none;
touch-action: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none
}
.viewer-container ::-moz-selection, .viewer-container::-moz-selection {
background-color: transparent
}
.viewer-container ::selection, .viewer-container::selection {
background-color: transparent
}
.viewer-container:focus {
outline: 0
}
.viewer-container img {
display: block;
height: auto;
max-height: none !important;
max-width: none !important;
min-height: 0 !important;
min-width: 0 !important;
width: 100%
}
.viewer-canvas {
bottom: 0;
left: 0;
overflow: hidden;
position: absolute;
right: 0;
top: 0
}
.viewer-canvas > img {
height: auto;
margin: 15px auto;
max-width: 90% !important;
width: auto
}
.viewer-footer {
bottom: 0;
left: 0;
overflow: hidden;
position: absolute;
right: 0;
text-align: center
}
.viewer-navbar {
background-color: rgba(0, 0, 0, .5);
overflow: hidden
}
.viewer-list {
box-sizing: content-box;
height: 50px;
margin: 0;
overflow: hidden;
padding: 1px 0
}
.viewer-list > li {
color: transparent;
cursor: pointer;
float: left;
font-size: 0;
height: 50px;
line-height: 0;
opacity: .5;
overflow: hidden;
transition: opacity .15s;
width: 30px
}
.viewer-list > li:focus, .viewer-list > li:hover {
opacity: .75
}
.viewer-list > li:focus {
outline: 0
}
.viewer-list > li + li {
margin-left: 1px
}
.viewer-list > .viewer-loading {
position: relative
}
.viewer-list > .viewer-loading:after {
border-width: 2px;
height: 20px;
margin-left: -10px;
margin-top: -10px;
width: 20px
}
.viewer-list > .viewer-active, .viewer-list > .viewer-active:focus, .viewer-list > .viewer-active:hover {
opacity: 1
}
.viewer-player {
background-color: #000;
bottom: 0;
cursor: none;
display: none;
right: 0;
z-index: 1
}
.viewer-player, .viewer-player > img {
left: 0;
position: absolute;
top: 0
}
.viewer-toolbar > ul {
display: inline-block;
margin: 0 auto 5px;
overflow: hidden;
padding: 6px 3px
}
.viewer-toolbar > ul > li {
background-color: rgba(0, 0, 0, .5);
border-radius: 50%;
cursor: pointer;
float: left;
height: 24px;
overflow: hidden;
transition: background-color .15s;
width: 24px
}
.viewer-toolbar > ul > li:focus, .viewer-toolbar > ul > li:hover {
background-color: rgba(0, 0, 0, .8)
}
.viewer-toolbar > ul > li:focus {
box-shadow: 0 0 3px #fff;
outline: 0;
position: relative;
z-index: 1
}
.viewer-toolbar > ul > li:before {
margin: 2px
}
.viewer-toolbar > ul > li + li {
margin-left: 1px
}
.viewer-toolbar > ul > .viewer-small {
height: 18px;
margin-bottom: 3px;
margin-top: 3px;
width: 18px
}
.viewer-toolbar > ul > .viewer-small:before {
margin: -1px
}
.viewer-toolbar > ul > .viewer-large {
height: 30px;
margin-bottom: -3px;
margin-top: -3px;
width: 30px
}
.viewer-toolbar > ul > .viewer-large:before {
margin: 5px
}
.viewer-tooltip {
background-color: rgba(0, 0, 0, .8);
border-radius: 10px;
color: #fff;
display: none;
font-size: 12px;
height: 20px;
left: 50%;
line-height: 20px;
margin-left: -25px;
margin-top: -10px;
position: absolute;
text-align: center;
top: 50%;
width: 50px
}
.viewer-title {
color: #ccc;
display: inline-block;
font-size: 12px;
line-height: 1.2;
margin: 5px 5%;
max-width: 90%;
min-height: 14px;
opacity: .8;
overflow: hidden;
text-overflow: ellipsis;
transition: opacity .15s;
white-space: nowrap
}
.viewer-title:hover {
opacity: 1
}
.viewer-button {
-webkit-app-region: no-drag;
background-color: rgba(0, 0, 0, .5);
border-radius: 50%;
cursor: pointer;
height: 80px;
overflow: hidden;
position: absolute;
right: -40px;
top: -40px;
transition: background-color .15s;
width: 80px
}
.viewer-button:focus, .viewer-button:hover {
background-color: rgba(0, 0, 0, .8)
}
.viewer-button:focus {
box-shadow: 0 0 3px #fff;
outline: 0
}
.viewer-button:before {
bottom: 15px;
left: 15px;
position: absolute
}
.viewer-fixed {
position: fixed
}
.viewer-open {
overflow: hidden
}
.viewer-show {
display: block
}
.viewer-hide {
display: none
}
.viewer-backdrop {
background-color: rgba(0, 0, 0, .5)
}
.viewer-invisible {
visibility: hidden
}
.viewer-move {
cursor: move;
cursor: grab
}
.viewer-fade {
opacity: 0
}
.viewer-in {
opacity: 1
}
.viewer-transition {
transition: all .3s
}
@keyframes viewer-spinner {
0% {
transform: rotate(0deg)
}
to {
transform: rotate(1turn)
}
}
.viewer-loading:after {
animation: viewer-spinner 1s linear infinite;
border: 4px solid hsla(0, 0%, 100%, .1);
border-left-color: hsla(0, 0%, 100%, .5);
border-radius: 50%;
content: "";
display: inline-block;
height: 40px;
left: 50%;
margin-left: -20px;
margin-top: -20px;
position: absolute;
top: 50%;
width: 40px;
z-index: 1
}
@media (max-width: 767px) {
.viewer-hide-xs-down {
display: none
}
}
@media (max-width: 991px) {
.viewer-hide-sm-down {
display: none
}
}
@media (max-width: 1199px) {
.viewer-hide-md-down {
display: none
}
}

3618
src/main/resources/static/files/assets/js/leaflet.js
File diff suppressed because it is too large
View File

589
src/main/resources/static/files/assets/js/leaflet.markercluster.js

@ -0,0 +1,589 @@
!function (e, t) {
"object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t(((e = e || self).Leaflet = e.Leaflet || {}, e.Leaflet.markercluster = {}))
}(this, function (e) {
"use strict";
var t = L.MarkerClusterGroup = L.FeatureGroup.extend({
options: {
maxClusterRadius: 80,
iconCreateFunction: null,
clusterPane: L.Marker.prototype.options.pane,
spiderfyOnEveryZoom: !1,
spiderfyOnMaxZoom: !0,
showCoverageOnHover: !0,
zoomToBoundsOnClick: !0,
singleMarkerMode: !1,
disableClusteringAtZoom: null,
removeOutsideVisibleBounds: !0,
animate: !0,
animateAddingMarkers: !1,
spiderfyShapePositions: null,
spiderfyDistanceMultiplier: 1,
spiderLegPolylineOptions: {weight: 1.5, color: "#222", opacity: .5},
chunkedLoading: !1,
chunkInterval: 200,
chunkDelay: 50,
chunkProgress: null,
polygonOptions: {}
}, initialize: function (e) {
L.Util.setOptions(this, e), this.options.iconCreateFunction || (this.options.iconCreateFunction = this._defaultIconCreateFunction), this._featureGroup = L.featureGroup(), this._featureGroup.addEventParent(this), this._nonPointGroup = L.featureGroup(), this._nonPointGroup.addEventParent(this), this._inZoomAnimation = 0, this._needsClustering = [], this._needsRemoving = [], this._currentShownBounds = null, this._queue = [], this._childMarkerEventHandlers = {
dragstart: this._childMarkerDragStart,
move: this._childMarkerMoved,
dragend: this._childMarkerDragEnd
};
var t = L.DomUtil.TRANSITION && this.options.animate;
L.extend(this, t ? this._withAnimation : this._noAnimation), this._markerCluster = t ? L.MarkerCluster : L.MarkerClusterNonAnimated
}, addLayer: function (e) {
if (e instanceof L.LayerGroup) return this.addLayers([e]);
if (!e.getLatLng) return this._nonPointGroup.addLayer(e), this.fire("layeradd", {layer: e}), this;
if (!this._map) return this._needsClustering.push(e), this.fire("layeradd", {layer: e}), this;
if (this.hasLayer(e)) return this;
this._unspiderfy && this._unspiderfy(), this._addLayer(e, this._maxZoom), this.fire("layeradd", {layer: e}), this._topClusterLevel._recalculateBounds(), this._refreshClustersIcons();
var t = e, i = this._zoom;
if (e.__parent) for (; t.__parent._zoom >= i;) t = t.__parent;
return this._currentShownBounds.contains(t.getLatLng()) && (this.options.animateAddingMarkers ? this._animationAddLayer(e, t) : this._animationAddLayerNonAnimated(e, t)), this
}, removeLayer: function (e) {
return e instanceof L.LayerGroup ? this.removeLayers([e]) : (e.getLatLng ? this._map ? e.__parent && (this._unspiderfy && (this._unspiderfy(), this._unspiderfyLayer(e)), this._removeLayer(e, !0), this.fire("layerremove", {layer: e}), this._topClusterLevel._recalculateBounds(), this._refreshClustersIcons(), e.off(this._childMarkerEventHandlers, this), this._featureGroup.hasLayer(e) && (this._featureGroup.removeLayer(e), e.clusterShow && e.clusterShow())) : (!this._arraySplice(this._needsClustering, e) && this.hasLayer(e) && this._needsRemoving.push({
layer: e,
latlng: e._latlng
}), this.fire("layerremove", {layer: e})) : (this._nonPointGroup.removeLayer(e), this.fire("layerremove", {layer: e})), this)
}, addLayers: function (n, s) {
if (!L.Util.isArray(n)) return this.addLayer(n);
var o, a = this._featureGroup, h = this._nonPointGroup, l = this.options.chunkedLoading,
u = this.options.chunkInterval, _ = this.options.chunkProgress, d = n.length, p = 0, c = !0;
if (this._map) {
var f = (new Date).getTime(), m = L.bind(function () {
var e = (new Date).getTime();
for (this._map && this._unspiderfy && this._unspiderfy(); p < d; p++) {
if (l && p % 200 == 0) {
var t = (new Date).getTime() - e;
if (u < t) break
}
if ((o = n[p]) instanceof L.LayerGroup) c && (n = n.slice(), c = !1), this._extractNonGroupLayers(o, n), d = n.length; else if (o.getLatLng) {
if (!this.hasLayer(o) && (this._addLayer(o, this._maxZoom), s || this.fire("layeradd", {layer: o}), o.__parent && 2 === o.__parent.getChildCount())) {
var i = o.__parent.getAllChildMarkers(), r = i[0] === o ? i[1] : i[0];
a.removeLayer(r)
}
} else h.addLayer(o), s || this.fire("layeradd", {layer: o})
}
_ && _(p, d, (new Date).getTime() - f), p === d ? (this._topClusterLevel._recalculateBounds(), this._refreshClustersIcons(), this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds)) : setTimeout(m, this.options.chunkDelay)
}, this);
m()
} else for (var e = this._needsClustering; p < d; p++) (o = n[p]) instanceof L.LayerGroup ? (c && (n = n.slice(), c = !1), this._extractNonGroupLayers(o, n), d = n.length) : o.getLatLng ? this.hasLayer(o) || e.push(o) : h.addLayer(o);
return this
}, removeLayers: function (e) {
var t, i, r = e.length, n = this._featureGroup, s = this._nonPointGroup, o = !0;
if (!this._map) {
for (t = 0; t < r; t++) (i = e[t]) instanceof L.LayerGroup ? (o && (e = e.slice(), o = !1), this._extractNonGroupLayers(i, e), r = e.length) : (this._arraySplice(this._needsClustering, i), s.removeLayer(i), this.hasLayer(i) && this._needsRemoving.push({
layer: i,
latlng: i._latlng
}), this.fire("layerremove", {layer: i}));
return this
}
if (this._unspiderfy) {
this._unspiderfy();
var a = e.slice(), h = r;
for (t = 0; t < h; t++) (i = a[t]) instanceof L.LayerGroup ? (this._extractNonGroupLayers(i, a), h = a.length) : this._unspiderfyLayer(i)
}
for (t = 0; t < r; t++) (i = e[t]) instanceof L.LayerGroup ? (o && (e = e.slice(), o = !1), this._extractNonGroupLayers(i, e), r = e.length) : i.__parent ? (this._removeLayer(i, !0, !0), this.fire("layerremove", {layer: i}), n.hasLayer(i) && (n.removeLayer(i), i.clusterShow && i.clusterShow())) : (s.removeLayer(i), this.fire("layerremove", {layer: i}));
return this._topClusterLevel._recalculateBounds(), this._refreshClustersIcons(), this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds), this
}, clearLayers: function () {
return this._map || (this._needsClustering = [], this._needsRemoving = [], delete this._gridClusters, delete this._gridUnclustered), this._noanimationUnspiderfy && this._noanimationUnspiderfy(), this._featureGroup.clearLayers(), this._nonPointGroup.clearLayers(), this.eachLayer(function (e) {
e.off(this._childMarkerEventHandlers, this), delete e.__parent
}, this), this._map && this._generateInitialClusters(), this
}, getBounds: function () {
var e = new L.LatLngBounds;
this._topClusterLevel && e.extend(this._topClusterLevel._bounds);
for (var t = this._needsClustering.length - 1; 0 <= t; t--) e.extend(this._needsClustering[t].getLatLng());
return e.extend(this._nonPointGroup.getBounds()), e
}, eachLayer: function (e, t) {
var i, r, n, s = this._needsClustering.slice(), o = this._needsRemoving;
for (this._topClusterLevel && this._topClusterLevel.getAllChildMarkers(s), r = s.length - 1; 0 <= r; r--) {
for (i = !0, n = o.length - 1; 0 <= n; n--) if (o[n].layer === s[r]) {
i = !1;
break
}
i && e.call(t, s[r])
}
this._nonPointGroup.eachLayer(e, t)
}, getLayers: function () {
var t = [];
return this.eachLayer(function (e) {
t.push(e)
}), t
}, getLayer: function (t) {
var i = null;
return t = parseInt(t, 10), this.eachLayer(function (e) {
L.stamp(e) === t && (i = e)
}), i
}, hasLayer: function (e) {
if (!e) return !1;
var t, i = this._needsClustering;
for (t = i.length - 1; 0 <= t; t--) if (i[t] === e) return !0;
for (t = (i = this._needsRemoving).length - 1; 0 <= t; t--) if (i[t].layer === e) return !1;
return !(!e.__parent || e.__parent._group !== this) || this._nonPointGroup.hasLayer(e)
}, zoomToShowLayer: function (e, t) {
var i = this._map;
"function" != typeof t && (t = function () {
});
var r = function () {
!i.hasLayer(e) && !i.hasLayer(e.__parent) || this._inZoomAnimation || (this._map.off("moveend", r, this), this.off("animationend", r, this), i.hasLayer(e) ? t() : e.__parent._icon && (this.once("spiderfied", t, this), e.__parent.spiderfy()))
};
e._icon && this._map.getBounds().contains(e.getLatLng()) ? t() : e.__parent._zoom < Math.round(this._map._zoom) ? (this._map.on("moveend", r, this), this._map.panTo(e.getLatLng())) : (this._map.on("moveend", r, this), this.on("animationend", r, this), e.__parent.zoomToBounds())
}, onAdd: function (e) {
var t, i, r;
if (this._map = e, !isFinite(this._map.getMaxZoom())) throw "Map has no maxZoom specified";
for (this._featureGroup.addTo(e), this._nonPointGroup.addTo(e), this._gridClusters || this._generateInitialClusters(), this._maxLat = e.options.crs.projection.MAX_LATITUDE, t = 0, i = this._needsRemoving.length; t < i; t++) (r = this._needsRemoving[t]).newlatlng = r.layer._latlng, r.layer._latlng = r.latlng;
for (t = 0, i = this._needsRemoving.length; t < i; t++) r = this._needsRemoving[t], this._removeLayer(r.layer, !0), r.layer._latlng = r.newlatlng;
this._needsRemoving = [], this._zoom = Math.round(this._map._zoom), this._currentShownBounds = this._getExpandedVisibleBounds(), this._map.on("zoomend", this._zoomEnd, this), this._map.on("moveend", this._moveEnd, this), this._spiderfierOnAdd && this._spiderfierOnAdd(), this._bindEvents(), i = this._needsClustering, this._needsClustering = [], this.addLayers(i, !0)
}, onRemove: function (e) {
e.off("zoomend", this._zoomEnd, this), e.off("moveend", this._moveEnd, this), this._unbindEvents(), this._map._mapPane.className = this._map._mapPane.className.replace(" leaflet-cluster-anim", ""), this._spiderfierOnRemove && this._spiderfierOnRemove(), delete this._maxLat, this._hideCoverage(), this._featureGroup.remove(), this._nonPointGroup.remove(), this._featureGroup.clearLayers(), this._map = null
}, getVisibleParent: function (e) {
for (var t = e; t && !t._icon;) t = t.__parent;
return t || null
}, _arraySplice: function (e, t) {
for (var i = e.length - 1; 0 <= i; i--) if (e[i] === t) return e.splice(i, 1), !0
}, _removeFromGridUnclustered: function (e, t) {
for (var i = this._map, r = this._gridUnclustered, n = Math.floor(this._map.getMinZoom()); n <= t && r[t].removeObject(e, i.project(e.getLatLng(), t)); t--) ;
}, _childMarkerDragStart: function (e) {
e.target.__dragStart = e.target._latlng
}, _childMarkerMoved: function (e) {
if (!this._ignoreMove && !e.target.__dragStart) {
var t = e.target._popup && e.target._popup.isOpen();
this._moveChild(e.target, e.oldLatLng, e.latlng), t && e.target.openPopup()
}
}, _moveChild: function (e, t, i) {
e._latlng = t, this.removeLayer(e), e._latlng = i, this.addLayer(e)
}, _childMarkerDragEnd: function (e) {
var t = e.target.__dragStart;
delete e.target.__dragStart, t && this._moveChild(e.target, t, e.target._latlng)
}, _removeLayer: function (e, t, i) {
var r = this._gridClusters, n = this._gridUnclustered, s = this._featureGroup, o = this._map,
a = Math.floor(this._map.getMinZoom());
t && this._removeFromGridUnclustered(e, this._maxZoom);
var h, l = e.__parent, u = l._markers;
for (this._arraySplice(u, e); l && (l._childCount--, l._boundsNeedUpdate = !0, !(l._zoom < a));) t && l._childCount <= 1 ? (h = l._markers[0] === e ? l._markers[1] : l._markers[0], r[l._zoom].removeObject(l, o.project(l._cLatLng, l._zoom)), n[l._zoom].addObject(h, o.project(h.getLatLng(), l._zoom)), this._arraySplice(l.__parent._childClusters, l), l.__parent._markers.push(h), h.__parent = l.__parent, l._icon && (s.removeLayer(l), i || s.addLayer(h))) : l._iconNeedsUpdate = !0, l = l.__parent;
delete e.__parent
}, _isOrIsParent: function (e, t) {
for (; t;) {
if (e === t) return !0;
t = t.parentNode
}
return !1
}, fire: function (e, t, i) {
if (t && t.layer instanceof L.MarkerCluster) {
if (t.originalEvent && this._isOrIsParent(t.layer._icon, t.originalEvent.relatedTarget)) return;
e = "cluster" + e
}
L.FeatureGroup.prototype.fire.call(this, e, t, i)
}, listens: function (e, t) {
return L.FeatureGroup.prototype.listens.call(this, e, t) || L.FeatureGroup.prototype.listens.call(this, "cluster" + e, t)
}, _defaultIconCreateFunction: function (e) {
var t = e.getChildCount(), i = " marker-cluster-";
return i += t < 10 ? "small" : t < 100 ? "medium" : "large", new L.DivIcon({
html: "<div><span>" + t + "</span></div>",
className: "marker-cluster" + i,
iconSize: new L.Point(40, 40)
})
}, _bindEvents: function () {
var e = this._map, t = this.options.spiderfyOnMaxZoom, i = this.options.showCoverageOnHover,
r = this.options.zoomToBoundsOnClick, n = this.options.spiderfyOnEveryZoom;
(t || r || n) && this.on("clusterclick clusterkeypress", this._zoomOrSpiderfy, this), i && (this.on("clustermouseover", this._showCoverage, this), this.on("clustermouseout", this._hideCoverage, this), e.on("zoomend", this._hideCoverage, this))
}, _zoomOrSpiderfy: function (e) {
var t = e.layer, i = t;
if ("clusterkeypress" !== e.type || !e.originalEvent || 13 === e.originalEvent.keyCode) {
for (; 1 === i._childClusters.length;) i = i._childClusters[0];
i._zoom === this._maxZoom && i._childCount === t._childCount && this.options.spiderfyOnMaxZoom ? t.spiderfy() : this.options.zoomToBoundsOnClick && t.zoomToBounds(), this.options.spiderfyOnEveryZoom && t.spiderfy(), e.originalEvent && 13 === e.originalEvent.keyCode && this._map._container.focus()
}
}, _showCoverage: function (e) {
var t = this._map;
this._inZoomAnimation || (this._shownPolygon && t.removeLayer(this._shownPolygon), 2 < e.layer.getChildCount() && e.layer !== this._spiderfied && (this._shownPolygon = new L.Polygon(e.layer.getConvexHull(), this.options.polygonOptions), t.addLayer(this._shownPolygon)))
}, _hideCoverage: function () {
this._shownPolygon && (this._map.removeLayer(this._shownPolygon), this._shownPolygon = null)
}, _unbindEvents: function () {
var e = this.options.spiderfyOnMaxZoom, t = this.options.showCoverageOnHover,
i = this.options.zoomToBoundsOnClick, r = this.options.spiderfyOnEveryZoom, n = this._map;
(e || i || r) && this.off("clusterclick clusterkeypress", this._zoomOrSpiderfy, this), t && (this.off("clustermouseover", this._showCoverage, this), this.off("clustermouseout", this._hideCoverage, this), n.off("zoomend", this._hideCoverage, this))
}, _zoomEnd: function () {
this._map && (this._mergeSplitClusters(), this._zoom = Math.round(this._map._zoom), this._currentShownBounds = this._getExpandedVisibleBounds())
}, _moveEnd: function () {
if (!this._inZoomAnimation) {
var e = this._getExpandedVisibleBounds();
this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), this._zoom, e), this._topClusterLevel._recursivelyAddChildrenToMap(null, Math.round(this._map._zoom), e), this._currentShownBounds = e
}
}, _generateInitialClusters: function () {
var e = Math.ceil(this._map.getMaxZoom()), t = Math.floor(this._map.getMinZoom()),
i = this.options.maxClusterRadius, r = i;
"function" != typeof i && (r = function () {
return i
}), null !== this.options.disableClusteringAtZoom && (e = this.options.disableClusteringAtZoom - 1), this._maxZoom = e, this._gridClusters = {}, this._gridUnclustered = {};
for (var n = e; t <= n; n--) this._gridClusters[n] = new L.DistanceGrid(r(n)), this._gridUnclustered[n] = new L.DistanceGrid(r(n));
this._topClusterLevel = new this._markerCluster(this, t - 1)
}, _addLayer: function (e, t) {
var i, r, n = this._gridClusters, s = this._gridUnclustered, o = Math.floor(this._map.getMinZoom());
for (this.options.singleMarkerMode && this._overrideMarkerIcon(e), e.on(this._childMarkerEventHandlers, this); o <= t; t--) {
i = this._map.project(e.getLatLng(), t);
var a = n[t].getNearObject(i);
if (a) return a._addChild(e), void (e.__parent = a);
if (a = s[t].getNearObject(i)) {
var h = a.__parent;
h && this._removeLayer(a, !1);
var l = new this._markerCluster(this, t, a, e);
n[t].addObject(l, this._map.project(l._cLatLng, t)), a.__parent = l;
var u = e.__parent = l;
for (r = t - 1; r > h._zoom; r--) u = new this._markerCluster(this, r, u), n[r].addObject(u, this._map.project(a.getLatLng(), r));
return h._addChild(u), void this._removeFromGridUnclustered(a, t)
}
s[t].addObject(e, i)
}
this._topClusterLevel._addChild(e), e.__parent = this._topClusterLevel
}, _refreshClustersIcons: function () {
this._featureGroup.eachLayer(function (e) {
e instanceof L.MarkerCluster && e._iconNeedsUpdate && e._updateIcon()
})
}, _enqueue: function (e) {
this._queue.push(e), this._queueTimeout || (this._queueTimeout = setTimeout(L.bind(this._processQueue, this), 300))
}, _processQueue: function () {
for (var e = 0; e < this._queue.length; e++) this._queue[e].call(this);
this._queue.length = 0, clearTimeout(this._queueTimeout), this._queueTimeout = null
}, _mergeSplitClusters: function () {
var e = Math.round(this._map._zoom);
this._processQueue(), this._zoom < e && this._currentShownBounds.intersects(this._getExpandedVisibleBounds()) ? (this._animationStart(), this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), this._zoom, this._getExpandedVisibleBounds()), this._animationZoomIn(this._zoom, e)) : this._zoom > e ? (this._animationStart(), this._animationZoomOut(this._zoom, e)) : this._moveEnd()
}, _getExpandedVisibleBounds: function () {
return this.options.removeOutsideVisibleBounds ? L.Browser.mobile ? this._checkBoundsMaxLat(this._map.getBounds()) : this._checkBoundsMaxLat(this._map.getBounds().pad(1)) : this._mapBoundsInfinite
}, _checkBoundsMaxLat: function (e) {
var t = this._maxLat;
return void 0 !== t && (e.getNorth() >= t && (e._northEast.lat = 1 / 0), e.getSouth() <= -t && (e._southWest.lat = -1 / 0)), e
}, _animationAddLayerNonAnimated: function (e, t) {
if (t === e) this._featureGroup.addLayer(e); else if (2 === t._childCount) {
t._addToMap();
var i = t.getAllChildMarkers();
this._featureGroup.removeLayer(i[0]), this._featureGroup.removeLayer(i[1])
} else t._updateIcon()
}, _extractNonGroupLayers: function (e, t) {
var i, r = e.getLayers(), n = 0;
for (t = t || []; n < r.length; n++) (i = r[n]) instanceof L.LayerGroup ? this._extractNonGroupLayers(i, t) : t.push(i);
return t
}, _overrideMarkerIcon: function (e) {
return e.options.icon = this.options.iconCreateFunction({
getChildCount: function () {
return 1
}, getAllChildMarkers: function () {
return [e]
}
})
}
});
L.MarkerClusterGroup.include({_mapBoundsInfinite: new L.LatLngBounds(new L.LatLng(-1 / 0, -1 / 0), new L.LatLng(1 / 0, 1 / 0))}), L.MarkerClusterGroup.include({
_noAnimation: {
_animationStart: function () {
}, _animationZoomIn: function (e, t) {
this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), e), this._topClusterLevel._recursivelyAddChildrenToMap(null, t, this._getExpandedVisibleBounds()), this.fire("animationend")
}, _animationZoomOut: function (e, t) {
this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), e), this._topClusterLevel._recursivelyAddChildrenToMap(null, t, this._getExpandedVisibleBounds()), this.fire("animationend")
}, _animationAddLayer: function (e, t) {
this._animationAddLayerNonAnimated(e, t)
}
}, _withAnimation: {
_animationStart: function () {
this._map._mapPane.className += " leaflet-cluster-anim", this._inZoomAnimation++
}, _animationZoomIn: function (n, s) {
var o, a = this._getExpandedVisibleBounds(), h = this._featureGroup,
e = Math.floor(this._map.getMinZoom());
this._ignoreMove = !0, this._topClusterLevel._recursively(a, n, e, function (e) {
var t, i = e._latlng, r = e._markers;
for (a.contains(i) || (i = null), e._isSingleParent() && n + 1 === s ? (h.removeLayer(e), e._recursivelyAddChildrenToMap(null, s, a)) : (e.clusterHide(), e._recursivelyAddChildrenToMap(i, s, a)), o = r.length - 1; 0 <= o; o--) t = r[o], a.contains(t._latlng) || h.removeLayer(t)
}), this._forceLayout(), this._topClusterLevel._recursivelyBecomeVisible(a, s), h.eachLayer(function (e) {
e instanceof L.MarkerCluster || !e._icon || e.clusterShow()
}), this._topClusterLevel._recursively(a, n, s, function (e) {
e._recursivelyRestoreChildPositions(s)
}), this._ignoreMove = !1, this._enqueue(function () {
this._topClusterLevel._recursively(a, n, e, function (e) {
h.removeLayer(e), e.clusterShow()
}), this._animationEnd()
})
}, _animationZoomOut: function (e, t) {
this._animationZoomOutSingle(this._topClusterLevel, e - 1, t), this._topClusterLevel._recursivelyAddChildrenToMap(null, t, this._getExpandedVisibleBounds()), this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, Math.floor(this._map.getMinZoom()), e, this._getExpandedVisibleBounds())
}, _animationAddLayer: function (e, t) {
var i = this, r = this._featureGroup;
r.addLayer(e), t !== e && (2 < t._childCount ? (t._updateIcon(), this._forceLayout(), this._animationStart(), e._setPos(this._map.latLngToLayerPoint(t.getLatLng())), e.clusterHide(), this._enqueue(function () {
r.removeLayer(e), e.clusterShow(), i._animationEnd()
})) : (this._forceLayout(), i._animationStart(), i._animationZoomOutSingle(t, this._map.getMaxZoom(), this._zoom)))
}
}, _animationZoomOutSingle: function (t, i, r) {
var n = this._getExpandedVisibleBounds(), s = Math.floor(this._map.getMinZoom());
t._recursivelyAnimateChildrenInAndAddSelfToMap(n, s, i + 1, r);
var o = this;
this._forceLayout(), t._recursivelyBecomeVisible(n, r), this._enqueue(function () {
if (1 === t._childCount) {
var e = t._markers[0];
this._ignoreMove = !0, e.setLatLng(e.getLatLng()), this._ignoreMove = !1, e.clusterShow && e.clusterShow()
} else t._recursively(n, r, s, function (e) {
e._recursivelyRemoveChildrenFromMap(n, s, i + 1)
});
o._animationEnd()
})
}, _animationEnd: function () {
this._map && (this._map._mapPane.className = this._map._mapPane.className.replace(" leaflet-cluster-anim", "")), this._inZoomAnimation--, this.fire("animationend")
}, _forceLayout: function () {
L.Util.falseFn(document.body.offsetWidth)
}
}), L.markerClusterGroup = function (e) {
return new L.MarkerClusterGroup(e)
};
var i = L.MarkerCluster = L.Marker.extend({
options: L.Icon.prototype.options, initialize: function (e, t, i, r) {
L.Marker.prototype.initialize.call(this, i ? i._cLatLng || i.getLatLng() : new L.LatLng(0, 0), {
icon: this,
pane: e.options.clusterPane
}), this._group = e, this._zoom = t, this._markers = [], this._childClusters = [], this._childCount = 0, this._iconNeedsUpdate = !0, this._boundsNeedUpdate = !0, this._bounds = new L.LatLngBounds, i && this._addChild(i), r && this._addChild(r)
}, getAllChildMarkers: function (e, t) {
e = e || [];
for (var i = this._childClusters.length - 1; 0 <= i; i--) this._childClusters[i].getAllChildMarkers(e, t);
for (var r = this._markers.length - 1; 0 <= r; r--) t && this._markers[r].__dragStart || e.push(this._markers[r]);
return e
}, getChildCount: function () {
return this._childCount
}, zoomToBounds: function (e) {
for (var t, i = this._childClusters.slice(), r = this._group._map, n = r.getBoundsZoom(this._bounds), s = this._zoom + 1, o = r.getZoom(); 0 < i.length && s < n;) {
s++;
var a = [];
for (t = 0; t < i.length; t++) a = a.concat(i[t]._childClusters);
i = a
}
s < n ? this._group._map.setView(this._latlng, s) : n <= o ? this._group._map.setView(this._latlng, o + 1) : this._group._map.fitBounds(this._bounds, e)
}, getBounds: function () {
var e = new L.LatLngBounds;
return e.extend(this._bounds), e
}, _updateIcon: function () {
this._iconNeedsUpdate = !0, this._icon && this.setIcon(this)
}, createIcon: function () {
return this._iconNeedsUpdate && (this._iconObj = this._group.options.iconCreateFunction(this), this._iconNeedsUpdate = !1), this._iconObj.createIcon()
}, createShadow: function () {
return this._iconObj.createShadow()
}, _addChild: function (e, t) {
this._iconNeedsUpdate = !0, this._boundsNeedUpdate = !0, this._setClusterCenter(e), e instanceof L.MarkerCluster ? (t || (this._childClusters.push(e), e.__parent = this), this._childCount += e._childCount) : (t || this._markers.push(e), this._childCount++), this.__parent && this.__parent._addChild(e, !0)
}, _setClusterCenter: function (e) {
this._cLatLng || (this._cLatLng = e._cLatLng || e._latlng)
}, _resetBounds: function () {
var e = this._bounds;
e._southWest && (e._southWest.lat = 1 / 0, e._southWest.lng = 1 / 0), e._northEast && (e._northEast.lat = -1 / 0, e._northEast.lng = -1 / 0)
}, _recalculateBounds: function () {
var e, t, i, r, n = this._markers, s = this._childClusters, o = 0, a = 0, h = this._childCount;
if (0 !== h) {
for (this._resetBounds(), e = 0; e < n.length; e++) i = n[e]._latlng, this._bounds.extend(i), o += i.lat, a += i.lng;
for (e = 0; e < s.length; e++) (t = s[e])._boundsNeedUpdate && t._recalculateBounds(), this._bounds.extend(t._bounds), i = t._wLatLng, r = t._childCount, o += i.lat * r, a += i.lng * r;
this._latlng = this._wLatLng = new L.LatLng(o / h, a / h), this._boundsNeedUpdate = !1
}
}, _addToMap: function (e) {
e && (this._backupLatlng = this._latlng, this.setLatLng(e)), this._group._featureGroup.addLayer(this)
}, _recursivelyAnimateChildrenIn: function (e, n, t) {
this._recursively(e, this._group._map.getMinZoom(), t - 1, function (e) {
var t, i, r = e._markers;
for (t = r.length - 1; 0 <= t; t--) (i = r[t])._icon && (i._setPos(n), i.clusterHide())
}, function (e) {
var t, i, r = e._childClusters;
for (t = r.length - 1; 0 <= t; t--) (i = r[t])._icon && (i._setPos(n), i.clusterHide())
})
}, _recursivelyAnimateChildrenInAndAddSelfToMap: function (t, i, r, n) {
this._recursively(t, n, i, function (e) {
e._recursivelyAnimateChildrenIn(t, e._group._map.latLngToLayerPoint(e.getLatLng()).round(), r), e._isSingleParent() && r - 1 === n ? (e.clusterShow(), e._recursivelyRemoveChildrenFromMap(t, i, r)) : e.clusterHide(), e._addToMap()
})
}, _recursivelyBecomeVisible: function (e, t) {
this._recursively(e, this._group._map.getMinZoom(), t, null, function (e) {
e.clusterShow()
})
}, _recursivelyAddChildrenToMap: function (r, n, s) {
this._recursively(s, this._group._map.getMinZoom() - 1, n, function (e) {
if (n !== e._zoom) for (var t = e._markers.length - 1; 0 <= t; t--) {
var i = e._markers[t];
s.contains(i._latlng) && (r && (i._backupLatlng = i.getLatLng(), i.setLatLng(r), i.clusterHide && i.clusterHide()), e._group._featureGroup.addLayer(i))
}
}, function (e) {
e._addToMap(r)
})
}, _recursivelyRestoreChildPositions: function (e) {
for (var t = this._markers.length - 1; 0 <= t; t--) {
var i = this._markers[t];
i._backupLatlng && (i.setLatLng(i._backupLatlng), delete i._backupLatlng)
}
if (e - 1 === this._zoom) for (var r = this._childClusters.length - 1; 0 <= r; r--) this._childClusters[r]._restorePosition(); else for (var n = this._childClusters.length - 1; 0 <= n; n--) this._childClusters[n]._recursivelyRestoreChildPositions(e)
}, _restorePosition: function () {
this._backupLatlng && (this.setLatLng(this._backupLatlng), delete this._backupLatlng)
}, _recursivelyRemoveChildrenFromMap: function (e, t, i, r) {
var n, s;
this._recursively(e, t - 1, i - 1, function (e) {
for (s = e._markers.length - 1; 0 <= s; s--) n = e._markers[s], r && r.contains(n._latlng) || (e._group._featureGroup.removeLayer(n), n.clusterShow && n.clusterShow())
}, function (e) {
for (s = e._childClusters.length - 1; 0 <= s; s--) n = e._childClusters[s], r && r.contains(n._latlng) || (e._group._featureGroup.removeLayer(n), n.clusterShow && n.clusterShow())
})
}, _recursively: function (e, t, i, r, n) {
var s, o, a = this._childClusters, h = this._zoom;
if (t <= h && (r && r(this), n && h === i && n(this)), h < t || h < i) for (s = a.length - 1; 0 <= s; s--) (o = a[s])._boundsNeedUpdate && o._recalculateBounds(), e.intersects(o._bounds) && o._recursively(e, t, i, r, n)
}, _isSingleParent: function () {
return 0 < this._childClusters.length && this._childClusters[0]._childCount === this._childCount
}
});
L.Marker.include({
clusterHide: function () {
var e = this.options.opacity;
return this.setOpacity(0), this.options.opacity = e, this
}, clusterShow: function () {
return this.setOpacity(this.options.opacity)
}
}), L.DistanceGrid = function (e) {
this._cellSize = e, this._sqCellSize = e * e, this._grid = {}, this._objectPoint = {}
}, L.DistanceGrid.prototype = {
addObject: function (e, t) {
var i = this._getCoord(t.x), r = this._getCoord(t.y), n = this._grid, s = n[r] = n[r] || {},
o = s[i] = s[i] || [], a = L.Util.stamp(e);
this._objectPoint[a] = t, o.push(e)
}, updateObject: function (e, t) {
this.removeObject(e), this.addObject(e, t)
}, removeObject: function (e, t) {
var i, r, n = this._getCoord(t.x), s = this._getCoord(t.y), o = this._grid, a = o[s] = o[s] || {},
h = a[n] = a[n] || [];
for (delete this._objectPoint[L.Util.stamp(e)], i = 0, r = h.length; i < r; i++) if (h[i] === e) return h.splice(i, 1), 1 === r && delete a[n], !0
}, eachObject: function (e, t) {
var i, r, n, s, o, a, h = this._grid;
for (i in h) for (r in o = h[i]) for (n = 0, s = (a = o[r]).length; n < s; n++) e.call(t, a[n]) && (n--, s--)
}, getNearObject: function (e) {
var t, i, r, n, s, o, a, h, l = this._getCoord(e.x), u = this._getCoord(e.y), _ = this._objectPoint,
d = this._sqCellSize, p = null;
for (t = u - 1; t <= u + 1; t++) if (n = this._grid[t]) for (i = l - 1; i <= l + 1; i++) if (s = n[i]) for (r = 0, o = s.length; r < o; r++) a = s[r], ((h = this._sqDist(_[L.Util.stamp(a)], e)) < d || h <= d && null === p) && (d = h, p = a);
return p
}, _getCoord: function (e) {
var t = Math.floor(e / this._cellSize);
return isFinite(t) ? t : e
}, _sqDist: function (e, t) {
var i = t.x - e.x, r = t.y - e.y;
return i * i + r * r
}
}, L.QuickHull = {
getDistant: function (e, t) {
var i = t[1].lat - t[0].lat;
return (t[0].lng - t[1].lng) * (e.lat - t[0].lat) + i * (e.lng - t[0].lng)
}, findMostDistantPointFromBaseLine: function (e, t) {
var i, r, n, s = 0, o = null, a = [];
for (i = t.length - 1; 0 <= i; i--) r = t[i], 0 < (n = this.getDistant(r, e)) && (a.push(r), s < n && (s = n, o = r));
return {maxPoint: o, newPoints: a}
}, buildConvexHull: function (e, t) {
var i = [], r = this.findMostDistantPointFromBaseLine(e, t);
return r.maxPoint ? i = (i = i.concat(this.buildConvexHull([e[0], r.maxPoint], r.newPoints))).concat(this.buildConvexHull([r.maxPoint, e[1]], r.newPoints)) : [e[0]]
}, getConvexHull: function (e) {
var t, i = !1, r = !1, n = !1, s = !1, o = null, a = null, h = null, l = null, u = null, _ = null;
for (t = e.length - 1; 0 <= t; t--) {
var d = e[t];
(!1 === i || d.lat > i) && (i = (o = d).lat), (!1 === r || d.lat < r) && (r = (a = d).lat), (!1 === n || d.lng > n) && (n = (h = d).lng), (!1 === s || d.lng < s) && (s = (l = d).lng)
}
return u = r !== i ? (_ = a, o) : (_ = l, h), [].concat(this.buildConvexHull([_, u], e), this.buildConvexHull([u, _], e))
}
}, L.MarkerCluster.include({
getConvexHull: function () {
var e, t, i = this.getAllChildMarkers(), r = [];
for (t = i.length - 1; 0 <= t; t--) e = i[t].getLatLng(), r.push(e);
return L.QuickHull.getConvexHull(r)
}
}), L.MarkerCluster.include({
_2PI: 2 * Math.PI,
_circleFootSeparation: 25,
_circleStartAngle: 0,
_spiralFootSeparation: 28,
_spiralLengthStart: 11,
_spiralLengthFactor: 5,
_circleSpiralSwitchover: 9,
spiderfy: function () {
if (this._group._spiderfied !== this && !this._group._inZoomAnimation) {
var e, t = this.getAllChildMarkers(null, !0), i = this._group._map.latLngToLayerPoint(this._latlng);
this._group._unspiderfy(), e = (this._group._spiderfied = this)._group.options.spiderfyShapePositions ? this._group.options.spiderfyShapePositions(t.length, i) : t.length >= this._circleSpiralSwitchover ? this._generatePointsSpiral(t.length, i) : (i.y += 10, this._generatePointsCircle(t.length, i)), this._animationSpiderfy(t, e)
}
},
unspiderfy: function (e) {
this._group._inZoomAnimation || (this._animationUnspiderfy(e), this._group._spiderfied = null)
},
_generatePointsCircle: function (e, t) {
var i, r,
n = this._group.options.spiderfyDistanceMultiplier * this._circleFootSeparation * (2 + e) / this._2PI,
s = this._2PI / e, o = [];
for (n = Math.max(n, 35), o.length = e, i = 0; i < e; i++) r = this._circleStartAngle + i * s, o[i] = new L.Point(t.x + n * Math.cos(r), t.y + n * Math.sin(r))._round();
return o
},
_generatePointsSpiral: function (e, t) {
var i, r = this._group.options.spiderfyDistanceMultiplier, n = r * this._spiralLengthStart,
s = r * this._spiralFootSeparation, o = r * this._spiralLengthFactor * this._2PI, a = 0, h = [];
for (i = h.length = e; 0 <= i; i--) i < e && (h[i] = new L.Point(t.x + n * Math.cos(a), t.y + n * Math.sin(a))._round()), n += o / (a += s / n + 5e-4 * i);
return h
},
_noanimationUnspiderfy: function () {
var e, t, i = this._group, r = i._map, n = i._featureGroup, s = this.getAllChildMarkers(null, !0);
for (i._ignoreMove = !0, this.setOpacity(1), t = s.length - 1; 0 <= t; t--) e = s[t], n.removeLayer(e), e._preSpiderfyLatlng && (e.setLatLng(e._preSpiderfyLatlng), delete e._preSpiderfyLatlng), e.setZIndexOffset && e.setZIndexOffset(0), e._spiderLeg && (r.removeLayer(e._spiderLeg), delete e._spiderLeg);
i.fire("unspiderfied", {cluster: this, markers: s}), i._ignoreMove = !1, i._spiderfied = null
}
}), L.MarkerClusterNonAnimated = L.MarkerCluster.extend({
_animationSpiderfy: function (e, t) {
var i, r, n, s, o = this._group, a = o._map, h = o._featureGroup,
l = this._group.options.spiderLegPolylineOptions;
for (o._ignoreMove = !0, i = 0; i < e.length; i++) s = a.layerPointToLatLng(t[i]), r = e[i], n = new L.Polyline([this._latlng, s], l), a.addLayer(n), r._spiderLeg = n, r._preSpiderfyLatlng = r._latlng, r.setLatLng(s), r.setZIndexOffset && r.setZIndexOffset(1e6), h.addLayer(r);
this.setOpacity(.3), o._ignoreMove = !1, o.fire("spiderfied", {cluster: this, markers: e})
}, _animationUnspiderfy: function () {
this._noanimationUnspiderfy()
}
}), L.MarkerCluster.include({
_animationSpiderfy: function (e, t) {
var i, r, n, s, o, a, h = this, l = this._group, u = l._map, _ = l._featureGroup, d = this._latlng,
p = u.latLngToLayerPoint(d), c = L.Path.SVG,
f = L.extend({}, this._group.options.spiderLegPolylineOptions), m = f.opacity;
for (void 0 === m && (m = L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity), c ? (f.opacity = 0, f.className = (f.className || "") + " leaflet-cluster-spider-leg") : f.opacity = m, l._ignoreMove = !0, i = 0; i < e.length; i++) r = e[i], a = u.layerPointToLatLng(t[i]), n = new L.Polyline([d, a], f), u.addLayer(n), r._spiderLeg = n, c && (o = (s = n._path).getTotalLength() + .1, s.style.strokeDasharray = o, s.style.strokeDashoffset = o), r.setZIndexOffset && r.setZIndexOffset(1e6), r.clusterHide && r.clusterHide(), _.addLayer(r), r._setPos && r._setPos(p);
for (l._forceLayout(), l._animationStart(), i = e.length - 1; 0 <= i; i--) a = u.layerPointToLatLng(t[i]), (r = e[i])._preSpiderfyLatlng = r._latlng, r.setLatLng(a), r.clusterShow && r.clusterShow(), c && ((s = (n = r._spiderLeg)._path).style.strokeDashoffset = 0, n.setStyle({opacity: m}));
this.setOpacity(.3), l._ignoreMove = !1, setTimeout(function () {
l._animationEnd(), l.fire("spiderfied", {cluster: h, markers: e})
}, 200)
}, _animationUnspiderfy: function (e) {
var t, i, r, n, s, o, a = this, h = this._group, l = h._map, u = h._featureGroup,
_ = e ? l._latLngToNewLayerPoint(this._latlng, e.zoom, e.center) : l.latLngToLayerPoint(this._latlng),
d = this.getAllChildMarkers(null, !0), p = L.Path.SVG;
for (h._ignoreMove = !0, h._animationStart(), this.setOpacity(1), i = d.length - 1; 0 <= i; i--) (t = d[i])._preSpiderfyLatlng && (t.closePopup(), t.setLatLng(t._preSpiderfyLatlng), delete t._preSpiderfyLatlng, o = !0, t._setPos && (t._setPos(_), o = !1), t.clusterHide && (t.clusterHide(), o = !1), o && u.removeLayer(t), p && (s = (n = (r = t._spiderLeg)._path).getTotalLength() + .1, n.style.strokeDashoffset = s, r.setStyle({opacity: 0})));
h._ignoreMove = !1, setTimeout(function () {
var e = 0;
for (i = d.length - 1; 0 <= i; i--) (t = d[i])._spiderLeg && e++;
for (i = d.length - 1; 0 <= i; i--) (t = d[i])._spiderLeg && (t.clusterShow && t.clusterShow(), t.setZIndexOffset && t.setZIndexOffset(0), 1 < e && u.removeLayer(t), l.removeLayer(t._spiderLeg), delete t._spiderLeg);
h._animationEnd(), h.fire("unspiderfied", {cluster: a, markers: d})
}, 200)
}
}), L.MarkerClusterGroup.include({
_spiderfied: null, unspiderfy: function () {
this._unspiderfy.apply(this, arguments)
}, _spiderfierOnAdd: function () {
this._map.on("click", this._unspiderfyWrapper, this), this._map.options.zoomAnimation && this._map.on("zoomstart", this._unspiderfyZoomStart, this), this._map.on("zoomend", this._noanimationUnspiderfy, this), L.Browser.touch || this._map.getRenderer(this)
}, _spiderfierOnRemove: function () {
this._map.off("click", this._unspiderfyWrapper, this), this._map.off("zoomstart", this._unspiderfyZoomStart, this), this._map.off("zoomanim", this._unspiderfyZoomAnim, this), this._map.off("zoomend", this._noanimationUnspiderfy, this), this._noanimationUnspiderfy()
}, _unspiderfyZoomStart: function () {
this._map && this._map.on("zoomanim", this._unspiderfyZoomAnim, this)
}, _unspiderfyZoomAnim: function (e) {
L.DomUtil.hasClass(this._map._mapPane, "leaflet-touching") || (this._map.off("zoomanim", this._unspiderfyZoomAnim, this), this._unspiderfy(e))
}, _unspiderfyWrapper: function () {
this._unspiderfy()
}, _unspiderfy: function (e) {
this._spiderfied && this._spiderfied.unspiderfy(e)
}, _noanimationUnspiderfy: function () {
this._spiderfied && this._spiderfied._noanimationUnspiderfy()
}, _unspiderfyLayer: function (e) {
e._spiderLeg && (this._featureGroup.removeLayer(e), e.clusterShow && e.clusterShow(), e.setZIndexOffset && e.setZIndexOffset(0), this._map.removeLayer(e._spiderLeg), delete e._spiderLeg)
}
}), L.MarkerClusterGroup.include({
refreshClusters: function (e) {
return e ? e instanceof L.MarkerClusterGroup ? e = e._topClusterLevel.getAllChildMarkers() : e instanceof L.LayerGroup ? e = e._layers : e instanceof L.MarkerCluster ? e = e.getAllChildMarkers() : e instanceof L.Marker && (e = [e]) : e = this._topClusterLevel.getAllChildMarkers(), this._flagParentsIconsNeedUpdate(e), this._refreshClustersIcons(), this.options.singleMarkerMode && this._refreshSingleMarkerModeMarkers(e), this
}, _flagParentsIconsNeedUpdate: function (e) {
var t, i;
for (t in e) for (i = e[t].__parent; i;) i._iconNeedsUpdate = !0, i = i.__parent
}, _refreshSingleMarkerModeMarkers: function (e) {
var t, i;
for (t in e) i = e[t], this.hasLayer(i) && i.setIcon(this._overrideMarkerIcon(i))
}
}), L.Marker.include({
refreshIconOptions: function (e, t) {
var i = this.options.icon;
return L.setOptions(i, e), this.setIcon(i), t && this.__parent && this.__parent._group.refreshClusters(this), this
}
}), e.MarkerClusterGroup = t, e.MarkerCluster = i, Object.defineProperty(e, "__esModule", {value: !0})
});
//# sourceMappingURL=leaflet.markercluster.js.map

911
src/main/resources/static/files/assets/js/viewer.min.js

@ -0,0 +1,911 @@
/*!
* Viewer.js v1.11.7
* https://fengyuanchen.github.io/viewerjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2024-11-24T04:32:19.116Z
*/
((t, e) => {
"object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).Viewer = e()
})(this, function () {
function n(t, e) {
for (var i = 0; i < e.length; i++) {
var n = e[i];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, r(n.key), n)
}
}
function s(e, t) {
var i, n = Object.keys(e);
return Object.getOwnPropertySymbols && (i = Object.getOwnPropertySymbols(e), t && (i = i.filter(function (t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
})), n.push.apply(n, i)), n
}
function P(n) {
for (var t = 1; t < arguments.length; t++) {
var o = null != arguments[t] ? arguments[t] : {};
t % 2 ? s(Object(o), !0).forEach(function (t) {
var e, i;
e = n, i = o[t = t], (t = r(t)) in e ? Object.defineProperty(e, t, {
value: i,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = i
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(o)) : s(Object(o)).forEach(function (t) {
Object.defineProperty(n, t, Object.getOwnPropertyDescriptor(o, t))
})
}
return n
}
function r(t) {
t = ((t, e) => {
if ("object" != typeof t || !t) return t;
var i = t[Symbol.toPrimitive];
if (void 0 === i) return ("string" === e ? String : Number)(t);
if ("object" != typeof (i = i.call(t, e || "default"))) return i;
throw new TypeError("@@toPrimitive must return a primitive value.")
})(t, "string");
return "symbol" == typeof t ? t : t + ""
}
function l(t) {
return (l = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
return typeof t
} : function (t) {
return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
})(t)
}
var W = {
backdrop: !0,
button: !0,
navbar: !0,
title: !0,
toolbar: !0,
className: "",
container: "body",
filter: null,
fullscreen: !0,
inheritedAttributes: ["crossOrigin", "decoding", "isMap", "loading", "referrerPolicy", "sizes", "srcset", "useMap"],
initialCoverage: .9,
initialViewIndex: 0,
inline: !1,
interval: 5e3,
keyboard: !0,
focus: !0,
loading: !0,
loop: !0,
minWidth: 200,
minHeight: 100,
movable: !0,
rotatable: !0,
scalable: !0,
zoomable: !0,
zoomOnTouch: !0,
zoomOnWheel: !0,
slideOnTouch: !0,
toggleOnDblclick: !0,
tooltip: !0,
transition: !0,
zIndex: 2015,
zIndexInline: 0,
zoomRatio: .1,
minZoomRatio: .01,
maxZoomRatio: 100,
url: "src",
ready: null,
show: null,
shown: null,
hide: null,
hidden: null,
view: null,
viewed: null,
move: null,
moved: null,
rotate: null,
rotated: null,
scale: null,
scaled: null,
zoom: null,
zoomed: null,
play: null,
stop: null
}, t = "undefined" != typeof window && void 0 !== window.document, e = t ? window : {},
a = !(!t || !e.document.documentElement) && "ontouchstart" in e.document.documentElement,
i = t && "PointerEvent" in e, g = "viewer", h = "move", j = "switch", c = "zoom", f = "".concat(g, "-active"),
H = "".concat(g, "-close"), B = "".concat(g, "-fade"), V = "".concat(g, "-fixed"),
U = "".concat(g, "-fullscreen"), K = "".concat(g, "-fullscreen-exit"), v = "".concat(g, "-hide"),
Z = "".concat(g, "-hide-md-down"), $ = "".concat(g, "-hide-sm-down"), _ = "".concat(g, "-hide-xs-down"),
u = "".concat(g, "-in"), p = "".concat(g, "-invisible"), b = "".concat(g, "-loading"),
G = "".concat(g, "-move"), J = "".concat(g, "-open"), d = "".concat(g, "-show"),
m = "".concat(g, "-transition"), w = "click", Q = "dblclick", tt = "dragstart", et = "focusin", it = "keydown",
y = "load", x = "error", nt = i ? "pointerdown" : a ? "touchstart" : "mousedown",
ot = i ? "pointermove" : a ? "touchmove" : "mousemove",
st = i ? "pointerup pointercancel" : a ? "touchend touchcancel" : "mouseup", at = "resize", k = "transitionend",
rt = "wheel", z = "viewed", lt = "rotated", ht = "".concat(g, "Action"), ct = /\s\s*/,
ut = ["zoom-in", "zoom-out", "one-to-one", "reset", "prev", "play", "next", "rotate-left", "rotate-right", "flip-horizontal", "flip-vertical"];
function T(t) {
return "string" == typeof t
}
var dt = Number.isNaN || e.isNaN;
function E(t) {
return "number" == typeof t && !dt(t)
}
function D(t) {
return void 0 === t
}
function o(t) {
return "object" === l(t) && null !== t
}
var mt = Object.prototype.hasOwnProperty;
function S(t) {
if (!o(t)) return !1;
try {
var e = t.constructor, i = e.prototype;
return e && i && mt.call(i, "isPrototypeOf")
} catch (t) {
return !1
}
}
function I(t) {
return "function" == typeof t
}
function A(e, i) {
if (e && I(i)) if (Array.isArray(e) || E(e.length)) for (var t = e.length, n = 0; n < t && !1 !== i.call(e, e[n], n, e); n += 1) ; else o(e) && Object.keys(e).forEach(function (t) {
i.call(e, e[t], t, e)
})
}
var O = Object.assign || function (i) {
for (var t = arguments.length, e = new Array(1 < t ? t - 1 : 0), n = 1; n < t; n++) e[n - 1] = arguments[n];
return o(i) && 0 < e.length && e.forEach(function (e) {
o(e) && Object.keys(e).forEach(function (t) {
i[t] = e[t]
})
}), i
}, gt = /^(?:width|height|left|top|marginLeft|marginTop)$/;
function C(t, e) {
var i = t.style;
A(e, function (t, e) {
gt.test(e) && E(t) && (t += "px"), i[e] = t
})
}
function L(t, e) {
return t && e && (t.classList ? t.classList.contains(e) : -1 < t.className.indexOf(e))
}
function R(t, e) {
var i;
t && e && (E(t.length) ? A(t, function (t) {
R(t, e)
}) : t.classList ? t.classList.add(e) : (i = t.className.trim()) ? i.indexOf(e) < 0 && (t.className = "".concat(i, " ").concat(e)) : t.className = e)
}
function M(t, e) {
t && e && (E(t.length) ? A(t, function (t) {
M(t, e)
}) : t.classList ? t.classList.remove(e) : 0 <= t.className.indexOf(e) && (t.className = t.className.replace(e, "")))
}
function F(t, e, i) {
e && (E(t.length) ? A(t, function (t) {
F(t, e, i)
}) : (i ? R : M)(t, e))
}
var ft = /([a-z\d])([A-Z])/g;
function vt(t) {
return t.replace(ft, "$1-$2").toLowerCase()
}
function N(t, e) {
return o(t[e]) ? t[e] : t.dataset ? t.dataset[e] : t.getAttribute("data-".concat(vt(e)))
}
function pt(t, e, i) {
o(i) ? t[e] = i : t.dataset ? t.dataset[e] = i : t.setAttribute("data-".concat(vt(e)), i)
}
wt = !1, t && (bt = !1, i = function () {
}, t = Object.defineProperty({}, "once", {
get: function () {
return wt = !0, bt
}, set: function (t) {
bt = t
}
}), e.addEventListener("test", i, t), e.removeEventListener("test", i, t));
var bt, wt, yt = wt;
function Y(i, t, n, e) {
var o = 3 < arguments.length && void 0 !== e ? e : {}, s = n;
t.trim().split(ct).forEach(function (t) {
var e;
yt || (e = i.listeners) && e[t] && e[t][n] && (s = e[t][n], delete e[t][n], 0 === Object.keys(e[t]).length && delete e[t], 0 === Object.keys(e).length) && delete i.listeners, i.removeEventListener(t, s, o)
})
}
function X(s, t, a, e) {
var r = 3 < arguments.length && void 0 !== e ? e : {}, l = a;
t.trim().split(ct).forEach(function (n) {
var t, o;
r.once && !yt && (t = s.listeners, l = function () {
delete o[n][a], s.removeEventListener(n, l, r);
for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++) e[i] = arguments[i];
a.apply(s, e)
}, (o = void 0 === t ? {} : t)[n] || (o[n] = {}), o[n][a] && s.removeEventListener(n, o[n][a], r), o[n][a] = l, s.listeners = o), s.addEventListener(n, l, r)
})
}
function q(t, e, i, n) {
var o;
return I(Event) && I(CustomEvent) ? o = new CustomEvent(e, P({
bubbles: !0,
cancelable: !0,
detail: i
}, n)) : (o = document.createEvent("CustomEvent")).initCustomEvent(e, !0, !0, i), t.dispatchEvent(o)
}
function xt(t) {
var e = t.rotate, i = t.scaleX, n = t.scaleY, o = t.translateX, t = t.translateY, s = [],
o = (E(o) && 0 !== o && s.push("translateX(".concat(o, "px)")), E(t) && 0 !== t && s.push("translateY(".concat(t, "px)")), E(e) && 0 !== e && s.push("rotate(".concat(e, "deg)")), E(i) && 1 !== i && s.push("scaleX(".concat(i, ")")), E(n) && 1 !== n && s.push("scaleY(".concat(n, ")")), s.length ? s.join(" ") : "none");
return {WebkitTransform: o, msTransform: o, transform: o}
}
var kt = e.navigator && /Version\/\d+(\.\d+)+?\s+Safari/i.test(e.navigator.userAgent);
function zt(i, t, e) {
var n, o = document.createElement("img");
return i.naturalWidth && !kt ? e(i.naturalWidth, i.naturalHeight) : (n = document.body || document.documentElement, o.onload = function () {
e(o.width, o.height), kt || n.removeChild(o)
}, A(t.inheritedAttributes, function (t) {
var e = i.getAttribute(t);
null !== e && o.setAttribute(t, e)
}), o.src = i.src, kt || (o.style.cssText = "left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;", n.appendChild(o))), o
}
function Tt(t) {
switch (t) {
case 2:
return _;
case 3:
return $;
case 4:
return Z;
default:
return ""
}
}
function Et(t, e) {
var i = t.pageX, t = t.pageY, n = {endX: i, endY: t};
return e ? n : P({timeStamp: Date.now(), startX: i, startY: t}, n)
}
var Dt, i = {
render: function () {
this.initContainer(), this.initViewer(), this.initList(), this.renderViewer()
}, initBody: function () {
var t = this.element.ownerDocument, e = t.body || t.documentElement;
this.body = e, this.scrollbarWidth = window.innerWidth - t.documentElement.clientWidth, this.initialBodyPaddingRight = e.style.paddingRight, this.initialBodyComputedPaddingRight = window.getComputedStyle(e).paddingRight
}, initContainer: function () {
this.containerData = {width: window.innerWidth, height: window.innerHeight}
}, initViewer: function () {
var t, e = this.options, i = this.parent;
e.inline && (t = {
width: Math.max(i.offsetWidth, e.minWidth),
height: Math.max(i.offsetHeight, e.minHeight)
}, this.parentData = t), !this.fulled && t || (t = this.containerData), this.viewerData = O({}, t)
}, renderViewer: function () {
this.options.inline && !this.fulled && C(this.viewer, this.viewerData)
}, initList: function () {
var r = this, t = this.element, l = this.options, h = this.list, c = [];
h.innerHTML = "", A(this.images, function (i, t) {
var e, n, o = i.src,
s = i.alt || (T(s = o) ? decodeURIComponent(s.replace(/^.*\//, "").replace(/[?&#].*$/, "")) : ""),
a = r.getImageURL(i);
(o || a) && (e = document.createElement("li"), n = document.createElement("img"), A(l.inheritedAttributes, function (t) {
var e = i.getAttribute(t);
null !== e && n.setAttribute(t, e)
}), l.navbar && (n.src = o || a), n.alt = s, n.setAttribute("data-original-url", a || o), e.setAttribute("data-index", t), e.setAttribute("data-viewer-action", "view"), e.setAttribute("role", "button"), l.keyboard && e.setAttribute("tabindex", 0), e.appendChild(n), h.appendChild(e), c.push(e))
}), A(this.items = c, function (e) {
var t, i, n = e.firstElementChild;
pt(n, "filled", !0), l.loading && R(e, b), X(n, y, t = function (t) {
Y(n, x, i), l.loading && M(e, b), r.loadImage(t)
}, {once: !0}), X(n, x, i = function () {
Y(n, y, t), l.loading && M(e, b)
}, {once: !0})
}), l.transition && X(t, z, function () {
R(h, m)
}, {once: !0})
}, renderList: function () {
var t, e, i = this.index, n = this.items[i];
n && (t = n.nextElementSibling, t = parseInt(window.getComputedStyle(t || n).marginLeft, 10), n = n.offsetWidth, C(this.list, O({width: (e = n + t) * this.length - t}, xt({translateX: (this.viewerData.width - n) / 2 - e * i}))))
}, resetList: function () {
var t = this.list;
t.innerHTML = "", M(t, m), C(t, xt({translateX: 0}))
}, initImage: function (r) {
var t, l = this, h = this.options, e = this.image, i = this.viewerData, n = this.footer.offsetHeight,
c = i.width, u = Math.max(i.height - n, n), d = this.imageData || {};
this.imageInitializing = {
abort: function () {
t.onload = null
}
}, t = zt(e, h, function (t, e) {
var i = t / e, n = Math.max(0, Math.min(1, h.initialCoverage)), o = c, s = u,
n = (l.imageInitializing = !1, c < u * i ? s = c / i : o = u * i, n = E(n) ? n : .9, o = Math.min(o * n, t), s = Math.min(s * n, e), (c - o) / 2),
a = (u - s) / 2, n = {
left: n,
top: a,
x: n,
y: a,
width: o,
height: s,
oldRatio: 1,
ratio: o / t,
aspectRatio: i,
naturalWidth: t,
naturalHeight: e
}, a = O({}, n);
h.rotatable && (n.rotate = d.rotate || 0, a.rotate = 0), h.scalable && (n.scaleX = d.scaleX || 1, n.scaleY = d.scaleY || 1, a.scaleX = 1, a.scaleY = 1), l.imageData = n, l.initialImageData = a, r && r()
})
}, renderImage: function (t) {
var e, i = this, n = this.image, o = this.imageData;
C(n, O({
width: o.width,
height: o.height,
marginLeft: o.x,
marginTop: o.y
}, xt(o))), t && ((this.viewing || this.moving || this.rotating || this.scaling || this.zooming) && this.options.transition && L(n, m) ? (e = function () {
i.imageRendering = !1, t()
}, this.imageRendering = {
abort: function () {
Y(n, k, e)
}
}, X(n, k, e, {once: !0})) : t())
}, resetImage: function () {
var t = this.image;
t && (this.viewing && this.viewing.abort(), t.parentNode.removeChild(t), this.image = null, this.title.innerHTML = "")
}
}, t = {
bind: function () {
var t = this.options, e = this.viewer, i = this.canvas, n = this.element.ownerDocument;
X(e, w, this.onClick = this.click.bind(this)), X(e, tt, this.onDragStart = this.dragstart.bind(this)), X(i, nt, this.onPointerDown = this.pointerdown.bind(this)), X(n, ot, this.onPointerMove = this.pointermove.bind(this)), X(n, st, this.onPointerUp = this.pointerup.bind(this)), X(n, it, this.onKeyDown = this.keydown.bind(this)), X(window, at, this.onResize = this.resize.bind(this)), t.zoomable && t.zoomOnWheel && X(e, rt, this.onWheel = this.wheel.bind(this), {
passive: !1,
capture: !0
}), t.toggleOnDblclick && X(i, Q, this.onDblclick = this.dblclick.bind(this))
}, unbind: function () {
var t = this.options, e = this.viewer, i = this.canvas, n = this.element.ownerDocument;
Y(e, w, this.onClick), Y(e, tt, this.onDragStart), Y(i, nt, this.onPointerDown), Y(n, ot, this.onPointerMove), Y(n, st, this.onPointerUp), Y(n, it, this.onKeyDown), Y(window, at, this.onResize), t.zoomable && t.zoomOnWheel && Y(e, rt, this.onWheel, {
passive: !1,
capture: !0
}), t.toggleOnDblclick && Y(i, Q, this.onDblclick)
}
}, St = {
click: function (t) {
var e = this.options, i = this.imageData, n = t.target, o = N(n, ht);
switch (o || "img" !== n.localName || "li" !== n.parentElement.localName || (o = N(n = n.parentElement, ht)), a && t.isTrusted && n === this.canvas && clearTimeout(this.clickCanvasTimeout), o) {
case"mix":
this.played ? this.stop() : e.inline ? this.fulled ? this.exit() : this.full() : this.hide();
break;
case"hide":
this.pointerMoved || this.hide();
break;
case"view":
this.view(N(n, "index"));
break;
case"zoom-in":
this.zoom(.1, !0);
break;
case"zoom-out":
this.zoom(-.1, !0);
break;
case"one-to-one":
this.toggle();
break;
case"reset":
this.reset();
break;
case"prev":
this.prev(e.loop);
break;
case"play":
this.play(e.fullscreen);
break;
case"next":
this.next(e.loop);
break;
case"rotate-left":
this.rotate(-90);
break;
case"rotate-right":
this.rotate(90);
break;
case"flip-horizontal":
this.scaleX(-i.scaleX || -1);
break;
case"flip-vertical":
this.scaleY(-i.scaleY || -1);
break;
default:
this.played && this.stop()
}
}, dblclick: function (t) {
t.preventDefault(), this.viewed && t.target === this.image && (a && t.isTrusted && clearTimeout(this.doubleClickImageTimeout), this.toggle(t.isTrusted ? t : t.detail && t.detail.originalEvent))
}, load: function () {
var t = this, e = (this.timeout && (clearTimeout(this.timeout), this.timeout = !1), this.element),
i = this.options, n = this.image, o = this.index, s = this.viewerData;
M(n, p), i.loading && M(this.canvas, b), n.style.cssText = "height:0;" + "margin-left:".concat(s.width / 2, "px;") + "margin-top:".concat(s.height / 2, "px;") + "max-width:none!important;position:relative;width:0;", this.initImage(function () {
F(n, G, i.movable), F(n, m, i.transition), t.renderImage(function () {
t.viewed = !0, t.viewing = !1, I(i.viewed) && X(e, z, i.viewed, {once: !0}), q(e, z, {
originalImage: t.images[o],
index: o,
image: n
}, {cancelable: !1})
})
})
}, loadImage: function (t) {
var n = t.target, t = n.parentNode, o = t.offsetWidth || 30, s = t.offsetHeight || 50, a = !!N(n, "filled");
zt(n, this.options, function (t, e) {
var t = t / e, e = o, i = s;
o < s * t ? a ? e = s * t : i = o / t : a ? i = o / t : e = s * t, C(n, O({
width: e,
height: i
}, xt({translateX: (o - e) / 2, translateY: (s - i) / 2})))
})
}, keydown: function (t) {
var e = this.options;
if (e.keyboard) {
var i = t.keyCode || t.which || t.charCode;
if (13 === i && this.viewer.contains(t.target) && this.click(t), this.fulled) switch (i) {
case 27:
this.played ? this.stop() : e.inline ? this.fulled && this.exit() : this.hide();
break;
case 32:
this.played && this.stop();
break;
case 37:
this.played && this.playing ? this.playing.prev() : this.prev(e.loop);
break;
case 38:
t.preventDefault(), this.zoom(e.zoomRatio, !0);
break;
case 39:
this.played && this.playing ? this.playing.next() : this.next(e.loop);
break;
case 40:
t.preventDefault(), this.zoom(-e.zoomRatio, !0);
break;
case 48:
case 49:
t.ctrlKey && (t.preventDefault(), this.toggle())
}
}
}, dragstart: function (t) {
"img" === t.target.localName && t.preventDefault()
}, pointerdown: function (t) {
var e = this.options, i = this.pointers, n = t.buttons, o = t.button;
this.pointerMoved = !1, !this.viewed || this.showing || this.viewing || this.hiding || ("mousedown" === t.type || "pointerdown" === t.type && "mouse" === t.pointerType) && (E(n) && 1 !== n || E(o) && 0 !== o || t.ctrlKey) || (t.preventDefault(), t.changedTouches ? A(t.changedTouches, function (t) {
i[t.identifier] = Et(t)
}) : i[t.pointerId || 0] = Et(t), n = !!e.movable && h, e.zoomOnTouch && e.zoomable && 1 < Object.keys(i).length ? n = c : e.slideOnTouch && ("touch" === t.pointerType || "touchstart" === t.type) && this.isSwitchable() && (n = j), !e.transition || n !== h && n !== c || M(this.image, m), this.action = n)
}, pointermove: function (t) {
var e = this.pointers, i = this.action;
this.viewed && i && (t.preventDefault(), t.changedTouches ? A(t.changedTouches, function (t) {
O(e[t.identifier] || {}, Et(t, !0))
}) : O(e[t.pointerId || 0] || {}, Et(t, !0)), this.change(t))
}, pointerup: function (t) {
var e, i = this, n = this.options, o = this.action, s = this.pointers;
t.changedTouches ? A(t.changedTouches, function (t) {
e = s[t.identifier], delete s[t.identifier]
}) : (e = s[t.pointerId || 0], delete s[t.pointerId || 0]), o && (t.preventDefault(), !n.transition || o !== h && o !== c || R(this.image, m), this.action = !1, a) && o !== c && e && Date.now() - e.timeStamp < 500 && (clearTimeout(this.clickCanvasTimeout), clearTimeout(this.doubleClickImageTimeout), n.toggleOnDblclick && this.viewed && t.target === this.image ? this.imageClicked ? (this.imageClicked = !1, this.doubleClickImageTimeout = setTimeout(function () {
q(i.image, Q, {originalEvent: t})
}, 50)) : (this.imageClicked = !0, this.doubleClickImageTimeout = setTimeout(function () {
i.imageClicked = !1
}, 500)) : (this.imageClicked = !1, n.backdrop && "static" !== n.backdrop && t.target === this.canvas && (this.clickCanvasTimeout = setTimeout(function () {
q(i.canvas, w, {originalEvent: t})
}, 50))))
}, resize: function () {
var e = this;
this.isShown && !this.hiding && (this.fulled && (this.close(), this.initBody(), this.open()), this.initContainer(), this.initViewer(), this.renderViewer(), this.renderList(), this.viewed && this.initImage(function () {
e.renderImage()
}), this.played) && (this.options.fullscreen && this.fulled && !(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement) ? this.stop() : A(this.player.getElementsByTagName("img"), function (t) {
X(t, y, e.loadImage.bind(e), {once: !0}), q(t, y)
}))
}, wheel: function (t) {
var e, i, n = this;
this.viewed && (t.preventDefault(), this.wheeling || (this.wheeling = !0, setTimeout(function () {
n.wheeling = !1
}, 50), e = Number(this.options.zoomRatio) || .1, i = 1, t.deltaY ? i = 0 < t.deltaY ? 1 : -1 : t.wheelDelta ? i = -t.wheelDelta / 120 : t.detail && (i = 0 < t.detail ? 1 : -1), this.zoom(-i * e, !0, null, t)))
}
}, It = {
show: function () {
var t, e, i = 0 < arguments.length && void 0 !== arguments[0] && arguments[0], n = this.element,
o = this.options;
return o.inline || this.showing || this.isShown || this.showing || (this.ready ? (I(o.show) && X(n, "show", o.show, {once: !0}), !1 !== q(n, "show") && this.ready && (this.hiding && this.transitioning.abort(), this.showing = !0, this.open(), M(t = this.viewer, v), t.setAttribute("role", "dialog"), t.setAttribute("aria-labelledby", this.title.id), t.setAttribute("aria-modal", !0), t.removeAttribute("aria-hidden"), o.transition && !i ? (e = this.shown.bind(this), this.transitioning = {
abort: function () {
Y(t, k, e), M(t, u)
}
}, R(t, m), t.initialOffsetWidth = t.offsetWidth, X(t, k, e, {once: !0}), R(t, u)) : (R(t, u), this.shown()))) : (this.build(), this.ready && this.show(i))), this
}, hide: function () {
var e, t, i, n, o, s = this, a = 0 < arguments.length && void 0 !== arguments[0] && arguments[0],
r = this.element, l = this.options;
return l.inline || this.hiding || !this.isShown && !this.showing || (I(l.hide) && X(r, "hide", l.hide, {once: !0}), !1 !== q(r, "hide") && (this.showing && this.transitioning.abort(), this.hiding = !0, this.played ? this.stop() : this.viewing && this.viewing.abort(), e = this.viewer, t = this.image, i = function () {
M(e, u), s.hidden()
}, l.transition && !a ? (n = function (t) {
t && t.target === e && (Y(e, k, n), s.hidden())
}, o = function () {
L(e, m) ? (X(e, k, n), M(e, u)) : i()
}, this.transitioning = {
abort: function () {
s.viewed && L(t, m) ? Y(t, k, o) : L(e, m) && Y(e, k, n)
}
}, this.viewed && L(t, m) ? (X(t, k, o, {once: !0}), this.zoomTo(0, !1, null, null, !0)) : o()) : i())), this
}, view: function () {
var i = this,
t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : this.options.initialViewIndex,
t = Number(t) || 0;
if (!(this.hiding || this.played || t < 0 || t >= this.length || this.viewed && t === this.index)) {
if (!this.isShown) return this.index = t, this.show();
this.viewing && this.viewing.abort();
var e, n, o, s = this.element, a = this.options, r = this.title, l = this.canvas, h = this.items[t],
c = h.querySelector("img"), u = N(c, "originalUrl"), d = c.getAttribute("alt"),
m = document.createElement("img");
A(a.inheritedAttributes, function (t) {
var e = c.getAttribute(t);
null !== e && m.setAttribute(t, e)
}), m.src = u, m.alt = d, I(a.view) && X(s, "view", a.view, {once: !0}), !1 === q(s, "view", {
originalImage: this.images[t],
index: t,
image: m
}) || !this.isShown || this.hiding || this.played || ((u = this.items[this.index]) && (M(u, f), u.removeAttribute("aria-selected")), R(h, f), h.setAttribute("aria-selected", !0), a.focus && h.focus(), this.image = m, this.viewed = !1, this.index = t, this.imageData = {}, R(m, p), a.loading && R(l, b), l.innerHTML = "", l.appendChild(m), this.renderList(), r.innerHTML = "", X(s, z, e = function () {
var t = i.imageData, e = Array.isArray(a.title) ? a.title[1] : a.title;
r.innerHTML = T(e = I(e) ? e.call(i, m, t) : "".concat(d, " (").concat(t.naturalWidth, " × ").concat(t.naturalHeight, ")")) ? e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;") : e
}, {once: !0}), this.viewing = {
abort: function () {
Y(s, z, e), m.complete ? i.imageRendering ? i.imageRendering.abort() : i.imageInitializing && i.imageInitializing.abort() : (m.src = "", Y(m, y, n), i.timeout && clearTimeout(i.timeout))
}
}, m.complete ? this.load() : (X(m, y, n = function () {
Y(m, x, o), i.load()
}, {once: !0}), X(m, x, o = function () {
Y(m, y, n), i.timeout && (clearTimeout(i.timeout), i.timeout = !1), M(m, p), a.loading && M(i.canvas, b)
}, {once: !0}), this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(function () {
M(m, p), i.timeout = !1
}, 1e3)))
}
return this
}, prev: function () {
var t = this.index - 1;
return t < 0 && (t = 0 < arguments.length && void 0 !== arguments[0] && arguments[0] ? this.length - 1 : 0), this.view(t), this
}, next: function () {
var t = this.length - 1, e = this.index + 1;
return this.view(e = t < e ? 0 < arguments.length && void 0 !== arguments[0] && arguments[0] ? 0 : t : e), this
}, move: function (t) {
var e = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : t, i = this.imageData;
return this.moveTo(D(t) ? t : i.x + Number(t), D(e) ? e : i.y + Number(e)), this
}, moveTo: function (t) {
var e = this, i = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : t,
n = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null, o = this.element,
s = this.options, a = this.imageData;
if (t = Number(t), i = Number(i), this.viewed && !this.played && s.movable) {
var r = a.x, l = a.y, h = !1;
if (E(t) ? h = !0 : t = r, E(i) ? h = !0 : i = l, h) {
if (I(s.move) && X(o, "move", s.move, {once: !0}), !1 === q(o, "move", {
x: t,
y: i,
oldX: r,
oldY: l,
originalEvent: n
})) return this;
a.x = t, a.y = i, a.left = t, a.top = i, this.moving = !0, this.renderImage(function () {
e.moving = !1, I(s.moved) && X(o, "moved", s.moved, {once: !0}), q(o, "moved", {
x: t,
y: i,
oldX: r,
oldY: l,
originalEvent: n
}, {cancelable: !1})
})
}
}
return this
}, rotate: function (t) {
return this.rotateTo((this.imageData.rotate || 0) + Number(t)), this
}, rotateTo: function (t) {
var e = this, i = this.element, n = this.options, o = this.imageData;
if (E(t = Number(t)) && this.viewed && !this.played && n.rotatable) {
var s = o.rotate;
if (I(n.rotate) && X(i, "rotate", n.rotate, {once: !0}), !1 === q(i, "rotate", {
degree: t,
oldDegree: s
})) return this;
o.rotate = t, this.rotating = !0, this.renderImage(function () {
e.rotating = !1, I(n.rotated) && X(i, lt, n.rotated, {once: !0}), q(i, lt, {
degree: t,
oldDegree: s
}, {cancelable: !1})
})
}
return this
}, scaleX: function (t) {
return this.scale(t, this.imageData.scaleY), this
}, scaleY: function (t) {
return this.scale(this.imageData.scaleX, t), this
}, scale: function (t) {
var e = this, i = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : t, n = this.element,
o = this.options, s = this.imageData;
if (t = Number(t), i = Number(i), this.viewed && !this.played && o.scalable) {
var a = s.scaleX, r = s.scaleY, l = !1;
if (E(t) ? l = !0 : t = a, E(i) ? l = !0 : i = r, l) {
if (I(o.scale) && X(n, "scale", o.scale, {once: !0}), !1 === q(n, "scale", {
scaleX: t,
scaleY: i,
oldScaleX: a,
oldScaleY: r
})) return this;
s.scaleX = t, s.scaleY = i, this.scaling = !0, this.renderImage(function () {
e.scaling = !1, I(o.scaled) && X(n, "scaled", o.scaled, {once: !0}), q(n, "scaled", {
scaleX: t,
scaleY: i,
oldScaleX: a,
oldScaleY: r
}, {cancelable: !1})
})
}
}
return this
}, zoom: function (t) {
var e = 1 < arguments.length && void 0 !== arguments[1] && arguments[1],
i = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null,
n = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null, o = this.imageData;
return t = Number(t), this.zoomTo(o.width * (t = t < 0 ? 1 / (1 - t) : 1 + t) / o.naturalWidth, e, i, n), this
}, zoomTo: function (t) {
var i, n, o, e = this, s = 1 < arguments.length && void 0 !== arguments[1] && arguments[1],
a = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null,
r = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null,
l = 4 < arguments.length && void 0 !== arguments[4] && arguments[4], h = this.element, c = this.options,
u = this.pointers, d = this.imageData, m = d.x, g = d.y, f = d.width, v = d.height, p = d.naturalWidth,
b = d.naturalHeight;
if (E(t = Math.max(0, t)) && this.viewed && !this.played && (l || c.zoomable)) {
if (l || (l = Math.max(.01, c.minZoomRatio), y = Math.min(100, c.maxZoomRatio), t = Math.min(Math.max(t, l), y)), r) switch (r.type) {
case"wheel":
.055 <= c.zoomRatio && .95 < t && t < 1.05 && (t = 1);
break;
case"pointermove":
case"touchmove":
case"mousemove":
.99 < t && t < 1.01 && (t = 1)
}
var w, l = p * t, y = b * t, p = l - f, b = y - v, x = d.ratio;
if (I(c.zoom) && X(h, "zoom", c.zoom, {once: !0}), !1 === q(h, "zoom", {
ratio: t,
oldRatio: x,
originalEvent: r
})) return this;
this.zooming = !0, r ? (w = {
left: (w = (w = this.viewer).getBoundingClientRect()).left + (window.pageXOffset - document.documentElement.clientLeft),
top: w.top + (window.pageYOffset - document.documentElement.clientTop)
}, u = u && 0 < Object.keys(u).length ? (o = n = i = 0, A(u, function (t) {
var e = t.startX;
i += e, n += t.startY, o += 1
}), {pageX: i /= o, pageY: n /= o}) : {
pageX: r.pageX,
pageY: r.pageY
}, d.x -= (u.pageX - w.left - m) / f * p, d.y -= (u.pageY - w.top - g) / v * b) : S(a) && E(a.x) && E(a.y) ? (d.x -= p * ((a.x - m) / f), d.y -= b * ((a.y - g) / v)) : (d.x -= p / 2, d.y -= b / 2), d.left = d.x, d.top = d.y, d.width = l, d.height = y, d.oldRatio = x, d.ratio = t, this.renderImage(function () {
e.zooming = !1, I(c.zoomed) && X(h, "zoomed", c.zoomed, {once: !0}), q(h, "zoomed", {
ratio: t,
oldRatio: x,
originalEvent: r
}, {cancelable: !1})
}), s && this.tooltip()
}
return this
}, play: function () {
var t, o, s, a, r, l, h, e, i, n = this,
c = 0 < arguments.length && void 0 !== arguments[0] && arguments[0];
return this.isShown && !this.played && (t = this.element, I((o = this.options).play) && X(t, "play", o.play, {once: !0}), !1 !== q(t, "play") && (s = this.player, a = this.loadImage.bind(this), r = [], h = l = 0, this.played = !0, this.onLoadWhenPlay = a, c && this.requestFullscreen(c), R(s, d), A(this.items, function (t, e) {
var i = t.querySelector("img"), n = document.createElement("img");
n.src = N(i, "originalUrl"), n.alt = i.getAttribute("alt"), n.referrerPolicy = i.referrerPolicy, l += 1, R(n, B), F(n, m, o.transition), L(t, f) && (R(n, u), h = e), r.push(n), X(n, y, a, {once: !0}), s.appendChild(n)
}), E(o.interval)) && 0 < o.interval && (e = function () {
clearTimeout(n.playing.timeout), M(r[h], u), R(r[h = 0 <= --h ? h : l - 1], u), n.playing.timeout = setTimeout(e, o.interval)
}, i = function () {
clearTimeout(n.playing.timeout), M(r[h], u), R(r[h = (h += 1) < l ? h : 0], u), n.playing.timeout = setTimeout(i, o.interval)
}, 1 < l)) && (this.playing = {prev: e, next: i, timeout: setTimeout(i, o.interval)}), this
}, stop: function () {
var t, e, i = this;
return this.played && (t = this.element, I((e = this.options).stop) && X(t, "stop", e.stop, {once: !0}), !1 !== q(t, "stop")) && (e = this.player, clearTimeout(this.playing.timeout), this.playing = !1, this.played = !1, A(e.getElementsByTagName("img"), function (t) {
Y(t, y, i.onLoadWhenPlay)
}), M(e, d), e.innerHTML = "", this.exitFullscreen()), this
}, full: function () {
var t = this, e = this.options, i = this.viewer, n = this.image, o = this.list;
return this.isShown && !this.played && !this.fulled && e.inline && (this.fulled = !0, this.open(), R(this.button, K), e.transition && (M(o, m), this.viewed) && M(n, m), R(i, V), i.setAttribute("role", "dialog"), i.setAttribute("aria-labelledby", this.title.id), i.setAttribute("aria-modal", !0), i.removeAttribute("style"), C(i, {zIndex: e.zIndex}), e.focus && this.enforceFocus(), this.initContainer(), this.viewerData = O({}, this.containerData), this.renderList(), this.viewed) && this.initImage(function () {
t.renderImage(function () {
e.transition && setTimeout(function () {
R(n, m), R(o, m)
}, 0)
})
}), this
}, exit: function () {
var t = this, e = this.options, i = this.viewer, n = this.image, o = this.list;
return this.isShown && !this.played && this.fulled && e.inline && (this.fulled = !1, this.close(), M(this.button, K), e.transition && (M(o, m), this.viewed) && M(n, m), e.focus && this.clearEnforceFocus(), i.removeAttribute("role"), i.removeAttribute("aria-labelledby"), i.removeAttribute("aria-modal"), M(i, V), C(i, {zIndex: e.zIndexInline}), this.viewerData = O({}, this.parentData), this.renderViewer(), this.renderList(), this.viewed) && this.initImage(function () {
t.renderImage(function () {
e.transition && setTimeout(function () {
R(n, m), R(o, m)
}, 0)
})
}), this
}, tooltip: function () {
var t = this, e = this.options, i = this.tooltipBox, n = this.imageData;
return this.viewed && !this.played && e.tooltip && (i.textContent = "".concat(Math.round(100 * n.ratio), "%"), this.tooltipping ? clearTimeout(this.tooltipping) : e.transition ? (this.fading && q(i, k), R(i, d), R(i, B), R(i, m), i.removeAttribute("aria-hidden"), i.initialOffsetWidth = i.offsetWidth, R(i, u)) : (R(i, d), i.removeAttribute("aria-hidden")), this.tooltipping = setTimeout(function () {
e.transition ? (X(i, k, function () {
M(i, d), M(i, B), M(i, m), i.setAttribute("aria-hidden", !0), t.fading = !1
}, {once: !0}), M(i, u), t.fading = !0) : (M(i, d), i.setAttribute("aria-hidden", !0)), t.tooltipping = !1
}, 1e3)), this
}, toggle: function () {
var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : null;
return 1 === this.imageData.ratio ? this.zoomTo(this.imageData.oldRatio, !0, null, t) : this.zoomTo(1, !0, null, t), this
}, reset: function () {
return this.viewed && !this.played && (this.imageData = O({}, this.initialImageData), this.renderImage()), this
}, update: function () {
var n, o, e = this, t = this.element, i = this.options, s = this.isImg;
return s && !t.parentNode ? this.destroy() : (n = [], A(s ? [t] : t.querySelectorAll("img"), function (t) {
I(i.filter) ? i.filter.call(e, t) && n.push(t) : e.getImageURL(t) && n.push(t)
}), n.length && (this.images = n, this.length = n.length, this.ready ? (o = [], A(this.items, function (t, e) {
var t = t.querySelector("img"), i = n[e];
i && t && i.src === t.src && i.alt === t.alt || o.push(e)
}), C(this.list, {width: "auto"}), this.initList(), this.isShown && (this.length ? this.viewed && (0 <= (s = o.indexOf(this.index)) ? (this.viewed = !1, this.view(Math.max(Math.min(this.index - s, this.length - 1), 0))) : (R(t = this.items[this.index], f), t.setAttribute("aria-selected", !0))) : (this.image = null, this.viewed = !1, this.index = 0, this.imageData = {}, this.canvas.innerHTML = "", this.title.innerHTML = ""))) : this.build()), this)
}, destroy: function () {
var t = this.element, e = this.options;
return t[g] && (this.destroyed = !0, this.ready ? (this.played && this.stop(), e.inline ? (this.fulled && this.exit(), this.unbind()) : this.isShown ? (this.viewing && (this.imageRendering ? this.imageRendering.abort() : this.imageInitializing && this.imageInitializing.abort()), this.hiding && this.transitioning.abort(), this.hidden()) : this.showing && (this.transitioning.abort(), this.hidden()), this.ready = !1, this.viewer.parentNode.removeChild(this.viewer)) : e.inline && (this.delaying ? this.delaying.abort() : this.initializing && this.initializing.abort()), e.inline || Y(t, w, this.onStart), t[g] = void 0), this
}
}, At = {
getImageURL: function (t) {
var e = this.options.url;
return e = T(e) ? t.getAttribute(e) : I(e) ? e.call(this, t) : ""
}, enforceFocus: function () {
var n = this;
this.clearEnforceFocus(), X(document, et, this.onFocusin = function (t) {
var e = n.viewer, i = t.target;
if (i !== document && i !== e && !e.contains(i)) {
for (; i;) {
if (null !== i.getAttribute("tabindex") || "true" === i.getAttribute("aria-modal")) return;
i = i.parentElement
}
e.focus()
}
})
}, clearEnforceFocus: function () {
this.onFocusin && (Y(document, et, this.onFocusin), this.onFocusin = null)
}, open: function () {
var t = this.body;
R(t, J), 0 < this.scrollbarWidth && (t.style.paddingRight = "".concat(this.scrollbarWidth + (parseFloat(this.initialBodyComputedPaddingRight) || 0), "px"))
}, close: function () {
var t = this.body;
M(t, J), 0 < this.scrollbarWidth && (t.style.paddingRight = this.initialBodyPaddingRight)
}, shown: function () {
var t = this.element, e = this.options, i = this.viewer;
this.fulled = !0, this.isShown = !0, this.render(), this.bind(), this.showing = !1, e.focus && (i.focus(), this.enforceFocus()), I(e.shown) && X(t, "shown", e.shown, {once: !0}), !1 !== q(t, "shown") && this.ready && this.isShown && !this.hiding && this.view(this.index)
}, hidden: function () {
var t = this.element, e = this.options, i = this.viewer;
e.fucus && this.clearEnforceFocus(), this.close(), this.unbind(), R(i, v), i.removeAttribute("role"), i.removeAttribute("aria-labelledby"), i.removeAttribute("aria-modal"), i.setAttribute("aria-hidden", !0), this.resetList(), this.resetImage(), this.fulled = !1, this.viewed = !1, this.isShown = !1, this.hiding = !1, this.destroyed || (I(e.hidden) && X(t, "hidden", e.hidden, {once: !0}), q(t, "hidden", null, {cancelable: !1}))
}, requestFullscreen: function (t) {
var e = this.element.ownerDocument;
this.fulled && !(e.fullscreenElement || e.webkitFullscreenElement || e.mozFullScreenElement || e.msFullscreenElement) && ((e = e.documentElement).requestFullscreen ? S(t) ? e.requestFullscreen(t) : e.requestFullscreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.msRequestFullscreen && e.msRequestFullscreen())
}, exitFullscreen: function () {
var t = this.element.ownerDocument;
this.fulled && (t.fullscreenElement || t.webkitFullscreenElement || t.mozFullScreenElement || t.msFullscreenElement) && (t.exitFullscreen ? t.exitFullscreen() : t.webkitExitFullscreen ? t.webkitExitFullscreen() : t.mozCancelFullScreen ? t.mozCancelFullScreen() : t.msExitFullscreen && t.msExitFullscreen())
}, change: function (t) {
var e = this.options, i = this.pointers, n = i[Object.keys(i)[0]];
if (n) {
var s, a, o = n.endX - n.startX, r = n.endY - n.startY;
switch (this.action) {
case h:
0 == o && 0 == r || (this.pointerMoved = !0, this.move(o, r, t));
break;
case c:
this.zoom((s = P({}, l = i), a = [], A(l, function (o, t) {
delete s[t], A(s, function (t) {
var e = Math.abs(o.startX - t.startX), i = Math.abs(o.startY - t.startY),
n = Math.abs(o.endX - t.endX), t = Math.abs(o.endY - t.endY),
e = Math.sqrt(e * e + i * i), i = Math.sqrt(n * n + t * t);
a.push((i - e) / e)
})
}), a.sort(function (t, e) {
return Math.abs(t) < Math.abs(e)
}), a[0]), !1, null, t);
break;
case j:
this.action = "switched";
var l = Math.abs(o);
1 < l && l > Math.abs(r) && (this.pointers = {}, 1 < o ? this.prev(e.loop) : o < -1 && this.next(e.loop))
}
A(i, function (t) {
t.startX = t.endX, t.startY = t.endY
})
}
}, isSwitchable: function () {
var t = this.imageData, e = this.viewerData;
return 1 < this.length && 0 <= t.x && 0 <= t.y && t.width <= e.width && t.height <= e.height
}
}, Ot = e.Viewer, Ct = (Dt = -1, function () {
return Dt += 1
}), e = (() => {
function o(t) {
var e = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}, i = this, n = o;
if (!(i instanceof n)) throw new TypeError("Cannot call a class as a function");
if (!t || 1 !== t.nodeType) throw new Error("The first argument is required and must be an element.");
this.element = t, this.options = O({}, W, S(e) && e), this.action = !1, this.fading = !1, this.fulled = !1, this.hiding = !1, this.imageClicked = !1, this.imageData = {}, this.index = this.options.initialViewIndex, this.isImg = !1, this.isShown = !1, this.length = 0, this.moving = !1, this.played = !1, this.playing = !1, this.pointers = {}, this.ready = !1, this.rotating = !1, this.scaling = !1, this.showing = !1, this.timeout = !1, this.tooltipping = !1, this.viewed = !1, this.viewing = !1, this.wheeling = !1, this.zooming = !1, this.pointerMoved = !1, this.id = Ct(), this.init()
}
return t = o, i = [{
key: "noConflict", value: function () {
return window.Viewer = Ot, o
}
}, {
key: "setDefaults", value: function (t) {
O(W, S(t) && t)
}
}], (e = [{
key: "init", value: function () {
var t, e, i, n, o = this, s = this.element, a = this.options;
s[g] || (s[g] = this, a.focus && !a.keyboard && (a.focus = !1), e = [], A((t = "img" === s.localName) ? [s] : s.querySelectorAll("img"), function (t) {
I(a.filter) ? a.filter.call(o, t) && e.push(t) : o.getImageURL(t) && e.push(t)
}), this.isImg = t, this.length = e.length, this.images = e, this.initBody(), D(document.createElement(g).style.transition) && (a.transition = !1), a.inline ? (i = 0, n = function () {
var t;
(i += 1) === o.length && (o.initializing = !1, o.delaying = {
abort: function () {
clearTimeout(t)
}
}, t = setTimeout(function () {
o.delaying = !1, o.build()
}, 0))
}, this.initializing = {
abort: function () {
A(e, function (t) {
t.complete || (Y(t, y, n), Y(t, x, n))
})
}
}, A(e, function (t) {
var e, i;
t.complete ? n() : (X(t, y, e = function () {
Y(t, x, i), n()
}, {once: !0}), X(t, x, i = function () {
Y(t, y, e), n()
}, {once: !0}))
})) : X(s, w, this.onStart = function (t) {
t = t.target;
"img" !== t.localName || I(a.filter) && !a.filter.call(o, t) || o.view(o.images.indexOf(t))
}))
}
}, {
key: "build", value: function () {
var t, s, e, i, n, o, a, r, l, h, c, u, d, m;
this.ready || (t = this.element, s = this.options, e = t.parentNode, (d = document.createElement("div")).innerHTML = '<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>', d = (i = d.querySelector(".".concat(g, "-container"))).querySelector(".".concat(g, "-title")), n = i.querySelector(".".concat(g, "-toolbar")), m = i.querySelector(".".concat(g, "-navbar")), o = i.querySelector(".".concat(g, "-button")), a = i.querySelector(".".concat(g, "-canvas")), this.parent = e, this.viewer = i, this.title = d, this.toolbar = n, this.navbar = m, this.button = o, this.canvas = a, this.footer = i.querySelector(".".concat(g, "-footer")), this.tooltipBox = i.querySelector(".".concat(g, "-tooltip")), this.player = i.querySelector(".".concat(g, "-player")), this.list = i.querySelector(".".concat(g, "-list")), i.id = "".concat(g).concat(this.id), d.id = "".concat(g, "Title").concat(this.id), R(d, s.title ? Tt(Array.isArray(s.title) ? s.title[0] : s.title) : v), R(m, s.navbar ? Tt(s.navbar) : v), F(o, v, !s.button), s.keyboard && o.setAttribute("tabindex", 0), s.backdrop && (R(i, "".concat(g, "-backdrop")), s.inline || "static" === s.backdrop || pt(a, ht, "hide")), T(s.className) && s.className && s.className.split(ct).forEach(function (t) {
R(i, t)
}), s.toolbar ? (r = document.createElement("ul"), l = S(s.toolbar), h = ut.slice(0, 3), c = ut.slice(7, 9), u = ut.slice(9), l || R(n, Tt(s.toolbar)), A(l ? s.toolbar : ut, function (t, e) {
var i, n = l && S(t), e = l ? vt(e) : t, o = n && !D(t.show) ? t.show : t;
!o || !s.zoomable && -1 !== h.indexOf(e) || !s.rotatable && -1 !== c.indexOf(e) || !s.scalable && -1 !== u.indexOf(e) || (i = n && !D(t.size) ? t.size : t, n = n && !D(t.click) ? t.click : t, t = document.createElement("li"), s.keyboard && t.setAttribute("tabindex", 0), t.setAttribute("role", "button"), R(t, "".concat(g, "-").concat(e)), I(n) || pt(t, ht, e), E(o) && R(t, Tt(o)), -1 !== ["small", "large"].indexOf(i) ? R(t, "".concat(g, "-").concat(i)) : "play" === e && R(t, "".concat(g, "-large")), I(n) && X(t, w, n), r.appendChild(t))
}), n.appendChild(r)) : R(n, v), s.rotatable || (R(d = n.querySelectorAll('li[class*="rotate"]'), p), A(d, function (t) {
n.appendChild(t)
})), s.inline ? (R(o, U), C(i, {zIndex: s.zIndexInline}), "static" === window.getComputedStyle(e).position && C(e, {position: "relative"}), e.insertBefore(i, t.nextSibling)) : (R(o, H), R(i, V), R(i, B), R(i, v), C(i, {zIndex: s.zIndex}), (m = (m = T(m = s.container) ? t.ownerDocument.querySelector(m) : m) || this.body).appendChild(i)), s.inline && (this.render(), this.bind(), this.isShown = !0), this.ready = !0, I(s.ready) && X(t, "ready", s.ready, {once: !0}), !1 === q(t, "ready") ? this.ready = !1 : this.ready && s.inline && this.view(this.index))
}
}]) && n(t.prototype, e), i && n(t, i), Object.defineProperty(t, "prototype", {writable: !1}), t;
var t, e, i
})();
return O(e.prototype, i, t, St, It, At), e
});

2
src/main/resources/templates/admin/adminpage.html

@ -168,7 +168,7 @@
<script th:replace="~{fragments/script :: script}"></script> <script th:replace="~{fragments/script :: script}"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script type="text/javascript"> <script type="text/javascript">
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {

11
src/main/resources/templates/fragments/head.html

@ -34,9 +34,16 @@
<link rel="stylesheet" id="css-main" href="css/dashmix.css"> <link rel="stylesheet" id="css-main" href="css/dashmix.css">
<link rel="stylesheet" id="css-main" href="css/hallform.css"> <link rel="stylesheet" id="css-main" href="css/hallform.css">
<link rel="stylesheet" id="css-main" href="css/home.css"> <link rel="stylesheet" id="css-main" href="css/home.css">
<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css" />
<link rel="stylesheet" href="https://unpkg.com/viewerjs/dist/viewer.min.css">
<!--<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css" />-->
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.css" />-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\swiper-bundle.min.css">
<!--<link rel="stylesheet" href="https://unpkg.com/viewerjs/dist/viewer.min.css">-->
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/viewerjs/dist/viewer.min.css">-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\viewer.min.css">

5
src/main/resources/templates/fragments/loginhead.html

@ -36,8 +36,9 @@
<link rel="stylesheet" id="css-main" href="css/dashmix.css"> <link rel="stylesheet" id="css-main" href="css/dashmix.css">
<link rel="stylesheet" id="css-main" href="css/hall.css"> <link rel="stylesheet" id="css-main" href="css/hall.css">
<!-- Latest Swiper CSS --> <!-- Latest Swiper CSS -->
<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css" />
<!--<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css" />-->
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.css" />-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\swiper-bundle.min.css">
<!-- You can include a specific file from css/themes/ folder to alter the default color theme of the template. eg: --> <!-- You can include a specific file from css/themes/ folder to alter the default color theme of the template. eg: -->
<!-- <link rel="stylesheet" id="css-theme" href="assets/css/themes/xwork.min.css"> --> <!-- <link rel="stylesheet" id="css-theme" href="assets/css/themes/xwork.min.css"> -->

5
src/main/resources/templates/fragments/loginscript.html

@ -18,7 +18,10 @@
<script src="js/plugins/sweetalert2/sweetalert2.min.js"></script> <script src="js/plugins/sweetalert2/sweetalert2.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>
<!--<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>-->
<!--<script src="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.js"></script>-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\swiper-bundle.min.css">
<!-- Your Custom Script --> <!-- Your Custom Script -->
<script src="js/dashmix.app.min.js"></script> <script src="js/dashmix.app.min.js"></script>

13
src/main/resources/templates/fragments/script.html

@ -2,7 +2,10 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>
<!--<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>-->
<!--<script src="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.js"></script>-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\swiper-bundle.min.css">
<script src="js/lib/jquery.min.js"></script> <script src="js/lib/jquery.min.js"></script>
<script src="js/plugins/datatables/jquery.dataTables.min.js"></script> <script src="js/plugins/datatables/jquery.dataTables.min.js"></script>
@ -18,8 +21,12 @@
<script src="/assets/js/plugins/datatables-buttons/buttons.html5.min.js"></script>--> <script src="/assets/js/plugins/datatables-buttons/buttons.html5.min.js"></script>-->
<!-- Place these in the <head> section of your HTML, or before the closing </body> tag --> <!-- Place these in the <head> section of your HTML, or before the closing </body> tag -->
<script src="https://unpkg.com/viewerjs/dist/viewer.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/viewerjs/dist/viewer.min.css">
<!--<script src="https://unpkg.com/viewerjs/dist/viewer.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/viewerjs/dist/viewer.min.css">-->
<!--<script src="https://cdn.jsdelivr.net/npm/viewerjs/dist/viewer.min.js"></script>-->
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/viewerjs/dist/viewer.min.css">-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\viewer.min.css">
<script type="text/javascript" src="..\files\assets\js\viewer.min.js"></script>

10
src/main/resources/templates/user/communityHallList.html

@ -2,7 +2,11 @@
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml"> <html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="~{fragments/head :: head}"></head> <head th:replace="~{fragments/head :: head}"></head>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css">
<!--<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css">-->
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.css" />-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\leaflet.css">
<style> <style>
/* Hide button and div2 on small screens */ /* Hide button and div2 on small screens */
#map { #map {
@ -221,7 +225,9 @@
</div> </div>
</div><!-- end of Model Map--> </div><!-- end of Model Map-->
<!-- Login Modal--> <!-- Login Modal-->
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<!--<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>-->
<!--<script src="https://cdn.jsdelivr.net/npm/leaflet/dist/leaflet.js"></script>-->
<script type="text/javascript" src="..\files\assets\js\leaflet.js"></script>
<div th:replace="~{fragments/loginreg :: div}"></div> <div th:replace="~{fragments/loginreg :: div}"></div>
<script th:replace="~{fragments/script :: script}"></script> <script th:replace="~{fragments/script :: script}"></script>
<script th:replace="~{fragments/logRegiOtpScript :: script}"></script> <script th:replace="~{fragments/logRegiOtpScript :: script}"></script>

76
src/main/resources/templates/user/dashboard.html

@ -2,14 +2,29 @@
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml"> <html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="~{fragments/head :: head}"></head> <head th:replace="~{fragments/head :: head}"></head>
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<!--<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script> <script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster/dist/MarkerCluster.css" /> <link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster/dist/MarkerCluster.css" />
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster/dist/MarkerCluster.Default.css" /> <link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster/dist/MarkerCluster.Default.css" />
<script src="https://unpkg.com/leaflet.markercluster/dist/leaflet.markercluster.js"></script>-->
<!--datatables--> <!--datatables-->
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/2.4.1/css/buttons.dataTables.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/2.4.1/css/buttons.dataTables.min.css">
<script src="https://unpkg.com/leaflet.markercluster/dist/leaflet.markercluster.js"></script>
<!-- Stylesheets -->
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.5.3/MarkerCluster.css" />-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\MarkerCluster.css">
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.5.3/MarkerCluster.Default.css" />-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\MarkerCluster.Default.css">
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.css" />-->
<link rel="stylesheet" type="text/css" href="..\files\assets\css\leaflet.css">
<!-- JavaScript -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js"></script>-->
<script type="text/javascript" src="..\files\assets\js\leaflet.js"></script>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.5.3/leaflet.markercluster.js"></script>-->
<script type="text/javascript" src="..\files\assets\js\leaflet.markercluster.js"></script>
<style> <style>
/* Hide button and div2 on small screens */ /* Hide button and div2 on small screens */
@media only screen and (max-width: 768px) { @media only screen and (max-width: 768px) {
@ -562,6 +577,7 @@
</div> </div>
</div> </div>
</div> </div>
<input type="hidden" id="serverDate" th:value=${serverDate}>
<div class="modal fade" id="filterModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" <div class="modal fade" id="filterModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true"> aria-hidden="true">
<div class="modal-dialog modal-lg" role="document"> <div class="modal-dialog modal-lg" role="document">
@ -696,6 +712,34 @@
<!--script to show next seven days from selected from from date--> <!--script to show next seven days from selected from from date-->
<script> <script>
$(document).ready(function () { $(document).ready(function () {
const serverDate =new Date($("#serverDate").val() + "T00:00:00")
console.log("serverDate:", serverDate);
// Get today's date
var today = serverDate;
var sixMonthsFromNow = new Date(serverDate);
sixMonthsFromNow.setMonth(serverDate.getMonth() + 6);
console.log("sixMonthsFromNow:", sixMonthsFromNow);
const day = serverDate.getDate();
// If the new month has fewer days, adjust the date
if (sixMonthsFromNow.getDate() !== day) {
sixMonthsFromNow.setDate(0); // Moves to the last valid day of the previous month
}
// Set the 'min' and 'max' attributes for input fields
const minDateStr = formatDateForValue(serverDate); // YYYY-MM-DD format
const maxDateStr = formatDateForValue(sixMonthsFromNow);
console.log("minDateStr:", minDateStr);
console.log("maxDateStr:", maxDateStr);
$("#fromdate, #todate, #selectedStartDate, #selectedEndDate").attr("min", minDateStr);
$("#fromdate, #todate, #selectedStartDate, #selectedEndDate").attr("max", maxDateStr);
// Populate 'todate' options based on 'fromdate' // Populate 'todate' options based on 'fromdate'
// Function to format date as dd-mm-yyyy // Function to format date as dd-mm-yyyy
function formatDateForText(date) { function formatDateForText(date) {
@ -796,15 +840,35 @@
gtag('config', 'UA-23581568-13'); gtag('config', 'UA-23581568-13');
/*const serverDate =new Date($("#serverDate").val() + "T00:00:00")
console.log("serverDate:", serverDate);
// Get today's date // Get today's date
var today = new Date();
var today = serverDate;
var sixMonthsFromNow = new Date(serverDate);
sixMonthsFromNow.setMonth(serverDate.getMonth() + 6);
console.log("sixMonthsFromNow:", sixMonthsFromNow);
const day = serverDate.getDate();
// If the new month has fewer days, adjust the date
if (sixMonthsFromNow.getDate() !== day) {
sixMonthsFromNow.setDate(0); // Moves to the last valid day of the previous month
}
// Set the 'min' and 'max' attributes for input fields
const minDateStr = serverDate.toISOString().split('T')[0]; // YYYY-MM-DD format
const maxDateStr = sixMonthsFromNow.toISOString().split('T')[0];
$("#fromdate, #todate, #selectedStartDate, #selectedEndDate").attr("min", minDateStr);
$("#fromdate, #todate, #selectedStartDate, #selectedEndDate").attr("max", maxDateStr);*/
// Calculate the date 6 months from now // Calculate the date 6 months from now
var sixMonthsFromNow = new Date(today.getFullYear(), today.getMonth() + 6, today.getDate()+1);
// var sixMonthsFromNow = new Date(today.getFullYear(), today.getMonth() + 6, today.getDate()+1);
// Set the 'min' and 'max' attributes of the input fields to limit the date selection // Set the 'min' and 'max' attributes of the input fields to limit the date selection
document.getElementById("fromdate").setAttribute("min", today.toISOString().split('T')[0]);
/*document.getElementById("fromdate").setAttribute("min", today.toISOString().split('T')[0]);
document.getElementById("fromdate").setAttribute("max", sixMonthsFromNow.toISOString().split('T')[0]); document.getElementById("fromdate").setAttribute("max", sixMonthsFromNow.toISOString().split('T')[0]);
document.getElementById("todate").setAttribute("min", today.toISOString().split('T')[0]); document.getElementById("todate").setAttribute("min", today.toISOString().split('T')[0]);
document.getElementById("todate").setAttribute("max", sixMonthsFromNow.toISOString().split('T')[0]); document.getElementById("todate").setAttribute("max", sixMonthsFromNow.toISOString().split('T')[0]);
@ -812,7 +876,7 @@
document.getElementById("selectedStartDate").setAttribute("min", today.toISOString().split('T')[0]); document.getElementById("selectedStartDate").setAttribute("min", today.toISOString().split('T')[0]);
document.getElementById("selectedStartDate").setAttribute("max", sixMonthsFromNow.toISOString().split('T')[0]); document.getElementById("selectedStartDate").setAttribute("max", sixMonthsFromNow.toISOString().split('T')[0]);
document.getElementById("selectedEndDate").setAttribute("min", today.toISOString().split('T')[0]); document.getElementById("selectedEndDate").setAttribute("min", today.toISOString().split('T')[0]);
document.getElementById("selectedEndDate").setAttribute("max", sixMonthsFromNow.toISOString().split('T')[0]);
document.getElementById("selectedEndDate").setAttribute("max", sixMonthsFromNow.toISOString().split('T')[0]);*/
//Function for toggle button //Function for toggle button
function toggleButtonClicked() { function toggleButtonClicked() {

37
src/main/resources/templates/user/hallbookingform.html

@ -1034,6 +1034,7 @@
<form action="javascript:saveBookingDetails()" id="booking" <form action="javascript:saveBookingDetails()" id="booking"
method="post" enctype="multipart/form-data" method="post" enctype="multipart/form-data"
onsubmit="return handleSaveAndContinueStep3()"> onsubmit="return handleSaveAndContinueStep3()">
<input type="hidden" id="serverDate" th:value=${serverDate}>
<div class="step step-1"> <div class="step step-1">
<h5>Step:1</h5> <h5>Step:1</h5>
<div class="container custom-container" <div class="container custom-container"
@ -1707,6 +1708,7 @@
<script th:replace="~{fragments/logRegiOtpScript :: script}"></script> <script th:replace="~{fragments/logRegiOtpScript :: script}"></script>
<script th:replace="~{fragments/PaymentScript :: script}"></script> <script th:replace="~{fragments/PaymentScript :: script}"></script>
<script src="https://cdn.jsdelivr.net/npm/compressorjs@latest/dist/compressor.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/compressorjs@latest/dist/compressor.min.js"></script>
<!-- Payment script end--> <!-- Payment script end-->
<script> <script>
let reasonMaxData = new Map(); // in beginning let reasonMaxData = new Map(); // in beginning
@ -3032,33 +3034,40 @@
// Destroy existing datepicker to avoid duplicate initialization // Destroy existing datepicker to avoid duplicate initialization
$("#datepicker-container").datepicker("destroy"); $("#datepicker-container").datepicker("destroy");
const serverDate =new Date($("#serverDate").val() + "T00:00:00")
console.log("serverDate:", serverDate);
const maxDate = new Date(serverDate);
maxDate.setMonth(maxDate.getMonth() + 6);
console.log(" hall booking form Max Date: "+maxDate);
// Initialize the datepicker // Initialize the datepicker
$("#startDateInput,#datepicker-container").datepicker({ $("#startDateInput,#datepicker-container").datepicker({
dateFormat: "yy-mm-dd", dateFormat: "yy-mm-dd",
minDate: 0,
maxDate: "+6M",
minDate: serverDate,
maxDate: maxDate,
beforeShowDay: function (eDate) { beforeShowDay: function (eDate) {
const dateString = $.datepicker.formatDate("yy-mm-dd", eDate); const dateString = $.datepicker.formatDate("yy-mm-dd", eDate);
const bookingStatus = window.bookingResponse[dateString] || {}; const bookingStatus = window.bookingResponse[dateString] || {};
const currentDate = new Date();
currentDate.setHours(0, 0, 0, 0); // Normalize current date to midnight
// const currentDate = new Date();
serverDate.setHours(0, 0, 0, 0); // Normalize current date to midnight
eDate.setHours(0, 0, 0, 0); // Normalize selected date to midnight eDate.setHours(0, 0, 0, 0); // Normalize selected date to midnight
// Logic for other dates // Logic for other dates
if (eDate < currentDate) {
if (eDate < serverDate) {
return [false, "highlight-disabled", "Slot not Available"]; return [false, "highlight-disabled", "Slot not Available"];
} }
const isToday = eDate.getTime() === currentDate.getTime();
const isToday = eDate.getTime() === serverDate.getTime();
const currentHour = new Date().getHours(); const currentHour = new Date().getHours();
const isBefore6AM = currentHour < 6; const isBefore6AM = currentHour < 6;
const isAfter2PM = currentHour >= 14; const isAfter2PM = currentHour >= 14;
// Block 3-day logic for specific event types // Block 3-day logic for specific event types
const today = new Date();
const blockedDate = new Date(today);
blockedDate.setDate(today.getDate() + 2);
// const today = new Date();
const blockedDate = new Date(serverDate);
blockedDate.setDate(serverDate.getDate() + 2);
if (eDate <= blockedDate && window.isThreeDayBlock) { if (eDate <= blockedDate && window.isThreeDayBlock) {
return [false, "highlight-disabled", "Blocked due to event type"]; return [false, "highlight-disabled", "Blocked due to event type"];
@ -3091,9 +3100,9 @@
$("#startDateInput").on("change", function () { $("#startDateInput").on("change", function () {
const selectedDate = $(this).val(); const selectedDate = $(this).val();
const bookingStatus = window.bookingResponse[selectedDate] || {}; const bookingStatus = window.bookingResponse[selectedDate] || {};
const currentDate = new Date();
const currentHours = currentDate.getHours();
const currentDateString = currentDate.toISOString().split("T")[0];
// const currentDate = new Date();
const currentHours = serverDate.getHours();
const currentDateString = serverDate.toISOString().split("T")[0];
$("#startPeriodDropdown").val(0).prop("disabled", false); $("#startPeriodDropdown").val(0).prop("disabled", false);
$("#endPeriodDropdown").val(0).prop("disabled", false); $("#endPeriodDropdown").val(0).prop("disabled", false);
@ -3121,9 +3130,9 @@
function handleBookingStatus(bookingStatus, defaultMessage) { function handleBookingStatus(bookingStatus, defaultMessage) {
if (bookingStatus[2]) { if (bookingStatus[2]) {
return [true, "highlight-blue disabled", "GCC Blocked"]; return [true, "highlight-blue disabled", "GCC Blocked"];
} else if (bookingStatus[3]) {
} /*else if (bookingStatus[3]) {
return [true, "highlight-lightpink disabled", "Temporary Blocked"]; return [true, "highlight-lightpink disabled", "Temporary Blocked"];
} else if (bookingStatus[0] && bookingStatus[1]) {
} */else if (bookingStatus[0] && bookingStatus[1]) {
return [true, "highlight-pink disabled", "Slot Occupied"]; return [true, "highlight-pink disabled", "Slot Occupied"];
} else if (bookingStatus[0] && !bookingStatus[1]) { } else if (bookingStatus[0] && !bookingStatus[1]) {
return [true, "highlight-yellow", "Evening Slot Available"]; return [true, "highlight-yellow", "Evening Slot Available"];

30
src/main/resources/templates/user/viewhallform.html

@ -1071,6 +1071,7 @@
<div id="hallDetailsContainer" style="display: none;"> <div id="hallDetailsContainer" style="display: none;">
<!-- Initially hidden--> <!-- Initially hidden-->
<div class="row"> <div class="row">
<input type="hidden" id="serverDate" th:value=${serverDate}>
<!--Hall Images Carousel --> <!--Hall Images Carousel -->
<div class="col-md-6 col-lg-6 col-sm-6"> <div class="col-md-6 col-lg-6 col-sm-6">
<h6>Hall Images:</h6> <h6>Hall Images:</h6>
@ -1519,33 +1520,40 @@
// Destroy existing datepicker to avoid duplicate initialization // Destroy existing datepicker to avoid duplicate initialization
$("#datepicker-container").datepicker("destroy"); $("#datepicker-container").datepicker("destroy");
const serverDate =new Date($("#serverDate").val() + "T00:00:00")
console.log("serverDate:", serverDate);
const maxDate = new Date(serverDate);
maxDate.setMonth(maxDate.getMonth() + 6);
console.log("Max Date: "+maxDate);
// Initialize the datepicker // Initialize the datepicker
$("#startDateInput,#datepicker-container").datepicker({ $("#startDateInput,#datepicker-container").datepicker({
dateFormat: "yy-mm-dd", dateFormat: "yy-mm-dd",
minDate: 0,
maxDate: "+6M",
minDate: serverDate,
maxDate: maxDate,
beforeShowDay: function (eDate) { beforeShowDay: function (eDate) {
const dateString = $.datepicker.formatDate("yy-mm-dd", eDate); const dateString = $.datepicker.formatDate("yy-mm-dd", eDate);
const bookingStatus = window.bookingResponse[dateString] || {}; const bookingStatus = window.bookingResponse[dateString] || {};
const currentDate = new Date();
currentDate.setHours(0, 0, 0, 0); // Normalize current date to midnight
// const currentDate = new Date();
serverDate.setHours(0, 0, 0, 0); // Normalize current date to midnight
eDate.setHours(0, 0, 0, 0); // Normalize selected date to midnight eDate.setHours(0, 0, 0, 0); // Normalize selected date to midnight
// Logic for other dates // Logic for other dates
if (eDate < currentDate) {
if (eDate < serverDate) {
return [false, "highlight-disabled", "Slot not Available"]; return [false, "highlight-disabled", "Slot not Available"];
} }
const isToday = eDate.getTime() === currentDate.getTime();
const isToday = eDate.getTime() === serverDate.getTime();
const currentHour = new Date().getHours(); const currentHour = new Date().getHours();
const isBefore6AM = currentHour < 6; const isBefore6AM = currentHour < 6;
const isAfter2PM = currentHour >= 14; const isAfter2PM = currentHour >= 14;
// Block 3-day logic for specific event types // Block 3-day logic for specific event types
const today = new Date();
const blockedDate = new Date(today);
blockedDate.setDate(today.getDate() + 2);
// const today = new Date();
const blockedDate = new Date(serverDate);
blockedDate.setDate(serverDate.getDate() + 2);
if (eDate <= blockedDate && window.isThreeDayBlock) { if (eDate <= blockedDate && window.isThreeDayBlock) {
return [false, "highlight-disabled", "Blocked due to event type"]; return [false, "highlight-disabled", "Blocked due to event type"];
@ -1608,9 +1616,9 @@
function handleBookingStatus(bookingStatus, defaultMessage) { function handleBookingStatus(bookingStatus, defaultMessage) {
if (bookingStatus[2]) { if (bookingStatus[2]) {
return [true, "highlight-blue disabled", "GCC Blocked"]; return [true, "highlight-blue disabled", "GCC Blocked"];
} else if (bookingStatus[3]) {
} /*else if (bookingStatus[3]) {
return [true, "highlight-lightpink disabled", "Temporary Blocked"]; return [true, "highlight-lightpink disabled", "Temporary Blocked"];
} else if (bookingStatus[0] && bookingStatus[1]) {
} */else if (bookingStatus[0] && bookingStatus[1]) {
return [true, "highlight-pink disabled", "Slot Occupied"]; return [true, "highlight-pink disabled", "Slot Occupied"];
} else if (bookingStatus[0] && !bookingStatus[1]) { } else if (bookingStatus[0] && !bookingStatus[1]) {
return [true, "highlight-yellow", "Evening Slot Available"]; return [true, "highlight-yellow", "Evening Slot Available"];

31
src/main/resources/templates/user/viewhistory.html

@ -736,7 +736,7 @@
</div> </div>
<input type="hidden" id="serverDate" th:value=${serverDate}>
<div class="modal fade backdrop" id="showBookingDetails" data-backdrop="static" <div class="modal fade backdrop" id="showBookingDetails" data-backdrop="static"
tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel"
aria-hidden="true"> aria-hidden="true">
@ -2094,33 +2094,40 @@
function initializeDatepickerWithColors(hallId, reason) { // Confirm hallId is passed here function initializeDatepickerWithColors(hallId, reason) { // Confirm hallId is passed here
$("#datepicker-container").datepicker("destroy"); $("#datepicker-container").datepicker("destroy");
const serverDate =new Date($("#serverDate").val() + "T00:00:00")
console.log(" view history Date:", serverDate);
const maxDate = new Date(serverDate);
maxDate.setMonth(maxDate.getMonth() + 6);
console.log("View History: "+maxDate);
$("#startDateInput,#datepicker-container").datepicker({ $("#startDateInput,#datepicker-container").datepicker({
dateFormat: "yy-mm-dd", dateFormat: "yy-mm-dd",
minDate:0,
maxDate: "+6M",
minDate: serverDate,
maxDate: maxDate,
beforeShowDay: function (eDate) { beforeShowDay: function (eDate) {
const dateString = $.datepicker.formatDate("yy-mm-dd", eDate); const dateString = $.datepicker.formatDate("yy-mm-dd", eDate);
const bookingStatus = window.bookingResponse[dateString] || {}; const bookingStatus = window.bookingResponse[dateString] || {};
const currentDate = new Date();
currentDate.setHours(0, 0, 0, 0); // Normalize current date to midnight
// const currentDate = new Date();
serverDate.setHours(0, 0, 0, 0); // Normalize current date to midnight
eDate.setHours(0, 0, 0, 0); // Normalize selected date to midnight eDate.setHours(0, 0, 0, 0); // Normalize selected date to midnight
// Logic for other dates // Logic for other dates
if (eDate < currentDate) {
if (eDate < serverDate) {
return [false, "highlight-disabled", "Slot not Available"]; return [false, "highlight-disabled", "Slot not Available"];
} }
const isToday = eDate.getTime() === currentDate.getTime();
const isToday = eDate.getTime() === serverDate.getTime();
const currentHour = new Date().getHours(); const currentHour = new Date().getHours();
const isBefore6AM = currentHour < 6; const isBefore6AM = currentHour < 6;
const isAfter2PM = currentHour >= 14; const isAfter2PM = currentHour >= 14;
// Block 3-day logic for specific event types // Block 3-day logic for specific event types
const today = new Date();
const blockedDate = new Date(today);
blockedDate.setDate(today.getDate() + 2);
// const today = new Date();
const blockedDate = new Date(serverDate);
blockedDate.setDate(serverDate.getDate() + 2);
const isThreeDayBlock = ["Commercial", "State Govt Event", "Central Govt Event"].includes(reason); const isThreeDayBlock = ["Commercial", "State Govt Event", "Central Govt Event"].includes(reason);
if (eDate <= blockedDate && isThreeDayBlock) { if (eDate <= blockedDate && isThreeDayBlock) {
@ -2159,9 +2166,9 @@
function handleBookingStatus(bookingStatus, defaultMessage) { function handleBookingStatus(bookingStatus, defaultMessage) {
if (bookingStatus[2]) { if (bookingStatus[2]) {
return [true, "highlight-blue disabled", "GCC Blocked"]; return [true, "highlight-blue disabled", "GCC Blocked"];
} else if (bookingStatus[3]) {
} /*else if (bookingStatus[3]) {
return [true, "highlight-lightpink disabled", "Temporary Blocked"]; return [true, "highlight-lightpink disabled", "Temporary Blocked"];
} else if (bookingStatus[0] && bookingStatus[1]) {
}*/ else if (bookingStatus[0] && bookingStatus[1]) {
return [true, "highlight-pink disabled", "Slot Occupied"]; return [true, "highlight-pink disabled", "Slot Occupied"];
} else if (bookingStatus[0] && !bookingStatus[1]) { } else if (bookingStatus[0] && !bookingStatus[1]) {
return [true, "highlight-yellow", "Evening Slot Available"]; return [true, "highlight-yellow", "Evening Slot Available"];

Loading…
Cancel
Save