@everymatrix/cashier-pagination 1.87.26 → 1.87.27

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,813 @@
1
+ var gt = Object.defineProperty, bt = Object.defineProperties;
2
+ var _t = Object.getOwnPropertyDescriptors;
3
+ var X = Object.getOwnPropertySymbols;
4
+ var pt = Object.prototype.hasOwnProperty, mt = Object.prototype.propertyIsEnumerable;
5
+ var J = (e, t, n) => t in e ? gt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Z = (e, t) => {
6
+ for (var n in t || (t = {}))
7
+ pt.call(t, n) && J(e, n, t[n]);
8
+ if (X)
9
+ for (var n of X(t))
10
+ mt.call(t, n) && J(e, n, t[n]);
11
+ return e;
12
+ }, tt = (e, t) => bt(e, _t(t));
13
+ var k = (e, t, n) => (J(e, typeof t != "symbol" ? t + "" : t, n), n);
14
+ var et = (e, t, n) => new Promise((s, i) => {
15
+ var o = (u) => {
16
+ try {
17
+ l(n.next(u));
18
+ } catch (c) {
19
+ i(c);
20
+ }
21
+ }, r = (u) => {
22
+ try {
23
+ l(n.throw(u));
24
+ } catch (c) {
25
+ i(c);
26
+ }
27
+ }, l = (u) => u.done ? s(u.value) : Promise.resolve(u.value).then(o, r);
28
+ l((n = n.apply(e, t)).next());
29
+ });
30
+ function T() {
31
+ }
32
+ function dt(e) {
33
+ return e();
34
+ }
35
+ function nt() {
36
+ return /* @__PURE__ */ Object.create(null);
37
+ }
38
+ function D(e) {
39
+ e.forEach(dt);
40
+ }
41
+ function ht(e) {
42
+ return typeof e == "function";
43
+ }
44
+ function wt(e, t) {
45
+ return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
46
+ }
47
+ function yt(e) {
48
+ return Object.keys(e).length === 0;
49
+ }
50
+ function m(e, t) {
51
+ e.appendChild(t);
52
+ }
53
+ function kt(e, t, n) {
54
+ const s = St(e);
55
+ if (!s.getElementById(t)) {
56
+ const i = v("style");
57
+ i.id = t, i.textContent = n, vt(s, i);
58
+ }
59
+ }
60
+ function St(e) {
61
+ if (!e)
62
+ return document;
63
+ const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
64
+ return t && /** @type {ShadowRoot} */
65
+ t.host ? (
66
+ /** @type {ShadowRoot} */
67
+ t
68
+ ) : e.ownerDocument;
69
+ }
70
+ function vt(e, t) {
71
+ return m(
72
+ /** @type {Document} */
73
+ e.head || e,
74
+ t
75
+ ), t.sheet;
76
+ }
77
+ function x(e, t, n) {
78
+ e.insertBefore(t, n || null);
79
+ }
80
+ function C(e) {
81
+ e.parentNode && e.parentNode.removeChild(e);
82
+ }
83
+ function Et(e, t) {
84
+ for (let n = 0; n < e.length; n += 1)
85
+ e[n] && e[n].d(t);
86
+ }
87
+ function v(e) {
88
+ return document.createElement(e);
89
+ }
90
+ function I(e) {
91
+ return document.createElementNS("http://www.w3.org/2000/svg", e);
92
+ }
93
+ function F(e) {
94
+ return document.createTextNode(e);
95
+ }
96
+ function z() {
97
+ return F(" ");
98
+ }
99
+ function U(e, t, n, s) {
100
+ return e.addEventListener(t, n, s), () => e.removeEventListener(t, n, s);
101
+ }
102
+ function d(e, t, n) {
103
+ n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n);
104
+ }
105
+ function Ct(e) {
106
+ return Array.from(e.childNodes);
107
+ }
108
+ function at(e, t) {
109
+ t = "" + t, e.data !== t && (e.data = /** @type {string} */
110
+ t);
111
+ }
112
+ function st(e, t, n) {
113
+ e.classList.toggle(t, !!n);
114
+ }
115
+ function xt(e) {
116
+ const t = {};
117
+ return e.childNodes.forEach(
118
+ /** @param {Element} node */
119
+ (n) => {
120
+ t[n.slot || "default"] = !0;
121
+ }
122
+ ), t;
123
+ }
124
+ let V;
125
+ function H(e) {
126
+ V = e;
127
+ }
128
+ function Lt() {
129
+ if (!V)
130
+ throw new Error("Function called outside component initialization");
131
+ return V;
132
+ }
133
+ function At(e) {
134
+ Lt().$$.on_mount.push(e);
135
+ }
136
+ const O = [], W = [];
137
+ let M = [];
138
+ const it = [], jt = /* @__PURE__ */ Promise.resolve();
139
+ let Y = !1;
140
+ function Ot() {
141
+ Y || (Y = !0, jt.then(N));
142
+ }
143
+ function q(e) {
144
+ M.push(e);
145
+ }
146
+ const K = /* @__PURE__ */ new Set();
147
+ let j = 0;
148
+ function N() {
149
+ if (j !== 0)
150
+ return;
151
+ const e = V;
152
+ do {
153
+ try {
154
+ for (; j < O.length; ) {
155
+ const t = O[j];
156
+ j++, H(t), Bt(t.$$);
157
+ }
158
+ } catch (t) {
159
+ throw O.length = 0, j = 0, t;
160
+ }
161
+ for (H(null), O.length = 0, j = 0; W.length; )
162
+ W.pop()();
163
+ for (let t = 0; t < M.length; t += 1) {
164
+ const n = M[t];
165
+ K.has(n) || (K.add(n), n());
166
+ }
167
+ M.length = 0;
168
+ } while (O.length);
169
+ for (; it.length; )
170
+ it.pop()();
171
+ Y = !1, K.clear(), H(e);
172
+ }
173
+ function Bt(e) {
174
+ if (e.fragment !== null) {
175
+ e.update(), D(e.before_update);
176
+ const t = e.dirty;
177
+ e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(q);
178
+ }
179
+ }
180
+ function Nt(e) {
181
+ const t = [], n = [];
182
+ M.forEach((s) => e.indexOf(s) === -1 ? t.push(s) : n.push(s)), n.forEach((s) => s()), M = t;
183
+ }
184
+ const Mt = /* @__PURE__ */ new Set();
185
+ function Tt(e, t) {
186
+ e && e.i && (Mt.delete(e), e.i(t));
187
+ }
188
+ function ot(e) {
189
+ return (e == null ? void 0 : e.length) !== void 0 ? e : Array.from(e);
190
+ }
191
+ function Rt(e, t, n) {
192
+ const { fragment: s, after_update: i } = e.$$;
193
+ s && s.m(t, n), q(() => {
194
+ const o = e.$$.on_mount.map(dt).filter(ht);
195
+ e.$$.on_destroy ? e.$$.on_destroy.push(...o) : D(o), e.$$.on_mount = [];
196
+ }), i.forEach(q);
197
+ }
198
+ function Pt(e, t) {
199
+ const n = e.$$;
200
+ n.fragment !== null && (Nt(n.after_update), D(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
201
+ }
202
+ function Ht(e, t) {
203
+ e.$$.dirty[0] === -1 && (O.push(e), Ot(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
204
+ }
205
+ function Ft(e, t, n, s, i, o, r = null, l = [-1]) {
206
+ const u = V;
207
+ H(e);
208
+ const c = e.$$ = {
209
+ fragment: null,
210
+ ctx: [],
211
+ // state
212
+ props: o,
213
+ update: T,
214
+ not_equal: i,
215
+ bound: nt(),
216
+ // lifecycle
217
+ on_mount: [],
218
+ on_destroy: [],
219
+ on_disconnect: [],
220
+ before_update: [],
221
+ after_update: [],
222
+ context: new Map(t.context || (u ? u.$$.context : [])),
223
+ // everything else
224
+ callbacks: nt(),
225
+ dirty: l,
226
+ skip_bound: !1,
227
+ root: t.target || u.$$.root
228
+ };
229
+ r && r(c.root);
230
+ let w = !1;
231
+ if (c.ctx = n ? n(e, t.props || {}, (a, E, ...y) => {
232
+ const $ = y.length ? y[0] : E;
233
+ return c.ctx && i(c.ctx[a], c.ctx[a] = $) && (!c.skip_bound && c.bound[a] && c.bound[a]($), w && Ht(e, a)), E;
234
+ }) : [], c.update(), w = !0, D(c.before_update), c.fragment = s ? s(c.ctx) : !1, t.target) {
235
+ if (t.hydrate) {
236
+ const a = Ct(t.target);
237
+ c.fragment && c.fragment.l(a), a.forEach(C);
238
+ } else
239
+ c.fragment && c.fragment.c();
240
+ t.intro && Tt(e.$$.fragment), Rt(e, t.target, t.anchor), N();
241
+ }
242
+ H(u);
243
+ }
244
+ let $t;
245
+ typeof HTMLElement == "function" && ($t = class extends HTMLElement {
246
+ constructor(t, n, s) {
247
+ super();
248
+ /** The Svelte component constructor */
249
+ k(this, "$$ctor");
250
+ /** Slots */
251
+ k(this, "$$s");
252
+ /** The Svelte component instance */
253
+ k(this, "$$c");
254
+ /** Whether or not the custom element is connected */
255
+ k(this, "$$cn", !1);
256
+ /** Component props data */
257
+ k(this, "$$d", {});
258
+ /** `true` if currently in the process of reflecting component props back to attributes */
259
+ k(this, "$$r", !1);
260
+ /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
261
+ k(this, "$$p_d", {});
262
+ /** @type {Record<string, Function[]>} Event listeners */
263
+ k(this, "$$l", {});
264
+ /** @type {Map<Function, Function>} Event listener unsubscribe functions */
265
+ k(this, "$$l_u", /* @__PURE__ */ new Map());
266
+ this.$$ctor = t, this.$$s = n, s && this.attachShadow({ mode: "open" });
267
+ }
268
+ addEventListener(t, n, s) {
269
+ if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(n), this.$$c) {
270
+ const i = this.$$c.$on(t, n);
271
+ this.$$l_u.set(n, i);
272
+ }
273
+ super.addEventListener(t, n, s);
274
+ }
275
+ removeEventListener(t, n, s) {
276
+ if (super.removeEventListener(t, n, s), this.$$c) {
277
+ const i = this.$$l_u.get(n);
278
+ i && (i(), this.$$l_u.delete(n));
279
+ }
280
+ }
281
+ connectedCallback() {
282
+ return et(this, null, function* () {
283
+ if (this.$$cn = !0, !this.$$c) {
284
+ let t = function(o) {
285
+ return () => {
286
+ let r;
287
+ return {
288
+ c: function() {
289
+ r = v("slot"), o !== "default" && d(r, "name", o);
290
+ },
291
+ /**
292
+ * @param {HTMLElement} target
293
+ * @param {HTMLElement} [anchor]
294
+ */
295
+ m: function(c, w) {
296
+ x(c, r, w);
297
+ },
298
+ d: function(c) {
299
+ c && C(r);
300
+ }
301
+ };
302
+ };
303
+ };
304
+ if (yield Promise.resolve(), !this.$$cn || this.$$c)
305
+ return;
306
+ const n = {}, s = xt(this);
307
+ for (const o of this.$$s)
308
+ o in s && (n[o] = [t(o)]);
309
+ for (const o of this.attributes) {
310
+ const r = this.$$g_p(o.name);
311
+ r in this.$$d || (this.$$d[r] = G(r, o.value, this.$$p_d, "toProp"));
312
+ }
313
+ for (const o in this.$$p_d)
314
+ !(o in this.$$d) && this[o] !== void 0 && (this.$$d[o] = this[o], delete this[o]);
315
+ this.$$c = new this.$$ctor({
316
+ target: this.shadowRoot || this,
317
+ props: tt(Z({}, this.$$d), {
318
+ $$slots: n,
319
+ $$scope: {
320
+ ctx: []
321
+ }
322
+ })
323
+ });
324
+ const i = () => {
325
+ this.$$r = !0;
326
+ for (const o in this.$$p_d)
327
+ if (this.$$d[o] = this.$$c.$$.ctx[this.$$c.$$.props[o]], this.$$p_d[o].reflect) {
328
+ const r = G(
329
+ o,
330
+ this.$$d[o],
331
+ this.$$p_d,
332
+ "toAttribute"
333
+ );
334
+ r == null ? this.removeAttribute(this.$$p_d[o].attribute || o) : this.setAttribute(this.$$p_d[o].attribute || o, r);
335
+ }
336
+ this.$$r = !1;
337
+ };
338
+ this.$$c.$$.after_update.push(i), i();
339
+ for (const o in this.$$l)
340
+ for (const r of this.$$l[o]) {
341
+ const l = this.$$c.$on(o, r);
342
+ this.$$l_u.set(r, l);
343
+ }
344
+ this.$$l = {};
345
+ }
346
+ });
347
+ }
348
+ // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
349
+ // and setting attributes through setAttribute etc, this is helpful
350
+ attributeChangedCallback(t, n, s) {
351
+ var i;
352
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = G(t, s, this.$$p_d, "toProp"), (i = this.$$c) == null || i.$set({ [t]: this.$$d[t] }));
353
+ }
354
+ disconnectedCallback() {
355
+ this.$$cn = !1, Promise.resolve().then(() => {
356
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
357
+ });
358
+ }
359
+ $$g_p(t) {
360
+ return Object.keys(this.$$p_d).find(
361
+ (n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
362
+ ) || t;
363
+ }
364
+ });
365
+ function G(e, t, n, s) {
366
+ var o;
367
+ const i = (o = n[e]) == null ? void 0 : o.type;
368
+ if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !s || !n[e])
369
+ return t;
370
+ if (s === "toAttribute")
371
+ switch (i) {
372
+ case "Object":
373
+ case "Array":
374
+ return t == null ? null : JSON.stringify(t);
375
+ case "Boolean":
376
+ return t ? "" : null;
377
+ case "Number":
378
+ return t == null ? null : t;
379
+ default:
380
+ return t;
381
+ }
382
+ else
383
+ switch (i) {
384
+ case "Object":
385
+ case "Array":
386
+ return t && JSON.parse(t);
387
+ case "Boolean":
388
+ return t;
389
+ case "Number":
390
+ return t != null ? +t : t;
391
+ default:
392
+ return t;
393
+ }
394
+ }
395
+ function Ut(e, t, n, s, i, o) {
396
+ let r = class extends $t {
397
+ constructor() {
398
+ super(e, n, i), this.$$p_d = t;
399
+ }
400
+ static get observedAttributes() {
401
+ return Object.keys(t).map(
402
+ (l) => (t[l].attribute || l).toLowerCase()
403
+ );
404
+ }
405
+ };
406
+ return Object.keys(t).forEach((l) => {
407
+ Object.defineProperty(r.prototype, l, {
408
+ get() {
409
+ return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
410
+ },
411
+ set(u) {
412
+ var c;
413
+ u = G(l, u, t), this.$$d[l] = u, (c = this.$$c) == null || c.$set({ [l]: u });
414
+ }
415
+ });
416
+ }), s.forEach((l) => {
417
+ Object.defineProperty(r.prototype, l, {
418
+ get() {
419
+ var u;
420
+ return (u = this.$$c) == null ? void 0 : u[l];
421
+ }
422
+ });
423
+ }), e.element = /** @type {any} */
424
+ r, r;
425
+ }
426
+ class Vt {
427
+ constructor() {
428
+ /**
429
+ * ### PRIVATE API
430
+ *
431
+ * Do not use, may change at any time
432
+ *
433
+ * @type {any}
434
+ */
435
+ k(this, "$$");
436
+ /**
437
+ * ### PRIVATE API
438
+ *
439
+ * Do not use, may change at any time
440
+ *
441
+ * @type {any}
442
+ */
443
+ k(this, "$$set");
444
+ }
445
+ /** @returns {void} */
446
+ $destroy() {
447
+ Pt(this, 1), this.$destroy = T;
448
+ }
449
+ /**
450
+ * @template {Extract<keyof Events, string>} K
451
+ * @param {K} type
452
+ * @param {((e: Events[K]) => void) | null | undefined} callback
453
+ * @returns {() => void}
454
+ */
455
+ $on(t, n) {
456
+ if (!ht(n))
457
+ return T;
458
+ const s = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
459
+ return s.push(n), () => {
460
+ const i = s.indexOf(n);
461
+ i !== -1 && s.splice(i, 1);
462
+ };
463
+ }
464
+ /**
465
+ * @param {Partial<Props>} props
466
+ * @returns {void}
467
+ */
468
+ $set(t) {
469
+ this.$$set && !yt(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
470
+ }
471
+ }
472
+ const Dt = "4";
473
+ typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Dt);
474
+ const B = "__WIDGET_GLOBAL_STYLE_CACHE__";
475
+ function It(e, t) {
476
+ if (e) {
477
+ const n = document.createElement("style");
478
+ n.innerHTML = t, e.appendChild(n);
479
+ }
480
+ }
481
+ function zt(e, t) {
482
+ if (!e || !t)
483
+ return;
484
+ const n = new URL(t);
485
+ fetch(n.href).then((s) => s.text()).then((s) => {
486
+ const i = document.createElement("style");
487
+ i.innerHTML = s, e && e.appendChild(i);
488
+ }).catch((s) => {
489
+ console.error("There was an error while trying to load client styling from URL", s);
490
+ });
491
+ }
492
+ function Gt(e, t, n, s = !1) {
493
+ if (!window.emMessageBus)
494
+ return;
495
+ if (!("adoptedStyleSheets" in Document.prototype) || !s)
496
+ return n = Jt(e, t), n;
497
+ window[B] || (window[B] = {}), n = Kt(e, t);
498
+ const o = n.unsubscribe.bind(n), r = () => {
499
+ if (window[B][t]) {
500
+ const l = window[B][t];
501
+ l.refCount > 1 ? l.refCount = l.refCount - 1 : delete window[B][t];
502
+ }
503
+ o();
504
+ };
505
+ return n.unsubscribe = r, n;
506
+ }
507
+ function Jt(e, t) {
508
+ const n = document.createElement("style");
509
+ return window.emMessageBus.subscribe(t, (s) => {
510
+ e && (n.innerHTML = s, e.appendChild(n));
511
+ });
512
+ }
513
+ function Kt(e, t) {
514
+ return window.emMessageBus.subscribe(t, (n) => {
515
+ var l;
516
+ if (!e)
517
+ return;
518
+ const s = e.getRootNode(), i = window[B];
519
+ let o = (l = i[t]) == null ? void 0 : l.sheet;
520
+ o ? i[t].refCount = i[t].refCount + 1 : (o = new CSSStyleSheet(), o.replaceSync(n), i[t] = {
521
+ sheet: o,
522
+ refCount: 1
523
+ });
524
+ const r = s.adoptedStyleSheets || [];
525
+ r.includes(o) || (s.adoptedStyleSheets = [...r, o]);
526
+ });
527
+ }
528
+ function Wt(e) {
529
+ kt(e, "svelte-1rkxa9f", "*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.pagination{display:flex;gap:4px;align-items:center;justify-content:center;flex-wrap:wrap}button{padding:6px;border:1px solid var(--emw--color-grey-10, #F8F8F8);background:transparent;cursor:pointer;border-radius:4px;color:var(--emw--color-grey-10, #111);min-width:30px}button:hover:not(:disabled):not(.selected){border-color:var(--emw--color-grey-105, #E8E9EB)}button:disabled{color:var(--emw--color-grey-105, #E8E9EB);cursor:not-allowed}.nav-btn{display:flex;align-items:center;gap:4px;font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-primary, #4A975C);height:30px;width:30px}.selected{color:var(--emw--color-primary, #4A975C);font-weight:var(--emw--font-weight-bold, 700);border-color:var(--emw--color-primary, #4A975C)}");
530
+ }
531
+ function rt(e, t, n) {
532
+ const s = e.slice();
533
+ return s[15] = t[n], s;
534
+ }
535
+ function lt(e) {
536
+ let t, n, s, i;
537
+ return {
538
+ c() {
539
+ t = v("button"), t.textContent = "1", n = F(`
540
+ ...`);
541
+ },
542
+ m(o, r) {
543
+ x(o, t, r), x(o, n, r), s || (i = U(
544
+ t,
545
+ "click",
546
+ /*click_handler_1*/
547
+ e[9]
548
+ ), s = !0);
549
+ },
550
+ p: T,
551
+ d(o) {
552
+ o && (C(t), C(n)), s = !1, i();
553
+ }
554
+ };
555
+ }
556
+ function ct(e) {
557
+ let t, n = (
558
+ /*page*/
559
+ e[15] + ""
560
+ ), s, i, o;
561
+ function r() {
562
+ return (
563
+ /*click_handler_2*/
564
+ e[10](
565
+ /*page*/
566
+ e[15]
567
+ )
568
+ );
569
+ }
570
+ return {
571
+ c() {
572
+ t = v("button"), s = F(n), st(
573
+ t,
574
+ "selected",
575
+ /*page*/
576
+ e[15] === /*currentPage*/
577
+ e[2]
578
+ );
579
+ },
580
+ m(l, u) {
581
+ x(l, t, u), m(t, s), i || (o = U(t, "click", r), i = !0);
582
+ },
583
+ p(l, u) {
584
+ e = l, u & /*visiblePages*/
585
+ 8 && n !== (n = /*page*/
586
+ e[15] + "") && at(s, n), u & /*visiblePages, currentPage*/
587
+ 12 && st(
588
+ t,
589
+ "selected",
590
+ /*page*/
591
+ e[15] === /*currentPage*/
592
+ e[2]
593
+ );
594
+ },
595
+ d(l) {
596
+ l && C(t), i = !1, o();
597
+ }
598
+ };
599
+ }
600
+ function ut(e) {
601
+ let t, n, s, i, o;
602
+ return {
603
+ c() {
604
+ t = F(`...
605
+ `), n = v("button"), s = F(
606
+ /*totalpages*/
607
+ e[0]
608
+ );
609
+ },
610
+ m(r, l) {
611
+ x(r, t, l), x(r, n, l), m(n, s), i || (o = U(
612
+ n,
613
+ "click",
614
+ /*click_handler_3*/
615
+ e[11]
616
+ ), i = !0);
617
+ },
618
+ p(r, l) {
619
+ l & /*totalpages*/
620
+ 1 && at(
621
+ s,
622
+ /*totalpages*/
623
+ r[0]
624
+ );
625
+ },
626
+ d(r) {
627
+ r && (C(t), C(n)), i = !1, o();
628
+ }
629
+ };
630
+ }
631
+ function Yt(e) {
632
+ let t, n, s, i, o, r, l, u = !/*visiblePages*/
633
+ e[3].includes(1), c, w, a = !/*visiblePages*/
634
+ e[3].includes(+/*totalpages*/
635
+ e[0]), E, y, $, R, L, P, h, b = u && lt(e), A = ot(
636
+ /*visiblePages*/
637
+ e[3]
638
+ ), _ = [];
639
+ for (let f = 0; f < A.length; f += 1)
640
+ _[f] = ct(rt(e, A, f));
641
+ let p = a && ut(e);
642
+ return {
643
+ c() {
644
+ t = v("div"), n = v("nav"), s = v("button"), i = I("svg"), o = I("polyline"), l = z(), b && b.c(), c = z();
645
+ for (let f = 0; f < _.length; f += 1)
646
+ _[f].c();
647
+ w = z(), p && p.c(), E = z(), y = v("button"), $ = I("svg"), R = I("polyline"), d(o, "points", "15 18 9 12 15 6"), d(i, "xmlns", "http://www.w3.org/2000/svg"), d(i, "width", "24"), d(i, "height", "24"), d(i, "viewBox", "0 0 24 24"), d(i, "fill", "none"), d(i, "stroke", "currentColor"), d(i, "stroke-width", "2"), d(i, "stroke-linecap", "round"), d(i, "stroke-linejoin", "round"), d(i, "class", "feather feather-chevron-left"), d(s, "class", "nav-btn"), s.disabled = r = /*currentPage*/
648
+ e[2] === 1, d(R, "points", "9 18 15 12 9 6"), d($, "xmlns", "http://www.w3.org/2000/svg"), d($, "width", "24"), d($, "height", "24"), d($, "viewBox", "0 0 24 24"), d($, "fill", "none"), d($, "stroke", "currentColor"), d($, "stroke-width", "2"), d($, "stroke-linecap", "round"), d($, "stroke-linejoin", "round"), d($, "class", "feather feather-chevron-right"), d(y, "class", "nav-btn"), y.disabled = L = /*currentPage*/
649
+ e[2] === /*totalpages*/
650
+ e[0], d(n, "class", "pagination");
651
+ },
652
+ m(f, S) {
653
+ x(f, t, S), m(t, n), m(n, s), m(s, i), m(i, o), m(n, l), b && b.m(n, null), m(n, c);
654
+ for (let g = 0; g < _.length; g += 1)
655
+ _[g] && _[g].m(n, null);
656
+ m(n, w), p && p.m(n, null), m(n, E), m(n, y), m(y, $), m($, R), e[13](t), P || (h = [
657
+ U(
658
+ s,
659
+ "click",
660
+ /*click_handler*/
661
+ e[8]
662
+ ),
663
+ U(
664
+ y,
665
+ "click",
666
+ /*click_handler_4*/
667
+ e[12]
668
+ )
669
+ ], P = !0);
670
+ },
671
+ p(f, [S]) {
672
+ if (S & /*currentPage*/
673
+ 4 && r !== (r = /*currentPage*/
674
+ f[2] === 1) && (s.disabled = r), S & /*visiblePages*/
675
+ 8 && (u = !/*visiblePages*/
676
+ f[3].includes(1)), u ? b ? b.p(f, S) : (b = lt(f), b.c(), b.m(n, c)) : b && (b.d(1), b = null), S & /*visiblePages, currentPage, goToPage*/
677
+ 28) {
678
+ A = ot(
679
+ /*visiblePages*/
680
+ f[3]
681
+ );
682
+ let g;
683
+ for (g = 0; g < A.length; g += 1) {
684
+ const Q = rt(f, A, g);
685
+ _[g] ? _[g].p(Q, S) : (_[g] = ct(Q), _[g].c(), _[g].m(n, w));
686
+ }
687
+ for (; g < _.length; g += 1)
688
+ _[g].d(1);
689
+ _.length = A.length;
690
+ }
691
+ S & /*visiblePages, totalpages*/
692
+ 9 && (a = !/*visiblePages*/
693
+ f[3].includes(+/*totalpages*/
694
+ f[0])), a ? p ? p.p(f, S) : (p = ut(f), p.c(), p.m(n, E)) : p && (p.d(1), p = null), S & /*currentPage, totalpages*/
695
+ 5 && L !== (L = /*currentPage*/
696
+ f[2] === /*totalpages*/
697
+ f[0]) && (y.disabled = L);
698
+ },
699
+ i: T,
700
+ o: T,
701
+ d(f) {
702
+ f && C(t), b && b.d(), Et(_, f), p && p.d(), e[13](null), P = !1, D(h);
703
+ }
704
+ };
705
+ }
706
+ function ft(e, t) {
707
+ const s = [];
708
+ if (t <= 5) {
709
+ for (let r = 1; r <= t; r++)
710
+ s.push(r);
711
+ return s;
712
+ }
713
+ let i = e - 1, o = e + 1;
714
+ i < 1 && (o += 1 - i, i = 1), o > t && (i -= o - t, o = t), i = Math.max(1, i);
715
+ for (let r = i; r <= o; r++)
716
+ s.push(r);
717
+ return s;
718
+ }
719
+ function qt(e, t, n) {
720
+ let { clientstyling: s = "" } = t, { clientstylingurl: i = "" } = t, { mbsource: o } = t, { totalpages: r = 5 } = t, l, u, c = 1, w;
721
+ w = ft(c, r), At(() => () => {
722
+ });
723
+ function a(h) {
724
+ if (h >= 1 && h <= r) {
725
+ n(2, c = h);
726
+ const b = new CustomEvent(
727
+ "pageChange",
728
+ {
729
+ detail: { page: h },
730
+ bubbles: !0,
731
+ composed: !0
732
+ }
733
+ );
734
+ document.dispatchEvent(b);
735
+ }
736
+ }
737
+ const E = () => a(c - 1), y = () => a(1), $ = (h) => a(h), R = () => a(+r), L = () => a(c + 1);
738
+ function P(h) {
739
+ W[h ? "unshift" : "push"](() => {
740
+ l = h, n(1, l);
741
+ });
742
+ }
743
+ return e.$$set = (h) => {
744
+ "clientstyling" in h && n(5, s = h.clientstyling), "clientstylingurl" in h && n(6, i = h.clientstylingurl), "mbsource" in h && n(7, o = h.mbsource), "totalpages" in h && n(0, r = h.totalpages);
745
+ }, e.$$.update = () => {
746
+ e.$$.dirty & /*currentPage, totalpages*/
747
+ 5 && n(3, w = ft(c, r)), e.$$.dirty & /*clientstyling, customStylingContainer*/
748
+ 34 && s && l && It(l, s), e.$$.dirty & /*clientstylingurl, customStylingContainer*/
749
+ 66 && i && l && zt(l, i), e.$$.dirty & /*mbsource, customStylingContainer*/
750
+ 130 && o && l && Gt(l, `${o}.Style`, u);
751
+ }, [
752
+ r,
753
+ l,
754
+ c,
755
+ w,
756
+ a,
757
+ s,
758
+ i,
759
+ o,
760
+ E,
761
+ y,
762
+ $,
763
+ R,
764
+ L,
765
+ P
766
+ ];
767
+ }
768
+ class Qt extends Vt {
769
+ constructor(t) {
770
+ super(), Ft(
771
+ this,
772
+ t,
773
+ qt,
774
+ Yt,
775
+ wt,
776
+ {
777
+ clientstyling: 5,
778
+ clientstylingurl: 6,
779
+ mbsource: 7,
780
+ totalpages: 0
781
+ },
782
+ Wt
783
+ );
784
+ }
785
+ get clientstyling() {
786
+ return this.$$.ctx[5];
787
+ }
788
+ set clientstyling(t) {
789
+ this.$$set({ clientstyling: t }), N();
790
+ }
791
+ get clientstylingurl() {
792
+ return this.$$.ctx[6];
793
+ }
794
+ set clientstylingurl(t) {
795
+ this.$$set({ clientstylingurl: t }), N();
796
+ }
797
+ get mbsource() {
798
+ return this.$$.ctx[7];
799
+ }
800
+ set mbsource(t) {
801
+ this.$$set({ mbsource: t }), N();
802
+ }
803
+ get totalpages() {
804
+ return this.$$.ctx[0];
805
+ }
806
+ set totalpages(t) {
807
+ this.$$set({ totalpages: t }), N();
808
+ }
809
+ }
810
+ Ut(Qt, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, totalpages: {} }, [], [], !0);
811
+ export {
812
+ Qt as default
813
+ };