@xosen/site-sdk 0.0.1 → 0.0.2

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/dist/index.js CHANGED
@@ -1,142 +1,172 @@
1
- import { onMounted as j, computed as p, defineComponent as g, openBlock as n, createElementBlock as a, Fragment as v, renderList as x, normalizeClass as $, toDisplayString as _, ref as T, onUnmounted as R, createElementVNode as d, createBlock as P, createCommentVNode as u, createVNode as O, renderSlot as F, normalizeStyle as I, resolveDynamicComponent as L, withCtx as q, createTextVNode as D, watch as B, mergeProps as H } from "vue";
2
- import { useI18n as N } from "vue-i18n";
3
- function M(c) {
4
- function o(e) {
1
+ import { onMounted as X, computed as p, defineComponent as g, openBlock as o, createElementBlock as a, Fragment as h, renderList as x, normalizeClass as $, toDisplayString as _, ref as T, onUnmounted as D, resolveComponent as N, createElementVNode as d, createVNode as O, withCtx as j, createBlock as C, createTextVNode as L, createCommentVNode as u, renderSlot as H, normalizeStyle as A, resolveDynamicComponent as E, watch as I, mergeProps as M } from "vue";
2
+ import { useI18n as U } from "vue-i18n";
3
+ function z(c) {
4
+ function n(e) {
5
5
  const t = document.documentElement;
6
6
  if (e.colors)
7
- for (const [r, i] of Object.entries(e.colors))
8
- i && t.style.setProperty(`--x-color-${z(r)}`, i);
7
+ for (const [r, l] of Object.entries(e.colors))
8
+ l && t.style.setProperty(`--x-color-${G(r)}`, l);
9
9
  e.typography?.fontFamily && t.style.setProperty("--x-font-family", e.typography.fontFamily), e.typography?.headingFont && t.style.setProperty("--x-font-heading", e.typography.headingFont), e.typography?.baseFontSize && t.style.setProperty("--x-font-size", e.typography.baseFontSize), e.shape?.borderRadius && t.style.setProperty("--x-border-radius", e.shape.borderRadius), e.shape?.maxWidth && t.style.setProperty("--x-max-width", e.shape.maxWidth);
10
10
  }
11
- j(() => {
11
+ X(() => {
12
12
  if (c) {
13
- o(c);
13
+ n(c);
14
14
  return;
15
15
  }
16
16
  const t = window.__SITE_DATA__?.skin;
17
- t && (t.colors || t.typography || t.shape) && o({
17
+ t && (t.colors || t.typography || t.shape) && n({
18
18
  colors: t.colors || {},
19
19
  typography: t.typography || {},
20
20
  shape: t.shape || {}
21
21
  });
22
22
  });
23
23
  }
24
- function z(c) {
24
+ function G(c) {
25
25
  return c.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
26
26
  }
27
- function A() {
28
- const c = window.__SITE_DATA__, o = p(() => c?.config || null), e = p(() => o.value?.navigation || []), t = p(() => o.value?.locales || []), r = p(() => o.value?.defaultLocale || "en"), i = p(() => o.value?.branding || {}), s = p(() => o.value?.footer || {}), l = p(() => o.value?.features || {});
27
+ function R() {
28
+ const c = window.__SITE_DATA__, n = p(() => c?.config || null), e = p(() => n.value?.navigation || []), t = p(() => n.value?.locales || []), r = p(() => n.value?.defaultLocale || "en"), l = p(() => n.value?.branding || {}), s = p(() => n.value?.footer || {}), i = p(() => n.value?.features || {});
29
29
  function f(b) {
30
- const m = l.value[b];
30
+ const m = i.value[b];
31
31
  return typeof m == "boolean" ? m : typeof m == "object";
32
32
  }
33
33
  return {
34
- config: o,
34
+ config: n,
35
35
  navigation: e,
36
36
  locales: t,
37
37
  defaultLocale: r,
38
- branding: i,
38
+ branding: l,
39
39
  footer: s,
40
- features: l,
40
+ features: i,
41
41
  hasFeature: f
42
42
  };
43
43
  }
44
- const G = /* @__PURE__ */ g({
44
+ const K = /* @__PURE__ */ g({
45
45
  __name: "XLocaleSwitcher",
46
46
  props: {
47
47
  locales: { type: Array, required: !0 }
48
48
  },
49
- setup(c, { expose: o }) {
50
- o();
51
- const { locale: e } = N();
52
- function t(i) {
53
- e.value = i, localStorage.setItem("site-locale", i);
49
+ setup(c, { expose: n }) {
50
+ n();
51
+ const { locale: e } = U();
52
+ function t(l) {
53
+ e.value = l, localStorage.setItem("site-locale", l);
54
54
  }
55
55
  const r = { locale: e, switchLocale: t };
56
56
  return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
57
57
  }
58
- }), k = (c, o) => {
58
+ }), k = (c, n) => {
59
59
  const e = c.__vccOpts || c;
60
- for (const [t, r] of o)
60
+ for (const [t, r] of n)
61
61
  e[t] = r;
62
62
  return e;
63
- }, K = { class: "x-locale-switcher" }, V = ["onClick"];
64
- function W(c, o, e, t, r, i) {
65
- return n(), a("div", K, [
66
- (n(!0), a(
67
- v,
63
+ }, V = { class: "x-locale-switcher" }, W = ["onClick"];
64
+ function J(c, n, e, t, r, l) {
65
+ return o(), a("div", V, [
66
+ (o(!0), a(
67
+ h,
68
68
  null,
69
- x(e.locales, (s) => (n(), a("button", {
69
+ x(e.locales, (s) => (o(), a("button", {
70
70
  key: s,
71
71
  class: $(["x-locale-switcher__btn", { "x-locale-switcher__btn--active": t.locale === s }]),
72
- onClick: (l) => t.switchLocale(s)
73
- }, _(s.toUpperCase()), 11, V))),
72
+ onClick: (i) => t.switchLocale(s)
73
+ }, _(s.toUpperCase()), 11, W))),
74
74
  128
75
75
  /* KEYED_FRAGMENT */
76
76
  ))
77
77
  ]);
78
78
  }
79
- const J = /* @__PURE__ */ k(G, [["render", W], ["__scopeId", "data-v-675f0bbd"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/common/XLocaleSwitcher.vue"]]), Y = /* @__PURE__ */ g({
79
+ const Y = /* @__PURE__ */ k(K, [["render", J], ["__scopeId", "data-v-675f0bbd"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/common/XLocaleSwitcher.vue"]]), Z = /* @__PURE__ */ g({
80
80
  __name: "XSiteNav",
81
- setup(c, { expose: o }) {
82
- o();
83
- const { navigation: e, branding: t, locales: r } = A(), i = T(!1), s = T(!1);
84
- function l() {
85
- i.value = window.scrollY > 20;
81
+ setup(c, { expose: n }) {
82
+ n();
83
+ const { navigation: e, branding: t, locales: r } = R(), l = T(!1), s = T(!1);
84
+ function i() {
85
+ l.value = window.scrollY > 20;
86
86
  }
87
- j(() => window.addEventListener("scroll", l)), R(() => window.removeEventListener("scroll", l));
88
- const f = { navigation: e, branding: t, locales: r, scrolled: i, menuOpen: s, onScroll: l, XLocaleSwitcher: J };
87
+ X(() => window.addEventListener("scroll", i)), D(() => window.removeEventListener("scroll", i));
88
+ const f = { navigation: e, branding: t, locales: r, scrolled: l, menuOpen: s, onScroll: i, XLocaleSwitcher: Y };
89
89
  return Object.defineProperty(f, "__isScriptSetup", { enumerable: !1, value: !0 }), f;
90
90
  }
91
- }), Z = { class: "x-nav__container" }, Q = {
92
- href: "/",
93
- class: "x-nav__logo"
94
- }, ee = ["src", "alt"], te = {
91
+ }), Q = { class: "x-nav__container" }, ee = ["src", "alt"], te = {
95
92
  key: 1,
96
93
  class: "x-nav__logo-text"
97
- }, se = ["href", "target"];
98
- function oe(c, o, e, t, r, i) {
99
- return n(), a(
94
+ }, se = ["href"];
95
+ function ne(c, n, e, t, r, l) {
96
+ const s = N("router-link");
97
+ return o(), a(
100
98
  "nav",
101
99
  {
102
100
  class: $(["x-nav", { "x-nav--scrolled": t.scrolled }])
103
101
  },
104
102
  [
105
- d("div", Z, [
106
- d("a", Q, [
107
- t.branding.logo ? (n(), a("img", {
108
- key: 0,
109
- src: t.branding.logo,
110
- alt: t.branding.siteName || "",
111
- class: "x-nav__logo-img"
112
- }, null, 8, ee)) : (n(), a(
113
- "span",
114
- te,
115
- _(t.branding.siteName || ""),
116
- 1
117
- /* TEXT */
118
- ))
119
- ]),
103
+ d("div", Q, [
104
+ O(s, {
105
+ to: "/",
106
+ class: "x-nav__logo"
107
+ }, {
108
+ default: j(() => [
109
+ t.branding.logo ? (o(), a("img", {
110
+ key: 0,
111
+ src: t.branding.logo,
112
+ alt: t.branding.siteName || "",
113
+ class: "x-nav__logo-img"
114
+ }, null, 8, ee)) : (o(), a(
115
+ "span",
116
+ te,
117
+ _(t.branding.siteName || ""),
118
+ 1
119
+ /* TEXT */
120
+ ))
121
+ ]),
122
+ _: 1
123
+ /* STABLE */
124
+ }),
120
125
  d(
121
126
  "div",
122
127
  {
123
128
  class: $(["x-nav__links", { "x-nav__links--open": t.menuOpen }])
124
129
  },
125
130
  [
126
- (n(!0), a(
127
- v,
131
+ (o(!0), a(
132
+ h,
128
133
  null,
129
- x(t.navigation, (s) => (n(), a("a", {
130
- key: s.url,
131
- href: s.url,
132
- class: "x-nav__link",
133
- target: s.external ? "_blank" : void 0,
134
- onClick: o[0] || (o[0] = (l) => t.menuOpen = !1)
135
- }, _(s.text), 9, se))),
134
+ x(t.navigation, (i) => (o(), a(
135
+ h,
136
+ {
137
+ key: i.url
138
+ },
139
+ [
140
+ i.external ? (o(), a("a", {
141
+ key: 0,
142
+ href: i.url,
143
+ class: "x-nav__link",
144
+ target: "_blank",
145
+ onClick: n[0] || (n[0] = (f) => t.menuOpen = !1)
146
+ }, _(i.text), 9, se)) : (o(), C(s, {
147
+ key: 1,
148
+ to: i.url,
149
+ class: "x-nav__link",
150
+ onClick: n[1] || (n[1] = (f) => t.menuOpen = !1)
151
+ }, {
152
+ default: j(() => [
153
+ L(
154
+ _(i.text),
155
+ 1
156
+ /* TEXT */
157
+ )
158
+ ]),
159
+ _: 2
160
+ /* DYNAMIC */
161
+ }, 1032, ["to"]))
162
+ ],
163
+ 64
164
+ /* STABLE_FRAGMENT */
165
+ ))),
136
166
  128
137
167
  /* KEYED_FRAGMENT */
138
168
  )),
139
- t.locales.length > 1 ? (n(), P(t.XLocaleSwitcher, {
169
+ t.locales.length > 1 ? (o(), C(t.XLocaleSwitcher, {
140
170
  key: 0,
141
171
  locales: t.locales
142
172
  }, null, 8, ["locales"])) : u("v-if", !0)
@@ -146,8 +176,8 @@ function oe(c, o, e, t, r, i) {
146
176
  ),
147
177
  d("button", {
148
178
  class: "x-nav__hamburger",
149
- onClick: o[1] || (o[1] = (s) => t.menuOpen = !t.menuOpen)
150
- }, [...o[2] || (o[2] = [
179
+ onClick: n[2] || (n[2] = (i) => t.menuOpen = !t.menuOpen)
180
+ }, [...n[3] || (n[3] = [
151
181
  d(
152
182
  "span",
153
183
  null,
@@ -176,39 +206,50 @@ function oe(c, o, e, t, r, i) {
176
206
  /* CLASS */
177
207
  );
178
208
  }
179
- const ne = /* @__PURE__ */ k(Y, [["render", oe], ["__scopeId", "data-v-07c4b748"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteNav.vue"]]), ae = /* @__PURE__ */ g({
209
+ const oe = /* @__PURE__ */ k(Z, [["render", ne], ["__scopeId", "data-v-07c4b748"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteNav.vue"]]), ae = /* @__PURE__ */ g({
180
210
  __name: "XSiteFooter",
181
- setup(c, { expose: o }) {
182
- o();
183
- const { footer: e, branding: t } = A(), r = p(() => e.value.copyright ? e.value.copyright : `© ${(/* @__PURE__ */ new Date()).getFullYear()} ${t.value.siteName || ""}`), i = { footerConfig: e, branding: t, copyright: r };
184
- return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
211
+ setup(c, { expose: n }) {
212
+ n();
213
+ const { footer: e, branding: t } = R(), r = p(() => e.value.copyright ? e.value.copyright : `© ${(/* @__PURE__ */ new Date()).getFullYear()} ${t.value.siteName || ""}`), l = { footerConfig: e, branding: t, copyright: r };
214
+ return Object.defineProperty(l, "__isScriptSetup", { enumerable: !1, value: !0 }), l;
185
215
  }
186
216
  }), re = { class: "x-footer" }, ce = { class: "x-footer__container" }, ie = {
187
217
  key: 0,
188
218
  class: "x-footer__links"
189
- }, le = ["href"], _e = {
219
+ }, le = {
190
220
  key: 1,
191
221
  class: "x-footer__copyright"
192
222
  };
193
- function ue(c, o, e, t, r, i) {
194
- return n(), a("footer", re, [
223
+ function _e(c, n, e, t, r, l) {
224
+ const s = N("router-link");
225
+ return o(), a("footer", re, [
195
226
  d("div", ce, [
196
- t.footerConfig.links?.length ? (n(), a("div", ie, [
197
- (n(!0), a(
198
- v,
227
+ t.footerConfig.links?.length ? (o(), a("div", ie, [
228
+ (o(!0), a(
229
+ h,
199
230
  null,
200
- x(t.footerConfig.links, (s) => (n(), a("a", {
201
- key: s.url,
202
- href: s.url,
231
+ x(t.footerConfig.links, (i) => (o(), C(s, {
232
+ key: i.url,
233
+ to: i.url,
203
234
  class: "x-footer__link"
204
- }, _(s.text), 9, le))),
235
+ }, {
236
+ default: j(() => [
237
+ L(
238
+ _(i.text),
239
+ 1
240
+ /* TEXT */
241
+ )
242
+ ]),
243
+ _: 2
244
+ /* DYNAMIC */
245
+ }, 1032, ["to"]))),
205
246
  128
206
247
  /* KEYED_FRAGMENT */
207
248
  ))
208
249
  ])) : u("v-if", !0),
209
- t.copyright ? (n(), a(
250
+ t.copyright ? (o(), a(
210
251
  "p",
211
- _e,
252
+ le,
212
253
  _(t.copyright),
213
254
  1
214
255
  /* TEXT */
@@ -216,105 +257,105 @@ function ue(c, o, e, t, r, i) {
216
257
  ])
217
258
  ]);
218
259
  }
219
- const de = /* @__PURE__ */ k(ae, [["render", ue], ["__scopeId", "data-v-f9b38381"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteFooter.vue"]]), fe = /* @__PURE__ */ g({
260
+ const ue = /* @__PURE__ */ k(ae, [["render", _e], ["__scopeId", "data-v-f9b38381"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteFooter.vue"]]), de = /* @__PURE__ */ g({
220
261
  __name: "XSiteLayout",
221
- setup(c, { expose: o }) {
222
- o(), M();
223
- const e = { XSiteNav: ne, XSiteFooter: de };
262
+ setup(c, { expose: n }) {
263
+ n(), z();
264
+ const e = { XSiteNav: oe, XSiteFooter: ue };
224
265
  return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
225
266
  }
226
- }), pe = { class: "x-site-layout" }, me = { class: "x-site-layout__main" };
227
- function he(c, o, e, t, r, i) {
228
- return n(), a("div", pe, [
267
+ }), fe = { class: "x-site-layout" }, pe = { class: "x-site-layout__main" };
268
+ function me(c, n, e, t, r, l) {
269
+ return o(), a("div", fe, [
229
270
  O(t.XSiteNav),
230
- d("main", me, [
231
- F(c.$slots, "default", {}, void 0, !0)
271
+ d("main", pe, [
272
+ H(c.$slots, "default", {}, void 0, !0)
232
273
  ]),
233
274
  O(t.XSiteFooter)
234
275
  ]);
235
276
  }
236
- const qt = /* @__PURE__ */ k(fe, [["render", he], ["__scopeId", "data-v-41b0f2a9"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteLayout.vue"]]), ve = /* @__PURE__ */ g({
277
+ const Ft = /* @__PURE__ */ k(de, [["render", me], ["__scopeId", "data-v-41b0f2a9"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteLayout.vue"]]), ve = /* @__PURE__ */ g({
237
278
  __name: "XHeroBlock",
238
279
  props: {
239
280
  data: { type: Object, required: !0 },
240
281
  variant: { type: String, required: !1, default: "fullscreen" }
241
282
  },
242
- setup(c, { expose: o }) {
243
- o();
283
+ setup(c, { expose: n }) {
284
+ n();
244
285
  const e = c, t = p(() => e.data.image ? { backgroundImage: `url(${e.data.image})` } : {}), r = { props: e, bgStyle: t };
245
286
  return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
246
287
  }
247
- }), xe = {
288
+ }), he = {
248
289
  key: 0,
249
290
  class: "x-hero__overlay"
250
- }, ye = { class: "x-hero__content" }, ge = {
291
+ }, xe = { class: "x-hero__content" }, ye = {
251
292
  key: 0,
252
293
  class: "x-hero__title"
253
- }, ke = {
294
+ }, ge = {
254
295
  key: 1,
255
296
  class: "x-hero__subtitle"
256
- }, be = {
297
+ }, ke = {
257
298
  key: 2,
258
299
  class: "x-hero__buttons"
259
- }, $e = ["href"], Se = {
300
+ }, be = ["href"], $e = {
260
301
  key: 3,
261
302
  class: "x-hero__stats"
262
- }, we = { class: "x-hero__stat-value" }, Te = { class: "x-hero__stat-label" };
263
- function je(c, o, e, t, r, i) {
264
- return n(), a(
303
+ }, Se = { class: "x-hero__stat-value" }, we = { class: "x-hero__stat-label" };
304
+ function Te(c, n, e, t, r, l) {
305
+ return o(), a(
265
306
  "section",
266
307
  {
267
308
  class: $(["x-hero", { "x-hero--fullscreen": e.variant === "fullscreen" }]),
268
- style: I(t.bgStyle)
309
+ style: A(t.bgStyle)
269
310
  },
270
311
  [
271
- e.data.image && e.data.overlay !== !1 ? (n(), a("div", xe)) : u("v-if", !0),
272
- d("div", ye, [
273
- e.data.title ? (n(), a(
312
+ e.data.image && e.data.overlay !== !1 ? (o(), a("div", he)) : u("v-if", !0),
313
+ d("div", xe, [
314
+ e.data.title ? (o(), a(
274
315
  "h1",
275
- ge,
316
+ ye,
276
317
  _(e.data.title),
277
318
  1
278
319
  /* TEXT */
279
320
  )) : u("v-if", !0),
280
- e.data.subtitle ? (n(), a(
321
+ e.data.subtitle ? (o(), a(
281
322
  "p",
282
- ke,
323
+ ge,
283
324
  _(e.data.subtitle),
284
325
  1
285
326
  /* TEXT */
286
327
  )) : u("v-if", !0),
287
- e.data.buttons?.length ? (n(), a("div", be, [
288
- (n(!0), a(
289
- v,
328
+ e.data.buttons?.length ? (o(), a("div", ke, [
329
+ (o(!0), a(
330
+ h,
290
331
  null,
291
- x(e.data.buttons, (s, l) => (n(), a("a", {
292
- key: l,
332
+ x(e.data.buttons, (s, i) => (o(), a("a", {
333
+ key: i,
293
334
  href: s.url,
294
335
  class: $(["x-btn", `x-btn--${s.variant || "primary"}`])
295
- }, _(s.text), 11, $e))),
336
+ }, _(s.text), 11, be))),
296
337
  128
297
338
  /* KEYED_FRAGMENT */
298
339
  ))
299
340
  ])) : u("v-if", !0),
300
- e.data.stats?.length ? (n(), a("div", Se, [
301
- (n(!0), a(
302
- v,
341
+ e.data.stats?.length ? (o(), a("div", $e, [
342
+ (o(!0), a(
343
+ h,
303
344
  null,
304
- x(e.data.stats, (s, l) => (n(), a("div", {
305
- key: l,
345
+ x(e.data.stats, (s, i) => (o(), a("div", {
346
+ key: i,
306
347
  class: "x-hero__stat"
307
348
  }, [
308
349
  d(
309
350
  "span",
310
- we,
351
+ Se,
311
352
  _(s.value),
312
353
  1
313
354
  /* TEXT */
314
355
  ),
315
356
  d(
316
357
  "span",
317
- Te,
358
+ we,
318
359
  _(s.label),
319
360
  1
320
361
  /* TEXT */
@@ -330,35 +371,35 @@ function je(c, o, e, t, r, i) {
330
371
  /* CLASS, STYLE */
331
372
  );
332
373
  }
333
- const Ce = /* @__PURE__ */ k(ve, [["render", je], ["__scopeId", "data-v-d8cfe56f"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XHeroBlock.vue"]]), Xe = /* @__PURE__ */ g({
374
+ const Ce = /* @__PURE__ */ k(ve, [["render", Te], ["__scopeId", "data-v-d8cfe56f"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XHeroBlock.vue"]]), je = /* @__PURE__ */ g({
334
375
  __name: "XHtmlBlock",
335
376
  props: {
336
377
  data: { type: Object, required: !0 }
337
378
  },
338
- setup(c, { expose: o }) {
339
- o();
379
+ setup(c, { expose: n }) {
380
+ n();
340
381
  const e = {};
341
382
  return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
342
383
  }
343
- }), Be = { class: "x-html-block" }, Pe = ["innerHTML"];
344
- function Oe(c, o, e, t, r, i) {
345
- return n(), a("section", Be, [
384
+ }), Xe = { class: "x-html-block" }, Be = ["innerHTML"];
385
+ function Pe(c, n, e, t, r, l) {
386
+ return o(), a("section", Xe, [
346
387
  d("div", {
347
388
  class: "x-html-block__content",
348
389
  innerHTML: e.data.content
349
- }, null, 8, Pe)
390
+ }, null, 8, Be)
350
391
  ]);
351
392
  }
352
- const Ie = /* @__PURE__ */ k(Xe, [["render", Oe], ["__scopeId", "data-v-abfd69e8"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XHtmlBlock.vue"]]), Le = /* @__PURE__ */ g({
393
+ const Oe = /* @__PURE__ */ k(je, [["render", Pe], ["__scopeId", "data-v-abfd69e8"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XHtmlBlock.vue"]]), Ie = /* @__PURE__ */ g({
353
394
  __name: "XCardsBlock",
354
395
  props: {
355
396
  data: { type: Object, required: !0 },
356
397
  variant: { type: String, required: !1, default: "default" },
357
398
  columns: { type: Number, required: !1, default: void 0 }
358
399
  },
359
- setup(c, { expose: o }) {
360
- o();
361
- const e = c, t = p(() => ({ "--columns": e.columns || Math.min(e.data.cards.length, 4) })), r = { color: "var(--x-color-primary, #1e73be)" }, i = {
400
+ setup(c, { expose: n }) {
401
+ n();
402
+ const e = c, t = p(() => ({ "--columns": e.columns || Math.min(e.data.cards.length, 4) })), r = { color: "var(--x-color-primary, #1e73be)" }, l = {
362
403
  "mdi-lightbulb": "💡",
363
404
  "mdi-code-braces": "⚙️",
364
405
  "mdi-headset": "🎧",
@@ -377,36 +418,36 @@ const Ie = /* @__PURE__ */ k(Xe, [["render", Oe], ["__scopeId", "data-v-abfd69e8
377
418
  "mdi-team": "👥"
378
419
  };
379
420
  function s(f) {
380
- return i[f] || f;
421
+ return l[f] || f;
381
422
  }
382
- const l = { props: e, gridStyle: t, iconStyle: r, iconMap: i, iconDisplay: s };
383
- return Object.defineProperty(l, "__isScriptSetup", { enumerable: !1, value: !0 }), l;
423
+ const i = { props: e, gridStyle: t, iconStyle: r, iconMap: l, iconDisplay: s };
424
+ return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
384
425
  }
385
- }), Ne = { class: "x-cards-block__container" }, Ae = {
426
+ }), Le = { class: "x-cards-block__container" }, Ne = {
386
427
  key: 0,
387
428
  class: "x-cards-block__title"
388
- }, Ee = {
429
+ }, Ae = {
389
430
  key: 1,
390
431
  class: "x-cards-block__subtitle"
391
- }, Ue = ["src", "alt"], Re = { class: "x-card__title" }, Fe = { class: "x-card__desc" };
392
- function qe(c, o, e, t, r, i) {
393
- return n(), a(
432
+ }, Ee = ["src", "alt"], Ue = { class: "x-card__title" }, Re = { class: "x-card__desc" };
433
+ function Fe(c, n, e, t, r, l) {
434
+ return o(), a(
394
435
  "section",
395
436
  {
396
437
  class: $(["x-cards-block", `x-cards-block--${e.variant}`])
397
438
  },
398
439
  [
399
- d("div", Ne, [
400
- e.data.title ? (n(), a(
440
+ d("div", Le, [
441
+ e.data.title ? (o(), a(
401
442
  "h2",
402
- Ae,
443
+ Ne,
403
444
  _(e.data.title),
404
445
  1
405
446
  /* TEXT */
406
447
  )) : u("v-if", !0),
407
- e.data.subtitle ? (n(), a(
448
+ e.data.subtitle ? (o(), a(
408
449
  "p",
409
- Ee,
450
+ Ae,
410
451
  _(e.data.subtitle),
411
452
  1
412
453
  /* TEXT */
@@ -415,25 +456,25 @@ function qe(c, o, e, t, r, i) {
415
456
  "div",
416
457
  {
417
458
  class: "x-cards-block__grid",
418
- style: I(t.gridStyle)
459
+ style: A(t.gridStyle)
419
460
  },
420
461
  [
421
- (n(!0), a(
422
- v,
462
+ (o(!0), a(
463
+ h,
423
464
  null,
424
- x(e.data.cards, (s, l) => (n(), P(L(s.link ? "a" : "div"), {
425
- key: l,
465
+ x(e.data.cards, (s, i) => (o(), C(E(s.link ? "a" : "div"), {
466
+ key: i,
426
467
  class: "x-card",
427
468
  href: s.link
428
469
  }, {
429
- default: q(() => [
430
- s.image && e.variant === "image-cards" ? (n(), a("img", {
470
+ default: j(() => [
471
+ s.image && e.variant === "image-cards" ? (o(), a("img", {
431
472
  key: 0,
432
473
  src: s.image,
433
474
  alt: s.title,
434
475
  class: "x-card__image"
435
- }, null, 8, Ue)) : u("v-if", !0),
436
- s.icon && e.variant !== "image-cards" ? (n(), a(
476
+ }, null, 8, Ee)) : u("v-if", !0),
477
+ s.icon && e.variant !== "image-cards" ? (o(), a(
437
478
  "div",
438
479
  {
439
480
  key: 1,
@@ -446,14 +487,14 @@ function qe(c, o, e, t, r, i) {
446
487
  )) : u("v-if", !0),
447
488
  d(
448
489
  "h3",
449
- Re,
490
+ Ue,
450
491
  _(s.title),
451
492
  1
452
493
  /* TEXT */
453
494
  ),
454
495
  d(
455
496
  "p",
456
- Fe,
497
+ Re,
457
498
  _(s.desc),
458
499
  1
459
500
  /* TEXT */
@@ -475,61 +516,61 @@ function qe(c, o, e, t, r, i) {
475
516
  /* CLASS */
476
517
  );
477
518
  }
478
- const De = /* @__PURE__ */ k(Le, [["render", qe], ["__scopeId", "data-v-a1505674"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XCardsBlock.vue"]]), He = /* @__PURE__ */ g({
519
+ const qe = /* @__PURE__ */ k(Ie, [["render", Fe], ["__scopeId", "data-v-a1505674"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XCardsBlock.vue"]]), De = /* @__PURE__ */ g({
479
520
  __name: "XImageTextBlock",
480
521
  props: {
481
522
  data: { type: Object, required: !0 },
482
523
  reverse: { type: Boolean, required: !1, default: !1 }
483
524
  },
484
- setup(c, { expose: o }) {
485
- o();
525
+ setup(c, { expose: n }) {
526
+ n();
486
527
  const e = {};
487
528
  return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
488
529
  }
489
- }), Me = { class: "x-image-text__container" }, ze = { class: "x-image-text__text" }, Ge = {
530
+ }), He = { class: "x-image-text__container" }, Me = { class: "x-image-text__text" }, ze = {
490
531
  key: 0,
491
532
  class: "x-image-text__title"
492
- }, Ke = ["innerHTML"], Ve = {
533
+ }, Ge = ["innerHTML"], Ke = {
493
534
  key: 2,
494
535
  class: "x-image-text__checklist"
495
- }, We = { class: "x-image-text__check-icon" }, Je = {
536
+ }, Ve = { class: "x-image-text__check-icon" }, We = {
496
537
  key: 0,
497
538
  class: "x-image-text__image-wrap"
498
- }, Ye = ["src", "alt"];
499
- function Ze(c, o, e, t, r, i) {
500
- return n(), a(
539
+ }, Je = ["src", "alt"];
540
+ function Ye(c, n, e, t, r, l) {
541
+ return o(), a(
501
542
  "section",
502
543
  {
503
544
  class: $(["x-image-text", { "x-image-text--reverse": e.reverse }])
504
545
  },
505
546
  [
506
- d("div", Me, [
507
- d("div", ze, [
508
- e.data.title ? (n(), a(
547
+ d("div", He, [
548
+ d("div", Me, [
549
+ e.data.title ? (o(), a(
509
550
  "h2",
510
- Ge,
551
+ ze,
511
552
  _(e.data.title),
512
553
  1
513
554
  /* TEXT */
514
555
  )) : u("v-if", !0),
515
- e.data.content ? (n(), a("div", {
556
+ e.data.content ? (o(), a("div", {
516
557
  key: 1,
517
558
  class: "x-image-text__content",
518
559
  innerHTML: e.data.content
519
- }, null, 8, Ke)) : u("v-if", !0),
520
- e.data.items?.length ? (n(), a("ul", Ve, [
521
- (n(!0), a(
522
- v,
560
+ }, null, 8, Ge)) : u("v-if", !0),
561
+ e.data.items?.length ? (o(), a("ul", Ke, [
562
+ (o(!0), a(
563
+ h,
523
564
  null,
524
- x(e.data.items, (s, l) => (n(), a("li", { key: l }, [
565
+ x(e.data.items, (s, i) => (o(), a("li", { key: i }, [
525
566
  d(
526
567
  "span",
527
- We,
568
+ Ve,
528
569
  _(s.icon || "✓"),
529
570
  1
530
571
  /* TEXT */
531
572
  ),
532
- D(
573
+ L(
533
574
  " " + _(s.text),
534
575
  1
535
576
  /* TEXT */
@@ -540,12 +581,12 @@ function Ze(c, o, e, t, r, i) {
540
581
  ))
541
582
  ])) : u("v-if", !0)
542
583
  ]),
543
- e.data.image ? (n(), a("div", Je, [
584
+ e.data.image ? (o(), a("div", We, [
544
585
  d("img", {
545
586
  src: e.data.image,
546
587
  alt: e.data.title || "",
547
588
  class: "x-image-text__image"
548
- }, null, 8, Ye)
589
+ }, null, 8, Je)
549
590
  ])) : u("v-if", !0)
550
591
  ])
551
592
  ],
@@ -553,29 +594,29 @@ function Ze(c, o, e, t, r, i) {
553
594
  /* CLASS */
554
595
  );
555
596
  }
556
- const Qe = /* @__PURE__ */ k(He, [["render", Ze], ["__scopeId", "data-v-5ca1e218"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XImageTextBlock.vue"]]);
557
- function E(c, o) {
558
- const e = T(null), { locale: t } = N(), r = window.__SITE_DATA__, i = r?.locale, s = r?.config?.tenantPrefix || "tenant";
559
- function l() {
560
- return r && r[c] && t.value === i ? (e.value = r[c], !0) : !1;
597
+ const Ze = /* @__PURE__ */ k(De, [["render", Ye], ["__scopeId", "data-v-5ca1e218"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XImageTextBlock.vue"]]);
598
+ function F(c, n) {
599
+ const e = T(null), { locale: t } = U(), r = window.__SITE_DATA__, l = r?.locale, s = r?.config?.tenantPrefix || "tenant";
600
+ function i() {
601
+ return r && r[c] && t.value === l ? (e.value = r[c], !0) : !1;
561
602
  }
562
603
  async function f() {
563
604
  try {
564
- const b = `${s}:${o}:${t.value}`, m = await fetch(`/api/content/${b}`);
605
+ const b = `${s}:${n}:${t.value}`, m = await fetch(`/api/content/${b}`);
565
606
  m.ok && (e.value = await m.json());
566
607
  } catch {
567
608
  }
568
609
  }
569
- return j(() => {
570
- l() || f();
571
- }), B(t, () => {
610
+ return X(() => {
611
+ i() || f();
612
+ }), I(t, () => {
572
613
  f();
573
614
  }), e;
574
615
  }
575
- function et() {
576
- const o = window.__SITE_DATA__?.apiBase || "";
577
- async function e(i) {
578
- const s = await fetch(`${o}${i}`);
616
+ function Qe() {
617
+ const n = window.__SITE_DATA__?.apiBase || "";
618
+ async function e(l) {
619
+ const s = await fetch(`${n}${l}`);
579
620
  if (!s.ok)
580
621
  throw new Error(`API error: ${s.status}`);
581
622
  return s.json();
@@ -592,139 +633,139 @@ function et() {
592
633
  getProducts: r
593
634
  };
594
635
  }
595
- const tt = /* @__PURE__ */ g({
636
+ const et = /* @__PURE__ */ g({
596
637
  __name: "XPricingBlock",
597
638
  props: {
598
639
  data: { type: Object, required: !1 },
599
640
  source: { type: String, required: !1, default: "kv" },
600
641
  featuredIndex: { type: Number, required: !1, default: 1 }
601
642
  },
602
- setup(c, { expose: o }) {
603
- o();
604
- const e = c, t = p(() => e.data?.title), r = p(() => e.data?.subtitle), i = T([]), s = T(""), l = E("tariffs", "tariffs"), f = et();
605
- j(async () => {
643
+ setup(c, { expose: n }) {
644
+ n();
645
+ const e = c, t = p(() => e.data?.title), r = p(() => e.data?.subtitle), l = T([]), s = T(""), i = F("tariffs", "tariffs"), f = Qe();
646
+ X(async () => {
606
647
  if (e.source === "api")
607
648
  try {
608
- i.value = await f.getTariffs();
649
+ l.value = await f.getTariffs();
609
650
  } catch {
610
651
  }
611
- }), B(
612
- l,
613
- (h) => {
614
- h && e.source === "kv" && (i.value = h);
652
+ }), I(
653
+ i,
654
+ (v) => {
655
+ v && e.source === "kv" && (l.value = v);
615
656
  },
616
657
  { immediate: !0 }
617
658
  );
618
659
  const b = p(() => {
619
- const h = new Set(i.value.map((C) => C.tariffGroupName).filter(Boolean));
620
- return Array.from(h);
660
+ const v = new Set(l.value.map((B) => B.tariffGroupName).filter(Boolean));
661
+ return Array.from(v);
621
662
  });
622
- B(
663
+ I(
623
664
  b,
624
- (h) => {
625
- h.length > 0 && !s.value && (s.value = h[0]);
665
+ (v) => {
666
+ v.length > 0 && !s.value && (s.value = v[0]);
626
667
  },
627
668
  { immediate: !0 }
628
669
  );
629
- const m = p(() => !s.value || b.value.length <= 1 ? i.value : i.value.filter((h) => h.tariffGroupName === s.value)), w = { props: e, title: t, subtitle: r, plans: i, activeGroup: s, kvTariffs: l, api: f, groups: b, activePlans: m };
670
+ const m = p(() => !s.value || b.value.length <= 1 ? l.value : l.value.filter((v) => v.tariffGroupName === s.value)), w = { props: e, title: t, subtitle: r, plans: l, activeGroup: s, kvTariffs: i, api: f, groups: b, activePlans: m };
630
671
  return Object.defineProperty(w, "__isScriptSetup", { enumerable: !1, value: !0 }), w;
631
672
  }
632
- }), st = { class: "x-pricing" }, ot = { class: "x-pricing__container" }, nt = {
673
+ }), tt = { class: "x-pricing" }, st = { class: "x-pricing__container" }, nt = {
633
674
  key: 0,
634
675
  class: "x-pricing__title"
635
- }, at = {
676
+ }, ot = {
636
677
  key: 1,
637
678
  class: "x-pricing__subtitle"
638
- }, rt = {
679
+ }, at = {
639
680
  key: 2,
640
681
  class: "x-pricing__tabs"
641
- }, ct = ["onClick"], it = { class: "x-pricing__grid" }, lt = { class: "x-pricing-card__name" }, _t = {
682
+ }, rt = ["onClick"], ct = { class: "x-pricing__grid" }, it = { class: "x-pricing-card__name" }, lt = {
642
683
  key: 0,
643
684
  class: "x-pricing-card__desc"
644
- }, ut = { class: "x-pricing-card__price" }, dt = { class: "x-pricing-card__amount" }, ft = {
685
+ }, _t = { class: "x-pricing-card__price" }, ut = { class: "x-pricing-card__amount" }, dt = {
645
686
  key: 0,
646
687
  class: "x-pricing-card__period"
647
- }, pt = {
688
+ }, ft = {
648
689
  key: 1,
649
690
  class: "x-pricing-card__features"
650
- }, mt = ["href"];
651
- function ht(c, o, e, t, r, i) {
652
- return n(), a("section", st, [
653
- d("div", ot, [
654
- t.title ? (n(), a(
691
+ }, pt = ["href"];
692
+ function mt(c, n, e, t, r, l) {
693
+ return o(), a("section", tt, [
694
+ d("div", st, [
695
+ t.title ? (o(), a(
655
696
  "h2",
656
697
  nt,
657
698
  _(t.title),
658
699
  1
659
700
  /* TEXT */
660
701
  )) : u("v-if", !0),
661
- t.subtitle ? (n(), a(
702
+ t.subtitle ? (o(), a(
662
703
  "p",
663
- at,
704
+ ot,
664
705
  _(t.subtitle),
665
706
  1
666
707
  /* TEXT */
667
708
  )) : u("v-if", !0),
668
709
  u(" Tabs for tariff groups "),
669
- t.groups.length > 1 ? (n(), a("div", rt, [
670
- (n(!0), a(
671
- v,
710
+ t.groups.length > 1 ? (o(), a("div", at, [
711
+ (o(!0), a(
712
+ h,
672
713
  null,
673
- x(t.groups, (s) => (n(), a("button", {
714
+ x(t.groups, (s) => (o(), a("button", {
674
715
  key: s,
675
716
  class: $(["x-pricing__tab", { "x-pricing__tab--active": t.activeGroup === s }]),
676
- onClick: (l) => t.activeGroup = s
677
- }, _(s), 11, ct))),
717
+ onClick: (i) => t.activeGroup = s
718
+ }, _(s), 11, rt))),
678
719
  128
679
720
  /* KEYED_FRAGMENT */
680
721
  ))
681
722
  ])) : u("v-if", !0),
682
- d("div", it, [
683
- (n(!0), a(
684
- v,
723
+ d("div", ct, [
724
+ (o(!0), a(
725
+ h,
685
726
  null,
686
- x(t.activePlans, (s, l) => (n(), a(
727
+ x(t.activePlans, (s, i) => (o(), a(
687
728
  "div",
688
729
  {
689
- key: s.id || l,
690
- class: $(["x-pricing-card", { "x-pricing-card--featured": l === e.featuredIndex }])
730
+ key: s.id || i,
731
+ class: $(["x-pricing-card", { "x-pricing-card--featured": i === e.featuredIndex }])
691
732
  },
692
733
  [
693
734
  d(
694
735
  "h3",
695
- lt,
736
+ it,
696
737
  _(s.name),
697
738
  1
698
739
  /* TEXT */
699
740
  ),
700
- s.description ? (n(), a(
741
+ s.description ? (o(), a(
701
742
  "p",
702
- _t,
743
+ lt,
703
744
  _(s.description),
704
745
  1
705
746
  /* TEXT */
706
747
  )) : u("v-if", !0),
707
- d("div", ut, [
748
+ d("div", _t, [
708
749
  d(
709
750
  "span",
710
- dt,
751
+ ut,
711
752
  _(s.price),
712
753
  1
713
754
  /* TEXT */
714
755
  ),
715
- s.period ? (n(), a(
756
+ s.period ? (o(), a(
716
757
  "span",
717
- ft,
758
+ dt,
718
759
  "/" + _(s.period),
719
760
  1
720
761
  /* TEXT */
721
762
  )) : u("v-if", !0)
722
763
  ]),
723
- s.features?.length ? (n(), a("ul", pt, [
724
- (n(!0), a(
725
- v,
764
+ s.features?.length ? (o(), a("ul", ft, [
765
+ (o(!0), a(
766
+ h,
726
767
  null,
727
- x(s.features, (f, b) => (n(), a(
768
+ x(s.features, (f, b) => (o(), a(
728
769
  "li",
729
770
  { key: b },
730
771
  _(f),
@@ -735,11 +776,11 @@ function ht(c, o, e, t, r, i) {
735
776
  /* KEYED_FRAGMENT */
736
777
  ))
737
778
  ])) : u("v-if", !0),
738
- s.actionUrl ? (n(), a("a", {
779
+ s.actionUrl ? (o(), a("a", {
739
780
  key: 2,
740
781
  href: s.actionUrl,
741
782
  class: "x-btn x-btn--primary x-pricing-card__action"
742
- }, _(s.actionText || "Choose"), 9, mt)) : u("v-if", !0)
783
+ }, _(s.actionText || "Choose"), 9, pt)) : u("v-if", !0)
743
784
  ],
744
785
  2
745
786
  /* CLASS */
@@ -751,83 +792,83 @@ function ht(c, o, e, t, r, i) {
751
792
  ])
752
793
  ]);
753
794
  }
754
- const vt = /* @__PURE__ */ k(tt, [["render", ht], ["__scopeId", "data-v-bd1e5d79"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XPricingBlock.vue"]]), xt = /* @__PURE__ */ g({
795
+ const vt = /* @__PURE__ */ k(et, [["render", mt], ["__scopeId", "data-v-bd1e5d79"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XPricingBlock.vue"]]), ht = /* @__PURE__ */ g({
755
796
  __name: "XContactsBlock",
756
797
  props: {
757
798
  data: { type: Object, required: !1 }
758
799
  },
759
- setup(c, { expose: o }) {
760
- o();
761
- const e = E("contacts:offices", "contacts:offices"), t = p(() => e.value || []), r = { kvOffices: e, offices: t };
800
+ setup(c, { expose: n }) {
801
+ n();
802
+ const e = F("contacts:offices", "contacts:offices"), t = p(() => e.value || []), r = { kvOffices: e, offices: t };
762
803
  return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
763
804
  }
764
- }), yt = { class: "x-contacts" }, gt = { class: "x-contacts__container" }, kt = {
805
+ }), xt = { class: "x-contacts" }, yt = { class: "x-contacts__container" }, gt = {
765
806
  key: 0,
766
807
  class: "x-contacts__title"
767
- }, bt = {
808
+ }, kt = {
768
809
  key: 1,
769
810
  class: "x-contacts__grid"
770
- }, $t = { class: "x-contacts__name" }, St = {
811
+ }, bt = { class: "x-contacts__name" }, $t = {
771
812
  key: 0,
772
813
  class: "x-contacts__info"
773
- }, wt = {
814
+ }, St = {
774
815
  key: 1,
775
816
  class: "x-contacts__info"
776
- }, Tt = ["href"], jt = {
817
+ }, wt = ["href"], Tt = {
777
818
  key: 2,
778
819
  class: "x-contacts__info"
779
- }, Ct = ["href"], Xt = {
820
+ }, Ct = ["href"], jt = {
780
821
  key: 3,
781
822
  class: "x-contacts__hours"
782
823
  };
783
- function Bt(c, o, e, t, r, i) {
784
- return n(), a("section", yt, [
785
- d("div", gt, [
786
- e.data?.title ? (n(), a(
824
+ function Xt(c, n, e, t, r, l) {
825
+ return o(), a("section", xt, [
826
+ d("div", yt, [
827
+ e.data?.title ? (o(), a(
787
828
  "h2",
788
- kt,
829
+ gt,
789
830
  _(e.data.title),
790
831
  1
791
832
  /* TEXT */
792
833
  )) : u("v-if", !0),
793
- t.offices ? (n(), a("div", bt, [
794
- (n(!0), a(
795
- v,
834
+ t.offices ? (o(), a("div", kt, [
835
+ (o(!0), a(
836
+ h,
796
837
  null,
797
- x(t.offices, (s, l) => (n(), a(
838
+ x(t.offices, (s, i) => (o(), a(
798
839
  "div",
799
840
  {
800
- key: l,
841
+ key: i,
801
842
  class: $(["x-contacts__card", { "x-contacts__card--main": s.isMain }])
802
843
  },
803
844
  [
804
845
  d(
805
846
  "h3",
806
- $t,
847
+ bt,
807
848
  _(s.name),
808
849
  1
809
850
  /* TEXT */
810
851
  ),
811
- s.address ? (n(), a(
852
+ s.address ? (o(), a(
812
853
  "p",
813
- St,
854
+ $t,
814
855
  _(s.address),
815
856
  1
816
857
  /* TEXT */
817
858
  )) : u("v-if", !0),
818
- s.phone ? (n(), a("p", wt, [
859
+ s.phone ? (o(), a("p", St, [
819
860
  d("a", {
820
861
  href: `tel:${s.phone}`
821
- }, _(s.phone), 9, Tt)
862
+ }, _(s.phone), 9, wt)
822
863
  ])) : u("v-if", !0),
823
- s.email ? (n(), a("p", jt, [
864
+ s.email ? (o(), a("p", Tt, [
824
865
  d("a", {
825
866
  href: `mailto:${s.email}`
826
867
  }, _(s.email), 9, Ct)
827
868
  ])) : u("v-if", !0),
828
- s.hours ? (n(), a(
869
+ s.hours ? (o(), a(
829
870
  "p",
830
- Xt,
871
+ jt,
831
872
  _(s.hours),
832
873
  1
833
874
  /* TEXT */
@@ -843,38 +884,38 @@ function Bt(c, o, e, t, r, i) {
843
884
  ])
844
885
  ]);
845
886
  }
846
- const Pt = /* @__PURE__ */ k(xt, [["render", Bt], ["__scopeId", "data-v-e873ba26"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XContactsBlock.vue"]]), Ot = /* @__PURE__ */ g({
887
+ const Bt = /* @__PURE__ */ k(ht, [["render", Xt], ["__scopeId", "data-v-e873ba26"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XContactsBlock.vue"]]), Pt = /* @__PURE__ */ g({
847
888
  __name: "XBlockRenderer",
848
889
  props: {
849
890
  blocks: { type: Array, required: !0 }
850
891
  },
851
- setup(c, { expose: o }) {
852
- o();
892
+ setup(c, { expose: n }) {
893
+ n();
853
894
  const e = c, t = {
854
895
  hero: Ce,
855
- html: Ie,
856
- cards: De,
857
- "image-text": Qe,
896
+ html: Oe,
897
+ cards: qe,
898
+ "image-text": Ze,
858
899
  pricing: vt,
859
- contacts: Pt
900
+ contacts: Bt
860
901
  };
861
- function r(l) {
862
- return t[l];
902
+ function r(i) {
903
+ return t[i];
863
904
  }
864
- const i = p(() => e.blocks.filter((l) => l.settings?.visible !== !1)), s = { props: e, blockRegistry: t, getBlockComponent: r, visibleBlocks: i };
905
+ const l = p(() => e.blocks.filter((i) => i.settings?.visible !== !1)), s = { props: e, blockRegistry: t, getBlockComponent: r, visibleBlocks: l };
865
906
  return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
866
907
  }
867
- }), It = { class: "x-block-renderer" };
868
- function Lt(c, o, e, t, r, i) {
869
- return n(), a("div", It, [
870
- (n(!0), a(
871
- v,
908
+ }), Ot = { class: "x-block-renderer" };
909
+ function It(c, n, e, t, r, l) {
910
+ return o(), a("div", Ot, [
911
+ (o(!0), a(
912
+ h,
872
913
  null,
873
- x(t.visibleBlocks, (s, l) => (n(), a(
874
- v,
875
- { key: l },
914
+ x(t.visibleBlocks, (s, i) => (o(), a(
915
+ h,
916
+ { key: i },
876
917
  [
877
- t.getBlockComponent(s.type) ? (n(), P(L(t.getBlockComponent(s.type)), H({
918
+ t.getBlockComponent(s.type) ? (o(), C(E(t.getBlockComponent(s.type)), M({
878
919
  key: 0,
879
920
  data: s.data || s.props
880
921
  }, { ref_for: !0 }, s.settings, {
@@ -889,22 +930,22 @@ function Lt(c, o, e, t, r, i) {
889
930
  ))
890
931
  ]);
891
932
  }
892
- const Dt = /* @__PURE__ */ k(Ot, [["render", Lt], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XBlockRenderer.vue"]]), Nt = /\.(js|css|png|jpg|jpeg|gif|svg|ico|woff2?|ttf|eot|webp|avif|map|json|txt|xml|webmanifest)$/;
893
- function At(c, o) {
933
+ const qt = /* @__PURE__ */ k(Pt, [["render", It], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XBlockRenderer.vue"]]), Lt = /\.(js|css|png|jpg|jpeg|gif|svg|ico|woff2?|ttf|eot|webp|avif|map|json|txt|xml|webmanifest)$/;
934
+ function Nt(c, n) {
894
935
  const t = new URL(c.url).searchParams.get("lang");
895
- if (t && o.supportedLocales?.includes(t)) return t;
896
- if (o.supportedLocales?.length) {
936
+ if (t && n.supportedLocales?.includes(t)) return t;
937
+ if (n.supportedLocales?.length) {
897
938
  const r = c.headers.get("Accept-Language") || "";
898
- for (const i of o.supportedLocales)
899
- if (r.includes(i)) return i;
939
+ for (const l of n.supportedLocales)
940
+ if (r.includes(l)) return l;
900
941
  }
901
- return o.defaultLocale;
942
+ return n.defaultLocale;
902
943
  }
903
- function Et(c, o) {
944
+ function At(c, n) {
904
945
  if (!c.pathname.startsWith("/api/content/")) return null;
905
946
  const e = decodeURIComponent(c.pathname.replace("/api/content/", ""));
906
947
  return e ? (async () => {
907
- const t = await o.SITE_CONTENT.get(e);
948
+ const t = await n.SITE_CONTENT.get(e);
908
949
  return t ? new Response(t, {
909
950
  headers: {
910
951
  "Content-Type": "application/json",
@@ -914,49 +955,49 @@ function Et(c, o) {
914
955
  }) : Response.json({ error: "Not found" }, { status: 404 });
915
956
  })() : Promise.resolve(Response.json({ error: "Key is required" }, { status: 400 }));
916
957
  }
917
- function Ut(c, o, e) {
958
+ function Et(c, n, e) {
918
959
  let t = c;
919
- if (o.title) {
960
+ if (n.title) {
920
961
  const r = e ? ` — ${e}` : "";
921
- t = t.replace(/<title>[^<]*<\/title>/, `<title>${o.title}${r}</title>`);
962
+ t = t.replace(/<title>[^<]*<\/title>/, `<title>${n.title}${r}</title>`);
922
963
  }
923
- return o.meta?.description && (t = t.replace(/(<meta\s+name="description"\s+content=")[^"]*(")/, `$1${o.meta.description}$2`)), o.meta?.ogTitle && (t = t.replace(/(<meta\s+property="og:title"\s+content=")[^"]*(")/, `$1${o.meta.ogTitle}$2`)), o.html && (t = t.replace('<div id="app"></div>', `<div id="app">${o.html}</div>`)), t;
964
+ return n.meta?.description && (t = t.replace(/(<meta\s+name="description"\s+content=")[^"]*(")/, `$1${n.meta.description}$2`)), n.meta?.ogTitle && (t = t.replace(/(<meta\s+property="og:title"\s+content=")[^"]*(")/, `$1${n.meta.ogTitle}$2`)), n.html && (t = t.replace('<div id="app"></div>', `<div id="app">${n.html}</div>`)), t;
924
965
  }
925
- function Ht(c) {
926
- const { tenantPrefix: o, globalKeys: e = [] } = c;
966
+ function Dt(c) {
967
+ const { tenantPrefix: n, globalKeys: e = [] } = c;
927
968
  return {
928
969
  async fetch(t, r) {
929
- const i = new URL(t.url), s = Et(i, r);
970
+ const l = new URL(t.url), s = At(l, r);
930
971
  if (s) return s;
931
- if (Nt.test(i.pathname))
972
+ if (Lt.test(l.pathname))
932
973
  return r.ASSETS.fetch(t);
933
- const l = At(t, c), f = new URL("/index.html", t.url);
974
+ const i = Nt(t, c), f = new URL("/index.html", t.url);
934
975
  let m = await (await r.ASSETS.fetch(new Request(f))).text();
935
976
  const w = e.map(async (S) => {
936
- const y = await r.SITE_CONTENT.get(`${o}:${S}:${l}`);
977
+ const y = await r.SITE_CONTENT.get(`${n}:${S}:${i}`);
937
978
  return [S, y ? JSON.parse(y) : null];
938
- }), h = i.pathname.match(/^\/p\/(.+)$/);
939
- if (h) {
940
- const S = h[1];
979
+ }), v = l.pathname.match(/^\/p\/(.+)$/);
980
+ if (v) {
981
+ const S = v[1];
941
982
  w.push(
942
983
  (async () => {
943
- const y = await r.SITE_CONTENT.get(`${o}:page:${S}:${l}`);
984
+ const y = await r.SITE_CONTENT.get(`${n}:page:${S}:${i}`);
944
985
  return [`page:${S}`, y ? JSON.parse(y) : null];
945
986
  })()
946
987
  );
947
988
  }
948
- const C = await Promise.all(w), X = {
949
- locale: l,
950
- config: { tenantPrefix: o }
989
+ const B = await Promise.all(w), P = {
990
+ locale: i,
991
+ config: { tenantPrefix: n }
951
992
  };
952
- for (const [S, y] of C)
953
- y !== null && (X[S] = y);
954
- if (h) {
955
- const S = h[1], y = X[`page:${S}`];
956
- y && (m = Ut(m, y, c.siteName));
993
+ for (const [S, y] of B)
994
+ y !== null && (P[S] = y);
995
+ if (v) {
996
+ const S = v[1], y = P[`page:${S}`];
997
+ y && (m = Et(m, y, c.siteName));
957
998
  }
958
- const U = `<script>window.__SITE_DATA__ = ${JSON.stringify(X)};<\/script>`;
959
- return m = m.replace("</head>", `${U}
999
+ const q = `<script>window.__SITE_DATA__ = ${JSON.stringify(P)};<\/script>`;
1000
+ return m = m.replace("</head>", `${q}
960
1001
  </head>`), new Response(m, {
961
1002
  headers: {
962
1003
  "Content-Type": "text/html;charset=utf-8",
@@ -967,20 +1008,20 @@ function Ht(c) {
967
1008
  };
968
1009
  }
969
1010
  export {
970
- Dt as XBlockRenderer,
971
- De as XCardsBlock,
972
- Pt as XContactsBlock,
1011
+ qt as XBlockRenderer,
1012
+ qe as XCardsBlock,
1013
+ Bt as XContactsBlock,
973
1014
  Ce as XHeroBlock,
974
- Ie as XHtmlBlock,
975
- Qe as XImageTextBlock,
976
- J as XLocaleSwitcher,
1015
+ Oe as XHtmlBlock,
1016
+ Ze as XImageTextBlock,
1017
+ Y as XLocaleSwitcher,
977
1018
  vt as XPricingBlock,
978
- de as XSiteFooter,
979
- qt as XSiteLayout,
980
- ne as XSiteNav,
981
- Ht as createSiteWorker,
982
- et as useSiteApi,
983
- A as useSiteConfig,
984
- E as useSiteData,
985
- M as useSkin
1019
+ ue as XSiteFooter,
1020
+ Ft as XSiteLayout,
1021
+ oe as XSiteNav,
1022
+ Dt as createSiteWorker,
1023
+ Qe as useSiteApi,
1024
+ R as useSiteConfig,
1025
+ F as useSiteData,
1026
+ z as useSkin
986
1027
  };