PageSourceSearch

https://e-learning-prototype.netlify.app/assets/ClassRoomDetail-59b0358a.js

js e-learning-prototype.netlify.app collected 2026-10-03 10:40:38 UTC 67,947 bytes, 2 lines download raw bytes

1import{a9 as c,aQ as pe,ao as U,ad as H,aB as Ne,al as We,am as A,bd as Pt,I as n,be as Te,bf as vt,ap as ie,aa as fe,ah as St,bg as Io,ax as ko,bh as Lo,aC as Mo,aU as Sn,af as jo,aq as me,aw as Ut,ag as To,at as No,bi as Zt,aV as at,ar as In,ae as kn,b4 as Ro,an as Ln,bj as Oo,au as Mn,bk as Ao,b9 as Do,aK as Bt,aH as Fo,bl as ut,bm as zo,bn as Xt,bo as Yt,bp as Wo,aG as Ho,ab as Vo,aI as $o,aJ as Gt}from"./index-51c884ce.js";import{C as jn}from"./CardHeader-52342fe2.js";import{F as Uo}from"./FormControlLabel-2367695d.js";import{T as Zo,a as Bo}from"./Tabs-a3572c6d.js";const dt=We(A)(({theme:e})=>({width:20,height:20,marginTop:1,flexShrink:0,marginRight:e.spacing(2)}));function Xo({quote:e,country:t,email:r,role:o,company:i,school:s}){return c.jsxs(pe,{children:[c.jsx(jn,{title:"Thông tin lớp học"}),c.jsxs(U,{spacing:2,sx:{p:3},children:[c.jsx(H,{variant:"body2",children:"Lớp học bổ trợ cho học sinh trung học, giúp các em có thể học tập và làm bài tập trên mạng."}),c.jsxs(U,{direction:"row",children:[c.jsx(dt,{icon:"eva:pin-fill"}),c.jsxs(H,{variant:"body2",children:["Địa chỉ  ",c.jsx(Ne,{component:"span",variant:"subtitle2",color:"text.primary",children:t})]})]}),c.jsxs(U,{direction:"row",children:[c.jsx(dt,{icon:"eva:email-fill"}),c.jsxs(H,{variant:"body2",children:["Liên hệ  ",c.jsx(Ne,{component:"span",variant:"subtitle2",color:"text.primary",children:"[email protected]"})]})]}),c.jsxs(U,{direction:"row",children:[c.jsx(dt,{icon:"ic:round-business-center"}),c.jsxs(H,{variant:"body2",children:["Trường THCS  ",c.jsx(Ne,{component:"span",variant:"subtitle2",color:"text.primary",children:i})]})]})]})]})}function Yo({post:e}){const{user:t}=Pt(),r=n.useRef(null),o=n.useRef(null),[i,s]=n.useState(e.isLiked),[l,a]=n.useState(e.personLikes.length),[d,x]=n.useState(""),g=e.comments.length>0,h=()=>{s(!0),a(u=>u+1)},b=()=>{s(!1),a(u=>u-1)},v=u=>{x(u)},p=()=>{const{current:u}=o;u&&u.click()},f=()=>{const{current:u}=r;u&&u.focus()};return c.jsxs(pe,{children:[c.jsx(jn,{disableTypography:!0,avatar:c.jsx(Te,{src:"https://api-dev-minimal-v4.vercel.app/assets/images/avatars/avatar_1.jpg",alt:t==null?void 0:t.displayName,name:t==null?void 0:t.displayName}),title:c.jsx(Ne,{color:"inherit",variant:"subtitle2",children:"Cô Hồng Oanh"}),subheader:c.jsx(H,{variant:"caption",component:"div",sx:{color:"text.secondary"},children:vt(e.createdAt)}),action:c.jsx(ie,{children:c.jsx(A,{icon:"eva:more-vertical-fill"})})}),c.jsx(H,{sx:{p:u=>u.spacing(3,3,2,3)},children:"Các em nhớ về làm bài tập và học bài thật kỹ trước khi đến lớp nhé! Mai cô sẽ kiểm tra đột xuất đấy!"}),c.jsx(fe,{sx:{p:1},children:c.jsx(St,{alt:"post media",src:e.media,ratio:"16/9",sx:{borderRadius:1}})}),c.jsxs(U,{direction:"row",alignItems:"center",sx:{p:u=>u.spacing(2,3,3,3)},children:[c.jsx(Uo,{control:c.jsx(Io,{color:"error",checked:i,icon:c.jsx(A,{icon:"eva:heart-fill"}),checkedIcon:c.jsx(A,{icon:"eva:heart-fill"}),onChange:i?b:h}),label:ko(l)}),c.jsx(Lo,{children:e.personLikes.map(u=>c.jsx(Te,{alt:u.name,src:u.avatarUrl},u.name))}),c.jsx(fe,{sx:{flexGrow:1}}),c.jsx(ie,{onClick:f,children:c.jsx(A,{icon:"eva:message-square-fill"})}),c.jsx(ie,{children:c.jsx(A,{icon:"eva:share-fill"})})]}),g&&c.jsx(U,{spacing:1.5,sx:{px:3,pb:2},children:e.comments.map(u=>c.jsxs(U,{direction:"row",spacing:2,children:[c.jsx(Te,{alt:u.author.name,src:u.author.avatarUrl}),c.jsxs(Mo,{sx:{p:1.5,flexGrow:1,bgcolor:"background.neutral"},children:[c.jsxs(U,{justifyContent:"space-between",direction:{xs:"column",sm:"row"},alignItems:{sm:"center"},sx:{mb:.5},children:[c.jsx(H,{variant:"subtitle2",children:u.author.name}),c.jsx(H,{variant:"caption",sx:{color:"text.disabled"},children:vt(u.createdAt)})]}),c.jsx(H,{variant:"body2",sx:{color:"text.secondary"},children:"Dạ cô ạ!"})]})]},u.id))}),c.jsxs(U,{spacing:2,direction:"row",alignItems:"center",sx:{p:u=>u.spacing(0,3,3,3)},children:[c.jsx(Te,{src:t==null?void 0:t.photoURL,alt:t==null?void 0:t.displayName,name:t==null?void 0:t.displayName}),c.jsx(Sn,{fullWidth:!0,value:d,inputRef:r,placeholder:"Đăng bình luận...",onChange:u=>v(u.target.value),endAdornment:c.jsxs(jo,{position:"end",sx:{mr:1},children:[c.jsx(ie,{size:"small",onClick:p,children:c.jsx(A,{icon:"ic:round-add-photo-alternate"})}),c.jsx(ie,{size:"small",children:c.jsx(A,{icon:"eva:smiling-face-fill"})})]}),sx:{pl:1.5,height:40,borderRadius:1,border:u=>`solid 1px ${me(u.palette.grey[500],.32)}`}}),c.jsx("input",{type:"file",ref:o,style:{display:"none"}})]})]})}function Go(){const e=n.useRef(null),t=()=>{var r;(r=e.current)==null||r.click()};return c.jsxs(pe,{sx:{p:3},children:[c.jsx(Sn,{multiline:!0,fullWidth:!0,rows:4,placeholder:"Thêm thông báo, dặn dò Lớp 10A1...",sx:{p:2,mb:3,borderRadius:1,border:r=>`solid 1px ${me(r.palette.grey[500],.32)}`}}),c.jsxs(U,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[c.jsxs(U,{direction:"row",spacing:1,alignItems:"center",sx:{color:"text.secondary"},children:[c.jsxs(Ut,{size:"small",color:"inherit",variant:"softExtended",onClick:t,children:[c.jsx(A,{icon:"ic:round-perm-media",width:24,sx:{color:"success.main"}}
1),"Ảnh/Video"]}),c.jsxs(Ut,{size:"small",color:"inherit",variant:"softExtended",children:[c.jsx(A,{icon:"eva:video-fill",width:24,sx:{color:"error.main"}}),"Phòng học"]})]}),c.jsx(To,{variant:"contained",children:"Đăng bài"})]}),c.jsx("input",{ref:e,type:"file",style:{display:"none"}})]})}function Ko({follower:e,following:t}){return c.jsx(pe,{sx:{py:3},children:c.jsxs(U,{direction:"row",divider:c.jsx(No,{orientation:"vertical",flexItem:!0}),children:[c.jsxs(U,{width:1,textAlign:"center",children:[c.jsx(H,{variant:"h4",children:Zt(e)}),c.jsx(H,{variant:"body2",sx:{color:"text.secondary"},children:"Sỉ số"})]}),c.jsxs(U,{width:1,textAlign:"center",children:[c.jsx(H,{variant:"h4",children:Zt(t)}),c.jsx(H,{variant:"body2",sx:{color:"text.secondary"},children:"Bài tập"})]})]})})}function qo({info:e,posts:t}){return c.jsxs(at,{container:!0,spacing:3,children:[c.jsx(at,{item:!0,xs:12,md:4,children:c.jsxs(U,{spacing:3,children:[c.jsx(Ko,{follower:23,following:34}),c.jsx(Xo,{quote:e.quote,country:e.country,email:e.email,role:e.role,company:e.company,school:e.school})]})}),c.jsx(at,{item:!0,xs:12,md:8,children:c.jsxs(U,{spacing:3,children:[c.jsx(Go,{}),t.map(r=>c.jsx(Yo,{post:r},r.id))]})})]})}const Qo=We("div")(({theme:e})=>({"&:before":{...In({color:e.palette.primary.darker}),top:0,zIndex:9,content:"''",width:"100%",height:"100%",position:"absolute"}})),Jo=We("div")(({theme:e})=>({left:0,right:0,zIndex:99,position:"absolute",marginTop:e.spacing(5),[e.breakpoints.up("md")]:{right:"auto",display:"flex",alignItems:"center",left:e.spacing(3),bottom:e.spacing(3)}}));function er({name:e,role:t,cover:r}){const{user:o}=Pt();return c.jsxs(Qo,{children:[c.jsxs(Jo,{children:[c.jsx(Te,{src:"https://api-dev-minimal-v4.vercel.app/assets/images/avatars/avatar_1.jpg",alt:o==null?void 0:o.displayName,name:o==null?void 0:o.displayName,sx:{mx:"auto",borderWidth:2,borderStyle:"solid",borderColor:"common.white",width:{xs:80,md:128},height:{xs:80,md:128}}}),c.jsxs(fe,{sx:{ml:{md:3},mt:{xs:1,md:0},color:"common.white",textAlign:{xs:"center",md:"left"}},children:[c.jsx(H,{variant:"h4",children:"Lớp 10A1"}),c.jsx(H,{sx:{opacity:.72},children:"Chủ Nhiệm: Cô Hồng Oanh"})]})]}),c.jsx(St,{alt:"cover",src:r,sx:{top:0,left:0,right:0,bottom:0,position:"absolute"}})]})}We(e=>c.jsx(kn,{select:!0,SelectProps:{native:!0},...e}))(({theme:e})=>({"& fieldset":{display:"none"},"& select":{...e.typography.subtitle2,padding:e.spacing(.5,0,.5,1),paddingRight:"28px !important"},"& .MuiOutlinedInput-root":{borderRadius:Number(e.shape.borderRadius)*.75,backgroundColor:me(e.palette.grey[500],.08)}}));We(kn,{shouldForwardProp:e=>e!=="width"})(({width:e,theme:t})=>({"& fieldset":{display:"none"},"& .MuiOutlinedInput-root":{width:e,border:`solid 1px ${me(t.palette.grey[500],.32)}`,transition:t.transitions.create(["box-shadow","width"],{duration:t.transitions.duration.shorter}),"&.Mui-focused":{boxShadow:t.customShadows.z20,...e&&{[t.breakpoints.up("sm")]:{width:e+60}}}}}));n.forwardRef(({quantity:e,onIncrease:t,onDecrease:r,disabledIncrease:o,disabledDecrease:i,sx:s,...l},a)=>c.jsxs(U,{ref:a,flexShrink:0,direction:"row",alignItems:"center",justifyContent:"space-between",sx:{mb:.5,py:.5,px:.75,width:96,borderRadius:1,border:d=>`solid 1px ${me(d.palette.grey[500],.32)}`,...s},...l,children:[c.jsx(ie,{size:"small",color:"inherit",onClick:r,disabled:i,sx:{color:"text.secondary"},children:c.jsx(A,{icon:"eva:minus-fill",width:16})}),e,c.jsx(ie,{size:"small",color:"inherit",onClick:t,disabled:o,sx:{color:"text.secondary"},children:c.jsx(A,{icon:"eva:plus-fill",width:16})})]}));const Tn="carousel",Qe="controller",tr="navigation",nr="no-scroll",Nn="portal",or="root",Rn="toolbar",Kt="captions",Ae="fullscreen",qt="slideshow",De="thumbnails",Qt="zoom",Se="loading",bt="playing",Re="error",Oe="complete",rr="placeholder",He=e=>`active-slide-${e}`,On=He(Se),An=He(bt),ir=He(Re),Dn=He(Oe),Je="fullsize",ye="flex_center",sr="no_scroll",Fn="no_scroll_padding",be="prev",Ee="next",Et="swipe",Fe="close",zn="onPointerDown",Wn="onPointerMove",Hn="onPointerUp",Vn="onPointerLeave",$n="onPointerCancel",It="onKeyDown",Un="onKeyUp",kt="onWheel",lr="Escape",cr="ArrowLeft",ar="ArrowRight",ur="button",Ke="icon",Zn="contain",Jt="cover",Bn="Unknown action type",yt={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[Fe]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",n
1avigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:Zn,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullDown:!1,closeOnBackdropClick:!1},portal:{},on:{},styles:{},className:""};function ne(e,t){return{name:e,component:t}}function Z(e,t){return{module:e,children:t}}function Xn(e,t,r){return e.module.name===t?r(e):e.children?[Z(e.module,e.children.flatMap(o=>{var i;return(i=Xn(o,t,r))!==null&&i!==void 0?i:[]}))]:[e]}function Pe(e,t,r){return e.flatMap(o=>{var i;return(i=Xn(o,t,r))!==null&&i!==void 0?i:[]})}function dr(e,t=[],r=[]){let o=e;const i=v=>{const p=[...o];for(;p.length>0;){const f=p.pop();if((f==null?void 0:f.module.name)===v)return!0;f!=null&&f.children&&p.push(...f.children)}return!1},s=(v,p)=>{if(v===""){o=[Z(p,o)];return}o=Pe(o,v,f=>[Z(p,[f])])},l=(v,p)=>{o=Pe(o,v,f=>[Z(f.module,[Z(p,f.children)])])},a=(v,p,f)=>{o=Pe(o,v,u=>{var C;return[Z(u.module,[...f?[Z(p)]:[],...(C=u.children)!==null&&C!==void 0?C:[],...f?[]:[Z(p)]])]})},d=(v,p,f)=>{o=Pe(o,v,u=>[...f?[Z(p)]:[],u,...f?[]:[Z(p)]])},x=v=>{l(Qe,v)},g=(v,p)=>{o=Pe(o,v,f=>[Z(p,f.children)])},h=v=>{o=Pe(o,v,p=>p.children)},b=v=>{r.push(v)};return t.forEach(v=>{v({contains:i,addParent:s,append:l,addChild:a,addSibling:d,addModule:x,replace:g,remove:h,augment:b})}),{config:o,augmentation:v=>r.reduce((p,f)=>f(p),v)}}const B=(...e)=>[...e].filter(t=>!!t).join(" "),Yn="yarl__",I=e=>`${Yn}${e}`,z=e=>`--${Yn}${e}`,we=(e,t)=>`${e}${t?`_${t}`:""}`,Ce=e=>t=>we(e,t),hr=(e,t)=>e&&e[t]?e[t]:t,Ve=(...e)=>()=>{e.forEach(t=>{t()})},se=(e,t,r)=>()=>{const o=n.useContext(r);if(!o)throw new Error(`${e} must be used within a ${t}.Provider`);return o},Lt=()=>typeof window<"u";function Mt(e,t=0){const r=10**t;return Math.round((e+Number.EPSILON)*r)/r}const ke=e=>e.type===void 0||e.type==="image",jt=(e,t)=>e.imageFit===Jt||e.imageFit!==Zn&&t===Jt;function qe(e){if(typeof e=="number")return{pixel:e};if(typeof e=="string"){const t=parseInt(e,10);return e.endsWith("%")?{percent:t}:{pixel:t}}return{pixel:0}}function fr(e,t){const r=qe(t),o=r.percent!==void 0?e.width/100*r.percent:r.pixel;return{width:Math.max(e.width-2*o,0),height:Math.max(e.height-2*o,0)}}const mr=()=>(Lt()?window==null?void 0:window.devicePixelRatio:void 0)||1,Gn=(e,t)=>t>0?(e%t+t)%t:0,Kn=e=>e.length>0,Ye=(e,t)=>e[Gn(t,e.length)],wt=(e,t)=>Kn(e)?Ye(e,t):void 0;function $e(e,t,r){if(!r)return e;const{buttons:o,...i}=e,s=o.findIndex(a=>a===t),l=n.isValidElement(r)?n.cloneElement(r,{key:t},null):r;if(s>=0){const a=[...o];return a.splice(s,1,l),{buttons:a,...i}}return{buttons:[l,...o],...i}}function pr(){const e=t=>{t.stopPropagation()};return{onPointerDown:e,onKeyDown:e,onWheel:e}}const qn=n.createContext(null),Le=se("useEvents","EventsContext",qn);function gr({children:e}){const[t]=n.useState({});n.useEffect(()=>()=>{Object.keys(t).forEach(o=>delete t[o])},[t]);const r=n.useMemo(()=>{const o=(l,a)=>{var d;(d=t[l])===null||d===void 0||d.splice(0,t[l].length,...t[l].filter(x=>x!==a))};return{publish:(...[l,a])=>{var d;(d=t[l])===null||d===void 0||d.forEach(x=>x(a))},subscribe:(l,a)=>(t[l]||(t[l]=[]),t[l].push(a),()=>o(l,a)),unsubscribe:o}},[t]);return n.createElement(qn.Provider,{value:r},e)}const Qn=n.createContext(null),V=se("useLightboxProps","LightboxPropsContext",Qn);function Jn({children:e,...t}){return n.createElement(Qn.Provider,{value:t},e)}const eo=n.createContext(null),le=se("useLightboxState","LightboxStateContext",eo),to=n.createContext(null),xr=se("useLightboxDispatch","LightboxDispatchContext",to);function vr(e,t){switch(t.type){case"swipe":{const{slides:r}=e,o=(t==null?void 0:t.increment)||0,i=e.globalIndex+o,s=Gn(i,r.length),l=wt(r,s),a=o||t.duration?{increment:o,duration:t.duration,easing:t.easing}:void 0;return{slides:r,currentIndex:s,globalIndex:i,currentSlide:l,animation:a}}case"update":return{slides:t.slides,currentIndex:t.index,globalIndex:t.index,currentSlide:wt(t.slides,t.index)};default:throw new Error(Bn)}}function br({slides:e,index:t,children:r}){const[o,i]=n.useReducer(vr,{slides:e,currentIndex:t,globalIndex:t,currentSlide:wt(e,t)});n.useEffect(()=>{i({type:"update",slides:e,index:t})},[e,t]);const s=n.useMemo(()=>({...o,state:o,dispatch:i}),[o,i]);return n.createElement(to.Provider,{value:i},n.createElement(eo.Provider,{value:s},r))}const no=n.createContext(null),Ue=se("useTimeouts","TimeoutsContext",no);function Er({children:e}){const[t]=n.useState([]);n.useEffect(()=>()=>{t.forEach(o=>window.clearTimeout(o)),t.splice(0,t.length)},[t]);const r=n.useMemo(()=>{const o=l=>{t.splice(0,t.length,...t.filter(a=>a!==l))};return{setTimeout:(l,a)=>{const d=window.setTimeout(()=>{o(d),l()},a);return t.push(d),d},clearTimeout:l=>{l!==void 0&&(o(l),window.clearTimeout(l))}}},[t]);return n.createElement(no.Provider,{value:r},e)}const _e=n.forwardRef(function({label:t,className:r,icon:o,renderIcon:i,onClick:s,style:l,...a},d){const{styles:x,labels:g}=V();return n.createElement("button",{ref:d,type:"button","aria-label":hr(g,t),className:B(I(ur),r),onClick:s,style:{...l,...x.button},...a},i?i():n.createElement(o,{className:I(Ke),style:x.icon}))});function oo(e,t){const r=o=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...o},t);return r.displayName=e,r}function q(e,t){return oo(e,n.createElement("g",{fill:"currentColor"},n.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t))}function ro(e,t){return oo(e,n.createElement(n.Fragment,null,n.createElement("defs",null,n.createElement("mask",{id:"strike"},n.createElement("path",{d:"M0 0h24v24H0z",fill:"white"}),n.createElement("path",{d:"M0 0L24 24",stroke:"black",strokeWidth:4}))),n.createElement("path",{d:"M0.70707 2.121320L21.878680 23.292883",stroke:"currentColor",strokeWidth:2}),n.createElement("g",{fill:"currentColor",mask:"url(#strike)"},n.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t)))}const yr=q("Close",n.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),wr=q("Previous",n.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),Cr=q("Next",n.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),_r=q("Loading",n.createElement(n.Fragment,null,Array.from({length:8}).map((e,t,r)=>n.createElement("line",{key:t,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/r.length*(t+1),transform:`rotate(${360/r.length*t}, 12, 12)`})))),Pr=q("Error",n.createElement("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),te=Lt()?n.useLayoutEffect:n.useEffect;function Tt(){const[e,t]=n.useState(!1);return n.useEffect(()=>{var r,o;const i=(r=window.matchMedia)===null||r===void 0?void 0:r.call(window,"(prefers-reduced-motion: reduce)");t(i==null?void 0:i.matches);const s=l=>t(l.matches);return(o=i==null?void 0:i.addEventListener)===null||o===void 0||o.call(i,"change",s),(
1)=>{var l;return(l=i==null?void 0:i.removeEventListener)===null||l===void 0?void 0:l.call(i,"change",s)}},[]),e}function Sr(e){let t=0,r=0,o=0;const s=window.getComputedStyle(e).transform.match(/matrix.*\((.+)\)/);if(s){const l=s[1].split(",").map(a=>Number.parseInt(a,10));l.length===6?(t=l[4],r=l[5]):l.length===16&&(t=l[12],r=l[13],o=l[14])}return{x:t,y:r,z:o}}function Ct(e,t){const r=n.useRef(),o=n.useRef(),i=Tt();return te(()=>{var s,l,a;if(e.current&&r.current!==void 0&&!i){const{keyframes:d,duration:x,easing:g,onfinish:h}=t(r.current,e.current.getBoundingClientRect(),Sr(e.current))||{};if(d&&x){(s=o.current)===null||s===void 0||s.cancel(),o.current=void 0;try{o.current=(a=(l=e.current).animate)===null||a===void 0?void 0:a.call(l,d,{duration:x,easing:g})}catch(b){console.error(b)}o.current&&(o.current.onfinish=()=>{o.current=void 0,h==null||h()})}}r.current=void 0}),{prepareAnimation:s=>{r.current=s},isAnimationPlaying:()=>{var s;return((s=o.current)===null||s===void 0?void 0:s.playState)==="running"}}}function Nt(){const[e,t]=n.useState(),r=n.useRef(null),o=n.useRef(),i=n.useCallback(s=>{r.current=s,o.current&&(o.current.disconnect(),o.current=void 0);const l=()=>{if(s){const a=window.getComputedStyle(s),d=x=>parseFloat(x)||0;t({width:Math.round(s.clientWidth-d(a.paddingLeft)-d(a.paddingRight)),height:Math.round(s.clientHeight-d(a.paddingTop)-d(a.paddingBottom))})}else t(void 0)};l(),s&&typeof ResizeObserver<"u"&&(o.current=new ResizeObserver(l),o.current.observe(s))},[]);return n.useMemo(()=>({setContainerRef:i,containerRef:r,containerRect:e}),[i,r,e])}function Ge(){const e=n.useRef(),{setTimeout:t,clearTimeout:r}=Ue();return n.useCallback((o,i)=>{r(e.current),e.current=t(o,i>0?i:0)},[t,r])}function O(e){const t=n.useRef(e);return te(()=>{t.current=e}),n.useCallback((...r)=>{var o;return(o=t.current)===null||o===void 0?void 0:o.call(t,...r)},[])}function en(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function tn(e,t){return n.useMemo(()=>e==null&&t==null?null:r=>{en(e,r),en(t,r)},[e,t])}function io(e,t=!1){const r=n.useRef(t);te(()=>{t&&e()},[t,e]);const o=n.useCallback(()=>{r.current=!0},[]),i=n.useCallback(()=>{r.current=!1},[]);return{onFocus:o,onBlur:i}}function et(){const[e,t]=n.useState(!1);return te(()=>{t(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),e}function Ir(){const[e]=n.useState({});return n.useMemo(()=>{const t=(r,o)=>{var i;(i=e[r])===null||i===void 0||i.forEach(s=>{o.isPropagationStopped()||s(o)})};return{registerSensors:{onPointerDown:r=>t(zn,r),onPointerMove:r=>t(Wn,r),onPointerUp:r=>t(Hn,r),onPointerLeave:r=>t(Vn,r),onPointerCancel:r=>t($n,r),onKeyDown:r=>t(It,r),onKeyUp:r=>t(Un,r),onWheel:r=>t(kt,r)},subscribeSensors:(r,o)=>(e[r]||(e[r]=[]),e[r].unshift(o),()=>{const i=e[r];i&&i.splice(0,i.length,...i.filter(s=>s!==o))})}},[e])}function nn(e,t){const r=n.useRef(0),o=Ge(),i=O((...s)=>{r.current=Date.now(),e(s)});return n.useCallback((...s)=>{o(()=>{i(s)},t-(Date.now()-r.current))},[t,i,o])}const ht=Ce("slide"),ft=Ce("slide_image");function ze({slide:e,offset:t,render:r,rect:o,imageFit:i,imageProps:s,onClick:l,onLoad:a,style:d}){var x,g,h,b,v,p,f;const[u,C]=n.useState(Se),{publish:_}=Le(),{setTimeout:T}=Ue(),E=n.useRef(null);n.useEffect(()=>{t===0&&_(He(u))},[t,u,_]);const L=O(R=>{("decode"in R?R.decode():Promise.resolve()).catch(()=>{}).then(()=>{R.parentNode&&(C(Oe),T(()=>{a==null||a(R)},0))})}),y=n.useCallback(R=>{E.current=R,R!=null&&R.complete&&L(R)},[L]),P=n.useCallback(R=>{L(R.currentTarget)},[L]),N=n.useCallback(()=>{C(Re)},[]),M=jt(e,i),S=(R,J)=>Number.isFinite(R)?R:J,j=S(Math.max(...((g=(x=e.srcSet)===null||x===void 0?void 0:x.map(R=>R.width))!==null&&g!==void 0?g:[]).concat(e.width?[e.width]:[])),((h=E.current)===null||h===void 0?void 0:h.naturalWidth)||0),X=S(Math.max(...((v=(b=e.srcSet)===null||b===void 0?void 0:b.map(R=>R.height))!==null&&v!==void 0?v:[]).concat(e.height?[e.height]:[])),((p=E.current)===null||p===void 0?void 0:p.naturalHeight)||0),m=j&&X?{maxWidth:`min(${j}px, 100%)`,maxHeight:`min(${X}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},k=(f=e.srcSet)===null||f===void 0?void 0:f.sort((R,J)=>R.width-J.width).map(R=>`${R.src} ${R.width}w`).join(", "),D=()=>
1o&&!M&&e.width&&e.height?o.height/e.height*e.width:Number.MAX_VALUE,F=k&&o&&Lt()?`${Math.round(Math.min(D(),o.width))}px`:void 0,{style:$,className:Q,...ce}=s||{};return n.createElement(n.Fragment,null,n.createElement("img",{ref:y,onLoad:P,onError:N,onClick:l,draggable:!1,className:B(I(ft()),M&&I(ft("cover")),u!==Oe&&I(ft("loading")),Q),style:{...m,...d,...$},...ce,alt:e.alt,sizes:F,srcSet:k,src:e.src}),u!==Oe&&n.createElement("div",{className:I(ht(rr))},u===Se&&(r!=null&&r.iconLoading?r.iconLoading():n.createElement(_r,{className:B(I(Ke),I(ht(Se)))})),u===Re&&(r!=null&&r.iconError?r.iconError():n.createElement(Pr,{className:B(I(Ke),I(ht(Re)))}))))}var Y;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL_DOWN=2]="PULL_DOWN",e[e.ANIMATION=3]="ANIMATION"})(Y||(Y={}));function so(e,t,r,o,i){n.useEffect(()=>i?()=>{}:Ve(e(zn,t),e(Wn,r),e(Hn,o),e(Vn,o),e($n,o)),[e,t,r,o,i])}var re;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL_DOWN=2]="PULL_DOWN"})(re||(re={}));const mt=30;function kr(e,t,r,o,i,s,l,a,d,x,g,h,b){const v=n.useRef(0),p=n.useRef([]),f=n.useRef(),u=n.useRef(0),C=n.useRef(re.NONE),_=n.useCallback(P=>{f.current===P.pointerId&&(f.current=void 0,C.current=re.NONE);const N=p.current;N.splice(0,N.length,...N.filter(M=>M.pointerId!==P.pointerId))},[]),T=n.useCallback(P=>{_(P),P.persist(),p.current.push(P)},[_]),E=O(P=>{T(P)}),L=O(P=>{if(p.current.find(N=>N.pointerId===P.pointerId)&&f.current===P.pointerId){const N=Date.now()-u.current,M=v.current;C.current===re.SWIPE?Math.abs(M)>.3*r||Math.abs(M)>5&&N<o?l(M,N):a(M):C.current===re.PULL_DOWN&&(M>2*mt?h(M,N):b(M)),v.current=0,C.current=re.NONE}_(P)}),y=O(P=>{const N=p.current.find(M=>M.pointerId===P.pointerId);if(N){const M=f.current===P.pointerId;if(P.buttons===0){M&&v.current!==0?L(P):_(N);return}const S=P.clientX-N.clientX,j=P.clientY-N.clientY;if(f.current===void 0){const X=m=>{T(P),f.current=P.pointerId,u.current=Date.now(),C.current=m};Math.abs(S)>Math.abs(j)&&Math.abs(S)>mt&&t(S)?(X(re.SWIPE),i()):d&&Math.abs(j)>Math.abs(S)&&j>mt&&(X(re.PULL_DOWN),x())}else M&&(C.current===re.SWIPE?(v.current=S,s(S)):C.current===re.PULL_DOWN&&(v.current=j,g(j)))}});so(e,E,y,L)}const on="wheel";function rn(e){(Math.abs(e.deltaX)>Math.abs(e.deltaY)||e.ctrlKey)&&e.preventDefault()}function Lr(){const e=n.useRef(null);return n.useCallback(t=>{var r;t?t.addEventListener(on,rn,{passive:!1}):(r=e.current)===null||r===void 0||r.removeEventListener(on,rn),e.current=t},[])}function Mr(e,t,r,o,i,s,l,a,d){const x=n.useRef(0),g=n.useRef(0),h=n.useRef(),b=n.useRef(),v=n.useRef(0),p=n.useRef(0),{setTimeout:f,clearTimeout:u}=Ue(),C=n.useCallback(()=>{h.current&&(u(h.current),h.current=void 0)},[u]),_=n.useCallback(()=>{b.current&&(u(b.current),b.current=void 0)},[u]),T=O(()=>{e!==Y.SWIPE&&(x.current=0,p.current=0,C(),_())});n.useEffect(T,[e,T]);const E=O(y=>{b.current=void 0,x.current===y&&d(x.current)}),L=O(y=>{if(!y.ctrlKey&&!(Math.abs(y.deltaY)>Math.abs(y.deltaX)))if(e===Y.NONE){if(Math.abs(y.deltaX)<=1.2*Math.abs(v.current)){v.current=y.deltaX;return}if(!r(-y.deltaX))return;if(g.current+=y.deltaX,C(),Math.abs(g.current)>30)g.current=0,v.current=0,p.current=Date.now(),s();else{const P=g.current;h.current=f(()=>{h.current=void 0,P===g.current&&(g.current=0)},i)}}else if(e===Y.SWIPE){let P=x.current-y.deltaX;if(P=Math.min(Math.abs(P),o)*Math.sign(P),x.current=P,l(P),_(),Math.abs(P)>.2*o){v.current=y.deltaX,a(P,Date.now()-p.current);return}b.current=f(()=>E(P),2*i)}else v.current=y.deltaX});n.useEffect(()=>t(kt,L),[t,L])}const jr=Ce("container"),lo=n.createContext(null),oe=se("useController","ControllerContext",lo);function Tr({children:e,...t}){var r;const{carousel:o,animation:i,controller:s,on:l,styles:a,render:d}=t,[x,g]=n.useState(),h=le(),b=xr(),[v,p]=n.useState(Y.NONE),f=n.useRef(0),u=n.useRef(0),C=n.useRef(1),{registerSensors:_,subscribeSensors:T}=Ir(),{subscribe:E,publish:L}=Le(),y=Ge(),P=Ge(),N=Ge(),{containerRef:M,setContainerRef:S,containerRect:j}=Nt(),X=tn(Lr(),S),m=n.useRef(null),k=tn(m,void 0),D=et(),F=w=>(D?-1:1)*(typeof w=="number"?w:1),$=O(()=>{var w;return(w=M.current)===null||w===void 0?void 0:w.focus()}),Q=O(()=>t),ce=O(()=>h),R=n.useCallback(w=>L(be,w),[L]),J=n.useCallback(w=>L(Ee,w),[L]),ge=n.useCallback(()=>L(Fe),[L]),nt=w=>!(o.finite&&(F(w)>0&&h.currentIndex===0||F(w)<0&&h.currentIndex===h.slides.length-1)),Ft=w=>{var W;f.current=w,(W=M.current)===null||W===void 0||W.style.setProperty(z("swipe_offset"),`${Math.round(w)}px`)},ot=s.closeOnPullDown,rt=w=>{var W,K;u.current=w,C.current=(()=>Math.min(Math.max(Mt(1-w/60*(1-.5),2),.5),1))(),(W=M.current)===null||W===void 0||W.style.setProperty(z("pull_down_offset"),`${Math.round(w)}px`),(K=M.current)===null||K===void 0||K.style.setProperty(z("pull_down_opacity"),`${C.current}`)},{prepareAnimation:wo}=Ct(m,(w,W,K)=>{if(m.current&&j)return{keyframes:[{transform:`translate(0, ${w.rect.y-W.y+K.y}px)`,opacity:w.opacity},{transform:"translate(0, 0)",opacity:1}],duration:w.duration,easing:i.easing.fade}}),zt=(w,W)=>{if(ot){rt(w);let K=0;m.current&&(K=i.fade*(W?2:1),wo({rect:m.current.getBoundingClientRect(),opacity:C.current,duration:K})),N(()=>{rt(0),p(Y.NONE)},K),p(Y.ANIMATION),W||ge()}},{prepareAnimation:Co,isAnimationPlaying:_o}=Ct(m,(w,W,K)=>{var ae;if(m.current&&j&&(!((ae=h.animation)===null||ae===void 0)&&ae.duration)){const ee=qe(o.spacing),it=(ee.percent?ee.percent*j.width/100:ee.pixel)||0;return{keyframes:[{transform:`translate(${F(h.globalIndex-w.index)*(j.width+it)+w.rect.x-W.x+K.x}
1px, 0)`},{transform:"translate(0, 0)"}],duration:h.animation.duration,easing:h.animation.easing}}}),Me=O(w=>{var W,K;const ae=w.offset||0,ee=ae?i.swipe:(W=i.navigation)!==null&&W!==void 0?W:i.swipe,it=!ae&&!_o()?i.easing.navigation:i.easing.swipe;let{direction:Ze}=w;const Be=(K=w.count)!==null&&K!==void 0?K:1;let st=Y.ANIMATION,ue=ee*Be;if(!Ze){const je=j==null?void 0:j.width,$t=w.duration||0,ct=je?ee/je*Math.abs(ae):ee;Be!==0?($t<ct?ue=ue/ct*Math.max($t,ct/5):je&&(ue=ee/je*(je-Math.abs(ae))),Ze=F(ae)>0?be:Ee):ue=ee/2}let lt=0;Ze===be?nt(F(1))?lt=-Be:(st=Y.NONE,ue=ee):Ze===Ee&&(nt(F(-1))?lt=Be:(st=Y.NONE,ue=ee)),ue=Math.round(ue),P(()=>{Ft(0),p(Y.NONE)},ue),m.current&&Co({rect:m.current.getBoundingClientRect(),index:h.globalIndex}),p(st),L(Et,{type:"swipe",increment:lt,duration:ue,easing:it})});n.useEffect(()=>{var w,W;!((w=h.animation)===null||w===void 0)&&w.increment&&(!((W=h.animation)===null||W===void 0)&&W.duration)&&y(()=>b({type:"swipe",increment:0}),h.animation.duration)},[h.animation,b,y]);const Wt=[T,nt,(j==null?void 0:j.width)||0,i.swipe,()=>p(Y.SWIPE),w=>Ft(w),(w,W)=>Me({offset:w,duration:W,count:1}),w=>Me({offset:w,count:0})],Po=[()=>{ot&&p(Y.PULL_DOWN)},w=>rt(w),w=>zt(w),w=>zt(w,!0)];kr(...Wt,ot,...Po),Mr(v,...Wt);const Ht=O(()=>{var w;s.focus&&((w=M.current)===null||w===void 0||w.focus())});n.useEffect(Ht,[Ht]);const Vt=O(()=>{var w;(w=l.view)===null||w===void 0||w.call(l,{index:h.currentIndex})});n.useEffect(Vt,[h.globalIndex,Vt]),n.useEffect(()=>Ve(E(be,w=>Me({direction:be,...w})),E(Ee,w=>Me({direction:Ee,...w})),E(Et,w=>b(w))),[E,Me,b]),n.useEffect(()=>T(Un,w=>{w.key===lr&&ge()}),[T,ge]);const So=n.useMemo(()=>({prev:R,next:J,close:ge,focus:$,slideRect:j?fr(j,o.padding):{width:0,height:0},containerRect:j||{width:0,height:0},subscribeSensors:T,containerRef:M,setCarouselRef:k,toolbarWidth:x,setToolbarWidth:g}),[R,J,ge,$,T,j,M,k,x,g,o.padding]);return n.useImperativeHandle(s.ref,()=>({prev:R,next:J,close:ge,focus:$,getLightboxProps:Q,getLightboxState:ce}),[R,J,ge,$,Q,ce]),n.createElement("div",{ref:X,className:B(I(jr()),I(ye)),style:{...v===Y.SWIPE?{[z("swipe_offset")]:`${Math.round(f.current)}px`}:null,...v===Y.PULL_DOWN?{[z("pull_down_offset")]:`${Math.round(u.current)}px`,[z("pull_down_opacity")]:`${C.current}`}:null,...s.touchAction!=="none"?{[z("controller_touch_action")]:s.touchAction}:null,...a.container},...s.aria?{role:"presentation","aria-live":"polite"}:null,tabIndex:-1,..._},j&&n.createElement(lo.Provider,{value:So},e,(r=d.controls)===null||r===void 0?void 0:r.call(d)))}const Nr=ne(Qe,Tr);function xe(e){return we(Tn,e)}function sn(e){return we("slide",e)}function pt({slide:e,offset:t}){const r=n.useRef(null),{currentIndex:o}=le(),{slideRect:i,close:s}=oe(),{render:l,carousel:{imageFit:a,imageProps:d},on:{click:x},controller:{closeOnBackdropClick:g},styles:{slide:h}}=V(),b=()=>{var p,f,u,C;let _=(p=l.slide)===null||p===void 0?void 0:p.call(l,{slide:e,offset:t,rect:i});return!_&&ke(e)&&(_=n.createElement(ze,{slide:e,offset:t,render:l,rect:i,imageFit:a,imageProps:d,onClick:t===0?()=>x==null?void 0:x({index:o}):void 0})),_?n.createElement(n.Fragment,null,(f=l.slideHeader)===null||f===void 0?void 0:f.call(l,{slide:e}),((u=l.slideContainer)!==null&&u!==void 0?u:({children:T})=>T)({slide:e,children:_}),(C=l.slideFooter)===null||C===void 0?void 0:C.call(l,{slide:e})):null},v=p=>{const f=r.current,u=p.target instanceof HTMLElement?p.target:void 0;g&&u&&f&&(u===f||Array.from(f.children).find(C=>C===u)&&u.classList.contains(I(Je)))&&s()};return n.createElement("div",{ref:r,className:B(I(sn()),t===0&&I(sn("current")),I(ye)),onClick:v,style:h},b())}function ln(){const e=V().styles.slide;return n.createElement("div",{className:I("slide"),style:e})}function Rr({carousel:{finite:e,preload:t,padding:r,spacing:o}}){const{slides:i,currentIndex:s,globalIndex:l}=le(),{setCarouselRef:a}=oe(),d=qe(o),x=qe(r),g=[];if((i==null?void 0:i.length)>0){for(let h=s-t;h<s;h+=1){const b=l+h-s;g.push(!e||h>=0?n.createElement(pt,{key:b,slide:i[(h+t*i.length)%i.length],offset:h-s}):n.createElement(ln,{key:b}))}g.push(n.createElement(pt,{key:l,slide:i[s],offset:0}));for(let h=s+1;h<=s+t;h+=1){const b=l+h-s;g.push(!e||h<=i.length-1?n.createElement(pt,{key:b,slide:i[h%i.length],offset:h-s}):n.createElement(ln,{key:b}))}}return n.createElement("div",{ref:a,className:B(I(xe()),g.length>0&&I(xe("with_slides"))),style:{[`${z(xe("slides_count"))}`]:g.length,[`${z(xe("spacing_px"))}`]:d.pixel||0,[`${z(xe("spacing_percent"))}`]:d.percent||0,[`${z(xe("padding_px"))}`]:x.pixel||0,[`${z(xe("padding_percent"))}`]:x.percent||0}},g)}const Or=ne(Tn,Rr);function cn({label:e,icon:t,renderIcon:r,action:o,onClick:i,disabled:s}){return n.createElement(_e,{label:e,icon:t,renderIcon:r,className:I(`navigation_${o}`),disabled:s,onClick:i,...io(oe().focus,s)})}function Ar({carousel:{finite:e},animation:t,render:{buttonPrev:r,buttonNext:o,iconPrev:i,iconNext:s}}){var l;const{slides:a,currentIndex:d}=le(),{prev:x,next:g,subscribeSensors:h}=oe(),b=et(),v=a.length===0||e&&d===0,p=a.length===0||e&&d===a.length-1,f=((l=t.navigation)!==null&&l!==void 0?l:t.swipe)/2,u=nn(x,f),C=nn(g,f),_=O(T=>{T.key===cr&&!(b?p:v)&&(b?C:u)(),T.key===ar&&!(b?v:p)&&(b?u:C)()});return n.useEffect(()=>h(It,_),[h,_]),n.createElement(n.Fragment,null,r?r():n.createElement(cn,{label:"Previous",action:be,icon:wr,renderIcon:i,disabled:v,onClick:x}),o?o():n.createElement(cn,{label:"Next",action:Ee,icon:Cr,renderIcon:s,disabled:p,onClick:g}))}const Dr=ne(tr,Ar),an=I(sr),Fr=I(Fn);function zr(e){return"style"in e}function un(e,t,r){const o=window.getComputedStyle(e),i=r?"padding-left":"padding-right",s=r?o.paddingLeft:o.paddingRight,l=e.style.getPropertyValue(i);return e.style.setProperty(i,`${(parseInt(s,10)||0)+t}px`),()=>{l?e.style.setProperty(i,l):e.style.removeProperty(i)}}function Wr({children:e}){const t=et();return te(()=>{const r=[],{body:o,documentElement:i}=document,s=Math.round(window.innerWidth-i.clientWidth);if(s>0){r.push(un(o,s,t));const l=o.getElementsByTagName("*");for(let a=0;a<l.length;a+=1){const d=l[a];zr(d)&&window.getComputedStyle(d).getPropertyValue("position")==="fixed"&&!d.classList.contains(Fr)&&r.push(un(d,s,t))}}return o.classList.add(an),()=>{o.classList.remove(an),r.forEach(l=>l())}},[t]),n.createElement(n.Fragment,null,e)}const Hr=ne(nr,Wr);function dn(e){return we(Nn,e)}function hn(e,t,r){const o=e.getAttribute(t);return e.setAttribute(t,r),()=>{o?e.setAttribute(t,o):e.removeAttribute(t)}}function Vr({children:e,animation:t,styles:r,className:o,on:i,portal:s,close:l}){const[a,d]=n.useState(!1),[x,g]=n.useState(!1),h=n.useRef([]),{setTimeout:b}=Ue(),{subscribe:v}=Le(),f=Tt()?0:t.fade;n.useEffect(()=>(d(!0),()=>{d(!1),g(!1)}),[]);const u=O(()=>{var E;g(!1),(E=i.exiting)===null||E===void 0||E.call(i),b(()=>{var L;(L=i.exited)===null||L===void 0||L.call(i),l()},f)});n.useEffect(()=>v(Fe,u),[v,u]);const C=O(E=>{var L,y,P;E.scrollTop,g(!0),(L=i.entering)===null||L===void 0||L.call(i);const N=(P=(y=E.parentNode)===null||y===void 0?void 0:y.children)!==null&&P!==void 0?P:[];for(let M=0;M<N.length;M+=1){const S=N[M];["TEMPLATE","SCRIPT","STYLE"].indexOf(S.tagName)===-1&&S!==E&&(h.current.push(hn(S,"inert","true")),h.current.push(hn(S,"aria-hidden","true")))}b(()=>{var M;(M=i.entered)===null||M===void 0||M.call(i)},f)}),_=O(()=>{h.current.forEach(E=>E()),h.current=[]}
1),T=n.useCallback(E=>{E?C(E):_()},[C,_]);return a?Ro.createPortal(n.createElement("div",{ref:T,className:B(o,I("root"),I(dn()),I(Fn),x&&I(dn("open"))),role:"presentation","aria-live":"polite",style:{...t.fade!==yt.animation.fade?{[z("fade_animation_duration")]:`${f}ms`}:null,...t.easing.fade!==yt.animation.easing.fade?{[z("fade_animation_timing_function")]:t.easing.fade}:null,...r.root}},e),s.root||document.body):null}const $r=ne(Nn,Vr);function Ur({children:e}){return n.createElement(n.Fragment,null,e)}const Zr=ne(or,Ur);function Br(e){return we(Rn,e)}function Xr({toolbar:{buttons:e},render:{buttonClose:t,iconClose:r}}){const{close:o,setToolbarWidth:i}=oe(),{setContainerRef:s,containerRect:l}=Nt();te(()=>{i(l==null?void 0:l.width)},[i,l==null?void 0:l.width]);const a=()=>t?t():n.createElement(_e,{key:Fe,label:"Close",icon:yr,renderIcon:r,onClick:o});return n.createElement("div",{ref:s,className:I(Br()),...pr()},e==null?void 0:e.map(d=>d===Fe?a():d))}const Yr=ne(Rn,Xr);function co(e,t){var r;return n.createElement(e.module.component,{key:e.module.name,...t},(r=e.children)===null||r===void 0?void 0:r.map(o=>co(o,t)))}function Gr(e,t={}){const{easing:r,...o}=e,{easing:i,...s}=t;return{easing:{...r,...i},...o,...s}}function Kr({carousel:e,animation:t,render:r,toolbar:o,controller:i,on:s,plugins:l,slides:a,index:d,...x}){const{animation:g,carousel:h,render:b,toolbar:v,controller:p,on:f,slides:u,index:C,plugins:_,...T}=yt,{config:E,augmentation:L}=dr([Z($r,[Z(Hr,[Z(Nr,[Z(Or),Z(Yr),Z(Dr)])])])],l||_),y=L({animation:Gr(g,t),carousel:{...h,...e},render:{...b,...r},toolbar:{...v,...o},controller:{...p,...i},on:{...f,...s},...T,...x});return y.open?n.createElement(Jn,{...y},n.createElement(br,{slides:a||u,index:d||C},n.createElement(Er,null,n.createElement(gr,null,co(Z(Zr,E),y))))):null}const qr={maxZoomPixelRatio:1,zoomInMultiplier:2,doubleTapDelay:300,doubleClickDelay:500,doubleClickMaxStops:2,keyboardMoveDistance:50,wheelZoomDistanceFactor:100,pinchZoomDistanceFactor:100,scrollToZoom:!1},ao=e=>({...qr,...e});function Qr(e,t,r,o){const i=n.useRef(),s=n.useRef(),{zoom:l}=V().animation,a=Tt(),d=O(()=>{var x,g,h;if((x=i.current)===null||x===void 0||x.cancel(),i.current=void 0,s.current&&(o!=null&&o.current)){try{i.current=(h=(g=o.current).animate)===null||h===void 0?void 0:h.call(g,[{transform:s.current},{transform:`scale(${e}) translateX(${t}px) translateY(${r}px)`}],{duration:a?0:l??500,easing:i.current?"ease-out":"ease-in-out"})}catch(b){console.error(b)}s.current=void 0,i.current&&(i.current.onfinish=()=>{i.current=void 0})}});return te(d,[e,t,r,d]),n.useCallback(()=>{s.current=o!=null&&o.current?window.getComputedStyle(o.current).transform:void 0},[o])}function Jr(e,t){const{on:r}=V(),o=O(()=>{var i;t||(i=r.zoom)===null||i===void 0||i.call(r,{zoom:e})});n.useEffect(o,[e,o])}function tt(){const{zoom:e}=V();return ao(e)}function ei(e,t){var r,o;let i={width:0,height:0},s={width:0,height:0};const{slides:l,currentIndex:a}=le(),{imageFit:d}=V().carousel,{maxZoomPixelRatio:x}=tt();if(e&&a<l.length){const h={...l[a],...t};if(ke(h)){const b=jt(h,d),v=Math.max(...(((r=h.srcSet)===null||r===void 0?void 0:r.map(f=>f.width))||[]).concat(h.width?[h.width]:[])),p=Math.max(...(((o=h.srcSet)===null||o===void 0?void 0:o.map(f=>f.height))||[]).concat(h.height?[h.height]:[]));v>0&&p>0&&e.width>0&&e.height>0&&(s=b?{width:Math.round(Math.min(v,e.width/e.height*p)),height:Math.round(Math.min(p,e.height/e.width*v))}:{width:v,height:p},s={width:s.width*x,height:s.height*x},i=b?{width:Math.min(e.width,s.width,v),height:Math.min(e.height,s.height,p)}:{width:Math.round(Math.min(e.width,e.height/p*v,v)),height:Math.round(Math.min(e.height,e.width/v*p,p))})}}const g=i.width?Math.max(Mt(s.width/i.width,5),1):1;return{imageRect:i,maxZoom:g}}function fn(e,t){return((e.clientX-t.clientX)**2+(e.clientY-t.clientY)**2)**.5}function ti(e,t,r,o,i,s){const l=n.useRef([]),a=n.useRef(0),d=n.useRef(),{globalIndex:x}=le(),{containerRef:g,subscribeSensors:h}=oe(),{keyboardMoveDistance:b,zoomInMultiplier:v,wheelZoomDistanceFactor:p,scrollToZoom:f,doubleTapDelay:u,doubleClickDelay:C,doubleClickMaxStops:_,pinchZoomDistanceFactor:T}=tt(),E=n.useCallback(m=>{if(g.current){const{pageX:k,pageY:D}=m,{scrollX:F,scrollY:$}=window,{left:Q,top:ce,width:R,height:J}=g.current.getBoundingClientRect();return[k-Q-F-R/2,D-ce-$-J/2]}return[]},[g]),L=O(m=>{const k=()=>{m.preventDefault(),m.stopPropagation()};if(e>1){const $=(Q,ce)=>{k(),i(Q,ce)};m.key==="ArrowDown"?$(0,b):m.key==="ArrowUp"?$(0,-b):m.key==="ArrowLeft"?$(-b,0):m.ke
1y==="ArrowRight"&&$(b,0)}const D=$=>{k(),o($)},F=()=>m.getModifierState("Meta");m.key==="+"||m.key==="="&&F()?D(e*v):m.key==="-"||m.key==="_"&&F()?D(e/v):m.key==="0"&&F()&&D(1)}),y=O(m=>{if((m.ctrlKey||f)&&Math.abs(m.deltaY)>Math.abs(m.deltaX)){m.stopPropagation(),o(e*(1-m.deltaY/p),!0,...E(m));return}e>1&&(m.stopPropagation(),f||i(m.deltaX,m.deltaY))}),P=n.useCallback(m=>{const k=l.current;k.splice(0,k.length,...k.filter(D=>D.pointerId!==m.pointerId))},[]),N=n.useCallback(m=>{P(m),m.persist(),l.current.push(m)},[P]),M=O(m=>{var k;const D=l.current;if(!(!((k=s==null?void 0:s.current)===null||k===void 0)&&k.contains(m.target)))return;e>1&&m.stopPropagation();const{timeStamp:F}=m;D.length===0&&F-a.current<(m.pointerType==="touch"?u:C)?(a.current=0,o(e!==t?e*Math.max(t**(1/_),v):1,!1,...E(m))):a.current=F,N(m),D.length===2&&(d.current=fn(D[0],D[1]))}),S=O(m=>{const k=l.current,D=k.find(F=>F.pointerId===m.pointerId);if(k.length===2&&d.current){m.stopPropagation(),N(m);const F=fn(k[0],k[1]),$=F-d.current;Math.abs($)>0&&(o(e*(1+$/T),!0,...k.map(Q=>E(Q)).reduce((Q,ce)=>ce.map((R,J)=>Q[J]+R/2))),d.current=F);return}e>1&&(m.stopPropagation(),D&&(k.length===1&&i((D.clientX-m.clientX)/e,(D.clientY-m.clientY)/e),N(m)))}),j=n.useCallback(m=>{const k=l.current;k.length===2&&k.find(D=>D.pointerId===m.pointerId)&&(d.current=void 0),P(m)},[P]),X=n.useCallback(()=>{const m=l.current;m.splice(0,m.length),a.current=0,d.current=void 0},[]);so(h,M,S,j,r),n.useEffect(X,[x,X]),n.useEffect(()=>r?()=>{}:Ve(X,h(It,L),h(kt,y)),[r,h,X,L,y])}function ni(e,t){if(t<e.length){const r=e[t];if(ke(r))return r.src}}function oi(e,t,r){const[o,i]=n.useState(1),[s,l]=n.useState(0),[a,d]=n.useState(0),x=Qr(o,s,a,r),{slides:g,currentIndex:h,globalIndex:b}=le(),{containerRect:v,slideRect:p}=oe(),{zoomInMultiplier:f}=tt(),u=ni(g,h),C=!u||!(r!=null&&r.current);te(()=>{i(1),l(0),d(0)},[b,u]);const _=n.useCallback((P,N,M)=>{const S=M||o,j=s-(P||0),X=a-(N||0),m=(e.width*S-p.width)/2/S,k=(e.height*S-p.height)/2/S;l(Math.min(Math.abs(j),Math.max(m,0))*Math.sign(j)),d(Math.min(Math.abs(X),Math.max(k,0))*Math.sign(X))},[o,s,a,p,e.width,e.height]),T=n.useCallback((P,N,M,S)=>{const j=Mt(Math.min(Math.max(P+.001<t?P:t,1),t),5);j!==o&&(N||x(),_(M?M*(1/o-1/j):0,S?S*(1/o-1/j):0,j),i(j))},[o,t,_,x]),E=O(()=>{o>1&&(o>t&&T(t,!0),_())});te(E,[v.width,v.height,E]);const L=n.useCallback(()=>T(o*f),[o,f,T]),y=n.useCallback(()=>T(o/f),[o,f,T]);return{zoom:o,offsetX:s,offsetY:a,disabled:C,changeOffsets:_,changeZoom:T,zoomIn:L,zoomOut:y}}const uo=n.createContext(null),Rt=se("useZoom","ZoomControllerContext",uo);function ri({children:e}){const[t,r]=n.useState(),{slideRect:o}=oe(),{imageRect:i,maxZoom:s}=ei(o,t==null?void 0:t.imageDimensions),{zoom:l,offsetX:a,offsetY:d,disabled:x,changeZoom:g,changeOffsets:h,zoomIn:b,zoomOut:v}=oi(i,s,t==null?void 0:t.zoomWrapperRef);Jr(l,x),ti(l,s,x,g,h,t==null?void 0:t.zoomWrapperRef);const p=n.useMemo(()=>({zoom:l,maxZoom:s,offsetX:a,offsetY:d,disabled:x,zoomIn:b,zoomOut:v}),[l,s,a,d,x,b,v]);n.useImperativeHandle(tt().ref,()=>p,[p]);const f=n.useMemo(()=>({...p,setZoomWrapper:r}),[p,r]);return n.createElement(uo.Provider,{value:f},e)}const ii=q("ZoomIn",n.createElement(n.Fragment,null,n.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),n.createElement("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"}))),si=q("ZoomOut",n.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"})),mn=n.forwardRef(function({zoomIn:t,onLoseFocus:r},o){const i=n.useRef(!1),s=n.useRef(!1),{zoom:l,maxZoom:a,zoomIn:d,zoomOut:x,disabled:g}=Rt(),{render:h}=V(),b=g||(t?l>=a:l<=1);return n.useEffect(()=>{b&&i.current&&s.current&&r(),b||(i.current=!0)},[b,r]),n.createElement(_e,{ref:o,disabled:b,label:t?"Zoom in":"Zoom out",icon:t?ii:si,renderIcon:t?h.iconZoomIn:h.iconZoomOut,onClick:t?d:x,onFocus:()=>{s.current=!0},onBlur:()=>{s.current=!1}})});function li(){const e=n.useRef(null),t=n.useRef(null),{focus:r}=oe(),o=n.useCallback(l=>{var a,d;!((a=l.current)===null||a===void 0)&&a.disabled?r():(d=l.current)===null||d===void 0||d.focus()},[r]),i=n.useCallback(()=>o(e),[o]),s=n.useCallback(()=>o(t),[o]);return n.createElement(n.Fragment,null,n.createElement(mn,{zoomIn:!0,ref:e,onLoseFocus:s}),n.createElement(mn,{ref:t,onLoseFocus:i}))}function ci(){const{render:e}=V(),t=Rt();
1return e.buttonZoom?n.createElement(n.Fragment,null,e.buttonZoom(t)):n.createElement(li,null)}function ai(e){var t;return(((t=e.srcSet)===null||t===void 0?void 0:t.length)||0)>0}function ui({current:e,preload:t},{type:r,source:o}){switch(r){case"fetch":return e?{current:e,preload:o}:{current:o};case"done":return o===t?{current:o}:{current:e,preload:t};default:throw new Error(Bn)}}function di(e){var t,r;const[{current:o,preload:i},s]=n.useReducer(ui,{}),{slide:l,rect:a,imageFit:d,render:x}=e,g=l.srcSet.sort((E,L)=>E.width-L.width),h=(t=l.width)!==null&&t!==void 0?t:g[g.length-1].width,b=(r=l.height)!==null&&r!==void 0?r:g[g.length-1].height,v=jt(l,d),p=Math.max(...g.map(E=>E.width)),f=Math.min((v?Math.max:Math.min)(a.width,h*(a.height/b)),p),u=mr(),C=O(()=>{var E;const L=(E=g.find(y=>y.width>=f*u))!==null&&E!==void 0?E:g[g.length-1];(!o||g.findIndex(y=>y.src===o)<g.findIndex(y=>y===L))&&s({type:"fetch",source:L.src})});te(C,[a.width,a.height,u,C]);const _=O(E=>s({type:"done",source:E})),T={WebkitTransform:"translateZ(0)"};return v||Object.assign(T,a.width/a.height<h/b?{width:"100%",height:"auto"}:{width:"auto",height:"100%"}),n.createElement(n.Fragment,null,i&&i!==o&&n.createElement(ze,{key:"preload",...e,slide:{...l,src:i,srcSet:void 0},style:{position:"absolute",visibility:"hidden",...T},onLoad:()=>_(i),render:{...x,iconLoading:()=>null,iconError:()=>null}}),o&&n.createElement(ze,{key:"current",...e,slide:{...l,src:o,srcSet:void 0},style:T}))}function hi({render:e,slide:t,offset:r,rect:o}){var i;const[s,l]=n.useState(),a=n.useRef(null),{zoom:d,maxZoom:x,offsetX:g,offsetY:h,setZoomWrapper:b}=Rt(),{carousel:v,on:p}=V(),{currentIndex:f}=le();te(()=>r===0?(b({zoomWrapperRef:a,imageDimensions:s}),()=>b(void 0)):()=>{},[r,s,b]);let u=(i=e.slide)===null||i===void 0?void 0:i.call(e,{slide:t,offset:r,rect:o,zoom:d,maxZoom:x});if(!u&&ke(t)){const C={slide:t,offset:r,rect:o,render:e,imageFit:v.imageFit,imageProps:v.imageProps,onClick:r===0?()=>{var _;return(_=p.click)===null||_===void 0?void 0:_.call(p,{index:f})}:void 0};u=ai(t)?n.createElement(di,{key:t.src,...C,slide:t,rect:r===0?{width:o.width*d,height:o.height*d}:o}):n.createElement(ze,{key:t.src,onLoad:_=>l({width:_.naturalWidth,height:_.naturalHeight}),...C})}return u?n.createElement("div",{ref:a,className:B(I(Je),I(ye)),style:r===0?{transform:`scale(${d}) translateX(${g}px) translateY(${h}px)`}:void 0},u):null}const pn=({augment:e,addModule:t})=>{e(({toolbar:r,render:o,zoom:i,...s})=>({zoom:ao(i),toolbar:$e(r,Qt,n.createElement(ci,null)),render:{...o,slide:l=>{var a;return ke(l.slide)?n.createElement(hi,{render:o,...l}):(a=o.slide)===null||a===void 0?void 0:a.call(o,l)}},...s})),t(ne(Qt,ri))},fi={controls:!0,playsInline:!0},ho=e=>({...fi,...e});function mi(){const{video:e}=V();return ho(e)}function pi({slide:e,offset:t}){const r=mi(),{publish:o}=Le(),{setContainerRef:i,containerRect:s}=Nt(),l=n.useRef(null);n.useEffect(()=>{t!==0&&l.current&&!l.current.paused&&l.current.pause()},[t]),n.useEffect(()=>{t===0&&l.current&&(e.autoPlay||r.autoPlay)&&(o(On),l.current.play().catch(()=>{}))},[t,r.autoPlay,e.autoPlay,o]);const a=O(u=>{t===0&&(r.autoPlay||e.autoPlay)&&u.paused&&u.play().catch(()=>{})}),d=n.useCallback(u=>{l.current=u,u&&a(u)},[a]),{width:x,height:g,poster:h,sources:b}=e,v=()=>{const u={};if(u.style={maxWidth:"100%",maxHeight:"100%"},x&&g&&s){const C=x/g>s.width/s.height,_=C?s.width:Math.round(s.height/g*x),T=C?Math.round(s.width/x*g):s.height;u.width=_,u.height=T,u.style.width=_,u.style.height=T}return u},p=u=>e[u]===!1?null:e[u]===!0?{[u]:!0}:r[u]===!1?null:r[u]===!0?{[u]:!0}:null,f=u=>r[u]||e[u]?{[u]:e[u]||r[u]}:null;return n.createElement(n.Fragment,null,b&&n.createElement("div",{ref:i,style:{width:"100%",height:"100%",...x?{maxWidth:`${x}px`}:null},className:B(I("video_container"),I(ye))},s&&n.createElement("video",{ref:d,poster:h,...v(),...p("controls"),...p("playsInline"),...p("loop"),...p("muted"),...p("playsInline"),...p("disablePictureInPicture"),...p("disableRemotePlayback"),...f("controlsList"),...f("crossOrigin"),...f("preload"),onPlay:()=>{o(An)},onEnded:()=>{o(Dn)}},b.map(({src:u,type:C},_)=>n.createElement("source",{key:_,src:u,type:C})))))}function gi(e){return e.type==="video"}function gn({augment:e}){e(({render:{slide:t,...r},video:o,...i})=>({render:{slide:({slide:s,offset:l,rect:a})=>{var d;return gi(s)?n.createElement(pi,{key:`${(d=s.sources)===null||d===void 0?void 0:d.map(x=>x.src).join(" ")}`,slide:s,offset:l}):t==null?void 0:t({slide:s,offset:l,rect:a})},...r},video:ho(o),...i}))}const Ie=e=>I(`slide_${e}`),_t={descriptionTextAlign:"start",descriptionMaxLines:3,showToggle:!1},Ot=e=>({..._t,...e});function xi(){const{captions:e}=V();return Ot(e)}const fo=n.createContext(null),At=se("useCaptions","CaptionsContext",fo);function vi({captions:e,children:t}){const{ref:r}=Ot(e),[o,i]=n.useState(!0),s=n.useMemo(()=>({visible:o,show:()=>i(!0),hide:()=>i(!1)}),[o]);return n.useImperativeHandle(r,()=>s,[s]),n.createElement(fo.Provider,{value:s},t)}function bi({title:e}){const{toolbarWidth:t}=oe(),{styles:r}=V(),{visible:o}=At();return o?n.createElement("div",{style:r.captionsTitleContainer,className:B(Ie("captions_container"),Ie("title_container"))},n.createElement("div",{className:Ie("title"),style:{...t?{[z("toolbar_width")]:`${t}px`}:null,...r.captionsTitle}},e)):null}function Ei({description:e}){const{descriptionTextAlign:t,descriptionMaxLines:r}=xi(),{styles:o}=V(),{visible:i}=At();return i?n.createElement("div",{style:o.captionsDescriptionContainer,className:B(Ie("captions_container"),Ie("description_container"))},n.createElement("div",{className:Ie("description"),style:{...t!==_t.descriptionTextAlign||r!==_t.descriptionMaxLines?{[z("slide_description_text_align")]:t,[z("slide_description_max_lines")]:r}:null,...o.captionsDescription}},typeof e=="string"?e.split(`
2`).flatMap((s,l)=>[...l>0?[n.createElement("br",{key:l})]:[],s]):e)):null}const mo=()=>n.createElement(n.Fragment,null,n.createElement("path",{strokeWidth:2,stroke:"currentColor",strokeLinejoin:"round",fill:"none",d:"M3 5l18 0l0 14l-18 0l0-14z"}),n.createElement("path",{d:"M7 15h3c.55 0 1-.45 1-1v-1H9.5v.5h-2v-3h2v.5H11v-1c0-.55-.45-1-1-1H7c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1zm7 0h3c.55 0 1-.45 1-1v-1h-1.5v.5h-2v-3h2v.5H18v-1c0-.55-.45-1-1-1h-3c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1z"}
2)),yi=q("CaptionsVisible",mo()),wi=ro("CaptionsVisible",mo());function Ci(){const{visible:e,show:t,hide:r}=At(),{render:o}=V();return o.buttonCaptions?n.createElement(n.Fragment,null,o.buttonCaptions({visible:e,show:t,hide:r})):n.createElement(_e,{label:e?"Hide captions":"Show captions",icon:e?yi:wi,renderIcon:e?o.iconCaptionsVisible:o.iconCaptionsHidden,onClick:e?r:t})}function xn({augment:e,addModule:t}){e(({captions:r,render:{slideFooter:o,...i},toolbar:s,...l})=>{const a=Ot(r);return{render:{slideFooter:({slide:d})=>n.createElement(n.Fragment,null,o==null?void 0:o({slide:d}),d.title&&n.createElement(bi,{title:d.title}),d.description&&n.createElement(Ei,{description:d.description})),...i},toolbar:$e(s,Kt,a.showToggle?n.createElement(Ci,null):null),captions:a,...l}}),t(ne(Kt,vi))}const _i={autoplay:!1,delay:3e3,ref:null},po=e=>({..._i,...e}),go=n.createContext(null),Pi=se("useSlideshow","SlideshowContext",go);function Si({slideshow:e,carousel:{finite:t},on:r,children:o}){const{autoplay:i,delay:s,ref:l}=po(e),a=n.useRef(i),[d,x]=n.useState(i),g=n.useRef(),h=n.useRef(),{slides:b,currentIndex:v}=le(),{setTimeout:p,clearTimeout:f}=Ue(),{subscribe:u}=Le(),{next:C}=oe(),_=b.length===0||t&&v===b.length-1,T=n.useCallback(()=>{!d&&!_&&x(!0)},[d,_]),E=n.useCallback(()=>{d&&x(!1)},[d]),L=n.useCallback(()=>{f(g.current),g.current=void 0},[f]),y=O(()=>{L(),!(!d||_||h.current===Se||h.current===bt)&&(g.current=p(()=>{d&&(h.current=void 0,C())},s))});n.useEffect(y,[v,d,y]),n.useEffect(()=>{d&&_&&x(!1)},[v,d,_]);const P=O(()=>{var S;return(S=r.slideshowStart)===null||S===void 0?void 0:S.call(r)}),N=O(()=>{var S;return(S=r.slideshowStop)===null||S===void 0?void 0:S.call(r)});n.useEffect(()=>{d?P():a.current&&N(),a.current=d},[d,P,N]),n.useEffect(()=>Ve(L,u(On,()=>{h.current=Se,L()}),u(An,()=>{h.current=bt,L()}),u(ir,()=>{h.current=Re,y()}),u(Dn,()=>{h.current=Oe,y()})),[u,L,y]);const M=n.useMemo(()=>({playing:d,disabled:_,play:T,pause:E}),[d,_,T,E]);return n.useImperativeHandle(l,()=>M,[M]),n.createElement(go.Provider,{value:M},o)}const Ii=q("Play",n.createElement("path",{d:"M8 5v14l11-7z"})),ki=q("Pause",n.createElement("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}));function Li(){const{playing:e,disabled:t,play:r,pause:o}=Pi(),{render:i}=V(),s=io(oe().focus,t);return i.buttonSlideshow?n.createElement(n.Fragment,null,i.buttonSlideshow({playing:e,disabled:t,play:r,pause:o})):n.createElement(_e,{label:e?"Pause":"Play",icon:e?ki:Ii,renderIcon:e?i.iconSlideshowPause:i.iconSlideshowPlay,onClick:e?o:r,disabled:t,...s})}function vn({augment:e,addModule:t}){e(({slideshow:r,toolbar:o,...i})=>({toolbar:$e(o,qt,n.createElement(Li,null)),slideshow:po(r),...i})),t(ne(qt,Si))}const Mi={auto:!1,ref:null},xo=e=>({...Mi,...e}),vo=n.createContext(null),ji=se("useFullscreen","FullscreenContext",vo);function Ti({fullscreen:e,children:t}){const{auto:r,ref:o}=xo(e),i=n.useRef(null),[s,l]=n.useState(!1),[a,d]=n.useState();te(()=>{var f,u,C,_;d(!((_=(C=(u=(f=document.fullscreenEnabled)!==null&&f!==void 0?f:document.webkitFullscreenEnabled)!==null&&u!==void 0?u:document.mozFullScreenEnabled)!==null&&C!==void 0?C:document.msFullscreenEnabled)!==null&&_!==void 0&&_))},[]);const x=n.useCallback(()=>{var f,u,C;return(C=(u=(f=document.fullscreenElement)!==null&&f!==void 0?f:document.webkitFullscreenElement)!==null&&u!==void 0?u:document.mozFullScreenElement)!==null&&C!==void 0?C:document.msFullscreenElement},[]),g=n.useCallback(()=>{const f=i.current;if(f)try{f.requestFullscreen?f.requestFullscreen().catch(()=>{}):f.webkitRequestFullscreen?f.webkitRequestFullscreen():f.mozRequestFullScreen?f.mozRequestFullScreen():f.msRequestFullscreen&&f.msRequestFullscreen()}catch{}},[]),h=n.useCallback(()=>{if(x())try{document.exitFullscreen?document.exitFullscreen().catch(()=>{}):document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}catch{}},[x]),b=n.useCallback(()=>{x()===i.current?l(!0):l(!1)},[x]);n.useEffect(()=>{const f=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"];return f.forEach(u=>{document.addEventListener(u,b)}),()=>{f.forEach(u=>{document.removeEventListener(u,b)})}},[b]);const v=O(()=>{var f;return(f=r?g:null)===null||f===void 0?void 0:f()});n.useEffect(()=>(v(),()=>h()),[v,h]);const p=n.useMemo(()=>({fullscreen:s,disabled:a,enter:g,exit:h}),[s,a,g,h]);return n.useImperativeHandle(o,()=>p,[p]),n.createElement("div",{ref:i,className:B(I(Ae),I(Je))},n.createElement(vo.Provider,{value:p},t))}const Ni=q("EnterFullscreen",n.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})),Ri=q("ExitFullscreen",n.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}));function Oi(){var e;const{fullscreen:t,disabled:r,enter:o,exit:i}=ji(),{render:s}=V();return r?null:s.buttonFullscreen?n.createElement(n.Fragment,null,(e=s.buttonFullscreen)===null||e===void 0?void 0:e.call(s,{fullscreen:t,disabled:r,enter:o,exit:i})):n.createElement(_e,{disabled:r,label:t?"Exit Fullscreen":"Enter Fullscreen",icon:t?Ri:Ni,renderIcon:t?s.iconExitFullscreen:s.iconEnterFullscreen,onClick:t?i:o})}function bn({augment:e,contains:t,addParent:r}){e(({fullscreen:o,toolbar:i,...s})=>({toolbar:$e(i,Ae,n.createElement(Oi,null)),fullscreen:xo(o),...s})),r(t(De)?De:Qe,ne(Ae,Ti))}const ve={ref:null,position:"bottom",width:120,height:80,border:1,borderRadius:4,padding:4,gap:16,imageFit:"contain",vignette:!0},Dt=e=>({...ve,...e});function bo(){const{thumbnails:e}=V();return Dt(e)}const he=e=>we(De,e),G=e=>he(we("thumbnail",e)),Ai=q("VideoThumbnail",n.createElement("path",{d:"M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"})),Di=q("UnknownThumbnail",n.createElement("path",{d:"M23 18V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zM8.5 12.5l2.5 3.01L14.5 11l4.5 6H5l3.5-4.5z"}));function Fi({slide:e,render:t,rect:r,imageFit:o}){var i;const s=(i=t.thumbnail)===null||i===void 0?void 0:i.call(t,{slide:e,render:t,rect:r,imageFit:o});if(s)return s;const l=I(G(Ke));return ke(e)?n.createElement(ze,{slide:e,render:t,rect:r,imageFit:o}):e.type==="video"?n.createElement(n.Fragment,null,"poster"in e&&n.createElement("img",{alt:"",src:e.poster,className:B(I(Je),I(he("contain_image")))}),n.createElement(Ai,{className:l})):n.createElement(Di,{className:l})}const zi=Ce("active"),gt=Ce("fadein"),xt=Ce("fadeout"),Wi=Ce("placeholder"),En="delay",yn="duration";function Hi({slide:e,onClick:t,active:r,fadeIn:o,fadeOut:i,placeholder:s}){const{render:l,styles:a}=V(),{width:d,height:x,imageFit:g}=bo(),h={width:d,height:x};return n.createElement("button",{type:"button",className:B(I(ye),I(G()),r&&I(G(zi())),o&&I(G(gt())),i&&I(G(xt())),s&&I(G(Wi()))),style:{...o?{[z(G(gt(yn)))]:`${o.duration}ms`,[z(G(gt(En)))]:`${o.delay}ms`}:null,...i?{[z(G(xt(yn)))]:`${i.duration}ms`,[z(G(xt(En)))]:`${i.delay}ms`}:null,...a.thumbnail},onClick:t},e&&Fi({slide:e,render:l,rect:h,imageFit:g}))}function wn(e){return["top","bottom"].includes(e)}function Xe(e,t,r){return t+2*(e.border+e.padding)+(r?e.gap:0)}function Cn({visible:e,containerRef:t}){const r=n.useRef(null),{carousel:o,styles:i}=V(),{slides:s,globalIndex:l,animation:a}=le(),{publish:d,subscribe:x}=Le(),g=et(),h=bo(),{position:b,width:v,height:p,border:f,borderRadius:u,padding:C,gap:_,vignette:T}=h,E=l,L=(a==null?void 0:a.duration)||0,y=L>0&&(a==null?void 0:a.increment)||0,{prepareAnimation:P}=Ct(r,m=>({keyframes:wn(b)?[{transform:`translateX(${(g?-1:1)*Xe(h,v,!0)*y+m}px)`},{transform:"translateX(0)"}]:[{transform:`translateY(${Xe(h,p,!0)*y+m}px)`},{transform:"translateY(0)"}],duration:L,easing:a==null?void 0:a.easing})),N=O(()=>{let m=0;if(t.current&&r.current){const k=t.current.getBoundingClientRect(),D=r.current.getBoundingClientRect();m=wn(b)?D.left-k.left-(k.width-D.width)/2:D.top-k.top-(k.height-D.height)/2}P(m)});n.useEffect(()=>Ve(x(Et,N)),[x,N]);const{finite:M}=o,S=Math.max(Math.min(o.preload,s.length-1),0),j=[];if(Kn(s)){if(y<0)for(let m=E-S+y;m<E-S;m+=1)j.push({slide:null,index:m,placeholder:!0});for(let m=E-S-(y>
20?y:0);m<E;m+=1)M&&m<0?j.push({slide:null,index:m,placeholder:!0}):j.push({slide:Ye(s,m),index:m});j.push({slide:Ye(s,E),index:E});for(let m=E+1;m<=E+S-(y<0?y:0);m+=1)!M||m<=s.length-1?j.push({slide:Ye(s,m),index:m}):j.push({slide:null,index:m,placeholder:!0});if(y>0)for(let m=E+S+1;m<=E+S+y;m+=1)j.push({slide:null,index:m,placeholder:!0})}const X=m=>()=>{m>E?d(Ee,{count:m-E}):m<E&&d(be,{count:E-m})};return n.createElement("div",{className:B(I(he("container")),I(ye)),style:{...e?null:{display:"none"},...v!==ve.width?{[z(G("width"))]:`${Xe(h,v)}px`}:null,...p!==ve.height?{[z(G("height"))]:`${Xe(h,p)}px`}:null,...f!==ve.border?{[z(G("border"))]:`${f}px`}:null,...u!==ve.borderRadius?{[z(G("border_radius"))]:`${u}px`}:null,...C!==ve.padding?{[z(G("padding"))]:`${C}px`}:null,..._!==ve.gap?{[z(G("gap"))]:`${_}px`}:null,...i.thumbnailsContainer}},n.createElement("nav",{ref:r,style:i.thumbnailsTrack,className:B(I(he("track")),I(ye))},j.map(({slide:m,index:k,placeholder:D})=>{const F=L/Math.abs(y||1),$=y>0&&k>E+S-y&&k<=E+S||y<0&&k<E-S-y&&k>=E-S?{duration:F,delay:((y>0?k-(E+S-y):E-S-y-k)-1)*F}:void 0,Q=y>0&&k<E-S||y<0&&k>E+S?{duration:F,delay:(y>0?y-(E-S-k):-y-(k-(E+S)))*F}:void 0;return n.createElement(Hi,{key:k,slide:m,active:k===E,fadeIn:$,fadeOut:Q,placeholder:!!D,onClick:X(k)})})),T&&n.createElement("div",{className:I(he("vignette"))}))}const Eo=n.createContext(null),Vi=se("useThumbnails","ThumbnailsContext",Eo);function $i({children:e,...t}){const[r,o]=n.useState(!0),i=n.useRef(null),{ref:s,position:l}=Dt(t.thumbnails),a=n.useMemo(()=>({visible:r,show:()=>o(!0),hide:()=>o(!1)}),[r]);return n.useImperativeHandle(s,()=>a,[a]),n.createElement(Jn,{...t},n.createElement(Eo.Provider,{value:a},n.createElement("div",{ref:i,className:B(I(he()),I(he(`${l}`)))},["start","top"].includes(l)&&n.createElement(Cn,{containerRef:i,visible:r}),n.createElement("div",{className:I(he("wrapper"))},e),["end","bottom"].includes(l)&&n.createElement(Cn,{containerRef:i,visible:r}))))}const yo=()=>n.createElement(n.Fragment,null,n.createElement("path",{strokeWidth:2,stroke:"currentColor",strokeLinejoin:"round",fill:"none",d:"M3 5l18 0l0 14l-18 0l0-14z"}),n.createElement("path",{d:"M5 14h4v3h-4zM10 14h4v3h-4zM15 14h4v3h-4z"})),Ui=q("ThumbnailsVisible",yo()),Zi=ro("ThumbnailsHidden",yo());function Bi(){const{visible:e,show:t,hide:r}=Vi(),{render:o}=V();return o.buttonThumbnails?n.createElement(n.Fragment,null,o.buttonThumbnails({visible:e,show:t,hide:r})):n.createElement(_e,{label:e?"Hide thumbnails":"Show thumbnails",
2icon:e?Ui:Zi,renderIcon:e?o.iconThumbnailsVisible:o.iconThumbnailsHidden,onClick:e?r:t})}function _n({augment:e,contains:t,append:r,addParent:o}){e(({thumbnails:s,toolbar:l,...a})=>{const d=Dt(s);return{toolbar:$e(l,De,d.showToggle?n.createElement(Bi,null):null),thumbnails:d,...a}});const i=ne(De,$i);t(Ae)?r(Ae,i):o(Qe,i)}function Xi(){const e=Ln();return c.jsx(Oo,{styles:{".yarl__root":{"--yarl__thumbnails_thumbnail_padding":0,"--yarl__thumbnails_thumbnail_border":"transparent","--yarl__color_backdrop":me(e.palette.grey[900],.9),"--yarl__slide_captions_container_background":me(e.palette.grey[900],.48)},".yarl__slide_title":{fontSize:e.typography.h5.fontSize,fontWeight:e.typography.h5.fontWeight,lineHeight:e.typography.h5.lineHeight},".yarl__slide_description":{fontSize:e.typography.body2.fontSize,fontWeight:e.typography.body2.fontWeight,lineHeight:e.typography.body2.lineHeight},".yarl__button":{filter:"unset"},".yarl__thumbnails_thumbnail":{opacity:.48,"&.yarl__thumbnails_thumbnail_active":{opacity:1}},".yarl__thumbnails_vignette":{"--yarl__thumbnails_vignette_size":0},".yarl__video_container":{backgroundColor:e.palette.common.black}}})}const de=24;function Yi({slides:e,disabledZoom:t,disabledVideo:r,disabledTotal:o,disabledCaptions:i,disabledSlideshow:s,disabledThumbnails:l,disabledFullscreen:a,onGetCurrentIndex:d,...x}){const g=e?e.length:0;return c.jsxs(c.Fragment,{children:[c.jsx(Xi,{}),c.jsx(Kr,{slides:e,animation:{swipe:240},carousel:{finite:g<5},controller:{closeOnBackdropClick:!0},plugins:Gi({disabledZoom:t,disabledVideo:r,disabledCaptions:i,disabledSlideshow:s,disabledThumbnails:l,disabledFullscreen:a}),on:{view:h=>{d&&d(h)}},toolbar:{buttons:[c.jsx(Ki,{totalItems:g,disabledTotal:o,disabledCaptions:i},0),"close"]},render:{iconClose:()=>c.jsx(A,{width:de,icon:"carbon:close"}),iconZoomIn:()=>c.jsx(A,{width:de,icon:"carbon:zoom-in"}),iconZoomOut:()=>c.jsx(A,{width:de,icon:"carbon:zoom-out"}),iconSlideshowPlay:()=>c.jsx(A,{width:de,icon:"carbon:play"}),iconSlideshowPause:()=>c.jsx(A,{width:de,icon:"carbon:pause"}),iconPrev:()=>c.jsx(A,{width:de+8,icon:"carbon:chevron-left"}),iconNext:()=>c.jsx(A,{width:de+8,icon:"carbon:chevron-right"}),iconExitFullscreen:()=>c.jsx(A,{width:de,icon:"carbon:center-to-fit"}),iconEnterFullscreen:()=>c.jsx(A,{width:de,icon:"carbon:fit-to-screen"})},...x})]})}function Gi({disabledZoom:e,disabledVideo:t,disabledCaptions:r,disabledSlideshow:o,disabledThumbnails:i,disabledFullscreen:s}){let l=[xn,bn,vn,_n,gn,pn];return i&&(l=l.filter(a=>a!==_n)),r&&(l=l.filter(a=>a!==xn)),s&&(l=l.filter(a=>a!==bn)),o&&(l=l.filter(a=>a!==vn)),e&&(l=l.filter(a=>a!==pn)),t&&(l=l.filter(a=>a!==gn)),l}function Ki({totalItems:e,disabledTotal:t,disabledCaptions:r}){const{state:o}=le(),{currentIndex:i}=o;return t?null:c.jsxs(H,{className:"yarl__button",sx:{pl:3,left:0,position:"fixed",typography:"body2",...!r&&{px:"unset",minWidth:64,position:"unset",textAlign:"center"}},children:[c.jsxs("strong",{children:[" ",i+1," "]})," / ",e]})}function Pn({gallery:e}){const[t,r]=n.useState(-1),o=e.map(l=>({src:l.imageUrl})),i=l=>{const a=o.findIndex(d=>d.src===l);r(a)},s=()=>{r(-1)};return c.jsxs(c.Fragment,{children:[c.jsx(H,{variant:"h4",sx:{my:5},children:"Bài Tập"}),c.jsx(fe,{gap:3,display:"grid",gridTemplateColumns:{xs:"repeat(1, 1fr)",sm:"repeat(2, 1fr)",md:"repeat(3, 1fr)"},children:e.map(l=>c.jsx(qi,{image:l,onOpenLightbox:()=>i(l.imageUrl)},l.id))}),c.jsx(Yi,{index:t,slides:o,open:t>=0,close:s})]})}function qi({image:e,onOpenLightbox:t}){const r=Ln(),{imageUrl:o,title:i,postAt:s}=e;return c.jsxs(pe,{sx:{cursor:"pointer",position:"relative"},children:[c.jsx(St,{alt:"gallery",ratio:"16/9",src:o,onClick:()=>t(o)}),c.jsxs(U,{spacing:2,direction:"row",alignItems:"center",sx:{...In({color:r.palette.grey[900]}),width:1,left:0,bottom:0,position:"absolute",color:"common.white",p:r.spacing(3,1,3,3)},children:[c.jsxs(U,{flexGrow:1,spacing:1,children:[c.jsx(H,{variant:"subtitle1",children:i}),c.jsx(H,{variant:"body2",sx:{opacity:.72},children:vt(s)})]}),c.jsx(ie,{color:"inherit",children:c.jsx(A,{icon:"eva:more-vertical-fill"})})]})]})}function Qi({friends:e,followers:t}){return c.jsxs(c.Fragment,{children:[c.jsx(H,{variant:"h4",sx:{my:4},children:"Giáo viên"}
2),c.jsx(fe,{gap:3,display:"grid",gridTemplateColumns:{xs:"repeat(1, 1fr)",sm:"repeat(2, 1fr)",md:"repeat(3, 1fr)"},children:e.map(r=>c.jsx(es,{friend:r},r.id))}),c.jsx(H,{variant:"h4",sx:{my:4},children:"Học sinh"}),c.jsx(fe,{gap:3,display:"grid",gridTemplateColumns:{xs:"repeat(1, 1fr)",sm:"repeat(2, 1fr)",md:"repeat(3, 1fr)"},children:t.map(r=>c.jsx(Ji,{follower:r},r.id))})]})}function Ji({follower:e}){const{name:t,country:r,avatarUrl:o,isFollowed:i}=e;return n.useState(i),c.jsxs(pe,{sx:{p:3,display:"flex",alignItems:"center"},children:[c.jsx(Mn,{alt:t,src:o,sx:{width:48,height:48}}),c.jsxs(fe,{sx:{pl:2,pr:1,flexGrow:1,minWidth:0},children:[c.jsx(H,{variant:"subtitle2",noWrap:!0,children:t}),c.jsx(ie,{sx:{top:8,right:8,position:"absolute"},children:c.jsx(A,{icon:"eva:more-vertical-fill"})})]})]})}function es({friend:e}){const{name:t,role:r,avatarUrl:o}=e,[i,s]=n.useState(null),l=g=>{s(g.currentTarget)},a=()=>{s(null)},d=()=>{a(),console.log("DELETE",t)},x=()=>{a(),console.log("EDIT",t)};return c.jsxs(c.Fragment,{children:[c.jsxs(pe,{sx:{py:5,display:"flex",position:"relative",alignItems:"center",flexDirection:"column"},children:[c.jsx(Mn,{alt:t,src:o,sx:{width:64,height:64,mb:3}}),c.jsx(Ne,{variant:"subtitle1",color:"text.primary",children:t}),c.jsx(H,{variant:"body2",sx:{color:"text.secondary",mb:1,mt:.5},children:"Chủ nhiệm"}),c.jsx(U,{alignItems:"center",justifyContent:"center",direction:"row",children:Ao.map(g=>c.jsx(ie,{sx:{color:g.color,"&:hover":{bgcolor:me(g.color,.08)}},children:c.jsx(A,{icon:g.icon})},g.name))}),c.jsx(ie,{color:i?"inherit":"default",onClick:l,sx:{top:8,right:8,position:"absolute"},children:c.jsx(A,{icon:"eva:more-vertical-fill"})})]}),c.jsxs(Do,{open:i,onClose:a,arrow:"right-top",children:[c.jsxs(Bt,{onClick:d,sx:{color:"error.main"},children:[c.jsx(A,{icon:"eva:trash-2-outline"}),"Xóa"]}),c.jsxs(Bt,{onClick:x,children:[c.jsx(A,{icon:"eva:edit-fill"}),"Sửa"]})]})]})}function is(){const{themeStretch:e}=Fo(),{user:t}=Pt();n.useState("");const[r,o]=n.useState("profile"),i=[{value:"profile",label:"Bảng tin",icon:c.jsx(A,{icon:"ic:sharp-rss-feed"}),component:c.jsx(qo,{info:ut,posts:zo})},{value:"lesson",label:"Bài tập",icon:c.jsx(A,{icon:"bx:book"}),component:c.jsx(Pn,{gallery:Xt})},{value:"tests",label:"Bài kiểm tra",icon:c.jsx(A,{icon:"ph:exam-bold"}),component:c.jsx(Pn,{gallery:Xt})},{value:"followers",label:"Thành viên",icon:c.jsx(A,{icon:"ph:users-three-bold"}),component:c.jsx(Qi,{friends:[Yt[0],Yt[1]],followers:Wo})},{value:"settings",label:"Cài đặt",icon:c.jsx(A,{icon:"ph:gear-six-bold"}),component:c.jsx("div",{})}];return c.jsxs(c.Fragment,{children:[c.jsx(Ho,{children:c.jsx("title",{children:"Lớp Học | E-Learning"})}),c.jsxs(Vo,{maxWidth:e?!1:"xl",children:[c.jsx($o,{heading:"Lớp 10A1",links:[{name:"E-Learning",href:Gt.root},{name:"Lớp Học",href:Gt.classroom},{name:"Lớp 10A1"}]}),c.jsxs(pe,{sx:{mb:3,height:280,position:"relative"},children:[c.jsx(er,{name:t==null?void 0:t.displayName,role:ut.role,cover:ut.cover}),c.jsx(Zo,{value:r,onChange:(s,l)=>o(l),sx:{width:1,bottom:0,zIndex:9,position:"absolute",bgcolor:"background.paper","& .MuiTabs-flexContainer":{pr:{md:3},justifyContent:{sm:"center",md:"flex-end"}}},children:i.map(s=>c.jsx(Bo,{value:s.value,icon:s.icon,label:s.label},s.value))})]}),i.map(s=>s.value===r&&c.jsxs(fe,{children:[" ",s.component," "]},s.value))]})]})}export{is as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.