webim-adapter 0.21.0 → 0.22.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.
- package/build/webim-adapter.js +59 -52
- package/build/webim-embed.js +1 -1
- package/build/webim-ssr.js +59 -52
- package/package.json +1 -1
package/build/webim-adapter.js
CHANGED
|
@@ -2465,14 +2465,18 @@ function Tt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
|
|
|
2465
2465
|
}
|
|
2466
2466
|
function Et({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
|
|
2467
2467
|
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : ue(), s = {
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2468
|
+
height: 34,
|
|
2469
|
+
padding: "0 12px",
|
|
2470
|
+
borderRadius: 8,
|
|
2471
|
+
border: "1px solid var(--page-border, rgba(100, 116, 139, 0.4))",
|
|
2472
|
+
background: "var(--page-bg, #ffffff)",
|
|
2473
2473
|
color: "var(--page-text, #111827)",
|
|
2474
|
+
fontSize: 13,
|
|
2475
|
+
fontFamily: "inherit",
|
|
2476
|
+
outline: "none",
|
|
2474
2477
|
minWidth: 140,
|
|
2475
|
-
flex: "
|
|
2478
|
+
flex: "0 1 auto",
|
|
2479
|
+
boxSizing: "border-box"
|
|
2476
2480
|
}, c = (e) => {
|
|
2477
2481
|
let t = e && typeof e == "object" ? e.value : e, n = e && typeof e == "object" ? e.label ?? e.value : e;
|
|
2478
2482
|
return {
|
|
@@ -2487,60 +2491,63 @@ function Et({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2487
2491
|
style: {
|
|
2488
2492
|
display: "flex",
|
|
2489
2493
|
flexWrap: "wrap",
|
|
2490
|
-
alignItems: "
|
|
2491
|
-
gap:
|
|
2494
|
+
alignItems: "center",
|
|
2495
|
+
gap: 8,
|
|
2492
2496
|
width: "100%",
|
|
2493
2497
|
...h(n)
|
|
2494
2498
|
},
|
|
2495
|
-
children: [a.map((e) => /* @__PURE__ */ d("
|
|
2499
|
+
children: [a.map((e) => Array.isArray(e.options) && e.options.length > 0 || e.type === "option" || e.type === "select" ? /* @__PURE__ */ d("select", {
|
|
2500
|
+
name: `f_${e.name}`,
|
|
2501
|
+
defaultValue: o[e.name] ?? "",
|
|
2496
2502
|
style: s,
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
return /* @__PURE__ */ u("option", {
|
|
2508
|
-
value: t.value,
|
|
2509
|
-
children: t.label
|
|
2510
|
-
}, t.value);
|
|
2511
|
-
})]
|
|
2512
|
-
}) : e.type === "switch" ? /* @__PURE__ */ d("select", {
|
|
2513
|
-
name: `f_${e.name}`,
|
|
2514
|
-
defaultValue: o[e.name] ?? "",
|
|
2515
|
-
style: J,
|
|
2516
|
-
...Y(i),
|
|
2517
|
-
children: [
|
|
2518
|
-
/* @__PURE__ */ u("option", {
|
|
2519
|
-
value: "",
|
|
2520
|
-
children: "—"
|
|
2521
|
-
}),
|
|
2522
|
-
/* @__PURE__ */ u("option", {
|
|
2523
|
-
value: "true",
|
|
2524
|
-
children: "Yes"
|
|
2525
|
-
}),
|
|
2526
|
-
/* @__PURE__ */ u("option", {
|
|
2527
|
-
value: "false",
|
|
2528
|
-
children: "No"
|
|
2529
|
-
})
|
|
2530
|
-
]
|
|
2531
|
-
}) : /* @__PURE__ */ u("input", {
|
|
2532
|
-
type: "text",
|
|
2533
|
-
name: `f_${e.name}`,
|
|
2534
|
-
defaultValue: o[e.name] ?? "",
|
|
2535
|
-
placeholder: e.label || e.name,
|
|
2536
|
-
style: J,
|
|
2537
|
-
...Y(i)
|
|
2503
|
+
...Y(i),
|
|
2504
|
+
children: [/* @__PURE__ */ u("option", {
|
|
2505
|
+
value: "",
|
|
2506
|
+
children: e.label || e.name
|
|
2507
|
+
}), (Array.isArray(e.options) ? e.options : []).map((e) => {
|
|
2508
|
+
let t = c(e);
|
|
2509
|
+
return /* @__PURE__ */ u("option", {
|
|
2510
|
+
value: t.value,
|
|
2511
|
+
children: t.label
|
|
2512
|
+
}, t.value);
|
|
2538
2513
|
})]
|
|
2514
|
+
}, e.name) : e.type === "switch" ? /* @__PURE__ */ d("select", {
|
|
2515
|
+
name: `f_${e.name}`,
|
|
2516
|
+
defaultValue: o[e.name] ?? "",
|
|
2517
|
+
style: s,
|
|
2518
|
+
...Y(i),
|
|
2519
|
+
children: [
|
|
2520
|
+
/* @__PURE__ */ u("option", {
|
|
2521
|
+
value: "",
|
|
2522
|
+
children: e.label || e.name
|
|
2523
|
+
}),
|
|
2524
|
+
/* @__PURE__ */ u("option", {
|
|
2525
|
+
value: "true",
|
|
2526
|
+
children: "Yes"
|
|
2527
|
+
}),
|
|
2528
|
+
/* @__PURE__ */ u("option", {
|
|
2529
|
+
value: "false",
|
|
2530
|
+
children: "No"
|
|
2531
|
+
})
|
|
2532
|
+
]
|
|
2533
|
+
}, e.name) : /* @__PURE__ */ u("input", {
|
|
2534
|
+
type: "text",
|
|
2535
|
+
name: `f_${e.name}`,
|
|
2536
|
+
defaultValue: o[e.name] ?? "",
|
|
2537
|
+
placeholder: e.label || e.name,
|
|
2538
|
+
style: s,
|
|
2539
|
+
...Y(i)
|
|
2539
2540
|
}, e.name)), /* @__PURE__ */ u("button", {
|
|
2540
2541
|
type: "submit",
|
|
2541
2542
|
style: {
|
|
2542
|
-
...
|
|
2543
|
-
|
|
2543
|
+
...s,
|
|
2544
|
+
minWidth: 0,
|
|
2545
|
+
padding: "0 18px",
|
|
2546
|
+
border: "none",
|
|
2547
|
+
background: "var(--page-accent, #111827)",
|
|
2548
|
+
color: "var(--page-accent-text, #ffffff)",
|
|
2549
|
+
fontWeight: 600,
|
|
2550
|
+
cursor: i ? "default" : "pointer"
|
|
2544
2551
|
},
|
|
2545
2552
|
...Y(i),
|
|
2546
2553
|
children: t
|
package/build/webim-embed.js
CHANGED
|
@@ -10,6 +10,6 @@ Error generating stack: `+e.message+`
|
|
|
10
10
|
`)}var S=[{key:`tablet`,max:991},{key:`mobileLandscape`,max:767},{key:`mobile`,max:478}],C=e=>Object.entries(m(e)).map(([e,t])=>`${y(e)}: ${t} !important;`).join(` `);function w(e,t){return S.map(({key:n,max:r})=>{let i=t?.[n]?C(t[n]):``;return i?`@media (max-width: ${r}px) { [data-wb="${e}"] { ${i} } }`:``}).filter(Boolean).join(`
|
|
11
11
|
`)}function T(e,t){let n=[],r=e=>{for(let[t,r]of Object.entries(e||{})){let e=w(t,r.props);e&&n.push(e)}};r(e);for(let e of Object.values(t||{}))r(e.template?.nodes);return n.join(`
|
|
12
12
|
`)}function E(e,t){let n=[],r=e=>{for(let[t,r]of Object.entries(e||{})){let e=x(t,r.props);e&&n.push(e)}};r(e);for(let e of Object.values(t||{}))r(e.template?.nodes);return n.join(`
|
|
13
|
-
`)}var D=`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`,O={light:{background:`#ffffff`,text:`#111827`,accent:`#111827`,accentText:`#ffffff`,primary:{light:`#4b5563`,main:`#111827`,dark:`#030712`,contrastText:`#ffffff`},secondary:{light:`#a5b4fc`,main:`#6366f1`,dark:`#4338ca`,contrastText:`#ffffff`}},dark:{background:`#0f172a`,text:`#e2e8f0`,accent:`#6366f1`,accentText:`#ffffff`,primary:{light:`#a5b4fc`,main:`#6366f1`,dark:`#4338ca`,contrastText:`#ffffff`},secondary:{light:`#5eead4`,main:`#14b8a6`,dark:`#0f766e`,contrastText:`#052e2b`}}},ee={font:`system`,headingFont:`inherit`,light:O.light,dark:O.dark},te={system:{label:`System`,value:D},inter:{label:`Inter`,value:`"Inter", ${D}`},outfit:{label:`Outfit`,value:`"Outfit", ${D}`},serif:{label:`Serif`,value:`Georgia, "Times New Roman", serif`},mono:{label:`Mono`,value:`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`}},ne=(e,t)=>te[e]?.value??t,re=(e,...t)=>{let n=Object.assign({},e,...t);return n.primary={...e.primary,...t.reduce((e,t)=>({...e,...t?.primary}),{})},n.secondary={...e.secondary,...t.reduce((e,t)=>({...e,...t?.secondary}),{})},n};function ie(e){let{light:t,dark:n,font:r,headingFont:i,...a}=e??{};return{font:r??ee.font,headingFont:i??ee.headingFont,light:re(O.light,a,t),dark:re(O.dark,n)}}function ae(e){return{"--page-bg":e.background,"--page-text":e.text,"--page-accent":e.accent,"--page-accent-text":e.accentText,"--page-primary-light":e.primary.light,"--page-primary":e.primary.main,"--page-primary-dark":e.primary.dark,"--page-primary-contrast":e.primary.contrastText,"--page-secondary-light":e.secondary.light,"--page-secondary":e.secondary.main,"--page-secondary-dark":e.secondary.dark,"--page-secondary-contrast":e.secondary.contrastText}}function oe(e){let t=ie(e);return{backgroundColor:`var(--page-bg)`,color:`var(--page-text)`,fontFamily:ne(t.font,D),"--page-heading-font":t.headingFont===`inherit`?`inherit`:ne(t.headingFont,`inherit`)}}function k(e,t=`light`){let n=ie(e);return{...oe(e),...ae(n[t]??n.light)}}function A(e,t){return e?.themeRef&&t?.[e.themeRef]||e?.theme}function se({page:e,settings:t,tenant:n,apiUrl:r,locale:i}){let a={...t?.global??{},...t?.tenant??{}},o=e.meta??{};return{schema:1,title:e.title,slug:e.slug,blocks:i&&o.i18n?.[i]?.blocks||e.blocks,theme:A(o,a.builder_themes?.themes),components:a.builder_components?.components??{},custom:o.custom,seo:o.seo,direction:o.direction,locale:i||a.locales?.default,locales:a.locales,tenant:n??``,apiUrl:r??``,settings:a}}var ce=async e=>{let t=await e.json().catch(()=>null);if(!e.ok||t?.success===!1)throw Error(t?.error?.message||`Request failed (${e.status})`);return t?.payload??t};async function le({apiUrl:e,tenant:t,slug:n,locale:r,preview:i,token:a,page:o,fetch:s}){if(!e)throw Error(`fetchPage: apiUrl is required`);if(!n)throw Error(`fetchPage: slug is required`);let c=s??fetch,l=e.replace(/\/$/,``),u={...t?{"x-tenant":t}:{},...a?{authorization:`Bearer ${a}`}:{}},[d,f]=await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i?`?preview=${encodeURIComponent(i)}`:``}`,{headers:u}).then(ce),c(`${l}/settings/public`,{headers:u}).then(ce)]),p=se({page:d,settings:f,tenant:t,apiUrl:l,locale:r}),m=[...new Set(Object.values(p.blocks??{}).map(e=>e?.type?.resolvedName===`CollectionList`?e.props?.collection:e?.type?.resolvedName===`TableBlock`||e?.type?.resolvedName===`OrgChartBlock`?e.props?.source:null).filter(Boolean))];if(m.length){let e=e=>e.startsWith(`api:`)?`${l}/data/${encodeURIComponent(e.slice(4))}`:`${l}/dynamic/${encodeURIComponent(e)}?all=1${r?`&locale=${encodeURIComponent(r)}`:``}`,t=await Promise.all(m.map(t=>c(e(t),{headers:u}).then(ce).then(e=>{let n=Array.isArray(e)?e:Array.isArray(e?.data)?e.data:[],r=Number(e?.total?.filtered??e?.total?.all??n.length);return[[t,n],[`${t}:total`,Number.isFinite(r)?r:n.length]]}).catch(()=>[[t,[]]])));p.datasets=Object.fromEntries(t.flat())}let h=Number(o);return Number.isFinite(h)&&h>=1&&(p.datasets={...p.datasets??{},__page:Math.floor(h)}),p}new Map([{family:`Bebas Neue`,fallback:`sans-serif`},{family:`Crimson Text`,fallback:`serif`},{family:`DM Sans`,fallback:`sans-serif`},{family:`Fira Sans`,fallback:`sans-serif`},{family:`Inter`,fallback:`sans-serif`},{family:`JetBrains Mono`,fallback:`monospace`},{family:`Josefin Sans`,fallback:`sans-serif`},{family:`Karla`,fallback:`sans-serif`},{family:`Lato`,fallback:`sans-serif`},{family:`Lora`,fallback:`serif`},{family:`Manrope`,fallback:`sans-serif`},{family:`Merriweather`,fallback:`serif`},{family:`Montserrat`,fallback:`sans-serif`},{family:`Nunito`,fallback:`sans-serif`},{family:`Open Sans`,fallback:`sans-serif`},{family:`Oswald`,fallback:`sans-serif`},{family:`Outfit`,fallback:`sans-serif`},{family:`Playfair Display`,fallback:`serif`},{family:`Poppins`,fallback:`sans-serif`},{family:`Quicksand`,fallback:`sans-serif`},{family:`Raleway`,fallback:`sans-serif`},{family:`Roboto`,fallback:`sans-serif`},{family:`Rubik`,fallback:`sans-serif`},{family:`Source Sans 3`,fallback:`sans-serif`},{family:`Space Grotesk`,fallback:`sans-serif`},{family:`Work Sans`,fallback:`sans-serif`}].map(e=>[e.family,e]));function ue(e){return e.length?`https://fonts.googleapis.com/css2?${e.map(e=>`family=${e.replace(/ /g,`+`)}:wght@100..900`).join(`&`)}&display=swap`:null}var j=e=>ue([e]),M=e=>{let t=typeof e==`string`&&e.match(/^"([^"]+)"/);return t?t[1]:null};function de(e,t){let n=new Set,r=e=>{for(let t of Object.values(e||{}))for(let e of[`style`,`hover`,`pressed`,`focused`]){let r=M(t.props?.[e]?.fontFamily);r&&n.add(r)}};r(e);for(let e of Object.values(t||{}))r(e.template?.nodes);return[...n].sort()}var fe=new Set([`ar`,`he`,`fa`,`ur`,`ps`,`sd`,`ug`,`yi`,`dv`,`ckb`]),pe=e=>fe.has(String(e||``).toLowerCase().split(/[-_]/)[0])?`rtl`:`ltr`,me=(e,t)=>e===`ltr`||e===`rtl`?e:t?pe(t):void 0,he=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),N=e(((e,t)=>{t.exports=he()}))(),ge=(0,l.createContext)({tenant:``,apiUrl:`/api`,locale:``,settings:null}),_e=(0,l.createContext)(null),ve=e=>{let t=Number(e?.__page);if(Number.isFinite(t)&&t>=1)return Math.floor(t);if(typeof window>`u`)return 1;let n=Number(new URLSearchParams(window.location.search).get(`page`));return Number.isFinite(n)&&n>=1?Math.floor(n):1},ye=()=>{if(typeof window>`u`)return{};let e={};return new URLSearchParams(window.location.search).forEach((t,n)=>{n.startsWith(`f_`)&&n.length>2&&t!==``&&(e[n.slice(2)]=t)}),e},be=e=>{let t={...e&&typeof e==`object`&&!Array.isArray(e)?e:{},...ye()};return Object.fromEntries(Object.entries(t).filter(([,e])=>typeof e==`string`&&e.trim()!==``))},xe=(0,l.createContext)(null),Se=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function Ce(e,t){if(t)return t.includes(`.`)?t.split(`.`).reduce((e,t)=>e&&typeof e==`object`?e[t]:void 0,e):e?.[t]}var we=e=>{let t=[];for(let[n,r]of Object.entries(e??{})){if(!/^[\w-]+$/.test(n))continue;t.push(n);let e=Array.isArray(r)?r[0]:r,i=Array.isArray(r)?`${n}.0`:n;if(e&&typeof e==`object`&&!Array.isArray(e))for(let n of Object.keys(e))/^[\w-]+$/.test(n)&&t.push(`${i}.${n}`)}return t};function Te(e){return e==null?``:typeof e==`string`||typeof e==`number`||typeof e==`boolean`?String(e):typeof e==`object`&&!Array.isArray(e)&&(`label`in e||`name`in e||`slug`in e)?String(e.label??e.name??e.slug??``):typeof e==`object`&&!Array.isArray(e)&&Number.isFinite(Number(e.lat))&&Number.isFinite(Number(e.lng))?`${e.lat}, ${e.lng}`:Array.isArray(e)?e.map(e=>typeof e==`string`?e:Array.isArray(e?.parts)?e.parts.map(e=>e?.text??``).join(``):Array.isArray(e?.items)?e.items.map(e=>e?.text??``).join(` `):e&&(e.label!=null||e.name!=null||e.slug!=null)?String(e.label??e.name??e.slug):``).filter(Boolean).join(` `):``}function Ee(e,t){let n=t?.data??{},r=we(n);if(!r.length)return e;let i=RegExp(`:(${r.map(Se).sort((e,t)=>t.length-e.length).join(`|`)})`,`g`),a=e=>typeof e==`string`?e.replace(i,(e,t)=>Te(Ce(n,t))):Array.isArray(e)?e.map(a):e&&typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,a(t)])):e;return a(e)}var De={margin:0,fontWeight:700,lineHeight:1.2,fontFamily:`var(--page-heading-font, inherit)`},Oe={margin:0},ke={display:`inline-block`,textDecoration:`none`,cursor:`pointer`,backgroundColor:`var(--page-accent, #111827)`,color:`var(--page-accent-text, #ffffff)`},Ae={flexGrow:1,display:`flex`,flexDirection:`column`,position:`relative`},je={display:`flex`,flexDirection:`column`};function Me({style:e}){let t=e?.backgroundVideo;if(!t)return null;let n={position:`absolute`,inset:0,width:`100%`,height:`100%`,zIndex:-1,pointerEvents:`none`},r=e?.overlayColor?`color-mix(in srgb, ${e.overlayColor} ${e.overlayOpacity??50}%, transparent)`:null;return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`video`,{src:t,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{...n,objectFit:`cover`}}),r&&(0,N.jsx)(`div`,{style:{...n,background:r}})]})}var Ne=(e,t)=>e?.backgroundVideo?{position:`relative`,...t,...m(e)}:{...t,...m(e)};function Pe({style:e,nodeRef:t,children:n}){return(0,N.jsxs)(`div`,{ref:t,style:{...Ae,...m(e)},children:[(0,N.jsx)(Me,{style:e}),n]})}function Fe({style:e,nodeRef:t,children:n}){return(0,N.jsxs)(`section`,{ref:t,style:Ne(e,je),children:[(0,N.jsx)(Me,{style:e}),n]})}function Ie({style:e,freeLayout:t,nodeRef:n,children:r}){let i=t?{position:`relative`,minHeight:240}:null;return(0,N.jsxs)(`div`,{ref:n,style:i?{...i,...Ne(e)}:Ne(e),children:[(0,N.jsx)(Me,{style:e}),r]})}function Le({text:e,parts:t,tag:n=`h2`,style:r,linked:i,nodeRef:a}){return(0,N.jsx)(n,{ref:a,style:{...De,...m(r)},children:P(t,e,i)})}var Re={fontFamily:te.mono.value,background:`rgba(148, 163, 184, 0.18)`,padding:`1px 5px`,borderRadius:4,fontSize:`0.9em`};function ze(e,t=[],n,r){let i=e;return t.includes(`sup`)?i=(0,N.jsx)(`sup`,{children:i}):t.includes(`sub`)&&(i=(0,N.jsx)(`sub`,{children:i})),t.includes(`code`)&&(i=(0,N.jsx)(`code`,{style:Re,children:i})),t.includes(`strike`)&&(i=(0,N.jsx)(`s`,{children:i})),t.includes(`underline`)&&(i=(0,N.jsx)(`u`,{children:i})),t.includes(`italic`)&&(i=(0,N.jsx)(`em`,{children:i})),t.includes(`bold`)&&(i=(0,N.jsx)(`strong`,{children:i})),n&&(i=(0,N.jsx)(`a`,{href:n,target:r||void 0,rel:r===`_blank`?`noopener noreferrer`:void 0,style:{color:`inherit`},children:i})),i}function P(e,t,n){return e?.length?e.map((e,t)=>{if(e.slot)return(0,N.jsx)(l.Fragment,{children:n?.[e.slot]??null},t);if(e.parts)return(0,N.jsx)(l.Fragment,{children:P(e.parts,``,n)},t);let r=e.text;return e.sup?r=(0,N.jsx)(`sup`,{children:r}):e.sub&&(r=(0,N.jsx)(`sub`,{children:r})),e.code&&(r=(0,N.jsx)(`code`,{style:Re,children:r})),e.strike&&(r=(0,N.jsx)(`s`,{children:r})),e.underline&&(r=(0,N.jsx)(`u`,{children:r})),e.italic&&(r=(0,N.jsx)(`em`,{children:r})),e.bold&&(r=(0,N.jsx)(`strong`,{children:r})),(e.color||e.background)&&(r=(0,N.jsx)(`span`,{style:{...e.color&&{color:e.color},...e.background&&{backgroundColor:e.background}},children:r})),e.href&&(r=(0,N.jsx)(`a`,{href:e.href,target:e.target||void 0,rel:e.target===`_blank`?`noopener noreferrer`:void 0,style:{color:e.color??`inherit`},children:r})),(0,N.jsx)(l.Fragment,{children:r},t)}):t}function Be({parts:e,text:t,marks:n,href:r,target:i,style:a}){return(0,N.jsx)(`span`,{style:m(a),children:e?.length?P(e,t):ze(t,n,r,i)})}var Ve={h1:40,h2:32,h3:26,h4:22,h5:19,h6:16};function He({align:e=`center`,width:t,wrap:n}={}){let r=t?`${t}%`:void 0;if(e===`full`)return{width:`100%`};let i=e===`left`||e===`right`;return i&&(n??!0)?{float:e,width:r??`50%`,maxWidth:`100%`,marginTop:`4px`,marginBottom:`12px`,...e===`left`?{marginRight:`20px`,marginLeft:0}:{marginLeft:`20px`,marginRight:0}}:i?{width:r??`fit-content`,maxWidth:`100%`,...e===`left`?{marginLeft:0,marginRight:`auto`}:{marginLeft:`auto`,marginRight:0}}:{width:r??`fit-content`,maxWidth:`100%`,marginLeft:`auto`,marginRight:`auto`}}function Ue(e=[],t,n){let r=n??((e,n)=>P(e,n,t));return e.map((t,n)=>{let i={marginTop:0,marginBottom:n===e.length-1?0:14};if(t.type===`image`){if(!t.src)return null;let e=(0,N.jsx)(`img`,{src:t.src,alt:t.alt||``,style:{width:`100%`,display:`block`,borderRadius:6}});return(0,N.jsxs)(`figure`,{style:{marginLeft:0,marginRight:0,...i,...He(t)},children:[t.href?(0,N.jsx)(`a`,{href:t.href,target:t.target||void 0,rel:t.target===`_blank`?`noopener noreferrer`:void 0,style:{display:`block`},children:e}):e,t.caption&&(0,N.jsx)(`figcaption`,{style:{fontSize:13,opacity:.65,marginTop:6,textAlign:`center`},children:t.caption})]},n)}if(t.type===`video`)return et(t.url)?(0,N.jsx)(`div`,{style:{...i,...He({align:t.align,wrap:t.wrap,width:t.width??100})},children:(0,N.jsx)(tt,{url:t.url,autoplay:t.autoplay,muted:t.muted,loop:t.loop,controls:t.controls??!0,start:t.start})},n):null;if(t.type===`divider`)return(0,N.jsx)(`hr`,{style:{...i,border:0,borderTop:`1px solid rgba(148, 163, 184, 0.4)`}},n);if(t.type===`table`){let e=Array.isArray(t.rows)?t.rows.filter(Array.isArray):[];if(!e.length)return null;let r=t.header!==!1,a={border:t.borders===!1?void 0:`1px solid rgba(148, 163, 184, 0.4)`,padding:`6px 10px`,textAlign:`left`,verticalAlign:`top`},o=r?e.slice(1):e,s=Array.isArray(t.widths)?t.widths:null;return(0,N.jsxs)(`table`,{style:{...i,borderCollapse:`collapse`,width:`100%`,fontSize:`inherit`,tableLayout:s?`fixed`:void 0},children:[s&&(0,N.jsx)(`colgroup`,{children:s.map((e,t)=>(0,N.jsx)(`col`,{style:{width:`${e}%`}},t))}),r&&(0,N.jsx)(`thead`,{children:(0,N.jsx)(`tr`,{children:e[0].map((e,t)=>(0,N.jsx)(`th`,{style:{...a,fontWeight:700},children:e},t))})}),(0,N.jsx)(`tbody`,{children:o.map((e,t)=>(0,N.jsx)(`tr`,{children:e.map((e,t)=>(0,N.jsx)(`td`,{style:a,children:e},t))},t))})]},n)}if(t.type===`ul`||t.type===`ol`){let e=t.type;return(0,N.jsx)(e,{style:{...i,paddingLeft:24},children:(t.items??[]).map((e,t)=>(0,N.jsx)(`li`,{style:{marginBottom:4},children:r(e.parts,e.text)},t))},n)}if(t.type===`quote`)return(0,N.jsx)(`blockquote`,{style:{...Ge,...i},children:r(t.parts,t.text)},n);if(Ve[t.type]){let e=t.type;return(0,N.jsx)(e,{style:{...De,fontSize:Ve[t.type],...i},children:r(t.parts,t.text)},n)}return(0,N.jsx)(`p`,{style:{...Oe,...i},children:r(t.parts,t.text)},n)})}function We({content:e,style:t,linked:n,nodeRef:r}){return(0,N.jsx)(`div`,{ref:r,style:{display:`flow-root`,...m(t)},children:Ue(e,n)})}var Ge={margin:0,padding:`8px 0 8px 20px`,borderLeft:`4px solid var(--page-accent, rgba(148, 163, 184, 0.6))`};function Ke({text:e,parts:t,style:n,linked:r,nodeRef:i}){return(0,N.jsx)(`blockquote`,{ref:i,style:{...Ge,...m(n)},children:P(t,e,r)})}function qe({ordered:e,items:t=[],style:n,nodeRef:r}){return(0,N.jsx)(e?`ol`:`ul`,{ref:r,style:{margin:0,paddingLeft:24,...m(n)},children:t.map((e,t)=>(0,N.jsx)(`li`,{style:{marginBottom:4},children:P(e.parts,e.text)},t))})}function Je({text:e,parts:t,style:n,linked:r,nodeRef:i}){return(0,N.jsx)(`p`,{ref:i,style:{...Oe,...m(n)},children:P(t,e,r)})}var Ye={color:`var(--page-accent, inherit)`,textDecoration:`underline`,textUnderlineOffset:3,cursor:`pointer`};function Xe({text:e,parts:t,href:n,target:r,style:i,linked:a,nodeRef:o}){return(0,N.jsx)(`a`,{ref:o,href:n||`#`,target:r||void 0,rel:r===`_blank`?`noopener noreferrer`:void 0,style:{...Ye,...m(i)},children:P(t,e,a)})}function Ze({text:e,parts:t,href:n,target:r,style:i,linked:a,nodeRef:o}){return(0,N.jsx)(`a`,{ref:o,href:n||`#`,target:r||void 0,rel:r===`_blank`?`noopener noreferrer`:void 0,style:{...ke,...m(i)},children:P(t,e,a)})}function Qe({src:e,alt:t,style:n,nodeRef:r}){return e?(0,N.jsx)(`img`,{ref:r,src:e,alt:t||``,style:{display:`block`,maxWidth:`100%`,...m(n)}}):null}function $e({src:e,poster:t,controls:n=!0,autoplay:r=!1,loop:i=!1,muted:a=!1,style:o,nodeRef:s}){return e?(0,N.jsx)(`video`,{ref:s,src:e,poster:t||void 0,controls:n,autoPlay:r,muted:a||r,loop:i,playsInline:!0,style:{display:`block`,width:`100%`,maxWidth:`100%`,...m(o)}}):null}var et=(e=``)=>(e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/)||e.match(/^([\w-]{11})$/))?.[1];function tt({url:e,autoplay:t=!1,muted:n=!1,loop:r=!1,controls:i=!0,start:a,style:o,nodeRef:s}){let c=et(e);if(!c)return null;let l=new URLSearchParams({rel:`0`});return t&&l.set(`autoplay`,`1`),(n||t)&&l.set(`mute`,`1`),i||l.set(`controls`,`0`),r&&(l.set(`loop`,`1`),l.set(`playlist`,c)),Number(a)>0&&l.set(`start`,String(Math.floor(Number(a)))),(0,N.jsx)(`div`,{ref:s,style:{position:`relative`,width:`100%`,paddingTop:`56.25%`,...m(o)},children:(0,N.jsx)(`iframe`,{src:`https://www.youtube-nocookie.com/embed/${c}?${l}`,title:`YouTube video`,allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share`,allowFullScreen:!0,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,border:0}})})}function nt({src:e,title:t,allowFullscreen:n=!0,style:r,nodeRef:i}){return e?(0,N.jsx)(`iframe`,{ref:i,src:e,title:t||`Embedded frame`,loading:`lazy`,allowFullScreen:n,style:{display:`block`,width:`100%`,height:300,border:0,...m(r)}}):null}function rt({code:e,runScripts:t=!0,style:n,nodeRef:r}){let[i,a]=(0,l.useState)(null);return(0,l.useEffect)(()=>{i&&(i.innerHTML=e||``,t&&i.querySelectorAll(`script`).forEach(e=>{let t=document.createElement(`script`);for(let{name:n,value:r}of e.attributes)t.setAttribute(n,r);t.text=e.textContent,e.replaceWith(t)}))},[i,e,t]),(0,N.jsx)(`div`,{ref:e=>{a(e),r&&r(e)},style:m(n)})}function it({height:e,nodeRef:t}){return(0,N.jsx)(`div`,{ref:t,style:{height:e||32,flexShrink:0,alignSelf:`stretch`}})}function at({style:e,nodeRef:t}){return(0,N.jsx)(`div`,{ref:t,style:{height:1,alignSelf:`stretch`,flexShrink:0,...m(e)}})}var ot={position:`absolute`,top:`50%`,transform:`translateY(-50%)`,width:36,height:36,borderRadius:`50%`,border:0,cursor:`pointer`,background:`rgba(17, 24, 39, 0.45)`,color:`#fff`,fontSize:20,lineHeight:1,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:0},st={bottom:{inset:`auto 0 0 0`,padding:`40px 24px 20px`,background:`linear-gradient(transparent, rgba(0, 0, 0, 0.55))`},top:{inset:`0 0 auto 0`,padding:`20px 24px 40px`,background:`linear-gradient(rgba(0, 0, 0, 0.55), transparent)`},middle:{inset:0,display:`flex`,flexDirection:`column`,justifyContent:`center`,padding:24,textShadow:`0 2px 12px rgba(0, 0, 0, 0.6)`}},ct=48;function lt({count:e,renderSlide:t,autoplay:n=!0,interval:r=5,height:i=320,swipe:a=!0,style:o,nodeRef:s}){let[c,u]=(0,l.useState)(0),[d,f]=(0,l.useState)(!1),[p,h]=(0,l.useState)(null),g=e?Math.min(c,e-1):0;if((0,l.useEffect)(()=>{if(!n||d||p||e<2)return;let t=setInterval(()=>u(t=>(t+1)%e),Math.max(2,Number(r)||5)*1e3);return()=>clearInterval(t)},[n,d,p,r,e]),!e)return null;let _=t=>u((t+e)%e),v=()=>{if(!p)return;let{dx:e}=p;h(null),e<-48?_(g+1):e>ct&&_(g-1)};return(0,N.jsxs)(`div`,{ref:s,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),onPointerDown:a&&e>1?e=>{e.pointerType===`mouse`&&e.button!==0||e.target.closest(`button`)||(e.currentTarget.setPointerCapture(e.pointerId),h({startX:e.clientX,dx:0}))}:void 0,onPointerMove:p?e=>h(t=>t&&{...t,dx:e.clientX-t.startX}):void 0,onPointerUp:v,onPointerCancel:v,style:{position:`relative`,overflow:`hidden`,width:`100%`,touchAction:`pan-y`,userSelect:p?`none`:void 0,cursor:p?`grabbing`:void 0,...m(o)},children:[(0,N.jsx)(`div`,{style:{display:`flex`,height:i,transform:`translateX(calc(${-g*100}% + ${p?.dx??0}px))`,transition:p?`none`:`transform 450ms ease`},children:Array.from({length:e},(e,n)=>(0,N.jsx)(`div`,{style:{position:`relative`,width:`100%`,flexShrink:0,overflow:`hidden`},children:t(n)},n))}),e>1&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`button`,{type:`button`,"aria-label":`Previous slide`,style:{...ot,left:12},onClick:()=>_(g-1),children:`‹`}),(0,N.jsx)(`button`,{type:`button`,"aria-label":`Next slide`,style:{...ot,right:12},onClick:()=>_(g+1),children:`›`}),(0,N.jsx)(`div`,{style:{position:`absolute`,bottom:10,left:0,right:0,display:`flex`,justifyContent:`center`,gap:6},children:Array.from({length:e},(e,t)=>(0,N.jsx)(`button`,{type:`button`,"aria-label":`Go to slide ${t+1}`,onClick:()=>_(t),style:{width:8,height:8,borderRadius:`50%`,border:0,padding:0,cursor:`pointer`,background:t===g?`#ffffff`:`rgba(255, 255, 255, 0.45)`}},t))})]})]})}var ut=(e,t)=>({position:`absolute`,inset:0,backgroundImage:e?`url(${e})`:`none`,backgroundColor:t||(e?void 0:`rgba(148, 163, 184, 0.25)`),backgroundSize:`cover`,backgroundPosition:`center`});function dt({slides:e=[],captionPosition:t=`bottom`,captionAlign:n=`left`,...r}){return e.length?(0,N.jsx)(lt,{...r,count:e.length,renderSlide:r=>{let i=e[r];return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`div`,{style:ut(i.image)}),(i.title||i.text)&&(0,N.jsxs)(`div`,{style:{position:`absolute`,color:`#fff`,textAlign:n,...st[t]??st.bottom},children:[i.title&&(0,N.jsx)(`div`,{style:{fontSize:22,fontWeight:700},children:i.title}),i.text&&(0,N.jsx)(`div`,{style:{fontSize:14,opacity:.9,marginTop:4},children:i.text})]})]})}}):null}function ft({slides:e=[],linked:t,...n}){return e.length?(0,N.jsx)(lt,{...n,count:e.length,renderSlide:n=>{let r=e[n];return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`div`,{style:ut(r.image,r.color)}),(0,N.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,flexDirection:`column`},children:t?.[r.key]??null})]})}}):null}function pt({images:e=[],columns:t=3,gap:n=8,showNames:r=!1,lightbox:i=!0,style:a,nodeRef:o,inert:s}){let c=Array.isArray(e)?e.filter(e=>e&&typeof e==`object`&&e.src):[],u=Math.max(0,Number(n)||0),d=s?e=>e.preventDefault():void 0,[f,p]=(0,l.useState)(null),h=i&&!s&&f!==null&&c[f];(0,l.useEffect)(()=>{if(!h)return;let e=e=>{e.key===`Escape`&&p(null),e.key===`ArrowRight`&&p(e=>(e+1)%c.length),e.key===`ArrowLeft`&&p(e=>(e-1+c.length)%c.length)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h,c.length]);let g=e=>{if(typeof e.name==`string`&&e.name.trim())return e.name;if(typeof e.alt==`string`&&e.alt.trim())return e.alt;try{let t=String(e.src).split(`?`)[0].split(`/`).pop();return decodeURIComponent(t??``)}catch{return``}};return(0,N.jsxs)(`div`,{ref:o,style:{columnCount:Math.min(Math.max(Number(t)||3,1),8),columnGap:u,width:`100%`,...m(a)},children:[c.map((e,t)=>{let n=(0,N.jsxs)(`span`,{style:{position:`relative`,display:`block`,borderRadius:`inherit`,overflow:`hidden`},children:[(0,N.jsx)(`img`,{src:e.src,alt:e.alt??``,style:{width:`100%`,display:`block`,borderRadius:`inherit`}}),r&&g(e)&&(0,N.jsx)(`span`,{style:{position:`absolute`,insetInline:0,bottom:0,padding:`14px 10px 8px`,background:`linear-gradient(transparent, rgba(0, 0, 0, 0.65))`,color:`#fff`,fontSize:12,lineHeight:1.3,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:g(e)})]}),a=e.href?(0,N.jsx)(`a`,{href:e.href,onClick:d,target:e.target||void 0,rel:e.target===`_blank`?`noopener noreferrer`:void 0,style:{display:`block`,borderRadius:`inherit`},children:n}):i&&!s?(0,N.jsx)(`span`,{role:`button`,tabIndex:0,onClick:()=>p(t),onKeyDown:e=>(e.key===`Enter`||e.key===` `)&&p(t),style:{display:`block`,borderRadius:`inherit`,cursor:`zoom-in`},children:n}):n;return(0,N.jsx)(`div`,{style:{breakInside:`avoid`,marginBottom:u,borderRadius:`inherit`,overflow:`hidden`},children:a},t)}),!c.length&&(0,N.jsx)(`div`,{style:{padding:`24px 12px`,fontSize:13,opacity:.55,textAlign:`center`,columnSpan:`all`},children:`Pick images in Settings to fill the gallery`}),h&&(0,N.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,onClick:()=>p(null),style:{position:`fixed`,inset:0,zIndex:1400,background:`rgba(0, 0, 0, 0.86)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:24},children:[(0,N.jsx)(`img`,{src:c[f].src,alt:c[f].alt??``,onClick:e=>e.stopPropagation(),style:{maxWidth:`92vw`,maxHeight:`84vh`,borderRadius:8,boxShadow:`0 12px 48px rgba(0,0,0,0.5)`}}),g(c[f])&&(0,N.jsx)(`div`,{style:{color:`#fff`,fontSize:14,marginTop:12,opacity:.85},children:g(c[f])}),(0,N.jsx)(`button`,{type:`button`,"aria-label":`Close`,onClick:()=>p(null),style:{position:`absolute`,top:16,right:20,background:`transparent`,border:0,color:`#fff`,fontSize:28,lineHeight:1,cursor:`pointer`},children:`×`}),c.length>1&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`button`,{type:`button`,"aria-label":`Previous`,onClick:e=>{e.stopPropagation(),p(e=>(e-1+c.length)%c.length)},style:{position:`absolute`,left:16,top:`50%`,transform:`translateY(-50%)`,background:`transparent`,border:0,color:`#fff`,fontSize:36,cursor:`pointer`,padding:12},children:`‹`}),(0,N.jsx)(`button`,{type:`button`,"aria-label":`Next`,onClick:e=>{e.stopPropagation(),p(e=>(e+1)%c.length)},style:{position:`absolute`,right:16,top:`50%`,transform:`translateY(-50%)`,background:`transparent`,border:0,color:`#fff`,fontSize:36,cursor:`pointer`,padding:12},children:`›`})]})]})]})}var mt={color:`inherit`,textDecoration:`none`,fontSize:14,opacity:.85},ht={background:`var(--page-bg, #ffffff)`,color:`var(--page-text, #111827)`,border:`1px solid rgba(148, 163, 184, 0.25)`,boxShadow:`0 16px 40px rgba(15, 23, 42, 0.16)`,zIndex:60};function gt({brand:e,logo:t,brandHref:n,brandTarget:r,links:i=[],style:a,nodeRef:o,menu:s=`auto`,breakpoint:c=768}){let[u,d]=(0,l.useState)(null),[f,p]=(0,l.useState)(!1),[h,g]=(0,l.useState)(!1),[_,v]=(0,l.useState)(null);(0,l.useEffect)(()=>{if(!u)return;let e=new ResizeObserver(()=>p(u.offsetWidth<c));return e.observe(u),()=>e.disconnect()},[u,c]);let y=s===`hamburger`||s===`auto`&&f,b=(e,t)=>(0,N.jsxs)(`a`,{href:e.href||`#`,style:{...mt,display:`block`,...t},children:[e.label,e.desc&&(0,N.jsx)(`span`,{style:{display:`block`,fontSize:12,opacity:.6,marginTop:2},children:e.desc})]},e.key);return(0,N.jsxs)(`nav`,{ref:e=>{d(e),o&&o(e)},style:{display:`flex`,alignItems:`center`,gap:24,flexWrap:`wrap`,padding:`14px 24px`,width:`100%`,position:`relative`,...m(a)},children:[(t||e)&&(()=>{let i=(0,N.jsxs)(N.Fragment,{children:[t&&(0,N.jsx)(`img`,{src:t,alt:e||`Logo`,style:{height:28,display:`block`}}),e&&(0,N.jsx)(`span`,{style:{fontWeight:700,fontSize:18,fontFamily:`var(--page-heading-font, inherit)`},children:e})]}),a={display:`flex`,alignItems:`center`,gap:10,color:`inherit`,textDecoration:`none`};return n?(0,N.jsx)(`a`,{href:n,target:r||void 0,rel:r===`_blank`?`noopener noreferrer`:void 0,style:a,children:i}):(0,N.jsx)(`div`,{style:a,children:i})})(),(0,N.jsx)(`div`,{style:{flexGrow:1}}),y?(0,N.jsx)(`button`,{type:`button`,"aria-label":h?`Close menu`:`Open menu`,onClick:()=>g(!h),style:{background:`transparent`,border:0,color:`inherit`,cursor:`pointer`,fontSize:20,lineHeight:1,padding:4},children:h?`✕`:`☰`}):(0,N.jsx)(`div`,{style:{display:`flex`,gap:20,alignItems:`center`,flexWrap:`wrap`},children:i.map(e=>{let t=e.children??[];if(!t.length)return(0,N.jsx)(`a`,{href:e.href||`#`,style:mt,children:e.label},e.key);let n=e.type===`mega`;return(0,N.jsxs)(`span`,{style:{position:n?`static`:`relative`,display:`inline-flex`},onMouseEnter:()=>v(e.key),onMouseLeave:()=>v(null),children:[(0,N.jsxs)(`a`,{href:e.href||`#`,style:{...mt,cursor:`pointer`},children:[e.label,` `,(0,N.jsx)(`span`,{style:{fontSize:9,opacity:.6},children:`▼`})]}),_===e.key&&(n?(0,N.jsx)(`div`,{style:{...ht,position:`absolute`,left:0,right:0,top:`100%`,padding:24,display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(170px, 1fr))`,gap:16},children:t.map(e=>b(e,{padding:`6px 8px`,borderRadius:6}))}):(0,N.jsx)(`div`,{style:{...ht,position:`absolute`,top:`100%`,left:0,minWidth:190,borderRadius:8,padding:8,display:`flex`,flexDirection:`column`},children:t.map(e=>b(e,{padding:`8px 12px`,borderRadius:6}))}))]},e.key)})}),y&&h&&(0,N.jsx)(`div`,{style:{flexBasis:`100%`,width:`100%`,display:`flex`,flexDirection:`column`,paddingTop:10},children:i.map(e=>(0,N.jsxs)(l.Fragment,{children:[(0,N.jsx)(`a`,{href:e.href||`#`,style:{...mt,padding:`10px 4px`,fontWeight:(e.children??[]).length?600:400,opacity:1},children:e.label}),(e.children??[]).map(e=>b(e,{padding:`8px 4px 8px 22px`}))]},e.key))})]})}function _t({tabs:e=[],linked:t,style:n,nodeRef:r}){let[i,a]=(0,l.useState)(0),o=e.length?Math.min(i,e.length-1):0;return e.length?(0,N.jsxs)(`div`,{ref:r,style:{width:`100%`,...m(n)},children:[(0,N.jsx)(`div`,{style:{display:`flex`,gap:4,borderBottom:`1px solid rgba(148, 163, 184, 0.35)`},children:e.map((e,t)=>(0,N.jsx)(`button`,{type:`button`,onClick:()=>a(t),style:{background:`transparent`,border:0,padding:`10px 16px`,fontSize:14,fontFamily:`inherit`,color:`inherit`,cursor:`pointer`,opacity:t===o?1:.6,fontWeight:t===o?600:500,boxShadow:t===o?`inset 0 -2px 0 var(--page-accent, #111827)`:`none`},children:e.label||`Tab ${t+1}`},e.key))}),e.map((e,n)=>(0,N.jsx)(`div`,{style:{display:n===o?`flex`:`none`,flexDirection:`column`},children:t?.[e.key]??null},e.key))]}):null}function vt({items:e=[],linked:t,multiple:n=!1,style:r,nodeRef:i}){let[a,o]=(0,l.useState)(()=>new Set(e.length?[e[0].key]:[]));if(!e.length)return null;let s=e=>o(t=>{let r=new Set(n?t:[]);return t.has(e)?r.delete(e):r.add(e),r});return(0,N.jsx)(`div`,{ref:i,style:{width:`100%`,...m(r)},children:e.map((n,r)=>{let i=a.has(n.key);return(0,N.jsxs)(`div`,{style:{borderBottom:r<e.length-1?`1px solid rgba(148, 163, 184, 0.35)`:`none`},children:[(0,N.jsxs)(`button`,{type:`button`,onClick:()=>s(n.key),style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12,background:`transparent`,border:0,padding:`14px 4px`,fontSize:15,fontWeight:600,fontFamily:`inherit`,color:`inherit`,textAlign:`left`,cursor:`pointer`},children:[n.title||`Item ${r+1}`,(0,N.jsx)(`span`,{"aria-hidden":!0,style:{fontSize:12,opacity:.6,transform:i?`rotate(180deg)`:`none`,transition:`transform 180ms`},children:`▼`})]}),(0,N.jsx)(`div`,{style:{display:i?`flex`:`none`,flexDirection:`column`},children:t?.[n.key]??null})]},n.key)})})}var yt={display:`flex`,flexDirection:`column`,gap:`12px`},bt={fontSize:`14px`,fontWeight:500,color:`var(--page-text, #111827)`},xt={padding:`10px 12px`,border:`1px solid #d1d5db`,borderRadius:`6px`,fontSize:`14px`,fontFamily:`inherit`,width:`100%`,boxSizing:`border-box`,backgroundColor:`#ffffff`,color:`#111827`},St={display:`flex`,alignItems:`center`,gap:`8px`,fontSize:`14px`,color:`var(--page-text, #111827)`},F=e=>e?{readOnly:!0,tabIndex:-1,onMouseDown:e=>e.preventDefault()}:{};function Ct(e,t){if(!e)return!0;let n=t[e.field],r=n==null||n===``?``:String(n),i=e.value??``;switch(e.op){case`eq`:return r===i;case`neq`:return r!==i;case`contains`:return r.toLowerCase().includes(i.toLowerCase());case`gt`:return Number(r)>Number(i);case`lt`:return Number(r)<Number(i);case`empty`:return r===``;case`notEmpty`:return r!==``;default:return!1}}var wt={display:`flex`,flexDirection:`column`,gap:6},Tt={font:`inherit`,fontSize:15,padding:`10px 12px`,borderRadius:8,border:`1px solid rgba(148, 163, 184, 0.55)`,background:`transparent`,color:`inherit`,width:`100%`,boxSizing:`border-box`};function Et(e,t){let n=Array.isArray(e?.options)?e.options:[];if(!e?.parentField)return n;let r=t?.[e.parentField];return r?n.filter(e=>typeof e==`string`?!1:!e.parent||e.parent===r):[]}function Dt({field:e,value:t,onChange:n,inert:r,values:i}){let a=(0,N.jsxs)(`span`,{style:{...bt,fontSize:14},children:[e.label,e.required?` *`:``]}),o={name:e.name,required:e.required||void 0,placeholder:e.placeholder||void 0,disabled:r||void 0,style:Tt,value:t??``,onChange:t=>n(e.name,t.target.value)};return e.type===`display`?(0,N.jsx)(e.variant&&e.variant!==`p`?e.variant:`p`,{style:{margin:0,color:e.color||`inherit`,fontSize:{h1:32,h2:26,h3:21,h4:18,h5:16,h6:14,p:15}[e.variant]??16,fontWeight:e.variant===`p`?400:700,lineHeight:1.35},children:e.label}):e.type===`image`?e.src?(0,N.jsx)(`img`,{src:e.src,alt:e.label??``,style:{width:`100%`,borderRadius:8,display:`block`}}):null:e.type===`video`?e.src?/youtube\.com|youtu\.be|vimeo\.com/i.test(e.src)?(0,N.jsx)(tt,{url:e.src,style:{width:`100%`}}):(0,N.jsx)(`video`,{src:e.src,controls:!0,style:{width:`100%`,borderRadius:8,display:`block`}}):null:(0,N.jsxs)(`label`,{style:wt,children:[a,e.type===`textarea`||e.multiline?(0,N.jsx)(`textarea`,{...o,rows:4,style:{...Tt,resize:`vertical`}}):e.type===`select`?(0,N.jsxs)(`select`,{...o,disabled:o.disabled||!!e.parentField&&!i?.[e.parentField],children:[(0,N.jsx)(`option`,{value:``,children:e.placeholder||`—`}),Et(e,i).map((e,t)=>(0,N.jsx)(`option`,{value:typeof e==`string`?e:e.value,children:typeof e==`string`?e:e.label??e.value},t))]}):e.type===`checkbox`?(0,N.jsx)(`input`,{type:`checkbox`,name:e.name,required:e.required||void 0,disabled:r||void 0,checked:!!t,onChange:t=>n(e.name,t.target.checked),style:{width:18,height:18}}):e.type===`upload`?(0,N.jsx)(`input`,{type:`file`,name:e.name,accept:e.accept||void 0,required:e.required||void 0,disabled:r||void 0,onChange:t=>n(e.name,t.target.files?.[0]?.name??``),style:{font:`inherit`,fontSize:14}}):(0,N.jsx)(`input`,{...o,type:{email:`email`,number:`number`,date:`date`,datetime:`datetime-local`,phone:`tel`,link:`url`}[e.type]??`text`}),e.help&&(0,N.jsx)(`span`,{style:{fontSize:12,opacity:.65},children:e.help})]})}function Ot({style:e,action:t,method:n,name:r,enctype:i,formSlug:a,auto:o,submitLabel:s,nodeRef:c,inert:u,children:d,linked:f,show:p}){let{tenant:h,apiUrl:g}=(0,l.useContext)(ge),[_,v]=(0,l.useState)(`form`),[y,b]=(0,l.useState)(null),[x,S]=(0,l.useState)({}),[C,w]=(0,l.useState)(0),T=u?p||`form`:_;(0,l.useEffect)(()=>{if(!o||!a)return;let e=!0;return fetch(`${g||`/api`}/forms/${encodeURIComponent(a)}`,{headers:h?{"x-tenant":h}:{}}).then(e=>e.json()).then(t=>e&&b(t?.payload&&typeof t.payload==`object`?t.payload:null)).catch(()=>e&&b(null)),()=>{e=!1}},[o,a,h,g]);let E=[{section:null,fields:[]}];for(let e of Array.isArray(y?.fields)?y.fields:[])e.type===`section`?E.push({section:e,fields:[]}):E[E.length-1].fields.push(e);let D=E.filter(e=>e.section||e.fields.length),O=D.filter(e=>!e.section||Ct(e.section.condition,x)).map(e=>({...e,fields:e.fields.filter(e=>Ct(e.condition,x))})),ee=D.length>1,te=Math.min(C,Math.max(0,O.length-1)),ne=ee?O[te]?.fields??[]:O.flatMap(e=>e.fields),re=ne.filter(e=>{let t=x[e.name];return e.required&&(t==null||t===``||t===!1)}),ie=te>=O.length-1,ae=(e,t)=>S(n=>{let r={...n,[e]:t};for(let t of Array.isArray(y?.fields)?y.fields:[])t?.parentField===e&&delete r[t.name];return r});return(0,N.jsxs)(`div`,{ref:c,style:m(e),children:[(0,N.jsx)(`form`,{action:t||void 0,method:n||`post`,name:r||void 0,encType:i||void 0,onSubmit:async e=>{if(e.preventDefault(),!u){if(a){let t={};if(o)for(let[e,n]of Object.entries(x))n!=null&&n!==``&&(t[e]=n);else for(let[n,r]of new FormData(e.currentTarget).entries())typeof r==`string`&&(t[n]=r===`on`||r);try{let e=await fetch(`${g||`/api`}/forms/${a}/submit`,{method:`post`,headers:{"content-type":`application/json`,...h?{"x-tenant":h}:{}},body:JSON.stringify(t)}),n=await e.json().catch(()=>null);v(e.ok&&n?.success!==!1?`success`:`error`)}catch{v(`error`)}return}if(!t){v(`success`);return}try{let r=await fetch(t,{method:n||`post`,body:new FormData(e.currentTarget)});v(r.ok?`success`:`error`)}catch{v(`error`)}}},style:{...yt,display:T===`success`?`none`:`flex`},children:o&&a?(0,N.jsxs)(N.Fragment,{children:[ee&&(0,N.jsx)(Qt,{steps:O.map(e=>({label:e.section?.label??`Start`})),active:te+1,style:{marginBottom:8}}),ee&&O[te]?.section?.help&&(0,N.jsx)(`p`,{style:{margin:0,fontSize:14,opacity:.7},children:O[te].section.help}),ne.map(e=>(0,N.jsx)(Dt,{field:e,value:x[e.name],values:x,onChange:ae,inert:u},e.name)),(0,N.jsxs)(`div`,{style:{display:`flex`,gap:10,alignItems:`center`,marginTop:4},children:[ee&&te>0&&(0,N.jsx)(`button`,{type:`button`,disabled:u||void 0,onClick:()=>w(te-1),style:{...ke,background:`transparent`,color:`inherit`,border:0,padding:`10px 16px`,cursor:`pointer`},children:`Back`}),ee&&!ie?(0,N.jsx)(`button`,{type:`button`,disabled:u||re.length>0,onClick:()=>w(te+1),style:{...ke,border:0,padding:`10px 22px`,borderRadius:8,fontSize:15,fontWeight:600,cursor:`pointer`,opacity:re.length?.5:1},children:`Next`}):(0,N.jsx)(`button`,{type:`submit`,disabled:u||void 0,style:{...ke,border:0,padding:`10px 22px`,borderRadius:8,fontSize:15,fontWeight:600,cursor:`pointer`},children:s||`Submit`})]})]}):d}),(0,N.jsx)(`div`,{style:{display:T===`success`?`block`:`none`},children:f?.success??null}),(0,N.jsx)(`div`,{style:{display:T===`error`?`block`:`none`,marginTop:12},children:f?.error??null})]})}var kt=null,At=null,jt=e=>{let t=typeof e==`string`&&e.trim()?e.trim():``;if(kt&&At===t)return kt;if(kt&&typeof window<`u`){for(let e of[`grecaptcha`,`___grecaptcha_cfg`])try{delete window[e]}catch{window[e]=void 0}document.querySelectorAll(`script[src*="recaptcha"]`).forEach(e=>e.remove())}return At=t,kt=new Promise(e=>{if(typeof window>`u`)return;if(window.grecaptcha?.render)return e(window.grecaptcha);window.__webimRecaptchaReady=()=>e(window.grecaptcha);let n=document.createElement(`script`);n.src=`https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t?`&hl=${encodeURIComponent(t)}`:``}`,n.async=!0,document.head.appendChild(n)}),kt};function Mt({siteKey:e,theme:t,size:n,hl:r,style:i,nodeRef:a,inert:o,onChange:s}){let c=(0,l.useContext)(ge),u=c?.settings&&typeof c.settings==`object`?c.settings[`google.recaptchaKey`]:``,d=typeof e==`string`&&e.trim()||(typeof u==`string`?u.trim():``),f=(0,l.useRef)(null),p=(0,l.useRef)(s);if(p.current=s,(0,l.useEffect)(()=>{if(o||!d||!f.current)return;let e=!0,i=t=>{e&&typeof p.current==`function`&&p.current(t)};return jt(r).then(r=>{if(!(!e||!f.current||!r?.render)){f.current.innerHTML=``,i(``);try{r.render(f.current,{sitekey:d,theme:t===`dark`?`dark`:`light`,size:n===`compact`?`compact`:`normal`,callback:e=>i(typeof e==`string`?e:``),"expired-callback":()=>i(``),"error-callback":()=>i(``)})}catch{}}}),()=>{e=!1}},[o,d,t,n,r]),o){let e=t===`dark`;return(0,N.jsxs)(`div`,{ref:a,style:m(i),children:[(0,N.jsxs)(`div`,{style:{width:n===`compact`?164:302,boxSizing:`border-box`,padding:`12px 14px`,display:`flex`,alignItems:`center`,gap:12,borderRadius:4,border:`1px solid ${e?`#52565b`:`#d3d3d3`}`,background:e?`#222528`:`#f9f9f9`,color:e?`#f1f1f1`:`#282828`,fontSize:14,fontFamily:`Roboto, Arial, sans-serif`},children:[(0,N.jsx)(`span`,{style:{width:24,height:24,flexShrink:0,borderRadius:3,border:`2px solid ${e?`#8a8f94`:`#c1c1c1`}`,background:e?`#2f3337`:`#fff`}}),(0,N.jsx)(`span`,{style:{flexGrow:1},children:`I'm not a robot`}),(0,N.jsx)(`span`,{style:{fontSize:9,opacity:.6,textAlign:`center`,lineHeight:1.3},children:`reCAPTCHA`})]}),!d&&(0,N.jsx)(`div`,{style:{marginTop:6,fontSize:11,color:`#b45309`},children:`Set the google.recaptchaKey tenant setting (or a site key in Settings) to activate it.`})]})}return d?(0,N.jsx)(`div`,{ref:a,style:m(i),children:(0,N.jsx)(`div`,{ref:f})}):null}function Nt({text:e,parts:t,style:n,nodeRef:r,linked:i}){return(0,N.jsx)(`label`,{ref:r,style:{...bt,...m(n)},children:P(t,e,i)})}function Pt({type:e=`text`,name:t,placeholder:n,required:r,style:i,nodeRef:a,inert:o}){return(0,N.jsx)(`input`,{ref:a,type:e,name:t||void 0,placeholder:n,required:!o&&!!r,style:{...xt,...m(i)},...F(o)})}function Ft({name:e,placeholder:t,rows:n=4,required:r,style:i,nodeRef:a,inert:o}){return(0,N.jsx)(`textarea`,{ref:a,name:e||void 0,placeholder:t,rows:n,required:!o&&!!r,style:{...xt,resize:`vertical`,...m(i)},...F(o)})}function It({kind:e=`checkbox`,label:t,name:n,value:r,required:i,style:a,nodeRef:o,inert:s}){return(0,N.jsxs)(`label`,{ref:o,style:{...St,...m(a)},children:[(0,N.jsx)(`input`,{type:e,name:n||void 0,value:r||void 0,required:!s&&!!i,onClick:s?e=>e.preventDefault():void 0,tabIndex:s?-1:void 0,style:{margin:0,accentColor:`var(--page-accent, #111827)`}}),t]})}function Lt({name:e,placeholder:t,options:n=[],required:r,style:i,nodeRef:a,inert:o}){return(0,N.jsxs)(`select`,{ref:a,name:e||void 0,required:!o&&!!r,defaultValue:``,onMouseDown:o?e=>e.preventDefault():void 0,tabIndex:o?-1:void 0,style:{...xt,appearance:`auto`,...m(i)},children:[t!==``&&(0,N.jsx)(`option`,{value:``,disabled:!0,children:t??`Select…`}),n.map((e,t)=>(0,N.jsx)(`option`,{value:e,children:e},t))]})}function Rt({name:e,accept:t,required:n,text:r=`Choose a file…`,style:i,nodeRef:a,inert:o}){let[s,c]=(0,l.useState)(null);return(0,N.jsxs)(`label`,{ref:a,style:{...xt,display:`flex`,alignItems:`center`,gap:`8px`,cursor:o?`default`:`pointer`,borderStyle:`dashed`,color:s?`#111827`:`#6b7280`,...m(i)},children:[(0,N.jsx)(`input`,{type:`file`,name:e||void 0,accept:t||void 0,required:!o&&!!n,disabled:!!o,onChange:e=>c(e.target.files?.[0]?.name??null),style:{display:`none`}}),(0,N.jsx)(`span`,{"aria-hidden":!0,children:`📎`}),s??r]})}function zt({text:e=`Submit`,style:t,nodeRef:n,inert:r}){return(0,N.jsx)(`button`,{ref:n,type:r?`button`:`submit`,style:{...ke,border:0,cursor:`pointer`,alignSelf:`flex-start`,padding:`10px 22px`,borderRadius:8,fontSize:15,fontWeight:600,lineHeight:1.4,fontFamily:`inherit`,...m(t)},children:e})}function Bt({cols:e=2,rows:t=1,style:n,nodeRef:r,linked:i}){let a=Math.max(1,(Number(e)||1)*(Number(t)||1));return(0,N.jsx)(`div`,{ref:r,style:{display:`grid`,gridTemplateColumns:`repeat(${Math.max(1,Number(e)||1)}, minmax(0, 1fr))`,gap:16,width:`100%`,...m(n)},children:Array.from({length:a},(e,t)=>(0,N.jsx)(`div`,{style:{minWidth:0},children:i?.[`cell-${t}`]??null},t))})}function Vt({collection:e,limit:t=6,layout:n=`grid`,columns:r=3,imageField:i,titleField:a=`name`,textField:o,custom:s,templateId:c,paged:u,filters:d,style:f,nodeRef:p}){let{tenant:h,apiUrl:g,locale:_}=(0,l.useContext)(ge),v=(0,l.useContext)(xe),y=(0,l.useContext)(_e),b=be(d),x=JSON.stringify(b),S=x!==`{}`&&!e?.startsWith?.(`api:`),C=S?null:y?.[e],w=u?ve(y):1,[T,E]=(0,l.useState)(null);if((0,l.useEffect)(()=>{if(!e||C)return;let n=!0,r=new URLSearchParams;if(_&&r.set(`locale`,_),S&&r.set(`data_filter`,x),u&&!e.startsWith(`api:`)){let e=Math.max(1,Number(t)||6);r.set(`offset`,String((w-1)*e)),r.set(`limit`,String(e))}let i=r.toString(),a=e.startsWith(`api:`)?`${g}/data/${encodeURIComponent(e.slice(4))}`:`${g}/dynamic/${encodeURIComponent(e)}${i?`?${i}`:``}`;return fetch(a,{headers:h?{"x-tenant":h}:{}}).then(e=>e.json()).then(e=>{let t=Array.isArray(e?.payload)?e.payload:Array.isArray(e?.payload?.data)?e.payload.data:[];return n&&E(t.filter(e=>e&&typeof e==`object`))}).catch(()=>n&&E([])),()=>{n=!1}},[e,h,g,_,C,u,w,t,S,x]),!e)return null;let D=Math.max(1,Number(t)||6),O=u?C||e.startsWith(`api:`)?(C??T??[]).slice((w-1)*D,w*D):(T??[]).slice(0,D):(C??T??[]).slice(0,D),ee=Math.min(Math.max(Number(r)||3,1),6),te=n===`list`?{display:`flex`,flexDirection:`column`,gap:20}:{display:`grid`,gridTemplateColumns:`repeat(${ee}, minmax(0, 1fr))`,gap:24};return s&&c&&v?.render?(0,N.jsx)(`div`,{ref:p,style:{width:`100%`,...te,...m(f)},children:O.map(e=>(0,N.jsx)(`div`,{style:{minWidth:0},children:v.render(c,t=>Ee(t,e))},e.id??e?.data?.slug))}):(0,N.jsx)(`div`,{ref:p,style:{width:`100%`,...te,...m(f)},children:O.map(e=>{let t=i?Ce(e?.data,i):null,r=a?Te(Ce(e?.data,a)):null,s=o?Ce(e?.data,o):null,c=Array.isArray(s)?s:null,l=c||s==null?null:Te(s),u=n===`list`;return(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:u?`row`:`column`,gap:u?20:12,alignItems:u?`center`:`stretch`,minWidth:0},children:[t&&(0,N.jsx)(`img`,{src:t,alt:r??``,style:{width:u?160:`100%`,aspectRatio:`3 / 2`,objectFit:`cover`,borderRadius:10,flexShrink:0,display:`block`}}),(0,N.jsxs)(`div`,{style:{minWidth:0},children:[r&&(0,N.jsx)(`h3`,{style:{margin:0,fontSize:18,fontWeight:700},children:r}),l&&(0,N.jsx)(`p`,{style:{margin:`6px 0 0`,fontSize:14,lineHeight:1.55,opacity:.75},children:l}),c&&(0,N.jsx)(`div`,{style:{marginTop:6,fontSize:14,lineHeight:1.55,opacity:.85},children:Ue(c)})]})]},e.id??e?.data?.slug)})})}function Ht({fields:e=[],buttonLabel:t=`Search`,style:n,nodeRef:r,inert:i}){let a=Array.isArray(e)?e.filter(e=>e&&typeof e==`object`&&typeof e.name==`string`&&e.name):[],o=i?{}:ye(),s={display:`flex`,flexDirection:`column`,gap:4,fontSize:12,fontWeight:600,color:`var(--page-text, #111827)`,minWidth:140,flex:`1 1 140px`},c=e=>{let t=e&&typeof e==`object`?e.value:e,n=e&&typeof e==`object`?e.label??e.value:e;return{value:String(t??``),label:String(n??``)}};return(0,N.jsxs)(`form`,{ref:r,method:`get`,onSubmit:i?e=>e.preventDefault():void 0,style:{display:`flex`,flexWrap:`wrap`,alignItems:`flex-end`,gap:12,width:`100%`,...m(n)},children:[a.map(e=>(0,N.jsxs)(`label`,{style:s,children:[(0,N.jsx)(`span`,{children:e.label||e.name}),e.type===`option`||e.type===`select`?(0,N.jsxs)(`select`,{name:`f_${e.name}`,defaultValue:o[e.name]??``,style:xt,...F(i),children:[(0,N.jsx)(`option`,{value:``,children:`—`}),(Array.isArray(e.options)?e.options:[]).map(e=>{let t=c(e);return(0,N.jsx)(`option`,{value:t.value,children:t.label},t.value)})]}):e.type===`switch`?(0,N.jsxs)(`select`,{name:`f_${e.name}`,defaultValue:o[e.name]??``,style:xt,...F(i),children:[(0,N.jsx)(`option`,{value:``,children:`—`}),(0,N.jsx)(`option`,{value:`true`,children:`Yes`}),(0,N.jsx)(`option`,{value:`false`,children:`No`})]}):(0,N.jsx)(`input`,{type:`text`,name:`f_${e.name}`,defaultValue:o[e.name]??``,placeholder:e.label||e.name,style:xt,...F(i)})]},e.name)),(0,N.jsx)(`button`,{type:`submit`,style:{...ke,flex:`0 0 auto`},...F(i),children:t})]})}function Ut({items:e=[],separator:t=`/`,style:n,nodeRef:r}){return e.length?(0,N.jsx)(`nav`,{ref:r,"aria-label":`Breadcrumb`,style:{...m(n)},children:(0,N.jsx)(`ol`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:8,listStyle:`none`,margin:0,padding:0,fontSize:14},children:e.map((n,r)=>{let i=r===e.length-1;return(0,N.jsxs)(`li`,{style:{display:`flex`,alignItems:`center`,gap:8,minWidth:0},children:[r>0&&(0,N.jsx)(`span`,{style:{opacity:.4},"aria-hidden":!0,children:t}),i||!n.href?(0,N.jsx)(`span`,{style:{fontWeight:i?600:400,opacity:i?1:.7},"aria-current":i?`page`:void 0,children:n.label}):(0,N.jsx)(`a`,{href:n.href,style:{color:`inherit`,opacity:.7,textDecoration:`none`},children:n.label})]},r)})})}):null}function Wt({pages:e=5,current:t=1,prevNext:n=!0,href:r=`#`,source:i,pageSize:a=6,align:o,hideEmpty:s,inert:c,style:u,nodeRef:d}){let{tenant:f,apiUrl:p}=(0,l.useContext)(ge),h=(0,l.useContext)(_e),[g,_]=(0,l.useState)(null),v=i?Number(h?.[`${i}:total`]):NaN;(0,l.useEffect)(()=>{if(!i||Number.isFinite(v))return;let e=!0,t=i.startsWith(`api:`)?`${p}/data/${encodeURIComponent(i.slice(4))}`:`${p}/dynamic/${encodeURIComponent(i)}?limit=1`;return fetch(t,{headers:f?{"x-tenant":f}:{}}).then(e=>e.json()).then(t=>{if(!e)return;let n=t?.payload,r=Array.isArray(n)?n.length:Number(n?.total?.filtered??n?.total?.all??(Array.isArray(n?.data)?n.data.length:0));_(Number.isFinite(r)?r:0)}).catch(()=>e&&_(0)),()=>{e=!1}},[i,f,p,v]);let y=Math.max(1,Number(a)||6),b=Number.isFinite(v)?v:g;if(i&&b===null||i&&s&&!(b>0))return null;let x=Math.min(Math.max(i?Math.ceil(b/y):Number(e)||1,1),50),S=Math.min(Math.max(i?ve(h):Number(t)||1,1),x),C=e=>{if(i){if(typeof window<`u`){let t=new URLSearchParams(window.location.search);return t.set(`page`,String(e)),`?${t.toString()}`}return`?page=${e}`}return r&&r!==`#`?r.replace(`{page}`,String(e)):`#`},w=o===`center`?`center`:o===`right`?`flex-end`:`flex-start`,T=c?e=>e.preventDefault():void 0,E=e=>({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,minWidth:36,height:36,padding:`0 8px`,borderRadius:8,fontSize:14,textDecoration:`none`,color:e?`var(--page-accent-text, #ffffff)`:`inherit`,background:e?`var(--page-accent, #111827)`:`transparent`,border:e?`1px solid transparent`:`1px solid rgba(148, 163, 184, 0.4)`});return(0,N.jsxs)(`nav`,{ref:d,"aria-label":`Pagination`,style:{display:`flex`,flexWrap:`wrap`,gap:8,alignItems:`center`,justifyContent:w,...m(u)},children:[n&&(0,N.jsx)(`a`,{href:S>1?C(S-1):`#`,onClick:T,"aria-label":`Previous`,style:{...E(!1),opacity:S>1?1:.4},children:`‹`}),Array.from({length:x},(e,t)=>t+1).map(e=>(0,N.jsx)(`a`,{href:C(e),onClick:T,"aria-current":e===S?`page`:void 0,style:E(e===S),children:e},e)),n&&(0,N.jsx)(`a`,{href:S<x?C(S+1):`#`,onClick:T,"aria-label":`Next`,style:{...E(!1),opacity:S<x?1:.4},children:`›`})]})}var Gt=`webim.page_mode`,Kt=()=>{if(typeof window>`u`)return`auto`;try{let e=window.localStorage.getItem(Gt);return e===`light`||e===`dark`?e:`auto`}catch{return`auto`}},qt=e=>{let t={width:16,height:16,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0};return e===`light`?(0,N.jsxs)(`svg`,{...t,children:[(0,N.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,N.jsx)(`path`,{d:`M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4`})]}):e===`dark`?(0,N.jsx)(`svg`,{...t,children:(0,N.jsx)(`path`,{d:`M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z`})}):(0,N.jsxs)(`svg`,{...t,children:[(0,N.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`14`,rx:`2`}),(0,N.jsx)(`path`,{d:`M8 21h8M12 17v4`})]})},Jt={light:`Light theme`,dark:`Dark theme`,auto:`Follow the device theme`};function Yt({variant:e,showSystem:t,style:n,nodeRef:r,inert:i}){let[a,o]=(0,l.useState)(i?`auto`:Kt),s=(0,l.useRef)(null),c=e=>{s.current=e,typeof r==`function`&&r(e)};(0,l.useEffect)(()=>{if(i)return;let e=s.current?.closest?.(`.webim-page`);e&&(a===`light`||a===`dark`?e.setAttribute(`data-webim-mode`,a):e.removeAttribute(`data-webim-mode`));try{a===`auto`?window.localStorage.removeItem(Gt):window.localStorage.setItem(Gt,a)}catch{}},[a,i]);let u=t===!1?[`light`,`dark`]:[`light`,`dark`,`auto`],d=u.includes(a)?a:u[0],f={appearance:`none`,border:0,margin:0,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,background:`transparent`,color:`inherit`,font:`inherit`,cursor:i?`default`:`pointer`,borderRadius:999};if(e===`buttons`)return(0,N.jsx)(`div`,{ref:c,role:`group`,"aria-label":`Theme`,style:{display:`inline-flex`,alignItems:`center`,gap:2,padding:3,borderRadius:999,border:`1px solid rgba(148, 163, 184, 0.4)`,...m(n)},children:u.map(e=>(0,N.jsx)(`button`,{type:`button`,title:Jt[e],"aria-label":Jt[e],"aria-pressed":e===d,onClick:i?void 0:()=>o(e),style:{...f,width:28,height:28,color:e===d?`var(--page-accent-text, #ffffff)`:`inherit`,background:e===d?`var(--page-accent, #111827)`:`transparent`,opacity:e===d?1:.7},children:qt(e)},e))});let p=u[(u.indexOf(d)+1)%u.length];return(0,N.jsx)(`button`,{ref:c,type:`button`,title:Jt[d],"aria-label":`Theme: ${Jt[d]} — switch to ${Jt[p]}`,onClick:i?void 0:()=>o(p),style:{...f,width:36,height:36,border:`1px solid rgba(148, 163, 184, 0.4)`,...m(n)},children:qt(d)})}var Xt={facebook:{label:`Facebook`,color:`#1877f2`,d:`M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z`},instagram:{label:`Instagram`,color:`#e4405f`,d:`M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06zm0 5.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z`},x:{label:`X (Twitter)`,color:`#000000`,d:`M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z`},linkedin:{label:`LinkedIn`,color:`#0a66c2`,d:`M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z`},youtube:{label:`YouTube`,color:`#ff0000`,d:`M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z`},tiktok:{label:`TikTok`,color:`#000000`,d:`M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z`},whatsapp:{label:`WhatsApp`,color:`#25d366`,d:`M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z`},telegram:{label:`Telegram`,color:`#26a5e4`,d:`M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z`},pinterest:{label:`Pinterest`,color:`#bd081c`,d:`M12 0C5.373 0 0 5.372 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.218-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.782c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.03-.655 2.569-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12 24c6.627 0 12-5.373 12-12 0-6.628-5.373-12-12-12z`},github:{label:`GitHub`,color:`#181717`,d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`},discord:{label:`Discord`,color:`#5865f2`,d:`M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.058a.082.082 0 00.031.056 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.873-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.009c.12.099.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.331c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z`},email:{label:`E-mail`,color:`#64748b`,d:`M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z`},website:{label:`Website`,color:`#64748b`,d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z`}};function Zt({links:e=[],variant:t,color:n,size:r,gap:i,newTab:a,style:o,nodeRef:s,inert:c}){let l=Array.isArray(e)?e.filter(e=>e&&Xt[e.network]):[];if(!l.length)return null;let u=Math.min(Math.max(Number(r)||18,10),64),d=Math.round(u*1.9),f=Number.isFinite(Number(i))?Number(i):10,p=e=>n===`accent`?`var(--page-accent, #111827)`:n===`inherit`?`currentColor`:e.color,h=c?e=>e.preventDefault():void 0;return(0,N.jsx)(`div`,{ref:s,style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:f,...m(o)},children:l.map((e,r)=>{let i=Xt[e.network],o=t!==`outline`&&t!==`plain`,s=o?n===`accent`?`var(--page-accent-text, #ffffff)`:n===`inherit`?`var(--page-bg, #ffffff)`:`#ffffff`:p(i);return(0,N.jsx)(`a`,{href:e.url||`#`,onClick:h,"aria-label":e.label||i.label,title:e.label||i.label,...a!==!1&&!c?{target:`_blank`,rel:`noopener noreferrer`}:{},style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,width:t===`plain`?u:d,height:t===`plain`?u:d,borderRadius:`50%`,background:o?p(i):`transparent`,border:t===`outline`?`1px solid ${p(i)}`:`none`,color:`inherit`,textDecoration:`none`},children:(0,N.jsx)(`svg`,{width:u,height:u,viewBox:`0 0 24 24`,fill:s,"aria-hidden":!0,children:(0,N.jsx)(`path`,{d:i.d})})},`${e.network}-${r}`)})})}function Qt({steps:e=[],active:t=1,vertical:n=!1,style:r,nodeRef:i}){if(!e.length)return null;let a=Math.min(Math.max(Number(t)||1,1),e.length),o=e=>({width:32,height:32,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:14,fontWeight:600,flexShrink:0,color:e===`todo`?`inherit`:`var(--page-accent-text, #ffffff)`,background:e===`todo`?`transparent`:`var(--page-accent, #111827)`,border:e===`todo`?`1px solid rgba(148, 163, 184, 0.5)`:`1px solid transparent`,opacity:e===`todo`?.6:1,boxShadow:e===`active`?`0 0 0 4px rgba(99, 102, 241, 0.2)`:`none`}),s=e=>({flexGrow:1,alignSelf:`center`,background:e?`var(--page-accent, #111827)`:`rgba(148, 163, 184, 0.4)`,...n?{width:2,minHeight:24,marginLeft:15,alignSelf:`auto`}:{height:2,minWidth:24}});return(0,N.jsx)(`div`,{ref:i,style:{display:`flex`,flexDirection:n?`column`:`row`,alignItems:n?`stretch`:`flex-start`,gap:n?4:8,...m(r)},children:e.map((e,t)=>{let r=t+1,i=r<a?`done`:r===a?`active`:`todo`;return(0,N.jsxs)(l.Fragment,{children:[t>0&&(0,N.jsx)(`div`,{style:s(r<=a),"aria-hidden":!0}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:n?`row`:`column`,alignItems:`center`,gap:8,minWidth:0,textAlign:n?`left`:`center`},children:[(0,N.jsx)(`div`,{style:o(i),children:i===`done`?`✓`:r}),(0,N.jsxs)(`div`,{style:{minWidth:0},children:[(0,N.jsx)(`div`,{style:{fontSize:13,fontWeight:i===`active`?700:500,opacity:i===`todo`?.6:1},children:e.label}),e.description&&(0,N.jsx)(`div`,{style:{fontSize:12,opacity:.6},children:e.description})]})]})]},t)})})}var $t={small:{w:132,h:46,name:11.5,title:10,avatar:28},medium:{w:168,h:56,name:13,title:11,avatar:36},large:{w:210,h:70,name:15.5,title:12.5,avatar:46}},en=e=>$t[e]??$t.medium;$t.medium.w,$t.medium.h;function tn(e,{size:t=`medium`,horizontal:n=!1}={}){let r=en(t),i=n?r.h:r.w,a=n?16:20,o=(n?r.w:r.h)+(n?56:48),s=Array.isArray(e)?e.filter(e=>e&&e.id):[],c=new Set(s.map(e=>e.id)),l=new Map,u=[];for(let e of s)e.parent&&c.has(e.parent)&&e.parent!==e.id?(l.has(e.parent)||l.set(e.parent,[]),l.get(e.parent).push(e)):u.push(e);let d=new Map,f=(e,t)=>{if(t.has(e.id))return 0;t.add(e.id);let n=(l.get(e.id)??[]).reduce((e,n,r)=>e+f(n,t)+(r?a:0),0),r=Math.max(i,n);return d.set(e.id,r),r};u.forEach(e=>f(e,new Set));let p=[],m=[],h=0,g=(e,t,s,c)=>{if(c.has(e.id))return;c.add(e.id);let u=t+((d.get(e.id)??i)-i)/2,f=s*o,_=n?f:u,v=n?u:f;p.push({node:e,x:_,y:v}),h=Math.max(h,f+(n?r.w:r.h));let y=t;for(let t of l.get(e.id)??[]){let e=y+((d.get(t.id)??i)-i)/2+i/2,l=(s+1)*o;m.push(n?{from:{x:f+r.w,y:u+r.h/2},to:{x:l,y:e}}:{from:{x:u+r.w/2,y:f+r.h},to:{x:e,y:l}}),g(t,y,s+1,c),y+=(d.get(t.id)??i)+a}},_=0,v=new Set;for(let e of u)g(e,_,0,v),_+=(d.get(e.id)??i)+a;let y=Math.max(_-a,i);return{boxes:p,links:m,width:n?Math.max(h,r.w):y,height:n?y:Math.max(h,r.h),horizontal:n}}var nn=(e,t)=>{let n=String(e??``);return n.length>t?`${n.slice(0,t-1)}…`:n},rn=e=>{let t=/^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e??``).trim());if(!t)return`#ffffff`;let n=t[1];n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=parseInt(n,16);return .299*(r>>16&255)+.587*(r>>8&255)+.114*(r&255)>150?`#111827`:`#ffffff`},an=e=>!!(e?.cv?.trim?.()||e?.photo);function on(e,t={}){let n=Array.isArray(e)?e.filter(e=>e&&typeof e==`object`&&e.id):[],r=e=>Array.isArray(e)?e[0]:e,i=e=>e==null?``:Te(e);return n.map(e=>{let n=e.data??{},a=r(n[t.parentField]),o=a&&typeof a==`object`?a.id??null:a||null;return{id:e.id,name:i(n[t.nameField||`name`])||i(n.name)||`Untitled`,title:t.titleField?i(n[t.titleField]):``,photo:t.photoField&&r(n[t.photoField])||``,parent:t.parentField?o:null,cv:t.cvField?i(n[t.cvField]):``,href:t.hrefField?i(n[t.hrefField]):``}})}var sn={size:36,pad:10};function cn({node:e,onClose:t}){return(0,l.useEffect)(()=>{let e=e=>e.key===`Escape`&&t();return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),(0,N.jsx)(`div`,{onClick:t,role:`dialog`,"aria-modal":`true`,"aria-label":e.name,style:{position:`fixed`,inset:0,zIndex:1e3,background:`rgba(15, 23, 42, 0.55)`,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:16},children:(0,N.jsxs)(`div`,{onClick:e=>e.stopPropagation(),style:{background:`var(--page-bg, #ffffff)`,color:`var(--page-text, #111827)`,borderRadius:14,maxWidth:420,width:`100%`,maxHeight:`80vh`,overflowY:`auto`,padding:24,position:`relative`,boxShadow:`0 24px 64px rgba(15, 23, 42, 0.35)`},children:[(0,N.jsx)(`button`,{type:`button`,"aria-label":`Close`,onClick:t,style:{position:`absolute`,top:10,right:10,width:30,height:30,border:0,borderRadius:8,background:`transparent`,color:`inherit`,fontSize:18,lineHeight:1,cursor:`pointer`,opacity:.6},children:`×`}),(0,N.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:e.cv?14:0},children:[e.photo&&(0,N.jsx)(`img`,{src:e.photo,alt:``,style:{width:72,height:72,borderRadius:`50%`,objectFit:`cover`,flexShrink:0}}),(0,N.jsxs)(`div`,{style:{minWidth:0},children:[(0,N.jsx)(`div`,{style:{fontSize:18,fontWeight:700},children:e.name}),e.title&&(0,N.jsx)(`div`,{style:{fontSize:13,opacity:.65},children:e.title})]})]}),e.cv&&String(e.cv).split(/\n+/).map((e,t)=>(0,N.jsx)(`p`,{style:{fontSize:14,lineHeight:1.6,margin:`0 0 10px`},children:e},t)),e.href&&(0,N.jsx)(`a`,{href:e.href,target:`_blank`,rel:`noopener noreferrer`,style:{display:`inline-block`,marginTop:6,padding:`8px 14px`,borderRadius:8,fontSize:13,fontWeight:600,textDecoration:`none`,background:`var(--page-accent, #4f46e5)`,color:`var(--page-accent-text, #ffffff)`},children:`Open profile ↗`})]})})}function ln({nodes:e=[],source:t,nameField:n,titleField:r,photoField:i,parentField:a,cvField:o,hrefField:s,size:c=`medium`,horizontal:u=!1,style:d,nodeRef:f,interactive:p=!0}){let h=(0,l.useId)(),[g,_]=(0,l.useState)(null),{tenant:v,apiUrl:y}=(0,l.useContext)(ge),b=(0,l.useContext)(_e)?.[t],[x,S]=(0,l.useState)(null);(0,l.useEffect)(()=>{if(!t||b)return;let e=!0;return fetch(`${y}/dynamic/${encodeURIComponent(t)}`,{headers:v?{"x-tenant":v}:{}}).then(e=>e.json()).then(t=>{let n=Array.isArray(t?.payload)?t.payload:Array.isArray(t?.payload?.data)?t.payload.data:[];e&&S(n)}).catch(()=>e&&S([])),()=>{e=!1}},[t,v,y,b]);let C=t?on(b??x??[],{nameField:n,titleField:r,photoField:i,parentField:a,cvField:o,hrefField:s}):e,w=en(c),{boxes:T,links:E,width:D,height:O}=tn(C,{size:c,horizontal:u});if(!T.length)return!p&&t?(0,N.jsxs)(`div`,{ref:f,style:{padding:18,border:`1px dashed rgba(148, 163, 184, 0.6)`,borderRadius:10,fontSize:13,opacity:.7,textAlign:`center`,...m(d)},children:[`Org Chart — no published entries in “`,t,`” yet`]}):null;let ee=new Set(T.filter(e=>e.node.parent==null||e.node.parent===``).map(e=>e.node.id));return(0,N.jsxs)(`div`,{ref:f,style:{maxWidth:`100%`,overflowX:`auto`,...m(d)},children:[(0,N.jsxs)(`svg`,{viewBox:`0 0 ${D} ${O}`,role:`img`,"aria-label":`Organization chart`,style:{display:`block`,width:`100%`,maxWidth:D,height:`auto`,margin:`0 auto`},children:[E.map((e,t)=>(0,N.jsx)(`path`,{d:u?`M ${e.from.x} ${e.from.y} H ${(e.from.x+e.to.x)/2} V ${e.to.y} H ${e.to.x}`:`M ${e.from.x} ${e.from.y} V ${(e.from.y+e.to.y)/2} H ${e.to.x} V ${e.to.y}`,fill:`none`,stroke:`rgba(148, 163, 184, 0.7)`,strokeWidth:`1.5`},t)),T.map(({node:e,x:t,y:n})=>{let r=ee.has(e.id),i=!!e.color2,a=!!e.color||r||i,o=e.color||(r?`var(--page-accent, #4f46e5)`:`var(--page-bg, #ffffff)`),s=e.color?rn(e.color):r?`var(--page-accent-text, #ffffff)`:`var(--page-text, #111827)`,c=i?rn(e.color2):s,l=p&&(an(e)||e.href),u=()=>an(e)?_(e):window.open(e.href,`_blank`,`noreferrer`),d=e.photo?t+sn.pad+w.avatar+8:t+w.w/2,f=e.photo?`start`:`middle`,m=e.photo?Math.floor((w.w-w.avatar-26)/7):Math.floor(w.w/7.6),g=w.h/2,v=[e.name,e.title].map(e=>String(e??``).trim()).filter(Boolean);return(0,N.jsxs)(`g`,{onClick:l?u:void 0,style:l?{cursor:`pointer`}:void 0,role:l?`button`:void 0,"aria-label":l?`Open ${e.name||e.title}'s profile`:void 0,children:[i&&e.gradient?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`linearGradient`,{id:`${h}-${e.id}-grad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,N.jsx)(`stop`,{offset:`0%`,stopColor:e.color||`var(--page-accent, #4f46e5)`}),(0,N.jsx)(`stop`,{offset:`100%`,stopColor:e.color2})]}),(0,N.jsx)(`rect`,{x:t,y:n,width:w.w,height:w.h,rx:`10`,fill:`url(#${h}-${e.id}-grad)`})]}):i?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`clipPath`,{id:`${h}-${e.id}-box`,children:(0,N.jsx)(`rect`,{x:t,y:n,width:w.w,height:w.h,rx:`10`})}),(0,N.jsxs)(`g`,{clipPath:`url(#${h}-${e.id}-box)`,children:[(0,N.jsx)(`rect`,{x:t,y:n,width:w.w,height:g,fill:o}),(0,N.jsx)(`rect`,{x:t,y:n+g,width:w.w,height:w.h-g,fill:e.color2})]})]}):(0,N.jsx)(`rect`,{x:t,y:n,width:w.w,height:w.h,rx:`10`,fill:o,stroke:a?`none`:`var(--page-accent, #4f46e5)`,strokeWidth:a?0:1.5}),e.photo&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`clipPath`,{id:`${h}-${e.id}`,children:(0,N.jsx)(`circle`,{cx:t+sn.pad+w.avatar/2,cy:n+w.h/2,r:w.avatar/2})}),(0,N.jsx)(`image`,{href:e.photo,x:t+sn.pad,y:n+(w.h-w.avatar)/2,width:w.avatar,height:w.avatar,preserveAspectRatio:`xMidYMid slice`,clipPath:`url(#${h}-${e.id})`})]}),i&&!e.gradient?(0,N.jsxs)(N.Fragment,{children:[e.title&&(0,N.jsx)(`text`,{x:d,y:n+g/2+w.title*.35,textAnchor:f,fontSize:w.title,fontWeight:`600`,fill:s,children:nn(e.title,m+4)}),e.name&&(0,N.jsx)(`text`,{x:d,y:n+g+g/2+w.name*.35,textAnchor:f,fontSize:w.name,fontWeight:`600`,fill:c,children:nn(e.name,m)})]}):(0,N.jsxs)(N.Fragment,{children:[v[0]&&(0,N.jsx)(`text`,{x:d,y:n+(v[1]?w.h*.43:w.h*.57),textAnchor:f,fontSize:w.name,fontWeight:`600`,fill:s,children:nn(v[0],m)}),v[1]&&(0,N.jsx)(`text`,{x:d,y:n+w.h*.73,textAnchor:f,fontSize:w.title,opacity:`0.7`,fill:s,children:nn(v[1],m+4)})]})]},e.id)})]}),g&&(0,N.jsx)(cn,{node:g,onClose:()=>_(null)})]})}function un({columns:e=[],rows:t=[],source:n,limit:r=10,striped:i=!0,bordered:a=!1,compact:o=!1,paged:s,emptyText:c,style:u,nodeRef:d}){let{tenant:f,apiUrl:p}=(0,l.useContext)(ge),h=(0,l.useContext)(_e),g=h?.[n],_=s?ve(h):1,[v,y]=(0,l.useState)(null);if((0,l.useEffect)(()=>{if(!n||g)return;let e=!0,t=Math.max(1,Number(r)||10),i=s&&!n.startsWith(`api:`)?`?offset=${(_-1)*t}&limit=${t}`:``,a=n.startsWith(`api:`)?`${p}/data/${encodeURIComponent(n.slice(4))}`:`${p}/dynamic/${encodeURIComponent(n)}${i}`;return fetch(a,{headers:f?{"x-tenant":f}:{}}).then(e=>e.json()).then(t=>{let n=Array.isArray(t?.payload)?t.payload:Array.isArray(t?.payload?.data)?t.payload.data:[];return e&&y(n)}).catch(()=>e&&y([])),()=>{e=!1}},[n,f,p,g,s,_,r]),!e.length)return null;let b=Math.max(1,Number(r)||10),x=n?s?g||n.startsWith(`api:`)?(g??v??[]).slice((_-1)*b,_*b):(v??[]).slice(0,b):(g??v??[]).slice(0,b):null,S=x?x.map(t=>e.map(e=>Te(Ce(t?.data,e.field)))):t,C=!!n&&!(n&&!g&&v===null)&&S.length===0,w=o?`6px 10px`:`10px 14px`,T=`1px solid rgba(148, 163, 184, 0.35)`,E=a?{border:T}:{borderBottom:T};return(0,N.jsx)(`div`,{ref:d,style:{width:`100%`,overflowX:`auto`,...m(u)},children:(0,N.jsxs)(`table`,{style:{width:`100%`,borderCollapse:`collapse`,fontSize:14,...a?{border:T}:{}},children:[(0,N.jsx)(`thead`,{children:(0,N.jsx)(`tr`,{children:e.map((e,t)=>(0,N.jsx)(`th`,{style:{textAlign:`left`,fontWeight:600,padding:w,background:`rgba(148, 163, 184, 0.12)`,...E},children:e.label??e},t))})}),(0,N.jsxs)(`tbody`,{children:[C&&(0,N.jsx)(`tr`,{children:(0,N.jsx)(`td`,{colSpan:e.length,style:{padding:w,textAlign:`center`,opacity:.6,...E},children:c||`No data yet`})}),S.map((t,n)=>(0,N.jsx)(`tr`,{style:i&&n%2==1?{background:`rgba(148, 163, 184, 0.07)`}:void 0,children:e.map((e,n)=>(0,N.jsx)(`td`,{style:{padding:w,...E},children:t?.[n]??``},n))},n))]})]})})}var dn={PageRoot:Pe,Section:Fe,Container:Ie,Heading:Le,TextBlock:Je,ButtonBlock:Ze,ImageBlock:Qe,Spacer:it,Divider:at,SliderBlock:dt,CanvasSlider:ft,TabsBlock:_t,QuickStack:Bt,CollectionList:Vt,CollectionSearch:Ht,BreadcrumbsBlock:Ut,PaginationBlock:Wt,StepperBlock:Qt,SocialLinksBlock:Zt,ThemeModeBlock:Yt,OrgChartBlock:ln,TableBlock:un,MasonryBlock:pt,AccordionBlock:vt,NavbarBlock:gt,ListBlock:qe,TextSpan:Be,QuoteBlock:Ke,TextLink:Xe,RichTextBlock:We,RichContentBlock:We,VideoBlock:$e,YouTubeBlock:tt,IframeBlock:nt,EmbedBlock:rt,FormBlock:Ot,FormLabel:Nt,FormInput:Pt,FormTextarea:Ft,FormCheckbox:e=>(0,N.jsx)(It,{kind:`checkbox`,...e}),FormRadio:e=>(0,N.jsx)(It,{kind:`radio`,...e}),FormSelect:Lt,FormFile:Rt,FormRecaptcha:Mt,FormSubmit:zt},fn={id:`auth`,label:`Accounts`,category:`Apps`,keys:[`SiteLoginForm`,`SiteAccountMenu`],ssr:`shell`,settings:[`site.authRedirect`]},pn=(0,l.createContext)({user:null,status:`idle`,ensure:()=>{},refresh:()=>{},signOut:()=>{}}),mn=()=>{let e=(0,l.useContext)(pn);return(0,l.useEffect)(()=>{e.ensure()},[e]),e};function hn({children:e,initialUser:t,disabled:n,apiUrl:r,tenant:i}){let a=(0,l.useContext)(ge),o=r||a?.apiUrl||`/api`,s=i||a?.tenant||``,[c,u]=(0,l.useState)(t??null),[d,f]=(0,l.useState)(t?`user`:n?`guest`:`idle`),p=(0,l.useRef)(!1),m=(0,l.useCallback)((e,t)=>fetch(`${o}${e}`,{...t,credentials:`include`,headers:{"content-type":`application/json`,...s?{"x-tenant":s}:{},...t?.headers}}),[o,s]),h=(0,l.useCallback)(()=>n?Promise.resolve(null):m(`/site/me`).then(e=>e.ok?e.json():null).then(e=>{let t=e?.payload??null;return u(t),f(t?`user`:`guest`),t}).catch(()=>(u(null),f(`guest`),null)),[m,n]),g=(0,l.useCallback)(()=>m(`/site/logout`,{method:`post`}).catch(()=>{}).then(()=>{u(null),f(`guest`)}),[m]),_=(0,l.useCallback)(()=>{p.current||n||t||(p.current=!0,f(`loading`),h())},[n,t,h]),v=(0,l.useMemo)(()=>({user:c,status:d,ensure:_,refresh:h,signOut:g}),[c,d,_,h,g]);return(0,N.jsx)(pn.Provider,{value:v,children:e})}function gn({when:e,children:t}){let{status:n}=mn();return!e||e===`always`?t:n===`idle`||n===`loading`?null:e===`user`==(n===`user`)?t:null}function _n({mode:e=`login`,redirect:t,emailLabel:n=`Email`,passwordLabel:r=`Password`,nameLabel:i=`Name`,submitLabel:a,style:o,nodeRef:s,inert:c,linked:u,show:d}){let{tenant:f,apiUrl:p,settings:h}=(0,l.useContext)(ge),[g,_]=(0,l.useState)(`form`),[v,y]=(0,l.useState)(``),[b,x]=(0,l.useState)(!1),S=e===`register`,C=c?d||`form`:g,w=e=>typeof e==`string`&&e.startsWith(`/`)&&!e.startsWith(`//`)?e:``,T=async e=>{if(e.preventDefault(),c)return;let n=new FormData(e.currentTarget);x(!0),y(``);try{let e=await fetch(`${p||`/api`}/site/${S?`register`:`login`}`,{method:`post`,headers:{"content-type":`application/json`,...f?{"x-tenant":f}:{}},credentials:`same-origin`,body:JSON.stringify({email:n.get(`email`),password:n.get(`password`),...S?{name:n.get(`name`)||``}:{}})}),r=await e.json().catch(()=>null);if(!e.ok||r?.success===!1){y(r?.error?.message||`Sign-in failed`),_(`error`),x(!1);return}if(_(`success`),typeof window<`u`){let e=w(t)||w(new URLSearchParams(window.location.search).get(`next`))||w(h?.[`site.authRedirect`])||w(h?.[`apps.auth.redirect`])||`/`;window.location.assign(e)}}catch{y(`Sign-in failed`),_(`error`),x(!1)}};return(0,N.jsxs)(`div`,{ref:s,style:{display:`grid`,gap:12,maxWidth:360,...m(o)},children:[(0,N.jsxs)(`form`,{onSubmit:T,style:{display:C===`form`?`grid`:`none`,gap:10},children:[S?(0,N.jsxs)(`label`,{style:{...bt,display:`grid`,gap:6},children:[i,(0,N.jsx)(`input`,{name:`name`,type:`text`,style:xt,...F(c)})]}):null,(0,N.jsxs)(`label`,{style:{...bt,display:`grid`,gap:6},children:[n,(0,N.jsx)(`input`,{name:`email`,type:`email`,required:!c,style:xt,...F(c)})]}),(0,N.jsxs)(`label`,{style:{...bt,display:`grid`,gap:6},children:[r,(0,N.jsx)(`input`,{name:`password`,type:`password`,required:!c,style:xt,...F(c)})]}),(0,N.jsx)(`button`,{type:c?`button`:`submit`,disabled:b||void 0,style:{...ke,border:0,padding:`10px 22px`,borderRadius:8,fontSize:15,fontWeight:600,cursor:`pointer`,opacity:b?.6:1},children:a||(S?`Create account`:`Sign in`)}),v?(0,N.jsx)(`p`,{style:{margin:0,fontSize:14,color:`#dc2626`},children:v}):null]}),(0,N.jsx)(`div`,{style:{display:C===`success`?`block`:`none`},children:u?.success??null}),(0,N.jsx)(`div`,{style:{display:C===`error`?`block`:`none`},children:u?.error??null})]})}function vn({greeting:e=`Hi`,signOutLabel:t=`Sign out`,showEmail:n=!1,style:r,nodeRef:i,inert:a,linked:o,show:s}){let{user:c,status:l,signOut:u}=mn(),d=a?s||`user`:l,f=a?{name:`Ada Lovelace`,email:`ada@example.com`}:c;return d===`loading`?(0,N.jsx)(`div`,{ref:i,style:{minHeight:24,...m(r)}}):d===`user`?(0,N.jsxs)(`div`,{ref:i,style:{display:`flex`,alignItems:`center`,gap:10,...m(r)},children:[(0,N.jsxs)(`span`,{style:{...bt,fontWeight:600},children:[e,` `,f?.name||f?.email||``]}),n&&f?.email?(0,N.jsx)(`span`,{style:{...bt,opacity:.7},children:f.email}):null,(0,N.jsx)(`button`,{type:`button`,onClick:a?void 0:u,style:{...ke,border:0,padding:`8px 16px`,borderRadius:8,fontSize:14,cursor:a?`default`:`pointer`},...F(a),children:t})]}):(0,N.jsx)(`div`,{ref:i,style:{display:`flex`,alignItems:`center`,gap:10,...m(r)},children:o?.signedOut??null})}var yn=[fn],bn={SiteLoginForm:_n,SiteAccountMenu:vn};new Set(yn.filter(e=>e.ssr===`shell`).flatMap(e=>e.keys));var xn=new Map;function Sn(e){if(xn.has(e))return xn.get(e);let t=URL.createObjectURL(new Blob([e],{type:`text/javascript`})),n=import(t).finally(()=>URL.revokeObjectURL(t));return xn.set(e,n),n}function Cn(e){let t=e&&typeof e==`object`?e.builder_plugins:null,n=t&&typeof t==`object`?t.plugins:null;return n&&typeof n==`object`?n:{}}async function wn(e,t){let n=await Sn(e);return(Array.isArray(n?.default?.blocks)?n.default.blocks:[]).find(e=>e?.id===t&&typeof e.mount==`function`)??null}var Tn={padding:`10px 12px`,border:`1px dashed rgba(148, 163, 184, 0.5)`,borderRadius:8,fontSize:12,opacity:.6};function En({pluginId:e,blockId:t,props:n,style:r,nodeRef:i}){let a=(0,l.useContext)(ge),o=Cn(a?.settings)[e],s=(0,l.useRef)(null),c=(0,l.useRef)(null),u={tenant:a?.tenant??``,apiUrl:a?.apiUrl??`/api`,locale:a?.locale??``,settings:a?.settings??null},d=(0,l.useRef)(u);d.current=u;let f=JSON.stringify(n??{});return(0,l.useEffect)(()=>{let e=s.current;if(!o?.code||!e)return;let n=!0;return wn(o.code,t).then(e=>{if(!(!n||!e||!s.current)){c.current=e;try{e.mount(s.current,JSON.parse(f),d.current)}catch{c.current=null}}}).catch(()=>{}),()=>{n=!1;let t=c.current;c.current=null;try{t?.unmount?.(e)}catch{}e&&(e.innerHTML=``)}},[o?.code,t]),(0,l.useEffect)(()=>{let e=c.current,t=s.current;if(!(!e||!t))try{e.update?e.update(t,JSON.parse(f),d.current):(e.unmount?.(t),t.innerHTML=``,e.mount(t,JSON.parse(f),d.current))}catch{}},[f]),o?(0,N.jsx)(`div`,{ref:i,style:m(r),children:(0,N.jsx)(`div`,{ref:s})}):(0,N.jsxs)(`div`,{ref:i,style:{...Tn,...m(r)},children:[`Plugin “`,e,`” is not installed`]})}var Dn={...dn,...bn,PluginBlock:En};function On(e,t,n,r=new Set,i=void 0){let a=t[e];if(!a||a.hidden)return null;let o=a.type?.resolvedName,s=i?.mapProps?i.mapProps(a.props??{},o):a.props??{};if(o===`ComponentInstance`){let t=a.props?.componentId,o=n?.[t];if(!o?.template||r.has(t))return null;let s=new Set(r).add(t);return(0,N.jsx)(l.Fragment,{children:On(o.template.rootId,o.template.nodes,n,s,i)},e)}let c=Dn[o];if(!c)return null;let u=(a.nodes??[]).map(e=>On(e,t,n,r,i)).filter(Boolean),d=Object.entries(a.linkedNodes??{}),f=d.length?Object.fromEntries(d.map(([e,i])=>[e,On(i,t,n,r)])):void 0,p=(0,N.jsx)(c,{...s,...o===`CollectionList`?{templateId:a.linkedNodes?.card}:null,linked:f,nodeRef:t=>{t&&(t.setAttribute(`data-wb`,e),v(t,s))},children:u.length?u:void 0},e);return s.when&&s.when!==`always`?(0,N.jsx)(gn,{when:s.when,children:p},e):p}var kn=e=>Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(` `),An=e=>`.webim-page[data-webim-mode="light"] { ${Object.entries(ae(e.light)).map(([e,t])=>`${e}: ${t} !important;`).join(` `)} }
|
|
13
|
+
`)}var D=`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`,O={light:{background:`#ffffff`,text:`#111827`,accent:`#111827`,accentText:`#ffffff`,primary:{light:`#4b5563`,main:`#111827`,dark:`#030712`,contrastText:`#ffffff`},secondary:{light:`#a5b4fc`,main:`#6366f1`,dark:`#4338ca`,contrastText:`#ffffff`}},dark:{background:`#0f172a`,text:`#e2e8f0`,accent:`#6366f1`,accentText:`#ffffff`,primary:{light:`#a5b4fc`,main:`#6366f1`,dark:`#4338ca`,contrastText:`#ffffff`},secondary:{light:`#5eead4`,main:`#14b8a6`,dark:`#0f766e`,contrastText:`#052e2b`}}},ee={font:`system`,headingFont:`inherit`,light:O.light,dark:O.dark},te={system:{label:`System`,value:D},inter:{label:`Inter`,value:`"Inter", ${D}`},outfit:{label:`Outfit`,value:`"Outfit", ${D}`},serif:{label:`Serif`,value:`Georgia, "Times New Roman", serif`},mono:{label:`Mono`,value:`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`}},ne=(e,t)=>te[e]?.value??t,re=(e,...t)=>{let n=Object.assign({},e,...t);return n.primary={...e.primary,...t.reduce((e,t)=>({...e,...t?.primary}),{})},n.secondary={...e.secondary,...t.reduce((e,t)=>({...e,...t?.secondary}),{})},n};function ie(e){let{light:t,dark:n,font:r,headingFont:i,...a}=e??{};return{font:r??ee.font,headingFont:i??ee.headingFont,light:re(O.light,a,t),dark:re(O.dark,n)}}function ae(e){return{"--page-bg":e.background,"--page-text":e.text,"--page-accent":e.accent,"--page-accent-text":e.accentText,"--page-primary-light":e.primary.light,"--page-primary":e.primary.main,"--page-primary-dark":e.primary.dark,"--page-primary-contrast":e.primary.contrastText,"--page-secondary-light":e.secondary.light,"--page-secondary":e.secondary.main,"--page-secondary-dark":e.secondary.dark,"--page-secondary-contrast":e.secondary.contrastText}}function oe(e){let t=ie(e);return{backgroundColor:`var(--page-bg)`,color:`var(--page-text)`,fontFamily:ne(t.font,D),"--page-heading-font":t.headingFont===`inherit`?`inherit`:ne(t.headingFont,`inherit`)}}function k(e,t=`light`){let n=ie(e);return{...oe(e),...ae(n[t]??n.light)}}function A(e,t){return e?.themeRef&&t?.[e.themeRef]||e?.theme}function se({page:e,settings:t,tenant:n,apiUrl:r,locale:i}){let a={...t?.global??{},...t?.tenant??{}},o=e.meta??{};return{schema:1,title:e.title,slug:e.slug,blocks:i&&o.i18n?.[i]?.blocks||e.blocks,theme:A(o,a.builder_themes?.themes),components:a.builder_components?.components??{},custom:o.custom,seo:o.seo,direction:o.direction,locale:i||a.locales?.default,locales:a.locales,tenant:n??``,apiUrl:r??``,settings:a}}var ce=async e=>{let t=await e.json().catch(()=>null);if(!e.ok||t?.success===!1)throw Error(t?.error?.message||`Request failed (${e.status})`);return t?.payload??t};async function le({apiUrl:e,tenant:t,slug:n,locale:r,preview:i,token:a,page:o,fetch:s}){if(!e)throw Error(`fetchPage: apiUrl is required`);if(!n)throw Error(`fetchPage: slug is required`);let c=s??fetch,l=e.replace(/\/$/,``),u={...t?{"x-tenant":t}:{},...a?{authorization:`Bearer ${a}`}:{}},[d,f]=await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i?`?preview=${encodeURIComponent(i)}`:``}`,{headers:u}).then(ce),c(`${l}/settings/public`,{headers:u}).then(ce)]),p=se({page:d,settings:f,tenant:t,apiUrl:l,locale:r}),m=[...new Set(Object.values(p.blocks??{}).map(e=>e?.type?.resolvedName===`CollectionList`?e.props?.collection:e?.type?.resolvedName===`TableBlock`||e?.type?.resolvedName===`OrgChartBlock`?e.props?.source:null).filter(Boolean))];if(m.length){let e=e=>e.startsWith(`api:`)?`${l}/data/${encodeURIComponent(e.slice(4))}`:`${l}/dynamic/${encodeURIComponent(e)}?all=1${r?`&locale=${encodeURIComponent(r)}`:``}`,t=await Promise.all(m.map(t=>c(e(t),{headers:u}).then(ce).then(e=>{let n=Array.isArray(e)?e:Array.isArray(e?.data)?e.data:[],r=Number(e?.total?.filtered??e?.total?.all??n.length);return[[t,n],[`${t}:total`,Number.isFinite(r)?r:n.length]]}).catch(()=>[[t,[]]])));p.datasets=Object.fromEntries(t.flat())}let h=Number(o);return Number.isFinite(h)&&h>=1&&(p.datasets={...p.datasets??{},__page:Math.floor(h)}),p}new Map([{family:`Bebas Neue`,fallback:`sans-serif`},{family:`Crimson Text`,fallback:`serif`},{family:`DM Sans`,fallback:`sans-serif`},{family:`Fira Sans`,fallback:`sans-serif`},{family:`Inter`,fallback:`sans-serif`},{family:`JetBrains Mono`,fallback:`monospace`},{family:`Josefin Sans`,fallback:`sans-serif`},{family:`Karla`,fallback:`sans-serif`},{family:`Lato`,fallback:`sans-serif`},{family:`Lora`,fallback:`serif`},{family:`Manrope`,fallback:`sans-serif`},{family:`Merriweather`,fallback:`serif`},{family:`Montserrat`,fallback:`sans-serif`},{family:`Nunito`,fallback:`sans-serif`},{family:`Open Sans`,fallback:`sans-serif`},{family:`Oswald`,fallback:`sans-serif`},{family:`Outfit`,fallback:`sans-serif`},{family:`Playfair Display`,fallback:`serif`},{family:`Poppins`,fallback:`sans-serif`},{family:`Quicksand`,fallback:`sans-serif`},{family:`Raleway`,fallback:`sans-serif`},{family:`Roboto`,fallback:`sans-serif`},{family:`Rubik`,fallback:`sans-serif`},{family:`Source Sans 3`,fallback:`sans-serif`},{family:`Space Grotesk`,fallback:`sans-serif`},{family:`Work Sans`,fallback:`sans-serif`}].map(e=>[e.family,e]));function ue(e){return e.length?`https://fonts.googleapis.com/css2?${e.map(e=>`family=${e.replace(/ /g,`+`)}:wght@100..900`).join(`&`)}&display=swap`:null}var j=e=>ue([e]),M=e=>{let t=typeof e==`string`&&e.match(/^"([^"]+)"/);return t?t[1]:null};function de(e,t){let n=new Set,r=e=>{for(let t of Object.values(e||{}))for(let e of[`style`,`hover`,`pressed`,`focused`]){let r=M(t.props?.[e]?.fontFamily);r&&n.add(r)}};r(e);for(let e of Object.values(t||{}))r(e.template?.nodes);return[...n].sort()}var fe=new Set([`ar`,`he`,`fa`,`ur`,`ps`,`sd`,`ug`,`yi`,`dv`,`ckb`]),pe=e=>fe.has(String(e||``).toLowerCase().split(/[-_]/)[0])?`rtl`:`ltr`,me=(e,t)=>e===`ltr`||e===`rtl`?e:t?pe(t):void 0,he=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),N=e(((e,t)=>{t.exports=he()}))(),ge=(0,l.createContext)({tenant:``,apiUrl:`/api`,locale:``,settings:null}),_e=(0,l.createContext)(null),ve=e=>{let t=Number(e?.__page);if(Number.isFinite(t)&&t>=1)return Math.floor(t);if(typeof window>`u`)return 1;let n=Number(new URLSearchParams(window.location.search).get(`page`));return Number.isFinite(n)&&n>=1?Math.floor(n):1},ye=()=>{if(typeof window>`u`)return{};let e={};return new URLSearchParams(window.location.search).forEach((t,n)=>{n.startsWith(`f_`)&&n.length>2&&t!==``&&(e[n.slice(2)]=t)}),e},be=e=>{let t={...e&&typeof e==`object`&&!Array.isArray(e)?e:{},...ye()};return Object.fromEntries(Object.entries(t).filter(([,e])=>typeof e==`string`&&e.trim()!==``))},xe=(0,l.createContext)(null),Se=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function Ce(e,t){if(t)return t.includes(`.`)?t.split(`.`).reduce((e,t)=>e&&typeof e==`object`?e[t]:void 0,e):e?.[t]}var we=e=>{let t=[];for(let[n,r]of Object.entries(e??{})){if(!/^[\w-]+$/.test(n))continue;t.push(n);let e=Array.isArray(r)?r[0]:r,i=Array.isArray(r)?`${n}.0`:n;if(e&&typeof e==`object`&&!Array.isArray(e))for(let n of Object.keys(e))/^[\w-]+$/.test(n)&&t.push(`${i}.${n}`)}return t};function Te(e){return e==null?``:typeof e==`string`||typeof e==`number`||typeof e==`boolean`?String(e):typeof e==`object`&&!Array.isArray(e)&&(`label`in e||`name`in e||`slug`in e)?String(e.label??e.name??e.slug??``):typeof e==`object`&&!Array.isArray(e)&&Number.isFinite(Number(e.lat))&&Number.isFinite(Number(e.lng))?`${e.lat}, ${e.lng}`:Array.isArray(e)?e.map(e=>typeof e==`string`?e:Array.isArray(e?.parts)?e.parts.map(e=>e?.text??``).join(``):Array.isArray(e?.items)?e.items.map(e=>e?.text??``).join(` `):e&&(e.label!=null||e.name!=null||e.slug!=null)?String(e.label??e.name??e.slug):``).filter(Boolean).join(` `):``}function Ee(e,t){let n=t?.data??{},r=we(n);if(!r.length)return e;let i=RegExp(`:(${r.map(Se).sort((e,t)=>t.length-e.length).join(`|`)})`,`g`),a=e=>typeof e==`string`?e.replace(i,(e,t)=>Te(Ce(n,t))):Array.isArray(e)?e.map(a):e&&typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,a(t)])):e;return a(e)}var De={margin:0,fontWeight:700,lineHeight:1.2,fontFamily:`var(--page-heading-font, inherit)`},Oe={margin:0},ke={display:`inline-block`,textDecoration:`none`,cursor:`pointer`,backgroundColor:`var(--page-accent, #111827)`,color:`var(--page-accent-text, #ffffff)`},Ae={flexGrow:1,display:`flex`,flexDirection:`column`,position:`relative`},je={display:`flex`,flexDirection:`column`};function Me({style:e}){let t=e?.backgroundVideo;if(!t)return null;let n={position:`absolute`,inset:0,width:`100%`,height:`100%`,zIndex:-1,pointerEvents:`none`},r=e?.overlayColor?`color-mix(in srgb, ${e.overlayColor} ${e.overlayOpacity??50}%, transparent)`:null;return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`video`,{src:t,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,style:{...n,objectFit:`cover`}}),r&&(0,N.jsx)(`div`,{style:{...n,background:r}})]})}var Ne=(e,t)=>e?.backgroundVideo?{position:`relative`,...t,...m(e)}:{...t,...m(e)};function Pe({style:e,nodeRef:t,children:n}){return(0,N.jsxs)(`div`,{ref:t,style:{...Ae,...m(e)},children:[(0,N.jsx)(Me,{style:e}),n]})}function Fe({style:e,nodeRef:t,children:n}){return(0,N.jsxs)(`section`,{ref:t,style:Ne(e,je),children:[(0,N.jsx)(Me,{style:e}),n]})}function Ie({style:e,freeLayout:t,nodeRef:n,children:r}){let i=t?{position:`relative`,minHeight:240}:null;return(0,N.jsxs)(`div`,{ref:n,style:i?{...i,...Ne(e)}:Ne(e),children:[(0,N.jsx)(Me,{style:e}),r]})}function Le({text:e,parts:t,tag:n=`h2`,style:r,linked:i,nodeRef:a}){return(0,N.jsx)(n,{ref:a,style:{...De,...m(r)},children:P(t,e,i)})}var Re={fontFamily:te.mono.value,background:`rgba(148, 163, 184, 0.18)`,padding:`1px 5px`,borderRadius:4,fontSize:`0.9em`};function ze(e,t=[],n,r){let i=e;return t.includes(`sup`)?i=(0,N.jsx)(`sup`,{children:i}):t.includes(`sub`)&&(i=(0,N.jsx)(`sub`,{children:i})),t.includes(`code`)&&(i=(0,N.jsx)(`code`,{style:Re,children:i})),t.includes(`strike`)&&(i=(0,N.jsx)(`s`,{children:i})),t.includes(`underline`)&&(i=(0,N.jsx)(`u`,{children:i})),t.includes(`italic`)&&(i=(0,N.jsx)(`em`,{children:i})),t.includes(`bold`)&&(i=(0,N.jsx)(`strong`,{children:i})),n&&(i=(0,N.jsx)(`a`,{href:n,target:r||void 0,rel:r===`_blank`?`noopener noreferrer`:void 0,style:{color:`inherit`},children:i})),i}function P(e,t,n){return e?.length?e.map((e,t)=>{if(e.slot)return(0,N.jsx)(l.Fragment,{children:n?.[e.slot]??null},t);if(e.parts)return(0,N.jsx)(l.Fragment,{children:P(e.parts,``,n)},t);let r=e.text;return e.sup?r=(0,N.jsx)(`sup`,{children:r}):e.sub&&(r=(0,N.jsx)(`sub`,{children:r})),e.code&&(r=(0,N.jsx)(`code`,{style:Re,children:r})),e.strike&&(r=(0,N.jsx)(`s`,{children:r})),e.underline&&(r=(0,N.jsx)(`u`,{children:r})),e.italic&&(r=(0,N.jsx)(`em`,{children:r})),e.bold&&(r=(0,N.jsx)(`strong`,{children:r})),(e.color||e.background)&&(r=(0,N.jsx)(`span`,{style:{...e.color&&{color:e.color},...e.background&&{backgroundColor:e.background}},children:r})),e.href&&(r=(0,N.jsx)(`a`,{href:e.href,target:e.target||void 0,rel:e.target===`_blank`?`noopener noreferrer`:void 0,style:{color:e.color??`inherit`},children:r})),(0,N.jsx)(l.Fragment,{children:r},t)}):t}function Be({parts:e,text:t,marks:n,href:r,target:i,style:a}){return(0,N.jsx)(`span`,{style:m(a),children:e?.length?P(e,t):ze(t,n,r,i)})}var Ve={h1:40,h2:32,h3:26,h4:22,h5:19,h6:16};function He({align:e=`center`,width:t,wrap:n}={}){let r=t?`${t}%`:void 0;if(e===`full`)return{width:`100%`};let i=e===`left`||e===`right`;return i&&(n??!0)?{float:e,width:r??`50%`,maxWidth:`100%`,marginTop:`4px`,marginBottom:`12px`,...e===`left`?{marginRight:`20px`,marginLeft:0}:{marginLeft:`20px`,marginRight:0}}:i?{width:r??`fit-content`,maxWidth:`100%`,...e===`left`?{marginLeft:0,marginRight:`auto`}:{marginLeft:`auto`,marginRight:0}}:{width:r??`fit-content`,maxWidth:`100%`,marginLeft:`auto`,marginRight:`auto`}}function Ue(e=[],t,n){let r=n??((e,n)=>P(e,n,t));return e.map((t,n)=>{let i={marginTop:0,marginBottom:n===e.length-1?0:14};if(t.type===`image`){if(!t.src)return null;let e=(0,N.jsx)(`img`,{src:t.src,alt:t.alt||``,style:{width:`100%`,display:`block`,borderRadius:6}});return(0,N.jsxs)(`figure`,{style:{marginLeft:0,marginRight:0,...i,...He(t)},children:[t.href?(0,N.jsx)(`a`,{href:t.href,target:t.target||void 0,rel:t.target===`_blank`?`noopener noreferrer`:void 0,style:{display:`block`},children:e}):e,t.caption&&(0,N.jsx)(`figcaption`,{style:{fontSize:13,opacity:.65,marginTop:6,textAlign:`center`},children:t.caption})]},n)}if(t.type===`video`)return et(t.url)?(0,N.jsx)(`div`,{style:{...i,...He({align:t.align,wrap:t.wrap,width:t.width??100})},children:(0,N.jsx)(tt,{url:t.url,autoplay:t.autoplay,muted:t.muted,loop:t.loop,controls:t.controls??!0,start:t.start})},n):null;if(t.type===`divider`)return(0,N.jsx)(`hr`,{style:{...i,border:0,borderTop:`1px solid rgba(148, 163, 184, 0.4)`}},n);if(t.type===`table`){let e=Array.isArray(t.rows)?t.rows.filter(Array.isArray):[];if(!e.length)return null;let r=t.header!==!1,a={border:t.borders===!1?void 0:`1px solid rgba(148, 163, 184, 0.4)`,padding:`6px 10px`,textAlign:`left`,verticalAlign:`top`},o=r?e.slice(1):e,s=Array.isArray(t.widths)?t.widths:null;return(0,N.jsxs)(`table`,{style:{...i,borderCollapse:`collapse`,width:`100%`,fontSize:`inherit`,tableLayout:s?`fixed`:void 0},children:[s&&(0,N.jsx)(`colgroup`,{children:s.map((e,t)=>(0,N.jsx)(`col`,{style:{width:`${e}%`}},t))}),r&&(0,N.jsx)(`thead`,{children:(0,N.jsx)(`tr`,{children:e[0].map((e,t)=>(0,N.jsx)(`th`,{style:{...a,fontWeight:700},children:e},t))})}),(0,N.jsx)(`tbody`,{children:o.map((e,t)=>(0,N.jsx)(`tr`,{children:e.map((e,t)=>(0,N.jsx)(`td`,{style:a,children:e},t))},t))})]},n)}if(t.type===`ul`||t.type===`ol`){let e=t.type;return(0,N.jsx)(e,{style:{...i,paddingLeft:24},children:(t.items??[]).map((e,t)=>(0,N.jsx)(`li`,{style:{marginBottom:4},children:r(e.parts,e.text)},t))},n)}if(t.type===`quote`)return(0,N.jsx)(`blockquote`,{style:{...Ge,...i},children:r(t.parts,t.text)},n);if(Ve[t.type]){let e=t.type;return(0,N.jsx)(e,{style:{...De,fontSize:Ve[t.type],...i},children:r(t.parts,t.text)},n)}return(0,N.jsx)(`p`,{style:{...Oe,...i},children:r(t.parts,t.text)},n)})}function We({content:e,style:t,linked:n,nodeRef:r}){return(0,N.jsx)(`div`,{ref:r,style:{display:`flow-root`,...m(t)},children:Ue(e,n)})}var Ge={margin:0,padding:`8px 0 8px 20px`,borderLeft:`4px solid var(--page-accent, rgba(148, 163, 184, 0.6))`};function Ke({text:e,parts:t,style:n,linked:r,nodeRef:i}){return(0,N.jsx)(`blockquote`,{ref:i,style:{...Ge,...m(n)},children:P(t,e,r)})}function qe({ordered:e,items:t=[],style:n,nodeRef:r}){return(0,N.jsx)(e?`ol`:`ul`,{ref:r,style:{margin:0,paddingLeft:24,...m(n)},children:t.map((e,t)=>(0,N.jsx)(`li`,{style:{marginBottom:4},children:P(e.parts,e.text)},t))})}function Je({text:e,parts:t,style:n,linked:r,nodeRef:i}){return(0,N.jsx)(`p`,{ref:i,style:{...Oe,...m(n)},children:P(t,e,r)})}var Ye={color:`var(--page-accent, inherit)`,textDecoration:`underline`,textUnderlineOffset:3,cursor:`pointer`};function Xe({text:e,parts:t,href:n,target:r,style:i,linked:a,nodeRef:o}){return(0,N.jsx)(`a`,{ref:o,href:n||`#`,target:r||void 0,rel:r===`_blank`?`noopener noreferrer`:void 0,style:{...Ye,...m(i)},children:P(t,e,a)})}function Ze({text:e,parts:t,href:n,target:r,style:i,linked:a,nodeRef:o}){return(0,N.jsx)(`a`,{ref:o,href:n||`#`,target:r||void 0,rel:r===`_blank`?`noopener noreferrer`:void 0,style:{...ke,...m(i)},children:P(t,e,a)})}function Qe({src:e,alt:t,style:n,nodeRef:r}){return e?(0,N.jsx)(`img`,{ref:r,src:e,alt:t||``,style:{display:`block`,maxWidth:`100%`,...m(n)}}):null}function $e({src:e,poster:t,controls:n=!0,autoplay:r=!1,loop:i=!1,muted:a=!1,style:o,nodeRef:s}){return e?(0,N.jsx)(`video`,{ref:s,src:e,poster:t||void 0,controls:n,autoPlay:r,muted:a||r,loop:i,playsInline:!0,style:{display:`block`,width:`100%`,maxWidth:`100%`,...m(o)}}):null}var et=(e=``)=>(e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/)||e.match(/^([\w-]{11})$/))?.[1];function tt({url:e,autoplay:t=!1,muted:n=!1,loop:r=!1,controls:i=!0,start:a,style:o,nodeRef:s}){let c=et(e);if(!c)return null;let l=new URLSearchParams({rel:`0`});return t&&l.set(`autoplay`,`1`),(n||t)&&l.set(`mute`,`1`),i||l.set(`controls`,`0`),r&&(l.set(`loop`,`1`),l.set(`playlist`,c)),Number(a)>0&&l.set(`start`,String(Math.floor(Number(a)))),(0,N.jsx)(`div`,{ref:s,style:{position:`relative`,width:`100%`,paddingTop:`56.25%`,...m(o)},children:(0,N.jsx)(`iframe`,{src:`https://www.youtube-nocookie.com/embed/${c}?${l}`,title:`YouTube video`,allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share`,allowFullScreen:!0,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,border:0}})})}function nt({src:e,title:t,allowFullscreen:n=!0,style:r,nodeRef:i}){return e?(0,N.jsx)(`iframe`,{ref:i,src:e,title:t||`Embedded frame`,loading:`lazy`,allowFullScreen:n,style:{display:`block`,width:`100%`,height:300,border:0,...m(r)}}):null}function rt({code:e,runScripts:t=!0,style:n,nodeRef:r}){let[i,a]=(0,l.useState)(null);return(0,l.useEffect)(()=>{i&&(i.innerHTML=e||``,t&&i.querySelectorAll(`script`).forEach(e=>{let t=document.createElement(`script`);for(let{name:n,value:r}of e.attributes)t.setAttribute(n,r);t.text=e.textContent,e.replaceWith(t)}))},[i,e,t]),(0,N.jsx)(`div`,{ref:e=>{a(e),r&&r(e)},style:m(n)})}function it({height:e,nodeRef:t}){return(0,N.jsx)(`div`,{ref:t,style:{height:e||32,flexShrink:0,alignSelf:`stretch`}})}function at({style:e,nodeRef:t}){return(0,N.jsx)(`div`,{ref:t,style:{height:1,alignSelf:`stretch`,flexShrink:0,...m(e)}})}var ot={position:`absolute`,top:`50%`,transform:`translateY(-50%)`,width:36,height:36,borderRadius:`50%`,border:0,cursor:`pointer`,background:`rgba(17, 24, 39, 0.45)`,color:`#fff`,fontSize:20,lineHeight:1,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:0},st={bottom:{inset:`auto 0 0 0`,padding:`40px 24px 20px`,background:`linear-gradient(transparent, rgba(0, 0, 0, 0.55))`},top:{inset:`0 0 auto 0`,padding:`20px 24px 40px`,background:`linear-gradient(rgba(0, 0, 0, 0.55), transparent)`},middle:{inset:0,display:`flex`,flexDirection:`column`,justifyContent:`center`,padding:24,textShadow:`0 2px 12px rgba(0, 0, 0, 0.6)`}},ct=48;function lt({count:e,renderSlide:t,autoplay:n=!0,interval:r=5,height:i=320,swipe:a=!0,style:o,nodeRef:s}){let[c,u]=(0,l.useState)(0),[d,f]=(0,l.useState)(!1),[p,h]=(0,l.useState)(null),g=e?Math.min(c,e-1):0;if((0,l.useEffect)(()=>{if(!n||d||p||e<2)return;let t=setInterval(()=>u(t=>(t+1)%e),Math.max(2,Number(r)||5)*1e3);return()=>clearInterval(t)},[n,d,p,r,e]),!e)return null;let _=t=>u((t+e)%e),v=()=>{if(!p)return;let{dx:e}=p;h(null),e<-48?_(g+1):e>ct&&_(g-1)};return(0,N.jsxs)(`div`,{ref:s,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),onPointerDown:a&&e>1?e=>{e.pointerType===`mouse`&&e.button!==0||e.target.closest(`button`)||(e.currentTarget.setPointerCapture(e.pointerId),h({startX:e.clientX,dx:0}))}:void 0,onPointerMove:p?e=>h(t=>t&&{...t,dx:e.clientX-t.startX}):void 0,onPointerUp:v,onPointerCancel:v,style:{position:`relative`,overflow:`hidden`,width:`100%`,touchAction:`pan-y`,userSelect:p?`none`:void 0,cursor:p?`grabbing`:void 0,...m(o)},children:[(0,N.jsx)(`div`,{style:{display:`flex`,height:i,transform:`translateX(calc(${-g*100}% + ${p?.dx??0}px))`,transition:p?`none`:`transform 450ms ease`},children:Array.from({length:e},(e,n)=>(0,N.jsx)(`div`,{style:{position:`relative`,width:`100%`,flexShrink:0,overflow:`hidden`},children:t(n)},n))}),e>1&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`button`,{type:`button`,"aria-label":`Previous slide`,style:{...ot,left:12},onClick:()=>_(g-1),children:`‹`}),(0,N.jsx)(`button`,{type:`button`,"aria-label":`Next slide`,style:{...ot,right:12},onClick:()=>_(g+1),children:`›`}),(0,N.jsx)(`div`,{style:{position:`absolute`,bottom:10,left:0,right:0,display:`flex`,justifyContent:`center`,gap:6},children:Array.from({length:e},(e,t)=>(0,N.jsx)(`button`,{type:`button`,"aria-label":`Go to slide ${t+1}`,onClick:()=>_(t),style:{width:8,height:8,borderRadius:`50%`,border:0,padding:0,cursor:`pointer`,background:t===g?`#ffffff`:`rgba(255, 255, 255, 0.45)`}},t))})]})]})}var ut=(e,t)=>({position:`absolute`,inset:0,backgroundImage:e?`url(${e})`:`none`,backgroundColor:t||(e?void 0:`rgba(148, 163, 184, 0.25)`),backgroundSize:`cover`,backgroundPosition:`center`});function dt({slides:e=[],captionPosition:t=`bottom`,captionAlign:n=`left`,...r}){return e.length?(0,N.jsx)(lt,{...r,count:e.length,renderSlide:r=>{let i=e[r];return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`div`,{style:ut(i.image)}),(i.title||i.text)&&(0,N.jsxs)(`div`,{style:{position:`absolute`,color:`#fff`,textAlign:n,...st[t]??st.bottom},children:[i.title&&(0,N.jsx)(`div`,{style:{fontSize:22,fontWeight:700},children:i.title}),i.text&&(0,N.jsx)(`div`,{style:{fontSize:14,opacity:.9,marginTop:4},children:i.text})]})]})}}):null}function ft({slides:e=[],linked:t,...n}){return e.length?(0,N.jsx)(lt,{...n,count:e.length,renderSlide:n=>{let r=e[n];return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`div`,{style:ut(r.image,r.color)}),(0,N.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,flexDirection:`column`},children:t?.[r.key]??null})]})}}):null}function pt({images:e=[],columns:t=3,gap:n=8,showNames:r=!1,lightbox:i=!0,style:a,nodeRef:o,inert:s}){let c=Array.isArray(e)?e.filter(e=>e&&typeof e==`object`&&e.src):[],u=Math.max(0,Number(n)||0),d=s?e=>e.preventDefault():void 0,[f,p]=(0,l.useState)(null),h=i&&!s&&f!==null&&c[f];(0,l.useEffect)(()=>{if(!h)return;let e=e=>{e.key===`Escape`&&p(null),e.key===`ArrowRight`&&p(e=>(e+1)%c.length),e.key===`ArrowLeft`&&p(e=>(e-1+c.length)%c.length)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h,c.length]);let g=e=>{if(typeof e.name==`string`&&e.name.trim())return e.name;if(typeof e.alt==`string`&&e.alt.trim())return e.alt;try{let t=String(e.src).split(`?`)[0].split(`/`).pop();return decodeURIComponent(t??``)}catch{return``}};return(0,N.jsxs)(`div`,{ref:o,style:{columnCount:Math.min(Math.max(Number(t)||3,1),8),columnGap:u,width:`100%`,...m(a)},children:[c.map((e,t)=>{let n=(0,N.jsxs)(`span`,{style:{position:`relative`,display:`block`,borderRadius:`inherit`,overflow:`hidden`},children:[(0,N.jsx)(`img`,{src:e.src,alt:e.alt??``,style:{width:`100%`,display:`block`,borderRadius:`inherit`}}),r&&g(e)&&(0,N.jsx)(`span`,{style:{position:`absolute`,insetInline:0,bottom:0,padding:`14px 10px 8px`,background:`linear-gradient(transparent, rgba(0, 0, 0, 0.65))`,color:`#fff`,fontSize:12,lineHeight:1.3,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:g(e)})]}),a=e.href?(0,N.jsx)(`a`,{href:e.href,onClick:d,target:e.target||void 0,rel:e.target===`_blank`?`noopener noreferrer`:void 0,style:{display:`block`,borderRadius:`inherit`},children:n}):i&&!s?(0,N.jsx)(`span`,{role:`button`,tabIndex:0,onClick:()=>p(t),onKeyDown:e=>(e.key===`Enter`||e.key===` `)&&p(t),style:{display:`block`,borderRadius:`inherit`,cursor:`zoom-in`},children:n}):n;return(0,N.jsx)(`div`,{style:{breakInside:`avoid`,marginBottom:u,borderRadius:`inherit`,overflow:`hidden`},children:a},t)}),!c.length&&(0,N.jsx)(`div`,{style:{padding:`24px 12px`,fontSize:13,opacity:.55,textAlign:`center`,columnSpan:`all`},children:`Pick images in Settings to fill the gallery`}),h&&(0,N.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,onClick:()=>p(null),style:{position:`fixed`,inset:0,zIndex:1400,background:`rgba(0, 0, 0, 0.86)`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:24},children:[(0,N.jsx)(`img`,{src:c[f].src,alt:c[f].alt??``,onClick:e=>e.stopPropagation(),style:{maxWidth:`92vw`,maxHeight:`84vh`,borderRadius:8,boxShadow:`0 12px 48px rgba(0,0,0,0.5)`}}),g(c[f])&&(0,N.jsx)(`div`,{style:{color:`#fff`,fontSize:14,marginTop:12,opacity:.85},children:g(c[f])}),(0,N.jsx)(`button`,{type:`button`,"aria-label":`Close`,onClick:()=>p(null),style:{position:`absolute`,top:16,right:20,background:`transparent`,border:0,color:`#fff`,fontSize:28,lineHeight:1,cursor:`pointer`},children:`×`}),c.length>1&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`button`,{type:`button`,"aria-label":`Previous`,onClick:e=>{e.stopPropagation(),p(e=>(e-1+c.length)%c.length)},style:{position:`absolute`,left:16,top:`50%`,transform:`translateY(-50%)`,background:`transparent`,border:0,color:`#fff`,fontSize:36,cursor:`pointer`,padding:12},children:`‹`}),(0,N.jsx)(`button`,{type:`button`,"aria-label":`Next`,onClick:e=>{e.stopPropagation(),p(e=>(e+1)%c.length)},style:{position:`absolute`,right:16,top:`50%`,transform:`translateY(-50%)`,background:`transparent`,border:0,color:`#fff`,fontSize:36,cursor:`pointer`,padding:12},children:`›`})]})]})]})}var mt={color:`inherit`,textDecoration:`none`,fontSize:14,opacity:.85},ht={background:`var(--page-bg, #ffffff)`,color:`var(--page-text, #111827)`,border:`1px solid rgba(148, 163, 184, 0.25)`,boxShadow:`0 16px 40px rgba(15, 23, 42, 0.16)`,zIndex:60};function gt({brand:e,logo:t,brandHref:n,brandTarget:r,links:i=[],style:a,nodeRef:o,menu:s=`auto`,breakpoint:c=768}){let[u,d]=(0,l.useState)(null),[f,p]=(0,l.useState)(!1),[h,g]=(0,l.useState)(!1),[_,v]=(0,l.useState)(null);(0,l.useEffect)(()=>{if(!u)return;let e=new ResizeObserver(()=>p(u.offsetWidth<c));return e.observe(u),()=>e.disconnect()},[u,c]);let y=s===`hamburger`||s===`auto`&&f,b=(e,t)=>(0,N.jsxs)(`a`,{href:e.href||`#`,style:{...mt,display:`block`,...t},children:[e.label,e.desc&&(0,N.jsx)(`span`,{style:{display:`block`,fontSize:12,opacity:.6,marginTop:2},children:e.desc})]},e.key);return(0,N.jsxs)(`nav`,{ref:e=>{d(e),o&&o(e)},style:{display:`flex`,alignItems:`center`,gap:24,flexWrap:`wrap`,padding:`14px 24px`,width:`100%`,position:`relative`,...m(a)},children:[(t||e)&&(()=>{let i=(0,N.jsxs)(N.Fragment,{children:[t&&(0,N.jsx)(`img`,{src:t,alt:e||`Logo`,style:{height:28,display:`block`}}),e&&(0,N.jsx)(`span`,{style:{fontWeight:700,fontSize:18,fontFamily:`var(--page-heading-font, inherit)`},children:e})]}),a={display:`flex`,alignItems:`center`,gap:10,color:`inherit`,textDecoration:`none`};return n?(0,N.jsx)(`a`,{href:n,target:r||void 0,rel:r===`_blank`?`noopener noreferrer`:void 0,style:a,children:i}):(0,N.jsx)(`div`,{style:a,children:i})})(),(0,N.jsx)(`div`,{style:{flexGrow:1}}),y?(0,N.jsx)(`button`,{type:`button`,"aria-label":h?`Close menu`:`Open menu`,onClick:()=>g(!h),style:{background:`transparent`,border:0,color:`inherit`,cursor:`pointer`,fontSize:20,lineHeight:1,padding:4},children:h?`✕`:`☰`}):(0,N.jsx)(`div`,{style:{display:`flex`,gap:20,alignItems:`center`,flexWrap:`wrap`},children:i.map(e=>{let t=e.children??[];if(!t.length)return(0,N.jsx)(`a`,{href:e.href||`#`,style:mt,children:e.label},e.key);let n=e.type===`mega`;return(0,N.jsxs)(`span`,{style:{position:n?`static`:`relative`,display:`inline-flex`},onMouseEnter:()=>v(e.key),onMouseLeave:()=>v(null),children:[(0,N.jsxs)(`a`,{href:e.href||`#`,style:{...mt,cursor:`pointer`},children:[e.label,` `,(0,N.jsx)(`span`,{style:{fontSize:9,opacity:.6},children:`▼`})]}),_===e.key&&(n?(0,N.jsx)(`div`,{style:{...ht,position:`absolute`,left:0,right:0,top:`100%`,padding:24,display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(170px, 1fr))`,gap:16},children:t.map(e=>b(e,{padding:`6px 8px`,borderRadius:6}))}):(0,N.jsx)(`div`,{style:{...ht,position:`absolute`,top:`100%`,left:0,minWidth:190,borderRadius:8,padding:8,display:`flex`,flexDirection:`column`},children:t.map(e=>b(e,{padding:`8px 12px`,borderRadius:6}))}))]},e.key)})}),y&&h&&(0,N.jsx)(`div`,{style:{flexBasis:`100%`,width:`100%`,display:`flex`,flexDirection:`column`,paddingTop:10},children:i.map(e=>(0,N.jsxs)(l.Fragment,{children:[(0,N.jsx)(`a`,{href:e.href||`#`,style:{...mt,padding:`10px 4px`,fontWeight:(e.children??[]).length?600:400,opacity:1},children:e.label}),(e.children??[]).map(e=>b(e,{padding:`8px 4px 8px 22px`}))]},e.key))})]})}function _t({tabs:e=[],linked:t,style:n,nodeRef:r}){let[i,a]=(0,l.useState)(0),o=e.length?Math.min(i,e.length-1):0;return e.length?(0,N.jsxs)(`div`,{ref:r,style:{width:`100%`,...m(n)},children:[(0,N.jsx)(`div`,{style:{display:`flex`,gap:4,borderBottom:`1px solid rgba(148, 163, 184, 0.35)`},children:e.map((e,t)=>(0,N.jsx)(`button`,{type:`button`,onClick:()=>a(t),style:{background:`transparent`,border:0,padding:`10px 16px`,fontSize:14,fontFamily:`inherit`,color:`inherit`,cursor:`pointer`,opacity:t===o?1:.6,fontWeight:t===o?600:500,boxShadow:t===o?`inset 0 -2px 0 var(--page-accent, #111827)`:`none`},children:e.label||`Tab ${t+1}`},e.key))}),e.map((e,n)=>(0,N.jsx)(`div`,{style:{display:n===o?`flex`:`none`,flexDirection:`column`},children:t?.[e.key]??null},e.key))]}):null}function vt({items:e=[],linked:t,multiple:n=!1,style:r,nodeRef:i}){let[a,o]=(0,l.useState)(()=>new Set(e.length?[e[0].key]:[]));if(!e.length)return null;let s=e=>o(t=>{let r=new Set(n?t:[]);return t.has(e)?r.delete(e):r.add(e),r});return(0,N.jsx)(`div`,{ref:i,style:{width:`100%`,...m(r)},children:e.map((n,r)=>{let i=a.has(n.key);return(0,N.jsxs)(`div`,{style:{borderBottom:r<e.length-1?`1px solid rgba(148, 163, 184, 0.35)`:`none`},children:[(0,N.jsxs)(`button`,{type:`button`,onClick:()=>s(n.key),style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:12,background:`transparent`,border:0,padding:`14px 4px`,fontSize:15,fontWeight:600,fontFamily:`inherit`,color:`inherit`,textAlign:`left`,cursor:`pointer`},children:[n.title||`Item ${r+1}`,(0,N.jsx)(`span`,{"aria-hidden":!0,style:{fontSize:12,opacity:.6,transform:i?`rotate(180deg)`:`none`,transition:`transform 180ms`},children:`▼`})]}),(0,N.jsx)(`div`,{style:{display:i?`flex`:`none`,flexDirection:`column`},children:t?.[n.key]??null})]},n.key)})})}var yt={display:`flex`,flexDirection:`column`,gap:`12px`},bt={fontSize:`14px`,fontWeight:500,color:`var(--page-text, #111827)`},xt={padding:`10px 12px`,border:`1px solid #d1d5db`,borderRadius:`6px`,fontSize:`14px`,fontFamily:`inherit`,width:`100%`,boxSizing:`border-box`,backgroundColor:`#ffffff`,color:`#111827`},St={display:`flex`,alignItems:`center`,gap:`8px`,fontSize:`14px`,color:`var(--page-text, #111827)`},F=e=>e?{readOnly:!0,tabIndex:-1,onMouseDown:e=>e.preventDefault()}:{};function Ct(e,t){if(!e)return!0;let n=t[e.field],r=n==null||n===``?``:String(n),i=e.value??``;switch(e.op){case`eq`:return r===i;case`neq`:return r!==i;case`contains`:return r.toLowerCase().includes(i.toLowerCase());case`gt`:return Number(r)>Number(i);case`lt`:return Number(r)<Number(i);case`empty`:return r===``;case`notEmpty`:return r!==``;default:return!1}}var wt={display:`flex`,flexDirection:`column`,gap:6},Tt={font:`inherit`,fontSize:15,padding:`10px 12px`,borderRadius:8,border:`1px solid rgba(148, 163, 184, 0.55)`,background:`transparent`,color:`inherit`,width:`100%`,boxSizing:`border-box`};function Et(e,t){let n=Array.isArray(e?.options)?e.options:[];if(!e?.parentField)return n;let r=t?.[e.parentField];return r?n.filter(e=>typeof e==`string`?!1:!e.parent||e.parent===r):[]}function Dt({field:e,value:t,onChange:n,inert:r,values:i}){let a=(0,N.jsxs)(`span`,{style:{...bt,fontSize:14},children:[e.label,e.required?` *`:``]}),o={name:e.name,required:e.required||void 0,placeholder:e.placeholder||void 0,disabled:r||void 0,style:Tt,value:t??``,onChange:t=>n(e.name,t.target.value)};return e.type===`display`?(0,N.jsx)(e.variant&&e.variant!==`p`?e.variant:`p`,{style:{margin:0,color:e.color||`inherit`,fontSize:{h1:32,h2:26,h3:21,h4:18,h5:16,h6:14,p:15}[e.variant]??16,fontWeight:e.variant===`p`?400:700,lineHeight:1.35},children:e.label}):e.type===`image`?e.src?(0,N.jsx)(`img`,{src:e.src,alt:e.label??``,style:{width:`100%`,borderRadius:8,display:`block`}}):null:e.type===`video`?e.src?/youtube\.com|youtu\.be|vimeo\.com/i.test(e.src)?(0,N.jsx)(tt,{url:e.src,style:{width:`100%`}}):(0,N.jsx)(`video`,{src:e.src,controls:!0,style:{width:`100%`,borderRadius:8,display:`block`}}):null:(0,N.jsxs)(`label`,{style:wt,children:[a,e.type===`textarea`||e.multiline?(0,N.jsx)(`textarea`,{...o,rows:4,style:{...Tt,resize:`vertical`}}):e.type===`select`?(0,N.jsxs)(`select`,{...o,disabled:o.disabled||!!e.parentField&&!i?.[e.parentField],children:[(0,N.jsx)(`option`,{value:``,children:e.placeholder||`—`}),Et(e,i).map((e,t)=>(0,N.jsx)(`option`,{value:typeof e==`string`?e:e.value,children:typeof e==`string`?e:e.label??e.value},t))]}):e.type===`checkbox`?(0,N.jsx)(`input`,{type:`checkbox`,name:e.name,required:e.required||void 0,disabled:r||void 0,checked:!!t,onChange:t=>n(e.name,t.target.checked),style:{width:18,height:18}}):e.type===`upload`?(0,N.jsx)(`input`,{type:`file`,name:e.name,accept:e.accept||void 0,required:e.required||void 0,disabled:r||void 0,onChange:t=>n(e.name,t.target.files?.[0]?.name??``),style:{font:`inherit`,fontSize:14}}):(0,N.jsx)(`input`,{...o,type:{email:`email`,number:`number`,date:`date`,datetime:`datetime-local`,phone:`tel`,link:`url`}[e.type]??`text`}),e.help&&(0,N.jsx)(`span`,{style:{fontSize:12,opacity:.65},children:e.help})]})}function Ot({style:e,action:t,method:n,name:r,enctype:i,formSlug:a,auto:o,submitLabel:s,nodeRef:c,inert:u,children:d,linked:f,show:p}){let{tenant:h,apiUrl:g}=(0,l.useContext)(ge),[_,v]=(0,l.useState)(`form`),[y,b]=(0,l.useState)(null),[x,S]=(0,l.useState)({}),[C,w]=(0,l.useState)(0),T=u?p||`form`:_;(0,l.useEffect)(()=>{if(!o||!a)return;let e=!0;return fetch(`${g||`/api`}/forms/${encodeURIComponent(a)}`,{headers:h?{"x-tenant":h}:{}}).then(e=>e.json()).then(t=>e&&b(t?.payload&&typeof t.payload==`object`?t.payload:null)).catch(()=>e&&b(null)),()=>{e=!1}},[o,a,h,g]);let E=[{section:null,fields:[]}];for(let e of Array.isArray(y?.fields)?y.fields:[])e.type===`section`?E.push({section:e,fields:[]}):E[E.length-1].fields.push(e);let D=E.filter(e=>e.section||e.fields.length),O=D.filter(e=>!e.section||Ct(e.section.condition,x)).map(e=>({...e,fields:e.fields.filter(e=>Ct(e.condition,x))})),ee=D.length>1,te=Math.min(C,Math.max(0,O.length-1)),ne=ee?O[te]?.fields??[]:O.flatMap(e=>e.fields),re=ne.filter(e=>{let t=x[e.name];return e.required&&(t==null||t===``||t===!1)}),ie=te>=O.length-1,ae=(e,t)=>S(n=>{let r={...n,[e]:t};for(let t of Array.isArray(y?.fields)?y.fields:[])t?.parentField===e&&delete r[t.name];return r});return(0,N.jsxs)(`div`,{ref:c,style:m(e),children:[(0,N.jsx)(`form`,{action:t||void 0,method:n||`post`,name:r||void 0,encType:i||void 0,onSubmit:async e=>{if(e.preventDefault(),!u){if(a){let t={};if(o)for(let[e,n]of Object.entries(x))n!=null&&n!==``&&(t[e]=n);else for(let[n,r]of new FormData(e.currentTarget).entries())typeof r==`string`&&(t[n]=r===`on`||r);try{let e=await fetch(`${g||`/api`}/forms/${a}/submit`,{method:`post`,headers:{"content-type":`application/json`,...h?{"x-tenant":h}:{}},body:JSON.stringify(t)}),n=await e.json().catch(()=>null);v(e.ok&&n?.success!==!1?`success`:`error`)}catch{v(`error`)}return}if(!t){v(`success`);return}try{let r=await fetch(t,{method:n||`post`,body:new FormData(e.currentTarget)});v(r.ok?`success`:`error`)}catch{v(`error`)}}},style:{...yt,display:T===`success`?`none`:`flex`},children:o&&a?(0,N.jsxs)(N.Fragment,{children:[ee&&(0,N.jsx)(Qt,{steps:O.map(e=>({label:e.section?.label??`Start`})),active:te+1,style:{marginBottom:8}}),ee&&O[te]?.section?.help&&(0,N.jsx)(`p`,{style:{margin:0,fontSize:14,opacity:.7},children:O[te].section.help}),ne.map(e=>(0,N.jsx)(Dt,{field:e,value:x[e.name],values:x,onChange:ae,inert:u},e.name)),(0,N.jsxs)(`div`,{style:{display:`flex`,gap:10,alignItems:`center`,marginTop:4},children:[ee&&te>0&&(0,N.jsx)(`button`,{type:`button`,disabled:u||void 0,onClick:()=>w(te-1),style:{...ke,background:`transparent`,color:`inherit`,border:0,padding:`10px 16px`,cursor:`pointer`},children:`Back`}),ee&&!ie?(0,N.jsx)(`button`,{type:`button`,disabled:u||re.length>0,onClick:()=>w(te+1),style:{...ke,border:0,padding:`10px 22px`,borderRadius:8,fontSize:15,fontWeight:600,cursor:`pointer`,opacity:re.length?.5:1},children:`Next`}):(0,N.jsx)(`button`,{type:`submit`,disabled:u||void 0,style:{...ke,border:0,padding:`10px 22px`,borderRadius:8,fontSize:15,fontWeight:600,cursor:`pointer`},children:s||`Submit`})]})]}):d}),(0,N.jsx)(`div`,{style:{display:T===`success`?`block`:`none`},children:f?.success??null}),(0,N.jsx)(`div`,{style:{display:T===`error`?`block`:`none`,marginTop:12},children:f?.error??null})]})}var kt=null,At=null,jt=e=>{let t=typeof e==`string`&&e.trim()?e.trim():``;if(kt&&At===t)return kt;if(kt&&typeof window<`u`){for(let e of[`grecaptcha`,`___grecaptcha_cfg`])try{delete window[e]}catch{window[e]=void 0}document.querySelectorAll(`script[src*="recaptcha"]`).forEach(e=>e.remove())}return At=t,kt=new Promise(e=>{if(typeof window>`u`)return;if(window.grecaptcha?.render)return e(window.grecaptcha);window.__webimRecaptchaReady=()=>e(window.grecaptcha);let n=document.createElement(`script`);n.src=`https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t?`&hl=${encodeURIComponent(t)}`:``}`,n.async=!0,document.head.appendChild(n)}),kt};function Mt({siteKey:e,theme:t,size:n,hl:r,style:i,nodeRef:a,inert:o,onChange:s}){let c=(0,l.useContext)(ge),u=c?.settings&&typeof c.settings==`object`?c.settings[`google.recaptchaKey`]:``,d=typeof e==`string`&&e.trim()||(typeof u==`string`?u.trim():``),f=(0,l.useRef)(null),p=(0,l.useRef)(s);if(p.current=s,(0,l.useEffect)(()=>{if(o||!d||!f.current)return;let e=!0,i=t=>{e&&typeof p.current==`function`&&p.current(t)};return jt(r).then(r=>{if(!(!e||!f.current||!r?.render)){f.current.innerHTML=``,i(``);try{r.render(f.current,{sitekey:d,theme:t===`dark`?`dark`:`light`,size:n===`compact`?`compact`:`normal`,callback:e=>i(typeof e==`string`?e:``),"expired-callback":()=>i(``),"error-callback":()=>i(``)})}catch{}}}),()=>{e=!1}},[o,d,t,n,r]),o){let e=t===`dark`;return(0,N.jsxs)(`div`,{ref:a,style:m(i),children:[(0,N.jsxs)(`div`,{style:{width:n===`compact`?164:302,boxSizing:`border-box`,padding:`12px 14px`,display:`flex`,alignItems:`center`,gap:12,borderRadius:4,border:`1px solid ${e?`#52565b`:`#d3d3d3`}`,background:e?`#222528`:`#f9f9f9`,color:e?`#f1f1f1`:`#282828`,fontSize:14,fontFamily:`Roboto, Arial, sans-serif`},children:[(0,N.jsx)(`span`,{style:{width:24,height:24,flexShrink:0,borderRadius:3,border:`2px solid ${e?`#8a8f94`:`#c1c1c1`}`,background:e?`#2f3337`:`#fff`}}),(0,N.jsx)(`span`,{style:{flexGrow:1},children:`I'm not a robot`}),(0,N.jsx)(`span`,{style:{fontSize:9,opacity:.6,textAlign:`center`,lineHeight:1.3},children:`reCAPTCHA`})]}),!d&&(0,N.jsx)(`div`,{style:{marginTop:6,fontSize:11,color:`#b45309`},children:`Set the google.recaptchaKey tenant setting (or a site key in Settings) to activate it.`})]})}return d?(0,N.jsx)(`div`,{ref:a,style:m(i),children:(0,N.jsx)(`div`,{ref:f})}):null}function Nt({text:e,parts:t,style:n,nodeRef:r,linked:i}){return(0,N.jsx)(`label`,{ref:r,style:{...bt,...m(n)},children:P(t,e,i)})}function Pt({type:e=`text`,name:t,placeholder:n,required:r,style:i,nodeRef:a,inert:o}){return(0,N.jsx)(`input`,{ref:a,type:e,name:t||void 0,placeholder:n,required:!o&&!!r,style:{...xt,...m(i)},...F(o)})}function Ft({name:e,placeholder:t,rows:n=4,required:r,style:i,nodeRef:a,inert:o}){return(0,N.jsx)(`textarea`,{ref:a,name:e||void 0,placeholder:t,rows:n,required:!o&&!!r,style:{...xt,resize:`vertical`,...m(i)},...F(o)})}function It({kind:e=`checkbox`,label:t,name:n,value:r,required:i,style:a,nodeRef:o,inert:s}){return(0,N.jsxs)(`label`,{ref:o,style:{...St,...m(a)},children:[(0,N.jsx)(`input`,{type:e,name:n||void 0,value:r||void 0,required:!s&&!!i,onClick:s?e=>e.preventDefault():void 0,tabIndex:s?-1:void 0,style:{margin:0,accentColor:`var(--page-accent, #111827)`}}),t]})}function Lt({name:e,placeholder:t,options:n=[],required:r,style:i,nodeRef:a,inert:o}){return(0,N.jsxs)(`select`,{ref:a,name:e||void 0,required:!o&&!!r,defaultValue:``,onMouseDown:o?e=>e.preventDefault():void 0,tabIndex:o?-1:void 0,style:{...xt,appearance:`auto`,...m(i)},children:[t!==``&&(0,N.jsx)(`option`,{value:``,disabled:!0,children:t??`Select…`}),n.map((e,t)=>(0,N.jsx)(`option`,{value:e,children:e},t))]})}function Rt({name:e,accept:t,required:n,text:r=`Choose a file…`,style:i,nodeRef:a,inert:o}){let[s,c]=(0,l.useState)(null);return(0,N.jsxs)(`label`,{ref:a,style:{...xt,display:`flex`,alignItems:`center`,gap:`8px`,cursor:o?`default`:`pointer`,borderStyle:`dashed`,color:s?`#111827`:`#6b7280`,...m(i)},children:[(0,N.jsx)(`input`,{type:`file`,name:e||void 0,accept:t||void 0,required:!o&&!!n,disabled:!!o,onChange:e=>c(e.target.files?.[0]?.name??null),style:{display:`none`}}),(0,N.jsx)(`span`,{"aria-hidden":!0,children:`📎`}),s??r]})}function zt({text:e=`Submit`,style:t,nodeRef:n,inert:r}){return(0,N.jsx)(`button`,{ref:n,type:r?`button`:`submit`,style:{...ke,border:0,cursor:`pointer`,alignSelf:`flex-start`,padding:`10px 22px`,borderRadius:8,fontSize:15,fontWeight:600,lineHeight:1.4,fontFamily:`inherit`,...m(t)},children:e})}function Bt({cols:e=2,rows:t=1,style:n,nodeRef:r,linked:i}){let a=Math.max(1,(Number(e)||1)*(Number(t)||1));return(0,N.jsx)(`div`,{ref:r,style:{display:`grid`,gridTemplateColumns:`repeat(${Math.max(1,Number(e)||1)}, minmax(0, 1fr))`,gap:16,width:`100%`,...m(n)},children:Array.from({length:a},(e,t)=>(0,N.jsx)(`div`,{style:{minWidth:0},children:i?.[`cell-${t}`]??null},t))})}function Vt({collection:e,limit:t=6,layout:n=`grid`,columns:r=3,imageField:i,titleField:a=`name`,textField:o,custom:s,templateId:c,paged:u,filters:d,style:f,nodeRef:p}){let{tenant:h,apiUrl:g,locale:_}=(0,l.useContext)(ge),v=(0,l.useContext)(xe),y=(0,l.useContext)(_e),b=be(d),x=JSON.stringify(b),S=x!==`{}`&&!e?.startsWith?.(`api:`),C=S?null:y?.[e],w=u?ve(y):1,[T,E]=(0,l.useState)(null);if((0,l.useEffect)(()=>{if(!e||C)return;let n=!0,r=new URLSearchParams;if(_&&r.set(`locale`,_),S&&r.set(`data_filter`,x),u&&!e.startsWith(`api:`)){let e=Math.max(1,Number(t)||6);r.set(`offset`,String((w-1)*e)),r.set(`limit`,String(e))}let i=r.toString(),a=e.startsWith(`api:`)?`${g}/data/${encodeURIComponent(e.slice(4))}`:`${g}/dynamic/${encodeURIComponent(e)}${i?`?${i}`:``}`;return fetch(a,{headers:h?{"x-tenant":h}:{}}).then(e=>e.json()).then(e=>{let t=Array.isArray(e?.payload)?e.payload:Array.isArray(e?.payload?.data)?e.payload.data:[];return n&&E(t.filter(e=>e&&typeof e==`object`))}).catch(()=>n&&E([])),()=>{n=!1}},[e,h,g,_,C,u,w,t,S,x]),!e)return null;let D=Math.max(1,Number(t)||6),O=u?C||e.startsWith(`api:`)?(C??T??[]).slice((w-1)*D,w*D):(T??[]).slice(0,D):(C??T??[]).slice(0,D),ee=Math.min(Math.max(Number(r)||3,1),6),te=n===`list`?{display:`flex`,flexDirection:`column`,gap:20}:{display:`grid`,gridTemplateColumns:`repeat(${ee}, minmax(0, 1fr))`,gap:24};return s&&c&&v?.render?(0,N.jsx)(`div`,{ref:p,style:{width:`100%`,...te,...m(f)},children:O.map(e=>(0,N.jsx)(`div`,{style:{minWidth:0},children:v.render(c,t=>Ee(t,e))},e.id??e?.data?.slug))}):(0,N.jsx)(`div`,{ref:p,style:{width:`100%`,...te,...m(f)},children:O.map(e=>{let t=i?Ce(e?.data,i):null,r=a?Te(Ce(e?.data,a)):null,s=o?Ce(e?.data,o):null,c=Array.isArray(s)?s:null,l=c||s==null?null:Te(s),u=n===`list`;return(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:u?`row`:`column`,gap:u?20:12,alignItems:u?`center`:`stretch`,minWidth:0},children:[t&&(0,N.jsx)(`img`,{src:t,alt:r??``,style:{width:u?160:`100%`,aspectRatio:`3 / 2`,objectFit:`cover`,borderRadius:10,flexShrink:0,display:`block`}}),(0,N.jsxs)(`div`,{style:{minWidth:0},children:[r&&(0,N.jsx)(`h3`,{style:{margin:0,fontSize:18,fontWeight:700},children:r}),l&&(0,N.jsx)(`p`,{style:{margin:`6px 0 0`,fontSize:14,lineHeight:1.55,opacity:.75},children:l}),c&&(0,N.jsx)(`div`,{style:{marginTop:6,fontSize:14,lineHeight:1.55,opacity:.85},children:Ue(c)})]})]},e.id??e?.data?.slug)})})}function Ht({fields:e=[],buttonLabel:t=`Search`,style:n,nodeRef:r,inert:i}){let a=Array.isArray(e)?e.filter(e=>e&&typeof e==`object`&&typeof e.name==`string`&&e.name):[],o=i?{}:ye(),s={height:34,padding:`0 12px`,borderRadius:8,border:`1px solid var(--page-border, rgba(100, 116, 139, 0.4))`,background:`var(--page-bg, #ffffff)`,color:`var(--page-text, #111827)`,fontSize:13,fontFamily:`inherit`,outline:`none`,minWidth:140,flex:`0 1 auto`,boxSizing:`border-box`},c=e=>{let t=e&&typeof e==`object`?e.value:e,n=e&&typeof e==`object`?e.label??e.value:e;return{value:String(t??``),label:String(n??``)}};return(0,N.jsxs)(`form`,{ref:r,method:`get`,onSubmit:i?e=>e.preventDefault():void 0,style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:8,width:`100%`,...m(n)},children:[a.map(e=>Array.isArray(e.options)&&e.options.length>0||e.type===`option`||e.type===`select`?(0,N.jsxs)(`select`,{name:`f_${e.name}`,defaultValue:o[e.name]??``,style:s,...F(i),children:[(0,N.jsx)(`option`,{value:``,children:e.label||e.name}),(Array.isArray(e.options)?e.options:[]).map(e=>{let t=c(e);return(0,N.jsx)(`option`,{value:t.value,children:t.label},t.value)})]},e.name):e.type===`switch`?(0,N.jsxs)(`select`,{name:`f_${e.name}`,defaultValue:o[e.name]??``,style:s,...F(i),children:[(0,N.jsx)(`option`,{value:``,children:e.label||e.name}),(0,N.jsx)(`option`,{value:`true`,children:`Yes`}),(0,N.jsx)(`option`,{value:`false`,children:`No`})]},e.name):(0,N.jsx)(`input`,{type:`text`,name:`f_${e.name}`,defaultValue:o[e.name]??``,placeholder:e.label||e.name,style:s,...F(i)},e.name)),(0,N.jsx)(`button`,{type:`submit`,style:{...s,minWidth:0,padding:`0 18px`,border:`none`,background:`var(--page-accent, #111827)`,color:`var(--page-accent-text, #ffffff)`,fontWeight:600,cursor:i?`default`:`pointer`},...F(i),children:t})]})}function Ut({items:e=[],separator:t=`/`,style:n,nodeRef:r}){return e.length?(0,N.jsx)(`nav`,{ref:r,"aria-label":`Breadcrumb`,style:{...m(n)},children:(0,N.jsx)(`ol`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:8,listStyle:`none`,margin:0,padding:0,fontSize:14},children:e.map((n,r)=>{let i=r===e.length-1;return(0,N.jsxs)(`li`,{style:{display:`flex`,alignItems:`center`,gap:8,minWidth:0},children:[r>0&&(0,N.jsx)(`span`,{style:{opacity:.4},"aria-hidden":!0,children:t}),i||!n.href?(0,N.jsx)(`span`,{style:{fontWeight:i?600:400,opacity:i?1:.7},"aria-current":i?`page`:void 0,children:n.label}):(0,N.jsx)(`a`,{href:n.href,style:{color:`inherit`,opacity:.7,textDecoration:`none`},children:n.label})]},r)})})}):null}function Wt({pages:e=5,current:t=1,prevNext:n=!0,href:r=`#`,source:i,pageSize:a=6,align:o,hideEmpty:s,inert:c,style:u,nodeRef:d}){let{tenant:f,apiUrl:p}=(0,l.useContext)(ge),h=(0,l.useContext)(_e),[g,_]=(0,l.useState)(null),v=i?Number(h?.[`${i}:total`]):NaN;(0,l.useEffect)(()=>{if(!i||Number.isFinite(v))return;let e=!0,t=i.startsWith(`api:`)?`${p}/data/${encodeURIComponent(i.slice(4))}`:`${p}/dynamic/${encodeURIComponent(i)}?limit=1`;return fetch(t,{headers:f?{"x-tenant":f}:{}}).then(e=>e.json()).then(t=>{if(!e)return;let n=t?.payload,r=Array.isArray(n)?n.length:Number(n?.total?.filtered??n?.total?.all??(Array.isArray(n?.data)?n.data.length:0));_(Number.isFinite(r)?r:0)}).catch(()=>e&&_(0)),()=>{e=!1}},[i,f,p,v]);let y=Math.max(1,Number(a)||6),b=Number.isFinite(v)?v:g;if(i&&b===null||i&&s&&!(b>0))return null;let x=Math.min(Math.max(i?Math.ceil(b/y):Number(e)||1,1),50),S=Math.min(Math.max(i?ve(h):Number(t)||1,1),x),C=e=>{if(i){if(typeof window<`u`){let t=new URLSearchParams(window.location.search);return t.set(`page`,String(e)),`?${t.toString()}`}return`?page=${e}`}return r&&r!==`#`?r.replace(`{page}`,String(e)):`#`},w=o===`center`?`center`:o===`right`?`flex-end`:`flex-start`,T=c?e=>e.preventDefault():void 0,E=e=>({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,minWidth:36,height:36,padding:`0 8px`,borderRadius:8,fontSize:14,textDecoration:`none`,color:e?`var(--page-accent-text, #ffffff)`:`inherit`,background:e?`var(--page-accent, #111827)`:`transparent`,border:e?`1px solid transparent`:`1px solid rgba(148, 163, 184, 0.4)`});return(0,N.jsxs)(`nav`,{ref:d,"aria-label":`Pagination`,style:{display:`flex`,flexWrap:`wrap`,gap:8,alignItems:`center`,justifyContent:w,...m(u)},children:[n&&(0,N.jsx)(`a`,{href:S>1?C(S-1):`#`,onClick:T,"aria-label":`Previous`,style:{...E(!1),opacity:S>1?1:.4},children:`‹`}),Array.from({length:x},(e,t)=>t+1).map(e=>(0,N.jsx)(`a`,{href:C(e),onClick:T,"aria-current":e===S?`page`:void 0,style:E(e===S),children:e},e)),n&&(0,N.jsx)(`a`,{href:S<x?C(S+1):`#`,onClick:T,"aria-label":`Next`,style:{...E(!1),opacity:S<x?1:.4},children:`›`})]})}var Gt=`webim.page_mode`,Kt=()=>{if(typeof window>`u`)return`auto`;try{let e=window.localStorage.getItem(Gt);return e===`light`||e===`dark`?e:`auto`}catch{return`auto`}},qt=e=>{let t={width:16,height:16,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0};return e===`light`?(0,N.jsxs)(`svg`,{...t,children:[(0,N.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,N.jsx)(`path`,{d:`M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4`})]}):e===`dark`?(0,N.jsx)(`svg`,{...t,children:(0,N.jsx)(`path`,{d:`M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z`})}):(0,N.jsxs)(`svg`,{...t,children:[(0,N.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`14`,rx:`2`}),(0,N.jsx)(`path`,{d:`M8 21h8M12 17v4`})]})},Jt={light:`Light theme`,dark:`Dark theme`,auto:`Follow the device theme`};function Yt({variant:e,showSystem:t,style:n,nodeRef:r,inert:i}){let[a,o]=(0,l.useState)(i?`auto`:Kt),s=(0,l.useRef)(null),c=e=>{s.current=e,typeof r==`function`&&r(e)};(0,l.useEffect)(()=>{if(i)return;let e=s.current?.closest?.(`.webim-page`);e&&(a===`light`||a===`dark`?e.setAttribute(`data-webim-mode`,a):e.removeAttribute(`data-webim-mode`));try{a===`auto`?window.localStorage.removeItem(Gt):window.localStorage.setItem(Gt,a)}catch{}},[a,i]);let u=t===!1?[`light`,`dark`]:[`light`,`dark`,`auto`],d=u.includes(a)?a:u[0],f={appearance:`none`,border:0,margin:0,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,background:`transparent`,color:`inherit`,font:`inherit`,cursor:i?`default`:`pointer`,borderRadius:999};if(e===`buttons`)return(0,N.jsx)(`div`,{ref:c,role:`group`,"aria-label":`Theme`,style:{display:`inline-flex`,alignItems:`center`,gap:2,padding:3,borderRadius:999,border:`1px solid rgba(148, 163, 184, 0.4)`,...m(n)},children:u.map(e=>(0,N.jsx)(`button`,{type:`button`,title:Jt[e],"aria-label":Jt[e],"aria-pressed":e===d,onClick:i?void 0:()=>o(e),style:{...f,width:28,height:28,color:e===d?`var(--page-accent-text, #ffffff)`:`inherit`,background:e===d?`var(--page-accent, #111827)`:`transparent`,opacity:e===d?1:.7},children:qt(e)},e))});let p=u[(u.indexOf(d)+1)%u.length];return(0,N.jsx)(`button`,{ref:c,type:`button`,title:Jt[d],"aria-label":`Theme: ${Jt[d]} — switch to ${Jt[p]}`,onClick:i?void 0:()=>o(p),style:{...f,width:36,height:36,border:`1px solid rgba(148, 163, 184, 0.4)`,...m(n)},children:qt(d)})}var Xt={facebook:{label:`Facebook`,color:`#1877f2`,d:`M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z`},instagram:{label:`Instagram`,color:`#e4405f`,d:`M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06zm0 5.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z`},x:{label:`X (Twitter)`,color:`#000000`,d:`M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z`},linkedin:{label:`LinkedIn`,color:`#0a66c2`,d:`M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z`},youtube:{label:`YouTube`,color:`#ff0000`,d:`M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z`},tiktok:{label:`TikTok`,color:`#000000`,d:`M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z`},whatsapp:{label:`WhatsApp`,color:`#25d366`,d:`M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z`},telegram:{label:`Telegram`,color:`#26a5e4`,d:`M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z`},pinterest:{label:`Pinterest`,color:`#bd081c`,d:`M12 0C5.373 0 0 5.372 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.218-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.782c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.03-.655 2.569-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12 24c6.627 0 12-5.373 12-12 0-6.628-5.373-12-12-12z`},github:{label:`GitHub`,color:`#181717`,d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`},discord:{label:`Discord`,color:`#5865f2`,d:`M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.058a.082.082 0 00.031.056 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.873-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.009c.12.099.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.331c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z`},email:{label:`E-mail`,color:`#64748b`,d:`M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z`},website:{label:`Website`,color:`#64748b`,d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z`}};function Zt({links:e=[],variant:t,color:n,size:r,gap:i,newTab:a,style:o,nodeRef:s,inert:c}){let l=Array.isArray(e)?e.filter(e=>e&&Xt[e.network]):[];if(!l.length)return null;let u=Math.min(Math.max(Number(r)||18,10),64),d=Math.round(u*1.9),f=Number.isFinite(Number(i))?Number(i):10,p=e=>n===`accent`?`var(--page-accent, #111827)`:n===`inherit`?`currentColor`:e.color,h=c?e=>e.preventDefault():void 0;return(0,N.jsx)(`div`,{ref:s,style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:f,...m(o)},children:l.map((e,r)=>{let i=Xt[e.network],o=t!==`outline`&&t!==`plain`,s=o?n===`accent`?`var(--page-accent-text, #ffffff)`:n===`inherit`?`var(--page-bg, #ffffff)`:`#ffffff`:p(i);return(0,N.jsx)(`a`,{href:e.url||`#`,onClick:h,"aria-label":e.label||i.label,title:e.label||i.label,...a!==!1&&!c?{target:`_blank`,rel:`noopener noreferrer`}:{},style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,width:t===`plain`?u:d,height:t===`plain`?u:d,borderRadius:`50%`,background:o?p(i):`transparent`,border:t===`outline`?`1px solid ${p(i)}`:`none`,color:`inherit`,textDecoration:`none`},children:(0,N.jsx)(`svg`,{width:u,height:u,viewBox:`0 0 24 24`,fill:s,"aria-hidden":!0,children:(0,N.jsx)(`path`,{d:i.d})})},`${e.network}-${r}`)})})}function Qt({steps:e=[],active:t=1,vertical:n=!1,style:r,nodeRef:i}){if(!e.length)return null;let a=Math.min(Math.max(Number(t)||1,1),e.length),o=e=>({width:32,height:32,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:14,fontWeight:600,flexShrink:0,color:e===`todo`?`inherit`:`var(--page-accent-text, #ffffff)`,background:e===`todo`?`transparent`:`var(--page-accent, #111827)`,border:e===`todo`?`1px solid rgba(148, 163, 184, 0.5)`:`1px solid transparent`,opacity:e===`todo`?.6:1,boxShadow:e===`active`?`0 0 0 4px rgba(99, 102, 241, 0.2)`:`none`}),s=e=>({flexGrow:1,alignSelf:`center`,background:e?`var(--page-accent, #111827)`:`rgba(148, 163, 184, 0.4)`,...n?{width:2,minHeight:24,marginLeft:15,alignSelf:`auto`}:{height:2,minWidth:24}});return(0,N.jsx)(`div`,{ref:i,style:{display:`flex`,flexDirection:n?`column`:`row`,alignItems:n?`stretch`:`flex-start`,gap:n?4:8,...m(r)},children:e.map((e,t)=>{let r=t+1,i=r<a?`done`:r===a?`active`:`todo`;return(0,N.jsxs)(l.Fragment,{children:[t>0&&(0,N.jsx)(`div`,{style:s(r<=a),"aria-hidden":!0}),(0,N.jsxs)(`div`,{style:{display:`flex`,flexDirection:n?`row`:`column`,alignItems:`center`,gap:8,minWidth:0,textAlign:n?`left`:`center`},children:[(0,N.jsx)(`div`,{style:o(i),children:i===`done`?`✓`:r}),(0,N.jsxs)(`div`,{style:{minWidth:0},children:[(0,N.jsx)(`div`,{style:{fontSize:13,fontWeight:i===`active`?700:500,opacity:i===`todo`?.6:1},children:e.label}),e.description&&(0,N.jsx)(`div`,{style:{fontSize:12,opacity:.6},children:e.description})]})]})]},t)})})}var $t={small:{w:132,h:46,name:11.5,title:10,avatar:28},medium:{w:168,h:56,name:13,title:11,avatar:36},large:{w:210,h:70,name:15.5,title:12.5,avatar:46}},en=e=>$t[e]??$t.medium;$t.medium.w,$t.medium.h;function tn(e,{size:t=`medium`,horizontal:n=!1}={}){let r=en(t),i=n?r.h:r.w,a=n?16:20,o=(n?r.w:r.h)+(n?56:48),s=Array.isArray(e)?e.filter(e=>e&&e.id):[],c=new Set(s.map(e=>e.id)),l=new Map,u=[];for(let e of s)e.parent&&c.has(e.parent)&&e.parent!==e.id?(l.has(e.parent)||l.set(e.parent,[]),l.get(e.parent).push(e)):u.push(e);let d=new Map,f=(e,t)=>{if(t.has(e.id))return 0;t.add(e.id);let n=(l.get(e.id)??[]).reduce((e,n,r)=>e+f(n,t)+(r?a:0),0),r=Math.max(i,n);return d.set(e.id,r),r};u.forEach(e=>f(e,new Set));let p=[],m=[],h=0,g=(e,t,s,c)=>{if(c.has(e.id))return;c.add(e.id);let u=t+((d.get(e.id)??i)-i)/2,f=s*o,_=n?f:u,v=n?u:f;p.push({node:e,x:_,y:v}),h=Math.max(h,f+(n?r.w:r.h));let y=t;for(let t of l.get(e.id)??[]){let e=y+((d.get(t.id)??i)-i)/2+i/2,l=(s+1)*o;m.push(n?{from:{x:f+r.w,y:u+r.h/2},to:{x:l,y:e}}:{from:{x:u+r.w/2,y:f+r.h},to:{x:e,y:l}}),g(t,y,s+1,c),y+=(d.get(t.id)??i)+a}},_=0,v=new Set;for(let e of u)g(e,_,0,v),_+=(d.get(e.id)??i)+a;let y=Math.max(_-a,i);return{boxes:p,links:m,width:n?Math.max(h,r.w):y,height:n?y:Math.max(h,r.h),horizontal:n}}var nn=(e,t)=>{let n=String(e??``);return n.length>t?`${n.slice(0,t-1)}…`:n},rn=e=>{let t=/^#([0-9a-f]{6}|[0-9a-f]{3})$/i.exec(String(e??``).trim());if(!t)return`#ffffff`;let n=t[1];n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=parseInt(n,16);return .299*(r>>16&255)+.587*(r>>8&255)+.114*(r&255)>150?`#111827`:`#ffffff`},an=e=>!!(e?.cv?.trim?.()||e?.photo);function on(e,t={}){let n=Array.isArray(e)?e.filter(e=>e&&typeof e==`object`&&e.id):[],r=e=>Array.isArray(e)?e[0]:e,i=e=>e==null?``:Te(e);return n.map(e=>{let n=e.data??{},a=r(n[t.parentField]),o=a&&typeof a==`object`?a.id??null:a||null;return{id:e.id,name:i(n[t.nameField||`name`])||i(n.name)||`Untitled`,title:t.titleField?i(n[t.titleField]):``,photo:t.photoField&&r(n[t.photoField])||``,parent:t.parentField?o:null,cv:t.cvField?i(n[t.cvField]):``,href:t.hrefField?i(n[t.hrefField]):``}})}var sn={size:36,pad:10};function cn({node:e,onClose:t}){return(0,l.useEffect)(()=>{let e=e=>e.key===`Escape`&&t();return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),(0,N.jsx)(`div`,{onClick:t,role:`dialog`,"aria-modal":`true`,"aria-label":e.name,style:{position:`fixed`,inset:0,zIndex:1e3,background:`rgba(15, 23, 42, 0.55)`,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:16},children:(0,N.jsxs)(`div`,{onClick:e=>e.stopPropagation(),style:{background:`var(--page-bg, #ffffff)`,color:`var(--page-text, #111827)`,borderRadius:14,maxWidth:420,width:`100%`,maxHeight:`80vh`,overflowY:`auto`,padding:24,position:`relative`,boxShadow:`0 24px 64px rgba(15, 23, 42, 0.35)`},children:[(0,N.jsx)(`button`,{type:`button`,"aria-label":`Close`,onClick:t,style:{position:`absolute`,top:10,right:10,width:30,height:30,border:0,borderRadius:8,background:`transparent`,color:`inherit`,fontSize:18,lineHeight:1,cursor:`pointer`,opacity:.6},children:`×`}),(0,N.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:e.cv?14:0},children:[e.photo&&(0,N.jsx)(`img`,{src:e.photo,alt:``,style:{width:72,height:72,borderRadius:`50%`,objectFit:`cover`,flexShrink:0}}),(0,N.jsxs)(`div`,{style:{minWidth:0},children:[(0,N.jsx)(`div`,{style:{fontSize:18,fontWeight:700},children:e.name}),e.title&&(0,N.jsx)(`div`,{style:{fontSize:13,opacity:.65},children:e.title})]})]}),e.cv&&String(e.cv).split(/\n+/).map((e,t)=>(0,N.jsx)(`p`,{style:{fontSize:14,lineHeight:1.6,margin:`0 0 10px`},children:e},t)),e.href&&(0,N.jsx)(`a`,{href:e.href,target:`_blank`,rel:`noopener noreferrer`,style:{display:`inline-block`,marginTop:6,padding:`8px 14px`,borderRadius:8,fontSize:13,fontWeight:600,textDecoration:`none`,background:`var(--page-accent, #4f46e5)`,color:`var(--page-accent-text, #ffffff)`},children:`Open profile ↗`})]})})}function ln({nodes:e=[],source:t,nameField:n,titleField:r,photoField:i,parentField:a,cvField:o,hrefField:s,size:c=`medium`,horizontal:u=!1,style:d,nodeRef:f,interactive:p=!0}){let h=(0,l.useId)(),[g,_]=(0,l.useState)(null),{tenant:v,apiUrl:y}=(0,l.useContext)(ge),b=(0,l.useContext)(_e)?.[t],[x,S]=(0,l.useState)(null);(0,l.useEffect)(()=>{if(!t||b)return;let e=!0;return fetch(`${y}/dynamic/${encodeURIComponent(t)}`,{headers:v?{"x-tenant":v}:{}}).then(e=>e.json()).then(t=>{let n=Array.isArray(t?.payload)?t.payload:Array.isArray(t?.payload?.data)?t.payload.data:[];e&&S(n)}).catch(()=>e&&S([])),()=>{e=!1}},[t,v,y,b]);let C=t?on(b??x??[],{nameField:n,titleField:r,photoField:i,parentField:a,cvField:o,hrefField:s}):e,w=en(c),{boxes:T,links:E,width:D,height:O}=tn(C,{size:c,horizontal:u});if(!T.length)return!p&&t?(0,N.jsxs)(`div`,{ref:f,style:{padding:18,border:`1px dashed rgba(148, 163, 184, 0.6)`,borderRadius:10,fontSize:13,opacity:.7,textAlign:`center`,...m(d)},children:[`Org Chart — no published entries in “`,t,`” yet`]}):null;let ee=new Set(T.filter(e=>e.node.parent==null||e.node.parent===``).map(e=>e.node.id));return(0,N.jsxs)(`div`,{ref:f,style:{maxWidth:`100%`,overflowX:`auto`,...m(d)},children:[(0,N.jsxs)(`svg`,{viewBox:`0 0 ${D} ${O}`,role:`img`,"aria-label":`Organization chart`,style:{display:`block`,width:`100%`,maxWidth:D,height:`auto`,margin:`0 auto`},children:[E.map((e,t)=>(0,N.jsx)(`path`,{d:u?`M ${e.from.x} ${e.from.y} H ${(e.from.x+e.to.x)/2} V ${e.to.y} H ${e.to.x}`:`M ${e.from.x} ${e.from.y} V ${(e.from.y+e.to.y)/2} H ${e.to.x} V ${e.to.y}`,fill:`none`,stroke:`rgba(148, 163, 184, 0.7)`,strokeWidth:`1.5`},t)),T.map(({node:e,x:t,y:n})=>{let r=ee.has(e.id),i=!!e.color2,a=!!e.color||r||i,o=e.color||(r?`var(--page-accent, #4f46e5)`:`var(--page-bg, #ffffff)`),s=e.color?rn(e.color):r?`var(--page-accent-text, #ffffff)`:`var(--page-text, #111827)`,c=i?rn(e.color2):s,l=p&&(an(e)||e.href),u=()=>an(e)?_(e):window.open(e.href,`_blank`,`noreferrer`),d=e.photo?t+sn.pad+w.avatar+8:t+w.w/2,f=e.photo?`start`:`middle`,m=e.photo?Math.floor((w.w-w.avatar-26)/7):Math.floor(w.w/7.6),g=w.h/2,v=[e.name,e.title].map(e=>String(e??``).trim()).filter(Boolean);return(0,N.jsxs)(`g`,{onClick:l?u:void 0,style:l?{cursor:`pointer`}:void 0,role:l?`button`:void 0,"aria-label":l?`Open ${e.name||e.title}'s profile`:void 0,children:[i&&e.gradient?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`linearGradient`,{id:`${h}-${e.id}-grad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,N.jsx)(`stop`,{offset:`0%`,stopColor:e.color||`var(--page-accent, #4f46e5)`}),(0,N.jsx)(`stop`,{offset:`100%`,stopColor:e.color2})]}),(0,N.jsx)(`rect`,{x:t,y:n,width:w.w,height:w.h,rx:`10`,fill:`url(#${h}-${e.id}-grad)`})]}):i?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`clipPath`,{id:`${h}-${e.id}-box`,children:(0,N.jsx)(`rect`,{x:t,y:n,width:w.w,height:w.h,rx:`10`})}),(0,N.jsxs)(`g`,{clipPath:`url(#${h}-${e.id}-box)`,children:[(0,N.jsx)(`rect`,{x:t,y:n,width:w.w,height:g,fill:o}),(0,N.jsx)(`rect`,{x:t,y:n+g,width:w.w,height:w.h-g,fill:e.color2})]})]}):(0,N.jsx)(`rect`,{x:t,y:n,width:w.w,height:w.h,rx:`10`,fill:o,stroke:a?`none`:`var(--page-accent, #4f46e5)`,strokeWidth:a?0:1.5}),e.photo&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`clipPath`,{id:`${h}-${e.id}`,children:(0,N.jsx)(`circle`,{cx:t+sn.pad+w.avatar/2,cy:n+w.h/2,r:w.avatar/2})}),(0,N.jsx)(`image`,{href:e.photo,x:t+sn.pad,y:n+(w.h-w.avatar)/2,width:w.avatar,height:w.avatar,preserveAspectRatio:`xMidYMid slice`,clipPath:`url(#${h}-${e.id})`})]}),i&&!e.gradient?(0,N.jsxs)(N.Fragment,{children:[e.title&&(0,N.jsx)(`text`,{x:d,y:n+g/2+w.title*.35,textAnchor:f,fontSize:w.title,fontWeight:`600`,fill:s,children:nn(e.title,m+4)}),e.name&&(0,N.jsx)(`text`,{x:d,y:n+g+g/2+w.name*.35,textAnchor:f,fontSize:w.name,fontWeight:`600`,fill:c,children:nn(e.name,m)})]}):(0,N.jsxs)(N.Fragment,{children:[v[0]&&(0,N.jsx)(`text`,{x:d,y:n+(v[1]?w.h*.43:w.h*.57),textAnchor:f,fontSize:w.name,fontWeight:`600`,fill:s,children:nn(v[0],m)}),v[1]&&(0,N.jsx)(`text`,{x:d,y:n+w.h*.73,textAnchor:f,fontSize:w.title,opacity:`0.7`,fill:s,children:nn(v[1],m+4)})]})]},e.id)})]}),g&&(0,N.jsx)(cn,{node:g,onClose:()=>_(null)})]})}function un({columns:e=[],rows:t=[],source:n,limit:r=10,striped:i=!0,bordered:a=!1,compact:o=!1,paged:s,emptyText:c,style:u,nodeRef:d}){let{tenant:f,apiUrl:p}=(0,l.useContext)(ge),h=(0,l.useContext)(_e),g=h?.[n],_=s?ve(h):1,[v,y]=(0,l.useState)(null);if((0,l.useEffect)(()=>{if(!n||g)return;let e=!0,t=Math.max(1,Number(r)||10),i=s&&!n.startsWith(`api:`)?`?offset=${(_-1)*t}&limit=${t}`:``,a=n.startsWith(`api:`)?`${p}/data/${encodeURIComponent(n.slice(4))}`:`${p}/dynamic/${encodeURIComponent(n)}${i}`;return fetch(a,{headers:f?{"x-tenant":f}:{}}).then(e=>e.json()).then(t=>{let n=Array.isArray(t?.payload)?t.payload:Array.isArray(t?.payload?.data)?t.payload.data:[];return e&&y(n)}).catch(()=>e&&y([])),()=>{e=!1}},[n,f,p,g,s,_,r]),!e.length)return null;let b=Math.max(1,Number(r)||10),x=n?s?g||n.startsWith(`api:`)?(g??v??[]).slice((_-1)*b,_*b):(v??[]).slice(0,b):(g??v??[]).slice(0,b):null,S=x?x.map(t=>e.map(e=>Te(Ce(t?.data,e.field)))):t,C=!!n&&!(n&&!g&&v===null)&&S.length===0,w=o?`6px 10px`:`10px 14px`,T=`1px solid rgba(148, 163, 184, 0.35)`,E=a?{border:T}:{borderBottom:T};return(0,N.jsx)(`div`,{ref:d,style:{width:`100%`,overflowX:`auto`,...m(u)},children:(0,N.jsxs)(`table`,{style:{width:`100%`,borderCollapse:`collapse`,fontSize:14,...a?{border:T}:{}},children:[(0,N.jsx)(`thead`,{children:(0,N.jsx)(`tr`,{children:e.map((e,t)=>(0,N.jsx)(`th`,{style:{textAlign:`left`,fontWeight:600,padding:w,background:`rgba(148, 163, 184, 0.12)`,...E},children:e.label??e},t))})}),(0,N.jsxs)(`tbody`,{children:[C&&(0,N.jsx)(`tr`,{children:(0,N.jsx)(`td`,{colSpan:e.length,style:{padding:w,textAlign:`center`,opacity:.6,...E},children:c||`No data yet`})}),S.map((t,n)=>(0,N.jsx)(`tr`,{style:i&&n%2==1?{background:`rgba(148, 163, 184, 0.07)`}:void 0,children:e.map((e,n)=>(0,N.jsx)(`td`,{style:{padding:w,...E},children:t?.[n]??``},n))},n))]})]})})}var dn={PageRoot:Pe,Section:Fe,Container:Ie,Heading:Le,TextBlock:Je,ButtonBlock:Ze,ImageBlock:Qe,Spacer:it,Divider:at,SliderBlock:dt,CanvasSlider:ft,TabsBlock:_t,QuickStack:Bt,CollectionList:Vt,CollectionSearch:Ht,BreadcrumbsBlock:Ut,PaginationBlock:Wt,StepperBlock:Qt,SocialLinksBlock:Zt,ThemeModeBlock:Yt,OrgChartBlock:ln,TableBlock:un,MasonryBlock:pt,AccordionBlock:vt,NavbarBlock:gt,ListBlock:qe,TextSpan:Be,QuoteBlock:Ke,TextLink:Xe,RichTextBlock:We,RichContentBlock:We,VideoBlock:$e,YouTubeBlock:tt,IframeBlock:nt,EmbedBlock:rt,FormBlock:Ot,FormLabel:Nt,FormInput:Pt,FormTextarea:Ft,FormCheckbox:e=>(0,N.jsx)(It,{kind:`checkbox`,...e}),FormRadio:e=>(0,N.jsx)(It,{kind:`radio`,...e}),FormSelect:Lt,FormFile:Rt,FormRecaptcha:Mt,FormSubmit:zt},fn={id:`auth`,label:`Accounts`,category:`Apps`,keys:[`SiteLoginForm`,`SiteAccountMenu`],ssr:`shell`,settings:[`site.authRedirect`]},pn=(0,l.createContext)({user:null,status:`idle`,ensure:()=>{},refresh:()=>{},signOut:()=>{}}),mn=()=>{let e=(0,l.useContext)(pn);return(0,l.useEffect)(()=>{e.ensure()},[e]),e};function hn({children:e,initialUser:t,disabled:n,apiUrl:r,tenant:i}){let a=(0,l.useContext)(ge),o=r||a?.apiUrl||`/api`,s=i||a?.tenant||``,[c,u]=(0,l.useState)(t??null),[d,f]=(0,l.useState)(t?`user`:n?`guest`:`idle`),p=(0,l.useRef)(!1),m=(0,l.useCallback)((e,t)=>fetch(`${o}${e}`,{...t,credentials:`include`,headers:{"content-type":`application/json`,...s?{"x-tenant":s}:{},...t?.headers}}),[o,s]),h=(0,l.useCallback)(()=>n?Promise.resolve(null):m(`/site/me`).then(e=>e.ok?e.json():null).then(e=>{let t=e?.payload??null;return u(t),f(t?`user`:`guest`),t}).catch(()=>(u(null),f(`guest`),null)),[m,n]),g=(0,l.useCallback)(()=>m(`/site/logout`,{method:`post`}).catch(()=>{}).then(()=>{u(null),f(`guest`)}),[m]),_=(0,l.useCallback)(()=>{p.current||n||t||(p.current=!0,f(`loading`),h())},[n,t,h]),v=(0,l.useMemo)(()=>({user:c,status:d,ensure:_,refresh:h,signOut:g}),[c,d,_,h,g]);return(0,N.jsx)(pn.Provider,{value:v,children:e})}function gn({when:e,children:t}){let{status:n}=mn();return!e||e===`always`?t:n===`idle`||n===`loading`?null:e===`user`==(n===`user`)?t:null}function _n({mode:e=`login`,redirect:t,emailLabel:n=`Email`,passwordLabel:r=`Password`,nameLabel:i=`Name`,submitLabel:a,style:o,nodeRef:s,inert:c,linked:u,show:d}){let{tenant:f,apiUrl:p,settings:h}=(0,l.useContext)(ge),[g,_]=(0,l.useState)(`form`),[v,y]=(0,l.useState)(``),[b,x]=(0,l.useState)(!1),S=e===`register`,C=c?d||`form`:g,w=e=>typeof e==`string`&&e.startsWith(`/`)&&!e.startsWith(`//`)?e:``,T=async e=>{if(e.preventDefault(),c)return;let n=new FormData(e.currentTarget);x(!0),y(``);try{let e=await fetch(`${p||`/api`}/site/${S?`register`:`login`}`,{method:`post`,headers:{"content-type":`application/json`,...f?{"x-tenant":f}:{}},credentials:`same-origin`,body:JSON.stringify({email:n.get(`email`),password:n.get(`password`),...S?{name:n.get(`name`)||``}:{}})}),r=await e.json().catch(()=>null);if(!e.ok||r?.success===!1){y(r?.error?.message||`Sign-in failed`),_(`error`),x(!1);return}if(_(`success`),typeof window<`u`){let e=w(t)||w(new URLSearchParams(window.location.search).get(`next`))||w(h?.[`site.authRedirect`])||w(h?.[`apps.auth.redirect`])||`/`;window.location.assign(e)}}catch{y(`Sign-in failed`),_(`error`),x(!1)}};return(0,N.jsxs)(`div`,{ref:s,style:{display:`grid`,gap:12,maxWidth:360,...m(o)},children:[(0,N.jsxs)(`form`,{onSubmit:T,style:{display:C===`form`?`grid`:`none`,gap:10},children:[S?(0,N.jsxs)(`label`,{style:{...bt,display:`grid`,gap:6},children:[i,(0,N.jsx)(`input`,{name:`name`,type:`text`,style:xt,...F(c)})]}):null,(0,N.jsxs)(`label`,{style:{...bt,display:`grid`,gap:6},children:[n,(0,N.jsx)(`input`,{name:`email`,type:`email`,required:!c,style:xt,...F(c)})]}),(0,N.jsxs)(`label`,{style:{...bt,display:`grid`,gap:6},children:[r,(0,N.jsx)(`input`,{name:`password`,type:`password`,required:!c,style:xt,...F(c)})]}),(0,N.jsx)(`button`,{type:c?`button`:`submit`,disabled:b||void 0,style:{...ke,border:0,padding:`10px 22px`,borderRadius:8,fontSize:15,fontWeight:600,cursor:`pointer`,opacity:b?.6:1},children:a||(S?`Create account`:`Sign in`)}),v?(0,N.jsx)(`p`,{style:{margin:0,fontSize:14,color:`#dc2626`},children:v}):null]}),(0,N.jsx)(`div`,{style:{display:C===`success`?`block`:`none`},children:u?.success??null}),(0,N.jsx)(`div`,{style:{display:C===`error`?`block`:`none`},children:u?.error??null})]})}function vn({greeting:e=`Hi`,signOutLabel:t=`Sign out`,showEmail:n=!1,style:r,nodeRef:i,inert:a,linked:o,show:s}){let{user:c,status:l,signOut:u}=mn(),d=a?s||`user`:l,f=a?{name:`Ada Lovelace`,email:`ada@example.com`}:c;return d===`loading`?(0,N.jsx)(`div`,{ref:i,style:{minHeight:24,...m(r)}}):d===`user`?(0,N.jsxs)(`div`,{ref:i,style:{display:`flex`,alignItems:`center`,gap:10,...m(r)},children:[(0,N.jsxs)(`span`,{style:{...bt,fontWeight:600},children:[e,` `,f?.name||f?.email||``]}),n&&f?.email?(0,N.jsx)(`span`,{style:{...bt,opacity:.7},children:f.email}):null,(0,N.jsx)(`button`,{type:`button`,onClick:a?void 0:u,style:{...ke,border:0,padding:`8px 16px`,borderRadius:8,fontSize:14,cursor:a?`default`:`pointer`},...F(a),children:t})]}):(0,N.jsx)(`div`,{ref:i,style:{display:`flex`,alignItems:`center`,gap:10,...m(r)},children:o?.signedOut??null})}var yn=[fn],bn={SiteLoginForm:_n,SiteAccountMenu:vn};new Set(yn.filter(e=>e.ssr===`shell`).flatMap(e=>e.keys));var xn=new Map;function Sn(e){if(xn.has(e))return xn.get(e);let t=URL.createObjectURL(new Blob([e],{type:`text/javascript`})),n=import(t).finally(()=>URL.revokeObjectURL(t));return xn.set(e,n),n}function Cn(e){let t=e&&typeof e==`object`?e.builder_plugins:null,n=t&&typeof t==`object`?t.plugins:null;return n&&typeof n==`object`?n:{}}async function wn(e,t){let n=await Sn(e);return(Array.isArray(n?.default?.blocks)?n.default.blocks:[]).find(e=>e?.id===t&&typeof e.mount==`function`)??null}var Tn={padding:`10px 12px`,border:`1px dashed rgba(148, 163, 184, 0.5)`,borderRadius:8,fontSize:12,opacity:.6};function En({pluginId:e,blockId:t,props:n,style:r,nodeRef:i}){let a=(0,l.useContext)(ge),o=Cn(a?.settings)[e],s=(0,l.useRef)(null),c=(0,l.useRef)(null),u={tenant:a?.tenant??``,apiUrl:a?.apiUrl??`/api`,locale:a?.locale??``,settings:a?.settings??null},d=(0,l.useRef)(u);d.current=u;let f=JSON.stringify(n??{});return(0,l.useEffect)(()=>{let e=s.current;if(!o?.code||!e)return;let n=!0;return wn(o.code,t).then(e=>{if(!(!n||!e||!s.current)){c.current=e;try{e.mount(s.current,JSON.parse(f),d.current)}catch{c.current=null}}}).catch(()=>{}),()=>{n=!1;let t=c.current;c.current=null;try{t?.unmount?.(e)}catch{}e&&(e.innerHTML=``)}},[o?.code,t]),(0,l.useEffect)(()=>{let e=c.current,t=s.current;if(!(!e||!t))try{e.update?e.update(t,JSON.parse(f),d.current):(e.unmount?.(t),t.innerHTML=``,e.mount(t,JSON.parse(f),d.current))}catch{}},[f]),o?(0,N.jsx)(`div`,{ref:i,style:m(r),children:(0,N.jsx)(`div`,{ref:s})}):(0,N.jsxs)(`div`,{ref:i,style:{...Tn,...m(r)},children:[`Plugin “`,e,`” is not installed`]})}var Dn={...dn,...bn,PluginBlock:En};function On(e,t,n,r=new Set,i=void 0){let a=t[e];if(!a||a.hidden)return null;let o=a.type?.resolvedName,s=i?.mapProps?i.mapProps(a.props??{},o):a.props??{};if(o===`ComponentInstance`){let t=a.props?.componentId,o=n?.[t];if(!o?.template||r.has(t))return null;let s=new Set(r).add(t);return(0,N.jsx)(l.Fragment,{children:On(o.template.rootId,o.template.nodes,n,s,i)},e)}let c=Dn[o];if(!c)return null;let u=(a.nodes??[]).map(e=>On(e,t,n,r,i)).filter(Boolean),d=Object.entries(a.linkedNodes??{}),f=d.length?Object.fromEntries(d.map(([e,i])=>[e,On(i,t,n,r)])):void 0,p=(0,N.jsx)(c,{...s,...o===`CollectionList`?{templateId:a.linkedNodes?.card}:null,linked:f,nodeRef:t=>{t&&(t.setAttribute(`data-wb`,e),v(t,s))},children:u.length?u:void 0},e);return s.when&&s.when!==`always`?(0,N.jsx)(gn,{when:s.when,children:p},e):p}var kn=e=>Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(` `),An=e=>`.webim-page[data-webim-mode="light"] { ${Object.entries(ae(e.light)).map(([e,t])=>`${e}: ${t} !important;`).join(` `)} }
|
|
14
14
|
.webim-page[data-webim-mode="dark"] { ${Object.entries(ae(e.dark)).map(([e,t])=>`${e}: ${t} !important;`).join(` `)} }`;function jn({blocks:e,theme:t,components:n,mode:r=`auto`,style:i,custom:a,tenant:o,apiUrl:s,datasets:c,locale:u,direction:d,settings:f,siteUser:p}){let m=a?.js?.trim();if((0,l.useEffect)(()=>{if(!m)return;let e=document.createElement(`script`);return e.text=m,document.body.appendChild(e),()=>e.remove()},[m]),!e?.ROOT)return null;let h={lang:u||void 0,dir:me(d,u)},g=`.webim-page, .webim-page *, .webim-page *::before, .webim-page *::after { box-sizing: border-box; }`,_={minHeight:`100%`,display:`flex`,flexDirection:`column`},v=On(`ROOT`,e,n),y=(0,l.useMemo)(()=>({render:(t,r)=>On(t,e,n,void 0,{mapProps:r})}),[e,n]),b=E(e,n),x=T(e,n),S=a?.css?.trim(),C=de(e,n).map(e=>(0,N.jsx)(`link`,{rel:`stylesheet`,precedence:`default`,href:j(e)},e)),w=ie(t),D=An(w);return r===`auto`?(0,N.jsx)(ge.Provider,{value:{tenant:o||``,apiUrl:s||`/api`,locale:u||``,settings:f??null},children:(0,N.jsx)(hn,{initialUser:p,children:(0,N.jsx)(_e.Provider,{value:c??null,children:(0,N.jsx)(xe.Provider,{value:y,children:(0,N.jsxs)(`div`,{...h,className:`webim-page`,style:{..._,...oe(t),...i},children:[(0,N.jsx)(`style`,{children:`.webim-page { ${kn(ae(w.light))} }
|
|
15
15
|
@media (prefers-color-scheme: dark) { .webim-page { ${kn(ae(w.dark))} } }`}),(0,N.jsx)(`style`,{children:D}),C,(0,N.jsx)(`style`,{children:g}),b&&(0,N.jsx)(`style`,{children:b}),x&&(0,N.jsx)(`style`,{children:x}),S&&(0,N.jsx)(`style`,{children:S}),v]})})})})}):(0,N.jsx)(ge.Provider,{value:{tenant:o||``,apiUrl:s||`/api`,locale:u||``,settings:f??null},children:(0,N.jsx)(hn,{initialUser:p,children:(0,N.jsx)(_e.Provider,{value:c??null,children:(0,N.jsx)(xe.Provider,{value:y,children:(0,N.jsxs)(`div`,{...h,className:`webim-page`,style:{..._,...k(t,r),...i},children:[C,(0,N.jsx)(`style`,{children:D}),(0,N.jsx)(`style`,{children:g}),b&&(0,N.jsx)(`style`,{children:b}),x&&(0,N.jsx)(`style`,{children:x}),S&&(0,N.jsx)(`style`,{children:S}),v]})})})})})}function Mn({bundle:e,mode:t=`auto`,style:n}){return e?.blocks?.ROOT?(0,N.jsx)(jn,{blocks:e.blocks,theme:e.theme,components:e.components,custom:e.custom,tenant:e.tenant,apiUrl:e.apiUrl,datasets:e.datasets,locale:e.locale,direction:e.direction,settings:e.settings,mode:t,style:n}):null}function Nn({apiUrl:e,tenant:t,slug:n,locale:r,preview:i,token:a,mode:o=`auto`,style:s,fallback:c=null,errorFallback:u=null,onLoad:d,onError:f}){let[p,m]=(0,l.useState)({status:`loading`}),h=(0,l.useRef)({onLoad:d,onError:f});return h.current={onLoad:d,onError:f},(0,l.useEffect)(()=>{let o=!0;return m({status:`loading`}),le({apiUrl:e,tenant:t,slug:n,locale:r,preview:i,token:a}).then(e=>{o&&(m({status:`ready`,bundle:e}),h.current.onLoad?.(e))}).catch(e=>{o&&(m({status:`error`,error:e}),h.current.onError?.(e))}),()=>{o=!1}},[e,t,n,r,i,a]),p.status===`loading`?c:p.status===`error`?typeof u==`function`?u(p.error):u:(0,N.jsx)(Mn,{bundle:p.bundle,mode:o,style:s})}function Pn(e,t={}){let n=(0,u.createRoot)(e);return n.render((0,N.jsx)(Nn,{apiUrl:t.apiUrl||t.api,tenant:t.tenant,slug:t.slug,locale:t.locale||void 0,token:t.token||void 0,mode:t.mode||`auto`,onError:e=>console.error(`[webim-embed]`,t.slug,e)})),n}function Fn(e=document){for(let t of e.querySelectorAll(`[data-webim-page]:not([data-webim-mounted])`))t.setAttribute(`data-webim-mounted`,``),Pn(t,t.dataset)}var In=document.currentScript,Ln=()=>{if(Fn(),In?.dataset.slug){let e=document.createElement(`div`);e.setAttribute(`data-webim-mounted`,``),In.parentElement&&In.parentElement!==document.head?In.insertAdjacentElement(`beforebegin`,e):document.body.appendChild(e),Pn(e,In.dataset)}};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,Ln,{once:!0}):Ln(),window.WebimEmbed={mount:Pn,scan:Fn}})();
|
package/build/webim-ssr.js
CHANGED
|
@@ -2412,14 +2412,18 @@ function bt({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
|
|
|
2412
2412
|
}
|
|
2413
2413
|
function xt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
|
|
2414
2414
|
let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : ae(), s = {
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2415
|
+
height: 34,
|
|
2416
|
+
padding: "0 12px",
|
|
2417
|
+
borderRadius: 8,
|
|
2418
|
+
border: "1px solid var(--page-border, rgba(100, 116, 139, 0.4))",
|
|
2419
|
+
background: "var(--page-bg, #ffffff)",
|
|
2420
2420
|
color: "var(--page-text, #111827)",
|
|
2421
|
+
fontSize: 13,
|
|
2422
|
+
fontFamily: "inherit",
|
|
2423
|
+
outline: "none",
|
|
2421
2424
|
minWidth: 140,
|
|
2422
|
-
flex: "
|
|
2425
|
+
flex: "0 1 auto",
|
|
2426
|
+
boxSizing: "border-box"
|
|
2423
2427
|
}, c = (e) => {
|
|
2424
2428
|
let t = e && typeof e == "object" ? e.value : e, n = e && typeof e == "object" ? e.label ?? e.value : e;
|
|
2425
2429
|
return {
|
|
@@ -2434,60 +2438,63 @@ function xt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
|
|
|
2434
2438
|
style: {
|
|
2435
2439
|
display: "flex",
|
|
2436
2440
|
flexWrap: "wrap",
|
|
2437
|
-
alignItems: "
|
|
2438
|
-
gap:
|
|
2441
|
+
alignItems: "center",
|
|
2442
|
+
gap: 8,
|
|
2439
2443
|
width: "100%",
|
|
2440
2444
|
...C(n)
|
|
2441
2445
|
},
|
|
2442
|
-
children: [a.map((e) => /* @__PURE__ */ f("
|
|
2446
|
+
children: [a.map((e) => Array.isArray(e.options) && e.options.length > 0 || e.type === "option" || e.type === "select" ? /* @__PURE__ */ f("select", {
|
|
2447
|
+
name: `f_${e.name}`,
|
|
2448
|
+
defaultValue: o[e.name] ?? "",
|
|
2443
2449
|
style: s,
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
return /* @__PURE__ */ d("option", {
|
|
2455
|
-
value: t.value,
|
|
2456
|
-
children: t.label
|
|
2457
|
-
}, t.value);
|
|
2458
|
-
})]
|
|
2459
|
-
}) : e.type === "switch" ? /* @__PURE__ */ f("select", {
|
|
2460
|
-
name: `f_${e.name}`,
|
|
2461
|
-
defaultValue: o[e.name] ?? "",
|
|
2462
|
-
style: Z,
|
|
2463
|
-
...Q(i),
|
|
2464
|
-
children: [
|
|
2465
|
-
/* @__PURE__ */ d("option", {
|
|
2466
|
-
value: "",
|
|
2467
|
-
children: "—"
|
|
2468
|
-
}),
|
|
2469
|
-
/* @__PURE__ */ d("option", {
|
|
2470
|
-
value: "true",
|
|
2471
|
-
children: "Yes"
|
|
2472
|
-
}),
|
|
2473
|
-
/* @__PURE__ */ d("option", {
|
|
2474
|
-
value: "false",
|
|
2475
|
-
children: "No"
|
|
2476
|
-
})
|
|
2477
|
-
]
|
|
2478
|
-
}) : /* @__PURE__ */ d("input", {
|
|
2479
|
-
type: "text",
|
|
2480
|
-
name: `f_${e.name}`,
|
|
2481
|
-
defaultValue: o[e.name] ?? "",
|
|
2482
|
-
placeholder: e.label || e.name,
|
|
2483
|
-
style: Z,
|
|
2484
|
-
...Q(i)
|
|
2450
|
+
...Q(i),
|
|
2451
|
+
children: [/* @__PURE__ */ d("option", {
|
|
2452
|
+
value: "",
|
|
2453
|
+
children: e.label || e.name
|
|
2454
|
+
}), (Array.isArray(e.options) ? e.options : []).map((e) => {
|
|
2455
|
+
let t = c(e);
|
|
2456
|
+
return /* @__PURE__ */ d("option", {
|
|
2457
|
+
value: t.value,
|
|
2458
|
+
children: t.label
|
|
2459
|
+
}, t.value);
|
|
2485
2460
|
})]
|
|
2461
|
+
}, e.name) : e.type === "switch" ? /* @__PURE__ */ f("select", {
|
|
2462
|
+
name: `f_${e.name}`,
|
|
2463
|
+
defaultValue: o[e.name] ?? "",
|
|
2464
|
+
style: s,
|
|
2465
|
+
...Q(i),
|
|
2466
|
+
children: [
|
|
2467
|
+
/* @__PURE__ */ d("option", {
|
|
2468
|
+
value: "",
|
|
2469
|
+
children: e.label || e.name
|
|
2470
|
+
}),
|
|
2471
|
+
/* @__PURE__ */ d("option", {
|
|
2472
|
+
value: "true",
|
|
2473
|
+
children: "Yes"
|
|
2474
|
+
}),
|
|
2475
|
+
/* @__PURE__ */ d("option", {
|
|
2476
|
+
value: "false",
|
|
2477
|
+
children: "No"
|
|
2478
|
+
})
|
|
2479
|
+
]
|
|
2480
|
+
}, e.name) : /* @__PURE__ */ d("input", {
|
|
2481
|
+
type: "text",
|
|
2482
|
+
name: `f_${e.name}`,
|
|
2483
|
+
defaultValue: o[e.name] ?? "",
|
|
2484
|
+
placeholder: e.label || e.name,
|
|
2485
|
+
style: s,
|
|
2486
|
+
...Q(i)
|
|
2486
2487
|
}, e.name)), /* @__PURE__ */ d("button", {
|
|
2487
2488
|
type: "submit",
|
|
2488
2489
|
style: {
|
|
2489
|
-
...
|
|
2490
|
-
|
|
2490
|
+
...s,
|
|
2491
|
+
minWidth: 0,
|
|
2492
|
+
padding: "0 18px",
|
|
2493
|
+
border: "none",
|
|
2494
|
+
background: "var(--page-accent, #111827)",
|
|
2495
|
+
color: "var(--page-accent-text, #ffffff)",
|
|
2496
|
+
fontWeight: 600,
|
|
2497
|
+
cursor: i ? "default" : "pointer"
|
|
2491
2498
|
},
|
|
2492
2499
|
...Q(i),
|
|
2493
2500
|
children: t
|