@agent-dock/cli 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -211,14 +211,14 @@ exports.LoggerLevel = void 0;
211
211
  LoggerLevel[LoggerLevel["debug"] = 4] = "debug";
212
212
  LoggerLevel[LoggerLevel["trace"] = 5] = "trace";
213
213
  })(exports.LoggerLevel || (exports.LoggerLevel = {}));
214
- var CEventType = Symbol("event-type");
215
- var CTenantKey = Symbol("tenant-key");
216
- var CAppTicket = Symbol("app-ticket");
217
- var CTenantAccessToken = Symbol("tenant-access-token");
218
- var CWithHelpdeskAuthorization = Symbol("with-helpdesk-authorization");
219
- var CWithUserAccessToken = Symbol("with-user-access-token");
220
- var CUserAccessToken = Symbol("user-access-token");
221
- var CAilySessionRecord = Symbol("aily-session-record");
214
+ var CEventType = /* @__PURE__ */ Symbol("event-type");
215
+ var CTenantKey = /* @__PURE__ */ Symbol("tenant-key");
216
+ var CAppTicket = /* @__PURE__ */ Symbol("app-ticket");
217
+ var CTenantAccessToken = /* @__PURE__ */ Symbol("tenant-access-token");
218
+ var CWithHelpdeskAuthorization = /* @__PURE__ */ Symbol("with-helpdesk-authorization");
219
+ var CWithUserAccessToken = /* @__PURE__ */ Symbol("with-user-access-token");
220
+ var CUserAccessToken = /* @__PURE__ */ Symbol("user-access-token");
221
+ var CAilySessionRecord = /* @__PURE__ */ Symbol("aily-session-record");
222
222
  var string2Base64 = (content) => Buffer.from(content).toString("base64");
223
223
  var DefaultCache = class {
224
224
  constructor() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-dock/cli",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,11 +13,12 @@
13
13
  },
14
14
  "type": "module",
15
15
  "bin": {
16
- "agent-dock": "./dist/cli.js"
16
+ "agent-dock": "dist/cli.js"
17
17
  },
18
18
  "files": [
19
19
  "dist/cli.js",
20
20
  "dist/cli.js.map",
21
+ "dist/lark.proto",
21
22
  "dist/agents",
22
23
  "dist/assets",
23
24
  "dist/vendor",
@@ -35,30 +36,31 @@
35
36
  "test": "vitest run"
36
37
  },
37
38
  "dependencies": {
38
- "@agentclientprotocol/claude-agent-acp": "0.66.0",
39
- "@agentclientprotocol/codex-acp": "1.10.0",
40
39
  "@agentclientprotocol/sdk": "1.4.0",
41
- "@fastify/cors": "10.1.0",
40
+ "@fastify/cors": "11.4.1",
42
41
  "@larksuiteoapi/node-sdk": "^1.71.1",
43
- "@openclaw/fs-safe": "0.26.9",
42
+ "@openclaw/fs-safe": "0.28.0",
44
43
  "acpx": "0.20.0",
45
44
  "better-sqlite3": "13.0.3",
46
- "commander": "15.0.0",
47
- "croner": "10.0.1",
48
- "drizzle-orm": "0.44.2",
49
- "fastify": "5.4.0",
45
+ "commander": "15.1.0",
46
+ "croner": "11.0.0",
47
+ "drizzle-orm": "0.45.4",
48
+ "fastify": "5.12.8",
50
49
  "node-pty": "1.2.0-beta.15",
51
- "pino": "9.7.0",
52
- "safe-regex2": "5.1.1",
53
- "ws": "^8.21.1",
54
- "zod": "3.25.67"
50
+ "pino": "10.4.0",
51
+ "protobufjs": "8.8.1",
52
+ "safe-regex2": "5.1.2",
53
+ "ws": "^8.22.2",
54
+ "zod": "4.6.7"
55
55
  },
56
56
  "devDependencies": {
57
- "@types/ws": "^8.18.1",
58
- "esbuild": "0.25.12",
59
- "tsx": "4.20.3",
60
- "typescript": "5.8.3",
61
- "vitest": "3.2.4"
57
+ "@agentclientprotocol/claude-agent-acp": "0.106.0",
58
+ "@agentclientprotocol/codex-acp": "2.6.0",
59
+ "@types/ws": "^8.18.2",
60
+ "esbuild": "0.28.2",
61
+ "tsx": "4.23.15",
62
+ "typescript": "5.9.3",
63
+ "vitest": "5.1.0"
62
64
  },
63
65
  "engines": {
64
66
  "node": ">=22.13.0"
@@ -0,0 +1 @@
1
+ import{j as vn}from"./index-DZAR38tD.js";import{r as n}from"./syntax-highlighter-d-DuIo_w.js";import{r as En}from"./main-DJqDRQLw.js";const Nt="carousel",Tt="controller",xn="navigation",bn="no-scroll",qe="portal",wn="root",kt="toolbar",gt="zoom",Fe="loading",Ve="error",Ue="complete",Cn="placeholder",_n=e=>`active-slide-${e}`,Pn="fullsize",Qe="flex_center",Sn="no_scroll",Dt="no_scroll_padding",Je="slide",At="slide_wrapper",Mn="slide_wrapper_interactive",fe="prev",he="next",vt="swipe",Ee="close",Zt="onPointerDown",Wt="onPointerMove",$t="onPointerUp",zt="onPointerLeave",Ft="onPointerCancel",et="onKeyDown",Ln="onKeyUp",tt="onWheel",yn="Escape",In="ArrowLeft",On="ArrowRight",Rn="button",Be="icon",Vt="contain",Et="cover",Ut="Unknown action type",Xt="yarl__";function ie(...e){return e.filter(Boolean).join(" ")}function k(e){return`${Xt}${e}`}function q(e){return`--${Xt}${e}`}function Se(e,t){return`${e}${t?`_${t}`:""}`}function nt(e){return t=>Se(e,t)}function xe(e,t){var r;return(r=e==null?void 0:e[t])!==null&&r!==void 0?r:t}function Nn(e,t,r){return xe(e,"{index} of {total}").replace(/\{index}/g,`${st(r,t.length)+1}`).replace(/\{total}/g,`${t.length}`)}function ot(...e){return()=>{e.forEach(t=>{t()})}}function se(e,t,r){return()=>{const o=n.useContext(r);if(!o)throw new Error(`${e} must be used within a ${t}.Provider`);return o}}function rt(){return typeof window<"u"}function it(e,t=0){const r=10**t;return Math.round((e+Number.EPSILON)*r)/r}function me(e){return e.type===void 0||e.type==="image"}function ct(e,t){return e.imageFit===Et||e.imageFit!==Vt&&t===Et}function Ne(e){return typeof e=="string"?Number.parseInt(e,10):e}function Oe(e){if(typeof e=="number")return{pixel:e};if(typeof e=="string"){const t=Ne(e);return e.endsWith("%")?{percent:t}:{pixel:t}}return{pixel:0}}function Tn(e,t){const r=Oe(t),o=r.percent!==void 0?e.width/100*r.percent:r.pixel;return{width:Math.max(e.width-2*o,0),height:Math.max(e.height-2*o,0)}}function Yt(e){return Number.isFinite(e)?(Math.round(e/90)*90%360+360)%360:0}function kn(){return(rt()?window==null?void 0:window.devicePixelRatio:void 0)||1}function st(e,t){return t>0?(e%t+t)%t:0}function Ht(e){return e.length>0}function Bt(e,t){return e[st(t,e.length)]}function Ke(e,t){return Ht(e)?Bt(e,t):void 0}function Dn(e){return me(e)?e.src:void 0}function An(e,t,r){if(!r)return e;const{buttons:o,...i}=e,s=o.findIndex(l=>l===t),c=n.isValidElement(r)?n.cloneElement(r,{key:t},null):r;if(s>=0){const l=[...o];return l.splice(s,1,c),{buttons:l,...i}}return{buttons:[c,...o],...i}}function Zn(e,t,r=0){return Math.min(e.preload,Math.max(e.finite?t.length-1:Math.floor(t.length/2),r))}const Wn=Number(n.version.split(".")[0])>=19;function $n(e){return{inert:Wn?e:e?"":void 0}}function zn(e){e.scrollTop}const je={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[Ee]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",navigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:Vt,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!1,closeOnEscape:!0,preventDefaultWheelX:!0,preventDefaultWheelY:!1,disableSwipeNavigation:!1},portal:{},noScroll:{disabled:!1},on:{},styles:{},className:""};function ae(e,t){return{name:e,component:t}}function Y(e,t){return{module:e,children:t}}function Kt(e,t,r){return e.module.name===t?r(e):e.children?[Y(e.module,e.children.flatMap(o=>{var i;return(i=Kt(o,t,r))!==null&&i!==void 0?i:[]}))]:[e]}function ve(e,t,r){return e.flatMap(o=>{var i;return(i=Kt(o,t,r))!==null&&i!==void 0?i:[]})}function Fn(e,t=[],r=[]){let o=e;const i=p=>{const g=[...o];for(;g.length>0;){const u=g.pop();if((u==null?void 0:u.module.name)===p)return!0;u!=null&&u.children&&g.push(...u.children)}return!1},s=(p,g)=>{if(p===""){o=[Y(g,o)];return}o=ve(o,p,u=>[Y(g,[u])])},c=(p,g)=>{o=ve(o,p,u=>[Y(u.module,[Y(g,u.children)])])},l=(p,g,u)=>{o=ve(o,p,_=>{var x;return[Y(_.module,[...u?[Y(g)]:[],...(x=_.children)!==null&&x!==void 0?x:[],...u?[]:[Y(g)]])]})},d=(p,g,u)=>{o=ve(o,p,_=>[...u?[Y(g)]:[],_,...u?[]:[Y(g)]])},a=p=>{c(Tt,p)},m=(p,g)=>{o=ve(o,p,u=>[Y(g,u.children)])},f=p=>{o=ve(o,p,g=>g.children)},h=p=>{r.push(p)};return t.forEach(p=>{p({contains:i,addParent:s,append:c,addChild:l,addSibling:d,addModule:a,replace:m,remove:f,augment:h})}),{config:o,augmentation:p=>r.reduce((g,u)=>u(g),p)}}const jt=n.createContext(null),Gt=se("useA11yContext","A11yContext",jt);function Vn({children:e}){const[t,r]=n.useState(!1),[o,i]=n.useState(!1),s=n.useMemo(()=>({focusWithin:t,trackFocusWithin:(l,d)=>{const a=m=>f=>{var h;f.currentTarget.contains(f.relatedTarget)||r(m),(h=m?l:d)===null||h===void 0||h(f)};return{onFocus:a(!0),onBlur:a(!1)}},autoPlaying:o,setAutoPlaying:i}),[t,o]);return n.createElement(jt.Provider,{value:s},e)}const qt=n.createContext(null),Te=se("useDocument","DocumentContext",qt);function Un({nodeRef:e,children:t}){const r=n.useMemo(()=>{const o=s=>{var c;return((c=s||e.current)===null||c===void 0?void 0:c.ownerDocument)||document};return{getOwnerDocument:o,getOwnerWindow:s=>{var c;return((c=o(s))===null||c===void 0?void 0:c.defaultView)||window}}},[e]);return n.createElement(qt.Provider,{value:r},t)}const Qt=n.createContext(null),ke=se("useEvents","EventsContext",Qt);function Xn({children:e}){const[t]=n.useState({});n.useEffect(()=>()=>{Object.keys(t).forEach(o=>delete t[o])},[t]);const r=n.useMemo(()=>{const o=(c,l)=>{var d;(d=t[c])===null||d===void 0||d.splice(0,t[c].length,...t[c].filter(a=>a!==l))};return{publish:(...[c,l])=>{var d;(d=t[c])===null||d===void 0||d.forEach(a=>a(l))},subscribe:(c,l)=>(t[c]||(t[c]=[]),t[c].push(l),()=>o(c,l)),unsubscribe:o}},[t]);return n.createElement(Qt.Provider,{value:r},e)}const Jt=n.createContext(null),te=se("useLightboxProps","LightboxPropsContext",Jt);function Yn({children:e,...t}){return n.createElement(Jt.Provider,{value:t},e)}const en=n.createContext(null),ue=se("useLightboxState","LightboxStateContext",en),tn=n.createContext(null),Hn=se("useLightboxDispatch","LightboxDispatchContext",tn);function Bn(e,t){switch(t.type){case"swipe":{const{slides:r}=e,o=(t==null?void 0:t.increment)||0,i=e.globalIndex+o,s=st(i,r.length),c=Ke(r,s),l=o||t.duration!==void 0?{increment:o,duration:t.duration,easing:t.easing}:void 0;return{slides:r,currentIndex:s,globalIndex:i,currentSlide:c,animation:l}}case"update":return t.slides!==e.slides||t.index!==e.currentIndex?{slides:t.slides,currentIndex:t.index,globalIndex:t.index,currentSlide:Ke(t.slides,t.index)}:e;default:throw new Error(Ut)}}function Kn({slides:e,index:t,children:r}){const[o,i]=n.useReducer(Bn,{slides:e,currentIndex:t,globalIndex:t,currentSlide:Ke(e,t)}),[s,c]=n.useState(e),[l,d]=n.useState(t);(e!==s||t!==l)&&(c(e),d(t),i({type:"update",slides:e,index:t}));const a=n.useMemo(()=>({...o,state:o,dispatch:i}),[o,i]);return n.createElement(tn.Provider,{value:i},n.createElement(en.Provider,{value:a},r))}const nn=n.createContext(null),jn=se("useRTLContext","RTLContext",nn);function Gn({isRTL:e,children:t}){const r=n.useMemo(()=>({isRTL:e}),[e]);return n.createElement(nn.Provider,{value:r},t)}const qn=n.createContext(null);function De(e){const t=n.useContext(qn);return e&&t?Yt(t(e)):0}const on=n.createContext(null),Ae=se("useTimeouts","TimeoutsContext",on);function Qn({children:e}){const[t]=n.useState([]);n.useEffect(()=>()=>{t.forEach(o=>window.clearTimeout(o)),t.splice(0,t.length)},[t]);const r=n.useMemo(()=>{const o=c=>{t.splice(0,t.length,...t.filter(l=>l!==c))};return{setTimeout:(c,l)=>{const d=window.setTimeout(()=>{o(d),c()},l);return t.push(d),d},clearTimeout:c=>{c!==void 0&&(o(c),window.clearTimeout(c))}}},[t]);return n.createElement(on.Provider,{value:r},e)}const lt=n.forwardRef(function({label:t,className:r,icon:o,renderIcon:i,onClick:s,style:c,...l},d){const{styles:a,labels:m}=te(),f=xe(m,t);return n.createElement("button",{ref:d,type:"button",title:f,"aria-label":f,className:ie(k(Rn),r),onClick:s,style:{...c,...a.button},...l},i?i():n.createElement(o,{className:k(Be),style:a.icon}))});function Jn(e,t){const r=o=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...o},t);return r.displayName=e,r}function pe(e,t){return Jn(e,n.createElement("g",{fill:"currentColor"},n.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t))}const eo=pe("Close",n.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),to=pe("Previous",n.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),no=pe("Next",n.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),oo=pe("Loading",n.createElement(n.Fragment,null,Array.from({length:8}).map((e,t,r)=>n.createElement("line",{key:t,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/r.length*(t+1),transform:`rotate(${360/r.length*t}, 12, 12)`})))),ro=pe("Error",n.createElement("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),ce=rt()?n.useLayoutEffect:n.useEffect;function at(){const[e,t]=n.useState(!1);return n.useEffect(()=>{var r,o;const i=(r=window.matchMedia)===null||r===void 0?void 0:r.call(window,"(prefers-reduced-motion: reduce)");t(i==null?void 0:i.matches);const s=c=>t(c.matches);return(o=i==null?void 0:i.addEventListener)===null||o===void 0||o.call(i,"change",s),()=>{var c;return(c=i==null?void 0:i.removeEventListener)===null||c===void 0?void 0:c.call(i,"change",s)}},[]),e}function io(e){let t=0,r=0,o=0;const s=window.getComputedStyle(e).transform.match(/matrix.*\((.+)\)/);if(s){const c=s[1].split(",").map(Ne);c.length===6?(t=c[4],r=c[5]):c.length===16&&(t=c[12],r=c[13],o=c[14])}return{x:t,y:r,z:o}}function xt(e,t){const r=n.useRef(void 0),o=n.useRef(void 0),i=at();return ce(()=>{var s,c,l;if(e.current&&r.current!==void 0&&!i){const{keyframes:d,duration:a,easing:m,onfinish:f}=t(r.current,e.current.getBoundingClientRect(),io(e.current))||{};if(d&&a){(s=o.current)===null||s===void 0||s.cancel(),o.current=void 0;try{o.current=(l=(c=e.current).animate)===null||l===void 0?void 0:l.call(c,d,{duration:a,easing:m})}catch(h){console.error(h)}o.current&&(o.current.onfinish=()=>{o.current=void 0,f==null||f()})}}r.current=void 0}),{prepareAnimation:s=>{r.current=s},isAnimationPlaying:()=>{var s;return((s=o.current)===null||s===void 0?void 0:s.playState)==="running"}}}function rn(){const e=n.useRef(null),t=n.useRef(void 0),[r,o]=n.useState();return{setContainerRef:n.useCallback(s=>{e.current=s,t.current&&(t.current.disconnect(),t.current=void 0);const c=()=>{if(s){const l=window.getComputedStyle(s),d=a=>parseFloat(a)||0;o({width:Math.round(s.clientWidth-d(l.paddingLeft)-d(l.paddingRight)),height:Math.round(s.clientHeight-d(l.paddingTop)-d(l.paddingBottom))})}else o(void 0)};c(),s&&typeof ResizeObserver<"u"&&(t.current=new ResizeObserver(c),t.current.observe(s))},[]),containerRef:e,containerRect:r}}function Ie(){const e=n.useRef(void 0),{setTimeout:t,clearTimeout:r}=Ae();return n.useCallback((o,i)=>{r(e.current),e.current=t(o,i>0?i:0)},[t,r])}function A(e){const t=n.useRef(e);return ce(()=>{t.current=e}),n.useCallback((...r)=>{var o;return(o=t.current)===null||o===void 0?void 0:o.call(t,...r)},[])}function bt(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Ge(e,t){return n.useMemo(()=>e==null&&t==null?null:r=>{bt(e,r),bt(t,r)},[e,t])}function co(e,t=!1){const r=n.useRef(!1);ce(()=>{t&&r.current&&(r.current=!1,e())},[t,e]);const o=n.useCallback(()=>{r.current=!0},[]),i=n.useCallback(()=>{r.current=!1},[]);return{onFocus:o,onBlur:i}}function ut(){return jn().isRTL}function so(){const[e]=n.useState({}),t=n.useCallback((i,s)=>{var c;(c=e[i])===null||c===void 0||c.forEach(l=>{s.isPropagationStopped()||l(s)})},[e]),r=n.useMemo(()=>({onPointerDown:i=>t(Zt,i),onPointerMove:i=>t(Wt,i),onPointerUp:i=>t($t,i),onPointerLeave:i=>t(zt,i),onPointerCancel:i=>t(Ft,i),onKeyDown:i=>t(et,i),onKeyUp:i=>t(Ln,i),onWheel:i=>t(tt,i)}),[t]),o=n.useCallback((i,s)=>(e[i]||(e[i]=[]),e[i].unshift(s),()=>{const c=e[i];c&&c.splice(0,c.length,...c.filter(l=>l!==s))}),[e]);return{registerSensors:r,subscribeSensors:o}}function wt(e,t){const r=n.useRef(0),o=Ie(),i=A((...s)=>{r.current=Date.now(),e(...s)});return n.useCallback((...s)=>{o(()=>{i(...s)},t-(Date.now()-r.current))},[t,i,o])}const Xe=nt("slide"),Ye=nt("slide_image");function Re({slide:e,offset:t,render:r,rect:o,rotation:i=0,imageFit:s,imageProps:c,onClick:l,onLoad:d,onError:a,style:m}){var f,h,p,g,u,_,x,M;const[L,R]=n.useState(Fe),{publish:P}=ke(),{setTimeout:N}=Ae(),y=n.useRef(null);n.useEffect(()=>{t===0&&P(_n(L))},[t,L,P]);const T=A(W=>{("decode"in W?W.decode():Promise.resolve()).catch(()=>{}).then(()=>{W.parentNode&&(R(Ue),N(()=>{d==null||d(W)},0))})}),v=n.useCallback(W=>{y.current=W,W!=null&&W.complete&&T(W)},[T]),I=n.useCallback(W=>{T(W.currentTarget)},[T]),Z=A(()=>{R(Ve),a==null||a()}),U=ct(e,s),w=Yt(i),S=w%180!==0,b=o&&S?{width:o.height,height:o.width}:o,F=S&&b?`${b.width}px`:"100%",$=S&&b?`${b.height}px`:"100%",C=(W,ge)=>Number.isFinite(W)?W:ge,D=C(Math.max(...((h=(f=e.srcSet)===null||f===void 0?void 0:f.map(W=>W.width))!==null&&h!==void 0?h:[]).concat(e.width?[e.width]:[]).filter(Boolean)),((p=y.current)===null||p===void 0?void 0:p.naturalWidth)||0),O=C(Math.max(...((u=(g=e.srcSet)===null||g===void 0?void 0:g.map(W=>W.height))!==null&&u!==void 0?u:[]).concat(e.height?[e.height]:[]).filter(Boolean)),((_=y.current)===null||_===void 0?void 0:_.naturalHeight)||0),X=D&&O?{maxWidth:`min(${D}px, ${F})`,maxHeight:`min(${O}px, ${$})`}:{maxWidth:F,maxHeight:$},V=b&&D&&O?Math.min(b.width/D,b.height/O,1):0,H=S&&b?U?{width:b.width,height:b.height}:V?{width:D*V,height:O*V}:null:null,B=(x=e.srcSet)===null||x===void 0?void 0:x.slice().sort((W,ge)=>W.width-ge.width).map(W=>`${W.src} ${W.width}w`).join(", "),Q=(()=>{if(b)return!e.width||!e.height?b.width:(U?Math.max:Math.min)(b.height/e.height*e.width,b.width)})(),J=B&&Q!==void 0&&rt()?`${Math.round(Q)}px`:void 0,{style:be,className:Me,...we}=(typeof c=="function"?c(e):c)||{};return n.createElement(n.Fragment,null,n.createElement("img",{ref:v,onLoad:I,onError:Z,onClick:l,draggable:!1,className:ie(k(Ye()),U&&k(Ye("cover")),L!==Ue&&k(Ye("loading")),Me),style:{...X,...w?{rotate:`${w}deg`}:null,...S?{flexShrink:0}:null,...H,...m,...be},...we,alt:(M=e.alt)!==null&&M!==void 0?M:"",sizes:J,srcSet:B,src:e.src}),L!==Ue&&n.createElement("div",{className:k(Xe(Cn))},L===Fe&&(r!=null&&r.iconLoading?r.iconLoading():n.createElement(oo,{className:ie(k(Be),k(Xe(Fe)))})),L===Ve&&(r!=null&&r.iconError?r.iconError():n.createElement(ro,{className:ie(k(Be),k(Xe(Ve)))}))))}const lo=n.forwardRef(function({className:t,children:r,onFocus:o,onBlur:i,...s},c){const l=n.useRef(null),[d,a]=n.useState(!1),{trackFocusWithin:m}=Gt(),f=A(()=>{if(l.current){const h=window.getComputedStyle(l.current).direction==="rtl";h!==d&&a(h)}});return n.useEffect(f),n.createElement(Un,{nodeRef:l},n.createElement(Gn,{isRTL:d},n.createElement("div",{ref:Ge(c,l),className:ie(k("root"),t),...m(o,i),...s},r)))});var K;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL",e[e.ANIMATION=3]="ANIMATION"})(K||(K={}));function cn(e,t,r,o,i){n.useEffect(()=>i?()=>{}:ot(e(Zt,t),e(Wt,r),e($t,o),e(zt,o),e(Ft,o)),[e,t,r,o,i])}var ne;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL"})(ne||(ne={}));const He=30;function ao({disableSwipeNavigation:e,closeOnBackdropClick:t},r,o,i,s,c,l,d,a,m,f,h,p,g,u,_){const x=n.useRef(0),M=n.useRef([]),L=n.useRef(void 0),R=n.useRef(0),P=n.useRef(ne.NONE),N=n.useCallback(w=>{L.current===w.pointerId&&(L.current=void 0,P.current=ne.NONE);const S=M.current;S.splice(0,S.length,...S.filter(b=>b.pointerId!==w.pointerId))},[]),y=n.useCallback(w=>{N(w),w.persist(),M.current.push(w)},[N]),T=n.useCallback(w=>M.current.find(({pointerId:S})=>w.pointerId===S),[]),v=A(w=>{y(w)}),I=(w,S)=>f&&w>S||m&&w<-S,Z=A(w=>{const S=T(w);if(S)if(L.current===w.pointerId){const b=Date.now()-R.current,F=x.current;P.current===ne.SWIPE?Math.abs(F)>.3*i||Math.abs(F)>5&&b<s?d(F,b):a(F):P.current===ne.PULL&&(I(F,2*He)?g(F,b):u(F)),x.current=0,P.current=ne.NONE}else{const{target:b}=w;t&&b instanceof HTMLElement&&b===S.target&&(b.classList.contains(k(Je))||b.classList.contains(k(At)))&&_()}N(w)}),U=A(w=>{const S=T(w);if(S){const b=L.current===w.pointerId;if(w.buttons===0){b&&x.current!==0?Z(w):N(S);return}const F=w.clientX-S.clientX,$=w.clientY-S.clientY;if(L.current===void 0){const C=D=>{y(w),L.current=w.pointerId,R.current=Date.now(),P.current=D};Math.abs(F)>Math.abs($)&&Math.abs(F)>He&&o(F)?e||(C(ne.SWIPE),c()):Math.abs($)>Math.abs(F)&&I($,He)&&(C(ne.PULL),h())}else b&&(P.current===ne.SWIPE?(x.current=F,l(F)):P.current===ne.PULL&&(x.current=$,p($)))}});cn(r,v,U,Z)}function uo({preventDefaultWheelX:e,preventDefaultWheelY:t}){const r=n.useRef(null),o=A(i=>{const s=Math.abs(i.deltaX)>Math.abs(i.deltaY);(s&&e||!s&&t||i.ctrlKey)&&i.preventDefault()});return n.useCallback(i=>{var s;i?i.addEventListener("wheel",o,{passive:!1}):(s=r.current)===null||s===void 0||s.removeEventListener("wheel",o),r.current=i},[o])}function fo(e,t,r,o,i,s,c,l,d){const a=n.useRef(0),m=n.useRef(0),f=n.useRef(void 0),h=n.useRef(void 0),p=n.useRef(0),g=n.useRef(void 0),u=n.useRef(0),{setTimeout:_,clearTimeout:x}=Ae(),M=n.useCallback(()=>{f.current&&(x(f.current),f.current=void 0)},[x]),L=n.useCallback(()=>{h.current&&(x(h.current),h.current=void 0)},[x]),R=A(()=>{e!==K.SWIPE&&(a.current=0,u.current=0,M(),L())});n.useEffect(R,[e,R]);const P=A(y=>{h.current=void 0,a.current===y&&d(a.current)}),N=A(y=>{if(y.ctrlKey||Math.abs(y.deltaY)>Math.abs(y.deltaX))return;const T=v=>{p.current=v,x(g.current),g.current=v>0?_(()=>{p.current=0,g.current=void 0},300):void 0};if(e===K.NONE){if(Math.abs(y.deltaX)<=1.2*Math.abs(p.current)){T(y.deltaX);return}if(!r(-y.deltaX))return;if(m.current+=y.deltaX,M(),Math.abs(m.current)>30)m.current=0,T(0),u.current=Date.now(),s();else{const v=m.current;f.current=_(()=>{f.current=void 0,v===m.current&&(m.current=0)},i)}}else if(e===K.SWIPE){let v=a.current-y.deltaX;if(v=Math.min(Math.abs(v),o)*Math.sign(v),a.current=v,c(v),L(),Math.abs(v)>.2*o){T(y.deltaX),l(v,Date.now()-u.current);return}h.current=_(()=>P(v),2*i)}else T(y.deltaX)});n.useEffect(()=>t(tt,N),[t,N])}const Ct=nt("container"),sn=n.createContext(null),le=se("useController","ControllerContext",sn);function ho({children:e,...t}){var r;const{carousel:o,animation:i,controller:s,on:c,styles:l,render:d}=t,{closeOnPullUp:a,closeOnPullDown:m,preventDefaultWheelX:f,preventDefaultWheelY:h}=s,[p,g]=n.useState(),u=ue(),_=Hn(),[x,M]=n.useState(K.NONE),L=n.useRef(0),R=n.useRef(0),P=n.useRef(1),{registerSensors:N,subscribeSensors:y}=so(),{subscribe:T,publish:v}=ke(),I=Ie(),Z=Ie(),U=Ie(),{containerRef:w,setContainerRef:S,containerRect:b}=rn(),F=Ge(uo({preventDefaultWheelX:f,preventDefaultWheelY:h}),S),$=n.useRef(null),C=Ge($,void 0),{getOwnerDocument:D}=Te(),O=ut(),X=E=>(O?-1:1)*(typeof E=="number"?E:1),V=A(()=>{var E;return(E=w.current)===null||E===void 0?void 0:E.focus()}),H=A(()=>t),B=A(()=>u),G=n.useCallback(E=>v(fe,E),[v]),Q=n.useCallback(E=>v(he,E),[v]),J=n.useCallback(()=>v(Ee),[v]),be=E=>!(o.finite&&(X(E)>0&&u.currentIndex===0||X(E)<0&&u.currentIndex===u.slides.length-1)),Me=E=>{var z;L.current=E,(z=w.current)===null||z===void 0||z.style.setProperty(q("swipe_offset"),`${Math.round(E)}px`)},we=E=>{var z,j;R.current=E,P.current=(()=>{const _e=m&&E>0?E:a&&E<0?-E:0;return Math.min(Math.max(it(1-_e/60*(1-.5),2),.5),1)})(),(z=w.current)===null||z===void 0||z.style.setProperty(q("pull_offset"),`${Math.round(E)}px`),(j=w.current)===null||j===void 0||j.style.setProperty(q("pull_opacity"),`${P.current}`)},{prepareAnimation:W}=xt($,(E,z,j)=>{if($.current&&b)return{keyframes:[{transform:`translate(0, ${E.rect.y-z.y+j.y}px)`,opacity:E.opacity},{transform:"translate(0, 0)",opacity:1}],duration:E.duration,easing:i.easing.fade}}),ge=(E,z)=>{if(a||m){we(E);let j=0;$.current&&(j=i.fade*(z?2:1),W({rect:$.current.getBoundingClientRect(),opacity:P.current,duration:j})),U(()=>{we(0),M(K.NONE)},j),M(K.ANIMATION),z||J()}},{prepareAnimation:hn,isAnimationPlaying:mn}=xt($,(E,z,j)=>{var oe;if($.current&&b&&(!((oe=u.animation)===null||oe===void 0)&&oe.duration)){const ee=Oe(o.spacing),_e=(ee.percent?ee.percent*b.width/100:ee.pixel)||0;return{keyframes:[{transform:`translate(${X(u.globalIndex-E.index)*(b.width+_e)+E.rect.x-z.x+j.x}px, 0)`},{transform:"translate(0, 0)"}],duration:u.animation.duration,easing:u.animation.easing}}}),Ce=A(E=>{var z,j;const oe=E.offset||0,ee=oe?i.swipe:(z=i.navigation)!==null&&z!==void 0?z:i.swipe,_e=!oe&&!mn()?i.easing.navigation:i.easing.swipe;let{direction:Le}=E;const ye=(j=E.count)!==null&&j!==void 0?j:1;let We=K.ANIMATION,re=ee*ye;if(!Le){const Pe=b==null?void 0:b.width,pt=E.duration||0,ze=Pe?ee/Pe*Math.abs(oe):ee;ye!==0?(pt<ze?re=re/ze*Math.max(pt,ze/5):Pe&&(re=ee/Pe*(Pe-Math.abs(oe))),Le=X(oe)>0?fe:he):re=ee/2}let $e=0;Le===fe?be(X(1))?$e=-ye:(We=K.NONE,re=ee):Le===he&&(be(X(-1))?$e=ye:(We=K.NONE,re=ee)),re=Math.round(re),Z(()=>{Me(0),M(K.NONE)},re),$.current&&hn({rect:$.current.getBoundingClientRect(),index:u.globalIndex}),M(We),v(vt,{type:"swipe",increment:$e,duration:re,easing:_e})});n.useEffect(()=>{var E,z;!((E=u.animation)===null||E===void 0)&&E.increment&&(!((z=u.animation)===null||z===void 0)&&z.duration)&&I(()=>_({type:"swipe",increment:0}),u.animation.duration)},[u.animation,_,I]);const ft=[y,be,(b==null?void 0:b.width)||0,i.swipe,()=>M(K.SWIPE),E=>Me(E),(E,z)=>Ce({offset:E,duration:z,count:1}),E=>Ce({offset:E,count:0})],pn=[()=>{m&&M(K.PULL)},E=>we(E),E=>ge(E),E=>ge(E,!0)];ao(s,...ft,a,m,...pn,J),fo(x,...ft);const ht=A(()=>{s.focus&&D().querySelector(`.${k(qe)} .${k(Ct())}`)&&V()});n.useEffect(ht,[ht]);const mt=A(()=>{var E;(E=c.view)===null||E===void 0||E.call(c,{index:u.currentIndex})});n.useEffect(mt,[u.globalIndex,mt]),n.useEffect(()=>ot(T(fe,E=>Ce({direction:fe,...E})),T(he,E=>Ce({direction:he,...E})),T(vt,E=>_(E))),[T,Ce,_]);const gn=n.useMemo(()=>({prev:G,next:Q,close:J,focus:V,slideRect:b?Tn(b,o.padding):{width:0,height:0},containerRect:b||{width:0,height:0},subscribeSensors:y,containerRef:w,setCarouselRef:C,toolbarWidth:p,setToolbarWidth:g}),[G,Q,J,V,y,b,w,C,p,g,o.padding]);return n.useImperativeHandle(s.ref,()=>({prev:G,next:Q,close:J,focus:V,getLightboxProps:H,getLightboxState:B}),[G,Q,J,V,H,B]),n.createElement("div",{ref:F,className:ie(k(Ct()),k(Qe)),style:{...x===K.SWIPE?{[q("swipe_offset")]:`${Math.round(L.current)}px`}:null,...x===K.PULL?{[q("pull_offset")]:`${Math.round(R.current)}px`,[q("pull_opacity")]:`${P.current}`}:null,...s.touchAction!=="none"?{[q("controller_touch_action")]:s.touchAction}:null,...l.container},tabIndex:-1,...N},b&&n.createElement(sn.Provider,{value:gn},e,(r=d.controls)===null||r===void 0?void 0:r.call(d)))}const mo=ae(Tt,ho);function de(e){return Se(Nt,e)}function _t(e){return Se(Je,e)}function po({slide:e,offset:t}){const r=n.useRef(null),{currentIndex:o,slides:i}=ue(),{slideRect:s,focus:c}=le(),{render:l,carousel:{imageFit:d,imageProps:a},on:{click:m},styles:{slide:f},labels:h}=te(),{getOwnerDocument:p}=Te(),g=De(e),u=t!==0;n.useEffect(()=>{var x;u&&(!((x=r.current)===null||x===void 0)&&x.contains(p().activeElement))&&c()},[u,c,p]);const _=()=>{var x,M,L,R;let P=(x=l.slide)===null||x===void 0?void 0:x.call(l,{slide:e,offset:t,rect:s});return!P&&me(e)&&(P=n.createElement(Re,{slide:e,offset:t,render:l,rect:s,rotation:g,imageFit:d,imageProps:a,onClick:u?void 0:()=>m==null?void 0:m({index:o})})),P?n.createElement(n.Fragment,null,(M=l.slideHeader)===null||M===void 0?void 0:M.call(l,{slide:e}),((L=l.slideContainer)!==null&&L!==void 0?L:(({children:N})=>N))({slide:e,children:P}),(R=l.slideFooter)===null||R===void 0?void 0:R.call(l,{slide:e})):null};return n.createElement("div",{ref:r,className:ie(k(_t()),!u&&k(_t("current")),k(Qe)),...$n(u),style:f,role:"group","aria-roledescription":xe(h,"Slide"),"aria-label":Nn(h,i,o+t)},_())}function go(){const e=te().styles.slide;return n.createElement("div",{className:k(Je),style:e})}function vo({carousel:e,labels:t}){const{slides:r,currentIndex:o,globalIndex:i}=ue(),{setCarouselRef:s}=le(),{autoPlaying:c,focusWithin:l}=Gt(),d=Oe(e.spacing),a=Oe(e.padding),m=Zn(e,r,1),f=[];if(Ht(r))for(let h=o-m;h<=o+m;h+=1){const p=Bt(r,h),g=i-o+h,u=e.finite&&(h<0||h>r.length-1);f.push(u?{key:g}:{key:[`${g}`,Dn(p)].filter(Boolean).join("|"),offset:h-o,slide:p})}return n.createElement("div",{ref:s,className:ie(k(de()),f.length>0&&k(de("with_slides"))),style:{[`${q(de("slides_count"))}`]:f.length,[`${q(de("spacing_px"))}`]:d.pixel||0,[`${q(de("spacing_percent"))}`]:d.percent||0,[`${q(de("padding_px"))}`]:a.pixel||0,[`${q(de("padding_percent"))}`]:a.percent||0},role:"region","aria-live":c&&!l?"off":"polite","aria-roledescription":xe(t,"Carousel"),"aria-label":xe(t,"Photo gallery")},f.map(({key:h,slide:p,offset:g})=>p?n.createElement(po,{key:h,slide:p,offset:g}):n.createElement(go,{key:h})))}const Eo=ae(Nt,vo);function ln(){const{carousel:e}=te(),{slides:t,currentIndex:r}=ue(),o=t.length===0||e.finite&&r===0,i=t.length===0||e.finite&&r===t.length-1;return{prevDisabled:o,nextDisabled:i}}function xo(e){var t;const r=ut(),{publish:o}=ke(),{animation:i,controller:s}=te(),{prevDisabled:c,nextDisabled:l}=ln(),d=((t=i.navigation)!==null&&t!==void 0?t:i.swipe)/2,a=wt(()=>o(fe),d),m=wt(()=>o(he),d),f=A(h=>{switch(h.key){case yn:if(!s.closeOnEscape)return;o(Ee);break;case In:(r?l:c)||(r?m:a)();break;case On:(r?c:l)||(r?a:m)();break;default:return}h.stopPropagation()});n.useEffect(()=>e(et,f),[e,f])}function Pt({label:e,icon:t,renderIcon:r,action:o,onClick:i,disabled:s,style:c}){return n.createElement(lt,{label:e,icon:t,renderIcon:r,className:k(`navigation_${o}`),disabled:s,onClick:i,style:c,...co(le().focus,s)})}function bo({render:{buttonPrev:e,buttonNext:t,iconPrev:r,iconNext:o},styles:i}){const{prev:s,next:c,subscribeSensors:l}=le(),{prevDisabled:d,nextDisabled:a}=ln();return xo(l),n.createElement(n.Fragment,null,e?e():n.createElement(Pt,{label:"Previous",action:fe,icon:to,renderIcon:r,style:i.navigationPrev,disabled:d,onClick:s}),t?t():n.createElement(Pt,{label:"Next",action:he,icon:no,renderIcon:o,style:i.navigationNext,disabled:a,onClick:c}))}const wo=ae(xn,bo),St=k(Sn),Co=k(Dt);function _o(e){return"style"in e}function Mt(e,t,r){const o=window.getComputedStyle(e),i=r?"padding-left":"padding-right",s=r?o.paddingLeft:o.paddingRight,c=e.style.getPropertyValue(i);return e.style.setProperty(i,`${(Ne(s)||0)+t}px`),()=>{c?e.style.setProperty(i,c):e.style.removeProperty(i)}}function Po({noScroll:{disabled:e},children:t}){const r=ut(),{getOwnerDocument:o,getOwnerWindow:i}=Te();return n.useEffect(()=>{if(e)return()=>{};const s=[],c=i(),{body:l,documentElement:d}=o(),a=Math.round(c.innerWidth-d.clientWidth);if(a>0){s.push(Mt(l,a,r));const m=l.getElementsByTagName("*");for(let f=0;f<m.length;f+=1){const h=m[f];_o(h)&&c.getComputedStyle(h).getPropertyValue("position")==="fixed"&&!h.classList.contains(Co)&&s.push(Mt(h,a,r))}}return l.classList.add(St),()=>{l.classList.remove(St),s.forEach(m=>m())}},[r,e,o,i]),n.createElement(n.Fragment,null,t)}const So=ae(bn,Po);function Lt(e){return Se(qe,e)}function yt(e,t,r){const o=e.getAttribute(t);return e.setAttribute(t,r),()=>{o?e.setAttribute(t,o):e.removeAttribute(t)}}function Mo({portal:{root:e,container:{className:t,style:r,...o}={}},animation:i,styles:s,className:c,on:l,close:d,labels:a,children:m}){const[f,h]=n.useState(!1),[p,g]=n.useState(!1),u=n.useRef([]),_=n.useRef(null),{setTimeout:x}=Ae(),{subscribe:M}=ke(),R=at()?0:i.fade;n.useEffect(()=>(h(!0),()=>{h(!1),g(!1)}),[]);const P=A(()=>{u.current.forEach(v=>v()),u.current=[]}),N=A(()=>{var v;g(!1),P(),(v=l.exiting)===null||v===void 0||v.call(l),x(()=>{var I;(I=l.exited)===null||I===void 0||I.call(l),d()},R)});n.useEffect(()=>M(Ee,N),[M,N]);const y=A(v=>{var I,Z,U;zn(v),g(!0),(I=l.entering)===null||I===void 0||I.call(l);const w=(U=(Z=v.parentNode)===null||Z===void 0?void 0:Z.children)!==null&&U!==void 0?U:[];for(let S=0;S<w.length;S+=1){const b=w[S];["TEMPLATE","SCRIPT","STYLE"].indexOf(b.tagName)===-1&&b!==v&&(u.current.push(yt(b,"inert","")),u.current.push(yt(b,"aria-hidden","true")))}u.current.push(()=>{var S,b;(b=(S=_.current)===null||S===void 0?void 0:S.focus)===null||b===void 0||b.call(S)}),x(()=>{var S;(S=l.entered)===null||S===void 0||S.call(l)},R)}),T=n.useCallback(v=>{v?y(v):P()},[y,P]);return f?En.createPortal(n.createElement(lo,{ref:T,className:ie(c,t,k(Lt()),k(Dt),p&&k(Lt("open"))),"aria-modal":!0,role:"dialog","aria-label":xe(a,"Lightbox"),style:{...i.fade!==je.animation.fade?{[q("fade_animation_duration")]:`${R}ms`}:null,...i.easing.fade!==je.animation.easing.fade?{[q("fade_animation_timing_function")]:i.easing.fade}:null,...s.root,...r},onFocus:v=>{_.current||(_.current=v.relatedTarget)},...o},m),(typeof e=="function"?e():e)||document.body):null}const Lo=ae(qe,Mo);function yo({children:e}){return n.createElement(n.Fragment,null,e)}const Io=ae(wn,yo);function Oo(e){return Se(kt,e)}function Ro({toolbar:{buttons:e},render:{buttonClose:t,iconClose:r},styles:o}){const{close:i,setToolbarWidth:s}=le(),{setContainerRef:c,containerRect:l}=rn();ce(()=>{s(l==null?void 0:l.width)},[s,l==null?void 0:l.width]);const d=()=>t?t():n.createElement(lt,{key:Ee,label:"Close",icon:eo,renderIcon:r,onClick:i});return n.createElement("div",{ref:c,style:o.toolbar,className:k(Oo())},e==null?void 0:e.map(a=>a===Ee?d():a))}const No=ae(kt,Ro);function an(e,t){var r;return n.createElement(e.module.component,{key:e.module.name,...t},(r=e.children)===null||r===void 0?void 0:r.map(o=>an(o,t)))}function To(e,t={}){const{easing:r,...o}=e,{easing:i,...s}=t;return{easing:{...r,...i},...o,...s}}function ko({carousel:e,animation:t,render:r,toolbar:o,controller:i,noScroll:s,on:c,plugins:l,slides:d,index:a,...m}){const{animation:f,carousel:h,render:p,toolbar:g,controller:u,noScroll:_,on:x,slides:M,index:L,plugins:R,...P}=je,{config:N,augmentation:y}=Fn([Y(Lo,[Y(So,[Y(mo,[Y(Eo),Y(No),Y(wo)])])])],l||R),T=y({animation:To(f,t),carousel:{...h,...e},render:{...p,...r},toolbar:{...g,...o},controller:{...u,...i},noScroll:{..._,...s},on:{...x,...c},...P,...m});return T.open?n.createElement(Yn,{...T},n.createElement(Kn,{slides:d||M,index:Ne(a||L)},n.createElement(Qn,null,n.createElement(Xn,null,n.createElement(Vn,null,an(Y(Io,N),T)))))):null}const un={minZoom:1,maxZoomPixelRatio:1,zoomInMultiplier:2,doubleTapDelay:300,doubleClickDelay:500,doubleClickMaxStops:2,keyboardMoveDistance:50,wheelZoomDistanceFactor:100,pinchZoomDistanceFactor:100,pinchZoomV4:!1,scrollToZoom:!1,maxZoom:8};function Do(e){return Math.min(Math.max(e,Number.EPSILON),1)}function dn(e){const{minZoom:t,...r}={...un,...e};return{minZoom:Do(t),...r}}function Ao(e,t,r,o){const i=n.useRef(void 0),s=n.useRef(void 0),{zoom:c}=te().animation,l=at(),d=A(()=>{var a,m,f;if((a=i.current)===null||a===void 0||a.cancel(),i.current=void 0,s.current&&(o!=null&&o.current)){try{i.current=(f=(m=o.current).animate)===null||f===void 0?void 0:f.call(m,[{transform:s.current},{transform:`scale(${e}) translateX(${t}px) translateY(${r}px)`}],{duration:l?0:c??500,easing:i.current?"ease-out":"ease-in-out"})}catch(h){console.error(h)}s.current=void 0,i.current&&(i.current.onfinish=()=>{i.current=void 0})}});return ce(d,[e,t,r,d]),n.useCallback(()=>{s.current=o!=null&&o.current?window.getComputedStyle(o.current).transform:void 0},[o])}function Zo(e,t){const{on:r}=te(),o=A(()=>{var i;t||(i=r.zoom)===null||i===void 0||i.call(r,{zoom:e})});n.useEffect(o,[e,o])}function Ze(){const{zoom:e}=te();return dn(e)}function Wo(e,t){var r;const o=typeof e=="function"?(r=e(t))!==null&&r!==void 0?r:un.maxZoom:e;return Math.max(o,1)}function $o(e,t){var r,o;let i={width:0,height:0},s={width:0,height:0};const{currentSlide:c}=ue(),l=De(c),{imageFit:d}=te().carousel,{maxZoomPixelRatio:a,maxZoom:m}=Ze();if(e&&c){const h={...c,...t};if(me(h)){const p=ct(h,d),g=Math.max(...(((r=h.srcSet)===null||r===void 0?void 0:r.map(L=>L.width))||[]).concat(h.width?[h.width]:[])),u=Math.max(...(((o=h.srcSet)===null||o===void 0?void 0:o.map(L=>L.height))||[]).concat(h.height?[h.height]:[])),_=l%180!==0,x=_?u:g,M=_?g:u;x>0&&M>0&&e.width>0&&e.height>0&&(s=p?{width:Math.round(Math.min(x,e.width/e.height*M)),height:Math.round(Math.min(M,e.height/e.width*x))}:{width:x,height:M},s={width:s.width*a,height:s.height*a},i=p?{width:Math.min(e.width,s.width,x),height:Math.min(e.height,s.height,M)}:{width:Math.round(Math.min(e.width,e.height/M*x,x)),height:Math.round(Math.min(e.height,e.width/x*M,M))})}else e.width>0&&e.height>0&&(t&&t.width>0&&t.height>0?i={width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}:i={width:e.width,height:e.height})}const f=c&&i.width?me(c)?Math.max(it(s.width/i.width,5),1):Wo(m,c):1;return{imageRect:i,maxZoom:f}}function It(e,t){return Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)}function Ot(e,t,r=100,o=2){return e*Math.min(1+Math.abs(t/r),o)**Math.sign(t)}function zo(e,t,r,o,i,s,c,l,d){const a=n.useRef([]),m=n.useRef(0),f=n.useRef(void 0),{globalIndex:h}=ue(),{getOwnerWindow:p}=Te(),{containerRef:g,subscribeSensors:u}=le(),{keyboardMoveDistance:_,zoomInMultiplier:x,wheelZoomDistanceFactor:M,scrollToZoom:L,doubleTapDelay:R,doubleClickDelay:P,doubleClickMaxStops:N,pinchZoomDistanceFactor:y,pinchZoomV4:T}=Ze(),v=n.useCallback(C=>{if(g.current){const{pageX:D,pageY:O}=C,{scrollX:X,scrollY:V}=p(),{left:H,top:B,width:G,height:Q}=g.current.getBoundingClientRect();return[D-H-X-G/2,O-B-V-Q/2]}return[]},[g,p]),I=A(C=>{const D=e(),{key:O,metaKey:X,ctrlKey:V}=C,H=X||V,B=()=>{C.preventDefault(),C.stopPropagation()};if(D>1){const G=(Q,J)=>{B(),l(Q,J)};O==="ArrowDown"?G(0,_):O==="ArrowUp"?G(0,-_):O==="ArrowLeft"?G(-_,0):O==="ArrowRight"&&G(_,0)}O==="+"||H&&O==="="?(B(),i()):O==="-"||H&&O==="_"?(B(),s()):H&&O==="0"&&(B(),c(1))}),Z=A(C=>{const D=e();if((C.ctrlKey||L)&&Math.abs(C.deltaY)>Math.abs(C.deltaX)){C.stopPropagation(),c(Ot(D,-C.deltaY,M),!0,...v(C));return}D>1&&(C.stopPropagation(),L||l(C.deltaX,C.deltaY))}),U=n.useCallback(C=>{const D=a.current;D.splice(0,D.length,...D.filter(O=>O.pointerId!==C.pointerId))},[]),w=n.useCallback(C=>{U(C),C.persist(),a.current.push(C)},[U]),S=A(C=>{var D;const O=e(),X=a.current;if(C.pointerType==="mouse"&&C.buttons>1||!(!((D=d==null?void 0:d.current)===null||D===void 0)&&D.contains(C.target)))return;O>1&&C.stopPropagation();const{timeStamp:V}=C;if(X.length===0&&V-m.current<(C.pointerType==="touch"?R:P)){m.current=0;const H=O>=1?O!==r?O*Math.max(r**(1/N),x):1:O!==t?O/Math.max(t**(-1/N),x):1;c(H,!1,...v(C))}else m.current=V;if(w(C),X.length===2){const H=It(X[0],X[1]);f.current={previousDistance:H,initialDistance:Math.max(H,1),initialZoom:O}}}),b=A(C=>{const D=e(),O=a.current,X=O.find(V=>V.pointerId===C.pointerId);if(O.length===2&&f.current){C.stopPropagation(),w(C);const V=It(O[0],O[1]),H=T?f.current.initialZoom/f.current.initialDistance*V:Ot(D,V-f.current.previousDistance,y);c(H,!0,...O.map(B=>v(B)).reduce((B,G)=>G.map((Q,J)=>B[J]+Q/2))),f.current.previousDistance=V;return}D>1&&(C.stopPropagation(),X&&(O.length===1&&l((X.clientX-C.clientX)/D,(X.clientY-C.clientY)/D),w(C)))}),F=n.useCallback(C=>{const D=a.current;D.length===2&&D.find(O=>O.pointerId===C.pointerId)&&(f.current=void 0),U(C)},[U]),$=n.useCallback(()=>{const C=a.current;C.splice(0,C.length),m.current=0,f.current=void 0},[]);cn(u,S,b,F,o),n.useEffect($,[h,$]),n.useEffect(()=>o?()=>{}:ot($,u(et,I),u(tt,Z)),[o,u,$,I,Z])}function Fo(e,t,r){const[o,i]=n.useState(1),[s,c]=n.useState(0),[l,d]=n.useState(0),a=n.useRef({zoom:o,offsetX:s,offsetY:l}),m=Ao(o,s,l,r),{currentSlide:f,globalIndex:h}=ue(),{containerRect:p,slideRect:g}=le(),{minZoom:u,zoomInMultiplier:_}=Ze(),x=f&&me(f)?f.src:void 0,M=De(f),L=!(r!=null&&r.current);ce(()=>{a.current={zoom:1,offsetX:0,offsetY:0},i(1),c(0),d(0)},[h,x,M]);const R=n.useCallback((I,Z,U)=>{const w=U||a.current.zoom,S=a.current.offsetX-(I||0),b=a.current.offsetY-(Z||0),F=(e.width*w-g.width)/2/w,$=(e.height*w-g.height)/2/w;a.current.offsetX=Math.min(Math.abs(S),Math.max(F,0))*Math.sign(S),a.current.offsetY=Math.min(Math.abs(b),Math.max($,0))*Math.sign(b),c(a.current.offsetX),d(a.current.offsetY)},[g,e.width,e.height]),P=n.useCallback((I,Z,U,w)=>{const S=it(I+.01<t?I-.01>u?I:u:t,5);Z||m();const{zoom:b}=a.current;R(U?U*(1/b-1/S):0,w?w*(1/b-1/S):0,S),a.current.zoom=S,i(S)},[u,t,R,m]),N=n.useCallback(()=>a.current.zoom,[]),y=A(()=>{const I=N();I>1&&(I>t&&P(t,!0),R())});ce(y,[p.width,p.height,y]);const T=n.useCallback(()=>{const I=N(),Z=I*_;P(I<1&&Z>1?1:Z)},[_,N,P]),v=n.useCallback(()=>{const I=N(),Z=I/_;P(I>1&&Z<1?1:Z)},[_,N,P]);return{zoom:o,offsetX:s,offsetY:l,disabled:L,getZoom:N,changeOffsets:R,changeZoom:P,zoomIn:T,zoomOut:v}}const fn=n.createContext(null),dt=se("useZoom","ZoomControllerContext",fn);function Vo({children:e}){const[t,r]=n.useState(),{slideRect:o}=le(),{ref:i,minZoom:s}=Ze(),{imageRect:c,maxZoom:l}=$o(o,t==null?void 0:t.imageDimensions),{zoom:d,offsetX:a,offsetY:m,disabled:f,getZoom:h,changeZoom:p,changeOffsets:g,zoomIn:u,zoomOut:_}=Fo(c,l,t==null?void 0:t.zoomWrapperRef);Zo(d,f),zo(h,s,l,f,u,_,p,g,t==null?void 0:t.zoomWrapperRef);const x=n.useMemo(()=>({zoom:d,minZoom:s,maxZoom:l,offsetX:a,offsetY:m,disabled:f,zoomIn:u,zoomOut:_,changeZoom:p}),[d,s,l,a,m,f,u,_,p]);n.useImperativeHandle(i,()=>x,[x]);const M=n.useMemo(()=>({...x,setZoomWrapper:r}),[x,r]);return n.createElement(fn.Provider,{value:M},e)}const Uo=pe("ZoomIn",n.createElement(n.Fragment,null,n.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),n.createElement("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"}))),Xo=pe("ZoomOut",n.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"})),Rt=n.forwardRef(function({zoomIn:t,onLoseFocus:r},o){const i=n.useRef(!1),s=n.useRef(!1),{zoom:c,minZoom:l,maxZoom:d,zoomIn:a,zoomOut:m,disabled:f}=dt(),{render:h}=te(),p=f||(t?c>=d:c<=l);return n.useEffect(()=>{p&&i.current&&s.current&&r(),p||(i.current=!0)},[p,r]),n.createElement(lt,{ref:o,disabled:p,label:t?"Zoom in":"Zoom out",icon:t?Uo:Xo,renderIcon:t?h.iconZoomIn:h.iconZoomOut,onClick:t?a:m,onFocus:()=>{s.current=!0},onBlur:()=>{s.current=!1}})});function Yo(){const e=n.useRef(null),t=n.useRef(null),{focus:r}=le(),o=n.useCallback(c=>{var l,d;!((l=c.current)===null||l===void 0)&&l.disabled?r():(d=c.current)===null||d===void 0||d.focus()},[r]),i=n.useCallback(()=>o(e),[o]),s=n.useCallback(()=>o(t),[o]);return n.createElement(n.Fragment,null,n.createElement(Rt,{zoomIn:!0,ref:e,onLoseFocus:s}),n.createElement(Rt,{ref:t,onLoseFocus:i}))}function Ho(){const{render:e}=te(),t=dt();return e.buttonZoom?n.createElement(n.Fragment,null,e.buttonZoom(t)):n.createElement(Yo,null)}function Bo(e){var t;return(((t=e.srcSet)===null||t===void 0?void 0:t.length)||0)>0}function Ko({current:e,preload:t},{type:r,source:o}){switch(r){case"fetch":return e?{current:e,preload:o}:{current:o};case"done":return o===t?{current:o}:{current:e,preload:t};default:throw new Error(Ut)}}function jo(e){var t,r;const[{current:o,preload:i},s]=n.useReducer(Ko,{}),{slide:c,rect:l,rotation:d=0,imageFit:a,render:m,interactive:f,zoom:h=1}=e,p=d%180!==0,g=p?{width:l.height,height:l.width}:l,u=c.srcSet.sort((v,I)=>v.width-I.width),_=(t=c.width)!==null&&t!==void 0?t:u[u.length-1].width,x=(r=c.height)!==null&&r!==void 0?r:u[u.length-1].height,M=ct(c,a),L=Math.max(...u.map(v=>v.width)),R=Math.min((M?Math.max:Math.min)(g.width,_*(g.height/x))*h,L),P=kn(),N=A(()=>{var v;const I=(v=u.find(Z=>Z.width>=R*P))!==null&&v!==void 0?v:u[u.length-1];(!o||u.findIndex(Z=>Z.src===o)<u.findIndex(Z=>Z===I))&&s({type:"fetch",source:I.src})});ce(N,[R,P,N]);const y=A(v=>s({type:"done",source:v})),T={WebkitTransform:f?"initial":"translateZ(0)"};return M||Object.assign(T,g.width/g.height<_/x?{width:p?`${g.width}px`:"100%",height:"auto"}:{width:"auto",height:p?`${g.height}px`:"100%"}),n.createElement(n.Fragment,null,i&&i!==o&&n.createElement(Re,{key:"preload",...e,offset:void 0,slide:{...c,src:i,srcSet:void 0},style:{position:"absolute",visibility:"hidden",...T},onLoad:()=>y(i),render:{...m,iconLoading:()=>null,iconError:()=>null}}),o&&n.createElement(Re,{key:"current",...e,slide:{...c,src:o,srcSet:void 0},style:T}))}function Go({render:e,slide:t,offset:r,rect:o}){var i;const[s,c]=n.useState(),l=n.useRef(null),d=me(t),a=De(t),{zoom:m,maxZoom:f,offsetX:h,offsetY:p,setZoomWrapper:g}=dt(),u=m>1,{carousel:_,on:x}=te(),{currentIndex:M}=ue();ce(()=>{if(r!==0||d||!l.current)return()=>{};const R=()=>{const N=l.current;if(!N)return;let y=0,T=0;for(const v of N.children)v instanceof HTMLElement&&(y=Math.max(y,v.offsetWidth),T=Math.max(T,v.offsetHeight));c(v=>v&&v.width===y&&v.height===T?v:{width:y,height:T})};if(R(),typeof ResizeObserver>"u")return()=>{};const P=new ResizeObserver(R);for(const N of l.current.children)P.observe(N);return()=>P.disconnect()},[r,d,o]),ce(()=>r===0?(g({zoomWrapperRef:l,imageDimensions:s}),()=>g(void 0)):()=>{},[r,s,g]);let L=(i=e.slide)===null||i===void 0?void 0:i.call(e,{slide:t,offset:r,rect:o,zoom:m,maxZoom:f});if(!L&&d){const R={slide:t,offset:r,rect:o,rotation:a,render:e,imageFit:_.imageFit,imageProps:_.imageProps,onClick:r===0?()=>{var P;return(P=x.click)===null||P===void 0?void 0:P.call(x,{index:M})}:void 0};L=Bo(t)?n.createElement(jo,{...R,slide:t,interactive:u,zoom:r===0?m:1}):n.createElement(Re,{onLoad:P=>c({width:P.naturalWidth,height:P.naturalHeight}),...R})}return L?n.createElement("div",{ref:l,className:ie(k(Pn),k(Qe),k(At),u&&k(Mn)),style:r===0?{transform:`scale(${m}) translateX(${h}px) translateY(${p}px)`}:void 0},L):null}const qo=({augment:e,addModule:t})=>{e(({zoom:r,toolbar:o,render:i,controller:s,...c})=>{const l=dn(r);return{zoom:l,toolbar:An(o,gt,n.createElement(Ho,null)),render:{...i,slide:d=>{var a,m;return me(d.slide)||d.slide.type!=null&&(!((a=l.supports)===null||a===void 0)&&a.includes(d.slide.type))?n.createElement(Go,{render:i,...d}):(m=i.slide)===null||m===void 0?void 0:m.call(i,d)}},controller:{...s,preventDefaultWheelY:l.scrollToZoom},...c}}),t(ae(gt,Vo))};function tr({src:e,alt:t,open:r,onClose:o}){return vn.jsx(ko,{open:r,close:o,slides:[{src:e,alt:t}],plugins:[qo],zoom:{scrollToZoom:!0,maxZoomPixelRatio:5},styles:{container:{backgroundColor:"rgba(0, 0, 0, 0.85)",backdropFilter:"blur(8px)"},toolbar:{background:"transparent",padding:"16px"},button:{backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:"9999px",color:"#fff",width:40,height:40},icon:{width:20,height:20}},animation:{fade:200}})}export{tr as default};
@@ -0,0 +1 @@
1
+ .yarl__fullsize{width:100%;height:100%}.yarl__relative{position:relative}.yarl__portal{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;overflow:hidden;z-index:var(--yarl__portal_zindex,9999);transition:opacity var(--yarl__fade_animation_duration,.25s) var(--yarl__fade_animation_timing_function,ease);pointer-events:auto}.yarl__portal_open{opacity:1}.yarl__container{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;background-color:var(--yarl__container_background_color,var(--yarl__color_backdrop,#000));outline:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:var(--yarl__controller_touch_action,none);overscroll-behavior:var(--yarl__controller_overscroll_behavior,contain)}.yarl__carousel{display:flex;flex:0 0 auto;height:100%;align-content:center;justify-content:center;align-items:stretch;width:calc(100% + (-1 + var(--yarl__carousel_slides_count)) * (100% + var(--yarl__carousel_spacing_px,0) * 1px + var(--yarl__carousel_spacing_percent,0) * 1%));transform:translate(var(--yarl__swipe_offset,0),var(--yarl__pull_offset,0));opacity:var(--yarl__pull_opacity,1)}.yarl__carousel_with_slides{-moz-column-gap:calc(var(--yarl__carousel_spacing_px,0) * 1px + 100 / (100 * var(--yarl__carousel_slides_count) + (-1 + var(--yarl__carousel_slides_count)) * var(--yarl__carousel_spacing_percent,0)) * var(--yarl__carousel_spacing_percent,0) * 1%);column-gap:calc(var(--yarl__carousel_spacing_px,0) * 1px + 100 / (100 * var(--yarl__carousel_slides_count) + (-1 + var(--yarl__carousel_slides_count)) * var(--yarl__carousel_spacing_percent,0)) * var(--yarl__carousel_spacing_percent,0) * 1%)}.yarl__flex_center{display:flex;justify-content:center;align-content:center;align-items:center}.yarl__slide{flex:1;position:relative;overflow:hidden;padding:calc(var(--yarl__carousel_padding_px,0) * 1px + 100 / (100 * var(--yarl__carousel_slides_count) + (-1 + var(--yarl__carousel_slides_count)) * var(--yarl__carousel_spacing_percent,0)) * var(--yarl__carousel_padding_percent,0) * 1%)}[dir=rtl] .yarl__slide{--yarl__direction:-1}.yarl__slide_image{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain;touch-action:var(--yarl__controller_touch_action,none);-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-touch-callout:none}.yarl__slide_image_cover{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.yarl__slide_image_loading{opacity:0}@media screen and (min-width:800px){.yarl__slide_wrapper:not(.yarl__slide_wrapper_interactive) .yarl__slide_image{-webkit-transform:translateZ(0);-webkit-backface-visibility:hidden;-webkit-transform-style:preserve-3d}}.yarl__slide_placeholder{position:absolute;top:50%;left:50%;transform:translate(-50%) translateY(-50%);line-height:0}.yarl__slide_loading{color:var(--yarl__slide_icon_loading_color,var(--yarl__color_button,hsla(0,0%,100%,.8)));animation:yarl__delayed_fadein 1s linear}.yarl__slide_loading line{animation:yarl__stroke_opacity 1s linear infinite}.yarl__slide_loading line:first-of-type{animation-delay:-1.875s}.yarl__slide_loading line:nth-of-type(2){animation-delay:-1.75s}.yarl__slide_loading line:nth-of-type(3){animation-delay:-1.625s}.yarl__slide_loading line:nth-of-type(4){animation-delay:-1.5s}.yarl__slide_loading line:nth-of-type(5){animation-delay:-1.375s}.yarl__slide_loading line:nth-of-type(6){animation-delay:-1.25s}.yarl__slide_loading line:nth-of-type(7){animation-delay:-1.125s}.yarl__slide_loading line:nth-of-type(8){animation-delay:-1s}.yarl__slide_error{width:var(--yarl__slide_icon_error_size,48px);height:var(--yarl__slide_icon_error_size,48px);color:var(--yarl__slide_icon_error_color,red)}@media(prefers-reduced-motion){.yarl__portal,.yarl__slide{transition:unset}.yarl__slide_loading,.yarl__slide_loading line{animation:unset}}.yarl__toolbar{position:absolute;top:0;right:0;bottom:auto;left:auto;display:flex;justify-content:flex-end;padding:var(--yarl__toolbar_padding,8px)}[dir=rtl] .yarl__toolbar{top:0;right:auto;bottom:auto;left:0}.yarl__icon{width:var(--yarl__icon_size,32px);height:var(--yarl__icon_size,32px)}.yarl__button{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--yarl__button_background_color,transparent);border:var(--yarl__button_border,0);margin:var(--yarl__button_margin,0);outline:none;line-height:0;padding:var(--yarl__button_padding,8px);color:var(--yarl__color_button,hsla(0,0%,100%,.8));filter:var(--yarl__button_filter,drop-shadow(2px 2px 2px rgba(0,0,0,.8)));-webkit-tap-highlight-color:transparent}.yarl__button:focus{color:var(--yarl__color_button_active,#fff)}.yarl__button:focus:not(:focus-visible){color:var(--yarl__color_button,hsla(0,0%,100%,.8))}.yarl__button:focus-visible{color:var(--yarl__color_button_active,#fff)}@media(hover:hover){.yarl__button:focus-visible:hover,.yarl__button:focus:hover,.yarl__button:hover{color:var(--yarl__color_button_active,#fff)}}.yarl__button:disabled{color:var(--yarl__color_button_disabled,hsla(0,0%,100%,.4));cursor:default}.yarl__navigation_next,.yarl__navigation_prev{position:absolute;top:50%;transform:translateY(-50%);padding:var(--yarl__navigation_button_padding,24px 16px)}.yarl__navigation_prev{left:0}[dir=rtl] .yarl__navigation_prev{left:unset;right:0;transform:translateY(-50%) rotate(180deg)}.yarl__navigation_next{right:0}[dir=rtl] .yarl__navigation_next{left:0;right:unset;transform:translateY(-50%) rotate(180deg)}.yarl__no_scroll{height:100%;overflow:hidden;overscroll-behavior:none}@keyframes yarl__delayed_fadein{0%{opacity:0}80%{opacity:0}to{opacity:1}}@keyframes yarl__stroke_opacity{0%{stroke-opacity:1}to{stroke-opacity:.125}}