@openlist-frontend/openlist-frontend 4.2.0 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/dist/VERSION +1 -1
  2. package/dist/assets/polyfills-legacy-h7H8XqQx.js +1 -0
  3. package/dist/i18n.tar.gz +0 -0
  4. package/dist/index.html +1 -1
  5. package/dist/lite/VERSION +1 -1
  6. package/dist/lite/assets/{2fa-Cpwit0Sr.js → 2fa-DTutmNbf.js} +1 -1
  7. package/dist/lite/assets/{2fa-legacy-BV80Xmmb.js → 2fa-legacy-DbBySHVF.js} +1 -1
  8. package/dist/lite/assets/{About-Cu2-75RR.js → About-_hJuNaH_.js} +1 -1
  9. package/dist/lite/assets/{About-legacy-C37sOQhm.js → About-legacy-CaLm7kbI.js} +1 -1
  10. package/dist/lite/assets/{AddOrEdit-Wdbp4PWO.js → AddOrEdit-49-UQtaG.js} +1 -1
  11. package/dist/lite/assets/{AddOrEdit-BWduAPOa.js → AddOrEdit-BCTuahUP.js} +1 -1
  12. package/dist/lite/assets/{AddOrEdit-CZnPofX2.js → AddOrEdit-Bgz6_5Sb.js} +1 -1
  13. package/dist/lite/assets/{AddOrEdit-cxf_NyVS.js → AddOrEdit-CbKEYHAy.js} +1 -1
  14. package/dist/lite/assets/{AddOrEdit-legacy-DAXPEGkN.js → AddOrEdit-legacy-CcWxIJSY.js} +1 -1
  15. package/dist/lite/assets/{AddOrEdit-legacy-2bg6358l.js → AddOrEdit-legacy-DOf8eTkz.js} +1 -1
  16. package/dist/lite/assets/{AddOrEdit-legacy-BB_Q5cWC.js → AddOrEdit-legacy-DvuS1lGq.js} +1 -1
  17. package/dist/lite/assets/{AddOrEdit-legacy-Bi5RkSpR.js → AddOrEdit-legacy-SS88nL_8.js} +1 -1
  18. package/dist/lite/assets/Common-7SPE00KT.js +1 -0
  19. package/dist/lite/assets/{Common-SxI9gPMx.js → Common-DKBpZ31X.js} +1 -1
  20. package/dist/lite/assets/{Common-legacy-DlpN8uIa.js → Common-legacy-B179Edqf.js} +1 -1
  21. package/dist/lite/assets/Common-legacy-DG884Joe.js +1 -0
  22. package/dist/lite/assets/{Copy-DTFns9Y1.js → Copy-BQypLOnU.js} +1 -1
  23. package/dist/lite/assets/{Copy-legacy-B72Ffy5O.js → Copy-legacy-CHg9MrvY.js} +1 -1
  24. package/dist/lite/assets/{Decompress-legacy-CZ_oH15V.js → Decompress-legacy-Cb2O6mH9.js} +1 -1
  25. package/dist/lite/assets/{Decompress-BPew2ezc.js → Decompress-sZhi71xA.js} +1 -1
  26. package/dist/lite/assets/{DeletePopover-cSxOxJZY.js → DeletePopover-9knkuVst.js} +1 -1
  27. package/dist/lite/assets/{DeletePopover-legacy-CBtUkOSh.js → DeletePopover-legacy-KFuQEYkg.js} +1 -1
  28. package/dist/lite/assets/{File-D7bnUBYC.js → File-Cm5ZVXiU.js} +1 -1
  29. package/dist/lite/assets/{File-legacy-aPuubWt-.js → File-legacy-BghKHFM3.js} +1 -1
  30. package/dist/lite/assets/{Folder-legacy-Bp34_ra2.js → Folder-legacy-rxbbWmwF.js} +1 -1
  31. package/dist/lite/assets/{Folder-DdumvcC1.js → Folder-u_3vXWLj.js} +3 -3
  32. package/dist/lite/assets/{Grid-C9qEJXle.js → Grid-CQOeEHng.js} +1 -1
  33. package/dist/lite/assets/{Grid-legacy-DFmTlJOv.js → Grid-legacy-CZ5i1Iq2.js} +1 -1
  34. package/dist/lite/assets/{GridItem-Cb9pnioW.js → GridItem-BnM21uyA.js} +1 -1
  35. package/dist/lite/assets/{GridItem-legacy-8gNLCEoo.js → GridItem-legacy-iFmz7kDs.js} +1 -1
  36. package/dist/lite/assets/{Images-C_Ql-iwF.js → Images-DohfDDrf.js} +1 -1
  37. package/dist/lite/assets/{Images-legacy-CoWBNLGZ.js → Images-legacy-4WKrTzml.js} +1 -1
  38. package/dist/lite/assets/{Layout-BQJH47LI.js → Layout-Dq3Tblc3.js} +4 -4
  39. package/dist/lite/assets/{Layout-legacy-MFuRQRbi.js → Layout-legacy-BqI9aaEd.js} +1 -1
  40. package/dist/lite/assets/{List-Dp5qYO6K.js → List-CKWRuz8M.js} +1 -1
  41. package/dist/lite/assets/{List-legacy-LpRbqCuW.js → List-legacy-CfJa4V_M.js} +1 -1
  42. package/dist/lite/assets/{Messenger-m_DjhhjC.js → Messenger-Csg3VDhD.js} +1 -1
  43. package/dist/lite/assets/{Messenger-legacy-qy8NmzD_.js → Messenger-legacy-Aqu2TXLS.js} +1 -1
  44. package/dist/lite/assets/{Metas-BW-d9X3k.js → Metas-CFhxnUzn.js} +1 -1
  45. package/dist/lite/assets/{Metas-legacy-DF5C5c9k.js → Metas-legacy-CpZKT74d.js} +1 -1
  46. package/dist/lite/assets/{Move-Btb_epTo.js → Move-Bp7Hz-5A.js} +1 -1
  47. package/dist/lite/assets/{Move-legacy-CkLWtx_Y.js → Move-legacy-iko-6o08.js} +1 -1
  48. package/dist/lite/assets/{Other-D3tOfd7k.js → Other-CmK2wAaG.js} +1 -1
  49. package/dist/lite/assets/{Other-legacy-Cx6-rrJn.js → Other-legacy-BfsPMHAC.js} +1 -1
  50. package/dist/lite/assets/{PackageDownload-C4OIBiuO.js → PackageDownload-DAD_3hcp.js} +1 -1
  51. package/dist/lite/assets/{PackageDownload-legacy-D6wcXpsR.js → PackageDownload-legacy-CYUHsuep.js} +1 -1
  52. package/dist/lite/assets/{Password-DOgJvyE0.js → Password-CsEn2L1J.js} +1 -1
  53. package/dist/lite/assets/{Password-legacy-Dau7Rj6C.js → Password-legacy-C_ug59KC.js} +1 -1
  54. package/dist/lite/assets/{Profile-vc4L2vOh.js → Profile-DE1w63ju.js} +1 -1
  55. package/dist/lite/assets/{Profile-legacy-CG7V6K6c.js → Profile-legacy-BccA5tXg.js} +1 -1
  56. package/dist/lite/assets/{PublicKeys-BhL22dhK.js → PublicKeys-DhLQRXa5.js} +1 -1
  57. package/dist/lite/assets/{PublicKeys-legacy-w8t5s90k.js → PublicKeys-legacy-Dm2rmP-Z.js} +1 -1
  58. package/dist/lite/assets/{ResponsiveGrid--eNaea9R.js → ResponsiveGrid-CPv65KKk.js} +1 -1
  59. package/dist/lite/assets/{ResponsiveGrid-legacy-BcOgU6tQ.js → ResponsiveGrid-legacy-B09IQ8PO.js} +1 -1
  60. package/dist/lite/assets/{S3-D5KR0Y4t.js → S3-3qppG_kP.js} +1 -1
  61. package/dist/lite/assets/{S3-legacy-DwkNpjzH.js → S3-legacy-GtHjMhMP.js} +1 -1
  62. package/dist/lite/assets/{SettingItem-gAxndiQS.js → SettingItem-BNkjHZxi.js} +1 -1
  63. package/dist/lite/assets/{SettingItem-legacy-CoygdggD.js → SettingItem-legacy-DhwPjjh6.js} +1 -1
  64. package/dist/lite/assets/{Shares-DYa-7p_E.js → Shares-CxJ5bbP4.js} +1 -1
  65. package/dist/lite/assets/{Shares-legacy-CD4V2Nkm.js → Shares-legacy-bRg_GWJc.js} +1 -1
  66. package/dist/lite/assets/{Storages-B0C3wLOw.js → Storages-CiA0_Ux3.js} +1 -1
  67. package/dist/lite/assets/{Storages-legacy-Hu3NLgcV.js → Storages-legacy-nNc5p2x6.js} +1 -1
  68. package/dist/lite/assets/{Upload-CujV1cl2.js → Upload-6mLh9vS_.js} +1 -1
  69. package/dist/lite/assets/{Upload-CoXrosgy.js → Upload-LroLcc--.js} +1 -1
  70. package/dist/lite/assets/{Upload-legacy-BrGogy7u.js → Upload-legacy-DzBqXsqi.js} +1 -1
  71. package/dist/lite/assets/{Upload-legacy-ipwT0CGa.js → Upload-legacy-YbbM49hO.js} +1 -1
  72. package/dist/lite/assets/{Users-CQMS_vRF.js → Users-Cebos0QK.js} +1 -1
  73. package/dist/lite/assets/{Users-legacy-CMqmVwDR.js → Users-legacy-D4Ji7uVA.js} +1 -1
  74. package/dist/lite/assets/{aliyun_video-BPU9Winc.js → aliyun_video-DMomVZ86.js} +1 -1
  75. package/dist/lite/assets/{aliyun_video-legacy-DqXKJ6bJ.js → aliyun_video-legacy-BVrXTQ7C.js} +1 -1
  76. package/dist/lite/assets/{archive-CFoJgIJg.js → archive-iaznZ7i5.js} +1 -1
  77. package/dist/lite/assets/{archive-legacy-CbLxcvcU.js → archive-legacy-BTi-FFWj.js} +1 -1
  78. package/dist/lite/assets/{artplayer-CKFboV1K.js → artplayer-GcZA8xWm.js} +1 -1
  79. package/dist/lite/assets/{artplayer-legacy-nsuIJ8X1.js → artplayer-legacy-0q8fSTli.js} +1 -1
  80. package/dist/lite/assets/{asciinema-Co15uYSl.js → asciinema-hP2thET0.js} +1 -1
  81. package/dist/lite/assets/{asciinema-legacy-cldShqIF.js → asciinema-legacy-HM3pomQn.js} +1 -1
  82. package/dist/lite/assets/{audio-DN7yh-1u.js → audio-CEdHvJQm.js} +1 -1
  83. package/dist/lite/assets/{audio-legacy-ZcTFmCaq.js → audio-legacy-Bf3rfImY.js} +1 -1
  84. package/dist/lite/assets/{backup-restore-CyTdjYa5.js → backup-restore-BI1XH72_.js} +1 -1
  85. package/dist/lite/assets/{backup-restore-legacy-4843qwpn.js → backup-restore-legacy-o4-z3xf2.js} +1 -1
  86. package/dist/lite/assets/{cg-BoXizs5U.js → cg-Cugc4PRy.js} +1 -1
  87. package/dist/lite/assets/{cg-legacy-B6dnZxHN.js → cg-legacy-en8-FR60.js} +1 -1
  88. package/dist/lite/assets/{doc-CwFJHCye.js → doc-Dx8w2-z-.js} +1 -1
  89. package/dist/lite/assets/{doc-legacy-BcqyYqI8.js → doc-legacy-Cirxey5M.js} +1 -1
  90. package/dist/lite/assets/{download-BWIL9ZbS.js → download-D5HXXjYD.js} +1 -1
  91. package/dist/lite/assets/{download-legacy-BRxDfnJM.js → download-legacy-BtfDXiWv.js} +1 -1
  92. package/dist/lite/assets/{flash-Do4k4HF4.js → flash-D3tyxPhf.js} +1 -1
  93. package/dist/lite/assets/{flash-legacy-Dth0lnEy.js → flash-legacy-C4GlbMx5.js} +1 -1
  94. package/dist/lite/assets/{heic-BQ1sxr--.js → heic-DddGOj_0.js} +1 -1
  95. package/dist/lite/assets/{heic-legacy-D7C3AFkl.js → heic-legacy-B6Y5cyvF.js} +1 -1
  96. package/dist/lite/assets/{helper-COm3HMuR.js → helper-DZTPC0ym.js} +1 -1
  97. package/dist/lite/assets/{helper-CW89pSnh.js → helper-DcuvUci3.js} +1 -1
  98. package/dist/lite/assets/{helper-legacy-CRIrgp8-.js → helper-legacy-Cuhr9yhF.js} +1 -1
  99. package/dist/lite/assets/{helper-legacy-CmC0lRkW.js → helper-legacy-qY9yuzKw.js} +1 -1
  100. package/dist/lite/assets/{html-BH-siIo1.js → html-TrHlpF58.js} +1 -1
  101. package/dist/lite/assets/{html-legacy-C6F-KW6p.js → html-legacy-RtqGGa31.js} +1 -1
  102. package/dist/lite/assets/{icon-I31eZk5I.js → icon-TcP3LdUy.js} +1 -1
  103. package/dist/lite/assets/{icon-legacy-Cmi1b15o.js → icon-legacy-CCjPA35g.js} +1 -1
  104. package/dist/lite/assets/{im-32Y5iioc.js → im-Bfh3t-9k.js} +1 -1
  105. package/dist/lite/assets/{im-legacy-CuBPXwQP.js → im-legacy-bfeqh7q-.js} +1 -1
  106. package/dist/lite/assets/{image-Cn7F3i7p.js → image-CHfw1saX.js} +1 -1
  107. package/dist/lite/assets/{image-legacy-BdZBZ4I3.js → image-legacy-FyBUH0Wv.js} +1 -1
  108. package/dist/lite/assets/{index-BdrlLL7h.js → index-Do6wV20T.js} +4 -4
  109. package/dist/lite/assets/{index-legacy-DVVw2Tdl.js → index-legacy-DX8ZPqos.js} +1 -1
  110. package/dist/lite/assets/{index_page-CI4452wz.js → index_page-Ci6zIIEm.js} +1 -1
  111. package/dist/lite/assets/{index_page-legacy-DpZgbky_.js → index_page-legacy-Dia6n6V8.js} +1 -1
  112. package/dist/lite/assets/{info-4RJdJqGX.js → info-Eur0D5WL.js} +1 -1
  113. package/dist/lite/assets/{info-legacy-D81BT5je.js → info-legacy-DSnpfN_T.js} +1 -1
  114. package/dist/lite/assets/{ipa-BRMsKQrP.js → ipa-QQId27CM.js} +1 -1
  115. package/dist/lite/assets/{ipa-legacy-DxYHqNRr.js → ipa-legacy-Dk-qFvQl.js} +1 -1
  116. package/dist/lite/assets/{login-DSgwb8b8.js → login-DNWEpAg4.js} +1 -1
  117. package/dist/lite/assets/{login-legacy-CE4m2hrW.js → login-legacy-X5eqwtmJ.js} +1 -1
  118. package/dist/lite/assets/{manage-Bn2g6-4u.js → manage-BoJn00at.js} +2 -2
  119. package/dist/lite/assets/{manage-legacy-Ctq_PlSk.js → manage-legacy-BWRpx6eL.js} +1 -1
  120. package/dist/lite/assets/markdown-BeLwer8m.js +1 -0
  121. package/dist/lite/assets/{markdown-legacy-SrX3ihxa.js → markdown-legacy-DqCEmWHU.js} +1 -1
  122. package/dist/lite/assets/{markdown_with_word_wrap-CTF7F6kA.js → markdown_with_word_wrap-Ck5Le6kt.js} +1 -1
  123. package/dist/lite/assets/{markdown_with_word_wrap-legacy-5S3gtO5K.js → markdown_with_word_wrap-legacy-B778apZq.js} +1 -1
  124. package/dist/lite/assets/{offline_download-DplxhzId.js → offline_download-BxvK9sas.js} +1 -1
  125. package/dist/lite/assets/{offline_download-legacy-D-fNKFYv.js → offline_download-legacy-Sn7LVNoj.js} +1 -1
  126. package/dist/lite/assets/{open-with-DB-thDwq.js → open-with-Dm0Xiltd.js} +1 -1
  127. package/dist/lite/assets/{open-with-legacy-BV0zWWih.js → open-with-legacy-CzqkMUrw.js} +1 -1
  128. package/dist/lite/assets/{operations-DUc1_ZG_.js → operations-DtIJGjr3.js} +1 -1
  129. package/dist/lite/assets/{operations-legacy-D7uRiFrF.js → operations-legacy-x4qCe3Nr.js} +1 -1
  130. package/dist/lite/assets/{plist-Bdtf7mmC.js → plist-I5MRvpO4.js} +1 -1
  131. package/dist/lite/assets/{plist-legacy-BUgj41A2.js → plist-legacy-BjlqWsae.js} +1 -1
  132. package/dist/lite/assets/polyfills-legacy-CY-LI3wc.js +1 -0
  133. package/dist/lite/assets/{ppt-legacy-CfobOD2q.js → ppt-legacy-BauMuKYT.js} +1 -1
  134. package/dist/lite/assets/{ppt-CQUs3gCH.js → ppt-sj6qWvel.js} +1 -1
  135. package/dist/lite/assets/{previews-ikRB1E3g.js → previews-C3V57ws2.js} +2 -2
  136. package/dist/lite/assets/{previews-legacy-BOyZeoEk.js → previews-legacy-C_1n4grk.js} +1 -1
  137. package/dist/lite/assets/{rehype-katex-PXUO2tmG.js → rehype-katex-fpXCKXq-.js} +1 -1
  138. package/dist/lite/assets/{rehype-katex-legacy-l00blOnq.js → rehype-katex-legacy-t-Y3uu45.js} +1 -1
  139. package/dist/lite/assets/{remark-math-B2pF2g5L.js → remark-math-DmyB6UtF.js} +1 -1
  140. package/dist/lite/assets/{remark-math-legacy-C2fL8O2-.js → remark-math-legacy-BxMiMhBe.js} +1 -1
  141. package/dist/lite/assets/{ri-BpBjk-eu.js → ri-Co752El1.js} +1 -1
  142. package/dist/lite/assets/{ri-legacy-DF_J6UvM.js → ri-legacy-C5_hBj57.js} +1 -1
  143. package/dist/lite/assets/{si-CExwmFBP.js → si-8vtL5WDZ.js} +1 -1
  144. package/dist/lite/assets/{si-legacy-CM4ZmTcr.js → si-legacy-CRNlhjOc.js} +1 -1
  145. package/dist/lite/assets/{solid-contextmenu-DNoyC52a.js → solid-contextmenu-Q14whW6u.js} +1 -1
  146. package/dist/lite/assets/{solid-contextmenu-legacy-DSVwqGw2.js → solid-contextmenu-legacy-sZs92FT7.js} +1 -1
  147. package/dist/lite/assets/{store-BgSFahAe.js → store-jmqpI8w9.js} +1 -1
  148. package/dist/lite/assets/{store-legacy-DEv5m7Se.js → store-legacy-CI1UFD5I.js} +1 -1
  149. package/dist/lite/assets/test-VgTEJWSX.js +1 -0
  150. package/dist/lite/assets/{test-legacy-CwP5y5rh.js → test-legacy-BRB5AFL9.js} +1 -1
  151. package/dist/lite/assets/{text-editor-CXH-M_d8.js → text-editor-DN-5m547.js} +1 -1
  152. package/dist/lite/assets/{text-editor-legacy-Bvg6h1LG.js → text-editor-legacy-DlNbA4NX.js} +1 -1
  153. package/dist/lite/assets/{ti-DorTQHjy.js → ti-CJTnvYDC.js} +1 -1
  154. package/dist/lite/assets/{ti-legacy-BLnieiZv.js → ti-legacy-C5F9deYz.js} +1 -1
  155. package/dist/lite/assets/{url-CrBOHT0m.js → url-Dc_ERS90.js} +1 -1
  156. package/dist/lite/assets/{url-legacy-BlD6ZzNt.js → url-legacy-DqRcH2qB.js} +1 -1
  157. package/dist/lite/assets/{video-2Qz8WbEM.js → video-CMVGTs9H.js} +1 -1
  158. package/dist/lite/assets/{video-legacy-CZofzk3c.js → video-legacy-CARCtj8A.js} +1 -1
  159. package/dist/lite/assets/{video360-DUQPJklE.js → video360-Cn4J_avk.js} +1 -1
  160. package/dist/lite/assets/{video360-legacy-t7FzLnsS.js → video360-legacy-QrceD6P2.js} +1 -1
  161. package/dist/lite/assets/{video_box-wwi7WLeT.js → video_box-BpjZ-ZST.js} +1 -1
  162. package/dist/lite/assets/{video_box-legacy-B4dnjnjL.js → video_box-legacy-DJTbgfFE.js} +1 -1
  163. package/dist/lite/assets/{vs-DQyKZ4nV.js → vs-D6iduhy9.js} +1 -1
  164. package/dist/lite/assets/{vs-legacy-Gzvbg9kw.js → vs-legacy-HDoHHJI2.js} +1 -1
  165. package/dist/lite/assets/{xls-UBX1oyWL.js → xls-B0hoyRio.js} +1 -1
  166. package/dist/lite/assets/{xls-legacy-BTO_I1zz.js → xls-legacy-B5QjbgBE.js} +1 -1
  167. package/dist/lite/i18n.tar.gz +0 -0
  168. package/dist/lite/index.html +2 -2
  169. package/package.json +1 -1
  170. package/dist/assets/polyfills-legacy-3zNmgeF1.js +0 -1
  171. package/dist/lite/assets/Common-GRQCAwrU.js +0 -1
  172. package/dist/lite/assets/Common-legacy-eXCYBqpA.js +0 -1
  173. package/dist/lite/assets/markdown-BDzlyh3V.js +0 -1
  174. package/dist/lite/assets/polyfills-legacy-D9TUrbOt.js +0 -1
  175. package/dist/lite/assets/test-Bp2AX12i.js +0 -1
@@ -1 +1 @@
1
- System.register(["./chunk-legacy-D5ZT36tR.js","./store-legacy-DEv5m7Se.js","./obj-legacy-BLJL3FDc.js","./index-legacy-DVVw2Tdl.js","./operations-legacy-D7uRiFrF.js","./icon-legacy-Cmi1b15o.js","./solid-contextmenu-legacy-DSVwqGw2.js","./style-legacy-DWnOp_Km.js","./video_box-legacy-B4dnjnjL.js","./lightgallery-bundle-legacy-DmyaSLVh.js"],function(t,e){var i,o,s,n,r,l,a,h,g,c,d,u,p,m,f,y,v,b,S,x,w,C,I,T,z,E,k,O,L,A,P,M,D,R,$,G,F,N,B,_,H,X,V,W,j,Y,Z,U,q,J,K,Q,tt,et,it,ot,st,nt,rt,lt,at,ht,gt,ct,dt,ut,pt,mt,ft,yt,vt,bt,St,xt,wt,Ct,It,Tt,zt,Et,kt,Ot,Lt,At,Pt,Mt,Dt,Rt,$t,Gt,Ft,Nt,Bt,_t,Ht,Xt,Vt,Wt,jt,Yt,Zt,Ut,qt,Jt,Kt,Qt,te,ee,ie,oe,se,ne,re,le,ae,he,ge,ce,de,ue,pe;function me(t){return function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i}}(),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),new Ft(t)}function fe(t){return"href"===t?"src":t=(t=(t=t.replace("data-","")).charAt(0).toLowerCase()+t.slice(1)).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}function ye(t){let e;return $(()=>{new he.default(e).mark(t.keywords,{separateWordSearch:!0,diacritics:!0})}),k(at.span,{ref(t){"function"==typeof e?e(t):e=t},css:{mark:{bg:"$info4",rounded:"$md",px:"1px",color:"$info11",fontWeight:"$bold"}},get children(){return t.name}})}return{setters:[function(t){i=t.i,o=t.t},function(t){s=t.$,n=t.$n,r=t.$r,l=t.An,a=t.D,h=t.E,g=t.Gi,c=t.Ht,d=t.J,u=t.Ji,p=t.K,m=t.Ki,f=t.Kr,y=t.M,v=t.Mi,b=t.O,S=t.Qn,x=t.Qr,w=t.Ui,C=t.Ut,I=t.V,T=t.Xn,z=t.Y,E=t.Yt,k=t.Zi,O=t.Zn,L=t.a,A=t.aa,P=t.at,M=t.b,D=t.c,R=t.cr,$=t.da,G=t.dn,F=t.ea,N=t.fr,B=t.g,_=t.it,H=t.la,X=t.lr,V=t.lt,W=t.m,j=t.mn,Y=t.ni,Z=t.on,U=t.p,q=t.pn,J=t.pr,K=t.q,Q=t.qn,tt=t.qt,et=t.r,it=t.rt,ot=t.s,st=t.sa,nt=t.sr,rt=t.t,lt=t.ta,at=t.ti,ht=t.ua,gt=t.ur,ct=t.w,dt=t.wn,ut=t.y,pt=t.yt,mt=t.zt},function(t){ft=t.t},function(t){yt=t.A,vt=t.M,bt=t.Qt,St=t.St,xt=t.X,wt=t.z},function(t){Ct=t.t},function(t){It=t.t},function(t){Tt=t.i,zt=t.r,Et=t.t},function(t){},function(t){kt=t.r},function(t){}],execute:function(){Ot=t=>{const e=s();return k(Q,{spacing:"$2",get children(){return[k(T,{get p(){return Ct[t.name].p?"$1":void 0},get as(){return Ct[t.name].icon},boxSize:"$7",get color(){return Ct[t.name].color}}),k(f,{get children(){return e(`home.toolbar.${t.name}`)}})]}})},Lt=()=>{const t=s(),{colorMode:e}=Y(),{copySelectedRawLink:i,copySelectedPreviewPage:o}=p(),{batchDownloadSelected:n,sendToAria2:r,playlistDownloadSelected:l}=I(),{rawLink:h}=K(),{isShare:g}=_();return k(zt,{id:1,animation:"scale",get theme(){return"dark"!==e()?"light":"dark"},style:"z-index: var(--hope-zIndices-popover)",get children(){return[k(w,{each:["rename","move","copy","delete"],children:t=>k(Tt,{get hidden(){return!ot(t)||!a.write||g()},onClick:()=>{j.emit("tool",t)},get children(){return k(Ot,{name:t})}})}),k(Tt,{get hidden(){return!ot("share")},onClick:()=>{j.emit("tool","share")},get children(){return k(Ot,{name:"share"})}}),k(Tt,{hidden:()=>g()||!ot("decompress")||!a.write||y().some(t=>t.is_dir)||y().some(t=>!rt(t.name)),onClick:()=>{j.emit("tool","decompress")},get children(){return k(Ot,{name:"decompress"})}}),k(m,{get when(){return b()},get children(){return[k(Tt,{onClick:({props:t})=>{t.is_dir?o():i(!0)},get children(){return k(Ot,{name:"copy_link"})}}),k(Tt,{onClick:({props:e})=>{if(e.is_dir){if(!D.is_admin(L())&&!B("package_download"))return void q.warning(t("home.toolbar.package_download_disabled"));j.emit("tool","package_download")}else n()},get children(){return k(Ot,{name:"download"})}}),k(Et,{hidden:({props:t})=>t.type!==ft.VIDEO,get label(){return k(Q,{spacing:"$2",get children(){return[k(T,{as:yt,boxSize:"$7",p:"$0_5",color:"$info9"}),k(f,{get children(){return t("home.preview.play_with")}})]}})},get children(){return k(w,{each:kt,children:t=>k(Tt,{onClick:({props:e})=>{const i=tt(t.scheme,{raw_url:"",name:e.name,d_url:h(e,!0)});window.open(i,"_self")},get children(){return k(Q,{spacing:"$2",get children(){return[k(S,{m:"0 auto",boxSize:"$7",get src(){return`${window.__dynamic_base__}/images/${t.icon}.webp`}}),k(f,{get children(){return t.name}})]}})}})})}})]}}),k(m,{get when(){return v(()=>!b())()&&ct()},get children(){return[k(Et,{get label(){return k(Ot,{name:"copy_link"})},get children(){return[k(Tt,{onClick:o,get children(){return t("home.toolbar.preview_page")}}),k(Tt,{onClick:()=>i(),get children(){return t("home.toolbar.down_link")}}),k(Tt,{onClick:()=>i(!0),get children(){return t("home.toolbar.encode_down_link")}})]}}),k(Et,{get label(){return k(Ot,{name:"download"})},get children(){return[k(Tt,{onClick:n,get children(){return t("home.toolbar.batch_download")}}),k(m,{get when(){return D.is_admin(L())||B("package_download")},get children(){return[k(Tt,{onClick:()=>j.emit("tool","package_download"),get children(){return t("home.toolbar.package_download")}}),k(Tt,{onClick:l,get children(){return t("home.toolbar.playlist_download")}})]}}),k(Tt,{onClick:r,get children(){return t("home.toolbar.send_aria2")}})]}})]}})]}})},At=()=>{const t=W(),{pathname:e,setSearchParams:i}=_();return k(wt,{get total(){return a.total},get defaultCurrent(){return d()},get defaultPageSize(){return t.size},onChange:t=>{et(e(),t),i({page:t})}})},Pt=()=>{const{loadMore:t,allLoaded:e}=z(),i=s();return k(m,{get when(){return!e()},get fallback(){return k(f,{fontStyle:"italic",get children(){return i("home.no_more")}})},get children(){return k(l,{onClick:t,get children(){return i("home.load_more")}})}})},Mt=()=>{const{loadMore:t,allLoaded:e}=z(),i=s(),o=new IntersectionObserver(e=>{e[0].isIntersecting&&t()},{threshold:.1});let n;return $(()=>{e()||o.observe(n)}),ht(()=>{o.disconnect()}),k(m,{get when(){return!e()},get fallback(){return k(f,{fontStyle:"italic",get children(){return i("home.no_more")}})},get children(){return k(bt,{py:"$2",size:"md",thickness:3,ref(t){"function"==typeof n?n(t):n=t}})}})},Dt=()=>{const t=W();return k(u,{get children(){return[k(g,{get when(){return a.state===ut.FetchingMore},get children(){return k(bt,{py:"$2",size:"md",thickness:3})}}),k(g,{get when(){return"pagination"===t.type},get children(){return k(At,{})}}),k(g,{get when(){return"load_more"===t.type},get children(){return k(Pt,{})}}),k(g,{get when(){return"auto_load_more"===t.type},get children(){return k(Mt,{})}})]}})},Rt=function(){return Rt=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},Rt.apply(this,arguments)},$t={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},Gt={mode:"lg-slide",easing:"ease",speed:400,licenseKey:"0000-0000-000-0000",height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:300,container:"",startAnimationDuration:400,zoomFromOrigin:!0,hideBarsDelay:0,showBarsAfter:1e4,slideDelay:0,supportLegacyBrowser:!0,allowMediaOverlap:!1,videoMaxSize:"1280-720",loadYouTubePoster:!0,defaultCaptionHeight:0,ariaLabelledby:"",ariaDescribedby:"",resetScrollPosition:!0,hideScrollbar:!1,closable:!0,swipeToClose:!0,closeOnTap:!0,showCloseIcon:!0,showMaximizeIcon:!1,loop:!0,escKey:!0,keyPress:!0,trapFocus:!0,controls:!0,slideEndAnimation:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:2,numberOfSlideItemsInDom:10,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:0,iframeWidth:"100%",iframeHeight:"100%",iframeMaxWidth:"100%",iframeMaxHeight:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],extraProps:[],exThumbImage:"",isMobile:void 0,mobileSettings:{controls:!1,showCloseIcon:!1,download:!1},plugins:[],strings:{closeGallery:"Close gallery",toggleMaximize:"Toggle maximize",previousSlide:"Previous slide",nextSlide:"Next slide",download:"Download",playVideo:"Play video",mediaLoadingFailed:"Oops... Failed to load content..."}},Ft=function(){function t(t){return this.cssVenderPrefixes=["TransitionDuration","TransitionTimingFunction","Transform","Transition"],this.selector=this._getSelector(t),this.firstElement=this._getFirstEl(),this}return t.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},t.prototype._getSelector=function(t,e){return void 0===e&&(e=document),"string"!=typeof t?t:(e=e||document,"#"===t.substring(0,1)?e.querySelector(t):e.querySelectorAll(t))},t.prototype._each=function(t){return this.selector?(void 0!==this.selector.length?[].forEach.call(this.selector,t):t(this.selector,0),this):this},t.prototype._setCssVendorPrefix=function(t,e,i){var o=e.replace(/-([a-z])/gi,function(t,e){return e.toUpperCase()});-1!==this.cssVenderPrefixes.indexOf(o)?(t.style[o.charAt(0).toLowerCase()+o.slice(1)]=i,t.style["webkit"+o]=i,t.style["moz"+o]=i,t.style["ms"+o]=i,t.style["o"+o]=i):t.style[o]=i},t.prototype._getFirstEl=function(){return this.selector&&void 0!==this.selector.length?this.selector[0]:this.selector},t.prototype.isEventMatched=function(t,e){var i=e.split(".");return t.split(".").filter(function(t){return t}).every(function(t){return-1!==i.indexOf(t)})},t.prototype.attr=function(t,e){return void 0===e?this.firstElement?this.firstElement.getAttribute(t):"":(this._each(function(i){i.setAttribute(t,e)}),this)},t.prototype.find=function(t){return me(this._getSelector(t,this.selector))},t.prototype.first=function(){return this.selector&&void 0!==this.selector.length?me(this.selector[0]):me(this.selector)},t.prototype.eq=function(t){return me(this.selector[t])},t.prototype.parent=function(){return me(this.selector.parentElement)},t.prototype.get=function(){return this._getFirstEl()},t.prototype.removeAttr=function(t){var e=t.split(" ");return this._each(function(t){e.forEach(function(e){return t.removeAttribute(e)})}),this},t.prototype.wrap=function(t){if(!this.firstElement)return this;var e=document.createElement("div");return e.className=t,this.firstElement.parentNode.insertBefore(e,this.firstElement),this.firstElement.parentNode.removeChild(this.firstElement),e.appendChild(this.firstElement),this},t.prototype.addClass=function(t){return void 0===t&&(t=""),this._each(function(e){t.split(" ").forEach(function(t){t&&e.classList.add(t)})}),this},t.prototype.removeClass=function(t){return this._each(function(e){t.split(" ").forEach(function(t){t&&e.classList.remove(t)})}),this},t.prototype.hasClass=function(t){return!!this.firstElement&&this.firstElement.classList.contains(t)},t.prototype.hasAttribute=function(t){return!!this.firstElement&&this.firstElement.hasAttribute(t)},t.prototype.toggleClass=function(t){return this.firstElement?(this.hasClass(t)?this.removeClass(t):this.addClass(t),this):this},t.prototype.css=function(t,e){var i=this;return this._each(function(o){i._setCssVendorPrefix(o,t,e)}),this},t.prototype.on=function(e,i){var o=this;return this.selector?(e.split(" ").forEach(function(e){Array.isArray(t.eventListeners[e])||(t.eventListeners[e]=[]),t.eventListeners[e].push(i),o.selector.addEventListener(e.split(".")[0],i)}),this):this},t.prototype.once=function(t,e){var i=this;return this.on(t,function(){i.off(t),e(t)}),this},t.prototype.off=function(e){var i=this;return this.selector?(Object.keys(t.eventListeners).forEach(function(o){i.isEventMatched(e,o)&&(t.eventListeners[o].forEach(function(t){i.selector.removeEventListener(o.split(".")[0],t)}),t.eventListeners[o]=[])}),this):this},t.prototype.trigger=function(t,e){if(!this.firstElement)return this;var i=new CustomEvent(t.split(".")[0],{detail:e||null});return this.firstElement.dispatchEvent(i),this},t.prototype.load=function(t){var e=this;return fetch(t).then(function(t){return t.text()}).then(function(t){e.selector.innerHTML=t}),this},t.prototype.html=function(t){return void 0===t?this.firstElement?this.firstElement.innerHTML:"":(this._each(function(e){e.innerHTML=t}),this)},t.prototype.append=function(t){return this._each(function(e){"string"==typeof t?e.insertAdjacentHTML("beforeend",t):e.appendChild(t)}),this},t.prototype.prepend=function(t){return this._each(function(e){"string"==typeof t?e.insertAdjacentHTML("afterbegin",t):t instanceof HTMLElement&&e.insertBefore(t.cloneNode(!0),e.firstChild)}),this},t.prototype.remove=function(){return this._each(function(t){t.parentNode.removeChild(t)}),this},t.prototype.empty=function(){return this._each(function(t){t.innerHTML=""}),this},t.prototype.scrollTop=function(t){return void 0!==t?(document.body.scrollTop=t,document.documentElement.scrollTop=t,this):window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},t.prototype.scrollLeft=function(t){return void 0!==t?(document.body.scrollLeft=t,document.documentElement.scrollLeft=t,this):window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},t.prototype.offset=function(){if(!this.firstElement)return{left:0,top:0};var t=this.firstElement.getBoundingClientRect(),e=me("body").style().marginLeft;return{left:t.left-parseFloat(e)+this.scrollLeft(),top:t.top+this.scrollTop()}},t.prototype.style=function(){return this.firstElement?this.firstElement.currentStyle||window.getComputedStyle(this.firstElement):{}},t.prototype.width=function(){var t=this.style();return this.firstElement.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)},t.prototype.height=function(){var t=this.style();return this.firstElement.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)},t.eventListeners={},t}(),Nt=["src","sources","subHtml","subHtmlUrl","html","video","poster","slideName","responsive","srcset","sizes","iframe","downloadUrl","download","width","facebookShareUrl","tweetText","iframeTitle","twitterShareUrl","pinterestShareUrl","pinterestText","fbHtml","disqusIdentifier","disqusUrl"],Bt={fetchCaptionFromUrl:function(t,e,i){fetch(t).then(function(t){return t.text()}).then(function(t){if("append"===i){var o='<div class="lg-sub-html">'+t+"</div>";e.append(o)}else e.html(t)})},getSize:function(t,e,i,o){void 0===i&&(i=0);var s=me(t).attr("data-lg-size")||o;if(s){var n=s.split(",");if(n[1])for(var r=window.innerWidth,l=0;l<n.length;l++){var a=n[l];if(parseInt(a.split("-")[2],10)>r){s=a;break}l===n.length-1&&(s=a)}var h=s.split("-"),g=parseInt(h[0],10),c=parseInt(h[1],10),d=e.width(),u=e.height()-i,p=Math.min(d,g),m=Math.min(u,c),f=Math.min(p/g,m/c);return{width:g*f,height:c*f}}},getTransform:function(t,e,i,o,s){if(s){var n=me(t).find("img").first();if(n.get()){var r=e.get().getBoundingClientRect(),l=r.width,a=e.height()-(i+o),h=n.width(),g=n.height(),c=n.style(),d=(l-h)/2-n.offset().left+(parseFloat(c.paddingLeft)||0)+(parseFloat(c.borderLeft)||0)+me(window).scrollLeft()+r.left,u=(a-g)/2-n.offset().top+(parseFloat(c.paddingTop)||0)+(parseFloat(c.borderTop)||0)+me(window).scrollTop()+i;return"translate3d("+(d*=-1)+"px, "+(u*=-1)+"px, 0) scale3d("+h/s.width+", "+g/s.height+", 1)"}}},getIframeMarkup:function(t,e,i,o,s,n){return'<div class="lg-media-cont lg-has-iframe" style="width:'+t+"; max-width:"+i+"; height: "+e+"; max-height:"+o+'">\n <iframe class="lg-object" frameborder="0" '+(n?'title="'+n+'"':"")+' src="'+s+'" allowfullscreen="true"></iframe>\n </div>'},getImgMarkup:function(t,e,i,o,s,n){var r="<img "+i+" "+(o?'srcset="'+o+'"':"")+" "+(s?'sizes="'+s+'"':"")+' class="lg-object lg-image" data-index="'+t+'" src="'+e+'" />',l="";return n&&(l=("string"==typeof n?JSON.parse(n):n).map(function(t){var e="";return Object.keys(t).forEach(function(i){e+=" "+i+'="'+t[i]+'"'}),"<source "+e+"></source>"})),""+l+r},getResponsiveSrc:function(t){for(var e=[],i=[],o="",s=0;s<t.length;s++){var n=t[s].split(" ");""===n[0]&&n.splice(0,1),i.push(n[0]),e.push(n[1])}for(var r=window.innerWidth,l=0;l<e.length;l++)if(parseInt(e[l],10)>r){o=i[l];break}return o},isImageLoaded:function(t){return!!t&&!!t.complete&&0!==t.naturalWidth},getVideoPosterMarkup:function(t,e,i,o,s){var n="";n=s&&s.youtube?"lg-has-youtube":s&&s.vimeo?"lg-has-vimeo":"lg-has-html5";var r=e;return"string"!=typeof e&&(r=e.outerHTML),'<div class="lg-video-cont '+n+'" style="'+i+'">\n <div class="lg-video-play-button">\n <svg\n viewBox="0 0 20 20"\n preserveAspectRatio="xMidYMid"\n focusable="false"\n aria-labelledby="'+o+'"\n role="img"\n class="lg-video-play-icon"\n >\n <title>'+o+'</title>\n <polygon class="lg-video-play-icon-inner" points="1,0 20,10 1,20"></polygon>\n </svg>\n <svg class="lg-video-play-icon-bg" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle></svg>\n <svg class="lg-video-play-icon-circle" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle>\n </svg>\n </div>\n '+r+'\n <img class="lg-object lg-video-poster" src="'+t+'" />\n </div>'},getFocusableElements:function(t){var e=t.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])');return[].filter.call(e,function(t){var e=window.getComputedStyle(t);return"none"!==e.display&&"hidden"!==e.visibility})},getDynamicOptions:function(t,e,i,o){var s=[],n=function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var o=Array(t),s=0;for(e=0;e<i;e++)for(var n=arguments[e],r=0,l=n.length;r<l;r++,s++)o[s]=n[r];return o}(Nt,e);return[].forEach.call(t,function(t){for(var e={},r=0;r<t.attributes.length;r++){var l=t.attributes[r];if(l.specified){var a=fe(l.name),h="";n.indexOf(a)>-1&&(h=a),h&&(e[h]=l.value)}}var g=me(t),c=g.find("img").first().attr("alt"),d=g.attr("title");e.thumb=o?g.attr(o):g.find("img").first().attr("src"),i&&!e.subHtml&&(e.subHtml=d||c||""),e.alt=c||d||"",s.push(e)}),s},isMobile:function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},isVideo:function(t,e,i){if(!t)return e?{html5:!0}:void console.error("lightGallery :- data-src is not provided on slide item "+(i+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");var o=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i),s=t.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i),n=t.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);return o?{youtube:o}:s?{vimeo:s}:n?{wistia:n}:void 0}},_t=0,Ht=function(){function t(t,e){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.bodyPaddingRight=0,this.isDummyImageRemoved=!1,this.dragOrSwipeEnabled=!1,this.mediaContainerPosition={top:0,bottom:0},!t)return this;if(_t++,this.lgId=_t,this.el=t,this.LGel=me(t),this.generateSettings(e),this.buildModules(),this.settings.dynamic&&void 0!==this.settings.dynamicEl&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this.validateLicense(),this}return t.prototype.generateSettings=function(t){if(this.settings=Rt(Rt({},Gt),t),this.settings.isMobile&&"function"==typeof this.settings.isMobile?this.settings.isMobile():Bt.isMobile()){var e=Rt(Rt({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=Rt(Rt({},this.settings),e)}},t.prototype.normalizeSettings=function(){if(this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container){var t=this.settings.container;if("function"==typeof t)this.settings.container=t();else if("string"==typeof t){var e=document.querySelector(t);this.settings.container=null!=e?e:document.body}}else this.settings.container=document.body;this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},t.prototype.init=function(){var t=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger($t.init,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout(function(){t.enableDrag(),t.enableSwipe(),t.triggerPosterClick()},50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},t.prototype.openGalleryOnItemClick=function(){for(var t=this,e=function(e){var o=i.items[e],s=me(o),n=Ft.generateUUID();s.attr("data-lg-id",n).on("click.lgcustom-item-"+n,function(i){i.preventDefault();var s=t.settings.index||e;t.openGallery(s,o)})},i=this,o=0;o<this.items.length;o++)e(o)},t.prototype.buildModules=function(){var t=this;this.settings.plugins.forEach(function(e){t.plugins.push(new e(t,me))})},t.prototype.validateLicense=function(){this.settings.licenseKey?"0000-0000-000-0000"===this.settings.licenseKey&&console.warn("lightGallery: "+this.settings.licenseKey+" license key is not valid for production use"):console.error("Please provide a valid license key")},t.prototype.getSlideItem=function(t){return me(this.getSlideItemId(t))},t.prototype.getSlideItemId=function(t){return"#lg-item-"+this.lgId+"-"+t},t.prototype.getIdName=function(t){return t+"-"+this.lgId},t.prototype.getElementById=function(t){return me("#"+this.getIdName(t))},t.prototype.manageSingleSlideClassName=function(){this.galleryItems.length<2?this.outer.addClass("lg-single-item"):this.outer.removeClass("lg-single-item")},t.prototype.buildStructure=function(){var t=this;if(!this.$container||!this.$container.get()){var e="",i="";this.settings.controls&&(e='<button type="button" id="'+this.getIdName("lg-prev")+'" aria-label="'+this.settings.strings.previousSlide+'" class="lg-prev lg-icon"> '+this.settings.prevHtml+' </button>\n <button type="button" id="'+this.getIdName("lg-next")+'" aria-label="'+this.settings.strings.nextSlide+'" class="lg-next lg-icon"> '+this.settings.nextHtml+" </button>"),".lg-item"!==this.settings.appendSubHtmlTo&&(i='<div class="lg-sub-html" role="status" aria-live="polite"></div>');var o="";this.settings.allowMediaOverlap&&(o+="lg-media-overlap ");var s=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",n=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",r="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),l=this.settings.closable&&this.settings.showCloseIcon?'<button type="button" aria-label="'+this.settings.strings.closeGallery+'" id="'+this.getIdName("lg-close")+'" class="lg-close lg-icon"></button>':"",a=this.settings.showMaximizeIcon?'<button type="button" aria-label="'+this.settings.strings.toggleMaximize+'" id="'+this.getIdName("lg-maximize")+'" class="lg-maximize lg-icon"></button>':"",h='\n <div class="'+r+'" id="'+this.getIdName("lg-container")+'" tabindex="-1" aria-modal="true" '+s+" "+n+' role="dialog"\n >\n <div id="'+this.getIdName("lg-backdrop")+'" class="lg-backdrop"></div>\n\n <div id="'+this.getIdName("lg-outer")+'" class="lg-outer lg-use-css3 lg-css3 lg-hide-items '+o+' ">\n\n <div id="'+this.getIdName("lg-content")+'" class="lg-content">\n <div id="'+this.getIdName("lg-inner")+'" class="lg-inner">\n </div>\n '+e+'\n </div>\n <div id="'+this.getIdName("lg-toolbar")+'" class="lg-toolbar lg-group">\n '+a+"\n "+l+"\n </div>\n "+(".lg-outer"===this.settings.appendSubHtmlTo?i:"")+'\n <div id="'+this.getIdName("lg-components")+'" class="lg-components">\n '+(".lg-sub-html"===this.settings.appendSubHtmlTo?i:"")+"\n </div>\n </div>\n </div>\n ";me(this.settings.container).append(h),document.body!==this.settings.container&&me(this.settings.container).css("position","relative"),this.outer=this.getElementById("lg-outer"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$content=this.getElementById("lg-content"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms");var g=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(g+="lg-grab "),this.outer.addClass(g),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append('<a id="'+this.getIdName("lg-download")+'" target="_blank" rel="noopener" aria-label="'+this.settings.strings.download+'" download class="lg-download lg-icon"></a>'),this.counter(),me(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,function(){t.refreshOnResize()}),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()}},t.prototype.refreshOnResize=function(){if(this.lgOpened){var t=this.galleryItems[this.index].__slideVideoInfo;this.mediaContainerPosition=this.getMediaContainerPosition();var e=this.mediaContainerPosition,i=e.top,o=e.bottom;if(this.currentImageSize=Bt.getSize(this.items[this.index],this.outer,i+o,t&&this.settings.videoMaxSize),t&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved){var s=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",s)}this.LGel.trigger($t.containerResize)}},t.prototype.resizeVideoSlide=function(t,e){var i=this.getVideoContStyle(e);this.getSlideItem(t).find(".lg-video-cont").attr("style",i)},t.prototype.updateSlides=function(t,e){if(this.index>t.length-1&&(this.index=t.length-1),1===t.length&&(this.index=0),t.length){var i=this.galleryItems[e].src;this.galleryItems=t,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[];var o=0;this.galleryItems.some(function(t,e){return t.src===i&&(o=e,!0)}),this.currentItemsInDom=this.organizeSlideItems(o,-1),this.loadContent(o,!0),this.getSlideItem(o).addClass("lg-current"),this.index=o,this.updateCurrentCounter(o),this.LGel.trigger($t.updateSlides)}else this.closeGallery()},t.prototype.getItems=function(){return this.items=[],this.settings.dynamic?this.settings.dynamicEl||[]:("this"===this.settings.selector?this.items.push(this.el):this.settings.selector?"string"==typeof this.settings.selector?this.settings.selectWithin?this.items=me(this.settings.selectWithin).find(this.settings.selector).get():this.items=this.el.querySelectorAll(this.settings.selector):this.items=this.settings.selector:this.items=this.el.children,Bt.getDynamicOptions(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage))},t.prototype.shouldHideScrollbar=function(){return this.settings.hideScrollbar&&document.body===this.settings.container},t.prototype.hideScrollbar=function(){if(this.shouldHideScrollbar()){this.bodyPaddingRight=parseFloat(me("body").style().paddingRight);var t=document.documentElement.getBoundingClientRect(),e=window.innerWidth-t.width;me(document.body).css("padding-right",e+this.bodyPaddingRight+"px"),me(document.body).addClass("lg-overlay-open")}},t.prototype.resetScrollBar=function(){this.shouldHideScrollbar()&&(me(document.body).css("padding-right",this.bodyPaddingRight+"px"),me(document.body).removeClass("lg-overlay-open"))},t.prototype.openGallery=function(t,e){var i=this;if(void 0===t&&(t=this.settings.index),!this.lgOpened){this.lgOpened=!0,this.outer.removeClass("lg-hide-items"),this.hideScrollbar(),this.$container.addClass("lg-show");var o=this.getItemsToBeInsertedToDom(t,t);this.currentItemsInDom=o;var s="";o.forEach(function(t){s=s+'<div id="'+t+'" class="lg-item"></div>'}),this.$inner.append(s),this.addHtml(t);var n="";this.mediaContainerPosition=this.getMediaContainerPosition();var r=this.mediaContainerPosition,l=r.top,a=r.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(l,a);var h=this.galleryItems[t].__slideVideoInfo;this.zoomFromOrigin&&e&&(this.currentImageSize=Bt.getSize(e,this.outer,l+a,h&&this.settings.videoMaxSize),n=Bt.getTransform(e,this.outer,l,a,this.currentImageSize)),this.zoomFromOrigin&&n||(this.outer.addClass(this.settings.startClass),this.getSlideItem(t).removeClass("lg-complete"));var g=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout(function(){i.outer.addClass("lg-components-open")},g),this.index=t,this.LGel.trigger($t.beforeOpen),this.getSlideItem(t).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=me(window).scrollTop(),setTimeout(function(){if(i.zoomFromOrigin&&n){var e=i.getSlideItem(t);e.css("transform",n),setTimeout(function(){e.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",i.settings.startAnimationDuration+"ms"),i.outer.addClass("lg-zoom-from-image")}),setTimeout(function(){e.css("transform","translate3d(0, 0, 0)")},100)}setTimeout(function(){i.$backdrop.addClass("in"),i.$container.addClass("lg-show-in")},10),setTimeout(function(){i.settings.trapFocus&&document.body===i.settings.container&&i.trapFocus()},i.settings.backdropDuration+50),i.zoomFromOrigin&&n||setTimeout(function(){i.outer.addClass("lg-visible")},i.settings.backdropDuration),i.slide(t,!1,!1,!1),i.LGel.trigger($t.afterOpen)}),document.body===this.settings.container&&me("html").addClass("lg-on")}},t.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var t=this.$toolbar.get().clientHeight||0,e=this.outer.find(".lg-components .lg-sub-html").get(),i=this.settings.defaultCaptionHeight||e&&e.clientHeight||0,o=this.outer.find(".lg-thumb-outer").get();return{top:t,bottom:(o?o.clientHeight:0)+i}},t.prototype.setMediaContainerPosition=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.$content.css("top",t+"px").css("bottom",e+"px")},t.prototype.hideBars=function(){var t=this;setTimeout(function(){t.outer.removeClass("lg-hide-items"),t.settings.hideBarsDelay>0&&(t.outer.on("mousemove.lg click.lg touchstart.lg",function(){t.outer.removeClass("lg-hide-items"),clearTimeout(t.hideBarTimeout),t.hideBarTimeout=setTimeout(function(){t.outer.addClass("lg-hide-items")},t.settings.hideBarsDelay)}),t.outer.trigger("mousemove.lg"))},this.settings.showBarsAfter)},t.prototype.initPictureFill=function(t){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[t.get()]})}catch(e){console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},t.prototype.counter=function(){if(this.settings.counter){var t='<div class="lg-counter" role="status" aria-live="polite">\n <span id="'+this.getIdName("lg-counter-current")+'" class="lg-counter-current">'+(this.index+1)+' </span> /\n <span id="'+this.getIdName("lg-counter-all")+'" class="lg-counter-all">'+this.galleryItems.length+" </span></div>";this.outer.find(this.settings.appendCounterTo).append(t)}},t.prototype.addHtml=function(t){var e,i;if(this.galleryItems[t].subHtmlUrl?i=this.galleryItems[t].subHtmlUrl:e=this.galleryItems[t].subHtml,!i)if(e){var o=e.substring(0,1);if("."===o||"#"===o)try{e=this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?me(this.items).eq(t).find(e).first().html():me(e).first().html()}catch(n){console.warn('Error processing subHtml selector "'+e+'"'),e=""}}else e="";if(".lg-item"!==this.settings.appendSubHtmlTo)i?Bt.fetchCaptionFromUrl(i,this.outer.find(".lg-sub-html"),"replace"):this.outer.find(".lg-sub-html").html(e);else{var s=me(this.getSlideItemId(t));i?Bt.fetchCaptionFromUrl(i,s,"append"):s.append('<div class="lg-sub-html">'+e+"</div>")}null!=e&&(""===e?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger($t.afterAppendSubHtml,{index:t})},t.prototype.preload=function(t){for(var e=1;e<=this.settings.preload&&!(e>=this.galleryItems.length-t);e++)this.loadContent(t+e,!1);for(var i=1;i<=this.settings.preload&&!(t-i<0);i++)this.loadContent(t-i,!1)},t.prototype.getDummyImgStyles=function(t){return t?"width:"+t.width+"px;\n margin-left: -"+t.width/2+"px;\n margin-top: -"+t.height/2+"px;\n height:"+t.height+"px":""},t.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+"px;\n height:"+t.height+"px":""},t.prototype.getDummyImageContent=function(t,e,i){var o;if(this.settings.dynamic||(o=me(this.items).eq(e)),o){var s=void 0;if(!(s=this.settings.exThumbImage?o.attr(this.settings.exThumbImage):o.find("img").first().attr("src")))return"";var n=this.getDummyImgStyles(this.currentImageSize),r=document.createElement("img");return r.alt=i||"",r.src=s,r.className="lg-dummy-img",r.style.cssText=n,t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),r}return""},t.prototype.setImgMarkup=function(t,e,i){var o=this.galleryItems[i],s=o.alt,n=o.srcset,r=o.sizes,l=o.sources,a="",h=s?'alt="'+s+'"':"";a=this.isFirstSlideWithZoomAnimation()?this.getDummyImageContent(e,i,h):Bt.getImgMarkup(i,t,h,n,r,l);var g=document.createElement("picture");g.className="lg-img-wrap",me(g).append(a),e.prepend(g)},t.prototype.onSlideObjectLoad=function(t,e,i,o){var s=t.find(".lg-object").first();Bt.isImageLoaded(s.get())||e?i():(s.on("load.lg error.lg",function(){i&&i()}),s.on("error.lg",function(){o&&o()}))},t.prototype.onLgObjectLoad=function(t,e,i,o,s,n){var r=this;this.onSlideObjectLoad(t,n,function(){r.triggerSlideItemLoad(t,e,i,o,s)},function(){t.addClass("lg-complete lg-complete_"),t.html('<span class="lg-error-msg">'+r.settings.strings.mediaLoadingFailed+"</span>")})},t.prototype.triggerSlideItemLoad=function(t,e,i,o,s){var n=this,r=this.galleryItems[e],l=s&&"video"===this.getSlideType(r)&&!r.poster?o:0;setTimeout(function(){t.addClass("lg-complete lg-complete_"),n.LGel.trigger($t.slideItemLoad,{index:e,delay:i||0,isFirstSlide:s})},l)},t.prototype.isFirstSlideWithZoomAnimation=function(){return!(this.lGalleryOn||!this.zoomFromOrigin||!this.currentImageSize)},t.prototype.addSlideVideoInfo=function(t){var e=this;t.forEach(function(t,i){t.__slideVideoInfo=Bt.isVideo(t.src,!!t.video,i),t.__slideVideoInfo&&e.settings.loadYouTubePoster&&!t.poster&&t.__slideVideoInfo.youtube&&(t.poster="//img.youtube.com/vi/"+t.__slideVideoInfo.youtube[1]+"/maxresdefault.jpg")})},t.prototype.loadContent=function(t,e){var i=this,o=this.galleryItems[t],s=me(this.getSlideItemId(t)),n=o.poster,r=o.srcset,l=o.sizes,a=o.sources,h=o.src,g=o.video,c=g&&"string"==typeof g?JSON.parse(g):g;if(o.responsive){var d=o.responsive.split(",");h=Bt.getResponsiveSrc(d)||h}var u=o.__slideVideoInfo,p="",m=!!o.iframe,f=!this.lGalleryOn,y=0;if(f&&(y=this.zoomFromOrigin&&this.currentImageSize?this.settings.startAnimationDuration+10:this.settings.backdropDuration+10),!s.hasClass("lg-loaded")){if(u){var v=this.mediaContainerPosition,b=v.top,S=v.bottom,x=Bt.getSize(this.items[t],this.outer,b+S,u&&this.settings.videoMaxSize);p=this.getVideoContStyle(x)}if(m){var w=Bt.getIframeMarkup(this.settings.iframeWidth,this.settings.iframeHeight,this.settings.iframeMaxWidth,this.settings.iframeMaxHeight,h,o.iframeTitle);s.prepend(w)}else if(n){var C="";f&&this.zoomFromOrigin&&this.currentImageSize&&(C=this.getDummyImageContent(s,t,"")),w=Bt.getVideoPosterMarkup(n,C||"",p,this.settings.strings.playVideo,u),s.prepend(w)}else if(u)w='<div class="lg-video-cont " style="'+p+'"></div>',s.prepend(w);else if(this.setImgMarkup(h,s,t),r||a){var I=s.find(".lg-object");this.initPictureFill(I)}(n||u)&&this.LGel.trigger($t.hasVideo,{index:t,src:h,html5Video:c,hasPoster:!!n}),this.LGel.trigger($t.afterAppendSlide,{index:t}),this.lGalleryOn&&".lg-item"===this.settings.appendSubHtmlTo&&this.addHtml(t)}var T=0;y&&!me(document.body).hasClass("lg-from-hash")&&(T=y),this.isFirstSlideWithZoomAnimation()&&(setTimeout(function(){s.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")},this.settings.startAnimationDuration+100),s.hasClass("lg-loaded")||setTimeout(function(){if("image"===i.getSlideType(o)){var e=o.alt,g=e?'alt="'+e+'"':"";if(s.find(".lg-img-wrap").append(Bt.getImgMarkup(t,h,g,r,l,o.sources)),r||a){var c=s.find(".lg-object");i.initPictureFill(c)}}("image"===i.getSlideType(o)||"video"===i.getSlideType(o)&&n)&&(i.onLgObjectLoad(s,t,y,T,!0,!1),i.onSlideObjectLoad(s,!(!u||!u.html5||n),function(){i.loadContentOnFirstSlideLoad(t,s,T)},function(){i.loadContentOnFirstSlideLoad(t,s,T)}))},this.settings.startAnimationDuration+100)),s.addClass("lg-loaded"),this.isFirstSlideWithZoomAnimation()&&("video"!==this.getSlideType(o)||n)||this.onLgObjectLoad(s,t,y,T,f,!(!u||!u.html5||n)),this.zoomFromOrigin&&this.currentImageSize||!s.hasClass("lg-complete_")||this.lGalleryOn||setTimeout(function(){s.addClass("lg-complete")},this.settings.backdropDuration),this.lGalleryOn=!0,!0===e&&(s.hasClass("lg-complete_")?this.preload(t):s.find(".lg-object").first().on("load.lg error.lg",function(){i.preload(t)}))},t.prototype.loadContentOnFirstSlideLoad=function(t,e,i){var o=this;setTimeout(function(){e.find(".lg-dummy-img").remove(),e.removeClass("lg-first-slide"),o.outer.removeClass("lg-first-slide-loading"),o.isDummyImageRemoved=!0,o.preload(t)},i+300)},t.prototype.getItemsToBeInsertedToDom=function(t,e,i){var o=this;void 0===i&&(i=0);var s=[],n=Math.max(i,3);n=Math.min(n,this.galleryItems.length);var r="lg-item-"+this.lgId+"-"+e;if(this.galleryItems.length<=3)return this.galleryItems.forEach(function(t,e){s.push("lg-item-"+o.lgId+"-"+e)}),s;if(t<(this.galleryItems.length-1)/2){for(var l=t;l>t-n/2&&l>=0;l--)s.push("lg-item-"+this.lgId+"-"+l);var a=s.length;for(l=0;l<n-a;l++)s.push("lg-item-"+this.lgId+"-"+(t+l+1))}else{for(l=t;l<=this.galleryItems.length-1&&l<t+n/2;l++)s.push("lg-item-"+this.lgId+"-"+l);for(a=s.length,l=0;l<n-a;l++)s.push("lg-item-"+this.lgId+"-"+(t-l-1))}return this.settings.loop&&(t===this.galleryItems.length-1?s.push("lg-item-"+this.lgId+"-0"):0===t&&s.push("lg-item-"+this.lgId+"-"+(this.galleryItems.length-1))),-1===s.indexOf(r)&&s.push("lg-item-"+this.lgId+"-"+e),s},t.prototype.organizeSlideItems=function(t,e){var i=this,o=this.getItemsToBeInsertedToDom(t,e,this.settings.numberOfSlideItemsInDom);return o.forEach(function(t){-1===i.currentItemsInDom.indexOf(t)&&i.$inner.append('<div id="'+t+'" class="lg-item"></div>')}),this.currentItemsInDom.forEach(function(t){-1===o.indexOf(t)&&me("#"+t).remove()}),o},t.prototype.getPreviousSlideIndex=function(){var t=0;try{var e=this.outer.find(".lg-current").first().attr("id");t=parseInt(e.split("-")[3])||0}catch(i){t=0}return t},t.prototype.setDownloadValue=function(t){if(this.settings.download){var e=this.galleryItems[t];if(!1===e.downloadUrl||"false"===e.downloadUrl)this.outer.addClass("lg-hide-download");else{var i=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),i.attr("href",e.downloadUrl||e.src),e.download&&i.attr("download",e.download)}}},t.prototype.makeSlideAnimation=function(t,e,i){var o=this;this.lGalleryOn&&i.addClass("lg-slide-progress"),setTimeout(function(){o.outer.addClass("lg-no-trans"),o.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),"prev"===t?(e.addClass("lg-prev-slide"),i.addClass("lg-next-slide")):(e.addClass("lg-next-slide"),i.addClass("lg-prev-slide")),setTimeout(function(){o.outer.find(".lg-item").removeClass("lg-current"),e.addClass("lg-current"),o.outer.removeClass("lg-no-trans")},50)},this.lGalleryOn?this.settings.slideDelay:0)},t.prototype.slide=function(t,e,i,o){var s=this,n=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(t,n),!this.lGalleryOn||n!==t){var r=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(t);var l=this.getSlideItem(t),a=this.getSlideItem(n),h=this.galleryItems[t],g=h.__slideVideoInfo;if(this.outer.attr("data-lg-slide-type",this.getSlideType(h)),this.setDownloadValue(t),g){var c=this.mediaContainerPosition,d=c.top,u=c.bottom,p=Bt.getSize(this.items[t],this.outer,d+u,g&&this.settings.videoMaxSize);this.resizeVideoSlide(t,p)}if(this.LGel.trigger($t.beforeSlide,{prevIndex:n,index:t,fromTouch:!!e,fromThumb:!!i}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),o||(t<n?o="prev":t>n&&(o="next")),e){this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var m=void 0,f=void 0;r>2?(m=t-1,f=t+1,(0===t&&n===r-1||t===r-1&&0===n)&&(f=0,m=r-1)):(m=0,f=1),"prev"===o?this.getSlideItem(f).addClass("lg-next-slide"):this.getSlideItem(m).addClass("lg-prev-slide"),l.addClass("lg-current")}else this.makeSlideAnimation(o,l,a);this.lGalleryOn?setTimeout(function(){s.loadContent(t,!0),".lg-item"!==s.settings.appendSubHtmlTo&&s.addHtml(t)},this.settings.speed+50+(e?0:this.settings.slideDelay)):this.loadContent(t,!0),setTimeout(function(){s.lgBusy=!1,a.removeClass("lg-slide-progress"),s.LGel.trigger($t.afterSlide,{prevIndex:n,index:t,fromTouch:e,fromThumb:i})},(this.lGalleryOn?this.settings.speed+100:100)+(e?0:this.settings.slideDelay))}this.index=t}},t.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},t.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},t.prototype.getSlideType=function(t){return t.__slideVideoInfo?"video":t.iframe?"iframe":"image"},t.prototype.touchMove=function(t,e,i){var o=e.pageX-t.pageX,s=e.pageY-t.pageY,n=!1;if(this.swipeDirection?n=!0:Math.abs(o)>15?(this.swipeDirection="horizontal",n=!0):Math.abs(s)>15&&(this.swipeDirection="vertical",n=!0),n){var r=this.getSlideItem(this.index);if("horizontal"===this.swipeDirection){null==i||i.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(r,o,0);var l=r.get().offsetWidth,a=15*l/100-Math.abs(10*o/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-l+o-a,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),l+o+a,0)}else if("vertical"===this.swipeDirection&&this.settings.swipeToClose){null==i||i.preventDefault(),this.$container.addClass("lg-dragging-vertical");var h=1-Math.abs(s)/window.innerHeight;this.$backdrop.css("opacity",h);var g=1-Math.abs(s)/(2*window.innerWidth);this.setTranslate(r,0,s,g,g),Math.abs(s)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},t.prototype.touchEnd=function(t,e,i){var o,s=this;"lg-slide"!==this.settings.mode&&this.outer.addClass("lg-slide"),setTimeout(function(){s.$container.removeClass("lg-dragging-vertical"),s.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var n=!0;if("horizontal"===s.swipeDirection){o=t.pageX-e.pageX;var r=Math.abs(t.pageX-e.pageX);o<0&&r>s.settings.swipeThreshold?(s.goToNextSlide(!0),n=!1):o>0&&r>s.settings.swipeThreshold&&(s.goToPrevSlide(!0),n=!1)}else if("vertical"===s.swipeDirection){if(o=Math.abs(t.pageY-e.pageY),s.settings.closable&&s.settings.swipeToClose&&o>100)return void s.closeGallery();s.$backdrop.css("opacity",1)}if(s.outer.find(".lg-item").removeAttr("style"),n&&Math.abs(t.pageX-e.pageX)<5){var l=me(i.target);s.isPosterElement(l)&&s.LGel.trigger($t.posterClick)}s.swipeDirection=void 0}),setTimeout(function(){s.outer.hasClass("lg-dragging")||"lg-slide"===s.settings.mode||s.outer.removeClass("lg-slide")},this.settings.speed+100)},t.prototype.enableSwipe=function(){var t=this,e={},i={},o=!1,s=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",function(i){t.dragOrSwipeEnabled=!0;var o=t.getSlideItem(t.index);!me(i.target).hasClass("lg-item")&&!o.get().contains(i.target)||t.outer.hasClass("lg-zoomed")||t.lgBusy||1!==i.touches.length||(s=!0,t.touchAction="swipe",t.manageSwipeClass(),e={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY})}),this.$inner.on("touchmove.lg",function(n){s&&"swipe"===t.touchAction&&1===n.touches.length&&(i={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t.touchMove(e,i,n),o=!0)}),this.$inner.on("touchend.lg",function(n){if("swipe"===t.touchAction){if(o)o=!1,t.touchEnd(i,e,n);else if(s){var r=me(n.target);t.isPosterElement(r)&&t.LGel.trigger($t.posterClick)}t.touchAction=void 0,s=!1}}))},t.prototype.enableDrag=function(){var t=this,e={},i={},o=!1,s=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",function(i){t.dragOrSwipeEnabled=!0;var s=t.getSlideItem(t.index);(me(i.target).hasClass("lg-item")||s.get().contains(i.target))&&(t.outer.hasClass("lg-zoomed")||t.lgBusy||(i.preventDefault(),t.lgBusy||(t.manageSwipeClass(),e={pageX:i.pageX,pageY:i.pageY},o=!0,t.outer.get().scrollLeft+=1,t.outer.get().scrollLeft-=1,t.outer.removeClass("lg-grab").addClass("lg-grabbing"),t.LGel.trigger($t.dragStart))))}),me(window).on("mousemove.lg.global"+this.lgId,function(n){o&&t.lgOpened&&(s=!0,i={pageX:n.pageX,pageY:n.pageY},t.touchMove(e,i),t.LGel.trigger($t.dragMove))}),me(window).on("mouseup.lg.global"+this.lgId,function(n){if(t.lgOpened){var r=me(n.target);s?(s=!1,t.touchEnd(i,e,n),t.LGel.trigger($t.dragEnd)):t.isPosterElement(r)&&t.LGel.trigger($t.posterClick),o&&(o=!1,t.outer.removeClass("lg-grabbing").addClass("lg-grab"))}}))},t.prototype.triggerPosterClick=function(){var t=this;this.$inner.on("click.lg",function(e){!t.dragOrSwipeEnabled&&t.isPosterElement(me(e.target))&&t.LGel.trigger($t.posterClick)})},t.prototype.manageSwipeClass=function(){var t=this.index+1,e=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(0===this.index?e=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),e>-1&&this.getSlideItem(e).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},t.prototype.goToNextSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(this.index+1<this.galleryItems.length?(this.index++,this.LGel.trigger($t.beforeNextSlide,{index:this.index}),this.slide(this.index,!!t,!1,"next")):i?(this.index=0,this.LGel.trigger($t.beforeNextSlide,{index:this.index}),this.slide(this.index,!!t,!1,"next")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-right-end"),setTimeout(function(){e.outer.removeClass("lg-right-end")},400)))},t.prototype.goToPrevSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(this.index>0?(this.index--,this.LGel.trigger($t.beforePrevSlide,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):i?(this.index=this.galleryItems.length-1,this.LGel.trigger($t.beforePrevSlide,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout(function(){e.outer.removeClass("lg-left-end")},400)))},t.prototype.keyPress=function(){var t=this;me(window).on("keydown.lg.global"+this.lgId,function(e){t.lgOpened&&!0===t.settings.escKey&&27===e.keyCode&&(e.preventDefault(),t.settings.allowMediaOverlap&&t.outer.hasClass("lg-can-toggle")&&t.outer.hasClass("lg-components-open")?t.outer.removeClass("lg-components-open"):t.closeGallery()),t.lgOpened&&t.galleryItems.length>1&&(37===e.keyCode&&(e.preventDefault(),t.goToPrevSlide()),39===e.keyCode&&(e.preventDefault(),t.goToNextSlide()))})},t.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",function(){t.goToPrevSlide()}),this.getElementById("lg-next").on("click.lg",function(){t.goToNextSlide()})},t.prototype.arrowDisable=function(t){if(!this.settings.loop&&this.settings.hideControlOnEnd){var e=this.getElementById("lg-prev"),i=this.getElementById("lg-next");t+1===this.galleryItems.length?i.attr("disabled","disabled").addClass("disabled"):i.removeAttr("disabled").removeClass("disabled"),0===t?e.attr("disabled","disabled").addClass("disabled"):e.removeAttr("disabled").removeClass("disabled")}},t.prototype.setTranslate=function(t,e,i,o,s){void 0===o&&(o=1),void 0===s&&(s=1),t.css("transform","translate3d("+e+"px, "+i+"px, 0px) scale3d("+o+", "+s+", 1)")},t.prototype.mousewheel=function(){var t=this,e=0;this.outer.on("wheel.lg",function(i){if(i.deltaY&&!(t.galleryItems.length<2)){i.preventDefault();var o=(new Date).getTime();o-e<1e3||(e=o,i.deltaY>0?t.goToNextSlide():i.deltaY<0&&t.goToPrevSlide())}})},t.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")||t.hasClass("lg-img-rotate")},t.prototype.isPosterElement=function(t){var e=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||e&&e.contains(t.get())},t.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()})},t.prototype.invalidateItems=function(){for(var t=0;t<this.items.length;t++){var e=me(this.items[t]);e.off("click.lgcustom-item-"+e.attr("data-lg-id"))}},t.prototype.trapFocus=function(){var t=this;this.$container.get().focus({preventScroll:!0}),me(window).on("keydown.lg.global"+this.lgId,function(e){if(t.lgOpened&&("Tab"===e.key||9===e.keyCode)){var i=Bt.getFocusableElements(t.$container.get()),o=i[0],s=i[i.length-1];e.shiftKey?document.activeElement===o&&(s.focus(),e.preventDefault()):document.activeElement===s&&(o.focus(),e.preventDefault())}})},t.prototype.manageCloseGallery=function(){var t=this;if(this.settings.closable){var e=!1;this.getElementById("lg-close").on("click.lg",function(){t.closeGallery()}),this.settings.closeOnTap&&(this.outer.on("mousedown.lg",function(i){var o=me(i.target);e=!!t.isSlideElement(o)}),this.outer.on("mousemove.lg",function(){e=!1}),this.outer.on("mouseup.lg",function(i){var o=me(i.target);t.isSlideElement(o)&&e&&(t.outer.hasClass("lg-dragging")||t.closeGallery())}))}},t.prototype.closeGallery=function(t){var e=this;if(!this.lgOpened||!this.settings.closable&&!t)return 0;this.LGel.trigger($t.beforeClose),this.settings.resetScrollPosition&&!this.settings.hideScrollbar&&me(window).scrollTop(this.prevScrollTop);var i,o=this.items[this.index];if(this.zoomFromOrigin&&o){var s=this.mediaContainerPosition,n=s.top,r=s.bottom,l=this.galleryItems[this.index],a=l.__slideVideoInfo,h=l.poster,g=Bt.getSize(o,this.outer,n+r,a&&h&&this.settings.videoMaxSize);i=Bt.getTransform(o,this.outer,n,r,g)}this.zoomFromOrigin&&i?(this.outer.addClass("lg-closing lg-zoom-from-image"),this.getSlideItem(this.index).addClass("lg-start-end-progress").css("transition-duration",this.settings.startAnimationDuration+"ms").css("transform",i)):(this.outer.addClass("lg-hide-items"),this.outer.removeClass("lg-zoom-from-image")),this.destroyModules(),this.lGalleryOn=!1,this.isDummyImageRemoved=!1,this.zoomFromOrigin=this.settings.zoomFromOrigin,clearTimeout(this.hideBarTimeout),this.hideBarTimeout=!1,me("html").removeClass("lg-on"),this.outer.removeClass("lg-visible lg-components-open"),this.$backdrop.removeClass("in").css("opacity",0);var c=this.zoomFromOrigin&&i?Math.max(this.settings.startAnimationDuration,this.settings.backdropDuration):this.settings.backdropDuration;return this.$container.removeClass("lg-show-in"),setTimeout(function(){e.zoomFromOrigin&&i&&e.outer.removeClass("lg-zoom-from-image"),e.$container.removeClass("lg-show"),e.resetScrollBar(),e.$backdrop.removeAttr("style").css("transition-duration",e.settings.backdropDuration+"ms"),e.outer.removeClass("lg-closing "+e.settings.startClass),e.getSlideItem(e.index).removeClass("lg-start-end-progress"),e.$inner.empty(),e.lgOpened&&e.LGel.trigger($t.afterClose,{instance:e}),e.$container.get()&&e.$container.get().blur(),e.lgOpened=!1},c+100),c+100},t.prototype.initModules=function(){this.plugins.forEach(function(t){try{t.init()}catch(e){console.warn("lightGallery:- make sure lightGallery module is properly initiated")}})},t.prototype.destroyModules=function(t){this.plugins.forEach(function(e){try{t?e.destroy():e.closeGallery&&e.closeGallery()}catch(i){console.warn("lightGallery:- make sure lightGallery module is properly destroyed")}})},t.prototype.refresh=function(t){this.settings.dynamic||this.invalidateItems(),this.galleryItems=t||this.getItems(),this.updateControls(),this.openGalleryOnItemClick(),this.LGel.trigger($t.updateSlides)},t.prototype.updateControls=function(){this.addSlideVideoInfo(this.galleryItems),this.updateCounterTotal(),this.manageSingleSlideClassName()},t.prototype.destroyGallery=function(){this.destroyModules(!0),this.settings.dynamic||this.invalidateItems(),me(window).off(".lg.global"+this.lgId),this.LGel.off(".lg"),this.$container.remove()},t.prototype.destroy=function(){var t=this.closeGallery(!0);return t?setTimeout(this.destroyGallery.bind(this),t):this.destroyGallery(),t},t}(),Xt=function(){return Xt=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},Xt.apply(this,arguments)},Vt={thumbnail:!0,animateThumb:!0,currentPagerPosition:"middle",alignThumbnails:"middle",thumbWidth:100,thumbHeight:"80px",thumbMargin:5,appendThumbnailsTo:".lg-components",toggleThumb:!1,enableThumbDrag:!0,enableThumbSwipe:!0,thumbnailSwipeThreshold:10,loadYouTubeThumbnail:!0,youTubeThumbSize:1,thumbnailPluginStrings:{toggleThumbnails:"Toggle thumbnails"}},Wt={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},jt=function(){function t(t,e){return this.thumbOuterWidth=0,this.thumbTotalWidth=0,this.translateX=0,this.thumbClickable=!1,this.core=t,this.$LG=e,this}return t.prototype.init=function(){this.settings=Xt(Xt({},Vt),this.core.settings),this.thumbOuterWidth=0,this.thumbTotalWidth=this.core.galleryItems.length*(this.settings.thumbWidth+this.settings.thumbMargin),this.translateX=0,this.setAnimateThumbStyles(),this.core.settings.allowMediaOverlap||(this.settings.toggleThumb=!1),this.settings.thumbnail&&(this.build(),this.settings.animateThumb?(this.settings.enableThumbDrag&&this.enableThumbDrag(),this.settings.enableThumbSwipe&&this.enableThumbSwipe(),this.thumbClickable=!1):this.thumbClickable=!0,this.toggleThumbBar(),this.thumbKeyPress())},t.prototype.build=function(){var t=this;this.setThumbMarkup(),this.manageActiveClassOnSlideChange(),this.$lgThumb.first().on("click.lg touchend.lg",function(e){var i=t.$LG(e.target);i.hasAttribute("data-lg-item-id")&&setTimeout(function(){if(t.thumbClickable&&!t.core.lgBusy){var e=parseInt(i.attr("data-lg-item-id"));t.core.slide(e,!1,!0,!1)}},50)}),this.core.LGel.on(Wt.beforeSlide+".thumb",function(e){var i=e.detail.index;t.animateThumb(i)}),this.core.LGel.on(Wt.beforeOpen+".thumb",function(){t.thumbOuterWidth=t.core.outer.get().offsetWidth}),this.core.LGel.on(Wt.updateSlides+".thumb",function(){t.rebuildThumbnails()}),this.core.LGel.on(Wt.containerResize+".thumb",function(){t.core.lgOpened&&setTimeout(function(){t.thumbOuterWidth=t.core.outer.get().offsetWidth,t.animateThumb(t.core.index),t.thumbOuterWidth=t.core.outer.get().offsetWidth},50)})},t.prototype.setThumbMarkup=function(){var t="lg-thumb-outer ";this.settings.alignThumbnails&&(t+="lg-thumb-align-"+this.settings.alignThumbnails);var e='<div class="'+t+'">\n <div class="lg-thumb lg-group">\n </div>\n </div>';this.core.outer.addClass("lg-has-thumb"),".lg-components"===this.settings.appendThumbnailsTo?this.core.$lgComponents.append(e):this.core.outer.append(e),this.$thumbOuter=this.core.outer.find(".lg-thumb-outer").first(),this.$lgThumb=this.core.outer.find(".lg-thumb").first(),this.settings.animateThumb&&this.core.outer.find(".lg-thumb").css("transition-duration",this.core.settings.speed+"ms").css("width",this.thumbTotalWidth+"px").css("position","relative"),this.setThumbItemHtml(this.core.galleryItems)},t.prototype.enableThumbDrag=function(){var t=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0},i=!1;this.$thumbOuter.addClass("lg-grab"),this.core.outer.find(".lg-thumb").first().on("mousedown.lg.thumb",function(o){t.thumbTotalWidth>t.thumbOuterWidth&&(o.preventDefault(),e.cords.startX=o.pageX,e.startTime=new Date,t.thumbClickable=!1,i=!0,t.core.outer.get().scrollLeft+=1,t.core.outer.get().scrollLeft-=1,t.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))}),this.$LG(window).on("mousemove.lg.thumb.global"+this.core.lgId,function(o){t.core.lgOpened&&i&&(e.cords.endX=o.pageX,e=t.onThumbTouchMove(e))}),this.$LG(window).on("mouseup.lg.thumb.global"+this.core.lgId,function(){t.core.lgOpened&&(e.isMoved?e=t.onThumbTouchEnd(e):t.thumbClickable=!0,i&&(i=!1,t.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab")))})},t.prototype.enableThumbSwipe=function(){var t=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0};this.$lgThumb.on("touchstart.lg",function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e.cords.startX=i.targetTouches[0].pageX,t.thumbClickable=!1,e.startTime=new Date)}),this.$lgThumb.on("touchmove.lg",function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e.cords.endX=i.targetTouches[0].pageX,e=t.onThumbTouchMove(e))}),this.$lgThumb.on("touchend.lg",function(){e.isMoved?e=t.onThumbTouchEnd(e):t.thumbClickable=!0})},t.prototype.rebuildThumbnails=function(){var t=this;this.$thumbOuter.addClass("lg-rebuilding-thumbnails"),setTimeout(function(){t.thumbTotalWidth=t.core.galleryItems.length*(t.settings.thumbWidth+t.settings.thumbMargin),t.$lgThumb.css("width",t.thumbTotalWidth+"px"),t.$lgThumb.empty(),t.setThumbItemHtml(t.core.galleryItems),t.animateThumb(t.core.index)},50),setTimeout(function(){t.$thumbOuter.removeClass("lg-rebuilding-thumbnails")},200)},t.prototype.setTranslate=function(t){this.$lgThumb.css("transform","translate3d(-"+t+"px, 0px, 0px)")},t.prototype.getPossibleTransformX=function(t){return t>this.thumbTotalWidth-this.thumbOuterWidth&&(t=this.thumbTotalWidth-this.thumbOuterWidth),t<0&&(t=0),t},t.prototype.animateThumb=function(t){if(this.$lgThumb.css("transition-duration",this.core.settings.speed+"ms"),this.settings.animateThumb){var e=0;switch(this.settings.currentPagerPosition){case"left":e=0;break;case"middle":e=this.thumbOuterWidth/2-this.settings.thumbWidth/2;break;case"right":e=this.thumbOuterWidth-this.settings.thumbWidth}this.translateX=(this.settings.thumbWidth+this.settings.thumbMargin)*t-1-e,this.translateX>this.thumbTotalWidth-this.thumbOuterWidth&&(this.translateX=this.thumbTotalWidth-this.thumbOuterWidth),this.translateX<0&&(this.translateX=0),this.setTranslate(this.translateX)}},t.prototype.onThumbTouchMove=function(t){return t.newTranslateX=this.translateX,t.isMoved=!0,t.touchMoveTime=(new Date).valueOf(),t.newTranslateX-=t.cords.endX-t.cords.startX,t.newTranslateX=this.getPossibleTransformX(t.newTranslateX),this.setTranslate(t.newTranslateX),this.$thumbOuter.addClass("lg-dragging"),t},t.prototype.onThumbTouchEnd=function(t){t.isMoved=!1,t.endTime=new Date,this.$thumbOuter.removeClass("lg-dragging");var e=t.endTime.valueOf()-t.startTime.valueOf(),i=t.cords.endX-t.cords.startX,o=Math.abs(i)/e;return o>.15&&t.endTime.valueOf()-t.touchMoveTime<30?((o+=1)>2&&(o+=1),o+=o*(Math.abs(i)/this.thumbOuterWidth),this.$lgThumb.css("transition-duration",Math.min(o-1,2)+"settings"),i*=o,this.translateX=this.getPossibleTransformX(this.translateX-i),this.setTranslate(this.translateX)):this.translateX=t.newTranslateX,Math.abs(t.cords.endX-t.cords.startX)<this.settings.thumbnailSwipeThreshold&&(this.thumbClickable=!0),t},t.prototype.getThumbHtml=function(t,e,i){var o,s=this.core.galleryItems[e].__slideVideoInfo||{};o=s.youtube&&this.settings.loadYouTubeThumbnail?"//img.youtube.com/vi/"+s.youtube[1]+"/"+this.settings.youTubeThumbSize+".jpg":t;var n=document.createElement("div");n.setAttribute("data-lg-item-id",e+""),n.className="lg-thumb-item "+(e===this.core.index?"active":""),n.style.cssText="width: "+this.settings.thumbWidth+"px; height: "+this.settings.thumbHeight+"; margin-right: "+this.settings.thumbMargin+"px;";var r=document.createElement("img");return r.alt=i||"",r.setAttribute("data-lg-item-id",e+""),r.src=o,n.appendChild(r),n},t.prototype.setThumbItemHtml=function(t){for(var e=0;e<t.length;e++){var i=this.getThumbHtml(t[e].thumb,e,t[e].alt);this.$lgThumb.append(i)}},t.prototype.setAnimateThumbStyles=function(){this.settings.animateThumb&&this.core.outer.addClass("lg-animate-thumb")},t.prototype.manageActiveClassOnSlideChange=function(){var t=this;this.core.LGel.on(Wt.beforeSlide+".thumb",function(e){var i=t.core.outer.find(".lg-thumb-item"),o=e.detail.index;i.removeClass("active"),i.eq(o).addClass("active")})},t.prototype.toggleThumbBar=function(){var t=this;this.settings.toggleThumb&&(this.core.outer.addClass("lg-can-toggle"),this.core.$toolbar.append('<button type="button" aria-label="'+this.settings.thumbnailPluginStrings.toggleThumbnails+'" class="lg-toggle-thumb lg-icon"></button>'),this.core.outer.find(".lg-toggle-thumb").first().on("click.lg",function(){t.core.outer.toggleClass("lg-components-open")}))},t.prototype.thumbKeyPress=function(){var t=this;this.$LG(window).on("keydown.lg.thumb.global"+this.core.lgId,function(e){t.core.lgOpened&&t.settings.toggleThumb&&(38===e.keyCode?(e.preventDefault(),t.core.outer.addClass("lg-components-open")):40===e.keyCode&&(e.preventDefault(),t.core.outer.removeClass("lg-components-open")))})},t.prototype.destroy=function(){this.settings.thumbnail&&(this.$LG(window).off(".lg.thumb.global"+this.core.lgId),this.core.LGel.off(".lg.thumb"),this.core.LGel.off(".thumb"),this.$thumbOuter.remove(),this.core.outer.removeClass("lg-has-thumb"))},t}(),Yt=function(){return Yt=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},Yt.apply(this,arguments)},Zt={scale:1,zoom:!0,infiniteZoom:!0,actualSize:!0,showZoomInOutIcons:!1,actualSizeIcons:{zoomIn:"lg-zoom-in",zoomOut:"lg-zoom-out"},enableZoomAfter:300,zoomPluginStrings:{zoomIn:"Zoom in",zoomOut:"Zoom out",viewActualSize:"View actual size"}},Ut={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},qt=function(){function t(t,e){return this.core=t,this.$LG=e,this.settings=Yt(Yt({},Zt),this.core.settings),this}return t.prototype.buildTemplates=function(){var t=this.settings.showZoomInOutIcons?'<button id="'+this.core.getIdName("lg-zoom-in")+'" type="button" aria-label="'+this.settings.zoomPluginStrings.zoomIn+'" class="lg-zoom-in lg-icon"></button><button id="'+this.core.getIdName("lg-zoom-out")+'" type="button" aria-label="'+this.settings.zoomPluginStrings.zoomOut+'" class="lg-zoom-out lg-icon"></button>':"";this.settings.actualSize&&(t+='<button id="'+this.core.getIdName("lg-actual-size")+'" type="button" aria-label="'+this.settings.zoomPluginStrings.viewActualSize+'" class="'+this.settings.actualSizeIcons.zoomIn+' lg-icon"></button>'),this.core.outer.addClass("lg-use-transition-for-zoom"),this.core.$toolbar.first().append(t)},t.prototype.enableZoom=function(t){var e=this,i=this.settings.enableZoomAfter+t.detail.delay;this.$LG("body").first().hasClass("lg-from-hash")&&t.detail.delay?i=0:this.$LG("body").first().removeClass("lg-from-hash"),this.zoomableTimeout=setTimeout(function(){e.isImageSlide(e.core.index)&&(e.core.getSlideItem(t.detail.index).addClass("lg-zoomable"),t.detail.index===e.core.index&&e.setZoomEssentials())},i+30)},t.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(Ut.slideItemLoad+".zoom",this.enableZoom.bind(this))},t.prototype.getDragCords=function(t){return{x:t.pageX,y:t.pageY}},t.prototype.getSwipeCords=function(t){return{x:t.touches[0].pageX,y:t.touches[0].pageY}},t.prototype.getDragAllowedAxises=function(t,e){if(!this.containerRect)return{allowX:!1,allowY:!1};var i=this.core.getSlideItem(this.core.index).find(".lg-image").first().get(),o=0,s=0,n=i.getBoundingClientRect();t?(o=i.offsetHeight*t,s=i.offsetWidth*t):e?(o=n.height+e*n.height,s=n.width+e*n.width):(o=n.height,s=n.width);var r=o>this.containerRect.height;return{allowX:s>this.containerRect.width,allowY:r}},t.prototype.setZoomEssentials=function(){this.containerRect=this.core.$content.get().getBoundingClientRect()},t.prototype.zoomImage=function(t,e,i,o){if(this.containerRect&&!(Math.abs(e)<=0)){var s,n,r=this.containerRect.width/2+this.containerRect.left,l=this.containerRect.height/2+this.containerRect.top+this.scrollTop;1===t&&(this.positionChanged=!1);var a=this.getDragAllowedAxises(0,e),h=a.allowY,g=a.allowX;this.positionChanged&&(s=this.left/(this.scale-e),n=this.top/(this.scale-e),this.pageX=r-s,this.pageY=l-n,this.positionChanged=!1);var c,d,u=this.getPossibleSwipeDragCords(e),p=r-this.pageX,m=l-this.pageY;if(t-e>1){var f=(t-e)/Math.abs(e);c=(p=(e<0?-p:p)+this.left*(f+(e<0?-1:1)))/f,d=(m=(e<0?-m:m)+this.top*(f+(e<0?-1:1)))/f}else c=p*(f=(t-e)*e),d=m*f;i&&(g?this.isBeyondPossibleLeft(c,u.minX)?c=u.minX:this.isBeyondPossibleRight(c,u.maxX)&&(c=u.maxX):t>1&&(c<u.minX?c=u.minX:c>u.maxX&&(c=u.maxX)),h?this.isBeyondPossibleTop(d,u.minY)?d=u.minY:this.isBeyondPossibleBottom(d,u.maxY)&&(d=u.maxY):t>1&&(d<u.minY?d=u.minY:d>u.maxY&&(d=u.maxY))),this.setZoomStyles({x:c,y:d,scale:t}),this.left=c,this.top=d,o&&this.setZoomImageSize()}},t.prototype.resetImageTranslate=function(t){if(this.isImageSlide(t)){var e=this.core.getSlideItem(t).find(".lg-image").first();this.imageReset=!1,e.removeClass("reset-transition reset-transition-y reset-transition-x"),this.core.outer.removeClass("lg-actual-size"),e.css("width","auto").css("height","auto"),setTimeout(function(){e.removeClass("no-transition")},10)}},t.prototype.setZoomImageSize=function(){var t=this,e=this.core.getSlideItem(this.core.index).find(".lg-image").first();setTimeout(function(){var i=t.getCurrentImageActualSizeScale();t.scale>=i&&(e.addClass("no-transition"),t.imageReset=!0)},500),setTimeout(function(){var i=t.getCurrentImageActualSizeScale();if(t.scale>=i){var o=t.getDragAllowedAxises(t.scale);e.css("width",e.get().naturalWidth+"px").css("height",e.get().naturalHeight+"px"),t.core.outer.addClass("lg-actual-size"),o.allowX&&o.allowY?e.addClass("reset-transition"):o.allowX&&!o.allowY?e.addClass("reset-transition-x"):!o.allowX&&o.allowY&&e.addClass("reset-transition-y")}},550)},t.prototype.setZoomStyles=function(t){var e=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),i=this.core.getSlideItem(this.core.index).find(".lg-image").first(),o=this.core.outer.find(".lg-current .lg-dummy-img").first();this.scale=t.scale,i.css("transform","scale3d("+t.scale+", "+t.scale+", 1)"),o.css("transform","scale3d("+t.scale+", "+t.scale+", 1)");var s="translate3d("+t.x+"px, "+t.y+"px, 0)";e.css("transform",s)},t.prototype.setActualSize=function(t,e){var i=this;if(!this.zoomInProgress){this.zoomInProgress=!0;var o=this.core.galleryItems[this.core.index];this.resetImageTranslate(t),setTimeout(function(){if(o.src&&!i.core.outer.hasClass("lg-first-slide-loading")){var t=i.getCurrentImageActualSizeScale(),s=i.scale;i.core.outer.hasClass("lg-zoomed")?i.scale=1:i.scale=i.getScale(t),i.setPageCords(e),i.beginZoom(i.scale),i.zoomImage(i.scale,i.scale-s,!0,!0)}},50),setTimeout(function(){i.core.outer.removeClass("lg-grabbing").addClass("lg-grab")},60),setTimeout(function(){i.zoomInProgress=!1},610)}},t.prototype.getNaturalWidth=function(t){var e=this.core.getSlideItem(t).find(".lg-image").first(),i=this.core.galleryItems[t].width;return i?parseFloat(i):e.get().naturalWidth},t.prototype.getActualSizeScale=function(t,e){return t>=e?t/e||2:1},t.prototype.getCurrentImageActualSizeScale=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-image").first().get().offsetWidth,e=this.getNaturalWidth(this.core.index)||t;return this.getActualSizeScale(e,t)},t.prototype.getPageCords=function(t){var e={};if(t)e.x=t.pageX||t.touches[0].pageX,e.y=t.pageY||t.touches[0].pageY;else{var i=this.core.$content.get().getBoundingClientRect();e.x=i.width/2+i.left,e.y=i.height/2+this.scrollTop+i.top}return e},t.prototype.setPageCords=function(t){var e=this.getPageCords(t);this.pageX=e.x,this.pageY=e.y},t.prototype.manageActualPixelClassNames=function(){this.core.getElementById("lg-actual-size").removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut)},t.prototype.beginZoom=function(t){return this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),t>1?(this.core.outer.addClass("lg-zoomed"),this.manageActualPixelClassNames()):this.resetZoom(),t>1},t.prototype.getScale=function(t){var e=this.getCurrentImageActualSizeScale();return t<1?t=1:t>e&&(t=e),t},t.prototype.init=function(){var t=this;if(this.settings.zoom){this.buildTemplates(),this.enableZoomOnSlideItemLoad();var e=null;this.core.outer.on("dblclick.lg",function(e){t.$LG(e.target).hasClass("lg-image")&&t.setActualSize(t.core.index,e)}),this.core.outer.on("touchstart.lg",function(i){var o=t.$LG(i.target);1===i.touches.length&&o.hasClass("lg-image")&&(e?(clearTimeout(e),e=null,i.preventDefault(),t.setActualSize(t.core.index,i)):e=setTimeout(function(){e=null},300))}),this.core.LGel.on(Ut.containerResize+".zoom "+Ut.rotateRight+".zoom "+Ut.rotateLeft+".zoom "+Ut.flipHorizontal+".zoom "+Ut.flipVertical+".zoom",function(){if(t.core.lgOpened&&t.isImageSlide(t.core.index)&&!t.core.touchAction){var e=t.core.getSlideItem(t.core.index).find(".lg-img-wrap").first();t.top=0,t.left=0,t.setZoomEssentials(),t.setZoomSwipeStyles(e,{x:0,y:0}),t.positionChanged=!0}}),this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,function(){t.core.lgOpened&&(t.scrollTop=t.$LG(window).scrollTop())}),this.core.getElementById("lg-zoom-out").on("click.lg",function(){if(t.isImageSlide(t.core.index)){var e=0;t.imageReset&&(t.resetImageTranslate(t.core.index),e=50),setTimeout(function(){var e=t.scale-t.settings.scale;e<1&&(e=1),t.beginZoom(e),t.zoomImage(e,-t.settings.scale,!0,!t.settings.infiniteZoom)},e)}}),this.core.getElementById("lg-zoom-in").on("click.lg",function(){t.zoomIn()}),this.core.getElementById("lg-actual-size").on("click.lg",function(){t.setActualSize(t.core.index)}),this.core.LGel.on(Ut.beforeOpen+".zoom",function(){t.core.outer.find(".lg-item").removeClass("lg-zoomable")}),this.core.LGel.on(Ut.afterOpen+".zoom",function(){t.scrollTop=t.$LG(window).scrollTop(),t.pageX=t.core.outer.width()/2,t.pageY=t.core.outer.height()/2+t.scrollTop,t.scale=1}),this.core.LGel.on(Ut.afterSlide+".zoom",function(e){var i=e.detail.prevIndex;t.scale=1,t.positionChanged=!1,t.zoomInProgress=!1,t.resetZoom(i),t.resetImageTranslate(i),t.isImageSlide(t.core.index)&&t.setZoomEssentials()}),this.zoomDrag(),this.pinchZoom(),this.zoomSwipe(),this.zoomableTimeout=!1,this.positionChanged=!1,this.zoomInProgress=!1}},t.prototype.zoomIn=function(){if(this.isImageSlide(this.core.index)){var t=this.scale+this.settings.scale;this.settings.infiniteZoom||(t=this.getScale(t)),this.beginZoom(t),this.zoomImage(t,Math.min(this.settings.scale,t-this.scale),!0,!this.settings.infiniteZoom)}},t.prototype.resetZoom=function(t){this.core.outer.removeClass("lg-zoomed lg-zoom-drag-transition");var e=this.core.getElementById("lg-actual-size"),i=this.core.getSlideItem(void 0!==t?t:this.core.index);e.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn),i.find(".lg-img-wrap").first().removeAttr("style"),i.find(".lg-image").first().removeAttr("style"),this.scale=1,this.left=0,this.top=0,this.setPageCords()},t.prototype.getTouchDistance=function(t){return Math.sqrt((t.touches[0].pageX-t.touches[1].pageX)*(t.touches[0].pageX-t.touches[1].pageX)+(t.touches[0].pageY-t.touches[1].pageY)*(t.touches[0].pageY-t.touches[1].pageY))},t.prototype.pinchZoom=function(){var t=this,e=0,i=!1,o=1,s=0,n=this.core.getSlideItem(this.core.index);this.core.outer.on("touchstart.lg",function(i){if(n=t.core.getSlideItem(t.core.index),t.isImageSlide(t.core.index)&&2===i.touches.length){if(i.preventDefault(),t.core.outer.hasClass("lg-first-slide-loading"))return;o=t.scale||1,t.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),t.setPageCords(i),t.resetImageTranslate(t.core.index),t.core.touchAction="pinch",e=t.getTouchDistance(i)}}),this.core.$inner.on("touchmove.lg",function(r){if(2===r.touches.length&&"pinch"===t.core.touchAction&&(t.$LG(r.target).hasClass("lg-item")||n.get().contains(r.target))){r.preventDefault();var l=t.getTouchDistance(r),a=e-l;if(!i&&Math.abs(a)>5&&(i=!0),i){s=t.scale;var h=Math.max(1,o+.02*-a);t.scale=Math.round(100*(h+Number.EPSILON))/100;var g=t.scale-s;t.zoomImage(t.scale,Math.round(100*(g+Number.EPSILON))/100,!1,!1)}}}),this.core.$inner.on("touchend.lg",function(o){if("pinch"===t.core.touchAction&&(t.$LG(o.target).hasClass("lg-item")||n.get().contains(o.target))){if(i=!1,e=0,t.scale<=1)t.resetZoom();else{var s=t.getCurrentImageActualSizeScale();if(t.scale>=s){var r=s-t.scale;0===r&&(r=.01),t.zoomImage(s,r,!1,!0)}t.manageActualPixelClassNames(),t.core.outer.addClass("lg-zoomed")}t.core.touchAction=void 0}})},t.prototype.touchendZoom=function(t,e,i,o,s){var n=e.x-t.x,r=e.y-t.y,l=Math.abs(n)/s+1,a=Math.abs(r)/s+1;l>2&&(l+=1),a>2&&(a+=1),n*=l,r*=a;var h=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),g={};g.x=this.left+n,g.y=this.top+r;var c=this.getPossibleSwipeDragCords();(Math.abs(n)>15||Math.abs(r)>15)&&(o&&(this.isBeyondPossibleTop(g.y,c.minY)?g.y=c.minY:this.isBeyondPossibleBottom(g.y,c.maxY)&&(g.y=c.maxY)),i&&(this.isBeyondPossibleLeft(g.x,c.minX)?g.x=c.minX:this.isBeyondPossibleRight(g.x,c.maxX)&&(g.x=c.maxX)),o?this.top=g.y:g.y=this.top,i?this.left=g.x:g.x=this.left,this.setZoomSwipeStyles(h,g),this.positionChanged=!0)},t.prototype.getZoomSwipeCords=function(t,e,i,o,s){var n={};if(o){if(n.y=this.top+(e.y-t.y),this.isBeyondPossibleTop(n.y,s.minY)){var r=s.minY-n.y;n.y=s.minY-r/6}else if(this.isBeyondPossibleBottom(n.y,s.maxY)){var l=n.y-s.maxY;n.y=s.maxY+l/6}}else n.y=this.top;if(i){if(n.x=this.left+(e.x-t.x),this.isBeyondPossibleLeft(n.x,s.minX)){var a=s.minX-n.x;n.x=s.minX-a/6}else if(this.isBeyondPossibleRight(n.x,s.maxX)){var h=n.x-s.maxX;n.x=s.maxX+h/6}}else n.x=this.left;return n},t.prototype.isBeyondPossibleLeft=function(t,e){return t>=e},t.prototype.isBeyondPossibleRight=function(t,e){return t<=e},t.prototype.isBeyondPossibleTop=function(t,e){return t>=e},t.prototype.isBeyondPossibleBottom=function(t,e){return t<=e},t.prototype.isImageSlide=function(t){var e=this.core.galleryItems[t];return"image"===this.core.getSlideType(e)},t.prototype.getPossibleSwipeDragCords=function(t){var e=this.core.getSlideItem(this.core.index).find(".lg-image").first(),i=this.core.mediaContainerPosition.bottom,o=e.get().getBoundingClientRect(),s=o.height,n=o.width;return t&&(s+=t*s,n+=t*n),{minY:(s-this.containerRect.height)/2,maxY:(this.containerRect.height-s)/2+i,minX:(n-this.containerRect.width)/2,maxX:(this.containerRect.width-n)/2}},t.prototype.setZoomSwipeStyles=function(t,e){t.css("transform","translate3d("+e.x+"px, "+e.y+"px, 0)")},t.prototype.zoomSwipe=function(){var t,e,i=this,o={},s={},n=!1,r=!1,l=!1,a=new Date,h=this.core.getSlideItem(this.core.index);this.core.$inner.on("touchstart.lg",function(s){if(i.isImageSlide(i.core.index)&&(h=i.core.getSlideItem(i.core.index),(i.$LG(s.target).hasClass("lg-item")||h.get().contains(s.target))&&1===s.touches.length&&i.core.outer.hasClass("lg-zoomed"))){s.preventDefault(),a=new Date,i.core.touchAction="zoomSwipe",e=i.core.getSlideItem(i.core.index).find(".lg-img-wrap").first();var n=i.getDragAllowedAxises(0);l=n.allowY,((r=n.allowX)||l)&&(o=i.getSwipeCords(s)),t=i.getPossibleSwipeDragCords(),i.core.outer.addClass("lg-zoom-dragging lg-zoom-drag-transition")}}),this.core.$inner.on("touchmove.lg",function(a){if(1===a.touches.length&&"zoomSwipe"===i.core.touchAction&&(i.$LG(a.target).hasClass("lg-item")||h.get().contains(a.target))){a.preventDefault(),i.core.touchAction="zoomSwipe",s=i.getSwipeCords(a);var g=i.getZoomSwipeCords(o,s,r,l,t);(Math.abs(s.x-o.x)>15||Math.abs(s.y-o.y)>15)&&(n=!0,i.setZoomSwipeStyles(e,g))}}),this.core.$inner.on("touchend.lg",function(t){if("zoomSwipe"===i.core.touchAction&&(i.$LG(t.target).hasClass("lg-item")||h.get().contains(t.target))){if(t.preventDefault(),i.core.touchAction=void 0,i.core.outer.removeClass("lg-zoom-dragging"),!n)return;n=!1;var e=(new Date).valueOf()-a.valueOf();i.touchendZoom(o,s,r,l,e)}})},t.prototype.zoomDrag=function(){var t,e,i,o,s=this,n={},r={},l=!1,a=!1,h=!1,g=!1;this.core.outer.on("mousedown.lg.zoom",function(e){if(s.isImageSlide(s.core.index)){var r=s.core.getSlideItem(s.core.index);if(s.$LG(e.target).hasClass("lg-item")||r.get().contains(e.target)){t=new Date,o=s.core.getSlideItem(s.core.index).find(".lg-img-wrap").first();var a=s.getDragAllowedAxises(0);g=a.allowY,h=a.allowX,s.core.outer.hasClass("lg-zoomed")&&s.$LG(e.target).hasClass("lg-object")&&(h||g)&&(e.preventDefault(),n=s.getDragCords(e),i=s.getPossibleSwipeDragCords(),l=!0,s.core.outer.removeClass("lg-grab").addClass("lg-grabbing lg-zoom-drag-transition lg-zoom-dragging"))}}}),this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,function(t){if(l){a=!0,r=s.getDragCords(t);var e=s.getZoomSwipeCords(n,r,h,g,i);s.setZoomSwipeStyles(o,e)}}),this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,function(i){if(l){if(e=new Date,l=!1,s.core.outer.removeClass("lg-zoom-dragging"),a&&(n.x!==r.x||n.y!==r.y)){r=s.getDragCords(i);var o=e.valueOf()-t.valueOf();s.touchendZoom(n,r,h,g,o)}a=!1}s.core.outer.removeClass("lg-grabbing").addClass("lg-grab")})},t.prototype.closeGallery=function(){this.resetZoom(),this.zoomInProgress=!1},t.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId),this.core.LGel.off(".lg.zoom"),this.core.LGel.off(".zoom"),clearTimeout(this.zoomableTimeout),this.zoomableTimeout=!1},t}(),Jt=function(){return Jt=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},Jt.apply(this,arguments)},Kt={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},Qt={rotate:!0,rotateSpeed:400,rotateLeft:!0,rotateRight:!0,flipHorizontal:!0,flipVertical:!0,rotatePluginStrings:{flipVertical:"Flip vertical",flipHorizontal:"Flip horizontal",rotateLeft:"Rotate left",rotateRight:"Rotate right"}},te=function(){function t(t,e){return this.core=t,this.$LG=e,this.settings=Jt(Jt({},Qt),this.core.settings),this}return t.prototype.buildTemplates=function(){var t="";this.settings.flipVertical&&(t+='<button type="button" id="lg-flip-ver" aria-label="'+this.settings.rotatePluginStrings.flipVertical+'" class="lg-flip-ver lg-icon"></button>'),this.settings.flipHorizontal&&(t+='<button type="button" id="lg-flip-hor" aria-label="'+this.settings.rotatePluginStrings.flipHorizontal+'" class="lg-flip-hor lg-icon"></button>'),this.settings.rotateLeft&&(t+='<button type="button" id="lg-rotate-left" aria-label="'+this.settings.rotatePluginStrings.rotateLeft+'" class="lg-rotate-left lg-icon"></button>'),this.settings.rotateRight&&(t+='<button type="button" id="lg-rotate-right" aria-label="'+this.settings.rotatePluginStrings.rotateRight+'" class="lg-rotate-right lg-icon"></button>'),this.core.$toolbar.append(t)},t.prototype.init=function(){var t=this;this.settings.rotate&&(this.buildTemplates(),this.rotateValuesList={},this.core.LGel.on(Kt.slideItemLoad+".rotate",function(e){var i=e.detail.index;t.core.getSlideItem(i).find(".lg-img-rotate").get()||(t.core.getSlideItem(i).find(".lg-object").first().wrap("lg-img-rotate"),t.core.getSlideItem(t.core.index).find(".lg-img-rotate").css("transition-duration",t.settings.rotateSpeed+"ms"))}),this.core.outer.find("#lg-rotate-left").first().on("click.lg",this.rotateLeft.bind(this)),this.core.outer.find("#lg-rotate-right").first().on("click.lg",this.rotateRight.bind(this)),this.core.outer.find("#lg-flip-hor").first().on("click.lg",this.flipHorizontal.bind(this)),this.core.outer.find("#lg-flip-ver").first().on("click.lg",this.flipVertical.bind(this)),this.core.LGel.on(Kt.beforeSlide+".rotate",function(e){t.rotateValuesList[e.detail.index]||(t.rotateValuesList[e.detail.index]={rotate:0,flipHorizontal:1,flipVertical:1})}))},t.prototype.applyStyles=function(){this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().css("transform","rotate("+this.rotateValuesList[this.core.index].rotate+"deg) scale3d("+this.rotateValuesList[this.core.index].flipHorizontal+", "+this.rotateValuesList[this.core.index].flipVertical+", 1)")},t.prototype.rotateLeft=function(){this.rotateValuesList[this.core.index].rotate-=90,this.applyStyles(),this.triggerEvents(Kt.rotateLeft,{rotate:this.rotateValuesList[this.core.index].rotate})},t.prototype.rotateRight=function(){this.rotateValuesList[this.core.index].rotate+=90,this.applyStyles(),this.triggerEvents(Kt.rotateRight,{rotate:this.rotateValuesList[this.core.index].rotate})},t.prototype.getCurrentRotation=function(t){if(!t)return 0;var e=this.$LG(t).style(),i=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform")||"none";if("none"!==i){var o=i.split("(")[1].split(")")[0].split(",");if(o){var s=Math.round(Math.atan2(o[1],o[0])*(180/Math.PI));return s<0?s+360:s}}return 0},t.prototype.flipHorizontal=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get(),e=this.getCurrentRotation(t),i="flipHorizontal";90!==e&&270!==e||(i="flipVertical"),this.rotateValuesList[this.core.index][i]*=-1,this.applyStyles(),this.triggerEvents(Kt.flipHorizontal,{flipHorizontal:this.rotateValuesList[this.core.index][i]})},t.prototype.flipVertical=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get(),e=this.getCurrentRotation(t),i="flipVertical";90!==e&&270!==e||(i="flipHorizontal"),this.rotateValuesList[this.core.index][i]*=-1,this.applyStyles(),this.triggerEvents(Kt.flipVertical,{flipVertical:this.rotateValuesList[this.core.index][i]})},t.prototype.triggerEvents=function(t,e){var i=this;setTimeout(function(){i.core.LGel.trigger(t,e)},this.settings.rotateSpeed+10)},t.prototype.isImageOrientationChanged=function(){var t=this.rotateValuesList[this.core.index],e=Math.abs(t.rotate)%360!=0,i=t.flipHorizontal<0,o=t.flipVertical<0;return e||i||o},t.prototype.closeGallery=function(){this.isImageOrientationChanged()&&this.core.getSlideItem(this.core.index).css("opacity",0),this.rotateValuesList={}},t.prototype.destroy=function(){this.core.LGel.off(".lg.rotate"),this.core.LGel.off(".rotate")},t}(),ee=function(){return ee=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},ee.apply(this,arguments)},ie={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},oe={autoplay:!0,slideShowAutoplay:!1,slideShowInterval:5e3,progressBar:!0,forceSlideShowAutoplay:!1,autoplayControls:!0,appendAutoplayControlsTo:".lg-toolbar",autoplayPluginStrings:{toggleAutoplay:"Toggle Autoplay"}},se=function(){function t(t){return this.core=t,this.settings=ee(ee({},oe),this.core.settings),this}return t.prototype.init=function(){var t=this;this.settings.autoplay&&(this.interval=!1,this.fromAuto=!0,this.pausedOnTouchDrag=!1,this.pausedOnSlideChange=!1,this.settings.autoplayControls&&this.controls(),this.settings.progressBar&&this.core.outer.append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>'),this.settings.slideShowAutoplay&&this.core.LGel.once(ie.slideItemLoad+".autoplay",function(){t.startAutoPlay()}),this.core.LGel.on(ie.dragStart+".autoplay touchstart.lg.autoplay",function(){t.interval&&(t.stopAutoPlay(),t.pausedOnTouchDrag=!0)}),this.core.LGel.on(ie.dragEnd+".autoplay touchend.lg.autoplay",function(){!t.interval&&t.pausedOnTouchDrag&&(t.startAutoPlay(),t.pausedOnTouchDrag=!1)}),this.core.LGel.on(ie.beforeSlide+".autoplay",function(){t.showProgressBar(),!t.fromAuto&&t.interval?(t.stopAutoPlay(),t.pausedOnSlideChange=!0):t.pausedOnSlideChange=!1,t.fromAuto=!1}),this.core.LGel.on(ie.afterSlide+".autoplay",function(){t.pausedOnSlideChange&&!t.interval&&t.settings.forceSlideShowAutoplay&&(t.startAutoPlay(),t.pausedOnSlideChange=!1)}),this.showProgressBar())},t.prototype.showProgressBar=function(){var t=this;if(this.settings.progressBar&&this.fromAuto){var e=this.core.outer.find(".lg-progress-bar"),i=this.core.outer.find(".lg-progress");this.interval&&(i.removeAttr("style"),e.removeClass("lg-start"),setTimeout(function(){i.css("transition","width "+(t.core.settings.speed+t.settings.slideShowInterval)+"ms ease 0s"),e.addClass("lg-start")},20))}},t.prototype.controls=function(){var t=this,e='<button aria-label="'+this.settings.autoplayPluginStrings.toggleAutoplay+'" type="button" class="lg-autoplay-button lg-icon"></button>';this.core.outer.find(this.settings.appendAutoplayControlsTo).append(e),this.core.outer.find(".lg-autoplay-button").first().on("click.lg.autoplay",function(){t.core.outer.hasClass("lg-show-autoplay")?t.stopAutoPlay():t.interval||t.startAutoPlay()})},t.prototype.startAutoPlay=function(){var t=this;this.core.outer.find(".lg-progress").css("transition","width "+(this.core.settings.speed+this.settings.slideShowInterval)+"ms ease 0s"),this.core.outer.addClass("lg-show-autoplay"),this.core.outer.find(".lg-progress-bar").addClass("lg-start"),this.core.LGel.trigger(ie.autoplayStart,{index:this.core.index}),this.interval=setInterval(function(){t.core.index+1<t.core.galleryItems.length?t.core.index++:t.core.index=0,t.core.LGel.trigger(ie.autoplay,{index:t.core.index}),t.fromAuto=!0,t.core.slide(t.core.index,!1,!1,"next")},this.core.settings.speed+this.settings.slideShowInterval)},t.prototype.stopAutoPlay=function(){this.interval&&(this.core.LGel.trigger(ie.autoplayStop,{index:this.core.index}),this.core.outer.find(".lg-progress").removeAttr("style"),this.core.outer.removeClass("lg-show-autoplay"),this.core.outer.find(".lg-progress-bar").removeClass("lg-start")),clearInterval(this.interval),this.interval=!1},t.prototype.closeGallery=function(){this.stopAutoPlay()},t.prototype.destroy=function(){this.settings.autoplay&&this.core.outer.find(".lg-progress-bar").remove(),this.core.LGel.off(".lg.autoplay"),this.core.LGel.off(".autoplay")},t}(),ne=function(){return ne=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},ne.apply(this,arguments)},re={fullScreen:!0,fullscreenPluginStrings:{toggleFullscreen:"Toggle Fullscreen"}},le=function(){function t(t,e){return this.core=t,this.$LG=e,this.settings=ne(ne({},re),this.core.settings),this}return t.prototype.init=function(){var t="";if(this.settings.fullScreen){if(!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled))return;t='<button type="button" aria-label="'+this.settings.fullscreenPluginStrings.toggleFullscreen+'" class="lg-fullscreen lg-icon"></button>',this.core.$toolbar.append(t),this.fullScreen()}},t.prototype.isFullScreen=function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},t.prototype.requestFullscreen=function(){var t=document.documentElement;t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()},t.prototype.exitFullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},t.prototype.fullScreen=function(){var t=this;this.$LG(document).on("fullscreenchange.lg.global"+this.core.lgId+" \n webkitfullscreenchange.lg.global"+this.core.lgId+" \n mozfullscreenchange.lg.global"+this.core.lgId+" \n MSFullscreenChange.lg.global"+this.core.lgId,function(){t.core.lgOpened&&t.core.outer.toggleClass("lg-fullscreen-on")}),this.core.outer.find(".lg-fullscreen").first().on("click.lg",function(){t.isFullScreen()?t.exitFullscreen():t.requestFullscreen()})},t.prototype.closeGallery=function(){this.isFullScreen()&&this.exitFullscreen()},t.prototype.destroy=function(){this.$LG(document).off("fullscreenchange.lg.global"+this.core.lgId+" \n webkitfullscreenchange.lg.global"+this.core.lgId+" \n mozfullscreenchange.lg.global"+this.core.lgId+" \n MSFullscreenChange.lg.global"+this.core.lgId)},t}(),ae=o((t,e)=>{var i,o;i=t,o=function(){var t="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},e=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}(),o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},s=function(){function t(i){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;e(this,t),this.ctx=i,this.iframes=o,this.exclude=s,this.iframesTimeout=n}return i(t,[{key:"getContexts",value:function(){var t=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(function(e){var i=t.filter(function(t){return t.contains(e)}).length>0;-1!==t.indexOf(e)||i||t.push(e)}),t}},{key:"getIframeContents",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=void 0;try{var s=t.contentWindow;if(o=s.document,!s||!o)throw new Error("iframe inaccessible")}catch(n){i()}o&&e(o)}},{key:"isIframeBlank",value:function(t){var e="about:blank",i=t.getAttribute("src").trim();return t.contentWindow.location.href===e&&i!==e&&i}},{key:"observeIframeLoad",value:function(t,e,i){var o=this,s=!1,n=null,r=function r(){if(!s){s=!0,clearTimeout(n);try{o.isIframeBlank(t)||(t.removeEventListener("load",r),o.getIframeContents(t,e,i))}catch(l){i()}}};t.addEventListener("load",r),n=setTimeout(r,this.iframesTimeout)}},{key:"onIframeReady",value:function(t,e,i){try{"complete"===t.contentWindow.document.readyState?this.isIframeBlank(t)?this.observeIframeLoad(t,e,i):this.getIframeContents(t,e,i):this.observeIframeLoad(t,e,i)}catch(o){i()}}},{key:"waitForIframes",value:function(t,e){var i=this,o=0;this.forEachIframe(t,function(){return!0},function(t){o++,i.waitForIframes(t.querySelector("html"),function(){--o||e()})},function(t){t||e()})}},{key:"forEachIframe",value:function(e,i,o){var s=this,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},r=e.querySelectorAll("iframe"),l=r.length,a=0;r=Array.prototype.slice.call(r);var h=function(){--l<=0&&n(a)};l||h(),r.forEach(function(e){t.matches(e,s.exclude)?h():s.onIframeReady(e,function(t){i(e)&&(a++,o(t)),h()},h)})}},{key:"createIterator",value:function(t,e,i){return document.createNodeIterator(t,e,i,!1)}},{key:"createInstanceOnIframe",value:function(e){return new t(e.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(t,e,i){if(t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_PRECEDING){if(null===e)return!0;if(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(t){var e=t.previousNode();return{prevNode:e,node:(null===e||t.nextNode())&&t.nextNode()}}},{key:"checkIframeFilter",value:function(t,e,i,o){var s=!1,n=!1;return o.forEach(function(t,e){t.val===i&&(s=e,n=t.handled)}),this.compareNodeIframe(t,e,i)?(!1!==s||n?!1===s||n||(o[s].handled=!0):o.push({val:i,handled:!0}),!0):(!1===s&&o.push({val:i,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(t,e,i,o){var s=this;t.forEach(function(t){t.handled||s.getIframeContents(t.val,function(t){s.createInstanceOnIframe(t).forEachNode(e,i,o)})})}},{key:"iterateThroughNodes",value:function(t,e,i,o,s){for(var n=this,r=this.createIterator(e,t,o),l=[],a=[],h=void 0,g=void 0,c=function(){var t=n.getIteratorNode(r);return g=t.prevNode,h=t.node};c();)this.iframes&&this.forEachIframe(e,function(t){return n.checkIframeFilter(h,g,t,l)},function(e){n.createInstanceOnIframe(e).forEachNode(t,function(t){return a.push(t)},o)}),a.push(h);a.forEach(function(t){i(t)}),this.iframes&&this.handleOpenIframes(l,t,i,o),s()}},{key:"forEachNode",value:function(t,e,i){var o=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},n=this.getContexts(),r=n.length;r||s(),n.forEach(function(n){var l=function(){o.iterateThroughNodes(t,n,e,i,function(){--r<=0&&s()})};o.iframes?o.waitForIframes(n,l):l()})}}],[{key:"matches",value:function(t,e){var i="string"==typeof e?[e]:e,o=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;if(o){var s=!1;return i.every(function(e){return!o.call(t,e)||(s=!0,!1)}),s}return!1}}]),t}(),n=function(){function n(t){e(this,n),this.ctx=t,this.ie=!1;var i=window.navigator.userAgent;(i.indexOf("MSIE")>-1||i.indexOf("Trident")>-1)&&(this.ie=!0)}return i(n,[{key:"log",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",o=this.opt.log;this.opt.debug&&"object"===(void 0===o?"undefined":t(o))&&"function"==typeof o[i]&&o[i]("mark.js: "+e)}},{key:"escapeStr",value:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(t){return"disabled"!==this.opt.wildcards&&(t=this.setupWildcardsRegExp(t)),t=this.escapeStr(t),Object.keys(this.opt.synonyms).length&&(t=this.createSynonymsRegExp(t)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.setupIgnoreJoinersRegExp(t)),this.opt.diacritics&&(t=this.createDiacriticsRegExp(t)),t=this.createMergedBlanksRegExp(t),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.createJoinersRegExp(t)),"disabled"!==this.opt.wildcards&&(t=this.createWildcardsRegExp(t)),t=this.createAccuracyRegExp(t)}},{key:"createSynonymsRegExp",value:function(t){var e=this.opt.synonyms,i=this.opt.caseSensitive?"":"i",o=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var s in e)if(e.hasOwnProperty(s)){var n=e[s],r="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(s):this.escapeStr(s),l="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(n):this.escapeStr(n);""!==r&&""!==l&&(t=t.replace(new RegExp("("+this.escapeStr(r)+"|"+this.escapeStr(l)+")","gm"+i),o+"("+this.processSynomyms(r)+"|"+this.processSynomyms(l)+")"+o))}return t}},{key:"processSynomyms",value:function(t){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.setupIgnoreJoinersRegExp(t)),t}},{key:"setupWildcardsRegExp",value:function(t){return(t=t.replace(/(?:\\)*\?/g,function(t){return"\\"===t.charAt(0)?"?":""})).replace(/(?:\\)*\*/g,function(t){return"\\"===t.charAt(0)?"*":""})}},{key:"createWildcardsRegExp",value:function(t){var e="withSpaces"===this.opt.wildcards;return t.replace(/\u0001/g,e?"[\\S\\s]?":"\\S?").replace(/\u0002/g,e?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(t){return t.replace(/[^(|)\\]/g,function(t,e,i){var o=i.charAt(e+1);return/[(|)\\]/.test(o)||""===o?t:t+"\0"})}},{key:"createJoinersRegExp",value:function(t){var e=[],i=this.opt.ignorePunctuation;return Array.isArray(i)&&i.length&&e.push(this.escapeStr(i.join(""))),this.opt.ignoreJoiners&&e.push("\\u00ad\\u200b\\u200c\\u200d"),e.length?t.split(/\u0000+/).join("["+e.join("")+"]*"):t}},{key:"createDiacriticsRegExp",value:function(t){var e=this.opt.caseSensitive?"":"i",i=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"],o=[];return t.split("").forEach(function(s){i.every(function(i){if(-1!==i.indexOf(s)){if(o.indexOf(i)>-1)return!1;t=t.replace(new RegExp("["+i+"]","gm"+e),"["+i+"]"),o.push(i)}return!0})}),t}},{key:"createMergedBlanksRegExp",value:function(t){return t.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(t){var e=this,i=this.opt.accuracy,o="string"==typeof i?i:i.value,s="string"==typeof i?[]:i.limiters,n="";switch(s.forEach(function(t){n+="|"+e.escapeStr(t)}),o){case"partially":default:return"()("+t+")";case"complementary":return"()([^"+(n="\\s"+(n||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")))+"]*"+t+"[^"+n+"]*)";case"exactly":return"(^|\\s"+n+")("+t+")(?=$|\\s"+n+")"}}},{key:"getSeparatedKeywords",value:function(t){var e=this,i=[];return t.forEach(function(t){e.opt.separateWordSearch?t.split(" ").forEach(function(t){t.trim()&&-1===i.indexOf(t)&&i.push(t)}):t.trim()&&-1===i.indexOf(t)&&i.push(t)}),{keywords:i.sort(function(t,e){return e.length-t.length}),length:i.length}}},{key:"isNumeric",value:function(t){return Number(parseFloat(t))==t}},{key:"checkRanges",value:function(t){var e=this;if(!Array.isArray(t)||"[object Object]"!==Object.prototype.toString.call(t[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(t),[];var i=[],o=0;return t.sort(function(t,e){return t.start-e.start}).forEach(function(t){var s=e.callNoMatchOnInvalidRanges(t,o),n=s.start,r=s.end;s.valid&&(t.start=n,t.length=r-n,i.push(t),o=r)}),i}},{key:"callNoMatchOnInvalidRanges",value:function(t,e){var i=void 0,o=void 0,s=!1;return t&&void 0!==t.start?(o=(i=parseInt(t.start,10))+parseInt(t.length,10),this.isNumeric(t.start)&&this.isNumeric(t.length)&&o-e>0&&o-i>0?s=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(t)),this.opt.noMatch(t))):(this.log("Ignoring invalid range: "+JSON.stringify(t)),this.opt.noMatch(t)),{start:i,end:o,valid:s}}},{key:"checkWhitespaceRanges",value:function(t,e,i){var o=void 0,s=!0,n=i.length,r=e-n,l=parseInt(t.start,10)-r;return(o=(l=l>n?n:l)+parseInt(t.length,10))>n&&(o=n,this.log("End range automatically set to the max value of "+n)),l<0||o-l<0||l>n||o>n?(s=!1,this.log("Invalid range: "+JSON.stringify(t)),this.opt.noMatch(t)):""===i.substring(l,o).replace(/\s+/g,"")&&(s=!1,this.log("Skipping whitespace only range: "+JSON.stringify(t)),this.opt.noMatch(t)),{start:l,end:o,valid:s}}},{key:"getTextNodes",value:function(t){var e=this,i="",o=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,function(t){o.push({start:i.length,end:(i+=t.textContent).length,node:t})},function(t){return e.matchesExclude(t.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},function(){t({value:i,nodes:o})})}},{key:"matchesExclude",value:function(t){return s.matches(t,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(t,e,i){var o=this.opt.element?this.opt.element:"mark",s=t.splitText(e),n=s.splitText(i-e),r=document.createElement(o);return r.setAttribute("data-markjs","true"),this.opt.className&&r.setAttribute("class",this.opt.className),r.textContent=s.textContent,s.parentNode.replaceChild(r,s),n}},{key:"wrapRangeInMappedTextNode",value:function(t,e,i,o,s){var n=this;t.nodes.every(function(r,l){var a=t.nodes[l+1];if(void 0===a||a.start>e){if(!o(r.node))return!1;var h=e-r.start,g=(i>r.end?r.end:i)-r.start,c=t.value.substr(0,r.start),d=t.value.substr(g+r.start);if(r.node=n.wrapRangeInTextNode(r.node,h,g),t.value=c+d,t.nodes.forEach(function(e,i){i>=l&&(t.nodes[i].start>0&&i!==l&&(t.nodes[i].start-=g),t.nodes[i].end-=g)}),i-=g,s(r.node.previousSibling,r.start),!(i>r.end))return!1;e=r.end}return!0})}},{key:"wrapMatches",value:function(t,e,i,o,s){var n=this,r=0===e?0:e+1;this.getTextNodes(function(e){e.nodes.forEach(function(e){e=e.node;for(var s=void 0;null!==(s=t.exec(e.textContent))&&""!==s[r];)if(i(s[r],e)){var l=s.index;if(0!==r)for(var a=1;a<r;a++)l+=s[a].length;e=n.wrapRangeInTextNode(e,l,l+s[r].length),o(e.previousSibling),t.lastIndex=0}}),s()})}},{key:"wrapMatchesAcrossElements",value:function(t,e,i,o,s){var n=this,r=0===e?0:e+1;this.getTextNodes(function(e){for(var l=void 0;null!==(l=t.exec(e.value))&&""!==l[r];){var a=l.index;if(0!==r)for(var h=1;h<r;h++)a+=l[h].length;var g=a+l[r].length;n.wrapRangeInMappedTextNode(e,a,g,function(t){return i(l[r],t)},function(e,i){t.lastIndex=i,o(e)})}s()})}},{key:"wrapRangeFromIndex",value:function(t,e,i,o){var s=this;this.getTextNodes(function(n){var r=n.value.length;t.forEach(function(t,o){var l=s.checkWhitespaceRanges(t,r,n.value),a=l.start,h=l.end;l.valid&&s.wrapRangeInMappedTextNode(n,a,h,function(i){return e(i,t,n.value.substring(a,h),o)},function(e){i(e,t)})}),o()})}},{key:"unwrapMatches",value:function(t){for(var e=t.parentNode,i=document.createDocumentFragment();t.firstChild;)i.appendChild(t.removeChild(t.firstChild));e.replaceChild(i,t),this.ie?this.normalizeTextNode(e):e.normalize()}},{key:"normalizeTextNode",value:function(t){if(t){if(3===t.nodeType)for(;t.nextSibling&&3===t.nextSibling.nodeType;)t.nodeValue+=t.nextSibling.nodeValue,t.parentNode.removeChild(t.nextSibling);else this.normalizeTextNode(t.firstChild);this.normalizeTextNode(t.nextSibling)}}},{key:"markRegExp",value:function(t,e){var i=this;this.opt=e,this.log('Searching with expression "'+t+'"');var o=0,s="wrapMatches";this.opt.acrossElements&&(s="wrapMatchesAcrossElements"),this[s](t,this.opt.ignoreGroups,function(t,e){return i.opt.filter(e,t,o)},function(t){o++,i.opt.each(t)},function(){0===o&&i.opt.noMatch(t),i.opt.done(o)})}},{key:"mark",value:function(t,e){var i=this;this.opt=e;var o=0,s="wrapMatches",n=this.getSeparatedKeywords("string"==typeof t?[t]:t),r=n.keywords,l=n.length,a=this.opt.caseSensitive?"":"i";this.opt.acrossElements&&(s="wrapMatchesAcrossElements"),0===l?this.opt.done(o):function t(e){var n=new RegExp(i.createRegExp(e),"gm"+a),h=0;i.log('Searching with expression "'+n+'"'),i[s](n,1,function(t,s){return i.opt.filter(s,e,o,h)},function(t){h++,o++,i.opt.each(t)},function(){0===h&&i.opt.noMatch(e),r[l-1]===e?i.opt.done(o):t(r[r.indexOf(e)+1])})}(r[0])}},{key:"markRanges",value:function(t,e){var i=this;this.opt=e;var o=0,s=this.checkRanges(t);s&&s.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(s)),this.wrapRangeFromIndex(s,function(t,e,o,s){return i.opt.filter(t,e,o,s)},function(t,e){o++,i.opt.each(t,e)},function(){i.opt.done(o)})):this.opt.done(o)}},{key:"unmark",value:function(t){var e=this;this.opt=t;var i=this.opt.element?this.opt.element:"*";i+="[data-markjs]",this.opt.className&&(i+="."+this.opt.className),this.log('Removal selector "'+i+'"'),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,function(t){e.unwrapMatches(t)},function(t){var o=s.matches(t,i),n=e.matchesExclude(t);return!o||n?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}},{key:"opt",set:function(t){this._opt=o({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:function(){},noMatch:function(){},filter:function(){return!0},done:function(){},debug:!1,log:window.console},t)},get:function(){return this._opt}},{key:"iterator",get:function(){return new s(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}}]),n}();return function(t){var e=this,i=new n(t);return this.mark=function(t,o){return i.mark(t,o),e},this.markRegExp=function(t,o){return i.markRegExp(t,o),e},this.markRanges=function(t,o){return i.markRanges(t,o),e},this.unmark=function(t){return i.unmark(t),e},this}},"object"==typeof t&&void 0!==e?e.exports=o():"function"==typeof define&&define.amd?define(o):i.Mark=o()}),he=i(ae(),1),ge=t=>{const{setPathAs:e}=z();return k(Q,{w:"$full",get borderBottom(){return`1px solid ${c()}`},get _hover(){return{bgColor:c()}},rounded:"$md",cursor:"pointer",px:"$2",as:St,get href(){return`${t.node.path}?from=search`},onMouseEnter:()=>{e(t.node.path,t.node.is_dir)},get children(){return[k(T,{class:"icon",boxSize:"$6",get color(){return U()},get as(){return It(t.node)},mr:"$1"}),k(x,{flex:1,p:"$1",spacing:"$1",w:"$full",alignItems:"start",get children(){return[k(f,{css:{wordBreak:"break-all"},get children(){return[k(ye,{get keywords(){return t.keywords},get name(){return t.node.name}}),k(m,{get when(){return t.node.size>0||!t.node.is_dir},get children(){return k(dt,{colorScheme:"info",ml:"$2",get children(){return E(t.node.size)}})}})]}}),k(f,{color:"$neutral10",size:"xs",css:{wordBreak:"break-all"},get children(){return t.node.parent}})]}})]}})},ce=()=>{const{isOpen:t,onOpen:e,onClose:i,onToggle:o}=r(),l=s(),a=t=>{"search"===t&&e()};j.on("tool",a);const h=t=>{(t.ctrlKey||pt&&t.metaKey)&&"k"===t.key.toLowerCase()&&(t.preventDefault(),o())};document.addEventListener("keydown",h),ht(()=>{j.off("tool",a),document.removeEventListener("keydown",h)});const[c,d]=A(""),{pathname:p}=_(),[m,y]=P(mt),[v,b]=A({content:[],total:0}),[S,I]=A(0),T=["all","folder","file"];let z;const E=async(t=1)=>{1===t&&z?.(),m()||(b({content:[],total:0}),C(await y(p(),c(),M(),S(),t,100),t=>{const e=t.content;e&&(e.forEach(t=>{if(L().base_path&&t.parent.startsWith(L().base_path)){const e=new RegExp("^"+L().base_path);t.parent=t.parent.replace(e,"")||"/",t.parent.startsWith("/")||(t.parent="/"+t.parent)}t.path=Z(G(t.parent,t.name))}),b(t))}))};return k(nt,{get opened(){return t()},onClose:i,closeOnEsc:!1,size:{"@initial":"sm","@sm":"lg","@md":"2xl"},initialFocus:"#search-input",scrollBehavior:"inside",get children(){return[k(J,{bg:"$blackAlpha5"}),k(gt,{mx:"$2",get children(){return[k(X,{}),k(N,{get children(){return l("home.search.search")}}),k(R,{get children(){return k(x,{w:"$full",spacing:"$2",get children(){return[k(Q,{w:"$full",spacing:"$2",get children(){return[k(xt,{w:"$32",get value(){return S()},onChange:t=>I(t),get options(){return T.map((t,e)=>({value:e,label:l(`home.search.scopes.${t}`)}))}}),k(n,{id:"search-input",get value(){return c()},onInput:t=>{d(t.currentTarget.value)},onKeyDown:t=>{"Enter"===t.key&&0!==c().length&&E()}}),k(O,{flexShrink:0,"aria-label":"search",get icon(){return k(vt,{})},onClick:()=>E(),get loading(){return m()},get disabled(){return 0===c().length}})]}}),k(u,{get children(){return[k(g,{get when(){return m()},get children(){return k(bt,{})}}),k(g,{get when(){return 0===v().content.length},get children(){return k(f,{size:"2xl",my:"$8",get children(){return l("home.search.no_result")}})}})]}}),k(x,{w:"$full",get children(){return k(w,{get each(){return v().content},children:t=>k(ge,{node:t,get keywords(){return c()}})})}}),k(wt,{get total(){return v().total},defaultPageSize:100,onChange:t=>{E(t)},setResetCallback:t=>z=t})]}})}})]}})]}})},de=st(()=>it(()=>e.import("./List-legacy-LpRbqCuW.js"),void 0)),ue=st(()=>it(()=>e.import("./Grid-legacy-DFmTlJOv.js"),void 0)),pe=st(()=>it(()=>e.import("./Images-legacy-CoWBNLGZ.js"),void 0)),t("default",()=>{const{rawLink:t}=K(),e=lt(()=>a.objs.filter(t=>t.type===ft.IMAGE));let i;const o=()=>{var o,s;o=document.createElement("div"),s={addClass:"lightgallery-container",dynamic:!0,thumbnail:"visible"===V.show_gallery_thumbnails,plugins:[qt,jt,te,se,le],dynamicEl:e().map(e=>{const i=t(e,!0);return{src:i,thumb:""===e.thumb?i:e.thumb,subHtml:`<h4>${e.name}</h4>`}})},i=new Ht(o,s)};return F(H([e,()=>V.show_gallery_thumbnails],()=>{i?.destroy(),i=void 0})),j.on("gallery",t=>{i||o(),i?.openGallery(e().findIndex(e=>e.name===t))}),ht(()=>{j.off("gallery"),i?.destroy()}),s(),[k(u,{get children(){return[k(g,{get when(){return"list"===h()},get children(){return k(de,{})}}),k(g,{get when(){return"grid"===h()},get children(){return k(ue,{})}}),k(g,{get when(){return"image"===h()},get children(){return k(pe,{get images(){return e()}})}})]}}),k(Dt,{}),k(ce,{}),k(Lt,{})]})}}});
1
+ System.register(["./chunk-legacy-D5ZT36tR.js","./store-legacy-CI1UFD5I.js","./obj-legacy-BLJL3FDc.js","./index-legacy-DX8ZPqos.js","./operations-legacy-x4qCe3Nr.js","./icon-legacy-CCjPA35g.js","./solid-contextmenu-legacy-sZs92FT7.js","./style-legacy-DWnOp_Km.js","./video_box-legacy-DJTbgfFE.js","./lightgallery-bundle-legacy-DmyaSLVh.js"],function(t,e){var i,o,s,n,r,l,a,h,g,c,d,u,p,m,f,y,v,b,S,x,w,C,I,T,z,E,k,O,L,A,P,M,D,R,$,G,F,N,B,_,H,X,V,W,j,Y,Z,U,q,J,K,Q,tt,et,it,ot,st,nt,rt,lt,at,ht,gt,ct,dt,ut,pt,mt,ft,yt,vt,bt,St,xt,wt,Ct,It,Tt,zt,Et,kt,Ot,Lt,At,Pt,Mt,Dt,Rt,$t,Gt,Ft,Nt,Bt,_t,Ht,Xt,Vt,Wt,jt,Yt,Zt,Ut,qt,Jt,Kt,Qt,te,ee,ie,oe,se,ne,re,le,ae,he,ge,ce,de,ue,pe;function me(t){return function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i}}(),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),new Ft(t)}function fe(t){return"href"===t?"src":t=(t=(t=t.replace("data-","")).charAt(0).toLowerCase()+t.slice(1)).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}function ye(t){let e;return $(()=>{new he.default(e).mark(t.keywords,{separateWordSearch:!0,diacritics:!0})}),k(at.span,{ref(t){"function"==typeof e?e(t):e=t},css:{mark:{bg:"$info4",rounded:"$md",px:"1px",color:"$info11",fontWeight:"$bold"}},get children(){return t.name}})}return{setters:[function(t){i=t.i,o=t.t},function(t){s=t.$,n=t.$n,r=t.$r,l=t.An,a=t.D,h=t.E,g=t.Gi,c=t.Ht,d=t.J,u=t.Ji,p=t.K,m=t.Ki,f=t.Kr,y=t.M,v=t.Mi,b=t.O,S=t.Qn,x=t.Qr,w=t.Ui,C=t.Ut,I=t.V,T=t.Xn,z=t.Y,E=t.Yt,k=t.Zi,O=t.Zn,L=t.a,A=t.aa,P=t.at,M=t.b,D=t.c,R=t.cr,$=t.da,G=t.dn,F=t.ea,N=t.fr,B=t.g,_=t.it,H=t.la,X=t.lr,V=t.lt,W=t.m,j=t.mn,Y=t.ni,Z=t.on,U=t.p,q=t.pn,J=t.pr,K=t.q,Q=t.qn,tt=t.qt,et=t.r,it=t.rt,ot=t.s,st=t.sa,nt=t.sr,rt=t.t,lt=t.ta,at=t.ti,ht=t.ua,gt=t.ur,ct=t.w,dt=t.wn,ut=t.y,pt=t.yt,mt=t.zt},function(t){ft=t.t},function(t){yt=t.A,vt=t.M,bt=t.Qt,St=t.St,xt=t.X,wt=t.z},function(t){Ct=t.t},function(t){It=t.t},function(t){Tt=t.i,zt=t.r,Et=t.t},function(t){},function(t){kt=t.r},function(t){}],execute:function(){Ot=t=>{const e=s();return k(Q,{spacing:"$2",get children(){return[k(T,{get p(){return Ct[t.name].p?"$1":void 0},get as(){return Ct[t.name].icon},boxSize:"$7",get color(){return Ct[t.name].color}}),k(f,{get children(){return e(`home.toolbar.${t.name}`)}})]}})},Lt=()=>{const t=s(),{colorMode:e}=Y(),{copySelectedRawLink:i,copySelectedPreviewPage:o}=p(),{batchDownloadSelected:n,sendToAria2:r,playlistDownloadSelected:l}=I(),{rawLink:h}=K(),{isShare:g}=_();return k(zt,{id:1,animation:"scale",get theme(){return"dark"!==e()?"light":"dark"},style:"z-index: var(--hope-zIndices-popover)",get children(){return[k(w,{each:["rename","move","copy","delete"],children:t=>k(Tt,{get hidden(){return!ot(t)||!a.write||g()},onClick:()=>{j.emit("tool",t)},get children(){return k(Ot,{name:t})}})}),k(Tt,{get hidden(){return!ot("share")},onClick:()=>{j.emit("tool","share")},get children(){return k(Ot,{name:"share"})}}),k(Tt,{hidden:()=>g()||!ot("decompress")||!a.write||y().some(t=>t.is_dir)||y().some(t=>!rt(t.name)),onClick:()=>{j.emit("tool","decompress")},get children(){return k(Ot,{name:"decompress"})}}),k(m,{get when(){return b()},get children(){return[k(Tt,{onClick:({props:t})=>{t.is_dir?o():i(!0)},get children(){return k(Ot,{name:"copy_link"})}}),k(Tt,{onClick:({props:e})=>{if(e.is_dir){if(!D.is_admin(L())&&!B("package_download"))return void q.warning(t("home.toolbar.package_download_disabled"));j.emit("tool","package_download")}else n()},get children(){return k(Ot,{name:"download"})}}),k(Et,{hidden:({props:t})=>t.type!==ft.VIDEO,get label(){return k(Q,{spacing:"$2",get children(){return[k(T,{as:yt,boxSize:"$7",p:"$0_5",color:"$info9"}),k(f,{get children(){return t("home.preview.play_with")}})]}})},get children(){return k(w,{each:kt,children:t=>k(Tt,{onClick:({props:e})=>{const i=tt(t.scheme,{raw_url:"",name:e.name,d_url:h(e,!0)});window.open(i,"_self")},get children(){return k(Q,{spacing:"$2",get children(){return[k(S,{m:"0 auto",boxSize:"$7",get src(){return`${window.__dynamic_base__}/images/${t.icon}.webp`}}),k(f,{get children(){return t.name}})]}})}})})}})]}}),k(m,{get when(){return v(()=>!b())()&&ct()},get children(){return[k(Et,{get label(){return k(Ot,{name:"copy_link"})},get children(){return[k(Tt,{onClick:o,get children(){return t("home.toolbar.preview_page")}}),k(Tt,{onClick:()=>i(),get children(){return t("home.toolbar.down_link")}}),k(Tt,{onClick:()=>i(!0),get children(){return t("home.toolbar.encode_down_link")}})]}}),k(Et,{get label(){return k(Ot,{name:"download"})},get children(){return[k(Tt,{onClick:n,get children(){return t("home.toolbar.batch_download")}}),k(m,{get when(){return D.is_admin(L())||B("package_download")},get children(){return[k(Tt,{onClick:()=>j.emit("tool","package_download"),get children(){return t("home.toolbar.package_download")}}),k(Tt,{onClick:l,get children(){return t("home.toolbar.playlist_download")}})]}}),k(Tt,{onClick:r,get children(){return t("home.toolbar.send_aria2")}})]}})]}})]}})},At=()=>{const t=W(),{pathname:e,setSearchParams:i}=_();return k(wt,{get total(){return a.total},get defaultCurrent(){return d()},get defaultPageSize(){return t.size},onChange:t=>{et(e(),t),i({page:t})}})},Pt=()=>{const{loadMore:t,allLoaded:e}=z(),i=s();return k(m,{get when(){return!e()},get fallback(){return k(f,{fontStyle:"italic",get children(){return i("home.no_more")}})},get children(){return k(l,{onClick:t,get children(){return i("home.load_more")}})}})},Mt=()=>{const{loadMore:t,allLoaded:e}=z(),i=s(),o=new IntersectionObserver(e=>{e[0].isIntersecting&&t()},{threshold:.1});let n;return $(()=>{e()||o.observe(n)}),ht(()=>{o.disconnect()}),k(m,{get when(){return!e()},get fallback(){return k(f,{fontStyle:"italic",get children(){return i("home.no_more")}})},get children(){return k(bt,{py:"$2",size:"md",thickness:3,ref(t){"function"==typeof n?n(t):n=t}})}})},Dt=()=>{const t=W();return k(u,{get children(){return[k(g,{get when(){return a.state===ut.FetchingMore},get children(){return k(bt,{py:"$2",size:"md",thickness:3})}}),k(g,{get when(){return"pagination"===t.type},get children(){return k(At,{})}}),k(g,{get when(){return"load_more"===t.type},get children(){return k(Pt,{})}}),k(g,{get when(){return"auto_load_more"===t.type},get children(){return k(Mt,{})}})]}})},Rt=function(){return Rt=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},Rt.apply(this,arguments)},$t={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},Gt={mode:"lg-slide",easing:"ease",speed:400,licenseKey:"0000-0000-000-0000",height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:300,container:"",startAnimationDuration:400,zoomFromOrigin:!0,hideBarsDelay:0,showBarsAfter:1e4,slideDelay:0,supportLegacyBrowser:!0,allowMediaOverlap:!1,videoMaxSize:"1280-720",loadYouTubePoster:!0,defaultCaptionHeight:0,ariaLabelledby:"",ariaDescribedby:"",resetScrollPosition:!0,hideScrollbar:!1,closable:!0,swipeToClose:!0,closeOnTap:!0,showCloseIcon:!0,showMaximizeIcon:!1,loop:!0,escKey:!0,keyPress:!0,trapFocus:!0,controls:!0,slideEndAnimation:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:2,numberOfSlideItemsInDom:10,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:0,iframeWidth:"100%",iframeHeight:"100%",iframeMaxWidth:"100%",iframeMaxHeight:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],extraProps:[],exThumbImage:"",isMobile:void 0,mobileSettings:{controls:!1,showCloseIcon:!1,download:!1},plugins:[],strings:{closeGallery:"Close gallery",toggleMaximize:"Toggle maximize",previousSlide:"Previous slide",nextSlide:"Next slide",download:"Download",playVideo:"Play video",mediaLoadingFailed:"Oops... Failed to load content..."}},Ft=function(){function t(t){return this.cssVenderPrefixes=["TransitionDuration","TransitionTimingFunction","Transform","Transition"],this.selector=this._getSelector(t),this.firstElement=this._getFirstEl(),this}return t.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})},t.prototype._getSelector=function(t,e){return void 0===e&&(e=document),"string"!=typeof t?t:(e=e||document,"#"===t.substring(0,1)?e.querySelector(t):e.querySelectorAll(t))},t.prototype._each=function(t){return this.selector?(void 0!==this.selector.length?[].forEach.call(this.selector,t):t(this.selector,0),this):this},t.prototype._setCssVendorPrefix=function(t,e,i){var o=e.replace(/-([a-z])/gi,function(t,e){return e.toUpperCase()});-1!==this.cssVenderPrefixes.indexOf(o)?(t.style[o.charAt(0).toLowerCase()+o.slice(1)]=i,t.style["webkit"+o]=i,t.style["moz"+o]=i,t.style["ms"+o]=i,t.style["o"+o]=i):t.style[o]=i},t.prototype._getFirstEl=function(){return this.selector&&void 0!==this.selector.length?this.selector[0]:this.selector},t.prototype.isEventMatched=function(t,e){var i=e.split(".");return t.split(".").filter(function(t){return t}).every(function(t){return-1!==i.indexOf(t)})},t.prototype.attr=function(t,e){return void 0===e?this.firstElement?this.firstElement.getAttribute(t):"":(this._each(function(i){i.setAttribute(t,e)}),this)},t.prototype.find=function(t){return me(this._getSelector(t,this.selector))},t.prototype.first=function(){return this.selector&&void 0!==this.selector.length?me(this.selector[0]):me(this.selector)},t.prototype.eq=function(t){return me(this.selector[t])},t.prototype.parent=function(){return me(this.selector.parentElement)},t.prototype.get=function(){return this._getFirstEl()},t.prototype.removeAttr=function(t){var e=t.split(" ");return this._each(function(t){e.forEach(function(e){return t.removeAttribute(e)})}),this},t.prototype.wrap=function(t){if(!this.firstElement)return this;var e=document.createElement("div");return e.className=t,this.firstElement.parentNode.insertBefore(e,this.firstElement),this.firstElement.parentNode.removeChild(this.firstElement),e.appendChild(this.firstElement),this},t.prototype.addClass=function(t){return void 0===t&&(t=""),this._each(function(e){t.split(" ").forEach(function(t){t&&e.classList.add(t)})}),this},t.prototype.removeClass=function(t){return this._each(function(e){t.split(" ").forEach(function(t){t&&e.classList.remove(t)})}),this},t.prototype.hasClass=function(t){return!!this.firstElement&&this.firstElement.classList.contains(t)},t.prototype.hasAttribute=function(t){return!!this.firstElement&&this.firstElement.hasAttribute(t)},t.prototype.toggleClass=function(t){return this.firstElement?(this.hasClass(t)?this.removeClass(t):this.addClass(t),this):this},t.prototype.css=function(t,e){var i=this;return this._each(function(o){i._setCssVendorPrefix(o,t,e)}),this},t.prototype.on=function(e,i){var o=this;return this.selector?(e.split(" ").forEach(function(e){Array.isArray(t.eventListeners[e])||(t.eventListeners[e]=[]),t.eventListeners[e].push(i),o.selector.addEventListener(e.split(".")[0],i)}),this):this},t.prototype.once=function(t,e){var i=this;return this.on(t,function(){i.off(t),e(t)}),this},t.prototype.off=function(e){var i=this;return this.selector?(Object.keys(t.eventListeners).forEach(function(o){i.isEventMatched(e,o)&&(t.eventListeners[o].forEach(function(t){i.selector.removeEventListener(o.split(".")[0],t)}),t.eventListeners[o]=[])}),this):this},t.prototype.trigger=function(t,e){if(!this.firstElement)return this;var i=new CustomEvent(t.split(".")[0],{detail:e||null});return this.firstElement.dispatchEvent(i),this},t.prototype.load=function(t){var e=this;return fetch(t).then(function(t){return t.text()}).then(function(t){e.selector.innerHTML=t}),this},t.prototype.html=function(t){return void 0===t?this.firstElement?this.firstElement.innerHTML:"":(this._each(function(e){e.innerHTML=t}),this)},t.prototype.append=function(t){return this._each(function(e){"string"==typeof t?e.insertAdjacentHTML("beforeend",t):e.appendChild(t)}),this},t.prototype.prepend=function(t){return this._each(function(e){"string"==typeof t?e.insertAdjacentHTML("afterbegin",t):t instanceof HTMLElement&&e.insertBefore(t.cloneNode(!0),e.firstChild)}),this},t.prototype.remove=function(){return this._each(function(t){t.parentNode.removeChild(t)}),this},t.prototype.empty=function(){return this._each(function(t){t.innerHTML=""}),this},t.prototype.scrollTop=function(t){return void 0!==t?(document.body.scrollTop=t,document.documentElement.scrollTop=t,this):window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},t.prototype.scrollLeft=function(t){return void 0!==t?(document.body.scrollLeft=t,document.documentElement.scrollLeft=t,this):window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},t.prototype.offset=function(){if(!this.firstElement)return{left:0,top:0};var t=this.firstElement.getBoundingClientRect(),e=me("body").style().marginLeft;return{left:t.left-parseFloat(e)+this.scrollLeft(),top:t.top+this.scrollTop()}},t.prototype.style=function(){return this.firstElement?this.firstElement.currentStyle||window.getComputedStyle(this.firstElement):{}},t.prototype.width=function(){var t=this.style();return this.firstElement.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)},t.prototype.height=function(){var t=this.style();return this.firstElement.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)},t.eventListeners={},t}(),Nt=["src","sources","subHtml","subHtmlUrl","html","video","poster","slideName","responsive","srcset","sizes","iframe","downloadUrl","download","width","facebookShareUrl","tweetText","iframeTitle","twitterShareUrl","pinterestShareUrl","pinterestText","fbHtml","disqusIdentifier","disqusUrl"],Bt={fetchCaptionFromUrl:function(t,e,i){fetch(t).then(function(t){return t.text()}).then(function(t){if("append"===i){var o='<div class="lg-sub-html">'+t+"</div>";e.append(o)}else e.html(t)})},getSize:function(t,e,i,o){void 0===i&&(i=0);var s=me(t).attr("data-lg-size")||o;if(s){var n=s.split(",");if(n[1])for(var r=window.innerWidth,l=0;l<n.length;l++){var a=n[l];if(parseInt(a.split("-")[2],10)>r){s=a;break}l===n.length-1&&(s=a)}var h=s.split("-"),g=parseInt(h[0],10),c=parseInt(h[1],10),d=e.width(),u=e.height()-i,p=Math.min(d,g),m=Math.min(u,c),f=Math.min(p/g,m/c);return{width:g*f,height:c*f}}},getTransform:function(t,e,i,o,s){if(s){var n=me(t).find("img").first();if(n.get()){var r=e.get().getBoundingClientRect(),l=r.width,a=e.height()-(i+o),h=n.width(),g=n.height(),c=n.style(),d=(l-h)/2-n.offset().left+(parseFloat(c.paddingLeft)||0)+(parseFloat(c.borderLeft)||0)+me(window).scrollLeft()+r.left,u=(a-g)/2-n.offset().top+(parseFloat(c.paddingTop)||0)+(parseFloat(c.borderTop)||0)+me(window).scrollTop()+i;return"translate3d("+(d*=-1)+"px, "+(u*=-1)+"px, 0) scale3d("+h/s.width+", "+g/s.height+", 1)"}}},getIframeMarkup:function(t,e,i,o,s,n){return'<div class="lg-media-cont lg-has-iframe" style="width:'+t+"; max-width:"+i+"; height: "+e+"; max-height:"+o+'">\n <iframe class="lg-object" frameborder="0" '+(n?'title="'+n+'"':"")+' src="'+s+'" allowfullscreen="true"></iframe>\n </div>'},getImgMarkup:function(t,e,i,o,s,n){var r="<img "+i+" "+(o?'srcset="'+o+'"':"")+" "+(s?'sizes="'+s+'"':"")+' class="lg-object lg-image" data-index="'+t+'" src="'+e+'" />',l="";return n&&(l=("string"==typeof n?JSON.parse(n):n).map(function(t){var e="";return Object.keys(t).forEach(function(i){e+=" "+i+'="'+t[i]+'"'}),"<source "+e+"></source>"})),""+l+r},getResponsiveSrc:function(t){for(var e=[],i=[],o="",s=0;s<t.length;s++){var n=t[s].split(" ");""===n[0]&&n.splice(0,1),i.push(n[0]),e.push(n[1])}for(var r=window.innerWidth,l=0;l<e.length;l++)if(parseInt(e[l],10)>r){o=i[l];break}return o},isImageLoaded:function(t){return!!t&&!!t.complete&&0!==t.naturalWidth},getVideoPosterMarkup:function(t,e,i,o,s){var n="";n=s&&s.youtube?"lg-has-youtube":s&&s.vimeo?"lg-has-vimeo":"lg-has-html5";var r=e;return"string"!=typeof e&&(r=e.outerHTML),'<div class="lg-video-cont '+n+'" style="'+i+'">\n <div class="lg-video-play-button">\n <svg\n viewBox="0 0 20 20"\n preserveAspectRatio="xMidYMid"\n focusable="false"\n aria-labelledby="'+o+'"\n role="img"\n class="lg-video-play-icon"\n >\n <title>'+o+'</title>\n <polygon class="lg-video-play-icon-inner" points="1,0 20,10 1,20"></polygon>\n </svg>\n <svg class="lg-video-play-icon-bg" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle></svg>\n <svg class="lg-video-play-icon-circle" viewBox="0 0 50 50" focusable="false">\n <circle cx="50%" cy="50%" r="20"></circle>\n </svg>\n </div>\n '+r+'\n <img class="lg-object lg-video-poster" src="'+t+'" />\n </div>'},getFocusableElements:function(t){var e=t.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])');return[].filter.call(e,function(t){var e=window.getComputedStyle(t);return"none"!==e.display&&"hidden"!==e.visibility})},getDynamicOptions:function(t,e,i,o){var s=[],n=function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var o=Array(t),s=0;for(e=0;e<i;e++)for(var n=arguments[e],r=0,l=n.length;r<l;r++,s++)o[s]=n[r];return o}(Nt,e);return[].forEach.call(t,function(t){for(var e={},r=0;r<t.attributes.length;r++){var l=t.attributes[r];if(l.specified){var a=fe(l.name),h="";n.indexOf(a)>-1&&(h=a),h&&(e[h]=l.value)}}var g=me(t),c=g.find("img").first().attr("alt"),d=g.attr("title");e.thumb=o?g.attr(o):g.find("img").first().attr("src"),i&&!e.subHtml&&(e.subHtml=d||c||""),e.alt=c||d||"",s.push(e)}),s},isMobile:function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},isVideo:function(t,e,i){if(!t)return e?{html5:!0}:void console.error("lightGallery :- data-src is not provided on slide item "+(i+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");var o=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i),s=t.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i),n=t.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);return o?{youtube:o}:s?{vimeo:s}:n?{wistia:n}:void 0}},_t=0,Ht=function(){function t(t,e){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.bodyPaddingRight=0,this.isDummyImageRemoved=!1,this.dragOrSwipeEnabled=!1,this.mediaContainerPosition={top:0,bottom:0},!t)return this;if(_t++,this.lgId=_t,this.el=t,this.LGel=me(t),this.generateSettings(e),this.buildModules(),this.settings.dynamic&&void 0!==this.settings.dynamicEl&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this.validateLicense(),this}return t.prototype.generateSettings=function(t){if(this.settings=Rt(Rt({},Gt),t),this.settings.isMobile&&"function"==typeof this.settings.isMobile?this.settings.isMobile():Bt.isMobile()){var e=Rt(Rt({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=Rt(Rt({},this.settings),e)}},t.prototype.normalizeSettings=function(){if(this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container){var t=this.settings.container;if("function"==typeof t)this.settings.container=t();else if("string"==typeof t){var e=document.querySelector(t);this.settings.container=null!=e?e:document.body}}else this.settings.container=document.body;this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},t.prototype.init=function(){var t=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger($t.init,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout(function(){t.enableDrag(),t.enableSwipe(),t.triggerPosterClick()},50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},t.prototype.openGalleryOnItemClick=function(){for(var t=this,e=function(e){var o=i.items[e],s=me(o),n=Ft.generateUUID();s.attr("data-lg-id",n).on("click.lgcustom-item-"+n,function(i){i.preventDefault();var s=t.settings.index||e;t.openGallery(s,o)})},i=this,o=0;o<this.items.length;o++)e(o)},t.prototype.buildModules=function(){var t=this;this.settings.plugins.forEach(function(e){t.plugins.push(new e(t,me))})},t.prototype.validateLicense=function(){this.settings.licenseKey?"0000-0000-000-0000"===this.settings.licenseKey&&console.warn("lightGallery: "+this.settings.licenseKey+" license key is not valid for production use"):console.error("Please provide a valid license key")},t.prototype.getSlideItem=function(t){return me(this.getSlideItemId(t))},t.prototype.getSlideItemId=function(t){return"#lg-item-"+this.lgId+"-"+t},t.prototype.getIdName=function(t){return t+"-"+this.lgId},t.prototype.getElementById=function(t){return me("#"+this.getIdName(t))},t.prototype.manageSingleSlideClassName=function(){this.galleryItems.length<2?this.outer.addClass("lg-single-item"):this.outer.removeClass("lg-single-item")},t.prototype.buildStructure=function(){var t=this;if(!this.$container||!this.$container.get()){var e="",i="";this.settings.controls&&(e='<button type="button" id="'+this.getIdName("lg-prev")+'" aria-label="'+this.settings.strings.previousSlide+'" class="lg-prev lg-icon"> '+this.settings.prevHtml+' </button>\n <button type="button" id="'+this.getIdName("lg-next")+'" aria-label="'+this.settings.strings.nextSlide+'" class="lg-next lg-icon"> '+this.settings.nextHtml+" </button>"),".lg-item"!==this.settings.appendSubHtmlTo&&(i='<div class="lg-sub-html" role="status" aria-live="polite"></div>');var o="";this.settings.allowMediaOverlap&&(o+="lg-media-overlap ");var s=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",n=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",r="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),l=this.settings.closable&&this.settings.showCloseIcon?'<button type="button" aria-label="'+this.settings.strings.closeGallery+'" id="'+this.getIdName("lg-close")+'" class="lg-close lg-icon"></button>':"",a=this.settings.showMaximizeIcon?'<button type="button" aria-label="'+this.settings.strings.toggleMaximize+'" id="'+this.getIdName("lg-maximize")+'" class="lg-maximize lg-icon"></button>':"",h='\n <div class="'+r+'" id="'+this.getIdName("lg-container")+'" tabindex="-1" aria-modal="true" '+s+" "+n+' role="dialog"\n >\n <div id="'+this.getIdName("lg-backdrop")+'" class="lg-backdrop"></div>\n\n <div id="'+this.getIdName("lg-outer")+'" class="lg-outer lg-use-css3 lg-css3 lg-hide-items '+o+' ">\n\n <div id="'+this.getIdName("lg-content")+'" class="lg-content">\n <div id="'+this.getIdName("lg-inner")+'" class="lg-inner">\n </div>\n '+e+'\n </div>\n <div id="'+this.getIdName("lg-toolbar")+'" class="lg-toolbar lg-group">\n '+a+"\n "+l+"\n </div>\n "+(".lg-outer"===this.settings.appendSubHtmlTo?i:"")+'\n <div id="'+this.getIdName("lg-components")+'" class="lg-components">\n '+(".lg-sub-html"===this.settings.appendSubHtmlTo?i:"")+"\n </div>\n </div>\n </div>\n ";me(this.settings.container).append(h),document.body!==this.settings.container&&me(this.settings.container).css("position","relative"),this.outer=this.getElementById("lg-outer"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$content=this.getElementById("lg-content"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms");var g=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(g+="lg-grab "),this.outer.addClass(g),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append('<a id="'+this.getIdName("lg-download")+'" target="_blank" rel="noopener" aria-label="'+this.settings.strings.download+'" download class="lg-download lg-icon"></a>'),this.counter(),me(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,function(){t.refreshOnResize()}),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()}},t.prototype.refreshOnResize=function(){if(this.lgOpened){var t=this.galleryItems[this.index].__slideVideoInfo;this.mediaContainerPosition=this.getMediaContainerPosition();var e=this.mediaContainerPosition,i=e.top,o=e.bottom;if(this.currentImageSize=Bt.getSize(this.items[this.index],this.outer,i+o,t&&this.settings.videoMaxSize),t&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved){var s=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",s)}this.LGel.trigger($t.containerResize)}},t.prototype.resizeVideoSlide=function(t,e){var i=this.getVideoContStyle(e);this.getSlideItem(t).find(".lg-video-cont").attr("style",i)},t.prototype.updateSlides=function(t,e){if(this.index>t.length-1&&(this.index=t.length-1),1===t.length&&(this.index=0),t.length){var i=this.galleryItems[e].src;this.galleryItems=t,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[];var o=0;this.galleryItems.some(function(t,e){return t.src===i&&(o=e,!0)}),this.currentItemsInDom=this.organizeSlideItems(o,-1),this.loadContent(o,!0),this.getSlideItem(o).addClass("lg-current"),this.index=o,this.updateCurrentCounter(o),this.LGel.trigger($t.updateSlides)}else this.closeGallery()},t.prototype.getItems=function(){return this.items=[],this.settings.dynamic?this.settings.dynamicEl||[]:("this"===this.settings.selector?this.items.push(this.el):this.settings.selector?"string"==typeof this.settings.selector?this.settings.selectWithin?this.items=me(this.settings.selectWithin).find(this.settings.selector).get():this.items=this.el.querySelectorAll(this.settings.selector):this.items=this.settings.selector:this.items=this.el.children,Bt.getDynamicOptions(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage))},t.prototype.shouldHideScrollbar=function(){return this.settings.hideScrollbar&&document.body===this.settings.container},t.prototype.hideScrollbar=function(){if(this.shouldHideScrollbar()){this.bodyPaddingRight=parseFloat(me("body").style().paddingRight);var t=document.documentElement.getBoundingClientRect(),e=window.innerWidth-t.width;me(document.body).css("padding-right",e+this.bodyPaddingRight+"px"),me(document.body).addClass("lg-overlay-open")}},t.prototype.resetScrollBar=function(){this.shouldHideScrollbar()&&(me(document.body).css("padding-right",this.bodyPaddingRight+"px"),me(document.body).removeClass("lg-overlay-open"))},t.prototype.openGallery=function(t,e){var i=this;if(void 0===t&&(t=this.settings.index),!this.lgOpened){this.lgOpened=!0,this.outer.removeClass("lg-hide-items"),this.hideScrollbar(),this.$container.addClass("lg-show");var o=this.getItemsToBeInsertedToDom(t,t);this.currentItemsInDom=o;var s="";o.forEach(function(t){s=s+'<div id="'+t+'" class="lg-item"></div>'}),this.$inner.append(s),this.addHtml(t);var n="";this.mediaContainerPosition=this.getMediaContainerPosition();var r=this.mediaContainerPosition,l=r.top,a=r.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(l,a);var h=this.galleryItems[t].__slideVideoInfo;this.zoomFromOrigin&&e&&(this.currentImageSize=Bt.getSize(e,this.outer,l+a,h&&this.settings.videoMaxSize),n=Bt.getTransform(e,this.outer,l,a,this.currentImageSize)),this.zoomFromOrigin&&n||(this.outer.addClass(this.settings.startClass),this.getSlideItem(t).removeClass("lg-complete"));var g=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout(function(){i.outer.addClass("lg-components-open")},g),this.index=t,this.LGel.trigger($t.beforeOpen),this.getSlideItem(t).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=me(window).scrollTop(),setTimeout(function(){if(i.zoomFromOrigin&&n){var e=i.getSlideItem(t);e.css("transform",n),setTimeout(function(){e.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",i.settings.startAnimationDuration+"ms"),i.outer.addClass("lg-zoom-from-image")}),setTimeout(function(){e.css("transform","translate3d(0, 0, 0)")},100)}setTimeout(function(){i.$backdrop.addClass("in"),i.$container.addClass("lg-show-in")},10),setTimeout(function(){i.settings.trapFocus&&document.body===i.settings.container&&i.trapFocus()},i.settings.backdropDuration+50),i.zoomFromOrigin&&n||setTimeout(function(){i.outer.addClass("lg-visible")},i.settings.backdropDuration),i.slide(t,!1,!1,!1),i.LGel.trigger($t.afterOpen)}),document.body===this.settings.container&&me("html").addClass("lg-on")}},t.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var t=this.$toolbar.get().clientHeight||0,e=this.outer.find(".lg-components .lg-sub-html").get(),i=this.settings.defaultCaptionHeight||e&&e.clientHeight||0,o=this.outer.find(".lg-thumb-outer").get();return{top:t,bottom:(o?o.clientHeight:0)+i}},t.prototype.setMediaContainerPosition=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.$content.css("top",t+"px").css("bottom",e+"px")},t.prototype.hideBars=function(){var t=this;setTimeout(function(){t.outer.removeClass("lg-hide-items"),t.settings.hideBarsDelay>0&&(t.outer.on("mousemove.lg click.lg touchstart.lg",function(){t.outer.removeClass("lg-hide-items"),clearTimeout(t.hideBarTimeout),t.hideBarTimeout=setTimeout(function(){t.outer.addClass("lg-hide-items")},t.settings.hideBarsDelay)}),t.outer.trigger("mousemove.lg"))},this.settings.showBarsAfter)},t.prototype.initPictureFill=function(t){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[t.get()]})}catch(e){console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},t.prototype.counter=function(){if(this.settings.counter){var t='<div class="lg-counter" role="status" aria-live="polite">\n <span id="'+this.getIdName("lg-counter-current")+'" class="lg-counter-current">'+(this.index+1)+' </span> /\n <span id="'+this.getIdName("lg-counter-all")+'" class="lg-counter-all">'+this.galleryItems.length+" </span></div>";this.outer.find(this.settings.appendCounterTo).append(t)}},t.prototype.addHtml=function(t){var e,i;if(this.galleryItems[t].subHtmlUrl?i=this.galleryItems[t].subHtmlUrl:e=this.galleryItems[t].subHtml,!i)if(e){var o=e.substring(0,1);if("."===o||"#"===o)try{e=this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?me(this.items).eq(t).find(e).first().html():me(e).first().html()}catch(n){console.warn('Error processing subHtml selector "'+e+'"'),e=""}}else e="";if(".lg-item"!==this.settings.appendSubHtmlTo)i?Bt.fetchCaptionFromUrl(i,this.outer.find(".lg-sub-html"),"replace"):this.outer.find(".lg-sub-html").html(e);else{var s=me(this.getSlideItemId(t));i?Bt.fetchCaptionFromUrl(i,s,"append"):s.append('<div class="lg-sub-html">'+e+"</div>")}null!=e&&(""===e?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger($t.afterAppendSubHtml,{index:t})},t.prototype.preload=function(t){for(var e=1;e<=this.settings.preload&&!(e>=this.galleryItems.length-t);e++)this.loadContent(t+e,!1);for(var i=1;i<=this.settings.preload&&!(t-i<0);i++)this.loadContent(t-i,!1)},t.prototype.getDummyImgStyles=function(t){return t?"width:"+t.width+"px;\n margin-left: -"+t.width/2+"px;\n margin-top: -"+t.height/2+"px;\n height:"+t.height+"px":""},t.prototype.getVideoContStyle=function(t){return t?"width:"+t.width+"px;\n height:"+t.height+"px":""},t.prototype.getDummyImageContent=function(t,e,i){var o;if(this.settings.dynamic||(o=me(this.items).eq(e)),o){var s=void 0;if(!(s=this.settings.exThumbImage?o.attr(this.settings.exThumbImage):o.find("img").first().attr("src")))return"";var n=this.getDummyImgStyles(this.currentImageSize),r=document.createElement("img");return r.alt=i||"",r.src=s,r.className="lg-dummy-img",r.style.cssText=n,t.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),r}return""},t.prototype.setImgMarkup=function(t,e,i){var o=this.galleryItems[i],s=o.alt,n=o.srcset,r=o.sizes,l=o.sources,a="",h=s?'alt="'+s+'"':"";a=this.isFirstSlideWithZoomAnimation()?this.getDummyImageContent(e,i,h):Bt.getImgMarkup(i,t,h,n,r,l);var g=document.createElement("picture");g.className="lg-img-wrap",me(g).append(a),e.prepend(g)},t.prototype.onSlideObjectLoad=function(t,e,i,o){var s=t.find(".lg-object").first();Bt.isImageLoaded(s.get())||e?i():(s.on("load.lg error.lg",function(){i&&i()}),s.on("error.lg",function(){o&&o()}))},t.prototype.onLgObjectLoad=function(t,e,i,o,s,n){var r=this;this.onSlideObjectLoad(t,n,function(){r.triggerSlideItemLoad(t,e,i,o,s)},function(){t.addClass("lg-complete lg-complete_"),t.html('<span class="lg-error-msg">'+r.settings.strings.mediaLoadingFailed+"</span>")})},t.prototype.triggerSlideItemLoad=function(t,e,i,o,s){var n=this,r=this.galleryItems[e],l=s&&"video"===this.getSlideType(r)&&!r.poster?o:0;setTimeout(function(){t.addClass("lg-complete lg-complete_"),n.LGel.trigger($t.slideItemLoad,{index:e,delay:i||0,isFirstSlide:s})},l)},t.prototype.isFirstSlideWithZoomAnimation=function(){return!(this.lGalleryOn||!this.zoomFromOrigin||!this.currentImageSize)},t.prototype.addSlideVideoInfo=function(t){var e=this;t.forEach(function(t,i){t.__slideVideoInfo=Bt.isVideo(t.src,!!t.video,i),t.__slideVideoInfo&&e.settings.loadYouTubePoster&&!t.poster&&t.__slideVideoInfo.youtube&&(t.poster="//img.youtube.com/vi/"+t.__slideVideoInfo.youtube[1]+"/maxresdefault.jpg")})},t.prototype.loadContent=function(t,e){var i=this,o=this.galleryItems[t],s=me(this.getSlideItemId(t)),n=o.poster,r=o.srcset,l=o.sizes,a=o.sources,h=o.src,g=o.video,c=g&&"string"==typeof g?JSON.parse(g):g;if(o.responsive){var d=o.responsive.split(",");h=Bt.getResponsiveSrc(d)||h}var u=o.__slideVideoInfo,p="",m=!!o.iframe,f=!this.lGalleryOn,y=0;if(f&&(y=this.zoomFromOrigin&&this.currentImageSize?this.settings.startAnimationDuration+10:this.settings.backdropDuration+10),!s.hasClass("lg-loaded")){if(u){var v=this.mediaContainerPosition,b=v.top,S=v.bottom,x=Bt.getSize(this.items[t],this.outer,b+S,u&&this.settings.videoMaxSize);p=this.getVideoContStyle(x)}if(m){var w=Bt.getIframeMarkup(this.settings.iframeWidth,this.settings.iframeHeight,this.settings.iframeMaxWidth,this.settings.iframeMaxHeight,h,o.iframeTitle);s.prepend(w)}else if(n){var C="";f&&this.zoomFromOrigin&&this.currentImageSize&&(C=this.getDummyImageContent(s,t,"")),w=Bt.getVideoPosterMarkup(n,C||"",p,this.settings.strings.playVideo,u),s.prepend(w)}else if(u)w='<div class="lg-video-cont " style="'+p+'"></div>',s.prepend(w);else if(this.setImgMarkup(h,s,t),r||a){var I=s.find(".lg-object");this.initPictureFill(I)}(n||u)&&this.LGel.trigger($t.hasVideo,{index:t,src:h,html5Video:c,hasPoster:!!n}),this.LGel.trigger($t.afterAppendSlide,{index:t}),this.lGalleryOn&&".lg-item"===this.settings.appendSubHtmlTo&&this.addHtml(t)}var T=0;y&&!me(document.body).hasClass("lg-from-hash")&&(T=y),this.isFirstSlideWithZoomAnimation()&&(setTimeout(function(){s.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")},this.settings.startAnimationDuration+100),s.hasClass("lg-loaded")||setTimeout(function(){if("image"===i.getSlideType(o)){var e=o.alt,g=e?'alt="'+e+'"':"";if(s.find(".lg-img-wrap").append(Bt.getImgMarkup(t,h,g,r,l,o.sources)),r||a){var c=s.find(".lg-object");i.initPictureFill(c)}}("image"===i.getSlideType(o)||"video"===i.getSlideType(o)&&n)&&(i.onLgObjectLoad(s,t,y,T,!0,!1),i.onSlideObjectLoad(s,!(!u||!u.html5||n),function(){i.loadContentOnFirstSlideLoad(t,s,T)},function(){i.loadContentOnFirstSlideLoad(t,s,T)}))},this.settings.startAnimationDuration+100)),s.addClass("lg-loaded"),this.isFirstSlideWithZoomAnimation()&&("video"!==this.getSlideType(o)||n)||this.onLgObjectLoad(s,t,y,T,f,!(!u||!u.html5||n)),this.zoomFromOrigin&&this.currentImageSize||!s.hasClass("lg-complete_")||this.lGalleryOn||setTimeout(function(){s.addClass("lg-complete")},this.settings.backdropDuration),this.lGalleryOn=!0,!0===e&&(s.hasClass("lg-complete_")?this.preload(t):s.find(".lg-object").first().on("load.lg error.lg",function(){i.preload(t)}))},t.prototype.loadContentOnFirstSlideLoad=function(t,e,i){var o=this;setTimeout(function(){e.find(".lg-dummy-img").remove(),e.removeClass("lg-first-slide"),o.outer.removeClass("lg-first-slide-loading"),o.isDummyImageRemoved=!0,o.preload(t)},i+300)},t.prototype.getItemsToBeInsertedToDom=function(t,e,i){var o=this;void 0===i&&(i=0);var s=[],n=Math.max(i,3);n=Math.min(n,this.galleryItems.length);var r="lg-item-"+this.lgId+"-"+e;if(this.galleryItems.length<=3)return this.galleryItems.forEach(function(t,e){s.push("lg-item-"+o.lgId+"-"+e)}),s;if(t<(this.galleryItems.length-1)/2){for(var l=t;l>t-n/2&&l>=0;l--)s.push("lg-item-"+this.lgId+"-"+l);var a=s.length;for(l=0;l<n-a;l++)s.push("lg-item-"+this.lgId+"-"+(t+l+1))}else{for(l=t;l<=this.galleryItems.length-1&&l<t+n/2;l++)s.push("lg-item-"+this.lgId+"-"+l);for(a=s.length,l=0;l<n-a;l++)s.push("lg-item-"+this.lgId+"-"+(t-l-1))}return this.settings.loop&&(t===this.galleryItems.length-1?s.push("lg-item-"+this.lgId+"-0"):0===t&&s.push("lg-item-"+this.lgId+"-"+(this.galleryItems.length-1))),-1===s.indexOf(r)&&s.push("lg-item-"+this.lgId+"-"+e),s},t.prototype.organizeSlideItems=function(t,e){var i=this,o=this.getItemsToBeInsertedToDom(t,e,this.settings.numberOfSlideItemsInDom);return o.forEach(function(t){-1===i.currentItemsInDom.indexOf(t)&&i.$inner.append('<div id="'+t+'" class="lg-item"></div>')}),this.currentItemsInDom.forEach(function(t){-1===o.indexOf(t)&&me("#"+t).remove()}),o},t.prototype.getPreviousSlideIndex=function(){var t=0;try{var e=this.outer.find(".lg-current").first().attr("id");t=parseInt(e.split("-")[3])||0}catch(i){t=0}return t},t.prototype.setDownloadValue=function(t){if(this.settings.download){var e=this.galleryItems[t];if(!1===e.downloadUrl||"false"===e.downloadUrl)this.outer.addClass("lg-hide-download");else{var i=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),i.attr("href",e.downloadUrl||e.src),e.download&&i.attr("download",e.download)}}},t.prototype.makeSlideAnimation=function(t,e,i){var o=this;this.lGalleryOn&&i.addClass("lg-slide-progress"),setTimeout(function(){o.outer.addClass("lg-no-trans"),o.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),"prev"===t?(e.addClass("lg-prev-slide"),i.addClass("lg-next-slide")):(e.addClass("lg-next-slide"),i.addClass("lg-prev-slide")),setTimeout(function(){o.outer.find(".lg-item").removeClass("lg-current"),e.addClass("lg-current"),o.outer.removeClass("lg-no-trans")},50)},this.lGalleryOn?this.settings.slideDelay:0)},t.prototype.slide=function(t,e,i,o){var s=this,n=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(t,n),!this.lGalleryOn||n!==t){var r=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(t);var l=this.getSlideItem(t),a=this.getSlideItem(n),h=this.galleryItems[t],g=h.__slideVideoInfo;if(this.outer.attr("data-lg-slide-type",this.getSlideType(h)),this.setDownloadValue(t),g){var c=this.mediaContainerPosition,d=c.top,u=c.bottom,p=Bt.getSize(this.items[t],this.outer,d+u,g&&this.settings.videoMaxSize);this.resizeVideoSlide(t,p)}if(this.LGel.trigger($t.beforeSlide,{prevIndex:n,index:t,fromTouch:!!e,fromThumb:!!i}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(t),o||(t<n?o="prev":t>n&&(o="next")),e){this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var m=void 0,f=void 0;r>2?(m=t-1,f=t+1,(0===t&&n===r-1||t===r-1&&0===n)&&(f=0,m=r-1)):(m=0,f=1),"prev"===o?this.getSlideItem(f).addClass("lg-next-slide"):this.getSlideItem(m).addClass("lg-prev-slide"),l.addClass("lg-current")}else this.makeSlideAnimation(o,l,a);this.lGalleryOn?setTimeout(function(){s.loadContent(t,!0),".lg-item"!==s.settings.appendSubHtmlTo&&s.addHtml(t)},this.settings.speed+50+(e?0:this.settings.slideDelay)):this.loadContent(t,!0),setTimeout(function(){s.lgBusy=!1,a.removeClass("lg-slide-progress"),s.LGel.trigger($t.afterSlide,{prevIndex:n,index:t,fromTouch:e,fromThumb:i})},(this.lGalleryOn?this.settings.speed+100:100)+(e?0:this.settings.slideDelay))}this.index=t}},t.prototype.updateCurrentCounter=function(t){this.getElementById("lg-counter-current").html(t+1+"")},t.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},t.prototype.getSlideType=function(t){return t.__slideVideoInfo?"video":t.iframe?"iframe":"image"},t.prototype.touchMove=function(t,e,i){var o=e.pageX-t.pageX,s=e.pageY-t.pageY,n=!1;if(this.swipeDirection?n=!0:Math.abs(o)>15?(this.swipeDirection="horizontal",n=!0):Math.abs(s)>15&&(this.swipeDirection="vertical",n=!0),n){var r=this.getSlideItem(this.index);if("horizontal"===this.swipeDirection){null==i||i.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(r,o,0);var l=r.get().offsetWidth,a=15*l/100-Math.abs(10*o/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-l+o-a,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),l+o+a,0)}else if("vertical"===this.swipeDirection&&this.settings.swipeToClose){null==i||i.preventDefault(),this.$container.addClass("lg-dragging-vertical");var h=1-Math.abs(s)/window.innerHeight;this.$backdrop.css("opacity",h);var g=1-Math.abs(s)/(2*window.innerWidth);this.setTranslate(r,0,s,g,g),Math.abs(s)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},t.prototype.touchEnd=function(t,e,i){var o,s=this;"lg-slide"!==this.settings.mode&&this.outer.addClass("lg-slide"),setTimeout(function(){s.$container.removeClass("lg-dragging-vertical"),s.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var n=!0;if("horizontal"===s.swipeDirection){o=t.pageX-e.pageX;var r=Math.abs(t.pageX-e.pageX);o<0&&r>s.settings.swipeThreshold?(s.goToNextSlide(!0),n=!1):o>0&&r>s.settings.swipeThreshold&&(s.goToPrevSlide(!0),n=!1)}else if("vertical"===s.swipeDirection){if(o=Math.abs(t.pageY-e.pageY),s.settings.closable&&s.settings.swipeToClose&&o>100)return void s.closeGallery();s.$backdrop.css("opacity",1)}if(s.outer.find(".lg-item").removeAttr("style"),n&&Math.abs(t.pageX-e.pageX)<5){var l=me(i.target);s.isPosterElement(l)&&s.LGel.trigger($t.posterClick)}s.swipeDirection=void 0}),setTimeout(function(){s.outer.hasClass("lg-dragging")||"lg-slide"===s.settings.mode||s.outer.removeClass("lg-slide")},this.settings.speed+100)},t.prototype.enableSwipe=function(){var t=this,e={},i={},o=!1,s=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",function(i){t.dragOrSwipeEnabled=!0;var o=t.getSlideItem(t.index);!me(i.target).hasClass("lg-item")&&!o.get().contains(i.target)||t.outer.hasClass("lg-zoomed")||t.lgBusy||1!==i.touches.length||(s=!0,t.touchAction="swipe",t.manageSwipeClass(),e={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY})}),this.$inner.on("touchmove.lg",function(n){s&&"swipe"===t.touchAction&&1===n.touches.length&&(i={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t.touchMove(e,i,n),o=!0)}),this.$inner.on("touchend.lg",function(n){if("swipe"===t.touchAction){if(o)o=!1,t.touchEnd(i,e,n);else if(s){var r=me(n.target);t.isPosterElement(r)&&t.LGel.trigger($t.posterClick)}t.touchAction=void 0,s=!1}}))},t.prototype.enableDrag=function(){var t=this,e={},i={},o=!1,s=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",function(i){t.dragOrSwipeEnabled=!0;var s=t.getSlideItem(t.index);(me(i.target).hasClass("lg-item")||s.get().contains(i.target))&&(t.outer.hasClass("lg-zoomed")||t.lgBusy||(i.preventDefault(),t.lgBusy||(t.manageSwipeClass(),e={pageX:i.pageX,pageY:i.pageY},o=!0,t.outer.get().scrollLeft+=1,t.outer.get().scrollLeft-=1,t.outer.removeClass("lg-grab").addClass("lg-grabbing"),t.LGel.trigger($t.dragStart))))}),me(window).on("mousemove.lg.global"+this.lgId,function(n){o&&t.lgOpened&&(s=!0,i={pageX:n.pageX,pageY:n.pageY},t.touchMove(e,i),t.LGel.trigger($t.dragMove))}),me(window).on("mouseup.lg.global"+this.lgId,function(n){if(t.lgOpened){var r=me(n.target);s?(s=!1,t.touchEnd(i,e,n),t.LGel.trigger($t.dragEnd)):t.isPosterElement(r)&&t.LGel.trigger($t.posterClick),o&&(o=!1,t.outer.removeClass("lg-grabbing").addClass("lg-grab"))}}))},t.prototype.triggerPosterClick=function(){var t=this;this.$inner.on("click.lg",function(e){!t.dragOrSwipeEnabled&&t.isPosterElement(me(e.target))&&t.LGel.trigger($t.posterClick)})},t.prototype.manageSwipeClass=function(){var t=this.index+1,e=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(0===this.index?e=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(t=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),e>-1&&this.getSlideItem(e).addClass("lg-prev-slide"),this.getSlideItem(t).addClass("lg-next-slide")},t.prototype.goToNextSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(this.index+1<this.galleryItems.length?(this.index++,this.LGel.trigger($t.beforeNextSlide,{index:this.index}),this.slide(this.index,!!t,!1,"next")):i?(this.index=0,this.LGel.trigger($t.beforeNextSlide,{index:this.index}),this.slide(this.index,!!t,!1,"next")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-right-end"),setTimeout(function(){e.outer.removeClass("lg-right-end")},400)))},t.prototype.goToPrevSlide=function(t){var e=this,i=this.settings.loop;t&&this.galleryItems.length<3&&(i=!1),this.lgBusy||(this.index>0?(this.index--,this.LGel.trigger($t.beforePrevSlide,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):i?(this.index=this.galleryItems.length-1,this.LGel.trigger($t.beforePrevSlide,{index:this.index,fromTouch:t}),this.slide(this.index,!!t,!1,"prev")):this.settings.slideEndAnimation&&!t&&(this.outer.addClass("lg-left-end"),setTimeout(function(){e.outer.removeClass("lg-left-end")},400)))},t.prototype.keyPress=function(){var t=this;me(window).on("keydown.lg.global"+this.lgId,function(e){t.lgOpened&&!0===t.settings.escKey&&27===e.keyCode&&(e.preventDefault(),t.settings.allowMediaOverlap&&t.outer.hasClass("lg-can-toggle")&&t.outer.hasClass("lg-components-open")?t.outer.removeClass("lg-components-open"):t.closeGallery()),t.lgOpened&&t.galleryItems.length>1&&(37===e.keyCode&&(e.preventDefault(),t.goToPrevSlide()),39===e.keyCode&&(e.preventDefault(),t.goToNextSlide()))})},t.prototype.arrow=function(){var t=this;this.getElementById("lg-prev").on("click.lg",function(){t.goToPrevSlide()}),this.getElementById("lg-next").on("click.lg",function(){t.goToNextSlide()})},t.prototype.arrowDisable=function(t){if(!this.settings.loop&&this.settings.hideControlOnEnd){var e=this.getElementById("lg-prev"),i=this.getElementById("lg-next");t+1===this.galleryItems.length?i.attr("disabled","disabled").addClass("disabled"):i.removeAttr("disabled").removeClass("disabled"),0===t?e.attr("disabled","disabled").addClass("disabled"):e.removeAttr("disabled").removeClass("disabled")}},t.prototype.setTranslate=function(t,e,i,o,s){void 0===o&&(o=1),void 0===s&&(s=1),t.css("transform","translate3d("+e+"px, "+i+"px, 0px) scale3d("+o+", "+s+", 1)")},t.prototype.mousewheel=function(){var t=this,e=0;this.outer.on("wheel.lg",function(i){if(i.deltaY&&!(t.galleryItems.length<2)){i.preventDefault();var o=(new Date).getTime();o-e<1e3||(e=o,i.deltaY>0?t.goToNextSlide():i.deltaY<0&&t.goToPrevSlide())}})},t.prototype.isSlideElement=function(t){return t.hasClass("lg-outer")||t.hasClass("lg-item")||t.hasClass("lg-img-wrap")||t.hasClass("lg-img-rotate")},t.prototype.isPosterElement=function(t){var e=this.getSlideItem(this.index).find(".lg-video-play-button").get();return t.hasClass("lg-video-poster")||t.hasClass("lg-video-play-button")||e&&e.contains(t.get())},t.prototype.toggleMaximize=function(){var t=this;this.getElementById("lg-maximize").on("click.lg",function(){t.$container.toggleClass("lg-inline"),t.refreshOnResize()})},t.prototype.invalidateItems=function(){for(var t=0;t<this.items.length;t++){var e=me(this.items[t]);e.off("click.lgcustom-item-"+e.attr("data-lg-id"))}},t.prototype.trapFocus=function(){var t=this;this.$container.get().focus({preventScroll:!0}),me(window).on("keydown.lg.global"+this.lgId,function(e){if(t.lgOpened&&("Tab"===e.key||9===e.keyCode)){var i=Bt.getFocusableElements(t.$container.get()),o=i[0],s=i[i.length-1];e.shiftKey?document.activeElement===o&&(s.focus(),e.preventDefault()):document.activeElement===s&&(o.focus(),e.preventDefault())}})},t.prototype.manageCloseGallery=function(){var t=this;if(this.settings.closable){var e=!1;this.getElementById("lg-close").on("click.lg",function(){t.closeGallery()}),this.settings.closeOnTap&&(this.outer.on("mousedown.lg",function(i){var o=me(i.target);e=!!t.isSlideElement(o)}),this.outer.on("mousemove.lg",function(){e=!1}),this.outer.on("mouseup.lg",function(i){var o=me(i.target);t.isSlideElement(o)&&e&&(t.outer.hasClass("lg-dragging")||t.closeGallery())}))}},t.prototype.closeGallery=function(t){var e=this;if(!this.lgOpened||!this.settings.closable&&!t)return 0;this.LGel.trigger($t.beforeClose),this.settings.resetScrollPosition&&!this.settings.hideScrollbar&&me(window).scrollTop(this.prevScrollTop);var i,o=this.items[this.index];if(this.zoomFromOrigin&&o){var s=this.mediaContainerPosition,n=s.top,r=s.bottom,l=this.galleryItems[this.index],a=l.__slideVideoInfo,h=l.poster,g=Bt.getSize(o,this.outer,n+r,a&&h&&this.settings.videoMaxSize);i=Bt.getTransform(o,this.outer,n,r,g)}this.zoomFromOrigin&&i?(this.outer.addClass("lg-closing lg-zoom-from-image"),this.getSlideItem(this.index).addClass("lg-start-end-progress").css("transition-duration",this.settings.startAnimationDuration+"ms").css("transform",i)):(this.outer.addClass("lg-hide-items"),this.outer.removeClass("lg-zoom-from-image")),this.destroyModules(),this.lGalleryOn=!1,this.isDummyImageRemoved=!1,this.zoomFromOrigin=this.settings.zoomFromOrigin,clearTimeout(this.hideBarTimeout),this.hideBarTimeout=!1,me("html").removeClass("lg-on"),this.outer.removeClass("lg-visible lg-components-open"),this.$backdrop.removeClass("in").css("opacity",0);var c=this.zoomFromOrigin&&i?Math.max(this.settings.startAnimationDuration,this.settings.backdropDuration):this.settings.backdropDuration;return this.$container.removeClass("lg-show-in"),setTimeout(function(){e.zoomFromOrigin&&i&&e.outer.removeClass("lg-zoom-from-image"),e.$container.removeClass("lg-show"),e.resetScrollBar(),e.$backdrop.removeAttr("style").css("transition-duration",e.settings.backdropDuration+"ms"),e.outer.removeClass("lg-closing "+e.settings.startClass),e.getSlideItem(e.index).removeClass("lg-start-end-progress"),e.$inner.empty(),e.lgOpened&&e.LGel.trigger($t.afterClose,{instance:e}),e.$container.get()&&e.$container.get().blur(),e.lgOpened=!1},c+100),c+100},t.prototype.initModules=function(){this.plugins.forEach(function(t){try{t.init()}catch(e){console.warn("lightGallery:- make sure lightGallery module is properly initiated")}})},t.prototype.destroyModules=function(t){this.plugins.forEach(function(e){try{t?e.destroy():e.closeGallery&&e.closeGallery()}catch(i){console.warn("lightGallery:- make sure lightGallery module is properly destroyed")}})},t.prototype.refresh=function(t){this.settings.dynamic||this.invalidateItems(),this.galleryItems=t||this.getItems(),this.updateControls(),this.openGalleryOnItemClick(),this.LGel.trigger($t.updateSlides)},t.prototype.updateControls=function(){this.addSlideVideoInfo(this.galleryItems),this.updateCounterTotal(),this.manageSingleSlideClassName()},t.prototype.destroyGallery=function(){this.destroyModules(!0),this.settings.dynamic||this.invalidateItems(),me(window).off(".lg.global"+this.lgId),this.LGel.off(".lg"),this.$container.remove()},t.prototype.destroy=function(){var t=this.closeGallery(!0);return t?setTimeout(this.destroyGallery.bind(this),t):this.destroyGallery(),t},t}(),Xt=function(){return Xt=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},Xt.apply(this,arguments)},Vt={thumbnail:!0,animateThumb:!0,currentPagerPosition:"middle",alignThumbnails:"middle",thumbWidth:100,thumbHeight:"80px",thumbMargin:5,appendThumbnailsTo:".lg-components",toggleThumb:!1,enableThumbDrag:!0,enableThumbSwipe:!0,thumbnailSwipeThreshold:10,loadYouTubeThumbnail:!0,youTubeThumbSize:1,thumbnailPluginStrings:{toggleThumbnails:"Toggle thumbnails"}},Wt={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},jt=function(){function t(t,e){return this.thumbOuterWidth=0,this.thumbTotalWidth=0,this.translateX=0,this.thumbClickable=!1,this.core=t,this.$LG=e,this}return t.prototype.init=function(){this.settings=Xt(Xt({},Vt),this.core.settings),this.thumbOuterWidth=0,this.thumbTotalWidth=this.core.galleryItems.length*(this.settings.thumbWidth+this.settings.thumbMargin),this.translateX=0,this.setAnimateThumbStyles(),this.core.settings.allowMediaOverlap||(this.settings.toggleThumb=!1),this.settings.thumbnail&&(this.build(),this.settings.animateThumb?(this.settings.enableThumbDrag&&this.enableThumbDrag(),this.settings.enableThumbSwipe&&this.enableThumbSwipe(),this.thumbClickable=!1):this.thumbClickable=!0,this.toggleThumbBar(),this.thumbKeyPress())},t.prototype.build=function(){var t=this;this.setThumbMarkup(),this.manageActiveClassOnSlideChange(),this.$lgThumb.first().on("click.lg touchend.lg",function(e){var i=t.$LG(e.target);i.hasAttribute("data-lg-item-id")&&setTimeout(function(){if(t.thumbClickable&&!t.core.lgBusy){var e=parseInt(i.attr("data-lg-item-id"));t.core.slide(e,!1,!0,!1)}},50)}),this.core.LGel.on(Wt.beforeSlide+".thumb",function(e){var i=e.detail.index;t.animateThumb(i)}),this.core.LGel.on(Wt.beforeOpen+".thumb",function(){t.thumbOuterWidth=t.core.outer.get().offsetWidth}),this.core.LGel.on(Wt.updateSlides+".thumb",function(){t.rebuildThumbnails()}),this.core.LGel.on(Wt.containerResize+".thumb",function(){t.core.lgOpened&&setTimeout(function(){t.thumbOuterWidth=t.core.outer.get().offsetWidth,t.animateThumb(t.core.index),t.thumbOuterWidth=t.core.outer.get().offsetWidth},50)})},t.prototype.setThumbMarkup=function(){var t="lg-thumb-outer ";this.settings.alignThumbnails&&(t+="lg-thumb-align-"+this.settings.alignThumbnails);var e='<div class="'+t+'">\n <div class="lg-thumb lg-group">\n </div>\n </div>';this.core.outer.addClass("lg-has-thumb"),".lg-components"===this.settings.appendThumbnailsTo?this.core.$lgComponents.append(e):this.core.outer.append(e),this.$thumbOuter=this.core.outer.find(".lg-thumb-outer").first(),this.$lgThumb=this.core.outer.find(".lg-thumb").first(),this.settings.animateThumb&&this.core.outer.find(".lg-thumb").css("transition-duration",this.core.settings.speed+"ms").css("width",this.thumbTotalWidth+"px").css("position","relative"),this.setThumbItemHtml(this.core.galleryItems)},t.prototype.enableThumbDrag=function(){var t=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0},i=!1;this.$thumbOuter.addClass("lg-grab"),this.core.outer.find(".lg-thumb").first().on("mousedown.lg.thumb",function(o){t.thumbTotalWidth>t.thumbOuterWidth&&(o.preventDefault(),e.cords.startX=o.pageX,e.startTime=new Date,t.thumbClickable=!1,i=!0,t.core.outer.get().scrollLeft+=1,t.core.outer.get().scrollLeft-=1,t.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))}),this.$LG(window).on("mousemove.lg.thumb.global"+this.core.lgId,function(o){t.core.lgOpened&&i&&(e.cords.endX=o.pageX,e=t.onThumbTouchMove(e))}),this.$LG(window).on("mouseup.lg.thumb.global"+this.core.lgId,function(){t.core.lgOpened&&(e.isMoved?e=t.onThumbTouchEnd(e):t.thumbClickable=!0,i&&(i=!1,t.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab")))})},t.prototype.enableThumbSwipe=function(){var t=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0};this.$lgThumb.on("touchstart.lg",function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e.cords.startX=i.targetTouches[0].pageX,t.thumbClickable=!1,e.startTime=new Date)}),this.$lgThumb.on("touchmove.lg",function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e.cords.endX=i.targetTouches[0].pageX,e=t.onThumbTouchMove(e))}),this.$lgThumb.on("touchend.lg",function(){e.isMoved?e=t.onThumbTouchEnd(e):t.thumbClickable=!0})},t.prototype.rebuildThumbnails=function(){var t=this;this.$thumbOuter.addClass("lg-rebuilding-thumbnails"),setTimeout(function(){t.thumbTotalWidth=t.core.galleryItems.length*(t.settings.thumbWidth+t.settings.thumbMargin),t.$lgThumb.css("width",t.thumbTotalWidth+"px"),t.$lgThumb.empty(),t.setThumbItemHtml(t.core.galleryItems),t.animateThumb(t.core.index)},50),setTimeout(function(){t.$thumbOuter.removeClass("lg-rebuilding-thumbnails")},200)},t.prototype.setTranslate=function(t){this.$lgThumb.css("transform","translate3d(-"+t+"px, 0px, 0px)")},t.prototype.getPossibleTransformX=function(t){return t>this.thumbTotalWidth-this.thumbOuterWidth&&(t=this.thumbTotalWidth-this.thumbOuterWidth),t<0&&(t=0),t},t.prototype.animateThumb=function(t){if(this.$lgThumb.css("transition-duration",this.core.settings.speed+"ms"),this.settings.animateThumb){var e=0;switch(this.settings.currentPagerPosition){case"left":e=0;break;case"middle":e=this.thumbOuterWidth/2-this.settings.thumbWidth/2;break;case"right":e=this.thumbOuterWidth-this.settings.thumbWidth}this.translateX=(this.settings.thumbWidth+this.settings.thumbMargin)*t-1-e,this.translateX>this.thumbTotalWidth-this.thumbOuterWidth&&(this.translateX=this.thumbTotalWidth-this.thumbOuterWidth),this.translateX<0&&(this.translateX=0),this.setTranslate(this.translateX)}},t.prototype.onThumbTouchMove=function(t){return t.newTranslateX=this.translateX,t.isMoved=!0,t.touchMoveTime=(new Date).valueOf(),t.newTranslateX-=t.cords.endX-t.cords.startX,t.newTranslateX=this.getPossibleTransformX(t.newTranslateX),this.setTranslate(t.newTranslateX),this.$thumbOuter.addClass("lg-dragging"),t},t.prototype.onThumbTouchEnd=function(t){t.isMoved=!1,t.endTime=new Date,this.$thumbOuter.removeClass("lg-dragging");var e=t.endTime.valueOf()-t.startTime.valueOf(),i=t.cords.endX-t.cords.startX,o=Math.abs(i)/e;return o>.15&&t.endTime.valueOf()-t.touchMoveTime<30?((o+=1)>2&&(o+=1),o+=o*(Math.abs(i)/this.thumbOuterWidth),this.$lgThumb.css("transition-duration",Math.min(o-1,2)+"settings"),i*=o,this.translateX=this.getPossibleTransformX(this.translateX-i),this.setTranslate(this.translateX)):this.translateX=t.newTranslateX,Math.abs(t.cords.endX-t.cords.startX)<this.settings.thumbnailSwipeThreshold&&(this.thumbClickable=!0),t},t.prototype.getThumbHtml=function(t,e,i){var o,s=this.core.galleryItems[e].__slideVideoInfo||{};o=s.youtube&&this.settings.loadYouTubeThumbnail?"//img.youtube.com/vi/"+s.youtube[1]+"/"+this.settings.youTubeThumbSize+".jpg":t;var n=document.createElement("div");n.setAttribute("data-lg-item-id",e+""),n.className="lg-thumb-item "+(e===this.core.index?"active":""),n.style.cssText="width: "+this.settings.thumbWidth+"px; height: "+this.settings.thumbHeight+"; margin-right: "+this.settings.thumbMargin+"px;";var r=document.createElement("img");return r.alt=i||"",r.setAttribute("data-lg-item-id",e+""),r.src=o,n.appendChild(r),n},t.prototype.setThumbItemHtml=function(t){for(var e=0;e<t.length;e++){var i=this.getThumbHtml(t[e].thumb,e,t[e].alt);this.$lgThumb.append(i)}},t.prototype.setAnimateThumbStyles=function(){this.settings.animateThumb&&this.core.outer.addClass("lg-animate-thumb")},t.prototype.manageActiveClassOnSlideChange=function(){var t=this;this.core.LGel.on(Wt.beforeSlide+".thumb",function(e){var i=t.core.outer.find(".lg-thumb-item"),o=e.detail.index;i.removeClass("active"),i.eq(o).addClass("active")})},t.prototype.toggleThumbBar=function(){var t=this;this.settings.toggleThumb&&(this.core.outer.addClass("lg-can-toggle"),this.core.$toolbar.append('<button type="button" aria-label="'+this.settings.thumbnailPluginStrings.toggleThumbnails+'" class="lg-toggle-thumb lg-icon"></button>'),this.core.outer.find(".lg-toggle-thumb").first().on("click.lg",function(){t.core.outer.toggleClass("lg-components-open")}))},t.prototype.thumbKeyPress=function(){var t=this;this.$LG(window).on("keydown.lg.thumb.global"+this.core.lgId,function(e){t.core.lgOpened&&t.settings.toggleThumb&&(38===e.keyCode?(e.preventDefault(),t.core.outer.addClass("lg-components-open")):40===e.keyCode&&(e.preventDefault(),t.core.outer.removeClass("lg-components-open")))})},t.prototype.destroy=function(){this.settings.thumbnail&&(this.$LG(window).off(".lg.thumb.global"+this.core.lgId),this.core.LGel.off(".lg.thumb"),this.core.LGel.off(".thumb"),this.$thumbOuter.remove(),this.core.outer.removeClass("lg-has-thumb"))},t}(),Yt=function(){return Yt=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},Yt.apply(this,arguments)},Zt={scale:1,zoom:!0,infiniteZoom:!0,actualSize:!0,showZoomInOutIcons:!1,actualSizeIcons:{zoomIn:"lg-zoom-in",zoomOut:"lg-zoom-out"},enableZoomAfter:300,zoomPluginStrings:{zoomIn:"Zoom in",zoomOut:"Zoom out",viewActualSize:"View actual size"}},Ut={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},qt=function(){function t(t,e){return this.core=t,this.$LG=e,this.settings=Yt(Yt({},Zt),this.core.settings),this}return t.prototype.buildTemplates=function(){var t=this.settings.showZoomInOutIcons?'<button id="'+this.core.getIdName("lg-zoom-in")+'" type="button" aria-label="'+this.settings.zoomPluginStrings.zoomIn+'" class="lg-zoom-in lg-icon"></button><button id="'+this.core.getIdName("lg-zoom-out")+'" type="button" aria-label="'+this.settings.zoomPluginStrings.zoomOut+'" class="lg-zoom-out lg-icon"></button>':"";this.settings.actualSize&&(t+='<button id="'+this.core.getIdName("lg-actual-size")+'" type="button" aria-label="'+this.settings.zoomPluginStrings.viewActualSize+'" class="'+this.settings.actualSizeIcons.zoomIn+' lg-icon"></button>'),this.core.outer.addClass("lg-use-transition-for-zoom"),this.core.$toolbar.first().append(t)},t.prototype.enableZoom=function(t){var e=this,i=this.settings.enableZoomAfter+t.detail.delay;this.$LG("body").first().hasClass("lg-from-hash")&&t.detail.delay?i=0:this.$LG("body").first().removeClass("lg-from-hash"),this.zoomableTimeout=setTimeout(function(){e.isImageSlide(e.core.index)&&(e.core.getSlideItem(t.detail.index).addClass("lg-zoomable"),t.detail.index===e.core.index&&e.setZoomEssentials())},i+30)},t.prototype.enableZoomOnSlideItemLoad=function(){this.core.LGel.on(Ut.slideItemLoad+".zoom",this.enableZoom.bind(this))},t.prototype.getDragCords=function(t){return{x:t.pageX,y:t.pageY}},t.prototype.getSwipeCords=function(t){return{x:t.touches[0].pageX,y:t.touches[0].pageY}},t.prototype.getDragAllowedAxises=function(t,e){if(!this.containerRect)return{allowX:!1,allowY:!1};var i=this.core.getSlideItem(this.core.index).find(".lg-image").first().get(),o=0,s=0,n=i.getBoundingClientRect();t?(o=i.offsetHeight*t,s=i.offsetWidth*t):e?(o=n.height+e*n.height,s=n.width+e*n.width):(o=n.height,s=n.width);var r=o>this.containerRect.height;return{allowX:s>this.containerRect.width,allowY:r}},t.prototype.setZoomEssentials=function(){this.containerRect=this.core.$content.get().getBoundingClientRect()},t.prototype.zoomImage=function(t,e,i,o){if(this.containerRect&&!(Math.abs(e)<=0)){var s,n,r=this.containerRect.width/2+this.containerRect.left,l=this.containerRect.height/2+this.containerRect.top+this.scrollTop;1===t&&(this.positionChanged=!1);var a=this.getDragAllowedAxises(0,e),h=a.allowY,g=a.allowX;this.positionChanged&&(s=this.left/(this.scale-e),n=this.top/(this.scale-e),this.pageX=r-s,this.pageY=l-n,this.positionChanged=!1);var c,d,u=this.getPossibleSwipeDragCords(e),p=r-this.pageX,m=l-this.pageY;if(t-e>1){var f=(t-e)/Math.abs(e);c=(p=(e<0?-p:p)+this.left*(f+(e<0?-1:1)))/f,d=(m=(e<0?-m:m)+this.top*(f+(e<0?-1:1)))/f}else c=p*(f=(t-e)*e),d=m*f;i&&(g?this.isBeyondPossibleLeft(c,u.minX)?c=u.minX:this.isBeyondPossibleRight(c,u.maxX)&&(c=u.maxX):t>1&&(c<u.minX?c=u.minX:c>u.maxX&&(c=u.maxX)),h?this.isBeyondPossibleTop(d,u.minY)?d=u.minY:this.isBeyondPossibleBottom(d,u.maxY)&&(d=u.maxY):t>1&&(d<u.minY?d=u.minY:d>u.maxY&&(d=u.maxY))),this.setZoomStyles({x:c,y:d,scale:t}),this.left=c,this.top=d,o&&this.setZoomImageSize()}},t.prototype.resetImageTranslate=function(t){if(this.isImageSlide(t)){var e=this.core.getSlideItem(t).find(".lg-image").first();this.imageReset=!1,e.removeClass("reset-transition reset-transition-y reset-transition-x"),this.core.outer.removeClass("lg-actual-size"),e.css("width","auto").css("height","auto"),setTimeout(function(){e.removeClass("no-transition")},10)}},t.prototype.setZoomImageSize=function(){var t=this,e=this.core.getSlideItem(this.core.index).find(".lg-image").first();setTimeout(function(){var i=t.getCurrentImageActualSizeScale();t.scale>=i&&(e.addClass("no-transition"),t.imageReset=!0)},500),setTimeout(function(){var i=t.getCurrentImageActualSizeScale();if(t.scale>=i){var o=t.getDragAllowedAxises(t.scale);e.css("width",e.get().naturalWidth+"px").css("height",e.get().naturalHeight+"px"),t.core.outer.addClass("lg-actual-size"),o.allowX&&o.allowY?e.addClass("reset-transition"):o.allowX&&!o.allowY?e.addClass("reset-transition-x"):!o.allowX&&o.allowY&&e.addClass("reset-transition-y")}},550)},t.prototype.setZoomStyles=function(t){var e=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),i=this.core.getSlideItem(this.core.index).find(".lg-image").first(),o=this.core.outer.find(".lg-current .lg-dummy-img").first();this.scale=t.scale,i.css("transform","scale3d("+t.scale+", "+t.scale+", 1)"),o.css("transform","scale3d("+t.scale+", "+t.scale+", 1)");var s="translate3d("+t.x+"px, "+t.y+"px, 0)";e.css("transform",s)},t.prototype.setActualSize=function(t,e){var i=this;if(!this.zoomInProgress){this.zoomInProgress=!0;var o=this.core.galleryItems[this.core.index];this.resetImageTranslate(t),setTimeout(function(){if(o.src&&!i.core.outer.hasClass("lg-first-slide-loading")){var t=i.getCurrentImageActualSizeScale(),s=i.scale;i.core.outer.hasClass("lg-zoomed")?i.scale=1:i.scale=i.getScale(t),i.setPageCords(e),i.beginZoom(i.scale),i.zoomImage(i.scale,i.scale-s,!0,!0)}},50),setTimeout(function(){i.core.outer.removeClass("lg-grabbing").addClass("lg-grab")},60),setTimeout(function(){i.zoomInProgress=!1},610)}},t.prototype.getNaturalWidth=function(t){var e=this.core.getSlideItem(t).find(".lg-image").first(),i=this.core.galleryItems[t].width;return i?parseFloat(i):e.get().naturalWidth},t.prototype.getActualSizeScale=function(t,e){return t>=e?t/e||2:1},t.prototype.getCurrentImageActualSizeScale=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-image").first().get().offsetWidth,e=this.getNaturalWidth(this.core.index)||t;return this.getActualSizeScale(e,t)},t.prototype.getPageCords=function(t){var e={};if(t)e.x=t.pageX||t.touches[0].pageX,e.y=t.pageY||t.touches[0].pageY;else{var i=this.core.$content.get().getBoundingClientRect();e.x=i.width/2+i.left,e.y=i.height/2+this.scrollTop+i.top}return e},t.prototype.setPageCords=function(t){var e=this.getPageCords(t);this.pageX=e.x,this.pageY=e.y},t.prototype.manageActualPixelClassNames=function(){this.core.getElementById("lg-actual-size").removeClass(this.settings.actualSizeIcons.zoomIn).addClass(this.settings.actualSizeIcons.zoomOut)},t.prototype.beginZoom=function(t){return this.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),t>1?(this.core.outer.addClass("lg-zoomed"),this.manageActualPixelClassNames()):this.resetZoom(),t>1},t.prototype.getScale=function(t){var e=this.getCurrentImageActualSizeScale();return t<1?t=1:t>e&&(t=e),t},t.prototype.init=function(){var t=this;if(this.settings.zoom){this.buildTemplates(),this.enableZoomOnSlideItemLoad();var e=null;this.core.outer.on("dblclick.lg",function(e){t.$LG(e.target).hasClass("lg-image")&&t.setActualSize(t.core.index,e)}),this.core.outer.on("touchstart.lg",function(i){var o=t.$LG(i.target);1===i.touches.length&&o.hasClass("lg-image")&&(e?(clearTimeout(e),e=null,i.preventDefault(),t.setActualSize(t.core.index,i)):e=setTimeout(function(){e=null},300))}),this.core.LGel.on(Ut.containerResize+".zoom "+Ut.rotateRight+".zoom "+Ut.rotateLeft+".zoom "+Ut.flipHorizontal+".zoom "+Ut.flipVertical+".zoom",function(){if(t.core.lgOpened&&t.isImageSlide(t.core.index)&&!t.core.touchAction){var e=t.core.getSlideItem(t.core.index).find(".lg-img-wrap").first();t.top=0,t.left=0,t.setZoomEssentials(),t.setZoomSwipeStyles(e,{x:0,y:0}),t.positionChanged=!0}}),this.$LG(window).on("scroll.lg.zoom.global"+this.core.lgId,function(){t.core.lgOpened&&(t.scrollTop=t.$LG(window).scrollTop())}),this.core.getElementById("lg-zoom-out").on("click.lg",function(){if(t.isImageSlide(t.core.index)){var e=0;t.imageReset&&(t.resetImageTranslate(t.core.index),e=50),setTimeout(function(){var e=t.scale-t.settings.scale;e<1&&(e=1),t.beginZoom(e),t.zoomImage(e,-t.settings.scale,!0,!t.settings.infiniteZoom)},e)}}),this.core.getElementById("lg-zoom-in").on("click.lg",function(){t.zoomIn()}),this.core.getElementById("lg-actual-size").on("click.lg",function(){t.setActualSize(t.core.index)}),this.core.LGel.on(Ut.beforeOpen+".zoom",function(){t.core.outer.find(".lg-item").removeClass("lg-zoomable")}),this.core.LGel.on(Ut.afterOpen+".zoom",function(){t.scrollTop=t.$LG(window).scrollTop(),t.pageX=t.core.outer.width()/2,t.pageY=t.core.outer.height()/2+t.scrollTop,t.scale=1}),this.core.LGel.on(Ut.afterSlide+".zoom",function(e){var i=e.detail.prevIndex;t.scale=1,t.positionChanged=!1,t.zoomInProgress=!1,t.resetZoom(i),t.resetImageTranslate(i),t.isImageSlide(t.core.index)&&t.setZoomEssentials()}),this.zoomDrag(),this.pinchZoom(),this.zoomSwipe(),this.zoomableTimeout=!1,this.positionChanged=!1,this.zoomInProgress=!1}},t.prototype.zoomIn=function(){if(this.isImageSlide(this.core.index)){var t=this.scale+this.settings.scale;this.settings.infiniteZoom||(t=this.getScale(t)),this.beginZoom(t),this.zoomImage(t,Math.min(this.settings.scale,t-this.scale),!0,!this.settings.infiniteZoom)}},t.prototype.resetZoom=function(t){this.core.outer.removeClass("lg-zoomed lg-zoom-drag-transition");var e=this.core.getElementById("lg-actual-size"),i=this.core.getSlideItem(void 0!==t?t:this.core.index);e.removeClass(this.settings.actualSizeIcons.zoomOut).addClass(this.settings.actualSizeIcons.zoomIn),i.find(".lg-img-wrap").first().removeAttr("style"),i.find(".lg-image").first().removeAttr("style"),this.scale=1,this.left=0,this.top=0,this.setPageCords()},t.prototype.getTouchDistance=function(t){return Math.sqrt((t.touches[0].pageX-t.touches[1].pageX)*(t.touches[0].pageX-t.touches[1].pageX)+(t.touches[0].pageY-t.touches[1].pageY)*(t.touches[0].pageY-t.touches[1].pageY))},t.prototype.pinchZoom=function(){var t=this,e=0,i=!1,o=1,s=0,n=this.core.getSlideItem(this.core.index);this.core.outer.on("touchstart.lg",function(i){if(n=t.core.getSlideItem(t.core.index),t.isImageSlide(t.core.index)&&2===i.touches.length){if(i.preventDefault(),t.core.outer.hasClass("lg-first-slide-loading"))return;o=t.scale||1,t.core.outer.removeClass("lg-zoom-drag-transition lg-zoom-dragging"),t.setPageCords(i),t.resetImageTranslate(t.core.index),t.core.touchAction="pinch",e=t.getTouchDistance(i)}}),this.core.$inner.on("touchmove.lg",function(r){if(2===r.touches.length&&"pinch"===t.core.touchAction&&(t.$LG(r.target).hasClass("lg-item")||n.get().contains(r.target))){r.preventDefault();var l=t.getTouchDistance(r),a=e-l;if(!i&&Math.abs(a)>5&&(i=!0),i){s=t.scale;var h=Math.max(1,o+.02*-a);t.scale=Math.round(100*(h+Number.EPSILON))/100;var g=t.scale-s;t.zoomImage(t.scale,Math.round(100*(g+Number.EPSILON))/100,!1,!1)}}}),this.core.$inner.on("touchend.lg",function(o){if("pinch"===t.core.touchAction&&(t.$LG(o.target).hasClass("lg-item")||n.get().contains(o.target))){if(i=!1,e=0,t.scale<=1)t.resetZoom();else{var s=t.getCurrentImageActualSizeScale();if(t.scale>=s){var r=s-t.scale;0===r&&(r=.01),t.zoomImage(s,r,!1,!0)}t.manageActualPixelClassNames(),t.core.outer.addClass("lg-zoomed")}t.core.touchAction=void 0}})},t.prototype.touchendZoom=function(t,e,i,o,s){var n=e.x-t.x,r=e.y-t.y,l=Math.abs(n)/s+1,a=Math.abs(r)/s+1;l>2&&(l+=1),a>2&&(a+=1),n*=l,r*=a;var h=this.core.getSlideItem(this.core.index).find(".lg-img-wrap").first(),g={};g.x=this.left+n,g.y=this.top+r;var c=this.getPossibleSwipeDragCords();(Math.abs(n)>15||Math.abs(r)>15)&&(o&&(this.isBeyondPossibleTop(g.y,c.minY)?g.y=c.minY:this.isBeyondPossibleBottom(g.y,c.maxY)&&(g.y=c.maxY)),i&&(this.isBeyondPossibleLeft(g.x,c.minX)?g.x=c.minX:this.isBeyondPossibleRight(g.x,c.maxX)&&(g.x=c.maxX)),o?this.top=g.y:g.y=this.top,i?this.left=g.x:g.x=this.left,this.setZoomSwipeStyles(h,g),this.positionChanged=!0)},t.prototype.getZoomSwipeCords=function(t,e,i,o,s){var n={};if(o){if(n.y=this.top+(e.y-t.y),this.isBeyondPossibleTop(n.y,s.minY)){var r=s.minY-n.y;n.y=s.minY-r/6}else if(this.isBeyondPossibleBottom(n.y,s.maxY)){var l=n.y-s.maxY;n.y=s.maxY+l/6}}else n.y=this.top;if(i){if(n.x=this.left+(e.x-t.x),this.isBeyondPossibleLeft(n.x,s.minX)){var a=s.minX-n.x;n.x=s.minX-a/6}else if(this.isBeyondPossibleRight(n.x,s.maxX)){var h=n.x-s.maxX;n.x=s.maxX+h/6}}else n.x=this.left;return n},t.prototype.isBeyondPossibleLeft=function(t,e){return t>=e},t.prototype.isBeyondPossibleRight=function(t,e){return t<=e},t.prototype.isBeyondPossibleTop=function(t,e){return t>=e},t.prototype.isBeyondPossibleBottom=function(t,e){return t<=e},t.prototype.isImageSlide=function(t){var e=this.core.galleryItems[t];return"image"===this.core.getSlideType(e)},t.prototype.getPossibleSwipeDragCords=function(t){var e=this.core.getSlideItem(this.core.index).find(".lg-image").first(),i=this.core.mediaContainerPosition.bottom,o=e.get().getBoundingClientRect(),s=o.height,n=o.width;return t&&(s+=t*s,n+=t*n),{minY:(s-this.containerRect.height)/2,maxY:(this.containerRect.height-s)/2+i,minX:(n-this.containerRect.width)/2,maxX:(this.containerRect.width-n)/2}},t.prototype.setZoomSwipeStyles=function(t,e){t.css("transform","translate3d("+e.x+"px, "+e.y+"px, 0)")},t.prototype.zoomSwipe=function(){var t,e,i=this,o={},s={},n=!1,r=!1,l=!1,a=new Date,h=this.core.getSlideItem(this.core.index);this.core.$inner.on("touchstart.lg",function(s){if(i.isImageSlide(i.core.index)&&(h=i.core.getSlideItem(i.core.index),(i.$LG(s.target).hasClass("lg-item")||h.get().contains(s.target))&&1===s.touches.length&&i.core.outer.hasClass("lg-zoomed"))){s.preventDefault(),a=new Date,i.core.touchAction="zoomSwipe",e=i.core.getSlideItem(i.core.index).find(".lg-img-wrap").first();var n=i.getDragAllowedAxises(0);l=n.allowY,((r=n.allowX)||l)&&(o=i.getSwipeCords(s)),t=i.getPossibleSwipeDragCords(),i.core.outer.addClass("lg-zoom-dragging lg-zoom-drag-transition")}}),this.core.$inner.on("touchmove.lg",function(a){if(1===a.touches.length&&"zoomSwipe"===i.core.touchAction&&(i.$LG(a.target).hasClass("lg-item")||h.get().contains(a.target))){a.preventDefault(),i.core.touchAction="zoomSwipe",s=i.getSwipeCords(a);var g=i.getZoomSwipeCords(o,s,r,l,t);(Math.abs(s.x-o.x)>15||Math.abs(s.y-o.y)>15)&&(n=!0,i.setZoomSwipeStyles(e,g))}}),this.core.$inner.on("touchend.lg",function(t){if("zoomSwipe"===i.core.touchAction&&(i.$LG(t.target).hasClass("lg-item")||h.get().contains(t.target))){if(t.preventDefault(),i.core.touchAction=void 0,i.core.outer.removeClass("lg-zoom-dragging"),!n)return;n=!1;var e=(new Date).valueOf()-a.valueOf();i.touchendZoom(o,s,r,l,e)}})},t.prototype.zoomDrag=function(){var t,e,i,o,s=this,n={},r={},l=!1,a=!1,h=!1,g=!1;this.core.outer.on("mousedown.lg.zoom",function(e){if(s.isImageSlide(s.core.index)){var r=s.core.getSlideItem(s.core.index);if(s.$LG(e.target).hasClass("lg-item")||r.get().contains(e.target)){t=new Date,o=s.core.getSlideItem(s.core.index).find(".lg-img-wrap").first();var a=s.getDragAllowedAxises(0);g=a.allowY,h=a.allowX,s.core.outer.hasClass("lg-zoomed")&&s.$LG(e.target).hasClass("lg-object")&&(h||g)&&(e.preventDefault(),n=s.getDragCords(e),i=s.getPossibleSwipeDragCords(),l=!0,s.core.outer.removeClass("lg-grab").addClass("lg-grabbing lg-zoom-drag-transition lg-zoom-dragging"))}}}),this.$LG(window).on("mousemove.lg.zoom.global"+this.core.lgId,function(t){if(l){a=!0,r=s.getDragCords(t);var e=s.getZoomSwipeCords(n,r,h,g,i);s.setZoomSwipeStyles(o,e)}}),this.$LG(window).on("mouseup.lg.zoom.global"+this.core.lgId,function(i){if(l){if(e=new Date,l=!1,s.core.outer.removeClass("lg-zoom-dragging"),a&&(n.x!==r.x||n.y!==r.y)){r=s.getDragCords(i);var o=e.valueOf()-t.valueOf();s.touchendZoom(n,r,h,g,o)}a=!1}s.core.outer.removeClass("lg-grabbing").addClass("lg-grab")})},t.prototype.closeGallery=function(){this.resetZoom(),this.zoomInProgress=!1},t.prototype.destroy=function(){this.$LG(window).off(".lg.zoom.global"+this.core.lgId),this.core.LGel.off(".lg.zoom"),this.core.LGel.off(".zoom"),clearTimeout(this.zoomableTimeout),this.zoomableTimeout=!1},t}(),Jt=function(){return Jt=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},Jt.apply(this,arguments)},Kt={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},Qt={rotate:!0,rotateSpeed:400,rotateLeft:!0,rotateRight:!0,flipHorizontal:!0,flipVertical:!0,rotatePluginStrings:{flipVertical:"Flip vertical",flipHorizontal:"Flip horizontal",rotateLeft:"Rotate left",rotateRight:"Rotate right"}},te=function(){function t(t,e){return this.core=t,this.$LG=e,this.settings=Jt(Jt({},Qt),this.core.settings),this}return t.prototype.buildTemplates=function(){var t="";this.settings.flipVertical&&(t+='<button type="button" id="lg-flip-ver" aria-label="'+this.settings.rotatePluginStrings.flipVertical+'" class="lg-flip-ver lg-icon"></button>'),this.settings.flipHorizontal&&(t+='<button type="button" id="lg-flip-hor" aria-label="'+this.settings.rotatePluginStrings.flipHorizontal+'" class="lg-flip-hor lg-icon"></button>'),this.settings.rotateLeft&&(t+='<button type="button" id="lg-rotate-left" aria-label="'+this.settings.rotatePluginStrings.rotateLeft+'" class="lg-rotate-left lg-icon"></button>'),this.settings.rotateRight&&(t+='<button type="button" id="lg-rotate-right" aria-label="'+this.settings.rotatePluginStrings.rotateRight+'" class="lg-rotate-right lg-icon"></button>'),this.core.$toolbar.append(t)},t.prototype.init=function(){var t=this;this.settings.rotate&&(this.buildTemplates(),this.rotateValuesList={},this.core.LGel.on(Kt.slideItemLoad+".rotate",function(e){var i=e.detail.index;t.core.getSlideItem(i).find(".lg-img-rotate").get()||(t.core.getSlideItem(i).find(".lg-object").first().wrap("lg-img-rotate"),t.core.getSlideItem(t.core.index).find(".lg-img-rotate").css("transition-duration",t.settings.rotateSpeed+"ms"))}),this.core.outer.find("#lg-rotate-left").first().on("click.lg",this.rotateLeft.bind(this)),this.core.outer.find("#lg-rotate-right").first().on("click.lg",this.rotateRight.bind(this)),this.core.outer.find("#lg-flip-hor").first().on("click.lg",this.flipHorizontal.bind(this)),this.core.outer.find("#lg-flip-ver").first().on("click.lg",this.flipVertical.bind(this)),this.core.LGel.on(Kt.beforeSlide+".rotate",function(e){t.rotateValuesList[e.detail.index]||(t.rotateValuesList[e.detail.index]={rotate:0,flipHorizontal:1,flipVertical:1})}))},t.prototype.applyStyles=function(){this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().css("transform","rotate("+this.rotateValuesList[this.core.index].rotate+"deg) scale3d("+this.rotateValuesList[this.core.index].flipHorizontal+", "+this.rotateValuesList[this.core.index].flipVertical+", 1)")},t.prototype.rotateLeft=function(){this.rotateValuesList[this.core.index].rotate-=90,this.applyStyles(),this.triggerEvents(Kt.rotateLeft,{rotate:this.rotateValuesList[this.core.index].rotate})},t.prototype.rotateRight=function(){this.rotateValuesList[this.core.index].rotate+=90,this.applyStyles(),this.triggerEvents(Kt.rotateRight,{rotate:this.rotateValuesList[this.core.index].rotate})},t.prototype.getCurrentRotation=function(t){if(!t)return 0;var e=this.$LG(t).style(),i=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform")||"none";if("none"!==i){var o=i.split("(")[1].split(")")[0].split(",");if(o){var s=Math.round(Math.atan2(o[1],o[0])*(180/Math.PI));return s<0?s+360:s}}return 0},t.prototype.flipHorizontal=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get(),e=this.getCurrentRotation(t),i="flipHorizontal";90!==e&&270!==e||(i="flipVertical"),this.rotateValuesList[this.core.index][i]*=-1,this.applyStyles(),this.triggerEvents(Kt.flipHorizontal,{flipHorizontal:this.rotateValuesList[this.core.index][i]})},t.prototype.flipVertical=function(){var t=this.core.getSlideItem(this.core.index).find(".lg-img-rotate").first().get(),e=this.getCurrentRotation(t),i="flipVertical";90!==e&&270!==e||(i="flipHorizontal"),this.rotateValuesList[this.core.index][i]*=-1,this.applyStyles(),this.triggerEvents(Kt.flipVertical,{flipVertical:this.rotateValuesList[this.core.index][i]})},t.prototype.triggerEvents=function(t,e){var i=this;setTimeout(function(){i.core.LGel.trigger(t,e)},this.settings.rotateSpeed+10)},t.prototype.isImageOrientationChanged=function(){var t=this.rotateValuesList[this.core.index],e=Math.abs(t.rotate)%360!=0,i=t.flipHorizontal<0,o=t.flipVertical<0;return e||i||o},t.prototype.closeGallery=function(){this.isImageOrientationChanged()&&this.core.getSlideItem(this.core.index).css("opacity",0),this.rotateValuesList={}},t.prototype.destroy=function(){this.core.LGel.off(".lg.rotate"),this.core.LGel.off(".rotate")},t}(),ee=function(){return ee=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},ee.apply(this,arguments)},ie={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",autoplayStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},oe={autoplay:!0,slideShowAutoplay:!1,slideShowInterval:5e3,progressBar:!0,forceSlideShowAutoplay:!1,autoplayControls:!0,appendAutoplayControlsTo:".lg-toolbar",autoplayPluginStrings:{toggleAutoplay:"Toggle Autoplay"}},se=function(){function t(t){return this.core=t,this.settings=ee(ee({},oe),this.core.settings),this}return t.prototype.init=function(){var t=this;this.settings.autoplay&&(this.interval=!1,this.fromAuto=!0,this.pausedOnTouchDrag=!1,this.pausedOnSlideChange=!1,this.settings.autoplayControls&&this.controls(),this.settings.progressBar&&this.core.outer.append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>'),this.settings.slideShowAutoplay&&this.core.LGel.once(ie.slideItemLoad+".autoplay",function(){t.startAutoPlay()}),this.core.LGel.on(ie.dragStart+".autoplay touchstart.lg.autoplay",function(){t.interval&&(t.stopAutoPlay(),t.pausedOnTouchDrag=!0)}),this.core.LGel.on(ie.dragEnd+".autoplay touchend.lg.autoplay",function(){!t.interval&&t.pausedOnTouchDrag&&(t.startAutoPlay(),t.pausedOnTouchDrag=!1)}),this.core.LGel.on(ie.beforeSlide+".autoplay",function(){t.showProgressBar(),!t.fromAuto&&t.interval?(t.stopAutoPlay(),t.pausedOnSlideChange=!0):t.pausedOnSlideChange=!1,t.fromAuto=!1}),this.core.LGel.on(ie.afterSlide+".autoplay",function(){t.pausedOnSlideChange&&!t.interval&&t.settings.forceSlideShowAutoplay&&(t.startAutoPlay(),t.pausedOnSlideChange=!1)}),this.showProgressBar())},t.prototype.showProgressBar=function(){var t=this;if(this.settings.progressBar&&this.fromAuto){var e=this.core.outer.find(".lg-progress-bar"),i=this.core.outer.find(".lg-progress");this.interval&&(i.removeAttr("style"),e.removeClass("lg-start"),setTimeout(function(){i.css("transition","width "+(t.core.settings.speed+t.settings.slideShowInterval)+"ms ease 0s"),e.addClass("lg-start")},20))}},t.prototype.controls=function(){var t=this,e='<button aria-label="'+this.settings.autoplayPluginStrings.toggleAutoplay+'" type="button" class="lg-autoplay-button lg-icon"></button>';this.core.outer.find(this.settings.appendAutoplayControlsTo).append(e),this.core.outer.find(".lg-autoplay-button").first().on("click.lg.autoplay",function(){t.core.outer.hasClass("lg-show-autoplay")?t.stopAutoPlay():t.interval||t.startAutoPlay()})},t.prototype.startAutoPlay=function(){var t=this;this.core.outer.find(".lg-progress").css("transition","width "+(this.core.settings.speed+this.settings.slideShowInterval)+"ms ease 0s"),this.core.outer.addClass("lg-show-autoplay"),this.core.outer.find(".lg-progress-bar").addClass("lg-start"),this.core.LGel.trigger(ie.autoplayStart,{index:this.core.index}),this.interval=setInterval(function(){t.core.index+1<t.core.galleryItems.length?t.core.index++:t.core.index=0,t.core.LGel.trigger(ie.autoplay,{index:t.core.index}),t.fromAuto=!0,t.core.slide(t.core.index,!1,!1,"next")},this.core.settings.speed+this.settings.slideShowInterval)},t.prototype.stopAutoPlay=function(){this.interval&&(this.core.LGel.trigger(ie.autoplayStop,{index:this.core.index}),this.core.outer.find(".lg-progress").removeAttr("style"),this.core.outer.removeClass("lg-show-autoplay"),this.core.outer.find(".lg-progress-bar").removeClass("lg-start")),clearInterval(this.interval),this.interval=!1},t.prototype.closeGallery=function(){this.stopAutoPlay()},t.prototype.destroy=function(){this.settings.autoplay&&this.core.outer.find(".lg-progress-bar").remove(),this.core.LGel.off(".lg.autoplay"),this.core.LGel.off(".autoplay")},t}(),ne=function(){return ne=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},ne.apply(this,arguments)},re={fullScreen:!0,fullscreenPluginStrings:{toggleFullscreen:"Toggle Fullscreen"}},le=function(){function t(t,e){return this.core=t,this.$LG=e,this.settings=ne(ne({},re),this.core.settings),this}return t.prototype.init=function(){var t="";if(this.settings.fullScreen){if(!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled))return;t='<button type="button" aria-label="'+this.settings.fullscreenPluginStrings.toggleFullscreen+'" class="lg-fullscreen lg-icon"></button>',this.core.$toolbar.append(t),this.fullScreen()}},t.prototype.isFullScreen=function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},t.prototype.requestFullscreen=function(){var t=document.documentElement;t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()},t.prototype.exitFullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},t.prototype.fullScreen=function(){var t=this;this.$LG(document).on("fullscreenchange.lg.global"+this.core.lgId+" \n webkitfullscreenchange.lg.global"+this.core.lgId+" \n mozfullscreenchange.lg.global"+this.core.lgId+" \n MSFullscreenChange.lg.global"+this.core.lgId,function(){t.core.lgOpened&&t.core.outer.toggleClass("lg-fullscreen-on")}),this.core.outer.find(".lg-fullscreen").first().on("click.lg",function(){t.isFullScreen()?t.exitFullscreen():t.requestFullscreen()})},t.prototype.closeGallery=function(){this.isFullScreen()&&this.exitFullscreen()},t.prototype.destroy=function(){this.$LG(document).off("fullscreenchange.lg.global"+this.core.lgId+" \n webkitfullscreenchange.lg.global"+this.core.lgId+" \n mozfullscreenchange.lg.global"+this.core.lgId+" \n MSFullscreenChange.lg.global"+this.core.lgId)},t}(),ae=o((t,e)=>{var i,o;i=t,o=function(){var t="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},e=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}(),o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},s=function(){function t(i){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;e(this,t),this.ctx=i,this.iframes=o,this.exclude=s,this.iframesTimeout=n}return i(t,[{key:"getContexts",value:function(){var t=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(function(e){var i=t.filter(function(t){return t.contains(e)}).length>0;-1!==t.indexOf(e)||i||t.push(e)}),t}},{key:"getIframeContents",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=void 0;try{var s=t.contentWindow;if(o=s.document,!s||!o)throw new Error("iframe inaccessible")}catch(n){i()}o&&e(o)}},{key:"isIframeBlank",value:function(t){var e="about:blank",i=t.getAttribute("src").trim();return t.contentWindow.location.href===e&&i!==e&&i}},{key:"observeIframeLoad",value:function(t,e,i){var o=this,s=!1,n=null,r=function r(){if(!s){s=!0,clearTimeout(n);try{o.isIframeBlank(t)||(t.removeEventListener("load",r),o.getIframeContents(t,e,i))}catch(l){i()}}};t.addEventListener("load",r),n=setTimeout(r,this.iframesTimeout)}},{key:"onIframeReady",value:function(t,e,i){try{"complete"===t.contentWindow.document.readyState?this.isIframeBlank(t)?this.observeIframeLoad(t,e,i):this.getIframeContents(t,e,i):this.observeIframeLoad(t,e,i)}catch(o){i()}}},{key:"waitForIframes",value:function(t,e){var i=this,o=0;this.forEachIframe(t,function(){return!0},function(t){o++,i.waitForIframes(t.querySelector("html"),function(){--o||e()})},function(t){t||e()})}},{key:"forEachIframe",value:function(e,i,o){var s=this,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},r=e.querySelectorAll("iframe"),l=r.length,a=0;r=Array.prototype.slice.call(r);var h=function(){--l<=0&&n(a)};l||h(),r.forEach(function(e){t.matches(e,s.exclude)?h():s.onIframeReady(e,function(t){i(e)&&(a++,o(t)),h()},h)})}},{key:"createIterator",value:function(t,e,i){return document.createNodeIterator(t,e,i,!1)}},{key:"createInstanceOnIframe",value:function(e){return new t(e.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(t,e,i){if(t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_PRECEDING){if(null===e)return!0;if(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(t){var e=t.previousNode();return{prevNode:e,node:(null===e||t.nextNode())&&t.nextNode()}}},{key:"checkIframeFilter",value:function(t,e,i,o){var s=!1,n=!1;return o.forEach(function(t,e){t.val===i&&(s=e,n=t.handled)}),this.compareNodeIframe(t,e,i)?(!1!==s||n?!1===s||n||(o[s].handled=!0):o.push({val:i,handled:!0}),!0):(!1===s&&o.push({val:i,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(t,e,i,o){var s=this;t.forEach(function(t){t.handled||s.getIframeContents(t.val,function(t){s.createInstanceOnIframe(t).forEachNode(e,i,o)})})}},{key:"iterateThroughNodes",value:function(t,e,i,o,s){for(var n=this,r=this.createIterator(e,t,o),l=[],a=[],h=void 0,g=void 0,c=function(){var t=n.getIteratorNode(r);return g=t.prevNode,h=t.node};c();)this.iframes&&this.forEachIframe(e,function(t){return n.checkIframeFilter(h,g,t,l)},function(e){n.createInstanceOnIframe(e).forEachNode(t,function(t){return a.push(t)},o)}),a.push(h);a.forEach(function(t){i(t)}),this.iframes&&this.handleOpenIframes(l,t,i,o),s()}},{key:"forEachNode",value:function(t,e,i){var o=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},n=this.getContexts(),r=n.length;r||s(),n.forEach(function(n){var l=function(){o.iterateThroughNodes(t,n,e,i,function(){--r<=0&&s()})};o.iframes?o.waitForIframes(n,l):l()})}}],[{key:"matches",value:function(t,e){var i="string"==typeof e?[e]:e,o=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;if(o){var s=!1;return i.every(function(e){return!o.call(t,e)||(s=!0,!1)}),s}return!1}}]),t}(),n=function(){function n(t){e(this,n),this.ctx=t,this.ie=!1;var i=window.navigator.userAgent;(i.indexOf("MSIE")>-1||i.indexOf("Trident")>-1)&&(this.ie=!0)}return i(n,[{key:"log",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",o=this.opt.log;this.opt.debug&&"object"===(void 0===o?"undefined":t(o))&&"function"==typeof o[i]&&o[i]("mark.js: "+e)}},{key:"escapeStr",value:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(t){return"disabled"!==this.opt.wildcards&&(t=this.setupWildcardsRegExp(t)),t=this.escapeStr(t),Object.keys(this.opt.synonyms).length&&(t=this.createSynonymsRegExp(t)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.setupIgnoreJoinersRegExp(t)),this.opt.diacritics&&(t=this.createDiacriticsRegExp(t)),t=this.createMergedBlanksRegExp(t),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.createJoinersRegExp(t)),"disabled"!==this.opt.wildcards&&(t=this.createWildcardsRegExp(t)),t=this.createAccuracyRegExp(t)}},{key:"createSynonymsRegExp",value:function(t){var e=this.opt.synonyms,i=this.opt.caseSensitive?"":"i",o=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var s in e)if(e.hasOwnProperty(s)){var n=e[s],r="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(s):this.escapeStr(s),l="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(n):this.escapeStr(n);""!==r&&""!==l&&(t=t.replace(new RegExp("("+this.escapeStr(r)+"|"+this.escapeStr(l)+")","gm"+i),o+"("+this.processSynomyms(r)+"|"+this.processSynomyms(l)+")"+o))}return t}},{key:"processSynomyms",value:function(t){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(t=this.setupIgnoreJoinersRegExp(t)),t}},{key:"setupWildcardsRegExp",value:function(t){return(t=t.replace(/(?:\\)*\?/g,function(t){return"\\"===t.charAt(0)?"?":""})).replace(/(?:\\)*\*/g,function(t){return"\\"===t.charAt(0)?"*":""})}},{key:"createWildcardsRegExp",value:function(t){var e="withSpaces"===this.opt.wildcards;return t.replace(/\u0001/g,e?"[\\S\\s]?":"\\S?").replace(/\u0002/g,e?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(t){return t.replace(/[^(|)\\]/g,function(t,e,i){var o=i.charAt(e+1);return/[(|)\\]/.test(o)||""===o?t:t+"\0"})}},{key:"createJoinersRegExp",value:function(t){var e=[],i=this.opt.ignorePunctuation;return Array.isArray(i)&&i.length&&e.push(this.escapeStr(i.join(""))),this.opt.ignoreJoiners&&e.push("\\u00ad\\u200b\\u200c\\u200d"),e.length?t.split(/\u0000+/).join("["+e.join("")+"]*"):t}},{key:"createDiacriticsRegExp",value:function(t){var e=this.opt.caseSensitive?"":"i",i=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"],o=[];return t.split("").forEach(function(s){i.every(function(i){if(-1!==i.indexOf(s)){if(o.indexOf(i)>-1)return!1;t=t.replace(new RegExp("["+i+"]","gm"+e),"["+i+"]"),o.push(i)}return!0})}),t}},{key:"createMergedBlanksRegExp",value:function(t){return t.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(t){var e=this,i=this.opt.accuracy,o="string"==typeof i?i:i.value,s="string"==typeof i?[]:i.limiters,n="";switch(s.forEach(function(t){n+="|"+e.escapeStr(t)}),o){case"partially":default:return"()("+t+")";case"complementary":return"()([^"+(n="\\s"+(n||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")))+"]*"+t+"[^"+n+"]*)";case"exactly":return"(^|\\s"+n+")("+t+")(?=$|\\s"+n+")"}}},{key:"getSeparatedKeywords",value:function(t){var e=this,i=[];return t.forEach(function(t){e.opt.separateWordSearch?t.split(" ").forEach(function(t){t.trim()&&-1===i.indexOf(t)&&i.push(t)}):t.trim()&&-1===i.indexOf(t)&&i.push(t)}),{keywords:i.sort(function(t,e){return e.length-t.length}),length:i.length}}},{key:"isNumeric",value:function(t){return Number(parseFloat(t))==t}},{key:"checkRanges",value:function(t){var e=this;if(!Array.isArray(t)||"[object Object]"!==Object.prototype.toString.call(t[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(t),[];var i=[],o=0;return t.sort(function(t,e){return t.start-e.start}).forEach(function(t){var s=e.callNoMatchOnInvalidRanges(t,o),n=s.start,r=s.end;s.valid&&(t.start=n,t.length=r-n,i.push(t),o=r)}),i}},{key:"callNoMatchOnInvalidRanges",value:function(t,e){var i=void 0,o=void 0,s=!1;return t&&void 0!==t.start?(o=(i=parseInt(t.start,10))+parseInt(t.length,10),this.isNumeric(t.start)&&this.isNumeric(t.length)&&o-e>0&&o-i>0?s=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(t)),this.opt.noMatch(t))):(this.log("Ignoring invalid range: "+JSON.stringify(t)),this.opt.noMatch(t)),{start:i,end:o,valid:s}}},{key:"checkWhitespaceRanges",value:function(t,e,i){var o=void 0,s=!0,n=i.length,r=e-n,l=parseInt(t.start,10)-r;return(o=(l=l>n?n:l)+parseInt(t.length,10))>n&&(o=n,this.log("End range automatically set to the max value of "+n)),l<0||o-l<0||l>n||o>n?(s=!1,this.log("Invalid range: "+JSON.stringify(t)),this.opt.noMatch(t)):""===i.substring(l,o).replace(/\s+/g,"")&&(s=!1,this.log("Skipping whitespace only range: "+JSON.stringify(t)),this.opt.noMatch(t)),{start:l,end:o,valid:s}}},{key:"getTextNodes",value:function(t){var e=this,i="",o=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,function(t){o.push({start:i.length,end:(i+=t.textContent).length,node:t})},function(t){return e.matchesExclude(t.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},function(){t({value:i,nodes:o})})}},{key:"matchesExclude",value:function(t){return s.matches(t,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(t,e,i){var o=this.opt.element?this.opt.element:"mark",s=t.splitText(e),n=s.splitText(i-e),r=document.createElement(o);return r.setAttribute("data-markjs","true"),this.opt.className&&r.setAttribute("class",this.opt.className),r.textContent=s.textContent,s.parentNode.replaceChild(r,s),n}},{key:"wrapRangeInMappedTextNode",value:function(t,e,i,o,s){var n=this;t.nodes.every(function(r,l){var a=t.nodes[l+1];if(void 0===a||a.start>e){if(!o(r.node))return!1;var h=e-r.start,g=(i>r.end?r.end:i)-r.start,c=t.value.substr(0,r.start),d=t.value.substr(g+r.start);if(r.node=n.wrapRangeInTextNode(r.node,h,g),t.value=c+d,t.nodes.forEach(function(e,i){i>=l&&(t.nodes[i].start>0&&i!==l&&(t.nodes[i].start-=g),t.nodes[i].end-=g)}),i-=g,s(r.node.previousSibling,r.start),!(i>r.end))return!1;e=r.end}return!0})}},{key:"wrapMatches",value:function(t,e,i,o,s){var n=this,r=0===e?0:e+1;this.getTextNodes(function(e){e.nodes.forEach(function(e){e=e.node;for(var s=void 0;null!==(s=t.exec(e.textContent))&&""!==s[r];)if(i(s[r],e)){var l=s.index;if(0!==r)for(var a=1;a<r;a++)l+=s[a].length;e=n.wrapRangeInTextNode(e,l,l+s[r].length),o(e.previousSibling),t.lastIndex=0}}),s()})}},{key:"wrapMatchesAcrossElements",value:function(t,e,i,o,s){var n=this,r=0===e?0:e+1;this.getTextNodes(function(e){for(var l=void 0;null!==(l=t.exec(e.value))&&""!==l[r];){var a=l.index;if(0!==r)for(var h=1;h<r;h++)a+=l[h].length;var g=a+l[r].length;n.wrapRangeInMappedTextNode(e,a,g,function(t){return i(l[r],t)},function(e,i){t.lastIndex=i,o(e)})}s()})}},{key:"wrapRangeFromIndex",value:function(t,e,i,o){var s=this;this.getTextNodes(function(n){var r=n.value.length;t.forEach(function(t,o){var l=s.checkWhitespaceRanges(t,r,n.value),a=l.start,h=l.end;l.valid&&s.wrapRangeInMappedTextNode(n,a,h,function(i){return e(i,t,n.value.substring(a,h),o)},function(e){i(e,t)})}),o()})}},{key:"unwrapMatches",value:function(t){for(var e=t.parentNode,i=document.createDocumentFragment();t.firstChild;)i.appendChild(t.removeChild(t.firstChild));e.replaceChild(i,t),this.ie?this.normalizeTextNode(e):e.normalize()}},{key:"normalizeTextNode",value:function(t){if(t){if(3===t.nodeType)for(;t.nextSibling&&3===t.nextSibling.nodeType;)t.nodeValue+=t.nextSibling.nodeValue,t.parentNode.removeChild(t.nextSibling);else this.normalizeTextNode(t.firstChild);this.normalizeTextNode(t.nextSibling)}}},{key:"markRegExp",value:function(t,e){var i=this;this.opt=e,this.log('Searching with expression "'+t+'"');var o=0,s="wrapMatches";this.opt.acrossElements&&(s="wrapMatchesAcrossElements"),this[s](t,this.opt.ignoreGroups,function(t,e){return i.opt.filter(e,t,o)},function(t){o++,i.opt.each(t)},function(){0===o&&i.opt.noMatch(t),i.opt.done(o)})}},{key:"mark",value:function(t,e){var i=this;this.opt=e;var o=0,s="wrapMatches",n=this.getSeparatedKeywords("string"==typeof t?[t]:t),r=n.keywords,l=n.length,a=this.opt.caseSensitive?"":"i";this.opt.acrossElements&&(s="wrapMatchesAcrossElements"),0===l?this.opt.done(o):function t(e){var n=new RegExp(i.createRegExp(e),"gm"+a),h=0;i.log('Searching with expression "'+n+'"'),i[s](n,1,function(t,s){return i.opt.filter(s,e,o,h)},function(t){h++,o++,i.opt.each(t)},function(){0===h&&i.opt.noMatch(e),r[l-1]===e?i.opt.done(o):t(r[r.indexOf(e)+1])})}(r[0])}},{key:"markRanges",value:function(t,e){var i=this;this.opt=e;var o=0,s=this.checkRanges(t);s&&s.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(s)),this.wrapRangeFromIndex(s,function(t,e,o,s){return i.opt.filter(t,e,o,s)},function(t,e){o++,i.opt.each(t,e)},function(){i.opt.done(o)})):this.opt.done(o)}},{key:"unmark",value:function(t){var e=this;this.opt=t;var i=this.opt.element?this.opt.element:"*";i+="[data-markjs]",this.opt.className&&(i+="."+this.opt.className),this.log('Removal selector "'+i+'"'),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,function(t){e.unwrapMatches(t)},function(t){var o=s.matches(t,i),n=e.matchesExclude(t);return!o||n?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}},{key:"opt",set:function(t){this._opt=o({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:function(){},noMatch:function(){},filter:function(){return!0},done:function(){},debug:!1,log:window.console},t)},get:function(){return this._opt}},{key:"iterator",get:function(){return new s(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}}]),n}();return function(t){var e=this,i=new n(t);return this.mark=function(t,o){return i.mark(t,o),e},this.markRegExp=function(t,o){return i.markRegExp(t,o),e},this.markRanges=function(t,o){return i.markRanges(t,o),e},this.unmark=function(t){return i.unmark(t),e},this}},"object"==typeof t&&void 0!==e?e.exports=o():"function"==typeof define&&define.amd?define(o):i.Mark=o()}),he=i(ae(),1),ge=t=>{const{setPathAs:e}=z();return k(Q,{w:"$full",get borderBottom(){return`1px solid ${c()}`},get _hover(){return{bgColor:c()}},rounded:"$md",cursor:"pointer",px:"$2",as:St,get href(){return`${t.node.path}?from=search`},onMouseEnter:()=>{e(t.node.path,t.node.is_dir)},get children(){return[k(T,{class:"icon",boxSize:"$6",get color(){return U()},get as(){return It(t.node)},mr:"$1"}),k(x,{flex:1,p:"$1",spacing:"$1",w:"$full",alignItems:"start",get children(){return[k(f,{css:{wordBreak:"break-all"},get children(){return[k(ye,{get keywords(){return t.keywords},get name(){return t.node.name}}),k(m,{get when(){return t.node.size>0||!t.node.is_dir},get children(){return k(dt,{colorScheme:"info",ml:"$2",get children(){return E(t.node.size)}})}})]}}),k(f,{color:"$neutral10",size:"xs",css:{wordBreak:"break-all"},get children(){return t.node.parent}})]}})]}})},ce=()=>{const{isOpen:t,onOpen:e,onClose:i,onToggle:o}=r(),l=s(),a=t=>{"search"===t&&e()};j.on("tool",a);const h=t=>{(t.ctrlKey||pt&&t.metaKey)&&"k"===t.key.toLowerCase()&&(t.preventDefault(),o())};document.addEventListener("keydown",h),ht(()=>{j.off("tool",a),document.removeEventListener("keydown",h)});const[c,d]=A(""),{pathname:p}=_(),[m,y]=P(mt),[v,b]=A({content:[],total:0}),[S,I]=A(0),T=["all","folder","file"];let z;const E=async(t=1)=>{1===t&&z?.(),m()||(b({content:[],total:0}),C(await y(p(),c(),M(),S(),t,100),t=>{const e=t.content;e&&(e.forEach(t=>{if(L().base_path&&t.parent.startsWith(L().base_path)){const e=new RegExp("^"+L().base_path);t.parent=t.parent.replace(e,"")||"/",t.parent.startsWith("/")||(t.parent="/"+t.parent)}t.path=Z(G(t.parent,t.name))}),b(t))}))};return k(nt,{get opened(){return t()},onClose:i,closeOnEsc:!1,size:{"@initial":"sm","@sm":"lg","@md":"2xl"},initialFocus:"#search-input",scrollBehavior:"inside",get children(){return[k(J,{bg:"$blackAlpha5"}),k(gt,{mx:"$2",get children(){return[k(X,{}),k(N,{get children(){return l("home.search.search")}}),k(R,{get children(){return k(x,{w:"$full",spacing:"$2",get children(){return[k(Q,{w:"$full",spacing:"$2",get children(){return[k(xt,{w:"$32",get value(){return S()},onChange:t=>I(t),get options(){return T.map((t,e)=>({value:e,label:l(`home.search.scopes.${t}`)}))}}),k(n,{id:"search-input",get value(){return c()},onInput:t=>{d(t.currentTarget.value)},onKeyDown:t=>{"Enter"===t.key&&0!==c().length&&E()}}),k(O,{flexShrink:0,"aria-label":"search",get icon(){return k(vt,{})},onClick:()=>E(),get loading(){return m()},get disabled(){return 0===c().length}})]}}),k(u,{get children(){return[k(g,{get when(){return m()},get children(){return k(bt,{})}}),k(g,{get when(){return 0===v().content.length},get children(){return k(f,{size:"2xl",my:"$8",get children(){return l("home.search.no_result")}})}})]}}),k(x,{w:"$full",get children(){return k(w,{get each(){return v().content},children:t=>k(ge,{node:t,get keywords(){return c()}})})}}),k(wt,{get total(){return v().total},defaultPageSize:100,onChange:t=>{E(t)},setResetCallback:t=>z=t})]}})}})]}})]}})},de=st(()=>it(()=>e.import("./List-legacy-CfJa4V_M.js"),void 0)),ue=st(()=>it(()=>e.import("./Grid-legacy-CZ5i1Iq2.js"),void 0)),pe=st(()=>it(()=>e.import("./Images-legacy-4WKrTzml.js"),void 0)),t("default",()=>{const{rawLink:t}=K(),e=lt(()=>a.objs.filter(t=>t.type===ft.IMAGE));let i;const o=()=>{var o,s;o=document.createElement("div"),s={addClass:"lightgallery-container",dynamic:!0,thumbnail:"visible"===V.show_gallery_thumbnails,plugins:[qt,jt,te,se,le],dynamicEl:e().map(e=>{const i=t(e,!0);return{src:i,thumb:""===e.thumb?i:e.thumb,subHtml:`<h4>${e.name}</h4>`}})},i=new Ht(o,s)};return F(H([e,()=>V.show_gallery_thumbnails],()=>{i?.destroy(),i=void 0})),j.on("gallery",t=>{i||o(),i?.openGallery(e().findIndex(e=>e.name===t))}),ht(()=>{j.off("gallery"),i?.destroy()}),s(),[k(u,{get children(){return[k(g,{get when(){return"list"===h()},get children(){return k(de,{})}}),k(g,{get when(){return"grid"===h()},get children(){return k(ue,{})}}),k(g,{get when(){return"image"===h()},get children(){return k(pe,{get images(){return e()}})}})]}}),k(Dt,{}),k(ce,{}),k(Lt,{})]})}}});