vendor: 4,241 bytes, line 1
1import{a as Jn}from"./chunk-QLTRNXEK.js";import{a as Zn,b as ei}from"./chunk-TEFEWVO6.js";import{b as ci,c as di,e as cn,f as dn,h as mi}from"./chunk-CMY6WAF3.js";import{$d as li,A as Nn,B as Un,D as Hn,Eg as ri,Gb as bt,Hb as ti,Od as oi,Pd as ai,Sc as Xt,b as xt,d as _t,id as ii,k as Ct,m as jn,qe as si,vc as ni,w as qn,x as Bn}from"./chunk-X5J6QTCG.js";import{$ as Sn,$a as $,$c as Nt,Aa as at,Ac as Bt,C as En,Db as rn,Eb as ht,Fa as C,Fb as te,Ff as Wn,Gb as Je,Ib as i,If as Xn,Ja as Tn,Jb as ie,Ka as he,Kb as re,Lb as Ve,Lc as wn,Lf as Yn,Ma as oe,Na as kn,Qb as xe,Rb as _e,Rc as Rn,Sa as gt,Sb as Ce,U as Ft,Ve as Gt,Wb as zt,Wc as Re,We as Gn,Xa as Se,Zd as Ut,_ as wt,_a as In,ac as $n,ad as Ln,ba as Rt,bb as F,be as Ht,cc as He,d as ft,db as Fe,eb as ce,ec as jt,fa as H,fb as de,fc as Fn,fi as Qn,ga as G,gb as K,gj as Kn,hb as p,hd as zn,ib as f,jb as J,k as sn,l as ot,lc as we,ma as Y,na as On,nb as Ne,nc as lt,o as St,ob as Ue,oc as qt,pb as Dn,pj as Wt,q as Pn,qb as Q,ra as $e,sb as N,tb as E,ub as Vn,vb as An,xb as Lt,yb as Ot,zb as Tt}from"./chunk-SMW7PHYX.js";import{a as Mn,c as it,j as se}from"./chunk-BMIYOSOG.js";function ui(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function mn(e={},a={}){let t=["__proto__","constructor","prototype"];Object.keys(a).filter(n=>t.indexOf(n)<0).forEach(n=>{typeof e[n]>"u"?e[n]=a[n]:ui(a[n])&&ui(e[n])&&Object.keys(a[n]).length>0&&mn(e[n],a[n])})}var pi={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function me(){let e=typeof document<"u"?document:{};return mn(e,pi),e}var Gi={document:pi,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function ae(){let e=typeof window<"u"?window:{};return mn(e,Gi),e}function Ge(e=""){return e.trim().split(" ").filter(a=>!!a.trim())}function ys(e){let a=e;Object.keys(a).forEach(t=>{try{a[t]=null}catch(n){}try{delete a[t]}catch(n){}})}function st(e,a=0){return setTimeout(e,a)}function Le(){return Date.now()}function Wi(e){let a=ae(),t;return a.getComputedStyle&&(t=a.getComputedStyle(e,null)),!t&&e.currentStyle&&(t=e.currentStyle),t||(t=e.style),t}function un(e,a="x"){let t=ae(),n,o,l,m=Wi(e);return t.WebKitCSSMatrix?(o=m.transform||m.webkitTransform,o.split(",").length>6&&(o=o.split(", ").map(c=>c.replace(",",".")).join(", ")),l=new t.WebKitCSSMatrix(o==="none"?"":o)):(l=m.MozTransform||m.OTransform||m.MsTransform||m.msTransform||m.transform||m.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),n=l.toString().split(",")),a==="x"&&(t.WebKitCSSMatrix?o=l.m41:n.length===16?o=parseFloat(n[12]):o=parseFloat(n[4])),a==="y"&&(t.WebKitCSSMatrix?o=l.m42:n.length===16?o=parseFloat(n[13]):o=parseFloat(n[5])),o||0}function vt(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function Xi(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function fi(...e){let a=Object(e[0]);for(let t=1;t<e.length;t+=1){let n=e[t];if(n!=null&&!Xi(n)){let o=Object.keys(Object(n)).filter(l=>l!=="__proto__"&&l!=="constructor"&&l!=="prototype");for(let l=0,m=o.length;l<m;l+=1){let c=o[l],d=Object.getOwnPropertyDescriptor(n,c);d!==void 0&&d.enumerable&&(vt(a[c])&&vt(n[c])?n[c].__swiper__?a[c]=n[c]:fi(a[c],n[c]):!vt(a[c])&&vt(n[c])?(a[
vendor: 9,551 bytes, line 1
1c]={},n[c].__swiper__?a[c]=n[c]:fi(a[c],n[c])):a[c]=n[c])}}}return a}function gi(e,a,t){e.style.setProperty(a,t)}function Ms({swiper:e,targetPosition:a,side:t}){let n=ae(),o=-e.translate,l=null,m,c=e.params.speed;e.wrapperEl.style.scrollSnapType="none",n.cancelAnimationFrame(e.cssModeFrameID);let d=a>o?"next":"prev",v=(b,h)=>d==="next"&&b>=h||d==="prev"&&b<=h,_=()=>{m=new Date().getTime(),l===null&&(l=m);let b=Math.max(Math.min((m-l)/c,1),0),h=.5-Math.cos(b*Math.PI)/2,r=o+h*(a-o);if(v(r,a)&&(r=a),e.wrapperEl.scrollTo({[t]:r}),v(r,a)){e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[t]:r})}),n.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=n.requestAnimationFrame(_)};_()}function Me(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function Pe(e,a=""){let t=ae(),n=[...e.children];return t.HTMLSlotElement&&e instanceof HTMLSlotElement&&n.push(...e.assignedElements()),a?n.filter(o=>o.matches(a)):n}function Yi(e,a){let t=[a];for(;t.length>0;){let n=t.shift();if(e===n)return!0;t.push(...n.children,...n.shadowRoot?n.shadowRoot.children:[],...n.assignedElements?n.assignedElements():[])}}function Ps(e,a){let t=ae(),n=a.contains(e);return!n&&t.HTMLSlotElement&&a instanceof HTMLSlotElement&&(n=[...a.assignedElements()].includes(e),n||(n=Yi(e,a))),n}function Es(e){try{console.warn(e);return}catch(a){}}function be(e,a=[]){let t=document.createElement(e);return t.classList.add(...Array.isArray(a)?a:Ge(a)),t}function rt(e){let a=ae(),t=me(),n=e.getBoundingClientRect(),o=t.body,l=e.clientTop||o.clientTop||0,m=e.clientLeft||o.clientLeft||0,c=e===a?a.scrollY:e.scrollTop,d=e===a?a.scrollX:e.scrollLeft;return{top:n.top+c-l,left:n.left+d-m}}function Ss(e,a){let t=[];for(;e.previousElementSibling;){let n=e.previousElementSibling;a?n.matches(a)&&t.push(n):t.push(n),e=n}return t}function Os(e,a){let t=[];for(;e.nextElementSibling;){let n=e.nextElementSibling;a?n.matches(a)&&t.push(n):t.push(n),e=n}return t}function Ts(e,a){return ae().getComputedStyle(e,null).getPropertyValue(a)}function kt(e){let a=e,t;if(a){for(t=0;(a=a.previousSibling)!==null;)a.nodeType===1&&(t+=1);return t}}function We(e,a){let t=[],n=e.parentElement;for(;n;)a?n.matches(a)&&t.push(n):t.push(n),n=n.parentElement;return t}function Ze(e,a){function t(n){n.target===e&&(a.call(e,n),e.removeEventListener("transitionend",t))}a&&e.addEventListener("transitionend",t)}function hi(e,a,t){let n=ae();return t?e[a==="width"?"offsetWidth":"offsetHeight"]+parseFloat(n.getComputedStyle(e,null).getPropertyValue(a==="width"?"margin-right":"margin-top"))+parseFloat(n.getComputedStyle(e,null).getPropertyValue(a==="width"?"margin-left":"margin-bottom")):e.offsetWidth}function Z(e){return(Array.isArray(e)?e:[e]).filter(a=>!!a)}function et(e){return a=>Math.abs(a)>0&&e.browser&&e.browser.need3dFix&&Math.abs(a)%90===0?a+.001:a}function ye(e,a=""){typeof trustedTypes<"u"?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:t=>t}).createHTML(a):e.innerHTML=a}function Qi({swiper:e,extendParams:a,on:t,emit:n}){a({virtual:{enabled:!1,slides:[],cache:!0,slidesPerViewAutoSlideSize:320,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});let o,l=me();e.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};let m=l.createElement("div");function c(r,s){let g=e.params.virtual;if(g.cache&&e.virtual.cache[s])return e.virtual.cache[s];let y;return g.renderSlide?(y=g.renderSlide.call(e,r,s),typeof y=="string"&&(ye(m,y),y=m.children[0])):e.isElement?y=be("swiper-slide"):y=be("div",e.params.slideClass),y.setAttribute("data-swiper-slide-index",s),g.renderSlide||ye(y,r),g.cache&&(e.virtual.cache[s]=y),y}function d(r,s,g){let{slidesPerGroup:y,centeredSlides:u,slidesPerView:x,loop:M,initialSlide:k}=e.params;if(s&&!M&&k>0)return;let{addSlidesBefore:z,addSlidesAfter:D,slidesPerViewAutoSlideSize:L}=e.params.virtual,{from:S,to:j,slides:q,slidesGrid:I,offset:T}=e.virtual;e.params.cssMode||e.updateActiveIndex();let O=typeof g>"u"?e.activeIndex||0:g,V;e.rtlTranslate?V="right":V=e.isHorizontal()?"left":"top";let P;if(x==="auto")if(L){let B=e.size;B||(B=e.isHorizontal()?e.el.getBoundingClientRect().width:e.el.getBoundingClientRect().height),P=Math.max(1,Math.ceil(B/L))}else P=1;else P=x;let A,w;u?(A=Math.floor(P/2)+y+D,w=Math.floor(P/2)+y+z):(A=P+(y-1)+D,w=(M?P:y)+z);let U=O-w,ee=O+A;M||(U=Math.max(U,0),ee=Math.min(ee,q.length-1));let le=(e.slidesGrid[U]||0)-(e.slidesGrid[0]||0);M&&O>=w?(U-=w,u||(le+=e.slidesGrid[0])):M&&O<w&&(U=-w,u&&(le+=e.slidesGrid[0])),Object.assign(e.virtual,{from:U,to:ee,offset:le,slidesGrid:e.slidesGrid,slidesBefore:w,slidesAfter:A});function dt(){e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),n("virtualUpdate")}if(S===U&&j===ee&&!r){e.slidesGrid!==I&&le!==T&&e.slides.forEach(B=>{B.style[V]=`${le-Math.abs(e.cssOverflowAdjustment())}px`}),e.updateProgress(),n("virtualUpdate");return}if(e.params.virtual.renderExternal){e.params.virtual.renderExternal.call(e,{offset:le,from:U,to:ee,slides:(function(){let ne=[];for(let fe=U;fe<=ee;fe+=1)ne.push(q[fe]);return ne})()}),e.params.virtual.renderExternalUpdate?dt():n("virtualUpdate");return}let ve=[],Ye=[],R=B=>{let ne=B;return B<0?ne=q.length+B:ne>=q.length&&(ne=ne-q.length),ne};if(r)e.slides.filter(B=>B.matches(`.${e.params.slideClass}, swiper-slide`)).forEach(B=>{B.remove()});else for(let B=S;B<=j;B+=1)if(B<U||B>ee){let ne=R(B);e.slides.filter(fe=>fe.matches(`.${e.params.slideClass}[data-swiper-slide-index="${ne}"], swiper-slide[data-swiper-slide-index="${ne}"]`)).forEach(fe=>{fe.remove()})}let X=M?-q.length:0,W=M?q.length*2:q.length;for(let B=X;B<W;B+=1)if(B>=U&&B<=ee){let ne=R(B);typeof j>"u"||r?Ye.push(ne):(B>j&&Ye.push(ne),B<S&&ve.push(ne))}if(Ye.forEach(B=>{e.slidesEl.append(c(q[B],B))}),M)for(let B=ve.length-1;B>=0;B-=1){let ne=ve[B];e.slidesEl.prepend(c(q[ne],ne))}else ve.sort((B,ne)=>ne-B),ve.forEach(B=>{e.slidesEl.prepend(c(q[B],B))});Pe(e.slidesEl,".swiper-slide, swiper-slide").forEach(B=>{B.style[V]=`${le-Math.abs(e.cssOverflowAdjustment())}px`}),dt()}function v(r){if(typeof r=="object"&&"length"in r)for(let s=0;s<r.length;s+=1)r[s]&&e.virtual.slides.push(r[s]);else e.virtual.slides.push(r);d(!0)}function _(r){let s=e.activeIndex,g=s+1,y=1;if(Array.isArray(r)){for(let u=0;u<r.length;u+=1)r[u]&&e.virtual.slides.unshift(r[u]);g=s+r.length,y=r.length}else e.virtual.slides.unshift(r);if(e.params.virtual.cache){let u=e.virtual.cache,x={};Object.keys(u).forEach(M=>{let k=u[M],z=k.getAttribute("data-swiper-slide-index");z&&k.setAttribute("data-swiper-slide-index",parseInt(z,10)+y),x[parseInt(M,10)+y]=k}),e.virtual.cache=x}d(!0),e.slideTo(g,0)}function b(r){if(typeof r>"u"||r===null)return;let s=e.activeIndex;if(Array.isArray(r))for(let g=r.length-1;g>=0;g-=1)e.params.virtual.cache&&(delete e.virtual.cache[r[g]],Object.keys(e.virtual.cache).forEach(y=>{y>r&&(e.virtual.cache[y-1]=e.virtual.cache[y],e.virtual.cache[y-1].setAttribute("data-swiper-slide-index",y-1),delete e.virtual.cache[y])})),e.virtual.slides.splice(r[g],1),r[g]<s&&(s-=1),s=Math.max(s,0);else e.params.virtual.cache&&(delete e.virtual.cache[r],Object.keys(e.virtual.cache).forEach(g=>{g>r&&(e.virtual.cache[g-1]=e.virtual.cache[g],e.virtual.cache[g-1].setAttribute("data-swiper-slide-index",g-1),delete e.virtual.cache[g])})),e.virtual.slides.splice(r,1),r<s&&(s-=1),s=Math.max(s,0);d(!0),e.slideTo(s,0)}function h(){e.virtual.slides=[],e.params.virtual.cache&&(e.virtual.cache={}),d(!0),e.slideTo(0,0)}t("beforeInit",()=>{if(!e.params.virtual.enabled)return;let r;if(typeof e.passedParams.virtual.slides>"u"){let s=[...e.slidesEl.children].filter(g=>g.matches(`.${e.params.slideClass}, swiper-slide`));s&&s.length&&(e.virtual.slides=[...s],r=!0,s.forEach((g,y)=>{g.setAttribute("data-swiper-slide-index",y),e.virtual.cache[y]=g,g.remove()}))}r||(e.virtual.slides=e.params.virtual.slides),e.classNames.push(`${e.params.containerModifierClass}virtual`),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0,d(!1,!0)}),t("setTranslate",()=>{e.params.virtual.enabled&&(e.params.cssMode&&!e._immediateVirtual?(clearTimeout(o),o=setTimeout(()=>{d()},100)):d())}),t("init update resize",()=>{e.params.virtual.enabled&&e.params.cssMode&&gi(e.wrapperEl,"--swiper-virtual-size",`${e.virtualSize}px`)}),Object.assign(e.virtual,{appendSlide:v,prependSlide:_,removeSlide:b,removeAllSlides:h,update:d})}function Ki({swiper:e,extendParams:a,on:t,emit:n}){let o=me(),l=ae();e.keyboard={enabled:!1},a({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0,speed:void 0}});function m(v){if(!e.enabled)return;let{rtlTranslate:_}=e,b=v;b.originalEvent&&(b=b.originalEvent);let h=b.keyCode||b.charCode,r=e.params.keyboard.pageUpDown,s=r&&h===33,g=r&&h===34,y=h===37,u=h===39,x=h===38,M=h===40;if(!e.allowSlideNext&&(e.isHorizontal()&&u||e.isVertical()&&M||g)||!e.allowSlidePrev&&(e.isHorizontal()&&y||e.isVertical()&&x||s))return!1;if(b.shiftKey||b.altKey||b.ctrlKey||b.metaKey||o.activeElement&&(o.activeElement.isContentEditable||o.activeElement.nodeName&&(o.activeElement.nodeName.toLowerCase()==="input"||o.activeElement.nodeName.toLowerCase()==="textarea")))return;if(e.params.keyboard.onlyInViewport&&(s||g||y||u||x||M)){let z=!1;if(We(e.el,`.${e.params.slideClass}, swiper-slide`).length>0&&We(e.el,`.${e.params.slideActiveClass}`).length===0)return;let D=e.el,L=D.clientWidth,S=D.clientHeight,j=l.innerWidth,q=l.innerHe
vendor: 12,998 bytes, line 1
1ight,I=rt(D);_&&(I.left-=D.scrollLeft);let T=[[I.left,I.top],[I.left+L,I.top],[I.left,I.top+S],[I.left+L,I.top+S]];for(let O=0;O<T.length;O+=1){let V=T[O];if(V[0]>=0&&V[0]<=j&&V[1]>=0&&V[1]<=q){if(V[0]===0&&V[1]===0)continue;z=!0}}if(!z)return}let k=e.params.keyboard.speed;e.isHorizontal()?((s||g||y||u)&&(b.preventDefault?b.preventDefault():b.returnValue=!1),((g||u)&&!_||(s||y)&&_)&&e.slideNext(k),((s||y)&&!_||(g||u)&&_)&&e.slidePrev(k)):((s||g||x||M)&&(b.preventDefault?b.preventDefault():b.returnValue=!1),(g||M)&&e.slideNext(k),(s||x)&&e.slidePrev(k)),n("keyPress",h)}function c(){e.keyboard.enabled||(o.addEventListener("keydown",m),e.keyboard.enabled=!0)}function d(){e.keyboard.enabled&&(o.removeEventListener("keydown",m),e.keyboard.enabled=!1)}t("init",()=>{e.params.keyboard.enabled&&c()}),t("destroy",()=>{e.keyboard.enabled&&d()}),Object.assign(e.keyboard,{enable:c,disable:d})}function Ji({swiper:e,extendParams:a,on:t,emit:n}){let o=ae();a({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),e.mousewheel={enabled:!1};let l,m=Le(),c,d=[];function v(x){let D=0,L=0,S=0,j=0;return"detail"in x&&(L=x.detail),"wheelDelta"in x&&(L=-x.wheelDelta/120),"wheelDeltaY"in x&&(L=-x.wheelDeltaY/120),"wheelDeltaX"in x&&(D=-x.wheelDeltaX/120),"axis"in x&&x.axis===x.HORIZONTAL_AXIS&&(D=L,L=0),S=D*10,j=L*10,"deltaY"in x&&(j=x.deltaY),"deltaX"in x&&(S=x.deltaX),x.shiftKey&&!S&&(S=j,j=0),(S||j)&&x.deltaMode&&(x.deltaMode===1?(S*=40,j*=40):(S*=800,j*=800)),S&&!D&&(D=S<1?-1:1),j&&!L&&(L=j<1?-1:1),{spinX:D,spinY:L,pixelX:S,pixelY:j}}function _(){e.enabled&&(e.mouseEntered=!0)}function b(){e.enabled&&(e.mouseEntered=!1)}function h(x){return e.params.mousewheel.thresholdDelta&&x.delta<e.params.mousewheel.thresholdDelta||e.params.mousewheel.thresholdTime&&Le()-m<e.params.mousewheel.thresholdTime?!1:x.delta>=6&&Le()-m<60?!0:(x.direction<0?(!e.isEnd||e.params.loop)&&!e.animating&&(e.slideNext(),n("scroll",x.raw)):(!e.isBeginning||e.params.loop)&&!e.animating&&(e.slidePrev(),n("scroll",x.raw)),m=new o.Date().getTime(),!1)}function r(x){let M=e.params.mousewheel;if(x.direction<0){if(e.isEnd&&!e.params.loop&&M.releaseOnEdges)return!0}else if(e.isBeginning&&!e.params.loop&&M.releaseOnEdges)return!0;return!1}function s(x){let M=x,k=!0;if(!e.enabled||x.target.closest(`.${e.params.mousewheel.noMousewheelClass}`))return;let z=e.params.mousewheel;e.params.cssMode&&M.preventDefault();let D=e.el;e.params.mousewheel.eventsTarget!=="container"&&(D=document.querySelector(e.params.mousewheel.eventsTarget));let L=D&&D.contains(M.target);if(!e.mouseEntered&&!L&&!z.releaseOnEdges)return!0;M.originalEvent&&(M=M.originalEvent);let S=0,j=e.rtlTranslate?-1:1,q=v(M);if(z.forceToAxis)if(e.isHorizontal())if(Math.abs(q.pixelX)>Math.abs(q.pixelY))S=-q.pixelX*j;else return!0;else if(Math.abs(q.pixelY)>Math.abs(q.pixelX))S=-q.pixelY;else return!0;else S=Math.abs(q.pixelX)>Math.abs(q.pixelY)?-q.pixelX*j:-q.pixelY;if(S===0)return!0;z.invert&&(S=-S);let I=e.getTranslate()+S*z.sensitivity;if(I>=e.minTranslate()&&(I=e.minTranslate()),I<=e.maxTranslate()&&(I=e.maxTranslate()),k=e.params.loop?!0:!(I===e.minTranslate()||I===e.maxTranslate()),k&&e.params.nested&&M.stopPropagation(),!e.params.freeMode||!e.params.freeMode.enabled){let T={time:Le(),delta:Math.abs(S),direction:Math.sign(S),raw:x};d.length>=2&&d.shift();let O=d.length?d[d.length-1]:void 0;if(d.push(T),O?(T.direction!==O.direction||T.delta>O.delta||T.time>O.time+150)&&h(T):h(T),r(T))return!0}else{let T={time:Le(),delta:Math.abs(S),direction:Math.sign(S)},O=c&&T.time<c.time+500&&T.delta<=c.delta&&T.direction===c.direction;if(!O){c=void 0;let V=e.getTranslate()+S*z.sensitivity,P=e.isBeginning,A=e.isEnd;if(V>=e.minTranslate()&&(V=e.minTranslate()),V<=e.maxTranslate()&&(V=e.maxTranslate()),e.setTransition(0),e.setTranslate(V),e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses(),(!P&&e.isBeginning||!A&&e.isEnd)&&e.updateSlidesClasses(),e.params.loop&&e.loopFix({direction:T.direction<0?"next":"prev",byMousewheel:!0}),e.params.freeMode.sticky){clearTimeout(l),l=void 0,d.length>=15&&d.shift();let w=d.length?d[d.length-1]:void 0,U=d[0];if(d.push(T),w&&(T.delta>w.delta||T.direction!==w.direction))d.splice(0);else if(d.length>=15&&T.time-U.time<500&&U.delta-T.delta>=1&&T.delta<=6){let ee=S>0?.8:.2;c=T,d.splice(0),l=st(()=>{e.destroyed||!e.params||e.slideToClosest(e.params.speed,!0,void 0,ee)},0)}l||(l=st(()=>{if(e.destroyed||!e.params)return;let ee=.5;c=T,d.splice(0),e.slideToClosest(e.params.speed,!0,void 0,ee)},500))}if(O||n("scroll",M),e.params.autoplay&&e.params.autoplay.disableOnInteraction&&e.autoplay.stop(),z.releaseOnEdges&&(V===e.minTranslate()||V===e.maxTranslate()))return!0}}return M.preventDefault?M.preventDefault():M.returnValue=!1,!1}function g(x){let M=e.el;e.params.mousewheel.eventsTarget!=="container"&&(M=document.querySelector(e.params.mousewheel.eventsTarget)),M[x]("mouseenter",_),M[x]("mouseleave",b),M[x]("wheel",s)}function y(){return e.params.cssMode?(e.wrapperEl.removeEventListener("wheel",s),!0):e.mousewheel.enabled?!1:(g("addEventListener"),e.mousewheel.enabled=!0,!0)}function u(){return e.params.cssMode?(e.wrapperEl.addEventListener(event,s),!0):e.mousewheel.enabled?(g("removeEventListener"),e.mousewheel.enabled=!1,!0):!1}t("init",()=>{!e.params.mousewheel.enabled&&e.params.cssMode&&u(),e.params.mousewheel.enabled&&y()}),t("destroy",()=>{e.params.cssMode&&y(),e.mousewheel.enabled&&u()}),Object.assign(e.mousewheel,{enable:y,disable:u})}function yt(e,a,t,n){return e.params.createElements&&Object.keys(n).forEach(o=>{if(!t[o]&&t.auto===!0){let l=Pe(e.el,`.${n[o]}`)[0];l||(l=be("div",n[o]),l.className=n[o],e.el.append(l)),t[o]=l,a[o]=l}}),t}var xi='<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>';function Zi({swiper:e,extendParams:a,on:t,emit:n}){a({navigation:{nextEl:null,prevEl:null,addIcons:!0,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),e.navigation={nextEl:null,prevEl:null,arrowSvg:xi};function o(r){let s;return r&&typeof r=="string"&&e.isElement&&(s=e.el.querySelector(r)||e.hostEl.querySelector(r),s)?s:(r&&(typeof r=="string"&&(s=[...document.querySelectorAll(r)]),e.params.uniqueNavElements&&typeof r=="string"&&s&&s.length>1&&e.el.querySelectorAll(r).length===1?s=e.el.querySelector(r):s&&s.length===1&&(s=s[0])),r&&!s?r:s)}function l(r,s){let g=e.params.navigation;r=Z(r),r.forEach(y=>{y&&(y.classList[s?"add":"remove"](...g.disabledClass.split(" ")),y.tagName==="BUTTON"&&(y.disabled=s),e.params.watchOverflow&&e.enabled&&y.classList[e.isLocked?"add":"remove"](g.lockClass))})}function m(){let{nextEl:r,prevEl:s}=e.navigation;if(e.params.loop){l(s,!1),l(r,!1);return}l(s,e.isBeginning&&!e.params.rewind),l(r,e.isEnd&&!e.params.rewind)}function c(r){r.preventDefault(),!(e.isBeginning&&!e.params.loop&&!e.params.rewind)&&(e.slidePrev(),n("navigationPrev"))}function d(r){r.preventDefault(),!(e.isEnd&&!e.params.loop&&!e.params.rewind)&&(e.slideNext(),n("navigationNext"))}function v(){let r=e.params.navigation;if(e.params.navigation=yt(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(r.nextEl||r.prevEl))return;let s=o(r.nextEl),g=o(r.prevEl);Object.assign(e.navigation,{nextEl:s,prevEl:g}),s=Z(s),g=Z(g);let y=(u,x)=>{if(u){if(r.addIcons&&u.matches(".swiper-button-next,.swiper-button-prev")&&!u.querySelector("svg")){let M=document.createElement("div");ye(M,xi),u.appendChild(M.querySelector("svg")),M.remove()}u.addEventListener("click",x==="next"?d:c)}!e.enabled&&u&&u.classList.add(...r.lockClass.split(" "))};s.forEach(u=>y(u,"next")),g.forEach(u=>y(u,"prev"))}function _(){let{nextEl:r,prevEl:s}=e.navigation;r=Z(r),s=Z(s);let g=(y,u)=>{y.removeEventListener("click",u==="next"?d:c),y.classList.remove(...e.params.navigation.disabledClass.split(" "))};r.forEach(y=>g(y,"next")),s.forEach(y=>g(y,"prev"))}t("init",()=>{e.params.navigation.enabled===!1?h():(v(),m())}),t("toEdge fromEdge lock unlock",()=>{m()}),t("destroy",()=>{_()}),t("enable disable",()=>{let{nextEl:r,prevEl:s}=e.navigation;if(r=Z(r),s=Z(s),e.enabled){m();return}[...r,...s].filter(g=>!!g).forEach(g=>g.classList.add(e.params.navigation.lockClass))}),t("click",(r,s)=>{let{nextEl:g,prevEl:y}=e.navigation;g=Z(g),y=Z(y);let u=s.target,x=y.includes(u)||g.includes(u);if(e.isElement&&!x){let M=s.path||s.composedPath&&s.composedPath();M&&(x=M.find(k=>g.includes(k)||y.includes(k)))}if(e.params.navigation.hideOnClick&&!x){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===u||e.pagination.el.contains(u)))return;let M;g.length?M=g[0].classList.contains(e.params.navigation.hiddenClass):y.length&&(M=y[0].classList.contains(e.params.navigation.hiddenClass)),n(M===!0?"navigationShow":"navigationHide"),[...g,...y].filter(k=>!!k).forEach(k=>k.classList.toggle(e.params.navigation.hiddenClass))}});let b=()=>{e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")),v(),m()},h=()=>{e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")),_()};Object.assign(e.navigation,{enable:b,disable:h,update:m,init:v,destroy:_})}function Te(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function eo({swiper:e,extendParams:a,on:t,emit:n}){let o="swiper-pagination";a({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:u=>u,formatFractionTotal:u=>u,bulletClass:`${o}-bullet`,bulletActiveClass:`${o}-bullet-active`,modifierClass:`${o}-`,currentClass:`${o}-current`,totalClass:`${o}-total`,hiddenClass:`${o}-hidden`,progressbarFillClass:`${o}-progressbar-fill`,progressbarOppositeClass:`${o}-progressbar-opposite`,clickableClass:`${o}-clickable`,lockClass:`${o}-lock`,horizontalClass:`${o}-horizontal`,verticalClass:`${o}-vertical`,paginationDisabledClass:`${o}-disabled`}}),e.pagination={el:null,bullets:[]};let l,m=0;function c(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function d(u,x){let{bulletActiveClass:M}=e.params.pagination;u&&(u=u[`${x==="prev"?"previous":"next"}ElementSibling`],u&&(u.classList.add(`${M}-${x}`),u=u[`${x==="prev"?"previous":"next"}ElementSibling`],u&&u.classList.add(`${M}-${x}-${x}`)))}function v(u,x,M){if(u=u%M,x=x%M,x===u+1)return"next";if(x===u-1)return"previous"}function _(u){let x=u.target.closest(Te(e.params.pagination.bulletClass));if(!x)return;u.preventDefault();let M=kt(x)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===M)return;let k=v(e.realIndex,M,e.slides.length);k==="next"?e.slideNext():k==="previous"?e.slidePrev():e.slideToLoop(M)}else e.slideTo(M)}function b(){let u=e.rtl,x=e.params.pagination;if(c())return;let M=e.pagination.el;M=Z(M);let k,z,D=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,L=e.params.loop?Math.ceil(D/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(z=e.previousRealIndex||0,k=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(k=e.snapIndex,z=e.previousSnapIndex):(z=e.previousIndex||0,k=e.activeIndex||0),x.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){let S=e.pagination.bullets,j,q,I;if(x.dynamicBullets&&(l=hi(S[0],e.isHorizontal()?"width":"height",!0),M.forEach(T=>{T.style[e.isHorizontal()?"width":"height"]=`${l*(x.dynamicMainBullets+4)}px`}),x.dynamicMainBullets>1&&z!==void 0&&(m+=k-(z||0),m>x.dynamicMainBullets-1?m=x.dynamicMainBullets-1:m<0&&(m=0)),j=Math.max(k-m,0),q=j+(Math.min(S.length,x.dynamicMainBullets)-1),I=(q+j)/2),S.forEach(T=>{let O=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(V=>`${x.bulletActiveClass}${V}`)].map(V=>typeof V=="string"&&V.includes(" ")?V.split(" "):V).flat();T.classList.remove(...O)}),M.length>1)S.forEach(T=>{let O=kt(T);O===k?T.classList.add(...x.bulletActiveClass.split(" ")):e.isElement&&T.setAttribute("part","bullet"),x.dynamicBullets&&(O>=j&&O<=q&&T.classList.add(...`${x.bulletActiveClass}-main`.split(" ")),O===j&&d(T,"prev"),O===q&&d(T,"next"))});else{let T=S[k];if(T&&T.classList.add(...x.bulletActiveClass.split(" ")),e.isElement&&S.forEac
vendor: 4,928 bytes, line 1
1h((O,V)=>{O.setAttribute("part",V===k?"bullet-active":"bullet")}),x.dynamicBullets){let O=S[j],V=S[q];for(let P=j;P<=q;P+=1)S[P]&&S[P].classList.add(...`${x.bulletActiveClass}-main`.split(" "));d(O,"prev"),d(V,"next")}}if(x.dynamicBullets){let T=Math.min(S.length,x.dynamicMainBullets+4),O=(l*T-l)/2-I*l,V=u?"right":"left";S.forEach(P=>{P.style[e.isHorizontal()?V:"top"]=`${O}px`})}}M.forEach((S,j)=>{if(x.type==="fraction"&&(S.querySelectorAll(Te(x.currentClass)).forEach(q=>{q.textContent=x.formatFractionCurrent(k+1)}),S.querySelectorAll(Te(x.totalClass)).forEach(q=>{q.textContent=x.formatFractionTotal(L)})),x.type==="progressbar"){let q;x.progressbarOpposite?q=e.isHorizontal()?"vertical":"horizontal":q=e.isHorizontal()?"horizontal":"vertical";let I=(k+1)/L,T=1,O=1;q==="horizontal"?T=I:O=I,S.querySelectorAll(Te(x.progressbarFillClass)).forEach(V=>{V.style.transform=`translate3d(0,0,0) scaleX(${T}) scaleY(${O})`,V.style.transitionDuration=`${e.params.speed}ms`})}x.type==="custom"&&x.renderCustom?(ye(S,x.renderCustom(e,k+1,L)),j===0&&n("paginationRender",S)):(j===0&&n("paginationRender",S),n("paginationUpdate",S)),e.params.watchOverflow&&e.enabled&&S.classList[e.isLocked?"add":"remove"](x.lockClass)})}function h(){let u=e.params.pagination;if(c())return;let x=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length,M=e.pagination.el;M=Z(M);let k="";if(u.type==="bullets"){let z=e.params.loop?Math.ceil(x/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&z>x&&(z=x);for(let D=0;D<z;D+=1)u.renderBullet?k+=u.renderBullet.call(e,D,u.bulletClass):k+=`<${u.bulletElement} ${e.isElement?'part="bullet"':""} class="${u.bulletClass}"></${u.bulletElement}>`}u.type==="fraction"&&(u.renderFraction?k=u.renderFraction.call(e,u.currentClass,u.totalClass):k=`<span class="${u.currentClass}"></span> / <span class="${u.totalClass}"></span>`),u.type==="progressbar"&&(u.renderProgressbar?k=u.renderProgressbar.call(e,u.progressbarFillClass):k=`<span class="${u.progressbarFillClass}"></span>`),e.pagination.bullets=[],M.forEach(z=>{u.type!=="custom"&&ye(z,k||""),u.type==="bullets"&&e.pagination.bullets.push(...z.querySelectorAll(Te(u.bulletClass)))}),u.type!=="custom"&&n("paginationRender",M[0])}function r(){e.params.pagination=yt(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});let u=e.params.pagination;if(!u.el)return;let x;typeof u.el=="string"&&e.isElement&&(x=e.el.querySelector(u.el)),!x&&typeof u.el=="string"&&(x=[...document.querySelectorAll(u.el)]),x||(x=u.el),!(!x||x.length===0)&&(e.params.uniqueNavElements&&typeof u.el=="string"&&Array.isArray(x)&&x.length>1&&(x=[...e.el.querySelectorAll(u.el)],x.length>1&&(x=x.find(M=>We(M,".swiper")[0]===e.el))),Array.isArray(x)&&x.length===1&&(x=x[0]),Object.assign(e.pagination,{el:x}),x=Z(x),x.forEach(M=>{u.type==="bullets"&&u.clickable&&M.classList.add(...(u.clickableClass||"").split(" ")),M.classList.add(u.modifierClass+u.type),M.classList.add(e.isHorizontal()?u.horizontalClass:u.verticalClass),u.type==="bullets"&&u.dynamicBullets&&(M.classList.add(`${u.modifierClass}${u.type}-dynamic`),m=0,u.dynamicMainBullets<1&&(u.dynamicMainBullets=1)),u.type==="progressbar"&&u.progressbarOpposite&&M.classList.add(u.progressbarOppositeClass),u.clickable&&M.addEventListener("click",_),e.enabled||M.classList.add(u.lockClass)}))}function s(){let u=e.params.pagination;if(c())return;let x=e.pagination.el;x&&(x=Z(x),x.forEach(M=>{M.classList.remove(u.hiddenClass),M.classList.remove(u.modifierClass+u.type),M.classList.remove(e.isHorizontal()?u.horizontalClass:u.verticalClass),u.clickable&&(M.classList.remove(...(u.clickableClass||"").split(" ")),M.removeEventListener("click",_))})),e.pagination.bullets&&e.pagination.bullets.forEach(M=>M.classList.remove(...u.bulletActiveClass.split(" ")))}t("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;let u=e.params.pagination,{el:x}=e.pagination;x=Z(x),x.forEach(M=>{M.classList.remove(u.horizontalClass,u.verticalClass),M.classList.add(e.isHorizontal()?u.horizontalClass:u.verticalClass)})}),t("init",()=>{e.params.pagination.enabled===!1?y():(r(),h(),b())}),t("activeIndexChange",()=>{typeof e.snapIndex>"u"&&b()}),t("snapIndexChange",()=>{b()}),t("snapGridLengthChange",()=>{h(),b()}),t("destroy",()=>{s()}),t("enable disable",()=>{let{el:u}=e.pagination;u&&(u=Z(u),u.forEach(x=>x.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),t("lock unlock",()=>{b()}),t("click",(u,x)=>{let M=x.target,k=Z(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&k&&k.length>0&&!M.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&M===e.navigation.nextEl||e.navigation.prevEl&&M===e.navigation.prevEl))return;let z=k[0].classList.contains(e.params.pagination.hiddenClass);
vendor: 18,108 bytes, line 1
1n(z===!0?"paginationShow":"paginationHide"),k.forEach(D=>D.classList.toggle(e.params.pagination.hiddenClass))}});let g=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:u}=e.pagination;u&&(u=Z(u),u.forEach(x=>x.classList.remove(e.params.pagination.paginationDisabledClass))),r(),h(),b()},y=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:u}=e.pagination;u&&(u=Z(u),u.forEach(x=>x.classList.add(e.params.pagination.paginationDisabledClass))),s()};Object.assign(e.pagination,{enable:g,disable:y,render:h,update:b,init:r,destroy:s})}function to({swiper:e,extendParams:a,on:t,emit:n}){let o=me(),l=!1,m=null,c=null,d,v,_,b;a({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),e.scrollbar={el:null,dragEl:null};function h(){if(!e.params.scrollbar.el||!e.scrollbar.el)return;let{scrollbar:I,rtlTranslate:T}=e,{dragEl:O,el:V}=I,P=e.params.scrollbar,A=e.params.loop?e.progressLoop:e.progress,w=v,U=(_-v)*A;T?(U=-U,U>0?(w=v-U,U=0):-U+v>_&&(w=_+U)):U<0?(w=v+U,U=0):U+v>_&&(w=_-U),e.isHorizontal()?(O.style.transform=`translate3d(${U}px, 0, 0)`,O.style.width=`${w}px`):(O.style.transform=`translate3d(0px, ${U}px, 0)`,O.style.height=`${w}px`),P.hide&&(clearTimeout(m),V.style.opacity=1,m=setTimeout(()=>{V.style.opacity=0,V.style.transitionDuration="400ms"},1e3))}function r(I){!e.params.scrollbar.el||!e.scrollbar.el||(e.scrollbar.dragEl.style.transitionDuration=`${I}ms`)}function s(){if(!e.params.scrollbar.el||!e.scrollbar.el)return;let{scrollbar:I}=e,{dragEl:T,el:O}=I;T.style.width="",T.style.height="",_=e.isHorizontal()?O.offsetWidth:O.offsetHeight,b=e.size/(e.virtualSize+e.params.slidesOffsetBefore-(e.params.centeredSlides?e.snapGrid[0]:0)),e.params.scrollbar.dragSize==="auto"?v=_*b:v=parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?T.style.width=`${v}px`:T.style.height=`${v}px`,b>=1?O.style.display="none":O.style.display="",e.params.scrollbar.hide&&(O.style.opacity=0),e.params.watchOverflow&&e.enabled&&I.el.classList[e.isLocked?"add":"remove"](e.params.scrollbar.lockClass)}function g(I){return e.isHorizontal()?I.clientX:I.clientY}function y(I){let{scrollbar:T,rtlTranslate:O}=e,{el:V}=T,P;P=(g(I)-rt(V)[e.isHorizontal()?"left":"top"]-(d!==null?d:v/2))/(_-v),P=Math.max(Math.min(P,1),0),O&&(P=1-P);let A=e.minTranslate()+(e.maxTranslate()-e.minTranslate())*P;e.updateProgress(A),e.setTranslate(A),e.updateActiveIndex(),e.updateSlidesClasses()}function u(I){let T=e.params.scrollbar,{scrollbar:O,wrapperEl:V}=e,{el:P,dragEl:A}=O;l=!0,d=I.target===A?g(I)-I.target.getBoundingClientRect()[e.isHorizontal()?"left":"top"]:null,I.preventDefault(),I.stopPropagation(),V.style.transitionDuration="100ms",A.style.transitionDuration="100ms",y(I),clearTimeout(c),P.style.transitionDuration="0ms",T.hide&&(P.style.opacity=1),e.params.cssMode&&(e.wrapperEl.style["scroll-snap-type"]="none"),n("scrollbarDragStart",I)}function x(I){let{scrollbar:T,wrapperEl:O}=e,{el:V,dragEl:P}=T;l&&(I.preventDefault&&I.cancelable?I.preventDefault():I.returnValue=!1,y(I),O.style.transitionDuration="0ms",V.style.transitionDuration="0ms",P.style.transitionDuration="0ms",n("scrollbarDragMove",I))}function M(I){let T=e.params.scrollbar,{scrollbar:O,wrapperEl:V}=e,{el:P}=O;l&&(l=!1,e.params.cssMode&&(e.wrapperEl.style["scroll-snap-type"]="",V.style.transitionDuration=""),T.hide&&(clearTimeout(c),c=st(()=>{P.style.opacity=0,P.style.transitionDuration="400ms"},1e3)),n("scrollbarDragEnd",I),T.snapOnRelease&&e.slideToClosest())}function k(I){let{scrollbar:T,params:O}=e,V=T.el;if(!V)return;let P=V,A=O.passiveListeners?{passive:!1,capture:!1}:!1,w=O.passiveListeners?{passive:!0,capture:!1}:!1;if(!P)return;let U=I==="on"?"addEventListener":"removeEventListener";P[U]("pointerdown",u,A),o[U]("pointermove",x,A),o[U]("pointerup",M,w)}function z(){!e.params.scrollbar.el||!e.scrollbar.el||k("on")}function D(){!e.params.scrollbar.el||!e.scrollbar.el||k("off")}function L(){let{scrollbar:I,el:T}=e;e.params.scrollbar=yt(e,e.originalParams.scrollbar,e.params.scrollbar,{el:"swiper-scrollbar"});let O=e.params.scrollbar;if(!O.el)return;let V;if(typeof O.el=="string"&&e.isElement&&(V=e.el.querySelector(O.el)),!V&&typeof O.el=="string"){if(V=o.querySelectorAll(O.el),!V.length)return}else V||(V=O.el);e.params.uniqueNavElements&&typeof O.el=="string"&&V.length>1&&T.querySelectorAll(O.el).length===1&&(V=T.querySelector(O.el)),V.length>0&&(V=V[0]),V.classList.add(e.isHorizontal()?O.horizontalClass:O.verticalClass);let P;V&&(P=V.querySelector(Te(e.params.scrollbar.dragClass)),P||(P=be("div",e.params.scrollbar.dragClass),V.append(P))),Object.assign(I,{el:V,dragEl:P}),O.draggable&&z(),V&&V.classList[e.enabled?"remove":"add"](...Ge(e.params.scrollbar.lockClass))}function S(){let I=e.params.scrollbar,T=e.scrollbar.el;T&&T.classList.remove(...Ge(e.isHorizontal()?I.horizontalClass:I.verticalClass)),D()}t("changeDirection",()=>{if(!e.scrollbar||!e.scrollbar.el)return;let I=e.params.scrollbar,{el:T}=e.scrollbar;T=Z(T),T.forEach(O=>{O.classList.remove(I.horizontalClass,I.verticalClass),O.classList.add(e.isHorizontal()?I.horizontalClass:I.verticalClass)})}),t("init",()=>{e.params.scrollbar.enabled===!1?q():(L(),s(),h())}),t("update resize observerUpdate lock unlock changeDirection",()=>{s()}),t("setTranslate",()=>{h()}),t("setTransition",(I,T)=>{r(T)}),t("enable disable",()=>{let{el:I}=e.scrollbar;I&&I.classList[e.enabled?"remove":"add"](...Ge(e.params.scrollbar.lockClass))}),t("destroy",()=>{S()});let j=()=>{e.el.classList.remove(...Ge(e.params.scrollbar.scrollbarDisabledClass)),e.scrollbar.el&&e.scrollbar.el.classList.remove(...Ge(e.params.scrollbar.scrollbarDisabledClass)),L(),s(),h()},q=()=>{e.el.classList.add(...Ge(e.params.scrollbar.scrollbarDisabledClass)),e.scrollbar.el&&e.scrollbar.el.classList.add(...Ge(e.params.scrollbar.scrollbarDisabledClass)),S()};Object.assign(e.scrollbar,{enable:j,disable:q,updateSize:s,setTranslate:h,init:L,destroy:S})}function no({swiper:e,extendParams:a,on:t}){a({parallax:{enabled:!1}});let n="[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]",o=(c,d)=>{let{rtl:v}=e,_=v?-1:1,b=c.getAttribute("data-swiper-parallax")||"0",h=c.getAttribute("data-swiper-parallax-x"),r=c.getAttribute("data-swiper-parallax-y"),s=c.getAttribute("data-swiper-parallax-scale"),g=c.getAttribute("data-swiper-parallax-opacity"),y=c.getAttribute("data-swiper-parallax-rotate");if(h||r?(h=h||"0",r=r||"0"):e.isHorizontal()?(h=b,r="0"):(r=b,h="0"),h.indexOf("%")>=0?h=`${parseInt(h,10)*d*_}%`:h=`${h*d*_}px`,r.indexOf("%")>=0?r=`${parseInt(r,10)*d}%`:r=`${r*d}px`,typeof g<"u"&&g!==null){let x=g-(g-1)*(1-Math.abs(d));c.style.opacity=x}let u=`translate3d(${h}, ${r}, 0px)`;if(typeof s<"u"&&s!==null){let x=s-(s-1)*(1-Math.abs(d));u+=` scale(${x})`}if(y&&typeof y<"u"&&y!==null){let x=y*d*-1;u+=` rotate(${x}deg)`}c.style.transform=u},l=()=>{let{el:c,slides:d,progress:v,snapGrid:_,isElement:b}=e,h=Pe(c,n);e.isElement&&h.push(...Pe(e.hostEl,n)),h.forEach(r=>{o(r,v)}),d.forEach((r,s)=>{let g=r.progress;e.params.slidesPerGroup>1&&e.params.slidesPerView!=="auto"&&(g+=Math.ceil(s/2)-v*(_.length-1)),g=Math.min(Math.max(g,-1),1),r.querySelectorAll(`${n}, [data-swiper-parallax-rotate]`).forEach(y=>{o(y,g)})})},m=(c=e.params.speed)=>{let{el:d,hostEl:v}=e,_=[...d.querySelectorAll(n)];e.isElement&&_.push(...v.querySelectorAll(n)),_.forEach(b=>{let h=parseInt(b.getAttribute("data-swiper-parallax-duration"),10)||c;c===0&&(h=0),b.style.transitionDuration=`${h}ms`})};t("beforeInit",()=>{e.params.parallax.enabled&&(e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)}),t("init",()=>{e.params.parallax.enabled&&l()}),t("setTranslate",()=>{e.params.parallax.enabled&&l()}),t("setTransition",(c,d)=>{e.params.parallax.enabled&&m(d)})}function pn({swiper:e,extendParams:a,on:t,emit:n}){let o=ae();a({zoom:{enabled:!1,limitToOriginalSize:!1,maxRatio:3,minRatio:1,panOnMouseMove:!1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),e.zoom={enabled:!1};let l=1,m=!1,c=!1,d={x:0,y:0},v=-3,_,b,h=[],r={originX:0,originY:0,slideEl:void 0,slideWidth:void 0,slideHeight:void 0,imageEl:void 0,imageWrapEl:void 0,maxRatio:3},s={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},g={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0},y=1;Object.defineProperty(e.zoom,"scale",{get(){return y},set(R){if(y!==R){let X=r.imageEl,W=r.slideEl;n("zoomChange",R,X,W)}y=R}});function u(){if(h.length<2)return 1;let R=h[0].pageX,X=h[0].pageY,W=h[1].pageX,B=h[1].pageY;return Math.sqrt((W-R)**2+(B-X)**2)}function x(){let R=e.params.zoom,X=r.imageWrapEl.getAttribute("data-swiper-zoom")||R.maxRatio;if(R.limitToOriginalSize&&r.imageEl&&r.imageEl.naturalWidth){let W=r.imageEl.naturalWidth/r.imageEl.offsetWidth;return Math.min(W,X)}return X}function M(){if(h.length<2)return{x:null,y:null};let R=r.imageEl.getBoundingClientRect();return[(h[0].pageX+(h[1].pageX-h[0].pageX)/2-R.x-o.scrollX)/l,(h[0].pageY+(h[1].pageY-h[0].pageY)/2-R.y-o.scrollY)/l]}function k(){return e.isElement?"swiper-slide":`.${e.params.slideClass}`}function z(R){let X=k();return!!(R.target.matches(X)||e.slides.filter(W=>W.contains(R.target)).length>0)}function D(R){let X=`.${e.params.zoom.containerClass}`;return!!(R.target.matches(X)||[...e.hostEl.querySelectorAll(X)].filter(W=>W.contains(R.target)).length>0)}function L(R){if(R.pointerType==="mouse"&&h.splice(0,h.length),!z(R))return;let X=e.params.zoom;if(_=!1,b=!1,h.push(R),!(h.length<2)){if(_=!0,r.scaleStart=u(),!r.slideEl){r.slideEl=R.target.closest(`.${e.params.slideClass}, swiper-slide`),r.slideEl||(r.slideEl=e.slides[e.activeIndex]);let W=r.slideEl.querySelector(`.${X.containerClass}`);if(W&&(W=W.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),r.imageEl=W,W?r.imageWrapEl=We(r.imageEl,`.${X.containerClass}`)[0]:r.imageWrapEl=void 0,!r.imageWrapEl){r.imageEl=void 0;return}r.maxRatio=x()}if(r.imageEl){let[W,B]=M();r.originX=W,r.originY=B,r.imageEl.style.transitionDuration="0ms"}m=!0}}function S(R){if(!z(R))return;let X=e.params.zoom,W=e.zoom,B=h.findIndex(ne=>ne.pointerId===R.pointerId);B>=0&&(h[B]=R),!(h.length<2)&&(b=!0,r.scaleMove=u(),r.imageEl&&(W.scale=r.scaleMove/r.scaleStart*l,W.scale>r.maxRatio&&(W.scale=r.maxRatio-1+(W.scale-r.maxRatio+1)**.5),W.scale<X.minRatio&&(W.scale=X.minRatio+1-(X.minRatio-W.scale+1)**.5),r.imageEl.style.transform=`translate3d(0,0,0) scale(${W.scale})`))}function j(R){if(!z(R)||R.pointerType==="mouse"&&R.type==="pointerout")return;let X=e.params.zoom,W=e.zoom,B=h.findIndex(ne=>ne.pointerId===R.pointerId);B>=0&&h.splice(B,1),!(!_||!b)&&(_=!1,b=!1,r.imageEl&&(W.scale=Math.max(Math.min(W.scale,r.maxRatio),X.minRatio),r.imageEl.style.transitionDuration=`${e.params.speed}ms`,r.imageEl.style.transform=`translate3d(0,0,0) scale(${W.scale})`,l=W.scale,m=!1,W.scale>1&&r.slideEl?r.slideEl.classList.add(`${X.zoomedSlideClass}`):W.scale<=1&&r.slideEl&&r.slideEl.classList.remove(`${X.zoomedSlideClass}`),W.scale===1&&(r.originX=0,r.originY=0,r.slideEl=void 0)))}let q;function I(){e.touchEventsData.preventTouchMoveFromPointerMove=!1}function T(){clearTimeout(q),e.touchEventsData.preventTouchMoveFromPointerMove=!0,q=setTimeout(()=>{e.destroyed||I()})}function O(R){let X=e.device;if(!r.imageEl||s.isTouched)return;X.android&&R.cancelable&&R.preventDefault(),s.isTouched=!0;let W=h.length>0?h[0]:R;s.touchesStart.x=W.pageX,s.touchesStart.y=W.pageY}function V(R){let W=R.pointerType==="mouse"&&e.params.zoom.panOnMouseMove;if(!z(R)||!D(R))return;let B=e.zoom;if(!r.imageEl)return;if(!s.isTouched||!r.slideEl){W&&w(R);return}if(W){w(R);return}s.isMoved||(s.width=r.imageEl.offsetWidth||r.imageEl.clientWidth,s.height=r.imageEl.offsetHeight||r.imageEl.clientHeight,s.startX=un(r.imageWrapEl,"x")||0,s.startY=un(r.imageWrapEl,"y")||0,r.slideWidth=r.slideEl.offsetWidth,r.slideHeight=r.slideEl.offsetHeight,r.imageWrapEl.style.transitionDuration="0ms");let ne=s.width*B.scale,fe=s.height*B.scale;if(s.minX=Math.min(r.slideWidth/2-ne/2,0),s.maxX=-s.minX,s.minY=Math.min(r.slideHeight/2-fe/2,0),s.maxY=-s.minY,s.touchesCurrent.x=h.length>0?h[0].pageX:R.pageX,s.touchesCurrent.y=h.length>0?h[0].pageY:R.pageY,Math.max(Math.abs(s.touchesCurrent.x-s.touchesStart.x),Math.abs(s.touchesCurrent.y-s.touchesStart.y))>5&&(e.allowClick=!1),!s.isMoved&&!m){if(e.isHorizontal()&&(Math.floor(s.minX)===Math.floor(s.startX)&&s.touchesCurrent.x<s.touchesStart.x||Math.floor(s.maxX)===Math.floor(s.startX)&&s.touchesCurrent.x>s.touchesStart.x)){s.isTouched=!1,I();return}if(!e.isHorizontal()&&(Math.floor(s.minY)===Math.floor(s.startY)&&s.touchesCurrent.y<s.touchesStart.y||Math.floor(s.maxY)===Math.floor(s.startY)&&s.touchesCurrent.y>s.touchesStart.y)){s.isTouched=!1,I();return}}R.cancelable&&R.preventDefault(),R.stopPropagation(),T(),s.isMoved=!0;let Be=(B.scale-l)/(r.maxRatio-e.params.zoom.minRatio),{originX:Ke,originY:ge}=r;s.currentX=s.touchesCurrent.x-s.touchesStart.x+s.startX+Be*(s.width-Ke*2),s.currentY=s.touchesCurrent.y-s.touchesStart.y+s.startY+Be*(s.height-ge*2),s.currentX<s.minX&&(s.currentX=s.minX+1-(s.minX-s.currentX+1)**.8),s.currentX>s.maxX&&(s.currentX=s.maxX-1+(s.currentX-s.maxX+1)**.8),s.currentY<s.minY&&(s.currentY=s.minY+1-(s.minY-s.currentY+1)**.8),s.currentY>s.maxY&&(s.currentY=s.maxY-1+(s.currentY-s.maxY+1)**.8),g.prevPositionX||(g.prevPositionX=s.touchesCurrent.x),g.prevPositionY||(g.prevPositionY=s.touchesCurrent.y),g.prevTime||(g.prevTime=Date.now()),g.x=(s.touchesCurrent.x-g.prevPositionX)/(Date.now()-g.prevTime)/2,g.y=(s.touchesCurrent.y-g.prevPositionY)/(Date.now()-g.prevTime)/2,Math.abs(s.touchesCurrent.x-g.prevPositionX)<2&&(g.x=0),Math.abs(s.touchesCurrent.y-g.prevPositionY)<2&&(g.y=0),g.prevPositionX=s.touchesCurrent.x,g.prevPositionY=s.touchesCurrent.y,g.prevTime=Date.now(),r.imageWrapEl.style.transform=`translate3d(${s.currentX}px, ${s.currentY}px,0)`}function P(){let R=e.zoom;if(h.length=0,!r.imageEl)return;if(!s.isTouched||!s.isMoved){s.isTouched=!1,s.isMoved=!1;return}s.isTouched=!1,s.isMoved=!1;let X=300,W=300,B=g.x*X,ne=s.currentX+B,fe=g.y*W,Qe=s.currentY+fe;g.x!==0&&(X=Math.abs((ne-s.currentX)/g.x)),g.y!==0&&(W=Math.abs((Qe-s.currentY)/g.y));let Be=Math.max(X,W);s.currentX=ne,s.currentY=Qe;let Ke=s.width*R.scale,ge=s.height*R.scale;s.minX=Math.min(r.slideWidth/2-Ke/2,0),s.maxX=-s.minX,s.minY=Math.min(r.slideHeight/2-ge/2,0),s.maxY=-s.minY,s.currentX=Math.max(Math.min(s.currentX,s.maxX),s.minX),s.currentY=Math.max(Math.min(s.currentY,s.maxY),s.minY),r.imageWrapEl.style.transitionDuration=`${Be}ms`,r.imageWrapEl.style.transform=`translate3d(${s.currentX}px, ${s.currentY}px,0)`}function A(){let R=e.zoom;r.slideEl&&e.activeIndex!==e.slides.indexOf(r.slideEl)&&(r.imageEl&&(r.imageEl.style.transform="translate3d(0,0,0) scale(1)"),r.imageWrapEl&&(r.imageWrapEl.style.transform="translate3d(0,0,0)"),r.slideEl.classList.remove(`${e.params.zoom.zoomedSlideClass}`),R.scale=1,l=1,r.slideEl=void 0,r.imageEl=void 0,r.imageWrapEl=void 0,r.originX=0,r.originY=0)}function w(R){if(l<=1||!r.imageWrapEl||!z(R)||!D(R))return;let X=o.getComputedStyle(r.imageWrapEl).transform,W=new o.DOMMatrix(X);if(!c){c=!0,d.x=R.clientX,d.y=R.clientY,s.startX=W.e,s.startY=W.f,s.width=r.imageEl.offsetWidth||r.imageEl.clientWidth,s.height=r.imageEl.offsetHeight||r.imageEl.clientHeight,r.slideWidth=r.slideEl.offsetWidth,r.slideHeight=r.slideEl.offsetHeight;return}let B=(R.clientX-d.x)*v,ne=(R.clientY-d.y)*v,fe=s.width*l,Qe=s.height*l,Be=r.slideWidth,Ke=r.slideHeight,ge=Math.min(Be/2-fe/2,0),De=-ge,Pt=Math.min(Ke/2-Qe/2,0),Vt=-Pt,mt=Math.max(Math.min(s.startX+B,De),ge),ut=Math.max(Math.min(s.startY+ne,Vt),Pt);r.imageWrapEl.style.transitionDuration="0ms",r.imageWrapEl.style.transform=`translate3d(${mt}px, ${ut}px, 0)`,d.x=R.clientX,d.y=R.clientY,s.startX=mt,s.startY=ut,s.currentX=mt,s.currentY=ut}function U(R){let X=e.zoom,W=e.params.zoom;if(!r.slideEl){R&&R.target&&(r.slideEl=R.target.closest(`.${e.params.slideClass}, swiper-slide`)),r.slideEl||(e.params.virtual&&e.params.virtual.enabled&&e.virtual?r.slideEl=Pe(e.slidesEl,`.${e.params.slideActiveClass}`)[0]:r.slideEl=e.slides[e.activeIndex]);let Et=r.slideEl.querySelector(`.${W.containerClass}`);Et&&(Et=Et.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),r.imageEl=Et,Et?r.imageWrapEl=We(r.imageEl,`.${W.containerClass}`)[0]:r.imageWrapEl=void 0}if(!r.imageEl||!r.imageWrapEl)return;r.maxRatio=x(),e.params.cssMode&&(e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.touchAction="none"),r.slideEl.classList.add(`${W.zoomedSlideClass}`);let B,ne,fe,Qe,Be,Ke,ge,De,Pt,Vt,mt,ut,At,$t,tn,nn,on,an;typeof s.touchesStart.x>"u"&&R?(B=R.pageX,ne=R.pageY):(B=s.touchesStart.x,ne=s.touchesStart.y);let ln=l,pt=typeof R=="number"?R:null;l===1&&pt&&(B=void 0,ne=void 0,s.touchesStart.x=void 0,s.touchesStart.y=void 0);let yn=x();X.scale=pt||yn,l=pt||yn,R&&!(l===1&&pt)?(on=r.slideEl.offsetWidth,an=r.slideEl.offsetHeight,fe=rt(r.slideEl).left+o.scrollX,Qe=rt(r.slideEl).top+o.scrollY,Be=fe+on/2-B,Ke=Qe+an/2-ne,Pt=r.imageEl.offsetWidth||r.imageEl.clientWidth,Vt=r.imageEl.offsetHeight||r.imageEl.clientHeight,mt=Pt*X.scale,ut=Vt*X.scale,At=Math.min(on/2-mt/2,0),$t=Math.min(an/2-ut/2,0),tn=-At,nn=-$t,ln>0&&pt&&typeof s.currentX=="number"&&typeof s.currentY=="number"?(ge=s.currentX*X.scale/ln,De=s.currentY*X.scale/ln):(ge=Be*X.scale,De=Ke*X.scale),ge<At&&(ge=At),ge>tn&&(ge=tn),De<$t&&(De=$t),De>nn&&(De=nn)):(ge=0,De=0),pt&&X.scale===1&&(r.originX=0,r.originY=0),s.currentX=ge,s.currentY=De,r.imageWrapEl.style.transitionDuration="300ms",r.imageWrapEl.style.transform=`translate3d(${ge}px, ${De}px,0)`,r.imageEl.style.transitionDuration="300ms",r.imageEl.style.transform=`translate3d(0,
10,0) scale(${X.scale})`}function ee(){let R=e.zoom,X=e.params.zoom;if(!r.slideEl){e.params.virtual&&e.params.virtual.enabled&&e.virtual?r.slideEl=Pe(e.slidesEl,`.${e.params.slideActiveClass}`)[0]:r.slideEl=e.slides[e.activeIndex];let W=r.slideEl.querySelector(`.${X.containerClass}`);W&&(W=W.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),r.imageEl=W,W?r.imageWrapEl=We(r.imageEl,`.${X.containerClass}`)[0]:r.imageWrapEl=void 0}!r.imageEl||!r.imageWrapEl||(r.maxRatio=x(),e.params.cssMode&&(e.wrapperEl.style.overflow="",e.wrapperEl.style.touchAction=""),R.scale=1,l=1,s.currentX=void 0,s.currentY=void 0,s.touchesStart.x=void 0,s.touchesStart.y=void 0,r.imageWrapEl.style.transitionDuration="300ms",r.imageWrapEl.style.transform="translate3d(0,0,0)",r.imageEl.style.transitionDuration="300ms",r.imageEl.style.transform="translate3d(0,0,0) scale(1)",r.slideEl.classList.remove(`${X.zoomedSlideClass}`),r.slideEl=void 0,r.originX=0,r.originY=0,e.params.zoom.panOnMouseMove&&(d={x:0,y:0},c&&(c=!1,s.startX=0,s.startY=0)))}function le(R){let X=e.zoom;X.scale&&X.scale!==1?ee():U(R)}function dt(){let R=e.params.passiveListeners?{passive:!0,capture:!1}:!1,X=e.params.passiveListeners?{passive:!1,capture:!0}:!0;return{passiveListener:R,activeListenerWithCapture:X}}function ve(){let R=e.zoom;if(R.enabled)return;R.enabled=!0;let{passiveListener:X,activeListenerWithCapture:W}
vendor: 29,081 bytes, line 1
1=dt();e.wrapperEl.addEventListener("pointerdown",L,X),e.wrapperEl.addEventListener("pointermove",S,W),["pointerup","pointercancel","pointerout"].forEach(B=>{e.wrapperEl.addEventListener(B,j,X)}),e.wrapperEl.addEventListener("pointermove",V,W)}function Ye(){let R=e.zoom;if(!R.enabled)return;R.enabled=!1;let{passiveListener:X,activeListenerWithCapture:W}=dt();e.wrapperEl.removeEventListener("pointerdown",L,X),e.wrapperEl.removeEventListener("pointermove",S,W),["pointerup","pointercancel","pointerout"].forEach(B=>{e.wrapperEl.removeEventListener(B,j,X)}),e.wrapperEl.removeEventListener("pointermove",V,W)}t("init",()=>{e.params.zoom.enabled&&ve()}),t("destroy",()=>{Ye()}),t("touchStart",(R,X)=>{e.zoom.enabled&&O(X)}),t("touchEnd",(R,X)=>{e.zoom.enabled&&P()}),t("doubleTap",(R,X)=>{!e.animating&&e.params.zoom.enabled&&e.zoom.enabled&&e.params.zoom.toggle&&le(X)}),t("transitionEnd",()=>{e.zoom.enabled&&e.params.zoom.enabled&&A()}),t("slideChange",()=>{e.zoom.enabled&&e.params.zoom.enabled&&e.params.cssMode&&A()}),Object.assign(e.zoom,{enable:ve,disable:Ye,in:U,out:ee,toggle:le})}function io({swiper:e,extendParams:a,on:t}){a({controller:{control:void 0,inverse:!1,by:"slide"}}),e.controller={control:void 0};function n(d,v){let _=(function(){let s,g,y;return(u,x)=>{for(g=-1,s=u.length;s-g>1;)y=s+g>>1,u[y]<=x?g=y:s=y;return s}})();this.x=d,this.y=v,this.lastIndex=d.length-1;let b,h;return this.interpolate=function(s){return s?(h=_(this.x,s),b=h-1,(s-this.x[b])*(this.y[h]-this.y[b])/(this.x[h]-this.x[b])+this.y[b]):0},this}function o(d){e.controller.spline=e.params.loop?new n(e.slidesGrid,d.slidesGrid):new n(e.snapGrid,d.snapGrid)}function l(d,v){let _=e.controller.control,b,h,r=e.constructor;function s(g){if(g.destroyed)return;let y=e.rtlTranslate?-e.translate:e.translate;e.params.controller.by==="slide"&&(o(g),h=-e.controller.spline.interpolate(-y)),(!h||e.params.controller.by==="container")&&(b=(g.maxTranslate()-g.minTranslate())/(e.maxTranslate()-e.minTranslate()),(Number.isNaN(b)||!Number.isFinite(b))&&(b=1),h=(y-e.minTranslate())*b+g.minTranslate()),e.params.controller.inverse&&(h=g.maxTranslate()-h),g.updateProgress(h),g.setTranslate(h,e),g.updateActiveIndex(),g.updateSlidesClasses()}if(Array.isArray(_))for(let g=0;g<_.length;g+=1)_[g]!==v&&_[g]instanceof r&&s(_[g]);else _ instanceof r&&v!==_&&s(_)}function m(d,v){let _=e.constructor,b=e.controller.control,h;function r(s){s.destroyed||(s.setTransition(d,e),d!==0&&(s.transitionStart(),s.params.autoHeight&&st(()=>{s.updateAutoHeight()}),Ze(s.wrapperEl,()=>{b&&s.transitionEnd()})))}if(Array.isArray(b))for(h=0;h<b.length;h+=1)b[h]!==v&&b[h]instanceof _&&r(b[h]);else b instanceof _&&v!==b&&r(b)}function c(){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)}t("beforeInit",()=>{if(typeof window<"u"&&(typeof e.params.controller.control=="string"||e.params.controller.control instanceof HTMLElement)){(typeof e.params.controller.control=="string"?[...document.querySelectorAll(e.params.controller.control)]:[e.params.controller.control]).forEach(v=>{if(e.controller.control||(e.controller.control=[]),v&&v.swiper)e.controller.control.push(v.swiper);else if(v){let _=`${e.params.eventsPrefix}init`,b=h=>{e.controller.control.push(h.detail[0]),e.update(),v.removeEventListener(_,b)};v.addEventListener(_,b)}});return}e.controller.control=e.params.controller.control}),t("update",()=>{c()}),t("resize",()=>{c()}),t("observerUpdate",()=>{c()}),t("setTranslate",(d,v,_)=>{!e.controller.control||e.controller.control.destroyed||e.controller.setTranslate(v,_)}),t("setTransition",(d,v,_)=>{!e.controller.control||e.controller.control.destroyed||e.controller.setTransition(v,_)}),Object.assign(e.controller,{setTranslate:l,setTransition:m})}function oo({swiper:e,extendParams:a,on:t}){a({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,containerRole:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null,scrollOnFocus:!0,wrapperLiveRegion:!0}}),e.a11y={clicked:!1};let n=null,o,l,m=new Date().getTime();function c(P){let A=n;A.length!==0&&ye(A,P)}function d(P=16){let A=()=>Math.round(16*Math.random()).toString(16);return"x".repeat(P).replace(/x/g,A)}function v(P){P=Z(P),P.forEach(A=>{A.setAttribute("tabIndex","0")})}function _(P){P=Z(P),P.forEach(A=>{A.setAttribute("tabIndex","-1")})}function b(P,A){P=Z(P),P.forEach(w=>{w.setAttribute("role",A)})}function h(P,A){P=Z(P),P.forEach(w=>{w.setAttribute("aria-roledescription",A)})}function r(P,A){P=Z(P),P.forEach(w=>{w.setAttribute("aria-label",A)})}function s(P,A){P=Z(P),P.forEach(w=>{w.setAttribute("id",A)})}function g(P,A){P=Z(P),P.forEach(w=>{w.setAttribute("aria-live",A)})}function y(P){P=Z(P),P.forEach(A=>{A.setAttribute("aria-disabled",!0)})}function u(P){P=Z(P),P.forEach(A=>{A.removeAttribute("aria-disabled")})}function x(P){if(P.keyCode!==13&&P.keyCode!==32)return;let A=e.params.a11y,w=P.target;if(!(e.pagination&&e.pagination.el&&(w===e.pagination.el||e.pagination.el.contains(P.target))&&!P.target.matches(Te(e.params.pagination.bulletClass)))){if(e.navigation&&e.navigation.prevEl&&e.navigation.nextEl){let U=Z(e.navigation.prevEl);Z(e.navigation.nextEl).includes(w)&&(e.isEnd&&!e.params.loop||e.slideNext(),e.isEnd?c(A.lastSlideMessage):c(A.nextSlideMessage)),U.includes(w)&&(e.isBeginning&&!e.params.loop||e.slidePrev(),e.isBeginning?c(A.firstSlideMessage):c(A.prevSlideMessage))}e.pagination&&w.matches(Te(e.params.pagination.bulletClass))&&w.click()}}function M(){if(e.params.loop||e.params.rewind||!e.navigation)return;let{nextEl:P,prevEl:A}=e.navigation;A&&(e.isBeginning?(y(A),_(A)):(u(A),v(A))),P&&(e.isEnd?(y(P),_(P)):(u(P),v(P)))}function k(){return e.pagination&&e.pagination.bullets&&e.pagination.bullets.length}function z(){return k()&&e.params.pagination.clickable}function D(){let P=e.params.a11y;k()&&e.pagination.bullets.forEach(A=>{e.params.pagination.clickable&&(v(A),e.params.pagination.renderBullet||(b(A,"button"),r(A,P.paginationBulletMessage.replace(/\{\{index\}\}/,kt(A)+1)))),A.matches(Te(e.params.pagination.bulletActiveClass))?A.setAttribute("aria-current","true"):A.removeAttribute("aria-current")})}let L=(P,A,w)=>{v(P),P.tagName!=="BUTTON"&&(b(P,"button"),P.addEventListener("keydown",x)),r(P,w)},S=P=>{l&&l!==P.target&&!l.contains(P.target)&&(o=!0),e.a11y.clicked=!0},j=()=>{o=!1,requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.destroyed||(e.a11y.clicked=!1)})})},q=P=>{m=new Date().getTime()},I=P=>{if(e.a11y.clicked||!e.params.a11y.scrollOnFocus||new Date().getTime()-m<100)return;let A=P.target.closest(`.${e.params.slideClass}, swiper-slide`);if(!A||!e.slides.includes(A))return;l=A;let w=e.virtual&&e.params.virtual.enabled,U=(w?parseInt(A.getAttribute("data-swiper-slide-index"),10):e.slides.indexOf(A))===e.activeIndex,ee=e.params.watchSlidesProgress&&e.visibleSlides&&e.visibleSlides.includes(A);U||ee||P.sourceCapabilities&&P.sourceCapabilities.firesTouchEvents||(e.isHorizontal()?e.el.scrollLeft=0:e.el.scrollTop=0,requestAnimationFrame(()=>{o||(e.params.loop?e.slideToLoop(e.getSlideIndexWhenGrid(parseInt(A.getAttribute("data-swiper-slide-index"))),0):w?e.slideTo(e.getSlideIndexWhenGrid(parseInt(A.getAttribute("data-swiper-slide-index"),10)),0):e.slideTo(e.getSlideIndexWhenGrid(e.slides.indexOf(A)),0),o=!1)}))},T=()=>{let P=e.params.a11y;P.itemRoleDescriptionMessage&&h(e.slides,P.itemRoleDescriptionMessage),P.slideRole&&b(e.slides,P.slideRole);let A=e.slides.length;P.slideLabelMessage&&e.slides.forEach((w,U)=>{let ee=e.params.loop?parseInt(w.getAttribute("data-swiper-slide-index"),10):U,le=P.slideLabelMessage.replace(/\{\{index\}\}/,ee+1).replace(/\{\{slidesLength\}\}/,A);r(w,le)})},O=()=>{let P=e.params.a11y;e.el.append(n);let A=e.el;P.containerRoleDescriptionMessage&&h(A,P.containerRoleDescriptionMessage),P.containerMessage&&r(A,P.containerMessage),P.containerRole&&b(A,P.containerRole);let w=e.wrapperEl,U=P.id||w.getAttribute("id")||`swiper-wrapper-${d(16)}`;if(s(w,U),P.wrapperLiveRegion){let ve=e.params.autoplay&&e.params.autoplay.enabled?"off":"polite";g(w,ve)}T();let{nextEl:ee,prevEl:le}=e.navigation?e.navigation:{};ee=Z(ee),le=Z(le),ee&&ee.forEach(ve=>L(ve,U,P.nextSlideMessage)),le&&le.forEach(ve=>L(ve,U,P.prevSlideMessage)),z()&&Z(e.pagination.el).forEach(Ye=>{Ye.addEventListener("keydown",x)}),me().addEventListener("visibilitychange",q),e.el.addEventListener("focus",I,!0),e.el.addEventListener("pointerdown",S,!0),e.el.addEventListener("pointerup",j,!0)};function V(){n&&n.remove();let{nextEl:P,prevEl:A}=e.navigation?e.navigation:{};P=Z(P),A=Z(A),P&&P.forEach(U=>U.removeEventListener("keydown",x)),A&&A.forEach(U=>U.removeEventListener("keydown",x)),z()&&Z(e.pagination.el).forEach(ee=>{ee.removeEventListener("keydown",x)}),me().removeEventListener("visibilitychange",q),e.el&&typeof e.el!="string"&&(e.el.removeEventListener("focus",I,!0),e.el.removeEventListener("pointerdown",S,!0),e.el.removeEventListener("pointerup",j,!0))}t("beforeInit",()=>{n=be("span",e.params.a11y.notificationClass),n.setAttribute("aria-live","assertive"),n.setAttribute("aria-atomic","true")}),t("afterInit",()=>{e.params.a11y.enabled&&O()}),t("slidesLengthChange snapGridLengthChange slidesGridLengthChange",()=>{e.params.a11y.enabled&&T()}),t("fromEdge toEdge afterInit lock unlock",()=>{e.params.a11y.enabled&&M()}),t("paginationUpdate",()=>{e.params.a11y.enabled&&D()}),t("destroy",()=>{e.params.a11y.enabled&&V()})}function ao({swiper:e,extendParams:a,on:t}){a({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let n=!1,o={},l=h=>h.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),m=h=>{let r=ae(),s;h?s=new URL(h):s=r.location;let g=s.pathname.slice(1).split("/").filter(M=>M!==""),y=g.length,u=g[y-2],x=g[y-1];return{key:u,value:x}},c=(h,r)=>{let s=ae();if(!n||!e.params.history.enabled)return;let g;e.params.url?g=new URL(e.params.url):g=s.location;let y=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${r}"]`):e.slides[r],u=l(y.getAttribute("data-history"));if(e.params.history.root.length>0){let M=e.params.history.root;M[M.length-1]==="/"&&(M=M.slice(0,M.length-1)),u=`${M}/${h?`${h}/`:""}${u}`}else g.pathname.includes(h)||(u=`${h?`${h}/`:""}${u}`);e.params.history.keepQuery&&(u+=g.search);let x=s.history.state;x&&x.value===u||(e.params.history.replaceState?s.history.replaceState({value:u},null,u):s.history.pushState({value:u},null,u))},d=(h,r,s)=>{if(r)for(let g=0,y=e.slides.length;g<y;g+=1){let u=e.slides[g];if(l(u.getAttribute("data-history"))===r){let M=e.getSlideIndex(u);e.slideTo(M,h,s)}}else e.slideTo(0,h,s)},v=()=>{o=m(e.params.url),d(e.params.speed,o.value,!1)},_=()=>{let h=ae();if(e.params.history){if(!h.history||!h.history.pushState){e.params.history.enabled=!1,e.params.hashNavigation.enabled=!0;return}if(n=!0,o=m(e.params.url),!o.key&&!o.value){e.params.history.replaceState||h.addEventListener("popstate",v);return}d(0,o.value,e.params.runCallbacksOnInit),e.params.history.replaceState||h.addEventListener("popstate",v)}},b=()=>{let h=ae();e.params.history.replaceState||h.removeEventListener("popstate",v)};t("init",()=>{e.params.history.enabled&&_()}),t("destroy",()=>{e.params.history.enabled&&b()}),t("transitionEnd _freeModeNoMomentumRelease",()=>{n&&c(e.params.history.key,e.activeIndex)}),t("slideChange",()=>{n&&e.params.cssMode&&c(e.params.history.key,e.activeIndex)})}function lo({swiper:e,extendParams:a,emit:t,on:n}){let o=!1,l=me(),m=ae();a({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(b,h){if(e.virtual&&e.params.virtual.enabled){let r=e.slides.find(g=>g.getAttribute("data-hash")===h);return r?parseInt(r.getAttribute("data-swiper-slide-index"),10):0}return e.getSlideIndex(Pe(e.slidesEl,`.${e.params.slideClass}[data-hash="${h}"], swiper-slide[data-hash="${h}"]`)[0])}}});let c=()=>{t("hashChange");let b=l.location.hash.replace("#",""),h=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`):e.slides[e.activeIndex],r=h?h.getAttribute("data-hash"):"";if(b!==r){let s=e.params.hashNavigation.getSlideIndex(e,b);if(typeof s>"u"||Number.isNaN(s))return;e.slideTo(s)}},d=()=>{if(!o||!e.params.hashNavigation.enabled)return;let b=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`):e.slides[e.activeIndex],h=b?b.getAttribute("data-hash")||b.getAttribute("data-history"):"";e.params.hashNavigation.replaceState&&m.history&&m.history.replaceState?(m.history.replaceState(null,null,`#${h}`||""),t("hashSet")):(l.location.hash=h||"",t("hashSet"))},v=()=>{if(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)return;o=!0;let b=l.location.hash.replace("#","");if(b){let r=e.params.hashNavigation.getSlideIndex(e,b);e.slideTo(r||0,0,e.params.runCallbacksOnInit,!0)}e.params.hashNavigation.watchState&&m.addEventListener("hashchange",c)},_=()=>{e.params.hashNavigation.watchState&&m.removeEventListener("hashchange",c)};n("init",()=>{e.params.hashNavigation.enabled&&v()}),n("destroy",()=>{e.params.hashNavigation.enabled&&_()}),n("transitionEnd _freeModeNoMomentumRelease",()=>{o&&d()}),n("slideChange",()=>{o&&e.params.cssMode&&d()})}function so({swiper:e,extendParams:a,on:t,emit:n,params:o}){e.autoplay={running:!1,paused:!1,timeLeft:0},a({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let l,m,c=o&&o.autoplay?o.autoplay.delay:3e3,d=o&&o.autoplay?o.autoplay.delay:3e3,v,_=new Date().getTime(),b,h,r,s,g,y;function u(w){!e||e.destroyed||!e.wrapperEl||w.target===e.wrapperEl&&(e.wrapperEl.removeEventListener("transitionend",u),!(y||w.detail&&w.detail.bySwiperTouchMove)&&j())}let x=()=>{if(e.destroyed||!e.autoplay.running)return;e.autoplay.paused?b=!0:b&&(d=v,b=!1);let w=e.autoplay.paused?v:_+d-new Date().getTime();e.autoplay.timeLeft=w,n("autoplayTimeLeft",w,w/c),m=requestAnimationFrame(()=>{x()})},M=()=>{let w;return e.virtual&&e.params.virtual.enabled?w=e.slides.find(ee=>ee.classList.contains("swiper-slide-active")):w=e.slides[e.activeIndex],w?parseInt(w.getAttribute("data-swiper-autoplay"),10):void 0},k=()=>{let w=e.params.autoplay.delay,U=M();return!Number.isNaN(U)&&U>0&&(w=U),w},z=w=>{if(e.destroyed||!e.autoplay.running)return;cancelAnimationFrame(m),x();let U=w;typeof U>"u"&&(U=k(),c=U,d=U),v=U;let ee=e.params.speed,le=()=>{!e||e.destroyed||(e.params.autoplay.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(ee,!0,!0),n("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(e.slides.length-1,ee,!0,!0),n("autoplay")):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(ee,!0,!0),n("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(0,ee,!0,!0),n("autoplay")),e.params.cssMode&&(_=new Date().getTime(),requestAnimationFrame(()=>{z()})))};return U>0?(clearTimeout(l),l=setTimeout(()=>{le()},U)):requestAnimationFrame(()=>{le()}),U},D=()=>{_=new Date().getTime(),e.autoplay.running=!0,z(),n("autoplayStart")},L=()=>{e.autoplay.running=!1,clearTimeout(l),cancelAnimationFrame(m),n("autoplayStop")},S=(w,U)=>{if(e.destroyed||!e.autoplay.running)return;clearTimeout(l),w||(g=!0);let ee=()=>{n("autoplayPause"),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener("transitionend",u):j()};if(e.autoplay.paused=!0,U){ee();return}v=(v||e.params.autoplay.delay)-(new Date().getTime()-_),!(e.isEnd&&v<0&&!e.params.loop)&&(v<0&&(v=0),ee())},j=()=>{e.isEnd&&v<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(_=new Date().getTime(),g?(g=!1,z(v)):z(),e.autoplay.paused=!1,n("autoplayResume"))},q=()=>{if(e.destroyed||!e.autoplay.running)return;let w=me();w.visibilityState==="hidden"&&(g=!0,S(!0)),w.visibilityState==="visible"&&j()},I=w=>{w.pointerType==="mouse"&&(g=!0,y=!0,!(e.animating||e.autoplay.paused)&&S(!0))},T=w=>{w.pointerType==="mouse"&&(y=!1,e.autoplay.paused&&j())},O=()=>{e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",I),e.el.addEventListener("pointerleave",T))},V=()=>{e.el&&typeof e.el!="string"&&(e.el.removeEventListener("pointerenter",I),e.el.removeEventListener("pointerleave",T))},P=()=>{me().addEventListener("visibilitychange",q)},A=()=>{me().removeEventListener("visibilitychange",q)};t("init",()=>{e.params.autoplay.enabled&&(O(),P(),D())}),t("destroy",()=>{V(),A(),e.autoplay.running&&L()}),t("_freeModeStaticRelease",()=>{(r||g)&&j()}),t("_freeModeNoMomentumRelease",()=>{e.params.autoplay.disableOnInteraction?L():S(!0,!0)}),t("beforeTransitionStart",(w,U,ee)=>{e.destroyed||!e.autoplay.running||(ee||!e.params.autoplay.disableOnInteraction?S(!0,!0):L())}),t("sliderFirstMove",()=>{if(!(e.destroyed||!e.autoplay.running)){if(e.params.autoplay.disableOnInteraction){L();return}h=!0,r=!1,g=!1,s=setTimeout(()=>{g=!0,r=!0,S(!0)},200)}}),t("touchEnd",()=>{if(!(e.destroyed||!e.autoplay.running||!h)){if(clearTimeout(s),clearTimeout(l),e.params.autoplay.disableOnInteraction){r=!1,h=!1;return}r&&e.params.cssMode&&j(),r=!1,h=!1}}),t("slideChange",()=>{e.destroyed||!e.autoplay.running||e.autoplay.paused&&(v=k(),c=k())}),Object.assign(e.autoplay,{start:D,stop:L,pause:S,resume:j})}function ro({swiper:e,extendParams:a,on:t}){a({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let n=!1,o=!1;e.thumbs={swiper:null};function l(){let _=e.thumbs.swiper;return!_||_.destroyed?!1:_.params.virtual&&_.params.virtual.enabled}function m(){let _=e.thumbs.swiper;if(!_||_.destroyed)return;let b=_.clickedIndex,h=_.clickedSlide;if(h&&h.classList.contains(e.params.thumbs.slideThumbActiveClass)||typeof b>"u"||b===null)return;let r;_.params.loop?r=parseInt(_.clickedSlide.getAttribute("data-swiper-slide-index"),10):r=b,e.params.loop?e.slideToLoop(r):e.slideTo(r)}function c(){let{thumbs:_}=e.params;if(n)return!1;n=!0;let b=e.constructor;if(_.swiper instanceof b){if(_.swiper.destroyed)return n=!1,!1;e.thumbs.swiper=_.swiper,Object.assign(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),e.thumbs.swiper.update()}else if(vt(_.swiper)){let h=Object.assign({},_.swiper);Object.assign(h,{watchSlidesProgress:!0,slideToClickedSlide:!1}),e.thumbs.swiper=new b(h),o=!0}return e.thumbs.swiper.el.classList.add(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",m),l()&&e.thumbs.swiper.on("virtualUpdate",()=>{d(!1,{autoScroll:!1})}),!0}function d(_,b){let h=e.thumbs.swiper;if(!h||h.destroyed)return;let r=1,s=e.params.thumbs.slideThumbActiveClass;if(e.params.slidesPerView>1&&!e.params.centeredSlides&&(r=e.params.slidesPerView),e.params.thumbs.multipleActiveThumbs||(r=1),r=Math.floor(r),h.slides.forEach(g=>g.classList.remove(s)),h.params.loop||l())for(let g=0;g<r;g+=1)Pe(h.slidesEl,`[data-swiper-slide-index="${e.realIndex+g}"]`).forEach(y=>{y.classList.add(s)});else for(let g=0;g<r;g+=1)h.slides[e.realIndex+g]&&h.slides[e.realIndex+g].classList.add(s);(b?.autoScroll??!0)&&v(_?0:void 0)}function v(_){let b=e.thumbs.swiper;if(!b||b.destroyed)return;let h=b.params.slidesPerView==="auto"?b.slidesPerViewDynamic():b.params.slidesPerView,r=e.params.thumbs.autoScrollOffset,s=r&&!b.params.loop;if(e.realIndex!==b.realIndex||s){let g=b.activeIndex,y,u;if(b.params.loop){let x=b.slides.find(M=>M.getAttribute("data-swiper-slide-index")===`${e.realIndex}`);y=b.slides.indexOf(x),u=e.activeIndex>e.previousIndex?"next":"prev"}else y=e.realIndex,u=y>e.previousIndex?"next":"prev";s&&(y+=u==="next"?r:-1*r),b.visibleSlidesIndexes&&b.visibleSlidesIndexes.indexOf(y)<0&&(b.params.centeredSlides?y>g?y=y-Math.floor(h/2)+1:y=y+Math.floor(h/2)-1:y>g&&b.params.slidesPerGroup,b.slideTo(y,_))}}t("beforeInit",()=>{let{thumbs:_}=e.params;if(!(!_||!_.swiper))if(typeof _.swiper=="string"||_.swiper instanceof HTMLElement){let b=me(),h=()=>{let s=typeof _.swiper=="string"?b.querySelector(_.swiper):_.swiper;if(s&&s.swiper)_.swiper=s.swiper,c(),d(!0);else if(s){let g=`${e.params.eventsPrefix}init`,y=u=>{_.swiper=u.detail[0],s.removeEventListener(g,y),c(),d(!0),_.swiper.update(),e.update()};s.addEventListener(g,y)}return s},r=()=>{if(e.destroyed)return;h()||requestAnimationFrame(r)};requestAnimationFrame(r)}else c(),d(!0)}),t("slideChange update resize observerUpdate",()=>{d()}),t("setTransition",(_,b)=>{let h=e.thumbs.swiper;!h||h.destroyed||h.setTransition(b)}),t("beforeDestroy",()=>{let _=e.thumbs.swiper;!_||_.destroyed||o&&_.destroy()}),Object.assign(e.thumbs,{init:c,update:d})}function co({swiper:e,extendParams:a,emit:t,once:n}){a({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}});function o(){if(e.params.cssMode)return;let c=e.getTranslate();e.setTranslate(c),e.setTransition(0),e.touchEventsData.velocities.length=0,e.freeMode.onTouchEnd({currentPos:e.rtl?e.translate:-e.translate})}function l(){if(e.params.cssMode)return;let{touchEventsData:c,touches:d}=e;c.velocities.length===0&&c.velocities.push({position:d[e.isHorizontal()?"startX":"startY"],time:c.touchStartTime}),c.velocities.push({position:d[e.isHorizontal()?"currentX":"currentY"],time:Le()})}function m({currentPos:c}){if(e.params.cssMode)return;let{params:d,wrapperEl:v,rtlTranslate:_,snapGrid:b,touchEventsData:h}=e,s=Le()-h.touchStartTime;if(c<-e.minTranslate()){e.slideTo(e.activeIndex);return}if(c>-e.maxTranslate()){e.slides.length<b.length?e.slideTo(b.length-1):e.slideTo(e.slides.length-1);return}if(d.freeMode.momentum){if(h.velocities.length>1){let D=h.velocities.pop(),L=h.velocities.pop(),S=D.position-L.position,j=D.time-L.time;e.velocity=S/j,e.velocity/=2,Math.abs(e.velocity)<d.freeMode.minimumVelocity&&(e.velocity=0),(j>150||Le()-D.time>300)&&(e.velocity=0)}else e.velocity=0;e.velocity*=d.freeMode.momentumVelocityRatio,h.velocities.length=0;let g=1e3*d.freeMode.momentumRatio,y=e.velocity*g,u=e.translate+y;_&&(u=-u);let x=!1,M,k=Math.abs(e.velocity)*20*d.freeMode.momentumBounceRatio,z;if(u<e.maxTranslate())d.freeMode.momentumBounce?(u+e.maxTranslate()<-k&&(u=e.maxTranslate()-k),M=e.maxTranslate(),x=!0,h.allowMomentumBounce=!0):u=e.maxTranslate(),d.loop&&d.centeredSlides&&(z=!0);else if(u>e.minTranslate())d.freeMode.momentumBounce?(u-e.minTranslate()>k&&(u=e.minTranslate()+k),M=e.minTranslate(),x=!0,h.allowMomentumBounce=!0):u=e.minTranslate(),d.loop&&d.centeredSlides&&(z=!0);else if(d.freeMode.sticky){let D;for(let L=0;L<b.length;L+=1)if(b[L]>-u){D=L;break}Math.abs(b[D]-u)<Math.abs(b[D-1]-u)||e.swipeDirection==="next"?u=b[D]:u=b[D-1],u=-u}if(z&&n("transitionEnd",()=>{e.loopFix()}),e.velocity!==0){if(_?g=Math.abs((-u-e.translate)/e.velocity):g=Math.abs((u-e.translate)/e.velocity),d.freeMode.sticky){let D=Math.abs((_?-u:u)-e.translate),L=e.slidesSizesGrid[e.activeIndex];D<L?g=d.speed:D<2*L?g=d.speed*1.5:g=d.speed*2.5}}else if(d.freeMode.sticky){e.slideToClosest();return}d.freeMode.momentumBounce&&x?(e.updateProgress(M),e.setTransition(g),e.setTranslate(u),e.transitionStart(!0,e.swipeDirection),e.animating=!0,Ze(v,()=>{!e||e.destroyed||!h.allowMomentumBounce||(t("momentumBounce"),e.setTransition(d.speed),setTimeout(()=>{e.setTranslate(M),Ze(v,()=>{!e||e.destroyed||e.transitionEnd()})},0))})):e.velocity?(t("_freeModeNoMomentumRelease"),e.updateProgress(u),e.setTransition(g),e.setTranslate(u),e.transitionStart(!0,e.swipeDirection),e.animating||(e.animating=!0,Ze(v,()=>{!e||e.destroyed||e.transitionEnd()}))):e.updateProgress(u),e.updateActiveIndex(),e.updateSlidesClasses()}else if(d.freeMode.sticky){e.slideToClosest();return}else d.freeMode&&t("_freeModeNoMomentumRelease");(!d.freeMode.momentum||s>=d.longSwipesMs)&&(t("_freeModeStaticRelease"),e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses())}Object.assign(e,{freeMode:{onTouchStart:o,onTouchMove:l,onTouchEnd:m}})}function mo({swiper:e,extendParams:a,on:t}){a({grid:{rows:1,fill:"column"}});let n,o,l,m,c=()=>{let s=e.params.spaceBetween;return typeof s=="string"&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*e.size:typeof s=="string"&&(s=parseFloat(s)),s},d=s=>{let{slidesPerView:g}=e.params,{rows:y,fill:u}=e.params.grid,x=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:s.length;l=Math.floor(x/y),Math.floor(x/y)===x/y?n=x:n=Math.ceil(x/y)*y,g!=="auto"&&u==="row"&&(n=Math.max(n,Math.floor(g)*y)),o=n/y},v=()=>{e.slides&&e.slides.forEach(s=>{s.swiperSlideGridSet&&(s.style.height="",s.style[e.getDirectionLabel("margin-top")]="")})},_=(s,g,y)=>{let{slidesPerGroup:u}=e.params,x=c(),{rows:M,fill:k}=e.params.grid,z=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:y.length,D,L,S;if(k==="row"&&u>1){let j=Math.floor(s/(u*M)),q=s-M*u*j,I=j===0?u:Math.min(Math.ceil((z-j*M*u)/M),u);S=Math.floor(q/I),L=q-S*I+j*u,D=L+S*n/M,g.style.order=D}else k==="column"?(L=Math.floor(s/M),S=s-L*M,(L>l||L===l&&S===M-1)&&(S+=1,S>=M&&(S=0,L+=1))):(S=Math.floor(s/o),L=s-S*o);g.row=S,g.column=L,g.style.height=`calc((100% - ${(M-1)*x}px) / ${M})`,g.style[e.getDirectionLabel("margin-top")]=S!==0?x&&`${x}px`:"",g.swiperSlideGridSet=!0},b=(s,g)=>{let{centeredSlides:y,roundLengths:u}=e.params,x=c(),{rows:M}=e.params.grid;if(e.virtualSize=(s+x)*n,e.virtualSize=Math.ceil(e.virtualSize/M)-x,e.params.cssMode||(e.wrapperEl.style[e.getDirectionLabel("width")]=`${e.virtualSize+x}px`),y){let k=[];for(let z=0;z<g.length;z+=1){let D=g[z];u&&(D=Math.floor(D)),g[z]<e.virtualSize+g[0]&&k.push(D)}g.splice(0,g.length),g.push(...k)}},h=()=>{m=e.params.grid&&e.params.grid.rows>1},r=()=>{let{params:s,el:g}=e,y=s.grid&&s.grid.rows>1;m&&!y?(g.classList.remove(`${s.containerModifierClass}grid`,`${s.containerModifierClass}grid-column`),l=1,e.emitContainerClasses()):!m&&y&&(g.classList.add(`${s.containerModifierClass}grid`),s.grid.fill==="column"&&g.classList.add(`${s.containerModifierClass}grid-column`),e.emitContainerClasses()),m=y};t("init",h),t("update",r),e.grid={initSlides:d,unsetSlides:v,updateSlide:_,updateWrapperSize:b}}function uo(e){let a=this,{params:t,slidesEl:n}=a;t.loop&&a.loopDestroy();let o=l=>{if(typeof l=="string"){let m=document.createElement("div");ye(m,l),n.append(m.children[0]),ye(m,"")}else n.append(l)};if(typeof e=="object"&&"length"in e)for(let l=0;l<e.length;l+=1)e[l]&&o(e[l]);else o(e);a.recalcSlides(),t.loop&&a.loopCreate(),(!t.observer||a.isElement)&&a.update()}function po(e){let a=this,{params:t,activeIndex:n,slidesEl:o}=a;t.loop&&a.loopDestroy();let l=n+1,m=c=>{if(typeof c=="string"){let d=document.createElement("div");ye(d,c),o.prepend(d.children[0]),ye(d,"")}else o.prepend(c)};if(typeof e=="object"&&"length"in e){for(let c=0;c<e.length;c+=1)e[c]&&m(e[c]);l=n+e.length}else m(e);a.recalcSlides(),t.loop&&a.loopCreate(),(!t.observer||a.isElement)&&a.update(),a.slideTo(l,0,!1)}function fo(e,a){let t=this,{params:n,activeIndex:o,slidesEl:l}=t,m=o;n.loop&&(m-=t.loopedSlides,t.loopDestroy(),t.recalcSlides());let c=t.slides.length;if(e<=0){t.prependSlide(a);return}if(e>=c){t.appendSlide(a);return}let d=m>e?m+1:m,v=[];for(let _=c-1;_>=e;_-=1){let b=t.slides[_];b.remove(),v.unshift(b)}if(typeof a=="object"&&"length"in a){for(let _=0;_<a.length;_+=1)a[_]&&l.append(a[_]);d=m>e?m+a.length:m}else l.append(a);for(let _=0;_<v.length;_+=1)l.append(v[_]);t.recalcSlides(),n.loop&&t.loopCreate(),(!n.observer||t.isElement)&&t.update(),n.loop?t.slideTo(d+t.loopedSlides,0,!1):t.slideTo(d,0,!1)}function go(e){let a=this,{params:t,activeIndex:n}=a,o=n;t.loop&&(o-=a.loopedSlides,a.loopDestroy());let l=o,m;if(typeof e=="object"&&"length"in e){for(let c=0;c<e.length;c+=1)m=e[c],a.slides[m]&&a.slides[m].remove(),m<l&&(l-=1);l=Math.max(l,0)}else m=e,a.slides[m]&&a.slides[m].remove(),m<l&&(l-=1),l=Math.max(l,0);a.recalcSlides(),t.loop&&a.loopCreate(),(!t.observer||a.isElement)&&a.update(),t.loop?a.slideTo(l+a.loopedSlides,0,!1):a.slideTo(l,0,!1)}function ho(){let e=this,a=[];for(let t=0;t<e.slides.length;t+=1)a.push(t);e.removeSlide(a)}function xo({swiper:e}){Object.assign(e,{appendSlide:uo.bind(e),prependSlide:po.bind(e),addSlide:fo.bind(e),removeSlide:go.bind(e),removeAllSlides:ho.bind(e)})}function ke(e){let{effect:a,swiper:t,on:n,setTranslate:o,setTransition:l,overwriteParams:m,perspective:c,recreateShadows:d,getEffectParams:v}=e;n("beforeInit",()=>{if(t.params.effect!==a)return;t.classNames.push(`${t.params.containerModifierClass}${a}`),c&&c()&&t.classNames.push(`${t.params.containerModifierClass}3d`);let b=m?m():{};Object.assign(t.params,b),Object.assign(t.originalParams,b)}),n("setTranslate _virtualUpdated",()=>{t.params.effect===a&&o()}),n("setTransition",(b,h)=>{t.params.effect===a&&l(h)}),n("transitionEnd",()=>{if(t.params.effect===a&&d){if(!v||!v().slideShadows)return;
vendor: 1,062 bytes, line 1
1t.slides.forEach(b=>{b.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(h=>h.remove())}),d()}});let _;n("virtualUpdate",()=>{t.params.effect===a&&(t.slides.length||(_=!0),requestAnimationFrame(()=>{_&&t.slides&&t.slides.length&&(o(),_=!1)}))})}function ze(e,a){let t=Me(a);return t!==a&&(t.style.backfaceVisibility="hidden",t.style["-webkit-backface-visibility"]="hidden"),t}function tt({swiper:e,duration:a,transformElements:t,allSlides:n}){let{activeIndex:o}=e,l=m=>m.parentElement?m.parentElement:e.slides.find(d=>d.shadowRoot&&d.shadowRoot===m.parentNode);if(e.params.virtualTranslate&&a!==0){let m=!1,c;n?c=t:c=t.filter(d=>{let v=d.classList.contains("swiper-slide-transform")?l(d):d;return e.getSlideIndex(v)===o}),c.forEach(d=>{Ze(d,()=>{if(m||!e||e.destroyed)return;m=!0,e.animating=!1;let v=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});e.wrapperEl.dispatchEvent(v)})})}}function _o({swiper:e,extendParams:a,on:t}){a({fadeEffect:{crossFade:!1}}
vendor: 9,732 bytes, line 1
1),ke({effect:"fade",swiper:e,on:t,setTranslate:()=>{let{slides:l}=e,m=e.params.fadeEffect;for(let c=0;c<l.length;c+=1){let d=e.slides[c],_=-d.swiperSlideOffset;e.params.virtualTranslate||(_-=e.translate);let b=0;e.isHorizontal()||(b=_,_=0);let h=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(d.progress),0):1+Math.min(Math.max(d.progress,-1),0),r=ze(m,d);r.style.opacity=h,r.style.transform=`translate3d(${_}px, ${b}px, 0px)`}},setTransition:l=>{let m=e.slides.map(c=>Me(c));m.forEach(c=>{c.style.transitionDuration=`${l}ms`}),tt({swiper:e,duration:l,transformElements:m,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!e.params.cssMode})})}function Co({swiper:e,extendParams:a,on:t}){a({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});let n=(c,d,v)=>{let _=v?c.querySelector(".swiper-slide-shadow-left"):c.querySelector(".swiper-slide-shadow-top"),b=v?c.querySelector(".swiper-slide-shadow-right"):c.querySelector(".swiper-slide-shadow-bottom");_||(_=be("div",`swiper-slide-shadow-cube swiper-slide-shadow-${v?"left":"top"}`.split(" ")),c.append(_)),b||(b=be("div",`swiper-slide-shadow-cube swiper-slide-shadow-${v?"right":"bottom"}`.split(" ")),c.append(b)),_&&(_.style.opacity=Math.max(-d,0)),b&&(b.style.opacity=Math.max(d,0))};ke({effect:"cube",swiper:e,on:t,setTranslate:()=>{let{el:c,wrapperEl:d,slides:v,width:_,height:b,rtlTranslate:h,size:r,browser:s}=e,g=et(e),y=e.params.cubeEffect,u=e.isHorizontal(),x=e.virtual&&e.params.virtual.enabled,M=0,k;y.shadow&&(u?(k=e.wrapperEl.querySelector(".swiper-cube-shadow"),k||(k=be("div","swiper-cube-shadow"),e.wrapperEl.append(k)),k.style.height=`${_}px`):(k=c.querySelector(".swiper-cube-shadow"),k||(k=be("div","swiper-cube-shadow"),c.append(k))));for(let D=0;D<v.length;D+=1){let L=v[D],S=D;x&&(S=parseInt(L.getAttribute("data-swiper-slide-index"),10));let j=S*90,q=Math.floor(j/360);h&&(j=-j,q=Math.floor(-j/360));let I=Math.max(Math.min(L.progress,1),-1),T=0,O=0,V=0;S%4===0?(T=-q*4*r,V=0):(S-1)%4===0?(T=0,V=-q*4*r):(S-2)%4===0?(T=r+q*4*r,V=r):(S-3)%4===0&&(T=-r,V=3*r+r*4*q),h&&(T=-T),u||(O=T,T=0);let P=`rotateX(${g(u?0:-j)}deg) rotateY(${g(u?j:0)}deg) translate3d(${T}px, ${O}px, ${V}px)`;I<=1&&I>-1&&(M=S*90+I*90,h&&(M=-S*90-I*90)),L.style.transform=P,y.slideShadows&&n(L,I,u)}if(d.style.transformOrigin=`50% 50% -${r/2}px`,d.style["-webkit-transform-origin"]=`50% 50% -${r/2}px`,y.shadow)if(u)k.style.transform=`translate3d(0px, ${_/2+y.shadowOffset}px, ${-_/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${y.shadowScale})`;else{let D=Math.abs(M)-Math.floor(Math.abs(M)/90)*90,L=1.5-(Math.sin(D*2*Math.PI/360)/2+Math.cos(D*2*Math.PI/360)/2),S=y.shadowScale,j=y.shadowScale/L,q=y.shadowOffset;k.style.transform=`scale3d(${S}, 1, ${j}) translate3d(0px, ${b/2+q}px, ${-b/2/j}px) rotateX(-89.99deg)`}let z=(s.isSafari||s.isWebView)&&s.needPerspectiveFix?-r/2:0;d.style.transform=`translate3d(0px,0,${z}px) rotateX(${g(e.isHorizontal()?0:M)}deg) rotateY(${g(e.isHorizontal()?-M:0)}deg)`,d.style.setProperty("--swiper-cube-translate-z",`${z}px`)},setTransition:c=>{let{el:d,slides:v}=e;if(v.forEach(_=>{_.style.transitionDuration=`${c}ms`,_.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(b=>{b.style.transitionDuration=`${c}ms`})}),e.params.cubeEffect.shadow&&!e.isHorizontal()){let _=d.querySelector(".swiper-cube-shadow");_&&(_.style.transitionDuration=`${c}ms`)}},recreateShadows:()=>{let c=e.isHorizontal();e.slides.forEach(d=>{let v=Math.max(Math.min(d.progress,1),-1);n(d,v,c)})},getEffectParams:()=>e.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})}function je(e,a,t){let n=`swiper-slide-shadow${t?`-${t}`:""}${e?` swiper-slide-shadow-${e}`:""}`,o=Me(a),l=o.querySelector(`.${n.split(" ").join(".")}`);return l||(l=be("div",n.split(" ")),o.append(l)),l}function bo({swiper:e,extendParams:a,on:t}){a({flipEffect:{slideShadows:!0,limitRotation:!0}});let n=(c,d)=>{let v=e.isHorizontal()?c.querySelector(".swiper-slide-shadow-left"):c.querySelector(".swiper-slide-shadow-top"),_=e.isHorizontal()?c.querySelector(".swiper-slide-shadow-right"):c.querySelector(".swiper-slide-shadow-bottom");v||(v=je("flip",c,e.isHorizontal()?"left":"top")),_||(_=je("flip",c,e.isHorizontal()?"right":"bottom")),v&&(v.style.opacity=Math.max(-d,0)),_&&(_.style.opacity=Math.max(d,0))};ke({effect:"flip",swiper:e,on:t,setTranslate:()=>{let{slides:c,rtlTranslate:d}=e,v=e.params.flipEffect,_=et(e);for(let b=0;b<c.length;b+=1){let h=c[b],r=h.progress;e.params.flipEffect.limitRotation&&(r=Math.max(Math.min(h.progress,1),-1));let s=h.swiperSlideOffset,y=-180*r,u=0,x=e.params.cssMode?-s-e.translate:-s,M=0;e.isHorizontal()?d&&(y=-y):(M=x,x=0,u=-y,y=0),h.style.zIndex=-Math.abs(Math.round(r))+c.length,v.slideShadows&&n(h,r);let k=`translate3d(${x}px, ${M}px, 0px) rotateX(${_(u)}deg) rotateY(${_(y)}deg)`,z=ze(v,h);z.style.transform=k}},setTransition:c=>{let d=e.slides.map(v=>Me(v));d.forEach(v=>{v.style.transitionDuration=`${c}ms`,v.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(_=>{_.style.transitionDuration=`${c}ms`})}),tt({swiper:e,duration:c,transformElements:d})},recreateShadows:()=>{e.params.flipEffect,e.slides.forEach(c=>{let d=c.progress;e.params.flipEffect.limitRotation&&(d=Math.max(Math.min(c.progress,1),-1)),n(c,d)})},getEffectParams:()=>e.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!e.params.cssMode})})}function vo({swiper:e,extendParams:a,on:t}){a({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),ke({effect:"coverflow",swiper:e,on:t,setTranslate:()=>{let{width:l,height:m,slides:c,slidesSizesGrid:d}=e,v=e.params.coverflowEffect,_=e.isHorizontal(),b=e.translate,h=_?-b+l/2:-b+m/2,r=_?v.rotate:-v.rotate,s=v.depth,g=et(e);for(let y=0,u=c.length;y<u;y+=1){let x=c[y],M=d[y],k=x.swiperSlideOffset,z=(h-k-M/2)/M,D=typeof v.modifier=="function"?v.modifier(z):z*v.modifier,L=_?r*D:0,S=_?0:r*D,j=-s*Math.abs(D),q=v.stretch;typeof q=="string"&&q.indexOf("%")!==-1&&(q=parseFloat(v.stretch)/100*M);let I=_?0:q*D,T=_?q*D:0,O=1-(1-v.scale)*Math.abs(D);Math.abs(T)<.001&&(T=0),Math.abs(I)<.001&&(I=0),Math.abs(j)<.001&&(j=0),Math.abs(L)<.001&&(L=0),Math.abs(S)<.001&&(S=0),Math.abs(O)<.001&&(O=0);let V=`translate3d(${T}px,${I}px,${j}px) rotateX(${g(S)}deg) rotateY(${g(L)}deg) scale(${O})`,P=ze(v,x);if(P.style.transform=V,x.style.zIndex=-Math.abs(Math.round(D))+1,v.slideShadows){let A=_?x.querySelector(".swiper-slide-shadow-left"):x.querySelector(".swiper-slide-shadow-top"),w=_?x.querySelector(".swiper-slide-shadow-right"):x.querySelector(".swiper-slide-shadow-bottom");A||(A=je("coverflow",x,_?"left":"top")),w||(w=je("coverflow",x,_?"right":"bottom")),A&&(A.style.opacity=D>0?D:0),w&&(w.style.opacity=-D>0?-D:0)}}},setTransition:l=>{e.slides.map(c=>Me(c)).forEach(c=>{c.style.transitionDuration=`${l}ms`,c.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(d=>{d.style.transitionDuration=`${l}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}function yo({swiper:e,extendParams:a,on:t}){a({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});let n=m=>typeof m=="string"?m:`${m}px`;ke({effect:"creative",swiper:e,on:t,setTranslate:()=>{let{slides:m,wrapperEl:c,slidesSizesGrid:d}=e,v=e.params.creativeEffect,{progressMultiplier:_}=v,b=e.params.centeredSlides,h=et(e);if(b){let r=d[0]/2-e.params.slidesOffsetBefore||0;c.style.transform=`translateX(calc(50% - ${r}px))`}for(let r=0;r<m.length;r+=1){let s=m[r],g=s.progress,y=Math.min(Math.max(s.progress,-v.limitProgress),v.limitProgress),u=y;b||(u=Math.min(Math.max(s.originalProgress,-v.limitProgress),v.limitProgress));let x=s.swiperSlideOffset,M=[e.params.cssMode?-x-e.translate:-x,0,0],k=[0,0,0],z=!1;e.isHorizontal()||(M[1]=M[0],M[0]=0);let D={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};y<0?(D=v.next,z=!0):y>0&&(D=v.prev,z=!0),M.forEach((O,V)=>{M[V]=`calc(${O}px + (${n(D.translate[V])} * ${Math.abs(y*_)}))`}),k.forEach((O,V)=>{let P=D.rotate[V]*Math.abs(y*_);k[V]=P}),s.style.zIndex=-Math.abs(Math.round(g))+m.length;let L=M.join(", "),S=`rotateX(${h(k[0])}deg) rotateY(${h(k[1])}deg) rotateZ(${h(k[2])}deg)`,j=u<0?`scale(${1+(1-D.scale)*u*_})`:`scale(${1-(1-D.scale)*u*_})`,q=u<0?1+(1-D.opacity)*u*_:1-(1-D.opacity)*u*_,I=`translate3d(${L}) ${S} ${j}`;if(z&&D.shadow||!z){let O=s.querySelector(".swiper-slide-shadow");if(!O&&D.shadow&&(O=je("creative",s)),O){let V=v.shadowPerProgress?y*(1/v.limitProgress):y;O.style.opacity=Math.min(Math.max(Math.abs(V),0),1)}}let T=ze(v,s);T.style.transform=I,T.style.opacity=q,D.origin&&(T.style.transformOrigin=D.origin)}},setTransition:m=>{let c=e.slides.map(d=>Me(d));c.forEach(d=>{d.style.transitionDuration=`${m}ms`,d.querySelectorAll(".swiper-slide-shadow").forEach(v=>{v.style.transitionDuration=`${m}ms`})}),tt({swiper:e,duration:m,transformElements:c,allSlides:!0})},perspective:()=>e.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!e.params.cssMode})})}function Mo({swiper:e,extendParams:a,on:t}){a({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}
1),ke({effect:"cards",swiper:e,on:t,setTranslate:()=>{let{slides:l,activeIndex:m,rtlTranslate:c}=e,d=e.params.cardsEffect,{startTranslate:v,isTouched:_}=e.touchEventsData,b=c?-e.translate:e.translate;for(let h=0;h<l.length;h+=1){let r=l[h],s=r.progress,g=Math.min(Math.max(s,-4),4),y=r.swiperSlideOffset;e.params.centeredSlides&&!e.params.cssMode&&(e.wrapperEl.style.transform=`translateX(${e.minTranslate()}px)`),e.params.centeredSlides&&e.params.cssMode&&(y-=l[0].swiperSlideOffset);let u=e.params.cssMode?-y-e.translate:-y,x=0,M=-100*Math.abs(g),k=1,z=-d.perSlideRotate*g,D=d.perSlideOffset-Math.abs(g)*.75,L=e.virtual&&e.params.virtual.enabled?e.virtual.from+h:h,S=(L===m||L===m-1)&&g>0&&g<1&&(_||e.params.cssMode)&&b<v,j=(L===m||L===m+1)&&g<0&&g>-1&&(_||e.params.cssMode)&&b>v;if(S||j){let O=(1-Math.abs((Math.abs(g)-.5)/.5))**.5;z+=-28*g*O,k+=-.5*O,D+=96*O,x=`${(d.rotate||e.isHorizontal()?-25:0)*O*Math.abs(g)}%`}if(g<0?u=`calc(${u}px ${c?"-":"+"} (${D*Math.abs(g)}%))`:g>0?u=`calc(${u}px ${c?"-":"+"} (-${D*Math.abs(g)}%))`:u=`${u}px`,!e.isHorizontal()){let O=x;x=u,u=O}let q=g<0?`${1+(1-k)*g}`:`${1-(1-k)*g}`,I=` 2 translate3d(${u}, ${x}, ${M}px) 3 rotateZ(${d.rotate?c?-z:z:0}deg) 4 scale(${q}) 5 `;if(d.slideShadows){let O=r.querySelector(".swiper-slide-shadow");O||(O=je("cards",r)),O&&(O.style.opacity=Math.min(Math.max((Math.abs(g)-.5)/.5,0),1))}r.style.zIndex=-Math.abs(Math.round(s))+l.length;let T=ze(d,r);T.style.transform=I}},setTransition:l=>{let m=e.slides.map(c=>Me(c));m.forEach(c=>{c.style.transitionDuration=`${l}ms`,c.querySelectorAll(".swiper-slide-shadow").forEach(d=>{d.style.transitionDuration=`${l}ms`})}),tt({swiper:e,duration:l,transformElements:m})},perspective:()=>!0,overwriteParams:()=>({_loopSwapReset:!1,watchSlidesProgress:!0,loopAdditionalSlides:e.params.cardsEffect.rotate?3:2,centeredSlides:!0,virtualTranslate:!e.params.cssMode})})}function Po(e,a){if(e&1){let t=Q();i(0,` 6 `),p(1,"button",4),N("click",function(o){return H(t),E(2).delete(),G(o.stopPropagation())}),i(2,` 7 `),J(3,"i",5),i(4,` 8 `),f(),i(5,` 9 `)}}function Eo(e,a){e&1&&(i(0,` 10 `),p(1,"div",6)(2,"em"),i(3,"message removed by user"),f()(),i(4,` 11 `))}function So(e,a){e&1&&(i(0,` 12 `),J(1,"i",9),i(2,` 13 `),p(3,"span"),i(4,"Photo"),f(),i(5,` 14 `))}function Oo(e,a){if(e&1&&(i(0,` 15 `),J(1,"i",10),i(2,` 16 `),p(3,"span"),i(4),f(),i(5,` 17 `)),e&2){let t=E(4);C(4),ie(t.quotedMessage.fileName||"File")}}function To(e,a){if(e&1&&(i(0,` 18 `),p(1,"div",8),i(2,` 19 `),$(3,So,6,0)(4,Oo,6,1),f(),i(5,` 20 `)),e&2){let t=E(3);C(3),F(t.isImage(t.quotedMessage.file)||t.isGif(t.quotedMessage.file)?3:4)}}function ko(e,a){if(e&1&&(i(0,` 21 `),p(1,"div",11),i(2),we(3,"slice"),f(),i(4,` 22 `)),e&2){let t=E(3);C(2),Ve(` 23 `,qt(3,2,t.quotedMessage.text,0,100),"",(t.quotedMessage.text==null?null:t.quotedMessage.text.length)>100?"...":"",` 24 `)}}function Io(e,a){if(e&1&&(i(0,` 25 `),p(1,"div",7),i(2,` 26 `),$(3,To,6,1),$(4,ko,5,6),f(),i(5,` 27 `)),e&2){let t=E(2);C(3),F(t.quotedMessage.file?3:-1),C(),F(t.quotedMessage.text?4:-1)}}function Do(e,a){if(e&1&&(i(0,` 28`),p(1,"div",0),i(2,` 29 `),p(3,"div",1),i(4,` 30 `),p(5,"span",2),i(6,` 31 `),J(7,"i",3),i(8),f(),i(9,` 32 `),$(10,Po,6,0),f(),i(11,` 33 `),$(12,Eo,5,0)(13,Io,6,2),f(),i(14,` 34`)),e&2){let t=E();C(),te("compact",t.compact),C(7),Ve(` 35 `,t.quotedFirstName," ",t.quotedLastName,` 36 `),C(2),F(t.canDelete?10:-1),C(2),F(t.quotedMessage.isDeleted?12:13)}}var Yt=(()=>{let a=class a{constructor(){this.canDelete=!1,this.compact=!1,this.deleteQuote=new Y}ngOnInit(){}get quotedFirstName(){return this.quotedMessage?"firstName"in this.quotedMessage?this.quotedMessage.firstName??"":this.quotedMessage.sentClubUser?.user?.firstName??"":""}get quotedLastName(){return this.quotedMessage?"lastName"in this.quotedMessage?this.quotedMessage.lastName??"":this.quotedMessage.sentClubUser?.user?.lastName??"":""}delete(){this.deleteQuote.emit()}isImage(n){if(!n)return!1;let o=n.split(".").pop()?.toLowerCase();return["jpg","jpeg","png","webp","bmp"].includes(o||"")}isGif(n){return n?n.toLowerCase().endsWith(".gif"):!1}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=oe({type:a,selectors:[["app-message-quote"]],inputs:{quotedMessage:"quotedMessage",canDelete:"
36canDelete",compact:"compact"},outputs:{deleteQuote:"deleteQuote"},standalone:!1,decls:1,vars:1,consts:[[1,"quoted-message-container"],[1,"quoted-message-header"],[1,"quoted-author"],[1,"fas","fa-reply"],[1,"delete-quote-btn",3,"click"],[1,"fas","fa-times"],[1,"quoted-message-text","deleted"],[1,"quoted-message-content"],[1,"quoted-message-file"],[1,"far","fa-image"],[1,"far","fa-file"],[1,"quoted-message-text"]],template:function(o,l){o&1&&$(0,Do,15,6),o&2&&F(l.quotedMessage?0:-1)},dependencies:[Nt],styles:[".quoted-message-container[_ngcontent-%COMP%]{background:var(--grey-100, #f3f4f6);border-left:3px solid var(--primary-400, #818cf8);border-radius:var(--border-radius-lg);padding:.5rem .75rem;margin-bottom:.5rem;font-size:.875rem}.quoted-message-container.compact[_ngcontent-%COMP%]{padding:.375rem .5rem;font-size:.8125rem}.quoted-message-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.25rem}.quoted-author[_ngcontent-%COMP%]{font-weight:600;color:var(--primary-600, #4f46e5);font-size:.75rem;display:flex;align-items:center;gap:.375rem}.quoted-author[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.625rem;transform:scaleX(-1)}.delete-quote-btn[_ngcontent-%COMP%]{background:none;border:none;padding:.25rem;cursor:pointer;color:var(--grey-400, #9ca3af);transition:color .15s ease}.delete-quote-btn[_ngcontent-%COMP%]:hover{color:var(--danger, #ef4444)}.delete-quote-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.75rem}.quoted-message-content[_ngcontent-%COMP%]{color:var(--grey-600, #4b5563)}.quoted-message-text[_ngcontent-%COMP%]{line-height:1.4;word-break:break-word}.quoted-message-text.deleted[_ngcontent-%COMP%]{font-style:italic;color:var(--grey-500, #6b7280)}.quoted-message-file[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;color:var(--grey-500, #6b7280);font-size:.8125rem}.quoted-message-file[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.875rem}"]});let e=a;return e})();var Vo=12,Ao={people:"Smileys & People",nature:"Animals & Nature",foods:"Food & Drink",activity:"Activity",places:"Travel & Places",objects:"Objects",symbols:"Symbols",flags:"Flags"},Qt=6,Ci="emoji_reaction_mru",bi=(()=>{let a=class a{constructor(n){this.consentGatedStorageService=n,this.loading=null,this.groupsCache=null,this.allCache=null,this.mru=[...cn],this.mruLoaded=!1}getQuickEmoji(){this.loadMru();let n=[...this.mru];for(let o of cn){if(n.length>=Qt)break;n.includes(o)||n.push(o)}return n.slice(0,Qt)}recordUse(n){if(n){this.loadMru(),this.mru=[n,...this.mru.filter(o=>o!==n)].slice(0,Qt);try{this.consentGatedStorageService.setLocalItem(Ci,JSON.stringify(this.mru))}catch(o){console.warn("[EmojiCatalogService] Unable to persist recent emoji",o)}}}getGroups(){return se(this,null,function*(){return this.groupsCache?this.groupsCache:(this.loading||(this.loading=this.build().finally(()=>{this.loading=null})),this.loading)})}getAll(){return se(this,null,function*(){return this.allCache||(yield this.getGroups()),this.allCache??[]})}search(n){return se(this,null,function*(){let o=(n||"").trim().toLowerCase();if(!o)return[];let l=yield this.getAll(),m=[],c=[];for(let d of l){let v=d.search.indexOf(o);v===0?m.push(d):v>0&&c.push(d)}return[...m,...c]})}build(){return se(this,null,function*(){let n=(yield import("./chunk-ZFKSP6Z3.js")).default,o=[],l=[];for(let m of n.categories){let c=o.length,d=[];for(let v of m.emojis){let _=n.emojis[v],b=_?.skins?.[0]?.native;if(!b||_.version>Vo)continue;let h={emoji:b,name:_.name,groupIndex:c,search:[_.name,..._.keywords||[]].join(" ").toLowerCase()};d.push(h),l.push(h)}d.length!==0&&o.push({name:Ao[m.id]??m.id,slug:m.id,emoji:d})}return this.groupsCache=o,this.allCache=l,o})}loadMru(){if(!this.mruLoaded){this.mruLoaded=!0;try{let n=JSON.parse(localStorage.getItem(Ci)||"null");Array.isArray(n)&&n.length>0&&(this.mru=n.filter(o=>typeof o=="string"&&!!o).slice(0,Qt))}catch(n){console.warn("[EmojiCatalogService] Unable to read recent emoji",n)}}}};a.\u0275fac=function(o){return new(o||a)(Rt(Jn))},a.\u0275prov=wt({token:a,factory:a.\u0275fac,providedIn:"root"});let e=a;return e})();var Fo=["menuEl"],wo=(e,a)=>({"top.px":e,"left.px":a}),vi=(e,a)=>a.emoji,Ro=(e,a)=>a.slug;function Lo(e,a){if(e&1){let t=Q();i(0,` 37 `),p(1,"div",1),N("click",function(){H(t);let o=E();return G(o.onBackdropClick())}),f(),i(2,` 38`)}}function zo(e,a){if(e&1){let t=Q();i(0,` 39 `),p(1,"button",6),N("click",function(){let o=H(t).$implicit,l=E(3);return G(l.onReactionClick(o))}),i(2),f(),i(3,` 40 `)}if(e&2){let t=a.$implicit,n=E(3);C(),te("selected",n.config.currentUserEmoji===t),Se("aria-label","React with "+t),C(),re(` 41 `,t,` 42 `)}}function jo(e,a){e&1&&(i(0,`
43 `),p(1,"div",9),i(2,"Loading emoji\u2026"),f(),i(3,` 44 `))}function qo(e,a){if(e&1){let t=Q();i(0,` 45 `),p(1,"div",9),i(2,` 46 Unable to load emoji. 47 `),p(3,"button",10),N("click",function(){H(t);let o=E(4);return G(o.loadEmoji())}),i(4,"Try again"),f(),i(5,` 48 `),f(),i(6,` 49 `)}}function Bo(e,a){if(e&1&&(i(0,` 50 `),p(1,"div",9),i(2),f(),i(3,` 51 `)),e&2){let t=E(6);C(2),re('No emoji match "',t.searchTerm,'"')}}function No(e,a){if(e&1){let t=Q();i(0,` 52 `),p(1,"button",12),N("click",function(){let o=H(t).$implicit,l=E(7);return G(l.onReactionClick(o.emoji))}),i(2),f(),i(3,` 53 `)}if(e&2){let t=a.$implicit,n=E(7);C(),te("selected",n.config.currentUserEmoji===t.emoji),K("title",t.name),Se("aria-label",t.name),C(),re(` 54 `,t.emoji,` 55 `)}}function Uo(e,a){if(e&1&&(i(0,` 56 `),p(1,"div",11),i(2,` 57 `),ce(3,No,4,5,null,null,vi),f(),i(5,` 58 `)),e&2){let t=E(6);C(3),de(t.searchResults)}}function Ho(e,a){if(e&1&&(i(0,` 59 `),$(1,Bo,4,1)(2,Uo,6,0)),e&2){let t=E(5);C(),F(t.searchResults.length===0?1:2)}}function Go(e,a){if(e&1){let t=Q();i(0,` 60 `),p(1,"button",12),N("click",function(){let o=H(t).$implicit,l=E(7);return G(l.onReactionClick(o.emoji))}),i(2),f(),i(3,` 61 `)}if(e&2){let t=a.$implicit,n=E(7);C(),te("selected",n.config.currentUserEmoji===t.emoji),K("title",t.name),Se("aria-label",t.name),C(),re(` 62 `,t.emoji,` 63 `)}}function Wo(e,a){if(e&1&&(i(0,` 64 `),p(1,"div",13),i(2),f(),i(3,` 65 `),p(4,"div",11),i(5,` 66 `),ce(6,Go,4,5,null,null,vi),f(),i(8,` 67 `)),e&2){let t=a.$implicit;C(2),ie(t.name),C(4),de(t.emoji)}}function Xo(e,a){if(e&1&&(i(0,` 68 `),ce(1,Wo,9,1,null,null,Ro)),e&2){let t=E(5);C(),de(t.emojiGroups)}}function Yo(e,a){if(e&1&&(i(0,` 69 `),$(1,Ho,3,1)(2,Xo,3,0)),e&2){let t=E(4);C(),F(t.searchTerm?1:2)}}function Qo(e,a){if(e&1){let t=Q();i(0,` 70 `),p(1,"div",7),i(2,` 71 `),p(3,"input",8),N("input",function(o){H(t);let l=E(3);return G(l.onEmojiSearch(o.target.value))}),f(),i(4,` 72 73 `),$(5,jo,4,0),$(6,qo,7,0),$(7,Yo,3,1),f(),i(8,` 74 `)}if(e&2){let t=E(3);C(3),K("value",t.searchTerm),C(2),F(t.loadingEmoji?5:-1),C(),F(t.emojiLoadFailed?6:-1),C(),F(!t.loadingEmoji&&!t.emojiLoadFailed?7:-1)}}function Ko(e,a){if(e&1){let t=Q();i(0,` 75 `),p(1,"div",4),i(2,` 76 `),ce(3,zo,4,4,null,null,Fe),p(5,"button",5),N("click",function(){H(t);let o=E(2);return G(o.toggleAllEmoji())}),i(6),f(),i(7,` 77 `),f(),i(8,` 78 79 `),$(9,Qo,9,4)}if(e&2){let t=E(2);C(3),de(t.quickEmoji),C(2),K("title",t.showAllEmoji?"Hide all emoji":"More emoji"),Se("aria-expanded",t.showAllEmoji),C(),re(` 80 `,t.showAllEmoji?"\u2212":"+",` 81 `),C(3),F(t.showAllEmoji?9:-1)}}function Jo(e,a){if(e&1){let t=Q();i(0,` 82 `),p(1,"button",14),N("click",function(){let o=H(t).$implicit,l=E(2);return G(l.onItemClick(o))}),i(2,` 83 `),i(3,` 84 `),p(4,"span"),i(5),f(),i(6,` 85 `),f(),i(7,` 86 `)}if(e&2){let t=a.$implicit;C(),te("danger",t.danger)("active",t.active),K("disabled",t.disabled),C(4),ie(t.label)}}function Zo(e,a){if(e&1&&(i(0,` 87 `),p(1,"div",2,0),i(3,` 88 `),i(4,` 89 `),$(5,Ko,10,4),p(6,"div",3),i(7,` 90 `),ce(8,Jo,8,6,null,null,Fe),f(),i(10,` 91 `),f(),i(11,` 92`)),e&2){let t=E();C(),ht("visibility",t.positioned?"visible":"hidden"),te("visible",t.isVisible),K("ngStyle",t.adjustedPosition?jt(6,wo,t.adjustedPosition.y,t.adjustedPosition.x):null),C(4),F(t.config.canReact&&!t.config.isDeleted?5:-1),C(3),de(t.menuItems)}}var yi=(()=>{let a=class a{constructor(n,o){this.cdr=n,this.emojiCatalogService=o,this.isVisible=!1,this.position=null,this.containerBounds=null,this.config={canEdit:!1,canDelete:!1,canPin:!1,canReply:!0,canReact:!0,canReport:!1,isPinned:!1,isDeleted:!1,canCopy:!1},this.close=new Y,this.reply=new Y,this.react=new Y,this.pin=new Y,this.edit=new Y,this.delete=new Y,this.report=new Y,this.copy=new Y,this.quickEmoji=[],this.showAllEmoji=!1,this.emojiGroups=[],this.searchResults=[],this.searchTerm="",this.loadingEmoji=!1,this.emojiLoadFailed=!1,this.menuItems=[],this.adjustedPosition=null,this.positioned=!1,this.needsClamp=!1,this.quickEmoji=this.emojiCatalogService.getQuickEmoji()}ngOnChanges(n){n.config&&this.updateMenuItems(),(n.position||n.isVisible)&&(this.adjustedPosition=null,this.needsClamp=this.isVisible&&!!this.position,this.positioned=!this.needsClamp)}ngAfterViewChecked(){!this.needsClamp||!this.position||!this.menuElRef||(this.needsClamp=!1,this.clampToBounds(),this.cdr.detectChanges())}clampToBounds(){if(!this.menuElRef||!this.position)return;let n=this.menuElRef.nativeElement,o=n.offsetWidth,l=n.offsetHeight,m=8,c=8,d=this.containerBounds?.width??window.innerWidth,v=this.containerBounds?.height??window.innerHeight,_=this.position.x-o/2,b=m,h=d-o-m;_=h<b?b:Math.min(Math.max(_,b),h);let r=this.position.bottom+c;if(r+l>v-m){let s=this.position.top-c-l;r=s>=m?s:Math.max(m,v-l-m)}this.adjustedPosition={x:_,y:r},this.positioned=!0}updateMenuItems(){this.menuItems=[{id:"reply",label:"Reply",icon:"fas fa-reply",action:"reply",visible:this.config.canReply&&!this.config.isDeleted},{id:"copy",label:"Copy",icon:"fas fa-copy",action:"copy",visible:!this.config.isDeleted&&this.config.canCopy}
92,{id:"pin",label:this.config.isPinned?"Unpin":"Pin",icon:"fas fa-thumbtack",action:"pin",visible:this.config.canPin&&!this.config.isDeleted,active:this.config.isPinned},{id:"report",label:"Report",icon:"fas fa-flag",action:"report",visible:this.config.canReport&&!this.config.isDeleted},{id:"delete",label:"Delete",icon:"fas fa-trash-alt",action:"delete",visible:this.config.canDelete&&!this.config.isDeleted,danger:!0}].filter(n=>n.visible)}onReactionClick(n){this.emojiCatalogService.recordUse(n),this.react.emit(n),this.close.emit()}toggleAllEmoji(){return se(this,null,function*(){this.showAllEmoji=!this.showAllEmoji,this.showAllEmoji&&this.emojiGroups.length===0&&(yield this.loadEmoji())})}loadEmoji(){return se(this,null,function*(){try{this.loadingEmoji=!0,this.emojiLoadFailed=!1,this.emojiGroups=yield this.emojiCatalogService.getGroups()}catch(n){this.emojiLoadFailed=!0,console.error("Error loading emoji catalog:",n)}finally{this.loadingEmoji=!1,this.cdr.detectChanges()}})}onEmojiSearch(n){return se(this,null,function*(){this.searchTerm=n,this.searchResults=n?.trim()?yield this.emojiCatalogService.search(n):[],this.cdr.detectChanges()})}onItemClick(n){switch(n.action){case"reply":this.reply.emit();break;case"copy":this.copy.emit();break;case"pin":this.pin.emit();break;case"edit":this.edit.emit();break;case"delete":this.delete.emit();break;case"report":this.report.emit();break}this.close.emit()}onBackdropClick(){this.close.emit()}};a.\u0275fac=function(o){return new(o||a)(he(Bt),he(bi))},a.\u0275cmp=oe({type:a,selectors:[["app-message-context-menu"]],viewQuery:function(o,l){if(o&1&&Lt(Fo,5),o&2){let m;Ot(m=Tt())&&(l.menuElRef=m.first)}},inputs:{isVisible:"isVisible",position:"position",containerBounds:"containerBounds",config:"config"},outputs:{close:"close",reply:"reply",react:"react",pin:"pin",edit:"edit",delete:"delete",report:"report",copy:"copy"},standalone:!1,features:[$e],decls:2,vars:2,consts:[["menuEl",""],[1,"context-menu-backdrop",3,"click"],[1,"context-menu",3,"ngStyle"],[1,"context-menu-content"],[1,"reaction-picker"],["type","button",1,"reaction-button","reaction-more",3,"click","title"],["type","button",1,"reaction-button",3,"click"],[1,"emoji-panel"],["type","text","placeholder","Search emoji",1,"emoji-search",3,"input","value"],[1,"emoji-status"],["type","button",1,"emoji-retry",3,"click"],[1,"emoji-grid"],["type","button",1,"emoji-cell",3,"click","title"],[1,"emoji-group-name"],["type","button",1,"context-menu-item",3,"click","disabled"]],template:function(o,l){o&1&&($(0,Lo,3,0),$(1,Zo,12,9)),o&2&&(F(l.isVisible?0:-1),C(),F(l.isVisible?1:-1))},dependencies:[Rn],styles:['@charset "UTF-8";.context-menu-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0000004d;z-index:999;transition:.25s ease-in-out}.context-menu[_ngcontent-%COMP%]{position:fixed;background:var(--surface-card, #fff);border-radius:12px;box-shadow:0 4px 20px #00000026;z-index:1000;
92min-width:200px;max-width:300px;animation:_ngcontent-%COMP%_fadeIn .15s ease-out}.context-menu.visible[_ngcontent-%COMP%]{opacity:1}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.reaction-picker[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:8px;padding:12px 16px}.emoji-panel[_ngcontent-%COMP%]{max-height:260px;overflow-y:auto;padding:0 12px 12px;border-bottom:1px solid var(--surface-border, #e5e7eb)}.emoji-search[_ngcontent-%COMP%]{width:100%;padding:6px 8px;margin-bottom:8px;border:1px solid var(--surface-border, #e5e7eb);border-radius:6px;font-size:13px}.emoji-status[_ngcontent-%COMP%]{padding:8px 4px;font-size:13px;color:var(--text-color-secondary, #666)}.emoji-retry[_ngcontent-%COMP%]{background:none;border:none;padding:0 0 0 4px;color:var(--primary-color, #007bff);cursor:pointer;text-decoration:underline}.emoji-group-name[_ngcontent-%COMP%]{position:sticky;top:0;background:var(--surface-card, #fff);padding:6px 2px 2px;font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-color-secondary, #666)}.emoji-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(8,1fr)}.emoji-cell[_ngcontent-%COMP%]{aspect-ratio:1/1;background:none;border:none;border-radius:6px;font-size:20px;line-height:1;padding:0;cursor:pointer}.emoji-cell[_ngcontent-%COMP%]:hover{background:var(--surface-hover, #f3f4f6)}.emoji-cell.selected[_ngcontent-%COMP%]{box-shadow:0 0 0 2px #007bff40}.reaction-button[_ngcontent-%COMP%]{display:flex;justify-content:center;width:40px;aspect-ratio:1/1;border:none;align-items:center;border-radius:50%;cursor:pointer;transition:all .15s ease;font-size:18px;color:var(--text-color-secondary, #666)}.reaction-button[_ngcontent-%COMP%]:hover, .reaction-button[_ngcontent-%COMP%]:active{transform:scale(1.15)}.reaction-button.selected[_ngcontent-%COMP%]{box-shadow:0 0 0 2px #007bff40;transform:scale(1.1)}.reaction-button[_ngcontent-%COMP%]:nth-child(1) span[_ngcontent-%COMP%]:before{content:"\\2764\\fe0f"}.reaction-button[_ngcontent-%COMP%]:nth-child(2) span[_ngcontent-%COMP%]:before{content:"\\1f44d"}.reaction-button[_ngcontent-%COMP%]:nth-child(3) span[_ngcontent-%COMP%]:before{content:"\\1f60a"}.reaction-button[_ngcontent-%COMP%]:nth-child(4) span[_ngcontent-%COMP%]:before{content:"\\2757"}.reaction-button[_ngcontent-%COMP%]:nth-child(5) span[_ngcontent-%COMP%]:before{content:"\\1f622"}.context-menu-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:8px 0}.context-menu-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:12px 20px;border:none;background:transparent;cursor:pointer;font-size:14px;color:var(--text-color, #333);transition:background-color .15s ease;text-align:left;width:100%}.context-menu-item[_ngcontent-%COMP%]:hover{background-color:var(--surface-hover, #f5f5f5)}.context-menu-item[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.context-menu-item.danger[_ngcontent-%COMP%]{color:var(--danger-color, #dc3545)}.context-menu-item.active[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:var(--primary-color, #007bff)}.context-menu-item[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:20px;text-align:center;font-size:16px}.context-menu-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}']});let e=a;return e})();function Kt(e){return e?.id??e?.pollOptionID??e?.pollOptionId}function nt(e){if(!e||!e.options||e.options.length===0)return;let a=e.options[0];for(let t of e.options){let n=t.votePercentage??null,o=a.votePercentage??null;if(n!==null&&o!==null){n>o&&(a=t);continue}let l=t.voteCount??0,m=a.voteCount??0;l>m&&(a=t)}return Kt(a)}function ta(e,a){if(e&1&&(i(0,` 93 `),p(1,"div",2),i(2,` 94 `),p(3,"span",3),i(4),f(),i(5,` 95 `),f(),i(6,` 96 `)),e&2){let t=E();C(4),ie(t.subtitle)}}function na(e,a){if(e&1){let t=Q();i(0,` 97 `),p(1,"button",4),N("click",function(o){H(t);let l=E();return G(l.onRefresh(o))}),i(2,` 98 `),J(3,"i",5),i(4,` 99 `),f(),i(5,` 100 `)}if(e&2){let t=E();C(),te("sender",t.isSender),K("disabled",t.isRefreshing),C(2),te("fa-spin",t.isRefreshing)}}var Mi=(()=>{let a=class a{constructor(){this.unsubscribe$=new ft,this.isRefreshing=!1,this.isSender=!1,this.isClosed=!1,this.refresh=new Y}onRefresh(n){n.stopPropagation(),this.refresh.emit()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this.refresh.complete()}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=oe({type:a,selectors:[["app-poll-header"]],inputs:{question:"question",subtitle:"subtitle",isRefreshing:"isRefreshing",isSender:"isSender",isClosed:"isClosed"},outputs:{refresh:"refresh"},standalone:!1,decls:11,vars:3,consts:[[1,"poll-header-title","d-flex","justify-content-between","align-items-center","mb-2"],[1,"poll-header-question","fw-600"],[1,"poll-header-subtitle"],[1,"text-smallest"],["type","button","aria-label","Refresh poll",1,"btn","btn-link","refresh-btn","p-1",3,"click","disabled"],["title","Refresh data",1,"fa-solid","fa-arrows-rotate"]],template:function(o,l){o&1&&(p(0,"div",0),i(1,` 101 `),p(2,"div"),i(3,` 102 `),p(4,"span",1),i(5),f(),i(6,` 103 `),$(7,ta,7,1),f(),i(8,` 104 `),$(9,na,6,5),f(),i(10,`
105`)),o&2&&(C(5),ie(l.question),C(2),F(l.subtitle?7:-1),C(2),F(l.isClosed?-1:9))},styles:[".poll-header-title[_ngcontent-%COMP%]{gap:10px;align-items:flex-start!important}.poll-header-title[_ngcontent-%COMP%] .poll-header-question[_ngcontent-%COMP%]{font-size:1rem;line-height:1.4}.poll-header-title[_ngcontent-%COMP%] .poll-header-subtitle[_ngcontent-%COMP%]{margin-top:.25rem;opacity:.7}.poll-header-title[_ngcontent-%COMP%] .refresh-btn[_ngcontent-%COMP%]{color:var(--primary);border:none;background:transparent}.poll-header-title[_ngcontent-%COMP%] .refresh-btn.sender[_ngcontent-%COMP%]{color:#fff}.poll-header-title[_ngcontent-%COMP%] .refresh-btn[_ngcontent-%COMP%]:disabled{opacity:.5}.poll-header-title[_ngcontent-%COMP%] .refresh-btn[_ngcontent-%COMP%]:hover:not(:disabled){opacity:.8}"]});let e=a;return e})();function oa(e,a){e&1&&(i(0,` 106 `),J(1,"i",11),i(2,` 107 `))}function aa(e,a){e&1&&(i(0,` 108 `),J(1,"i",12),i(2,` 109 `))}function la(e,a){e&1&&(i(0,` 110 `),J(1,"i",13),i(2,` 111 `))}function sa(e,a){if(e&1){let t=Q();i(0,` 112 `),p(1,"div",1),i(2,` 113 `),p(3,"label",2),i(4,` 114 `),p(5,"div",3),N("click",function(){let o=H(t),l=o.$implicit,m=o.$index,c=E();return G(!c.readonly&&!c.isClosed&&!c.isOptionDisabled(l)&&c.onOptionChange(c.getUniqueOptionId(l,m)))})("keydown.enter",function(){let o=H(t),l=o.$implicit,m=o.$index,c=E();return G(!c.readonly&&!c.isClosed&&!c.isOptionDisabled(l)&&c.onOptionChange(c.getUniqueOptionId(l,m)))})("keydown.space",function(){let o=H(t),l=o.$implicit,m=o.$index,c=E();return G(!c.readonly&&!c.isClosed&&!c.isOptionDisabled(l)&&c.onOptionChange(c.getUniqueOptionId(l,m)))}),i(6,` 115 `),$(7,oa,3,0),f(),i(8,` 116 `),p(9,"div",4),i(10,` 117 `),p(11,"div",5),i(12,` 118 `),p(13,"span",6),i(14),$(15,aa,3,0),f(),i(16,` 119 `),p(17,"span",7),i(18,` 120 `),$(19,la,3,0),p(20,"span"),i(21),f(),i(22,` 121 `),f(),i(23,` 122 `),f(),i(24,` 123 `),p(25,"div",8),i(26,` 124 `),p(27,"div",9),i(28,` 125 `),p(29,"div",10),i(30,` 126 `),f(),i(31,` 127 `),f(),i(32,` 128 `),f(),i(33,` 129 `),f(),i(34,` 130 `),f(),i(35,` 131 `),f(),i(36,` 132 `)}if(e&2){let t=a.$implicit,n=a.$index,o=E();C(),te("selected",o.selectedOptionId===o.getUniqueOptionId(t,n))("sender",o.isSender)("readonly",o.readonly||o.isClosed)("option-disabled",o.isOptionDisabled(t)),C(4),te("selected",o.selectedOptionId===o.getUniqueOptionId(t,n))("disabled",o.readonly||o.isClosed||o.isOptionDisabled(t)),Se("aria-checked",o.selectedOptionId===o.getUniqueOptionId(t,n))("tabindex",o.readonly||o.isClosed||o.isOptionDisabled(t)?-1:0),C(2),F(o.selectedOptionId===o.getUniqueOptionId(t,n)?7:-1),C(6),te("text-light",o.isSender),C(),re(` 133 `,o.getOptionText(t),` 134 `),C(),F(o.isClosed&&o.leadingOptionId&&o.getOptionId(t)===o.leadingOptionId?15:-1),C(4),F(o.isClosed?19:-1),C(),te("text-light",o.isSender),C(),ie(t.voteCount||0),C(6),Se("aria-valuenow",o.getOptionPercentage(t)),C(2),ht("width",o.getOptionPercentage(t),"%"),te("selected",o.selectedOptionId===o.getUniqueOptionId(t,n))("open",!o.isClosed)}}var Pi=(()=>{let a=class a{constructor(){this.unsubscribe$=new ft,this.options=[],this.hasVoted=!1,this.readonly=!1,this.isClosed=!1,this.totalVotes=0,this.isSender=!1,this.optionSelected=new Y,this.selectedOptionIdChange=new Y,this.votesUpdated=new Y,this.trackByOptionId=(n,o)=>this.getOptionId(o)??n}ngOnChanges(n){(n.options||n.totalVotes||n.hasVoted)&&this.ensurePercentages()}onOptionChange(n){if(n==null||this.readonly)return;let o=-1,l;if(this.options.forEach((m,c)=>{this.getUniqueOptionId(m,c)===n&&(o=c,l=m)}),!!l){if(this.options&&this.options.length){if(this.selectedOptionId!==void 0&&this.selectedOptionId!==null){let m=this.options.findIndex((c,d)=>this.getUniqueOptionId(c,d)===this.selectedOptionId);m>=0&&this.options[m]&&(this.options[m].voteCount=Math.max(0,(this.options[m].voteCount??1)-1))}l.voteCount=(l.voteCount??0)+1,(this.selectedOptionId===void 0||this.selectedOptionId===null)&&(this.totalVotes=(this.totalVotes??0)+1),this.selectedOptionId=n,this.ensurePercentages(),this.votesUpdated.emit({options:this.options,totalVotes:this.totalVotes})}this.optionSelected.emit(n),this.selectedOptionIdChange.emit(n)}}isOptionDisabled(n){return this.readonly?!0:this.getOptionId(n)===this.disabledOptionId}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this.optionSelected.complete(),this.selectedOptionIdChange.complete()}getOptionText(n){return n.description||n.optionText||n.value||""}getOptionId(n){let o=n.id??n.pollOptionID??n.pollOptionId;return o===0?void 0:o}getUniqueOptionId(n,o){let l=this.getOptionId(n);return l!==void 0?l:-(o+1)}getOptionPercentage(n){if(typeof n.votePercentage=="number")return n.votePercentage;if(this.totalVotes===0)return 0;let o=n.voteCount??0;return Math.round(o/this.totalVotes*100)}ensurePercentages(){if(!this.options?.length)return;let n=this.options.reduce((o,l)=>o+(l.voteCount??0),0);n!==this.totalVotes&&(this.totalVotes=n),this.options.forEach(o=>{o.votePercentage=this.totalVotes>0?Math.round((o.voteCount??0)/this.totalVotes*100):0}),this.options=[...this.options]}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=oe({type:a,selectors:[["app-poll-options"]],inputs:{options:"options",selectedOptionId:"selectedOptionId",hasVoted:"hasVoted",readonly:"readonly",leadingOptionId:"leadingOptionId",isClosed:"isClosed",totalVotes:"totalVotes",isSender:"isSender",disabledOptionId:"disabledOptionId"},outputs:{optionSelected:"optionSelected",selectedOptionIdChange:"selectedOptionIdChange",votesUpdated:"votesUpdated"},standalone:!1,features:[$e],decls:5,vars:4,consts:[[1,"poll-options","mb-3"],[1,"poll-option-item"],[1,"poll-option-label","d-flex","align-items-center","w-100"],["role","radio","aria-label","Poll option",1,"custom-radio-circle",3,"click","keydown.enter","keydown.space"],[1,"option-body","flex-grow-1","ms-2"],[1,"option-title-with-star","d-flex","justify-content-between","align-items-center","w-100"],[1,"option-text"],[1,"vote-count","text-smallest"],[1,"option-meta","mt-1"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"option-progress"],[1,"progress-inner"],[1,"fa-solid","fa-check","checkmark-icon"],["aria-label","Top voted option",1,"fa-solid","fa-star","leading-star","ms-1"],["aria-hidden","true",1,"fa-light","fa-face-smile","me-1"]],template:function(o,l){o&1&&(p(0,"div",0),i(1,` 135 `),ce(2,sa,37,30,null,null,l.trackByOptionId,!0),f(),i(4,` 136`)),o&2&&(te("poll-closed",l.isClosed)("disabled",l.readonly||l.isClosed),C(2),de(l.options))},styles:[".poll-options[_ngcontent-%COMP%]{--orange: #e46600}.poll-options.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default}.poll-options[_ngcontent-%COMP%] .poll-option-item[_ngcontent-%COMP%]{padding:.5rem;border-radius:8px;margin-bottom:.5rem;background:#00000008;transition:background-color .2s ease}.poll-options[_ngcontent-%COMP%] .poll-option-item[_ngcontent-%COMP%]:hover:not(.readonly):not(.option-disabled){background:#0000000f}.poll-options[_ngcontent-%COMP%] .poll-option-item.sender[_ngcontent-%COMP%] .custom-radio-circle[_ng
136content-%COMP%]{border:2px solid #fff}.poll-options[_ngcontent-%COMP%] .poll-option-item.readonly[_ngcontent-%COMP%]{cursor:not-allowed}.poll-options[_ngcontent-%COMP%] .poll-option-item.option-disabled[_ngcontent-%COMP%]{cursor:not-allowed;pointer-events:none}.poll-options[_ngcontent-%COMP%] .poll-option-item.option-disabled[_ngcontent-%COMP%] .custom-radio-circle[_ngcontent-%COMP%]{cursor:not-allowed;border-color:#ccc}.poll-options[_ngcontent-%COMP%] .poll-option-item[_ngcontent-%COMP%] .custom-radio-circle[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:2px solid #000;border-radius:50%;background:transparent;cursor:pointer;transition:all .2s ease;flex-shrink:0;margin-right:10px}.poll-options[_ngcontent-%COMP%] .poll-option-item[_ngcontent-%COMP%] .custom-radio-circle[_ngcontent-%COMP%]:hover:not(.disabled){border-color:var(--primary);background:rgba(var(--primary-rgb),.05)}.poll-options[_ngcontent-%COMP%] .poll-option-item[_ngcontent-%COMP%] .custom-radio-circle.selected[_ngcontent-%COMP%]{background:var(--orange);border-color:var(--orange)}.poll-options[_ngcontent-%COMP%] .poll-option-item[_ngcontent-%COMP%] .custom-radio-circle.disabled[_ngcontent-%COMP%]{cursor:not-allowed;pointer-events:none}.poll-options[_ngcontent-%COMP%] .poll-option-item[_ngcontent-%COMP%] .custom-radio-circle[_ngcontent-%COMP%] .checkmark-icon[_ngcontent-%COMP%]{color:#fff;font-size:14px;font-weight:700}.poll-options[_ngcontent-%COMP%] .poll-option-item[_ngcontent-%COMP%] .option-text[_ngcontent-%COMP%]{font-weight:500}.poll-options[_ngcontent-%COMP%] .poll-option-item[_ngcontent-%COMP%] .leading-star[_ngcontent-%COMP%]{color:var(--orange);font-size:.875rem}.poll-options[_ngcontent-%COMP%] .poll-option-item[_ngcontent-%COMP%] .vote-count[_ngcontent-%COMP%]{opacity:.7}.poll-options[_ngcontent-%COMP%] .poll-option-item[_ngcontent-%COMP%] .option-progress[_ngcontent-%COMP%]{height:6px;background:#d4d4d4;border-radius:3px;overflow:hidden}.poll-options[_ngcontent-%COMP%] .poll-option-item[_ngcontent-%COMP%] .option-progress[_ngcontent-%COMP%] .progress-inner[_ngcontent-%COMP%]{height:100%;background:#28a745;border-radius:3px;transition:width .3s ease;opacity:.6}.poll-options[_ngcontent-%COMP%] .poll-option-item[_ngcontent-%COMP%] .option-progress[_ngcontent-%COMP%] .progress-inner.selected[_ngcontent-%COMP%]{opacity:1}.poll-options[_ngcontent-%COMP%] .poll-option-item[_ngcontent-%COMP%] .option-progress[_ngcontent-%COMP%] .progress-inner.open[_ngcontent-%COMP%]{background:var(--orange)}.poll-options.poll-closed[_ngcontent-%COMP%] .poll-option-item[_ngcontent-%COMP%] .poll-radio[_ngcontent-%COMP%]{pointer-events:none}"]});let e=a;return e})();var Ei=(()=>{let a=class a{constructor(n){this.webAPI=n}getPoll(n,o){if(!n.canFetchPolls())return ot(()=>new Error(`Cannot fetch polls in ${n.source} context`));let l=n.buildRoute(`message/poll/${o}/results`);return this.webAPI.getData(l)}voteInPoll(n,o){if(!n.canVote())return ot(()=>new Error(`Cannot vote on polls in ${n.source} context`));let l=n.buildRoute("message/poll/vote");return this.webAPI.postData(l,o)}voteInTeamPoll(n,o,l){let m=`private/teams/${n}/program/${o}/message/poll/vote`;return this.webAPI.postData(m,l)}getTeamPoll(n,o,l){let m=`private/teams/${n}/program/${o}/message/poll/${l}`;return this.webAPI.getData(m)}getVotesForOption(n,o,l,m=1,c=25){if(!n.canFetchPolls())return ot(()=>new Error(`Cannot fetch votes in ${n.source} context`));let d=n.buildRoute(`message/poll/${o}/option/${l}/votes`),v=new zn;return v=v.set("page",m.toString()),v=v.set("rows",c.toString()),this.webAPI.getData(d,v)}createPoll(n,o){return se(this,null,function*(){if(!n.canVote())throw new Error(`Cannot create polls in ${n.source} context`);let l=n.buildRoute("message/poll"),m=yield St(this.webAPI.postData(l,o)),c=null,d=null;if(Array.isArray(m)?[c,d]=m:m&&typeof m=="object"&&(c=m.item1??null,d=m.item2??null),d&&d.poll===void 0&&(d.poll=c),c&&c.id&&(!c.options||c.options.length===0))try{let v=yield St(this.getPoll(n,c.id));return d&&(d.poll=v),[v,d]}catch(v){return d&&(d.poll=c),[c,d]}return[c,d]})}closePoll(n,o){if(!n.canVote())return ot(()=>new Error(`Cannot close polls in ${n.source} context`));let l=n.buildRoute(`message/poll/${o}
136/close`);return this.webAPI.putData(l,{})}editPoll(n,o,l){if(!n.canVote())return ot(()=>new Error(`Cannot edit polls in ${n.source} context`));let m=n.buildRoute(`message/poll/${o}`);return this.webAPI.putData(m,l)}deletePoll(n,o){if(!n.canVote())return ot(()=>new Error(`Cannot delete polls in ${n.source} context`));let l=n.buildRoute(`message/poll/${o}`);return this.webAPI.deleteData(l)}fetchAndAttachPollsForOrigins(n,o){let l=[];if(o.forEach(d=>{let v=d.pollId;v&&l.push({origin:d.origin,pollId:v})}),!l.length)return sn([]);let m=l.map(d=>d.pollId),c=n.buildRoute("message/polls/results");return this.webAPI.postData(c,{pollIDs:m}).pipe(En(()=>sn(l.map(()=>null))),Pn(d=>{let v=new Map;return(d||[]).forEach(_=>{_&&typeof _.id=="number"&&v.set(_.id,_)}),l.map(_=>{let b=v.get(_.pollId)??null;return b&&(_.origin.poll=b),b})}))}};a.\u0275fac=function(o){return new(o||a)(Rt(Qn))},a.\u0275prov=wt({token:a,factory:a.\u0275fac,providedIn:"root"});let e=a;return e})();var Si=()=>({width:"400px",maxWidth:"95vw"}),ua=()=>({width:"500px",maxWidth:"95vw"});function pa(e,a){if(e&1){let t=Q();i(0,` 137 `),p(1,"header",19),i(2,` 138 `),p(3,"div",20),i(4,` 139 `),p(5,"h4",15),i(6,"Poll Details"),f(),i(7,` 140 `),p(8,"button",21),N("click",function(){H(t);let o=E();return G(o.closeModal())}),i(9,` 141 `),J(10,"i",22),i(11,` 142 `),f(),i(12,` 143 `),f(),i(13,` 144 `),f(),i(14,` 145`)}}function fa(e,a){if(e&1&&(i(0,` 146 `),p(1,"strong",23),i(2),f(),i(3,` 147 `)),e&2){let t=E();C(2),ie((t.pollCopy==null?null:t.pollCopy.question)||(t.existingPoll==null?null:t.existingPoll.question))}}function ga(e,a){if(e&1){let t=Q();i(0,` 148 `),p(1,"input",24),Ce("ngModelChange",function(o){H(t);let l=E();return _e(l.pollCopy.question,o)||(l.pollCopy.question=o),G(o)}),f(),i(2,` 149 `)}if(e&2){let t=E();C(),xe("ngModel",t.pollCopy.question)}}function ha(e,a){if(e&1&&(i(0,` 150 `),p(1,"span"),i(2),we(3,"date"),f(),i(4,` 151 `)),e&2){let t=E();C(2),re("Ends: ",lt(3,1,(t.pollCopy==null?null:t.pollCopy.closesAt)||(t.existingPoll==null?null:t.existingPoll.closesAt),"MMM d 'at' h:mm a"))}}function xa(e,a){if(e&1&&(i(0,` 152 `),p(1,"span"),i(2),we(3,"date"),f(),i(4,` 153 `)),e&2){let t=E();C(2),re("Poll closed on ",lt(3,1,(t.pollCopy==null?null:t.pollCopy.closesAt)||(t.existingPoll==null?null:t.existingPoll.closesAt),"MMM d 'at' h:mm a"))}}function _a(e,a){if(e&1){let t=Q();i(0,` 154 `),p(1,"button",28),N("click",function(){H(t);let o=E(2).$index,l=E();return G(l.removeOption(o))}),i(2,` 155 `),J(3,"i",22),i(4,` 156 `),f(),i(5,` 157 `)}}function Ca(e,a){if(e&1){let t=Q();i(0,` 158 `),p(1,"div",25),i(2,` 159 `),p(3,"div",26),i(4,` 160 `),p(5,"input",27),N("ngModelChange",function(o){H(t);let l=E().$index,m=E();return G(m.onOptionDescriptionChange(l,o))}),f(),i(6,` 161 `),$(7,_a,6,0),f(),i(8,` 162 `),f(),i(9,` 163 `)}if(e&2){let t=E().$index,n=E();C(5),K("ngModel",n.pollCopy==null||n.pollCopy.options==null||n.pollCopy.options[t]==null?null:n.pollCopy.options[t].description),C(2),F(((n.pollCopy==null||n.pollCopy.options==null?null:n.pollCopy.options.length)||0)>2?7:-1)}}function ba(e,a){if(e&1&&(i(0,` 164 `),p(1,"span"),i(2),f(),i(3,` 165 `)),e&2){let t=E(2).$implicit,n=E();C(2),re("(",n.optionPercent(t),"%)")}}function va(e,a){e&1&&(i(0,` 166 `),J(1,"i",37),i(2,` 167 `))}function ya(e,a){if(e&1){let t=Q();i(0,` 168 `),p(1,"button",38),N("click",function(){H(t);let o=E(2),l=o.$implicit,m=o.$index,c=E();return G(c.showVotesForOption(l,m))}),i(2,` 169 See Votes 170 `),f(),i(3,` 171 `)}}function Ma(e,a){if(e&1&&(i(0,` 172 `),p(1,"div",29),i(2,` 173 `),p(3,"div",30),i(4,` 174 `),p(5,"div",4),i(6,` 175 `),p(7,"div",31),i(8,` 176 `),p(9,"span",32),i(10),f(),i(11,` 177 `),p(12,"span",33),i(13),$(14,ba,4,1),$(15,va,3,0),f(),i(16,` 178 `),f(),i(17,` 179 `),p(18,"div",34),i(19,` 180 `),J(20,"div",35),i(21,` 181 `),f(),i(22,` 182 `),f(),i(23,` 183 `),f(),i(24,` 184 `),p(25,"div",36),i(26,` 185 `),$(27,ya,4,0),f(),i(28,` 186 `),f(),i(29,` 187 `)),e&2){let t=E().$implicit,n=E();C(3),te("pointer-events-none",n.isClosed),C(7),ie(t.description),C(3),Ve(` 188 `,t.voteCount||0," vote",t.voteCount===1?"":"s",` 189 `),C(),F(n.isClosed?14:-1),C(),F(n.optionIsLeading(t)?15:-1),C(5),ht("width",n.optionPercent(t)+"%"),Se("aria-valuenow",n.optionPercent(t)),C(7),F((t.voteCount||0)>0?27:-1)}}function Pa(e,a){if(e&1&&(i(0,` 190 `),i(1,` 191 `),$(2,Ca,10,2),$(3,Ma,30,11)),e&2){let t=E();C(2),F(t.editing?2:-1),C(),F(t.editing?-1:3)}}function Ea(e,a){if(e&1){let t=Q();i(0,` 192 `),p(1,"button",42),N("click",function(){H(t);let o=E(2);return G(o.addOption())}),i(2,`
193 `),J(3,"i",43),i(4,` 194 Add Option 195 `),f(),i(5,` 196 `)}}function Sa(e,a){if(e&1){let t=Q();i(0,` 197 `),p(1,"div",39),i(2,` 198 `),p(3,"button",40),N("click",function(){H(t);let o=E();return G(o.onSave())}),i(4,"Save"),f(),i(5,` 199 `),$(6,Ea,6,0),p(7,"button",41),N("click",function(){H(t);let o=E();return G(o.onCancel())}),i(8,"Cancel"),f(),i(9,` 200 `),f(),i(10,` 201 `)}if(e&2){let t=E();C(6),F(((t.pollCopy==null||t.pollCopy.options==null?null:t.pollCopy.options.length)||0)<4?6:-1)}}function Oa(e,a){if(e&1){let t=Q();i(0,` 202 `),p(1,"div",44),i(2,` 203 `),p(3,"button",45),N("click",function(){H(t);let o=E();return G(o.confirmClosePoll())}),i(4),f(),i(5,` 204 `),f(),i(6,` 205 `)}if(e&2){let t=E();C(3),K("disabled",t.isClosing||!((t.existingPoll==null?null:t.existingPoll.isActive)??(t.pollCopy==null?null:t.pollCopy.isActive)??!0)),C(),re(` 206 `,t.isClosing?"Closing...":"Close Poll",` 207 `)}}function Ta(e,a){e&1&&(i(0,` 208 `),p(1,"span"),i(2,"Delete"),f(),i(3,` 209 `))}function ka(e,a){e&1&&(i(0,` 210 `),p(1,"span"),i(2,"Deleting..."),f(),i(3,` 211 `))}function Ia(e,a){if(e&1){let t=Q();i(0,` 212 `),p(1,"app-dialog-footer"),i(2,` 213 `),Ne(3,46),i(4,` 214 `),p(5,"button",47),N("click",function(){H(t);let o=E();return G(o.rejectDeletePoll())}),i(6,"Cancel"),f(),i(7,` 215 `),Ue(),i(8,` 216 `),Ne(9,48),i(10,` 217 `),p(11,"button",49),N("click",function(){H(t);let o=E();return G(o.acceptDeletePoll())}),i(12,` 218 `),$(13,Ta,4,0),$(14,ka,4,0),f(),i(15,` 219 `),Ue(),i(16,` 220 `),f(),i(17,` 221 `)}if(e&2){let t=E();C(11),K("disabled",t.isDeleting),C(2),F(t.isDeleting?-1:13),C(),F(t.isDeleting?14:-1)}}function Da(e,a){e&1&&(i(0,` 222 `),p(1,"span"),i(2,"Close Poll"),f(),i(3,` 223 `))}function Va(e,a){e&1&&(i(0,` 224 `),p(1,"span"),i(2,"Closing..."),f(),i(3,` 225 `))}function Aa(e,a){if(e&1){let t=Q();i(0,` 226 `),p(1,"app-dialog-footer"),i(2,` 227 `),Ne(3,46),i(4,` 228 `),p(5,"button",47),N("click",function(){H(t);let o=E();return G(o.rejectClosePoll())}),i(6,"Cancel"),f(),i(7,` 229 `),Ue(),i(8,` 230 `),Ne(9,48),i(10,` 231 `),p(11,"button",50),N("click",function(){H(t);let o=E();return G(o.acceptClosePoll())}),i(12,` 232 `),$(13,Da,4,0),$(14,Va,4,0),f(),i(15,` 233 `),Ue(),i(16,` 234 `),f(),i(17,` 235 `)}if(e&2){let t=E();C(11),K("disabled",t.isClosing),C(2),F(t.isClosing?-1:13),C(),F(t.isClosing?14:-1)}}function $a(e,a){e&1&&(i(0,` 236 `),p(1,"div",51),i(2,` 237 `),p(3,"div",52),i(4,` 238 `),p(5,"span",53),i(6,"Loading..."),f(),i(7,` 239 `),f(),i(8,` 240 `),f(),i(9,` 241 `))}function Fa(e,a){e&1&&(i(0,` 242 `),p(1,"div",54),i(2,"No votes found for this option"),f(),i(3,` 243 `))}function wa(e,a){if(e&1&&(i(0,` 244 `),p(1,"div",57),i(2,` 245 `),p(3,"div",58),i(4,` 246 `),J(5,"app-user-initials",59),i(6,` 247 `),p(7,"span",60),i(8),f(),i(9,` 248 `),f(),i(10,` 249 `),f(),i(11,` 250 `)),e&2){let t=a.$implicit,n=E(2);C(5),K("firstName",n.parseFirstName(t.fullName))("lastName",n.parseLastName(t.fullName))("id",t.savedBy)("size","small"),C(3),ie(t.fullName||t.initials||"Anonymous")}}function Ra(e,a){if(e&1&&(i(0,` 251 `),p(1,"div",55),i(2,` 252 `),p(3,"div",56),i(4,` 253 `),ce(5,wa,12,5,null,null,Fe),f(),i(7,` 254 `),f(),i(8,` 255 `)),e&2){let t=E();C(5),de(t.votesDialogVotes)}}function La(e,a){if(e&1){let t=Q();i(0,` 256 `),p(1,"app-dialog-footer"),i(2,` 257 `),Dn(3,46),i(4,` 258 `),Ne(5,48),i(6,` 259 `),p(7,"button",61),N("click",function(){H(t);let o=E();return G(o.closeVotesDialog())}),i(8,"Close"),f(),i(9,` 260 `),Ue(),i(10,` 261 `),f(),i(11,` 262 `)}}var Ii=(()=>{let a=class a{constructor(n,o,l){this.pollService=n,this.siteDataService=o,this.changeDetectorRef=l,this.unsubscribe$=new ft,this.readonly=!1,this.isCreator=!1,this.clubUserID=null,this.showModalCloseButton=!1,this.close=new Y,this.save=new Y,this.voteSubmitted=new Y,this.refreshPollRequested=new Y,this.deleteClicked=new Y,this.editing=!1,this.pollCopy=null,this.hasVoted=!1,this.isClosed=!1,this.isClosing=!1,this.isDeleting=!1,this.isRefreshing=!1,this.showActionsMenu=!1,this.showDeleteConfirm=!1,this.showCloseConfirm=!1,this.showVotesDialog=!1,this.votesDialogTitle="",this.votesDialogVotes=[],this.loadingVotes=!1,this.loading=!1,this.error=null}ngOnInit(){this.initializePollState()}ngOnChanges(n){n.existingPoll&&!n.existingPoll.firstChange&&this.initializePollState()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this.close.complete(),this.save.complete(),this.voteSubmitted.complete(),this.refreshPollRequested.complete(),this.deleteClicked.complete()}initializePollState(){this.existingPoll&&(this.pollCopy=JSON.parse(JSON.stringify(this.existingPoll)));let n=this.existingPoll?.usersVotedOptionID;this.isClosed=!(this.existingPoll?.isActive??this.pollCopy?.isActive??!0)||new Date().toDateString()>=new Date(this.existingPoll?.closesAt||"").toDateString(),n!=null?(this.selectedOptionId=n,this.hasVoted=!0):(this.selectedOptionId=null,this.hasVoted=!1),this.leadingOptionId=nt(this.existingPoll??this.pollCopy??void 0)??null}totalVotes(){return this.pollCopy?.totalVotes??this.existingPoll?.totalVotes??0}optionPercent(n){if(n.votePercentage!==void 0&&n.votePercentage!==null)return n.votePercentage;let o=this.totalVotes();return o?Math.round((n.voteCount||0)/o*100):0}optionValue(n,o){return Kt(n)??o}optionIsLeading(n){if(!this.isClosed)return!1;let o=Kt(n);return!!o&&o===this.leadingOptionId}onOptionChange(n){let o=n?.target?.value??n?.value??n;o!=null&&this.voteSubmitted.emit(Number(o))}refreshPoll(){return se(this,null,function*(){if(this.isRefreshing||!this.pollContext)return;let n=this.existingPoll?.id??this.pollCopy?.id;if(!n){this.siteDataService.showSiteErrorAlert("Cannot refresh: missing poll information");return}this.isRefreshing=!0,this.pollService.getPoll(this.pollContext,n).pipe(Ft(this.unsubscribe$)).subscribe({next:o=>{this.existingPoll=o,this.pollCopy=JSON.parse(JSON.stringify(o)),this.leadingOptionId=nt(o)??null,this.initializePollState(),this.refreshPollRequested.emit(),this.isRefreshing=!1},error:()=>{this.siteDataService.showSiteErrorAlert("Failed to refresh poll"),this.isRefreshing=!1}})})}toggleEdit(){this.editing=!this.editing,this.editing&&this.existingPoll&&(this.pollCopy=JSON.parse(JSON.stringify(this.existingPoll))),this.showActionsMenu=!1}toggleActionsMenu(){this.showActionsMenu=!this.showActionsMenu}confirmClosePoll(){if(!this.pollContext)return;let n=this.existingPoll?.id??this.pollCopy?.id;if(!n){this.siteDataService.showSiteErrorAlert("Cannot close poll: missing information");return}(this.existingPoll?.isActive??this.pollCopy?.isActive??!0)&&(this.pendingPollIdForClose=n,this.showCloseConfirm=!0)}acceptClosePoll(){this.pendingPollIdForClose&&(this.showCloseConfirm=!1,this.performClosePoll(this.pendingPollIdForClose))}rejectClosePoll(){this.showCloseConfirm=!1,this.pendingPollIdForClose=void 0}performClosePoll(n){return se(this,null,function*(){this.isClosing=!0,this.showActionsMenu=!1,this.pollService.closePoll(this.pollContext,n).pipe(Ft(this.unsubscribe$)).subscribe({next:o=>{this.existingPoll=o,this.pollCopy=JSON.parse(JSON.stringify(o)),this.leadingOptionId=nt(o)??null,this.initializePollState(),this.save.emit(o),this.isClosing=!1},error:()=>{this.siteDataService.showSiteErrorAlert("Failed to close poll"),this.isClosing=!1}})})}deletePoll(){if(!this.pollContext)return;let n=this.existingPoll?.id??this.pollCopy?.id;if(!n){this.siteDataService.showSiteErrorAlert("Cannot delete poll: missing information");return}this.pendingPollIdForDelete=n,this.showDeleteConfirm=!0}acceptDeletePoll(){this.pendingPollIdForDelete&&(this.showDeleteConfirm=!1,this.performDeletePoll(this.pendingPollIdForDelete))}rejectDeletePoll(){this.showDeleteConfirm=!1,this.pendingPollIdForDelete=void 0}performDeletePoll(n){return se(this,null,function*(){this.isDeleting=!0,this.showActionsMenu=!1,this.pollService.deletePoll(this.pollContext,n).pipe(Ft(this.unsubscribe$)).subscribe({next:()=>
262{this.deleteClicked.emit(),this.close.emit(),this.isDeleting=!1},error:()=>{this.siteDataService.showSiteErrorAlert("Failed to delete poll"),this.isDeleting=!1}})})}onSave(){if(this.pollCopy){if(!this.pollCopy.question||!this.pollCopy.options||this.pollCopy.options.filter(n=>(n.description||"").trim()).length<2){this.siteDataService.showSiteErrorAlert("Please provide a question and at least 2 options");return}this.save.emit(this.pollCopy),this.editing=!1}}onCancel(){this.editing=!1,this.pollCopy=this.existingPoll?JSON.parse(JSON.stringify(this.existingPoll)):null}closeModal(){this.close.emit()}addOption(){this.pollCopy&&((this.pollCopy.options?.length||0)>=4||this.pollCopy.options.push({id:void 0,pollId:this.pollCopy.id,description:"",displayOrder:this.pollCopy.options.length+1,voteCount:0,votePercentage:0}))}removeOption(n){this.pollCopy&&this.pollCopy.options.splice(n,1)}onOptionDescriptionChange(n,o){!this.pollCopy||!this.pollCopy.options||!this.pollCopy.options[n]||(this.pollCopy.options[n].description=o,this.pollCopy.options[n].id=void 0,this.pollCopy.options[n].pollOptionID=void 0,this.pollCopy.options[n].pollOptionId=void 0)}showVotesForOption(n,o){return se(this,null,function*(){if(!this.pollContext||!this.existingPoll?.id)return;let l=n?.id??n?.pollOptionID??n?.pollOptionId;if(l){this.loadingVotes=!0,this.votesDialogTitle=`Votes for: "${n.description}"`,this.showVotesDialog=!0,this.changeDetectorRef.detectChanges();try{let m=yield St(this.pollService.getVotesForOption(this.pollContext,this.existingPoll.id,l));this.votesDialogVotes=m.results||[]}catch(m){this.siteDataService.showSiteErrorAlert("Failed to load votes for this option"),this.votesDialogVotes=[]}finally{this.loadingVotes=!1,this.changeDetectorRef.detectChanges()}}})}closeVotesDialog(){this.showVotesDialog=!1,this.votesDialogVotes=[],this.votesDialogTitle=""}parseFirstName(n){if(!n)return null;let o=n.trim().split(" ");return o.length>0?o[0]:null}parseLastName(n){if(!n)return null;let o=n.trim().split(" ");return o.length>1?o[o.length-1]:null}};a.\u0275fac=function(o){return new(o||a)(he(Ei),he(Wt),he(Bt))},a.\u0275cmp=oe({type:a,selectors:[["app-poll-details-view"]],inputs:{existingPoll:"existingPoll",readonly:"readonly",isCreator:"isCreator",pollContext:"pollContext",clubUserID:"clubUserID",showModalCloseButton:"showModalCloseButton"},outputs:{close:"close",save:"save",voteSubmitted:"voteSubmitted",refreshPollRequested:"refreshPollRequested",deleteClicked:"deleteClicked"},standalone:!1,features:[$e],decls:94,vars:45,consts:[[1,"poll-content"],[1,"poll-card","card"],[1,"card-body"],[1,"poll-header","d-flex","justify-content-between","align-items-start","mb-3"],[1,"flex-grow-1"],[1,"poll-subtitle","text-muted","text-small"],[1,"mx-1"],[1,"poll-actions","flex"],["type","button","title","Refresh Poll",1,"refresh-poll-btn",3,"click","disabled"],[1,"fa-solid","fa-arrows-rotate"],["title","Delete Poll",1,"text-danger",3,"click","disabled"],[1,"fa-solid","fa-trash","me-2"],[1,"poll-options-container"],["appendTo","body","header","Delete Poll","styleClass","delete-confirm-modal",3,"visibleChange","visible","modal","closable","draggable","resizable","position"],[1,"dialog-content"],[1,"mb-0"],["pTemplate","footer"],["appendTo","body","header","Close Poll","styleClass","close-confirm-modal",3,"visibleChange","visible","modal","closable","draggable","resizable","position"],["appendTo","body","styleClass","votes-modal",3,"visibleChange","onHide","visible","modal","closable","draggable","resizable","position","header"],[1,"poll-modal-header"],[1,"d-flex","justify-content-between","align-items-center","p-3","border-bottom"],["type","button","aria-label","Close poll details",1,"btn","btn-link",3,"click"],[1,"fa-solid","fa-times"],[1,"poll-question","fw-600","mb-1"],["type","text","placeholder","Question",1,"form-control","fw-600","mb-2",3,"ngModelChange","ngModel"],[1,"option-edit-item","mb-2"],[1,"d-flex","align-items-center"],["type","text","placeholder","Option text",1,"form-control","me-2",3,"ngModelChange","ngModel"],["type","button",1,"btn","btn-outline-danger","btn-sm",3,"click"],[1,"poll-option-row","mb-2"],[1,"d-flex","align-items-center","w-100","p-2","rounded","option-label"],[1,"d-flex","justify-content-between","align-items-center","mb-1"],[1,"option-text"],[1,"text-muted","text-small"],[1,"progress",2,"height","6px"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"progress-bar"],[1,"mt-2","ms-2"],["aria-label","Top voted option",1,"fa-solid","fa-star","text-warning","ms-1"],["type","button","title","View participants who voted for this option",1,"btn","btn-secondary","full-width",3,"click"],[1,"edit-actions","mt-3"],["type","button",1,"btn","btn-primary","w-100","mb-2",3,"click"],["type","button",1,"btn","btn-outline-secondary","w-100",3,"click"],["type","button",1,"btn","btn-outline-primary","w-100","mb-2",3,"click"],[1,"fa-solid","fa-plus","me-1"],[1,"close-poll-action","mt-3"],["type","button",1,"btn","btn-outline-primary","w-100",3,"click","disabled"],["slot","secondary"],["type","button",1,"btn","btn-secondary","me-2",3,"click"],["slot","primary"],["type","button",1,"btn","btn-danger",3,"click","disabled"],["type","button",1,"btn","btn-primary",3,"click","disabled"],[1,"text-center","p-3"],["role","status",1,"spinner-border","spinner-border-sm","me-2"],[1,"sr-only"],[1,"text-muted","text-center","p-3"],[1,"votes-list"],[1,"list-group"],[1,"list-group-item"],[1,"d-flex"],[3,"firstName","lastName","
262id","size"],[1,"p-1"],["type","button",1,"btn","btn-secondary",3,"click"]],template:function(o,l){o&1&&(i(0,` 263`),$(1,pa,15,0),p(2,"div",0),i(3,` 264 `),p(4,"div",1),i(5,` 265 `),p(6,"div",2),i(7,` 266 `),i(8,` 267 `),p(9,"div",3),i(10,` 268 `),p(11,"div",4),i(12,` 269 `),i(13,` 270 `),$(14,fa,4,1),$(15,ga,3,1),p(16,"div",5),i(17,` 271 `),p(18,"small"),i(19,` 272 `),p(20,"span"),i(21),f(),i(22,` 273 `),p(23,"span",6),i(24,"\u2022"),f(),i(25,` 274 `),$(26,ha,5,4),$(27,xa,5,4),f(),i(28,` 275 `),f(),i(29,` 276 `),f(),i(30,` 277 278 `),i(31,` 279 `),p(32,"div",7),i(33,` 280 `),p(34,"button",8),N("click",function(){return l.refreshPoll()}),i(35,` 281 `),J(36,"i",9),i(37,` 282 `),f(),i(38,` 283 `),p(39,"button",10),N("click",function(){return l.deletePoll()}),i(40,` 284 `),J(41,"i",11),i(42,` 285 `),f(),i(43,` 286 `),f(),i(44,` 287 `),f(),i(45,` 288 289 `),i(46,` 290 `),p(47,"div",12),i(48,` 291 `),ce(49,Pa,4,2,null,null,Fe),f(),i(51,` 292 293 `),i(52,` 294 `),$(53,Sa,11,1),$(54,Oa,7,2),f(),i(55,` 295 `),f(),i(56,` 296`),f(),i(57,` 297 298`),i(58,` 299`),p(59,"p-dialog",13),Ce("visibleChange",function(c){return _e(l.showDeleteConfirm,c)||(l.showDeleteConfirm=c),c}),i(60,` 300 `),p(61,"div",14),i(62,` 301 `),p(63,"p",15),i(64,"Are you sure you want to delete this poll? This action cannot be undone."),f(),i(65,` 302 `),f(),i(66,` 303 `),gt(67,Ia,18,3,"ng-template",16),i(68,` 304`),f(),i(69,` 305 306`),i(70,` 307`),p(71,"p-dialog",17),Ce("visibleChange",function(c){return _e(l.showCloseConfirm,c)||(l.showCloseConfirm=c),c}),i(72,` 308 `),p(73,"div",14),i(74,` 309 `),p(75,"p",15),i(76,"Are you sure you want to close this poll? This action cannot be undone."),f(),i(77,` 310 `),f(),i(78,` 311 `),gt(79,Aa,18,3,"ng-template",16),i(80,` 312`),f(),i(81,` 313 314`),i(82,` 315`),p(83,"p-dialog",18),Ce("visibleChange",function(c){return _e(l.showVotesDialog,c)||(l.showVotesDialog=c),c}),N("onHide",function(){return l.closeVotesDialog()}),i(84,` 316 `),p(85,"div",14),i(86,` 317 `),$(87,$a,10,0),$(88,Fa,4,0),$(89,Ra,9,0),f(),i(90,` 318 `),gt(91,La,12,0,"ng-template",16),i(92,` 319`),f(),i(93,` 320`)),o&2&&(C(),F(l.showModalCloseButton?1:-1),C(),te("has-modal-header",l.showModalCloseButton),C(12),F(l.editing?-1:14),C(),F(l.editing?15:-1),C(6),re("Votes: ",l.totalVotes()),C(5),F(l.isClosed?26:-1),C(),F(l.isClosed?-1:27),C(7),K("disabled",l.isRefreshing),C(2),te("fa-spin",l.isRefreshing),C(3),K("disabled",l.isDeleting),C(10),de((l.pollCopy==null?null:l.pollCopy.options)||(l.existingPoll==null?null:l.existingPoll.options)),C(4),F(l.editing?53:-1),C(),F(l.isCreator&&!l.editing&&!l.isClosed?54:-1),C(5),Je(He(42,Si)),xe("visible",l.showDeleteConfirm),K("modal",!0)("closable",!0)("draggable",!1)("resizable",!1)("position","center"),C(12),Je(He(43,Si)),xe("visible",l.showCloseConfirm),K("modal",!0)("closable",!0)("draggable",!1)("resizable",!1)("position","center"),C(12),Je(He(44,ua)),xe("visible",l.showVotesDialog),K("modal",!0)("closable",!0)("draggable",!1)("resizable",!1)("position","center")("header",l.votesDialogTitle),C(4),F(l.loadingVotes?87:-1),C(),F(!l.loadingVotes&&l.votesDialogVotes.length===0?88:-1),C(),F(!l.loadingVotes&&l.votesDialogVotes.length>0?89:-1))},dependencies:[xt,_t,Ct,Ht,bt,si,Xt,Re],styles:[".poll-content.has-modal-header[_ngcontent-%COMP%]{padding-top:0}.poll-card[_ngcontent-%COMP%] .poll-header[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{width:calc(100% - 120px)}.poll-card[_ngcontent-%COMP%] .poll-header[_ngcontent-%COMP%] .poll-question[_ngcontent-%COMP%]{font-size:1.125rem;line-height:1.4}.poll-card[_ngcontent-%COMP%] .poll-header[_ngcontent-%COMP%] .poll-subtitle[_ngcontent-%COMP%]{font-size:.875rem}.poll-card[_ngcontent-%COMP%] .poll-header[_ngcontent-%COMP%] .poll-actions[_ngcontent-%COMP%] .text-danger[_ngcontent-%COMP%]:hover{color:var(--red-700)}.poll-card[_ngcontent-%COMP%] .poll-header[_ngcontent-%COMP%] .poll-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:var(--primary);background:transparent;border:0;cursor:pointer;margin:0 3px}.poll-card[_ngcontent-%COMP%] .poll-header[_ngcontent-%COMP%] .poll-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{opacity:.8}.poll-card[_ngcontent-%COMP%] .poll-options-container[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{cursor:pointer;background:#00000005;transition:background-color .2s ease}.poll-card[_ngcontent-%COMP%] .poll-options-container[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]:hover:not(.pointer-events-none){background:#0000000d}.poll-card[_ngcontent-%COMP%] .poll-options-container[_ngcontent-%COMP%] .option-label.pointer-events-none[_ngcontent-%COMP%]{cursor:default}.poll-card[_ngcontent-%COMP%] .poll-options-container[_ngcontent-%COMP%] .option-text[_ngcontent-%COMP%]{font-weight:500}.poll-card[_ngcontent-%COMP%] .poll-options-container[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{background-color:#0000001a;border-radius:3px}.poll-card[_ngcontent-%COMP%] .poll-options-container[_ngcontent-%COMP%] .progress-bar[_ng
320content-%COMP%]{height:100%;background-color:#28a745;border-radius:3px;transition:width .3s ease}.poll-card[_ngcontent-%COMP%] .option-edit-item[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{border-radius:4px}.poll-modal-header[_ngcontent-%COMP%]{background:#fff;position:sticky;top:0;z-index:10}.poll-modal-header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:1.125rem;font-weight:600}.dropdown-menu.show[_ngcontent-%COMP%]{display:block}.votes-list[_ngcontent-%COMP%]{max-height:400px;overflow-y:auto}.votes-list[_ngcontent-%COMP%] .list-group-item[_ngcontent-%COMP%]{padding:12px 0;border:none;border-bottom:1px solid #e0e0e0}.votes-list[_ngcontent-%COMP%] .list-group-item[_ngcontent-%COMP%]:last-child{border-bottom:none}.votes-list[_ngcontent-%COMP%] .list-group-item[_ngcontent-%COMP%] .fw-500[_ngcontent-%COMP%]{font-weight:500}.btn-link.btn-sm[_ngcontent-%COMP%]{text-decoration:none;font-size:.875rem}.btn-link.btn-sm[_ngcontent-%COMP%]:hover{text-decoration:underline}"]});let e=a;return e})();var ja=()=>[],qa=()=>({width:"500px",maxWidth:"95vw"});function Ba(e,a){e&1&&(i(0,` 321 `),p(1,"span"),i(2,"Poll has closed"),f(),i(3,` 322 `))}function Na(e,a){if(e&1&&(i(0,` 323 `),p(1,"span"),i(2),we(3,"date"),f(),i(4,` 324 `)),e&2){let t=E();C(2),re("Ends: ",lt(3,1,t.poll==null?null:t.poll.closesAt,"MMM d 'at' h:mm a"))}}var Di=(()=>{let a=class a{constructor(n){this.ngZone=n,this.reactions=[],this.showReactions=!1,this.hasVoted=!1,this.showViewVotesModal=!1,this.lastClickedOptionId=null,this.voteSubmitted=new Y,this.pollUpdated=new Y,this.isRefreshing=!1,this.reactionsClicked=new Y,this.refreshPollRequested=new Y,this.deleteMessageClicked=new Y,this.isClosed=!1}ngOnInit(){console.log("[POLL] ngOnInit - poll data:",{poll:this.poll,isActive:this.poll?.isActive,closesAt:this.poll?.closesAt}),this.initializeVoteState(),this.isClosed=this.isPollClosed(),console.log("[POLL] ngOnInit - isClosed set to:",this.isClosed)}ngOnChanges(n){n.poll&&!n.poll.firstChange&&(console.log("[POLL] ngOnChanges - poll changed:",{poll:this.poll,isActive:this.poll?.isActive,closesAt:this.poll?.closesAt,lastClickedOptionId:this.lastClickedOptionId}),this.lastClickedOptionId===null?this.initializeVoteState():(this.isClosed=this.isPollClosed(),this.leadingOptionId=nt(this.poll)??null))}initializeVoteState(){let n=this.poll?.usersVotedOptionID;n!=null?(this.selectedOptionId=n,this.hasVoted=!0):(this.selectedOptionId=null,this.hasVoted=!1),this.leadingOptionId=nt(this.poll)??null}ngOnDestroy(){this.voteSubmitted.complete(),this.reactionsClicked.complete(),this.deleteMessageClicked.complete(),this.voteSubmitTimeoutId&&clearTimeout(this.voteSubmitTimeoutId)}onViewVotes(){this.showViewVotesModal=!0}onPollSaved(n){n&&(this.poll=n,this.pollUpdated.emit(n)),this.showViewVotesModal=!1}onDeleteClicked(){this.deleteMessageClicked.emit()}onVotesUpdated(n){this.poll&&(this.poll.options=n.options,this.poll.totalVotes=n.totalVotes,this.poll=Mn({},this.poll))}totalVotes(){return this.poll?.totalVotes??0}isPollClosed(){if(!(this.poll?.isActive??!0))return!0;if(!this.poll?.closesAt)return!1;let n=new Date(this.poll.closesAt);return isNaN(n.getTime())?(console.log("[POLL] Poll open: invali
324d closesAt date",{closesAt:this.poll.closesAt}),!1):n<new Date}onOptionChange(n){let o=n?.detail?.value??n?.value??n;o!=null&&this.lastClickedOptionId!==o&&(this.selectedOptionId=o,this.hasVoted=!0,this.lastClickedOptionId=o,this.leadingOptionId=nt(this.poll)??null,this.voteSubmitTimeoutId&&clearTimeout(this.voteSubmitTimeoutId),this.voteSubmitTimeoutId=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{this.ngZone.run(()=>{this.voteSubmitted.emit(o),this.voteSubmitTimeoutId=null})},15e3)))}onReactionsClicked(){this.reactionsClicked.emit()}onCardClicked(n){try{let o=n?.target;if(!o||o.closest&&(o.closest('input[type="radio"]')||o.closest(".poll-option-item")||o.closest(".poll-options")||o.closest("a")||o.closest("button")))return;this.reactionsClicked.emit()}catch(o){}}};a.\u0275fac=function(o){return new(o||a)(he(On))},a.\u0275cmp=oe({type:a,selectors:[["app-message-poll"]],inputs:{poll:"poll",isSender:"isSender",clubUserId:"clubUserId",reactions:"reactions",showReactions:"showReactions",pollContext:"pollContext",isRefreshing:"isRefreshing"},outputs:{voteSubmitted:"voteSubmitted",pollUpdated:"pollUpdated",reactionsClicked:"reactionsClicked",refreshPollRequested:"refreshPollRequested",deleteMessageClicked:"deleteMessageClicked"},standalone:!1,features:[$e],decls:35,vars:29,consts:[[1,"message-poll","card-wrapper","px-2"],[1,"poll-card",3,"click"],[1,"poll-header-clickable",3,"click"],["subtitle","Click to view votes",3,"refresh","question","isSender","isRefreshing","isClosed"],[3,"selectedOptionIdChange","optionSelected","votesUpdated","options","selectedOptionId","hasVoted","totalVotes","leadingOptionId","isClosed","isSender","disabledOptionId"],[1,"poll-footer"],[1,"text-smallest"],[1,"dot"],["appendTo","body","header","Poll Details","styleClass","poll-details-modal",3,"visibleChange","visible","modal","closable","draggable","resizable","position"],[3,"voteSubmitted","save","deleteClicked","close","pollContext","clubUserID","existingPoll","isCreator"]],template:function(o,l){o&1&&(p(0,"div",0),i(1,` 325 `),p(2,"div",1),N("click",function(c){return l.onCardClicked(c)}),i(3,` 326 `),p(4,"div",2),N("click",function(c){return l.onViewVotes(),c.stopPropagation()}),i(5,` 327 `),p(6,"app-poll-header",3),N("refresh",function(){return l.refreshPollRequested.emit()}),i(7,` 328 `),f(),i(8,` 329 `),f(),i(9,` 330 `),p(10,"app-poll-options",4),Ce("selectedOptionIdChange",function(c){return _e(l.selectedOptionId,c)||(l.selectedOptionId=c),c}),N("optionSelected",function(c){return l.onOptionChange(c)})("votesUpdated",function(c){return l.onVotesUpdated(c)}),i(11,` 331 `),f(),i(12,` 332 333 `),p(13,"div",5),i(14,` 334 `),p(15,"div",6),i(16,` 335 `),p(17,"span"),i(18),f(),i(19,` 336 `),p(20,"span",7),i(21,"\xA0\u2022\xA0"),f(),i(22,` 337 `),$(23,Ba,4,0),$(24,Na,5,4),f(),i(25,` 338 `),f(),i(26,` 339 `),f(),i(27,` 340 341 `),i(28,` 342 `),p(29,"p-dialog",8),Ce("visibleChange",function(c){return _e(l.showViewVotesModal,c)||(l.showViewVotesModal=c),c}),i(30,` 343 `),p(31,"app-poll-details-view",9),N("voteSubmitted",function(c){return l.onOptionChange(c)})("save",function(c){return l.onPollSaved(c)})("deleteClicked",function(){return l.onDeleteClicked()})("close",function(){return l.showViewVotesModal=!1}),i(32,` 344 `),f(),i(33,` 345 `),f(),i(34,` 346 347`),f()),o&2&&(C(6),K("question",l.poll==null?null:l.poll.question)("isSender",l.isSender)("isRefreshing",l.isRefreshing)("isClosed",!((l.poll==null?null:l.poll.isActive)??!0)),C(4),K("options",(l.poll==null?null:l.poll.options)||He(27,ja)),xe("selectedOptionId",l.selectedOptionId),K("hasVoted",l.hasVoted)("totalVotes",l.totalVotes())("leadingOptionId",l.leadingOptionId)("isClosed",l.isPollClosed())("isSender",l.isSender)("disabledOptionId",l.lastClickedOptionId),C(8),re("Votes: ",l.totalVotes()," "),C(5),F(l.isPollClosed()?23:-1),C(),F(l.isPollClosed()?-1:24),C(5),Je(He(28,qa)),xe("visible",l.showViewVotesModal),K("modal",!0)("closable",!0)("draggable",!1)("resizable",!1)("position","center"),C(2),K("pollContext",l.pollContext)("clubUserID",l.clubUserId)("existingPoll",l.poll)("isCreator",l.isSender))},dependencies:[bt,Mi,Pi,Ii,Re],styles:[".poll-options-disabled[_ngcontent-%COMP%]{cursor:default!important;pointer-events:none!important}.poll-options-disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{opacity:.6!important}.poll-header-clickable[_ngcontent-%COMP%]{cursor:pointer;transition:opacity .15s ease}.poll-header-clickable[_ngcontent-%COMP%]:hover{opacity:.85}"]});let e=a;return e})();var Ha=["*"],Ga=(e,a,t)=>({sender:e,"club-message":a,"is-pinned":t}),Wa=(e,a)=>({recipient:e,"club-message":a}),Xa=(e,a)=>a.emoji;function Ya(e,a){if(e&1&&(i(0,` 348 `),p(1,"span"),i(2),f(),i(3,` 349 `)),e&2){let t=E(3);C(2),Ve("",t.firstName," ",t.lastName)}}function Qa(e,a){if(e&1&&(i(0,` 350 `),p(1,"div",6),i(2,` 351 `),p(3,"span"),i(4),f(),i(5,` 352 `),$(6,Ya,4,2),f(),i(7,` 353 `)),e&2){let t=E(2);C(4),ie(t.sentDate),C(2),F(t.isSender?-1:6)}}function Ka(e,a){if(e&1&&(i(0,` 354 `),p(1,"div",7),i(2,`
355 `),J(3,"img",8),i(4,` 356 `),f(),i(5,` 357 `)),e&2){let t=E(2);C(),te("chat-bubble--user",t.isUserBubble)("chat-clickable",t.isClickable),C(2),K("src",zt(t.file),at)}}function Ja(e,a){if(e&1){let t=Q();i(0,` 358 `),p(1,"app-message-quote",9),N("click",function(o){return H(t),E(2).quotedMessageClicked.emit(),G(o.stopPropagation())}),f(),i(2,` 359 `)}if(e&2){let t=E(2);C(),K("quotedMessage",t.quotedMessage)("canDelete",!1)}}function Za(e,a){if(e&1&&(i(0,` 360 `),p(1,"div",10),i(2),f(),i(3,` 361 `)),e&2){let t=E(2);C(),te("chat-bubble--user",t.isUserBubble)("chat-clickable",t.isClickable),C(),ie(t.messageText)}}function el(e,a){if(e&1&&(i(0,` 362 `),p(1,"div",11)(2,"em",12),i(3,"message removed by user"),f()(),i(4,` 363 `)),e&2){let t=E(2);C(),te("chat-bubble--user",t.isUserBubble)}}function tl(e,a){if(e&1){let t=Q();i(0,` 364 `),i(1,` 365 `),p(2,"div",13),N("click",function(o){return o.stopPropagation()}),i(3,` 366 `),i(4,` 367 `),p(5,"app-message-poll",14),N("voteSubmitted",function(o){H(t);let l=E(2);return G(l.voteSubmitted.emit(o))})("refreshPollRequested",function(){H(t);let o=E(2);return G(o.refreshPollRequested.emit())})("pollUpdated",function(o){H(t);let l=E(2);return G(l.pollUpdated.emit(o))})("deleteMessageClicked",function(){H(t);let o=E(2);return G(o.deleteMessageClicked.emit())})("reactionsClicked",function(){H(t);let o=E(2);return G(o.messageReactionsClicked.emit())}),f(),i(6,` 368 `),f(),i(7,` 369 `)}if(e&2){let t=E(2);C(2),te("chat-bubble--user",t.isUserBubble),C(3),te("recipient",!t.isSender),K("pollContext",t.pollContext)("isRefreshing",t.isRefreshing)("clubUserId",t.currentClubUser==null?null:t.currentClubUser.clubUserID)("poll",t.poll)("isSender",t.isSender)("reactions",t.pollReactions)}}function nl(e,a){if(e&1&&(i(0,` 370 `),p(1,"div",11)(2,"em",12),J(3,"i",15),i(4,"Loading poll..."),f()(),i(5,` 371 `)),e&2){let t=E(2);C(),te("chat-bubble--user",t.isUserBubble)}}function il(e,a){if(e&1&&(i(0,` 372 `),p(1,"div",16),i(2,` 373 `),p(3,"em",12),J(4,"i",17),i(5),f(),i(6,` 374 `),f(),i(7,` 375 `)),e&2){let t=E(2);C(5),ie(t.pollStatusMessage)}}function ol(e,a){if(e&1&&(i(0,` 376 `),p(1,"span",21),i(2),f(),i(3,` 377 `)),e&2){let t=E().$implicit;C(2),ie(t.count)}}function al(e,a){if(e&1){let t=Q();i(0,` 378 `),p(1,"span",19),N("click",function(o){let l=H(t).$implicit,m=E(3);return G(m.onReactionTapped(l.emoji,o))}),i(2,` 379 `),p(3,"span",20),i(4),f(),i(5,` 380 `),$(6,ol,4,1),f(),i(7,` 381 `)}if(e&2){let t=a.$implicit,n=E(3);C(),te("user-reacted",t.hasUserReacted)("interactive",n.canReactToBadge),Se("role",n.canReactToBadge?"button":null),C(3),ie(t.emoji),C(2),F(t.count>1?6:-1)}}function ll(e,a){if(e&1&&(i(0,` 382 `),p(1,"div",18),i(2,`
383 `),ce(3,al,8,7,null,null,Xa),f(),i(5,` 384 `)),e&2){let t=E(2);C(),te("sender",t.isSender),C(2),de(t.groupedReactions)}}function sl(e,a){if(e&1){let t=Q();i(0,` 385`),p(1,"div",2),i(2,` 386 `),$(3,Qa,8,2),p(4,"div",3),i(5,` 387 `),p(6,"div",4),i(7,` 388 `),An(8),i(9,` 389 `),f(),i(10,` 390 `),p(11,"div",5),N("click",function(o){H(t);let l=E();return G(l.isClubMessage?null:l.onMessageClick(o))}),i(12,` 391 `),$(13,Ka,6,6),$(14,Ja,3,2),$(15,Za,4,5),$(16,el,5,2),$(17,tl,8,10),$(18,nl,6,2),$(19,il,8,1),f(),i(20,` 392 `),i(21,` 393 `),$(22,ll,6,2),f(),i(23,` 394`),f(),i(24,` 395`)}if(e&2){let t=E();C(),K("ngClass",Fn(14,Ga,t.isUserBubble,t.isClubMessage,t.isPinned)),Se("data-message-id",t.messageID),C(2),F(!t.hideName&&t.sentDate?3:-1),C(),te("chat-row--user",t.isUserBubble),K("ngClass",jt(18,Wa,!t.isSender,t.isClubMessage)),C(9),F(t.file&&!t.isDeleted?13:-1),C(),F(t.quotedMessage?14:-1),C(),F(t.messageText&&!t.isDeleted&&!t.pollID?15:-1),C(),F(t.isDeleted?16:-1),C(),F(t.pollID&&t.poll&&t.pollContext&&!t.isDeleted?17:-1),C(),F(t.pollID&&!t.poll?18:-1),C(),F(t.pollStatusMessage?19:-1),C(3),F(t.groupedReactions.length>0&&!t.isDeleted?22:-1)}}var Qd=(()=>{let a=class a{constructor(n){this.messageService=n,this.swiperModules=[pn],this.isSender=!1,this.reactions=[],this.isClubMessage=!1,this.isLastMessage=!1,this.hideSending=!1,this.hideName=!1,this.isRefreshing=!1,this.isPinned=!1,this.MessageType=ci,this.canEdit=!1,this.canDelete=!1,this.canPin=!1,this.canReply=!0,this.canReact=!0,this.canReport=!1,this.deleteMessageClicked=new Y,this.messageTextClicked=new Y,this.messageReactionsClicked=new Y,this.openImageClicked=new Y,this.voteSubmitted=new Y,this.refreshPollRequested=new Y,this.pollUpdated=new Y,this.replyClicked=new Y,this.reactClicked=new Y,this.reactionTapped=new Y,this.pinClicked=new Y,this.editClicked=new Y,this.reportClicked=new Y,this.quotedMessageClicked=new Y,this.copyClicked=new Y,this.showContextMenu=!1,this.menuPosition=null,this.menuContainerBounds=null,this.datePipe=new Re("en-US"),this.cachedContextMenuConfig=null,this.cachedContextMenuConfigHash=null,this.cachedGroupedReactions=null,this.cachedGroupedReactionsHash=null}ngOnInit(){}ngOnChanges(n){if(n.pollID&&!n.pollID.firstChange){let o=n.pollID.previousValue,l=n.pollID.currentValue;l&&o!==l&&this.refreshPollRequested.emit()}}get contextMenuConfig(){let n=`${this.canEdit}|${this.canDelete}|${this.canPin}|${this.canReply}|${this.canReact}|${this.canReport}|${this.isPinned}|${this.isDeleted}|${this.currentUserEmoji}|${this.isClubMessage}|${this.isSender}|${this.messageText}|${this.pollID}`;return this.cachedContextMenuConfig&&this.cachedContextMenuConfigHash===n?this.cachedContextMenuConfig:(this.cachedContextMenuConfig={canEdit:this.canEdit,canDelete:this.canDelete,canPin:this.canPin,canReply:this.canReply,canReact:this.canReact&&!this.isClubMessage,canReport:this.canReport&&!this.isSender,isPinned:this.isPinned,isDeleted:this.isDeleted,currentUserEmoji:this.currentUserEmoji,canCopy:!!(this.messageText&&!this.isDeleted&&!this.pollID)},this.cachedContextMenuConfigHash=n,this.cachedContextMenuConfig)}get canReactToBadge(){return this.canReact&&!this.isClubMessage&&!this.isDeleted}onReactionTapped(n,o){o.stopPropagation(),this.canReactToBadge&&this.reactionTapped.emit(n)}get groupedReactions(){let o=`${this.reactions?.map(m=>`${dn(m)}:${m.savedBy}`).sort().join("|")??""}|${this.currentUserEmoji}`;if(this.cachedGroupedReactions&&this.cachedGroupedReactionsHash===o)return this.cachedGroupedReactions;if(!this.reactions||this.reactions.length===0)return this.cachedGroupedReactions=[],this.cachedGroupedReactionsHash=o,[];let l=new Map;for(let m of this.reactions){let c=dn(m);c&&l.set(c,(l.get(c)||0)+1)}return this.cachedGroupedReactions=Array.from(l.entries()).map(([m,c])=>({emoji:m,count:c,hasUserReacted:this.currentUserEmoji===m})).sort((m,c)=>c.count-m.count),this.cachedGroupedReactionsHash=o,this.cachedGroupedReactions}get pollReactions(){return this.reactions}get isUserBubble(){return this.isSender&&!this.isClubMessage}get isClickable(){return this.isClubMessage||this.isDeleted||!this.messageID?!1:this.canEdit||this.canDelete||this.canPin||this.canReply||this.canReact||this.canReport}onMessageClick(n){if(this.isClickable){n.stopPropagation();let o=n.currentTarget,l=o.getBoundingClientRect(),c=this.findFixedContainingBlock(o)?.getBoundingClientRect(),d=c?.left??0,v=c?.top??0;this.menuPosition={x:l.left+l.width/2-d,top:l.top-v,bottom:l.bottom-v},this.menuContainerBounds=c?{width:c.width,height:c.height}:{width:window.innerWidth,height:window.innerHeight},this.showContextMenu=!0}}findFixedContainingBlock(n){let o=n.parentElement;for(;o&&o!==document.documentElement;){let l=getComputedStyle(o);if(l.transform!=="none"||l.filter!=="none"||l.perspective!=="none")return o;o=o.parentElement}return null}closeContextMenu(){this.showContextMenu=!1,this.menuPosition=null}copyToClipboard(){this.messageText&&navigator.clipboard.writeText(this.messageText).then(()=>{this.messageService.add({severity:"success",summary:"Copied",detail
395:"Message copied to clipboard",life:2e3}),this.copyClicked.emit()}).catch(n=>{console.error("Failed to copy to clipboard:",n),this.messageService.add({severity:"error",summary:"Error",detail:"Failed to copy to clipboard",life:2e3})})}displayDate(n){return typeof n=="string"&&(n=new Date(n)),Gt(n,new Date)?this.datePipe.transform(n,"shortTime"):this.datePipe.transform(n,"shortDate")+", "}};a.\u0275fac=function(o){return new(o||a)(he(Ut))},a.\u0275cmp=oe({type:a,selectors:[["app-message-bubble"]],inputs:{isSender:"isSender",firstName:"firstName",lastName:"lastName",sentDate:"sentDate",messageID:"messageID",currentClubUser:"currentClubUser",messageText:"messageText",file:"file",fileName:"fileName",isDeleted:"isDeleted",wasEdited:"wasEdited",reactions:"reactions",isClubMessage:"isClubMessage",isLastMessage:"isLastMessage",hideSending:"hideSending",hideName:"hideName",roles:"roles",quotedMessage:"quotedMessage",pollID:"pollID",poll:"poll",pollContext:"pollContext",isRefreshing:"isRefreshing",pollStatusMessage:"pollStatusMessage",isPinned:"isPinned",messageTypeID:"messageTypeID",currentUserEmoji:"currentUserEmoji",canEdit:"canEdit",canDelete:"canDelete",canPin:"canPin",canReply:"canReply",canReact:"canReact",canReport:"canReport"},outputs:{deleteMessageClicked:"deleteMessageClicked",messageTextClicked:"messageTextClicked",messageReactionsClicked:"messageReactionsClicked",openImageClicked:"openImageClicked",voteSubmitted:"voteSubmitted",refreshPollRequested:"refreshPollRequested",pollUpdated:"pollUpdated",replyClicked:"replyClicked",reactClicked:"reactClicked",reactionTapped:"reactionTapped",pinClicked:"pinClicked",editClicked:"editClicked",reportClicked:"reportClicked",quotedMessageClicked:"quotedMessageClicked",copyClicked:"copyClicked"},standalone:!1,features:[$n([Ut]),$e],ngContentSelectors:Ha,decls:8,vars:5,consts:[["position","bottom-right"],[3,"close","reply","react","pin","edit","delete","report","copy","isVisible","position","containerBounds","config"],["lines","none",1,"message-item",3,"ngClass"],[1,"chat-row",3,"ngClass"],[1,"chat-avatar"],[1,"chat-col",3,"click"],[1,"chat-meta"],[1,"chat-bubble","hasImage"],["height","200px","loading","lazy",3,"src"],[3,"click","quotedMessage","canDelete"],[1,"chat-bubble","chat-bubble--text"],[1,"chat-bubble"],[1,"text-small"],[1,"message-bubble","message-bubble--poll","chat-bubble",3,"click"],[3,"voteSubmitted","refreshPollRequested","pollUpdated","deleteMessageClicked","reactionsClicked","pollContext","isRefreshing","clubUserId","poll","isSender","reactions"],[1,"fa","fa-poll","mr-1"],[1,"poll-status-message"],[1,"fa","fa-spinner","fa-spin","mr-1"],[1,"reactions-display"],[1,"reaction-badge",3,"click"],[1,"emoji"],[1,"reaction-count"]],template:function(o,l){o&1&&(Vn(),i(0,` 396`),J(1,"p-toast",0),i(2,` 397 398`),i(3,` 399`),i(4,` 400 401`),i(5,` 402`),$(6,sl,25,21),p(7,"app-message-context-menu",1),N("close",function(){return l.closeContextMenu()})("reply",function(){return l.replyClicked.emit()})("react",function(c){return l.reactClicked.emit(c)})("pin",function(){return l.pinClicked.emit()})("edit",function(){return l.editClicked.emit()})("delete",function(){return l.deleteMessageClicked.emit()})("report",function(){return l.reportClicked.emit()})("copy",function(){return l.copyToClipboard()}),f()),o&2&&(C(6),F(l.messageTypeID!==l.MessageType.MESSAGE_PINNED?6:-1),C(),K("isVisible",l.showContextMenu)("position",l.menuPosition)("containerBounds",l.menuContainerBounds)("config",l.contextMenuConfig))},dependencies:[wn,Zn,Yt,yi,Di],styles:["[_nghost-%COMP%]{display:flex;width:100%}.message-item[_ngcontent-%COMP%]{min-height:unset;display:flex;flex-direction:column;width:calc(100% - 20px);margin:auto;margin-bottom:.25rem}.message-item[_ngcontent-%COMP%] .chat-meta[_ngcontent-%COMP%]{width:100%;justify-content:flex-start;margin:auto;margin-bottom:.25rem;padding:0 3.5rem}.message-item[_ngcontent-%COMP%] .chat-row[_ngcontent-%COMP%] .chat-avatar[_ngcontent-%COMP%]{flex-shrink:0}.message-item[_ngcontent-%COMP%] .chat-row[_ngcontent-%COMP%] .chat-col[_ngcontent-%COMP%]{max-width:calc(100% - 100px)}.message-item[_ngcontent-%COMP%] .chat-row[_ngcontent-%COMP%] .chat-bubble.hasImage[_ngcontent-%COMP%]{padding:0}.message-item[_ngcontent-%COMP%] .chat-row[_ngcontent-%COMP%] .chat-bubble.hasImage[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;max-height:300px;border-radius:var(--border-radius-lg);object-fit:cover;display:block;pointer-events:none}.message-item[_ngcontent-%COMP%] .chat-row[_ngcontent-%COMP%] .chat-bubble.hasImage[_ngcontent-%COMP%]:empty{display:none}.message-item.sender[_ngcontent-%COMP%] .chat-meta[_ngcontent-%COMP%]{justify-content:flex-end;padding-right:3.5rem}.message-item.club-message[_ngcontent-%COMP%] .chat-row[_ngcontent-%COMP%] .chat-bubble[_ngcontent-%COMP%]{background:linear-gradient(135deg,var(--yellow-300) 0%,var(--yellow-400) 100%);color:var(--grey-900);border:1px solid var(--yellow-500)}.message-item.club-message[_ngcontent-%COMP%] .chat-row[_ngcontent-%COMP%] .chat-bubble.chat-clickable[_ngcontent-%COMP%]:hover{box-shadow:0 4px 12px #fbbf244d}.reactions-display[_ngcontent-%COMP%]{display:flex;gap:.25rem;position:absolute;bottom:-1.5rem;padding:0 3rem}.reactions-display.sender[_ngcontent-%COMP%]{justify-content:flex-end}.reactions-display[_ngcontent-%COMP%] .reaction-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;padding:.25rem .5rem;background:transparent;border:0;border-radius:1rem;font-size:.75rem;transition:all .15s ease;cursor:default}.reactions-display[_ngcontent-%COMP%] .reaction-badge[_ngcontent-%COMP%] .emoji[_ngcontent-%COMP%]{font-size:14px;line-height:1}.reactions-display[_ngcontent-%COMP%] .reaction-badge.user-reacted[_ngcontent-%COMP%]{box-shadow:inset 0 0 0 1px var(--primary-color)}.reactions-display[_ngcontent-%COMP%] .reaction-badge.interactive[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none}.reactions-display[_ngcontent-%COMP%] .reaction-badge.interactive[_ngcontent-%COMP%]:hover{background:var(--grey-100)}.reactions-display[_ngcontent-%COMP%] .reaction-badge[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.875rem}.reactions-display[_ngcontent-%COMP%] .reaction-badge[_ngcontent-%COMP%] .reaction-count[_ngcontent-%COMP%]{font-weight:500}.poll-status-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-top:.5rem;padding:.5rem .75rem;font-size:.75rem;color:var(--info-color, #0066cc);background:var(--info-bg, rgba(0, 102, 204, .08));border-radius:.375rem;font-style:italic}.poll-status-message[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:inline-block;animation:_ngcontent-%COMP%_spin 1s linear infinite}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"]});let e=a;return e})();var ue=[];for(let e=0;e<256;++e)ue.push((e+256).toString(16).slice(1));function Vi(e,a=0){return(ue[e[a+0]]+ue[e[a+1]]+ue[e[a+2]]+ue[e[a+3]]+"-"+ue[e[a+4]]+ue[e[a+5]]+"-"+ue[e[a+6]]+ue[e[a+7]]+"-"+ue[e[a+8]]+ue[e[a+9]]+"-"+ue[e[a+10]]+ue[e[a+11]]+ue[e[a+12]]+ue[e[a+13]]+ue[e[a+14]]+ue[e[a+15]]).toLowerCase()}var rl=new Uint8Array(16);function fn(){return crypto.getRandomValues(rl)}function cl(e,a,t){return!a&&!e&&crypto.randomUUID?crypto.randomUUID():dl(e,a,t)}function dl(e,a,t){e=e||{};let n=e.random??e.rng?.()??fn();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,a){if(t=t||0,t<0||t+16>a.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let o=0;o<16;++o)a[t+o]=n[o];return a}return Vi(n)}var Jt=cl;var Zt,ml=new Uint8Array(16);function gn(){if(!Zt&&(Zt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zt(ml)}
402var pe=[];for(let e=0;e<256;++e)pe.push((e+256).toString(16).slice(1));function Ai(e,a=0){return pe[e[a+0]]+pe[e[a+1]]+pe[e[a+2]]+pe[e[a+3]]+"-"+pe[e[a+4]]+pe[e[a+5]]+"-"+pe[e[a+6]]+pe[e[a+7]]+"-"+pe[e[a+8]]+pe[e[a+9]]+"-"+pe[e[a+10]]+pe[e[a+11]]+pe[e[a+12]]+pe[e[a+13]]+pe[e[a+14]]+pe[e[a+15]]}var ul=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),hn={randomUUID:ul};function pl(e,a,t){if(hn.randomUUID&&!a&&!e)return hn.randomUUID();e=e||{};let n=e.random||(e.rng||gn)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,a){t=t||0;for(let o=0;o<16;++o)a[t+o]=n[o];return a}return Ai(n)}var xn=pl;var Ie={ENABLED:typeof window<"u"&&typeof location<"u"&&location.search.indexOf("giphy-debug")!==-1,LEVEL:0,PREFIX:"GiphyJS",debug:(...e)=>{Ie.ENABLED&&Ie.LEVEL<=0&&console.debug(Ie.PREFIX,...e)},info:(...e)=>{Ie.ENABLED&&Ie.LEVEL<=1&&console.info(Ie.PREFIX,...e)},warn:(...e)=>{Ie.ENABLED&&Ie.LEVEL<=2&&console.warn(Ie.PREFIX,...e)},error:(...e)=>{Ie.ENABLED&&Ie.LEVEL<=3&&console.error(Ie.PREFIX,...e)}};var ct="",$i=16,fl=()=>{let e="",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=a.length;for(let n=0;n<$i;n++)e+=a.charAt(Math.floor(Math.random()*t));return e},gl=()=>{if(!ct){try{ct=sessionStorage.getItem("giphyPingbackId")}catch(e){}if(!ct){let e=new Date().getTime().toString(16);try{ct=`${e}${xn().replace(/-/g,"")}`.substring(0,$i)}catch(a){ct=fl()}try{sessionStorage.setItem("giphyPingbackId",ct)}catch(a){}}}return ct},Fi=gl,en=null,gm=new Promise(e=>{typeof Image>"u"&&e(!1);let a=new Image;a.onload=()=>
402{en=!0,e(en)},a.onerror=()=>{en=!1,e(en)},a.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"});var It=(typeof window<"u"?window:global)||{};It._GIPHY_SDK_HEADERS_=It._GIPHY_SDK_HEADERS_||(It.Headers?new It.Headers({"X-GIPHY-SDK-PLATFORM":"web"}):void 0);var _n=()=>It._GIPHY_SDK_HEADERS_,Cn=(e,a)=>{var t;return(t=_n())==null?void 0:t.set(e,a)};var hl=Object.defineProperty,xl=Object.defineProperties,_l=Object.getOwnPropertyDescriptors,Cl=Object.getOwnPropertyNames,wi=Object.getOwnPropertySymbols,bl=Object.prototype.hasOwnProperty,vl=Object.prototype.propertyIsEnumerable,Ri=(e,a,t)=>a in e?hl(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,qe=(e,a)=>{for(var t in a||(a={}))bl.call(a,t)&&Ri(e,t,a[t]);if(wi)for(var t of wi(a))vl.call(a,t)&&Ri(e,t,a[t]);return e},bn=(e,a)=>xl(e,_l(a)),yl=(e=>typeof it<"u"?it:typeof Proxy<"u"?new Proxy(e,{get:(a,t)=>(typeof it<"u"?it:a)[t]}):e)(function(e){if(typeof it<"u")return it.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Ml=(e,a)=>function(){return a||(0,e[Cl(e)[0]])((a={exports:{}}).exports,a),a.exports},Pl=(e,a,t)=>new Promise((n,o)=>{var l=d=>{try{c(t.next(d))}catch(v){o(v)}},m=d=>{try{c(t.throw(d))}catch(v){o(v)}},c=d=>d.done?n(d.value):Promise.resolve(d.value).then(l,m);c((t=t.apply(e,a)).next())}),El=Ml({"package.json"(e,a){a.exports={scripts:{lint:"run -T eslint . --ext .ts,.tsx",clean:"rm -rf ./dist",dev:"parcel public/test.html",docs:"typedoc src/index.ts",build:"run -T tsup src/index.ts --format cjs,esm --dts && run -T publint",prepublish:"npm run clean && npm run build",test:"run -T jest --config ./jestconfig.js","test:watch":"run -T jest --config ./jestconfig.js --watchAll"},name:"@giphy/js-fetch-api",version:"5.8.0",description:"Javascript API to fetch gifs and stickers from the GIPHY API.",homepage:"https://github.com/Giphy/giphy-js/tree/master/packages/fetch-api",repository:{type:"git",url:"https://github.com/Giphy/giphy-js",directory:"packages/fetch-api"},main:"dist/index.cjs",types:"dist/index.d.ts",module:"dist/index.js",type:"module",sideEffects:!1,exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./package.json":"./package.json"},files:["dist/","src/**/*"],license:"MIT",publishConfig:{access:"public"},dependencies:{"@giphy/js-types":"*","@giphy/js-util":"*"},devDependencies:{"jest-fetch-mock":"^3.0.3","parcel-bundler":"latest",typedoc:"^0.20.37","typedoc-thunder-theme":"^0.0.3",typescript:"^5.0.4"}}}}),Sl=(typeof window<"u"?window:global)||{},Ol=Sl.GIPHY_API_URL||"https://api.giphy.com/v1/",Dt="pg-13";var Tl=["is_anonymous","is_community","is_featured","is_hidden","is_indexable","is_preserve_size","is_realtime","is_removed","is_sticker","is_dynamic"],kl=["suppress_chrome","is_public","is_verified"],Li=e=>a=>e[a]=!!e[a],Il=e=>typeof e=="string"?e:e.text,Bi=(e,a="")=>{let t=qe({},e);t.id=String(t.id),t.tags=(t.tags||[]).map(Il),t.bottle_data||(t.bottle_data={}),t.response_id=a,Tl.forEach(Li(t)),Object.keys(t.images||{}).forEach(o=>{let l=t.images[o];l.width=parseInt(l.width),l.height=parseInt(l.height)});let{user:n}=t;if(n){let o=qe({},n);kl.forEach(Li(o)),t.user=o}return t},zi=e=>{let{response_id:a}=e.meta;return e.data=Bi(e.data,a),e},Xe=e=>{let{response_id:a}=e.meta;return e.data=e.data.map(t=>Bi(t,a)),e},Ni=class extends Error{constructor(e,a,t=0,n=""){super(e),this.url=a,this.status=t,this.statusText=n}},Dl=class extends Ni{},ji=Ni,Vl="@giphy/js-fetch-api: ",Al="Error fetching",$l=e=>e,Ae={},Fl=6e4,wl=6e3,Rl=()=>{let e=Date.now();Object.keys(Ae).forEach(a=>{let t=Ae[a].isError?wl:Fl;e-Ae[a].ts>=t&&delete Ae[a]})};function Ll(e,a={}){let{apiVersion:t=1,noCache:n=!1,normalizer:o=$l}=a,l=Ol.replace(/\/v\d+\/$/,`/v${t}/`);if(Rl(),!Ae[e]||n){let m=`${l}${e}`,c=()=>Pl(this,null,function*(){var d,v;let _;try{let b=yield fetch(m,{method:"get"});if(b.ok){let h=yield b.json();if((d=h.meta)!=null&&d.response_id)return o(h);throw{message:"synthetic response"}}else{let h=Al;try{let s=yield b.json();s.message&&(h=s.message),(v=s.meta)!=null&&v.msg&&(h=s.meta.msg)}catch(s){}Ae[e]&&(Ae[e].isError=!0);let r=ji;h==="This content is not available in your location"&&(r=Dl),_=new r(`${Vl}${h}`,m,b.status,b.statusText)}}catch(b){_=new ji(b.message,m),Ae[e]&&(Ae[e].isError=!0)}throw _});Ae[e]={request:c(),ts:Date.now()}}return Ae[e].request}var Ee=Ll,vn=e=>e&&e.type?e.type:"gifs",zl=class{constructor(e,a={}){this.getQS=(t={})=>new URLSearchParams(qe(bn(qe({},t),{api_key:this.apiKey,pingback_id:Fi()}),this.qsParams)).toString(),this.apiKey=e,this.qsParams=a}categories(e){return Ee(`gifs/categories?${this.getQS(e)}`)}gif(e,a){let t=a?.internal?"internal/":"";return Ee(`${t}gifs/${e}?${this.getQS()}
402`,{normalizer:zi})}gifs(e,a){return Array.isArray(e)?Ee(`gifs?${this.getQS({ids:e.join(",")})}`,{normalizer:Xe}):Ee(`gifs/categories/${e}/${a}?${this.getQS()}`,{normalizer:Xe})}emoji(e){return Ee(`emoji?${this.getQS(e)}`,{normalizer:Xe})}emojiDefaultVariations(e){return Ee(`emoji?${this.getQS(e)}`,{apiVersion:2,normalizer:Xe})}emojiVariations(e){return Ee(`emoji/${e}/variations?${this.getQS()}`,{apiVersion:2,normalizer:Xe})}animate(e,a={}){let t=this.getQS(bn(qe({},a),{m:e}));return Ee(`text/animate?${t}`,{normalizer:Xe})}search(e,a={}){let t=a.channel?`@${a.channel} ${e}`:e,n;a.type==="text"&&(n=!0);let o=this.getQS(bn(qe({rating:Dt},a),{q:t,excludeDynamicResults:n}));return Ee(`${vn(a)}/search?${o}`,{normalizer:Xe})}subcategories(e,a){return Ee(`gifs/categories/${e}?${this.getQS(a)}`)}trending(e={}){return Ee(`${vn(e)}/trending?${this.getQS(qe({rating:Dt},e))}`,{normalizer:Xe})}random(e){return Ee(`${vn(e)}/random?${this.getQS(qe({rating:Dt},e||{}))}`,{noCache:!0,normalizer:zi})}related(e,a={}){let{type:t="gifs"}=a;return Ee(`${t}/related?${this.getQS(qe({gif_id:e,rating:Dt},a))}`,{normalizer:Xe})}channels(e,a={}){return Ee(`channels/search?${this.getQS(qe({q:e,rating:Dt},a))}`)}},Ui=zl;var qi;if(typeof yl<"u"){let{version:e}=El();(qi=_n())!=null&&qi.get("X-GIPHY-SDK-NAME")||(Cn("X-GIPHY-SDK-NAME","FetchAPI"),Cn("X-GIPHY-SDK-VERSION",e))}function jl(e,a){if(e&1){let t=Q();i(0,` 403 `),p(1,"div",8),N("click",function(){let o=H(t).$implicit,l=E(2);return G(l.selectGif(o))}),i(2,` 404 `),J(3,"img",9),i(4,` 405 `),f(),i(5,` 406 `)}if(e&2){let t=a.$implicit;C(3),K("alt",zt(t.title))("src",t.images.fixed_height.url,at)}}function ql(e,a){if(e&1&&(i(0,` 407 `),p(1,"div",7),i(2,` 408 `),ce(3,jl,6,3,null,null,Fe),f(),i(5,` 409 `)),e&2){let t=E();C(3),de(t.gifs)}}var Hi=(()=>{let a=class a{constructor(){this.searchTerm="",this.gf=new Ui(Kn.giphyApiKey),this.gifSelected=new Y,this.gifCancel=new Y,this.gifSearch=new Y}searchGifs(){return se(this,null,function*(){if(this.searchTerm.length>2){let n=yield this.gf.search(this.searchTerm,{limit:24});this.gifs=n.data,this.gifSearch.emit()}else this.gifs=[]})}selectGif(n){console.log("Selected GIF:",n.images.fixed_height.url),this.gifSelected.emit(n.images.fixed_height.url)}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=oe({type:a,selectors:[["app-gif-picker"]],outputs:{gifSelected:"gifSelected",gifCancel:"gifCancel",gifSearch:"gifSearch"},standalone:!1,decls:21,vars:2,consts:[[1,"gif-picker-container"],[1,"search-gif-input","ml-3","mr-3","mb-2"],["type","text","placeholder","Search GIFs...",1,"gif-search-input","full-width",3,"ngModelChange","input","ngModel"],[1,"legal","full-width"],[1,"giphy-attribution"],[1,"sr-only"],["href","https://support.giphy.com/hc/en-us/articles/360020027752-GIPHY-User-Terms-of-Service","target","_blank",1,"text-small","mt-1"],[1,"gif-list"],[3,"click"],["loading","lazy",3,"src","alt"]],template:function(o,l){o&1&&(p(0,"div",0),i(1,` 410 `),p(2,"div",1),i(3,` 411 `),p(4,"input",2),Ce("ngModelChange",function(c){return _e(l.searchTerm,c)||(l.searchTerm=c),c}),N("input",function(){return l.searchGifs()}),f(),i(5,` 412 `),f(),i(6,` 413 `),$(7,ql,6,0),p(8,"div",3),i(9,` 414 `),p(10,"div",4),i(11,` 415 `),p(12,"span",5),i(13,"GIFs powered by GIPHY"),f(),i(14,` 416 `),f(),i(15,` 417 `),p(16,"a",6),i(17,"View Terms"),f(),i(18,` 418 `),f(),i(19,` 419`),f(),i(20,` 420`)),o&2&&(C(4),xe("ngModel",l.searchTerm),C(3),F((l.gifs==null?null:l.gifs.length)>0?7:-1))},dependencies:[xt,_t,Ct],styles:["div[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.gif-list[_ngcontent-%COMP%]{max-height:calc(100vh - 350px);overflow:auto;margin:1rem 0 0;align-items:center;display:flex;justify-content:center}img[_ngcontent-%COMP%]{width:100px;height:100px;margin:5px;cursor:pointer;object-fit:cover}no-results[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:#333;margin:10px}.gif-search-input[_ngcontent-%COMP%]{border:1px solid #92949c;border-radius:8px}.giphy-attribution[_ngcontent-%COMP%]{width:200px;height:22px;background-image:url(/assets/css/img/vendor/giphy/attribution-light.png);background-repeat:no-repeat}.search-gif-input[_ngcontent-%COMP%]{flex-grow:1}.gif-picker-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;
420height:100%}.legal[_ngcontent-%COMP%]{width:100%;padding:1rem;justify-content:space-between}.legal[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--002d73)}@media(prefers-color-scheme:dark){div[_ngcontent-%COMP%]{background-color:#1e1e1e}.giphy-attribution[_ngcontent-%COMP%]{background-image:url(/assets/css/img/vendor/giphy/attribution-dark.png)}input[_ngcontent-%COMP%]{background-color:#303134}.legal[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#eee}}"]});let e=a;return e})();var Nl=["messageText"],Ul=["gifPickerModal"],Hl=()=>({width:"500px"});function Gl(e,a){if(e&1){let t=Q();i(0,` 421 `),p(1,"div",22,2),i(3,` 422 `),p(4,"button",23,3),N("click",function(){H(t);let o=E();return G(o.toggleGifPicker())}),i(6,` 423 `),J(7,"i",24),i(8,` 424 `),f(),i(9,` 425 `),p(10,"h2",16),i(11,"Add Gif"),f(),i(12,` 426 `),p(13,"app-gif-picker",25),N("gifSelected",function(o){H(t);let l=E();return G(l.onGifSelected(o))})("gifSearch",function(){H(t);let o=E();return G(o.onGifSearch())}),f(),i(14,` 427 `),f(),i(15,` 428`)}}function Wl(e,a){if(e&1){let t=Q();i(0,` 429 `),p(1,"div",27),i(2,` 430 `),J(3,"img",28),i(4,` 431 `),p(5,"button",29),N("click",function(){H(t);let o=E(2);return G(o.removeGIF())}),i(6,` 432 `),J(7,"i",24),i(8,` 433 `),f(),i(9,` 434 `),f(),i(10,` 435 `)}if(e&2){let t=E(2);C(3),K("src",t.selectedGIF,at)}}function Xl(e,a){if(e&1&&(i(0,` 436 `),J(1,"img",31),i(2,` 437 `)),e&2){let t=E(4);C(),K("src",t.selectedFileURL,at)}}function Yl(e,a){if(e&1){let t=Q();i(0,` 438 `),p(1,"div",27),i(2,` 439 `),$(3,Xl,3,1),p(4,"button",30),N("click",function(){H(t);let o=E(3);return G(o.removeFile())}),i(5,` 440 `),J(6,"i",24),i(7,` 441 `),f(),i(8,` 442 `),f(),i(9,` 443 `)}if(e&2){let t=E(3);C(3),F(t.selectedFile&&t.selectedFileURL?3:-1)}}function Ql(e,a){if(e&1&&(i(0,` 444 `),$(1,Yl,10,1)),e&2){let t=E(2);C(),F(t.isImage(t.selectedFile)?1:-1)}}function Kl(e,a){if(e&1&&(i(0,` 445 `),p(1,"div",26),i(2,` 446 `),$(3,Wl,11,1),$(4,Ql,2,1),f(),i(5,` 447`)),e&2){let t=E();C(3),F(t.selectedGIF?3:-1),C(),F(t.selectedFile?4:-1)}}function Jl(e,a){if(e&1){let t=Q();i(0,` 448 `),p(1,"button",34),N("click",function(){H(t);let o=E().$index,l=E();return G(l.removePollOption(o))}),i(2,` 449 `),J(3,"i",35),i(4,` 450 `),f(),i(5,` 451 `)}}function Zl(e,a){if(e&1){let t=Q();i(0,` 452 `),p(1,"div",32),i(2,` 453 `),p(3,"input",33),Ce("ngModelChange",function(o){let l=H(t).$implicit;return _e(l.description,o)||(l.description=o),G(o)}),f(),i(4,` 454 `),$(5,Jl,6,0),f(),i(6,` 455 `)}if(e&2){let t=a.$implicit,n=a.$index,o=E();C(3),xe("ngModel",t.description),K("placeholder","Option "+(n+1)),C(2),F(o.pollOptions.length>2?5:-1)}}function es(e,a){if(e&1){let t=Q();i(0,` 456 `),p(1,"button",36),N("click",function(){H(t);let o=E();return G(o.addPollOption())}),i(2,` 457 `),J(3,"i",37),i(4,` 458 Add Option 459 `),f(),i(5,` 460 `)}}function ts(e,a){if(e&1){let t=Q();i(0,` 461 `),p(1,"app-dialog-footer"),i(2,` 462 `),Ne(3,38),i(4,` 463 `),p(5,"button",39),N("click",function(){H(t);let o=E();return G(o.cancelPollCreation())}),i(6,"Cancel"),f(),i(7,` 464 `),Ue(),i(8,` 465 `),Ne(9,40),i(10,` 466 `),p(11,"button",41),N("click",function(){H(t);let o=E();return G(o.createPoll())}),i(12,"Create Poll"),f(),i(13,` 467 `),Ue(),i(14,` 468 `),f(),i(15,` 469 `)}if(e&2){let t=E();C(11),K("disabled",!t.isValidPoll())}}function ns(e,a){if(e&1){let t=Q();i(0,` 470 `),p(1,"div",42),i(2,` 471 `),p(3,"app-message-quote",43),N("deleteQuote",function(){H(t);let o=E();return G(o.deleteQuote.emit())}),f(),i(4,` 472 `),f(),i(5,` 473`)}if(e&2){let t=E();C(3),K("quotedMessage",t.quotedMessage)("canDelete",!0)}}function is(e,a){if(e&1&&(i(0,` 474 `),p(1,"div",44),i(2),f(),i(3,` 475 `)),e&2){let t=E();C(2),re("Message text limit is ",t.messageLimit," characters.")}}function os(e,a){if(e&1&&(i(0,` 476 `),p(1,"div",44),i(2),f(),i(3,` 477 `)),e&2){let t=E();C(2),re("File size exceeds the limit. Maximum file size is ",t.maxFileSizeBytes/1024," KB.")}}function as(e,a){if(e&1){let t=Q();i(0,` 478 `),p(1,"button",45,4),N("click",function(){H(t),E();let o=rn(50);return G(o.click())}),i(3,` 479 `),J(4,"i",46),i(5,` 480 `),f(),i(6,` 481 `)}if(e&2){let t=E();C(),K("disabled",t.selectedGIF)}}function ls(e,a){if(e&1){let t=Q();i(0,` 482 `),p(1,"button",47),N("click",function(){H(t);let o=E();return G(o.toggleGifPicker())}),i(2,`
483 `),J(3,"i",48),i(4,` 484 `),f(),i(5,` 485 `)}if(e&2){let t=E();C(),K("disabled",t.selectedFile)}}function ss(e,a){if(e&1){let t=Q();i(0,` 486 `),p(1,"button",49),N("click",function(){H(t);let o=E();return G(o.startPoll())}),i(2,` 487 `),J(3,"i",50),i(4,` 488 `),f(),i(5,` 489 `)}if(e&2){let t=E();C(),K("disabled",t.selectedFile)}}function rs(e,a){e&1&&(i(0,` 490 `),J(1,"div",51,5),i(3,` 491 `))}function cs(e,a){e&1&&(i(0,` 492 `),J(1,"i",52),i(2,` 493 `))}function ds(e,a){e&1&&(i(0,` 494 `),J(1,"span",53),i(2,` 495 `))}var Bm=(()=>{let a=class a{constructor(n,o){this.renderer=n,this.siteDataService=o,this.sendEnabled=!0,this.canDelete=!1,this.showFileUpload=!0,this.showGifUpload=!0,this.showQuotePreview=!0,this.messageLimit=500,this.canAddPoll=!1,this.deleteQuote=new Y,this.sendMessage=new Y,this.pollCreated=new Y,this.showGifPicker=!1,this.showPollModal=!1,this.pollQuestion="",this.pollDurationDays=3,this.pollOptions=[{description:""},{description:""}],this.ClubUserMessageThreadType=di,this.acceptedFileExtensions=Wn,this.maxFileSizeBytes=Yn,this.maxFileSizeBytesExceeded=!1,this.acceptType=Xn,this.isSending=!1}ngOnInit(){}get supportsAttachments(){return this.showFileUpload||this.showGifUpload}handlePaste(n){let o=n.clipboardData?.items;if(o)for(let l=0;l<o.length;l++){let m=o[l];if(console.log("item: ",m.type),m.type.indexOf("image")===0){let c=m.getAsFile();if(c&&c.size>2097152){this.siteDataService.showSiteErrorAlert("File is too big!"),this.inputValue="";return}this.fileChanged(c);break}}}removeFile(){this.selectedFile=null,this.selectedFileName=null,this.selectedFileURL=null}removeGIF(){this.selectedGIF=null}fileChanged(n){let o=null;if(n instanceof File)o=n;else if(n&&n.type&&n.size&&!n.target){let l=n.type?.split("/")[1]||"png",m=`pasted-image-${Jt()}.${l}`;o=new File([n],m,{type:n.type})}else n?.target?.files?.length&&(o=n.target.files[0]);if(!o){console.warn("No file detected in fileChanged call.");return}if(o.size>this.maxFileSizeBytes){this.maxFileSizeBytesExceeded=!0,console.error(`File size exceeds limit. File size: ${o.size} / ${this.maxFileSizeBytes}`);return}if(this.maxFileSizeBytesExceeded=!1,!o.name){let l=o.type?.split("/")[1]||"png",m=`image-${Jt()}.${l}`;o=new File([o],m,{type:o.type})}this.selectedFile=o,this.selectedFileName=o.name,this.selectedFileURL=URL.createObjectURL(o)}isImage(n){return n.type.startsWith("image/")}toggleGifPicker(){console.log("toggle modal"),this.showGifPicker=!this.showGifPicker,this.gifPickerModal&&(this.showGifPicker?this.renderer.setStyle(this.gifPickerModal.nativeElement,"display","block"):this.renderer.setStyle(this.gifPickerModal.nativeElement,"display","none"))}emitSendMessage(){return se(this,null,function*(){if(this.isSending)return;let n=new mi;if(n.text=this.inputValue,this.selectedFile){n.blob=this.selectedFile;let o;if(this.selectedFileName&&this.selectedFileName.indexOf(".")>-1){let l=this.selectedFileName.split(".");o=l[l.length-1]}else this.selectedFile.type&&(o=this.selectedFile.type.split("/")[1]);n.format=o,n.fileName=this.selectedFileName,n.selectedFileURL=this.selectedFileURL}if(this.selectedGIF){try{let l=yield(yield fetch(this.selectedGIF)).blob();n.blob=l}catch(o){console.error("Error fetching GIF blob:",o)}n.selectedFileURL=this.selectedGIF,n.fileName="giphy.gif",n.format="gif"}this.isSending=!0,this.sendMessage.emit(n),this.removeFile(),this.removeGIF(),this.inputValue=void 0,setTimeout(()=>{this.isSending=!1},500)})}isSubmitButtonDisabled(){return!!(!this.sendEnabled||!this.inputValue&&!this.selectedFile&&!this.selectedGIF||this.inputValue&&this.inputValue?.length>this.messageLimit)}messageSize(n){return typeof n=="number"&&(n=n.toString()),n.length}onGifSearch(){}onGifSelected(n){this.selectedGIF=n,this.showGifPicker=!1,console.log("Selected GIF:",n)}onOpenAttachmentOptions(){this.siteDataService.showSiteErrorAlert("Opening attachment options...")}startPoll(){this.pollQuestion="",this.pollOptions=[{description:""},{description:""}],this.showPollModal=!0}addPollOption(){this.pollOptions.length<4&&this.pollOptions.push({description:""})}removePollOption(n){this.pollOptions.length>2&&this.pollOptions.splice(n,1)}isValidPoll(){let n=this.pollQuestion&&this.pollQuestion.trim().length>0,o=this.pollOptions.filter(l=>l.description&&l.description.trim().length>0).length>=2;return n&&o}
495createPoll(){if(!this.isValidPoll())return;let n=this.pollOptions.filter(o=>o.description&&o.description.trim().length>0).map(o=>o.description.trim());this.pollCreated.emit({question:this.pollQuestion.trim(),options:n,durationInDays:this.pollDurationDays||3}),this.showPollModal=!1,console.log("Poll created:",this.pollQuestion,n,this.pollDurationDays)}cancelPollCreation(){this.showPollModal=!1,this.pollQuestion="",this.pollDurationDays=3,this.pollOptions=[{description:""},{description:""}]}onTextareaEnter(n){n.shiftKey||(n.preventDefault(),this.emitSendMessage())}};a.\u0275fac=function(o){return new(o||a)(he(Tn),he(Wt))},a.\u0275cmp=oe({type:a,selectors:[["app-message-form"]],viewQuery:function(o,l){if(o&1&&Lt(Nl,5)(Ul,5),o&2){let m;Ot(m=Tt())&&(l.messageTxt=m.first),Ot(m=Tt())&&(l.gifPickerModal=m.first)}},inputs:{sendEnabled:"sendEnabled",clubUserMessageThreadType:"clubUserMessageThreadType",quotedMessage:"quotedMessage",canDelete:"canDelete",showFileUpload:"showFileUpload",showGifUpload:"showGifUpload",showQuotePreview:"showQuotePreview",messageLimit:"messageLimit",canAddPoll:"canAddPoll"},outputs:{deleteQuote:"deleteQuote",sendMessage:"sendMessage",pollCreated:"pollCreated"},standalone:!1,decls:72,vars:33,consts:[["fileInput",""],["messageText",""],["gifPickerModal",""],["endButtonContent",""],["addFile",""],["filePickerModal",""],[3,"visibleChange","visible","header","modal","resizable","draggable"],[1,"poll-creation-form"],[1,"form-group","mb-3"],["for","pollQuestion"],["id","pollQuestion","type","text","placeholder","What do you want to ask?",1,"form-control",3,"ngModelChange","ngModel"],["for","pollDuration"],["id","pollDuration","type","number","min","1","max","30","placeholder","3",1,"form-control",3,"ngModelChange","ngModel"],["pTemplate","footer"],[1,"textarea-wrap"],[1,"textarea-bottom-header"],[1,"sr-only"],["type","file","name","file-field",3,"change","hidden","accept"],[1,"character-count"],[1,"textarea-bottom"],["aria-label","Type your message","placeholder","Type your message...","minlength","1","rows","2","autocorrect","on","autocomplete","on","spellcheck","true","autocapitalize","sentences","name","message-text",1,"message-input",3,"ngModelChange","paste","keydown.enter","ngModel","maxlength"],["type","button","title","Send message","aria-label","Send message",1,"button","send",3,"click","disabled"],[1,"gifyModal","popover"],["endButtonContent","","aria-label","Close GIF picker","title","Close GIF picker",1,"close",3,"click"],[1,"fa-light","fa-close"],[3,"gifSelected","gifSearch"],[1,"textarea-attachemnt-preparation","popover"],[1,"message-photo-wrapper"],["alt","GIF",3,"src"],["aria-label","Remove GIF image",1,"close",3,"click"],["aria-label","Remove selected image",1,"close",3,"click"],["alt","Selected image",1,"preview-image",3,"src"],[1,"mb-2","d-flex","gap-2"],["type","text",1,"form-control",3,"ngModelChange","ngModel","placeholder"],["type","button",1,"btn","btn-sm","btn-outline-danger",3,"click"],[1,"fa-light","fa-trash"],["type","button",1,"btn","btn-sm","btn-outline-primary","mt-2",3,"click"],[1,"fa-light","fa-plus"],["slot","secondary"],["type","button",1,"btn",3,"click"],["slot","primary"],["type","button",1,"btn","btn-primary",3,"click","disabled"],[1,"quote-preview-wrapper"],[3,"deleteQuote","quotedMessage","canDelete"],[1,"warning"],["fill","clear","type","button","title","upload an image","aria-label","Attach an image",1,"to-upload",3,"click","disabled"],[1,"fa-light","fa-image"],["fill","clear","type","button","title","add a GIF (powered by Giphy)","aria-label","Add GIF (powered by Giphy)",1,"to-gif",3,"click","disabled"],[1,"fa-light","fa-gif"],["fill","clear","type","button","title","Create a poll","aria-label","Create a poll",1,"to-poll",3,"click","disabled"],[1,"fa-light","fa-poll-people"],["trigger","open-file-picker",1,"textarea-attachment-options"],["slot","icon-only",1,"btn-icon-paper-plane","text-large"],["role","status",1,"spinner-border","spinner-border-sm"]],template:function(o,l){if(o&1){let m=Q();$(0,Gl,16,0),$(1,Kl,6,2),p(2,"p-dialog",6),Ce("visibleChange",function(d){return H(m),_e(l.showPollModal,d)||(l.showPollModal=d),G(d)}),i(3,` 496 `),p(4,"div",7),i(5,` 497 `),p(6,"div",8),i(7,` 498 `),p(8,"label",9),i(9,"Poll Question"),f(),i(10,` 499 `),p(11,"input",10),Ce("ngModelChange",function(d){return H(m),_e(l.pollQuestion,d)||(l.pollQuestion=d),G(d)}),f(),i(12,` 500 `),f(),i(13,` 501 `),p(14,"div",8),i(15,` 502 `),p(16,"label",11),i(17,"Poll Duration (days)"),f(),i(18,` 503 `),p(19,"input",12),Ce("ngModelChange",function(d){return H(m),_e(l.pollDurationDays,d)||(l.pollDurationDays=d),G(d)}),f(),i(20,` 504 `),f(),i(21,` 505 `),p(22,"div",8),i(23,` 506 `),p(24,"label"),i(25,"Options"),f(),i(26,` 507 `),ce(27,Zl,7,3,null,null,Fe),$(29,es,6,0),f(),i(30,` 508 `),f(),i(31,` 509 `),gt(32,ts,16,1,"ng-template",13),i(33,` 510`),f(),i(34,` 511`),i(35,` 512`),$(36,ns,6,2),p(37,"div"),i(38,` 513 `),p(39,"div",14),i(40,` 514 `),$(41,is,4,1),$(42,os,4,1),p(43,"div",15),i(44,` 515 `),p(45,"h2",16),i(46,"Add Attachment"),f(),i(47,`
516 `),$(48,as,7,1),p(49,"input",17,0),N("change",function(d){return l.fileChanged(d)}),f(),i(51,` 517 `),$(52,ls,6,1),$(53,ss,6,1),p(54,"small",18),i(55),f(),i(56,` 518 `),f(),i(57,` 519 520 `),p(58,"div",19),i(59,` 521 `),$(60,rs,4,0),p(61,"textarea",20,1),Ce("ngModelChange",function(d){return H(m),_e(l.inputValue,d)||(l.inputValue=d),G(d)}),N("paste",function(d){return l.handlePaste(d)})("keydown.enter",function(d){return l.onTextareaEnter(d)}),f(),i(63,` 522 523 `),p(64,"button",21),N("click",function(){return l.emitSendMessage()}),i(65,` 524 `),$(66,cs,3,0),$(67,ds,3,0),f(),i(68,` 525 `),f(),i(69,` 526 `),f(),i(70,` 527`),f(),i(71,` 528`)}if(o&2){let m=rn(62);F(l.showGifPicker&&l.showGifUpload?0:-1),C(),F(l.selectedGIF||l.selectedFile?1:-1),C(),Je(He(32,Hl)),xe("visible",l.showPollModal),K("header","Create Poll")("modal",!0)("resizable",!1)("draggable",!1),C(9),xe("ngModel",l.pollQuestion),C(8),xe("ngModel",l.pollDurationDays),C(8),de(l.pollOptions),C(2),F(l.pollOptions.length<4?29:-1),C(7),F(l.quotedMessage&&l.showQuotePreview?36:-1),C(5),F(m.value&&l.messageSize(m.value)>=l.messageLimit?41:-1),C(),F(l.maxFileSizeBytesExceeded?42:-1),C(6),F(l.showFileUpload?48:-1),C(),K("hidden",!0)("accept",l.acceptType),C(3),F(l.showGifUpload?52:-1),C(),F(l.canAddPoll&&l.showGifUpload?53:-1),C(),te("warning",(l.inputValue==null?null:l.inputValue.length)>=l.messageLimit-100)("danger",(l.inputValue==null?null:l.inputValue.length)>=l.messageLimit),C(),Ve(` 529 `,(l.inputValue==null?null:l.inputValue.length)||0,"/",l.messageLimit,` 530 `),C(5),F(!l.selectedGIF&&!l.selectedFile&&l.supportsAttachments?60:-1),C(),xe("ngModel",l.inputValue),K("maxlength",l.messageLimit),C(3),K("disabled",!l.sendEnabled||l.isSending||(l.inputValue==null?null:l.inputValue.length)<=0&&!l.selectedFile&&!l.selectedGIF),C(2),F(l.sendEnabled&&!l.isSending?66:-1),C(),F(!l.sendEnabled||l.isSending?67:-1)}},dependencies:[xt,jn,_t,Nn,Un,Bn,qn,Ct,Ht,bt,oi,Xt,Yt,Hi],styles:[".quote-preview-wrapper[_ngcontent-%COMP%]{position:absolute;top:-4rem;width:calc(100% - 2rem)}.popover[_ngcontent-%COMP%]{z-index:999999;background:#ffffffe6;padding:1rem;border-radius:var(--border-radius-lg);border:var(--border);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);width:calc(100% - 9px);left:4px;animation:_ngcontent-%COMP%_fade-In .25s ease-in-out forwards}.popover[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:var(--border-radius-lg)}.gifyModal[_ngcontent-%COMP%]{position:absolute;bottom:.25rem;display:flex;flex-direction:column;overflow:auto;padding-top:3rem;margin:0}.gifyModal[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{transition:all .25s ease-in-out;position:absolute;top:1rem;right:1rem;background:var(--primary-link);color:#fff;border-radius:50%;width:1.1rem;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;cursor:pointer;border:2px solid var(--primary-link);font-size:.75rem;transform:rotate(0) scale(1)}.gifyModal[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]:hover{background-color:var(--primary-link-hover);transform:rotate(360deg) scale(1.3)}.textarea-attachemnt-preparation[_ngcontent-%COMP%]{position:absolute;top:-104px;margin:0 0 20px}.textarea-attachemnt-preparation[_ngcontent-%COMP%] .message-photo-wrapper[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;width:70px;aspect-ratio:1/1;background:gray;border-radius:var(--border-radius-lg);left:0;border:3px solid var(--primary-link)}.textarea-attachemnt-preparation[_ngcontent-%COMP%] .message-photo-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:300px;height:auto;object-fit:contain}.textarea-attachemnt-preparation[_ngcontent-%COMP%] .message-photo-wrapper[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{transition:all .25s ease-in-out;position:absolute;top:-2px;right:-2px;background:var(--primary-link);color:#fff;border-radius:50%;width:20px;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;cursor:pointer;border:2px solid var(--primary-link);font-size:.75rem;transform:rotate(0) scale(1)}.textarea-attachemnt-preparation[_ngcontent-%COMP%] .message-photo-wrapper[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]:hover{background-color:var(--primary-link-hover);transform:rotate(360deg) scale(1.1)}.textarea-wrap[_ngcontent-%COMP%]{border:var(--border);background:#fff;padding:1rem;border-radius:var(--border-radius-lg)}.textarea-wrap[_ngcontent-%COMP%] .message-warning[_ngcontent-%COMP%]{color:var(--danger);font-size:.875rem;margin-bottom:.5rem}.textarea-attachment-options[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.textarea-attachment-options[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:var(--primary-link);color:#fff;outline:none;transition:background-color .25s ease-in-out;border-radius:50%;aspect-ratio:1/1;border:0;cursor:pointer}.textarea-attachment-options[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background-color:var(--primary-link-hover)}.textarea-bottom-header[_ngcontent-%COMP%]{width:100%;display:flex;margin-bottom:10px;gap:10px}.textarea-bottom-header[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{margin:0 60px 0 auto}.textarea-bottom[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-end}.textarea-bottom[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{background:transparent;field-sizing:content;min-height:65px;max-height:6rem}.textarea-bottom[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:0 0 0 16px}.textarea-bottom-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .textarea-bottom[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:var(--primary-link);color:#fff;border:none;cursor:pointer;border-radius:50%;display:flex;align-items:center;justify-content:center;aspect-ratio:1/1;transition:all .25s ease-in-out}.textarea-bottom-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .textarea-bottom[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{transform:scale(1.25)}.textarea-bottom-header[_ngcontent-%COMP%] button.to-upload[_ngcontent-%COMP%], .textarea-bottom-header[_ngcontent-%COMP%] button.to-gif[_ngcontent-%COMP%], .textarea-bottom-header[_ngcontent-%COMP%] button.to-poll[_ng
530content-%COMP%], .textarea-bottom[_ngcontent-%COMP%] button.to-upload[_ngcontent-%COMP%], .textarea-bottom[_ngcontent-%COMP%] button.to-gif[_ngcontent-%COMP%], .textarea-bottom[_ngcontent-%COMP%] button.to-poll[_ngcontent-%COMP%]{width:1.7rem}.textarea-bottom-header[_ngcontent-%COMP%] button.send[_ngcontent-%COMP%], .textarea-bottom[_ngcontent-%COMP%] button.send[_ngcontent-%COMP%]{width:2.5rem}.textarea-bottom-header[_ngcontent-%COMP%] button.send[_ngcontent-%COMP%]:disabled, .textarea-bottom[_ngcontent-%COMP%] button.send[_ngcontent-%COMP%]:disabled{pointer-events:none;opacity:.5;cursor:not-allowed}.textarea-bottom-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%], .textarea-bottom[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:.7rem;line-height:inherit}@media(prefers-color-scheme:dark){h2[_ngcontent-%COMP%]{color:#8b8b8b}.gifyModal[_ngcontent-%COMP%]{background-color:#1e1e1e}}@keyframes _ngcontent-%COMP%_fade-In{0%{opacity:0;transform:translate3d(0,50px,0)}to{opacity:1;transform:translateZ(0)}}"]});let e=a;return e})();function ms(e,a){if(e&1&&(i(0,` 531 `),p(1,"div",0),i(2,` 532 `),p(3,"span",1),i(4),f(),i(5,` 533 `),f(),i(6,` 534`)),e&2){let t=E();C(4),ie(t.dateDisplayString)}}var Gm=(()=>{let a=class a{get hostWithPin(){return!!this.threadHasPin}get hostWithMonthly(){return!!this.showMonthOnly}constructor(n){this.datePipe=n,this.threadHasPin=!1,this.showMonthOnly=!1,this.isSameDay=Gt,this.isSameMonth=Gn,this.showTimeTag=!1,this.dateDisplayString=void 0}ngOnInit(){if(this.end?this.showMonthOnly?this.showTimeTag=!this.isSameMonth(this.start,this.end):this.showTimeTag=!this.isSameDay(this.start,this.end):this.showTimeTag=!0,this.showTimeTag){this.start=new Date(this.start),this.end=new Date(this.end);let n=new Date,o=new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate())),l=new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()-1));this.showMonthOnly?this.dateDisplayString=this.datePipe.transform(this.start,"MMMM y"):this.isSameDay(this.start,o)?this.dateDisplayString="Today":this.isSameDay(this.start,l)?this.dateDisplayString="Yesterday":this.dateDisplayString=this.datePipe.transform(this.start,"longDate")}}};a.\u0275fac=function(o){return new(o||a)(he(Re))},a.\u0275cmp=oe({type:a,selectors:[["app-message-time-tag"]],hostVars:4,hostBindings:function(o,l){o&2&&te("with-pin",l.hostWithPin)("monthly",l.hostWithMonthly)},inputs:{start:"start",end:"end",threadHasPin:"threadHasPin",showMonthOnly:"showMonthOnly"},standalone:!1,decls:1,vars:1,consts:[[1,"full-width","d-flex","ion-justify-content-center"],[1,"event-tag","nowrap","text-smallest"]],template:function(o,l){o&1&&$(0,ms,7,1),o&2&&F(l.showTimeTag&&l.dateDisplayString?0:-1)},styles:[".event-tag[_ngcontent-%COMP%]{font-size:.75rem;min-width:10rem;text-align:center;margin:auto;padding:.25rem .75rem;border-radius:1rem;background-color:#ececec;color:inherit}[_nghost-%COMP%]{position:sticky;top:0;display:block;z-index:40;background-color:transparent}.with-pin[_nghost-%COMP%]{top:4.5rem}.monthly[_nghost-%COMP%]{top:0rem}"]});let e=a;return e})();function us(e,a){if(e&1&&(i(0,` 535 `),p(1,"span",5),i(2),f(),i(3,` 536 `)),e&2){let t=E(2);C(2),ie(t.totalPinned)}}function ps(e,a){e&1&&(i(0,` 537 `),p(1,"div",12),i(2,` 538 `),p(3,"p"),i(4,"No pinned messages"),f(),i(5,` 539 `),f(),i(6,` 540 `))}function fs(e,a){if(e&1&&(i(0,` 541 `),p(1,"p"),i(2),we(3,"slice"),f(),i(4,` 542 `)),e&2){let t=a;C(2),Ve("",qt(3,2,t,0,100),"",(t==null?null:t.length)>100?"...":"")}}function gs(e,a){e&1&&(i(0,` 543 `),p(1,"span",19),i(2,` 544 `),J(3,"i",20),i(4,` 545 Image 546 `),f(),i(5,` 547 `))}function hs(e,a){if(e&1&&(i(0,` 548 `),$(1,gs,6,0)),e&2){let t=E().$implicit,n=E(3);C(),F(n.getMessageFile(t)?1:-1)}}function xs(e,a){if(e&1){let t=Q();i(0,` 549 `),p(1,"div",13),N("click",function(){let o=H(t).$implicit,l=E(3);return G(l.onMessageClick(o))}),i(2,` 550 `),p(3,"div",14),i(4,` 551 `),p(5,"span",15),i(6),f(),i(7,` 552 `),p(8,"span",16),i(9),we(10,"utcDate"),f(),i(11,` 553 `),f(),i(12,` 554 `),p(13,"div",17),i(14,` 555 `),$(15,fs,5,6)(16,hs,2,1),f(),i(17,` 556 `),p(18,"button",18),N("click",function(o){let l=H(t).$implicit,m=E(3);return G(m.onUnpinClick(l,o))}),i(19,` 557 `),J(20,"i",10),i(21,` 558 `),f(),i(22,` 559 `),f(),i(23,` 560 `)}if(e&2){let t,n=a.$implicit,o=E(3);C(6),ie(o.getAuthorName(n)),C(3),ie(lt(10,3,o.getMessageDate(n),"short")),C(6),F((t=o.getMessageText(n))?15:16,t)}}function _s(e,a){if(e&1){let t=Q();i(0,` 561 `),p(1,"div",6),i(2,` 562 `),p(3,"div",7),i(4,` 563 `),p(5,"h6"),i(6,` 564 `),J(7,"i",8),i(8,` 565 Pinned Messages 566 `),f(),i(9,` 567 `),p(10,"button",9),N("click",function(){H(t);let o=E(2);return G(o.onTogglePanel())}),i(11,` 568 `),J(12,"i",10),i(13,` 569 `),f(),i(14,` 570 `),f(),i(15,` 571 `),p(16,"div",11),i(17,` 572 `),$(18,ps,7,0),ce(19,xs,24,6,null,null,In().trackByPinnedId,!0),f(),i(21,` 573 `),f(),i(22,` 574 `)}if(e&2){let t=E(2);C(18),F(t.pinnedMessages.length===0?18:-1),C(),de(t.pinnedMessages)}}function Cs(e,a){if(e&1){let t=Q();i(0,` 575 `),p(1,"div",0),i(2,` 576 `),p(3,"div",1),i(4,` 577 `),p(5,"div",2),i(6,` 578 `),p(7,"button",3),N("click",function(){H(t);let o=E();return G(o.onTogglePanel())}),i(8,` 579 `),J(9,"i",4),i(10,` 580 `),$(11,us,4,1),f(),i(12,` 581 `),f(),i(13,` 582 `),i(14,` 583 `),$(15,_s,23,1),f(),i(16,` 584 `),f(),i(17,` 585`)}if(e&2){let t=E();C(7),te("active",t.showPanel),K("title",t.showPanel?"Hide pinned messages":"Show pinned messages"),C(4),F(t.totalPinned>0?11:-1),C(4),F(t.showPanel?15:-1)}}var Zm=(()=>{let a=class a{constructor(){this.pinnedMessages=[],this.totalPinned=0,this.showPanel=!1,this.variant="standard",this.togglePanel=new Y,this.messageClicked=new Y,this.unpinClicked=new Y,this.trackByPinnedId=(n,o)=>this.isTeamMessage(o)?o.id:o.messageID}onTogglePanel(){this.togglePanel.emit()}
585onMessageClick(n){this.messageClicked.emit(n)}onUnpinClick(n,o){o.stopPropagation(),this.unpinClicked.emit(n)}isTeamMessage(n){return"firstName"in n&&"message"in n}getAuthorName(n){if(this.isTeamMessage(n)){let l=n;return`${l.firstName||""} ${l.lastName||""}`.trim()}let o=n;return`${o.sentClubUser?.user?.firstName||""} ${o.sentClubUser?.user?.lastName||""}`.trim()}getMessageDate(n){return this.isTeamMessage(n)?n.savedOn:n.sentDate}getMessageText(n){return"text"in n?n.text||"":"message"in n&&n.message||""}getMessageFile(n){return n.file}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=oe({type:a,selectors:[["app-pinned-messages-panel"]],inputs:{pinnedMessages:"pinnedMessages",totalPinned:"totalPinned",showPanel:"showPanel",variant:"variant"},outputs:{togglePanel:"togglePanel",messageClicked:"messageClicked",unpinClicked:"unpinClicked"},standalone:!1,decls:2,vars:1,consts:[[1,"pins-wrap"],[1,"pins"],[1,"pinned-toggle-container","ml-auto"],["type","button",1,"pinned-toggle-btn",3,"click","title"],[1,"fas","fa-thumbtack"],[1,"pinned-count"],[1,"pinned-messages-panel"],[1,"pinned-panel-header"],[1,"fas","fa-thumbtack","mr-2"],["type","button",1,"close-panel-btn",3,"click"],[1,"fas","fa-times"],[1,"pinned-panel-body"],[1,"no-pinned-messages"],[1,"pinned-message-item",3,"click"],[1,"pinned-message-header"],[1,"pinned-author"],[1,"pinned-date"],[1,"pinned-message-content"],["type","button","title","Unpin message",1,"unpin-btn",3,"click"],[1,"pinned-file"],[1,"far","fa-image"]],template:function(o,l){o&1&&(i(0,` 586`),$(1,Cs,18,5)),o&2&&(C(),F(l.totalPinned>0?1:-1))},dependencies:[Nt,ii],styles:["[_nghost-%COMP%]{width:100%}.pins-wrap[_ngcontent-%COMP%]{width:100%;position:relative}.pins-wrap[_ngcontent-%COMP%] .pins[_ngcontent-%COMP%]{width:100%;position:absolute;z-index:100}.pinned-toggle-container[_ngcontent-%COMP%]{display:flex;align-items:center}.pinned-toggle-btn[_ngcontent-%COMP%]{position:relative;background:transparent;border:1px solid #dee2e6;border-radius:4px;padding:6px 12px;cursor:pointer;transition:all .2s;background:#e9ecef}.pinned-toggle-btn[_ngcontent-%COMP%]:hover, .pinned-toggle-btn.active[_ngcontent-%COMP%]{background:#e9ecef;border-color:#adb5bd}.pinned-toggle-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#6c757d}.pinned-toggle-btn[_ngcontent-%COMP%] .pinned-count[_ngcontent-%COMP%]{display:inline-block;margin-left:4px;padding:2px 6px;background:var(--primary-link);color:#fff;border-radius:10px;font-size:11px;font-weight:600;min-width:18px;text-align:center}.pinned-messages-panel[_ngcontent-%COMP%]{background:#f8f9fa;border-bottom:1px solid #dee2e6;max-height:400px;overflow:hidden;display:flex;flex-direction:column;margin-top:-3rem;z-index:10;position:relative;max-height:300px;box-shadow:0 4px 6px #0000001a}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #dee2e6;background:#fff}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-header[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{margin:0;font-size:14px;font-weight:600;color:#495057;display:flex;align-items:center}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-header[_ngcontent-%COMP%] h6[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#6c757d}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-header[_ngcontent-%COMP%] .close-panel-btn[_ngcontent-%COMP%]{background:transparent;border:none;cursor:pointer;padding:4px;color:#6c757d;transition:color .2s}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-header[_ngcontent-%COMP%] .close-panel-btn[_ngcontent-%COMP%]:hover{color:#495057}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-body[_ngcontent-%COMP%]{overflow-y:auto;max-height:350px}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-body[_ngcontent-%COMP%] .no-pinned-messages[_ngcontent-%COMP%]{padding:24px;text-align:center;color:#6c757d}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-body[_ngcontent-%COMP%] .no-pinned-messages[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-body[_ngcontent-%COMP%] .pinned-message-item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;padding:12px 16px;border-bottom:1px solid #e9ecef;cursor:pointer;transition:background .2s;background:#fff}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-body[_ngcontent-%COMP%] .pinned-message-item[_ngcontent-%COMP%]:hover{background:#f8f9fa}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-body[_ngcontent-%COMP%] .pinned-message-item[_ngcontent-%COMP%] .pinned-message-header[_ngcontent-%COMP%]{display:flex;flex-direction:column}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-body[_ngcontent-%COMP%] .pinned-message-item[_ngcontent-%COMP%] .pinned-message-header[_ngcontent-%COMP%] .pinned-author[_ngcontent-%COMP%]{font-weight:600;font-size:13px;color:#495057}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-body[_ngcontent-%COMP%] .pinned-message-item[_ngcontent-%COMP%] .pinned-message-header[_ngcontent-%COMP%] .pinned-date[_ngcontent-%COMP%]{font-size:11px;color:#6c757d;margin-top:2px}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-body[_ngcontent-%COMP%] .pinned-message-item[_ngcontent-%COMP%] .pinned-message-content[_ngcontent-%COMP%]{flex:1}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-body[_ngcontent-%COMP%] .pinned-message-item[_ngcontent-%COMP%] .pinned-message-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:13px;color:#495057;line-height:1.4}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-body[_ngcontent-%COMP%] .pinned-message-item[_ngcontent-%COMP%] .pinned-message-content[_ngcontent-%COMP%] .pinned-file[_ngcontent-%COMP%]{font-size:12px;color:#6c757d}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-body[_ngcontent-%COMP%] .pinned-message-item[_ngcontent-%COMP%] .pinned-message-content[_ngcontent-%COMP%] .pinned-file[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:4px}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-body[_ngcontent-%COMP%] .pinned-message-item[_ngcontent-%COMP%] .unpin-btn[_ngcontent-%COMP%]{background:transparent;border:none;cursor:pointer;padding:4px 8px;color:#6c757d;transition:color .2s;margin-left:12px;flex-shrink:0}.pinned-messages-panel[_ngcontent-%COMP%] .pinned-panel-body[_ngcontent-%COMP%] .pinned-message-item[_ngcontent-%COMP%] .unpin-btn[_ngcontent-%COMP%]:hover{color:#dc3545}"]});let e=a;return e})();var Du=(()=>{let a=class a{};a.\u0275fac=function(o){return new(o||a)},a.\u0275mod=kn({type:a}),a.\u0275inj=Sn({providers:[Re],imports:[Ln,Hn,ni,ti,ei,li,ai,ri]});let e=a;return e})();export{me as a,ae as b,ys as c,st as d,Le as e,un as f,fi as g,gi as h,Ms as i,Pe as j,Ps as k,Es as l,be as m,Ss as n,Os as o,Ts as p,kt as q,We as r,hi as s,ye as t,Qi as u,Ki as v,Ji as w,Zi as x,eo as y,to as z,no as A,pn as B,io as C,oo as D,ao as E,lo as F,so as G,ro as H,co as I,mo as J,xo as K,_o as L,Co as M,bo as N,vo as O,yo as P,Mo as Q,Yt as R,Mi as S,Pi as T,Ei as U,Ii as V,Di as W,Qd as X,Jt as Y,Hi as Z,Bm as _,Gm as $,Zm as aa,Du as ba};
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.