| 1 |
- import{d as X,e as k,y as V,C as M,L as U,z as w9,R as U9,f as o,a0 as Z9,a9 as Z,aa as G9,n as q9,F as Q,a1 as d9,u as W9,c as G,a as c,p as u9,ab as p9,i as J9,J as m9,j as K9,o as q}from"./index-TyuCIC8S.js";import{I as Q9}from"./icon-bell-BTLlsmhh.js";function S(e,s){s===void 0&&(s={});var d=s.insertAt;if(e&&typeof document<"u"){var n=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css",d==="top"&&n.firstChild?n.insertBefore(v,n.firstChild):n.appendChild(v),v.styleSheet?v.styleSheet.cssText=e:v.appendChild(document.createTextNode(e))}}S(".vel-fade-enter-active,.vel-fade-leave-active{-webkit-transition:all .3s ease;transition:all .3s ease}.vel-fade-enter-from,.vel-fade-leave-to{opacity:0}.vel-img-swiper{display:block;position:relative}.vel-modal{background:rgba(0,0,0,.5);bottom:0;left:0;margin:0;position:fixed;right:0;top:0;z-index:9998}.vel-img-wrapper{left:50%;margin:0;position:absolute;top:50%;-webkit-transform:translate(-50% -50%);transform:translate(-50% -50%);-webkit-transition:.3s linear;transition:.3s linear;will-change:transform opacity}.vel-img,.vel-img-wrapper{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vel-img{background-color:rgba(0,0,0,.7);-webkit-box-shadow:0 5px 20px 2px rgba(0,0,0,.7);box-shadow:0 5px 20px 2px rgba(0,0,0,.7);display:block;max-height:80vh;max-width:80vw;position:relative;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}@media (max-width:750px){.vel-img{max-height:95vh;max-width:85vw}}.vel-btns-wrapper{position:static}.vel-btns-wrapper .btn__close,.vel-btns-wrapper .btn__next,.vel-btns-wrapper .btn__prev{-webkit-tap-highlight-color:transparent;color:#fff;cursor:pointer;font-size:32px;opacity:.6;outline:none;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:.15s linear;transition:.15s linear;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vel-btns-wrapper .btn__close:hover,.vel-btns-wrapper .btn__next:hover,.vel-btns-wrapper .btn__prev:hover{opacity:1}.vel-btns-wrapper .btn__close.disable,.vel-btns-wrapper .btn__close.disable:hover,.vel-btns-wrapper .btn__next.disable,.vel-btns-wrapper .btn__next.disable:hover,.vel-btns-wrapper .btn__prev.disable,.vel-btns-wrapper .btn__prev.disable:hover{cursor:default;opacity:.2}.vel-btns-wrapper .btn__next{right:12px}.vel-btns-wrapper .btn__prev{left:12px}.vel-btns-wrapper .btn__close{right:10px;top:24px}@media (max-width:750px){.vel-btns-wrapper .btn__next,.vel-btns-wrapper .btn__prev{font-size:20px}.vel-btns-wrapper .btn__close{font-size:24px}.vel-btns-wrapper .btn__next{right:4px}.vel-btns-wrapper .btn__prev{left:4px}}.vel-modal.is-rtl .vel-btns-wrapper .btn__next{left:12px;right:auto}.vel-modal.is-rtl .vel-btns-wrapper .btn__prev{left:auto;right:12px}@media (max-width:750px){.vel-modal.is-rtl .vel-btns-wrapper .btn__next{left:4px;right:auto}.vel-modal.is-rtl .vel-btns-wrapper .btn__prev{left:auto;right:4px}}.vel-modal.is-rtl .vel-img-title{direction:rtl}");S('.vel-loading{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.vel-loading .ring{display:inline-block;height:64px;width:64px}.vel-loading .ring:after{-webkit-animation:ring 1.2s linear infinite;animation:ring 1.2s linear infinite;border-color:hsla(0,0%,100%,.7) transparent;border-radius:50%;border-style:solid;border-width:5px;content:" ";display:block;height:46px;margin:1px;width:46px}@-webkit-keyframes ring{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes ring{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}');S(".vel-on-error{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.vel-on-error .icon{color:#aaa;font-size:80px}");S(".vel-img-title{bottom:60px;color:#ccc;cursor:default;font-size:12px;left:50%;line-height:1;max-width:80%;opacity:.8;overflow:hidden;position:absolute;text-align:center;text-overflow:ellipsis;-webkit-transform:translate(-50%);transform:translate(-50%);-webkit-transition:opacity .15s;transition:opacity .15s;white-space:nowrap}.vel-img-title:hover{opacity:1}");S(".vel-icon{fill:currentColor;height:1em;overflow:hidden;vertical-align:-.15em;width:1em}");S(".vel-toolbar{border-radius:4px;bottom:8px;display:-webkit-box;display:-ms-flexbox;display:flex;left:50%;opacity:.9;overflow:hidden;padding:0;position:absolute;-webkit-transform:translate(-50%);transform:translate(-50%)}.vel-toolbar,.vel-toolbar .toolbar-btn{background-color:#2d2d2d;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vel-toolbar .toolbar-btn{-ms-flex-negative:0;-webkit-tap-highlight-color:transparent;color:#fff;cursor:pointer;flex-shrink:0;font-size:20px;outline:none;padding:6px 10px}.vel-toolbar .toolbar-btn:active,.vel-toolbar .toolbar-btn:hover{background-color:#3d3d3d}");const f="vel",w=X({name:"SvgIcon",props:{type:{type:String,default:""}},setup:e=>()=>o("svg",{class:`${f}-icon icon`,"aria-hidden":"true"},[o("use",{"xlink:href":`#icon-${e.type}`},null)])}),H=typeof window<"u",C=()=>{};let y9=!1;if(H)try{const e={};Object.defineProperty(e,"passive",{get(){y9=!0}}),window.addEventListener("test-passive",C,e)}catch{}const b9=function(e,s,d){let n=arguments.length>3&&arguments[3]!==void 0&&arguments[3];H&&e.addEventListener(s,d,!!y9&&{capture:!1,passive:n})},g9=(e,s,d)=>{H&&e.removeEventListener(s,d)},ee=e=>{e.preventDefault()},te=Object.prototype.toString,e9=e=>s=>te.call(s).slice(8,-1)===e,oe=e=>!!e&&e9("Object")(e),v9=e=>!!e&&e9("String")(e);function le(e){return e!=null}const ae=X({name:"Toolbar",props:{zoomIn:{type:Function,default:C},zoomOut:{type:Function,default:C},rotateLeft:{type:Function,default:C},rotateRight:{type:Function,default:C},resize:{type:Function,default:C},rotateDisabled:{type:Boolean,default:!1},zoomDisabled:{type:Boolean,default:!1}},setup:e=>()=>o("div",{class:`${f}-toolbar`},[!e.zoomDisabled&&o(Q,null,[o("div",{role:"button","aria-label":"zoom in button",class:"toolbar-btn toolbar-btn__zoomin",onClick:e.zoomIn},[o(w,{type:"zoomin"},null)]),o("div",{role:"button","aria-label":"zoom out button",class:"toolbar-btn toolbar-btn__zoomout",onClick:e.zoomOut},[o(w,{type:"zoomout"},null)])]),o("div",{role:"button","aria-label":"resize image button",class:"toolbar-btn toolbar-btn__resize",onClick:e.resize},[o(w,{type:"resize"},null)]),!e.rotateDisabled&&o(Q,null,[o("div",{role:"button","aria-label":"image rotate left button",class:"toolbar-btn toolbar-btn__rotate",onClick:e.rotateLeft},[o(w,{type:"rotate-left"},null)]),o("div",{role:"button","aria-label":"image rotate right button",class:"toolbar-btn toolbar-btn__rotate",onClick:e.rotateRight},[o(w,{type:"rotate-right"},null)])])])}),ne=()=>o("div",{class:`${f}-loading`},[o("div",{class:"ring"},null)]),se=()=>o("div",{class:`${f}-on-error`},[o("div",{class:"ring"},null),o(w,{type:"img-broken"},null)]),ie=(e,s)=>{let{slots:d}=s;return o("div",{class:`${f}-img-title`},[d.default?d.default():""])},re=X({name:"DefaultIcons",setup:()=>()=>o("svg",{"aria-hidden":!0,style:"position: absolute; width: 0; height: 0; overflow: hidden; visibility: hidden;"},[o("symbol",{id:"icon-rotate-right",viewBox:"0 0 1024 1024"},[o("path",{d:"M275.199914 450.496179v20.031994c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399a120.255962 120.255962 0 0 1-72.991978-24.895992c-21.503993-15.839995-35.359989-38.751988-41.567987-68.735979h60.831981c9.247997 23.007993 27.167992 34.495989 53.759983 34.49599 37.535988-0.384 56.863982-21.407993 57.983982-63.071981v-38.751988c-28.095991 8.863997-54.303983 13.119996-78.623975 12.735996a91.263971 91.263971 0 0 1-68.447979-27.711991c-18.847994-18.303994-28.095991-47.231985-27.711991-86.847973z m62.55998 24.863992c7.103998 24.799992 25.215992 37.343988 54.271983 37.663989 27.103992-0.288 44.703986-11.327996 52.831984-33.11999 3.135999-8.383997 2.655999-29.599991-1.28-38.559988-8.607997-19.615994-25.791992-29.695991-51.551984-30.20799-28.383991 0.576-46.303986 12.639996-53.759983 36.159988a58.719982 58.719982 0 0 0-0.512 28.063991z m390.335878 115.711964v-116.895963c-1.12-41.311987-20.447994-62.335981-57.983981-63.07198-37.727988 0.768-56.959982 21.791993-57.695982 63.07198v116.895963c0.768 41.663987 19.999994 62.68798 57.695982 63.071981 37.535988-0.384 56.863982-21.407993 57.983981-63.071981z m-174.815945 3.391999v-123.935961c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399-31.10399-0.384-57.887982-10.751997-80.319975-31.10399-23.935993-20.543994-36.127989-49.791984-36.479989-87.679973z m282.559912-479.07185A509.887841 509.887841 0 0 0 511.99984 0.00032C229.215928 0.00032 0 229.216248 0 512.00016s229.215928 511.99984 511.99984 511.99984 511.99984-229.215928 511.99984-511.99984c0-3.743999-0.032-7.455998-0.128-11.167997-1.631999-11.295996-8.159997-27.103992-31.87199-27.103991-27.487991 0-31.67999 21.247993-32.03199 32.06399l0.032 4.127999a30.62399 30.62399 0 0 0 0.16 2.079999H959.9997c0 247.423923-200.575937 447.99986-447.99986 447.99986S63.99998 759.424083 63.99998 512.00016 264.575917 64.0003 511.99984 64.0003a446.079861 446.079861 0 0 1 277.439913 96.22397l-94.91197 91.679971c-25.439992 24.607992-17.439995 44.991986 17.887994 45.599986l188.031942 3.295999a64.31998 64.31998 0 0 0 65.055979-62.84798l3.295999-188.127942C969.407697 15.040315 949.311703 5.792318 923.871711 30.368311l-87.999972 85.023973z",fill:""},null)]),o("symbol",{id:"icon-rotate-left",viewBox:"0 0 1024 1024"},[o("path",{d:"M275.199914 450.496179v20.031994c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399a120.255962 120.255962 0 0 1-72.991978-24.895992c-21.503993-15.839995-35.359989-38.751988-41.567987-68.735979h60.831981c9.247997 23.007993 27.167992 34.495989 53.759983 34.49599 37.535988-0.384 56.863982-21.407993 57.983982-63.071981v-38.751988c-28.095991 8.863997-54.303983 13.119996-78.623975 12.735996a91.263971 91.263971 0 0 1-68.447979-27.711991c-18.847994-18.303994-28.095991-47.231985-27.711991-86.847973z m62.55998 24.863992c7.103998 24.799992 25.215992 37.343988 54.271983 37.663989 27.103992-0.288 44.703986-11.327996 52.831984-33.11999 3.135999-8.383997 2.655999-29.599991-1.28-38.559988-8.607997-19.615994-25.791992-29.695991-51.551984-30.20799-28.383991 0.576-46.303986 12.639996-53.759983 36.159988a58.719982 58.719982 0 0 0-0.512 28.063991z m390.335878 115.711964v-116.895963c-1.12-41.311987-20.447994-62.335981-57.983981-63.07198-37.727988 0.768-56.959982 21.791993-57.695982 63.07198v116.895963c0.768 41.663987 19.999994 62.68798 57.695982 63.071981 37.535988-0.384 56.863982-21.407993 57.983981-63.071981z m-174.815945 3.391999v-123.935961c0.384-38.079988 12.543996-67.423979 36.479989-87.967973 22.431993-20.351994 49.215985-30.55999 80.319975-30.55999 32.06399 0 59.295981 10.175997 81.759974 30.55999 22.815993 20.543994 34.591989 49.887984 35.359989 87.967973v123.935961c-0.768 37.887988-12.543996 67.135979-35.359989 87.679973-22.431993 20.351994-49.695984 30.75199-81.759974 31.10399-31.10399-0.384-57.887982-10.751997-80.319975-31.10399-23.935993-20.543994-36.127989-49.791984-36.479989-87.679973zM188.159941 115.392284A509.887841 509.887841 0 0 1 511.99984 0.00032c282.783912 0 511.99984 229.215928 511.99984 511.99984s-229.215928 511.99984-511.99984 511.99984S0 794.784072 0 512.00016c0-3.743999 0.032-7.455998 0.128-11.167997 1.631999-11.295996 8.159997-27.103992 31.87199-27.103991 27.487991 0 31.67999 21.247993 32.03199 32.06399L63.99998 509.920161a30.62399 30.62399 0 0 1-0.16 2.079999H63.99998c0 247.423923 200.575937 447.99986 447.99986 447.99986s447.99986-200.575937 447.99986-447.99986S759.423763 64.0003 511.99984 64.0003a446.079861 446.079861 0 0 0-277.439913 96.22397l94.91197 91.679971c25.439992 24.607992 17.439995 44.991986-17.887994 45.599986L123.551961 300.800226a64.31998 64.31998 0 0 1-65.055979-62.84798l-3.295999-188.127942C54.591983 15.040315 74.687977 5.792318 100.127969 30.368311l87.999972 85.023973z",fill:""},null)]),o("symbol",{id:"icon-resize",viewBox:"0 0 1024 1024"},[o("path",{d:"M456.036919 791.8108 270.553461 791.8108 460.818829 601.572038l-39.593763-39.567157L231.314785 751.915162l0.873903-183.953615c0-15.465227-12.515035-27.981285-27.981285-27.981285s-27.981285 12.515035-27.981285 27.981285l0 251.829516c0 8.3072 3.415796 14.975063 8.826016 19.564591 5.082762 5.192256 12.132318 8.416693 19.947308 8.416693l251.036453 0c15.46625 0 27.981285-12.514012 27.981285-27.981285C484.018204 804.325835 471.504192 791.8108 456.036919 791.8108zM838.945819 184.644347c-5.082762-5.191232-12.132318-8.416693-19.947308-8.416693L567.961034 176.227654c-15.46625 0-27.981285 12.515035-27.981285 27.981285 0 15.46625 12.514012 27.981285 27.981285 27.981285l185.483458 0L563.206754 422.427962l39.567157 39.567157 189.910281-189.910281-0.873903 183.953615c0 15.46625 12.514012 27.981285 27.981285 27.981285s27.981285-12.514012 27.981285-27.981285L847.772858 204.208938C847.771835 195.902762 844.356039 189.234899 838.945819 184.644347zM847.771835 64.303538 176.227142 64.303538c-61.809741 0-111.924115 50.115398-111.924115 111.924115l0 671.544693c0 61.809741 50.114374 111.924115 111.924115 111.924115l671.544693 0c61.809741 0 111.924115-50.114374 111.924115-111.924115l0-671.544693C959.69595 114.418936 909.581576 64.303538 847.771835 64.303538zM903.733381 847.772346c0 30.878265-25.056676 55.962569-55.962569 55.962569L176.227142 903.734916c-30.90487 0-55.962569-25.084305-55.962569-55.962569l0-671.544693c0-30.9325 25.056676-55.962569 55.962569-55.962569l671.544693 0c30.90487 0 55.962569 25.03007 55.962569 55.962569L903.734404 847.772346z"},null)]),o("symbol",{id:"icon-img-broken",viewBox:"0 0 1024 1024"},[o("path",{d:"M810.666667 128H213.333333c-46.933333 0-85.333333 38.4-85.333333 85.333333v597.333334c0 46.933333 38.4 85.333333 85.333333 85.333333h597.333334c46.933333 0 85.333333-38.4 85.333333-85.333333V213.333333c0-46.933333-38.4-85.333333-85.333333-85.333333z m0 682.666667H213.333333v-195.413334l42.24 42.24 170.666667-170.666666 170.666667 170.666666 170.666666-170.24L810.666667 530.346667V810.666667z m0-401.493334l-43.093334-43.093333-170.666666 171.093333-170.666667-170.666666-170.666667 170.666666-42.24-42.666666V213.333333h597.333334v195.84z"},null)]),o("symbol",{id:"icon-prev",viewBox:"0 0 1024 1024"},[o("path",{d:"M784.652701 955.6957 346.601985 517.644983c-2.822492-2.822492-2.822492-7.902977 0-11.289967l439.179713-439.179713c6.77398-6.77398 10.725469-16.370452 10.725469-25.966924L796.507166 36.692393c0-20.32194-16.370452-36.692393-36.692393-36.692393l-4.515987 0c-9.596472 0-19.192944 3.951488-25.966924 10.725469L250.072767 489.420066c-12.418964 12.418964-12.418964 32.740904 0 45.159868l477.565601 477.565601c7.338479 7.338479 17.499449 11.854465 28.224917 11.854465l0 0c22.015436 0 40.079383-18.063947 40.079383-40.079383l0 0C796.507166 973.759647 791.99118 963.598677 784.652701 955.6957z"},null)]),o("symbol",{id:"icon-next",viewBox:"0 0 1024 1024"},[o("path",{d:"M246.121279 955.6957l438.050717-438.050717c2.822492-2.822492 2.822492-7.902977 0-11.289967L244.992282 67.175303c-6.77398-6.77398-10.725469-16.370452-10.725469-25.966924L234.266814 36.692393C234.266814 16.370452 250.637266 0 270.959206 0l4.515987 0c9.596472 0 19.192944 3.951488 25.966924 10.725469l478.694598 478.694598c12.418964 12.418964 12.418964 32.740904 0 45.159868l-477.565601 477.565601c-7.338479 7.338479-17.499449 11.854465-28.224917 11.854465l0 0c-22.015436 0-40.079383-18.063947-40.079383-40.079383l0 0C234.266814 973.759647 238.7828 963.598677 246.121279 955.6957z"},null)]),o("symbol",{id:"icon-zoomin",viewBox:"0 0 1024 1024"},[o("path",{d:"M725.504 652.864c46.4-61.44 71.744-136.448 71.744-218.752C797.248 230.464 632.768 64 430.656 64S64 230.464 64 434.112C64 639.36 228.48 805.76 430.656 805.76c86.656 0 164.48-30.144 227.52-81.088L889.984 960 960 891.264l-234.496-238.4z m-294.848 67.456c-155.776 0-282.624-128.896-282.624-286.208s126.848-286.208 282.624-286.208 282.624 128.896 282.624 286.208-126.912 286.208-282.624 286.208z"},null),o("path",{d:"M235.712 369.92h390.72v127.104H235.712z"},null),o("path",{d:"M367.488 238.144h127.104v390.72H367.488z"},null)]),o("symbol",{id:"icon-close",viewBox:"0 0 1024 1024"},[o("path",{d:"M570.24 512l259.2 259.2-58.88 58.24L512 570.24l-261.12 261.12-58.24-58.24L453.76 512 194.56 252.8l58.24-58.24L512 453.76l261.12-261.12 58.24 58.24z"},null)]),o("symbol",{id:"icon-zoomout",viewBox:"0 0 1024 1024"},[o("path",{d:"M725.504 652.864c46.4-61.44 71.744-136.448 71.744-218.752C797.248 230.464 632.768 64 430.656 64S64 230.464 64 434.112C64 639.36 228.48 805.76 430.656 805.76c86.656 0 164.48-30.144 227.52-81.088L889.984 960 960 891.264l-234.496-238.4z m-294.848 67.456c-155.776 0-282.624-128.896-282.624-286.208s126.848-286.208 282.624-286.208 282.624 128.896 282.624 286.208-126.912 286.208-282.624 286.208z"},null),o("path",{d:"M235.712 369.92h390.72v127.104H235.712z"},null)])])}),j=H?window:global;let h9=Date.now();function ce(e){const s=Date.now(),d=Math.max(0,16-(s-h9)),n=setTimeout(e,d);return h9=s+d,n}function W(e){return(j.requestAnimationFrame||ce).call(j,e)}function f9(e){(j.cancelAnimationFrame||j.clearTimeout).call(j,e)}function x9(e,s){const d=e.clientX-s.clientX,n=e.clientY-s.clientY;return Math.sqrt(d*d+n*n)}function J(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!G9(e)}var K=X({name:"VueEasyLightbox",props:{imgs:{type:[Array,String],default:()=>""},visible:{type:Boolean,default:!1},index:{type:Number,default:0},scrollDisabled:{type:Boolean,default:!0},escDisabled:{type:Boolean,default:!1},moveDisabled:{type:Boolean,default:!1},titleDisabled:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},teleport:{type:[String,Object],default:null},swipeTolerance:{type:Number,default:50},loop:{type:Boolean,default:!1},rtl:{type:Boolean,default:!1},zoomScale:{type:Number,default:.12},maxZoom:{type:Number,default:3},minZoom:{type:Number,default:.1},rotateDisabled:{type:Boolean,default:!1},zoomDisabled:{type:Boolean,default:!1},pinchDisabled:{type:Boolean,default:!1},dblclickDisabled:{type:Boolean,default:!1}},emits:{hide:()=>!0,"on-error":e=>!0,"on-prev":(e,s)=>!0,"on-next":(e,s)=>!0,"on-prev-click":(e,s)=>!0,"on-next-click":(e,s)=>!0,"on-index-change":(e,s)=>!0,"on-rotate":e=>!0},setup(e,s){let{emit:d,slots:n}=s;const{imgRef:v,imgState:y,setImgSize:N}=(()=>{const t=k(),l=V({width:0,height:0,maxScale:1});return{imgRef:t,imgState:l,setImgSize:()=>{if(t.value){const{width:r,height:m,naturalWidth:h}=t.value;l.maxScale=h/r,l.width=r,l.height=m}}}})(),u=k(e.index),x=k(""),a=V({scale:1,lastScale:1,rotateDeg:0,top:0,left:0,initX:0,initY:0,lastX:0,lastY:0,touches:[]}),i=V({loadError:!1,loading:!1,dragging:!1,gesturing:!1,wheeling:!1}),b=M(()=>{return t=e.imgs,e9("Array")(t)?e.imgs.map(l=>typeof l=="string"?{src:l}:function(r){return oe(r)&&v9(r.src)}(l)?l:void 0).filter(le):v9(e.imgs)?[{src:e.imgs}]:[];var t}),_9=M(()=>b.value[u.value]),t9=M(()=>{var t;return(t=b.value[u.value])==null?void 0:t.src}),o9=M(()=>{var t;return(t=b.value[u.value])==null?void 0:t.title}),k9=M(()=>{var t;return(t=b.value[u.value])==null?void 0:t.alt}),z9=M(()=>({cursor:i.loadError?"default":e.moveDisabled?i.dragging?"grabbing":"grab":"move",top:`calc(50% + ${a.top}px)`,left:`calc(50% + ${a.left}px)`,transition:i.dragging||i.gesturing?"none":"",transform:`translate(-50%, -50%) scale(${a.scale}) rotate(${a.rotateDeg}deg)`})),$=()=>{d("hide")},l9=()=>{a.scale=1,a.lastScale=1,a.rotateDeg=0,a.top=0,a.left=0,i.loadError=!1,i.dragging=!1,i.loading=!0},O=(t,l)=>{const r=u.value;l9(),u.value=t,b.value[u.value]===b.value[t]&&d9(()=>{i.loading=!1}),e.visible&&r!==t&&(l&&l(r,t),d("on-index-change",r,t))},L=()=>{const t=u.value,l=e.loop?(t+1)%b.value.length:t+1;!e.loop&&l>b.value.length-1||O(l,(r,m)=>{d("on-next",r,m),d("on-next-click",r,m)})},B=()=>{const t=u.value;let l=t-1;if(t===0){if(!e.loop)return;l=b.value.length-1}O(l,(r,m)=>{d("on-prev",r,m),d("on-prev-click",r,m)})},a9=t=>{Math.abs(1-t)<.05?t=1:Math.abs(y.maxScale-t)<.05&&(t=y.maxScale),a.lastScale=a.scale,a.scale=t},E=()=>{const t=a.scale+e.zoomScale;t<y.maxScale*e.maxZoom&&a9(t)},I=()=>{const t=a.scale-e.zoomScale;t>e.minZoom&&a9(t)},n9=()=>{const t=a.rotateDeg%360;d("on-rotate",Math.abs(t<0?t+360:t))},T=()=>{a.rotateDeg-=90,n9()},R=()=>{a.rotateDeg+=90,n9()},F=()=>{a.scale=1,a.top=0,a.left=0},A=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return!e.moveDisabled&&t===0},{onMouseDown:D9,onMouseMove:M9,onMouseUp:C9}=((t,l,r)=>{let m,h=!1;return{onMouseDown:p=>{t.initX=t.lastX=p.clientX,t.initY=t.lastY=p.clientY,l.dragging=!0,h=!1,p.stopPropagation()},onMouseUp:p=>{r(p.button)&&f9(m),l.dragging=!1,h=!1},onMouseMove:p=>{if(l.dragging)if(r(p.button)){if(h)return;h=!0,m=W(()=>{const{top:z,left:D,lastY:g,lastX:P}=t;t.top=z-g+p.clientY,t.left=D-P+p.clientX,t.lastX=p.clientX,t.lastY=p.clientY,h=!1})}else t.lastX=p.clientX,t.lastY=p.clientY;p.stopPropagation()}}})(a,i,A),{onTouchStart:S9,onTouchMove:L9,onTouchEnd:B9}=((t,l,r,m,h)=>{let p,z=!1;return{onTouchStart:D=>{const{touches:g}=D;g.length>1&&h()?(r.gesturing=!0,l.touches=g):(l.initX=l.lastX=g[0].clientX,l.initY=l.lastY=g[0].clientY,r.dragging=!0),D.stopPropagation()},onTouchMove:D=>{if(z)return;const{touches:g}=D,{lastX:P,lastY:F9,left:A9,top:P9,scale:V9}=l;if(!r.gesturing&&r.dragging){if(!g[0])return;const{clientX:Y,clientY:_}=g[0];m()?p=W(()=>{l.lastX=Y,l.lastY=_,l.top=P9-F9+_,l.left=A9-P+Y,z=!1}):(l.lastX=Y,l.lastY=_)}else r.gesturing&&l.touches.length>1&&g.length>1&&h()&&(p=W(()=>{const Y=(x9(l.touches[0],l.touches[1])-x9(g[0],g[1]))/t.width;l.touches=g;const _=V9-1.3*Y;_>.5&&_<1.5*t.maxScale&&(l.scale=_),z=!1}))},onTouchEnd:()=>{f9(p),r.dragging=!1,r.gesturing=!1,z=!1}}})(y,a,i,A,()=>!e.pinchDisabled),T9=()=>{e.dblclickDisabled||(a.scale!==y.maxScale?(a.lastScale=a.scale,a.scale=y.maxScale):a.scale=a.lastScale)},Y9=t=>{i.loadError||i.gesturing||i.loading||i.dragging||i.wheeling||!e.scrollDisabled||e.zoomDisabled||(i.wheeling=!0,setTimeout(()=>{i.wheeling=!1},80),t.deltaY<0?E():I())},s9=t=>{const l=t;e.visible&&(!e.escDisabled&&l.key==="Escape"&&e.visible&&$(),l.key==="ArrowLeft"&&(e.rtl?L():B()),l.key==="ArrowRight"&&(e.rtl?B():L()))},j9=()=>{e.maskClosable&&$()},X9=()=>{N()},$9=()=>{i.loading=!1},E9=t=>{i.loading=!1,i.loadError=!0,d("on-error",t)},i9=()=>{e.visible&&N()};U(()=>e.index,t=>{t<0||t>=b.value.length||O(t)}),U(()=>i.dragging,(t,l)=>{const r=!t&&l;if(!A()&&r){const m=a.lastX-a.initX,h=a.lastY-a.initY,p=e.swipeTolerance;Math.abs(m)>Math.abs(h)&&(m<-1*p?L():m>p&&B())}}),U(()=>e.visible,t=>{if(t){l9();const l=b.value.length;if(l===0)return u.value=0,i.loading=!1,void d9(()=>i.loadError=!0);u.value=e.index>=l?l-1:e.index<0?0:e.index,e.scrollDisabled&&I9()}else e.scrollDisabled&&r9()});const I9=()=>{document&&(x.value=document.body.style.overflowY,document.body.style.overflowY="hidden")},r9=()=>{document&&(document.body.style.overflowY=x.value)};w9(()=>{b9(document,"keydown",s9),b9(window,"resize",i9)}),U9(()=>{g9(document,"keydown",s9),g9(window,"resize",i9),e.scrollDisabled&&r9()});const H9=()=>i.loading?n.loading?n.loading({key:"loading"}):o(ne,{key:"img-loading"},null):i.loadError?n.onerror?n.onerror({key:"onerror"}):o(se,{key:"img-on-error"},null):o("div",{class:`${f}-img-wrapper`,style:z9.value,key:"img-wrapper"},[o("img",{alt:k9.value,ref:v,draggable:"false",class:`${f}-img`,src:t9.value,onMousedown:D9,onMouseup:C9,onMousemove:M9,onTouchstart:S9,onTouchmove:L9,onTouchend:B9,onLoad:X9,onDblclick:T9,onDragstart:t=>{t.preventDefault()}},null)]),N9=()=>{if(n["prev-btn"])return n["prev-btn"]({prev:B});if(b.value.length<=1)return;const t=!e.loop&&u.value<=0;return o("div",{role:"button","aria-label":"previous image button",class:"btn__prev "+(t?"disable":""),onClick:B},[e.rtl?o(w,{type:"next"},null):o(w,{type:"prev"},null)])},O9=()=>{if(n["next-btn"])return n["next-btn"]({next:L});if(b.value.length<=1)return;const t=!e.loop&&u.value>=b.value.length-1;return o("div",{role:"button","aria-label":"next image button",class:"btn__next "+(t?"disable":""),onClick:L},[e.rtl?o(w,{type:"prev"},null):o(w,{type:"next"},null)])},R9=()=>{if(!(e.titleDisabled||i.loading||i.loadError))return n.title?n.title({currentImg:_9.value}):o9.value?o(ie,null,{default:()=>[o9.value]}):void 0},c9=()=>{let t;if(e.visible)return o("div",{onTouchmove:ee,class:[`${f}-modal`,e.rtl?"is-rtl":""],onClick:q9(j9,["self"]),onWheel:Y9},[o(re,null,null),o(Z,{name:`${f}-fade`,mode:"out-in"},J(t=H9())?t:{default:()=>[t]}),o("img",{style:"display:none;",src:t9.value,onError:E9,onLoad:$9},null),o("div",{class:`${f}-btns-wrapper`},[N9(),O9(),R9(),n["close-btn"]?n["close-btn"]({close:$}):o("div",{role:"button","aria-label":"close image preview button",class:"btn__close",onClick:$},[o(w,{type:"close"},null)]),n.toolbar?n.toolbar({toolbarMethods:{zoomIn:E,zoomOut:I,rotate:T,rotateLeft:T,rotateRight:R,resize:F},zoomIn:E,zoomOut:I,rotate:T,rotateLeft:T,rotateRight:R,resize:F}):o(ae,{zoomIn:E,zoomOut:I,resize:F,rotateLeft:T,rotateRight:R,rotateDisabled:e.rotateDisabled,zoomDisabled:e.zoomDisabled},null)])])};return()=>{let t;if(e.teleport){let l;return o(Z9,{to:e.teleport},{default:()=>[o(Z,{name:`${f}-fade`},J(l=c9())?l:{default:()=>[l]})]})}return o(Z,{name:`${f}-fade`},J(t=c9())?t:{default:()=>[t]})}}});const de=Object.assign(K,{install:e=>{e.component(K.name,K)}}),ue=c("ul",{class:"flex space-x-2 rtl:space-x-reverse"},[c("li",null,[c("a",{href:"javascript:;",class:"text-primary hover:underline"},"Components")]),c("li",{class:"before:content-['/'] ltr:before:mr-2 rtl:before:ml-2"},[c("span",null,"Lightbox")])],-1),pe={class:"pt-5 space-y-8"},me={class:"panel p-3 flex items-center text-primary overflow-x-auto whitespace-nowrap"},be={class:"ring-2 ring-primary/30 rounded-full bg-primary text-white p-1.5 ltr:mr-3 rtl:ml-3"},ge=c("span",{class:"ltr:mr-3 rtl:ml-3"},"Documentation: ",-1),ve=c("a",{href:"https://www.npmjs.com/package/vue-easy-lightbox",target:"_blank",class:"block hover:underline"},"https://www.npmjs.com/package/vue-easy-lightbox",-1),he={class:"panel"},fe=c("h5",{class:"font-semibold text-lg dark:text-white-light mb-5"},"Lightbox",-1),xe={class:"mb-5"},we={class:"flex mb-5"},ye={class:"ltr:mr-4 rtl:ml-4"},_e=c("div",{class:"flex-1"},[c("h4",{class:"font-semibold text-lg text-primary"},"All controls"),c("p",{class:"media-text"},"Caption, slideshow, thumbnails and fullscreen buttons, tap to toggle controls")],-1),ke={class:"flex"},ze={class:"ltr:mr-4 rtl:ml-4"},De=c("div",{class:"flex-1"},[c("h4",{class:"font-semibold text-lg text-primary"},"Minimal"),c("p",{class:"media-text"},"No caption, no slideshow, no thumbnails, no fullscreen, tap to close")],-1),Me={class:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-3 mt-10"},Ce=["onClick"],Se=["src"],Te=X({__name:"lightbox",setup(e){W9({title:"Lightbox"});const s=k([]),d=k(null),n=k(!0),v=k(!1);w9(()=>{y()});const y=()=>{n.value?s.value=[{src:"/assets/images/lightbox1.jpg",title:"This is dummy caption. It has been placed here solely to demonstrate the look and feel of finished, typeset text.",description:"Photo: Samuel Rohl"},{src:"/assets/images/lightbox2.jpeg",title:"This is dummy caption. It has been placed here solely to demonstrate the look and feel of finished, typeset text.",description:"Photo: Samuel Rohl"},{src:"/assets/images/lightbox3.jpeg",title:"Dummy caption. It's Greek to you. Unless, of course, you're Greek, in which case, it really makes no sense.",description:"Photo: Michael Hull"},{src:"/assets/images/lightbox4.jpeg",title:"This is dummy caption.",description:"Photo: Folkert Gorter"},{src:"/assets/images/lightbox5.jpeg",title:"It's a dummy caption. He who searches for meaning here will be sorely disappointed.",description:"Photo: Thomas Lefebvre"},{src:"/assets/images/lightbox6.jpeg",title:"It's a dummy caption. He who searches for meaning here will be sorely disappointed.",description:"Photo: Thomas Lefebvre"}]:s.value=[{src:"/assets/images/lightbox1.jpg"},{src:"/assets/images/lightbox2.jpeg"},{src:"/assets/images/lightbox3.jpeg"},{src:"/assets/images/lightbox4.jpeg"},{src:"/assets/images/lightbox5.jpeg"},{src:"/assets/images/lightbox6.jpeg"}]};return(N,u)=>(q(),G("div",null,[ue,c("div",null,[c("div",pe,[c("div",me,[c("div",be,[o(Q9)]),ge,ve]),c("div",he,[fe,c("div",xe,[c("div",we,[c("div",ye,[u9(c("input",{"onUpdate:modelValue":u[0]||(u[0]=x=>n.value=x),value:!0,type:"radio",onChange:u[1]||(u[1]=x=>y()),class:"form-radio mt-1.5",checked:""},null,544),[[p9,n.value]])]),_e]),c("div",ke,[c("div",ze,[u9(c("input",{"onUpdate:modelValue":u[2]||(u[2]=x=>n.value=x),value:!1,type:"radio",onChange:u[3]||(u[3]=x=>y()),class:"form-radio mt-1.5"},null,544),[[p9,n.value]])]),De]),c("div",Me,[(q(!0),G(Q,null,J9(s.value,(x,a)=>(q(),G("a",{key:a,href:"javascript:;",class:m9({"md:row-span-2 md:col-span-2":a==3}),onClick:i=>{d.value=a,v.value=!0}},[c("img",{src:x.src,alt:"image-gallery",class:"rounded-md w-full h-full object-cover"},null,8,Se)],10,Ce))),128)),o(K9(de),{visible:v.value,imgs:s.value,index:d.value,scrollDisabled:"",moveDisabled:"",loop:"",class:m9({minimal:!n.value}),onHide:u[4]||(u[4]=x=>{d.value=null,v.value=!1})},null,8,["visible","imgs","index","class"])])])])])])]))}});export{Te as default};
|