@sesamy/sesamy-components 0.0.1 → 0.0.3

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.
@@ -0,0 +1,6 @@
1
+ import { SvelteComponent } from '../svelte';
2
+
3
+ export { SvelteComponent as Login }
4
+ export { SvelteComponent as Paywall }
5
+
6
+ export { }
@@ -1,6 +1,6 @@
1
- var Xe = Object.defineProperty;
2
- var Ze = (t, e, n) => e in t ? Xe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var E = (t, e, n) => Ze(t, typeof e != "symbol" ? e + "" : e, n);
1
+ var et = Object.defineProperty;
2
+ var tt = (t, e, n) => e in t ? et(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var E = (t, e, n) => tt(t, typeof e != "symbol" ? e + "" : e, n);
4
4
  function L() {
5
5
  }
6
6
  function A(t, e) {
@@ -29,7 +29,7 @@ let X;
29
29
  function Ie(t, e) {
30
30
  return t === e ? !0 : (X || (X = document.createElement("a")), X.href = e, t === X.href);
31
31
  }
32
- function et(t) {
32
+ function nt(t) {
33
33
  return Object.keys(t).length === 0;
34
34
  }
35
35
  function ze(t, e, n, s) {
@@ -85,14 +85,14 @@ function xe(t, e) {
85
85
  function g(t, e) {
86
86
  t.appendChild(e);
87
87
  }
88
- function tt(t, e, n) {
89
- const s = nt(t);
88
+ function st(t, e, n) {
89
+ const s = lt(t);
90
90
  if (!s.getElementById(e)) {
91
91
  const l = m("style");
92
- l.id = e, l.textContent = n, st(s, l);
92
+ l.id = e, l.textContent = n, it(s, l);
93
93
  }
94
94
  }
95
- function nt(t) {
95
+ function lt(t) {
96
96
  if (!t) return document;
97
97
  const e = t.getRootNode ? t.getRootNode() : t.ownerDocument;
98
98
  return e && /** @type {ShadowRoot} */
@@ -101,7 +101,7 @@ function nt(t) {
101
101
  e
102
102
  ) : t.ownerDocument;
103
103
  }
104
- function st(t, e) {
104
+ function it(t, e) {
105
105
  return g(
106
106
  /** @type {Document} */
107
107
  t.head || t,
@@ -143,7 +143,7 @@ function se(t, e) {
143
143
  for (const n in e)
144
144
  _(t, n, e[n]);
145
145
  }
146
- function lt(t) {
146
+ function ot(t) {
147
147
  let e;
148
148
  return {
149
149
  /* push */
@@ -156,13 +156,13 @@ function lt(t) {
156
156
  }
157
157
  };
158
158
  }
159
- function it(t) {
159
+ function rt(t) {
160
160
  return Array.from(t.childNodes);
161
161
  }
162
162
  function Ne(t, e) {
163
163
  t.value = e ?? "";
164
164
  }
165
- function ot(t) {
165
+ function ct(t) {
166
166
  const e = {};
167
167
  return t.childNodes.forEach(
168
168
  /** @param {Element} node */
@@ -177,10 +177,10 @@ function K(t) {
177
177
  }
178
178
  const T = [], Le = [];
179
179
  let z = [];
180
- const Ce = [], rt = /* @__PURE__ */ Promise.resolve();
180
+ const Ce = [], ut = /* @__PURE__ */ Promise.resolve();
181
181
  let de = !1;
182
- function ct() {
183
- de || (de = !0, rt.then(Ve));
182
+ function ft() {
183
+ de || (de = !0, ut.then(Ve));
184
184
  }
185
185
  function he(t) {
186
186
  z.push(t);
@@ -195,7 +195,7 @@ function Ve() {
195
195
  try {
196
196
  for (; B < T.length; ) {
197
197
  const e = T[B];
198
- B++, K(e), ut(e.$$);
198
+ B++, K(e), at(e.$$);
199
199
  }
200
200
  } catch (e) {
201
201
  throw T.length = 0, B = 0, e;
@@ -211,20 +211,20 @@ function Ve() {
211
211
  Ce.pop()();
212
212
  de = !1, ue.clear(), K(t);
213
213
  }
214
- function ut(t) {
214
+ function at(t) {
215
215
  if (t.fragment !== null) {
216
216
  t.update(), F(t.before_update);
217
217
  const e = t.dirty;
218
218
  t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(he);
219
219
  }
220
220
  }
221
- function ft(t) {
221
+ function dt(t) {
222
222
  const e = [], n = [];
223
223
  z.forEach((s) => t.indexOf(s) === -1 ? e.push(s) : n.push(s)), n.forEach((s) => s()), z = e;
224
224
  }
225
225
  const Z = /* @__PURE__ */ new Set();
226
226
  let P;
227
- function at() {
227
+ function ht() {
228
228
  P = {
229
229
  r: 0,
230
230
  c: [],
@@ -232,7 +232,7 @@ function at() {
232
232
  // parent group
233
233
  };
234
234
  }
235
- function dt() {
235
+ function _t() {
236
236
  P.r || F(P.c), P = P.p;
237
237
  }
238
238
  function j(t, e) {
@@ -268,7 +268,7 @@ function me(t, e) {
268
268
  o in n || (n[o] = void 0);
269
269
  return n;
270
270
  }
271
- function ht(t) {
271
+ function gt(t) {
272
272
  return typeof t == "object" && t !== null ? t : {};
273
273
  }
274
274
  function Je(t) {
@@ -283,10 +283,10 @@ function $e(t, e, n) {
283
283
  }
284
284
  function be(t, e) {
285
285
  const n = t.$$;
286
- n.fragment !== null && (ft(n.after_update), F(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
286
+ n.fragment !== null && (dt(n.after_update), F(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
287
287
  }
288
- function _t(t, e) {
289
- t.$$.dirty[0] === -1 && (T.push(t), ct(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
288
+ function mt(t, e) {
289
+ t.$$.dirty[0] === -1 && (T.push(t), ft(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
290
290
  }
291
291
  function le(t, e, n, s, l, i, o = null, r = [-1]) {
292
292
  const u = ge;
@@ -316,10 +316,10 @@ function le(t, e, n, s, l, i, o = null, r = [-1]) {
316
316
  let v = !1;
317
317
  if (a.ctx = n ? n(t, e.props || {}, ($, c, ...p) => {
318
318
  const f = p.length ? p[0] : c;
319
- return a.ctx && l(a.ctx[$], a.ctx[$] = f) && (!a.skip_bound && a.bound[$] && a.bound[$](f), v && _t(t, $)), c;
319
+ return a.ctx && l(a.ctx[$], a.ctx[$] = f) && (!a.skip_bound && a.bound[$] && a.bound[$](f), v && mt(t, $)), c;
320
320
  }) : [], a.update(), v = !0, F(a.before_update), a.fragment = s ? s(a.ctx) : !1, e.target) {
321
321
  if (e.hydrate) {
322
- const $ = it(e.target);
322
+ const $ = rt(e.target);
323
323
  a.fragment && a.fragment.l($), $.forEach(x);
324
324
  } else
325
325
  a.fragment && a.fragment.c();
@@ -388,7 +388,7 @@ typeof HTMLElement == "function" && (Ge = class extends HTMLElement {
388
388
  };
389
389
  if (await Promise.resolve(), !this.$$cn || this.$$c)
390
390
  return;
391
- const n = {}, s = ot(this);
391
+ const n = {}, s = ct(this);
392
392
  for (const i of this.$$s)
393
393
  i in s && (n[i] = [e(i)]);
394
394
  for (const i of this.attributes) {
@@ -551,15 +551,15 @@ class ie {
551
551
  * @returns {void}
552
552
  */
553
553
  $set(e) {
554
- this.$$set && !et(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
554
+ this.$$set && !nt(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
555
555
  }
556
556
  }
557
- const gt = "4";
558
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(gt);
559
- function mt(t) {
560
- tt(t, "svelte-1nq6lsq", ".login-btn.svelte-1nq6lsq.svelte-1nq6lsq,.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.3s ease;border:none;outline:none}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:120px;height:40px;border-radius:5px;background-color:#007bff;color:white;font-size:16px;font-weight:bold}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:hover{background-color:#0056b3}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus{outline:2px solid #0056b3;outline-offset:4px}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:50px;height:50px;border-radius:50%}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq{background-color:#00bfff;animation:svelte-1nq6lsq-pulse 1s infinite ease-in-out}.avatar-btn.svelte-1nq6lsq img.svelte-1nq6lsq{width:100%;height:100%;object-fit:cover;border-radius:50%}@keyframes svelte-1nq6lsq-pulse{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}");
557
+ const $t = "4";
558
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add($t);
559
+ function bt(t) {
560
+ st(t, "svelte-1nq6lsq", ".login-btn.svelte-1nq6lsq.svelte-1nq6lsq,.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.3s ease;border:none;outline:none}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:120px;height:40px;border-radius:5px;background-color:#007bff;color:white;font-size:16px;font-weight:bold}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:hover{background-color:#0056b3}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus{outline:2px solid #0056b3;outline-offset:4px}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:50px;height:50px;border-radius:50%}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq{background-color:#00bfff;animation:svelte-1nq6lsq-pulse 1s infinite ease-in-out}.avatar-btn.svelte-1nq6lsq img.svelte-1nq6lsq{width:100%;height:100%;object-fit:cover;border-radius:50%}@keyframes svelte-1nq6lsq-pulse{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}");
561
561
  }
562
- function $t(t) {
562
+ function pt(t) {
563
563
  let e, n, s;
564
564
  return {
565
565
  c() {
@@ -579,11 +579,11 @@ function $t(t) {
579
579
  }
580
580
  };
581
581
  }
582
- function bt(t) {
582
+ function vt(t) {
583
583
  let e, n, s, l, i;
584
584
  return {
585
585
  c() {
586
- e = m("button"), n = m("img"), Ie(n.src, s = kt) || _(n, "src", s), _(n, "alt", "User Avatar"), _(n, "class", "svelte-1nq6lsq"), _(e, "class", "avatar-btn svelte-1nq6lsq"), _(e, "aria-label", "Log out");
586
+ e = m("button"), n = m("img"), Ie(n.src, s = qt) || _(n, "src", s), _(n, "alt", "User Avatar"), _(n, "class", "svelte-1nq6lsq"), _(e, "class", "avatar-btn svelte-1nq6lsq"), _(e, "aria-label", "Log out");
587
587
  },
588
588
  m(o, r) {
589
589
  N(o, e, r), g(e, n), l || (i = ne(
@@ -599,7 +599,7 @@ function bt(t) {
599
599
  }
600
600
  };
601
601
  }
602
- function pt(t) {
602
+ function kt(t) {
603
603
  let e;
604
604
  return {
605
605
  c() {
@@ -614,14 +614,14 @@ function pt(t) {
614
614
  }
615
615
  };
616
616
  }
617
- function vt(t) {
617
+ function yt(t) {
618
618
  let e;
619
619
  function n(i, o) {
620
620
  return (
621
621
  /*loading*/
622
- i[0] ? pt : (
622
+ i[0] ? kt : (
623
623
  /*loggedIn*/
624
- i[1] ? bt : $t
624
+ i[1] ? vt : pt
625
625
  )
626
626
  );
627
627
  }
@@ -643,8 +643,8 @@ function vt(t) {
643
643
  }
644
644
  };
645
645
  }
646
- let kt = "https://via.placeholder.com/50";
647
- function yt(t, e, n) {
646
+ let qt = "https://via.placeholder.com/50";
647
+ function wt(t, e, n) {
648
648
  let s = !1, l = !1;
649
649
  const i = async () => {
650
650
  n(0, s = !0), await new Promise((u) => setTimeout(u, 2e3)), n(0, s = !1), n(1, l = !0);
@@ -653,12 +653,13 @@ function yt(t, e, n) {
653
653
  };
654
654
  return l = l, [s, l, i, o];
655
655
  }
656
- class qt extends ie {
656
+ class Qe extends ie {
657
657
  constructor(e) {
658
- super(), le(this, e, yt, vt, U, {}, mt);
658
+ super(), le(this, e, wt, yt, U, {}, bt);
659
659
  }
660
660
  }
661
- customElements.define("sesamy-login", Ye(qt, {}, [], [], !0));
661
+ customElements.define("sesamy-login", Ye(Qe, {}, [], [], !0));
662
+ const Mt = Qe;
662
663
  /**
663
664
  * @license lucide-svelte v0.445.0 - ISC
664
665
  *
@@ -738,7 +739,7 @@ function Ae(t) {
738
739
  }
739
740
  };
740
741
  }
741
- function wt(t) {
742
+ function Et(t) {
742
743
  let e, n, s, l, i, o = I(
743
744
  /*iconNode*/
744
745
  t[5]
@@ -902,7 +903,7 @@ function wt(t) {
902
903
  }
903
904
  };
904
905
  }
905
- function Et(t, e, n) {
906
+ function xt(t, e, n) {
906
907
  const s = ["name", "color", "size", "strokeWidth", "absoluteStrokeWidth", "iconNode"];
907
908
  let l = xe(e, s), { $$slots: i = {}, $$scope: o } = e, { name: r = void 0 } = e, { color: u = "currentColor" } = e, { size: a = 24 } = e, { strokeWidth: v = 2 } = e, { absoluteStrokeWidth: $ = !1 } = e, { iconNode: c = [] } = e;
908
909
  const p = (...f) => f.filter((C, M, V) => !!C && V.indexOf(C) === M).join(" ");
@@ -922,9 +923,9 @@ function Et(t, e, n) {
922
923
  i
923
924
  ];
924
925
  }
925
- class xt extends ie {
926
+ class Nt extends ie {
926
927
  constructor(e) {
927
- super(), le(this, e, Et, wt, U, {
928
+ super(), le(this, e, xt, Et, U, {
928
929
  name: 0,
929
930
  color: 1,
930
931
  size: 2,
@@ -934,7 +935,7 @@ class xt extends ie {
934
935
  });
935
936
  }
936
937
  }
937
- function Nt(t) {
938
+ function Lt(t) {
938
939
  let e;
939
940
  const n = (
940
941
  /*#slots*/
@@ -985,7 +986,7 @@ function Nt(t) {
985
986
  }
986
987
  };
987
988
  }
988
- function Lt(t) {
989
+ function Ct(t) {
989
990
  let e, n;
990
991
  const s = [
991
992
  { name: "circle-check" },
@@ -997,12 +998,12 @@ function Lt(t) {
997
998
  ) }
998
999
  ];
999
1000
  let l = {
1000
- $$slots: { default: [Nt] },
1001
+ $$slots: { default: [Lt] },
1001
1002
  $$scope: { ctx: t }
1002
1003
  };
1003
1004
  for (let i = 0; i < s.length; i += 1)
1004
1005
  l = A(l, s[i]);
1005
- return e = new xt({ props: l }), {
1006
+ return e = new Nt({ props: l }), {
1006
1007
  c() {
1007
1008
  Je(e.$$.fragment);
1008
1009
  },
@@ -1014,7 +1015,7 @@ function Lt(t) {
1014
1015
  3 ? me(s, [
1015
1016
  s[0],
1016
1017
  o & /*$$props*/
1017
- 2 && ht(
1018
+ 2 && gt(
1018
1019
  /*$$props*/
1019
1020
  i[1]
1020
1021
  ),
@@ -1038,7 +1039,7 @@ function Lt(t) {
1038
1039
  }
1039
1040
  };
1040
1041
  }
1041
- function Ct(t, e, n) {
1042
+ function St(t, e, n) {
1042
1043
  let { $$slots: s = {}, $$scope: l } = e;
1043
1044
  const i = [
1044
1045
  ["circle", { cx: "12", cy: "12", r: "10" }],
@@ -1048,9 +1049,9 @@ function Ct(t, e, n) {
1048
1049
  n(1, e = A(A({}, e), te(o))), "$$scope" in o && n(3, l = o.$$scope);
1049
1050
  }, e = te(e), [i, e, s, l];
1050
1051
  }
1051
- class St extends ie {
1052
+ class jt extends ie {
1052
1053
  constructor(e) {
1053
- super(), le(this, e, Ct, Lt, U, {});
1054
+ super(), le(this, e, St, Ct, U, {});
1054
1055
  }
1055
1056
  }
1056
1057
  function Oe(t, e, n) {
@@ -1063,7 +1064,7 @@ function Pe(t, e, n) {
1063
1064
  }
1064
1065
  function Me(t) {
1065
1066
  let e, n, s, l, i, o;
1066
- return n = new St({
1067
+ return n = new jt({
1067
1068
  props: { class: "text-green-500 mr-2", size: 20 }
1068
1069
  }), {
1069
1070
  c() {
@@ -1105,14 +1106,14 @@ function We(t) {
1105
1106
  }
1106
1107
  };
1107
1108
  }
1108
- function jt(t) {
1109
+ function At(t) {
1109
1110
  let e, n, s, l, i, o, r, u, a, v, $, c, p, f, C, M, V, S, q, pe, oe, ve, J, ke, G, ye, Y, qe, H, Q, re, ce, we, O = I(
1110
1111
  /*features*/
1111
1112
  t[1]
1112
1113
  ), b = [];
1113
1114
  for (let h = 0; h < O.length; h += 1)
1114
1115
  b[h] = Me(Pe(t, O, h));
1115
- const Qe = (h) => D(b[h], 1, 1, () => {
1116
+ const Ze = (h) => D(b[h], 1, 1, () => {
1116
1117
  b[h] = null;
1117
1118
  });
1118
1119
  let W = I(
@@ -1121,7 +1122,7 @@ function jt(t) {
1121
1122
  ), y = [];
1122
1123
  for (let h = 0; h < W.length; h += 1)
1123
1124
  y[h] = We(Oe(t, W, h));
1124
- return re = lt(
1125
+ return re = ot(
1125
1126
  /*$$binding_groups*/
1126
1127
  t[4][0]
1127
1128
  ), {
@@ -1170,9 +1171,9 @@ function jt(t) {
1170
1171
  const R = Pe(h, O, d);
1171
1172
  b[d] ? (b[d].p(R, k), j(b[d], 1)) : (b[d] = Me(R), b[d].c(), j(b[d], 1), b[d].m(u, null));
1172
1173
  }
1173
- for (at(), d = O.length; d < b.length; d += 1)
1174
- Qe(d);
1175
- dt();
1174
+ for (ht(), d = O.length; d < b.length; d += 1)
1175
+ Ze(d);
1176
+ _t();
1176
1177
  }
1177
1178
  if (k & /*selectedPlan*/
1178
1179
  1 && (c.checked = c.__value === /*selectedPlan*/
@@ -1212,7 +1213,7 @@ function jt(t) {
1212
1213
  }
1213
1214
  };
1214
1215
  }
1215
- function At(t, e, n) {
1216
+ function Ot(t, e, n) {
1216
1217
  let s = "sixMonths";
1217
1218
  const l = [
1218
1219
  "Allt material på Fokus.se",
@@ -1243,13 +1244,14 @@ function At(t, e, n) {
1243
1244
  u
1244
1245
  ];
1245
1246
  }
1246
- class Ot extends ie {
1247
+ class Xe extends ie {
1247
1248
  constructor(e) {
1248
- super(), le(this, e, At, jt, U, {});
1249
+ super(), le(this, e, Ot, At, U, {});
1249
1250
  }
1250
1251
  }
1251
- customElements.define("sesamy-paywall", Ye(Ot, {}, [], [], !0));
1252
+ customElements.define("sesamy-paywall", Ye(Xe, {}, [], [], !0));
1253
+ const Wt = Xe;
1252
1254
  export {
1253
- qt as Login,
1254
- Ot as Paywall
1255
+ Mt as Login,
1256
+ Wt as Paywall
1255
1257
  };
@@ -0,0 +1,6 @@
1
+ (function(x,b){typeof exports=="object"&&typeof module<"u"?b(exports):typeof define=="function"&&define.amd?define(["exports"],b):(x=typeof globalThis<"u"?globalThis:x||self,b(x["@sesamy/sesamy-components"]={}))})(this,function(x){"use strict";var Mt=Object.defineProperty;var Tt=(x,b,N)=>b in x?Mt(x,b,{enumerable:!0,configurable:!0,writable:!0,value:N}):x[b]=N;var S=(x,b,N)=>Tt(x,typeof b!="symbol"?b+"":b,N);function b(){}function N(t,e){for(const n in e)t[n]=e[n];return t}function ve(t){return t()}function ye(){return Object.create(null)}function T(t){t.forEach(ve)}function ke(t){return typeof t=="function"}function R(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let J;function qe(t,e){return t===e?!0:(J||(J=document.createElement("a")),J.href=e,t===J.href)}function et(t){return Object.keys(t).length===0}function we(t,e,n,s){if(t){const l=Ee(t,e,n,s);return t[0](l)}}function Ee(t,e,n,s){return t[1]&&s?N(n.ctx.slice(),t[1](s(e))):n.ctx}function xe(t,e,n,s){if(t[2]&&s){const l=t[2](s(n));if(e.dirty===void 0)return l;if(typeof l=="object"){const i=[],o=Math.max(e.dirty.length,l.length);for(let r=0;r<o;r+=1)i[r]=e.dirty[r]|l[r];return i}return e.dirty|l}return e.dirty}function Ne(t,e,n,s,l,i){if(l){const o=Ee(e,n,s,i);t.p(o,l)}}function Le(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let s=0;s<n;s++)e[s]=-1;return e}return-1}function G(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function Se(t,e){const n={};e=new Set(e);for(const s in t)!e.has(s)&&s[0]!=="$"&&(n[s]=t[s]);return n}function g(t,e){t.appendChild(e)}function tt(t,e,n){const s=nt(t);if(!s.getElementById(e)){const l=m("style");l.id=e,l.textContent=n,st(s,l)}}function nt(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function st(t,e){return g(t.head||t,e),e.sheet}function j(t,e,n){t.insertBefore(e,n||null)}function L(t){t.parentNode&&t.parentNode.removeChild(t)}function re(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function m(t){return document.createElement(t)}function je(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Ce(t){return document.createTextNode(t)}function w(){return Ce(" ")}function ce(){return Ce("")}function Y(t,e,n,s){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}function h(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function Q(t,e){for(const n in e)h(t,n,e[n])}function lt(t){let e;return{p(...n){e=n,e.forEach(s=>t.push(s))},r(){e.forEach(n=>t.splice(t.indexOf(n),1))}}}function it(t){return Array.from(t.childNodes)}function Ae(t,e){t.value=e??""}function ot(t){const e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}let ue;function K(t){ue=t}const W=[],Oe=[];let B=[];const Pe=[],rt=Promise.resolve();let fe=!1;function ct(){fe||(fe=!0,rt.then(Me))}function ae(t){B.push(t)}const de=new Set;let I=0;function Me(){if(I!==0)return;const t=ue;do{try{for(;I<W.length;){const e=W[I];I++,K(e),ut(e.$$)}}catch(e){throw W.length=0,I=0,e}for(K(null),W.length=0,I=0;Oe.length;)Oe.pop()();for(let e=0;e<B.length;e+=1){const n=B[e];de.has(n)||(de.add(n),n())}B.length=0}while(W.length);for(;Pe.length;)Pe.pop()();fe=!1,de.clear(),K(t)}function ut(t){if(t.fragment!==null){t.update(),T(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(ae)}}function ft(t){const e=[],n=[];B.forEach(s=>t.indexOf(s)===-1?e.push(s):n.push(s)),n.forEach(s=>s()),B=e}const X=new Set;let P;function at(){P={r:0,c:[],p:P}}function dt(){P.r||T(P.c),P=P.p}function C(t,e){t&&t.i&&(X.delete(t),t.i(e))}function z(t,e,n,s){if(t&&t.o){if(X.has(t))return;X.add(t),P.c.push(()=>{X.delete(t),s&&(n&&t.d(1),s())}),t.o(e)}else s&&s()}function D(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function he(t,e){const n={},s={},l={$$scope:1};let i=t.length;for(;i--;){const o=t[i],r=e[i];if(r){for(const u in o)u in r||(s[u]=1);for(const u in r)l[u]||(n[u]=r[u],l[u]=1);t[i]=r}else for(const u in o)l[u]=1}for(const o in s)o in n||(n[o]=void 0);return n}function ht(t){return typeof t=="object"&&t!==null?t:{}}function Te(t){t&&t.c()}function _e(t,e,n){const{fragment:s,after_update:l}=t.$$;s&&s.m(e,n),ae(()=>{const i=t.$$.on_mount.map(ve).filter(ke);t.$$.on_destroy?t.$$.on_destroy.push(...i):T(i),t.$$.on_mount=[]}),l.forEach(ae)}function ge(t,e){const n=t.$$;n.fragment!==null&&(ft(n.after_update),T(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function _t(t,e){t.$$.dirty[0]===-1&&(W.push(t),ct(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Z(t,e,n,s,l,i,o=null,r=[-1]){const u=ue;K(t);const a=t.$$={fragment:null,ctx:[],props:i,update:b,not_equal:l,bound:ye(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:ye(),dirty:r,skip_bound:!1,root:e.target||u.$$.root};o&&o(a.root);let y=!1;if(a.ctx=n?n(t,e.props||{},($,c,...v)=>{const f=v.length?v[0]:c;return a.ctx&&l(a.ctx[$],a.ctx[$]=f)&&(!a.skip_bound&&a.bound[$]&&a.bound[$](f),y&&_t(t,$)),c}):[],a.update(),y=!0,T(a.before_update),a.fragment=s?s(a.ctx):!1,e.target){if(e.hydrate){const $=it(e.target);a.fragment&&a.fragment.l($),$.forEach(L)}else a.fragment&&a.fragment.c();e.intro&&C(t.$$.fragment),_e(t,e.target,e.anchor),Me()}K(u)}let We;typeof HTMLElement=="function"&&(We=class extends HTMLElement{constructor(e,n,s){super();S(this,"$$ctor");S(this,"$$s");S(this,"$$c");S(this,"$$cn",!1);S(this,"$$d",{});S(this,"$$r",!1);S(this,"$$p_d",{});S(this,"$$l",{});S(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=n,s&&this.attachShadow({mode:"open"})}addEventListener(e,n,s){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(n),this.$$c){const l=this.$$c.$on(e,n);this.$$l_u.set(n,l)}super.addEventListener(e,n,s)}removeEventListener(e,n,s){if(super.removeEventListener(e,n,s),this.$$c){const l=this.$$l_u.get(n);l&&(l(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(i){return()=>{let o;return{c:function(){o=m("slot"),i!=="default"&&h(o,"name",i)},m:function(a,y){j(a,o,y)},d:function(a){a&&L(o)}}}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},s=ot(this);for(const i of this.$$s)i in s&&(n[i]=[e(i)]);for(const i of this.attributes){const o=this.$$g_p(i.name);o in this.$$d||(this.$$d[o]=ee(o,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const l=()=>{this.$$r=!0;for(const i in this.$$p_d)if(this.$$d[i]=this.$$c.$$.ctx[this.$$c.$$.props[i]],this.$$p_d[i].reflect){const o=ee(i,this.$$d[i],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,o)}this.$$r=!1};this.$$c.$$.after_update.push(l),l();for(const i in this.$$l)for(const o of this.$$l[i]){const r=this.$$c.$on(i,o);this.$$l_u.set(o,r)}this.$$l={}}}attributeChangedCallback(e,n,s){var l;this.$$r||(e=this.$$g_p(e),this.$$d[e]=ee(e,s,this.$$p_d,"toProp"),(l=this.$$c)==null||l.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===e||!this.$$p_d[n].attribute&&n.toLowerCase()===e)||e}});function ee(t,e,n,s){var i;const l=(i=n[t])==null?void 0:i.type;if(e=l==="Boolean"&&typeof e!="boolean"?e!=null:e,!s||!n[t])return e;if(s==="toAttribute")switch(l){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(l){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Be(t,e,n,s,l,i){let o=class extends We{constructor(){super(t,n,l),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map(r=>(e[r].attribute||r).toLowerCase())}};return Object.keys(e).forEach(r=>{Object.defineProperty(o.prototype,r,{get(){return this.$$c&&r in this.$$c?this.$$c[r]:this.$$d[r]},set(u){var a;u=ee(r,u,e),this.$$d[r]=u,(a=this.$$c)==null||a.$set({[r]:u})}})}),s.forEach(r=>{Object.defineProperty(o.prototype,r,{get(){var u;return(u=this.$$c)==null?void 0:u[r]}})}),t.element=o,o}class te{constructor(){S(this,"$$");S(this,"$$set")}$destroy(){ge(this,1),this.$destroy=b}$on(e,n){if(!ke(n))return b;const s=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return s.push(n),()=>{const l=s.indexOf(n);l!==-1&&s.splice(l,1)}}$set(e){this.$$set&&!et(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const gt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(gt);function mt(t){tt(t,"svelte-1nq6lsq",".login-btn.svelte-1nq6lsq.svelte-1nq6lsq,.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.3s ease;border:none;outline:none}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:120px;height:40px;border-radius:5px;background-color:#007bff;color:white;font-size:16px;font-weight:bold}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:hover{background-color:#0056b3}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus{outline:2px solid #0056b3;outline-offset:4px}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:50px;height:50px;border-radius:50%}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq{background-color:#00bfff;animation:svelte-1nq6lsq-pulse 1s infinite ease-in-out}.avatar-btn.svelte-1nq6lsq img.svelte-1nq6lsq{width:100%;height:100%;object-fit:cover;border-radius:50%}@keyframes svelte-1nq6lsq-pulse{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}")}function $t(t){let e,n,s;return{c(){e=m("button"),e.textContent="Login",h(e,"class","login-btn svelte-1nq6lsq"),h(e,"aria-label","Log in")},m(l,i){j(l,e,i),n||(s=Y(e,"click",t[2]),n=!0)},p:b,d(l){l&&L(e),n=!1,s()}}}function bt(t){let e,n,s,l,i;return{c(){e=m("button"),n=m("img"),qe(n.src,s=yt)||h(n,"src",s),h(n,"alt","User Avatar"),h(n,"class","svelte-1nq6lsq"),h(e,"class","avatar-btn svelte-1nq6lsq"),h(e,"aria-label","Log out")},m(o,r){j(o,e,r),g(e,n),l||(i=Y(e,"click",t[3]),l=!0)},p:b,d(o){o&&L(e),l=!1,i()}}}function pt(t){let e;return{c(){e=m("button"),e.innerHTML="",h(e,"class","loading-btn svelte-1nq6lsq"),h(e,"aria-busy","true"),h(e,"aria-label","Logging in")},m(n,s){j(n,e,s)},p:b,d(n){n&&L(e)}}}function vt(t){let e;function n(i,o){return i[0]?pt:i[1]?bt:$t}let s=n(t),l=s(t);return{c(){l.c(),e=ce()},m(i,o){l.m(i,o),j(i,e,o)},p(i,[o]){s===(s=n(i))&&l?l.p(i,o):(l.d(1),l=s(i),l&&(l.c(),l.m(e.parentNode,e)))},i:b,o:b,d(i){i&&L(e),l.d(i)}}}let yt="https://via.placeholder.com/50";function kt(t,e,n){let s=!1,l=!1;const i=async()=>{n(0,s=!0),await new Promise(u=>setTimeout(u,2e3)),n(0,s=!1),n(1,l=!0)},o=()=>{n(1,l=!1)};return l=l,[s,l,i,o]}class Ie extends te{constructor(e){super(),Z(this,e,kt,vt,R,{},mt)}}customElements.define("sesamy-login",Be(Ie,{},[],[],!0));const qt=Ie;/**
2
+ * @license lucide-svelte v0.445.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const ze={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function De(t,e,n){const s=t.slice();return s[11]=e[n][0],s[12]=e[n][1],s}function me(t){let e,n=[t[12]],s={};for(let l=0;l<n.length;l+=1)s=N(s,n[l]);return{c(){e=je(t[11]),Q(e,s)},m(l,i){j(l,e,i)},p(l,i){Q(e,s=he(n,[i&32&&l[12]]))},d(l){l&&L(e)}}}function Fe(t){let e=t[11],n,s=t[11]&&me(t);return{c(){s&&s.c(),n=ce()},m(l,i){s&&s.m(l,i),j(l,n,i)},p(l,i){l[11]?e?R(e,l[11])?(s.d(1),s=me(l),e=l[11],s.c(),s.m(n.parentNode,n)):s.p(l,i):(s=me(l),e=l[11],s.c(),s.m(n.parentNode,n)):e&&(s.d(1),s=null,e=l[11])},d(l){l&&L(n),s&&s.d(l)}}}function wt(t){let e,n,s,l,i,o=D(t[5]),r=[];for(let c=0;c<o.length;c+=1)r[c]=Fe(De(t,o,c));const u=t[10].default,a=we(u,t,t[9],null);let y=[ze,t[7],{width:t[2]},{height:t[2]},{stroke:t[1]},{"stroke-width":s=t[4]?Number(t[3])*24/Number(t[2]):t[3]},{class:l=t[6]("lucide-icon","lucide",t[0]?`lucide-${t[0]}`:"",t[8].class)}],$={};for(let c=0;c<y.length;c+=1)$=N($,y[c]);return{c(){e=je("svg");for(let c=0;c<r.length;c+=1)r[c].c();n=ce(),a&&a.c(),Q(e,$)},m(c,v){j(c,e,v);for(let f=0;f<r.length;f+=1)r[f]&&r[f].m(e,null);g(e,n),a&&a.m(e,null),i=!0},p(c,[v]){if(v&32){o=D(c[5]);let f;for(f=0;f<o.length;f+=1){const A=De(c,o,f);r[f]?r[f].p(A,v):(r[f]=Fe(A),r[f].c(),r[f].m(e,n))}for(;f<r.length;f+=1)r[f].d(1);r.length=o.length}a&&a.p&&(!i||v&512)&&Ne(a,u,c,c[9],i?xe(u,c[9],v,null):Le(c[9]),null),Q(e,$=he(y,[ze,v&128&&c[7],(!i||v&4)&&{width:c[2]},(!i||v&4)&&{height:c[2]},(!i||v&2)&&{stroke:c[1]},(!i||v&28&&s!==(s=c[4]?Number(c[3])*24/Number(c[2]):c[3]))&&{"stroke-width":s},(!i||v&257&&l!==(l=c[6]("lucide-icon","lucide",c[0]?`lucide-${c[0]}`:"",c[8].class)))&&{class:l}]))},i(c){i||(C(a,c),i=!0)},o(c){z(a,c),i=!1},d(c){c&&L(e),re(r,c),a&&a.d(c)}}}function Et(t,e,n){const s=["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"];let l=Se(e,s),{$$slots:i={},$$scope:o}=e,{name:r=void 0}=e,{color:u="currentColor"}=e,{size:a=24}=e,{strokeWidth:y=2}=e,{absoluteStrokeWidth:$=!1}=e,{iconNode:c=[]}=e;const v=(...f)=>f.filter((A,F,ne)=>!!A&&ne.indexOf(A)===F).join(" ");return t.$$set=f=>{n(8,e=N(N({},e),G(f))),n(7,l=Se(e,s)),"name"in f&&n(0,r=f.name),"color"in f&&n(1,u=f.color),"size"in f&&n(2,a=f.size),"strokeWidth"in f&&n(3,y=f.strokeWidth),"absoluteStrokeWidth"in f&&n(4,$=f.absoluteStrokeWidth),"iconNode"in f&&n(5,c=f.iconNode),"$$scope"in f&&n(9,o=f.$$scope)},e=G(e),[r,u,a,y,$,c,v,l,e,o,i]}class xt extends te{constructor(e){super(),Z(this,e,Et,wt,R,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function Nt(t){let e;const n=t[2].default,s=we(n,t,t[3],null);return{c(){s&&s.c()},m(l,i){s&&s.m(l,i),e=!0},p(l,i){s&&s.p&&(!e||i&8)&&Ne(s,n,l,l[3],e?xe(n,l[3],i,null):Le(l[3]),null)},i(l){e||(C(s,l),e=!0)},o(l){z(s,l),e=!1},d(l){s&&s.d(l)}}}function Lt(t){let e,n;const s=[{name:"circle-check"},t[1],{iconNode:t[0]}];let l={$$slots:{default:[Nt]},$$scope:{ctx:t}};for(let i=0;i<s.length;i+=1)l=N(l,s[i]);return e=new xt({props:l}),{c(){Te(e.$$.fragment)},m(i,o){_e(e,i,o),n=!0},p(i,[o]){const r=o&3?he(s,[s[0],o&2&&ht(i[1]),o&1&&{iconNode:i[0]}]):{};o&8&&(r.$$scope={dirty:o,ctx:i}),e.$set(r)},i(i){n||(C(e.$$.fragment,i),n=!0)},o(i){z(e.$$.fragment,i),n=!1},d(i){ge(e,i)}}}function St(t,e,n){let{$$slots:s={},$$scope:l}=e;const i=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m9 12 2 2 4-4"}]];return t.$$set=o=>{n(1,e=N(N({},e),G(o))),"$$scope"in o&&n(3,l=o.$$scope)},e=G(e),[i,e,s,l]}class jt extends te{constructor(e){super(),Z(this,e,St,Lt,R,{})}}function He(t,e,n){const s=t.slice();return s[6]=e[n],s}function Re(t,e,n){const s=t.slice();return s[9]=e[n],s}function Ke(t){let e,n,s,l,i,o;return n=new jt({props:{class:"text-green-500 mr-2",size:20}}),{c(){e=m("li"),Te(n.$$.fragment),s=w(),l=m("span"),l.textContent=`${t[9]}`,i=w(),h(e,"class","flex items-center")},m(r,u){j(r,e,u),_e(n,e,null),g(e,s),g(e,l),g(e,i),o=!0},p:b,i(r){o||(C(n.$$.fragment,r),o=!0)},o(r){z(n.$$.fragment,r),o=!1},d(r){r&&L(e),ge(n)}}}function Ue(t){let e,n;return{c(){e=m("img"),qe(e.src,n="/api/placeholder/40/25")||h(e,"src",n),h(e,"alt",t[6]),h(e,"class","h-6")},m(s,l){j(s,e,l)},p:b,d(s){s&&L(e)}}}function Ct(t){let e,n,s,l,i,o,r,u,a,y,$,c,v,f,A,F,ne,O,E,Je,$e,Ge,se,Ye,le,Qe,ie,Xe,U,oe,be,pe,Ze,M=D(t[1]),p=[];for(let _=0;_<M.length;_+=1)p[_]=Ke(Re(t,M,_));const Pt=_=>z(p[_],1,1,()=>{p[_]=null});let H=D(t[2]),q=[];for(let _=0;_<H.length;_+=1)q[_]=Ue(He(t,H,_));return be=lt(t[4][0]),{c(){e=m("div"),n=m("div"),n.textContent="Redan prenumerant? Logga in",s=w(),l=m("h1"),l.textContent="FOKUS",i=w(),o=m("h2"),o.textContent="Läs Fokus Digital i 6 månader för bara 79 kr!",r=w(),u=m("ul");for(let _=0;_<p.length;_+=1)p[_].c();a=w(),y=m("div"),$=m("label"),c=m("input"),v=w(),f=m("div"),f.innerHTML='<div class="font-semibold">Fokus Digital i 6 månader för 79kr!</div> <div class="text-sm text-gray-600">Efter kampanjperioden 149 kr/mån. Ingen bindningstid!</div>',A=w(),F=m("div"),F.textContent="79 SEK/6 mån",ne=w(),O=m("label"),E=m("input"),Je=w(),$e=m("div"),$e.innerHTML='<div class="font-semibold">Fokus Digital i ett år för 995kr</div> <div class="text-sm text-gray-600">Du sparar 793 kr. Prenumerationen förnyas automatiskt årsvis.</div>',Ge=w(),se=m("div"),se.textContent="995 SEK/år",Ye=w(),le=m("button"),le.textContent="Fortsätt",Qe=w(),ie=m("div"),ie.textContent="Säker SSL-krypterad betalning",Xe=w(),U=m("div");for(let _=0;_<q.length;_+=1)q[_].c();h(n,"class","text-right text-sm text-red-500 mb-4"),h(l,"class","text-4xl font-bold text-red-500 mb-4"),h(o,"class","text-xl font-semibold mb-6"),h(u,"class","space-y-2 mb-6"),h(c,"type","radio"),h(c,"name","subscription"),c.__value="sixMonths",Ae(c,c.__value),h(c,"class","mr-3"),h(F,"class","ml-auto font-semibold"),h($,"class","flex items-center p-4 border rounded-lg"),h(E,"type","radio"),h(E,"name","subscription"),E.__value="oneYear",Ae(E,E.__value),h(E,"class","mr-3"),h(se,"class","ml-auto font-semibold"),h(O,"class","flex items-center p-4 border rounded-lg"),h(y,"class","space-y-4 mb-6"),h(le,"class","w-full bg-red-500 text-white py-3 rounded-lg font-semibold"),h(ie,"class","text-center text-sm text-gray-600 mt-4"),h(U,"class","flex justify-center space-x-2 mt-2"),h(e,"class","max-w-md mx-auto bg-white p-6 rounded-lg shadow-lg"),be.p(c,E)},m(_,k){j(_,e,k),g(e,n),g(e,s),g(e,l),g(e,i),g(e,o),g(e,r),g(e,u);for(let d=0;d<p.length;d+=1)p[d]&&p[d].m(u,null);g(e,a),g(e,y),g(y,$),g($,c),c.checked=c.__value===t[0],g($,v),g($,f),g($,A),g($,F),g(y,ne),g(y,O),g(O,E),E.checked=E.__value===t[0],g(O,Je),g(O,$e),g(O,Ge),g(O,se),g(e,Ye),g(e,le),g(e,Qe),g(e,ie),g(e,Xe),g(e,U);for(let d=0;d<q.length;d+=1)q[d]&&q[d].m(U,null);oe=!0,pe||(Ze=[Y(c,"change",t[3]),Y(E,"change",t[5])],pe=!0)},p(_,[k]){if(k&2){M=D(_[1]);let d;for(d=0;d<M.length;d+=1){const V=Re(_,M,d);p[d]?(p[d].p(V,k),C(p[d],1)):(p[d]=Ke(V),p[d].c(),C(p[d],1),p[d].m(u,null))}for(at(),d=M.length;d<p.length;d+=1)Pt(d);dt()}if(k&1&&(c.checked=c.__value===_[0]),k&1&&(E.checked=E.__value===_[0]),k&4){H=D(_[2]);let d;for(d=0;d<H.length;d+=1){const V=He(_,H,d);q[d]?q[d].p(V,k):(q[d]=Ue(V),q[d].c(),q[d].m(U,null))}for(;d<q.length;d+=1)q[d].d(1);q.length=H.length}},i(_){if(!oe){for(let k=0;k<M.length;k+=1)C(p[k]);oe=!0}},o(_){p=p.filter(Boolean);for(let k=0;k<p.length;k+=1)z(p[k]);oe=!1},d(_){_&&L(e),re(p,_),re(q,_),be.r(),pe=!1,T(Ze)}}}function At(t,e,n){let s="sixMonths";const l=["Allt material på Fokus.se","Tillgång till e-tidning","Tillgång till våra podcasts","Nyhetsbrev"],i=["Visa","American Express","Mastercard","Klarna","Google Pay","Apple Pay","Swish"],o=[[]];function r(){s=this.__value,n(0,s)}function u(){s=this.__value,n(0,s)}return[s,l,i,r,o,u]}class Ve extends te{constructor(e){super(),Z(this,e,At,Ct,R,{})}}customElements.define("sesamy-paywall",Be(Ve,{},[],[],!0));const Ot=Ve;x.Login=qt,x.Paywall=Ot,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,10 +1,19 @@
1
1
  {
2
2
  "name": "@sesamy/sesamy-components",
3
3
  "description": "Ahareable web components library with Vite + Svelte",
4
- "version": "0.0.1",
4
+ "version": "0.0.3",
5
5
  "type": "module",
6
- "module": "dist/lib/sesamy-components.js",
6
+ "module": "dist/lib/sesamy-components.es.js",
7
7
  "main": "dist/lib/sesamy-components.umd.js",
8
+ "types": "dist/lib/sesamy-components.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/lib/sesamy-components.es.js",
12
+ "require": "./dist/lib/sesamy-components.umd.js",
13
+ "types": "./dist/lib/sesamy-components.d.ts"
14
+ }
15
+ },
16
+ "sideEffects": false,
8
17
  "scripts": {
9
18
  "start": "npm run dev -s",
10
19
  "dev": "vite --config vite.demo.config.ts",
@@ -17,12 +26,14 @@
17
26
  "devDependencies": {
18
27
  "@sveltejs/vite-plugin-svelte": "^3.1.2",
19
28
  "@tsconfig/svelte": "^5.0.4",
29
+ "@types/node": "^22.5.5",
20
30
  "svelte": "^4.2.19",
21
31
  "svelte-check": "^4.0.2",
22
32
  "svelte-preprocess": "^6.0.2",
23
33
  "tslib": "^2.7.0",
24
34
  "typescript": "^5.6.2",
25
- "vite": "^5.4.7"
35
+ "vite": "^5.4.7",
36
+ "vite-plugin-dts": "^4.2.1"
26
37
  },
27
38
  "files": [
28
39
  "dist/lib"
@@ -1,6 +0,0 @@
1
- var te=Object.defineProperty,ee=(e,t,n)=>t in e?te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E=(e,t,n)=>ee(e,typeof t!="symbol"?t+"":t,n);function L(){}function j(e,t){for(const n in t)e[n]=t[n];return e}function kt(e){return e()}function Et(){return Object.create(null)}function T(e){e.forEach(kt)}function Nt(e){return typeof e=="function"}function I(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let X;function Lt(e,t){return e===t?!0:(X||(X=document.createElement("a")),X.href=t,e===X.href)}function ne(e){return Object.keys(e).length===0}function Ct(e,t,n,o){if(e){const s=St(e,t,n,o);return e[0](s)}}function St(e,t,n,o){return e[1]&&o?j(n.ctx.slice(),e[1](o(t))):n.ctx}function jt(e,t,n,o){if(e[2]&&o){const s=e[2](o(n));if(t.dirty===void 0)return s;if(typeof s=="object"){const r=[],i=Math.max(t.dirty.length,s.length);for(let l=0;l<i;l+=1)r[l]=t.dirty[l]|s[l];return r}return t.dirty|s}return t.dirty}function Ot(e,t,n,o,s,r){if(s){const i=St(t,n,o,r);e.p(i,s)}}function At(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let o=0;o<n;o++)t[o]=-1;return t}return-1}function Z(e){const t={};for(const n in e)n[0]!=="$"&&(t[n]=e[n]);return t}function Pt(e,t){const n={};t=new Set(t);for(const o in e)!t.has(o)&&o[0]!=="$"&&(n[o]=e[o]);return n}function p(e,t){e.appendChild(t)}function oe(e,t,n){const o=se(e);if(!o.getElementById(t)){const s=m("style");s.id=t,s.textContent=n,re(o,s)}}function se(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function re(e,t){return p(e.head||e,t),t.sheet}function N(e,t,n){e.insertBefore(t,n||null)}function k(e){e.parentNode&&e.parentNode.removeChild(e)}function ut(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function m(e){return document.createElement(e)}function Mt(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Wt(e){return document.createTextNode(e)}function w(){return Wt(" ")}function at(){return Wt("")}function tt(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function h(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function et(e,t){for(const n in t)h(e,n,t[n])}function ie(e){let t;return{p(...n){t=n,t.forEach(o=>e.push(o))},r(){t.forEach(n=>e.splice(e.indexOf(n),1))}}}function le(e){return Array.from(e.childNodes)}function Tt(e,t){e.value=t??""}function ce(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let dt;function J(e){dt=e}const z=[],zt=[];let B=[];const Bt=[],ue=Promise.resolve();let ft=!1;function ae(){ft||(ft=!0,ue.then(Dt))}function $t(e){B.push(e)}const ht=new Set;let D=0;function Dt(){if(D!==0)return;const e=dt;do{try{for(;D<z.length;){const t=z[D];D++,J(t),de(t.$$)}}catch(t){throw z.length=0,D=0,t}for(J(null),z.length=0,D=0;zt.length;)zt.pop()();for(let t=0;t<B.length;t+=1){const n=B[t];ht.has(n)||(ht.add(n),n())}B.length=0}while(z.length);for(;Bt.length;)Bt.pop()();ft=!1,ht.clear(),J(e)}function de(e){if(e.fragment!==null){e.update(),T(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach($t)}}function fe(e){const t=[],n=[];B.forEach(o=>e.indexOf(o)===-1?t.push(o):n.push(o)),n.forEach(o=>o()),B=t}const nt=new Set;let P;function $e(){P={r:0,c:[],p:P}}function he(){P.r||T(P.c),P=P.p}function O(e,t){e&&e.i&&(nt.delete(e),e.i(t))}function F(e,t,n,o){if(e&&e.o){if(nt.has(e))return;nt.add(e),P.c.push(()=>{nt.delete(e),o&&(n&&e.d(1),o())}),e.o(t)}else o&&o()}function H(e){return e?.length!==void 0?e:Array.from(e)}function pt(e,t){const n={},o={},s={$$scope:1};let r=e.length;for(;r--;){const i=e[r],l=t[r];if(l){for(const a in i)a in l||(o[a]=1);for(const a in l)s[a]||(n[a]=l[a],s[a]=1);e[r]=l}else for(const a in i)s[a]=1}for(const i in o)i in n||(n[i]=void 0);return n}function pe(e){return typeof e=="object"&&e!==null?e:{}}function Ft(e){e&&e.c()}function mt(e,t,n){const{fragment:o,after_update:s}=e.$$;o&&o.m(t,n),$t(()=>{const r=e.$$.on_mount.map(kt).filter(Nt);e.$$.on_destroy?e.$$.on_destroy.push(...r):T(r),e.$$.on_mount=[]}),s.forEach($t)}function gt(e,t){const n=e.$$;n.fragment!==null&&(fe(n.after_update),T(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function me(e,t){e.$$.dirty[0]===-1&&(z.push(e),ae(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ot(e,t,n,o,s,r,i=null,l=[-1]){const a=dt;J(e);const f=e.$$={fragment:null,ctx:[],props:r,update:L,not_equal:s,bound:Et(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(a?a.$$.context:[])),callbacks:Et(),dirty:l,skip_bound:!1,root:t.target||a.$$.root};i&&i(f.root);let x=!1;if(f.ctx=n?n(e,t.props||{},(g,c,...v)=>{const u=v.length?v[0]:c;return f.ctx&&s(f.ctx[g],f.ctx[g]=u)&&(!f.skip_bound&&f.bound[g]&&f.bound[g](u),x&&me(e,g)),c}):[],f.update(),x=!0,T(f.before_update),f.fragment=o?o(f.ctx):!1,t.target){if(t.hydrate){const g=le(t.target);f.fragment&&f.fragment.l(g),g.forEach(k)}else f.fragment&&f.fragment.c();t.intro&&O(e.$$.fragment),mt(e,t.target,t.anchor),Dt()}J(a)}let Ht;typeof HTMLElement=="function"&&(Ht=class extends HTMLElement{constructor(e,t,n){super(),E(this,"$$ctor"),E(this,"$$s"),E(this,"$$c"),E(this,"$$cn",!1),E(this,"$$d",{}),E(this,"$$r",!1),E(this,"$$p_d",{}),E(this,"$$l",{}),E(this,"$$l_u",new Map),this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const o=this.$$c.$on(e,t);this.$$l_u.set(t,o)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const o=this.$$l_u.get(t);o&&(o(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(s){return()=>{let r;return{c:function(){r=m("slot"),s!=="default"&&h(r,"name",s)},m:function(i,l){N(i,r,l)},d:function(i){i&&k(r)}}}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=ce(this);for(const s of this.$$s)s in n&&(t[s]=[e(s)]);for(const s of this.attributes){const r=this.$$g_p(s.name);r in this.$$d||(this.$$d[r]=st(r,s.value,this.$$p_d,"toProp"))}for(const s in this.$$p_d)!(s in this.$$d)&&this[s]!==void 0&&(this.$$d[s]=this[s],delete this[s]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$scope:{ctx:[]}}});const o=()=>{this.$$r=!0;for(const s in this.$$p_d)if(this.$$d[s]=this.$$c.$$.ctx[this.$$c.$$.props[s]],this.$$p_d[s].reflect){const r=st(s,this.$$d[s],this.$$p_d,"toAttribute");r==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,r)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const s in this.$$l)for(const r of this.$$l[s]){const i=this.$$c.$on(s,r);this.$$l_u.set(r,i)}this.$$l={}}}attributeChangedCallback(e,t,n){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=st(e,n,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function st(e,t,n,o){var s;const r=(s=n[e])==null?void 0:s.type;if(t=r==="Boolean"&&typeof t!="boolean"?t!=null:t,!o||!n[e])return t;if(o==="toAttribute")switch(r){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(r){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Rt(e,t,n,o,s,r){let i=class extends Ht{constructor(){super(e,n,s),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(l=>(t[l].attribute||l).toLowerCase())}};return Object.keys(t).forEach(l=>{Object.defineProperty(i.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(a){var f;a=st(l,a,t),this.$$d[l]=a,(f=this.$$c)==null||f.$set({[l]:a})}})}),o.forEach(l=>{Object.defineProperty(i.prototype,l,{get(){var a;return(a=this.$$c)==null?void 0:a[l]}})}),e.element=i,i}class rt{constructor(){E(this,"$$"),E(this,"$$set")}$destroy(){gt(this,1),this.$destroy=L}$on(t,n){if(!Nt(n))return L;const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(n),()=>{const s=o.indexOf(n);s!==-1&&o.splice(s,1)}}$set(t){this.$$set&&!ne(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const ge="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ge);function be(e){oe(e,"svelte-1nq6lsq",".login-btn.svelte-1nq6lsq.svelte-1nq6lsq,.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.3s ease;border:none;outline:none}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:120px;height:40px;border-radius:5px;background-color:#007bff;color:white;font-size:16px;font-weight:bold}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:hover{background-color:#0056b3}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus{outline:2px solid #0056b3;outline-offset:4px}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:50px;height:50px;border-radius:50%}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq{background-color:#00bfff;animation:svelte-1nq6lsq-pulse 1s infinite ease-in-out}.avatar-btn.svelte-1nq6lsq img.svelte-1nq6lsq{width:100%;height:100%;object-fit:cover;border-radius:50%}@keyframes svelte-1nq6lsq-pulse{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}")}function ve(e){let t,n,o;return{c(){t=m("button"),t.textContent="Login",h(t,"class","login-btn svelte-1nq6lsq"),h(t,"aria-label","Log in")},m(s,r){N(s,t,r),n||(o=tt(t,"click",e[2]),n=!0)},p:L,d(s){s&&k(t),n=!1,o()}}}function xe(e){let t,n,o,s,r;return{c(){t=m("button"),n=m("img"),Lt(n.src,o=qe)||h(n,"src",o),h(n,"alt","User Avatar"),h(n,"class","svelte-1nq6lsq"),h(t,"class","avatar-btn svelte-1nq6lsq"),h(t,"aria-label","Log out")},m(i,l){N(i,t,l),p(t,n),s||(r=tt(t,"click",e[3]),s=!0)},p:L,d(i){i&&k(t),s=!1,r()}}}function ye(e){let t;return{c(){t=m("button"),t.innerHTML="",h(t,"class","loading-btn svelte-1nq6lsq"),h(t,"aria-busy","true"),h(t,"aria-label","Logging in")},m(n,o){N(n,t,o)},p:L,d(n){n&&k(t)}}}function _e(e){let t;function n(r,i){return r[0]?ye:r[1]?xe:ve}let o=n(e),s=o(e);return{c(){s.c(),t=at()},m(r,i){s.m(r,i),N(r,t,i)},p(r,[i]){o===(o=n(r))&&s?s.p(r,i):(s.d(1),s=o(r),s&&(s.c(),s.m(t.parentNode,t)))},i:L,o:L,d(r){r&&k(t),s.d(r)}}}let qe="https://via.placeholder.com/50";function we(e,t,n){let o=!1,s=!1;const r=async()=>{n(0,o=!0),await new Promise(l=>setTimeout(l,2e3)),n(0,o=!1),n(1,s=!0)},i=()=>{n(1,s=!1)};return s=s,[o,s,r,i]}class Kt extends rt{constructor(t){super(),ot(this,t,we,_e,I,{},be)}}customElements.define("sesamy-login",Rt(Kt,{},[],[],!0));/**
2
- * @license lucide-svelte v0.445.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const It={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function Jt(e,t,n){const o=e.slice();return o[11]=t[n][0],o[12]=t[n][1],o}function bt(e){let t,n=[e[12]],o={};for(let s=0;s<n.length;s+=1)o=j(o,n[s]);return{c(){t=Mt(e[11]),et(t,o)},m(s,r){N(s,t,r)},p(s,r){et(t,o=pt(n,[r&32&&s[12]]))},d(s){s&&k(t)}}}function Ut(e){let t=e[11],n,o=e[11]&&bt(e);return{c(){o&&o.c(),n=at()},m(s,r){o&&o.m(s,r),N(s,n,r)},p(s,r){s[11]?t?I(t,s[11])?(o.d(1),o=bt(s),t=s[11],o.c(),o.m(n.parentNode,n)):o.p(s,r):(o=bt(s),t=s[11],o.c(),o.m(n.parentNode,n)):t&&(o.d(1),o=null,t=s[11])},d(s){s&&k(n),o&&o.d(s)}}}function ke(e){let t,n,o,s,r,i=H(e[5]),l=[];for(let c=0;c<i.length;c+=1)l[c]=Ut(Jt(e,i,c));const a=e[10].default,f=Ct(a,e,e[9],null);let x=[It,e[7],{width:e[2]},{height:e[2]},{stroke:e[1]},{"stroke-width":o=e[4]?Number(e[3])*24/Number(e[2]):e[3]},{class:s=e[6]("lucide-icon","lucide",e[0]?`lucide-${e[0]}`:"",e[8].class)}],g={};for(let c=0;c<x.length;c+=1)g=j(g,x[c]);return{c(){t=Mt("svg");for(let c=0;c<l.length;c+=1)l[c].c();n=at(),f&&f.c(),et(t,g)},m(c,v){N(c,t,v);for(let u=0;u<l.length;u+=1)l[u]&&l[u].m(t,null);p(t,n),f&&f.m(t,null),r=!0},p(c,[v]){if(v&32){i=H(c[5]);let u;for(u=0;u<i.length;u+=1){const C=Jt(c,i,u);l[u]?l[u].p(C,v):(l[u]=Ut(C),l[u].c(),l[u].m(t,n))}for(;u<l.length;u+=1)l[u].d(1);l.length=i.length}f&&f.p&&(!r||v&512)&&Ot(f,a,c,c[9],r?jt(a,c[9],v,null):At(c[9]),null),et(t,g=pt(x,[It,v&128&&c[7],(!r||v&4)&&{width:c[2]},(!r||v&4)&&{height:c[2]},(!r||v&2)&&{stroke:c[1]},(!r||v&28&&o!==(o=c[4]?Number(c[3])*24/Number(c[2]):c[3]))&&{"stroke-width":o},(!r||v&257&&s!==(s=c[6]("lucide-icon","lucide",c[0]?`lucide-${c[0]}`:"",c[8].class)))&&{class:s}]))},i(c){r||(O(f,c),r=!0)},o(c){F(f,c),r=!1},d(c){c&&k(t),ut(l,c),f&&f.d(c)}}}function Ee(e,t,n){const o=["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"];let s=Pt(t,o),{$$slots:r={},$$scope:i}=t,{name:l=void 0}=t,{color:a="currentColor"}=t,{size:f=24}=t,{strokeWidth:x=2}=t,{absoluteStrokeWidth:g=!1}=t,{iconNode:c=[]}=t;const v=(...u)=>u.filter((C,M,U)=>!!C&&U.indexOf(C)===M).join(" ");return e.$$set=u=>{n(8,t=j(j({},t),Z(u))),n(7,s=Pt(t,o)),"name"in u&&n(0,l=u.name),"color"in u&&n(1,a=u.color),"size"in u&&n(2,f=u.size),"strokeWidth"in u&&n(3,x=u.strokeWidth),"absoluteStrokeWidth"in u&&n(4,g=u.absoluteStrokeWidth),"iconNode"in u&&n(5,c=u.iconNode),"$$scope"in u&&n(9,i=u.$$scope)},t=Z(t),[l,a,f,x,g,c,v,s,t,i,r]}class Ne extends rt{constructor(t){super(),ot(this,t,Ee,ke,I,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function Le(e){let t;const n=e[2].default,o=Ct(n,e,e[3],null);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){o&&o.p&&(!t||r&8)&&Ot(o,n,s,s[3],t?jt(n,s[3],r,null):At(s[3]),null)},i(s){t||(O(o,s),t=!0)},o(s){F(o,s),t=!1},d(s){o&&o.d(s)}}}function Ce(e){let t,n;const o=[{name:"circle-check"},e[1],{iconNode:e[0]}];let s={$$slots:{default:[Le]},$$scope:{ctx:e}};for(let r=0;r<o.length;r+=1)s=j(s,o[r]);return t=new Ne({props:s}),{c(){Ft(t.$$.fragment)},m(r,i){mt(t,r,i),n=!0},p(r,[i]){const l=i&3?pt(o,[o[0],i&2&&pe(r[1]),i&1&&{iconNode:r[0]}]):{};i&8&&(l.$$scope={dirty:i,ctx:r}),t.$set(l)},i(r){n||(O(t.$$.fragment,r),n=!0)},o(r){F(t.$$.fragment,r),n=!1},d(r){gt(t,r)}}}function Se(e,t,n){let{$$slots:o={},$$scope:s}=t;const r=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m9 12 2 2 4-4"}]];return e.$$set=i=>{n(1,t=j(j({},t),Z(i))),"$$scope"in i&&n(3,s=i.$$scope)},t=Z(t),[r,t,o,s]}class je extends rt{constructor(t){super(),ot(this,t,Se,Ce,I,{})}}function Gt(e,t,n){const o=e.slice();return o[6]=t[n],o}function Vt(e,t,n){const o=e.slice();return o[9]=t[n],o}function Yt(e){let t,n,o,s,r,i;return n=new je({props:{class:"text-green-500 mr-2",size:20}}),{c(){t=m("li"),Ft(n.$$.fragment),o=w(),s=m("span"),s.textContent=`${e[9]}`,r=w(),h(t,"class","flex items-center")},m(l,a){N(l,t,a),mt(n,t,null),p(t,o),p(t,s),p(t,r),i=!0},p:L,i(l){i||(O(n.$$.fragment,l),i=!0)},o(l){F(n.$$.fragment,l),i=!1},d(l){l&&k(t),gt(n)}}}function Qt(e){let t,n;return{c(){t=m("img"),Lt(t.src,n="/api/placeholder/40/25")||h(t,"src",n),h(t,"alt",e[6]),h(t,"class","h-6")},m(o,s){N(o,t,s)},p:L,d(o){o&&k(t)}}}function Oe(e){let t,n,o,s,r,i,l,a,f,x,g,c,v,u,C,M,U,S,q,vt,it,xt,G,yt,V,_t,Y,qt,R,Q,lt,ct,wt,A=H(e[1]),b=[];for(let $=0;$<A.length;$+=1)b[$]=Yt(Vt(e,A,$));const Zt=$=>F(b[$],1,1,()=>{b[$]=null});let W=H(e[2]),_=[];for(let $=0;$<W.length;$+=1)_[$]=Qt(Gt(e,W,$));return lt=ie(e[4][0]),{c(){t=m("div"),n=m("div"),n.textContent="Redan prenumerant? Logga in",o=w(),s=m("h1"),s.textContent="FOKUS",r=w(),i=m("h2"),i.textContent="L\xE4s Fokus Digital i 6 m\xE5nader f\xF6r bara 79 kr!",l=w(),a=m("ul");for(let $=0;$<b.length;$+=1)b[$].c();f=w(),x=m("div"),g=m("label"),c=m("input"),v=w(),u=m("div"),u.innerHTML='<div class="font-semibold">Fokus Digital i 6 m\xE5nader f\xF6r 79kr!</div> <div class="text-sm text-gray-600">Efter kampanjperioden 149 kr/m\xE5n. Ingen bindningstid!</div>',C=w(),M=m("div"),M.textContent="79 SEK/6 m\xE5n",U=w(),S=m("label"),q=m("input"),vt=w(),it=m("div"),it.innerHTML='<div class="font-semibold">Fokus Digital i ett \xE5r f\xF6r 995kr</div> <div class="text-sm text-gray-600">Du sparar 793 kr. Prenumerationen f\xF6rnyas automatiskt \xE5rsvis.</div>',xt=w(),G=m("div"),G.textContent="995 SEK/\xE5r",yt=w(),V=m("button"),V.textContent="Forts\xE4tt",_t=w(),Y=m("div"),Y.textContent="S\xE4ker SSL-krypterad betalning",qt=w(),R=m("div");for(let $=0;$<_.length;$+=1)_[$].c();h(n,"class","text-right text-sm text-red-500 mb-4"),h(s,"class","text-4xl font-bold text-red-500 mb-4"),h(i,"class","text-xl font-semibold mb-6"),h(a,"class","space-y-2 mb-6"),h(c,"type","radio"),h(c,"name","subscription"),c.__value="sixMonths",Tt(c,c.__value),h(c,"class","mr-3"),h(M,"class","ml-auto font-semibold"),h(g,"class","flex items-center p-4 border rounded-lg"),h(q,"type","radio"),h(q,"name","subscription"),q.__value="oneYear",Tt(q,q.__value),h(q,"class","mr-3"),h(G,"class","ml-auto font-semibold"),h(S,"class","flex items-center p-4 border rounded-lg"),h(x,"class","space-y-4 mb-6"),h(V,"class","w-full bg-red-500 text-white py-3 rounded-lg font-semibold"),h(Y,"class","text-center text-sm text-gray-600 mt-4"),h(R,"class","flex justify-center space-x-2 mt-2"),h(t,"class","max-w-md mx-auto bg-white p-6 rounded-lg shadow-lg"),lt.p(c,q)},m($,y){N($,t,y),p(t,n),p(t,o),p(t,s),p(t,r),p(t,i),p(t,l),p(t,a);for(let d=0;d<b.length;d+=1)b[d]&&b[d].m(a,null);p(t,f),p(t,x),p(x,g),p(g,c),c.checked=c.__value===e[0],p(g,v),p(g,u),p(g,C),p(g,M),p(x,U),p(x,S),p(S,q),q.checked=q.__value===e[0],p(S,vt),p(S,it),p(S,xt),p(S,G),p(t,yt),p(t,V),p(t,_t),p(t,Y),p(t,qt),p(t,R);for(let d=0;d<_.length;d+=1)_[d]&&_[d].m(R,null);Q=!0,ct||(wt=[tt(c,"change",e[3]),tt(q,"change",e[5])],ct=!0)},p($,[y]){if(y&2){A=H($[1]);let d;for(d=0;d<A.length;d+=1){const K=Vt($,A,d);b[d]?(b[d].p(K,y),O(b[d],1)):(b[d]=Yt(K),b[d].c(),O(b[d],1),b[d].m(a,null))}for($e(),d=A.length;d<b.length;d+=1)Zt(d);he()}if(y&1&&(c.checked=c.__value===$[0]),y&1&&(q.checked=q.__value===$[0]),y&4){W=H($[2]);let d;for(d=0;d<W.length;d+=1){const K=Gt($,W,d);_[d]?_[d].p(K,y):(_[d]=Qt(K),_[d].c(),_[d].m(R,null))}for(;d<_.length;d+=1)_[d].d(1);_.length=W.length}},i($){if(!Q){for(let y=0;y<A.length;y+=1)O(b[y]);Q=!0}},o($){b=b.filter(Boolean);for(let y=0;y<b.length;y+=1)F(b[y]);Q=!1},d($){$&&k(t),ut(b,$),ut(_,$),lt.r(),ct=!1,T(wt)}}}function Ae(e,t,n){let o="sixMonths";const s=["Allt material p\xE5 Fokus.se","Tillg\xE5ng till e-tidning","Tillg\xE5ng till v\xE5ra podcasts","Nyhetsbrev"],r=["Visa","American Express","Mastercard","Klarna","Google Pay","Apple Pay","Swish"],i=[[]];function l(){o=this.__value,n(0,o)}function a(){o=this.__value,n(0,o)}return[o,s,r,l,i,a]}class Xt extends rt{constructor(t){super(),ot(this,t,Ae,Oe,I,{})}}customElements.define("sesamy-paywall",Rt(Xt,{},[],[],!0));export{Kt as Login,Xt as Paywall};
@@ -1,6 +0,0 @@
1
- (function(x,b){typeof exports=="object"&&typeof module<"u"?b(exports):typeof define=="function"&&define.amd?define(["exports"],b):(x=typeof globalThis<"u"?globalThis:x||self,b(x["@sesamy/sesamyComponents"]={}))})(this,function(x){"use strict";var Ot=Object.defineProperty;var Pt=(x,b,N)=>b in x?Ot(x,b,{enumerable:!0,configurable:!0,writable:!0,value:N}):x[b]=N;var L=(x,b,N)=>Pt(x,typeof b!="symbol"?b+"":b,N);function b(){}function N(t,e){for(const n in e)t[n]=e[n];return t}function ve(t){return t()}function ye(){return Object.create(null)}function T(t){t.forEach(ve)}function ke(t){return typeof t=="function"}function R(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let J;function qe(t,e){return t===e?!0:(J||(J=document.createElement("a")),J.href=e,t===J.href)}function et(t){return Object.keys(t).length===0}function we(t,e,n,s){if(t){const l=Ee(t,e,n,s);return t[0](l)}}function Ee(t,e,n,s){return t[1]&&s?N(n.ctx.slice(),t[1](s(e))):n.ctx}function xe(t,e,n,s){if(t[2]&&s){const l=t[2](s(n));if(e.dirty===void 0)return l;if(typeof l=="object"){const i=[],o=Math.max(e.dirty.length,l.length);for(let r=0;r<o;r+=1)i[r]=e.dirty[r]|l[r];return i}return e.dirty|l}return e.dirty}function Ne(t,e,n,s,l,i){if(l){const o=Ee(e,n,s,i);t.p(o,l)}}function Ce(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let s=0;s<n;s++)e[s]=-1;return e}return-1}function G(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function Le(t,e){const n={};e=new Set(e);for(const s in t)!e.has(s)&&s[0]!=="$"&&(n[s]=t[s]);return n}function g(t,e){t.appendChild(e)}function tt(t,e,n){const s=nt(t);if(!s.getElementById(e)){const l=m("style");l.id=e,l.textContent=n,st(s,l)}}function nt(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function st(t,e){return g(t.head||t,e),e.sheet}function S(t,e,n){t.insertBefore(e,n||null)}function C(t){t.parentNode&&t.parentNode.removeChild(t)}function re(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function m(t){return document.createElement(t)}function Se(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function je(t){return document.createTextNode(t)}function w(){return je(" ")}function ce(){return je("")}function Y(t,e,n,s){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}function h(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function Q(t,e){for(const n in e)h(t,n,e[n])}function lt(t){let e;return{p(...n){e=n,e.forEach(s=>t.push(s))},r(){e.forEach(n=>t.splice(t.indexOf(n),1))}}}function it(t){return Array.from(t.childNodes)}function Ae(t,e){t.value=e??""}function ot(t){const e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}let ue;function K(t){ue=t}const W=[],Oe=[];let B=[];const Pe=[],rt=Promise.resolve();let fe=!1;function ct(){fe||(fe=!0,rt.then(Me))}function ae(t){B.push(t)}const de=new Set;let I=0;function Me(){if(I!==0)return;const t=ue;do{try{for(;I<W.length;){const e=W[I];I++,K(e),ut(e.$$)}}catch(e){throw W.length=0,I=0,e}for(K(null),W.length=0,I=0;Oe.length;)Oe.pop()();for(let e=0;e<B.length;e+=1){const n=B[e];de.has(n)||(de.add(n),n())}B.length=0}while(W.length);for(;Pe.length;)Pe.pop()();fe=!1,de.clear(),K(t)}function ut(t){if(t.fragment!==null){t.update(),T(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(ae)}}function ft(t){const e=[],n=[];B.forEach(s=>t.indexOf(s)===-1?e.push(s):n.push(s)),n.forEach(s=>s()),B=e}const X=new Set;let P;function at(){P={r:0,c:[],p:P}}function dt(){P.r||T(P.c),P=P.p}function j(t,e){t&&t.i&&(X.delete(t),t.i(e))}function z(t,e,n,s){if(t&&t.o){if(X.has(t))return;X.add(t),P.c.push(()=>{X.delete(t),s&&(n&&t.d(1),s())}),t.o(e)}else s&&s()}function D(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function he(t,e){const n={},s={},l={$$scope:1};let i=t.length;for(;i--;){const o=t[i],r=e[i];if(r){for(const u in o)u in r||(s[u]=1);for(const u in r)l[u]||(n[u]=r[u],l[u]=1);t[i]=r}else for(const u in o)l[u]=1}for(const o in s)o in n||(n[o]=void 0);return n}function ht(t){return typeof t=="object"&&t!==null?t:{}}function Te(t){t&&t.c()}function _e(t,e,n){const{fragment:s,after_update:l}=t.$$;s&&s.m(e,n),ae(()=>{const i=t.$$.on_mount.map(ve).filter(ke);t.$$.on_destroy?t.$$.on_destroy.push(...i):T(i),t.$$.on_mount=[]}),l.forEach(ae)}function ge(t,e){const n=t.$$;n.fragment!==null&&(ft(n.after_update),T(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function _t(t,e){t.$$.dirty[0]===-1&&(W.push(t),ct(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Z(t,e,n,s,l,i,o=null,r=[-1]){const u=ue;K(t);const a=t.$$={fragment:null,ctx:[],props:i,update:b,not_equal:l,bound:ye(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:ye(),dirty:r,skip_bound:!1,root:e.target||u.$$.root};o&&o(a.root);let y=!1;if(a.ctx=n?n(t,e.props||{},($,c,...v)=>{const f=v.length?v[0]:c;return a.ctx&&l(a.ctx[$],a.ctx[$]=f)&&(!a.skip_bound&&a.bound[$]&&a.bound[$](f),y&&_t(t,$)),c}):[],a.update(),y=!0,T(a.before_update),a.fragment=s?s(a.ctx):!1,e.target){if(e.hydrate){const $=it(e.target);a.fragment&&a.fragment.l($),$.forEach(C)}else a.fragment&&a.fragment.c();e.intro&&j(t.$$.fragment),_e(t,e.target,e.anchor),Me()}K(u)}let We;typeof HTMLElement=="function"&&(We=class extends HTMLElement{constructor(e,n,s){super();L(this,"$$ctor");L(this,"$$s");L(this,"$$c");L(this,"$$cn",!1);L(this,"$$d",{});L(this,"$$r",!1);L(this,"$$p_d",{});L(this,"$$l",{});L(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=n,s&&this.attachShadow({mode:"open"})}addEventListener(e,n,s){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(n),this.$$c){const l=this.$$c.$on(e,n);this.$$l_u.set(n,l)}super.addEventListener(e,n,s)}removeEventListener(e,n,s){if(super.removeEventListener(e,n,s),this.$$c){const l=this.$$l_u.get(n);l&&(l(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(i){return()=>{let o;return{c:function(){o=m("slot"),i!=="default"&&h(o,"name",i)},m:function(a,y){S(a,o,y)},d:function(a){a&&C(o)}}}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},s=ot(this);for(const i of this.$$s)i in s&&(n[i]=[e(i)]);for(const i of this.attributes){const o=this.$$g_p(i.name);o in this.$$d||(this.$$d[o]=ee(o,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const l=()=>{this.$$r=!0;for(const i in this.$$p_d)if(this.$$d[i]=this.$$c.$$.ctx[this.$$c.$$.props[i]],this.$$p_d[i].reflect){const o=ee(i,this.$$d[i],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,o)}this.$$r=!1};this.$$c.$$.after_update.push(l),l();for(const i in this.$$l)for(const o of this.$$l[i]){const r=this.$$c.$on(i,o);this.$$l_u.set(o,r)}this.$$l={}}}attributeChangedCallback(e,n,s){var l;this.$$r||(e=this.$$g_p(e),this.$$d[e]=ee(e,s,this.$$p_d,"toProp"),(l=this.$$c)==null||l.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===e||!this.$$p_d[n].attribute&&n.toLowerCase()===e)||e}});function ee(t,e,n,s){var i;const l=(i=n[t])==null?void 0:i.type;if(e=l==="Boolean"&&typeof e!="boolean"?e!=null:e,!s||!n[t])return e;if(s==="toAttribute")switch(l){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(l){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Be(t,e,n,s,l,i){let o=class extends We{constructor(){super(t,n,l),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map(r=>(e[r].attribute||r).toLowerCase())}};return Object.keys(e).forEach(r=>{Object.defineProperty(o.prototype,r,{get(){return this.$$c&&r in this.$$c?this.$$c[r]:this.$$d[r]},set(u){var a;u=ee(r,u,e),this.$$d[r]=u,(a=this.$$c)==null||a.$set({[r]:u})}})}),s.forEach(r=>{Object.defineProperty(o.prototype,r,{get(){var u;return(u=this.$$c)==null?void 0:u[r]}})}),t.element=o,o}class te{constructor(){L(this,"$$");L(this,"$$set")}$destroy(){ge(this,1),this.$destroy=b}$on(e,n){if(!ke(n))return b;const s=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return s.push(n),()=>{const l=s.indexOf(n);l!==-1&&s.splice(l,1)}}$set(e){this.$$set&&!et(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const gt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(gt);function mt(t){tt(t,"svelte-1nq6lsq",".login-btn.svelte-1nq6lsq.svelte-1nq6lsq,.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.3s ease;border:none;outline:none}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:120px;height:40px;border-radius:5px;background-color:#007bff;color:white;font-size:16px;font-weight:bold}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:hover{background-color:#0056b3}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus{outline:2px solid #0056b3;outline-offset:4px}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:50px;height:50px;border-radius:50%}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq{background-color:#00bfff;animation:svelte-1nq6lsq-pulse 1s infinite ease-in-out}.avatar-btn.svelte-1nq6lsq img.svelte-1nq6lsq{width:100%;height:100%;object-fit:cover;border-radius:50%}@keyframes svelte-1nq6lsq-pulse{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}")}function $t(t){let e,n,s;return{c(){e=m("button"),e.textContent="Login",h(e,"class","login-btn svelte-1nq6lsq"),h(e,"aria-label","Log in")},m(l,i){S(l,e,i),n||(s=Y(e,"click",t[2]),n=!0)},p:b,d(l){l&&C(e),n=!1,s()}}}function bt(t){let e,n,s,l,i;return{c(){e=m("button"),n=m("img"),qe(n.src,s=yt)||h(n,"src",s),h(n,"alt","User Avatar"),h(n,"class","svelte-1nq6lsq"),h(e,"class","avatar-btn svelte-1nq6lsq"),h(e,"aria-label","Log out")},m(o,r){S(o,e,r),g(e,n),l||(i=Y(e,"click",t[3]),l=!0)},p:b,d(o){o&&C(e),l=!1,i()}}}function pt(t){let e;return{c(){e=m("button"),e.innerHTML="",h(e,"class","loading-btn svelte-1nq6lsq"),h(e,"aria-busy","true"),h(e,"aria-label","Logging in")},m(n,s){S(n,e,s)},p:b,d(n){n&&C(e)}}}function vt(t){let e;function n(i,o){return i[0]?pt:i[1]?bt:$t}let s=n(t),l=s(t);return{c(){l.c(),e=ce()},m(i,o){l.m(i,o),S(i,e,o)},p(i,[o]){s===(s=n(i))&&l?l.p(i,o):(l.d(1),l=s(i),l&&(l.c(),l.m(e.parentNode,e)))},i:b,o:b,d(i){i&&C(e),l.d(i)}}}let yt="https://via.placeholder.com/50";function kt(t,e,n){let s=!1,l=!1;const i=async()=>{n(0,s=!0),await new Promise(u=>setTimeout(u,2e3)),n(0,s=!1),n(1,l=!0)},o=()=>{n(1,l=!1)};return l=l,[s,l,i,o]}class Ie extends te{constructor(e){super(),Z(this,e,kt,vt,R,{},mt)}}customElements.define("sesamy-login",Be(Ie,{},[],[],!0));/**
2
- * @license lucide-svelte v0.445.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const ze={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function De(t,e,n){const s=t.slice();return s[11]=e[n][0],s[12]=e[n][1],s}function me(t){let e,n=[t[12]],s={};for(let l=0;l<n.length;l+=1)s=N(s,n[l]);return{c(){e=Se(t[11]),Q(e,s)},m(l,i){S(l,e,i)},p(l,i){Q(e,s=he(n,[i&32&&l[12]]))},d(l){l&&C(e)}}}function Fe(t){let e=t[11],n,s=t[11]&&me(t);return{c(){s&&s.c(),n=ce()},m(l,i){s&&s.m(l,i),S(l,n,i)},p(l,i){l[11]?e?R(e,l[11])?(s.d(1),s=me(l),e=l[11],s.c(),s.m(n.parentNode,n)):s.p(l,i):(s=me(l),e=l[11],s.c(),s.m(n.parentNode,n)):e&&(s.d(1),s=null,e=l[11])},d(l){l&&C(n),s&&s.d(l)}}}function qt(t){let e,n,s,l,i,o=D(t[5]),r=[];for(let c=0;c<o.length;c+=1)r[c]=Fe(De(t,o,c));const u=t[10].default,a=we(u,t,t[9],null);let y=[ze,t[7],{width:t[2]},{height:t[2]},{stroke:t[1]},{"stroke-width":s=t[4]?Number(t[3])*24/Number(t[2]):t[3]},{class:l=t[6]("lucide-icon","lucide",t[0]?`lucide-${t[0]}`:"",t[8].class)}],$={};for(let c=0;c<y.length;c+=1)$=N($,y[c]);return{c(){e=Se("svg");for(let c=0;c<r.length;c+=1)r[c].c();n=ce(),a&&a.c(),Q(e,$)},m(c,v){S(c,e,v);for(let f=0;f<r.length;f+=1)r[f]&&r[f].m(e,null);g(e,n),a&&a.m(e,null),i=!0},p(c,[v]){if(v&32){o=D(c[5]);let f;for(f=0;f<o.length;f+=1){const A=De(c,o,f);r[f]?r[f].p(A,v):(r[f]=Fe(A),r[f].c(),r[f].m(e,n))}for(;f<r.length;f+=1)r[f].d(1);r.length=o.length}a&&a.p&&(!i||v&512)&&Ne(a,u,c,c[9],i?xe(u,c[9],v,null):Ce(c[9]),null),Q(e,$=he(y,[ze,v&128&&c[7],(!i||v&4)&&{width:c[2]},(!i||v&4)&&{height:c[2]},(!i||v&2)&&{stroke:c[1]},(!i||v&28&&s!==(s=c[4]?Number(c[3])*24/Number(c[2]):c[3]))&&{"stroke-width":s},(!i||v&257&&l!==(l=c[6]("lucide-icon","lucide",c[0]?`lucide-${c[0]}`:"",c[8].class)))&&{class:l}]))},i(c){i||(j(a,c),i=!0)},o(c){z(a,c),i=!1},d(c){c&&C(e),re(r,c),a&&a.d(c)}}}function wt(t,e,n){const s=["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"];let l=Le(e,s),{$$slots:i={},$$scope:o}=e,{name:r=void 0}=e,{color:u="currentColor"}=e,{size:a=24}=e,{strokeWidth:y=2}=e,{absoluteStrokeWidth:$=!1}=e,{iconNode:c=[]}=e;const v=(...f)=>f.filter((A,F,ne)=>!!A&&ne.indexOf(A)===F).join(" ");return t.$$set=f=>{n(8,e=N(N({},e),G(f))),n(7,l=Le(e,s)),"name"in f&&n(0,r=f.name),"color"in f&&n(1,u=f.color),"size"in f&&n(2,a=f.size),"strokeWidth"in f&&n(3,y=f.strokeWidth),"absoluteStrokeWidth"in f&&n(4,$=f.absoluteStrokeWidth),"iconNode"in f&&n(5,c=f.iconNode),"$$scope"in f&&n(9,o=f.$$scope)},e=G(e),[r,u,a,y,$,c,v,l,e,o,i]}class Et extends te{constructor(e){super(),Z(this,e,wt,qt,R,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function xt(t){let e;const n=t[2].default,s=we(n,t,t[3],null);return{c(){s&&s.c()},m(l,i){s&&s.m(l,i),e=!0},p(l,i){s&&s.p&&(!e||i&8)&&Ne(s,n,l,l[3],e?xe(n,l[3],i,null):Ce(l[3]),null)},i(l){e||(j(s,l),e=!0)},o(l){z(s,l),e=!1},d(l){s&&s.d(l)}}}function Nt(t){let e,n;const s=[{name:"circle-check"},t[1],{iconNode:t[0]}];let l={$$slots:{default:[xt]},$$scope:{ctx:t}};for(let i=0;i<s.length;i+=1)l=N(l,s[i]);return e=new Et({props:l}),{c(){Te(e.$$.fragment)},m(i,o){_e(e,i,o),n=!0},p(i,[o]){const r=o&3?he(s,[s[0],o&2&&ht(i[1]),o&1&&{iconNode:i[0]}]):{};o&8&&(r.$$scope={dirty:o,ctx:i}),e.$set(r)},i(i){n||(j(e.$$.fragment,i),n=!0)},o(i){z(e.$$.fragment,i),n=!1},d(i){ge(e,i)}}}function Ct(t,e,n){let{$$slots:s={},$$scope:l}=e;const i=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m9 12 2 2 4-4"}]];return t.$$set=o=>{n(1,e=N(N({},e),G(o))),"$$scope"in o&&n(3,l=o.$$scope)},e=G(e),[i,e,s,l]}class Lt extends te{constructor(e){super(),Z(this,e,Ct,Nt,R,{})}}function He(t,e,n){const s=t.slice();return s[6]=e[n],s}function Re(t,e,n){const s=t.slice();return s[9]=e[n],s}function Ke(t){let e,n,s,l,i,o;return n=new Lt({props:{class:"text-green-500 mr-2",size:20}}),{c(){e=m("li"),Te(n.$$.fragment),s=w(),l=m("span"),l.textContent=`${t[9]}`,i=w(),h(e,"class","flex items-center")},m(r,u){S(r,e,u),_e(n,e,null),g(e,s),g(e,l),g(e,i),o=!0},p:b,i(r){o||(j(n.$$.fragment,r),o=!0)},o(r){z(n.$$.fragment,r),o=!1},d(r){r&&C(e),ge(n)}}}function Ue(t){let e,n;return{c(){e=m("img"),qe(e.src,n="/api/placeholder/40/25")||h(e,"src",n),h(e,"alt",t[6]),h(e,"class","h-6")},m(s,l){S(s,e,l)},p:b,d(s){s&&C(e)}}}function St(t){let e,n,s,l,i,o,r,u,a,y,$,c,v,f,A,F,ne,O,E,Je,$e,Ge,se,Ye,le,Qe,ie,Xe,U,oe,be,pe,Ze,M=D(t[1]),p=[];for(let _=0;_<M.length;_+=1)p[_]=Ke(Re(t,M,_));const At=_=>z(p[_],1,1,()=>{p[_]=null});let H=D(t[2]),q=[];for(let _=0;_<H.length;_+=1)q[_]=Ue(He(t,H,_));return be=lt(t[4][0]),{c(){e=m("div"),n=m("div"),n.textContent="Redan prenumerant? Logga in",s=w(),l=m("h1"),l.textContent="FOKUS",i=w(),o=m("h2"),o.textContent="Läs Fokus Digital i 6 månader för bara 79 kr!",r=w(),u=m("ul");for(let _=0;_<p.length;_+=1)p[_].c();a=w(),y=m("div"),$=m("label"),c=m("input"),v=w(),f=m("div"),f.innerHTML='<div class="font-semibold">Fokus Digital i 6 månader för 79kr!</div> <div class="text-sm text-gray-600">Efter kampanjperioden 149 kr/mån. Ingen bindningstid!</div>',A=w(),F=m("div"),F.textContent="79 SEK/6 mån",ne=w(),O=m("label"),E=m("input"),Je=w(),$e=m("div"),$e.innerHTML='<div class="font-semibold">Fokus Digital i ett år för 995kr</div> <div class="text-sm text-gray-600">Du sparar 793 kr. Prenumerationen förnyas automatiskt årsvis.</div>',Ge=w(),se=m("div"),se.textContent="995 SEK/år",Ye=w(),le=m("button"),le.textContent="Fortsätt",Qe=w(),ie=m("div"),ie.textContent="Säker SSL-krypterad betalning",Xe=w(),U=m("div");for(let _=0;_<q.length;_+=1)q[_].c();h(n,"class","text-right text-sm text-red-500 mb-4"),h(l,"class","text-4xl font-bold text-red-500 mb-4"),h(o,"class","text-xl font-semibold mb-6"),h(u,"class","space-y-2 mb-6"),h(c,"type","radio"),h(c,"name","subscription"),c.__value="sixMonths",Ae(c,c.__value),h(c,"class","mr-3"),h(F,"class","ml-auto font-semibold"),h($,"class","flex items-center p-4 border rounded-lg"),h(E,"type","radio"),h(E,"name","subscription"),E.__value="oneYear",Ae(E,E.__value),h(E,"class","mr-3"),h(se,"class","ml-auto font-semibold"),h(O,"class","flex items-center p-4 border rounded-lg"),h(y,"class","space-y-4 mb-6"),h(le,"class","w-full bg-red-500 text-white py-3 rounded-lg font-semibold"),h(ie,"class","text-center text-sm text-gray-600 mt-4"),h(U,"class","flex justify-center space-x-2 mt-2"),h(e,"class","max-w-md mx-auto bg-white p-6 rounded-lg shadow-lg"),be.p(c,E)},m(_,k){S(_,e,k),g(e,n),g(e,s),g(e,l),g(e,i),g(e,o),g(e,r),g(e,u);for(let d=0;d<p.length;d+=1)p[d]&&p[d].m(u,null);g(e,a),g(e,y),g(y,$),g($,c),c.checked=c.__value===t[0],g($,v),g($,f),g($,A),g($,F),g(y,ne),g(y,O),g(O,E),E.checked=E.__value===t[0],g(O,Je),g(O,$e),g(O,Ge),g(O,se),g(e,Ye),g(e,le),g(e,Qe),g(e,ie),g(e,Xe),g(e,U);for(let d=0;d<q.length;d+=1)q[d]&&q[d].m(U,null);oe=!0,pe||(Ze=[Y(c,"change",t[3]),Y(E,"change",t[5])],pe=!0)},p(_,[k]){if(k&2){M=D(_[1]);let d;for(d=0;d<M.length;d+=1){const V=Re(_,M,d);p[d]?(p[d].p(V,k),j(p[d],1)):(p[d]=Ke(V),p[d].c(),j(p[d],1),p[d].m(u,null))}for(at(),d=M.length;d<p.length;d+=1)At(d);dt()}if(k&1&&(c.checked=c.__value===_[0]),k&1&&(E.checked=E.__value===_[0]),k&4){H=D(_[2]);let d;for(d=0;d<H.length;d+=1){const V=He(_,H,d);q[d]?q[d].p(V,k):(q[d]=Ue(V),q[d].c(),q[d].m(U,null))}for(;d<q.length;d+=1)q[d].d(1);q.length=H.length}},i(_){if(!oe){for(let k=0;k<M.length;k+=1)j(p[k]);oe=!0}},o(_){p=p.filter(Boolean);for(let k=0;k<p.length;k+=1)z(p[k]);oe=!1},d(_){_&&C(e),re(p,_),re(q,_),be.r(),pe=!1,T(Ze)}}}function jt(t,e,n){let s="sixMonths";const l=["Allt material på Fokus.se","Tillgång till e-tidning","Tillgång till våra podcasts","Nyhetsbrev"],i=["Visa","American Express","Mastercard","Klarna","Google Pay","Apple Pay","Swish"],o=[[]];function r(){s=this.__value,n(0,s)}function u(){s=this.__value,n(0,s)}return[s,l,i,r,o,u]}class Ve extends te{constructor(e){super(),Z(this,e,jt,St,R,{})}}customElements.define("sesamy-paywall",Be(Ve,{},[],[],!0)),x.Login=Ie,x.Paywall=Ve,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});